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 {
|
behaviors {
|
||||||
/omit-if-no-ref/ molock: behavior_momentary_layer_lock {
|
/omit-if-no-ref/ molock: behavior_momentary_layer_lock {
|
||||||
compatible = "zmk,behavior-momentary-layer-lock";
|
compatible = "zmk,behavior-momentary-layer-lock";
|
||||||
label = "MO_LOCK";
|
|
||||||
#binding-cells = <0>;
|
#binding-cells = <0>;
|
||||||
bindings = <&to 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 = { \
|
static struct behavior_mo_lock_config behavior_mo_lock_config_##n = { \
|
||||||
.fallback_binding = \
|
.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), \
|
.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))), \
|
(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), \
|
.param2 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(n, bindings, 0, param2), (0), \
|
||||||
|
@ -82,8 +82,8 @@ static int mo_lock_keymap_binding_released(struct zmk_behavior_binding *binding,
|
||||||
}; \
|
}; \
|
||||||
static struct behavior_mo_lock_data behavior_mo_lock_data_##n; \
|
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_DT_INST_DEFINE(n, behavior_mo_lock_init, NULL, &behavior_mo_lock_data_##n, \
|
||||||
&behavior_mo_lock_config_##n, APPLICATION, \
|
&behavior_mo_lock_config_##n, POST_KERNEL, \
|
||||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mo_lock_driver_api);
|
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mo_lock_driver_api);
|
||||||
|
|
||||||
static const struct behavior_driver_api behavior_mo_lock_driver_api = {
|
static const struct behavior_driver_api behavior_mo_lock_driver_api = {
|
||||||
|
|
|
@ -224,7 +224,6 @@ Applies to: `compatible = "zmk,behavior-momentary-layer-lock"`
|
||||||
|
|
||||||
| Property | Type | Description |
|
| Property | Type | Description |
|
||||||
| ---------------- | ------------- | ------------------------------------------------------- |
|
| ---------------- | ------------- | ------------------------------------------------------- |
|
||||||
| `label` | string | Unique label for the node |
|
|
||||||
| `#binding-cells` | int | Must be `0` |
|
| `#binding-cells` | int | Must be `0` |
|
||||||
| `bindings` | phandle array | A behavior to trigger if no momentary layers are active |
|
| `bindings` | phandle array | A behavior to trigger if no momentary layers are active |
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue