Mercurial > louis > kiibohd-controller
comparison Output/pjrcUSB/arm/usb_mouse.c @ 439:68e19d7c953e
Adding proper remote wake-up support
- Maintains a sleep state variable (may be able to use as a signal in the future)
- On the first keypress, hold the RESUME signal for 10 ms (spec says between 1 and 15 ms)
- Removed some messages that were affecting sleep state
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Tue, 17 May 2016 01:18:14 -0700 |
parents | d3cef419c849 |
children | 45feb80a2ad1 |
comparison
equal
deleted
inserted
replaced
438:f10c2dad7f55 | 439:68e19d7c953e |
---|---|
161 | 161 |
162 if ( ++wait_count > TX_TIMEOUT || transmit_previous_timeout ) | 162 if ( ++wait_count > TX_TIMEOUT || transmit_previous_timeout ) |
163 { | 163 { |
164 transmit_previous_timeout = 1; | 164 transmit_previous_timeout = 1; |
165 warn_print("USB Transmit Timeout..."); | 165 warn_print("USB Transmit Timeout..."); |
166 | |
167 // Clear status and state | |
168 USBMouse_Buttons = 0; | |
169 USBMouse_Relative_x = 0; | |
170 USBMouse_Relative_y = 0; | |
171 USBMouse_Changed = 0; | |
166 return; | 172 return; |
167 } | 173 } |
168 yield(); | 174 yield(); |
169 } | 175 } |
170 | 176 |