Changeset 204 for soft/giet_vm/libs
- Timestamp:
- Aug 14, 2012, 8:14:55 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/libs/stdio.c
r203 r204 21 21 #define SYSCALL_GCD_WRITE 0x06 22 22 #define SYSCALL_GCD_READ 0x07 23 #define SYSCALL_TTY_READ_IRQ 0x0A24 #define SYSCALL_TTY_WRITE_IRQ 0x0B25 23 #define SYSCALL_CTX_SWITCH 0x0D 26 24 #define SYSCALL_EXIT 0x0E … … 165 163 0,0); 166 164 } 167 168 ////////////////////////////////////////////////////////////////////////////////////169 // giet_tty_getc_no_irq()170 ////////////////////////////////////////////////////////////////////////////////////171 // This blocking function fetches a single ascii character from a terminal.172 // The terminal index must be defined in the task context in the boot phase.173 // It doesn't use the IRQ_GET interrupt, and the associated kernel buffer.174 // - Returns necessarily 0 when completed.175 ////////////////////////////////////////////////////////////////////////////////////176 unsigned int giet_tty_getc_no_irq(char *byte)177 {178 unsigned int ret = 0;179 while (ret == 0)180 {181 ret = sys_call(SYSCALL_TTY_READ,182 (unsigned int)byte,183 1,184 0,0);185 }186 return 0;187 }188 165 //////////////////////////////////////////////////////////////////////////////////// 189 166 // giet_tty_getc() … … 199 176 while (ret == 0) 200 177 { 201 ret = sys_call(SYSCALL_TTY_READ _IRQ,178 ret = sys_call(SYSCALL_TTY_READ, 202 179 (unsigned int)byte, 203 180 1, … … 231 208 { 232 209 do { 233 ret = sys_call(SYSCALL_TTY_READ _IRQ,210 ret = sys_call(SYSCALL_TTY_READ, 234 211 (unsigned int)(&byte), 235 212 1, … … 283 260 { 284 261 do { 285 ret = sys_call(SYSCALL_TTY_READ _IRQ,262 ret = sys_call(SYSCALL_TTY_READ, 286 263 (unsigned int)(&byte), 287 264 1,
Note: See TracChangeset
for help on using the changeset viewer.