1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

CC3D - Fix builds that use l3gd20 - duplicate SPI code removed.

This commit is contained in:
Dominic Clifton 2014-07-22 21:21:22 +01:00
parent 053a28dc62
commit f342560da2
2 changed files with 18 additions and 50 deletions

View file

@ -26,6 +26,9 @@
static volatile uint16_t spi1ErrorCount = 0;
static volatile uint16_t spi2ErrorCount = 0;
#ifdef STM32F303xC
static volatile uint16_t spi3ErrorCount = 0;
#endif
void initSpi1(void)
{
@ -146,6 +149,12 @@ uint32_t spiTimeoutUserCallback(SPI_TypeDef *instance)
} else if (instance == SPI2) {
spi2ErrorCount++;
}
#ifdef STM32F303xC
else {
spi3ErrorCount++;
return spi3ErrorCount;
}
#endif
return -1;
}