mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Remove USE_RTC6705_CLK_HACK.
For hardware SPI the GPIO pin is in Alternate Function mode, so setting the bit in BSRR (via IOHi) won't have any affect on the IO level.
This commit is contained in:
parent
165a760f1a
commit
2466f43abd
3 changed files with 0 additions and 23 deletions
|
@ -55,14 +55,7 @@ static busDevice_t busInstance;
|
|||
static busDevice_t *busdev;
|
||||
|
||||
#define DISABLE_RTC6705() IOHi(busdev->busdev_u.spi.csnPin)
|
||||
|
||||
#ifdef USE_RTC6705_CLK_HACK
|
||||
static IO_t vtxCLKPin = IO_NONE;
|
||||
// HACK for missing pull up on CLK line - drive the CLK high *before* enabling the CS pin.
|
||||
#define ENABLE_RTC6705() {IOHi(vtxCLKPin); delayMicroseconds(5); IOLo(busdev->busdev_u.spi.csnPin); }
|
||||
#else
|
||||
#define ENABLE_RTC6705() IOLo(busdev->busdev_u.spi.csnPin)
|
||||
#endif
|
||||
|
||||
#define DP_5G_MASK 0x7000 // b111000000000000
|
||||
#define PA5G_BS_MASK 0x0E00 // b000111000000000
|
||||
|
@ -113,16 +106,6 @@ bool rtc6705IOInit(const vtxIOConfig_t *vtxIOConfig)
|
|||
rtc6705HaveRequiredResources = rtc6705HaveRequiredResources && vtxPowerPin;
|
||||
#endif
|
||||
|
||||
#ifdef USE_RTC6705_CLK_HACK
|
||||
SPIDevice device = SPI_CFG_TO_DEV(vtxIOConfig->spiDevice);
|
||||
spiDevice_t *spi = &(spiDevice[device]);
|
||||
|
||||
vtxCLKPin = IOGetByTag(spi->sck);
|
||||
// we assume the CLK pin will have been initialised by the SPI code.
|
||||
|
||||
rtc6705HaveRequiredResources = rtc6705HaveRequiredResources && vtxCLKPin;
|
||||
#endif
|
||||
|
||||
if (!rtc6705HaveRequiredResources) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -101,9 +101,6 @@
|
|||
#define RTC6705_SPI_INSTANCE SPI3
|
||||
#define RTC6705_POWER_PIN PC3
|
||||
|
||||
#define USE_RTC6705_CLK_HACK
|
||||
#define RTC6705_CLK_PIN SPI3_SCK_PIN
|
||||
|
||||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN PA15
|
||||
|
|
|
@ -147,9 +147,6 @@
|
|||
#define RTC6705_SPI_INSTANCE SPI3
|
||||
#define RTC6705_POWER_PIN PC3
|
||||
|
||||
#define USE_RTC6705_CLK_HACK
|
||||
#define RTC6705_CLK_PIN SPI3_SCK_PIN
|
||||
|
||||
// Bus Switched Device, Device A.
|
||||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue