mirror of
https://github.com/nekorevend/esphome-emporia-vue-utility.git
synced 2026-01-08 04:30:38 -07:00
Update syntax for esp-idf.
Apparently esp-idf will be required by ESPHome 2026.1.0, so just making the switch to esp-idf now. The syntax change appears to still work with Arduino as well.
This commit is contained in:
@@ -7,8 +7,8 @@ namespace emporia_vue_utility {
|
||||
|
||||
void EmporiaVueUtility::setup() {
|
||||
#if USE_LED_PINS
|
||||
pinMode(LED_PIN_LINK, OUTPUT);
|
||||
pinMode(LED_PIN_WIFI, OUTPUT);
|
||||
set_pin_to_output(LED_PIN_LINK);
|
||||
set_pin_to_output(LED_PIN_WIFI);
|
||||
#endif
|
||||
led_link(false);
|
||||
led_wifi(false);
|
||||
|
||||
@@ -794,5 +794,10 @@ class EmporiaVueUtility : public PollingComponent, public uart::UARTDevice {
|
||||
bool ready_to_read_meter_ = false;
|
||||
};
|
||||
|
||||
static inline void set_pin_to_output(gpio_num_t pin) {
|
||||
gpio_reset_pin(pin);
|
||||
gpio_set_direction(pin, GPIO_MODE_OUTPUT);
|
||||
}
|
||||
|
||||
} // namespace emporia_vue_utility
|
||||
} // namespace esphome
|
||||
|
||||
Reference in New Issue
Block a user