Send file data through D7A Action Protocol demo.
Dependencies: modem_ref_helper
Diff: main.cpp
- Revision:
- 12:e0dba9c55dff
- Parent:
- 11:a3308870afac
- Child:
- 13:475a2286deef
--- a/main.cpp Thu Oct 11 09:54:18 2018 +0000 +++ b/main.cpp Thu Oct 11 14:58:29 2018 +0000 @@ -12,26 +12,18 @@ sensor_config_t g_light_config; Queue<void, 8> g_file_modified; -void print_status(uint8_t id, int status) -{ - switch (status) - { - case ALP_ERR_NONE: - PRINT("Status[%d]: OK\n", id); - break; - default: - PRINT("Status[%d]: error %d\n", id, status); - break; - } -} - // Callback for id User void my_main_callback(uint8_t terminal, int8_t err, uint8_t id) { - print_status(id, err); + UNUSED(id); + + if (ALP_ERR_NONE != err) + { + modem_print_error(ALP_ITF_TYPE_D7A, err); + } if (terminal) - { + { modem_ready.release(); } } @@ -207,7 +199,7 @@ modem_ready.wait(); PRINT("Start D7A Stack\n"); - modem_activate_itf(ALP_ITF_TYPE_D7A, 24, 0, ALP_D7A_ISTAT_RESP , true, id); + modem_activate_itf(ALP_ITF_TYPE_D7A, 24, 0, ALP_D7A_ISTAT_RESP | ALP_D7A_ISTAT_UNS | ALP_D7A_ISTAT_EOP, true, id); modem_ready.wait(); PRINT("Notify Modem Version\n");