00001 #ifndef HLL_H_
00002 #define HLL_H_
00003 #include "pdcp.h"
00004 #include "socket.h"
00005
00006 enum {
00007 SOCK_FREE,
00008 SOCK_STDOUT,
00009 SOCK_STDIN,
00010 SOCK_APPLICATION,
00011
00012 SOCK_TOT_HLL
00013 };
00014
00015 typedef void (*hll_handled_hook)(u8);
00016
00017 struct hll{
00018 struct socket sock[SOCK_TOT_HLL];
00019 struct canel canbuf[CONFIG_NUM_CANMSG];
00020 hll_handled_hook notify;
00021 };
00022
00023 extern struct hll hll_global;
00024
00025 typedef u8 socknum_t;
00026
00027 void hll_msg_free(struct can_msg *msg);
00028 void hll_msg_commit(struct can_msg *msg);
00029 struct can_msg *hll_msg_get(void);
00030 struct can_msg *hll_msg_alloc(void);
00031 void hll_msg_push(struct can_msg *msg,socknum_t);
00032 struct can_msg *hll_msg_pull(socknum_t);
00033 void hll_init(sock_recv_hook, hll_handled_hook);
00034
00035 #endif