2.2 Bit-Level Functions

The bit-level functions are implemented according to the 1-Wire protocol. All timing parameters comply with the recommended values in the DS2433 data sheet.
Bit-level FunctionDescription
uint8_t OW_detect_reset (void);This function is used to detect the ‘Reset’ signal
void OW_presence(void);This function is used to send ‘Presence’ signal
void OW_write_bit (uint8_t write_data);This function is used to transmit a bit of data to the host device
uint8_t OW_read_bit (void);This function is used to receive a bit of data from the host device

Two macros: OW_PULL_BUS_LOW() and OW_RELEASE_BUS() are included to drive the bus low and to release the bus. These are implemented as macros because they occur frequently, and the overhead caused by function calls is unwanted because of the strict timing requirements.