ds1631.h File Reference
DS1631 temperature sensor routines.
More...
Go to the source code of this file.
Detailed Description
Define Documentation
#define ds1631_access_config 0xAC |
#define ds1631_access_th 0xA1 |
#define ds1631_access_tl 0xA2 |
#define ds1631_read_temp 0xAA |
#define ds1631_setup |
( |
|
) |
ds1631_setup_io() |
#define ds1631_software_por 0x54 |
#define ds1631_start_convert 0x51 |
#define ds1631_stop_convert 0x22 |
Function Documentation
void ds1631_convert_temp |
( |
uns8 |
addr |
) |
|
This routine starts the temperature conversion in the ds1631. Issue this command before actually reading the temperature.
uns8 ds1631_get_config |
( |
uns8 |
addr |
) |
|
Gets the ds1631 config register (memory location 0x01)
uns16 ds1631_get_temp |
( |
uns8 |
addr |
) |
|
Returns 16bit raw temperature register from ds1631. Note that if you are in one-shot mode (the default) you must have already issued a start_convert and waited until it is complete (to check for completion you can either wait long enough, or query the config register to check).
void ds1631_set_config |
( |
uns8 |
addr, |
|
|
uns8 |
config | |
|
) |
| | |
Sets the ds1631 config register
void ds1631_setup_io |
( |
void |
|
) |
|