Mistake on this page?
Report an issue in GitHub or email us
Modules | Functions
Analogin hal functions

Defined behaviour

More...

Modules

 Analogin hal tests
 The Analogin HAL tests ensure driver conformance to defined behaviour.
 

Functions

void analogin_init_direct (analogin_t *obj, const PinMap *pinmap)
 Initialize the analogin peripheral. More...
 
void analogin_init (analogin_t *obj, PinName pin)
 Initialize the analogin peripheral. More...
 
void analogin_free (analogin_t *obj)
 Release the analogin peripheral. More...
 
float analogin_read (analogin_t *obj)
 Read the input voltage, represented as a float in the range [0.0, 1.0]. More...
 
uint16_t analogin_read_u16 (analogin_t *obj)
 Read the value from analogin pin, represented as an unsigned 16bit value. More...
 
const PinMapanalogin_pinmap (void)
 Get the pins that support analogin. More...
 

Detailed Description

Defined behaviour

Undefined behaviour

Function Documentation

void analogin_free ( analogin_t obj)

Release the analogin peripheral.

Releases the pin used by analogin.

Parameters
objThe analogin object to initialize
void analogin_init ( analogin_t obj,
PinName  pin 
)

Initialize the analogin peripheral.

Configures the pin used by analogin.

Parameters
objThe analogin object to initialize
pinThe analogin pin name
void analogin_init_direct ( analogin_t obj,
const PinMap pinmap 
)

Initialize the analogin peripheral.

Configures the pin used by analogin.

Parameters
objThe analogin object to initialize
pinmappointer to structure which holds static pinmap
const PinMap* analogin_pinmap ( void  )

Get the pins that support analogin.

Return a PinMap array of pins that support analogin. The array is terminated with {NC, NC, 0}.

Returns
PinMap array
float analogin_read ( analogin_t obj)

Read the input voltage, represented as a float in the range [0.0, 1.0].

Parameters
objThe analogin object
Returns
A floating value representing the current input voltage
uint16_t analogin_read_u16 ( analogin_t obj)

Read the value from analogin pin, represented as an unsigned 16bit value.

Parameters
objThe analogin object
Returns
An unsigned 16bit value representing the current input voltage
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.