Changeset 93b84b3 in mainline for arch/mips32/src/drivers/serial.c
- Timestamp:
- 2005-12-12T16:30:07Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ebbdb8f
- Parents:
- af9a7c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/src/drivers/serial.c
raf9a7c5 r93b84b3 72 72 } 73 73 74 static chardev_operations_t serial_ops = { 75 .resume = serial_enable, 76 .suspend = serial_disable, 77 .write = serial_write 78 }; 74 /** Read character from serial port, wait until available */ 75 static char serial_do_read(chardev_t *dev) 76 { 77 serial_t *sd = (serial_t *)dev->data; 78 char ch; 79 80 while (!(SERIAL_READ_LSR(sd->port) & 1)) 81 ; 82 ch = SERIAL_READ(sd->port); 83 84 if (ch =='\r') 85 ch = '\n'; 86 return ch; 87 } 88 79 89 80 90 /** Process keyboard interrupt. Does not work in simics? */ … … 93 103 } 94 104 105 106 107 static chardev_operations_t serial_ops = { 108 .resume = serial_enable, 109 .suspend = serial_disable, 110 .write = serial_write, 111 .read = serial_do_read 112 }; 95 113 96 114 iroutine old_timer;
Note:
See TracChangeset
for help on using the changeset viewer.