Command processor to access I2C and SPI Takes URI coded commands and returns JSON array
Fork of SerialInterface by
Diff: SerialInterface.h
- Revision:
- 8:a0937dc92631
- Parent:
- 7:06a2eb2483f6
- Child:
- 9:f52181496512
--- a/SerialInterface.h Thu Dec 15 17:42:33 2016 +0000 +++ b/SerialInterface.h Fri Dec 16 00:58:28 2016 +0000 @@ -7,7 +7,7 @@ #include "mbed.h" #include "SerialInterface.h" -/** RAPC Library, Provides utilities for remotely accessing peripherals +/** Serial Interface Library, Provides utilities for remotely accessing peripherals * * Example: * @code @@ -15,15 +15,16 @@ * * #include "SerialInterface.h" * - * SerialInterface serInt; * I2C i2c(P3_4, P3_5); * SPI spi(P5_1, P5_2, P5_0); - * DigitalOut ssel(P5_3); + * DigitalInOut gpio[] = {P5_3, P5_4, P5_5, P5_6, P3_0, P3_1, P3_2, P3_3}; + * AnalogIn ain[] = {AIN_0, AIN_1, AIN_2, AIN_3, AIN_4, AIN_5, AIN_6, AIN_7}; + * + * SerialInterface serInt(i2c, spi, gpio, ain); * * int main() { * char ibuf[256]; * char obuf[256]; - * serInt.init(&i2c, &spi, &ssel); * while(1) { * scanf("%s", ibuf); * serInt.call(ibuf, obuf);