Jacob Alexander [Wed, 6 Jul 2016 16:00:57 +0000 (09:00 -0700)]
Moving defaultMap.kll to scancode_map.kll (less confusing)
- Changing default name from defaultMap.kll to scancode_map.kll
- Old name of defaultMap.kll will still work (and is the final fallback)
- Updated all the main projects to use the new name
- Updated BETKB (not entirely finished, but mostly complete)
- Added sub-use of interconnect scancode cache for converters
- Added infinity_led.bash
Jacob Alexander [Tue, 31 May 2016 07:19:45 +0000 (00:19 -0700)]
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
Jacob Alexander [Fri, 27 May 2016 08:21:57 +0000 (01:21 -0700)]
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.
Jacob Alexander [Tue, 17 May 2016 08:18:14 +0000 (01:18 -0700)]
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
Jacob Alexander [Tue, 17 May 2016 06:25:08 +0000 (23:25 -0700)]
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
Jacob Alexander [Tue, 22 Mar 2016 05:23:57 +0000 (22:23 -0700)]
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)
Jacob Alexander [Mon, 21 Mar 2016 07:43:19 +0000 (00:43 -0700)]
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)
Jacob Alexander [Fri, 4 Mar 2016 08:23:48 +0000 (00:23 -0800)]
Fixing clang compilation and supporting clang-tidy
- clang.c includes necessary functions to make clang compiler work (tested on teensy 3.1)
- Added support code to generate a compile_commands.json for clang-tidy
* Updates the symlink whenever cmake or make is called (Unix OSs only)
Jacob Alexander [Mon, 22 Feb 2016 03:56:52 +0000 (19:56 -0800)]
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)
Ryan S. Brown [Sun, 7 Feb 2016 02:06:08 +0000 (21:06 -0500)]
Ensure directories can only be made with printable characters
In situations where `ls` colors directories incorrectly, the `$module`
variable contains unprintable characters. This causes directories to be
impossible to `cd` into normally, and is generally a pain.
Joshua Flanagan [Tue, 10 Nov 2015 16:32:06 +0000 (10:32 -0600)]
Stop requiring editing of example scripts
The example scripts include hardcoded values that
do not work for everyone. Instead of requiring the
files to be edited (and dirtying the git tree),
allow them to take command-line arguments.
Also adds better guidance for Mac OSX virtual
serial ports.
Mason Donahue [Sun, 18 Oct 2015 19:40:18 +0000 (14:40 -0500)]
Exit quickly when cmake or make fail
The compilation process itself doesn't take very long, but it's weird to
let it continue trying to build when we've encountered an error worthy
of changing cmake/make's return codes. This gives clear indication of a
failed build as the last line of the script's output.
Jacob Alexander [Fri, 16 Oct 2015 17:02:01 +0000 (10:02 -0700)]
Adding remote capability LED control
- Works for all nodes in chain
- Synchronized to 30 ms update rate (required for ISSI chip)
* Interconnect cannot handle full update speed from Scan module
* Though it should be able to handle quite a bit more than 30 ms updates
- 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
Jacob Alexander [Sat, 10 Oct 2015 05:28:31 +0000 (22:28 -0700)]
Adding basic ISSI led brightness control capabilities
- 6 modes
* Single led: decrease, increase, set
* All leds: decrease, increase, set
- Currently update speed limited to once every 30 ms
* Likely an I2C driver or ISSI limitation preventing even faster updates
Jacob Alexander [Sat, 10 Oct 2015 01:18:07 +0000 (18:18 -0700)]
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
Jacob Alexander [Sat, 22 Aug 2015 02:43:45 +0000 (19:43 -0700)]
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
Jacob Alexander [Wed, 19 Aug 2015 07:01:15 +0000 (00:01 -0700)]
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
Jacob Alexander [Sun, 16 Aug 2015 04:53:59 +0000 (21:53 -0700)]
Working support for Interconnect
- Supports up to 255 slave nodes (you'll run into ScanCode limitations before then)
- Requires most recent kll compiler update
- Additional debugging output and stats counters
- Noise and parity checking
- Fixed TxFIFO issue when sending buffers larger than the FIFO
- Cleaned up defaultMap.kll
- Added ScanCode caching (reduces interconnect traffic significantly)
- Interconnect module code is conditionally compiled into PartialMap module if required
Jacob Alexander [Sun, 9 Aug 2015 07:20:41 +0000 (00:20 -0700)]
Initial UARTConnect scancode support
- Still some issues
- Will require some changes to MatrixARM and PartialMap
* Currently state information is passed around too frequently
* Needs to be reduced to state changes only