Changeset d900699 in mainline for uspace/srv/hid/input/port/ski.c
- Timestamp:
- 2011-06-17T16:48:53Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f3a605be
- Parents:
- df8110d3 (diff), 98caf49 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/port/ski.c
rdf8110d3 rd900699 1 1 /* 2 2 * Copyright (c) 2005 Jakub Jermar 3 * Copyright (c) 20 09Jiri Svoboda3 * Copyright (c) 2011 Jiri Svoboda 4 4 * All rights reserved. 5 5 * … … 45 45 #include <bool.h> 46 46 47 static int ski_port_init(kbd_dev_t *); 48 static void ski_port_yield(void); 49 static void ski_port_reclaim(void); 50 static void ski_port_write(uint8_t data); 51 52 kbd_port_ops_t ski_port = { 53 .init = ski_port_init, 54 .yield = ski_port_yield, 55 .reclaim = ski_port_reclaim, 56 .write = ski_port_write 57 }; 58 59 static kbd_dev_t *kbd_dev; 60 47 61 #define SKI_GETCHAR 21 48 62 … … 55 69 56 70 /** Initialize Ski port driver. */ 57 int kbd_port_init(void)71 static int ski_port_init(kbd_dev_t *kdev) 58 72 { 59 73 thread_id_t tid; 60 74 int rc; 75 76 kbd_dev = kdev; 61 77 62 78 rc = thread_create(ski_thread_impl, NULL, "kbd_poll", &tid); … … 68 84 } 69 85 70 void kbd_port_yield(void)86 static void ski_port_yield(void) 71 87 { 72 88 polling_disabled = true; 73 89 } 74 90 75 void kbd_port_reclaim(void)91 static void ski_port_reclaim(void) 76 92 { 77 93 polling_disabled = false; 78 94 } 79 95 80 void kbd_port_write(uint8_t data)96 static void ski_port_write(uint8_t data) 81 97 { 82 98 (void) data; … … 94 110 if (c == 0) 95 111 break; 96 kbd_push_scancode( c);112 kbd_push_scancode(kbd_dev, c); 97 113 } 98 114 … … 112 128 uint64_t ch; 113 129 130 #ifdef UARCH_ia64 114 131 asm volatile ( 115 132 "mov r15 = %1\n" … … 121 138 : "r15", "r8" 122 139 ); 123 140 #else 141 ch = 0; 142 #endif 124 143 return (int32_t) ch; 125 144 }
Note:
See TracChangeset
for help on using the changeset viewer.