Lines Matching refs:ddata
107 struct hid_device_data *ddata = dev->data; in usbd_hid_request() local
108 const struct hid_device_ops *ops = ddata->ops; in usbd_hid_request()
119 k_work_submit(&ddata->output_work); in usbd_hid_request()
127 k_sem_give(&ddata->in_sem); in usbd_hid_request()
139 struct hid_device_data *const ddata = dev->data; in handle_set_idle() local
140 const struct hid_device_ops *ops = ddata->ops; in handle_set_idle()
144 ddata->idle_rate = duration; in handle_set_idle()
163 struct hid_device_data *const ddata = dev->data; in handle_get_idle() local
164 const struct hid_device_ops *ops = ddata->ops; in handle_get_idle()
183 duration = ddata->idle_rate; in handle_get_idle()
200 struct hid_device_data *const ddata = dev->data; in handle_set_report() local
201 const struct hid_device_ops *ops = ddata->ops; in handle_set_report()
236 struct hid_device_data *const ddata = dev->data; in handle_get_report() local
237 const struct hid_device_ops *ops = ddata->ops; in handle_get_report()
274 struct hid_device_data *const ddata = dev->data; in handle_set_protocol() local
276 const struct hid_device_ops *const ops = ddata->ops; in handle_set_protocol()
296 if (ddata->protocol != protocol) { in handle_set_protocol()
297 ddata->protocol = protocol; in handle_set_protocol()
312 struct hid_device_data *const ddata = dev->data; in handle_get_protocol() local
326 LOG_DBG("Get Protocol: %s", ddata->protocol ? "Report" : "Boot"); in handle_get_protocol()
327 net_buf_add_u8(buf, ddata->protocol); in handle_get_protocol()
337 struct hid_device_data *const ddata = dev->data; in handle_get_descriptor() local
345 net_buf_add_mem(buf, ddata->rdesc, MIN(ddata->rsize, setup->wLength)); in handle_get_descriptor()
419 struct hid_device_data *ddata = dev->data; in usbd_hid_sof() local
420 const struct hid_device_ops *const ops = ddata->ops; in usbd_hid_sof()
431 struct hid_device_data *ddata = dev->data; in usbd_hid_enable() local
432 const struct hid_device_ops *const ops = ddata->ops; in usbd_hid_enable()
435 atomic_set_bit(&ddata->state, HID_DEV_CLASS_ENABLED); in usbd_hid_enable()
436 ddata->protocol = HID_PROTOCOL_REPORT; in usbd_hid_enable()
442 k_work_submit(&ddata->output_work); in usbd_hid_enable()
451 struct hid_device_data *ddata = dev->data; in usbd_hid_disable() local
452 const struct hid_device_ops *const ops = ddata->ops; in usbd_hid_disable()
454 atomic_clear_bit(&ddata->state, HID_DEV_CLASS_ENABLED); in usbd_hid_disable()
540 struct hid_device_data *ddata = CONTAINER_OF(work, in hid_dev_output_handler() local
543 const struct device *dev = ddata->dev; in hid_dev_output_handler()
548 if (!atomic_test_bit(&ddata->state, HID_DEV_CLASS_ENABLED)) { in hid_dev_output_handler()
568 struct hid_device_data *const ddata = dev->data; in hid_dev_submit_report() local
569 const struct hid_device_ops *ops = ddata->ops; in hid_dev_submit_report()
576 if (!atomic_test_bit(&ddata->state, HID_DEV_CLASS_ENABLED)) { in hid_dev_submit_report()
593 k_sem_take(&ddata->in_sem, K_FOREVER); in hid_dev_submit_report()
604 struct hid_device_data *const ddata = dev->data; in hid_dev_register() local
607 if (atomic_test_bit(&ddata->state, HID_DEV_CLASS_ENABLED)) { in hid_dev_register()
632 ddata->rdesc = rdesc; in hid_dev_register()
633 ddata->rsize = rsize; in hid_dev_register()
634 ddata->ops = ops; in hid_dev_register()
636 sys_put_le16(ddata->rsize, (uint8_t *)&(desc->hid.sub[0].wDescriptorLength)); in hid_dev_register()
643 struct hid_device_data *const ddata = dev->data; in hid_device_init() local
645 ddata->dev = dev; in hid_device_init()
647 k_sem_init(&ddata->in_sem, 0, 1); in hid_device_init()
649 k_work_init(&ddata->output_work, hid_dev_output_handler); in hid_device_init()