Peter Johanson
d7bd81e5c4
fix(usb): Correctly detect USB connection status.
...
* Fix detection of USB power vs. configuration, to ensure endpoint
selection works properly with power-only USB attached.
2 years ago
Peter Johanson
40cd8da743
fix(usb): Split HID from core USB, logging fix.
...
* Split core USB init from USB HID init.
* Tweak logging to avoid "log loop" causing
spurious buffer messages on startup.
3 years ago
Peter Johanson
9d34cf561e
fix(usb): USB state changes in system thhread.
...
* Use a `k_work` to send usb status events from the system
workqueue thread, not the USB work thread.
3 years ago
Pete Johanson
3fe2acc2d1
refactor(core): Extra event payloads to own types, refactor API.
...
* Make it easier to use *just* event payloads by defining the data,
and then having event manager macros generate "wrapper structs"
* Improve is_*/cast_* APIs to hide details of full event struct.
* Create `zmk_event_t` typedef to pass to event handlers.
* Bring event names inline w/ consistent `zmk_` prefix.
4 years ago
innovaker
842aa5a842
refactor: replace filename hyphens with underscores
...
Aligns *.h and *.c to underscore naming convention.
These were kept (with warnings) for backwards compatibility with external boards/shields:
- kscan-mock.h
- matrix-transform.h
They should be removed in the future.
PR: #523
4 years ago
innovaker
f7d9d52221
refactor(app): replace `void` with `const struct device *dev` in ISR CBs
...
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html
PR: #467
4 years ago
innovaker
00ca0d2f1c
refactor(app): replace `struct device *` with `const struct device *`
...
Replaced with RegExp: /(?<!const )(struct device \*)/g
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html
PR: #467
4 years ago
innovaker
bac1f17cf6
refactor(app): replace Zephyr integer types with C99 integer types
...
u8_t → uint8_t
u16_t → uint16_t
u32_t → uint32_t
u64_t → uint64_t
s8_t → int8_t
s16_t → int16_t
s32_t → int32_t
s64_t → int64_t
Prerequisite for #223
See: https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v2.4.0
PR: #467
4 years ago
Pete Johanson
32e7159373
refactor(hid): Mod defines in dedicated header.
4 years ago
Joel Spadin
1d369ffa73
feat: only send HID reports to one endpoint
...
Added some utility functions and an event for tracking the state of the
USB connection.
Updated endpoints.c to select a single endpoint to send HID reports to
based on the status of the USB and BLE connections. Partially fixes #206 .
Future commits will add a user setting to control which endpoint is used if
both USB and BLE are ready.
4 years ago
Pete Johanson
bbf5a5905a
refactor(usb): Report USB status w/o HID output.
4 years ago
Pete Johanson
307a8d09db
feat(usb): Function to access latest USB status.
...
* To be leveraged by upcoming power
management work.
4 years ago
Pete Johanson
191a2d755a
chore: clang-format the codebase.
...
* Use the LLVM style
* Override indent width (8) and column limit (100)
* Fixes #142 .
4 years ago
Pete Johanson
68e72f9275
fix: Switch to single AUTHORS file.* Closes #164
4 years ago
Pete Johanson
66c4b7ebb0
fix(usb): Restore write semaphore, release it on write failures.
4 years ago
Pete Johanson
e5ba03f088
Revert "Merge pull request #93 from careyk007/main"
...
This reverts commit 8cd8933c87
, reversing
changes made to 3f1dfbaad1
.
4 years ago
Kellen Carey
5b4e5a30c4
remove unnecessary include
4 years ago
Kellen Carey
25c8a26998
wait before sending HID report
4 years ago
Pete Johanson
7c5fb7adb5
Use SYS_INIT for BLE and USB init.
4 years ago
Pete Johanson
38f1dbd984
Move Zephyr app into subdirectory.
5 years ago
Pete Johanson
8de6c85b74
Implement a basic set of consumer page keycodes.
5 years ago
Pete Johanson
ed5532bf94
Add a mock kscan driver, working native_posix.
...
* Unified logging to one module.
* Mock kscan driver that simulates events.
* Working native_posix board target for testing.
5 years ago
Pete Johanson
c1905745b3
Refactor build/config/keymaps.
...
* Move all headers to `include/zmk` directory.
* Update includes to reference them properly.
* Add `keymap.c` file from keymap, if found.
* Toplevel CONFIG_ZMK_BLE aggregate config setting.
5 years ago
Pete Johanson
73bea6218e
Some initial BEL HoG support.
5 years ago
Pete Johanson
be53560b77
Full NKRO support, fixes for keymap key selection.
5 years ago
Pete Johanson
a63a773983
Get *basic* USB report sending working.
5 years ago