Sending and reception of big data file (1kB example)
Dependencies: modem_ref_helper CRC DebouncedInterrupt
Diff: main.cpp
- Revision:
- 8:4592de5f3ac1
- Parent:
- 6:33dfecc85ebf
- Child:
- 9:26cd994b5303
--- a/main.cpp Wed Sep 19 15:20:10 2018 +0000 +++ b/main.cpp Wed Sep 26 13:59:45 2018 +0000 @@ -35,31 +35,26 @@ .cfg.addressee.ctrl.bf.nls = D7A_NLS_AES_CCM_64, // Security level .cfg.addressee.ctrl.bf.idf = D7A_ID_NBID, .cfg.addressee.xcl.bf = {.s = 0x2, .m = 0x1}, // Gateway access class - .cfg.addressee.id[0] = 4, + .cfg.addressee.id[0] = D7A_CTF_VAL(4,0), }; -void print_resp(uint8_t id, int status) +void print_status(uint8_t id, int status) { switch (status) { case ALP_ERR_NONE: - //PRINT("Resp[%d]: OK\n", id); - break; - case ALP_ERR_FILE_EXIST: - PRINT("Resp[%d]: Already registered\n", id); + PRINT("Status[%d]: OK\n", id); break; default: - PRINT("Resp[%d]: error %d\n", id, status); + PRINT("Status[%d]: error %d\n", id, status); break; } } // Response Callback void my_response_callback(uint8_t terminal, int8_t err, uint8_t id) -{ - (void)id; - - print_resp(id, err); +{ + print_status(id, err); if (terminal) { @@ -336,10 +331,8 @@ // Callback void my_main_callback(uint8_t terminal, int8_t err, uint8_t id) -{ - (void)id; - - print_resp(id, err); +{ + print_status(id, err); if (terminal) {