diff options
Diffstat (limited to 'drivers/oled/oled_driver.c')
-rw-r--r-- | drivers/oled/oled_driver.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index 8cca41394f..1d1c2a90c4 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -192,7 +192,7 @@ __attribute__((weak)) bool oled_send_cmd(const uint8_t *data, uint16_t size) { return false; } // Command Mode - writePinLow(OLED_DC_PIN); + gpio_write_pin_low(OLED_DC_PIN); // Send the commands if (spi_transmit(&data[1], size - 1) != SPI_STATUS_SUCCESS) { spi_stop(); @@ -215,7 +215,7 @@ __attribute__((weak)) bool oled_send_cmd_P(const uint8_t *data, uint16_t size) { } spi_status_t status = SPI_STATUS_SUCCESS; // Command Mode - writePinLow(OLED_DC_PIN); + gpio_write_pin_low(OLED_DC_PIN); // Send the commands for (uint16_t i = 1; i < size && status >= 0; i++) { status = spi_write(pgm_read_byte((const char *)&data[i])); @@ -239,7 +239,7 @@ __attribute__((weak)) bool oled_send_data(const uint8_t *data, uint16_t size) { return false; } // Data Mode - writePinHigh(OLED_DC_PIN); + gpio_write_pin_high(OLED_DC_PIN); // Send the commands if (spi_transmit(data, size) != SPI_STATUS_SUCCESS) { spi_stop(); @@ -256,17 +256,17 @@ __attribute__((weak)) bool oled_send_data(const uint8_t *data, uint16_t size) { __attribute__((weak)) void oled_driver_init(void) { #if defined(OLED_TRANSPORT_SPI) spi_init(); - setPinOutput(OLED_CS_PIN); - writePinHigh(OLED_CS_PIN); + gpio_set_pin_output(OLED_CS_PIN); + gpio_write_pin_high(OLED_CS_PIN); - setPinOutput(OLED_DC_PIN); - writePinLow(OLED_DC_PIN); + gpio_set_pin_output(OLED_DC_PIN); + gpio_write_pin_low(OLED_DC_PIN); # ifdef OLED_RST_PIN /* Reset device */ - setPinOutput(OLED_RST_PIN); - writePinLow(OLED_RST_PIN); + gpio_set_pin_output(OLED_RST_PIN); + gpio_write_pin_low(OLED_RST_PIN); wait_ms(20); - writePinHigh(OLED_RST_PIN); + gpio_write_pin_high(OLED_RST_PIN); wait_ms(20); # endif #elif defined(OLED_TRANSPORT_I2C) |