created separate function for hex to char

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of SS_SensePOC2P0_11Dec2017_USERPID by rashmi v

Committer:
rashmivenkataramaiah
Date:
Mon Nov 20 09:52:59 2017 +0000
Revision:
66:d7fc45e328d0
Parent:
57:e82d4bd6b2c0
Child:
67:7e07cdb1b150
- While sending Response message: format specifier changed to %02x.; - enum device state was created.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rashmivenkataramaiah 41:1141a75eacc4 1 #ifndef MAIN_H_
rashmivenkataramaiah 41:1141a75eacc4 2 #define MAIN_H_
rashmivenkataramaiah 41:1141a75eacc4 3
nikitateggi 54:f2a413d5dffd 4 #define TIMER_ENABLE_DEBUG_MODE 600000 //added on 22/09/2017 nikita
rashmivenkataramaiah 57:e82d4bd6b2c0 5 #define DATETIME_SIZE 6
rashmivenkataramaiah 57:e82d4bd6b2c0 6
rashmivenkataramaiah 57:e82d4bd6b2c0 7 // sentinel for bluetooth communication protocol for POC2P0
rashmivenkataramaiah 57:e82d4bd6b2c0 8 #define SOS_EOS 0xC0u
rashmivenkataramaiah 57:e82d4bd6b2c0 9
rashmivenkataramaiah 57:e82d4bd6b2c0 10 // message request id from mobile application for POC2P0
rashmivenkataramaiah 57:e82d4bd6b2c0 11 #define STRT_BP_TEST_REQ 0x10u
rashmivenkataramaiah 57:e82d4bd6b2c0 12
rashmivenkataramaiah 57:e82d4bd6b2c0 13 #define STRT_BG_FBS_TEST_REQ 0x20u
rashmivenkataramaiah 57:e82d4bd6b2c0 14 #define STRT_BG_PP_TEST_REQ 0x21u
rashmivenkataramaiah 57:e82d4bd6b2c0 15 #define STRT_BG_RAN_TEST_REQ 0x22u
rashmivenkataramaiah 57:e82d4bd6b2c0 16
rashmivenkataramaiah 57:e82d4bd6b2c0 17 #define STRT_ECG_TEST_REQ 0x30u
rashmivenkataramaiah 57:e82d4bd6b2c0 18
rashmivenkataramaiah 57:e82d4bd6b2c0 19 #define DATA_SYNC_REQ 0x70u
rashmivenkataramaiah 57:e82d4bd6b2c0 20 #define HEARTBEAT_REQ 0x71u
rashmivenkataramaiah 57:e82d4bd6b2c0 21 #define HOME_SCREEN_REQ 0x72u
rashmivenkataramaiah 57:e82d4bd6b2c0 22 #define TEST_SCREEN_REQ 0x73u
rashmivenkataramaiah 57:e82d4bd6b2c0 23
rashmivenkataramaiah 57:e82d4bd6b2c0 24 // message response id from device for POC2P0
rashmivenkataramaiah 57:e82d4bd6b2c0 25 #define BP_TEST_IN_PROGRESS_RES 0x16u
rashmivenkataramaiah 57:e82d4bd6b2c0 26 #define BP_TEST_SUCCSS_RES 0x1Au
rashmivenkataramaiah 57:e82d4bd6b2c0 27 #define BP_LEADOFF_FINGER_IMPROPER_RES 0x1Eu
rashmivenkataramaiah 57:e82d4bd6b2c0 28 #define BP_RESULT_IMPROPER_RES 0x1Fu
rashmivenkataramaiah 57:e82d4bd6b2c0 29
rashmivenkataramaiah 57:e82d4bd6b2c0 30 #define BG_TEST_IN_PROGRESS_RES 0x26u
rashmivenkataramaiah 57:e82d4bd6b2c0 31 #define BG_TEST_STRIP_REMOVE_RES 0x27u
rashmivenkataramaiah 57:e82d4bd6b2c0 32 #define BG_INSERT_STRIP_RES 0x28u
rashmivenkataramaiah 57:e82d4bd6b2c0 33 #define BG_DROP_BLOOD_RES 0x29u
rashmivenkataramaiah 57:e82d4bd6b2c0 34 #define BG_TEST_SUCCSS_RES 0x2Au
rashmivenkataramaiah 57:e82d4bd6b2c0 35 #define BG_REPLACE_TEST_STRIP_RES 0x2Eu
rashmivenkataramaiah 57:e82d4bd6b2c0 36 #define BG_RESULT_IMPROPER_RES 0x2Fu
rashmivenkataramaiah 57:e82d4bd6b2c0 37
rashmivenkataramaiah 57:e82d4bd6b2c0 38 #define ECG_TEST_IN_PROGRESS_RES 0x36u
rashmivenkataramaiah 57:e82d4bd6b2c0 39 #define ECG_TEST_SUCCSS_RES 0x3Au
rashmivenkataramaiah 57:e82d4bd6b2c0 40 #define ECG_LEADOFF_RES 0x3Eu
rashmivenkataramaiah 57:e82d4bd6b2c0 41 #define ECG_RESULT_IMPROPER_RES 0x3Fu
rashmivenkataramaiah 57:e82d4bd6b2c0 42
rashmivenkataramaiah 57:e82d4bd6b2c0 43 #define DATA_SYNC_MSG_ACCEPTED_RES 0x79u
rashmivenkataramaiah 57:e82d4bd6b2c0 44 #define HEARTBEAT_SYNC_MSG_ACCEPTED_RES 0x7Au
rashmivenkataramaiah 57:e82d4bd6b2c0 45 #define HOME_SCREEN_MSG_ACCEPTED_RES 0x7Bu
rashmivenkataramaiah 57:e82d4bd6b2c0 46 #define TEST_SCREEN_MSG_ACCEPTED_RES 0x7Cu
rashmivenkataramaiah 57:e82d4bd6b2c0 47
rashmivenkataramaiah 57:e82d4bd6b2c0 48 #define MSG_REJECTED_RES 0x7Fu
rashmivenkataramaiah 57:e82d4bd6b2c0 49
rashmivenkataramaiah 57:e82d4bd6b2c0 50 // touch states currently used in POC1P0 and now used for POC2P0 receive from mobile application
rashmivenkataramaiah 57:e82d4bd6b2c0 51 #define TOUCH_STATE_HOME_SCREEN 0x01u
rashmivenkataramaiah 66:d7fc45e328d0 52 #define TOUCH_STATE_TEST_SCREEN 0x03u
rashmivenkataramaiah 57:e82d4bd6b2c0 53
rashmivenkataramaiah 57:e82d4bd6b2c0 54 #define TOUCH_STATE_BP_TEST_SCREEN 0x09u
rashmivenkataramaiah 57:e82d4bd6b2c0 55 #define TOUCH_STATE_BG_TEST_SCREEN 0x07u
rashmivenkataramaiah 57:e82d4bd6b2c0 56 #define TOUCH_STATE_ECG_SCREEN 0x08u
rashmivenkataramaiah 57:e82d4bd6b2c0 57
rashmivenkataramaiah 57:e82d4bd6b2c0 58 #define TOUCH_STATE_DATA_SYNC_SCREEN 0x02u
rashmivenkataramaiah 57:e82d4bd6b2c0 59
rashmivenkataramaiah 57:e82d4bd6b2c0 60 /**********************************************************************************
rashmivenkataramaiah 57:e82d4bd6b2c0 61 ****************************** Global Function ************************************
rashmivenkataramaiah 57:e82d4bd6b2c0 62 **********************************************************************************/
rashmivenkataramaiah 57:e82d4bd6b2c0 63 void poc2p0_send_device_msg_res(uint8_t);
rashmivenkataramaiah 57:e82d4bd6b2c0 64 void poc2p0_send_device_heartbeat_msg_res(uint8_t);
rashmivenkataramaiah 57:e82d4bd6b2c0 65 void poc2p0_send_device_test_result_res(uint8_t, uint32_t);
rashmivenkataramaiah 41:1141a75eacc4 66
rashmivenkataramaiah 41:1141a75eacc4 67 bool get_filecreated_status(void); //get status of file created
rashmivenkataramaiah 41:1141a75eacc4 68 void set_filecreated_status(void); //set file created
rashmivenkataramaiah 41:1141a75eacc4 69 void clear_filecreated_status(void); //clear file created
rashmivenkataramaiah 43:85a7f399cb9d 70 void increment_filepid (void);
rashmivenkataramaiah 43:85a7f399cb9d 71 void increment_btpid (void);
rashmivenkataramaiah 42:c81673b04b6a 72 uint32_t get_btpid(void);
rashmivenkataramaiah 42:c81673b04b6a 73 void store_btpid(uint32_t bt_pid);
rashmivenkataramaiah 42:c81673b04b6a 74 uint32_t get_filepid(void);
rashmivenkataramaiah 42:c81673b04b6a 75 void store_filepid(uint32_t pid);
nikitateggi 51:1a4693774b60 76 bool read_debug_status();
nikitateggi 51:1a4693774b60 77 uint32_t get_timer_debug();
rashmivenkataramaiah 41:1141a75eacc4 78 #endif
rashmivenkataramaiah 41:1141a75eacc4 79