chip/ish/hid_subsys.c: Format with clang-format
BRANCH=none
TEST=none
#define __packed __attribute__((packed))
-#define HECI_CLIENT_HID_GUID { 0x33AECD58, 0xB679, 0x4E54,\
- { 0x9B, 0xD9, 0xA0, 0x4D, 0x34, 0xF0, 0xC2, 0x26 } }
+#define HECI_CLIENT_HID_GUID \
+ { \
+ 0x33AECD58, 0xB679, 0x4E54, \
+ { \
+ 0x9B, 0xD9, 0xA0, 0x4D, 0x34, 0xF0, 0xC2, 0x26 \
+ } \
+ }
#define HID_SUBSYS_MAX_HID_DEVICES 3
@@ -108,8 +113,8 @@ static inline int is_valid_handle(hid_handle_t handle)
(uintptr_t)handle <= hid_subsys_ctx.num_of_hid_devices;
}
-static inline
-struct hid_subsys_hid_device *handle_to_hid_device(hid_handle_t handle)
+static inline struct hid_subsys_hid_device *
+handle_to_hid_device(hid_handle_t handle)
{
if (!is_valid_handle(handle))
return NULL;
@@ -117,7 +122,6 @@ struct hid_subsys_hid_device *handle_to_hid_device(hid_handle_t handle)
return &hid_subsys_ctx.hid_devices[(uintptr_t)handle - 1];
}
-
hid_handle_t hid_subsys_register_device(const struct hid_device *dev_info)
{
struct hid_subsys_hid_device *hid_device;
@@ -277,10 +281,8 @@ static int handle_hid_device_msg(struct hid_msg *hid_msg)
case HID_SET_FEATURE_REPORT:
if (cbs->set_feature_report) {
- ret = cbs->set_feature_report(handle,
- payload[0],
- payload,
- payload_size);
+ ret = cbs->set_feature_report(handle, payload[0],
+ payload, payload_size);
/*
* if no error, reply only with the report id.
* re-use the first byte of payload
@@ -293,8 +295,8 @@ static int handle_hid_device_msg(struct hid_msg *hid_msg)
break;
case HID_GET_INPUT_REPORT:
if (cbs->get_input_report)
- ret = cbs->get_input_report(handle, payload[0],
- payload, buf_size);
+ ret = cbs->get_input_report(handle, payload[0], payload,
+ buf_size);
break;
