15 #if defined(ESP32) || defined(USE_ESP_IDF) 16 #include "driver/timer.h" 22 template<
class T> constexpr T
read_bit(T value, uint8_t bit) {
return (value >> bit) & 0x01; }
24 template<
class T> constexpr T
set_bit(T value, uint8_t bit) {
return value |= (1UL << bit); }
26 template<
class T> constexpr T
clear_bit(T value, uint8_t bit) {
return value &= ~(1UL << bit); }
28 template<
class T> constexpr T
write_bit(T value, uint8_t bit, uint8_t bit_value) {
191 void f88(
float value);
201 void u16(uint16_t value);
211 void s16(int16_t value);
324 const char *message_type_to_str(
MessageType message_type);
326 const char *message_id_to_str(
MessageId id);
331 static void esp8266_timer_isr();
340 #if defined(ESP32) || defined(USE_ESP_IDF) 341 timer_group_t timer_group_;
342 timer_idx_t timer_idx_;
351 int32_t timeout_counter_;
353 int32_t device_timeout_;
355 #if defined(ESP32) || defined(USE_ESP_IDF) 356 bool init_esp32_timer_();
357 void start_esp32_timer_(uint64_t alarm_value);
363 void start_read_timer_();
364 void start_write_timer_();
365 bool check_parity_(uint32_t
val);
367 void bit_read_(uint8_t value);
369 void write_bit_(uint8_t high, uint8_t clock);
Copy of GPIOPin that is safe to use from ISRs (with no virtual functions)
constexpr T read_bit(T value, uint8_t bit)
bool is_protocol_error()
Indicates whether last listen() or send() operation ends up with a protocol error.
bool is_idle()
Indicates whether listinig or sending is not in progress.
ProtocolErrorType error_type
constexpr T write_bit(T value, uint8_t bit, uint8_t bit_value)
bool has_message()
Use this function to check whether listen() function already captured a valid data packet...
constexpr T clear_bit(T value, uint8_t bit)
Opentherm static class that supports either listening or sending Opentherm data packets in the same t...
BedjetMode mode
BedJet operating mode.
constexpr T set_bit(T value, uint8_t bit)
bool is_sent()
Use this function to check whether send() function already finished sending data packed to line...
bool is_error()
Indicates whether last listen() or send() operation ends up with an error.
Implementation of SPI Controller mode.
Structure to hold Opentherm data packet content.
bool is_timeout()
Indicates whether last listen() or send() operation ends up with a timeout error. ...