diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-02-27 03:19:22 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-02-27 03:19:22 +0100 |
commit | 468e81e6da66f6dfec3a4857dc6e2f370ab180f1 (patch) | |
tree | ec6ea0f84f006c78b704703548b1aeb0a9e7380c | |
parent | 9ce2ce35d5f94c5d0b83ca8d9ceb21c8c1cf3cd4 (diff) |
added cell_dev to test app
-rw-r--r-- | fw/fe310/test/cell_dev.c | 24 | ||||
-rw-r--r-- | fw/fe310/test/cell_dev.h | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/fw/fe310/test/cell_dev.c b/fw/fe310/test/cell_dev.c new file mode 100644 index 0000000..40f2736 --- /dev/null +++ b/fw/fe310/test/cell_dev.c @@ -0,0 +1,24 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> + +#include <eos.h> +#include <net.h> +#include <cell.h> + +#include "status.h" +#include "cell_dev.h" + +static void cell_dev_handler(unsigned char type, unsigned char *buffer, uint16_t len) { + switch (type) { + case EOS_CELL_MTYPE_READY: + app_status_msg_set("Modem ready", 1); + break; + } + eos_net_free(buffer, 0); +} + +void app_cell_dev_init(void) { + eos_cell_set_handler(EOS_CELL_MTYPE_DEV, cell_dev_handler); +} diff --git a/fw/fe310/test/cell_dev.h b/fw/fe310/test/cell_dev.h new file mode 100644 index 0000000..19b7717 --- /dev/null +++ b/fw/fe310/test/cell_dev.h @@ -0,0 +1 @@ +void app_cell_dev_init(void);
\ No newline at end of file |