Commit Graph

104 Commits

Author SHA1 Message Date
hathach 3b12917fb0 extract send message & wait & get complete message to send_message_get_response_subtask 2013-07-14 08:33:39 +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 c08c655fd1 implementing initializing for RNDIS 2013-07-05 11:46:12 +07:00
hathach aed07d83db host enum task use static control_request variable instead of literal of requests
increase enum task stack size from 128 to 150 as it comes dangerously close to overflow
2013-07-04 16:01:20 +07:00
hathach 0d37c4a319 refractor control request used in enumeration task to reduce task data
--> enum task now can work with 128 depth
2013-07-04 14:00:41 +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 539c7cdbe1 update usbh_xfer_isr to take actual byte transferred and correct tests 2013-07-02 17:37:55 +07:00
hathach d8bd749c75 change control xfer check in usbh_xfer_isr
rename
- async_list_process_isr to async_list_xfer_complete_isr
- period_list_process_isr to period_list_xfer_complete_isr

extract function void qhd_xfer_complete_isr(ehci_qhd_t * p_qhd, tusb_transfer_type_t xfer_type)
2013-07-01 16:14:46 +07:00
hathach 3f0d740776 rename usbh_isr to usbh_xfer_isr 2013-07-01 15:30:29 +07:00
hathach 35adca5ba3 house keeping 2013-07-01 11:37:53 +07:00
hathach a4f7dc1105 add & pass a first few test for cdc host
implement cdch_open_subtask
2013-07-01 10:35:37 +07:00
hathach 7e6e5cc356 [CDC]
- add configure option
- add include path
- add driver function table
2013-06-29 16:06:45 +07:00
hathach 3bca56665c add mutex support for osal
add test for mutex in test_osal_none.c
implement usbh_control_xfer using mutex to get access to queue xfer on control pipe
(while semaphore is used to sync with hcd DMA)
failed to issue control xfer: set idle & get report descriptor in hidh_open_subtask (more to work on)
2013-06-27 16:19:22 +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 fe53297b17 fix bug with custom class that terminate xfer after the first QTD 2013-06-22 22:26:00 +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 3924764dff [host lpc43xx] adding support for host custom class
refractor usbh class driver indexing
opt out periodic list code in EHCI (need to refractor/group later)
[device lpc176x] rename dcd_endpoint_configure to dcd_pipe_open
add usbd_pipe_open to manage pipe
2013-06-21 13:11:45 +07:00
hathach ed217948b8 rename descriptor type, hid descriptor type 2013-05-25 17:19:18 +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 63add70139 test clean up 2013-05-09 12:49:52 +07:00
hathach fd49cff8e8 add stub for msc host & hub driver 2013-05-06 20:09:06 +07:00
hathach 120db28a17 change format of file header & license spacing 2013-05-06 12:50:19 +07:00
hathach 4db386525f reduce delay after reset to 20ms
correct freeRTOS configCPU_CLOCK_HZ to correct M4 mcu clock
2013-04-27 14:17:06 +07:00
hathach c0104b996e implement hcd_port_speed_get
move port reset & speed detection from isr context to usbh enumeration task
- decrease time in isr significantly from 50 ms to 580us
fix bug with osal_task_delay for freeRTOS buil
2013-04-25 17:48:55 +07:00
hathach 3763e22c9a change OSAL_TASK_DEF to decouple variable name with task name
implement osal_task_delay for freeRTOS & non_os
getting both no_os & freertos running with mouse + keyboard
2013-04-25 16:41:00 +07:00
hathach 92994c8192 add attribute warn unused result for osal_create_* function
taskify keyboard_app mouse_app & led_blinking
2013-04-25 11:55:24 +07:00
hathach e9dbce5f1b add TUSB_CFG_OS_TASK_PRIO to mandatory option for using an RTOS
using plain char for error enum character
increase freeRTOS configMAX_PRIORITIES to 16
house keeping & clean up compiler warning
2013-04-25 11:00:56 +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 574710dde5 move main work in usbh_enumeration_task to its body subtask for task_assert style 2013-04-24 13:45:42 +07:00
hathach d312be7006 fix potential error with usbh_control_xfer_subtask in subtask_assert
change back to use task_assert style in usbh_enumeraion
change test to task->subtask->subtask style in test/test_osal_none.c
2013-04-24 12:20:56 +07:00
hathach 73d5f00a40 rename OSAL_TASK_DECLARE to OSAL_TASK_FUNCTION
removing TASK_ASSERT to avoid using goto/continue statement with rtos configure
2013-04-23 15:35:27 +07:00
hathach 357888a5e5 rename nxp_sof_received to nxp_int_sof
implementing freeRTOS integration
change get_period_frame_list from using lst_idx to hostid (fix bug)
adding polling interval supported for interrupt: 1ms, 2ms, 4ms, 8ms
- add interval_ms to get_period_head function
- add bInterval to qhd_init
- add support for sub-frame (less than 8 micro frames) interval
- add bunch of test for interrupt different intervals
2013-04-21 00:28:25 +07:00
hathach 2d7fbb5153 change keyboard_app.c & mouse_app.c from polling API to interrupt-based (callback isr)
and using OSAL for task-base demo
- fix ehci error with XFER_COMPLETE callback to usbh_isr, TD need to be freed & unlink before invoking
callback
- fix bug in usbh.c set device state to CONFIGURED right after SET_CONFIGURE control xfer
2013-04-10 02:34:40 +07:00
hathach e14aa4197d change osal_queue_send(osal_queue_handle_t const queue_hdl, uint32_t data) signature to osal_queue_send(osal_queue_handle_t const queue_hdl, const void * data)
- support any size queue message (instead of fixed uint32_t)
2013-04-10 01:18:32 +07:00
hathach c036efff1d adding code to allow configure MIC2555 to pull down D+/D- (still need bit bangding I2C on PB_0 PB_1)
add back port reset after get 8 bytes of device descriptor
2013-04-09 02:13:18 +07:00
hathach ef850984da move MCU define to tusb_option.h, fix the ATTR with USB RAM
hack: add delay before the very first xfer when enumerating (finalize later
after reading USB 2.0 specs)
2013-04-08 03:45:31 +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 fcb8e295ec clean up, update tests for hcd_port_reset after 8 byte descriptor & set configure before open class driver 2013-03-29 23:37:59 +07:00
hathach e658e67ebe fix the damn bug within 10 line of code in keyboard_app.c 2013-03-29 00:20:27 +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 0b08dc7724 fix bug with enum task skipping decriptor 2013-03-26 14:18:14 +07:00
hathach 205a21ff04 add code for hidh close
refractor the full configure descriptor parsing in enum task
2013-03-26 13:45:14 +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 54acee1fc8 start merge hidh_keyboard back to hidh 2013-03-26 11:41:41 +07:00
hathach a7e8a2ba9a pass all the current tests 2013-03-26 02:06:30 +07:00
hathach 086a8e4a2d add flag_supported_class to usbh_devices
remove all ATTR_WEAK in init,open,isr,close driver functions of USBH-CLASS API
- prefer testing
2013-03-26 02:02:54 +07:00
hathach c026a9f2e0 remove obsolete TUSB_CFG_HOST_HID_KEYBOARD_ENDPOINT_SIZE
temporarily ignore test for hid_host.c due to ceedling linking issue with weak symbol
implement hidh_open_subtask driver to subclass open
rename hidh_keyboard_install to hidh_keyboard_open_subtask
2013-03-25 16:02:24 +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