Commit Graph

357 Commits

Author SHA1 Message Date
hathach 5fbbddc56a revert previous change 2013-05-09 16:03:59 +07:00
hathach 8a38c1c61c try to modify ceedling lib/rakefile.rb to exit 0 if build succeeded 2013-05-09 15:54:15 +07:00
hathach 0c5856494f remove dead source path 2013-05-09 15:39:37 +07:00
hathach 446038fd36 move cmsis to bsp/lpc43xx to keep all in repos for travis-ci run
update setting for all project file respectively
2013-05-09 15:23:04 +07:00
hathach 327519a5a6 refractor test
try to add travis-ci
2013-05-09 13:48:11 +07:00
hathach e401372c05 rename ehci_controller to ehci_controller_fake 2013-05-09 13:05:48 +07:00
hathach 63add70139 test clean up 2013-05-09 12:49:52 +07:00
hathach 0e65ce62af documenting on the way 2013-05-08 12:23:25 +07:00
hathach e12cb5107e documenting 2013-05-08 10:42:04 +07:00
hathach d39dbcb8ac update docs 2013-05-08 10:32:31 +07:00
hathach 41fee0f488 house keeping 2013-05-06 20:25:38 +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 8bd077fa5c fix bug (wrong logic) with osal_task_delay in non OS configure
complete keyboard app with key state & event TODO handle & check for non-printable(control) keycode
add unit test for osal_task_delay for non OS
2013-04-27 00:24:15 +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 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 ee9d53477a complete the support for correct polling of 1ms 2ms 4ms 8ms 2013-04-21 16:24:42 +07:00
hathach a493fab753 separate fake ehci's run async & period list
refractor list_find_previous_item & list_remove_qhd to act on ehci_link_t* instead of ehci_qhd_t*
fully support 1ms, 2ms, 4ms, 8ms for period list (each list has a dummy queue head)
- change period list structure
limit the maximum polling interval to 256 ms
add max_loop static MAX number of iteration for list_find_previous_item
add test for close 256ms polling interrupt
2013-04-21 15:09:54 +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 a9010c1786 getting build with freertos & host demo 2013-04-16 16:48:19 +08:00
hathach 89133d36ce add freeRTOS source from vendor to test
remove temp freeRTOS folder in test/support
use test/support/FreeRTOSConfig.h from win32-mingw demo
temporarily disable all tests in test_osal_freeRTOS.c
2013-04-15 19:08:24 +08:00
hathach 3a6d2da854 create a empty test file for hub 2013-04-15 18:41:29 +08: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 e6a44b3fe9 add test & code for TUSB_EVENT_INTERFACE_OPEN for tusbh_hid_keyboard_isr tusbh_hid_mouse_isr 2013-04-09 13:28:07 +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 ff63a86a4d add complete isr for hidh mouse
refractor hid_host.c
- extract hidh_interface_open from hidh_keyboard_open
- extract hidh_interface_close from hidh_keyboard_close
-
2013-04-07 18:29:30 +07:00
hathach 058e2a9837 add test code & implement
- hidh_mouse_open
- tusbh_hid_mouse_status
- tusbh_hid_mouse_get_report
2013-04-07 18:10:01 +07:00
hathach 10c08ab404 add test for mouse_open
add hid descriptor for mouse & mouse interface to descriptor_test
refractor extract function hidh_interface_status
fix error with MACRO HID_REPORT_ITEM with zero data size --> redundant semicolon
2013-04-07 15:48:01 +07:00
hathach 3d8a4ef8c8 remove hcd_port_reset before set address in enumeration
add test & implement tusbh_hid_mouse_is_supported
2013-04-07 14:44:53 +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 24ade0458e fix compiling error for tests project
start to add support for host hid mouse
2013-04-07 03:53:53 +07:00
hathach 1776bb53f6 add hal init for USB1 and trying to get USB1 working
add hack delay 100 ms after a port reset (huge) for correct speed detection
2013-04-07 03:40:24 +07:00
hathach b5f7e48ad4 refractor 2013-04-05 14:52:33 +07:00
hathach d616fa6c10 continue on refratoring 2013-04-05 14:26:28 +07:00
hathach 10f5bce0df code refractor is a everyday job 2013-04-05 14:13:03 +07:00
hathach bc9a97a1be refractor test 2013-04-05 14:05:05 +07:00
hathach 68dddefe7b add control xfer for ehci controller fake: ehci_controller_control_xfer_proceed
refractor test code
2013-04-05 14:00:37 +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 7b5d9edc5a add test for pipe_interrupt_xfer
implement keyboard app code
- forcefully place keyboard_report in RAM section 3
change used bit in qtd from reserved in buffer[1] to alternate link
add code for fake ehci controller runs on period interrupt
change signature of tusbh_hid_keyboard_get_report
- tusb_keyboard_report_t* to uint8_t*
implement period (interrupt) complete isr processing
2013-03-27 11:51:44 +07:00
hathach b0ff7a7e23 add code & test for hidh_isr (set status for keyboard) 2013-03-26 17:04:55 +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 205a21ff04 add code for hidh close
refractor the full configure descriptor parsing in enum task
2013-03-26 13:45:14 +07:00
hathach 3c767e9f44 add field to endpoint maxpacketsize (mult)
refractor hidh_open_subtask & hidh_keyboard_open
add ATTR_PACKED_STRUCT(x)
- TODO remove ugly pre_pack & post pack
2013-03-26 13:07:42 +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 ff03b452d9 remove multiple instances per device for hidh keyboard (no needed)
- API retain though
2013-03-25 22:06:00 +07:00
hathach a2031e6218 refractor hidh_keyboard_open 2013-03-25 20:57:27 +07:00
hathach 2622cc487b add more test and complete keyboard open 2013-03-25 17:57:33 +07:00
hathach d0a73f4b0d add several helper function
add test & code for hidh_keyboard_open_subtask
- skip parsing HID descriptor for keyboard
2013-03-25 17:39:22 +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 45db7b4a53 able to build test hidh
hack include in hid_host_keyboard.h
2013-03-25 13:51:44 +07:00
hathach ddeec330fa separate hidh_keyboard from hid_host
move test hid related to its own folder
2013-03-25 13:08:40 +07:00
hathach 56cd8be75e change website from tinyusb.net to tinyusb.org 2013-03-25 11:46:30 +07:00
hathach 20a22d956d changing the hcd_pipe_close behavior
- bulk/int/iso pipe can only be closed as part of unmount/safe remove process
add test for interrupt_close
2013-03-25 11:04:37 +07:00
hathach b15694bc5f fix potential bug when insert new queue head to list 2013-03-24 22:24:27 +07:00
hathach 62f5ec8a0f period_frame_list0 is not existed if period list is not required 2013-03-24 21:53:41 +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 92c137243d refractor
- rename usbh_device_info_pool to usbh_devices
- create a struct for control pipe in usbh_device_info_t
2013-03-24 16:44:59 +07:00
hathach ea04815bbc rename sem_hdl in usbh_device_info_t control_sem_hdl 2013-03-24 16:22:58 +07:00
hathach 55ce5cc4a2 add TUSB_DEVICE_STATE_INVALID_PARAMETER to tusb_device_state_t 2013-03-24 16:05:50 +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 9c5ffa9932 house keeping 2013-03-24 14:32:54 +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 44e09cc397 enhance some tests
add test for usbh_isr error invoke
fix bug if device unplugged before is set to new address
- clean up & close control addr0 in usbh_device_unplugged_isr
2013-03-23 17:31:51 +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 e6b8166a58 house keeping 2013-03-23 14:27:32 +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 ae9b9ead7a continue clean up ehci 2013-03-23 10:23:37 +07:00
hathach 53a4164b39 use DO PING for highspeed out bulk 2013-03-22 21:50:07 +07:00
hathach 397d62db10 fix bug: adjust all bulk queue head from ehci_data.device 2013-03-22 21:21:00 +07:00
hathach f6acca6664 add callback for hcd when it cleaned up all cache data for a device (previously mark as removing). 2013-03-22 18:55:45 +07:00
hathach 6b276d09bf house keeping for pipe API test code 2013-03-22 17:45:03 +07:00
hathach 45c94c2aa9 test code clean up 2013-03-22 17:36:59 +07:00
hathach cf98cdeaa2 refractoring test code 2013-03-22 17:34:59 +07:00
hathach 9d4327f5bd start to clean up test code 2013-03-22 17:10:38 +07:00
hathach dbaf6c0d30 - fix bug when unplugged unmounted-already device (mostly plugged when power on)
- add hal_debugger_is_attached & hal_debugger_breakpoint
- assert will suspend (place breakpoint) if the condition is failed and debugger is attached. Otherwise, a message to uart is printed
- fix get control qhd function when dev_addr is not zero (shifted 1)
- fix wrong logic for unsupported class
2013-03-22 17:08:51 +07:00
hathach 9bc30f7694 add some test for usbh_hcd integration
- add tests for pipe_close  (while TDs are active)
- add tests for device unplugged
add tesst & implement the async_advance_isr to clean up "REMOVING" queue head
- add helper find previous qhd
- add remove qhd from async list
- add is_removing field for async advance isr to clean up
add pipe close for control pipe & bulk pipe (with tests)
add helper get qhd from pipe_handle
2013-03-13 21:42:19 +07:00
hathach dbd3d9618d refractor rename field inactive_next_xact of ehci_qhd_t 2013-03-13 12:29:44 +07:00
hathach 1a932e7437 refractor ehci test files
adding some code for async_advance_isr
add test for async_advance_isr
2013-03-13 12:25:27 +07:00
hathach 97c436a16e add usbh_pipe_control_close (in conjunction with usbh pipe control open)
close control pipe when unplugged
2013-03-13 11:20:02 +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 63765b37c7 forget to add test file for ehci isr 2013-03-13 00:17:02 +07:00
hathach 79e277d323 go through all the enumeration (up to get full configuration)
- fix init_qhd for address 0 (clear queue head --> ehci controller halted)
- fix bug in usbh_init missing address0 for semaphore create

