Commit Graph

208 Commits

Author SHA1 Message Date
hathach 0d279facbb fix cmsis rtx tick configuration
everything should work
TODO: remove static for variable error in control xfer subtask
2013-09-13 23:32:07 +07:00
hathach c71f5c6f1b integrate & able to run cmsis-rtx with current code base 2013-09-13 16:53:17 +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 ce865721a5 add test & code to send rndis msg query for permanent address (MAC address) 2013-07-19 01:52:56 +07:00
hathach 3b12917fb0 extract send message & wait & get complete message to send_message_get_response_subtask 2013-07-14 08:33:39 +07:00
hathach 25304d142f refractor qhd_xfer_error_isr (omit xfer_type para)
add accumulated total xferred byte for an endpoint until transfer with IOC set
- control xfer will have length of data phase in usbh_xfer_isr callback
2013-07-06 14:52:02 +07:00
hathach 68da489c2e refractor ehci.c adding qhd_get_xfer_type 2013-07-06 13:41:48 +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 51e9a1817b change some license text 2013-07-03 13:14:14 +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 e1ad7b62cf add way to calculate the actual byte transferred with ehci
add come callback for cdch
add code for cdc serial demo
2013-07-02 17:20:25 +07:00
hathach 7e5c6ded2d add tusbh_cdc_serial_is_mounted API
test for cdch close driver
2013-07-02 15:32:41 +07:00
hathach 12526b34a1 extract qhd_xfer_error_isr
add support for period list in xfer_error_isr
pass period TUSB_EVENT_XFER_ERROR & TUSB_EVENT_XFER_STALLED tests
2013-07-02 12:22:46 +07:00
hathach 9fea5291bf refractor extract list_next
add support for TUSB_EVENT_XFER_STALL
add test for error/stall in periodic list
2013-07-02 12:01:51 +07:00
hathach 958d390a85 refractor code 2013-07-01 20:28:16 +07:00
hathach 3f9f3f08d2 add cdc host driver close cdch_close
refractor
- add helper function in ehci qhd_next & qtd_next
- extract function qhd_create_pipe_handle
rename tusb_transfer_type_t to tusb_xfer_type_t
add some handling for stall
2013-07-01 18:53:25 +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 2cc5df9b00 add custom bulk out test 2013-06-23 01:10:59 +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 54c065b1d5 fix license 2013-06-22 12:54:47 +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 327519a5a6 refractor test
try to add travis-ci
2013-05-09 13:48:11 +07:00
hathach 63add70139 test clean up 2013-05-09 12:49:52 +07:00
hathach 861f02943d add log2_of and use this function in get_period_head 2013-05-06 20:51:34 +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 fdd98e2fa9 clean up main 2013-04-28 00:00:48 +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