URI friendly Pmod Interface Library
Dependents: MBD2PMD_WebServer ARD2PMD_WebServer
PmodInterface Class Reference
RAPC Library, Provides utilities for remotely accessing peripherals. More...
#include <PmodInterface.h>
Public Types | |
enum | PINTdioBits { DB_OUT = 0x01, DB_OWD = 0x02, DB_DIR = 0x04, DB_DWE = 0x08, DB_PU = 0x10, DB_PWE = 0x20 } |
Name the DIO bits. More... | |
enum | PINTi2cArgs { IA_CNT = 0, IA_ADD, IA_DATA, IA_RDDA } |
Name the I2C arguments. More... | |
Public Member Functions | |
PmodInterface () | |
Create a PmodInterface interface. | |
void | init (DigitalInOut *dio[], I2C *i2c, MAX14661 *mux, const int *mux_a, const int *mux_p) |
Initialize the digital pins and PWM. | |
void | call (char *input, char *output) |
Process Remote Arduino Peripheral Module Command. |
Detailed Description
RAPC Library, Provides utilities for remotely accessing peripherals.
Example:
// Configure board to pass UART signals to peripheral connector. #include "PmodInterface.h" PmodInterface pInt(PTD0, PTD2, PTD3, PTD1, PTA4, PTA5, PTC8, PTC9, PTA12, PTE0, PTE1 ); int main() { char ibuf[256]; char obuf[256]; pInt.init(); while(1) { scanf("%s", ibuf); pInt.call(ibuf, obuf); printf("%s=", ibuf); printf("%s\n", obuf); }
Definition at line 36 of file PmodInterface.h.
Member Enumeration Documentation
enum PINTdioBits |
Name the DIO bits.
- Enumerator:
Definition at line 49 of file PmodInterface.h.
enum PINTi2cArgs |
Name the I2C arguments.
- Enumerator:
IA_CNT Argument Count.
IA_ADD Device Address.
IA_DATA Data, Read = # bytes to read, Write = first data byte.
IA_RDDA Read Data, data to write prior to read.
Definition at line 60 of file PmodInterface.h.
Constructor & Destructor Documentation
PmodInterface | ( | ) |
Create a PmodInterface interface.
Definition at line 8 of file PmodInterface.cpp.
Member Function Documentation
void call | ( | char * | input, |
char * | output | ||
) |
Process Remote Arduino Peripheral Module Command.
- Parameters:
-
input a pointer to the string containing the command output a pointer to the string to write the result
Definition at line 223 of file PmodInterface.cpp.
void init | ( | DigitalInOut * | dio[], |
I2C * | i2c, | ||
MAX14661 * | mux, | ||
const int * | mux_a, | ||
const int * | mux_p | ||
) |
Initialize the digital pins and PWM.
Generated on Sun Jul 17 2022 13:50:13 by 1.7.2