Subversion Repositories freemyipod

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
99 theseven 1
//
2
//
3
//    Copyright 2010 TheSeven
4
//
5
//
6
//    This file is part of emBIOS.
7
//
8
//    emBIOS is free software: you can redistribute it and/or
9
//    modify it under the terms of the GNU General Public License as
10
//    published by the Free Software Foundation, either version 2 of the
11
//    License, or (at your option) any later version.
12
//
13
//    emBIOS is distributed in the hope that it will be useful,
14
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
//    See the GNU General Public License for more details.
17
//
18
//    You should have received a copy of the GNU General Public License along
19
//    with emBIOS.  If not, see <http://www.gnu.org/licenses/>.
20
//
21
//
22
 
23
 
24
#include "global.h"
111 theseven 25
#include "syscallapi.h"
99 theseven 26
 
27
 
28
struct embios_syscall_table syscall_table ICONST_ATTR =
29
{
100 theseven 30
    .table_version = EMBIOS_API_VERSION,
31
    .table_minversion = EMBIOS_MIN_API_VERSION,
99 theseven 32
	.panic = panic,
111 theseven 33
    .panicf = panicf,
34
    .cprintf = cprintf,
35
    .cvprintf = cvprintf,
36
    .cputc = cputc,
37
    .cputs = cputs,
38
    .cwrite = cwrite,
39
    .cflush = cflush,
40
    .cgetc = cgetc,
41
    .cread = cread,
42
    .creada = creada,
43
    .format = format,
44
    .vuprintf = vuprintf,
45
    .shutdown = shutdown,
46
    .strcasecmp = strcasecmp,
47
    .strncasecmp = strncasecmp,
48
    .strcasestr = strcasestr,
49
    .strlcat = strlcat,
50
    .strlcpy = strlcpy,
51
    .mutex_init = mutex_init,
52
    .mutex_lock = mutex_lock,
53
    .mutex_unlock = mutex_unlock,
54
    .wakeup_init = wakeup_init,
55
    .wakeup_wait = wakeup_wait,
56
    .wakeup_signal = wakeup_signal,
57
    .sleep = sleep,
58
    .thread_create = thread_create,
59
    .thread_exit = thread_exit,
60
    .thread_suspend = thread_suspend,
61
    .thread_resume = thread_resume,
62
    .thread_terminate = thread_terminate,
63
    .__errno = __errno,
64
    .ucl_decompress = ucl_decompress,
65
    .read_native_timer = read_native_timer,
66
    .read_usec_timer = read_usec_timer,
67
    .i2c_send = i2c_send,
68
    .i2c_recv = i2c_recv,
69
    .i2c_sendbyte = i2c_sendbyte,
70
    .i2c_recvbyte = i2c_recvbyte,
71
    .interrupt_enable = interrupt_enable,
72
    .interrupt_set_handler = interrupt_set_handler,
73
    .int_timer_set_handler = int_timer_set_handler,
74
    .clean_dcache = clean_dcache,
75
    .invalidate_dcache = invalidate_dcache,
76
    .invalidate_icache = invalidate_icache,
77
    .power_off = power_off,
78
    .charging_state = charging_state,
79
    .atoi = atoi,
80
    .memchr = memchr,
81
    .memcmp = memcmp,
82
    .memcpy = memcpy,
83
    .memmove = memmove,
84
    .memset = memset,
85
    .qsort = qsort,
86
    .srand = srand,
87
    .rand = rand,
88
    .snprintf = snprintf,
89
    .vsnprintf = vsnprintf,
90
    .sscanf = sscanf,
91
    .strcat = strcat,
92
    .strchr = strchr,
93
    .strcmp = strcmp,
94
    .strcpy = strcpy,
95
    .strlen = strlen,
96
    .strncmp = strncmp,
97
    .strrchr = strrchr,
98
    .strstr = strstr,
99
    .strtok_r = strtok_r,
118 theseven 100
    .get_platform_id = get_platform_id,
125 theseven 101
    .tlsf_create = tlsf_create,
102
    .tlsf_destroy = tlsf_destroy,
103
    .tlsf_malloc = tlsf_malloc,
104
    .tlsf_memalign = tlsf_memalign,
105
    .tlsf_realloc = tlsf_realloc,
106
    .tlsf_free = tlsf_free,
107
    .tlsf_walk_heap = tlsf_walk_heap,
108
    .tlsf_check_heap = tlsf_check_heap,
109
    .tlsf_block_size = tlsf_block_size,
110
    .tlsf_overhead = tlsf_overhead,
127 theseven 111
    .execfirmware = execfirmware,
138 theseven 112
    .clockgate_enable = clockgate_enable,
143 theseven 113
    .context_switch = context_switch,
114
    .reset = reset,
111 theseven 115
#ifdef HAVE_STORAGE
116
    .opendir = opendir,
117
    .closedir = closedir,
118
    .readdir = readdir,
119
    .mkdir = mkdir,
120
    .rmdir = rmdir,
121
    .execimage = execimage,
122
    .ftruncate = ftruncate,
123
    .fsync = fsync,
124
    .close = close,
125
    .write = write,
126
    .read = read,
127
    .lseek = lseek,
128
    .remove = remove,
129
    .file_open = file_open,
130
    .rename = rename,
131
    .file_creat = file_creat,
132
    .filesize = filesize,
116 theseven 133
    .storage_read_sectors_md = storage_read_sectors_md,
134
    .storage_write_sectors_md = storage_write_sectors_md,
158 theseven 135
    .storage_get_info = storage_get_info,
143 theseven 136
#ifdef HAVE_HOTSWAP
137
    .disk_mount = disk_mount,
138
    .disk_unmount = disk_unmount,
111 theseven 139
#endif
143 theseven 140
#endif
111 theseven 141
#ifdef HAVE_LCD
142
    .lcdconsole_putc_noblit = lcdconsole_putc_noblit,
143
    .lcdconsole_puts_noblit = lcdconsole_puts_noblit,
144
    .lcdconsole_write_noblit = lcdconsole_write_noblit,
145
    .lcdconsole_update = lcdconsole_update,
146
    .lcdconsole_putc = lcdconsole_putc,
147
    .lcdconsole_puts = lcdconsole_puts,
148
    .lcdconsole_write = lcdconsole_write,
122 theseven 149
    .lcdconsole_get_current_x = lcdconsole_get_current_x,
150
    .lcdconsole_get_current_y = lcdconsole_get_current_y,
151
    .lcdconsole_get_lineend_x = lcdconsole_get_lineend_x,
152
    .lcdconsole_get_lineend_y = lcdconsole_get_lineend_y,
124 theseven 153
    .lcdconsole_progressbar = lcdconsole_progressbar,
122 theseven 154
    .progressbar_init = progressbar_init,
155
    .progressbar_setpos = progressbar_setpos,
111 theseven 156
    .displaylcd = displaylcd,
157
    .displaylcd_sync = displaylcd_sync,
158
    .displaylcd_busy = displaylcd_busy,
159
    .displaylcd_safe = displaylcd_safe,
116 theseven 160
    .lcd_get_width = lcd_get_width,
161
    .lcd_get_height = lcd_get_height,
162
    .lcd_get_bytes_per_pixel = lcd_get_bytes_per_pixel,
122 theseven 163
    .lcd_translate_color = lcd_translate_color,
138 theseven 164
    .renderbmp = renderbmp,
165
    .renderchar = renderchar,
166
    .rendertext = rendertext,
167
    .renderfillrect = renderfillrect,
168
    .get_font_width = get_font_width,
169
    .get_font_height = get_font_height,
111 theseven 170
#endif
117 theseven 171
#ifdef HAVE_BACKLIGHT
172
    .backlight_on = backlight_on,
173
    .backlight_set_fade = backlight_set_fade,
174
    .backlight_set_brightness = backlight_set_brightness,
175
#endif
111 theseven 176
#ifdef HAVE_BOOTFLASH
177
    .bootflash_filesize = bootflash_filesize,
178
    .bootflash_attributes = bootflash_attributes,
179
    .bootflash_getaddr = bootflash_getaddr,
180
    .bootflash_read = bootflash_read,
181
    .bootflash_readraw = bootflash_readraw,
182
    .bootflash_writeraw = bootflash_writeraw,
183
    .bootflash_getrawaddr = bootflash_getrawaddr,
138 theseven 184
    .bootflash_is_memmapped = bootflash_is_memmapped,
111 theseven 185
#endif
130 theseven 186
#ifdef HAVE_BUTTON
187
    .button_register_handler = button_register_handler,
188
    .button_unregister_handler = button_unregister_handler,
189
#endif
132 theseven 190
#ifdef HAVE_CLICKWHEEL
191
    .clickwheel_get_state = clickwheel_get_state,
192
#endif
143 theseven 193
#ifdef HAVE_HWKEYAES
194
    .hwkeyaes = hwkeyaes,
195
#endif
196
#ifdef HAVE_HMACSHA1
197
    .hmacsha1 = hmacsha1
198
#endif
99 theseven 199
};