Changeset 118 for trunk/Softwares/Common/src/c
- Timestamp:
- May 21, 2009, 12:01:32 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Softwares/Common/src/c/func_io.c
r101 r118 1 1 #include "func_io.h" 2 2 #include "thread_info.h" 3 #include "cpu_info.h" 3 4 4 5 void tty (unsigned char data) 5 6 { 6 unsigned int * addr =(unsigned int*)(TTY_BASE + (get_ thread_id() << 4) + 0);7 unsigned int * addr =(unsigned int*)(TTY_BASE + (get_cpu_id() << 4) + 0); 7 8 8 9 *(addr) = data; … … 11 12 void print (char * data) 12 13 { 13 unsigned int * addr =(unsigned int*)(TTY_BASE + (get_ thread_id() << 4) + 0);14 unsigned int * addr =(unsigned int*)(TTY_BASE + (get_cpu_id() << 4) + 0); 14 15 15 16 while ((*data) != '\0') … … 22 23 void show (unsigned int data) 23 24 { 24 unsigned int * addr =(unsigned int*)(TTY_BASE + (get_ thread_id() << 4) + 8);25 unsigned int * addr =(unsigned int*)(TTY_BASE + (get_cpu_id() << 4) + 8); 25 26 26 27 *(addr) = data; … … 29 30 void quit (unsigned int data) 30 31 { 31 unsigned int * addr = (unsigned int*)(TTY_BASE + (get_ thread_id() << 4) + 4);32 unsigned int * addr = (unsigned int*)(TTY_BASE + (get_cpu_id() << 4) + 4); 32 33 33 34 *(addr) = data;
Note: See TracChangeset
for help on using the changeset viewer.