Commit Graph

13175 Commits

Author SHA1 Message Date
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
QMK Bot 8067c3bff5 Merge remote-tracking branch 'origin/master' into develop 2022-08-30 07:20:44 +00:00
jack 035e7fdb8b
Add boardsource/lulu RP2040 support (#18200)
by waffle87
2022-08-30 08:20:05 +01:00
QMK Bot 4a7a4b2b94 Merge remote-tracking branch 'origin/master' into develop 2022-08-30 03:03:51 +00:00
Xelus22 f3d52d8fe8
[Keyboard] Kangaroo Rev2 (#18199) 2022-08-29 20:03:30 -07:00
Less/Rikki 7eb71f72a7
[Keyboard] jacky_studio/piggy60 refactor (#18197) 2022-08-29 20:03:16 -07:00
QMK Bot 774aa2499d Merge remote-tracking branch 'origin/master' into develop 2022-08-29 18:26:02 +00:00
Felix Jen de1d6b6f15
[Keyboard] Add sinanju WK (#17736)
Co-authored-by: Ryan <fauxpark@gmail.com>
2022-08-29 11:25:20 -07:00
QMK Bot bf77307ffb Merge remote-tracking branch 'origin/master' into develop 2022-08-29 18:23:39 +00:00
Felix Jen a6b47de732
[Keyboard] Add Peaker keyboard (#17920)
Co-authored-by: Ryan <fauxpark@gmail.com>
2022-08-29 11:23:23 -07:00
Felix Jen ccb244d5ed
[Keyboard] Add Trailblazer Avalon (#17568)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2022-08-29 11:22:54 -07:00
QMK Bot f87f802d6c Merge remote-tracking branch 'origin/master' into develop 2022-08-29 18:22:52 +00:00
Christian Solje 22136f8135
[Keymap] Add csolje 42 keymap for the cantor (#18125)
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Christian Solje <csolje@gn.com>
2022-08-29 11:22:01 -07:00
QMK Bot 7ef6c179e4 Merge remote-tracking branch 'origin/master' into develop 2022-08-29 04:49:22 +00:00
Stefan 56b93a3ad8
[Keyboard] Add handwired Split 5x7 (#18128)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2022-08-28 21:49:17 -07:00
TJ b719a16b03
[Keyboard] add Nearfield, fix typo in Le Chiffre Readme (#17914) 2022-08-28 21:48:41 -07:00
QMK Bot 2b8d7af941 Merge remote-tracking branch 'origin/master' into develop 2022-08-29 04:48:02 +00:00
bbrfkr a2294bcc97
[Keyboard] Update dynamis keyboard (#17625)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2022-08-28 21:47:30 -07:00
QMK Bot 7084fc3d65 Merge remote-tracking branch 'origin/master' into develop 2022-08-29 04:40:24 +00:00
Simon Hengel 38de991fda
[Keyboard] Add chord/zero (#18190) 2022-08-28 21:39:45 -07:00
QMK Bot 7e246b8a63 Merge remote-tracking branch 'origin/master' into develop 2022-08-29 01:44:06 +00:00
NGatti1997 8b9f0a58b4
Swap KC_VOLD and KC_VOLU on GMMK2 to correct places (#18193) 2022-08-29 02:43:24 +01:00
QMK Bot 0d40c65aee Merge remote-tracking branch 'origin/master' into develop 2022-08-29 01:38:01 +00:00
biesigrr 3f99c42800
Expose Moonlander split detection to user code (#18040) 2022-08-29 02:37:29 +01:00
QMK Bot cfb9486d40 Merge remote-tracking branch 'origin/master' into develop 2022-08-28 20:40:55 +00:00
Jeff Epler 3c3f55c0e9
Add an ez_maker directpins for rp2040 (#17908)
* Add an ez_maker directpins for rp2040

This allows all exposed pins on the Raspberry Pi Pico to be used
as up to 26 individual keys. Keys use a common ground arrangement.

The firmware is also expected to work on generic RP2040 boards, check
manufacturer pinout diagrams or use trial and error to find out the GP#s
of the pins.

* Update keyboards/ez_maker/directpins/rp2040/info.json

Co-authored-by: Joel Challis <git@zvecr.com>

* Changes based on review comments

Co-authored-by: Joel Challis <git@zvecr.com>
2022-08-28 21:40:10 +01:00
QMK Bot a699b24638 Merge remote-tracking branch 'origin/master' into develop 2022-08-28 20:21:18 +00:00
Davide Masserut 0633e71a18
[Keymap] Add Miryoku keymap for Hillside 48 (#18191) 2022-08-28 13:20:30 -07:00
QMK Bot 8fc62cb098 Merge remote-tracking branch 'origin/master' into develop 2022-08-28 19:55:56 +00:00
Ryan 8e113c5991
kegen/gboy: add manufacturer string (#18196) 2022-08-28 12:55:35 -07:00
Drashna Jaelre fa08cb2478
[Keymap] Drashna keymap updates for 0.18.0 (#18184)
Co-authored-by: Ryan <fauxpark@gmail.com>
2022-08-28 12:55:19 -07:00
Ryan 3adaf6a46a
Handle escaping of manufacturer/product strings (#18194) 2022-08-28 19:35:17 +01:00
QMK Bot 10a84d6b93 Merge remote-tracking branch 'origin/master' into develop 2022-08-28 17:16:50 +00:00
Less/Rikki 4adb64a91b
[Keyboard] mechwild/bde cleanup and refactor (#18149) 2022-08-28 10:16:20 -07:00
QMK Bot 75c3e9545c Merge remote-tracking branch 'origin/master' into develop 2022-08-28 17:12:49 +00:00
Matt Chan 585b134729
[Keyboard] Add Kegen G-Boy (#18048)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2022-08-28 10:12:18 -07:00
QMK Bot d2cc8d5060 Merge remote-tracking branch 'origin/master' into develop 2022-08-28 17:11:07 +00:00
Joshua Diamond 37a85e1f9b
More spidey3 userspace cleanup (#18049) 2022-08-28 10:10:28 -07:00
Ryan d983251c10
Switch over MANUFACTURER and PRODUCT to string literals (#18183) 2022-08-28 09:59:40 -07:00
James Young efdd4f4d50
Clean-up of `#define _ADJUST 16` instances (#18182)
* enum layer_names: 40percentclub/nori default keymap

* enum layer_names: ergotravel default keymap

* enum layer_names: handwired/atreus50 default keymap

* enum layer_names: handwired/ortho5x13 default keymap

* enum layer_names: keebio/levinson default keymap

* enum layer_names: keebio/nyquist default keymap

* enum layer_names: keebio/rorschach default keymap

* enum layer_names: keebio/viterbi default keymap

* enum layer_names: keebio/wavelet default keymap

* enum layer_names: lets_split default keymap

* enum layer_names: maple_computing/launchpad reference keymaps

Update `default` and `default_rgb` keymaps.

* enum layer_names: maple_computing/minidox default keymap

* enum layer_names: miniaxe reference keymaps

Update `default` and `underglow` keymaps.

* enum layer_names: omkbd/ergodash/mini default keymap

* enum layer_names: omkbd/ergodash/rev1 default keymap

* enum layer_names: orthodox default keymap

* enum layer_names: unikeyboard/divergetm2 default keymap

* enum layer_names: woodkeys/scarletbandana default keymap

* add _Static_assert to keymap_introspection.c
2022-08-27 23:13:44 -07:00
Joel Challis 43fd647130
Add eeprom defaults for tinyuf2 bootloader (#18042) 2022-08-25 21:17:41 +10:00
QMK Bot fdb0cc5981 Merge remote-tracking branch 'origin/master' into develop 2022-08-24 20:41:37 +00:00
Joel Challis 4a67123310
Refactor pianoforte for configurator (#18159) 2022-08-24 13:39:49 -07:00
QMK Bot 3aba764b43 Merge remote-tracking branch 'origin/master' into develop 2022-08-24 20:39:34 +00:00
Joel Challis e95aa2a352
Fix use of encoder map in mechlovin/zed65/retro66 (#18158) 2022-08-24 13:38:53 -07:00
QMK Bot fa25cacf6a Merge remote-tracking branch 'origin/master' into develop 2022-08-24 20:38:47 +00:00
Joel Challis b2db8becf9
Fix use of encoder map in mechlovin/foundation (#18157) 2022-08-24 13:38:07 -07:00
QMK Bot 5f371104bc Merge remote-tracking branch 'origin/master' into develop 2022-08-24 18:11:55 +00:00
Joel Challis 7fab889696
Fix use of encoder map in mechwild/clunker (#18156) 2022-08-24 19:10:52 +01:00
Ryan cf41c24db8
Move keyboard USB IDs and strings to data driven: develop (#18152)
* Move keyboard USB IDs and strings to data driven: develop

* Also do new onekeys
2022-08-24 15:28:38 +01:00