This is the final version of Mini Gateway for Automation and Security desgined for Renesas GR Peach Design Contest

Dependencies:   GR-PEACH_video GraphicsFramework HTTPServer R_BSP mbed-rpc mbed-rtos Socket lwip-eth lwip-sys lwip FATFileSystem

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Embed: (wiki syntax)

« Back to documentation index

Analogin hal functions

Analogin hal functions
[Hal]

Functions

void analogin_init (analogin_t *obj, PinName pin)
 Initialize the analogin peripheral.
float analogin_read (analogin_t *obj)
 Read the input voltage, represented as a float in the range [0.0, 1.0].
uint16_t analogin_read_u16 (analogin_t *obj)
 Read the value from analogin pin, represented as an unsigned 16bit value.

Function Documentation

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
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