Changeset ac0cb2a in mainline for arch/mips32/src/drivers/arc.c
- Timestamp:
- 2005-12-08T00:29:53Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 944b15c
- Parents:
- 9d5e23c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/src/drivers/arc.c
r9d5e23c rac0cb2a 184 184 185 185 } 186 187 /** Try to get character, return character or -1 if not available */ 188 int arc_getchar(void) 189 { 190 char ch; 191 __u32 count; 192 long result; 193 194 if (arc_entry->getreadstatus(0)) 195 return -1; 196 result = arc_entry->read(0, &ch, 1, &count); 197 if (result || count!=1) { 198 cpu_halt(); 199 return -1; 200 } 201 if (ch == '\r') 202 return '\n'; 203 return ch; 204 }
Note:
See TracChangeset
for help on using the changeset viewer.