source: branches/v4/softs/giet_tsar/stdio.h @ 483

Last change on this file since 483 was 158, checked in by alain, 14 years ago

Introducing the three sub-directories in the softs directory:

  • giet_tsar
  • soft_filter_giet
  • soft_transpose_giet
File size: 4.8 KB
Line 
1/*********************************************************************************
2    fichier stdio.h
3    Written Alain greiner & Nicolas Pouillon
4    Date : 15/09/2009
5 *********************************************************************************/
6
7#ifndef _STDIO_H_
8#define _STDIO_H_
9
10#define SYSCALL_PROCID          0x00
11#define SYSCALL_PROCTIME        0x01
12#define SYSCALL_TTY_WRITE       0x02
13#define SYSCALL_TTY_READ        0x03
14#define SYSCALL_TIMER_WRITE     0x04
15#define SYSCALL_TIMER_READ      0x05
16#define SYSCALL_GCD_WRITE       0x06
17#define SYSCALL_GCD_READ        0x07
18#define SYSCALL_ICU_WRITE       0x08
19#define SYSCALL_ICU_READ        0x09
20#define SYSCALL_TTY_READ_IRQ    0x0A
21#define SYSCALL_TTY_WRITE_IRQ   0x0B
22#define SYSCALL_LOCKS_WRITE     0x0C
23#define SYSCALL_LOCKS_READ      0x0D
24#define SYSCALL_EXIT            0x0E
25#define SYSCALL_PROCNUMBER      0x0F
26
27#define SYSCALL_FB_SYNC_WRITE   0x10
28#define SYSCALL_FB_SYNC_READ    0x11
29#define SYSCALL_FB_WRITE        0x12
30#define SYSCALL_FB_READ         0x13
31#define SYSCALL_FB_COMPLETED    0x14
32#define SYSCALL_IOC_WRITE       0x15
33#define SYSCALL_IOC_READ        0x16
34#define SYSCALL_IOC_COMPLETED   0x17
35#define SYSCALL_BARRIER_INIT    0x18
36#define SYSCALL_BARRIER_WAIT    0x19
37
38typedef unsigned int size_t;
39
40/****************************************************************
41  this is a generic C function to implement all system calls.
42  - The first argument is the system call index.
43  - The four next arguments are the system call arguments.
44  They will be written in registers $2, $4, $5, $6, $7.
45 ****************************************************************/
46int sys_call(int call_no,
47        int arg_o,
48        int arg_1,
49        int arg_2,
50        int arg_3);
51
52/****************************************************************
53  These functions access the MIPS protected registers
54 ****************************************************************/
55int procid();
56int proctime();
57int procnumber();
58int exit();
59int rand();
60
61/****************************************************************
62  These functions access the MULTI_TTY peripheral
63 ****************************************************************/
64int tty_puts(char* string);
65int tty_putc(char byte);
66int tty_putw(int word);
67int tty_getc(char* byte);
68int tty_getc_irq(char* byte);
69int tty_gets_irq(char* buf, int bufsize);
70int tty_getw_irq(int* word);
71int tty_printf(char* format,...);
72
73/****************************************************************
74  These functions access the MULTI_TIMER peripheral
75 ****************************************************************/
76int timer_set_mode(int timer_index, int mode);
77int timer_set_period(int timer_index, int period);
78int timer_reset_irq(int timer_index);
79int timer_get_time(int timer_index, int* time);
80
81/****************************************************************
82  These functions access the GCD peripheral
83 ****************************************************************/
84int gcd_set_opa(int val);
85int gcd_set_opb(int val);
86int gcd_start();
87int gcd_get_result(int* val);
88int gcd_get_status(int* val);
89
90/****************************************************************
91  These functions access the ICU peripheral
92 ****************************************************************/
93int icu_set_mask(int val);
94int icu_clear_mask(int val);
95int icu_get_mask(int* buffer);
96int icu_get_irqs(int* buffer);
97int icu_get_index(int* buffer);
98
99/****************************************************************
100  These functions access the LOCKS peripheral
101 ****************************************************************/
102int lock_acquire(int lock_index);
103int lock_release(int lock_index);
104
105/****************************************************************
106  These functions access the BLOCK_DEVICE peripheral
107 ****************************************************************/
108int ioc_read(size_t lba, void* buffer, size_t count);
109int ioc_write(size_t lba, void* buffer, size_t count);
110int ioc_completed();
111
112/****************************************************************
113  These functions access the FRAME_BUFFER peripheral
114 ****************************************************************/
115int fb_read(size_t offset, void* buffer, size_t length);
116int fb_write(size_t offset, void* buffer, size_t length);
117int fb_completed();
118int fb_sync_read(size_t offset, void* buffer, size_t length);
119int fb_sync_write(size_t offset, void* buffer, size_t length);
120
121/****************************************************************
122  These functions access the synchronization barriers
123 ****************************************************************/
124int barrier_init(size_t index, size_t count);
125int barrier_wait(size_t index);
126
127#endif
128
129// Local Variables:
130// tab-width: 4;
131// c-basic-offset: 4;
132// c-file-offsets:((innamespace . 0)(inline-open . 0));
133// indent-tabs-mode: nil;
134// End:
135//
136// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
137
Note: See TracBrowser for help on using the repository browser.