Changeset fbe058f in mainline for arch/mips32/src/drivers/arc.c
- Timestamp:
- 2005-12-12T17:40:29Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ed8b3a
- Parents:
- e07fe0c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/src/drivers/arc.c
re07fe0c rfbe058f 218 218 } 219 219 220 static char arc_read(chardev_t *dev) 221 { 222 char ch; 223 __u32 count; 224 long result; 225 226 result = arc_entry->read(0, &ch, 1, &count); 227 if (result || count!=1) { 228 printf("Error reading from ARC keyboard.\n"); 229 cpu_halt(); 230 } 231 if (ch == '\r') 232 return '\n'; 233 if (ch == 0x7f) 234 return '\b'; 235 return ch; 236 } 237 220 238 static void arc_write(chardev_t *dev, const char ch) 221 239 { … … 236 254 .resume = arc_enable, 237 255 .suspend = arc_disable, 238 .write = arc_write 256 .write = arc_write, 257 .read = arc_read 239 258 }; 240 259
Note:
See TracChangeset
for help on using the changeset viewer.