summaryrefslogtreecommitdiff
path: root/code/fe310/eos/net.h
blob: ba394b8a4e0b989f573b2c283638ece5199b6d43 (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
#include <stdint.h>
#include "event.h"

#define EOS_NET_SIZE_BUF        1500
#define EOS_NET_SIZE_BUFQ       2

#define EOS_NET_MTYPE_SOCK      1
#define EOS_NET_MTYPE_AUDIO     2

#define EOS_NET_MTYPE_WIFI      5
#define EOS_NET_MTYPE_CELL      6
#define EOS_NET_MTYPE_SIP       7
#define EOS_NET_MTYPE_APP       8

#define EOS_NET_MAX_MTYPE       8

void eos_net_init(void);
void eos_net_start(void);
void eos_net_stop(void);
void eos_net_set_handler(unsigned char type, eos_evt_handler_t handler);

void eos_net_acquire(void);
void eos_net_release(void);
unsigned char *eos_net_alloc(void);
void eos_net_free(unsigned char *buffer, unsigned char more);
int eos_net_send(unsigned char type, unsigned char *buffer, uint16_t len, unsigned char more);