w1.h File Reference

The header file describes the 1-Wire interface. More...

#include <halW1.h>

Go to the source code of this file.

Defines

#define W1_ANY_FAMILY   0x00
#define DS2411   0x01

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

The header file describes the 1-Wire interface.

Author:
Atmel Corporation: http://www.atmel.com
Support email: avr@atmel.com
Copyright (c) 2008 , Atmel Corporation. All rights reserved. Licensed under Atmel's Limited License Agreement (BitCloudTM).

Definition in file w1.h.


Define Documentation

#define W1_ANY_FAMILY   0x00

Definition at line 29 of file w1.h.

#define DS2411   0x01

Definition at line 30 of file w1.h.


Function Documentation

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.

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_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.

void HAL_WriteW1 ( uint8_t  value  ) 

Writes a single byte to the bus.

Parameters:
[in] value - byte to write.

uint8_t HAL_ReadW1 ( void   ) 

Reads a single byte from the bus.

Returns:
byte read from the bus.


Generated on Mon Feb 16 17:53:40 2009 for BitCloud Stack Documentation by  doxygen 1.5.1-p1