11 #include <unordered_map> 12 #include <unordered_set> 58 template<
typename F>
bool spin_wait_(uint32_t timeout, F func) {
59 auto start_time =
millis();
63 if (cur_time - start_time >= timeout) {
103 void setup()
override;
105 void loop()
override;
bool should_skip_loop_(uint32_t cur_time) const
bool check_timings_(uint32_t cur_time)
void handle_protocol_read_error_()
uint32_t last_conversation_start_
std::unordered_set< MessageId > initial_messages_
void process_response(OpenthermData &data)
std::unordered_set< MessageId > repeating_messages_
InternalGPIOPin * in_pin_
void set_out_pin(InternalGPIOPin *out_pin)
std::unique_ptr< OpenTherm > opentherm_
void handle_protocol_write_error_()
uint32_t IRAM_ATTR HOT millis()
OpenthermData build_request_(MessageId request_id)
bool spin_wait_(uint32_t timeout, F func)
void set_sync_mode(bool sync_mode)
void start_conversation_()
uint32_t last_conversation_end_
InternalGPIOPin * out_pin_
void set_in_pin(InternalGPIOPin *in_pin)
void set_cooling_enable(bool value)
std::unordered_set< MessageId >::const_iterator current_message_iterator_
void dump_config() override
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
float get_setup_priority() const override
void add_initial_message(MessageId message_id)
void IRAM_ATTR HOT yield()
void set_dhw_enable(bool value)
void set_otc_active(bool value)
Implementation of SPI Controller mode.
void set_ch_enable(bool value)
void add_repeating_message(MessageId message_id)
Structure to hold Opentherm data packet content.
void handle_timeout_error_()
void on_shutdown() override
void set_ch2_active(bool value)
OpenthermData last_request_