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

Revision:
14:f5c62d30c6fc
Parent:
10:aeff3309002a
Child:
15:208b146151ba
--- a/sdcard.h	Sat May 27 05:47:55 2017 +0000
+++ b/sdcard.h	Thu Jun 01 09:24:45 2017 +0000
@@ -1,22 +1,10 @@
-/*
+// Exisiting code in Int_Demo_09May2017_suhasini/sdcard.h is deleted and replaced by new code 
+ //Nidhin 1/6/2017
+ 
 #ifndef SDCARD_H_
 #define SDCARD_H_
 
-void sd_open_ECGfile(int pid);
-void sd_open_ECGfilee(int pid);
-void sd_open_GLCfile(int pid);
-void sd_open_GLCfilee(int pid);
-void sd_open_BPfilee(int pid);
-void sd_open_BPfile(int pid);
-void sd_write (int value);
-void sd_close();
-
-#endif
-*/
-
-//-----------------------------------------------new ADD NIDHIN 28/4/2017-----------------
-#ifndef SDCARD_H_
-#define SDCARD_H_
+#include "struct.h"
 
 void sd_open_ECGfile(int pid);
 void sd_open_ECGfilee(int pid);
@@ -29,13 +17,15 @@
 //void sd_BP_ppgwrite (uint32_t value);
 //void sd_BP_ecgwrite (int value);
 
-FILE *sd_BP_ecgwrite (int *fpdrum11);
+FILE *sd_BP_ecgwrite (uint32_t *fpdrum11);
 FILE *sd_BP_ppgwrite (uint32_t *fpdrum21);
  
 void sd_open_BP_ECGfile(int pid); //added to write ECG to seperate file BP
 void sd_open_BP_PPGfile(int pid); //added to write PPG to seperate file BP
 
-void sd_close();
+void sd_close();               // Close files opend with FILE pointer fp
+ void sd_close_ecg() ;            // Close files opend with FILE pointer fpeecg
+ void sd_close_glc() ;            //Close files opend with FILE pointer fpbg
 
 int sd_BP_ECGMAX(int pid);
 int sd_BP_PPGMAX(int pid);
@@ -43,6 +33,19 @@
 
 void create_single_BPfile(int pid); //Function to create 1 file from 2 temp BP file (ECG &PPG)
 
-#endif 
+void sd_open_mainfile(int pid); // Function for oprning main file
+//----------------- For testing
+void structure_file(BLEMsg_info *ptr, int pid); // Writes structure to the File.
+
+void bpfile_mainfile(int pid);
 
-//----------------------------------------------------28/4/2017------------------------ 
\ No newline at end of file
+void sd_ecgwrite(int *ecg_ptr);  //to print ECG data in ECG func as binary using fwrite.   NIDHIN 25 May 2017
+void ecgfile_mainfile(int pid); 
+
+void sd_glcwrite(uint32_t *glc_ptr, int pid);  // GLC raw data to GLC file
+void glcfile_mainfile(int pid);  // GLC file to main file
+
+void delete_subfiles(int pid);  //deletes all subfiles under a pid
+
+
+#endif 
\ No newline at end of file