libwallaby  v24
The wallaby standard library
Analogs

Functions

int analog (int port)
 
int analog8 (int port)
 
int analog10 (int port)
 
int analog_et (int port)
 
void set_analog_pullup (int port, int pullup)
 
int get_analog_pullup (int port)
 

Detailed Description

Function Documentation

◆ analog()

int analog ( int  port)

Gets the 12-bit analog value of a port.

Parameters
[in]portA value between 0 and 5 specifying the sensor to read from.
Returns
The latest 12-bit value of the port (a value in the range 0 to 4095).
See also
analog12

◆ analog10()

int analog10 ( int  port)

Gets the 10-bit analog value of a port.

Parameters
[in]portA value between 0 and 5 specifying the sensor to read from.
Returns
The latest 10-bit value of the port (a value in the range 0 to 1023).
See also
analog

◆ analog8()

int analog8 ( int  port)

Gets the 8-bit analog value of a port.

Parameters
[in]portA value between 0 and 5 specifying the sensor to read from.
Returns
The latest 8-bit value of the port (a value in the range 0 to 255).
See also
analog

◆ analog_et()

int analog_et ( int  port)

Gets the 10-bit analog value of an ET sensor on the given port.

Parameters
[in]portA value between 0 and 7 specifying the ET sensor to read from.
Returns
The latest 10-bit value of the port (a value in the range 0 to 1023).
See also
analog
Deprecated:
defaulting to analog() on the Wallaby

◆ get_analog_pullup()

int get_analog_pullup ( int  port)

Gets the analog pullup status for one portt.

Parameters
[in]portA value between 0 and 7 specifying the analog sensor to read from.
Returns
The status of the analog pullup on the specified port
See also
analog
Deprecated:
no effect on the Wallaby

◆ set_analog_pullup()

void set_analog_pullup ( int  port,
int  pullup 
)

Sets analog pullup status for one port.

Parameters
[in]portA value between 0 and 5 specifying the analog sensor to read from.
[in]pullupA value of 0 (inactive) or 1 (active).
See also
analog
Deprecated:
no effect on the Wallaby