Home
last modified time | relevance | path

Searched refs:hid (Results 1 – 25 of 64) sorted by relevance

123

/USBX-v6.2.1/common/usbx_host_classes/src/
Dux_host_class_hid_activate.c92 UX_HOST_CLASS_HID *hid; in _ux_host_class_hid_activate() local
101 hid = _ux_utility_memory_allocate(UX_NO_ALIGN, UX_REGULAR_MEMORY,sizeof(UX_HOST_CLASS_HID)); in _ux_host_class_hid_activate()
102 if (hid == UX_NULL) in _ux_host_class_hid_activate()
106 hid -> ux_host_class_hid_class = command -> ux_host_class_command_class_ptr; in _ux_host_class_hid_activate()
109 hid -> ux_host_class_hid_interface = interface_ptr; in _ux_host_class_hid_activate()
112hid -> ux_host_class_hid_device = interface_ptr -> ux_interface_configuration -> ux_configuration… in _ux_host_class_hid_activate()
115 interface_ptr -> ux_interface_class_instance = (VOID *) hid; in _ux_host_class_hid_activate()
118 _ux_host_stack_class_instance_create(command -> ux_host_class_command_class_ptr, (VOID *) hid); in _ux_host_class_hid_activate()
123 hid -> ux_host_class_hid_class -> ux_host_class_task_function = _ux_host_class_hid_tasks_run; in _ux_host_class_hid_activate()
126 hid -> ux_host_class_hid_enum_state = UX_STATE_WAIT; in _ux_host_class_hid_activate()
[all …]
Dux_host_class_hid_deactivate.c88 UX_HOST_CLASS_HID *hid; in _ux_host_class_hid_deactivate() local
97 hid = (UX_HOST_CLASS_HID *) command -> ux_host_class_command_instance; in _ux_host_class_hid_deactivate()
100 hid -> ux_host_class_hid_state = UX_HOST_CLASS_INSTANCE_SHUTDOWN; in _ux_host_class_hid_deactivate()
105 status = _ux_host_semaphore_get(&hid -> ux_host_class_hid_semaphore, UX_WAIT_FOREVER); in _ux_host_class_hid_deactivate()
113 if (hid -> ux_host_class_hid_interrupt_endpoint) in _ux_host_class_hid_deactivate()
118 _ux_host_stack_endpoint_transfer_abort(hid -> ux_host_class_hid_interrupt_endpoint); in _ux_host_class_hid_deactivate()
122 … transfer_request = &hid -> ux_host_class_hid_interrupt_endpoint -> ux_endpoint_transfer_request; in _ux_host_class_hid_deactivate()
129 if (hid -> ux_host_class_hid_allocated) in _ux_host_class_hid_deactivate()
130 _ux_utility_memory_free(hid -> ux_host_class_hid_allocated); in _ux_host_class_hid_deactivate()
134 hid_client_command.ux_host_class_hid_client_command_instance = (VOID *) hid; in _ux_host_class_hid_deactivate()
[all …]
Dux_host_class_hid_entry.c192 static inline VOID _ux_host_class_hid_descriptor_read(UX_HOST_CLASS_HID *hid) in _ux_host_class_hid_descriptor_read() argument
200 control_endpoint = &hid -> ux_host_class_hid_device -> ux_device_control_endpoint; in _ux_host_class_hid_descriptor_read()
204 interface_ptr = hid -> ux_host_class_hid_interface; in _ux_host_class_hid_descriptor_read()
206 hid -> ux_host_class_hid_allocated = _ux_utility_memory_allocate( in _ux_host_class_hid_descriptor_read()
209 if (hid -> ux_host_class_hid_allocated == UX_NULL) in _ux_host_class_hid_descriptor_read()
213 hid -> ux_host_class_hid_status = UX_MEMORY_INSUFFICIENT; in _ux_host_class_hid_descriptor_read()
214 hid -> ux_host_class_hid_enum_state = UX_HOST_CLASS_HID_ENUM_ERROR; in _ux_host_class_hid_descriptor_read()
219 transfer_request -> ux_transfer_request_data_pointer = hid -> ux_host_class_hid_allocated; in _ux_host_class_hid_descriptor_read()
228 hid -> ux_host_class_hid_enum_state = UX_HOST_CLASS_HID_ENUM_TRANSFER_WAIT; in _ux_host_class_hid_descriptor_read()
229 hid -> ux_host_class_hid_next_state = UX_HOST_CLASS_HID_ENUM_HID_DESC_PARSE; in _ux_host_class_hid_descriptor_read()
[all …]
Dux_host_class_hid_tasks_run.c36 static inline VOID _ux_host_class_hid_inst_tasks_run(UX_HOST_CLASS_HID *hid);
79 UX_HOST_CLASS_HID *hid; in _ux_host_class_hid_tasks_run() local
87 hid = (UX_HOST_CLASS_HID *)hid_class -> ux_host_class_first_instance; in _ux_host_class_hid_tasks_run()
88 while(hid) in _ux_host_class_hid_tasks_run()
92 if ((hid -> ux_host_class_hid_flags & UX_HOST_CLASS_HID_FLAG_PROTECT) == 0) in _ux_host_class_hid_tasks_run()
94 hid -> ux_host_class_hid_flags |= UX_HOST_CLASS_HID_FLAG_PROTECT; in _ux_host_class_hid_tasks_run()
95 _ux_host_class_hid_inst_tasks_run(hid); in _ux_host_class_hid_tasks_run()
96 hid -> ux_host_class_hid_flags &= ~UX_HOST_CLASS_HID_FLAG_PROTECT; in _ux_host_class_hid_tasks_run()
98 hid = hid -> ux_host_class_hid_next_instance; in _ux_host_class_hid_tasks_run()
103 static inline VOID _ux_host_class_hid_inst_tasks_run(UX_HOST_CLASS_HID *hid) in _ux_host_class_hid_inst_tasks_run() argument
[all …]
Dux_host_class_hid_report_set_run.c36 UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report,
90 UINT _ux_host_class_hid_report_set_run(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *cl… in _ux_host_class_hid_report_set_run() argument
103 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_HOST_CLASS_HID_REPORT_SET, hid, client_report, 0, 0, UX_TRACE_HOS… in _ux_host_class_hid_report_set_run()
109 …if (_ux_host_stack_class_instance_verify(_ux_system_host_class_hid_name, (VOID *) hid) != UX_SUCCE… in _ux_host_class_hid_report_set_run()
113 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_INSTANCE_UNKNOWN, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_report_set_run()
115 hid -> ux_host_class_hid_status = UX_HOST_CLASS_INSTANCE_UNKNOWN; in _ux_host_class_hid_report_set_run()
120 device = hid -> ux_host_class_hid_device; in _ux_host_class_hid_report_set_run()
131 hid -> ux_host_class_hid_status = UX_DEVICE_HANDLE_UNKNOWN; in _ux_host_class_hid_report_set_run()
138 if (hid -> ux_host_class_hid_interrupt_out_endpoint != UX_NULL) in _ux_host_class_hid_report_set_run()
142 …transfer_request = &hid -> ux_host_class_hid_interrupt_out_endpoint -> ux_endpoint_transfer_reques… in _ux_host_class_hid_report_set_run()
[all …]
Dux_host_class_hid_periodic_report_start.c80 UINT _ux_host_class_hid_periodic_report_start(UX_HOST_CLASS_HID *hid) in _ux_host_class_hid_periodic_report_start() argument
90 …if (_ux_host_stack_class_instance_verify(_ux_system_host_class_hid_name, (VOID *) hid) != UX_SUCCE… in _ux_host_class_hid_periodic_report_start()
97 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_INSTANCE_UNKNOWN, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_periodic_report_start()
103 _ux_host_class_hid_lock_fail_return(hid); in _ux_host_class_hid_periodic_report_start()
106 …if (hid -> ux_host_class_hid_interrupt_endpoint_status != UX_HOST_CLASS_HID_INTERRUPT_ENDPOINT_REA… in _ux_host_class_hid_periodic_report_start()
110 _ux_host_class_hid_unlock(hid); in _ux_host_class_hid_periodic_report_start()
116 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_HID_PERIODIC_REPORT_ERROR, hid, 0, 0, UX_TRA… in _ux_host_class_hid_periodic_report_start()
123 … transfer_request = &hid -> ux_host_class_hid_interrupt_endpoint -> ux_endpoint_transfer_request; in _ux_host_class_hid_periodic_report_start()
131hid -> ux_host_class_hid_interrupt_endpoint_status = UX_HOST_CLASS_HID_INTERRUPT_ENDPOINT_ACTIVE;… in _ux_host_class_hid_periodic_report_start()
134 _ux_host_class_hid_unlock(hid); in _ux_host_class_hid_periodic_report_start()
Dux_host_class_hid_idle_set_run.c76 UINT _ux_host_class_hid_idle_set_run(UX_HOST_CLASS_HID *hid, USHORT idle_time, USHORT report_id) in _ux_host_class_hid_idle_set_run() argument
86 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_HOST_CLASS_HID_IDLE_SET, hid, 0, 0, 0, UX_TRACE_HOST_CLASS_EVENTS… in _ux_host_class_hid_idle_set_run()
89 …if (_ux_host_stack_class_instance_verify(_ux_system_host_class_hid_name, (VOID *) hid) != UX_SUCCE… in _ux_host_class_hid_idle_set_run()
93 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_INSTANCE_UNKNOWN, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_idle_set_run()
95 hid -> ux_host_class_hid_status = UX_HOST_CLASS_INSTANCE_UNKNOWN; in _ux_host_class_hid_idle_set_run()
100 device = hid -> ux_host_class_hid_device; in _ux_host_class_hid_idle_set_run()
106 hid -> ux_host_class_hid_status = UX_DEVICE_HANDLE_UNKNOWN; in _ux_host_class_hid_idle_set_run()
115 if (hid -> ux_host_class_hid_cmd_state == UX_STATE_WAIT) in _ux_host_class_hid_idle_set_run()
126 hid -> ux_host_class_hid_flags &= ~UX_HOST_CLASS_HID_FLAG_LOCK; in _ux_host_class_hid_idle_set_run()
130 hid -> ux_host_class_hid_cmd_state = UX_STATE_IDLE; in _ux_host_class_hid_idle_set_run()
[all …]
Dux_host_class_hid_idle_get.c82 UINT _ux_host_class_hid_idle_get(UX_HOST_CLASS_HID *hid, USHORT *idle_time, USHORT report_id) in _ux_host_class_hid_idle_get() argument
93 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_HOST_CLASS_HID_IDLE_GET, hid, 0, 0, 0, UX_TRACE_HOST_CLASS_EVENTS… in _ux_host_class_hid_idle_get()
96 …if (_ux_host_stack_class_instance_verify(_ux_system_host_class_hid_name, (VOID *) hid) != UX_SUCCE… in _ux_host_class_hid_idle_get()
100 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_INSTANCE_UNKNOWN, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_idle_get()
106 control_endpoint = &hid -> ux_host_class_hid_device -> ux_device_control_endpoint; in _ux_host_class_hid_idle_get()
112 if (hid -> ux_host_class_hid_flags & UX_HOST_CLASS_HID_FLAG_LOCK) in _ux_host_class_hid_idle_get()
117 hid -> ux_host_class_hid_flags &= ~UX_HOST_CLASS_HID_FLAG_LOCK; in _ux_host_class_hid_idle_get()
121 status = _ux_host_semaphore_get(&hid -> ux_host_class_hid_semaphore, UX_WAIT_FOREVER); in _ux_host_class_hid_idle_get()
134 _ux_host_class_hid_unlock(hid); in _ux_host_class_hid_idle_get()
144 if (hid -> ux_host_class_hid_device -> ux_device_flags & UX_DEVICE_FLAG_LOCK) in _ux_host_class_hid_idle_get()
[all …]
Dux_host_class_hid_idle_set.c82 UINT _ux_host_class_hid_idle_set(UX_HOST_CLASS_HID *hid, USHORT idle_time, USHORT report_id) in _ux_host_class_hid_idle_set() argument
88 status = _ux_host_class_hid_idle_set_run(hid, idle_time, report_id); in _ux_host_class_hid_idle_set()
90 return(hid -> ux_host_class_hid_status); in _ux_host_class_hid_idle_set()
98 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_HOST_CLASS_HID_IDLE_SET, hid, 0, 0, 0, UX_TRACE_HOST_CLASS_EVENTS… in _ux_host_class_hid_idle_set()
101 …if (_ux_host_stack_class_instance_verify(_ux_system_host_class_hid_name, (VOID *) hid) != UX_SUCCE… in _ux_host_class_hid_idle_set()
105 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_INSTANCE_UNKNOWN, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_idle_set()
111 control_endpoint = &hid -> ux_host_class_hid_device -> ux_device_control_endpoint; in _ux_host_class_hid_idle_set()
115 status = _ux_host_semaphore_get(&hid -> ux_host_class_hid_semaphore, UX_WAIT_FOREVER); in _ux_host_class_hid_idle_set()
121 …status = _ux_host_semaphore_get(&hid -> ux_host_class_hid_device -> ux_device_protection_semaphor… in _ux_host_class_hid_idle_set()
129 _ux_host_semaphore_put(&hid -> ux_host_class_hid_semaphore); in _ux_host_class_hid_idle_set()
[all …]
Dux_host_class_hid_report_set.c41 UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report,
45 UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client_report, in ux_host_class_hid_report_set_buffer_allocate() argument
109 …_ux_host_class_hid_report_compress(hid, client_report, current_report_buffer, client_report -> ux_… in ux_host_class_hid_report_set_buffer_allocate()
173 UINT _ux_host_class_hid_report_set(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client… in _ux_host_class_hid_report_set() argument
179 status = _ux_host_class_hid_report_set_run(hid, client_report); in _ux_host_class_hid_report_set()
181 return(hid -> ux_host_class_hid_status); in _ux_host_class_hid_report_set()
191 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_HOST_CLASS_HID_REPORT_SET, hid, client_report, 0, 0, UX_TRACE_HOS… in _ux_host_class_hid_report_set()
194 …if (_ux_host_stack_class_instance_verify(_ux_system_host_class_hid_name, (VOID *) hid) != UX_SUCCE… in _ux_host_class_hid_report_set()
201 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_INSTANCE_UNKNOWN, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_report_set()
207 _ux_host_class_hid_lock_fail_return(hid); in _ux_host_class_hid_report_set()
[all …]
Dux_host_class_hid_periodic_report_stop.c80 UINT _ux_host_class_hid_periodic_report_stop(UX_HOST_CLASS_HID *hid) in _ux_host_class_hid_periodic_report_stop() argument
84 …if (_ux_host_stack_class_instance_verify(_ux_system_host_class_hid_name, (VOID *) hid) != UX_SUCCE… in _ux_host_class_hid_periodic_report_stop()
91 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_INSTANCE_UNKNOWN, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_periodic_report_stop()
97 …if (hid -> ux_host_class_hid_interrupt_endpoint_status != UX_HOST_CLASS_HID_INTERRUPT_ENDPOINT_ACT… in _ux_host_class_hid_periodic_report_stop()
104 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_HID_PERIODIC_REPORT_ERROR, hid, 0, 0, UX_TRA… in _ux_host_class_hid_periodic_report_stop()
110 _ux_host_stack_endpoint_transfer_abort(hid -> ux_host_class_hid_interrupt_endpoint); in _ux_host_class_hid_periodic_report_stop()
113hid -> ux_host_class_hid_interrupt_endpoint_status = UX_HOST_CLASS_HID_INTERRUPT_ENDPOINT_READY; … in _ux_host_class_hid_periodic_report_stop()
Dux_host_class_hid_report_get.c88 UINT _ux_host_class_hid_report_get(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_CLIENT_REPORT *client… in _ux_host_class_hid_report_get() argument
100 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_HOST_CLASS_HID_REPORT_GET, hid, client_report, 0, 0, UX_TRACE_HOS… in _ux_host_class_hid_report_get()
103 …if (_ux_host_stack_class_instance_verify(_ux_system_host_class_hid_name, (VOID *) hid) != UX_SUCCE… in _ux_host_class_hid_report_get()
110 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_INSTANCE_UNKNOWN, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_report_get()
116 _ux_host_class_hid_lock_fail_return(hid); in _ux_host_class_hid_report_get()
127 _ux_host_class_hid_unlock(hid); in _ux_host_class_hid_report_get()
130 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_HID_REPORT_ERROR, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_report_get()
141 _ux_host_class_hid_unlock(hid); in _ux_host_class_hid_report_get()
147 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_HID_REPORT_ERROR, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_report_get()
159 _ux_host_class_hid_unlock(hid); in _ux_host_class_hid_report_get()
[all …]
Dux_host_class_hid_report_id_get.c83 UINT _ux_host_class_hid_report_id_get(UX_HOST_CLASS_HID *hid, UX_HOST_CLASS_HID_REPORT_GET_ID *rep… in _ux_host_class_hid_report_id_get() argument
93 …if (_ux_host_stack_class_instance_verify(_ux_system_host_class_hid_name, (VOID *) hid) != UX_SUCCE… in _ux_host_class_hid_report_id_get()
100 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_INSTANCE_UNKNOWN, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_report_id_get()
106 _ux_host_class_hid_lock_fail_return(hid); in _ux_host_class_hid_report_id_get()
119 … next_hid_report = hid -> ux_host_class_hid_parser.ux_host_class_hid_parser_input_report; in _ux_host_class_hid_report_id_get()
125 … next_hid_report = hid -> ux_host_class_hid_parser.ux_host_class_hid_parser_output_report; in _ux_host_class_hid_report_id_get()
131 … next_hid_report = hid -> ux_host_class_hid_parser.ux_host_class_hid_parser_feature_report; in _ux_host_class_hid_report_id_get()
140 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_HID_REPORT_ERROR, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_report_id_get()
171 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_HID_REPORT_ERROR, hid, 0, 0, UX_TRACE_ERRORS… in _ux_host_class_hid_report_id_get()
178 _ux_host_class_hid_unlock(hid); in _ux_host_class_hid_report_id_get()
Dux_host_class_hid_client_search.c73 UINT _ux_host_class_hid_client_search(UX_HOST_CLASS_HID *hid) in _ux_host_class_hid_client_search() argument
83 …hid_client_command.ux_host_class_hid_client_command_page = hid -> ux_host_class_hid_parser.u… in _ux_host_class_hid_client_search()
84 …hid_client_command.ux_host_class_hid_client_command_usage = hid -> ux_host_class_hid_parser.u… in _ux_host_class_hid_client_search()
85 hid_client_command.ux_host_class_hid_client_command_instance = hid; in _ux_host_class_hid_client_search()
86 …hid_client_command.ux_host_class_hid_client_command_container = (VOID *) hid -> ux_host_class_hid… in _ux_host_class_hid_client_search()
90 … hid_client = (UX_HOST_CLASS_HID_CLIENT *) hid -> ux_host_class_hid_class -> ux_host_class_client; in _ux_host_class_hid_client_search()
100 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_HID_UNKNOWN, hid, 0, 0, UX_TRACE_ERRORS, 0, … in _ux_host_class_hid_client_search()
124 hid -> ux_host_class_hid_client = hid_client; in _ux_host_class_hid_client_search()
131 hid -> ux_host_class_hid_client = UX_NULL; in _ux_host_class_hid_client_search()
146 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_ERROR, UX_HOST_CLASS_HID_UNKNOWN, hid, 0, 0, UX_TRACE_ERRORS, 0, … in _ux_host_class_hid_client_search()
Dux_host_class_hid_mouse_deactivate.c78 UX_HOST_CLASS_HID *hid; in _ux_host_class_hid_mouse_deactivate() local
84 hid = command -> ux_host_class_hid_client_command_instance; in _ux_host_class_hid_mouse_deactivate()
87 status = _ux_host_class_hid_periodic_report_stop(hid); in _ux_host_class_hid_mouse_deactivate()
90 hid_client = hid -> ux_host_class_hid_client; in _ux_host_class_hid_mouse_deactivate()
93 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_HOST_CLASS_HID_MOUSE_DEACTIVATE, hid, hid_client -> ux_host_class… in _ux_host_class_hid_mouse_deactivate()
104 …_ux_system_host -> ux_system_host_change_function(UX_HID_CLIENT_REMOVAL, hid -> ux_host_class_hid… in _ux_host_class_hid_mouse_deactivate()
/USBX-v6.2.1/common/usbx_device_classes/src/
Dux_device_class_hid_read_run.c79 UINT _ux_device_class_hid_read_run(UX_SLAVE_CLASS_HID *hid, UCHAR *buffer, in _ux_device_class_hid_read_run() argument
83 UX_PARAMETER_NOT_USED(hid); in _ux_device_class_hid_read_run()
98 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_DEVICE_CLASS_HID_READ, hid, buffer, requested_length, 0, UX_TRACE… in _ux_device_class_hid_read_run()
114 hid -> ux_device_class_hid_read_state = UX_STATE_RESET; in _ux_device_class_hid_read_run()
115 hid -> ux_device_class_hid_read_status = UX_CONFIGURATION_HANDLE_UNKNOWN; in _ux_device_class_hid_read_run()
120 endpoint = hid -> ux_device_class_hid_read_endpoint; in _ux_device_class_hid_read_run()
128 hid -> ux_device_class_hid_read_state = UX_STATE_RESET; in _ux_device_class_hid_read_run()
129 hid -> ux_device_class_hid_read_status = UX_CONFIGURATION_HANDLE_UNKNOWN; in _ux_device_class_hid_read_run()
137 read_state = hid -> ux_device_class_hid_read_state; in _ux_device_class_hid_read_run()
141 hid -> ux_device_class_hid_read_state = UX_DEVICE_CLASS_HID_READ_START; in _ux_device_class_hid_read_run()
[all …]
Dux_device_class_hid_activate.c94 UX_SLAVE_CLASS_HID *hid; in _ux_device_class_hid_activate() local
105 hid = (UX_SLAVE_CLASS_HID *) class_ptr -> ux_slave_class_instance; in _ux_device_class_hid_activate()
111 interface_ptr -> ux_slave_interface_class_instance = (VOID *)hid; in _ux_device_class_hid_activate()
114 hid -> ux_slave_class_hid_interface = interface_ptr; in _ux_device_class_hid_activate()
162 hid -> ux_device_class_hid_protocol = UX_DEVICE_CLASS_HID_PROTOCOL_REPORT; in _ux_device_class_hid_activate()
165 hid -> ux_device_class_hid_interrupt_endpoint = endpoint_in; in _ux_device_class_hid_activate()
170 hid -> ux_device_class_hid_read_endpoint = endpoint_out; in _ux_device_class_hid_activate()
173 if (hid -> ux_device_class_hid_receiver && endpoint_out) in _ux_device_class_hid_activate()
177 hid -> ux_device_class_hid_receiver -> ux_device_class_hid_receiver_event_save_pos = in _ux_device_class_hid_activate()
178 hid -> ux_device_class_hid_receiver -> ux_device_class_hid_receiver_events; in _ux_device_class_hid_activate()
[all …]
Dux_device_class_hid_initialize.c96 UX_SLAVE_CLASS_HID *hid; in _ux_device_class_hid_initialize() local
106 hid = _ux_utility_memory_allocate(UX_NO_ALIGN, UX_REGULAR_MEMORY, sizeof(UX_SLAVE_CLASS_HID)); in _ux_device_class_hid_initialize()
109 if (hid == UX_NULL) in _ux_device_class_hid_initialize()
113 class_ptr -> ux_slave_class_instance = (VOID *) hid; in _ux_device_class_hid_initialize()
152hid -> ux_device_class_hid_report_address = hid_parameter -> ux_device_class_hid_param… in _ux_device_class_hid_initialize()
153hid -> ux_device_class_hid_report_length = hid_parameter -> ux_device_class_hid_param… in _ux_device_class_hid_initialize()
154hid -> ux_device_class_hid_report_id = hid_parameter -> ux_device_class_hid_param… in _ux_device_class_hid_initialize()
157hid -> ux_device_class_hid_callback = hid_parameter -> ux_device_class_hid_param… in _ux_device_class_hid_initialize()
158hid -> ux_device_class_hid_get_callback = hid_parameter -> ux_device_class_hid_param… in _ux_device_class_hid_initialize()
161hid -> ux_device_class_hid_event_array = _ux_utility_memory_allocate_mulc_safe(UX_NO_ALIGN, UX_RE… in _ux_device_class_hid_initialize()
[all …]
Dux_device_class_hid_tasks_run.c81 UX_SLAVE_CLASS_HID *hid; in _ux_device_class_hid_tasks_run() local
90 hid = (UX_SLAVE_CLASS_HID *) instance; in _ux_device_class_hid_tasks_run()
98 hid -> ux_device_class_hid_event_state = UX_STATE_EXIT; in _ux_device_class_hid_tasks_run()
103 if (hid -> ux_device_class_hid_receiver) in _ux_device_class_hid_tasks_run()
104 hid -> ux_device_class_hid_receiver -> ux_device_class_hid_receiver_tasks_run(hid); in _ux_device_class_hid_tasks_run()
108 switch(hid -> ux_device_class_hid_event_state) in _ux_device_class_hid_tasks_run()
118 hid -> ux_device_class_hid_event_wait_start = _ux_utility_time_get(); in _ux_device_class_hid_tasks_run()
119 hid -> ux_device_class_hid_event_state = UX_STATE_IDLE; in _ux_device_class_hid_tasks_run()
125 hid_event = &hid -> ux_device_class_hid_event; in _ux_device_class_hid_tasks_run()
126 status = _ux_device_class_hid_event_get(hid, hid_event); in _ux_device_class_hid_tasks_run()
[all …]
Dux_device_class_hid_deactivate.c78 UX_SLAVE_CLASS_HID *hid; in _ux_device_class_hid_deactivate() local
85 hid = (UX_SLAVE_CLASS_HID *) class_ptr -> ux_slave_class_instance; in _ux_device_class_hid_deactivate()
88 …_ux_device_stack_transfer_all_request_abort(hid -> ux_device_class_hid_interrupt_endpoint, UX_TRAN… in _ux_device_class_hid_deactivate()
91 if (hid -> ux_slave_class_hid_instance_deactivate != UX_NULL) in _ux_device_class_hid_deactivate()
94 hid -> ux_slave_class_hid_instance_deactivate(hid); in _ux_device_class_hid_deactivate()
97 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_DEVICE_CLASS_HID_DEACTIVATE, hid, 0, 0, 0, UX_TRACE_DEVICE_CLASS_… in _ux_device_class_hid_deactivate()
100 UX_TRACE_OBJECT_UNREGISTER(hid); in _ux_device_class_hid_deactivate()
Dux_device_class_hid_uninitialize.c86 UX_SLAVE_CLASS_HID *hid; in _ux_device_class_hid_uninitialize() local
94 hid = (UX_SLAVE_CLASS_HID *) class_ptr -> ux_slave_class_instance; in _ux_device_class_hid_uninitialize()
105 _ux_device_event_flags_delete(&hid -> ux_device_class_hid_event_flags_group); in _ux_device_class_hid_uninitialize()
109 _ux_utility_memory_free(hid -> ux_device_class_hid_event_array); in _ux_device_class_hid_uninitialize()
116 _ux_device_mutex_delete(&hid -> ux_device_class_hid_read_mutex); in _ux_device_class_hid_uninitialize()
120 if (hid -> ux_device_class_hid_receiver) in _ux_device_class_hid_uninitialize()
121 hid -> ux_device_class_hid_receiver -> in _ux_device_class_hid_uninitialize()
122 ux_device_class_hid_receiver_uninitialize(hid -> ux_device_class_hid_receiver); in _ux_device_class_hid_uninitialize()
126 _ux_utility_memory_free(hid); in _ux_device_class_hid_uninitialize()
Dux_device_class_hid_control_request.c107 UX_SLAVE_CLASS_HID *hid; in _ux_device_class_hid_control_request() local
128 hid = (UX_SLAVE_CLASS_HID *) class_ptr -> ux_slave_class_instance; in _ux_device_class_hid_control_request()
137 _ux_device_class_hid_report_get(hid, request_value, request_index, request_length); in _ux_device_class_hid_control_request()
146 _ux_device_class_hid_report_set(hid, descriptor_type, request_index, request_length); in _ux_device_class_hid_control_request()
152 _ux_device_class_hid_descriptor_send(hid, request_value, request_index, request_length); in _ux_device_class_hid_control_request()
164 …*transfer_request -> ux_slave_transfer_request_data_pointer = (UCHAR)hid -> ux_device_class_hid_ev… in _ux_device_class_hid_control_request()
171 if ((UCHAR)hid -> ux_device_class_hid_event_idle_rate != duration) in _ux_device_class_hid_control_request()
174 hid -> ux_device_class_hid_event_idle_rate = duration; in _ux_device_class_hid_control_request()
179 hid -> ux_device_class_hid_event_wait_timeout = UX_WAIT_FOREVER; in _ux_device_class_hid_control_request()
185hid -> ux_device_class_hid_event_wait_timeout = (ULONG)UX_MS_TO_TICK((ULONG)duration << 2u); in _ux_device_class_hid_control_request()
[all …]
Dux_device_class_hid_event_set.c84 UINT _ux_device_class_hid_event_set(UX_SLAVE_CLASS_HID *hid, in _ux_device_class_hid_event_set() argument
92 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_DEVICE_CLASS_HID_EVENT_SET, hid, hid_event, 0, 0, UX_TRACE_DEVICE… in _ux_device_class_hid_event_set()
95 current_hid_event = hid -> ux_device_class_hid_event_array_head; in _ux_device_class_hid_event_set()
102 if ((current_hid_event + 1) == hid -> ux_device_class_hid_event_array_end) in _ux_device_class_hid_event_set()
105 next_hid_event = hid -> ux_device_class_hid_event_array; in _ux_device_class_hid_event_set()
114 if (next_hid_event == hid -> ux_device_class_hid_event_array_tail) in _ux_device_class_hid_event_set()
118 current_hid_event = hid -> ux_device_class_hid_event_array_head; in _ux_device_class_hid_event_set()
121 hid -> ux_device_class_hid_event_array_head = next_hid_event; in _ux_device_class_hid_event_set()
124 if (hid -> ux_device_class_hid_report_id == UX_TRUE) in _ux_device_class_hid_event_set()
166 if (hid -> ux_device_class_hid_event_state != UX_STATE_WAIT && in _ux_device_class_hid_event_set()
[all …]
Dux_device_class_hid_event_get.c74 UINT _ux_device_class_hid_event_get(UX_SLAVE_CLASS_HID *hid, in _ux_device_class_hid_event_get() argument
82 …UX_TRACE_IN_LINE_INSERT(UX_TRACE_DEVICE_CLASS_HID_EVENT_GET, hid, hid_event, 0, 0, UX_TRACE_DEVICE… in _ux_device_class_hid_event_get()
92 if (hid -> ux_device_class_hid_event_array_head == in _ux_device_class_hid_event_get()
93 hid -> ux_device_class_hid_event_array_tail) in _ux_device_class_hid_event_get()
99 current_hid_event = hid -> ux_device_class_hid_event_array_tail; in _ux_device_class_hid_event_get()
111 if ((current_hid_event + 1) == hid -> ux_device_class_hid_event_array_end) in _ux_device_class_hid_event_get()
114 hid -> ux_device_class_hid_event_array_tail = hid -> ux_device_class_hid_event_array; in _ux_device_class_hid_event_get()
118 hid -> ux_device_class_hid_event_array_tail++; in _ux_device_class_hid_event_get()
Dux_device_class_hid_receiver_tasks_run.c72 UINT _ux_device_class_hid_receiver_tasks_run(UX_SLAVE_CLASS_HID *hid) in _ux_device_class_hid_receiver_tasks_run() argument
94 receiver = hid -> ux_device_class_hid_receiver; in _ux_device_class_hid_receiver_tasks_run()
99 endpoint = hid -> ux_device_class_hid_read_endpoint; in _ux_device_class_hid_receiver_tasks_run()
107 switch(hid -> ux_device_class_hid_read_state) in _ux_device_class_hid_receiver_tasks_run()
121 hid -> ux_device_class_hid_read_requested_length = in _ux_device_class_hid_receiver_tasks_run()
125 hid -> ux_device_class_hid_read_state = UX_DEVICE_CLASS_HID_RECEIVER_WAIT; in _ux_device_class_hid_receiver_tasks_run()
132 hid -> ux_device_class_hid_read_requested_length, in _ux_device_class_hid_receiver_tasks_run()
133 hid -> ux_device_class_hid_read_requested_length); in _ux_device_class_hid_receiver_tasks_run()
139 hid -> ux_device_class_hid_read_state = UX_DEVICE_CLASS_HID_RECEIVER_ERROR; in _ux_device_class_hid_receiver_tasks_run()
140 hid -> ux_device_class_hid_read_status = in _ux_device_class_hid_receiver_tasks_run()
[all …]

123