Commit Graph

2029 Commits

Author SHA1 Message Date
Wini-Buh 60d8ecbfe6 clean up 2021-06-11 22:36:17 +02:00
Wini-Buh 1c23462b43 weak atrribute work around removed from CCRX_Port 2021-06-11 22:25:36 +02:00
Rafael Silva 2196991df3 dcd: same70: trim trailling spaces
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-06-11 21:03:36 +01:00
Rafael Silva bcd3e31bd6 dcd: same70: fix unused variable warning
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-06-11 20:59:48 +01:00
Rafael Silva 9a03ab9dfa dcd: same70: change cmsis deprecated macros
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2021-06-11 20:52:22 +01:00
hathach 910e11a8ab fix ci build 2021-06-11 19:04:16 +07:00
hathach dfe5a727c6 log clean up 2021-06-11 18:54:09 +07:00
hathach b39faa15ef map pico_info to log2, pico_trace to log3 2021-06-11 18:44:08 +07:00
hathach a6d22f5a68 replace pico_warn by log level 1 2021-06-11 18:40:01 +07:00
hathach 66c8a13f13 remove unused variable in hw endpoint
last_buf, buf_sel, transfer_size
2021-06-11 18:26:41 +07:00
hathach 93cb2ff4cf more refactor double buffered rp2040 2021-06-11 18:16:13 +07:00
hathach 1d48320d8a rename hw endpoint
- total_len to remaining_len
- len to xferred_len
2021-06-11 17:58:29 +07:00
hathach 5d6e381ef6 refactor rp2040 usb
- make _hw_endpoint_xfer_sync and _hw_endpoint_start_next_buffer private
- drop prefix _ from _hw_endpoint_xfer_continue and
_hw_endpoint_reset_transfer
2021-06-11 17:34:51 +07:00
MasterPhi c291deccfa Add fifo & DMA linked list mode support. 2021-06-11 12:17:11 +02:00
HiFiPhile 24de9d39af Format. 2021-06-11 12:17:11 +02:00
HiFiPhile 1dafcd1132 - Add Full Speed switch
- Add DMA support
- Add Dual bank support

