nRF51 SDK - S210 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
DS1624 digital temperature sensor driver

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_addressBits [2:0] for the device address. All other bits must be zero.
Returns
Return values
trueIf communication succeeded with the device.
falseIf communication failed with the device.
bool ds1624_is_temp_conversion_done ( void  )

Function for checking if temperature conversion is done.

Returns
Return values
trueTemperature conversion done.
falseTemperature 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
trueTemperature conversion started.
falseTemperature 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_celciusMemory location to store temperature in full celcius degrees.
temperature_fractionMemory location to store temperature's fraction part in 0.03125 celcius degree increments.
Returns
Return values
trueTemperature was successfully read
falseTemperature reading failed or conversion was not yet complete