mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
Merge pull request #10873 from hydra/bf-fix-rtc6705-init
This commit is contained in:
commit
409b6fda81
1 changed files with 3 additions and 1 deletions
|
@ -110,7 +110,9 @@ bool rtc6705IOInit(const vtxIOConfig_t *vtxIOConfig)
|
||||||
IOConfigGPIO(vtxPowerPin, IOCFG_OUT_PP);
|
IOConfigGPIO(vtxPowerPin, IOCFG_OUT_PP);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vtxIOConfig->csTag && spiSetBusInstance(dev, vtxIOConfig->spiDevice)) {
|
// RTC6705 when using SOFT SPI driver doesn't use an SPI device, so don't attempt to initialise an spiInstance.
|
||||||
|
SPI_TypeDef *spiInstance = spiInstanceByDevice(SPI_CFG_TO_DEV(vtxIOConfig->spiDevice));
|
||||||
|
if (spiInstance && spiSetBusInstance(dev, vtxIOConfig->spiDevice)) {
|
||||||
devInstance.busType_u.spi.csnPin = csnPin;
|
devInstance.busType_u.spi.csnPin = csnPin;
|
||||||
IOInit(devInstance.busType_u.spi.csnPin, OWNER_VTX_CS, 0);
|
IOInit(devInstance.busType_u.spi.csnPin, OWNER_VTX_CS, 0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue