You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

299 lines
8.9 KiB

Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
Add Anne Pro 2 keyboard (#14385) * [keyboard] Initial support for Anne Pro 2 * [keyboard][AnnePro2] Keymap:update to a reasonable keymap with caps+hjkl => arrow * :( * changed to use HSI * support for annepro2 c18 * keyboard/annepro2: Very stupid matrix scan bug fix. * typo * swap COL14/13 * keyboard/annepro2: startup secondary LED MCU * keyboard/annepro2: typo fix * Add IO Values * Disable Combo feature * Update default keymap to Anne Pro 2 Official Keymap * keyboard/annepro2: keymap layer name changes * keyboard/annepro2 BLE Support * Fix keymap comment FN1 ESC was listed as ~ instead of ` * keyboard/annepro2: Bluetooth path * Keyboard annepro2 bidir led comms (#5) * Added bidirectional shine comms and moved led functionality to new file * Added bidirectional shine comms and moved led functionality to new file * Restore original functionality to existing keymaps using new shine commands * Fix dangling bracketless if statements * PR cleanup * add custom keycodes to switch led profiles * Optimize code * switch to prev profile before turning leds off * Add persistent led support with eeprom (#9) * adding HT32 support to chibios SPI master driver * add support for W25X20CL SPI eeprom * add makefile flag for eeprom feature * add spi support to keyboard startup and config * example keymap using eeprom profile loading * Cleanup to fix C15 eeprom/spi build errors (#11) * Cleanup to fix C15 eeprom/spi build errors * add newline at eof * LED Masking support for Shine Introduce companion update to ledSetMask and ledClearMask. In keymap `codetector` there is example of how to map caps_lock to the caps_lock key light on the keyboard. * [AnnePro2]: update bluetooth connection * Merge the custom keys enums on annepro2.h (#13) * Keyboard annepro2 ble caps lock (#12) * Move matrix_scan_kb out of board.c to annepro2.c * add buffer clear after init and caplock polling * Add support for LED intensity (#15) * Improve logic for switching off and on of LEDs (#16) * Implement animation speed (#17) * Include logic to send solid colors as foreground to shine and add sample profiles (#14) Include the logic to send a solid color from qmk to shine. That solid color will act as a foreground (will override the current profile) until reset (witch will reactivate the current profile). This functionality depends on changes made for shine as well. Include 3 new profiles: default-full-caps -> same as default, but with the logic of using the red foreground color on caps lock. default-layer-indicators -> same as default, but with the logic of red foreground on caps lock, green foreground on FN1 and blue foreground on FN2. thomazmoura -> my own profile as a sample of an over-engineered advanced case scenario. * Implement reactive lighting effects (#18) * Added multiarrow keymap (#19) * Add LED documentation (#26) * add LED documentation * add LED documentation to other default profiles * Implement QMK's IAP default keybind (#29) * Add keymap for going into IAP * switch to default QMK keybind for IAP mode * implement bluetooth IAP mode * Make default config more like Obins stock default (#30) * Add new message type for resetting foreground color (#31) * annepro2(bluetooth): add media keys support (#41) * Asynchronous, robust serial protocol. (#39) * bla personal ap2-c18 keymap. * Bidirectional, asynchronous message-based communication with Shine. - Requires a matching Shine version. - Protocol is resiliant to loosing bytes during communication, chips won't lock waiting for bytes that aren't coming. - Chips resynchronize in event of loosing a byte using a AA0D header. Regressions: - Key masking/locking doesn't work right now. (did it work before?) - Not all user keymaps build against it. * Clang-format + code to ease reducing speed of LED UART. - Did clang-format --style=file -i on multiple files according to coding_conventions_c.md - Added separate serial speed for IAP boot and Led communication, it's possible that reducing this to 9600 helped someone with faulty HW. With this code they can do it with simple replacing of a value. * Main chip can set/clear foreground using a mask mechanism. - Some preparations for selective colouring. * Selective mask works - tested on capslock. - Migrated personal keymaps to new status API. * Clear the foreground colors to show profile when it's modified. - Show example of achieving selective caps-lock painting + foreground painting for layers. - annepro2LedMaskSetRow is implemented, but still requires testing. * Implement the QMK side of led blinking to indicate the command was received. - This stupidly blinks the key when user presses one of the bluetooth commands to let the user know that the command was received and forwarded to the BT chip. - TODO: Row/col key positions are hardcoded and not taken from the keymap. * Reduce memory footprint. Applying code review suggestions. Moved msgId to globals - preparing for transmission without copying payload when no retries are necessary. Added empty readme.md files - required by QMK lint. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * Let the LED chip settle a bit before waking it from the bootloader. (#42) At least for one person that helps to reliably get the LEDs working without disconnecting/reconnecting the power to the board multiple times. Co-authored-by: Tomasz bla Fortuna <bla@thera.be> * annepro2: rename KEYMAP to LAYOUT, as required by new version of QMK * annepro2: update ChibiOS configuration files * annepro2: fix undefined reference to dprint and timer_read32 * annepro2: update ChibiOS MCU name * update spi driver, fix bad merging with master * annepro2: add readme and info.json * annepro2: make code compatible with QMK coding conventions * tmk_core: temporary fix to allow HT32 based keyboards to work without patched ChibiOS-contrib (AnnePro2) * AnnePro2: removed core changes * AnnePro2: Leave only default keymaps Missing keymaps will be restored in another PR * annepro2: add licence information * annepro2: satisfy qmk lint * annepro2: fix drashna's suggestions * annepro2: fix matrix * annepro2: apply code review suggestions * annepro2: apply remaining code review suggestions * annepro2: update info.json * annepro2: remove include * annepro2: rename keymap to layout * annepro2: fix typing * annepro2: apply suggestions from tzarc's code review Co-authored-by: Nick Brassel <nick@tzarc.org> * annepro2: more fixes * annepro2: apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * annepro2: rename file * more fixes * Apply suggestions from @tzarc code review Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/protocol.h Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/annepro2/chconf.h Co-authored-by: Nick Brassel <nick@tzarc.org> * apply CR suggestions * upgrade readme * IAP * update IAP comments, defines * led fix * init fix * annepro2: GPIO cleanup * annepro2: ioline * change waiting time * Start develop for 2022q2 * [Core] Squeeze AVR some more with `-mrelax` and `-mcall-prologues` (#16269) * Rework generate-api CLI command to use .build directory (#16441) * Remove `send_unicode_hex_string()` (#16518) * Change data driven "str" type to represent a quoted string literal (#16516) * Change data driven "str" type to represent a quoted string literal * Update docs * Map data driven `DESCRIPTION` as string literal (#16523) * update bootloader * Revert "Merge pull request #2 from qmk/develop" This reverts commit 9c76065188c3adda98bdaa1f28dad85600e73ee9, reversing changes made to 240745dc05783c612e92bab153da5c46e037d675. * Revert "update bootloader" This reverts commit 240745dc05783c612e92bab153da5c46e037d675. * fix rules.mk * change PROGRAM_CMD Co-authored-by: codetector <codetector@codetector.cn> Co-authored-by: Fagl4 <18francisco18@gmail.com> Co-authored-by: Jakob Gillich <jakob@gillich.me> Co-authored-by: tech2077 <tech2077@gmail.com> Co-authored-by: jcdeA <31413538+JcdeA@users.noreply.github.com> Co-authored-by: Thomaz Moura <5599621+thomazmoura@users.noreply.github.com> Co-authored-by: Darkhan <darkhanu@gmail.com> Co-authored-by: Paco <70448173+packorf@users.noreply.github.com> Co-authored-by: jmarmstrong1207 <32995055+jmarmstrong1207@users.noreply.github.com> Co-authored-by: 1Conan <7620342+1Conan@users.noreply.github.com> Co-authored-by: Tomasz bla Fortuna <blagh@thera.be> Co-authored-by: Tomasz bla Fortuna <bla@thera.be> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: QMK Bot <hello@qmk.fm> Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Ryan <fauxpark@gmail.com>
2 years ago
  1. /* Copyright 2021 OpenAnnePro community
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include "hal.h"
  17. #include "annepro2.h"
  18. #include "annepro2_ble.h"
  19. #include "spi_master.h"
  20. #include "ap2_led.h"
  21. #include "protocol.h"
  22. #define RAM_MAGIC_LOCATION 0x20001ffc
  23. #define IAP_MAGIC_VALUE 0x0000fab2
  24. static const SerialConfig led_uart_init_config = {
  25. .speed = 115200,
  26. };
  27. #ifndef LED_UART_BAUD_RATE
  28. # define LED_UART_BAUD_RATE 115200
  29. #endif // LED_UART_BAUD_RATE
  30. static const SerialConfig led_uart_runtine_config = {
  31. .speed = LED_UART_BAUD_RATE,
  32. };
  33. static const SerialConfig ble_uart_config = {
  34. .speed = 115200,
  35. };
  36. static uint8_t led_mcu_wakeup[11] = {0x7b, 0x10, 0x43, 0x10, 0x03, 0x00, 0x00, 0x7d, 0x02, 0x01, 0x02};
  37. ble_capslock_t ble_capslock = {._dummy = {0}, .caps_lock = false};
  38. #ifdef RGB_MATRIX_ENABLE
  39. static uint8_t led_enabled = 1;
  40. static uint8_t current_rgb_row = 0;
  41. #endif
  42. void bootloader_jump(void) {
  43. // Send msg to shine to boot into IAP
  44. ap2_set_IAP();
  45. // wait for shine to boot into IAP
  46. wait_ms(15);
  47. // Load ble into IAP
  48. annepro2_ble_bootload();
  49. wait_ms(15);
  50. // Magic key to set keyboard to IAP
  51. // It’s from reversing original boot loader
  52. // If value is that it stays in boot loader aka IAP
  53. *((uint32_t *)RAM_MAGIC_LOCATION) = IAP_MAGIC_VALUE;
  54. // Load the main MCU into IAP
  55. __disable_irq();
  56. NVIC_SystemReset();
  57. }
  58. void keyboard_pre_init_kb(void) {
  59. // Start LED UART
  60. sdStart(&SD0, &led_uart_init_config);
  61. /* Let the LED chip settle a bit before switching the mode.
  62. * That helped at least one person. */
  63. wait_ms(15);
  64. sdWrite(&SD0, led_mcu_wakeup, sizeof(led_mcu_wakeup));
  65. // wait to receive response from wakeup
  66. wait_ms(15);
  67. proto_init(&proto, led_command_callback);
  68. // loop to clear out receive buffer from shine wakeup
  69. while (!sdGetWouldBlock(&SD0)) sdGet(&SD0);
  70. sdStart(&SD0, &led_uart_runtine_config);
  71. keyboard_pre_init_user();
  72. }
  73. void keyboard_post_init_kb(void) {
  74. // Start BLE UART
  75. sdStart(&SD1, &ble_uart_config);
  76. annepro2_ble_startup();
  77. // Give the send uart thread some time to
  78. // send out the queue before we read back
  79. wait_ms(100);
  80. // loop to clear out receive buffer from ble wakeup
  81. while (!sdGetWouldBlock(&SD1)) sdGet(&SD1);
  82. ap2_led_get_status();
  83. #ifdef RGB_MATRIX_ENABLE
  84. ap2_led_enable();
  85. ap2_led_set_manual_control(1);
  86. #endif
  87. keyboard_post_init_user();
  88. }
  89. void matrix_scan_kb() {
  90. // if there's stuff on the ble serial buffer
  91. // read it into the capslock struct
  92. while (!sdGetWouldBlock(&SD1)) {
  93. sdReadTimeout(&SD1, (uint8_t *)&ble_capslock, sizeof(ble_capslock_t), 10);
  94. }
  95. /* While there's data from LED keyboard sent - read it. */
  96. while (!sdGetWouldBlock(&SD0)) {
  97. uint8_t byte = sdGet(&SD0);
  98. proto_consume(&proto, byte);
  99. }
  100. #ifdef RGB_MATRIX_ENABLE
  101. /* If there's data ready to be sent to LED MCU - send it. */
  102. if(rgb_row_changed[current_rgb_row])
  103. {
  104. rgb_row_changed[current_rgb_row] = 0;
  105. ap2_led_colors_set_row(current_rgb_row);
  106. }
  107. current_rgb_row = (current_rgb_row + 1) % NUM_ROW;
  108. #endif
  109. matrix_scan_user();
  110. }
  111. bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  112. if (record->event.pressed) {
  113. if (ap2_led_status.matrix_enabled && ap2_led_status.is_reactive) {
  114. ap2_led_forward_keypress(record->event.key.row, record->event.key.col);
  115. }
  116. const ap2_led_t blue = {
  117. .p.blue = 0xff,
  118. .p.red = 0x00,
  119. .p.green = 0x00,
  120. .p.alpha = 0xff,
  121. };
  122. switch (keycode) {
  123. case KC_AP2_BT1:
  124. annepro2_ble_broadcast(0);
  125. /* FIXME: This hardcodes col/row position */
  126. ap2_led_blink(0, 1, blue, 8, 50);
  127. return false;
  128. case KC_AP2_BT2:
  129. annepro2_ble_broadcast(1);
  130. ap2_led_blink(0, 2, blue, 8, 50);
  131. return false;
  132. case KC_AP2_BT3:
  133. annepro2_ble_broadcast(2);
  134. ap2_led_blink(0, 3, blue, 8, 50);
  135. return false;
  136. case KC_AP2_BT4:
  137. annepro2_ble_broadcast(3);
  138. ap2_led_blink(0, 4, blue, 8, 50);
  139. return false;
  140. case KC_AP2_USB:
  141. annepro2_ble_disconnect();
  142. return false;
  143. case KC_AP2_BT_UNPAIR:
  144. annepro2_ble_unpair();
  145. return false;
  146. case KC_AP_LED_OFF:
  147. ap2_led_disable();
  148. break;
  149. case KC_AP_LED_ON:
  150. if (ap2_led_status.matrix_enabled) {
  151. ap2_led_next_profile();
  152. } else {
  153. ap2_led_enable();
  154. }
  155. ap2_led_reset_foreground_color();
  156. break;
  157. case KC_AP_LED_TOG:
  158. if (ap2_led_status.matrix_enabled) {
  159. ap2_led_disable();
  160. } else {
  161. ap2_led_enable();
  162. ap2_led_reset_foreground_color();
  163. }
  164. break;
  165. case KC_AP_LED_NEXT_PROFILE:
  166. ap2_led_next_profile();
  167. ap2_led_reset_foreground_color();
  168. break;
  169. case KC_AP_LED_PREV_PROFILE:
  170. ap2_led_prev_profile();
  171. ap2_led_reset_foreground_color();
  172. break;
  173. case KC_AP_LED_NEXT_INTENSITY:
  174. ap2_led_next_intensity();
  175. ap2_led_reset_foreground_color();
  176. return false;
  177. case KC_AP_LED_SPEED:
  178. ap2_led_next_animation_speed();
  179. ap2_led_reset_foreground_color();
  180. return false;
  181. #ifdef RGB_MATRIX_ENABLE
  182. case RGB_TOG:
  183. if(rgb_matrix_is_enabled()) ap2_led_disable();
  184. else ap2_led_enable();
  185. return true;
  186. case KC_AP_RGB_VAI:
  187. if (record->event.pressed) {
  188. if (get_mods() & MOD_MASK_SHIFT) {
  189. rgb_matrix_increase_hue();
  190. return false;
  191. } else if (get_mods() & MOD_MASK_CTRL) {
  192. rgb_matrix_decrease_hue();
  193. return false;
  194. } else {
  195. rgb_matrix_increase_val();
  196. }
  197. }
  198. return true;
  199. case KC_AP_RGB_VAD:
  200. if (record->event.pressed) {
  201. if (get_mods() & MOD_MASK_SHIFT) {
  202. rgb_matrix_increase_sat();
  203. return false;
  204. } else if (get_mods() & MOD_MASK_CTRL) {
  205. rgb_matrix_decrease_sat();
  206. return false;
  207. } else {
  208. rgb_matrix_decrease_val();
  209. }
  210. }
  211. return true;
  212. case KC_AP_RGB_TOG:
  213. if (record->event.pressed) {
  214. if (get_mods() & MOD_MASK_SHIFT) {
  215. rgb_matrix_increase_speed();
  216. return false;
  217. } else if (get_mods() & MOD_MASK_CTRL) {
  218. rgb_matrix_decrease_speed();
  219. return false;
  220. } else {
  221. if (led_enabled) {
  222. ap2_led_disable();
  223. rgb_matrix_disable();
  224. led_enabled = 0;
  225. } else {
  226. ap2_led_enable();
  227. rgb_matrix_enable();
  228. led_enabled = 1;
  229. }
  230. return true;
  231. }
  232. }
  233. return true;
  234. case KC_AP_RGB_MOD:
  235. if (record->event.pressed) {
  236. if (get_mods() & MOD_MASK_CTRL) {
  237. rgb_matrix_step_reverse();
  238. return false;
  239. } else {
  240. rgb_matrix_step();
  241. }
  242. }
  243. return true;
  244. #endif
  245. default:
  246. break;
  247. }
  248. }
  249. return process_record_user(keycode, record);
  250. }