|
@@ -22,15 +22,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
chlcd_error_t chlcd_pin_set_output(chlcd_pin_t target) {
|
|
chlcd_error_t chlcd_pin_set_output(chlcd_pin_t target) {
|
|
|
- gpio_config_t config[1] = {0};
|
|
|
|
|
-
|
|
|
|
|
- config->pin_bit_mask = 1UL << target;
|
|
|
|
|
- config->mode = GPIO_MODE_OUTPUT;
|
|
|
|
|
- config->pull_up_en = GPIO_PULLUP_DISABLE;
|
|
|
|
|
- config->pull_down_en = GPIO_PULLDOWN_DISABLE;
|
|
|
|
|
- config->intr_type = GPIO_INTR_DISABLE;
|
|
|
|
|
-
|
|
|
|
|
- if (gpio_config(config) == ESP_OK) {
|
|
|
|
|
|
|
+ if (gpio_output_enable(target) == ESP_OK) {
|
|
|
return CHLCD_SUCCESS;
|
|
return CHLCD_SUCCESS;
|
|
|
}
|
|
}
|
|
|
|
|
|