export test
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of Int_Demo_09May2017_Suhasini_HRavg_Nikita_ili9341 by
Revision 31:37d3ae1fa1eb, committed 2018-03-02
- Comitter:
- pietrodizinno
- Date:
- Fri Mar 02 13:56:33 2018 +0000
- Parent:
- 30:f2f48ed43aae
- Commit message:
- export test
Changed in this revision
diff -r f2f48ed43aae -r 37d3ae1fa1eb PPG/MAX30102.cpp --- a/PPG/MAX30102.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/PPG/MAX30102.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -58,8 +58,8 @@ */ #include "mbed.h" #include "MAX30102.h" -#define PIN_I2C1_SCL PTC10 -#define PIN_I2C1_SDA PTC11 +#define PIN_I2C1_SCL PB_8 +#define PIN_I2C1_SDA PB_9 #ifdef TARGET_MAX32600MBED
diff -r f2f48ed43aae -r 37d3ae1fa1eb battery.cpp --- a/battery.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/battery.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" #include "battery.h" -AnalogIn A(PTB1); +AnalogIn A(PA_0); float battery_voltage() { // GLC_PWR=1;
diff -r f2f48ed43aae -r 37d3ae1fa1eb bp.cpp --- a/bp.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/bp.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -25,7 +25,7 @@ using namespace std; Serial bpr(USBTX,USBRX); -DigitalIn INTR(PTC7); +DigitalIn INTR(PC_7); Timer t;
diff -r f2f48ed43aae -r 37d3ae1fa1eb bt.cpp --- a/bt.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/bt.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -17,7 +17,7 @@ Point *myBleMsg; Serial mc(USBTX,USBRX); // serial terminal -Serial blue(PTC4,PTC3); // communicating bluetooth through serial +Serial blue(PA_2,PA_3); // communicating bluetooth through serial static uint32_t total_samples=0; // variable to hold total number of samples uint8_t ack_rx; // varibale to receive ack from the bluetooth
diff -r f2f48ed43aae -r 37d3ae1fa1eb display_modules.cpp --- a/display_modules.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/display_modules.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -18,9 +18,17 @@ ILI932x TFT(BUS_8, buspins, PTC5, PTB9, PTC0, PTB0,PTE31,"SPFD5408_2.4") ; DigitalOut backlight(PTC9) ;*/ -PinName buspins[8]={PTD2, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 }; //new_display ili9341 -ILI9341 TFT(BUS_8, buspins, PTB0, PTB9, PTC0, PTB8,PTE31,"SPFD5408_2.4") ; -DigitalOut backlight(PTC9) ; + + +//PinName buspins[8]={PTD2, PTC13, PTB10, PTC9, PTD4, PTD5, PTD6, PTD7 }; //new_display ili9341 +//ILI9341 TFT(BUS_8, buspins, PTB0, PTB9, PTC0, PTB8,PTE31,"SPFD5408_2.4") ; + +ILI9341 TFT(SPI_8, 10000000, PB_15, PB_14, PB_13, PB_11,PB_12,PB_10,"SPFD5408_2.4") ; + + // SPI8(int Hz, PinName mosi, PinName miso, PinName sclk, PinName CS, PinName reset, PinName DC=NC); + + +DigitalOut backlight(PB_9) ; void init_screen() // initializing the screen {
diff -r f2f48ed43aae -r 37d3ae1fa1eb ec_bp.cpp --- a/ec_bp.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/ec_bp.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -5,13 +5,13 @@ //PIN DECLARATIONS //Serial pc(USBTX,USBRX); SPI mySpi(PIN_MOSI, PIN_MISO, PIN_SCLK) ; -DigitalIn DRDY_BAR(PTC8); +DigitalIn DRDY_BAR(PC_8); -DigitalOut CHIPSEL_BAR(PTD0); -DigitalOut ADS_START(PTC16); -DigitalOut RESET_BAR(PTC17); +DigitalOut CHIPSEL_BAR(PC_13); +DigitalOut ADS_START(PC_14); +DigitalOut RESET_BAR(PC_15); DigitalOut myled(LED1); -PwmOut led(PTB18); +PwmOut led(PC_7); float value = 0; unsigned int value1; unsigned int value2;
diff -r f2f48ed43aae -r 37d3ae1fa1eb ec_bp.h --- a/ec_bp.h Sat Jul 08 12:06:16 2017 +0000 +++ b/ec_bp.h Fri Mar 02 13:56:33 2018 +0000 @@ -24,9 +24,9 @@ void freqset(); void ecgtestsetupfunc(); -#define PIN_MOSI PTA16 -#define PIN_MISO PTA17 -#define PIN_SCLK PTD1 +#define PIN_MOSI PB_15 +#define PIN_MISO PB_14 +#define PIN_SCLK PB_13 #define MA4_SIZE 4 // DO NOT CHANGE //SDFileSystem sd(PTE1, PTE3, PTE2, PTE4, "sd");
diff -r f2f48ed43aae -r 37d3ae1fa1eb eeprom_pgm.cpp --- a/eeprom_pgm.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/eeprom_pgm.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -4,7 +4,7 @@ #include <stdio.h> Serial ec(USBTX, USBRX); // tx, rx -EEPROM rom(PTC11, PTC10, 0x00, EEPROM::T24C32); +EEPROM rom(PB_9, PB_8, 0x00, EEPROM::T24C32);
diff -r f2f48ed43aae -r 37d3ae1fa1eb glc.cpp --- a/glc.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/glc.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -194,11 +194,11 @@ unsigned char GLC_START = 0; //osTimerDef (sample_data, sample); // define timers //osTimerDef (Compute_GLC, Compute); -DigitalIn test_strip(PTA12); +DigitalIn test_strip(PC_13); -AnalogIn Ain(PTC1);//Electrode one -AnalogIn Ain2(PTE29); // Electrode two -AnalogOut DAC_signal(PTE30); +AnalogIn Ain(PA_1);//Electrode one +AnalogIn Ain2(PA_4); // Electrode two +//AnalogOut DAC_signal(PA_2); Serial gtc(USBTX, USBRX); //unsigned char c; //unsigned char HOME = 0; @@ -220,7 +220,8 @@ uint8_t chk_glc_data = 0; uint16_t glc_testtype; // Nidhin 12/6/2017 -Serial ble(PTC4,PTC3); +//Serial ble(PTC4,PTC3); +Serial ble(PA_2,PA_3);
diff -r f2f48ed43aae -r 37d3ae1fa1eb i2c_dec.cpp --- a/i2c_dec.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/i2c_dec.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -3,7 +3,7 @@ void i2c_spec() { - I2C i2c(PTC11, PTC10); + I2C i2c(PB_9, PB_8); char dat[1]; i2c.start(); dat[0]=0xBB;
diff -r f2f48ed43aae -r 37d3ae1fa1eb main.cpp --- a/main.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/main.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -14,10 +14,10 @@ #include "battery.h" Serial gc(USBTX, USBRX); -DigitalIn q1(PTB11); -DigitalIn q(PTC5); -DigitalIn q3(PTC12); -DigitalIn BT(PTA5); //bluetooth status pin +DigitalIn q1(PB_11); +DigitalIn q(PC_5); +DigitalIn q3(PC_12); +DigitalIn BT(PA_5); //bluetooth status pin uint8_t touch(uint8_t state); // touch state uint8_t display(uint8_t state1); // display state
diff -r f2f48ed43aae -r 37d3ae1fa1eb rtc.cpp --- a/rtc.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/rtc.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -8,7 +8,7 @@ time_t rtc_read() { - Ds3231 rtc(PTC11, PTC10); + Ds3231 rtc(PB_9, PB_8); time_t epoch_time1; epoch_time1 = rtc.get_epoch();
diff -r f2f48ed43aae -r 37d3ae1fa1eb sdcard.cpp --- a/sdcard.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/sdcard.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -10,7 +10,7 @@ #include "struct.h" Serial snd(USBTX,USBRX); - SDFileSystem sd(PTE1, PTE3, PTE2, PTE4, "sd"); + SDFileSystem sd(PC_1, PC_3, PC_2, PC_4, "sd");
diff -r f2f48ed43aae -r 37d3ae1fa1eb touch_modules.cpp --- a/touch_modules.cpp Sat Jul 08 12:06:16 2017 +0000 +++ b/touch_modules.cpp Fri Mar 02 13:56:33 2018 +0000 @@ -4,7 +4,7 @@ #include "display_modules.h" #include "touch_modules.h" //InterruptIn Touch_D(PTD6); -InterruptIn Touch_D(PTD2); +InterruptIn Touch_D(PC_1); int i; unsigned int xt; unsigned int yt; @@ -387,41 +387,43 @@ int readTouchY(void) // read the Y co-ordinate { - DigitalOut YD(PTD2); - DigitalIn XL(PTC13); - DigitalOut YU(PTC0); - YU = 1; - YD = 0; - AnalogIn XR(PTB0); - XL.mode(PullNone); - return XR.read_u16(); + // DigitalOut YD(PTD2); + // DigitalIn XL(PTC13); + // DigitalOut YU(PTC0); + // YU = 1; + // YD = 0; + // AnalogIn XR(PTB0); + // XL.mode(PullNone); + // return XR.read_u16(); + return 0; } int readTouchX(void) // // read the X co-ordinate { - DigitalOut XR(PTB0); - DigitalIn YD(PTD2); - DigitalOut XL(PTC13); + // DigitalOut XR(PTB0); + // DigitalIn YD(PTD2); + // DigitalOut XL(PTC13); - XR = 1; - XL = 0; - AnalogIn YU(PTC0); - YD.mode(PullNone); - return YU.read_u16(); + // XR = 1; + // XL = 0; + // AnalogIn YU(PTC0); + // YD.mode(PullNone); + // return YU.read_u16(); + return 0; } void EnableTouch(void) // Enable touch { - DigitalIn YD(PTD2); - DigitalOut XL(PTC13); - DigitalIn YU(PTC0); - DigitalIn XR(PTB0); - XL=0; - YD.mode(PullUp); - YU.mode(PullNone); - XR.mode(PullNone); + // DigitalIn YD(PTD2); +// DigitalOut XL(PTC13); +// DigitalIn YU(PTC0); +// DigitalIn XR(PTB0); + // XL=0; + // YD.mode(PullUp); + // YU.mode(PullNone); + // XR.mode(PullNone); i=1; Touch_D.fall(&touch1); Touch_D.enable_irq(); @@ -432,10 +434,10 @@ { Touch_D.disable_irq(); i=0; - DigitalOut YD(PTD2); - DigitalOut XL(PTC13); - DigitalOut YU(PTC0); - DigitalOut XR(PTB0); +// DigitalOut YD(PTD2); +// DigitalOut XL(PTC13); +// DigitalOut YU(PTC0); + // DigitalOut XR(PTB0); }