OneWire + DS18X20 Library
Basic functions for OneWire operations + specific DS18x20 operations
 All Functions Groups Pages
Functions
ONEWIRE PRIVATE FUNCTIONS

Functions

void onewire_write_bit (uint8_t data)
 write one bit to bus More...
 
uint8_t onewire_read_bit (void)
 read one bit from bus More...
 
uint8_t onewire_search (uint8_t buffer[8], uint8_t cmd)
 scan OneWire bus for normal ROM or alarm search More...
 

Detailed Description

Function Documentation

void onewire_write_bit ( uint8_t  data)

write one bit to bus

Parameters
datawrite data (bit#0)
Returns
none

Definition at line 47 of file onewire.cpp.

uint8_t onewire_read_bit ( void  )

read one bit from bus

Parameters
none
Returns
read data (bit #0)

Definition at line 64 of file onewire.cpp.

uint8_t onewire_search ( uint8_t  buffer[8],
uint8_t  cmd 
)

scan OneWire bus for normal ROM or alarm search

call onewire_search_init() before first call of this function after each call, the buffer contains the new scaned ROM code

Parameters
buffer[8]pointer to buffer array
cmdonewire search command
Returns
error code
ONEWIRE_OK new ROM code scanned successfully
ONEWIRE_NO_PRESENCE no bus response during reset
ONEWIRE_GND_SHORT bus short circuit to GND
ONEWIRE_CRC_ERROR CRC error in received rom code
ONEWIRE_SCAN_ERROR no bus response during scan
ONEWIRE_LAST_CODE last scan, no more codes available

Definition at line 120 of file onewire.cpp.