Commit graph

12 commits

Author SHA1 Message Date
Stefan Kerkmann
3f5dc47296
[Core] Use polled waiting on ChibiOS platforms that support it (#17607)
* Use polled waiting on platforms that support it

Due to context switching overhead waiting a very short amount of time on
a sleeping thread is often not accurate and in fact not usable for timing
critical usage i.e. in a driver. Thus we use polled waiting for ranges
in the us range on platforms that support it instead. The fallback is
the thread sleeping mechanism.

This includes:

* ARM platforms with CYCCNT register (ARMv7, ARMv8) this is
  incremented at CPU clock frequency
* GD32VF103 RISC-V port with CSR_MCYCLE register this is incremented at
  CPU clock frequency
* RP2040 ARMv6 port which uses the integrated timer peripheral which is
  incremented with a fixed 1MHz frequency

* Use wait_us() instead of chSysPolledDelayX

...as it is powered by busy waiting now.

* Add chibios waiting methods test bench
2022-07-11 15:17:05 +02:00
Stefan Kerkmann
d717396708
[Core] Add Raspberry Pi RP2040 support (#14877)
* Disable RESET keycode because of naming conflicts

* Add Pico SDK as submodule

* Add RP2040 build support to QMK

* Adjust USB endpoint structs for RP2040

* Add RP2040 bootloader and double-tap reset routine

* Add generic and pro micro RP2040 boards

* Add RP2040 onekey keyboard

* Add WS2812 PIO DMA enabled driver and documentation

Supports regular and open-drain output configuration. RP2040 GPIOs are
sadly not 5V tolerant, so this is a bit use-less or needs extra hardware
or you take the risk to fry your hardware.

* Adjust SIO Driver for RP2040

* Adjust I2C Driver for RP2040

* Adjust SPI Driver for RP2040

* Add PIO serial driver and documentation

* Add general RP2040 documentation

* Apply suggestions from code review

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

Co-authored-by: Nick Brassel <nick@tzarc.org>
2022-06-30 13:19:27 +02:00
Thomas Preisner
bbab8eb993
Make bootloader_jump for dualbank STM32 respect STM32_BOOTLOADER_DUAL_BANK_DELAY (#17178) 2022-05-30 23:20:10 -07:00
Drashna Jaelre
787a68948f
[Core] Add Reboot keycode to core (#15990) 2022-05-14 13:35:49 +10:00
QMK Bot
c3a03b6423
[CI] Format code according to conventions (#16888) 2022-04-19 21:28:14 +10:00
Joy Lee
25f849b397
Update wb32-dfu (#16438) 2022-04-19 21:21:12 +10:00
QMK Bot
63646e8906
Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
Nick Brassel
0be2eaf174
Create a build error if no bootloader is specified. (#16181)
* Create a build error if no bootloader is specified.

* Update builddefs/bootloader.mk

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

Co-authored-by: Ryan <fauxpark@gmail.com>
2022-02-03 19:22:49 +11:00
Dasky
08a42dc72c
Fix broken bootloader builds in develop. (#15880) 2022-01-15 01:04:58 +00:00
Ryan
5fb93934d0
Fixes for bootloader refactor build failures (#15638) 2022-01-06 06:55:46 +11:00
QMK Bot
be2265d0d1
Format code according to conventions (#15593) 2021-12-27 21:20:52 +11:00
Ryan
6bc870d899
Refactor bootloader_jump() implementations (#15450)
* Refactor `bootloader_jump()` implementations

* Fix tests?

* Rename `atmel-samba` to `md-boot`
2021-12-27 21:10:07 +11:00