Digital input/output.
More...
#include <DIO.h>
|
static void | parsePin (int pin, uint32_t *dirReg, uint32_t *pinsReg, bool io) |
| Parses the necessary registers to read or write a pin. More...
|
|
Digital input/output.
Definition at line 85 of file DIO.h.
◆ parsePin()
void DIO::parsePin |
( |
int |
pin, |
|
|
uint32_t * |
dirReg, |
|
|
uint32_t * |
pinsReg, |
|
|
bool |
io |
|
) |
| |
|
staticprivate |
Parses the necessary registers to read or write a pin.
- Parameters
-
pin | the concerned pin, one of A0, A1... C7 |
dirReg | will contain the direction register for the pin |
pinsReg | will contain the port in/out register for the pin |
io | one of IN/OUT |
Definition at line 26 of file DIO.cpp.
◆ readPin()
int DIO::readPin |
( |
int |
pin | ) |
|
|
static |
Read the state of a pin.
- Parameters
-
pin | the pin of the myRio that you want to read from |
- Returns
- the state of the pin
Definition at line 83 of file DIO.cpp.
◆ writeLed()
void DIO::writeLed |
( |
int |
led, |
|
|
bool |
state |
|
) |
| |
|
static |
◆ writePin()
void DIO::writePin |
( |
int |
pin, |
|
|
bool |
state |
|
) |
| |
|
static |
Write to a pin.
- Parameters
-
pin | the pin of the myRio that you want to write to |
state | the state of the pin; 1 = HIGH , 0 = LOW |
Definition at line 49 of file DIO.cpp.
◆ DOLED30_Status
uint8_t DIO::DOLED30_Status = 0 |
|
staticprivate |
Say LED2 is HIGH, so DOLED30 is 0100.
If you set LED3 to HIGH, so 1000, without saving the other LEDs, you will only be able to use them one at a time.
Definition at line 92 of file DIO.h.
The documentation for this class was generated from the following files:
- C:/Users/jackb/OneDrive - etu.univ-lyon1.fr/TERi/Eclipse/workspace/APIForRIO/src/DIO.h
- C:/Users/jackb/OneDrive - etu.univ-lyon1.fr/TERi/Eclipse/workspace/APIForRIO/src/DIO.cpp