Changes done in ECG and BT

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of merged_code2_20sept_2017_4th_oct_2017 by nikita teggi

Committer:
suhasini
Date:
Wed Jul 05 15:36:58 2017 +0000
Revision:
26:53ff13a164f3
Parent:
22:ffa88619551d
Child:
27:907f8ce0025e
Updated File pointer in ECG code ,for data access, addition of Heart Rate averaging logic

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nidhinvarghese 14:f5c62d30c6fc 1 // Exisiting code in Int_Demo_09May2017_suhasini/sdcard.h is deleted and replaced by new code
nidhinvarghese 14:f5c62d30c6fc 2 //Nidhin 1/6/2017
nidhinvarghese 14:f5c62d30c6fc 3
nikitateggi 1:8316c23ec6b9 4 #ifndef SDCARD_H_
nikitateggi 1:8316c23ec6b9 5 #define SDCARD_H_
nikitateggi 1:8316c23ec6b9 6
nidhinvarghese 14:f5c62d30c6fc 7 #include "struct.h"
nidhinvarghese 8:adf2ba7e6412 8
nikitateggi 20:7c64e6ecad76 9 //void sd_open_ECGfile(int pid);
nikitateggi 22:ffa88619551d 10 void sd_open_ECGfilee(int32_t pid);
nikitateggi 20:7c64e6ecad76 11 //void sd_open_GLCfile(int pid);
nikitateggi 22:ffa88619551d 12 void sd_open_GLCfilee(int32_t pid);
nikitateggi 22:ffa88619551d 13 void sd_open_BPfilee(int32_t pid);
nikitateggi 20:7c64e6ecad76 14 //void sd_open_BPfile(int pid);
nidhinvarghese 8:adf2ba7e6412 15 void sd_write (int value);
nikitateggi 19:1650bbc923cc 16 int file_size() ;
nikitateggi 19:1650bbc923cc 17 int file_size1() ;
nikitateggi 19:1650bbc923cc 18 void sd_read(uint32_t *v1, int size);
nikitateggi 19:1650bbc923cc 19 void sd_open_read(int32_t pid);
nikitateggi 19:1650bbc923cc 20 void sd_read1(BLEMsg_info &f);
nikitateggi 19:1650bbc923cc 21 void setpos();
nikitateggi 19:1650bbc923cc 22 void setpos1(uint32_t position);
nidhinvarghese 8:adf2ba7e6412 23 //void sd_BP_ppgwrite (uint32_t value);
nidhinvarghese 8:adf2ba7e6412 24 //void sd_BP_ecgwrite (int value);
nikitateggi 22:ffa88619551d 25 uint16_t heart_cal(int pid);
nidhinvarghese 15:208b146151ba 26 FILE *sd_BP_ecgwrite (int32_t *fpdrum11);
nidhinvarghese 8:adf2ba7e6412 27 FILE *sd_BP_ppgwrite (uint32_t *fpdrum21);
nidhinvarghese 8:adf2ba7e6412 28
nikitateggi 22:ffa88619551d 29 void sd_open_BP_ECGfile(int32_t pid); //added to write ECG to seperate file BP
nikitateggi 22:ffa88619551d 30 void sd_open_BP_PPGfile(int32_t pid); //added to write PPG to seperate file BP
nidhinvarghese 8:adf2ba7e6412 31
nidhinvarghese 14:f5c62d30c6fc 32 void sd_close(); // Close files opend with FILE pointer fp
nidhinvarghese 14:f5c62d30c6fc 33 void sd_close_ecg() ; // Close files opend with FILE pointer fpeecg
nidhinvarghese 14:f5c62d30c6fc 34 void sd_close_glc() ; //Close files opend with FILE pointer fpbg
nidhinvarghese 8:adf2ba7e6412 35
nikitateggi 22:ffa88619551d 36 int sd_BP_ECGMAX(int32_t pid);
nikitateggi 22:ffa88619551d 37 int sd_BP_PPGMAX(int32_t pid);
nidhinvarghese 8:adf2ba7e6412 38 //void sd_close1();
nidhinvarghese 8:adf2ba7e6412 39
nikitateggi 22:ffa88619551d 40 void create_single_BPfile(int32_t pid); //Function to create 1 file from 2 temp BP file (ECG &PPG)
nidhinvarghese 10:aeff3309002a 41
nikitateggi 22:ffa88619551d 42 void sd_open_mainfile(int32_t pid); // Function for oprning main file
nidhinvarghese 14:f5c62d30c6fc 43 //----------------- For testing
nikitateggi 22:ffa88619551d 44 void structure_file(BLEMsg_info *ptr, int32_t pid); // Writes structure to the File.
nidhinvarghese 14:f5c62d30c6fc 45
nikitateggi 22:ffa88619551d 46 void bpfile_mainfile(int32_t pid);
nidhinvarghese 8:adf2ba7e6412 47
suhasini 26:53ff13a164f3 48 void sd_ecgwrite(uint32_t *ecg_ptr); //to print ECG data in ECG func as binary using fwrite. NIDHIN 25 May 2017
nikitateggi 22:ffa88619551d 49 void ecgfile_mainfile(int32_t pid);
nidhinvarghese 14:f5c62d30c6fc 50
nikitateggi 22:ffa88619551d 51 void sd_glcwrite(uint32_t *glc_ptr, int32_t pid); // GLC raw data to GLC file
nikitateggi 22:ffa88619551d 52 void glcfile_mainfile(int32_t pid); // GLC file to main file
nidhinvarghese 14:f5c62d30c6fc 53
nikitateggi 22:ffa88619551d 54 void delete_subfiles(int32_t pid); //deletes all subfiles under a pid
nidhinvarghese 14:f5c62d30c6fc 55
nidhinvarghese 14:f5c62d30c6fc 56
nidhinvarghese 14:f5c62d30c6fc 57 #endif