TUSB_CFG_DEBUG == 3: --> ATTR_ALWAYS_INLINE is null --> allow gcc to export "normal inline" function
2013-03-13 00:02:45 +07:00
hathach 80facf6f2e add isr api for usbh_hcd
- void usbh_device_plugged_isr(uint8_t hostid, tusb_speed_t speed);
- void usbh_device_unplugged_isr(uint8_t hostid);

implement port_connect_status_isr
2013-03-12 16:42:19 +07:00
hathach 38ff7123b4 add semaphore reset & queue flush API for osal
add semaphore reset when opening control pipe
2013-03-12 00:10:52 +07:00
hathach 8eaad2326b add semphore reset & queue flush API
modify test to check control pipe semaphore created with usbh_init
2013-03-11 12:00:25 +07:00
hathach 3b0b48e01a - add test code for bulk xfer isr
- fix mismatch type func return
2013-03-10 19:28:38 +07:00
hathach 0e845947ce rename 2013-03-10 18:17:57 +07:00
hathach c1848b8114 add code for ehci interrupt handler
- interrupt source identifying
- for async list process
refractor control_xfer to use insert_qtd_to_qhd
- add test for control xfer interrupt processing
- add code for faking ehci controller async list scheduling & processing
- add prototype for void usbh_isr(pipe_handle_t pipe_hdl, uint8_t class_code);
2013-03-10 17:51:53 +07:00
hathach 889f267e12 rename file 2013-03-10 07:21:54 +07:00
hathach 8457585464 add class code to hcd_pipe_open to facilitate usb_complete callback 2013-03-09 21:37:49 +07:00
hathach 2364b09f80 add int_on_complete parameter to hcd_pipe_xfer for TD chain class request
fix control transfer request: remove get_control_request_ptr()
2013-03-09 14:19:40 +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 b146730306 add test code & hcd_pipe_xfer for bulk transfer
- test cross 4k boundary test for bulk transfer
rename p_qtd_list to p_qtd_list_head
2013-03-07 19:54:00 +07:00
hathach 644f0d3932 make "used" member of ehci_qtd_t into reserved place of buffer[1] (with assert check in hcd init) 2013-03-07 17:59:07 +07:00
hathach 6d30ae1f32 guard check for open iso pipe 2013-03-07 16:10:16 +07:00
hathach 66586ffb08 re-layout ehci_data_t to get better memory consumption 2013-03-07 16:06:28 +07:00
hathach ef08654e73 add prototype for hcd_pipe(control)_close
- update test code for enum task respectively
2013-03-06 22:41:14 +07:00
hathach 5c3bd1f8dc add code & test for hcd_pipe_open interrupt
high and non-highspeed
2013-03-06 22:21:42 +07:00
hathach 7557a807a9 basically finish code for control transfer & test code 2013-03-06 16:32:01 +07:00
hathach f38fed3529 pass test for setup TD 2013-03-06 15:39:37 +07:00
hathach 685fb97086 rename fields in ehci_qtd_t 2013-03-06 15:08:09 +07:00
hathach 959311532e refractor
- rename some field in ehci_qhd/qtd_t
- code test for open pipe
2013-03-06 14:55:02 +07:00
hathach ef1cef5019 refractor ehci_data_t
separate tests for pipe open & pipe xfer
2013-03-06 14:25:26 +07:00
hathach 97a4a41b82 refractor
- remove unnecessary assign next pointer of asyn/period head in hcd_controller_init
2013-03-06 11:24:20 +07:00
hathach c2b9e1ef83 add some code & testcode for hcd_pipe_control_xfer 2013-03-06 03:03:59 +07:00
hathach 71fcf20a95 fix error
- remove p_qhd->qtd_overlay.halted = 1;
2013-03-06 01:46:01 +07:00
hathach 5b401cc517 refractor hcd_open 2013-03-06 00:29:10 +07:00
hathach b3775b631b add test & code for open bulk transfer to hcd_pipe_open() 2013-03-05 23:08:00 +07:00
hathach c0bbc2aded refractor tests 2013-03-05 15:23:12 +07:00
hathach 3ed29f5f3c add test & code for hcd_pipe_control_open 2013-03-05 14:26:36 +07:00
hathach 2c8596edeb abstract call chains from hal usb isr 2013-03-04 18:46:02 +07:00
hathach a259be6edf refractor
- remove TUSB_CFG_HOST_CONTROLLER_START_INDEX
2013-03-04 18:01:05 +07:00
hathach e1033b9b3c replace TUSB_CFG_HOST by MODE_HOST_SUPPORTED
move stuffs around
2013-03-04 17:07:14 +07:00
hathach 94c004724c allow configure host/device by controller basic
- make changes to adapt
add mcu_capacity.h
2013-03-04 16:21:41 +07:00
hathach 656da2992d add alignof to compilier specific
add static_assert support for IAR (built-in support)
2013-03-04 15:01:33 +07:00
hathach 5207875add sperate tests 2013-03-04 01:00:25 +07:00
hathach 9a8dc0a26d rename 2013-03-04 00:54:53 +07:00
hathach d644eaeb5c add test for hcd/host init
- TT control
- usb cmd
complete hcd/host initialization code
2013-03-04 00:46:40 +07:00
hathach 0f7eb8c38d add test for hcd/host init period list 2013-03-03 15:32:04 +07:00
hathach 72b42054e5 refractor 2013-03-03 12:37:44 +07:00
hathach 356c329922 implement hcd_init controller_init
- add test for async list
2013-03-03 12:31:18 +07:00
hathach 5d3e9c4b96 add "mocking" version of LPC43xx.h
- redirect LPC_USB0_BASE & LPC_USB1_BASE to the address of test object
add test for ehci initialization usbint register
2013-03-02 00:09:24 +07:00
hathach 68ff7365c5 rename ehci usb_int usb_sts usb/error field
move MCU define to tusb_option.h
2013-03-01 19:32:53 +07:00
hathach 795fe7468d start to add code for hcd_init test
change hcd_init signature (omit hostid)
2013-02-28 17:00:51 +07:00
hathach 82bd4719ce continue to strengthen include policy 2013-02-28 15:58:18 +07:00
hathach d6548d0063 strengthen include policy. Only limited headers are allowed to included from a header file. Missing needed to be included in *.c 2013-02-28 15:06:31 +07:00
hathach f56f6b6749 add timeout_timer.h to provide real tick timeout service for blocking control 2013-02-27 20:58:11 +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 d54a12c449 add test for ehci register portsc 2013-02-27 17:57:53 +07:00
hathach c3c08a6106 add test for ehci register usbsts 2013-02-27 17:31:51 +07:00
hathach 8869d17d98 add test for EHCI register offset
add test for EHCI usbcmd register structure
2013-02-27 17:14:59 +07:00
hathach b73e6c7a35 add test test_itd_structure & test_sitd_structure 2013-02-27 16:50:05 +07:00
hathach a6fac7180c add coded to test ehci alignment and structure layout (included bitfield) 2013-02-27 16:19:40 +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 5bacdc6c0f updating usbh init with class init 2013-02-08 12:52:46 +07:00
hathach 489b98cb93 add TUSB_CFG_HOST_CONTROLLER_START_INDEX
update usbh_init and test code for TUSB_CFG_HOST_CONTROLLER_START_INDEX
clean up some
2013-02-08 12:12:10 +07:00
hathach e6ed1729b2 update enumeration up to get full configuration descriptor 2013-02-06 18:12:26 +07:00
hathach 060c4b3b30 refractor move device_addr0 into usbh_device_pool
enum_entry contains speed and enum task will not carry out disconnection clean up
2013-02-06 16:52:18 +07:00
hathach 7961f04e17 remove hcd_addr0_close_Ignore
add code to check error handling from enum task
2013-02-06 13:50:17 +07:00
hathach a253e4d648 fix TASK_ASSERT for osal_none.h
add TASK_ASSERT test for osal_none
integrate test project better with eclipse
- assert message--> info windows
- test fail --> error windows
2013-02-06 13:15:12 +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 aeccdfde3f remove TUSB prefix for class enum definitions
add most of HID USAGE TABLE and definitions etc ...
2013-02-05 13:57:06 +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 93269b0343 fix osal_semaphore_wait & osal_queue_receive of osal_none's bug
- not assign error to TUSB_ERROR_NON if succeed

