1
0
Fork 0

Update GPIO macro usages in core (#23093)

This commit is contained in:
Ryan 2024-02-18 17:08:27 +11:00 committed by GitHub
parent 6810aaf013
commit 2d1aed78a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 334 additions and 334 deletions

View file

@ -92,10 +92,10 @@ static void InvertCharacter(uint8_t *cursor) {
}
bool st7565_init(display_rotation_t rotation) {
setPinOutput(ST7565_A0_PIN);
writePinHigh(ST7565_A0_PIN);
setPinOutput(ST7565_RST_PIN);
writePinHigh(ST7565_RST_PIN);
gpio_set_pin_output(ST7565_A0_PIN);
gpio_write_pin_high(ST7565_A0_PIN);
gpio_set_pin_output(ST7565_RST_PIN);
gpio_write_pin_high(ST7565_RST_PIN);
st7565_rotation = st7565_init_user(rotation);
@ -488,18 +488,18 @@ void st7565_task(void) {
__attribute__((weak)) void st7565_task_user(void) {}
void st7565_reset(void) {
writePinLow(ST7565_RST_PIN);
gpio_write_pin_low(ST7565_RST_PIN);
wait_ms(20);
writePinHigh(ST7565_RST_PIN);
gpio_write_pin_high(ST7565_RST_PIN);
wait_ms(20);
}
spi_status_t st7565_send_cmd(uint8_t cmd) {
writePinLow(ST7565_A0_PIN);
gpio_write_pin_low(ST7565_A0_PIN);
return spi_write(cmd);
}
spi_status_t st7565_send_data(uint8_t *data, uint16_t length) {
writePinHigh(ST7565_A0_PIN);
gpio_write_pin_high(ST7565_A0_PIN);
return spi_transmit(data, length);
}