Changeset 15d0046 in mainline for uspace/srv/hid/input/port/ski.c
- Timestamp:
- 2014-09-12T13:22:33Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9b20126
- Parents:
- 8db09e4 (diff), 105d8d6 (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 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/port/ski.c
r8db09e4 r15d0046 45 45 46 46 static int ski_port_init(kbd_dev_t *); 47 static void ski_port_yield(void);48 static void ski_port_reclaim(void);49 47 static void ski_port_write(uint8_t data); 50 48 51 49 kbd_port_ops_t ski_port = { 52 50 .init = ski_port_init, 53 .yield = ski_port_yield,54 .reclaim = ski_port_reclaim,55 51 .write = ski_port_write 56 52 }; … … 64 60 static void ski_thread_impl(void *arg); 65 61 static int32_t ski_getchar(void); 66 67 static volatile bool polling_disabled = false;68 62 69 63 /** Initialize Ski port driver. */ … … 83 77 } 84 78 85 static void ski_port_yield(void)86 {87 polling_disabled = true;88 }89 90 static void ski_port_reclaim(void)91 {92 polling_disabled = false;93 }94 95 79 static void ski_port_write(uint8_t data) 96 80 { … … 105 89 106 90 while (1) { 107 while ( polling_disabled == false) {91 while (1) { 108 92 c = ski_getchar(); 109 93 if (c == 0) 110 94 break; 95 111 96 kbd_push_data(kbd_dev, c); 112 97 }
Note:
See TracChangeset
for help on using the changeset viewer.