Changeset 9940ce0 in mainline for uspace/drv/char/ski-con/ski-con.c
- Timestamp:
- 2017-11-26T01:03:40Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5f4c41b2
- Parents:
- 96258fc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/ski-con/ski-con.c
r96258fc r9940ce0 43 43 44 44 #define SKI_GETCHAR 21 45 #define SKI_PUTCHAR 31 45 46 46 47 #define POLL_INTERVAL 10000 … … 57 58 .write = ski_con_write 58 59 }; 60 61 static void ski_con_putchar(ski_con_t *con, char ch); /* XXX */ 59 62 60 63 /** Add ski console device. */ … … 88 91 goto error; 89 92 } 93 94 ddf_fun_add_to_category(fun, "console"); 90 95 91 96 bound = true; … … 177 182 } 178 183 184 185 /** Display character on ski debug console 186 * 187 * Use SSC (Simulator System Call) to 188 * display character on debug console. 189 * 190 * @param c Character to be printed. 191 * 192 */ 179 193 static void ski_con_putchar(ski_con_t *con, char ch) 180 194 { 181 195 #ifdef UARCH_ia64 196 asm volatile ( 197 "mov r15 = %0\n" 198 "mov r32 = %1\n" /* r32 is in0 */ 199 "break 0x80000\n" /* modifies r8 */ 200 : 201 : "i" (SKI_PUTCHAR), "r" (ch) 202 : "r15", "in0", "r8" 203 ); 204 #else 205 (void) ch; 206 #endif 207 if (ch == '\n') 208 ski_con_putchar(con, '\r'); 182 209 } 183 210
Note:
See TracChangeset
for help on using the changeset viewer.