Changeset 8e33e1d in mainline
- Timestamp:
- 2010-01-29T17:15:32Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b86d436
- Parents:
- 86018c1
- Files:
-
- 6 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, -
uspace/app/init/init.c
r86018c1 r8e33e1d 263 263 } 264 264 265 //spawn("/srv/fhc");266 //spawn("/srv/obio");267 //srv_start("/srv/i8042");268 //srv_start("/srv/c_mouse");265 spawn("/srv/fhc"); 266 spawn("/srv/obio"); 267 srv_start("/srv/i8042"); 268 srv_start("/srv/c_mouse"); 269 269 270 270 spawn("/srv/fb"); -
uspace/lib/libc/arch/sparc64/src/thread_entry.s
r86018c1 r8e33e1d 39 39 # 40 40 41 # MH42 41 #save %sp, -176, %sp 43 42 #flushw -
uspace/lib/libc/generic/thread.c
r86018c1 r8e33e1d 41 41 #include <string.h> 42 42 #include <async.h> 43 #include <stdio.h>44 43 45 44 #ifndef THREAD_INITIAL_STACK_PAGES_NO … … 63 62 __tcb_set(f->tcb); 64 63 65 // MH66 printf("uarg: %lx\n", uarg);67 64 uarg->uspace_thread_function(uarg->uspace_thread_arg); 68 65 /* XXX: we cannot free the userspace stack while running on it */ -
uspace/srv/hid/kbd/generic/kbd.c
r86018c1 r8e33e1d 219 219 cir_service = SERVICE_OBIO; 220 220 221 /*222 221 if (cir_service) { 223 222 while (cir_phone < 0) { … … 226 225 } 227 226 } 228 */229 printf("KBD driver!!!\n");230 227 231 228 /* Initialize port driver. */ -
uspace/srv/hid/kbd/port/niagara.c
r86018c1 r8e33e1d 67 67 *input_buffer_t; 68 68 69 /* virtual address of the shared buffer */ 69 70 input_buffer_t input_buffer; 70 71 … … 73 74 74 75 /** 75 * Initializes the SGCNdriver.76 * Maps the physical memory (SRAM)and creates the polling thread.76 * Initializes the Niagara driver. 77 * Maps the shared buffer and creates the polling thread. 77 78 */ 78 79 int kbd_port_init(void) … … 117 118 118 119 /** 119 * Handler of the "key pressed" event. Reads codes of all the pressed keys from120 * the buffer.120 * Called regularly by the polling thread. Reads codes of all the 121 * pressed keys from the buffer. 121 122 */ 122 123 static void niagara_key_pressed(void)
Note:
See TracChangeset
for help on using the changeset viewer.