mirror of
https://github.com/esphome/esphome.git
synced 2026-10-21 21:36:14 +00:00
Fix function inlining in IRAM_ATTR methods
This commit is contained in:
@@ -235,13 +235,6 @@ bool HDMICEC::send(uint8_t source, uint8_t destination, const uint8_t *payload_b
|
||||
return xmit_.queue_for_send(source, destination, payload_bytes, payload_size);
|
||||
}
|
||||
|
||||
inline void IRAM_ATTR CECTransmit::set_pin_input_high() { pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); }
|
||||
|
||||
inline void IRAM_ATTR CECTransmit::set_pin_output_low() {
|
||||
pin_->pin_mode(gpio::FLAG_OUTPUT | gpio::FLAG_OPEN_DRAIN);
|
||||
pin_->digital_write(false);
|
||||
}
|
||||
|
||||
void CECTransmit::setup(InternalGPIOPin *pin) {
|
||||
// This CEC software component optionally uses a UART to transmit (write) on the cec bus.
|
||||
// When used, the uart output pin is connected to the GPIO CEC pin through a diode: cathode to uart pin.
|
||||
|
||||
@@ -144,8 +144,12 @@ class CECTransmit {
|
||||
bool is_idle() const { return send_queue_.is_empty() && (transmit_state_ == TransmitState::IDLE); }
|
||||
void set_uart(uart::UARTComponent *uart) { uart_ = uart; }
|
||||
bool has_uart() const { return uart_ != nullptr; }
|
||||
void set_pin_input_high();
|
||||
void set_pin_output_low();
|
||||
// Note: 'ESPHOME_ALWAYS_INLINE' allows the following methods to be also used in 'IRAM_ATTR' methods.
|
||||
ESPHOME_ALWAYS_INLINE void set_pin_input_high() { pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); }
|
||||
ESPHOME_ALWAYS_INLINE void set_pin_output_low() {
|
||||
pin_->pin_mode(gpio::FLAG_OUTPUT | gpio::FLAG_OPEN_DRAIN);
|
||||
pin_->digital_write(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transmit the message on the front of the send_queue out on the CEC line
|
||||
|
||||
Reference in New Issue
Block a user