pl ack in tmtc
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of COM_MNG_TMTC_SIMPLE_pl123 by
Revision 140:4feeb1163bb6, committed 2016-04-02
- Comitter:
- pradeepvk2208
- Date:
- Sat Apr 02 04:17:20 2016 +0000
- Parent:
- 139:17353d6311ce
- Commit message:
- included ack for pl_tc_tm
Changed in this revision
diff -r 17353d6311ce -r 4feeb1163bb6 COM_MNG_TMTC.h --- a/COM_MNG_TMTC.h Wed Mar 30 14:04:48 2016 +0000 +++ b/COM_MNG_TMTC.h Sat Apr 02 04:17:20 2016 +0000 @@ -1009,10 +1009,48 @@ } if(GETshort_or_long_tc(tc_ptr) == LONG_TC_CODE) - FCTN_I2C_WRITE_PL((char*)tc_ptr->TC_string,TC_LONG_SIZE); + { + int y=FCTN_I2C_WRITE_PL((char*)tc_ptr->TC_string,TC_LONG_SIZE); + if(y==1) + { + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = 0x33; //ack_code + tm_pointer->TM_string[3] = 0x00; + tm_pointer->TM_string[4] = 0x00; + for(uint8_t i=0;i<6;i++) + { + tm_pointer->TM_string[i+5] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; + return tm_ptr; + break; + } + } else { - FCTN_I2C_WRITE_PL((char*)tc_ptr->TC_string,TC_SHORT_SIZE); + int y=FCTN_I2C_WRITE_PL((char*)tc_ptr->TC_string,TC_SHORT_SIZE); + if(y==1) + { + tm_pointer->TM_string[0] = 0xB0; + tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); + tm_pointer->TM_string[2] = 0x33; //ack_code + tm_pointer->TM_string[3] = 0x00; + tm_pointer->TM_string[4] = 0x00; + for(uint8_t i=0;i<6;i++) + { + tm_pointer->TM_string[i+5] = 0; + } + crc16 = crc16_gen(tm_ptr->TM_string,11); + tm_pointer->TM_string[11] = (uint8_t)((crc16&0xFF00)>>8); + tm_pointer->TM_string[12] = (uint8_t)(crc16&0x00FF); + tm_pointer->next_TM = NULL; + return tm_ptr; + break; + } }
diff -r 17353d6311ce -r 4feeb1163bb6 FreescaleIAP.lib --- a/FreescaleIAP.lib Wed Mar 30 14:04:48 2016 +0000 +++ b/FreescaleIAP.lib Sat Apr 02 04:17:20 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/Sissors/code/FreescaleIAP/#6749f7702fa5 +http://mbed.org/users/Sissors/code/FreescaleIAP/#ab8a833a25eb
diff -r 17353d6311ce -r 4feeb1163bb6 i2c.h --- a/i2c.h Wed Mar 30 14:04:48 2016 +0000 +++ b/i2c.h Sat Apr 02 04:17:20 2016 +0000 @@ -15,17 +15,15 @@ uint8_t PL_TM_SIZE;//size of data to bev read from i2c -void FCTN_I2C_WRITE_PL(char *data2,uint8_t tc_len2) +int FCTN_I2C_WRITE_PL(char *data2,uint8_t tc_len2) { write_ack = master.write(addr_pl|0x00,data2,tc_len2);//address to be defined in payload if(write_ack == 1) { printf("\n\rdata not sent\n"); - } - else - { - - } + } + return write_ack; + } void FCTN_I2C_READ_PL(char *data,int length) {
diff -r 17353d6311ce -r 4feeb1163bb6 mbed-rtos.lib --- a/mbed-rtos.lib Wed Mar 30 14:04:48 2016 +0000 +++ b/mbed-rtos.lib Sat Apr 02 04:17:20 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#c825593ece39 +http://mbed.org/users/mbed_official/code/mbed-rtos/#bdd541595fc5
diff -r 17353d6311ce -r 4feeb1163bb6 mbed.bld --- a/mbed.bld Wed Mar 30 14:04:48 2016 +0000 +++ b/mbed.bld Sat Apr 02 04:17:20 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/99a22ba036c9 \ No newline at end of file