Changeset f1fae414 in mainline for uspace/srv/hid/input/port/sgcn.c
- Timestamp:
- 2011-06-22T01:34:53Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d7e82c1, cac458f
- Parents:
- 72ec8cc (diff), bf172825 (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/sgcn.c
r72ec8cc rf1fae414 1 1 /* 2 2 * Copyright (c) 2008 Pavel Rimsky 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 46 47 #include <errno.h> 47 48 49 static int sgcn_port_init(kbd_dev_t *); 50 static void sgcn_port_yield(void); 51 static void sgcn_port_reclaim(void); 52 static void sgcn_port_write(uint8_t data); 53 54 kbd_port_ops_t sgcn_port = { 55 .init = sgcn_port_init, 56 .yield = sgcn_port_yield, 57 .reclaim = sgcn_port_reclaim, 58 .write = sgcn_port_write 59 }; 60 61 static kbd_dev_t *kbd_dev; 62 48 63 #define POLL_INTERVAL 10000 49 64 … … 101 116 * Maps the physical memory (SRAM) and creates the polling thread. 102 117 */ 103 int kbd_port_init(void) 104 { 118 static int sgcn_port_init(kbd_dev_t *kdev) 119 { 120 kbd_dev = kdev; 121 105 122 sysarg_t sram_paddr; 106 123 if (sysinfo_get_value("sram.address.physical", &sram_paddr) != EOK) … … 130 147 } 131 148 132 void kbd_port_yield(void)149 static void sgcn_port_yield(void) 133 150 { 134 151 polling_disabled = true; 135 152 } 136 153 137 void kbd_port_reclaim(void)154 static void sgcn_port_reclaim(void) 138 155 { 139 156 polling_disabled = false; 140 157 } 141 158 142 void kbd_port_write(uint8_t data)159 static void sgcn_port_write(uint8_t data) 143 160 { 144 161 (void) data; … … 166 183 *in_rdptr_ptr = (((*in_rdptr_ptr) - begin + 1) % size) + begin; 167 184 buf_ptr = (volatile char *) 168 169 kbd_push_ scancode(c);185 SGCN_BUFFER(char, SGCN_BUFFER_HEADER->in_rdptr); 186 kbd_push_data(kbd_dev, c); 170 187 } 171 188 }
Note:
See TracChangeset
for help on using the changeset viewer.