feat(core): Support adding subs to other listeners.
* Used for ZMK Studio event remappers to be sure the one RPC event listener subscribes to their mapped events.
This commit is contained in:
parent
49f7275beb
commit
b576d52d58
1 changed files with 1 additions and 0 deletions
|
@ -64,6 +64,7 @@ struct zmk_event_subscription {
|
||||||
#define ZMK_LISTENER(mod, cb) const struct zmk_listener zmk_listener_##mod = {.callback = cb};
|
#define ZMK_LISTENER(mod, cb) const struct zmk_listener zmk_listener_##mod = {.callback = cb};
|
||||||
|
|
||||||
#define ZMK_SUBSCRIPTION(mod, ev_type) \
|
#define ZMK_SUBSCRIPTION(mod, ev_type) \
|
||||||
|
extern const struct zmk_listener zmk_listener_##mod; \
|
||||||
const Z_DECL_ALIGN(struct zmk_event_subscription) \
|
const Z_DECL_ALIGN(struct zmk_event_subscription) \
|
||||||
_CONCAT(_CONCAT(zmk_event_sub_, mod), ev_type) __used \
|
_CONCAT(_CONCAT(zmk_event_sub_, mod), ev_type) __used \
|
||||||
__attribute__((__section__(".event_subscription"))) = { \
|
__attribute__((__section__(".event_subscription"))) = { \
|
||||||
|
|
Loading…
Add table
Reference in a new issue