Changeset 8e33e1d in mainline for kernel/arch/sparc64/src/drivers/niagara.c
- Timestamp:
- 2010-01-29T17:15:32Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b86d436
- Parents:
- 86018c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/drivers/niagara.c
r86018c1 r8e33e1d 52 52 #include <genarch/srln/srln.h> 53 53 54 /* polling interval in miliseconds */ 54 55 #define POLL_INTERVAL 10000 55 56 57 /* device instance */ 56 58 static niagara_instance_t *instance = NULL; 57 59 … … 124 126 static void niagara_poll(niagara_instance_t *instance) 125 127 { 128 /* print any pending characters from the shared buffer to the console */ 126 129 while (output_buffer.read_ptr != output_buffer.write_ptr) { 127 130 do_putchar(output_buffer.data[output_buffer.read_ptr]); … … 132 135 uint64_t c; 133 136 137 /* read character from keyboard, send it to upper layers of HelenOS */ 134 138 if (__hypercall_fast_ret1(0, 0, 0, 0, 0, CONS_GETCHAR, &c) == EOK) { 135 139 if (!silent) { 140 /* kconsole active, send the character to kernel */ 136 141 indev_push_character(instance->srlnin, c); 137 142 } else { 143 /* kconsole inactive, send the character to uspace driver */ 138 144 input_buffer.data[input_buffer.write_ptr] = (char) c; 139 145 input_buffer.write_ptr = … … 141 147 } 142 148 } 143 144 149 } 145 150 … … 177 182 178 183 instance->srlnin = NULL; 179 sysinfo_set_item_val("fb.kind", NULL, 5); 184 185 output_buffer.read_ptr = 0; 186 output_buffer.write_ptr = 0; 187 input_buffer.write_ptr = 0; 188 input_buffer.read_ptr = 0; 180 189 181 190 /* … … 184 193 * buffers. 185 194 */ 186 output_buffer.read_ptr = 0; 187 output_buffer.write_ptr = 0; 188 input_buffer.write_ptr = 0; 189 input_buffer.read_ptr = 0; 195 196 sysinfo_set_item_val("fb.kind", NULL, 5); 190 197 191 198 sysinfo_set_item_val("niagara.outbuf.address", NULL,
Note:
See TracChangeset
for help on using the changeset viewer.