add code up to set device address for enumeration
2013-02-04 20:54:52 +07:00
hathach f88e9d045d add test file freeRTOS 2013-02-04 18:07:26 +07:00
hathach dd9da7846a port osal_FreeRTOS, add some include to be able to mock & link
change osal_none's queue_t member from uint16_t to uint8_t
2013-02-04 17:13:26 +07:00
hathach d71e244dff add TUSB_CFG_HOST_ENUM_BUFFER_SIZE
add enum buffer
getting serious with osal_freeRTOS
2013-02-04 16:07:42 +07:00
hathach 0a13e37ba2 resolve conflict between usbh & hcd 2013-02-04 14:48:35 +07:00
hathach 4f3b76caba rename test file for usbh 2013-02-04 13:54:14 +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 a5b29c5d33 refractor include chain with following policies
- header file only include what it needs for its declarations.
2013-02-04 13:13:07 +07:00
hathach 5ec56120e6 rename usbd_host to usbh 2013-02-04 12:29:50 +07:00
hathach 5f8839fff8 refine ASSERT_DEFINE to allow special error_handler for os task
add device_addr0 for enumeration task
start to add osal port for freeRTOS
2013-02-04 00:03:08 +07:00
hathach 3ac88f1b4e refine OSAL_TASK_LOOP_BEGIN & OSAL_TASK_LOOP_END
- add TASK_ASSERT & TASK_ASSERT_STATUS
add more code for enumerate task
add control requests & its type def
add API for HCD
- hcd_pipe_addr0_open
- hcd_pipe_control_open
- hcd_pipe_control_xfer
- hcd_pipe_open
- hcd_port_speed
2013-02-02 15:36:20 +07:00
hathach a25da9d3ee house keeping
add some more logic for enum task
2013-02-01 14:21:22 +07:00
hathach 7fc3e4f8fe house keeping 2013-02-01 12:46:17 +07:00
hathach c24d461d19 add timeout to queue_receive and update test code for it 2013-02-01 12:39:39 +07:00
hathach aab92b40d2 change osal_timeout_t to uint32_t
implement osal_tick_get & osal_tick_tock for osal_none
implement timeout for osal_semaphore_wait
2013-02-01 12:25:02 +07:00
hathach 9e3785e7e1 add std=gnu99 for test build
add hcd_init to usbh_init and update test code
add TUSB_CFG_OS_TICK_PER_SECOND define for TUSB_OS_NONE
change osal_semaphore_wait and osal_queue_receive API to have timeout effectively
2013-02-01 10:33:43 +07:00
hathach 1b963f6a71 change cmock ignore to args only
implementing usbh_host.c
2013-01-31 13:11:50 +07:00
hathach bef17fb67f add version macros 2013-01-31 11:47:07 +07:00
hathach eca87e5ee5 add ASSERT_BIN8 and its test code
add some common api for task in osal.h for mocking
2013-01-31 11:05:33 +07:00
hathach 658b2b970c change semaphore to volatile uint8_t
add osal_queue_receive code and its test
*NOTE*
- consideration for semaphore & queue with hal_interrupt_disable/hal_interrupt_enable as safe guard
2013-01-30 23:29:27 +07:00
hathach c1bf187dad add osal queue service & its test code
- create, send
2013-01-30 17:53:37 +07:00
hathach 9c9fa182d4 fix mocking osal api using ifdef
start to add task_create macro API for osal_none
2013-01-30 12:55:44 +07:00
hathach 07048b943e add primitive_types.h for portable with uint8,16,32_t, and bool
add osal_common.h to ease the complaint of MISRA 19.1
implement OSAL_NONE Task loop, semaphore wait/post and its test code
2013-01-30 11:35:37 +07:00
hathach 6db8af2023 update usbh_init and test 2013-01-29 11:06:30 +07:00
hathach 06f923c7bb add usbh_device_info_t to return device status
add usbh_init and test code
replace usbh_device_is_plugged in hid_host and test_hid_host with usbh_device_info_t
2013-01-27 17:57:35 +07:00
hathach b57e6e1121 configure unity a bit 2013-01-27 16:26:25 +07:00
hathach f613c32422 add STATIC for local variables 2013-01-27 13:16:30 +07:00
hathach 5feb1c90b4 add class_hid_keyboard_init and test code
add define _TINY_USB_SOURCE_FILE_ to hide internal API from application
2013-01-27 12:18:01 +07:00
hathach d286c95765 add check device API for stack usage
bool          usbh_device_is_plugged(tusb_handle_device_t const device_hdl);
2013-01-26 02:25:56 +07:00
hathach 7edda37518 add more test code for keyboard hid application API
refractor, restructure, rename several thing regarding host, keyboard etc ...
2013-01-26 01:37:15 +07:00
hathach fdc9a82e8c change configure handle to device handle
change test case accordingly
2013-01-23 15:01:17 +07:00
hathach 38ce3f7534 start to support
- usbd host
- osal

