upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
Go to the source code of this file.
Data Structures | |
struct | _ldt0028_context |
Functions | |
ldt0028_context | ldt0028_init (int16_t pin) |
void | ldt0028_close (ldt0028_context dev) |
upm_result_t | ldt0028_set_aref (const ldt0028_context dev, float aref) |
upm_result_t | ldt0028_set_scale (const ldt0028_context dev, float scale) |
upm_result_t | ldt0028_set_offset (const ldt0028_context dev, float offset) |
float | ldt0028_get_aref (const ldt0028_context dev) |
float | ldt0028_get_scale (const ldt0028_context dev) |
float | ldt0028_get_offset (const ldt0028_context dev) |
upm_result_t | ldt0028_get_normalized (const ldt0028_context dev, float *value) |
upm_result_t | ldt0028_get_raw_volts (const ldt0028_context dev, float *value) |
upm_result_t | ldt0028_get_volts (const ldt0028_context dev, float *value) |
Typedefs | |
typedef struct _ldt0028_context * | ldt0028_context |
ldt0028_context ldt0028_init | ( | int16_t | pin | ) |
Initialize analog sensor
pin | Analog pin |
void ldt0028_close | ( | ldt0028_context | dev | ) |
Analog sensor destructor
sensor | context pointer |
upm_result_t ldt0028_set_aref | ( | const ldt0028_context | dev, |
float | aref | ||
) |
Set ADC reference voltage
dev | sensor context pointer |
aref | ADC reference voltage |
upm_result_t ldt0028_set_scale | ( | const ldt0028_context | dev, |
float | scale | ||
) |
Set sensor scale. This scale is applied to the return value: counts = counts * scale
dev | sensor context pointer |
scale | count scale value used |
upm_result_t ldt0028_set_offset | ( | const ldt0028_context | dev, |
float | offset | ||
) |
Set sensor offset. This offset is applied to the return value: value = value + offset
dev | sensor context pointer |
offset | count offset value used |
float ldt0028_get_aref | ( | const ldt0028_context | dev | ) |
Get sensor aref
dev | sensor context pointer |
float ldt0028_get_scale | ( | const ldt0028_context | dev | ) |
Get sensor scale
dev | sensor context pointer |
float ldt0028_get_offset | ( | const ldt0028_context | dev | ) |
Get sensor offset
dev | sensor context pointer |
upm_result_t ldt0028_get_normalized | ( | const ldt0028_context | dev, |
float * | value | ||
) |
Read normalized value for sensor
dev | sensor context pointer |
*value | Normalized value (0.0 -> 1.0) |
upm_result_t ldt0028_get_raw_volts | ( | const ldt0028_context | dev, |
float * | value | ||
) |
Read raw voltage from the sensor
dev | sensor context pointer |
*value | Raw sensor voltage |
upm_result_t ldt0028_get_volts | ( | const ldt0028_context | dev, |
float * | value | ||
) |
Read scaled/offset voltage from the sensor
dev | sensor context pointer |
*value | Adjusted sensor voltage |
typedef struct _ldt0028_context * ldt0028_context |
driver context