Archived
1
0
Commit Graph

100 Commits

Author SHA1 Message Date
Jacob Alexander
22a24e967b Force 6KRO/Boot mode always if defined by KLL
- usbProtocol = 0;
2016-08-18 22:49:51 -07:00
Jacob Alexander
9309889fad Removing NKRO Mode requirement for System Control and Consumer Control Keys (Media Keys)
- In general this shouldn't cause any issues
- BIOSs should ignore
- OSs should happily use

Still, this masks the EHCI hand-off that Windows and Linux are starting to do.
A better solution is needed to force devices to re-negotiate their mode.
2016-07-28 19:55:36 -07:00
Jacob Alexander
5162980791 Updating bcdDevice and iSerial fields in USB descriptors
- Use commit number as the basis for bcdDevice field (maximum is 2^16)
- Change iSerial from commit date to chip Unique ID
- Update both Firmware and Bootloader to use the same scheme (bcdDevice and iSerial)
- Cleanup of Bootloader code
- Split out build info CMake commands to a new file
2016-07-23 16:16:16 -07:00
Jacob Alexander
c71e67a29a Preparing controller repo for automated travis-ci
- Added clang (i.e. multi-compiler) support to convenience build scripts
- Updated README
- Added Bootloader build scripts for the two main versions currently used
- Added uartOut and usbMuxUart build scripts (these tend to suffer from build rot the most as they're only used in debugging)
- Attempt to get clang support for the Bootloader
  * clang is missing compiler extensions, so this may require a large re-write to get working
2016-07-17 17:27:05 -07:00
Jacob Alexander
358d480ea9 Major USB update, fixes most (if not all) known issues
USB - General
- Refactored descriptors
- Enabled/Disable USB endpoints
- Added debug flags for special features
- Code cleanup
- Interface count calculation based off of enabled endpoints
- Delayed wTotalLength calculation to simplify descriptor offsets
- Re-ordered endpoints and interfaces
- Added more debug output
- Added usbInitTime to show how long keyboard initialization took
  (Useful when debugging bad init sequences)
- Added function for usb_resume() which takes care of the resume sequence
  * Resume is now only called if packets are starting to timeout

USB - Special Options
- Added enableDeviceRestartOnUSBTimeout
  * A last resort hammer for bad USB Chipsets/OSs, don't use if you can help it
  * Disabled
- Added enableUSBResume
  * Enables host resume wake-up signalling, required to wake a computer from sleep
  * Enabled
- Added enableUSBLowPowerNegotiation
  * Enables power negotiation hack
  * Required to use firmware with an IPad and other hard-limit low-power USB hosts
  * Hasn't been tested with the recent changes
  * Disabled
- Added enableUSBSuspend
  * Enables power down events on host USB bus suspend
  * Enabled

USB - Keyboard
- Attempted to cleanup HID SET_REPORT
  * Works much better
  * Still has an issue under Linux which generates *a lot* of NAKs (initializes quickly regardless)
    + Not present on other keyboards
    + SETUP -> OUT -> IN : This sequence is the problem
    + Specifically during the OUT phase
- Enabled

USB - CDC Virtual Serial Port
- Code cleanup
- Added convenience struct USBCDCLineCoding for easier debugging
- Attempted to cleanup CDC_SET_LING_CODING
  * Works much better
  * Still has an issue under Linux which generates *a lot* of NAKs (initializes quickly regardless)
    + SETUP -> OUT -> IN : This sequence is the problem
    + Specifically during the OUT phase
    + Likely the same issues as HID SET_REPORT
- Enabled

USB - Mouse
- Enabled

USB - Joystick
- Disabled

USB - RawIO
- Initial code, API not used yet
- Disabled

DFU
- Updated load script, now faster
2016-05-31 00:40:10 -07:00
Jacob Alexander
92b3b5081b Adding auto-restart support whenever USB gets into an odd state
- Somewhat aggresive, may cause restarts if the keyboard/OS hasn't fully intialized the keyboard
- Added GET_IDLE handling and correct usage of SET_IDLE
- Initial implementation of idle send, commented out as it causes issues on Mac OSX for sleeping
  (keyboard has been working without it)
- MacOSX seems to have some sort of data corruption on the USB link, not sure why (other OSs have no issues)
- Cleaned up some code
- Added a longer sleep after the resume sequence to prevent possible issues sending keys too soon
  (may need to be increased more)

Ipad support now seems flaky, though Mac, Windows seems solid.
Init sequence on Linux seems slow, even though there are no errors.
2016-05-27 01:26:04 -07:00
José Luis Salvador Rufo
0174e1e6ab
Adding toggleKbdProtocol capability 2016-05-26 13:06:12 +02:00
Jacob Alexander
ba58010a75 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
2016-05-17 01:18:14 -07:00
Jacob Alexander
8fbc8d535f Adding missing GET_PROTOCOL handling
- Odd that this went unnoticed for sooooo long
- Fixes Mac OSX issue where keyboard freezes/hangs on a reboot
- Also adding missing code for usbMuxUart
2016-05-16 23:25:08 -07:00
Jacob Alexander
18aef02a1f Adding relative movement mouse key support
- Still very basic (lots of room for improvement)
- Capability format will likely change at some point
- 16 bit movement control, however repeat rate limits usability (will need KLL 0.4 to make better)
2016-03-21 23:05:41 -07:00
Jacob Alexander
3c9a97d51a Adding basic mouse button support
- Full Mouse support will have to wait for KLL 0.6
  * This will include dynamic HID descriptor generation for many wheels and axis depending on the KLL needs
- HID descriptor is currently limited to 8 buttons
- Technically mouse movement also works (tested by accident), but it's disable for now (needs some API thought)

- Adding additional udev rules
- Added KRO mode default define
2016-03-21 00:51:51 -07:00
Jacob Alexander
46765e85c5 Adding dynamic USB power support
- Each scan module now has a current change callback which passes the available current as a parameter
- No longer attempts to use the max 500 mA immediately, starts with 100 mA then goes to 500 mA after enumeration
- If enumeration fails due to bMaxPower of 500 mA, then attempt again at 100 mA (might also be possible to go even lower to 20 mA in certain cases)
- Now working with the Apple Ipad (no over-power messages)
- Fixed Wake-up behaviour on Apple Ipad (and likely other iOS devices)
- More effecient set_feature/clear_feature handling (device handler)
- Initial power handling via Interconnect (still needs work to get it more dynamic)
2016-02-21 19:56:52 -08:00
Jacob Alexander
ea82a2762b Typo from the last commit. 2015-10-17 21:03:07 -07:00
Jacob Alexander
343104297d Adding support for kll 0.3d
- Requires kll compiler update
- Includes descriptor update to handle new consumer control codes
2015-10-17 15:09:03 -07:00
Jacob Alexander
7e68e81f47 Adding basic remote capabilities + UART Rx DMA buffers
- Rx buffers weren't fast enough, had to use DMA :D
- Basic LCD remote capabilities are working, single node
- Multi-node broadcast seems to have a bug still
- DMA ring buffer allowed for significant processing simplification
  * There is an overrun risk, but the buffer is large and generally there isn't too much data being sent (just very quickly)
- Split out LCD layer stack capability into itself and an "exact" version used for updating remote nodes
2015-10-15 00:21:54 -07:00
Jacob Alexander
59d425ccfe Adding jump to bootloader key
- Now enabled by default
- Added protection around remote jumps
2015-10-11 22:07:11 -07:00
Jacob Alexander
f4da2560c4 Fixing long-standing SET_REPORT bug
- Implementation was completely wrong (has never worked properly)
- Now working in both NKRO and 6KRO modes
- Added more debugging code if things go wrong again
2015-10-09 18:20:37 -07:00
Jacob Alexander
c90bafd5c4 Cleaning up CLEAR_FEATURE (endpoint)
- Reverting old fix that no longer seems relevant after numerous recent USB fixes
2015-10-06 00:24:04 -07:00
Jacob Alexander
3f83274f86 Prep for mouse support 2015-09-20 18:47:10 -07:00
Jacob Alexander
9c52fb32fa Fixing default ErgoDox layout and adding FlashMode button
- Adds proper flashMode support for all keyboards and microcontrollers (usb and serial)
- flashModeEnabled must be set to 1 otherwise it will only show an error
  * This is on purpose (somewhat dangerous feature as it allows remote flashing)
- Capability cleanup
2015-08-21 19:43:45 -07:00
Jacob Alexander
1cbc175551 Forgot to add these files in an earlier commit 2015-08-21 18:26:46 -07:00
Jacob Alexander
20b62afb9a FIxing Media Keys and general USB compatibilty
- Media keys tested working on Linux/Windows/Mac (use Consumer control)
- Fixed enumeration delays
- Fixed virtual serial port configuration issues
- Fixed GET_REPORT and SET_REPORT
- Added intial descriptors and endpoints for Mouse and Joystick devices
- Split out the consumer and system control endpoint
- Added more fault debugging messages
- Added interface names to endpoints (visible in Windows Device Manager)
- Added KLL define for keyboard locale
2015-08-19 00:01:15 -07:00
Jacob Alexander
55d03f448e UARTConnect enumeration working!
- Fixed cli reflash mode set
- Cleaned up debugging code
- 4 500 000 baud seems to be reliable
- Fixed master selection (assumes slave node unless USB enumerates)
2015-07-18 18:53:21 -07:00
Jacob Alexander
6c67bc77bc Revert "Merge pull request #27 from smasher816/wakeup-devel"
This reverts commit 622ea5d85f, reversing
changes made to c21439cb48.
2015-06-23 08:00:16 -07:00
Jacob Alexander
5f262ea4b6 Code cleanup
- Changing header file ifndef define to pragma once's
- Removed duplicate output_com.h's
2015-06-14 14:33:40 -07:00
Jacob Alexander
03f60df94d mk20dx256vlh7 working!
- Interrupt vector table position fix (affected everything in the firmware)
- Added fault debug messages
- Fixed usbMuxUart
2015-06-14 14:33:40 -07:00
Jacob Alexander
1acbc97e98 Adding initial dfu-upload code and debugging for Bootloader. 2015-06-14 14:33:39 -07:00
Jacob Alexander
622ea5d85f Merge pull request #27 from smasher816/wakeup-devel
Inital Remote Wakeup Support
2015-06-12 18:31:55 -07:00
Jacob Alexander
c21439cb48 Fixing none parameter. 2015-05-13 21:58:43 -07:00
Jacob Alexander
fd25312f4f Adding None capability.
- Required for 0.3b update of the KLL compiler.
2015-05-02 14:29:27 -07:00
Rowan Decker
dc562cdcb3 Inital Remote Wakeup Support
Not working yet...
2015-03-08 22:35:55 -07:00
Rowan Decker
68f357dceb Fix whitespace pt2
Forgot to pull some files. Fixed those up too.
2015-03-08 21:07:59 -07:00
Rowan Decker
2922fce0f7 Merge remote-tracking branch 'upstream/master' 2015-03-08 20:17:39 -07:00
Rowan Decker
1392571bd7 Fix whitespace
Use a consistent standard - Tabs in front for indenting, spaces after for anything else. This way everything stays nice and lined up while also letting users change there prefered indent level. Most of the new files from Haata where already in this format.
2015-03-08 18:40:01 -07:00
Jacob Alexander
55346314b8 Adding additional case statements for SET_FEATURE and CLEAR_FEATURE
- Ignoring (which is done by default)
- Device, Interface and Endpoint variants
2015-03-07 00:50:42 -08:00
Jacob Alexander
b2dfd63d4b Fixing Mac OSX freeze on wake-up bug
- CLEAR_FEATURE unset is currently causing the keyboarod to freeze
- Though not ideal, it seems harmless to ignore this USB Control Packet
- Tested working on a Mac Mini (Yosemite)
2015-03-07 00:34:14 -08:00
Jacob Alexander
733201d39b Fixing compiler errors for usbMuxUart Output module
- Removing (currently) redundant usbMuxUart capabilities.kll file
- Issues were due to the recent AddModule cmake function addition
2015-03-06 23:37:09 -08:00
Jacob Alexander
0ec5e6d9c2 Adding missing NL's for Cons and Sys Control debug 2015-02-23 22:25:46 -08:00
Victor Luft
595319c511 clear buffers on Consumer/System Control release
fixes #15
2015-02-23 18:29:01 -08:00
Jacob Alexander
7597fea053 Adding outputDebug command
- Displays all of the bytes sent via USB
- Different display mode for NKRO and Boot modes
2015-02-21 13:06:28 -08:00
Jacob Alexander
9e3d3aaca4 Initial code for USB cable detection
- Currently actual detection commented out due to issues
2015-02-09 13:21:23 -08:00
Jacob Alexander
1e9f55a0bf Updating setup.cmake files to use Module hierarchy implicitly
- Added AddModule CMake function which simplifies specifying module requirements
2015-01-25 17:55:28 -08:00
Jacob Alexander
b2539041ee More preparation for mk20dx256vlh7 2015-01-10 19:55:28 -08:00
Jacob Alexander
8e54672121 Fixing warning messages found using clang. 2014-12-31 19:43:10 -08:00
Jacob Alexander
f5a1e1bcf5 Preparing for mk20dx256vlh7
- Not ready yet
- Will require some more changes to Lib/mk20dx.c
2014-12-31 17:13:44 -08:00
Jacob Alexander
504058bdb1 Fixing sequences (after NKRO HID descriptor re-design). 2014-11-12 23:33:28 -08:00
Jacob Alexander
c939059c7f Fixing NKRO on Windows 8.1
- Had to re-write descriptor to support Windows 8.1 while still working with Mac OSX
- NKRO keyboard is now more bandwidth intensive as all the keys must be updated at the same time
  (due to 8.1 bug in the HID spec)
2014-11-12 23:04:50 -08:00
Jacob Alexander
774ccc7fe9 Code formatting cleanup. 2014-11-10 23:42:39 -08:00
Jacob Alexander
a7b1d94465 Fixing NKRO modifier bug
- Modifier byte was being cleared after each send (needed for Boot Mode only)
2014-11-10 22:50:54 -08:00
Jacob Alexander
11fb8bd77d Fixing Linux NKRO Delete bug
- Fixed descriptor to not include USB Code 156 (Clear)
- This USB Code affects repeating Delete
2014-11-10 21:02:25 -08:00