1
0
Fork 0
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:
root 2019-05-31 02:06:12 +00:00
parent 2f3288502d
commit 77e2a1e29e
39 changed files with 0 additions and 84 deletions

View file

@ -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;