forked from kofal.net/zmk
Initial event manager work, and two first events.
* Add initial event manager implementation, roughly mimicking Nordic's API. * Add `position_state_changed` and `keycode_state_changed` events. * Hook up HID and keymap to new events instead of using behaviour global event crazy.
This commit is contained in:
16
app/include/linker/zmk-events.ld
Normal file
16
app/include/linker/zmk-events.ld
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <linker/linker-defs.h>
|
||||
|
||||
SECTION_PROLOGUE(event_types,,)
|
||||
{
|
||||
__event_type_start = .; \
|
||||
KEEP(*(".event_type")); \
|
||||
__event_type_end = .; \
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
|
||||
SECTION_PROLOGUE(event_subscriptions,,)
|
||||
{
|
||||
__event_subscriptions_start = .; \
|
||||
KEEP(*(".event_subscription")); \
|
||||
__event_subscriptions_end = .; \
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
|
||||
6
app/include/linker/zmk-linker-defs.h
Normal file
6
app/include/linker/zmk-linker-defs.h
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
#define→EVENT_TYPE_SECTIONS()→ → → → \
|
||||
→ → __event_type_start = .;→ → \
|
||||
→ → KEEP(*(".event_type_*"));→ → \
|
||||
→ → __event_type_end = .;→→ → \
|
||||
Reference in New Issue
Block a user