Commit Graph

69 Commits

Author SHA1 Message Date
hathach
ef49b93532 rename CFG_TUSB_MEM_SECTION to CFG_TUD_MEM_SECTION in device stack
CFG_TUD_MEM_SECTION is default to CFG_TUSB_MEM_SECTION
2023-07-24 15:46:21 +07:00
hathach
77495cf119 improve logging, allow easier to turn off usbd, driver logging
can be useful when focusing on let's say usbh
2023-07-20 17:12:00 +07:00
hathach
206d63e038 correct EHCI reporting failed xfer (instead of stalled) when device is unplugged 2023-05-16 11:09:21 +07:00
Ha Thach
65ac519715 Merge pull request #1852 from silvergasp/mem_s
fix: Replace device calls to memcpy with tu_memcpy_s
2023-02-27 10:22:53 +07:00
hathach
e34aeb5cf6 minor clean up 2023-02-27 09:11:35 +07:00
hathach
498989ee00 use tu_static instead of static _fuzz_thread 2023-02-22 16:23:40 +07:00
hathach
03ec49450d rename maros from FUZZ to _FUZZ, change TU_STATIC to static _fuzz_thread 2023-02-22 11:47:09 +07:00
Nathaniel Brough
18c3095346 fix: Change all static variables to thread when fuzzing 2023-01-20 15:45:31 -08:00
Nathaniel Brough
2e47210c1a fix: Replace device calls to memcpy with tu_memcpy_s
Introduces a new function tu_memcpy_s, which is effectively
a backport of memcpy_s. The change also refactors calls
to memcpy over to the more secure tu_memcpy_s.
2023-01-13 15:20:32 -08:00
hathach
0042eccb3b fix redundant-decls warnings by usbd/usbh 2022-06-24 22:52:11 +07:00
hathach
4f6e770eda add more warning option, also fix -Wconversion with rp2040
-Wuninitialized, -Wunused,  -Wredundant-decls
2022-06-24 19:46:19 +07:00
hathach
d10326cb4e rename TUSB_OPT_DEVICE_ENABLED to CFG_TUD_ENABLED
TUSB_OPT_DEVICE_ENABLED still usable for backward compatible
2022-02-25 18:35:21 +07:00
hathach
ca98996e1f better support for hid device set/get protocol
add caplock detection for hid_composite
2021-07-01 22:46:39 +07:00
Jeremiah McCarthy
1138f8cc70 Add DFU Class per Version 1.1 Spec 2021-03-26 15:30:43 -04:00
hathach
49bc97b0ca remove the requirement of std SET/CLEAR_FEATURE must not return zlp status 2021-02-11 11:22:02 +07:00
HiFiPhile
b3c0d417ef Fix error if "Required Prototype" is selected.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
2020-12-20 23:10:34 +01:00
hathach
dd07fecc5f migrate cdc_device to new control_xfer_cb 2020-11-19 21:26:06 +07:00
hathach
3c31d08051 merge class driver control_request & control_complete to control_xfer_cb()
migrated msc_device
2020-11-19 21:01:33 +07:00
Sean Cross
63bd8d2e44 device: fix build warning when CFG_TUSB_DEBUG >= 2
The function is defined inside of a function body which generates a
warning.  Circuit Python treats these warnings as errors, and so
refuses to build with debugging enabled:

    ../../lib/tinyusb/src/device/usbd_control.c: In function 'usbd_control_xfer_cb':
    ../../lib/tinyusb/src/device/usbd_control.c:195:19: error: nested extern declaration of 'usbd_driver_print_control_complete_name' [-Werror=nested-externs]
      195 |       extern void usbd_driver_print_control_complete_name(bool (*control_complete) (uint8_t, tusb_control_request_t const *));
          |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    make: *** [../../py/mkrules.mk:55:
    build-simmel/lib/tinyusb/src/device/usbd_control.o] Error 1

