Commit Graph

424 Commits

Author SHA1 Message Date
William D. Jones 69f5f18fd6 stm32f4: Remove some template commented code. 2019-01-21 23:45:40 -05:00
William D. Jones 71e1b9d045 stm32f4: Setup packet events in tinyusb now functional. 2019-01-19 21:12:20 -05:00
William D. Jones 5720aef7bb stm32f4: Implement setup packing receive, fix typo in FIFO receive size. 2019-01-19 20:03:18 -05:00
William D. Jones 06c15bf913 stm32f4: Complete initialization for EP0 (packet handling not implemented). 2019-01-19 17:56:53 -05:00
William D. Jones 657d3e2983 stm32f4: Enable USB peripheral, fix typos in register writes. 2019-01-13 18:36:18 -05:00
William D. Jones 03cbd406cb dcd_stm32f4: Add USB init skeleton based on manual (does not enumerate). 2019-01-11 19:53:24 -05:00
William D. Jones 0f9fa5956f bsp.board_stm32f407g_disc1: Switch to external oscillator (more precise). 2019-01-11 13:47:44 -05:00
William D. Jones 75fda7d638 cdc_msc_hid: Ensure example compiles again- add missing prototypes,
fix incorrect prototypes, clean up.
2019-01-10 10:24:45 -05:00
William D. Jones b367baeaf1 Merge branch 'master' of https://github.com/hathach/tinyusb into stm32f4 2019-01-10 09:58:06 -05:00
Scott Shawcroft 52abbec7c5
Remove txbuf in favor of fifo.
Fifo incurs a second copy into a USB buffer but this ensures the
correct USB buffer alignment. Some LPC chips require 64 byte
alignment that txbuf couldn't do.
2019-01-08 14:10:40 -08:00
Scott Shawcroft 048fc9694c
Split out txbuf and add unit test. 2019-01-04 18:27:00 -08:00
Scott Shawcroft a3173b8de4
Add USB Midi support.
It also introduces a txbuffer which copies data into it but passes
the buffer straight to the USB rather than another copy.
2019-01-04 12:16:27 -08:00
hathach 257d60fe1a white spaces 2018-12-21 12:58:53 +07:00
hathach 6f17b4e019 change to dcd_get_frame_number 2018-12-21 12:46:20 +07:00
hathach 426064201a fix samd build 2018-12-19 13:16:42 +07:00
hathach 902697ca07 add dcd_get_microframe() 2018-12-17 12:14:11 +07:00
hathach 351f0d7d78 merge binary.h into tusb_common.h 2018-12-14 15:45:49 +07:00
hathach 2a60427bdc rename bit_* helper to tu_bit_*, BIT_* to TU_BIT_* for consistency 2018-12-14 15:30:54 +07:00
hathach a3713f801d clean up compiler attribute 2018-12-14 13:08:21 +07:00
hathach a6b9432600 clean up error enum 2018-12-13 14:57:21 +07:00
hathach 1c49c479ca seperate tusb_task() to tud_task() and tuh_task()
tusb_task() still exists for backward compatible
2018-12-13 14:51:37 +07:00
hathach af1ffe4675 remove task void* param 2018-12-13 13:53:43 +07:00
hathach bc46dc6edf osal clean up
remove OSAL_TASK_DEF, osal_task_create. Applicaton should create a task
and call tinyusb_task(). This make API consistent with NO OS.
2018-12-13 13:49:09 +07:00
hathach a76d3a8726
clean up 2018-12-12 14:53:11 +07:00
hathach bb544a0951
minor update 2018-12-12 14:43:45 +07:00
hathach c1c501e0c2
change usbd xfer_cb return type to bool 2018-12-12 13:12:06 +07:00
hathach b6cb4757d2
change class driver open return type to bool 2018-12-12 13:00:59 +07:00
hathach 5fd60e5761
clean up 2018-12-12 12:36:40 +07:00
hathach 6c0b0917e1
rename descriptor_* helper to tu_desc_* 2018-12-12 12:01:15 +07:00
hathach 6d86db3977
rename edpt_dir/number/addr to tu_edpt_* 2018-12-12 11:51:31 +07:00
hathach e3514b8054
rename hcd_device_remove to hcd_device_close 2018-12-12 11:34:09 +07:00
hathach c88e16bd11
clean up 2018-12-12 00:48:53 +07:00
hathach aaf65831d8
update ohci for hcd_device_remove 2018-12-12 00:48:41 +07:00
hathach def20ce35b
clean up ehci warnings 2018-12-12 00:13:48 +07:00
hathach 67d6d753d6
replace all hcd pipe close by hcd_device_remove 2018-12-12 00:00:33 +07:00
hathach c94df51503
more clean up 2018-12-11 19:35:08 +07:00
hathach 364666c206
ehci clean up 2018-12-11 17:05:56 +07:00
hathach d05021009b
more ohci clean up 2018-12-11 16:29:43 +07:00
hathach 600fac1845
fix build error with ohci 2018-12-11 16:18:56 +07:00
hathach dbc560658a
more hcd_pipe to hcd_edpt rename 2018-12-11 13:15:05 +07:00
hathach 0d04e6eb96
rename to hcd_edpt_open() 2018-12-11 13:12:21 +07:00
hathach 7deac61d5f
clean up 2018-12-11 13:09:40 +07:00
hathach b8c63ff624
ehci struct rename 2018-12-11 13:01:07 +07:00
hathach b0717275c8
ehci periodic 2018-12-11 10:50:05 +07:00
hathach 73e6bb6f5d
clean up 2018-12-11 01:06:10 +07:00
hathach 7c2056defb
remove pipe handle in host msc 2018-12-11 01:03:15 +07:00
hathach 7a626dbc8b
completely remove pipe handle for cdc/hub/ehci 2018-12-11 00:56:21 +07:00
hathach e863c99a6f
fix msc host 2018-12-10 23:15:53 +07:00
hathach 212deaf2f8
usbh name change 2018-12-10 22:19:01 +07:00
hathach 9c3c782b64
host msc built but got hardfault with inquiry command 2018-12-10 22:11:02 +07:00
hathach dffe9b335e
clean up host pipe api 2018-12-10 20:26:47 +07:00
hathach 5886ccdb03
ehci clean up 2018-12-10 20:16:26 +07:00
hathach 4e7596ca9c
add tuh_mount_cb/tuh_umount_cb 2018-12-10 19:25:57 +07:00
hathach 9c4c797502
add ep addr to host cdc 2018-12-10 19:01:28 +07:00
hathach 0ae8a1aa89
remove pipe handle.dev_addr 2018-12-10 16:58:17 +07:00
hathach a486da33ee
usbh clean up 2018-12-10 05:55:02 +07:00
hathach 57233cead7
rename usbh_xfer_isr to hcd_event_xfer_complete 2018-12-10 05:47:33 +07:00
hathach a31f83dbb0
removing pipe handle 2018-12-10 05:44:08 +07:00
hathach 75baedf27d
removing pipe handle, remove xfer type 2018-12-10 05:33:25 +07:00
hathach 8ef93ef85d
usbh remove class code in xfer isr callback 2018-12-10 05:19:08 +07:00
hathach ac67e0ea3f
clean up 2018-12-10 05:15:49 +07:00
hathach 6a6e7d0ecb
refactor usbh class driver 2018-12-10 05:07:22 +07:00
hathach 05913a7350
change usbh class driver open signature 2018-12-09 12:34:05 +07:00
hathach 637285e9ae
clean up ehci 2018-12-09 00:10:49 +07:00
hathach f6f0910778
hub clean up 2018-12-08 20:56:56 +07:00
hathach d3ac4c14a3
refactor hcd api 2018-12-08 20:51:48 +07:00
hathach 607658d047
rename MODE_HOST_SUPPORTED to TUSB_OPT_HOST_ENABLED 2018-12-07 23:38:52 +07:00
hathach e019916263
clean up ehci, support only 1 controller 2018-12-07 23:35:42 +07:00
hathach 98dd0c4d4d
clean up 2018-12-07 23:28:51 +07:00
hathach e4fd9fbaf4
seperate control xfer to 3 tds for ohci
- ohci only work with 1st transfer with specific timing. TODO fix it
later
2018-12-07 23:16:06 +07:00
hathach 6c49848d59
ohci got device not response condition in control transfer 2018-12-07 22:01:26 +07:00
hathach 2aa21a14e6
lpc17 ohci failed to execute control transfer !! 2018-12-07 18:49:26 +07:00
hathach e6e3679136
simple cdc host demo work 2018-12-07 17:37:54 +07:00
hathach 13d08cd636
adding new hcd api, tested working with control xfer.
- hcd_edpt_open
- hcd_edpt_xfer
- hcd_edpt_xfer
2018-12-07 17:31:35 +07:00
hathach 9b74f0e98f
add connect to cdc for testing 2018-12-07 15:07:00 +07:00
hathach 366ab79776
able to build host hid 2018-12-07 14:57:58 +07:00
hathach d524da0c94
enable all warnings 2018-12-07 14:49:55 +07:00
hathach 89820a36a1 able to build with host msc 2018-12-07 12:56:42 +07:00
hathach 9478c647e3 change usbh_control_xfer name and signature 2018-12-07 12:23:37 +07:00
hathach c93fb23693 usbh rename vars 2018-12-07 00:47:16 +07:00
hathach 2fe9abe71f change usbh queue to generic event queue 2018-12-06 23:45:24 +07:00
hathach ac829c0a87 minor clean up 2018-12-06 22:56:58 +07:00
hathach 07c3fd5e1e clean up hub 2018-12-06 22:47:49 +07:00
hathach 7d3ff7aff6 rename CFG_TUSB_HOST_CDC/MSC to CFG_TUH_CDC/MSC 2018-12-06 22:24:31 +07:00
hathach 5b09774ae0 clean up usbh, rename doxygen folder to docs 2018-12-06 21:46:34 +07:00
hathach 1d3583785f change osal_semaphore_wait to return bool 2018-12-06 17:31:25 +07:00
hathach 5f7d7a34f5 able to complete enumeration with os none blocking 2018-12-06 00:38:00 +07:00
hathach 5a7493ed42
fix more host build error 2018-12-05 21:12:10 +07:00
hathach 2fa32bd949
able to build host lpc18xx 2018-12-05 20:39:52 +07:00
hathach 4537ba66e5
fixing build error with host stack 2018-12-05 20:26:55 +07:00
hathach 27793cbd3d
fix travis build 2018-12-05 17:43:09 +07:00
hathach d887829b4c
change usbd_init() return to bool for simplicity 2018-12-05 17:30:04 +07:00
hathach 3dc0653d70
clean up 2018-12-05 17:09:30 +07:00
hathach 6f3898572d
add role to OSAL_QUEUE_DEF() to disable correct dcd/hcd isr 2018-12-05 17:01:19 +07:00
hathach 9f3e91a934
update nrf errata 2018-12-05 14:30:47 +07:00
hathach a73017fdc2
hal clean up
- replace tusb_hal_int_enable/disable to dcd_int_enable/disable,
hcd_int_enable/disable
- remove tusb_hal_init(), this will be part of dcd_init/hcd_init,
anything beyond dcd/hcd should be inited by bsp
2018-12-05 13:20:25 +07:00
hathach 6048a3bff4
remove dcd_connect/disconnect since there is no usage now 2018-12-05 12:22:33 +07:00
hathach c1336dff03
lpc move Chip_USB_Init() out of stack to bsp 2018-12-05 11:53:56 +07:00
hathach 9176b7b1da
renane file 2018-12-05 08:51:11 +07:00
hathach dd9c7b4249
lpc40xx device work, moving Chip_USB_Init out of tinyusb 2018-12-05 08:47:23 +07:00
hathach fe8346e642
move pinmux out of dcd into bsp 2018-12-04 18:38:01 +07:00
hathach 6c2404ca49
adding ea4088 quickstart, able to blink 2018-12-04 16:32:20 +07:00
hathach 261e0f9801
adding lpc40xx support 2018-12-04 16:06:50 +07:00
hathach 7120e12971
add mcb1800, blink led ok 2018-12-04 13:17:12 +07:00
hathach bf5ac608ff
rename dcd 18 43 2018-12-04 12:47:58 +07:00
hathach 1d6bbd9990
clean up dcd 43 2018-12-03 23:18:51 +07:00
hathach 29f721ba2c
dcd lpc43 clean up 2018-12-03 23:06:28 +07:00
hathach 9fec39d893
use lpcopen for lpc43x, work well 2018-12-03 22:58:21 +07:00
hathach bb7123eed1
use lpcopen for ea4357, blinky ok 2018-12-03 21:22:11 +07:00
hathach 7f55bbaf05
clean up 2018-12-03 18:32:06 +07:00
hathach 9e33f19378
clean up 2018-12-03 17:47:37 +07:00
hathach 63faea3929
migrate lpc17 to lpcopen, usb device work ok 2018-12-03 17:43:16 +07:00
hathach 66bd9f0a16 wrap up lpc11u port 2018-12-03 13:15:28 +07:00
hathach f28a15a886 clean up dcd lpc11u 2018-12-03 12:31:03 +07:00
hathach 57f7c18d77 dcd lpc11u6x work with cdc + msc 2018-12-03 00:04:55 +07:00
hathach 5848dd2895
lpc11u use USBSRAM, able to response with 1st request 2018-12-02 02:13:48 +07:00
hathach fb842bb804
lp11u able to receive setup packet 2018-12-01 22:21:54 +07:00
hathach d246cc2e6c
lpc13xx build ok (not work) with lpcopen 2018-11-30 23:39:18 +07:00
hathach 804c60304e
adding ses lpc13xx 2018-11-30 13:25:58 +07:00
hathach 3c49bfb588
remove obsolete example 2018-11-30 13:05:20 +07:00
hathach 1f076bd945
rename cont 2018-11-30 12:59:23 +07:00
hathach 0ab62e6fa2
more rename 2018-11-30 12:57:44 +07:00
hathach 658c2ff570
rename 2018-11-30 12:56:09 +07:00
hathach 723e02780d
clean up 2018-11-30 12:51:54 +07:00
hathach d96347a0f5
rename OPT_MCU_LPC13UXX to OPT_MCU_LPC13XX 2018-11-30 12:48:06 +07:00
hathach 522b0c11ef move nvic prio in hal/dcd to bsp for portability 2018-11-29 22:59:00 +07:00
hathach 57b85262b2 added & tested lpc17xx freertos device example
- add USB priority check for freeRTOS config
2018-11-29 21:41:09 +07:00
hathach 15e4b97e36 lpc17xx add dcd_edpt_stalled 2018-11-29 20:09:02 +07:00
hathach a76c5bf154 dcd lpc17xx, route control endpoint to EP_FAST 2018-11-29 19:58:17 +07:00
hathach ed65a43977 clean up 2018-11-29 13:09:58 +07:00
hathach 402a5fee90 dcd lpc17xx enable EpIntEn for non-control IN after DMA complete
all transfer work well
2018-11-29 12:56:02 +07:00
hathach c3140af274
correct TUD_OPT_HIGH_SPEED 2018-11-28 17:54:11 +07:00
hathach 772b2b692f
more dcd lpc17xx clean up 2018-11-28 17:31:15 +07:00
hathach 4a521d5085
clean up 2018-11-28 17:02:46 +07:00
hathach 04ad5da820 improve non-control xfer for lpc17xx 2018-11-28 16:53:36 +07:00
hathach 8b03b6d3b4 add Auto descriptor endpoint num config to support lpc17xx
CFG_TUD_DESC_*_EPNUM
2018-11-28 16:10:31 +07:00
Scott Shawcroft b4103eef06
needs to be filled out. blinks though 2018-11-27 18:11:03 -08:00
hathach a3cc52829b clean up 2018-11-27 23:55:10 +07:00
hathach 16b3f11d9f
clean up 2018-11-27 21:53:36 +07:00
hathach 15f704b623
improve dcd control lpc17xx 2018-11-27 21:51:02 +07:00
hathach 038851c362
enhance dcd lpc17xx. Able to pass enumeration 2018-11-27 20:48:46 +07:00
hathach 80ecf1fd54
add OPT_MODE_HIGH_SPEED 2018-11-26 14:56:07 +07:00
hathach 064eec5dd8
clean up warnings 2018-11-26 12:29:55 +07:00
Scott Shawcroft bf70f89240
Introduce a Makefile for the OS_NONE device example
It currently supports the SAMD21 and SAMD51 only. More will be
added later.
2018-11-25 11:46:06 -08:00
Scott Shawcroft 47fabe42ed
One tweak to make -Wdiscarded-qualifiers happy. 2018-11-23 12:48:55 -08:00
Scott Shawcroft bf8c4612dc
Make sure OUT endpoint 0 on the SAMDs always has a valid buffer to store
a SETUP token into.
2018-11-23 11:20:23 -08:00
Scott Shawcroft 246c28db1a
Turn off interrupts when working with the event queue. 2018-11-23 11:18:53 -08:00
Scott Shawcroft 6aa0146c72
Reset USB peripheral and wait for startup 2018-11-23 11:15:39 -08:00
hathach 394a22ecf7
remove pragma GCC diagnostic 2018-11-23 15:25:25 +07:00
hathach f196b24dce
rename DCD_XFER_SUCCESS to XFER_RESULT_SUCCESS 2018-11-23 15:22:46 +07:00