Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate UHK 80 features #816

Merged
merged 1,147 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1147 commits
Select commit Hold shift + click to select a range
762a2cf
PoC of module status over UsbCommand_GetDeviceState
kareltucek Jul 6, 2024
b22419f
Merge pull request #197 from UltimateHackingKeyboard/module_status
mondalaci Jul 6, 2024
0473d5a
bt-advertise: remove the second bt_le_adv_start call that always sele…
benedekkupper Jul 12, 2024
eaac911
Make the firmware build on the dongle.
mondalaci Jul 13, 2024
dc80987
Merge pull request #203 from UltimateHackingKeyboard/bt-advertise-fix
mondalaci Jul 14, 2024
53e2425
use west to implement a more portable repo patching system
benedekkupper Jul 9, 2024
a2e644a
Merge pull request #201 from UltimateHackingKeyboard/patching
mondalaci Jul 15, 2024
78cfe21
ci: GitHub Action firmware build (#209)
ert78gb Jul 16, 2024
60f67f8
Fix UHK 60 builds. Fixes #208.
mondalaci Jul 16, 2024
3dc5e90
ci: Zephyr project setup (#210)
ert78gb Jul 16, 2024
2b8b331
Revert "use west to implement a more portable repo patching system"
mondalaci Jul 23, 2024
a2fc1fb
Revert "Revert "use west to implement a more portable repo patching s…
mondalaci Jul 24, 2024
4644d94
Enable the DFU USB interface of MCUboot.
mondalaci Jul 26, 2024
c12b071
Add released KBOOT binaries and add merged and kboot keys to scripts/…
mondalaci Jul 26, 2024
64e354e
west patch: abort if patching fails
benedekkupper Jul 26, 2024
8092d5e
refactor versions generation:
benedekkupper Jul 26, 2024
2c3dcae
Merge pull request #215 from UltimateHackingKeyboard/versions-cmake
mondalaci Jul 28, 2024
2116d1a
Merge cd commands
mondalaci Jul 28, 2024
7e47a0d
Add instruction for zephyr-sdk related make-release.mjs error message.
mondalaci Jul 28, 2024
a8a4fe7
Only add CONFIG_ADC=y for the left and right halves but not for the d…
mondalaci Jul 28, 2024
6aa06e0
Merge branch 'master' of github.com:UltimateHackingKeyboard/firmware-…
mondalaci Jul 28, 2024
a456650
Move CONFIG_UART_1_* Kconfig options from prj.conf to uhk-80-{left,ri…
mondalaci Jul 28, 2024
964fcdb
Fix the "No SOURCES given to Zephyr library: drivers__spi" dongle bui…
mondalaci Jul 28, 2024
357280c
build: add merged and kboot file to firmware bundle
ert78gb Jul 31, 2024
168f43e
Add build instructions to enter Nordic's shell environment
mondalaci Aug 1, 2024
b4a352a
Merge pull request #216 from UltimateHackingKeyboard/build-add-merge-…
mondalaci Aug 1, 2024
fab1ad1
Add Kconfig keys to make pairing Bluetooth devices possible, one afte…
mondalaci Aug 1, 2024
b2f0aa6
Merge branch 'master' of github.com:UltimateHackingKeyboard/firmware-…
mondalaci Aug 1, 2024
5a29a32
Remove CONFIG_BOOT_USB_DFU_WAIT=y because it always introduced startu…
mondalaci Aug 28, 2024
98b3344
Minor buildscript fixes.
kareltucek Sep 1, 2024
e9f28ba
Update VIDs and PIDs.
mondalaci Sep 1, 2024
b396f1f
Connect i2c / slave scheduler.
kareltucek Sep 2, 2024
ed85923
Transfer left module data to right.
kareltucek Sep 2, 2024
f1265a5
Remove USB_DFU_BCD_DEVICE_ID
mondalaci Sep 2, 2024
1f8a7fb
Handle module status, especially correct disconnect.
kareltucek Sep 2, 2024
c503fc9
Fix navigation modes.
kareltucek Sep 2, 2024
cf36558
Update VID.
mondalaci Sep 2, 2024
b419598
Merge pull request #221 from UltimateHackingKeyboard/modules
mondalaci Sep 2, 2024
8739db3
Fix merge sensor and refactor device.h
kareltucek Sep 3, 2024
d60c80f
Merge pull request #223 from UltimateHackingKeyboard/merge_sensor
mondalaci Sep 3, 2024
383fe30
Update UHK 60 USB VID and PIDs.
mondalaci Sep 5, 2024
17ddd26
Merge remote-tracking branch 'origin/master' into usb-vid-pid-update
kareltucek Sep 5, 2024
5492262
Always parse left half and left module configuration.
kareltucek Sep 6, 2024
aa240d1
Merge pull request #231 from UltimateHackingKeyboard/always_parse_lef…
mondalaci Sep 6, 2024
c6c2685
Merge pull request #222 from UltimateHackingKeyboard/usb-vid-pid-update
mondalaci Sep 6, 2024
fb511e7
Support iso layout.
kareltucek Sep 6, 2024
38260ba
Fix double iso key mapping.
kareltucek Sep 6, 2024
1ade306
Merge pull request #233 from UltimateHackingKeyboard/iso_key
mondalaci Sep 6, 2024
df219f3
build.sh refactors and improvements
kareltucek Sep 7, 2024
791ae8e
Implement led test mode.
kareltucek Sep 7, 2024
93711eb
Fix time in charger callbacks.
kareltucek Sep 7, 2024
54f35c3
Merge pull request #235 from UltimateHackingKeyboard/fix_charger_time
mondalaci Sep 7, 2024
af8e21a
Suppress key activations in led test mode.
kareltucek Sep 7, 2024
b5f573e
Wake main during uhk80 left half led test.
kareltucek Sep 7, 2024
3a53da7
Fix some LED addresses.
kareltucek Sep 7, 2024
c44c5c4
Improve / fix things in led test.
kareltucek Sep 7, 2024
3287dbf
Merge pull request #234 from UltimateHackingKeyboard/testled_mode
mondalaci Sep 8, 2024
6d0a130
Update time with key scanner.
kareltucek Sep 8, 2024
d8a0088
Make mouse keys not hiccup on zero elapsed times.
kareltucek Sep 8, 2024
410e7b8
Release keys when left side is disconnected.
kareltucek Sep 8, 2024
59cd220
Testing code for left keystates
kareltucek Sep 8, 2024
7c4d858
Revert mouse keys "improvement"
kareltucek Sep 8, 2024
f863aeb
Make it possible to wait for available slots.
kareltucek Sep 8, 2024
16b84e6
Use low latency connection between halves.
kareltucek Sep 9, 2024
f7aa5bf
Disable switch test.
kareltucek Sep 11, 2024
42d6d1d
Merge pull request #243 from UltimateHackingKeyboard/allow_disable_sw…
mondalaci Sep 12, 2024
0ee1752
Ignore ble pings and report latencies errors.
kareltucek Sep 10, 2024
eb9fd9a
Fix a warning.
kareltucek Sep 17, 2024
cb5f230
Implement atomicity in zephyr.
kareltucek Sep 17, 2024
fc15064
Merge pull request #237 from UltimateHackingKeyboard/make_key_handlin…
mondalaci Sep 17, 2024
e41b630
Extend buildscript with flashUsb command for uhk80.
kareltucek Sep 17, 2024
2a3fadb
Fix led fade times.
kareltucek Sep 18, 2024
7a05039
Shift connection state icon.
kareltucek Sep 18, 2024
a6b2810
Add triangle-exclamation icon.
kareltucek Sep 18, 2024
844dacb
Indicate status buffer errors on oled.
kareltucek Sep 18, 2024
cde789e
Fix setLedTxt inaccurate error reports.
kareltucek Sep 18, 2024
983ecc1
Don't report not-yet-initialized variables.
kareltucek Sep 18, 2024
d98ac23
Merge pull request #250 from UltimateHackingKeyboard/shift_connection…
mondalaci Sep 18, 2024
0f63bb3
Fix some led sleep timer, and event loop timer issues.
kareltucek Sep 18, 2024
641c5c0
Merge remote-tracking branch 'origin/master' into error_indications
kareltucek Sep 18, 2024
9e15152
Merge pull request #249 from UltimateHackingKeyboard/fix_led_fades
mondalaci Sep 18, 2024
ab8436e
Merge pull request #251 from UltimateHackingKeyboard/error_indications
mondalaci Sep 18, 2024
6d8a831
Sync functional colors.
kareltucek Sep 18, 2024
a005fca
Fix build.sh flashUsb command.
kareltucek Sep 20, 2024
2f22df3
Print agent script paths in the build.sh script
kareltucek Sep 20, 2024
64396d1
Merge pull request #257 from UltimateHackingKeyboard/reset_link_on_ap…
mondalaci Sep 20, 2024
a12734f
Migrate to new keyid mappings.
kareltucek Sep 20, 2024
2cd4d93
Improve serial no compatibility for Windows.
kareltucek Sep 22, 2024
0559ebf
Merge pull request #261 from UltimateHackingKeyboard/fix_serial_no
mondalaci Sep 22, 2024
bae8a3d
Enable IsModuleAttached for touchpad driver again...
kareltucek Sep 22, 2024
032c0ee
Make sure to wake up main thread if current next event is rescheduled.
kareltucek Sep 22, 2024
a32f31e
Merge pull request #268 from UltimateHackingKeyboard/fix_touchpad_par…
mondalaci Sep 22, 2024
b25297b
Merge pull request #269 from UltimateHackingKeyboard/fix_reschedule_m…
mondalaci Sep 22, 2024
195f944
Update functional colors when link is resetted.
kareltucek Sep 22, 2024
eec3028
Merge pull request #272 from UltimateHackingKeyboard/fix_functional_c…
mondalaci Sep 22, 2024
a850e18
Fix i2c objects missing in dongle build.
kareltucek Sep 22, 2024
1aee727
Merge pull request #273 from UltimateHackingKeyboard/fix_i2c_linking
mondalaci Sep 22, 2024
71ac6c8
Fix keycluster trackball.
kareltucek Sep 22, 2024
cc43259
Merge pull request #271 from UltimateHackingKeyboard/fix_keycluster_t…
mondalaci Sep 22, 2024
87f66ac
Fix circle-xmark-large icon.
kareltucek Sep 23, 2024
8c907e1
Merge pull request #275 from UltimateHackingKeyboard/fix_xmark_icon
mondalaci Sep 23, 2024
0380b80
Improve remote logging.
kareltucek Sep 23, 2024
29a1fed
Merge pull request #276 from UltimateHackingKeyboard/improve_remote_l…
mondalaci Sep 23, 2024
8bb40ed
Trigger keymap reload when touchpad module is connected.
kareltucek Sep 24, 2024
fabc1fb
Remove autoformatting.
kareltucek Sep 24, 2024
4aa5be3
Send module actions to the left half.
kareltucek Sep 24, 2024
43cd2a3
(Re)enable left module slave driver.
kareltucek Sep 24, 2024
38ebad4
Fix left module's backlight.
kareltucek Sep 24, 2024
24ffffa
Merge pull request #280 from UltimateHackingKeyboard/left_module_back…
mondalaci Sep 24, 2024
c1ab8a2
If modules are not provided in UserConfig, map them to defaults.
kareltucek Sep 24, 2024
ca15f64
Try reenumerate using cold reboot.
kareltucek Sep 24, 2024
8d79620
Merge pull request #278 from UltimateHackingKeyboard/fix_touchpad_key…
mondalaci Sep 25, 2024
e2dfd18
Add build.sh multidevice support for usb flashing.
kareltucek Sep 26, 2024
bf93349
Stop left half eventloop spinning.
kareltucek Sep 26, 2024
2900d9d
Fix eventloop race conditions, especially sleeping through messages.
kareltucek Sep 26, 2024
4c3c143
Remove some logs.
kareltucek Sep 26, 2024
340b620
Fix stuck secondary layers.
kareltucek Sep 26, 2024
5f90d55
Remove log.
kareltucek Sep 26, 2024
5aaef90
Merge pull request #286 from UltimateHackingKeyboard/fix_eventloop_races
mondalaci Sep 27, 2024
48c69e0
Implement macro-controlled sleep mode.
kareltucek Sep 19, 2024
a281ef0
Update layer holds and stickiness when a macro-held layer is released.
kareltucek Oct 1, 2024
f009a7d
Merge pull request #297 from UltimateHackingKeyboard/fix_stickies_on_…
mondalaci Oct 1, 2024
189f587
usb: add remote wakeup call, and restore power state change callback
benedekkupper Sep 17, 2024
4b85c6b
c2usb critical fix
benedekkupper Oct 1, 2024
693c324
Connect sleep mode to benedek's power delegate.
kareltucek Sep 19, 2024
4b37742
Merge pull request #255 from UltimateHackingKeyboard/usb-sleep-wake-r…
kareltucek Oct 1, 2024
ac4e847
Refactor sleep mode to power mode.
kareltucek Oct 1, 2024
a6a2edf
Don't fade OLED in debug screen.
kareltucek Oct 2, 2024
3e8fd59
Merge pull request #296 from UltimateHackingKeyboard/manual_sleep_mode
mondalaci Oct 2, 2024
ad865cc
Implement some power-consumption optimizations.
kareltucek Oct 2, 2024
bcce2e9
Parse targets from config.
kareltucek Sep 18, 2024
e8069d2
Log config parser errors!
kareltucek Oct 2, 2024
be62ba1
Make ApplyConfig validate the config synchronously to return correct …
kareltucek Oct 2, 2024
27a6079
Always validate config when applying.
kareltucek Oct 3, 2024
9ed6dbe
Implement lightSleep and deepSleep modes.
kareltucek Oct 3, 2024
99912b5
Bump userConfigVersion to 8.1.0
mondalaci Oct 3, 2024
4fb3c97
Merge pull request #307 from UltimateHackingKeyboard/split_sleep_modes
mondalaci Oct 3, 2024
b62624d
Fix apply config issues.
kareltucek Oct 4, 2024
e3b524a
Rename targets to connections.
kareltucek Oct 4, 2024
5ea15b7
Bump userConfig version to 8.0.0
kareltucek Oct 4, 2024
e4a8f30
DOCS: add git hooks
kareltucek Oct 4, 2024
265ebdc
Revert "Rename targets to connections."
kareltucek Oct 4, 2024
4aa8593
Merge remote-tracking branch 'origin/master' into parse_targets
kareltucek Oct 4, 2024
9246ec0
Rebrand targets to hostConnections.
kareltucek Oct 4, 2024
ed46720
Remove debug logging.
kareltucek Oct 5, 2024
ea00210
Merge pull request #253 from UltimateHackingKeyboard/parse_targets
mondalaci Oct 5, 2024
8c7d710
Fix build process.
kareltucek Oct 6, 2024
4adec3c
Merge pull request #303 from UltimateHackingKeyboard/power_consumptio…
mondalaci Oct 6, 2024
b24b176
Revert "Merge pull request #303 from UltimateHackingKeyboard/power_co…
kareltucek Oct 6, 2024
1392b76
Make sticky mods and input mods compose properly.
kareltucek Oct 7, 2024
f443cf5
Fix caret macro activations.
kareltucek Oct 7, 2024
3fd37c7
Merge pull request #317 from UltimateHackingKeyboard/rework_sticky_mods
mondalaci Oct 8, 2024
93861b3
Merge remote-tracking branch 'legacy/master'
kareltucek Oct 8, 2024
c0ca2f6
Merge remote-tracking branch 'origin/master'
kareltucek Oct 8, 2024
fd3e67f
Don't flash over usbs at the same time.
kareltucek Oct 8, 2024
1c13e05
Make BLE PIDs larger by 0x8000 than USB PIDs.
mondalaci Oct 8, 2024
c37cfd3
Implement PoC of OOB pairing.
kareltucek Sep 18, 2024
ad46f03
Fix payload length for UHK60
kareltucek Oct 10, 2024
041b0c6
Remove action count limitation for UHK60
kareltucek Oct 10, 2024
3c4012d
Merge pull request #322 from UltimateHackingKeyboard/fix_invalid_acti…
mondalaci Oct 10, 2024
3848d90
Disable suspend logging.
kareltucek Oct 10, 2024
f300fd9
Merge remote-tracking branch 'origin/master'
kareltucek Oct 10, 2024
206e0f1
Add new icons, sanitize long texts.
kareltucek Oct 10, 2024
c06b15e
Treat oled fade according to right half's power only.
kareltucek Oct 10, 2024
95aa622
Fix typo.
kareltucek Oct 10, 2024
21c64ac
Use simple asterisk in place of unicode characters.
kareltucek Oct 10, 2024
414e812
Merge pull request #326 from UltimateHackingKeyboard/oled_powered
mondalaci Oct 10, 2024
4bf0273
Merge pull request #324 from UltimateHackingKeyboard/font_refactor
mondalaci Oct 10, 2024
7b784c4
Update all right-to-left data on config apply.
kareltucek Oct 11, 2024
1aba8b2
Move navigation modes into standard config, and reset them on config …
kareltucek Oct 11, 2024
7323cd0
Merge pull request #327 from UltimateHackingKeyboard/reset_link_on_co…
mondalaci Oct 11, 2024
7a8a150
Merge pull request #328 from UltimateHackingKeyboard/move_navmodes_to…
mondalaci Oct 11, 2024
8944736
Fix Nus initiation.
kareltucek Oct 11, 2024
3081f90
Make dongle leds functional.
kareltucek Oct 11, 2024
65159d3
Merge pull request #321 from UltimateHackingKeyboard/fix_payload_length
mondalaci Oct 11, 2024
8a644b5
Merge pull request #330 from UltimateHackingKeyboard/make_dongle_leds…
mondalaci Oct 11, 2024
9c5cacc
Merge branch 'master-paired' into dongle_pairing4
kareltucek Oct 13, 2024
4bd115b
Fix some warnings
kareltucek Oct 13, 2024
695e8c2
Add message/log routing.
kareltucek Oct 13, 2024
ed030e8
Identify peers according to hostConnections.
kareltucek Oct 13, 2024
36300f7
Improve peer recognition.
kareltucek Oct 13, 2024
e2af3eb
Try to print stacktrace addresses.
kareltucek Oct 14, 2024
28c4935
Add a command to retrieve new pairings.
kareltucek Oct 14, 2024
89a0ba9
Fix uhk60 build.
kareltucek Oct 14, 2024
79d717e
Add switchover flag.
kareltucek Oct 14, 2024
68179c4
Merge remote-tracking branch 'origin/master' into remap_keyids
kareltucek Oct 15, 2024
14137df
Fix UHK60 build.
kareltucek Oct 15, 2024
75659c0
Add transport logging.
kareltucek Oct 15, 2024
6678c87
Add some logging.
kareltucek Oct 15, 2024
1a40bbd
Sort the keyid table again.
kareltucek Oct 15, 2024
819708f
Fix things around keyid mappings and leds.
kareltucek Oct 15, 2024
c7cf6f1
Revert Logging - it breaks usb communication.
kareltucek Oct 16, 2024
39ad8e0
Fix "universal" keyid parsing for uhk60 and bump config version.
kareltucek Oct 18, 2024
a82c920
Merge pull request #259 from UltimateHackingKeyboard/remap_keyids
mondalaci Oct 18, 2024
3660240
Improve robustness of bluetooth pairing and subsystem as whole.
kareltucek Oct 16, 2024
3cfc63c
Remove resetBtStack usb command.
kareltucek Oct 19, 2024
65ef0cf
CI-build all master-like branches.
kareltucek Oct 19, 2024
c488697
Bump versions.
kareltucek Oct 19, 2024
9f3e649
switchOver -> switchover
kareltucek Oct 19, 2024
d3932bf
Merge remote-tracking branch 'origin/master' into dongle_pairing4
kareltucek Oct 19, 2024
07e15de
Revert "Bump versions." mistake.
kareltucek Oct 19, 2024
50c3a30
Print config version.
kareltucek Oct 19, 2024
83bca68
Make uhk60 `make flash` work in multi-device environment.
kareltucek Oct 19, 2024
95c1a6e
Fix set keyRgb state sync issues.
kareltucek Oct 19, 2024
2acfe49
Merge pull request #320 from UltimateHackingKeyboard/dongle_pairing4
kareltucek Oct 19, 2024
eb028f3
Fix left half leds going dark on full led update.
kareltucek Oct 19, 2024
89e7f92
Merge pull request #339 from UltimateHackingKeyboard/fix_left_leds
mondalaci Oct 19, 2024
9c1ce33
Merge remote-tracking branch 'origin/master-paired' into master-paired
kareltucek Oct 20, 2024
24513b0
Improve logging and fix postponer hangs.
kareltucek Oct 20, 2024
63e36ef
Update CurrentPostponedTime at the beginning of the cycle.
kareltucek Oct 21, 2024
14e6d21
Fix a warning.
kareltucek Oct 21, 2024
ebad54d
Fix a possible race on key commitment.
kareltucek Oct 23, 2024
64c668d
Merge pull request #341 from UltimateHackingKeyboard/fix_commit_state…
mondalaci Oct 23, 2024
0a29712
Clear foreign bonds on apply config.
kareltucek Oct 25, 2024
66f01c2
Fix scanning.
kareltucek Oct 25, 2024
4cb291b
Limit write text action chunk size.
kareltucek Oct 25, 2024
44eb906
Merge pull request #344 from UltimateHackingKeyboard/limit-dispatch-t…
mondalaci Oct 25, 2024
5099eb2
Fix config host connection parsing on uhk 60
kareltucek Oct 25, 2024
4fe2147
Merge pull request #345 from UltimateHackingKeyboard/fix_host_connect…
mondalaci Oct 25, 2024
4daa0da
Merge branch 'master-paired'
mondalaci Oct 28, 2024
9effd00
Merge branch 'master' into different-usb-vs-ble-pid
mondalaci Oct 28, 2024
1bb0ae5
Delete commented out MCUboot Kconfig options.
mondalaci Oct 29, 2024
27b0dc5
Bump deviceProtocolVersion to 4.11.0
mondalaci Oct 31, 2024
a0510b7
Merge remote-tracking branch 'origin' into fix_secondaries
mondalaci Nov 1, 2024
43fba79
Merge pull request #340 from UltimateHackingKeyboard/fix_secondaries
mondalaci Nov 2, 2024
6dcaafa
Merge pull request #349 from UltimateHackingKeyboard/different-usb-vs…
ert78gb Nov 3, 2024
5bb746d
Merge pull request #352 from UltimateHackingKeyboard/new_bt_commands
mondalaci Nov 8, 2024
97d36e9
Merge branch 'master' into fix_set_keyrgb_layer_sync
mondalaci Nov 8, 2024
28b254f
Merge pull request #338 from UltimateHackingKeyboard/fix_set_keyrgb_l…
mondalaci Nov 8, 2024
d2e608d
Fix some pairing-related issues.
kareltucek Nov 13, 2024
af27aeb
Merge pull request #356 from UltimateHackingKeyboard/bt_fixes
mondalaci Nov 14, 2024
59d2f7c
Fix factory mode version.
kareltucek Nov 16, 2024
c92875b
Apply factory settings when validation fails on boot.
kareltucek Nov 17, 2024
d20ce60
Merge pull request #358 from UltimateHackingKeyboard/fix-factory-data…
mondalaci Nov 17, 2024
ed34fdb
Fix a bunch of secondary-role-related lifecycle issues.
kareltucek Nov 20, 2024
ef7a0c4
Merge pull request #360 from UltimateHackingKeyboard/fix_secondary_ro…
mondalaci Nov 21, 2024
b320df1
Fix address settings reloading, and consequently dongle leds updates.
kareltucek Nov 23, 2024
3ba9eec
Merge pull request #363 from UltimateHackingKeyboard/fix_uhk_addr_set…
mondalaci Nov 23, 2024
9783278
Fix keystroke delay postponing.
kareltucek Dec 2, 2024
3693522
chore: copy UHK specific user-config.bin into the device release dir
ert78gb Dec 3, 2024
465d52a
Merge pull request #373 from UltimateHackingKeyboard/chore-uhk80-user…
mondalaci Dec 4, 2024
df8d17b
Fix a potential postponer hangup.
kareltucek Dec 4, 2024
1cd88da
Always send zero report.
kareltucek Dec 4, 2024
0e2f3e5
chore: migrate UHK80 features
ert78gb Dec 4, 2024
790865a
Merge pull request #374 from UltimateHackingKeyboard/always_send_0_re…
mondalaci Dec 4, 2024
020427b
Update buildscript.
kareltucek Dec 4, 2024
192c86e
Merge remote-tracking branch 'origin/master' into chore-migrate-firmw…
kareltucek Dec 4, 2024
3ee3854
Merge remote-tracking branch 'legacy/chore-migrate-firmware-80'
kareltucek Dec 4, 2024
317a739
Fix hi-res scrolling compilation issues.
kareltucek Dec 4, 2024
7944d8a
ci: remove checkout token
ert78gb Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
65 changes: 41 additions & 24 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,25 +1,42 @@
---
Language: Cpp
BasedOnStyle: WebKit
AllowShortFunctionsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBraces: Custom
Cpp11BracedListStyle: true
Language: Cpp
BasedOnStyle: Microsoft
ColumnLimit: 100
IndentWidth: 4
IndentPPDirectives: BeforeHash
PPIndentWidth: 4
ContinuationIndentWidth: 4

ReflowComments: false

PointerAlignment: Right
ReflowComments: false
SortIncludes: false
TabWidth: 4
...
DerivePointerAlignment: false

BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: false
AfterStruct: false
AfterUnion: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterExternBlock: false
AfterCaseLabel: false
AfterControlStatement: Never
BeforeElse: false
BeforeCatch: false
BeforeLambdaBody: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
AlignAfterOpenBracket: DontAlign

# c++ specific
ConstructorInitializerIndentWidth: 4
IndentRequiresClause: true
IndentExternBlock: NoIndent
PackConstructorInitializers: NextLine
AlwaysBreakTemplateDeclarations: Yes
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: Inline
ShortNamespaceLines: 1
FixNamespaceComments: true
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ steps:
- git submodule init
- git submodule update --recursive

- name: Generate versions.h
- name: Generate versions.c
image: node:16
commands:
- npm install --prefix scripts
- scripts/generate-versions-h.js
- scripts/generate-versions.mjs

- name: Build (Ubuntu Linux)
image: abcminiuser/docker-ci-arm-toolchain:latest
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches:
- master*
pull_request:
branches:
- master*

jobs:
release:
runs-on: ubuntu-22.04
timeout-minutes: 25

steps:
- uses: actions/checkout@v4
with:
path: firmware-uhk80
submodules: recursive

- name: Install build dependencies
run: sudo apt-get install -y gcc-arm-none-eabi

- name: Install west
run: pip3 install --user -U west

- name: Install python dependencies of scripts
run: |
cd firmware-uhk80/scripts
pip install -r requirements.txt

- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@v1
with:
app-path: firmware-uhk80
toolchains: arm-zephyr-eabi
sdk-version: 0.16.8

- name: Git user setup
run: |
git config --global user.email "git-patch@uhk.com"
git config --global user.name "Git Patch"

- name: West patch
run: west patch

- name: West config
run: west config --local build.cmake-args -- "-Wno-dev"

- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v4
with:
node-version-file: firmware-uhk80/scripts/.nvmrc

- name: Install node dependencies in scripts folder
run: |
cd firmware-uhk80/scripts
npm install

- name: Create firmware tarball
run: |
cd firmware-uhk80
scripts/make-release.mjs --allowSha

- name: Upload firmware artifacts
uses: actions/upload-artifact@v4
with:
name: firmware
path: firmware-uhk80/scripts/uhk-firmware-*.tar.gz
compression-level: 0
retention-days: 10
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ package-lock.json
node_modules
build_make
.cache
samples
build
CMakeCache.txt
build.ninja
.vscode/settings.json
scripts/__pycache__
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "lib/SDK_2.8.0_MKL17Z32xxx4"]
path = lib/SDK_2.8.0_MKL17Z32xxx4
url = https://github.com/UltimateHackingKeyboard/SDK_2.8.0_MKL17Z32xxx4.git
[submodule "lib/c2usb"]
path = lib/c2usb
url = https://github.com/IntergatedCircuits/c2usb.git
21 changes: 17 additions & 4 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
{
"version": 4,
"configurations": [
{
"name": "UHK 60 v1",
"defines": [
"DEVICE_ID=DEVICE_ID_UHK60V1"
]
],
"configurationProvider": "nordic-semiconductor.nrf-connect"
},
{
"name": "UHK 60 v2",
"defines": [
"DEVICE_ID=DEVICE_ID_UHK60V2"
]
},
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++20",
"intelliSenseMode": "linux-gcc-x64",
"configurationProvider": "nordic-semiconductor.nrf-connect"
}
]
}
],
"version": 4
}
21 changes: 21 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"nrf-connect.toolchain.path": "${nrf-connect.toolchain:2.6.1}",
"nrf-connect.topdir": "${nrf-connect.sdk:2.4.1}",
"nrf-connect.applications": [
"${workspaceFolder}/device"
],
"nrf-connect.boardRoots": [
"${workspaceFolder}/"
],
"files.associations": {
"*.h": "c",
"*.c": "c",
"bitset": "cpp",
"span": "cpp",
"array": "cpp",
"string": "cpp",
"string_view": "cpp",
"compare": "c",
"system_error": "c"
}
}
29 changes: 15 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,31 +119,31 @@ Header files are composed of sections. The order of sections is fixed. Every hea

