GPIO descriptor fixes (#578)
This commit is contained in:
committed by
GitHub
parent
a3fda9ad8f
commit
8b92aa8e5a
@@ -23,10 +23,6 @@ properties:
|
||||
type: phandles
|
||||
default: GPIO_PIN_SPEC_NONE
|
||||
description: Reset GPIO pin
|
||||
reset-active-high:
|
||||
type: boolean
|
||||
default: false
|
||||
description: Whether the reset pin is active high
|
||||
power-on-delay-ms:
|
||||
type: int
|
||||
default: 0
|
||||
|
||||
@@ -22,7 +22,6 @@ struct Ssd1306Config {
|
||||
|
||||
// Reset pin. GPIO_PIN_SPEC_NONE skips the reset toggle entirely.
|
||||
struct GpioPinSpec pin_reset;
|
||||
bool reset_active_high;
|
||||
|
||||
// See the 'power-on-delay-ms' binding property.
|
||||
uint32_t power_on_delay_ms;
|
||||
|
||||
@@ -119,9 +119,10 @@ static void perform_hardware_reset(const Ssd1306Config* config) {
|
||||
};
|
||||
gpio_config(&io_conf);
|
||||
|
||||
gpio_set_level(pin, config->reset_active_high ? 1 : 0);
|
||||
// SSD1306's reset line is fixed active-low in hardware.
|
||||
gpio_set_level(pin, 0);
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
gpio_set_level(pin, config->reset_active_high ? 0 : 1);
|
||||
gpio_set_level(pin, 1);
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user