Command processor to access I2C and SPI Takes URI coded commands and returns JSON array

Fork of SerialInterface by Greg Steiert

Revision:
4:0bd9ec504040
Parent:
3:601b78524967
Child:
5:9e27e2a46fa6
--- a/SerialInterface.h	Thu Dec 08 16:32:03 2016 +0000
+++ b/SerialInterface.h	Thu Dec 08 21:43:36 2016 +0000
@@ -17,12 +17,13 @@
  *
  * SerialInterface serInt;
  * I2C i2c(P3_4, P3_5);
- * SPI spi(P5_1, P5_2, P5_0, P5_3);
+ * SPI spi(P5_1, P5_2, P5_0);
+ * DigitalOut ssel(P5_3);
  *
  * int main() {
  *    char ibuf[256];
  *    char obuf[256];
- *    serInt.init(&i2c, &spi);
+ *    serInt.init(&i2c, &spi, &ssel);
  *    while(1) {
  *        scanf("%s", ibuf);
  *        serInt.call(ibuf, obuf);
@@ -54,7 +55,7 @@
     /** Initialize the digital pins and PWM
      *
      */
-    void init(I2C* i2c, SPI* spi);
+    void init(I2C* i2c, SPI* spi, DigitalOut* ssel);
 
     /** Process Remote Arduino Peripheral Module Command
      *
@@ -81,9 +82,8 @@
 
     // Internal Resources
     I2C *_i2c;
-
-    // Internal Resources
     SPI *_spi;
+    DigitalOut *_ssel;    
 
     // Internal Buffers
     int _args[64];