upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
Go to the source code of this file.
Data Structures | |
struct | _ad8232_context |
Functions | |
ad8232_context | ad8232_init (int lo_plus, int lo_minus, int output, float a_ref) |
void | ad8232_close (ad8232_context dev) |
upm_result_t | ad8232_get_value (ad8232_context dev, int *value) |
Macros | |
#define | AD8232_DEFAULT_AREF 3.3 |
Typedefs | |
typedef struct _ad8232_context * | ad8232_context |
ad8232_context ad8232_init | ( | int | lo_plus, |
int | lo_minus, | ||
int | output, | ||
float | a_ref | ||
) |
Sensor init function
lo_plus | Digital pin to use for LO+ |
lo_minus | Digital pin to use for LO- |
output | Analog pin to read the data |
a_ref | Analog voltage reference |
void ad8232_close | ( | ad8232_context | dev | ) |
Sensor destructor
upm_result_t ad8232_get_value | ( | ad8232_context | dev, |
int * | value | ||
) |
Returns the current ADC value for the device output pin. If an LO (leads off) event is detected, 0 is returned.
dev | sensor context pointer |
value | ADC value |
typedef struct _ad8232_context * ad8232_context |
device context