mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Clean up use of MAX7456_SPI_CLK and MAX7456_RESTORE_CLK
These are set in many targets, but they are exactly the same as set in #6871 Notable exceptions: NOX, IMPUSERCF3 are set to clock data into the MAX7456 at 5MHz
This commit is contained in:
parent
2f3288502d
commit
77e2a1e29e
39 changed files with 0 additions and 84 deletions
|
@ -178,17 +178,8 @@
|
|||
#define __spiBusTransactionBegin(busdev) spiBusTransactionBegin(busdev)
|
||||
#define __spiBusTransactionEnd(busdev) spiBusTransactionEnd(busdev)
|
||||
#else
|
||||
#ifdef MAX7456_SPI_CLK
|
||||
#define __spiBusTransactionBegin(busdev) {spiBusSetDivisor(busdev, max7456SpiClock);IOLo((busdev)->busdev_u.spi.csnPin);}
|
||||
#else
|
||||
#define __spiBusTransactionBegin(busdev) IOLo((busdev)->busdev_u.spi.csnPin)
|
||||
#endif
|
||||
|
||||
#ifdef MAX7456_RESTORE_CLK
|
||||
#define __spiBusTransactionEnd(busdev) {IOHi((busdev)->busdev_u.spi.csnPin);spiSetDivisor((busdev)->busdev_u.spi.instance, MAX7456_RESTORE_CLK);}
|
||||
#else
|
||||
#define __spiBusTransactionEnd(busdev) IOHi((busdev)->busdev_u.spi.csnPin)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
busDevice_t max7456BusDevice;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue