Commit Graph

44 Commits

Author SHA1 Message Date
hathach 61657f6751 change OSAL_TASK_FUNCTION to adapt with cmsis rtx 2014-03-19 16:50:49 +07:00
hathach d1d4ddd856 doxygen document 2014-03-16 22:20:33 +07:00
hathach 0757d2eb6c more warnings clean up 2014-03-14 15:11:57 +07:00
hathach 86681fe442 starting to add support for IAR workbench 2013-09-19 16:11:11 +07:00
hathach a522263a9d add implementation for
- tusbh_cdc_rndis_is_mounted
- tusbh_cdc_rndis_get_mac_addr
2013-07-19 02:30:22 +07:00
hathach 374aea7a11 change usbh_control_xfer_subtask to use flat API instead of passing tusb_control_request_t struct 2013-07-05 13:23:42 +07:00
hathach 391e132d6b no big deal, only rename tusb_std_request_t to tusb_control_request_t 2013-07-04 12:25:39 +07:00
hathach 1667ef5041 replace tusbh_cdc_isr by tusbh_cdc_xfer_isr with extra parameter as
- pipe id
- xferred_bytes

host_class_driver_t add xferred_bytes parameter
void (* const isr) (pipe_handle_t, tusb_event_t); -->   void (* const isr) (pipe_handle_t, tusb_event_t, uint32_t);

update hid_host & its tests
2013-07-03 11:36:08 +07:00
hathach c81c4bb817 add set idle request for hidh_open_subtask
add interface number to hidh_interface_info_t
refractor hidh_open_subtask to be a true subtask
cannot run with set idle code ON because of semaphore misuse
2013-06-27 03:20:14 +07:00
hathach 5c564df8c1 add api for hcd: hcd_pipe_is_idle
add api for usbh: tusbh_device_get_mounted_class_flag
implement api for custom class
- is mounted
- read
2013-06-21 14:20:08 +07:00
hathach 8cb7818bcc - move CMSIS & driver lib for lpc13u to codebase bsp/lpc13xx
- change descriptor.c/h able to build device example
2013-05-23 13:22:46 +07:00
hathach 120db28a17 change format of file header & license spacing 2013-05-06 12:50:19 +07:00
hathach d4a2600ecc - change OSAL_TASK_FUNCTION to have void* parameter (to be consistent with most popular RTOS)
- add new error enum TUSB_ERROR_OSAL_TASK_CREATE_FAILED
- move usbh_enumeration_task prototype to usbh.h
- change OSAL_SUBTASK_INVOKED_AND_WAIT behavior, will not "return" in calling task when subtask got error status.
calling task need to do that after the call
- osal_queue_receive signature from uint32_t* to void*

- implement osal_freertos.h for FreeRTOS 7.3 --> able to compile & build host_freertos
+ OSAL_TASK_FUNCTION
+ turn on FPU for M4 in both host_os_none & host_freertos (freertos requires FPU to be on to compile)
+ osal_task_create
+ OSAL_SUBTASK_INVOKED_AND_WAIT
+ SUBTASK_ASSERT
+ osal_semaphore_reset
+ osal_queue_flush
+ adding heap_1.c for memory management
2013-04-24 17:53:43 +07:00
hathach a6cf4f228e add tusbh_hid_mouse_isr & tusbh_hid_keyboard_isr callback with xfer_complete & error event 2013-04-09 03:13:27 +07:00
hathach 27f860db9f rename hidh_keyboard_info_t to hidh_interface_info_t
rename tusb_bus_event_t to tusb_event_t
add test_mouse_init and more stuff for hidh mouse
move delay after port reset to only for speed detection
prioritize port change interrupt over xfer interrupt
- in case of unplugged, current connect change & xfer error both set
- xfer error only break to debugger if not because of unplugged

fix bug: set dev addr0 state to UNPLUG after close its control pipe in enumeration process
2013-04-07 05:09:18 +07:00
hathach ac905a8d09 rename pipe_status_t to tusb_interface_status_t
add tusbh_hid_keyboard_status & test code
2013-03-26 16:39:25 +07:00
hathach 03d045ecde - put ATTR_UNUSED to hardfault handler variables to discard compiler warning
- change host_class_driver_t: open_subtask signature to accept tusb_descriptor_interface_t const * instead of uint8_t*
2013-03-26 12:14:04 +07:00
hathach 56cd8be75e change website from tinyusb.net to tinyusb.org 2013-03-25 11:46:30 +07:00
hathach c7c993d6cc refractor hidh keyboard
changing class hidh behavior
2013-03-24 21:40:49 +07:00
hathach a1b17be681 add class flags
change keyboard_info_pool to keyboard_data
2013-03-24 17:29:07 +07:00
hathach 439a3134b9 refractor
- rename tusbh_device_status_get to tusbh_device_get_state
- replace tusbh_device_status_t by tusb_device_state_t
2013-03-24 16:02:45 +07:00
hathach ce63980386 clean up:
- refractor tusb_handle_device_t device_hdl to uint8_t dev_addr

