1 #ifndef _TWR_ONEWIRE_RELAY_H
2 #define _TWR_ONEWIRE_RELAY_H
4 #include <twr_onewire.h>
6 #define TWR_ONEWIRE_RELAY_FAMILY_CODE 0x29
14 TWR_ONEWIRE_RELAY_CHANNEL_Q1 = 0,
15 TWR_ONEWIRE_RELAY_CHANNEL_Q2 = 1,
16 TWR_ONEWIRE_RELAY_CHANNEL_Q3 = 2,
17 TWR_ONEWIRE_RELAY_CHANNEL_Q4 = 3,
18 TWR_ONEWIRE_RELAY_CHANNEL_Q5 = 4,
19 TWR_ONEWIRE_RELAY_CHANNEL_Q6 = 5,
20 TWR_ONEWIRE_RELAY_CHANNEL_Q7 = 6,
21 TWR_ONEWIRE_RELAY_CHANNEL_Q8 = 7
23 } twr_onewire_relay_channel_t;
29 uint64_t _device_number;
bool twr_onewire_relay_set_state(twr_onewire_relay_t *self, twr_onewire_relay_channel_t relay_channel, bool state)
Set relay to specified state.
bool twr_onewire_relay_get_state(twr_onewire_relay_t *self, twr_onewire_relay_channel_t relay_channel, bool *state)
Get current relay state.
bool twr_onewire_relay_init(twr_onewire_relay_t *self, twr_onewire_t *onewire, uint64_t device_number)
Initialize relay.
struct twr_onewire_t twr_onewire_t
1-Wire instance
HARDWARIO 1-wire relay instance.