Changes in uspace/srv/hid/input/port/niagara.c [bf9cb2f:593e023] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/port/niagara.c
rbf9cb2f r593e023 48 48 49 49 static int niagara_port_init(kbd_dev_t *); 50 static void niagara_port_yield(void);51 static void niagara_port_reclaim(void);52 50 static void niagara_port_write(uint8_t data); 53 51 54 52 kbd_port_ops_t niagara_port = { 55 53 .init = niagara_port_init, 56 .yield = niagara_port_yield,57 .reclaim = niagara_port_reclaim,58 54 .write = niagara_port_write 59 55 }; … … 79 75 static input_buffer_t input_buffer = (input_buffer_t) AS_AREA_ANY; 80 76 81 static volatile bool polling_disabled = false;82 77 static void niagara_thread_impl(void *arg); 83 78 … … 110 105 } 111 106 112 static void niagara_port_yield(void)113 {114 polling_disabled = true;115 }116 117 static void niagara_port_reclaim(void)118 {119 polling_disabled = false;120 }121 122 107 static void niagara_port_write(uint8_t data) 123 108 { … … 127 112 /** 128 113 * Called regularly by the polling thread. Reads codes of all the 129 * pressed keys from the buffer. 114 * pressed keys from the buffer. 130 115 */ 131 116 static void niagara_key_pressed(void) … … 149 134 150 135 while (1) { 151 if (polling_disabled == false) 152 niagara_key_pressed(); 136 niagara_key_pressed(); 153 137 usleep(POLL_INTERVAL); 154 138 }
Note:
See TracChangeset
for help on using the changeset viewer.