Subversion Repositories freemyipod

Rev

Rev 110 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 110 Rev 111
Line 23... Line 23...
23
 
23
 
24
#ifndef __SYSCALLAPI_H__
24
#ifndef __SYSCALLAPI_H__
25
#define __SYSCALLAPI_H__
25
#define __SYSCALLAPI_H__
26
 
26
 
27
 
27
 
-
 
28
#include "../global.h"
-
 
29
#include "../panic.h"  
-
 
30
#include "../console.h"
28
#include <stdint.h>
31
#include "../dir.h"
-
 
32
#include "../file.h"
-
 
33
#include "../format.h"
-
 
34
#include "../lcdconsole.h"
29
#include <stdarg.h>
35
#include "../storage.h"
-
 
36
#include "../shutdown.h"
-
 
37
#include "../thread.h"
30
#include <stdbool.h>
38
#include "../ucl.h"
-
 
39
#include "../bootflash.h"
-
 
40
#include "../timer.h"
-
 
41
#include "../i2c.h"
-
 
42
#include "../interrupt.h"
-
 
43
#include "../lcd.h"
-
 
44
#include "../mmu.h"
31
#include "../panic.h"
45
#include "../nand.h"
32
 
-
 
-
 
46
#include "../power.h"
-
 
47
#include "../execimage.h"
-
 
48
#include "../libc/include/string.h"
-
 
49
#include "../libc/include/stdlib.h"
-
 
50
#include "../libc/include/stdio.h"
33
 
51
 
34
/* increase this every time the api struct changes */
52
/* increase this every time the api struct changes */
35
#define EMBIOS_API_VERSION 0
53
#define EMBIOS_API_VERSION 0
36
 
54
 