Signed-off-by: HiFiPhile <admin@hifiphile.com>
2021-06-11 12:17:11 +02:00
HiFiPhile 4f4a33b378 Seems like fixed ep0 issues, code format.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2021-06-11 12:17:11 +02:00
HiFiPhile e7bee80948 Add OPT_MCU_SAME70 option value. 2021-06-11 12:17:11 +02:00
HiFiPhile f8aa4b3ff3 Add sketchy SAME70 DCD driver. 2021-06-11 12:17:10 +02:00
hathach 572d986a02 improve usbh 2021-06-11 17:14:22 +07:00
hathach a1a03c92f6 double buffered work with host 2021-06-11 17:05:49 +07:00
hathach 43656dc0a7 more clean up 2021-06-10 23:29:02 +07:00
hathach cf0a475a2e clean up 2021-06-10 22:00:59 +07:00
hathach c7f51cde40 implement usbh_edpt_busy (WIP), remove hcd_edpt_busy 2021-06-10 17:19:21 +07:00
hathach 7e6cba7359 remove hcd_edpt_stalled() 2021-06-10 16:55:12 +07:00
hathach 13cb016042 add usbh_classdriver.h 2021-06-10 16:48:20 +07:00
Ha Thach 3c4ab6bd8a
Merge pull request #883 from hathach/fix-rp2040-host-transferred-bytes
fix computing transferred bytes with E4
2021-06-10 11:35:51 +07:00
hathach cffa666bd1 use alias for button naming 2021-06-09 17:45:14 +07:00
Marcelo Bezerra a8abbcc34d Change buttons to start from 0 2021-06-09 12:14:04 +02:00
hathach d81a37d1be fix enum overflow with msp430 2021-06-09 12:10:44 +07:00
hathach dca9bc97d6 miss a helper 2021-06-09 10:45:37 +07:00
hathach 2c0947ebb6 update gamepad helper 2021-06-09 10:33:57 +07:00
Marcelo Bezerra e393fb32a0 re-adding ifdef removed accidentally 2021-06-09 10:33:57 +07:00
Marcelo Bezerra d3b6e28387 indent fix 2021-06-09 10:33:57 +07:00
Marcelo Bezerra de71e72e31 Fix comment in hid.h 2021-06-09 10:33:57 +07:00
Marcelo Bezerra e12195705c Pull request changes
Remove configuration options and just bump number of buttons to 32
Fix button numbereing and comments in
2021-06-09 10:33:57 +07:00
Marcelo Bezerra ce634f226e remove excess empty lines 2021-06-09 10:33:57 +07:00
Marcelo Bezerra 3842c806a6 clean up 2021-06-09 10:33:57 +07:00
Marcelo Bezerra d5f8da44d1 Add optional support for 32 gamepad buttons 2021-06-09 10:33:57 +07:00
hathach 501de2a5e8 fix computing transferred bytes with E4 2021-06-08 10:29:22 +07:00
hathach c2b85c8d6d add OPT_MCU_MM32F327X
move dcd_mm32f into mindmotion folder
2021-06-07 18:51:44 +07:00
zhangslice 26b9fc38ed
Add MM32 SDK and USB driver (#869)
* Add MM32 SDK and USB driver
* add mindmotion mm32sdk as submodule
remove the local copy of mm32
* mit  license
Signed-off-by: zhangslice <1304224508@qq.com>
Co-authored-by: hathach <thach@tinyusb.org>
2021-06-07 17:32:46 +07:00
Wini-Buh 5a554508ca Merge remote-tracking branch 'upstream/master' into CCRX_Port 2021-06-03 22:17:30 +02:00
graham sanderson c81bc38d42 Add __unused to variables that are only used if TU_LOG does something 2021-06-03 10:10:44 -05:00
Wini-Buh e26cf6b26c Missing RX device dependency corrected 2021-06-02 21:33:32 +02:00
hathach a50fd963f5 increase version for release, update changelog 2021-06-03 01:13:22 +07:00
Ha Thach 8ea0dfba68
Merge pull request #865 from kilograham/pico-0.10.0
Pico 0.10.0
2021-06-03 01:02:54 +07:00
hathach 54107100bb fix missing TU_LOG symbol 2021-06-02 00:26:50 +07:00
hathach 6e2cf2a3ee clean up log 2021-06-02 00:10:35 +07:00
hathach bc0a0386e9
clean up 2021-05-31 18:41:08 +07:00
hathach 31077f48d2
correct ohci endpoint address in xfer complete 2021-05-31 18:16:07 +07:00
hathach 4e98ce9147
use hcd_frame_number() instead of uframe 2021-05-31 18:15:47 +07:00
hathach da8000d42d
clean up ohci, remove obsolete api 2021-05-31 16:34:16 +07:00
hathach 04797bc5a5
clean up 2021-05-31 16:05:55 +07:00
hathach 4b2f32b778
update hub 2021-05-31 15:47:37 +07:00
hathach 65e5872d81
add hub_port_set_feature() 2021-05-31 15:19:07 +07:00
hathach 3fb80e76ce remove obsolete hcd_pipe_queue_xfer()/hcd_pipe_xfer() 2021-05-31 12:08:37 +07:00
hathach 5cf930d78a fix cast-align warning in msc host 2021-05-31 11:11:00 +07:00
hathach c2a0c1507b add more comment 2021-05-30 23:44:29 +07:00
hathach 54c9150574 add errata number 2021-05-30 23:41:59 +07:00
hathach 6498ee1996 fix incorrect data toggle when max packet size < 64
fix host buf_sel panic with "already available"
2021-05-30 23:35:54 +07:00
hathach eb8ca14bf8 add level 3 log for info, add generic TU_LOG() 2021-05-30 22:19:46 +07:00
graham sanderson 3973ec4b5e rp2040: fix debug compilation error 2021-05-30 08:16:15 -05:00
Wini-Buh b4f092ec74 Adaptations for Renesas CCRX toolchain and Rx72N controller performed 2021-05-29 21:23:39 +02:00
hathach 164778a716 update limit each transfer not less than 64 2021-05-28 17:42:13 +07:00
hathach e9c22e4a5c increase version for release 2021-05-28 17:24:35 +07:00
hathach 7c66c5121b
update doc 2021-05-27 19:31:55 +07:00
hathach 9ad6fadf6a
more include clean up 2021-05-27 18:34:07 +07:00
hathach f384d6f67e
more with clean up 2021-05-27 18:11:12 +07:00
hathach b36b211c26
clean up tusb_fifo.h include 2021-05-27 17:58:42 +07:00
hathach 9736e54734
include clean up 2021-05-27 17:40:39 +07:00
hathach c7cecf28c8
clean up 2021-05-27 00:16:45 +07:00
hathach 814edec89f clean up 2021-05-26 20:34:06 +07:00
hathach faa31152b4 rename usbd_edpt_iso_xfer to usbd_edpt_xfer_fifo 2021-05-26 20:34:06 +07:00
Ha Thach 4e2684f23a
Merge pull request #825 from ogatatsu/hid_desc
fix hid report descriptor
2021-05-26 20:33:45 +07:00
hathach f9c542aa52
fix dfu example build 2021-05-26 18:16:56 +07:00
hathach dbef50f8ff Merge branch 'master' into xmos-jmccarthy-master 2021-05-26 17:32:49 +07:00
hathach 954056da0c
fix warnings cast function type for nrf, fix pico osal warning
add TODO for overflow in tusb_fifo.c
2021-05-25 21:02:40 +07:00
Jeremiah McCarthy ce59d69520 Merge remote-tracking branch 'official/master' 2021-05-25 09:27:35 -04:00
hathach 4f03332118 clean up 2021-05-23 20:14:01 +07:00
hathach 3654d96e07 only invoke tuh_msc_umount_cb() if needed 2021-05-23 14:11:12 +07:00
hathach 8cffe4897e change hid device internal boot_mode to protocol_mode 2021-05-23 13:56:32 +07:00
hathach a1dab1611b get protocol when enum with hid boot interface 2021-05-22 23:30:41 +07:00
hathach f13a3c04f7 fix missing report in tuh_hid_set_report() 2021-05-22 22:43:55 +07:00
hathach a2c4a48dd6 add tuh_hid_report_sent_cb() 2021-05-22 22:03:21 +07:00
hathach b8e019da32 rename tuh_hid_get_report_cb to tuh_hid_report_received_cb() 2021-05-22 21:51:30 +07:00
hathach df65c35b31 implement hid host set report with control transfer
rename mount, umount callback
2021-05-22 21:48:42 +07:00
hathach 63c57ed1a4 clean p 2021-05-22 20:55:42 +07:00
hathach ad845db6a5 improve hid parser 2021-05-22 20:54:59 +07:00
hathach 350dfb2ea3 more hid api rename 2021-05-22 18:17:32 +07:00
hathach 89dad1ad41 update app 2021-05-22 16:48:07 +07:00
hathach 99add05aa7 simplify hid api
add hid set_protocol() and set_protocol_complete_cb()
2021-05-22 16:27:28 +07:00
hathach 2df5a5367f update hid host get/set protocol to match device 2021-05-18 13:12:33 +07:00
hathach 40cd3a7e20 Merge branch 'master' into host-hid 2021-05-18 13:08:30 +07:00
hathach ffdcf9a0d0 move report_info to application
update API accordingly, update hid parser for usage, and usage_page.
2021-05-18 12:58:24 +07:00
hathach da6a7fb2bb update hid report descriptor macro 2021-05-18 12:58:24 +07:00
hathach 5b2d117bcd fix compile 2021-05-18 12:58:24 +07:00
hathach 93661042d9 more API update
- remove tuh_n_hid_n_get_report()
- usbh auto queue get report and invoke callback when received data
2021-05-18 12:58:24 +07:00
hathach dfa8b41b96 adding hid parser 2021-05-18 12:58:24 +07:00
hathach 9ddc3bfd6d more host hid API
adding hid parser
2021-05-18 12:58:24 +07:00
hathach 641f55f1f1 remove CFG_TUH_HID_KEYBOARD and CFG_TUH_HID_MOUSE 2021-05-18 12:58:24 +07:00
hathach cc1b83412a continue with hid host rework 2021-05-18 12:58:24 +07:00
hathach 9324fd8f2e more hid host API rework 2021-05-18 12:58:24 +07:00
hathach 7305fec4db change hid device report len from uint8 to uint16 2021-05-18 12:58:24 +07:00
hathach db8ea7ea1c clean up 2021-05-18 12:58:24 +07:00
hathach 791efecfdf add tuh_device_ready() 2021-05-18 12:58:24 +07:00
hathach b7a8b278c8 rename tuh_device_is_configured() to tuh_device_configured()
- remove tuh_device_get_state()
- more hid mouse clean up
2021-05-18 12:58:24 +07:00
hathach 69defb5edc rename and moving 2021-05-18 12:58:24 +07:00
hathach a5cd81a226 correct hid host mount/unmount callback
rename HOST_CLASS_HID to CFG_TUH_HID
2021-05-18 12:58:24 +07:00
hathach be165a6713 reworking host hid API 2021-05-18 12:58:24 +07:00
hathach 510beef9f8 make tuh_msc_mount_cb() tuh_msc_unmount_cb() as weak callback 2021-05-18 12:58:24 +07:00
hathach e0dbb489ae rename CFG_TUSB_HOST_ENUM_BUFFER_SIZE to CFG_TUH_ENUMERATION_BUFSZIE
add usbh_get_enum_buf
2021-05-18 12:58:24 +07:00
hathach e83bdcdfdc reworking hid host 2021-05-18 12:58:24 +07:00
hathach 13613eafb7 correct ehci control endpoint address report on xfer complete
improve host log
2021-05-18 12:58:24 +07:00
hathach 3a7f8b3ac3 separte tusb_init/inited() to tud/tuh init/inited
add rhport to tud_init()
2021-05-18 12:58:24 +07:00
hathach 2666e1efec add tuh_inited() and tud_inited() 2021-05-18 12:58:24 +07:00
hathach 68fa17e17c more API rename 2021-05-18 12:58:24 +07:00
hathach f1148ca5ac reworking hid host 2021-05-18 12:58:24 +07:00
hathach 98f5082191 rename var to be consistent 2021-05-18 12:58:24 +07:00
hathach 1dd2cd43dd add hcd_ehci.h as interface for ehci port 2021-05-18 12:58:24 +07:00
hathach a26752a93e fix build error 2021-05-18 12:45:59 +07:00
hathach 7e9e682e09 update to use HID spec protocol value for get/set_protocol() 2021-05-18 12:38:11 +07:00
hathach e163f85ee0 clean up, rename some HID device symbol/API
- add tud_hid_n_interface_protocol()
- rename tud_hid_n_boot_mode() to  tud_hid_n_get_protocol()
- rename tud_hid_boot_mode_cb() to tud_hid_set_protocol_cb()
- add HID_PROTOCOL_BOOT/REPORT to avoid magic number 0,1
- rename HID_PROTOCOL_NONE/KEYBOARD/MOUSE to HID_ITF_PROTOCOL_ to avoid
confusion
2021-05-18 12:32:20 +07:00
Ha Thach 2d15e11830
Merge pull request #827 from kasjer/kasjer/fix-audio-rx_done_cb 2021-05-12 00:14:31 +07:00
hathach 9233269a2c only apply errata walkaround for nrf52 2021-05-11 18:38:23 +07:00
Jerzy Kasenberg e2f795067a Allow build for NRF5340 MCU
Errata code referred to NRF_USBD_BASE.
This definition is not present in NRF5340 but both NRF52 and NRF53
do have NRF_USBD which maps to NRF_USBD_BASE for NRF52 and
to NRF_USBD_S_BASE for NRF5340.
This just make build possible for NRF5340.
2021-05-11 12:37:08 +02:00
corvus-ossifragus 72f5202086 Update trace statements that referenced deprecated structure elements. 2021-05-10 10:09:09 -04:00
Jerzy Kasenberg 74ca1894de audio_device: Fix build error
ep_in_as_intf_num was incorrectly used to access out interface
which is defined for 'in' interface.
Code related to 'out' endpoint should use ep_out_as_intf_num instead.
2021-05-10 15:58:04 +02:00
Ha Thach 2a343ba916
Merge pull request #826 from hathach/minor-cleanup
minor clean up
2021-05-10 19:29:45 +07:00
hathach 13de8f5d98 minor clean up 2021-05-10 19:15:46 +07:00
ogatatsu 5d69b2ac4d fix hid report descriptor 2021-05-10 17:19:44 +09:00
corvus-ossifragus 13b510ad8e Update hcd_rp2040.c
Remove reference to the deprecated "num" and "in" members  of struct hw_endpoint which still exist in an assert statement and break DEBUG builds.
2021-05-07 16:49:48 -04:00
Jeremiah McCarthy 05892a5a1e Merge branch 'master' of github.com:xmos-jmccarthy/tinyusb 2021-05-06 12:18:55 -04:00
Jeremiah McCarthy dab1ed6b32 Add example to be tested
Update API description.
2021-05-05 17:42:38 -04:00
Ha Thach 42a1d2f3b9
Merge pull request #804 from hathach/audio_make_dma_ready
Implement functions to allow for DMA usage in audio driver.
2021-05-02 15:29:38 +07:00
hathach 18c35bb89e some text fomarting, update unit test to test get buffer info for fifo 2021-05-02 15:01:28 +07:00
Reinhard Panhuber 5add664874 Remove n from tu_fifo_get_write_info() and fix bug in vendor class 2021-04-30 17:37:14 +02:00
Reinhard Panhuber 6acfa14fec Fix bug in cdc_peek 2021-04-30 17:23:34 +02:00
Reinhard Panhuber 54f332fae0 Fix cdc peeks() 2021-04-30 15:42:27 +02:00
Reinhard Panhuber 5f88def9c9 Comment cleanup 2021-04-30 15:14:27 +02:00
Reinhard Panhuber 14e2c004cd Remove variable n in tu_fifo_get_read_info() 2021-04-30 15:08:14 +02:00
Reinhard Panhuber de933c45bc Remove all remainings with peek_at 2021-04-30 14:56:14 +02:00
Reinhard Panhuber 5f268608d7 Remove offset feature from fifo.c 2021-04-30 13:39:55 +02:00
Reinhard Panhuber 8f72c97f7b Change read infos to pointer type 2021-04-30 12:59:12 +02:00
Jeremiah McCarthy f830800d00 Fix typo and clean up reset 2021-04-29 16:04:18 -04:00
hathach c9177246d2 temporarily fix include recusrive loop 2021-04-28 12:31:24 +07:00
hathach ba90a8cb79 use correct NBYTES_MAX for full and high speed 2021-04-26 20:22:40 +07:00
hathach c26875e70d add TUP_MCU_STRICT_ALIGN macro that manually pick bytes for lpc55 port1 that is m4 but cannot unaligned acces on usb ram 2021-04-26 17:42:49 +07:00
hathach a8e109cb3d clean up 2021-04-26 17:14:20 +07:00
hathach 8ebdf2b097 ip3511 correct buffer offset, nbytes layout for highspeed port1
able to get passed enumeration and up to READ10
2021-04-26 14:43:58 +07:00
hathach f14daf2081 fix unaligned access with port1 hs 2021-04-24 15:04:58 +07:00
hathach b15d126d59 lpc55 improve multiple controller support
port1 highspeed requires USB_RAM
2021-04-24 13:36:05 +07:00
hathach 7089df2088 lpc55 correct bus_reset with highspeed on support controller
correct hsphy init for family
2021-04-24 12:19:13 +07:00
hathach 8bed369c7f lpc55 better multiport support 2021-04-24 11:30:14 +07:00
hathach 8642c2045c update dcd ip3511 for better multiple rhport support 2021-04-24 10:44:14 +07:00
Reinhard Panhuber 7072f0155e Change tu_fifo_get_linear_write/read_info() to return a struct
Compilers always complain that variables set by function via pointer
might be uninitialized so to avoid that return values are now delivered
via struct.
2021-04-23 11:48:54 +02:00
Reinhard Panhuber a98d0217a0 Init len_wrap = 0 to fix compiler complains. 2021-04-23 10:47:22 +02:00
Reinhard Panhuber 4dd1f1f3b5 Fix include path in audio_device.h 2021-04-23 10:32:22 +02:00
Reinhard Panhuber 03f974c9b9 Implement functions to allow for DMA usage in audio driver.
- Add tud_audio_n_get_ep_out_ff(), tud_audio_n_get_ep_in_ff(),
tud_audio_n_get_rx_support_ff(), and tud_audio_n_get_tx_support_ff()
- Change get_linear_read/write_info() to return linear and wrapped part
at once
- Adjusted affected code in audio_device.c and tested with
audio_4_channel.
2021-04-23 10:27:48 +02:00
Jeremiah McCarthy b8e5885c2b Removes polltimeout behaviour and restructures
Moves dfu_req_dnload_reply to ACK stage of a DNREQUEST.

Removes unneeded variables due to other simplifications.
2021-04-22 17:45:33 -04:00
Jeremiah McCarthy 8c80ddeb54 Fix statte check on DATA stage 2021-04-22 17:00:57 -04:00
Jeremiah McCarthy cc440ade81 Remove custom status description table 2021-04-22 16:47:05 -04:00
Jeremiah McCarthy 45e401e69d Remove unused alt_setting 2021-04-22 16:42:54 -04:00
Jeremiah McCarthy e54d9d10af Add const 2021-04-22 16:39:43 -04:00
Jeremiah McCarthy 289af581bb Remove uunused code 2021-04-22 16:06:06 -04:00
Jeremiah McCarthy 18e9d253e9 Remove usb reset callback 2021-04-22 16:04:09 -04:00
Jeremiah McCarthy 0936a76dc9 Remove nonstd behaviour 2021-04-22 15:59:49 -04:00
Jeremiah McCarthy 88dea7a0a8 Move debug from .h to .c 2021-04-22 15:02:50 -04:00
Jeremiah McCarthy 01661b3f28 Replace dfu_mode with dfu 2021-04-22 14:56:52 -04:00
Reinhard Panhuber 29bcc83d0f Remove unnecessary volatile and short audio function index to func_id 2021-04-21 17:01:38 +02:00
Reinhard Panhuber 705753f448 Merge remote-tracking branch 'upstream/master' into uac2_fix_cs_as_int_alt_set_0 2021-04-20 20:15:54 +02:00
Reinhard Panhuber c7c11b181c Clean up old depracted and misleading variable names 2021-04-20 20:15:02 +02:00
Reinhard Panhuber fef0d54559 Refactor static function for better performance 2021-04-20 19:56:40 +02:00
Reinhard Panhuber 4408ffce88 Fix pointer alt_setting to be cleared when driver gets initialized 2021-04-20 18:44:56 +02:00
Alex Lisitsyn 2f0cb8b5f1 tinyusb: add support of esp32s3 target
add support of new esp32s3 target and the board
update the roles.mk wrapper to allow dfu flashing of espressif chip
update examples to allow compilation for esp32s3_addax_1 board
once the code is tested the PR to original tinyusb repo will be submitted
2021-04-16 13:38:00 +02:00
hathach 9ecb91e1bd fix build with LOG=2 2021-04-15 23:47:28 +07:00
hathach b687a4fc20 Merge branch 'master' into edpt_ISO_xfer 2021-04-15 12:12:52 +07:00
hathach 3c84776e0a minor clean up 2021-04-15 12:09:12 +07:00
Reinhard Panhuber 8d9f60ca5e Improve user feedback in case of wrong configuration of audio driver 2021-04-14 21:52:54 +02:00
Jeremiah McCarthy 7b45b38fe4 Remove DFU mode and rt 2021-04-12 11:17:01 -04:00
Joey Castillo 7c8b4991f1 Add support for SAM L22 family 2021-04-09 17:33:14 -04:00
Reinhard Panhuber 2134c1a875 Fix defines in audio_device.c 2021-04-08 21:48:36 +02:00
Reinhard Panhuber 4bebb9ca49 Remove depracted defines in audio_device.c 2021-04-08 20:11:51 +02:00
Jeremiah McCarthy ae851bba31 Resolve gcc warnings for no parameter functions 2021-04-07 17:15:26 -04:00
Jeremiah McCarthy 2e2dc7bdc5 Revise per initial comments
Returns the RT driver to the function state of previous iteration, which
did not support the will_detach.  Behavior should be fine without this
feature.  This removes much of the added bloat to track state, and
handle requests in the APP_DETACH state which is no longer required.

Removes the optional bloat added to the RT driver, such as responding to
GETSTATE requests.

Fixes the DFU Mode to extract the attr bits from the functional
descriptor when opened.

Fixes some incorrect bitwise if checks.

Also, updates some naming of functions to be consistent with the rest of
the library.
2021-04-07 17:05:04 -04:00
Reinhard Panhuber 8eacdffebd Optimize encode/decode - refactor unnecessary repetitive division 2021-04-07 20:07:28 +02:00
hathach d9a0cc9e9f
more cleanup 2021-04-07 16:50:45 +07:00
hathach 893919a848 remove tu_fifo_backward_write/read_pointer API
since it is illegal from fifo perspective
2021-04-07 13:27:28 +07:00
hathach 2468f9e26d more _ff_pull/push clean up 2021-04-07 13:15:25 +07:00
hathach 9042e973d3 clean up _ff_push_n 2021-04-07 12:52:57 +07:00
hathach d6737fb5fe use tu_unaligned_write32() for _ff_push_const_addr 2021-04-07 12:34:00 +07:00
hathach d0fa4d5189 rename 2021-04-07 12:24:24 +07:00
hathach 8ac156622d fix cast-align warning 2021-04-07 00:38:12 +07:00
hathach a3c06aa7bc more clean up for _ff_pull_const_addr_in_full_words() 2021-04-06 23:39:39 +07:00
hathach d82ee2f8c0 refactor _ff_pull_n() with const addr 2021-04-06 23:12:04 +07:00
hathach 58bab86d79 minor clean up 2021-04-06 21:09:23 +07:00
hathach c5db2282ad Merge branch 'master' of github.com:hathach/tinyusb into edpt_ISO_xfer 2021-04-06 19:35:01 +07:00
Ha Thach 1d20c84798
add tu_unaligned_read32/write32 (#772)
* add tu_unaligned_read32/write32
* added tu_unaligned_read16/write16
* add TU_ATTR_ALWAYS_INLINE, add to most of simple inline function
2021-04-06 19:32:01 +07:00
hathach 8b79040c38 code format 2021-04-06 15:34:50 +07:00
Jeremiah McCarthy c39b7b8177 Add DFU runtime and mode "class"
With the runtime and mode portions in separate classes, a single
application should only be building with one or the other enabled.  In
some applications both might be desired at build time.

The CFG_TUD_DFU_RUNTIME_AND_MODE option creates a DFU class, which asks
the application which mode to initialize to.  This allows a runtime
change between RT and DFU mode, by just reinitializing tusb.
2021-04-05 17:52:33 -04:00
Jeremiah McCarthy bc2cb99780 Remove unreachable callback 2021-04-05 17:06:27 -04:00
Jeremiah McCarthy fdc91f8d2c Fix bug during initialization of DFU Mode 2021-04-05 16:48:09 -04:00
Jeremiah McCarthy c5b8ef1529 Separate DFU RT and Mode. Untested 2021-04-05 16:32:58 -04:00
hathach 68687ed0f4 fix build 2021-04-06 01:16:51 +07:00
hathach 7ab8da949e audio driver only use USE_LINEAR_BUFFER = 0 for stm32 synopsys driver 2021-04-06 01:07:32 +07:00
hathach 3acf0c2d73 revert dcd_edpt_xfer_fifo() implementation for esp32s2 2021-04-06 01:00:00 +07:00
hathach 69ad092fce revert dcd_edpt_xfer_fifo() implementation for nuc120 121 2021-04-06 00:13:12 +07:00
hathach 49b2d8f26c revert dcd_edpt_xfer_fifo() implementation for msp430 2021-04-06 00:07:17 +07:00
Jeremiah McCarthy 164d3e82e3 Fix incorrect DNLOAD request len passed to app
Fixes bug where the app callback was getting the length of the status
request transfer rather than the length of the data stage payload.

TODO: Right now this returns the expected length, when it really should
be returning the transfer length.
2021-04-05 11:13:42 -04:00
hathach 8d2dfe872c revert dcd_edpt_xfer_fifo() implementation for stm32_fsdev 2021-04-05 19:19:49 +07:00
hathach bebe2f0bbf revert dcd_edpt_xfer_fifo() implementation for nuc505 2021-04-04 22:50:26 +07:00
hathach 586a46c7d3 revert dcd_edpt_xfer_fifo() implementation for samg
samg fifo is accessed byte by byte (although the register is 32 bit).
2021-04-04 21:33:19 +07:00
Reinhard Panhuber 1ac9e7e3a7 Fix wrong read mutexes in audio_device.c 2021-04-03 18:22:19 +02:00
Reinhard Panhuber f6ba58e370 Fix wrong pointer type in audio_device.c 2021-04-03 17:50:30 +02:00
Reinhard Panhuber 4af5189492 Fix potential bug in support FIFO sizes 2021-04-03 16:53:29 +02:00
Reinhard Panhuber 475badd087 Add missing #defines in uac2_headset example 2021-04-03 16:10:46 +02:00
Reinhard Panhuber fc65f39ff2 Fix error in #defines in uac2_headset 2021-04-03 15:58:41 +02:00
Reinhard Panhuber ec6b240de2 Fix #define error in audio_device.h 2021-04-03 15:44:44 +02:00
Reinhard Panhuber 6236effb14 Fix #define error in audio_device.h 2021-04-03 15:29:39 +02:00
Reinhard Panhuber 8b90c08b35 Fix #define errors in audio_device.h 2021-04-03 15:24:38 +02:00
Reinhard Panhuber a1efd41649 Merge remote-tracking branch 'upstream/master' into edpt_ISO_xfer 2021-04-03 09:50:08 +02:00
Reinhard Panhuber 9b2ddd9cc6 Generalize audio driver for 3 audio functions plus a lot more.
- Audio format and parameters are parsed from descriptors thus user no
longer needs to give them explicitely

- Tested for 4 channel software type I PCM encoding with 16 bit with 1
channel per FIFO and 2 channels per FIFO (this is I2S specific)
2021-04-03 09:49:27 +02:00
Ha Thach eb92986b88
Merge pull request #766 from hathach/enhance-midi
Enhance midi
2021-04-02 15:47:40 +07:00
hathach 48bb96f507 correct midi stream read behavior to read until user buffer is full or no more data from usb fifo 2021-04-02 15:08:36 +07:00
hathach 350eb11277 refactor midi read buffer to stream 2021-04-02 14:52:44 +07:00
hathach da59c4ad44 rename midi write()/read() to stream_write() stream_read()
also add deprecated for warning and rename hint
2021-04-02 14:43:38 +07:00
hathach 99b78e62f2 removed tud_midi_write24() 2021-04-02 14:34:13 +07:00
hathach 08fe16840f refactor midi write into stream 2021-04-02 14:26:55 +07:00
hathach 6b04efd443 refactor midi stream read 2021-04-02 13:55:51 +07:00
hathach 080b14b292 fix midi tx fifo overflow cause data corruption
rename
2021-04-02 13:26:55 +07:00
Ha Thach 2f5dda90b7
Merge pull request #757 from kkitayam/add_support_for_gr_citrus
Add support for GR-CITRUS
2021-03-31 22:01:43 +07:00
hathach 949ff791e0 code format 2021-03-31 00:34:09 +07:00
hathach b05084e406 remove tud_midi_read_flush() 2021-03-30 23:56:55 +07:00
hathach c5aa661c89 rename tud_midi_receive/send to tud_midi_packet_read/write 2021-03-30 23:54:17 +07:00
hathach 89a911ee43 correct hid key enter = 0x28, return = 0x9E 2021-03-30 21:26:35 +07:00
hathach d135825e9c add hid keys from 0x6B to 0xA4 2021-03-30 21:12:56 +07:00
kkitayam 4a597c9698 cleanup 2021-03-28 12:42:28 +09:00
kkitayam a1f1941c3f fixed a OUT transfer did not completed multiple of the max packet size 2021-03-27 16:03:04 +09:00
kkitayam e010ea30e5 using BRDY interruption for handling IN transfers. 2021-03-27 14:42:19 +09:00
Jeremiah McCarthy fb7b47cf07 Minor cleanup 2021-03-26 17:32:03 -04:00
Jeremiah McCarthy 1138f8cc70 Add DFU Class per Version 1.1 Spec 2021-03-26 15:30:43 -04:00
kkitayam f8cf88f918 update for gr_citurs 2021-03-26 19:32:39 +09:00
kkitayam 13735eb21d added dcd for Renesas USBa 2021-03-26 19:30:53 +09:00
Reinhard Panhuber 994dddc231 Fix shadowing parameter in fifo.c 2021-03-25 14:38:55 +01:00
Reinhard Panhuber bfddfbadc7 Implement unaligned word copy. 2021-03-25 14:28:59 +01:00
Reinhard Panhuber 1e4e87de51 Rework to copy wrapped word bytes by byte in copy_to_cont_dst etc. 2021-03-25 13:53:26 +01:00
Rafael Silva 2807644e7e add efm32 driver
Signed-off-by: Rafael Silva <silvagracarafael@gmail.com>
2021-03-23 20:45:56 +00:00
Rafael Silva 143582870c add efm32gg12 family
Signed-off-by: Rafael Silva <silvagracarafael@gmail.com>
2021-03-23 18:59:21 +00:00
Reinhard Panhuber a60bd0c8ac Fix bug in writing to constant src/dst address.
Copying has to be conduct in full words (at least for STM32). Renamed
copy function to tu_fifo_write_n_const_addr_full_words()
2021-03-23 19:33:04 +01:00
Ha Thach 7503b9f18c
Merge pull request #733 from hathach/fix-nrf-dcd-bulk-out-race
fix race condition that could cause drop packet of Bulk OUT transfer
2021-03-19 10:00:30 +07:00