1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef _API_GLUE_H_
14#define _API_GLUE_H_
15
16#define API_SEARCH_LEN (3 * 1024 * 1024)
17
18#define UB_MAX_MR 5
19#define UB_MAX_DEV 6
20
21extern void *syscall_ptr;
22extern uint32_t search_hint;
23
24int syscall(int, int *, ...);
25int api_search_sig(struct api_signature **sig);
26
27
28
29
30
31
32
33
34
35int ub_getc(void);
36int ub_tstc(void);
37void ub_putc(char c);
38void ub_puts(const char *s);
39
40
41void ub_reset(void);
42struct sys_info * ub_get_sys_info(void);
43
44
45void ub_udelay(unsigned long);
46unsigned long ub_get_timer(unsigned long);
47
48
49char * ub_env_get(const char *name);
50void ub_env_set(const char *name, char *value);
51const char * ub_env_enum(const char *last);
52
53
54int ub_dev_enum(void);
55int ub_dev_open(int handle);
56int ub_dev_close(int handle);
57int ub_dev_read(int handle, void *buf, lbasize_t len,
58 lbastart_t start, lbasize_t *rlen);
59int ub_dev_send(int handle, void *buf, int len);
60int ub_dev_recv(int handle, void *buf, int len, int *rlen);
61struct device_info * ub_dev_get(int);
62
63
64int ub_display_get_info(int type, struct display_info *di);
65int ub_display_draw_bitmap(ulong bitmap, int x, int y);
66void ub_display_clear(void);
67
68#endif
69