// Includes:

#include "fsl_gpio.h"
...
#include "fsl_gpio.h"
...

// Macros:

#define LED_DRIVER_SDB_PORT PORTA
...
#define LED_DRIVER_SDB_PORT PORTA
...

// Typedefs:

typedef enum {
KeystrokeType_Basic,
KeystrokeType_Media,
KeystrokeType_System,
} keystroke_type_t;
typedef enum {
KeystrokeType_Basic,
KeystrokeType_Media,
KeystrokeType_System,
} keystroke_type_t;

// Variables:

extern led_driver_state_t LedDriverState;
...
extern led_driver_state_t LedDriverState;
...

// Functions:

void LedDriver_WriteBuffer(uint8_t i2cAddress, uint8_t buffer[], uint8_t size);
...
void LedDriver_WriteBuffer(uint8_t i2cAddress, uint8_t buffer[], uint8_t size);
...

#endif
```
Expand All @@ -154,4 +154,5 @@ The build process must not yield any warnings, and the build must pass [on on th

## Clang format

There is a `.clang-format` present, which allows you to format your `.c` files simply by `clang-format -i <your source file>`. (It does **not** ensure the required header file structure though!)
There is a `.clang-format` present, which allows you to format your source files simply by `clang-format -i <your source file>`.
(It does **not** ensure the required header file structure though!)
92 changes: 83 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,79 @@ If you want to use the latest firmware version for your UHK, then instead of goi

If you're one of the brave few who wants to hack the firmware then read on.

1. Make sure to clone this repo with:
### Fetching the codebase

`git clone --recursive git@github.com:UltimateHackingKeyboard/firmware.git`
Note that these commands will create a [west workspace](https://docs.zephyrproject.org/latest/develop/west/workspaces.html#t2-star-topology-application-is-the-manifest-repository) in your current directory.

Then, depending whether you want a full IDE experience or just minimal tools for building and flashing firmware, read *IDE setup* or *Minimal development setup* (if you prefer a text editor + command line).
```bash
git clone --recurse-submodules git@github.com:UltimateHackingKeyboard/firmware-uhk80.git
west init -l firmware-uhk80
west update
west patch
west config --local build.cmake-args -- "-Wno-dev"
cd firmware-uhk80/scripts
npm i
./generate-versions.mjs
```

### IDE setup
Then, depending whether you want a full IDE experience or just minimal tools for building and flashing firmware, read *VS Code setup* or *Minimal development setup* (if you prefer a text editor + command line).

### VS Code setup

- Install [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation/install_ncs.html) including VS Code extensions.
- In VS Code, click nRF connect icon in the left pane, then `Applications -> Create new build configuration` and select the relevant CMake preset. Now hit Build. This executes cmake steps.
- Now you can rebuild or flash using the Build and Flash actions.

### Minimal development setup

- Install commandline stuff from [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation/install_ncs.html)
- You can use `./build.sh` script that basically just packs the following snippets, but should be more up to date:

- e.g. `./build.sh uhk-80-left build make flash`, which will perform the three actions below

- If the `build.sh` doesn't suit you, then launch the nrfutil shell:
```
nrfutil toolchain-manager launch --shell --ncs-version v2.6.1
```
- In the shell, you can build (e.g.) uhk-80-left as follows:

- full build including cmake steps, as extracted from VS Code:
```
export DEVICE=uhk-80-left
export PWD=`pwd`
west build --build-dir $PWD/device/build/$DEVICE $PWD/device --pristine --board $DEVICE --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=$PWD/device/prj.conf -DOVERLAY_CONFIG=$PWD/device/prj.conf.overlays/$DEVICE.prj.conf -DBOARD_ROOT=$PWD
```

- quick rebuild:
```
export DEVICE=uhk-80-left
export PWD=`pwd`
west build --build-dir $PWD/device/build/$DEVICE $PWD/device
```

- flash:
```
export DEVICE=uhk-80-left
export PWD=`pwd`
west flash -d $PWD/device/build/$DEVICE
```

In case of problems, please refer to scripts/make-release.mjs

### Recommended tweaks

You may find this `.git/hooks/post-checkout` git hook useful:

```bash
#!/bin/bash

