Skip to content

Commit 20eeae1

Browse files
committed
not all boards support the NSS PULSE
1 parent 066cd03 commit 20eeae1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/encoders/tle5012b/STM32TLE5012B.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ void TLE5012B::init() {
102102
_spi.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
103103
_spi.Init.CRCPolynomial = 7;
104104
_spi.Init.TIMode = SPI_TIMODE_DISABLE;
105+
#if defined(SPI_NSS_PULSE_DISABLE)
105106
_spi.Init.NSSPMode = SPI_NSS_PULSE_DISABLE;
107+
#endif
106108

107109
uint32_t spi_freq = spi_getClkFreqInst(spi_inst);
108110
if (_freq >= (spi_freq / SPI_SPEED_CLOCK_DIV2_MHZ)) {

0 commit comments

Comments
 (0)