MP3-capable chair with sensor-embedded weight scale.

Dependencies:   ACM1602 SDFileSystem VS1053 mbed ClockControl PowerControl

Revision:
1:ef257d63d970
Parent:
0:d9789f57fd9d
Child:
2:844bedc9dc63
--- a/defs.h	Wed Mar 26 19:56:18 2014 +0000
+++ b/defs.h	Sat Mar 29 16:14:11 2014 +0000
@@ -2,8 +2,8 @@
 #define ISU_PROJECT_DEFS_H_
 
 // Input thresholds
-#define HIGH_TO_LOW        0.25
-#define LOW_TO_HIGH        0.75
+#define H_TO_L_THRES       0.25
+#define L_TO_H_THRES       0.75
 
 // Delay count until settling
 #define SETTLING_COUNT        5
@@ -12,7 +12,7 @@
 #define POLL_INTERVAL_SEC  0.50
 
 // Block size of read/write (byte)
-#define BLOCK_SIZE         1024
+#define BLOCK_SIZE           64
 
 typedef enum {
     CANCELING = -1,
@@ -33,26 +33,26 @@
     PLAY4_REQUEST =  4
 } Request;
 
-PinName const xp5  = P0_9;   // SPI1 + MOSI
-PinName const xp6  = P0_8;   //      | MISO
-PinName const xp7  = P0_7;   //      | SCK
-PinName const xp8  = P0_6;   //      | SSEL#
-PinName const xp9  = P0_0;   // UART3+ Tx     I2C1 + SDA
-PinName const xp10 = P0_1;   //      | Rx          | SCL
-PinName const xp11 = P0_18;  //               SPI0 + MOSI
-PinName const xp12 = P0_17;  //                    | MISO
-PinName const xp13 = P0_15;  // UART1+ Tx          | SCK
-PinName const xp14 = P0_16;  //      | Rx          | SSEL#
-PinName const xp15 = P0_23;  // AnalogIn
-PinName const xp16 = P0_24;  // AnalogIn
-PinName const xp17 = P0_25;  // AnalogIn
-PinName const xp18 = P0_26;  // AnalogIn  AnalogOut
-PinName const xp19 = P1_30;  // AnalogIn
-PinName const xp20 = P1_31;  // AnalogIn
+PinName const xp5  = P0_9;   // (p5)   SPI1 + MOSI
+PinName const xp6  = P0_8;   // (p6)        | MISO
+PinName const xp7  = P0_7;   // (p7)        | SCK
+PinName const xp8  = P0_6;   // (p8)        | SSEL#
+PinName const xp9  = P0_0;   // (p9)   UART3+ Tx     I2C1 + SDA
+PinName const xp10 = P0_1;   // (p10)       | Rx          | SCL
+PinName const xp11 = P0_18;  // (p11)                SPI0 + MOSI
+PinName const xp12 = P0_17;  // (p12)                     | MISO
+PinName const xp13 = P0_15;  // (p13)  UART1+ Tx          | SCK
+PinName const xp14 = P0_16;  // (p14)       | Rx          | SSEL#
+PinName const xp15 = P0_23;  // (p15)  AnalogIn
+PinName const xp16 = P0_24;  // (p16)  AnalogIn
+PinName const xp17 = P0_25;  // (p17)  AnalogIn
+PinName const xp18 = P0_26;  // (p18)  AnalogIn  AnalogOut
+PinName const xp19 = P1_30;  // (p19)  AnalogIn
+PinName const xp20 = P1_31;  // (p20)  AnalogIn
 PinName const xp21 = P0_2;
 PinName const xp22 = P0_3;
 PinName const xp23 = P0_21;
-PinName const xp24 = P0_22;
+PinName const xp24 = P0_22;  // **Onboard LED
 PinName const xp25 = P0_27;  // **Open drain
 PinName const xp26 = P0_28;  // **Open drain
 PinName const xp27 = P2_13;
@@ -62,16 +62,16 @@
 PinName const xp50 = P2_8;
 PinName const xp49 = P2_7;
 PinName const xp48 = P2_6;
-PinName const xp47 = P2_5;   // PwmOut
-PinName const xp46 = P2_4;   // PwmOut
-PinName const xp45 = P2_3;   // PwmOut
-PinName const xp44 = P2_2;   // PwmOut
-PinName const xp43 = P2_1;   // PwmOut
-PinName const xp42 = P2_0;   // PwmOut
-PinName const xp41 = P0_11;  // UART2+ Rx     I2C2 + SCL
-PinName const xp40 = P0_10;  //      | Tx          | SDA
-PinName const xp39 = P0_5;   // CAN  + TD
-PinName const xp38 = P0_4;   //      | RD
+PinName const xp47 = P2_5;   // (p21)  PwmOut
+PinName const xp46 = P2_4;   // (p22)  PwmOut
+PinName const xp45 = P2_3;   // (p23)  PwmOut
+PinName const xp44 = P2_2;   // (p24)  PwmOut
+PinName const xp43 = P2_1;   // (p25)  PwmOut
+PinName const xp42 = P2_0;   // (p26)  PwmOut
+PinName const xp41 = P0_11;  // (p27)  UART2+ Rx     I2C2 + SCL
+PinName const xp40 = P0_10;  // (p28)       | Tx          | SDA
+PinName const xp39 = P0_5;   // (p29)  CAN  + TD
+PinName const xp38 = P0_4;   // (p30)       | RD
 PinName const LED0 = P0_22;
 
 #endif