16 #if defined(ESP32) || defined(USE_ESP_IDF) 17 #include "driver/timer.h" 24 template<
class T> constexpr T
read_bit(T value, uint8_t bit) {
return (value >> bit) & 0x01; }
26 template<
class T> constexpr T
set_bit(T value, uint8_t bit) {
return value |= (1UL << bit); }
28 template<
class T> constexpr T
clear_bit(T value, uint8_t bit) {
return value &= ~(1UL << bit); }
30 template<
class T> constexpr T
write_bit(T value, uint8_t bit, uint8_t bit_value) {
31 return bit_value ? setBit(value, bit) : clearBit(value, bit);
160 void f88(
float value);
170 void u16(uint16_t value);
180 void s16(int16_t value);
293 const char *message_type_to_str(
MessageType message_type);
295 const char *message_id_to_str(
MessageId id);
300 static void esp8266_timer_isr();
309 #if defined(ESP32) || defined(USE_ESP_IDF) 310 timer_group_t timer_group_;
311 timer_idx_t timer_idx_;
320 int32_t timeout_counter_;
322 int32_t device_timeout_;
324 #if defined(ESP32) || defined(USE_ESP_IDF) 325 bool init_esp32_timer_();
326 void start_esp32_timer_(uint64_t alarm_value);
332 void start_read_timer_();
333 void start_write_timer_();
334 bool check_parity_(uint32_t
val);
336 void bit_read_(uint8_t value);
338 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. ...