This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://hackaday.com/2018/05/24/ask-hackaday-diy-top-octave-generator/ | |
// I thought it would be interesting to see if some kind of time/space trade off could be done with this problem. | |
// It compiles but you probably need an ATMEGA1284 or better to run since it needs a little over 8k ram | |
// It should run in constant time. | |
// Don't have anything to test this on. | |
void setup() { | |
// put your setup code here, to run once: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -523,7 +523,15 @@ HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path) | |
dev = new_hid_device(); | |
// Open a handle to the device | |
dev->device_handle = open_device(path, FALSE); | |
+ | |
+ // If the device is a system keyboard/mouse, Windows (2k+) takes exclusive | |
+ // read/write access. Feature reports can still be sent, but only if | |
+ // neither read nor write access is requested. | |
+ if (dev->device_handle == INVALID_HANDLE_VALUE && |