SDK4.0
This document shows Ameba SDK 4.0 APIs
ANALOG_IN

analog_in functions More...

Ameba Common

typedef struct analogin_s analogin_t
 
void analogin_init (analogin_t *obj, PinName pin)
 Initializes the ADC device, include clock/function/ADC registers. More...
 
void analogin_deinit (analogin_t *obj)
 Deinitializes the ADC device, include clock/function/ADC registers. More...
 
float analogin_read (analogin_t *obj)
 Reads data from the specified adc channel fifo. More...
 
uint16_t analogin_read_u16 (analogin_t *obj)
 Reads data from the specified adc channel fifo. More...
 

Detailed Description

analog_in functions

Function Documentation

void analogin_deinit ( analogin_t *  obj)

Deinitializes the ADC device, include clock/function/ADC registers.

Parameters
objadc object define in application software.
Return values
none
void analogin_init ( analogin_t *  obj,
PinName  pin 
)

Initializes the ADC device, include clock/function/ADC registers.

Parameters
objadc object define in application software.
pinadc PinName according to pinmux spec.
Return values
none
float analogin_read ( analogin_t *  obj)

Reads data from the specified adc channel fifo.

Parameters
objadc object define in application software.
Return values
adc channel data(float)
uint16_t analogin_read_u16 ( analogin_t *  obj)

Reads data from the specified adc channel fifo.

Parameters
objadc object define in application software.
Return values
16bit adc channel data(int)