Ping pong app demo.
Dependencies: modem_ref_helper DebouncedInterrupt
Diff: modem_callbacks.cpp
- Revision:
- 0:fa3fd69f8148
- Child:
- 2:785b422c7d22
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/modem_callbacks.cpp Wed May 17 13:58:04 2017 +0000 @@ -0,0 +1,63 @@ +#include "mbed.h" +#include "rtos.h" +#include "WizziDebug.h" + +#include "alp_spec.h" +#include "alp_helpers.h" +#include "modem_ref.h" +#include "d7a_1x.h" + +#include "hal_types.h" + + +// ============================================================}}} + +// Callbacks to MODEM's ALP requests +// ============================================================{{{ +void my_read(u8 fid, u32 offset, u32 length, int id) +{ + modem_respond(0, ALP_ERR_FILE_NOT_FOUND, id); +} + +void my_write(u8 fid, void *data, u32 offset, u32 length, int id) +{ + modem_respond(0, ALP_ERR_FILE_NOT_FOUND, id); +} + +void my_read_fprop(u8 fid, int id) +{ + modem_respond(0, ALP_ERR_FILE_NOT_FOUND, id); +} + +void my_flush(u8 fid, int id) +{ + modem_respond(0, ALP_ERR_FILE_NOT_FOUND, id); +} + +void my_delete(u8 fid, int id) +{ + modem_respond(0, ALP_ERR_FILE_NOT_FOUND, id); +} + +void my_lqual(u8 ifid, int per) +{ + PRINT("Interface File [%3d] LQUAL : %d%% PER\r\n", ifid, per); +} + +void my_ldown(u8 ifid) +{ + PRINT("Interface File [%3d] LDOWN\r\n", ifid); +} + +void my_reset(void) +{ + NVIC_SystemReset(); +} + +void my_boot(u8 cause, u16 number) +{ + PRINT("Modem BOOT[%c] #%d\r\nRe-Init\r\n", cause, number); + + // Modem re-booted, restart APP + //my_reset(); +} \ No newline at end of file