rebase to work with Zephyr 3.5
This commit is contained in:
parent
b9e4522331
commit
16791aa0a3
3 changed files with 4 additions and 6 deletions
|
@ -8,7 +8,6 @@
|
|||
behaviors {
|
||||
/omit-if-no-ref/ molock: behavior_momentary_layer_lock {
|
||||
compatible = "zmk,behavior-momentary-layer-lock";
|
||||
label = "MO_LOCK";
|
||||
#binding-cells = <0>;
|
||||
bindings = <&to 0>;
|
||||
};
|
||||
|
|
|
@ -73,7 +73,7 @@ static int mo_lock_keymap_binding_released(struct zmk_behavior_binding *binding,
|
|||
static struct behavior_mo_lock_config behavior_mo_lock_config_##n = { \
|
||||
.fallback_binding = \
|
||||
{ \
|
||||
.behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 0), label), \
|
||||
.behavior_dev = DEVICE_DT_NAME(DT_INST_PHANDLE_BY_IDX(n, bindings, 0)), \
|
||||
.param1 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(n, bindings, 0, param1), (0), \
|
||||
(DT_INST_PHA_BY_IDX(n, bindings, 0, param1))), \
|
||||
.param2 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(n, bindings, 0, param2), (0), \
|
||||
|
@ -82,9 +82,9 @@ static int mo_lock_keymap_binding_released(struct zmk_behavior_binding *binding,
|
|||
}; \
|
||||
static struct behavior_mo_lock_data behavior_mo_lock_data_##n; \
|
||||
\
|
||||
DEVICE_DT_INST_DEFINE(n, behavior_mo_lock_init, NULL, &behavior_mo_lock_data_##n, \
|
||||
&behavior_mo_lock_config_##n, APPLICATION, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mo_lock_driver_api);
|
||||
BEHAVIOR_DT_INST_DEFINE(n, behavior_mo_lock_init, NULL, &behavior_mo_lock_data_##n, \
|
||||
&behavior_mo_lock_config_##n, POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mo_lock_driver_api);
|
||||
|
||||
static const struct behavior_driver_api behavior_mo_lock_driver_api = {
|
||||
.binding_pressed = mo_lock_keymap_binding_pressed,
|
||||
|
|
|
@ -224,7 +224,6 @@ Applies to: `compatible = "zmk,behavior-momentary-layer-lock"`
|
|||
|
||||
| Property | Type | Description |
|
||||
| ---------------- | ------------- | ------------------------------------------------------- |
|
||||
| `label` | string | Unique label for the node |
|
||||
| `#binding-cells` | int | Must be `0` |
|
||||
| `bindings` | phandle array | A behavior to trigger if no momentary layers are active |
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue