w1.h File Reference

Declaration of the 1-Wire interface. More...

Go to the source code of this file.

Functions

W1Status_t HAL_SearchW1Device (uint8_t family, uint8_t *data, uint8_t count, uint8_t *actCount)
 1-Wire search procedure with search ROM command only
W1Status_t HAL_AlarmSearchW1Device (uint8_t family, uint8_t *data, uint8_t count, uint8_t *actCount)
 1-Wire search procedure with alarm search command only
uint8_t HAL_ResetW1 (void)
 Resets all devices connected to the bus.
void HAL_WriteW1 (uint8_t value)
 Writes a single byte to the bus.
uint8_t HAL_ReadW1 (void)
 Reads a single byte from the bus.


Detailed Description

Declaration of the 1-Wire interface.

Definition in file w1.h.


Function Documentation

W1Status_t HAL_AlarmSearchW1Device ( uint8_t  family,
uint8_t *  data,
uint8_t  count,
uint8_t *  actCount 
)

1-Wire search procedure with alarm search command only

Parameters:
[in] family - 8-bit family code.
[in] data - pointer of SRAM where the 8-bytes ROM codes returned by the devices are stored.
[in] count - number of devices we wish to find.
[in] actCount - number of devices actually found.
Returns:
W1_SUCCESS_STATUS - if at least one device has been found.
W1_NO_DEVICE_STATUS - if there are no any devices presented on the bus with specified family code.
W1_INVALID_CRC - if an invalid CRC has been read during the search and no devices with specified family code was found.

uint8_t HAL_ReadW1 ( void   ) 

Reads a single byte from the bus.

Returns:
byte read from the bus.

uint8_t HAL_ResetW1 ( void   ) 

Resets all devices connected to the bus.

Returns:
0 - there are some devices at the bus.
1 - there are no devices at the bus.

W1Status_t HAL_SearchW1Device ( uint8_t  family,
uint8_t *  data,
uint8_t  count,
uint8_t *  actCount 
)

1-Wire search procedure with search ROM command only

Parameters:
[in] family - 8-bit family code.
[in] data - pointer of SRAM where the 8-bytes ROM codes returned by the devices are stored.
Attention! Memory size must be equal to (Number of devices) * 8 bytes
[in] count - number of devices we wish to find.
[in] actCount - number of devices actually found.
Returns:
W1_SUCCESS_STATUS - if at least one device has been found.
W1_NO_DEVICE_STATUS - if there are no any devices presented on the bus with specified family code.
W1_INVALID_CRC - if an invalid CRC has been read during the search and no devices with specified family code was found.

void HAL_WriteW1 ( uint8_t  value  ) 

Writes a single byte to the bus.

Parameters:
[in] value - byte to write.


Generated on Wed Apr 2 19:06:16 2008 for ZigBeeNet Stack Documentation by  doxygen 1.5.1-p1