|
|
@ -23,7 +23,7 @@ |
|
|
|
typedef int (*behavior_keymap_binding_callback_t)(struct zmk_behavior_binding *binding, |
|
|
|
typedef int (*behavior_keymap_binding_callback_t)(struct zmk_behavior_binding *binding, |
|
|
|
struct zmk_behavior_binding_event event); |
|
|
|
struct zmk_behavior_binding_event event); |
|
|
|
typedef int (*behavior_sensor_keymap_binding_callback_t)(struct zmk_behavior_binding *binding, |
|
|
|
typedef int (*behavior_sensor_keymap_binding_callback_t)(struct zmk_behavior_binding *binding, |
|
|
|
struct device *sensor); |
|
|
|
struct device *sensor, s64_t timestamp); |
|
|
|
|
|
|
|
|
|
|
|
__subsystem struct behavior_driver_api { |
|
|
|
__subsystem struct behavior_driver_api { |
|
|
|
behavior_keymap_binding_callback_t binding_pressed; |
|
|
|
behavior_keymap_binding_callback_t binding_pressed; |
|
|
@ -92,11 +92,11 @@ static inline int z_impl_behavior_keymap_binding_released(struct zmk_behavior_bi |
|
|
|
* @retval Negative errno code if failure. |
|
|
|
* @retval Negative errno code if failure. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
__syscall int behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *binding, |
|
|
|
__syscall int behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *binding, |
|
|
|
struct device *sensor); |
|
|
|
struct device *sensor, s64_t timestamp); |
|
|
|
|
|
|
|
|
|
|
|
static inline int |
|
|
|
static inline int |
|
|
|
z_impl_behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *binding, |
|
|
|
z_impl_behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *binding, |
|
|
|
struct device *sensor) { |
|
|
|
struct device *sensor, s64_t timestamp) { |
|
|
|
struct device *dev = device_get_binding(binding->behavior_dev); |
|
|
|
struct device *dev = device_get_binding(binding->behavior_dev); |
|
|
|
const struct behavior_driver_api *api = (const struct behavior_driver_api *)dev->driver_api; |
|
|
|
const struct behavior_driver_api *api = (const struct behavior_driver_api *)dev->driver_api; |
|
|
|
|
|
|
|
|
|
|
@ -104,7 +104,7 @@ z_impl_behavior_sensor_keymap_binding_triggered(struct zmk_behavior_binding *bin |
|
|
|
return -ENOTSUP; |
|
|
|
return -ENOTSUP; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return api->sensor_binding_triggered(binding, sensor); |
|
|
|
return api->sensor_binding_triggered(binding, sensor, timestamp); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|