Sending and reception of big data file (1kB example)
Dependencies: modem_ref_helper CRC DebouncedInterrupt
Diff: main.cpp
- Revision:
- 14:a0241090f967
- Parent:
- 11:dc0e19b2d4a0
- Child:
- 15:9a9cfb0c3c4e
--- a/main.cpp Tue Aug 20 13:54:55 2019 +0000 +++ b/main.cpp Thu May 28 09:08:51 2020 +0000 @@ -28,8 +28,8 @@ // Do not modify uncommented parameters alp_itf_d7a_cfg_t my_itf = { .type = ALP_ITF_TYPE_D7A, - .cfg.to = 0, - .cfg.te = 0, + .cfg.to.byte = D7A_CTF_ENCODE(0), + .cfg.te.byte = D7A_CTF_ENCODE(0), .cfg.qos.bf.resp = D7A_RESP_PREFERRED, .cfg.qos.bf.retry = ALP_RPOL_ONESHOT, .cfg.addressee.ctrl.bf.nls = D7A_NLS_AES_CCM_64, // Security level @@ -41,7 +41,7 @@ // Response Callback void my_response_callback(uint8_t terminal, int8_t err, uint8_t id) { - if (ALP_ERR_NONE != err) + if (ALP_ERR_NONE > err) { modem_print_error(ALP_ITF_TYPE_D7A, err); } @@ -56,7 +56,7 @@ { modem_resp[id].put((void*)MODEM_RESP_ACK); } - else + else if (ALP_ERR_NONE > err) { modem_resp[id].put((void*)MODEM_RESP_ERROR); }