diff options
author | Drashna Jaelre <drashna@live.com> | 2021-12-15 13:41:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 13:41:07 -0800 |
commit | aed64aaef4724c01a30b1815c0c910ca8b1a5e43 (patch) | |
tree | 785af8d14b310374997d8a4d959e4b00e658f246 /drivers/sensors/cirque_pinnacle_spi.c | |
parent | 3fa592a4024a24a636fa0c562e6761667a94f565 (diff) |
[Core] Fix Sensor driver code (#15484)
Diffstat (limited to 'drivers/sensors/cirque_pinnacle_spi.c')
-rw-r--r-- | drivers/sensors/cirque_pinnacle_spi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/sensors/cirque_pinnacle_spi.c b/drivers/sensors/cirque_pinnacle_spi.c index f3eee88758..ed40abd9fa 100644 --- a/drivers/sensors/cirque_pinnacle_spi.c +++ b/drivers/sensors/cirque_pinnacle_spi.c @@ -15,7 +15,7 @@ extern bool touchpad_init; void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) { uint8_t cmdByte = READ_MASK | address; // Form the READ command byte if (touchpad_init) { - if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_TRACKPAD_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) { + if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_PINNACLE_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) { spi_write(cmdByte); spi_read(); // filler spi_read(); // filler @@ -27,7 +27,6 @@ void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) { dprintf("error right touchpad\n"); #endif touchpad_init = false; - j } spi_stop(); } @@ -38,7 +37,7 @@ void RAP_Write(uint8_t address, uint8_t data) { uint8_t cmdByte = WRITE_MASK | address; // Form the WRITE command byte if (touchpad_init) { - if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_TRACKPAD_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) { + if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_PINNACLE_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) { spi_write(cmdByte); spi_write(data); } else { |