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