# Update the submodule in lib/c2usb to the commit recorded in the checked-out commit
git submodule update --init --recursive lib/c2usb
# Refresh versions.c, so that Agent always shows what commit you are on (although it doesn't indicate unstaged changes)
scripts/generate-versions.mjs
```

### Old IDE setup

2. Download and install MCUXpresso IDE for [Linux](https://ultimatehackingkeyboard.com/mcuxpressoide/mcuxpressoide-11.2.0_4120.x86_64.deb.bin), [Mac](https://ultimatehackingkeyboard.com/mcuxpressoide/MCUXpressoIDE_11.2.0_4120.pkg), or [Windows](https://ultimatehackingkeyboard.com/mcuxpressoide/MCUXpressoIDE_11.2.0_4120.exe).

Expand All @@ -39,7 +105,7 @@ Then, depending whether you want a full IDE experience or just minimal tools for

Going forward, it's easier to flash the firmware of your choice by using the downwards toolbar icon which is located rightwards of the *green play + toolbox icon*.

### Minimal development setup
### Old Minimal development setup

1. Install the ARM cross-compiler, cross-assembler and stdlib implementation. Eg. on Arch Linux the packages `arm-none-eabi-binutils`, `arm-none-eabi-gcc`, `arm-none-eabi-newlib`.

Expand All @@ -55,10 +121,18 @@ Going forward, it's easier to flash the firmware of your choice by using the dow

### Releasing

6. To build a full firmware tarball:
1. Run `npm install` in `scripts`.
2. Run `scripts/make-release.js`. (Or `scripts/make-release.js --allowSha` for development purposes.)
3. Now, the created tarball `scripts/uhk-firmware-VERSION.tar.gz` can be flashed with UHK Agent.
To build a full firmware tarball:

1. Run `npm install` in `scripts`.
2. Run `scripts/make-release.mjs`. (Or `scripts/make-release.mjs --allowSha` for development purposes.)
3. Now, the created tarball `scripts/uhk-firmware-VERSION.tar.gz` can be flashed with UHK Agent.

If `make-release.mjs` fails with a build error, it'll probably succeed in Nordic's shell environment.

1. Install [nRF Util](https://www.nordicsemi.com/Products/Development-tools/nRF-Util).
2. Install the nRF Connect Toolchain Manager with `nrfutil install toolchain-manager`
3. Enter the Toolchain Manager shell with `nrfutil toolchain-manager launch --shell`
4. Within the shell, run `make-release.mjs` according to the above.

## Contributing

Expand Down
Loading