CDMS_CODE_samp_23SEP_DMA_flag

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE_samp_23SEP_DMA by iitm sat

Committer:
chaithanyarss
Date:
Sat Jul 02 10:48:30 2016 +0000
Revision:
207:28a07943dded
Parent:
206:fba4aeebf004
Except Flash everything else.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chaithanyarss 206:fba4aeebf004 1
chaithanyarss 206:fba4aeebf004 2 void P_PL_INIT();
chaithanyarss 206:fba4aeebf004 3 void P_PL_MAIN();
chaithanyarss 206:fba4aeebf004 4 void P_COM_INIT();
chaithanyarss 206:fba4aeebf004 5 void P_CDMS_HK_MAIN();
chaithanyarss 206:fba4aeebf004 6 void P_PL_RCV_SC_DATA();
chaithanyarss 206:fba4aeebf004 7 void P_CDMS_INIT_SD();
chaithanyarss 206:fba4aeebf004 8 void CDMS_SD_SW_ON();
chaithanyarss 206:fba4aeebf004 9 void CDMS_SD_SW_OFF();
chaithanyarss 206:fba4aeebf004 10 void SW_ON_BAE();
chaithanyarss 206:fba4aeebf004 11 void SW_OFF_BAE();
chaithanyarss 206:fba4aeebf004 12 void SW_ON_PL_BEE();
chaithanyarss 206:fba4aeebf004 13 void SW_OFF_PL_BEE();
chaithanyarss 206:fba4aeebf004 14 void SW_ON_PL_EPS();
chaithanyarss 206:fba4aeebf004 15 void SW_OFF_PL_EPS();
chaithanyarss 206:fba4aeebf004 16 void SW_ON_V_A_EN();
chaithanyarss 206:fba4aeebf004 17 void SW_OFF_V_A_EN();
chaithanyarss 206:fba4aeebf004 18 void RST_SD();
chaithanyarss 206:fba4aeebf004 19 void RST_BAE();
chaithanyarss 206:fba4aeebf004 20 void RST_PL_BEE();
chaithanyarss 206:fba4aeebf004 21 void RST_HK_COUNTER();
chaithanyarss 207:28a07943dded 22 uint8_t CDMS_RD_SD_HK(uint8_t *);
chaithanyarss 207:28a07943dded 23 void CDMS_INTERNAL_RESET();
chaithanyarss 206:fba4aeebf004 24
chaithanyarss 207:28a07943dded 25 void P_PL_INIT()
chaithanyarss 206:fba4aeebf004 26 {
chaithanyarss 206:fba4aeebf004 27
chaithanyarss 206:fba4aeebf004 28 }
chaithanyarss 206:fba4aeebf004 29
chaithanyarss 207:28a07943dded 30 void P_PL_MAIN()
chaithanyarss 206:fba4aeebf004 31 {
chaithanyarss 206:fba4aeebf004 32
chaithanyarss 206:fba4aeebf004 33 }
chaithanyarss 206:fba4aeebf004 34
chaithanyarss 207:28a07943dded 35 void P_COM_INIT()
chaithanyarss 206:fba4aeebf004 36 {
chaithanyarss 206:fba4aeebf004 37
chaithanyarss 206:fba4aeebf004 38 }
chaithanyarss 206:fba4aeebf004 39
chaithanyarss 207:28a07943dded 40 void P_CDMS_HK_MAIN()
chaithanyarss 206:fba4aeebf004 41 {
chaithanyarss 207:28a07943dded 42 //FCTN_CDMS_HK_MAIN();
chaithanyarss 206:fba4aeebf004 43 }
chaithanyarss 206:fba4aeebf004 44
chaithanyarss 207:28a07943dded 45 void P_PL_RCV_SC_DATA()
chaithanyarss 206:fba4aeebf004 46 {
chaithanyarss 207:28a07943dded 47
chaithanyarss 206:fba4aeebf004 48 }
chaithanyarss 206:fba4aeebf004 49
chaithanyarss 207:28a07943dded 50 void P_CDMS_INIT_SD()
chaithanyarss 206:fba4aeebf004 51 {
chaithanyarss 206:fba4aeebf004 52 FCTN_CDMS_SD_INIT();
chaithanyarss 206:fba4aeebf004 53 }
chaithanyarss 206:fba4aeebf004 54
chaithanyarss 206:fba4aeebf004 55 void CDMS_SD_SW_ON()
chaithanyarss 206:fba4aeebf004 56 {
chaithanyarss 206:fba4aeebf004 57 SD_SW_EN_DS = 0; //powering on SD
chaithanyarss 206:fba4aeebf004 58 }
chaithanyarss 206:fba4aeebf004 59
chaithanyarss 206:fba4aeebf004 60 void CDMS_SD_SW_OFF()
chaithanyarss 206:fba4aeebf004 61 {
chaithanyarss 206:fba4aeebf004 62 SD_SW_EN_DS = 0; //powering on SD
chaithanyarss 206:fba4aeebf004 63 }
chaithanyarss 206:fba4aeebf004 64
chaithanyarss 206:fba4aeebf004 65 void SW_ON_BAE()
chaithanyarss 206:fba4aeebf004 66 {
chaithanyarss 207:28a07943dded 67 BAE_SW_EN_DS = 0; //Power ON BAE
chaithanyarss 206:fba4aeebf004 68 }
chaithanyarss 206:fba4aeebf004 69
chaithanyarss 206:fba4aeebf004 70 void SW_OFF_BAE()
chaithanyarss 206:fba4aeebf004 71 {
chaithanyarss 207:28a07943dded 72 BAE_SW_EN_DS = 1; //Switch OFF BAE
chaithanyarss 206:fba4aeebf004 73 }
chaithanyarss 206:fba4aeebf004 74
chaithanyarss 206:fba4aeebf004 75 void SW_ON_PL_BEE()
chaithanyarss 206:fba4aeebf004 76 {
chaithanyarss 207:28a07943dded 77 PL_SW_EN_DS = 0; //Power ON PL
chaithanyarss 206:fba4aeebf004 78 }
chaithanyarss 206:fba4aeebf004 79
chaithanyarss 206:fba4aeebf004 80 void SW_OFF_PL_BEE()
chaithanyarss 206:fba4aeebf004 81 {
chaithanyarss 207:28a07943dded 82 PL_SW_EN_DS = 1; // switching OFF PL
chaithanyarss 206:fba4aeebf004 83 }
chaithanyarss 206:fba4aeebf004 84
chaithanyarss 206:fba4aeebf004 85 void SW_ON_PL_EPS()
chaithanyarss 206:fba4aeebf004 86 {
chaithanyarss 206:fba4aeebf004 87
chaithanyarss 206:fba4aeebf004 88 }
chaithanyarss 206:fba4aeebf004 89
chaithanyarss 206:fba4aeebf004 90 void SW_OFF_PL_EPS()
chaithanyarss 206:fba4aeebf004 91 {
chaithanyarss 206:fba4aeebf004 92
chaithanyarss 206:fba4aeebf004 93 }
chaithanyarss 206:fba4aeebf004 94
chaithanyarss 206:fba4aeebf004 95 void SW_ON_V_A_EN()
chaithanyarss 206:fba4aeebf004 96 {
chaithanyarss 207:28a07943dded 97
chaithanyarss 206:fba4aeebf004 98 }
chaithanyarss 206:fba4aeebf004 99
chaithanyarss 206:fba4aeebf004 100 void SW_OFF_V_A_EN()
chaithanyarss 206:fba4aeebf004 101 {
chaithanyarss 206:fba4aeebf004 102
chaithanyarss 206:fba4aeebf004 103 }
chaithanyarss 206:fba4aeebf004 104
chaithanyarss 206:fba4aeebf004 105 void RST_SD()
chaithanyarss 206:fba4aeebf004 106 {
chaithanyarss 207:28a07943dded 107 SD_SW_EN_DS = 1; //switching off SD card
chaithanyarss 207:28a07943dded 108 wait_ms(10);
chaithanyarss 207:28a07943dded 109 SD_SW_EN_DS = 0;
chaithanyarss 207:28a07943dded 110 FCTN_CDMS_SD_INIT();
chaithanyarss 206:fba4aeebf004 111 }
chaithanyarss 206:fba4aeebf004 112
chaithanyarss 206:fba4aeebf004 113 void RST_BAE()
chaithanyarss 206:fba4aeebf004 114 {
chaithanyarss 207:28a07943dded 115 BAE_SW_EN_DS = 1; //Switch OFF BAE
chaithanyarss 207:28a07943dded 116 wait_ms(10);
chaithanyarss 207:28a07943dded 117 BAE_SW_EN_DS = 0; //Switch ON BAE
chaithanyarss 206:fba4aeebf004 118 }
chaithanyarss 206:fba4aeebf004 119
chaithanyarss 206:fba4aeebf004 120 void RST_PL_BEE()
chaithanyarss 206:fba4aeebf004 121 {
chaithanyarss 207:28a07943dded 122 PL_SW_EN_DS = 1; // switching OFF PL
chaithanyarss 207:28a07943dded 123 wait_ms(10);
chaithanyarss 207:28a07943dded 124 PL_SW_EN_DS = 0; // Switch ON PL
chaithanyarss 206:fba4aeebf004 125 }
chaithanyarss 206:fba4aeebf004 126
chaithanyarss 206:fba4aeebf004 127 void RST_HK_COUNTER()
chaithanyarss 206:fba4aeebf004 128 {
chaithanyarss 207:28a07943dded 129 firstCount = true;
chaithanyarss 207:28a07943dded 130 }
chaithanyarss 207:28a07943dded 131
chaithanyarss 207:28a07943dded 132 uint8_t CDMS_RD_SD_HK(uint8_t *sd_statusbits)
chaithanyarss 207:28a07943dded 133 {
chaithanyarss 207:28a07943dded 134 uint8_t p;
chaithanyarss 207:28a07943dded 135 uint8_t ACK;
chaithanyarss 207:28a07943dded 136 if(SD_SW_EN_DS != DEVICE_POWERED)
chaithanyarss 207:28a07943dded 137 {
chaithanyarss 207:28a07943dded 138 ACK = 0x89;
chaithanyarss 207:28a07943dded 139 SD_RD_ERROR = 1;
chaithanyarss 207:28a07943dded 140 //Generate TM
chaithanyarss 207:28a07943dded 141 }
chaithanyarss 207:28a07943dded 142 else
chaithanyarss 207:28a07943dded 143 {
chaithanyarss 207:28a07943dded 144 p = disk_read_statusbits(sd_statusbits);
chaithanyarss 207:28a07943dded 145 if(p == 0)
chaithanyarss 207:28a07943dded 146 ACK = 0xA0;
chaithanyarss 207:28a07943dded 147 else
chaithanyarss 207:28a07943dded 148 ACK = 0x89;
chaithanyarss 207:28a07943dded 149 }
chaithanyarss 207:28a07943dded 150 return ACK;
chaithanyarss 207:28a07943dded 151 }
chaithanyarss 207:28a07943dded 152
chaithanyarss 207:28a07943dded 153 void CDMS_INTERNAL_RESET()
chaithanyarss 207:28a07943dded 154 {
chaithanyarss 206:fba4aeebf004 155
chaithanyarss 207:28a07943dded 156 }