MP3-capable chair with sensor-embedded weight scale.
Dependencies: ACM1602 SDFileSystem VS1053 mbed ClockControl PowerControl
defs.h
00001 #ifndef ISU_PROJECT_DEFS_H_ 00002 #define ISU_PROJECT_DEFS_H_ 00003 00004 // Input thresholds 00005 #define H_TO_L_THRES 0.25 00006 #define L_TO_H_THRES 0.75 00007 00008 // Delay count until settling 00009 #define SETTLING_COUNT 5 00010 00011 // Polling interval (second) 00012 #define POLL_INTERVAL_SEC 0.25 00013 00014 // Block size of read/write (byte) 00015 #define BLOCK_SIZE 64 00016 00017 typedef enum { 00018 CANCELING = -1, 00019 STOPPING = -2, 00020 READY = 0, 00021 PLAYING1 = 1, 00022 PLAYING2 = 2, 00023 PLAYING3 = 3, 00024 PLAYING4 = 4 00025 } State; 00026 00027 typedef enum { 00028 STOP_REQUEST = -1, 00029 NONE = 0, 00030 PLAY1_REQUEST = 1, 00031 PLAY2_REQUEST = 2, 00032 PLAY3_REQUEST = 3, 00033 PLAY4_REQUEST = 4 00034 } Request; 00035 00036 PinName const xp5 = P0_9; // (p5) SPI1 + MOSI 00037 PinName const xp6 = P0_8; // (p6) | MISO 00038 PinName const xp7 = P0_7; // (p7) | SCK 00039 PinName const xp8 = P0_6; // (p8) | SSEL# 00040 PinName const xp9 = P0_0; // (p9) UART3+ Tx I2C1 + SDA 00041 PinName const xp10 = P0_1; // (p10) | Rx | SCL 00042 PinName const xp11 = P0_18; // (p11) SPI0 + MOSI 00043 PinName const xp12 = P0_17; // (p12) | MISO 00044 PinName const xp13 = P0_15; // (p13) UART1+ Tx | SCK 00045 PinName const xp14 = P0_16; // (p14) | Rx | SSEL# 00046 PinName const xp15 = P0_23; // (p15) AnalogIn 00047 PinName const xp16 = P0_24; // (p16) AnalogIn 00048 PinName const xp17 = P0_25; // (p17) AnalogIn 00049 PinName const xp18 = P0_26; // (p18) AnalogIn AnalogOut 00050 PinName const xp19 = P1_30; // (p19) AnalogIn 00051 PinName const xp20 = P1_31; // (p20) AnalogIn 00052 PinName const xp21 = P0_2; 00053 PinName const xp22 = P0_3; 00054 PinName const xp23 = P0_21; 00055 PinName const xp24 = P0_22; // **Onboard LED 00056 PinName const xp25 = P0_27; // **Open drain 00057 PinName const xp26 = P0_28; // **Open drain 00058 PinName const xp27 = P2_13; 00059 PinName const xp53 = P2_12; 00060 PinName const xp52 = P2_11; 00061 PinName const xp51 = P2_10; 00062 PinName const xp50 = P2_8; 00063 PinName const xp49 = P2_7; 00064 PinName const xp48 = P2_6; 00065 PinName const xp47 = P2_5; // (p21) PwmOut 00066 PinName const xp46 = P2_4; // (p22) PwmOut 00067 PinName const xp45 = P2_3; // (p23) PwmOut 00068 PinName const xp44 = P2_2; // (p24) PwmOut 00069 PinName const xp43 = P2_1; // (p25) PwmOut 00070 PinName const xp42 = P2_0; // (p26) PwmOut 00071 PinName const xp41 = P0_11; // (p27) UART2+ Rx I2C2 + SCL 00072 PinName const xp40 = P0_10; // (p28) | Tx | SDA 00073 PinName const xp39 = P0_5; // (p29) CAN + TD 00074 PinName const xp38 = P0_4; // (p30) | RD 00075 PinName const LED0 = P0_22; 00076 00077 #endif
Generated on Fri Jul 15 2022 00:07:31 by 1.7.2