some global define
#define TUSB_CFG_HOST_CONTROLLER_NUM
#define TUSB_CFG_HOST_DEVICE_MAX
#define TUSB_CFG_CONFIGURATION_MAX

rename & refractor HID type structure & enum

use CException to test asssertion library
add test for hid_host_keyboard with usbd configure get & osal queue get stubs
update test for assertion library
refractor ASSERT_STATUS in assertion library
update tusb_error_t values
rename usb basic type & enum in tusb_types.h and std_descriptors.h
2013-01-22 17:41:06 +07:00
hathach cfe7a3d23b change error type to lower case for more consistency
change Error Enum to TUSB prefix for more consistency
start to add check for OS configure
2013-01-19 00:57:58 +07:00
hathach d8c8b9e38a add ASSERT POINTER support
add hid host and separate hid host & device
update host project setting with EA4357 board
add para checking test for hid host
2013-01-18 14:39:42 +07:00
hathach 7976e2fd55 prepare test project for 43xx host test 2013-01-18 12:41:30 +07:00
hathach e438a7ca09 house keeping 2013-01-18 12:29:54 +07:00
hathach 53739ccd28 rename some fifo functions to be more consistent 2013-01-16 22:37:10 +07:00
hathach 095129887e delete mcu folders as it duplicate hal folders 2013-01-16 22:23:17 +07:00
hathach 8155fd38a5 added some tests for fifo.c 2013-01-16 13:25:02 +07:00
hathach c004cd4387 add uart for lpc11uxx and retarget successfully 2013-01-16 12:43:17 +07:00
hathach 54a7668177 add test_fifo.c file template, add its test code soon 2013-01-15 15:22:48 +07:00
hathach 0c1d4f705b add binary const & its test code 2013-01-14 14:36:13 +07:00
hathach 3d8babcb14 refractor to remove duplicate code between ASSERT_HEX and ASSERT_INT
use static inline min_of and max_of instead of macro
2013-01-14 00:41:23 +07:00
hathach f991475183 add assert_hex & assert_hex_within 2013-01-13 20:39:01 +07:00
hathach b7b9531b9b done with ASSERT_INT_WITHIN 2013-01-13 20:26:51 +07:00
hathach beb20b975b add ASSERT_INT_WITHIN and its test code 2013-01-13 20:09:51 +07:00