summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/lufa/lufa.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-22Always read two bytes from the endpoint if we have two bytes to readfauxpark1-5/+1
When this if statement is false, it will cause the report ID to be read as the LED state. We already know there are two bytes in the endpoint, which is a reasonably good indicator that it contains a report ID, so we should always read both.
2019-01-12Fix Caps Lock LEDs once and for all (#4824)fauxpark1-9/+12
* Check the size of the SET_REPORT packet If we have two bytes, that probably means the first is a report ID. The 6KRO interface may or may not have one, but the NKRO interface always does, so we need to check this regardless of whether KEYBOARD_SHARED_EP is defined. * Fix indentation
2018-12-05Only try to read the report ID from SetReport when the keyboard is part of ↵fauxpark1-1/+1
the shared EP Fixes #4471 Fixes #4517
2018-11-16Use a single endpoint for HID reports (#3951)James Laird-Wah1-42/+50
* Unify multiple HID interfaces into one This reduces the number of USB endpoints required, which frees them up for other things. NKRO and EXTRAKEY always use the shared endpoint. By default, MOUSEKEY also uses it. This means it won't work as a Boot Procotol mouse in some BIOSes, etc. If you really think your keyboard needs to work as a mouse in your BIOS, set MOUSE_SHARED_EP = no in your rules.mk. By default, the core keyboard does not use the shared endpoint, as not all BIOSes are standards compliant and that's one place you don't want to find out your keyboard doesn't work.. If you are really confident, you can set KEYBOARD_SHARED_EP = yes to use the shared endpoint here too. * unify endpoints: ChibiOS protocol implementation * fixup: missing #ifdef EXTRAKEY_ENABLEs broke build on AVR with EXTRAKEY disabled * endpoints: restore error when too many endpoints required * lufa: wait up to 10ms to send keyboard input This avoids packets being dropped when two reports are sent in quick succession (eg. releasing a dual role key). * endpoints: fix compile on ARM_ATSAM * endpoint: ARM_ATSAM fixes No longer use wrong or unexpected endpoint IDs * endpoints: accommodate VUSB protocol V-USB has its own, understandably simple ideas about the report formats. It already blasts the mouse and extrakeys through one endpoint with report IDs. We just stay out of its way. * endpoints: document new endpoint configuration options * endpoints: respect keyboard_report->mods in NKRO The caller(s) of host_keyboard_send expect to be able to just drop modifiers in the mods field and not worry about whether NKRO is in use. This is a good thing. So we just shift it over if needs be. * endpoints: report.c: update for new keyboard_report format
2018-09-13rgblight.[ch] more configurable (#3582)Takeshi ISHII1-0/+1
* add temporary test code rgblight-macro-test1.[ch] * rgblight.h : mode auto numberring and auto generate mode name symbol No change in build result. * rgblight.c use RGBLIGHT_MODE_xxx symbols No change in build result. * quantum.c use RGBLIGHT_MODE_xxx symbols No change in build result. * fix build break. when RGB_MATRIX_ENABLE defined * add temporary test code rgblight-macro-test2.[ch] * modify rgblight_mode_eeprom_helper() and rgblight_sethsv_eeprom_helper() * modify rgblight_task() * configurable each effect compile on/off in config.h * update docs/feature_rgblight.md * fix conflict. docs/feature_rgblight.md * remove temporary test code rgblight-macro-test*.[ch] * fix comment typo. * remove old mode number from comment * update docs/feature_rgblight.md about effect mode * Revert "update docs/feature_rgblight.md about effect mode" This reverts commit 43890663fcc9dda1899df7a37d382fc38b1a6d6d. * some change docs/feature_rgblight.md * fix typo * docs/feature_rgblight.md update: revise mode number table
2018-03-22Generate API docs from source code comments (#2491)skullydazed1-6/+100
* Generate api docs from source code * Add a bunch of doxygen comments * more doxygen comments * Add the in-progress api docs * script to generate docs from travis * Add doc generation to the travis job * make travis_docs.sh commit the work it does * make sure the docs script exits cleanly
2018-02-08Merge ChibiOS and LUFA descriptor support (#2362)fredizzimo1-309/+29
* Move lufa descriptor to protocol/usb_descriptor * Try to compile usb_descriptor on ChibiOS * Add lufa_utils for ChibiOS Lufa USB descriptors for ChibiOS * More lufa_util compatibility fixes * First compiling version of shared USB descriptor * Send the usb descriptors * Fix the CONSOLE output on ChibiOS * Add errors for unsupported interfaces * Enable support for vitual serial port USB descriptors * Implement virtual serial port for ChibiOS * Cleanup the lufa_utils Use the default lufa header files * Add raw hid support for ChibiOS This is completely untested * Enable midi compilation on ChibiOS * Move midi functionality out of lufa.c * Don't register sysex callback when not needed * ChibiOS compilation fixes * Update ChibiOS submodule * Fix the Midi USB descriptor It didn't work properly when both Midi and Virtual serial port was enabled. * Add MIDI support for ChibiOS * Fix USB descriptor strings on ChibiOS * Use serial usb driver for raw hid * Generalize the ChibiOS stream like drivers This makes the initialization much more simple and eliminates a lot of the code duplication. * Convert console output to chibios stream driver * Fixes for ChibiOS update * Update the ChibiOS contrib submodule To include the usb data toggle synchronization fixes * Fix duplicate reset enumeration on ChibiOS * Add missing include * Add number of endpoints check for ChibiOS * Enable serial USB driver on all keyboards * Add missing includes when API is enabled withot midi * Add another missing inlcude
2017-05-29Adafruit Feather BLE / BLE Friend mouse buttons supportPriyadi Iman Nurcahyo1-1/+1
2017-05-26Use variable to disable usb check at startupyiancar1-1/+1
Adds a define variable which when defined disables the usb startup check. Modified the makefile to separate above define from bluetooth dependancy
2017-03-30Add RN42 Bluetooth module supportTravis La Marr1-1/+18
Added support for sending HID keycodes over the RN42/reflashed HC05 module. Tested on OS X and iOS.
2017-03-28Merge pull request #1112 from newsboytko/newsboytko/midi-keycodesJack Humbert1-5/+14
Flesh out MIDI support
2017-03-24Add BLE and EZKey module defines.Travis La Marr1-4/+4
Also restored serial init back to original location. Was getting junk data.
2017-03-24Readd bluetooth output direction on standard key input.Travis La Marr1-8/+10
2017-03-24Refactor Bluetooth HandlingTravis La Marr1-42/+35
Refactored Bluetooth support to make adding new Bluetooth modules easier in the future. * Remove `OUT_BLE` key from QMK's keymap. `OUT_BT` is all we need now as there's no difference anymore. * Made BLUETOOTH_ENABLE build option legacy as not to break existing keymaps (Falls back to existing EZ Key support if on) * Removed `ADAFRUIT_BLE_ENABLE` build option * Created new build option `BLUETOOTH` with module option (Currently `AdafruitEZKey` & `AdafruitBLE`) * Moved all LUFA bluetooth key/mouse events under `BLUETOOTH_ENABLE` ifdef with selected modules output.
2017-02-26Split MIDI functionality into MIDI_BASIC and MIDI_ADVANCEDGabriel Young1-0/+4
MIDI_ENABLE = no text data bss dec hex filename 0 17080 0 17080 42b8 satan_midi.hex MIDI_ENABLE = yes MIDI_BASIC undefined MIDI_ADVANCED undefined text data bss dec hex filename 0 19494 0 19494 4c26 satan_midi.hex MIDI_ENABLE = yes #define MIDI_BASIC MIDI_ADVANCED undefined text data bss dec hex filename 0 19788 0 19788 4d4c satan_midi.hex MIDI_ENABLE = yes MIDI_BASIC undefined #define MIDI_ADVANCED text data bss dec hex filename 0 20846 0 20846 516e satan_midi.hex MIDI_ENABLE = yes #define MIDI_BASIC #define MIDI_ADVANCED text data bss dec hex filename 0 21140 0 21140 5294 satan_midi.hex
2017-02-20implement modulationGabriel Young1-1/+1
2017-02-20initial implementation of polyphony using variable length array of notes onGabriel Young1-4/+9
2017-01-31Implement runtime selectable output (USB or BT)Priyadi Iman Nurcahyo1-69/+47
2016-12-29API Sysex fixesFred Sundvik1-10/+22
Fix memory leaks by using stack instead of malloc Reduce memory usage by having less temporary bufffers Remove warnings by adding includes Decrease code size by 608 bytes (mostly due to not linking malloc) More robust handling of buffer overflows
2016-12-19Fixes issue #900Wilba65821-1/+1
2016-12-05Merge pull request #921 from Wilba6582/raw_hidJack Humbert1-0/+94
Initial version of Raw HID interface
2016-12-03Connect the adafruit ble code to the lufa main loopWez Furlong1-11/+71
There are now 3 potential locations to send HID reports: 1. USB 2. The bluefruit easy key 3. Adafruit BLE Generally speaking, if USB is connected then we should prefer to send the reports there; it is generally the best channel for this. The bluefruit module has no feedback about bluetooth connectivity so the code must speculatively send reports over both USB and bluetooth. The BLE module has connectivity feedback. In general we want to prefer to send HID reports over USB while connected there, even if BLE is connected. Except that it is convenient to force them over BLE while testing the implementation. This policy has been extracted out into a where_to_send function which returns a bitmask of which of the channels should be used.
2016-11-30Initial version of Raw HID interfaceWilba65821-0/+94
2016-11-26separated into api files/folderJack Humbert1-200/+3
2016-11-24rgblight fixesJack Humbert1-1/+1
2016-11-24travis plsJack Humbert1-47/+2
2016-11-24converted to new formatJack Humbert1-110/+181
2016-11-23converted to 8bit messagesJack Humbert1-51/+68
2016-11-22cleaning up mididJack Humbert1-1/+1
2016-11-22cleaning up new codeJack Humbert1-63/+27
2016-11-22working with helper, qmk_helper_windows@05b0105Jack Humbert1-0/+6
2016-11-21more structure to the packageJack Humbert1-19/+88
2016-11-19midi back and forthJack Humbert1-17/+45
2016-11-17rgb light through midiJack Humbert1-0/+96
2016-11-15animations, midi, etcJack Humbert1-2/+3
2016-11-14mostly workingJack Humbert1-3/+30
2016-09-07Use keyboard config for nkro (#7)IBNobody1-1/+8
* removing nkro references - wip * changed NKRO to be defined by keymap_config
2016-08-23move to ergodox-ez onlyJason Green1-1/+1
2016-08-23Added USB Virtual Serial supportJason Green1-0/+107
2016-06-11Makefile redo & other features (#395)Jack Humbert1-1/+4
* .build containment implemented * no destructive variable setting - builds in either folder * make from 3 places * cleans before each build * make from root with keyboard=keyboard, keymap=keymap * make from keyboard/keyboard with keymap=keymap * make from keymaps/keymap * only implemented on planck * adds color diag to avr-gcc * makefiles for all plancks, clean-up * quick build-all makefile for plancks * reformatting of make output (colors) * color toggle, tmk path corrections * correct if statement for color * move config.h to main makefile, updates preonic, atomic * format update, all keyboards targets * makefile optional for build all target, alps and arrow_pad updated * alps updated * make planck default, trying out travis recipe for all-keyboards * all-keymaps target, different travis recipe * updates alps64 * updates keyboards to new format * updates clue* projects * all projects updated, specialise EZ .hex, let .hex through * updates travis * automatically find root, keyboard, keymap * silent echo, cleaned-up mass make output * updates all keyboards' .hex files except EZ * Rename Bantam44.c to bantam44.c * Rename Bantam44.h to bantam44.h * nananana * adds six key keyboard * does same to ez as rest * updates send_string example * brings ergodox_ez up to date * updates template/new project script * adds sixkeyboard * adds readme for sixkeyboard * adds sixkeyboard to travis * filenames, gitignore mess * define clock prescaler stuff manually * make quick, size test example * documentation and dfu-no-build
2016-05-24updates midi in play_note to better octaveJack Humbert1-2/+2
2016-05-15updates midi functionality (#331)Jack Humbert1-1/+1
* implements leader key for planck experimental * allows override of leader timeout * adds ability to use the leader key in seq * fixes leader keycode * adds chording prototype * fixes keycode detection * moves music mode to quantum.c * disables chording by default * adds music sequencer functionality * implements audio/music functions in quantum.c * splits up process_action to allow independent processing of actions * moves midi stuff to quantum.c * adds additional scales for midi
2016-04-17Fixed many compiler warnings related to print being disabledIBNobody1-11/+7
2016-01-20better integrationsJack Humbert1-2/+5
2015-10-27merging tmkJack Humbert1-0/+975
2015-09-20core: Fix for disabling NKRO in Boot protocoltmk1-5/+3
2015-09-20lufa: Fix endpoint bank mode for ATMega32u2tmk1-1/+4
2015-07-23core: Fix lufa suspend callback(#234)tmk1-1/+0
With matrix_power_down() in suspend event HHKB JP doesn't start up for some reason. It is unneeded in actual and removed.
2015-05-22lufa: Fix console flush #223tmk1-1/+23
Old console sent unneeded empty data every one milli sencond. After this fix console flushes endpoint data bank every 50ms only when needed.
2015-05-18Add keyboard_setup() and matrix_setup()tmk1-2/+7