TizenRT Public API
v2.0 M2
|
Provides APIs for ADC (Analog to Digital Converters) More...
![]() |
Files | |
file | iotbus_adc.h |
Iotbus APIs for ADC. | |
Typedefs | |
typedef struct _iotbus_adc_wrapper_s * | iotbus_adc_context_h |
Pointer definition to the internal struct _iotbus_adc_wrapper_s. More... | |
Enumerations |
Functions | |
iotbus_adc_context_h | iotbus_adc_init (int bus, uint8_t channel) |
initializes adc_context. More... | |
int | iotbus_adc_deinit (iotbus_adc_context_h hnd) |
deinitializes adc_context. More... | |
int | iotbus_adc_set_channel (iotbus_adc_context_h hnd, uint8_t channel) |
set the ADC channel. More... | |
int | iotbus_adc_get_channel (iotbus_adc_context_h hnd) |
get the ADC channel. More... | |
int | iotbus_adc_get_state (iotbus_adc_context_h hnd) |
get the ADC state. More... | |
int | iotbus_adc_start (iotbus_adc_context_h hnd, const adc_read_cb read_cb) |
start adc asynchronous read. More... | |
int | iotbus_adc_stop (iotbus_adc_context_h hnd) |
stop adc asynchronous read. More... | |
int32_t | iotbus_adc_get_sample (iotbus_adc_context_h hnd, int timeout) |
adc synchronous read. More... | |
Provides APIs for ADC (Analog to Digital Converters)
typedef struct _iotbus_adc_wrapper_s* iotbus_adc_context_h |
Pointer definition to the internal struct _iotbus_adc_wrapper_s.
Definition at line 42 of file iotbus_adc.h.
enum iotbus_adc_state_e |
Enumeration of ADC state.
Enumeration Details: IOTBUS_ADC_RDY = 0, adc device is ready IOTBUS_ADC_BUSY = 1, adc device is busy
Enumerator | |
---|---|
IOTBUS_ADC_BUSY |
adc device is ready to use |
IOTBUS_ADC_STOP |
adc device is busy |
Definition at line 53 of file iotbus_adc.h.
int iotbus_adc_deinit | ( | iotbus_adc_context_h | hnd | ) |
deinitializes adc_context.
#include <iotbus/iotbus_adc.h>
[in] | hnd | handle of i2c_context |
int iotbus_adc_get_channel | ( | iotbus_adc_context_h | hnd | ) |
get the ADC channel.
#include <iotbus/iotbus_adc.h>
[in] | hnd | handle of adc_context |
int32_t iotbus_adc_get_sample | ( | iotbus_adc_context_h | hnd, |
int | timeout | ||
) |
adc synchronous read.
#include <iotbus/iotbus_adc.h>
[in] | hnd | handle of adc_context |
[in] | timeout | timeout value (ms). |
int iotbus_adc_get_state | ( | iotbus_adc_context_h | hnd | ) |
get the ADC state.
#include <iotbus/iotbus_adc.h>
[in] | hnd | handle of adc_context |
iotbus_adc_context_h iotbus_adc_init | ( | int | bus, |
uint8_t | channel | ||
) |
initializes adc_context.
#include <iotbus/iotbus_adc.h>
[in] | bus | ADC bus number |
[in] | channel | The 8-bit ADC Channel |
int iotbus_adc_set_channel | ( | iotbus_adc_context_h | hnd, |
uint8_t | channel | ||
) |
set the ADC channel.
#include <iotbus/iotbus_adc.h>
[in] | hnd | handle of adc_context |
[in] | channel | The 8-bit ADC Channel |
int iotbus_adc_start | ( | iotbus_adc_context_h | hnd, |
const adc_read_cb | read_cb | ||
) |
start adc asynchronous read.
#include <iotbus/iotbus_adc.h>
[in] | hnd | handle of adc_context |
[in] | read_cb | callback function called adc read is done. |
int iotbus_adc_stop | ( | iotbus_adc_context_h | hnd | ) |
stop adc asynchronous read.
#include <iotbus/iotbus_adc.h>
[in] | hnd | handle of adc_context |