16 #if defined(ESP32) || defined(USE_ESP_IDF) 17 #include "driver/timer.h" 23 template<
class T> constexpr T
read_bit(T value, uint8_t bit) {
return (value >> bit) & 0x01; }
25 template<
class T> constexpr T
set_bit(T value, uint8_t bit) {
return value |= (1UL << bit); }
27 template<
class T> constexpr T
clear_bit(T value, uint8_t bit) {
return value &= ~(1UL << bit); }
29 template<
class T> constexpr T
write_bit(T value, uint8_t bit, uint8_t bit_value) {
192 void f88(
float value);
202 void u16(uint16_t value);
212 void s16(int16_t value);
325 const char *message_type_to_str(
MessageType message_type);
327 const char *message_id_to_str(
MessageId id);
332 static void esp8266_timer_isr();
341 #if defined(ESP32) || defined(USE_ESP_IDF) 342 timer_group_t timer_group_;
343 timer_idx_t timer_idx_;
352 int32_t timeout_counter_;
354 int32_t device_timeout_;
356 #if defined(ESP32) || defined(USE_ESP_IDF) 357 bool init_esp32_timer_();
358 void start_esp32_timer_(uint64_t alarm_value);
364 void start_read_timer_();
365 void start_write_timer_();
366 bool check_parity_(uint32_t
val);
368 void bit_read_(uint8_t value);
370 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. ...