Skip to content

Commit 9d859c8

Browse files
Update esp32-hal-spi.c
renamed invert_out to ss_invert to be more intuitive
1 parent 6911abf commit 9d859c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cores/esp32/esp32-hal-spi.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct spi_struct_t {
7474
int8_t miso;
7575
int8_t mosi;
7676
int8_t ss;
77-
bool invert_out;
77+
bool ss_invert;
7878
};
7979

8080
#if CONFIG_IDF_TARGET_ESP32S2
@@ -368,7 +368,7 @@ bool spiAttachSS(spi_t *spi, uint8_t ss_num, int8_t ss) {
368368
return false;
369369
}
370370
pinMode(ss, OUTPUT);
371-
pinMatrixOutAttach(ss, SPI_SS_IDX(spi->num, ss_num), spi->invert_out, false);
371+
pinMatrixOutAttach(ss, SPI_SS_IDX(spi->num, ss_num), spi->ss_invert, false);
372372
spiEnableSSPins(spi, (1 << ss_num));
373373
spi->ss = ss;
374374
if (!perimanSetPinBus(ss, ESP32_BUS_TYPE_SPI_MASTER_SS, (void *)(spi->num + 1), spi->num, -1)) {
@@ -440,7 +440,7 @@ void spiSSDisable(spi_t *spi) {
440440

441441
void spiSSInvertout(spi_t *spi, bool invert) {
442442
if (spi) {
443-
spi->invert_out = invert;
443+
spi->ss_invert = invert;
444444
}
445445
}
446446

0 commit comments

Comments
 (0)