add keyboard_app.c/h
2013-03-24 15:50:49 +07:00
hathach 0c5e0ef0f3 - add control_pipe_status for usbh_device_info_t to reflect the status transfer of control pipe
- fix bug with hcd_port_reset
  + remove regs->portsc_bit.port_enable in the wait loop as device unplugged can cause this to always fails
- correct the timeout for hcd_controll_stop/reset 16 uframes ~ 2 ms
- potentially fix bugs device unplugged when new address is not assigned
2013-03-23 18:36:43 +07:00
hathach 4adfc6a6d8 change signature usbh_isr to add tusb_bus_event_t parameter
change singature of call_isr as well
2013-03-23 15:00:56 +07:00
hathach e14864759d refractor
- rename TUSB_DEVICE_STATE_READY to TUSB_DEVICE_STATE_CONFIGURED
- move device_state to core/tusb_types.h
- remove usbh_device_hcd_data_cleaned_up_cb, hcd now set the state directly
2013-03-23 12:13:02 +07:00
hathach d7ba86c85e refractor
- rename usbh_device_info_t.status to state
- rename enum TUSB_DEVICE_STATUS_* to TUSB_DEVICE_STATE_*
2013-03-23 11:34:51 +07:00
hathach 8beb749761 clean up 2013-03-23 09:57:08 +07:00
hathach cd2915e78c house keeping 2013-03-13 21:45:06 +07:00
hathach 97c9001d40 add hard fault handler to bsp.c
rename class_install_subtask to class_open_subtask
add class_close for unmount
adding code for usbh_device_unplugged_isr & invoke it in hcd_isr
2013-03-13 10:57:30 +07:00
hathach 453ea39865 add project file for keil
fix binary.h compiler specific
add hal_init code to reset & set usbmode --> able to get USB ISR
remove const qualifier from return function of
- get_operational_register
- get_period_frame_list
- get_async_head
- get_period_head
- get_control_qhd
add stub for
- hcd_port_connect_status
- hcd_port_speed
2013-03-12 12:06:40 +07:00
hathach c1ceec067f add isr empty function for hidh and msch and usbh 2013-03-10 19:42:50 +07:00
hathach b1db85dedf - addd p_qtd_list_tail to qhd structure for easy queue TD
- move control_request from ehci_data to usbh_device_info_pool
- add test for bulk transfer double (2 consecutive xfers)
- use table (array) structure for class driver, currently included
- refractor extract to function insert_qtd_to_qhd
+ init function
+ install_subtask
--> all class driver function must be declared with WEAK
2013-03-09 13:11:02 +07:00
hathach 82bd4719ce continue to strengthen include policy 2013-02-28 15:58:18 +07:00
hathach 0c397c6b8d house keeping
- correct initialization call sequence
- move hcd_init to ehci.c
2013-02-27 18:49:28 +07:00
hathach b1d33c7ffc rename tusbh_device_mount_succeed_cb
add set configure and tusbh_device_mount_succeed_cb invocation
refractor get_configure_number_for_device
2013-02-27 12:42:32 +07:00
hathach 4023d07df0 add parsing configuration desc & invoke driver install subtask 2013-02-27 01:57:40 +07:00
hathach 49da210860 add osal subtask support
add usbh_control_xfer_subtask as xfer and wait
fix potential error when update device info & open control pipe for new address
fix build error with hal_****.c
add STATIC_ASSSERT to perform compile time checking with sizeof later
update osal_queue_receive and osal_semaphore_wait for osal_none to support subtask
2013-02-26 17:28:05 +07:00
hathach e6ed1729b2 update enumeration up to get full configuration descriptor 2013-02-06 18:12:26 +07:00
hathach e20025b54d refractor move test enum to its own file
add assert with handler
add task assert with error catcher
2013-02-06 12:03:01 +07:00
hathach aa040c4c98 rename device_info_pool to usbh_device_info_pool
update enum task to post set address
2013-02-04 21:52:50 +07:00
hathach 5e8d70a184 complete define osal_freeRTOS for semaphore and queue 2013-02-04 18:05:22 +07:00
hathach 0a13e37ba2 resolve conflict between usbh & hcd 2013-02-04 14:48:35 +07:00
hathach 94486f55ec add usbh_hcd to hold common structure/typedef for usbh and hcd 2013-02-04 13:51:20 +07:00
hathach 5ec56120e6 rename usbd_host to usbh 2013-02-04 12:29:50 +07:00