Commit Graph

96 Commits (47145a6ce8bdb17b50aee5c6ac2775ea92016bd6)

Author SHA1 Message Date
Ryan 21ed9b4575
Simplify more feature driver defines (#22090) 2023-09-25 13:06:42 +10:00
Nick Brassel c597731d1d
Merge remote-tracking branch 'upstream/master' into develop 2023-09-25 13:03:02 +10:00
Michael Büchler 4d994458f0
Document the RP2040-specific PS/2 implementation (#22079)
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
2023-09-25 13:00:13 +10:00
Purdea Andrei 408d61dcfb
Chibios SPI driver: allow some SPI pins to be left unassigned (#20315)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2023-09-25 12:54:22 +10:00
Nebuleon 2f4e1a78ad
Reduce popping during audio initialization using the additive DAC (#21642) 2023-09-25 12:26:32 +10:00
Nebuleon 1d94de5358
Optimize the additive DAC code, fixing performance-related hangs (#21662) 2023-09-25 12:26:02 +10:00
QMK Bot 8f9847248a Merge remote-tracking branch 'origin/master' into develop 2023-09-18 18:56:34 +00:00
Dasky 16f2a3e2f8
Add missing gpio include to ps2 vendor (#22063) 2023-09-18 19:55:51 +01:00
QMK Bot 78fdebb130 Merge remote-tracking branch 'origin/master' into develop 2023-09-17 12:19:00 +00:00
Constantine Karos 1fbd45a594
Add missing gpio and chibios defs to uart.h (#22033) 2023-09-17 13:18:26 +01:00
Joel Challis 1b637287a1
Default wear leveling logical size to half backing (#22006) 2023-09-14 07:13:21 +10:00
Thomas Weißschuh b9f2121d10
chibios: mark boot2 bootlader data readonly (#21986) 2023-09-13 16:48:38 +10:00
Ryan 41bd4e35a0
Clean up RGB LED type (#21859) 2023-09-04 01:19:59 +01:00
Nebuleon e971ce290c
Remove needless precision in additive DAC sample generation (#21498) 2023-07-26 21:06:14 -07:00
Nebuleon 821db155f2
Fix stuck note with square wave in additive DAC (#21589) 2023-07-26 21:00:27 -07:00
Nebuleon a5e33b1c28
Allow the user to select one tone for the additive DAC (#21591)
Previously, if the user tried to use `#define AUDIO_MAX_SIMULTANEOUS_TONES 1` to conserve CPU time, their firmware would fail to build with this error:

```
platforms/chibios/drivers/audio_dac_additive.c:91:73: error: excess elements in array initializer [-Werror]
   91 | static float   active_tones_snapshot[AUDIO_MAX_SIMULTANEOUS_TONES] = {0, 0};
      |                                                                          ^
```

This also affected the preset `#define AUDIO_DAC_QUALITY_VERY_HIGH`, which called up only one simultaneous tone at 88200 Hz.
2023-07-23 11:44:41 +01:00
Ryan da2d2f947d
quantum: remove direct `quantum.h` includes (#21507) 2023-07-16 23:42:56 +10:00
Ryan b6d9409d2f
drivers: remove direct `quantum.h` includes (#21473) 2023-07-09 20:03:50 +10:00
Ryan cb2331713c
Relocate backlight drivers (#21444) 2023-07-08 23:13:10 +10:00
Sergey Vlasov b708658e2e
usbpd_stm32g4: Configure UCPD before disabling the dead battery mode (#21430) 2023-07-03 08:53:54 +10:00
Drashna Jaelre cf5626e024
[Bug] Fix compilation issues with PS/2 driver on F4x1 controllers (#20433) 2023-04-12 21:43:27 -07:00
Ryan 47966dc2a6
Migrate `rgblight.pin` and `RGB_DI_PIN` to `ws2812.pin` (#20303) 2023-04-06 18:00:54 +10:00
Nick Brassel 06c5c02804
Disable specific warnings to mitigate compilation problems with `KEEP_INTERMEDIATES=yes`. (#20339) 2023-04-05 14:59:09 +10:00
Ryan 647c2835e6
WS2812 driver improvements (#20262) 2023-03-30 12:21:02 +11:00
Marek Kraus e640fd65ff
[Core] PS/2 PIO Driver for RP2040 (#17893)
Co-authored-by: Johannes H. Jensen <joh@pseudoberries.com>
2023-03-25 11:48:28 +01:00
Sergey Vlasov 81ca83296f
analog.c: Fix `pinToMux()` for STM32F0xx (#19658)
The `adc_read()` code for STM32F0xx expects to get the 0-based channel
number in `mux.input`, but the `pinToMux()` code for STM32F0xx was
attempting to pass the CHSELR bit mask in that field, which resulted in
selecting a wrong channel, therefore `analogReadPin()` did not work
properly for the STM32F0xx chips.  Fix `pinToMux()` to put the channel
number in that field (this matches the behavior for other supported
chips and also allows selection of channels 16...18, which can be used
to access the builtin temperature, reference voltage and VBAT sensors).
2023-01-25 01:47:55 +00:00
Stefan Kerkmann 8ca3f0fb7c
[Bug] rp2040: fix timer wrap deadlock in ws2812 vendor driver (#19652)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2023-01-23 22:24:21 +01:00
David Hoelscher aea1194ea3
Corrections to uart driver for Chibios platform (#19075) 2023-01-24 07:05:47 +11:00
Ryan cf935d97ae
Fix functions with empty params (#19647)
* Fix functions with empty params

* Found a bunch more
2023-01-20 16:21:17 +00:00
Sergey Vlasov 272281f1a0
Add analog support for RP2040 (#19453)
Co-authored-by: Ryan <fauxpark@gmail.com>
2023-01-19 10:30:58 +11:00
Stefan Kerkmann ec09087543
Update ChibiOS[-Contrib], SIO driver, configs (#17915)
Co-authored-by: Nick Brassel <nick@tzarc.org>
2023-01-12 21:47:36 +11:00
Nick Brassel cf3c26533c
Fixup EFL and F4's sector selection. (#19221) 2022-12-02 21:55:28 +11:00
Nick Brassel bebfdad795
NVRAM refactor, phase 1. (#18969)
* Rename `eeprom_stm32` to `eeprom_legacy_emulated_flash`.

* Rename `flash_stm32` to `legacy_flash_ops`.

* Rename `eeprom_teensy` to `eeprom_kinetis_flexram`.
2022-11-23 08:50:19 +00:00
Nick Brassel 092228571c
Move EFL wear-leveling driver to be default for F1, F3, F4, L4, G4, WB32, GD32V. (#19020) 2022-11-11 23:57:44 +00:00
jack dad5262425
Fixup WS2812 vendor driver (#19028) 2022-11-11 09:38:13 +11:00
Stefan Kerkmann 27dec8d16d
[Core] Allow custom timings for WS2812 PIO driver (#18006) 2022-11-10 07:58:15 +11:00
Joy Lee 9435ad19ee
Added analog support for WB32 MCU. (#18289)
Co-authored-by: Joy <chang.li@westberrytech.com>
2022-11-01 15:04:15 +11:00
Stefan Kerkmann 19145704e4
[Core] Adjust PWM hardware audio driver for RP2040 (#17723) 2022-10-27 19:26:16 +02:00
Thomas Kriechbaumer c4f99f06ab
ws2812: replace RGBLED_NUM with driver-owned constant to decouple driver from RGBLEDs/RGBMATRIX defines (#18036) 2022-10-21 08:17:51 +11:00
Stefan Kerkmann b6ea8837e4
[Bug] RP2040: only clear RX FIFO for serial pio driver clear (#18581) 2022-10-04 19:56:40 +01:00
Stefan Kerkmann 6bbcabe0cc
[Core] Serial-protocol: always clear receive queue on main half of split keyboard (#18419) 2022-10-03 18:23:45 +02:00
Stefan Kerkmann 881aab9e76
Stabilize Half-duplex PIO split comms take 2 (#18421)
...by moving the actually timing critical `enter_rx_state()` and
`leave_rx_state()` functions to RAM in order to not be affected by XIP
cache spikes. This commit also reverts the hacky USB interrupt disabling
that was done in 293c53d774
2022-09-20 08:54:43 +02:00
Ryan 33c47fe010
Add UART support for Kinetis boards (#18370)
* Add UART support for Kinetis boards

* Default PAL mode for GPIOV1
2022-09-17 02:24:03 +01:00
Jeff Epler 9632360caa
Use a macro to compute the size of arrays at compile time (#18044)
* Add ARRAY_SIZE and CEILING utility macros

* Apply a coccinelle patch to use ARRAY_SIZE

* fix up some straggling items

* Fix 'make test:secure'

* Enhance ARRAY_SIZE macro to reject acting on pointers

The previous definition would not produce a diagnostic for
```
int *p;
size_t num_elem = ARRAY_SIZE(p)
```
but the new one will.

* explicitly get definition of ARRAY_SIZE

* Convert to ARRAY_SIZE when const is involved

The following spatch finds additional instances where the array is
const and the division is by the size of the type, not the size of
the first element:
```
@ rule5a using "empty.iso" @
type T;
const T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)

@ rule6a using "empty.iso" @
type T;
const T[] E;
@@

- sizeof(E)/sizeof(T)
+ ARRAY_SIZE(E)
```

* New instances of ARRAY_SIZE added since initial spatch run

* Use `ARRAY_SIZE` in docs (found by grep)

* Manually use ARRAY_SIZE

hs_set is expected to be the same size as uint16_t, though it's made
of two 8-bit integers

* Just like char, sizeof(uint8_t) is guaranteed to be 1

This is at least true on any plausible system where qmk is actually used.

Per my understanding it's universally true, assuming that uint8_t exists:
https://stackoverflow.com/questions/48655310/can-i-assume-that-sizeofuint8-t-1

* Run qmk-format on core C files touched in this branch

Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2022-08-30 10:20:04 +02:00
Nick Brassel 1eac095c0c
Use the correct bootloader definition. (#18102) 2022-08-19 05:20:44 +01:00
Joel Challis 463fb72d29
Partially revert some WB32 specific changes (#18038) 2022-08-14 20:48:44 +01:00
yiancar dfc92d8f7b
Fix buffer size for WS2812 PWM driver (#17046)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
Co-authored-by: yiancar <yiancar@gmail.com>
2022-08-13 18:36:34 -07:00
Joy Lee c02d7ae86f
Added ws2812_pwm support for WB32 MCU. (#17142)
Co-authored-by: Joy <chang.li@westberrytech.com>
2022-08-13 18:21:46 -07:00
Joy Lee 6b1c7d20aa
Added ws2812_spi support for WB32 MCU (#17143)
Co-authored-by: Joy <chang.li@westberrytech.com>
2022-08-13 18:09:57 -07:00
Joy Lee 19ce1418ba
Added implementation of WB32 MCU wear_leveling_efl. (#17579) 2022-08-13 02:14:33 +01:00