Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
|
Public Types | |
enum | Direction { INPUT, OUTPUT } |
Public Member Functions | |
int | open (unsigned int pin, Direction direction, bool unexport=true) |
void | close () |
bool | read () |
void | set () |
void | clear () |
void | write (bool value) |
bool | enabled () |
Static Public Member Functions | |
static uint32_t | getBankAddress (unsigned int bank) |
int Gpio::open | ( | unsigned int | pin, |
Direction | direction, | ||
bool | unexport = true |
||
) |
Opens a GPIO pin.
pin | the GPIO pin ( 0 <= pin < 128) |
direction | one of INPUT or OUTPUT |
unexport | if false , it will not try to unexport the pin when calling close() |
void Gpio::close | ( | ) |
Closes a currently open GPIO
|
inline |
|
inline |
Set the output to 1.
|
inline |
Clear the output
|
inline |
Write an output value
value | the value to write |
|
inline |
Check if the GPIO is enabled.
|
static |
A utility function to return the base address of a Gpio bank.