Compression code changed and RLY_TMTC pointers managed
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
i2c.h@161:a63672bf4423, 2016-04-14 (annotated)
- Committer:
- ee12b079
- Date:
- Thu Apr 14 04:14:21 2016 +0000
- Revision:
- 161:a63672bf4423
- Parent:
- 105:5ce0337e7c15
- Child:
- 162:48fda0b8d573
merged OBSRS TM and I2C_PL_working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
aniruddhv | 52:0bd68655c651 | 1 | #define tm_len 134 |
aniruddhv | 52:0bd68655c651 | 2 | #define tc_len 135 |
aniruddhv | 52:0bd68655c651 | 3 | #define tc_test_len 135 |
aniruddhv | 52:0bd68655c651 | 4 | |
aniruddhv | 52:0bd68655c651 | 5 | const int addr = 0x20; //slave address |
ee12b079 | 161:a63672bf4423 | 6 | bool write_ack = false; |
ee12b079 | 161:a63672bf4423 | 7 | bool read_ack = false; |
ee12b079 | 161:a63672bf4423 | 8 | const int addr_pl = 0x20<<1; //PL address |
ee12b079 | 161:a63672bf4423 | 9 | uint8_t rcv_isr = 0; |
aniruddhv | 52:0bd68655c651 | 10 | |
aniruddhv | 52:0bd68655c651 | 11 | int count = 0; |
aniruddhv | 52:0bd68655c651 | 12 | |
ee12b079 | 161:a63672bf4423 | 13 | char PL_I2C_DATA[134];//Payload i2c array |
ee12b079 | 161:a63672bf4423 | 14 | uint8_t PL_TM_SIZE;//size of data to bev read from i2c |
ee12b079 | 161:a63672bf4423 | 15 | |
ee12b079 | 161:a63672bf4423 | 16 | void FCTN_I2C_WRITE_PL(char *data2,uint8_t tc_len2) |
aniruddhv | 52:0bd68655c651 | 17 | { |
ee12b079 | 161:a63672bf4423 | 18 | write_ack = master.write(addr_pl|0x00,data2,tc_len2);//address to be defined in payload |
ee12b079 | 161:a63672bf4423 | 19 | if(write_ack == 1) |
aniruddhv | 52:0bd68655c651 | 20 | { |
ee12b079 | 161:a63672bf4423 | 21 | printf("\n\rdata not sent\n"); |
ee12b079 | 161:a63672bf4423 | 22 | } |
aniruddhv | 52:0bd68655c651 | 23 | } |
aniruddhv | 52:0bd68655c651 | 24 | |
ee12b079 | 161:a63672bf4423 | 25 | void isr_pyldtm() |
aniruddhv | 52:0bd68655c651 | 26 | { |
aniruddhv | 52:0bd68655c651 | 27 | |
ee12b079 | 161:a63672bf4423 | 28 | read_ack = master.read(addr_pl|1,PL_I2C_DATA,134); |
ee12b079 | 161:a63672bf4423 | 29 | gLEDR=!gLEDR; |
ee12b079 | 161:a63672bf4423 | 30 | rcv_isr = 1; |
aniruddhv | 52:0bd68655c651 | 31 | } |