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

API Description

Go to the source code of this file.

Data Structures

struct  _mic_context
 

Functions

mic_context mic_init (int pin)
 
void mic_close (mic_context dev)
 
upm_result_t mic_get_value (mic_context dev, float *micval)
 

Typedefs

typedef struct _mic_contextmic_context
 

Function Documentation

mic_context mic_init ( int  pin)

Microphone sensor initialization function

Parameters
pinanalog pin to use
Returns
sensor context
void mic_close ( mic_context  dev)

Microphone sensor destructor

Parameters
devsensor context pointer
upm_result_t mic_get_value ( mic_context  dev,
float *  micval 
)

Gets a sample from the microphone

Parameters
devsensor context pointer
micvalmicrophone value in ADC counts
Returns
result of the operation

Typedef Documentation

typedef struct _mic_context * mic_context

device context