upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Data Structures | Functions | Typedefs
Include dependency graph for temperature.h:

API Description

Go to the source code of this file.

Data Structures

struct  _temperature_context
 

Functions

temperature_context temperature_init (int pin)
 
void temperature_close (temperature_context dev)
 
upm_result_t temperature_get_value (temperature_context dev, float *tempval)
 

Typedefs

typedef struct _temperature_contexttemperature_context
 

Function Documentation

temperature_context temperature_init ( int  pin)

Analog temperature sensor initialization function

Parameters
pinanalog pin to use
Returns
sensor context
void temperature_close ( temperature_context  dev)

Analog temperature sensor destructor

Parameters
devsensor context pointer
upm_result_t temperature_get_value ( temperature_context  dev,
float *  tempval 
)

Gets the temperature in Celsius from the sensor

Parameters
devsensor context pointer
tempvaltemperature value in Celsius
Returns
result of the operation

Typedef Documentation

driver context