upm  1.3.0
Sensor/Actuator repository for libmraa (v1.7.0)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Macros | Typedefs
ad8232.h File Reference
Include dependency graph for ad8232.h:

API Description

Go to the source code of this file.

Data Structures

struct  _ad8232_context


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)


#define AD8232_DEFAULT_AREF   3.3


typedef struct _ad8232_contextad8232_context

Function Documentation

ad8232_context ad8232_init ( int  lo_plus,
int  lo_minus,
int  output,
float  a_ref 

Sensor init function

lo_plusDigital pin to use for LO+
lo_minusDigital pin to use for LO-
outputAnalog pin to read the data
a_refAnalog 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.

devsensor context pointer
valueADC value
result status code

Typedef Documentation

typedef struct _ad8232_context * ad8232_context

device context