summaryrefslogtreecommitdiff
path: root/fw/fe310/test/cell_dev.c
blob: 9598bc40af98e38a91e2cf1d2d022c6f2d5e12fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

#include <eos.h>
#include <dev/net.h>
#include <net/cell.h>

#include <eve/eve.h>
#include <eve/eve_kbd.h>
#include <eve/eve_font.h>
#include <eve/screen/window.h>

#include "app/app_root.h"
#include "app/app_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);
}