Subversion Repositories freemyipod

Rev

Go to most recent revision | 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
#include "panic.h"
111 theseven 27
#include "console.h"
28
#include "dir.h"
29
#include "file.h"
30
#include "format.h"
31
#include "lcdconsole.h"
32
#include "storage.h"
33
#include "shutdown.h"
34
#include "thread.h"
35
#include "ucl.h"
36
#include "bootflash.h"
37
#include "timer.h"
38
#include "i2c.h"
39
#include "interrupt.h"
40
#include "lcd.h"
41
#include "mmu.h"
42
#include "nand.h"
43
#include "power.h"
44
#include "execimage.h"
117 theseven 45
#include "backlight.h"
118 theseven 46
#include "syscall.h"
111 theseven 47
#include "libc/include/string.h"
48
#include "libc/include/stdlib.h"
49
#include "libc/include/stdio.h"
99 theseven 50
 
51
 
52
struct embios_syscall_table syscall_table ICONST_ATTR =
53
{
100 theseven 54
    .table_version = EMBIOS_API_VERSION,
55
    .table_minversion = EMBIOS_MIN_API_VERSION,
99 theseven 56
	.panic = panic,
111 theseven 57
    .panicf = panicf,
58
    .cprintf = cprintf,
59
    .cvprintf = cvprintf,
60
    .cputc = cputc,
61
    .cputs = cputs,
62
    .cwrite = cwrite,
63
    .cflush = cflush,
64
    .cgetc = cgetc,
65
    .cread = cread,
66
    .creada = creada,
67
    .format = format,
68
    .vuprintf = vuprintf,
69
    .shutdown = shutdown,
70
    .strcasecmp = strcasecmp,
71
    .strncasecmp = strncasecmp,
72
    .strcasestr = strcasestr,
73
    .strlcat = strlcat,
74
    .strlcpy = strlcpy,
75
    .mutex_init = mutex_init,
76
    .mutex_lock = mutex_lock,
77
    .mutex_unlock = mutex_unlock,
78
    .wakeup_init = wakeup_init,
79
    .wakeup_wait = wakeup_wait,
80
    .wakeup_signal = wakeup_signal,
81
    .sleep = sleep,
82
    .thread_create = thread_create,
83
    .thread_exit = thread_exit,
84
    .thread_suspend = thread_suspend,
85
    .thread_resume = thread_resume,
86
    .thread_terminate = thread_terminate,
87
    .__errno = __errno,
88
    .ucl_decompress = ucl_decompress,
89
    .read_native_timer = read_native_timer,
90
    .read_usec_timer = read_usec_timer,
91
    .i2c_send = i2c_send,
92
    .i2c_recv = i2c_recv,
93
    .i2c_sendbyte = i2c_sendbyte,
94
    .i2c_recvbyte = i2c_recvbyte,
95
    .interrupt_enable = interrupt_enable,
96
    .interrupt_set_handler = interrupt_set_handler,
97
    .int_timer_set_handler = int_timer_set_handler,
98
    .clean_dcache = clean_dcache,
99
    .invalidate_dcache = invalidate_dcache,
100
    .invalidate_icache = invalidate_icache,
101
    .power_off = power_off,
102
    .charging_state = charging_state,
103
    .atoi = atoi,
104
    .memchr = memchr,
105
    .memcmp = memcmp,
106
    .memcpy = memcpy,
107
    .memmove = memmove,
108
    .memset = memset,
109
    .qsort = qsort,
110
    .srand = srand,
111
    .rand = rand,
112
    .snprintf = snprintf,
113
    .vsnprintf = vsnprintf,
114
    .sscanf = sscanf,
115
    .strcat = strcat,
116
    .strchr = strchr,
117
    .strcmp = strcmp,
118
    .strcpy = strcpy,
119
    .strlen = strlen,
120
    .strncmp = strncmp,
121
    .strrchr = strrchr,
122
    .strstr = strstr,
123
    .strtok_r = strtok_r,
118 theseven 124
    .get_platform_id = get_platform_id,
111 theseven 125
#ifdef HAVE_STORAGE
126
    .opendir = opendir,
127
    .closedir = closedir,
128
    .readdir = readdir,
129
    .mkdir = mkdir,
130
    .rmdir = rmdir,
131
    .renderbmp = renderbmp,
132
    .renderchar = renderchar,
133
    .execimage = execimage,
134
    .ftruncate = ftruncate,
135
    .fsync = fsync,
136
    .close = close,
137
    .write = write,
138
    .read = read,
139
    .lseek = lseek,
140
    .remove = remove,
141
    .file_open = file_open,
142
    .rename = rename,
143
    .file_creat = file_creat,
144
    .filesize = filesize,
116 theseven 145
    .storage_read_sectors_md = storage_read_sectors_md,
146
    .storage_write_sectors_md = storage_write_sectors_md,
111 theseven 147
#endif
148
#ifdef HAVE_LCD
149
    .lcdconsole_putc_noblit = lcdconsole_putc_noblit,
150
    .lcdconsole_puts_noblit = lcdconsole_puts_noblit,
151
    .lcdconsole_write_noblit = lcdconsole_write_noblit,
152
    .lcdconsole_update = lcdconsole_update,
153
    .lcdconsole_putc = lcdconsole_putc,
154
    .lcdconsole_puts = lcdconsole_puts,
155
    .lcdconsole_write = lcdconsole_write,
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,
111 theseven 163
#endif
117 theseven 164
#ifdef HAVE_BACKLIGHT
165
    .backlight_on = backlight_on,
166
    .backlight_set_fade = backlight_set_fade,
167
    .backlight_set_brightness = backlight_set_brightness,
168
#endif
111 theseven 169
#ifdef HAVE_BOOTFLASH
170
    .bootflash_filesize = bootflash_filesize,
171
    .bootflash_attributes = bootflash_attributes,
172
    .bootflash_getaddr = bootflash_getaddr,
173
    .bootflash_read = bootflash_read,
174
    .bootflash_readraw = bootflash_readraw,
175
    .bootflash_writeraw = bootflash_writeraw,
176
    .bootflash_getrawaddr = bootflash_getrawaddr,
177
#endif
178
#ifdef HAVE_NAND
179
    .nand_read_page = nand_read_page,
180
    .nand_block_erase = nand_block_erase,
181
    .nand_read_page_fast = nand_read_page_fast,
182
    .nand_write_page = nand_write_page,
183
    .nand_write_page_start = nand_write_page_start,
184
    .nand_write_page_collect = nand_write_page_collect,
116 theseven 185
    .nand_get_device_type = nand_get_device_type,
111 theseven 186
#endif
99 theseven 187
};