Changeset 66b430e in mainline for kernel/arch/ia64/src/drivers/ski.c
- Timestamp:
- 2009-05-07T19:52:24Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 046f342
- Parents:
- 386e276
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/drivers/ski.c
r386e276 r66b430e 45 45 #include <arch.h> 46 46 47 #define POLL_INTERVAL 10000 /* 10 ms */ 48 49 #define SKI_INIT_CONSOLE 20 50 #define SKI_GETCHAR 21 51 #define SKI_PUTCHAR 31 47 enum { 48 /** Interval between polling in microseconds */ 49 POLL_INTERVAL = 10000, /* 0.01 s */ 50 51 /** Max. number of characters to pull out at a time */ 52 POLL_LIMIT = 30, 53 54 SKI_INIT_CONSOLE = 20, 55 SKI_GETCHAR = 21, 56 SKI_PUTCHAR = 31 57 }; 52 58 53 59 static void ski_putchar(outdev_t *, const wchar_t, bool); … … 155 161 } 156 162 157 /** Ask keyboard if a key was pressed. */ 163 /** Ask keyboard if a key was pressed. 164 * 165 * If so, it will repeat and pull up to POLL_LIMIT characters. 166 */ 158 167 static void poll_keyboard(ski_instance_t *instance) 159 168 { 169 wchar_t ch; 170 int count; 171 160 172 if (kbd_disabled) 161 173 return; 162 163 wchar_t ch = ski_getchar(); 164 165 if (ch != 0) 174 175 count = POLL_LIMIT; 176 177 while (count > 0) { 178 ch = ski_getchar(); 179 180 if (ch == '\0') 181 break; 182 166 183 indev_push_character(instance->srlnin, ch); 184 --count; 185 } 167 186 } 168 187
Note:
See TracChangeset
for help on using the changeset viewer.