Commit Graph

48 Commits (75b49aff56436c57a424e622c91f6d80e1d0ecc2)

Author SHA1 Message Date
a-chol 75b49aff56
Digitizer HID interface : absolute coordinates for mouse cursor (#12851)
* Add digitizer HID interface for setting the mouse cursor position at
absolute screen coordinates. Tested on Pro Micro, Proton C and
Blackpill.

* Update docs/feature_digitizer.md

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update tmk_core/protocol/usb_descriptor.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Add missing copyrights
Add V-USB support

* Add support for digitizer dedicated endpoint for lufa and chibios.
Fix formatting issues
Move digitizer_task definition to the feature's base implementation file

* Run cformat on modified files

* Change digitizer report usage to Digitizer instead of Pen to avoid
pointer disappearing on Windows.

* Update tmk_core/protocol/vusb/vusb.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Run cformat from docker image

* Remove send_digitizer from host_driver_t and instead rely on the
declaration being the interface to the implementation in each
HW-specific usb implementation.

* Fix build : send_digitizer shouldn't be static in vusb and add
weak-linkage implementation for tests without usb implementation

* Change digitizer user interface to match pointing device's

* Update documentation with new API

Co-authored-by: a-chol <nothing@none.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-08-18 04:52:44 +10:00
Joakim Tufvegren 982b782ce3
Trigger a wakeup after USB Reset on ChibiOS. (#12831)
After a USB Reset event the device must, according to the spec wake up
from any suspend state, so the Configured event that arrives afterwards
should be interpreted as an implicit wakeup.
2021-08-04 07:39:34 +10:00
Joakim Tufvegren 1409b36851
Remove the #10088 hotfix for Teensy 3.1-like Input:Club keyboards (#12870)
* Remove the #10088 hotfix for K20x MCU:s.

It seems to _cause_ the issue it intended to solve there.

* Cleaner way of removing #10088 hotfix.

Now only affects Ergodox Infinity, Whitefox and K-type, though.

Switches over Ergodox Infinity to the `IC_TEENSY_3_1` board, since that
was a nice place to implement the `restart_usb_driver` override.
However, I would guess this issue is present for other K20x/Teensy 3.1
boards as well...

* Fix comment regarding `IC_TEENSY_3_1` for all keyboards using it.
2021-08-04 07:38:37 +10:00
a_p_u_r_o 26b62f7a6c
Fix alignment of USB out report buffer 2 -> 4 (#13838) 2021-08-02 00:32:26 +01:00
Stefan Kerkmann 49fd3c0760
[Core] ChibiOS fix O3 and LTO breakage of extra keys and joystick (#12819) 2021-06-06 22:16:55 -07:00
github-actions[bot] d3bf3d3b1c
Format code according to conventions (#12681)
Co-authored-by: QMK Bot <hello@qmk.fm>
2021-04-25 13:15:48 +10:00
Purdea Andrei dbd65d01b6
Fix how USB queue overflow is handled in chibios. (#12576)
* Fix how USB queue overflow is handled in chibios.

This commit reverts PR 12472 (commit c823fe2d3f23ed090e36ce39beed4c448298bd2f),
and it implements the original intent of the commit in a better way.
The original intent of the above mentioned commit was to not deadlock the
keyboard when console is enabled, and hid_listen is not started.

The above mentioned commit had a few drawbacks:
1) When a lot of data was printed to the console, the queue would get full,
and drop data, even if hid_listen was running. (For example having matrix debug
enabled just didn't work right at all)
2) I believe the function in which this was implemented is used by all other
USB endpoints, so with the above change, overflow, and data loss could
happen in other important functions of QMK as well.

This commit implements deadlock prevention in a slightly similar way to how
it's done on AVR. There is an additional static local variable, that memorizes
whether the console has timeouted before. If we are in the timeouted=false
state, then we send the character normally with a 5ms timeout. If it does
time out, then hid_listen is likely not running, and future characters should
not be sent with a timeout, but those characters should still be sent if there
is space in the queue. The difference between the AVR implementation and this
one is that the AVR implementation checks the queue state directly, but this
implementation instead attempts to write the character with a zero timeout.
If it fails, then we remain in the timeouted=true state, if it succeeds, then
hid_listen started removing data from the queue, so we can go out of the
timeouted=true state.

* Added comment explaining the timeouted logic to console flow control.

* Console flow control: refactor chibios flowcontrol code to make it more readable, and rename the timeouted variable to timed_out on both chibios and lufa. Changed comments to says timed_out is an approximation of listener_disconnected, to make it clear that it's not the same thing

* fix typo
2021-04-25 13:11:41 +10:00
github-actions[bot] c27a778281
Format code according to conventions (#11905)
Co-authored-by: QMK Bot <hello@qmk.fm>
2021-02-15 06:55:43 +11:00
Joel Challis 1f2fe2eab9
Refactor platform logic within print.h (#11863)
* Remove GCC check from debug

* Remove platform logic from common.mk

* Refactor platform logic within print.h

* restore debug.c format

* headers

* Rename function pointer type

* review comments

* Update tmk_core/common/printf.c

Co-authored-by: Nick Brassel <nick@tzarc.org>

* Format

Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-02-14 01:44:22 +00:00
Joshua Diamond 9a4618b05b
Address wake from sleep instability (#11450)
* resolve race condition between suspend and wake in LUFA

* avoid multiple calls to suspend_power_down() / suspend_wakeup_init()

* Remove duplicate suspend_power_down_kb() call

* pause on wakeup to wait for USB state to settle

* need the repeated suspend_power_down() (that's where the sleep is)

* more efficient implementation

* fine tune the pause after sending wakeup

* speculative chibios version of pause-after-wake

* make wakeup delay configurable, and adjust value

* better location for wakeup delay
2021-02-02 11:12:41 +11:00
Nick Brassel db11a2a1fd
Decouple USB events from the USB interrupt handler. (#10437) 2021-02-01 08:19:00 +11:00
Joel Challis a68d289fa5
Manually run formatting CI process (#11375) 2021-01-01 03:50:32 +11:00
Ryan 6ea4b06f9f
Run cformat and dos2unix manually (#11235) 2020-12-17 14:06:30 +00:00
Ryan 501f2fdef1
Normalise include statements in core code (#11153)
* Normalise include statements in core code

* Missed one
2020-12-11 13:45:24 +11:00
James Young c66df16644
2020 November 28 Breaking Changes Update (#11053)
* Branch point for 2020 November 28 Breaking Change                                                

* Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183)                                           

* Add support for soft serial to ATmega32U2 (#10204)                                               

* Change MIDI velocity implementation to allow direct control of velocity value (#9940)            

* Add ability to build a subset of all keyboards based on platform.                                

* Actually use eeprom_driver_init().                                                               

* Make bootloader_jump weak for ChibiOS. (#10417)                                                  

* Joystick 16-bit support (#10439)                                                                 

* Per-encoder resolutions (#10259)                                                                 

* Share button state from mousekey to pointing_device (#10179)                                     

* Add hotfix for chibios keyboards not wake (#10088)                                               

* Add advanced/efficient RGB Matrix Indicators (#8564)                                             

* Naming change.                                                                                   

* Support for STM32 GPIOF,G,H,I,J,K (#10206)                                                       

* Add milc as a dependency and remove the installed milc (#10563)                                  

* ChibiOS upgrade: early init conversions (#10214)                                                 

* ChibiOS upgrade: configuration file migrator (#9952)                                             

* Haptic and solenoid cleanup (#9700)                                                              

* XD75 cleanup (#10524)                                                                            

* OLED display update interval support (#10388)                                                    

* Add definition based on currently-selected serial driver. (#10716)                               

* New feature: Retro Tapping per key (#10622)                                                      

* Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638)             

* Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530)

* Rescale both ChibiOS and AVR backlighting.                                                       

* Reduce Helix keyboard build variation (#8669)                                                    

* Minor change to behavior allowing display updates to continue between task ticks (#10750)        

* Some GPIO manipulations in matrix.c change to atomic. (#10491)                                   

* qmk cformat (#10767)                                                                             

* [Keyboard] Update the Speedo firmware for v3.0 (#10657)                                          

* Maartenwut/Maarten namechange to evyd13/Evy (#10274)                                             

* [quantum] combine repeated lines of code (#10837)                                                

* Add step sequencer feature (#9703)                                                               

* aeboards/ext65 refactor (#10820)                                                                 

* Refactor xelus/dawn60 for Rev2 later (#10584)                                                    

* add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824)                                 

* [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549)                                    

* update chibios os usb for the otg driver (#8893)                                                 

* Remove HD44780 References, Part 4 (#10735)                                                       

* [Keyboard] Add Valor FRL TKL (+refactor) (#10512)                                                

* Fix cursor position bug in oled_write_raw functions (#10800)                                     

* Fixup version.h writing when using SKIP_VERSION=yes (#10972)                                     

* Allow for certain code in the codebase assuming length of string. (#10974)                       

* Add AT90USB support for serial.c (#10706)                                                        

* Auto shift: support repeats and early registration (#9826)                                       

* Rename ledmatrix.h to match .c file (#7949)                                                      

* Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231)                                        

* Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840)                                        

* Merge point for 2020 Nov 28 Breaking Change
2020-11-28 12:02:18 -08:00
QMK Bot a3db72df72 format code according to conventions [skip ci] 2020-08-29 22:57:48 +00:00
a-chol d4be07dad3 Hid joystick interface (#4226)
* add support for hid gamepad interface
add documentation for HID joystick
Add joystick_task to read analog axes values even when no key is pressed or release. update doc
Update docs/feature_joystick.md
Manage pin setup and read to maintain matrix scan after analog read

* Incorporates patches and changes to HID reporting

There are some patches provided by @a-chol incorporated on this commit,
and also some changes I made to the HID Report structure.

The most interesting is the one dealing with number of buttons: Linux
doesn't seem to care, but Windows requires the HID structure to be byte
aligned (that's in the spec). So if one declares 8/16/32... buttons they
should not have any issues, but this is what happens when you have 9
buttons:

```
 bits |0|1|2|3|4|5|6|7|
      |*|*|*|*|*|*|*|*| axis 0 (report size 8)
      |*|*|*|*|*|*|*|*| ...
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*| axis 6
      |*|*|*|*|*|*|*|*| first 8 buttons (report size 1)
      |*| | | | | | | | last of 9 buttons, not aligned
```

So for that I added a conditonal that will add a number of reports with
size 1 to make sure it aligns to the next multiple of 8. Those reports
send dummy inputs that don't do anything aside from aligning the data.

Tested on Linux, Windows 10 and Street Fighter (where the joystick is
recognized as direct-input)

* Add save and restore of each pin used in reading joystick (AVR).
Allow output pin to be JS_VIRTUAL_AXIS if the axis is connected to Vcc
instead of an output pin from the MCU.

Fix joystick report id

Fix broken v-usb hid joystick interface. Make it more resilient to unusual settings (none multiple of eight button count, 0 buttons or 0 axes)

Correct adc reading for multiple axes. Piecewise range conversion for uncentered raw value range. Input, output and ground pin configuration per axis.

Documentation fixes

* Fix port addressing for joystick analog read

* The other required set of changes
As per the PR, the changes still holding it up.
Add onekey for testing.
Fix ARM builds.
Fix device descriptor when either axes or buttons is zero.
Add compile-time check for at least one axis or button.
Move definition to try to fix conflict.
PR review comments.
qmk cformat

* avoid float functions to compute range mapping for axis adc reading

* Remove V-USB support for now. Updated docs accordingly.

* Update tmk_core/protocol/lufa/lufa.c

Co-Authored-By: Ryan <fauxpark@gmail.com>

* Update tmk_core/protocol/usb_descriptor.c

Co-Authored-By: Ryan <fauxpark@gmail.com>

* Update tmk_core/protocol/usb_descriptor.c

Co-Authored-By: Ryan <fauxpark@gmail.com>

* Update tmk_core/protocol/usb_descriptor.c

Co-Authored-By: Ryan <fauxpark@gmail.com>

* Add support for joystick adc reading for stm32 MCUs. Fix joystick hid report sending for chibios

* Fix HID joystick report sending for ChibiOS.
Add one analog axis to the onekey:joystick keymap.
Fix pin state save and restore during joystick analog read for STM32
MCUs.

* Update tmk_core/protocol/chibios/usb_main.c

Co-Authored-By: Ryan <fauxpark@gmail.com>

* Update tmk_core/protocol/lufa/lufa.c

Co-Authored-By: Ryan <fauxpark@gmail.com>

* Add missing mcuconf.h and halconf.h to onekey:joystick keymap.
Add suggested fixes from PR.

* Switch saveState and restoreState signature to use pin_t type.
onekey:joystick : add a second axis, virtual and programmatically animated.

* Update docs/feature_joystick.md

Co-Authored-By: Ryan <fauxpark@gmail.com>

* Update docs/feature_joystick.md

Co-Authored-By: Ryan <fauxpark@gmail.com>

* Add PR corrections

* Remove halconf.h and mcuconf.h from onekey keymaps

* Change ADC_PIN to A0

Co-authored-by: achol <allecooll@hotmail.com>
Co-authored-by: José Júnior <jose.junior@gmail.com>
Co-authored-by: a-chol <achol@notamail.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-08-29 14:30:02 -07:00
Nick Brassel 60e5733c48 `qmk cformat` on `develop` (#9501) 2020-08-29 14:30:02 -07:00
Ryan f209f91c7c Various tidyups for USB descriptor code (#9005) 2020-08-29 14:30:02 -07:00
James Young fced377ac0
2020 May 30 Breaking Changes Update (#9215)
* Branch point for 2020 May 30 Breaking Change

* Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954)

* Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957)

* Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958)

* Migrate `ACTION_LAYER_MODS` to `LM()` (#8959)

* Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968)

* Convert V-USB usbdrv to a submodule (#8321)

* Unify Tap Hold functions and documentation (#8348)

* Changing board names to prevent confusion (#8412)

* Move the Keyboardio Model01 to a keyboardio/ subdir (#8499)

* Move spaceman keyboards (#8830)

* Migrate miscellaneous `fn_actions` entries (#8977)

* Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979)

* Organizing my keyboards (plaid, tartan, ergoinu) (#8537)

* Refactor Lily58 to use split_common (#6260)

* Refactor zinc to use split_common (#7114)

* Add a message if bin/qmk doesn't work (#9000)

* Fix conflicting types for 'tfp_printf' (#8269)

* Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480)

* Refactor and updates to TKC1800 code (#8472)

* Switch to qmk forks for everything (#9019)

* audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484)

* Audio enable corrections (2/3) (#8903)

* Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582)

* Audio enable corrections (Part 4) (#8974)

* Fix typo from PR7114 (#9171)

* Augment future branch Changelogs (#8978)

* Revert "Branch point for 2020 May 30 Breaking Change"
2020-05-30 13:14:59 -07:00
skullY 6f30b402a2 Revert "Fix conflicting types for 'tfp_printf' (#8269)"
This reverts commit e17b55e33a.
2020-05-04 09:25:44 -07:00
QMK Bot 1ff526dac0 format code according to conventions [skip ci] 2020-05-04 06:59:44 +00:00
Joel Challis e17b55e33a
Fix conflicting types for 'tfp_printf' (#8269)
* Refactor to use mpaland/printf

* trim firmware size

* remove keymap changes

* run clang format

* Fixup after rebase

* fix up git-submodule command for printf
2020-05-03 23:19:51 -07:00
James Young 26eef35f07
2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
Ryan 088b64ab3d
Improvements to extrakey HID descriptors (#8156) 2020-02-25 12:18:11 +11:00
Drashna Jaelre 0010d0c45e
Add Midi Endpoint task to ChibiOS main (#8071) 2020-02-04 18:28:47 -08:00
QMK Bot 09370a95db format code according to conventions [skip ci] 2020-01-25 22:04:42 +00:00
George Harris e9ffc53476 Fix unaligned access with LTO (#7801)
Forces 4 byte alignment for USB input & output buffers to prevent unaligned accesses by chibios with LTO enabled
2020-01-25 13:35:39 -08:00
QMK Bot dee1d68dde format code according to conventions [skip ci] 2020-01-21 14:48:06 +00:00
fauxpark 123ae73efc Fix lock LEDs for ChibiOS when using shared endpoints (#7877)
* Fix lock LEDs for ChibiOS when using shared endpoints

* Tweak comments

* Doesn't need to be uint16 anymore
2020-01-21 14:17:33 +00:00
xyzz 83be1aed76 chibios/usb_main: re-check USB status in send_keyboard after sleeping the thread (#7784)
* chibios/usb_main: re-check USB status in send_keyboard after sleeping the thread

* change send_keyboard to only have 1 exit point
2020-01-13 15:08:14 -08:00
Joel Challis ff5742da9f Fix KEYBOARD_SHARED_EP on ChibiOS (#7860) 2020-01-13 09:21:42 +11:00
Joel Challis 80c2e26741
Fix ChibiOS USB config for chips which support OTGv1 (#7564)
* Align endpoint config as per rest of file (fixes #4783)

* Add comments about explicit order use

* Update tmk_core/protocol/chibios/usb_main.c

Co-Authored-By: fauxpark <fauxpark@gmail.com>
2019-12-14 01:29:54 +00:00
zvecr a91c0c4765 Run clang-format manually to fix recently changed files 2019-11-17 08:25:58 -08:00
Joel Challis 1d4287cb95 Fix chibios when mouse and nkro disabled (#7312) 2019-11-10 09:02:46 -08:00
skullY b624f32f94 clang-format changes 2019-08-30 15:01:52 -07:00
Christon DeWan 55c3214877 fixed misplaced paranthesis in arm usb mouse send function (#4478)
bug was causing lots of dropped events for me.
2018-11-27 15:20:17 -08:00
James Laird-Wah 39bd760faf Use a single endpoint for HID reports (#3951)
* 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-11-15 22:22:05 -08:00
Drashna Jaelre b1bf0879ad Fix mouse_send() on chibiOS so it won't lock up the firmware 2018-10-27 00:17:25 -04:00
Jack Humbert ade22f8e2c
Adds support for Planck Rev 6 (#2666)
* initial files for rev 6 with encoder

* music map init, dip scan added

* adds ws2812 driver for arm

* flesh out dip and encoder support

* adds default encoder res

* adds default encoder res

* start muse implementation

* muse working with encoder as control

* flip direction

* try mouse wheel again

* dont break other revs

* dont break other revs

* conditional autio

* pwm ws driver (not working)

* update build includes for chibios

* update ws2812 driver/config

* last commit for glasser code

* working example

* remove rgb for now

* finish up rev6

* working encoder keycodes

* add warnings to planck keymaps about the LAYOUT
2018-07-16 11:48:31 -04:00
fredizzimo e9d32b60b7 Add a custom USB driver for ARM (#2750)
* Copy Chibios serial_usb_driver into the chibios/protocol

It's renamed to usb_driver to avoid name conflicts

* Make the usb driver compile

* Disable ChibiOS serial usb driver for all keyboards

* Change usb_main to use QMKUSBDriver

* Initialize the usb driver buffers

* Add support for fixed size queues

* Fix USB driver initialization

* Don't transfer an empty packet for fixed size streams
2018-04-15 20:42:53 -04:00
fredizzimo 53ff8a31b6 Merge ChibiOS and LUFA descriptor support (#2362)
* 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
2018-02-08 15:07:46 -05:00
Fred Sundvik 30b90de7c9 Send usb wakeup through ChibiOS 2018-02-07 17:16:01 -05:00
Fred Sundvik 6a9617b1c6 Update ChibiOS to 17.6.3 2018-02-07 17:16:01 -05:00
Takayuki Matsubara 7b65b7e948 fix Logical Maximum to be recognized as 255 instead of -1
SEE ALSO: https://github.com/qmk/qmk_firmware/issues/312
2017-10-31 11:12:06 -04:00
skullydazed 5fd68266f5 Clueboard 60% support (#1746)
* initial clueboard_60 support

* LED lighting support

* fix the clueboard->clueboard_66 rename

* Add layout support to clueboard_60

* Fix the 60_iso layout so it's actually iso

* add a default keymap for AEK layout

* fix clueboard_17

* Fixup the ISO layouts

* Fix the `wait_ms()/wait_us()` definitions for chibios

* Fix up the wait_ms/wait_us hack. Reduce stack size.

* Add a missing #include "wait.h"

* commit files that should have already been comitted
2017-09-29 16:17:30 -07:00
IBNobody 558f3ec1eb Use keyboard config for nkro (#7)
* removing nkro references - wip

* changed NKRO to be defined by keymap_config
2016-09-06 23:19:01 -05:00
fredizzimo 4d4f7684e6 Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.

* Add ChibiOS support (USB stack + support files).

* Make usb_main more USB_DRIVER #define independent.

* Move chibios to tool.

* Implement jump-to-bootloader.

* Small updates.

* Fix bootloader-jump compiling.

* Move AVR specific sleep_led.c into avr.

* Add basic sleep_led for chibios.

* Update chibios README.

* NKRO fixes.

* Rename some Makefile defines.

* Move STM32 bootloader address config to separate .h file.

* Add ARM Teensies bootloader code.

* Fix chibios/usb_main GET_REPORT handing.

* Add missing #include to keymap.c.

* Make bootmagic.c code portable (_delay_ms -> wait_ms).

* Move declaration of keymap_config.

Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).

* Add eeprom support for chibios/kinetis.

* Rename chibios example keyboard.

* Move chibios/cortex selection to local Makefiles.

* Chibios: use WFI in idle. WIP suspend stuff.

* ChibiOS/kinetis: sending remote wakeup.

* ChibiOS/STM32: send remote wakeup.

* Fix report size of boot protocol.

* Fix drop key stroke

Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.

Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.

* Chibios/usb_main: rename a variable for clarity.

* Add correct chibios/bootloader_jump for infinity KB.

* ChibiOS: make reset request more CMSISy.

* Chibios: Add breathing sleep LED on Kinetis MCUs.

* ChibiOS: Update infinity bootloader code to match updated ChibiOS.

* ChibiOS: prettify/document sleep_led code.

* Chibios: Remove the wait in the main loop.

* Add maple mini code.

* Do timeout when writing to CONSOLE EP queue.

Fixes TMK bug #266.

* Chibios: add 'core/protocol' to the makefiles' search path.

* Chibios: Update to new USB API.

* Chibios: add more guards for transmitting (fix a deadlock bug).

* Add update for chibios in README

* Chibios: Fix a HardFault bug (wait after start).

* Chibios: cleanup usb_main code.

* Chibios: Revert common.mk change (fix AVR linking problem).

* core: Fix chibios user compile options

Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.

* Sysv format for ChibiOS arm-none-eabi-size

Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.

* Fix hard-coded path of CHIBIOS

* Add support for new version of ChibiOS and Contrib

The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.

* Update ChibiOS instructions

* Chibios: implement sleep LED for STM32.

* Chibios: Update the main chibios README.

* Chibios: fix STM32_BOOTLOADER_ADDRESS name.

* Chibios: make the default bootloader_jump redefinable (weak).

* Chibios: disable LTO (link-time optimisation).

With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.

* Chibios: add default location for chibios-contrib.

* ChibiOS: update mk to match chibios/master.

* ChibiOS: update instructions.md.

* Add chibi_onekey example.

* Add comments to chibi_onekey Makefile.

* Rename some Makefile defines.

* Move STM32 bootloader address config to separate .h file.

* Rename chibios example keyboard.

* Move chibios/cortex selection to local Makefiles.

* Add Teensy LC onekey example.

* Chibios: use WFI in idle. WIP suspend stuff.

* Update chibi/teensy instructions.

* Update chibios/Teensy instructions.

* Add infinity_chibios

* Add keymap_hasu.c

* Infinity_chibios: select correct bootloader_jump.

* Infinity_chibios: improve comments.

* Add generic STM32F103C8T6 example.

* Add maple mini code.

* STM32F103x fixes.

* Add maple mini pinout pic.

* Chibios: updates for 3.0.4 git.

* Chibios: rename example stm32_onekey -> stm32_f072_onekey.

* Chibios: add makefiles for Teensy 3.x examples.

* Chibios: update Teensy 3.x instructions.

* Chibios: Tsy LC is cortex-m0plus.

* Chibios: add more guards for transmitting (fix a deadlock bug).

* Change README for chibios

* Chibios: update examples to current chibios git.

Match the changes in mainline chibios:
 - update chconf.h
 - update supplied ld scripts structure
 - update Teensy instructions (switch to official
    chibios and introduce contrib)

* Add ChibiOS and ChibiOS-Contrib submodules

Also fix the makefile path for them.

* Moves chibios keyboards to keyboards folder

* First version of ChibiOS compilation

Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.

* More chibios fixes

It now compiles without warnings and links

* Move the teensy_lc_onekey to the keyboards folder

* Clean up the make file rule structure

* Remove keymap_fn_to_action

* Update more ChibiOS keyboards to QMK

Most of them does not compile at the moment though.

* Use older version of Chibios libraries

The newest ones have problems with compilation

* Remove USB_UNCONFIGURED event

It isn't present in the older version of ChibiOS

* Fix the infinity_chibios compilation

* Fix potentially uninitialized variable

* Add missing include

* Fix the ChibiOS makefile

* Fix some Chibios keyboard compilation

* Revert the rules.mk file back to master version

* Combine the chibios and AVR makefiles

With just the required overrides in the respective platform
specific one.

* Slight makefile restrucuring

Platform specific compiler options

* Move avr specific targets out of the main rules

* Fix ChibiOS objcopy

The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file

* Fix the objcopy for real this time

The comands were moved around, so chibios used avr and the ohter
way around.

Also change the objsize output format

* Fix the thumb flags

* Fix the infinity hasu keymap

* Per platform cpp flags

* Add gcc-arm-none-eabi package to travis

* Add arm-none-eabi-newlib to travis

* Fix the name of the libnewlib-arm-none-eabi lib

* Fix the ChibiOS paths

So that they are properly relative, and builds don't generate
extra folders

* Fix the board path of stm32_f103_onekey

* Only consider folders with Makefiles as subproject
2016-07-01 10:04:53 -04:00