DS1624 digital temperature sensor driver. More...
Functions |
|
| bool | ds1624_init (uint8_t device_address) |
|
Function for initializing DS1624 temperature sensor to 1-shot mode.
More...
|
|
| bool | ds1624_temp_read (int8_t *temperature_in_celcius, int8_t *temperature_fraction) |
|
Function for reading temperature from the sensor.
More...
|
|
| bool | ds1624_start_temp_conversion (void) |
|
Function for starting temperature conversion. Valid data will be available 400 - 1000 milliseconds after exiting this function.
More...
|
|
| bool | ds1624_is_temp_conversion_done (void) |
|
Function for checking if temperature conversion is done.
More...
|
|
Detailed Description
DS1624 digital temperature sensor driver.
Function Documentation
| bool ds1624_init | ( | uint8_t | device_address | ) |
Function for initializing DS1624 temperature sensor to 1-shot mode.
- Note
- Before calling this function, you must initialize twi_master first.
- Parameters
-
device_address Bits [2:0] for the device address. All other bits must be zero.
- Returns
- Return values
-
true If communication succeeded with the device. false If communication failed with the device.
| bool ds1624_is_temp_conversion_done | ( | void | ) |
Function for checking if temperature conversion is done.
- Returns
- Return values
-
true Temperature conversion done. false Temperature converion still in progress.
| bool ds1624_start_temp_conversion | ( | void | ) |
Function for starting temperature conversion. Valid data will be available 400 - 1000 milliseconds after exiting this function.
- Returns
- Return values
-
true Temperature conversion started. false Temperature converion failed to start.
| bool ds1624_temp_read | ( | int8_t * | temperature_in_celcius , |
| int8_t * | temperature_fraction | ||
| ) |
Function for reading temperature from the sensor.
- Parameters
-
temperature_in_celcius Memory location to store temperature in full celcius degrees. temperature_fraction Memory location to store temperature's fraction part in 0.03125 celcius degree increments.
- Returns
- Return values
-
true Temperature was successfully read false Temperature reading failed or conversion was not yet complete