1
0
Fork 0
forked from forks/qmk_firmware
Commit graph

56 commits

Author SHA1 Message Date
Ryan 5cecc1ea1e
Add brightness level API to OLED driver (#10772)
* Add brightness level API to OLED driver

* Set default brightness to 255
2020-10-29 00:12:50 -07:00
Ryan d46b8ef67c
Add STM32Duino to bootloader selection (#10558) 2020-10-13 03:19:50 +11:00
Erovia 058737f116
[CLI] Add c2json (#8817)
* Basic keymap parsing finally works

* Add 'keymap.json' creation to the qmk.keymap module

* Add tests and fix formatting

* Fix/exclude flake8 errors

* Convert keymap.c to valid keymap.json

* Fix some errors

* Add tests

* Finalize keymap.json creation, add json template

* Add docs

* Move pygments to the standard requirements

* Add support for nameless layers, fix tests

* Fix things after rebase

* Add missing 'keymap' value.

* Fix missing layer numbers from advanced keycodes

Buckwich noticed that if the advanced keycode / layer toggling key
contains a number, it goes missing.
Now we properly handle them.
Thx for noticing!

* Apply suggestions from code review

* fixup tests

Co-authored-by: Zach White <skullydazed@drpepper.org>
Co-authored-by: skullY <skullydazed@gmail.com>
2020-10-06 17:10:19 -07:00
Sergey Vlasov 3a8e13a74a
[Keymap] Add onekey keymap for OLED testing (#10380)
* Add onekey keymap for OLED testing

* Add license header
2020-10-04 12:41:03 -07:00
Sergey Vlasov 7ddae97c89
Fix backlight for F401/F411 blackpill onekey examples (#10320)
Fix configs to make the `handwired/onekey/blackpill_f401:backlight` and
`handwired/onekey/blackpill_f411:backlight` examples actually compile
and work:

 - Use `PWMD5` instead of `PWMD2` for backlight, which matches the
   default value of `BACKLIGHT_PAL_MODE` (AF02 for pin A0 is `TIM5_CH1`)
   and does not conflict with the default value of `STM32_ST_USE_TIMER`.

 - Enable `HAL_USE_PWM` in halconf.h and `STM32_PWM_USE_TIM5` in
   mcuconf.h, so that `PWMD5` could be used.
2020-09-21 22:50:39 -07:00
Sergey Vlasov fee953c4f8
Disable the command feature for onekeys (#10366)
There is no way to invoke the command feature while having just a single
physical key, and disabling that feature fixes build for keymaps like
`handwired/onekey/promicro:rgb` without resorting to LTO (the command
feature consumes more than 4900 bytes with avr-gcc 8.4.0).
2020-09-20 20:50:52 +01:00
Ryan 0140baf7e0
Add STM32F401/F411 to mcu_selection.mk (#10278)
* Reorder STM32 MCUs

* Add STM32F4xx to mcu_selection.mk

* Set MCU for phoenix and tkw/stoutgat/v2/f411
2020-09-18 20:00:18 -07:00
James Young 78d5224a1d
Remove HD44780 References, Part 3 (#10238)
* remove HD44780_ENABLE rules: G-H

* remove HD44780_ENABLE config: G-H
2020-09-07 22:28:18 -07:00
QMK Bot a3db72df72 format code according to conventions [skip ci] 2020-08-29 22:57:48 +00:00
Zach White bdd8d2679b Allow joysticks to be used without analog pins (#10169)
* Allow joysticks to be used without analog pins

* change how analog/digital joysticks are specified
2020-08-29 14:30:02 -07:00
Ryan 9ef4526a2f Remove unused CORTEX_VTOR_INIT (#10053) 2020-08-29 14:30:02 -07:00
Ryan 12333b7c5e Fix joystick compile issues (#9949) 2020-08-29 14:30:02 -07: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 385d49cc39 Initial work for consolidation of ChibiOS platform files (#8327)
* Initial work for consolidation of board files and default ChibiOS configs.

* Migrate F401/F411 black pills for testing.

* Add early init bootloader jump flag.

* Add support for I2C in order to use i2c_scanner keymap.

* Add F401/F411 HSE bypass to get things booting.

* Exempt "hooked" ChibiOS conf files from updater script.

* Fix up ordering for bootloader_defs file check.

* Match previous $(KEYBOARD_PATHS) value for Proton-C, updated for all board configs.
2020-08-29 14:30:02 -07:00
Ryan 48bd8263a3
Fix sendstring call in onekey ADC keymap (#10031) 2020-08-17 08:10:48 +10:00
Joel Challis d91987ab9a
Enable OLED support for Teensy 3.2/LC (#7591)
* I2C_TIMEOUT is not defined on arm teensy

* Work round teensy having different ChibiOS config options

* Stash OLED conf files

* update comment

* update comment

* Remove stm32 alias to allow teensy alt mode
2020-07-26 07:50:56 +10:00
Sergey Vlasov 74d3223fb5
Update handwired/onekey/teensy_2pp readme (#9784)
In commit 297aad6ebd pins for handwired/onekey/teensy_2pp were changed
from B2/B1 to F4/F5; update readme.md to match that change.
2020-07-22 15:49:01 +10:00
Nico Cesar 2e08c72e95
Update onekey proton_c readme (#9758)
A3 won't work. The code says A1 and A2 and it works. prints out an "a"
2020-07-20 15:41:21 +01:00
Ryan 44d93285d1
Change ?= to = in keyboard rules.mk (#9390) 2020-06-15 03:06:10 -07:00
Ryan 407d6a2b67
[Keyboard] Fix error_log complaint about handwired/onekey layout macro (#9263) 2020-06-07 22:49:18 -07:00
Erovia 6501377070
CLI: fix json2c subcommand and add/fix tests (#9206)
Co-authored-by: Zach White <skullydazed@users.noreply.github.com>
2020-05-26 17:43:33 +02:00
Nick Brassel 54b04d9665
Add SPI 25xx EEPROM support. (#8780) 2020-05-19 10:34:00 +10:00
Joel Challis 2392ddb76b
Enable memcore to fix malloc/rand crashes (#8695) 2020-04-05 22:15:40 +01:00
Ryan 297aad6ebd
Set backlight and RGB pins for AVR onekeys (#8533)
* Set backlight and RGB pins for AVR onekeys

* Set pin for ADC as well

* Define ADC_PIN for F4 blackpills

* Use A0 for F4 ADCs

* Set ADC pins for F0 and F1
2020-03-24 03:32:23 +00:00
Joel Challis b6316c5024
[Keymap] I2C scanner (#8454)
* Add i2c scanner keymap

* Add bodge for chibios

* Fix readme title

* make chibios bodge a little cleaner

* fix typo in readme
2020-03-18 11:14:45 -07:00
Joel Challis 567bfc97ac
ARM - ADC cleanup (#8385)
* Update switch to array to allow custom values

* Add adc keymap

* update docs to reflect alignment of default 10 bit

* start conversion to USE_ADCVn

* samplerate is hella wrong...stub out for now

* basic f1 and f4 functionality

* Tidy up current changes

* Restore old pinToMux function

* Add back sample rate for supported platforms

* F0 compile fixes

* wordsmithery

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

* Remove reference to avr only function

Co-authored-by: Ryan <fauxpark@gmail.com>
2020-03-17 00:29:52 +00:00
Joel Challis d0d6fb27c4
Add f401 and f411 blackpill examples (#7930)
* Add f401 and f411 blackpill examples

* Add readme files

* Align dfu args with core

* Add support for RESET keycode

* move STM32_BOOTLOADER_ADDRESS to rules

* Update conf files to latest ChibiOS

* Update conf files to latest ChibiOS
2020-03-06 01:40:39 +00:00
Nick Brassel 78069d4826
Add onekey keymap for testing reset to bootloader. (#8288) 2020-03-01 22:36:17 +00:00
Nick Brassel d0c3acbe3e
Allow for ChibiOS 20.x (master), as well as enabling ChibiOS-Contrib HAL. (#8272) 2020-03-01 11:50:49 +11:00
James Young 26eef35f07
2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
Ryan 66d7fc34b2
Add Arm Teensys to mcu_selection.mk (#8026)
* Add Arm Teensys to mcu_selection.mk

* Roll back halfkeyboard keymap changes

* Remove extra newline
2020-02-21 17:12:15 +11:00
Erovia 3db41817e0 Code cleanup, use pathlib, use pytest keyboard
Clean up checks and logics that are unnecessary due to MILC updates.
Use pathlib instead of os.path for readability.
Use the 'pytest' keyboard for the tests.
Add community layout for 'handwired/onekey/pytest' so we can test
community layouts.
2020-02-15 15:19:03 -08:00
Nick Brassel 4d06d2835c Move CORTEX_ENABLE_WFI_IDLE=TRUE to rules.mk files. 2020-01-28 23:45:42 +11:00
Joel Challis 7342c335d2
Refactor stm32duino f103 keyboards to use new central board config files (#7706)
* Create central board for bluepill

* Remove duplicate board files

* Refactor to use new central board config files

* Fix cannonkeys f103 boards
2020-01-27 22:39:30 +00:00
Joel Challis 50855593ff
Migrate common ld scripts to common location (#7887)
* Migrate common ld scripts to common location

* Remove duplicate ld scripts

* Update build to look at common ld location
2020-01-27 22:38:55 +00:00
zvecr ee86be9dca Refactor to use new central board config files 2020-01-26 23:35:57 +00:00
zvecr 98e5555705 Remove duplicate board files 2020-01-26 23:33:03 +00:00
fauxpark eb5d267e63
Enforce definition of DIODE_DIRECTION for non-custom matrix boards (#7915)
* Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards

* Define diode direction for failing boards

* Matching parentheses

* Put onekey diode directions in top level config
2020-01-19 14:11:57 +11:00
Joel Challis e34af631c2
Refactor f103,f072,f042 based keyboards to use new MCU selection defaults (#7705)
* refactor keyboards using ST_STM32F072B_DISCOVERY to use 'MCU = STM32F072'

* refactor keyboards using GENERIC_STM32_F042X6 to use 'MCU = STM32F042'

* refactor keyboards using GENERIC_STM32_F103 to use 'MCU = STM32F103'
2020-01-10 01:31:01 +00:00
Joel Challis 1ea0cac998
ARM - ws2812 bitbang (#7173)
* Initial ARM bitbang ws2812 driver

* Unify chibios platform to run rgblight_task

* Remove 'avr only' comments from ws2812 docs

* Remove 'avr only' comments from ws2812 docs

* Unify chibios platform to run rgblight_task - review comments

* Remove debug flags from keymap

* Add comments from review

* Add defines for STM32L0XX

* Attempt to get arm ws2812 working on multiple gcc versions
2019-11-07 13:10:29 +00:00
fauxpark 3dbf08b655 Cleanup rules.mk for 32U4 keyboards, H (#7030)
* Cleanup rules.mk for 32U4 keyboards, H

* Change some boards incorrectly assumed to be halfkay
2019-10-20 12:51:37 -07:00
Joel Challis 38aefaf78e
ARM - Initial backlight support (#6487)
* Move AVR backlight to own file, add borrowed ARM implementation

* Tiny fix for backlight custom logic

* Remove duplicate board from rebase

* Fix f303 onekey example

* clang-format

* clang-format

* Remove backlight keymap debug

* Initial pass of ARM backlight docs

* Initial pass of ARM backlight docs - resolve todos

* fix rules validation logic

* Add f072 warning

* Add f072 warning

* tidy up breathing in backlight keymap

* tidy up breathing in backlight keymap

* add missing break to backlight keymap
2019-10-05 16:57:00 +01:00
fauxpark f34299efd7 Cleanup rules.mk for USB64 and USB128 keyboards (#6769) 2019-09-19 09:55:03 -07:00
skullY 5b7a5b2a76 Setup a python test framework 2019-09-07 07:58:41 -07:00
Joel Challis ee8d9bd40a Remove duplicate test keyboards (#6539)
* Remove test keyboards now onekey and splittest have been extended

* Add f072 for testing
2019-08-15 06:57:43 -07:00
Joel Challis 2a56b61a28 [Keyboard] Refactor of onekey to support multiple development boards (#6017)
* Initial refactor of onekey to support multiple development boards

* Fixes to get teensy lc && 3.2 working

* Add pin tables

* Add caveats to Teensy boards

* Correct bootloader for Elite-C
2019-06-26 10:52:09 -07:00
Drashna Jaelre b05c0e46c6 Adds a default value for IS_COMMAND for COMMAND feature (#4301)
* Add default value for IS_COMMAND for COMMAND feature

* Cleanup and consistency

* Update Templates to reflect change

* Fix IS_COMMAND in template

* Fix IS_COMMAND define

* Use consistent IS_COMMAND block in templates

* Remove unnecessary `#undef IS_COMMAND` directives

* Fix compile issue on orthodox

* Reomve IS_COMMAND option for newer boards

* Remove all existing definitions of IS_COMMAND if they use default LSHIFT and RSHIFT setting

* Remove a couple of additional IS_COMMAND defines

* Remove remaining redundant IS_COMMAND definitions

* Remove #undef IS_COMMAND from orthodox:drashna and whitefox:konstantin

* Remove multiple empty lines in modified config.h files

* Update additional boards

* Reomve IS_COMMAND from newer boards

* Update Alice keyboard

* Remove IS_COMMAND from additional boards

Jan 24th edition
2019-01-26 15:49:45 -08:00
noroadsleft 090c30212e handwired/onekey Refactor and readme update (#4590)
* handwired/onekey: refactor

- keyboard now uses a layout macro
- keymap now uses #include QMK_KEYBOARD_H

* handwired/onekey: readme update

Updated Docs links.
2018-12-10 09:22:50 -08:00
MechMerlin 4cfd1e30fc More QMK Configurator Warning/Error Fixes (#2720)
* Add readme with brief description
Change KEYMAP to LAYOUT

* Add readme.md with brief description
Use LAYOUT macro

* add a readme.md file

* Add readme.md with brief description
Use LAYOUT macro

* Add readme.md with brief description
Use LAYOUT macro

* Fix "Warning: contra: Missing layout pp macro for ['planck_mit', 'planck_grid']",

* Use LAYOUT macro
2018-04-11 18:10:55 -04:00
Jack Humbert 791b9cc652 remove all makefiles from keyboard directories 2017-09-27 08:21:09 -10:00