37
/* update this to latest version if a change to the api struct breaks
55
/* update this to latest version if a change to the api struct breaks
Line 46... Line 64...
46
 
64
 
47
struct embios_syscall_table
65
struct embios_syscall_table
48
{
66
{
49
    uint32_t table_version;
67
    uint32_t table_version;
50
    uint32_t table_minversion;
68
    uint32_t table_minversion;
-
 
69
	typeof(panic) *panic;
-
 
70
	typeof(panicf) *panicf;
-
 
71
    typeof(cprintf) *cprintf;
-
 
72
    typeof(cvprintf) *cvprintf;
-
 
73
    typeof(cputc) *cputc;
-
 
74
    typeof(cputs) *cputs;
-
 
75
    typeof(cwrite) *cwrite;
-
 
76
    typeof(cflush) *cflush;
-
 
77
    typeof(cgetc) *cgetc;
-
 
78
    typeof(cread) *cread;
-
 
79
    typeof(creada) *creada;
-
 
80
    typeof(opendir) *opendir;
-
 
81
    typeof(closedir) *closedir;
-
 
82
    typeof(readdir) *readdir;
-
 
83
    typeof(mkdir) *mkdir;
-
 
84
    typeof(rmdir) *rmdir;
-
 
85
    typeof(renderbmp) *renderbmp;
-
 
86
    typeof(renderchar) *renderchar;
-
 
87
    typeof(execimage) *execimage;
-
 
88
    typeof(ftruncate) *ftruncate;
-
 
89
    typeof(fsync) *fsync;
-
 
90
    typeof(close) *close;
-
 
91
    typeof(write) *write;
-
 
92
    typeof(read) *read;
-
 
93
    typeof(lseek) *lseek;
-
 
94
    typeof(remove) *remove;
-
 
95
    typeof(file_open) *file_open;
-
 
96
    typeof(rename) *rename;
-
 
97
    typeof(file_creat) *file_creat;
-
 
98
    typeof(filesize) *filesize;
-
 
99
    typeof(format) *format;
-
 
100
    typeof(vuprintf) *vuprintf;
-
 
101
    typeof(lcdconsole_putc_noblit) *lcdconsole_putc_noblit;
-
 
102
    typeof(lcdconsole_puts_noblit) *lcdconsole_puts_noblit;
51
	void (*panic) (enum panic_severity severity, const char* string);
103
    typeof(lcdconsole_write_noblit) *lcdconsole_write_noblit;
-
 
104
    typeof(lcdconsole_update) *lcdconsole_update;
-
 
105
    typeof(lcdconsole_putc) *lcdconsole_putc;
-
 
106
    typeof(lcdconsole_puts) *lcdconsole_puts;
-
 
107
    typeof(lcdconsole_write) *lcdconsole_write;
-
 
108
    typeof(shutdown) *shutdown;
-
 
109
    typeof(storage_read_sectors) *storage_read_sectors;
52
	void (*panicf) (enum panic_severity severity, const char* fmt, ...);
110
    typeof(storage_write_sectors) *storage_write_sectors;
-
 
111
    typeof(strcasecmp) *strcasecmp;
-
 
112
    typeof(strncasecmp) *strncasecmp;
-
 
113
    typeof(strcasestr) *strcasestr;
-
 
114
    typeof(strlcat) *strlcat;
-
 
115
    typeof(strlcpy) *strlcpy;
-
 
116
    typeof(mutex_init) *mutex_init;
-
 
117
    typeof(mutex_lock) *mutex_lock;
-
 
118
    typeof(mutex_unlock) *mutex_unlock;
-
 
119
    typeof(wakeup_init) *wakeup_init;
-
 
120
    typeof(wakeup_wait) *wakeup_wait;
-
 
121
    typeof(wakeup_signal) *wakeup_signal;
-
 
122
    typeof(sleep) *sleep;
-
 
123
    typeof(thread_create) *thread_create;
-
 
124
    typeof(thread_exit) *thread_exit;
-
 
125
    typeof(thread_suspend) *thread_suspend;
-
 
126
    typeof(thread_resume) *thread_resume;
-
 
127
    typeof(thread_terminate) *thread_terminate;
-
 
128
    typeof(__errno) *__errno;
-
 
129
    typeof(ucl_decompress) *ucl_decompress;
-
 
130
    typeof(bootflash_filesize) *bootflash_filesize;
-
 
131
    typeof(bootflash_attributes) *bootflash_attributes;
-
 
132
    typeof(bootflash_getaddr) *bootflash_getaddr;
-
 
133
    typeof(bootflash_read) *bootflash_read;
-
 
134
    typeof(bootflash_readraw) *bootflash_readraw;
-
 
135
    typeof(bootflash_writeraw) *bootflash_writeraw;
-
 
136
    typeof(bootflash_getrawaddr) *bootflash_getrawaddr;
-
 
137
    typeof(read_native_timer) *read_native_timer;
-
 
138
    typeof(read_usec_timer) *read_usec_timer;
-
 
139
    typeof(i2c_send) *i2c_send;
-
 
140
    typeof(i2c_recv) *i2c_recv;
-
 
141
    typeof(i2c_sendbyte) *i2c_sendbyte;
-
 
142
    typeof(i2c_recvbyte) *i2c_recvbyte;
-
 
143
    typeof(interrupt_enable) *interrupt_enable;
-
 
144
    typeof(interrupt_set_handler) *interrupt_set_handler;
-
 
145
    typeof(int_timer_set_handler) *int_timer_set_handler;
-
 
146
    typeof(displaylcd) *displaylcd;
-
 
147
    typeof(displaylcd_sync) *displaylcd_sync;
-
 
148
    typeof(displaylcd_busy) *displaylcd_busy;
-
 
149
    typeof(displaylcd_safe) *displaylcd_safe;
-
 
150
    typeof(clean_dcache) *clean_dcache;
-
 
151
    typeof(invalidate_dcache) *invalidate_dcache;
-
 
152
    typeof(invalidate_icache) *invalidate_icache;
-
 
153
    typeof(nand_read_page) *nand_read_page;
-
 
154
    typeof(nand_block_erase) *nand_block_erase;
-
 
155
    typeof(nand_read_page_fast) *nand_read_page_fast;
-
 
156
    typeof(nand_write_page) *nand_write_page;
-
 
157
    typeof(nand_write_page_start) *nand_write_page_start;
-
 
158
    typeof(nand_write_page_collect) *nand_write_page_collect;
-
 
159
    typeof(nand_get_device_type) *nand_get_device_type;
-
 
160
    typeof(power_off) *power_off;
-
 
161
    typeof(charging_state) *charging_state;
-
 
162
    typeof(atoi) *atoi;
-
 
163
    typeof(memchr) *memchr;
-
 
164
    typeof(memcmp) *memcmp;
-
 
165
    typeof(memcpy) *memcpy;
-
 
166
    typeof(memmove) *memmove;
-
 
167
    typeof(memset) *memset;
-
 
168
    typeof(qsort) *qsort;
-
 
169
    typeof(srand) *srand;
-
 
170
    typeof(rand) *rand;
-
 
171
    typeof(snprintf) *snprintf;
-
 
172
    typeof(vsnprintf) *vsnprintf;
-
 
173
    typeof(sscanf) *sscanf;
-
 
174
    typeof(strcat) *strcat;
-
 
175
    typeof(strchr) *strchr;
-
 
176
    typeof(strcmp) *strcmp;
-
 
177
    typeof(strcpy) *strcpy;
-
 
178
    typeof(strlen) *strlen;
-
 
179
    typeof(strncmp) *strncmp;
-
 
180
    typeof(strrchr) *strrchr;
-
 
181
    typeof(strstr) *strstr;
-
 
182
    typeof(strtok_r) *strtok_r;
53
};
183
};
54
 
184
 
55
 
185
 
56
#endif
186
#endif