Subversion Repositories freemyipod

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
623 theseven 1
//
2
//
3
//    Copyright 2010 TheSeven
4
//
5
//
6
//    This file is part of emCORE.
7
//
8
//    emCORE 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
//    emCORE 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 emCORE.  If not, see <http://www.gnu.org/licenses/>.
20
//
21
//
22
 
23
 
24
#include "global.h"
25
#include "syscallapi.h"
26
 
27
 
28
struct emcore_syscall_table syscall_table ICONST_ATTR =
29
{
30
    .table_version = EMCORE_API_VERSION,
31
    .table_minversion = EMCORE_MIN_API_VERSION,
32
#ifdef ARM_ARCH
33
    .__clzsi2 = __clzsi2,
34
    .__aeabi_idivmod = __aeabi_idivmod,
35
    .__aeabi_uidivmod = __aeabi_uidivmod,
36
#endif
37
	.panic = panic,
38
    .panicf = panicf,
39
    .cprintf = cprintf,
40
    .cvprintf = cvprintf,
41
    .cputc = cputc,
42
    .cputs = cputs,
43
    .cwrite = cwrite,
44
    .cflush = cflush,
45
    .cgetc = cgetc,
46
    .cread = cread,
47
    .creada = creada,
48
    .format = format,
49
    .vuprintf = vuprintf,
50
    .shutdown = shutdown,
51
    .strcasecmp = strcasecmp,
52
    .strncasecmp = strncasecmp,
53
    .strcasestr = strcasestr,
54
    .strlcat = strlcat,
55
    .strlcpy = strlcpy,
56
    .mutex_init = mutex_init,
57
    .mutex_lock = mutex_lock,
58
    .mutex_unlock = mutex_unlock,
59
    .wakeup_init = wakeup_init,
60
    .wakeup_wait = wakeup_wait,
61
    .wakeup_signal = wakeup_signal,
62
    .sleep = sleep,
63
    .thread_create = thread_create,
64
    .thread_exit = thread_exit,
65
    .thread_suspend = thread_suspend,
66
    .thread_resume = thread_resume,
67
    .thread_terminate = thread_terminate,
68
    .__errno = __errno,
69
    .ucl_decompress = ucl_decompress,
70
    .read_native_timer = read_native_timer,
71
    .read_usec_timer = read_usec_timer,
72
    .i2c_send = i2c_send,
73
    .i2c_recv = i2c_recv,
74
    .i2c_sendbyte = i2c_sendbyte,
75
    .i2c_recvbyte = i2c_recvbyte,
76
    .interrupt_enable = interrupt_enable,
77
    .interrupt_set_handler = interrupt_set_handler,
78
    .int_timer_set_handler = int_timer_set_handler,
79
    .clean_dcache = clean_dcache,
80
    .invalidate_dcache = invalidate_dcache,
81
    .invalidate_icache = invalidate_icache,
82
    .power_off = power_off,
83
    .charging_state = charging_state,
84
    .atoi = atoi,
85
    .memchr = memchr,
86
    .memcmp = memcmp,
87
    .memcpy = memcpy,
88
    .memmove = memmove,
89
    .memset = memset,
90
    .qsort = qsort,
91
    .srand = srand,
92
    .rand = rand,
93
    .snprintf = snprintf,
94
    .vsnprintf = vsnprintf,
95
    .sscanf = sscanf,
96
    .strcat = strcat,
97
    .strchr = strchr,
98
    .strcmp = strcmp,
99
    .strcpy = strcpy,
100
    .strlen = strlen,
101
    .strncmp = strncmp,
102
    .strrchr = strrchr,
103
    .strstr = strstr,
104
    .strtok_r = strtok_r,
105
    .get_platform_id = get_platform_id,
106
    .tlsf_create = tlsf_create,
107
    .tlsf_destroy = tlsf_destroy,
108
    .tlsf_malloc = tlsf_malloc,
109
    .tlsf_memalign = tlsf_memalign,
110
    .tlsf_realloc = tlsf_realloc,
111
    .tlsf_free = tlsf_free,
112
    .tlsf_walk_heap = tlsf_walk_heap,
113
    .tlsf_check_heap = tlsf_check_heap,
114
    .tlsf_block_size = tlsf_block_size,
115
    .tlsf_overhead = tlsf_overhead,
116
    .execfirmware = execfirmware,
117
    .clockgate_enable = clockgate_enable,
118
    .yield = yield,
119
    .reset = reset,
120
    .execimage = execimage,
121
#ifdef HAVE_STORAGE
122
    .opendir = opendir,
123
    .closedir = closedir,
124
    .readdir = readdir,
125
    .mkdir = mkdir,
126
    .rmdir = rmdir,
127
    .ftruncate = ftruncate,
128
    .fsync = fsync,
129
    .close = close,
130
    .write = write,
131
    .read = read,
132
    .lseek = lseek,
133
    .remove = remove,
134
    .file_open = file_open,
135
    .rename = rename,
136
    .file_creat = file_creat,
137
    .filesize = filesize,
138
    .storage_read_sectors_md = storage_read_sectors_md,
139
    .storage_write_sectors_md = storage_write_sectors_md,
140
    .storage_get_info = storage_get_info,
141
#ifdef HAVE_HOTSWAP
142
    .disk_mount = disk_mount,
143
    .disk_unmount = disk_unmount,
144
#endif
145
#endif
146
#ifdef HAVE_LCD
147
    .lcdconsole_putc_noblit = lcdconsole_putc_noblit,
148
    .lcdconsole_puts_noblit = lcdconsole_puts_noblit,
149
    .lcdconsole_write_noblit = lcdconsole_write_noblit,
150
    .lcdconsole_update = lcdconsole_update,
151
    .lcdconsole_putc = lcdconsole_putc,
152
    .lcdconsole_puts = lcdconsole_puts,
153
    .lcdconsole_write = lcdconsole_write,
154
    .lcdconsole_get_current_x = lcdconsole_get_current_x,
155
    .lcdconsole_get_current_y = lcdconsole_get_current_y,
156
    .lcdconsole_get_lineend_x = lcdconsole_get_lineend_x,
157
    .lcdconsole_get_lineend_y = lcdconsole_get_lineend_y,
158
    .lcdconsole_progressbar = lcdconsole_progressbar,
159
    .progressbar_init = progressbar_init,
160
    .progressbar_setpos = progressbar_setpos,
161
    .displaylcd = displaylcd,
162
    .filllcd = filllcd,
163
    .displaylcd_native = displaylcd_native,
164
    .filllcd_native = filllcd_native,
165
    .displaylcd_sync = displaylcd_sync,
166
    .displaylcd_busy = displaylcd_busy,
167
    .lcd_get_width = lcd_get_width,
168
    .lcd_get_height = lcd_get_height,
169
    .lcd_get_bytes_per_pixel = lcd_get_bytes_per_pixel,
170
    .lcd_translate_color = lcd_translate_color,
171
    .renderchar_native = renderchar_native,
172
    .renderchar = renderchar,
173
    .rendertext = rendertext,
174
    .get_font_width = get_font_width,
175
    .get_font_height = get_font_height,
709 theseven 176
    .lcd_get_format = lcd_get_format,
623 theseven 177
#endif
178
#ifdef HAVE_BACKLIGHT
179
    .backlight_on = backlight_on,
180
    .backlight_set_fade = backlight_set_fade,
181
    .backlight_set_brightness = backlight_set_brightness,
182
#endif
183
#ifdef HAVE_BOOTFLASH
184
    .bootflash_filesize = bootflash_filesize,
185
    .bootflash_attributes = bootflash_attributes,
186
    .bootflash_getaddr = bootflash_getaddr,
187
    .bootflash_read = bootflash_read,
188
    .bootflash_readraw = bootflash_readraw,
189
    .bootflash_writeraw = bootflash_writeraw,
190
    .bootflash_getrawaddr = bootflash_getrawaddr,
191
    .bootflash_is_memmapped = bootflash_is_memmapped,
192
#endif
193
#ifdef HAVE_BUTTON
194
    .button_register_handler = button_register_handler,
195
    .button_unregister_handler = button_unregister_handler,
196
#endif
197
#ifdef HAVE_CLICKWHEEL
198
    .clickwheel_get_state = clickwheel_get_state,
199
#endif
200
#ifdef HAVE_HWKEYAES
201
    .hwkeyaes = hwkeyaes,
202
#endif
203
#ifdef HAVE_HMACSHA1
204
    .hmacsha1 = hmacsha1,
205
#endif
206
    .int_dma_set_handler = int_dma_set_handler,
207
    .thread_set_name = thread_set_name,
208
    .thread_set_priority = thread_set_priority,
209
    .malloc = malloc,
210
    .memalign = memalign,
211
    .realloc = realloc,
212
    .reownalloc = reownalloc,
213
    .free = free,
214
    .library_unload = library_unload,
215
    .get_library = get_library,
216
    .get_library_ext = get_library_ext,
217
    .release_library = release_library,
218
    .release_library_ext = release_library_ext,
219
#ifdef HAVE_STORAGE
220
    .fat_enable_flushing = fat_enable_flushing,
221
#endif
222
    .crc32 = crc32,
223
    .clockgate_get_state = clockgate_get_state,
224
    .malloc_walk = malloc_walk,
225
#ifdef HAVE_STORAGE
226
    .storage_sleep = storage_sleep,
227
    .storage_disk_is_active = storage_disk_is_active,
228
    .storage_soft_reset = storage_soft_reset,
229
#ifdef HAVE_STORAGE_FLUSH
230
    .storage_flush = storage_flush,
231
#endif
232
    .storage_spin = storage_spin,
233
    .storage_spindown = storage_spindown,
234
    .storage_last_disk_activity = storage_last_disk_activity,
235
    .storage_num_drives = storage_num_drives,
236
#endif
237
    .read_battery_voltage = read_battery_voltage,
238
    .read_battery_current = read_battery_current,
239
    .read_battery_mwh_design = read_battery_mwh_design,
240
    .read_battery_mwh_full = read_battery_mwh_full,
241
    .read_battery_mwh_current = read_battery_mwh_current,
242
    .read_battery_mw = read_battery_mw,
845 theseven 243
    .read_battery_state = read_battery_state,
244
    .read_input_voltage = read_input_voltage,
245
    .read_input_current = read_input_current,
623 theseven 246
    .read_input_mw = read_input_mw,
845 theseven 247
    .read_input_state = read_input_state,
625 theseven 248
    .tlsf_realign = tlsf_realign,
634 theseven 249
    .realign = realign,
250
#ifdef HAVE_STORAGE
763 user890104 251
    .fat_size_mv = fat_size_mv,
634 theseven 252
#endif
763 user890104 253
#ifdef HAVE_RTC
254
    .rtc_read_datetime = rtc_read_datetime,
255
    .rtc_write_datetime = rtc_write_datetime,
256
#endif
257
#ifdef HAVE_ACCELEROMETER
258
    .accel_read_force_vector = accel_read_force_vector,
259
#endif
817 theseven 260
#ifdef HAVE_STORAGE
814 theseven 261
    .reown_file = reown_file,
817 theseven 262
    .reown_dir = reown_dir,
263
#endif
623 theseven 264
};