mraa
0.6.0
Low Level Skeleton Library for Communication on GNU/Linux platforms
|
Data Structures | |
class | Aio |
API to Analog IO. More... | |
class | Gpio |
API to General Purpose IO. More... | |
class | I2c |
API to Inter-Integrated Circuit. More... | |
class | Pwm |
API to Pulse Width Modulation. More... | |
class | Spi |
API to Serial Peripheral Interface. More... | |
class | Uart |
API to UART (enabling only) More... | |
Enumerations | |
enum | Mode { MODE_STRONG = 0, MODE_PULLUP = 1, MODE_PULLDOWN = 2, MODE_HIZ = 3 } |
enum | Dir { DIR_OUT = 0, DIR_IN = 1, DIR_OUT_HIGH = 2, DIR_OUT_LOW = 3 } |
enum | Edge { EDGE_NONE = 0, EDGE_BOTH = 1, EDGE_RISING = 2, EDGE_FALLING = 3 } |
enum | Spi_Mode { SPI_MODE0 = 0, SPI_MODE1 = 1, SPI_MODE2 = 2, SPI_MODE3 = 3 } |
Functions | |
std::string | getVersion () |
int | setPriority (const unsigned int priority) |
mraa_platform_t | getPlatformType () |
void | printError (mraa_result_t result) |
bool | pinModeTest (int pin, mraa_pinmodes_t mode) |
unsigned int | adcRawBits () |
unsigned int | adcSupportedBits () |
std::string | getPlatformName () |
unsigned int | getPinCount () |
mraa_result_t | setLogLevel (int level) |
namespace
enum Mode |
Gpio Output modes
Enumerator | |
---|---|
MODE_STRONG |
Default. Strong High and Low |
MODE_PULLUP |
Interupt on rising & falling |
MODE_PULLDOWN |
Interupt on rising only |
MODE_HIZ |
Interupt on falling only |
enum Dir |
Gpio Direction options
Enumerator | |
---|---|
DIR_OUT |
Output. A Mode can also be set |
DIR_IN |
Input |
DIR_OUT_HIGH |
Output. Init High |
DIR_OUT_LOW |
Output. Init Low |
enum Edge |
enum Spi_Mode |
MRAA SPI Modes
|
inline |
Get libmraa version.
|
inline |
This function attempts to set the mraa process to a given priority and the scheduler to SCHED_RR. Highest * priority is typically 99 and minimum is 0. This function * will set to MAX if * priority is > MAX. Function will return -1 on failure.
priority | Value from typically 0 to 99 |
|
inline |
Get platform type, board must be initialised.
|
inline |
Print a textual representation of the mraa_result_t
result | the result to print |
|
inline |
Checks if a pin is able to use the passed in mode.
pin | Physical Pin to be checked. |
mode | the mode to be tested. |
|
inline |
Check the board's bit size when reading the value
|
inline |
Return value that the raw value should be shifted to. Zero if no ADC
|
inline |
Return Platform Name. Returns NULL if no platform inited.
|
inline |
Return count of physical pins on the running platform
|
inline |
Sets the log level to use from 0-7 where 7 is very verbose. These are the syslog log levels, see syslog(3) for more information on the levels.
level |