include/motion_sense.h: Format with clang-format
BRANCH=none
TEST=none
@@ -39,7 +39,6 @@ enum sensor_config {
#define SENSOR_ACTIVE_S0_S3 (SENSOR_ACTIVE_S3 | SENSOR_ACTIVE_S0)
#define SENSOR_ACTIVE_S0_S3_S5 (SENSOR_ACTIVE_S0_S3 | SENSOR_ACTIVE_S5)
-
/*
* Events layout:
* 0 8 10
@@ -53,8 +52,7 @@ enum sensor_config {
#define TASK_EVENT_MOTION_INTERRUPT_MASK \
((1 << TASK_EVENT_MOTION_INTERRUPT_NUM) - 1)
#define TASK_EVENT_MOTION_SENSOR_INTERRUPT(_sensor_id) \
- BUILD_CHECK_INLINE( \
- TASK_EVENT_CUSTOM_BIT(_sensor_id), \
+ BUILD_CHECK_INLINE(TASK_EVENT_CUSTOM_BIT(_sensor_id), \
_sensor_id < TASK_EVENT_MOTION_INTERRUPT_NUM)
/* Internal events to motion sense task.*/
@@ -69,9 +67,8 @@ enum sensor_config {
#define TASK_EVENT_MOTION_FIRST_SW_EVENT \
(TASK_EVENT_MOTION_INTERRUPT_NUM + TASK_EVENT_MOTION_INTERNAL_EVENT_NUM)
#define TASK_EVENT_MOTION_ACTIVITY_INTERRUPT(_activity_id) \
- (TASK_EVENT_CUSTOM_BIT( \
- TASK_EVENT_MOTION_FIRST_SW_EVENT + (_activity_id)))
-
+ (TASK_EVENT_CUSTOM_BIT(TASK_EVENT_MOTION_FIRST_SW_EVENT + \
+ (_activity_id)))
#define ROUND_UP_FLAG ((uint32_t)BIT(31))
#define BASE_ODR(_odr) ((_odr) & ~ROUND_UP_FLAG)
@@ -101,7 +98,8 @@ enum sensor_config {
* Return a frequency the sensor supports.
* Trigger a compilation error when the EC way to slow for the sensor.
*/
-#define MOTION_MAX_SENSOR_FREQUENCY(_max, _step) GENERIC_MIN( \
+#define MOTION_MAX_SENSOR_FREQUENCY(_max, _step) \
+ GENERIC_MIN( \
(_max) / (CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ >= (_step)), \
(_step) << __fls(CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ / (_step)))
@@ -353,8 +351,9 @@ static inline void ec_motion_sensor_clamp_i16s(int16_t *arr, const int32_t *v)
}
/* direct assignment */
-static inline void ec_motion_sensor_fill_values(
- struct ec_response_motion_sensor_data *dst, const int32_t *v)
+static inline void
+ec_motion_sensor_fill_values(struct ec_response_motion_sensor_data *dst,
+ const int32_t *v)
{
dst->data[0] = v[0];
dst->data[1] = v[1];