Move the declaration to the top of the function to silence this warning.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-07 19:03:40 +08:00
hathach
fcdb22b2f9 fix typo 2020-04-28 10:53:43 +07:00
hathach
a1c599f4b6 clean up log message 2020-04-26 22:02:49 +07:00
hathach
017c95037f add usbd edpt open
- RTT mode is blocking to prevent log lost
- Improve logging message
2020-04-26 14:51:44 +07:00
Nathan Conrad
6606cf2896 USBD: Use tud_control_xfer only for data 2020-03-27 15:54:37 -04:00
hathach
4f871063fd Merge branch 'master' into cr1901-msp430f5529 2020-03-22 17:19:57 +07:00
Nathan Conrad
7f6316dbe1 Use CRLF on UART. 2020-03-14 14:26:14 -04:00
hathach
c8247f0907 fix zlp for nrf52840 2020-03-08 14:20:28 +07:00
hathach
b6b9fe42af more log for debugging 2020-02-07 16:43:44 +07:00
hathach
d7558e8a0f use dcd_edpt0_status_complete() to set address without blocking for samd21/samd51/stm32_fsdev 2019-11-28 13:39:29 +07:00
hathach
6bc245cb36 add dcd_edpt0_status_complete() which is useful for several mcu port 2019-11-28 11:46:36 +07:00
hathach
8a1b6327ba extract code to invoke_class_control()
- also rename usbd_class_drivers to _usbd_driver
2019-11-27 12:12:52 +07:00
hathach
1ab3a1035c Merge branch 'master' into cr1901-msp430f5529 2019-11-05 10:17:36 +07:00
hathach
44ad683bd6 fix tud_control_status() didn't update request 2019-11-04 11:21:57 +07:00
hathach
65e96e5d52 added optional dcd_control_status_complete() 2019-11-03 18:00:07 +07:00
hathach
7bf01e218d make control buf static 2019-11-03 11:43:07 +07:00
hathach
a0cffdc843 Merge branch 'pigrew-ZLP_Request2' into cr1901-msp430f5529 2019-11-02 23:29:35 +07:00
hathach
164d0db825 Merge branch 'ZLP_Request2' into pigrew-ZLP_Request2 2019-11-01 10:16:59 +07:00
hathach
cacbb80a90 zlp should work with control in, tested with Unity framework 2019-10-31 21:14:06 +07:00
hathach
d9ba4d90a8 move function around, more rename 2019-10-31 12:26:36 +07:00
hathach
0029b58417 rename 2019-10-31 12:18:41 +07:00
hathach
e6857d8ee0 clean up 2019-10-31 11:25:41 +07:00
William D. Jones
a01b0a73c1 Remove accidentally-commited debug var. 2019-10-03 23:59:22 -04:00
William D. Jones
432e9dcd2e Merge remote-tracking branch 'pigrew/ZLP_Request2' into msp430f5529 2019-10-03 23:50:55 -04:00
William D. Jones
5ee1070c16 Merge remote-tracking branch 'origin' into msp430f5529 2019-10-02 23:18:49 -04:00
William D. Jones
b0b737b42a usbd_control.c: Decide whether a control transfer has a data stage
based on setup packet wLength.
2019-10-02 23:02:55 -04:00
Nathan Conrad
4ea2a4ed60 Github's web interface changed line endings without asking me. Oops. 2019-09-29 10:45:13 -04:00
Nathan Conrad
0078be9c24 Merge branch 'master' into ZLP_Request2 2019-09-29 09:52:53 -04:00
Nathan Conrad
c4483d244b Fix typo of CFG_TUD_ENDOINT0_SIZE. 2019-09-27 21:22:19 -04:00
Nathan Conrad
4ccdc5522d Fix typo of CFG_TUD_ENDOINT0_SIZE. 2019-09-27 12:41:46 -04:00
Nathan Conrad
91fa24d99c Merge branch 'master' into ZLP_Request2 2019-09-27 00:37:21 -04:00
Nathan Conrad
b6590490a8 USB Control: Pointer arithmetic on void* is forbiden 2019-09-21 12:00:52 -04:00