Commit Graph

65 Commits

Author SHA1 Message Date
b6ce41188e examples/device/net_lwip_webserver: Simplify example code.
Now that tud_network_recv_renew has protections against recursion it's
safe and simpler to handle the lwip frame entirely in the same callback.
2025-05-29 09:36:38 +10:00
5de4a23abe Add USB NCM link state control support
This adds the ability to dynamically control the network link state
for NCM devices. The host OS will see the network interface as
connected/disconnected based on the link state.

New API:
- tud_network_link_state(rhport, is_up): Set link up/down state

Example updates:
- Added button control to toggle link state
- Fixed LWIP integration to properly handle link state changes
- Added printf to show correct protocol (NCM vs RNDIS/ECM)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-29 09:36:38 +10:00
79373afaaf Merge branch 'master' into fork/HiFiPhile/lwip_fix 2024-11-28 16:11:30 +07:00
047ba0a62d Add comment to BOS descriptor. 2024-10-15 21:49:02 +02:00
1f18be93db change the tusb_rhport_init_t struct, exclude the rhport to make API more consistent 2024-10-14 18:27:52 +07:00
92602b9de3 change tusb_init(), tusb_rhport_init() to use init struct for expandability 2024-10-11 13:41:53 +07:00
57aac432b5 add new tusb_int_handler(rhport, in_isr) as common irq handler
update tusb_init() to take rhport and role, defined as macro with optional argument for backward compatible
2024-10-10 16:28:36 +07:00
ad362c8ac4 Add MSOS 2.0 descriptor to auto load NCM driver on Windows. 2024-10-05 15:51:02 +02:00
3d3dcb1ee9 service_traffic: Don't call pbuf_free when ethernet_input is Ok 2024-10-05 15:51:02 +02:00
088486186f rename TUD_ENDPOINT_EXCLUSIVE_NUMBER to TUD_ENDPOINT_ONE_DIRECTION_ONLY 2024-08-19 19:05:33 +07:00
a6bee747b6 define and use TUD_ENDPOINT_EXCLUSIVE_NUMBER 2024-08-17 18:07:36 +07:00
2353c4ffba Add MAX78002 Support
-Added support for MAX78002, MAX78002EVKIT
 -Added provisions for remaining MAX32 USB parts
2024-07-01 17:31:38 -04:00
0f288326cc Initial Commit for MAX32 Support
Initial commit for the port of TUSB to MAX32xxx parts, staring with MAX32690
 - Added dcd_max32.c (based on dcd_musb.c) for interfacing with the peripheral
 - Added MAX32690 part family support
 - Added max32690evkit board support
 - Updated examples for unique EP number requirement
 - Updated get_deps.py to fetch the MSDK

Known Issues / Additional Testing Required
 - msc_dual_lun only shown 1 volume on Windows
 - USBTMC does not have a valid Windowsdriver
 - DFU does not have a valid Windows driver
 - WebUSB is "Device not Recognized"
 - Need to test build scripts with IAR and Clang
2024-06-28 16:55:27 -04:00
e5d92c4ea7 Fix CI. 2024-05-07 00:37:57 +02:00
0f4ea8e918 Enable NCM + iperf for MCU with bigger RAM. 2024-05-07 00:23:50 +02:00
63d5103f42 Increase TCP_WND for better performance. 2024-05-07 00:18:31 +02:00
d25ee82d3f Reformat net_lwip_webserver example. 2024-05-07 00:17:09 +02:00
745c154dbc ECM/RNDIS again selected for webserver example 2023-09-08 07:00:08 +02:00
92025b00f0 code review: add NCM options in example config 2023-08-31 20:32:42 +02:00
9697c4df4e update all examples to use unique ID as serial if avaialble 2023-08-04 10:28:24 +07:00
ef5bd9ee6c Merge branch 'master' into enhance-bsp 2023-08-04 00:31:12 +07:00
cf91660cee rename hw/bsp/board.h to board_api.h 2023-08-03 15:44:05 +07:00
3f788a4e5a enable USBMC for uno r4, add board_init_after_tusb() API
add BOARD_UPPERCASE for board detection
2023-07-31 19:09:40 +07:00
033627ee41 Remove const from tud_network_mac_address in example and test files 2023-03-22 07:30:46 -06:00
3623ba1884 fix trailing space and new line
temporarily disable codespell
2023-03-17 16:12:49 +07:00
ecfd57e6f1 get most examples build with iar 2023-01-18 10:31:00 +07:00
b9dc9dbd78 fix most warnings with rp2040 -wconversion 2022-06-27 11:50:17 +07:00
9794a2b865 more example update 2022-06-06 22:41:04 +07:00
99c1585ed2 rename board specific macro for example
- BOARD_DEVICE/HOST_RHPORT_NUM to  BOARD_TUD/H_RHPORT
- BOARD_DEVICE/HOST_RHPORT_SPEED to  BOARD_TUD/H_MAX_SPEED
2022-06-01 23:53:40 +07:00
ea8a9e0249 remove cmake compile macro for net example (use lwipopts.h instead) 2022-06-01 15:10:05 +07:00
26c4d4b328 Minor cleanup of RP2040 code post addition of Pico-PIO_USB
* Removed some compiler warnings, and cleaned out unnecessary warning suppression from CMake suppress_tinyusb_warnings()
* Made explicit family_configure_dual_usb_example() for DUAL mode examples as family_configure_target() may not generally be called multiple times for the same target

* Renamed library pico_pio_usb to tinyusb_picio_pio_usb to be clearer and avoid conflict if someone already has a pico_pio_usb in their project
* Added family_add_pico_pio_usb() method for adding Pico-PIO_SUB support to an existing example
* Allowed tinyusb_pico_pio_usb to be added to regular apps using the Pico SDK
2022-05-20 17:25:30 -05:00
a8af609dfe auto detect max rhport speed based on mcu 2022-02-25 18:35:21 +07:00
d42b5604ce net_lwip_webserver: allow users to enable LWIP_IP6 if desired 2021-10-19 11:29:51 -05:00
a867d87072 rename CFG_TUD_NET to CFG_TUD_ECM_RNDIS 2021-10-05 16:00:07 +07:00
03d7988df3 add NCM driver in a compatible manner : hathach/tinyusb#550 2021-09-25 17:05:58 -05:00
5a8ea0e0e2 net_lwip_webserver: further simplify pbuf_copy_partial() usage 2021-08-16 17:04:57 -05:00
b682ce916a net_lwip_webserver: utilize pbuf_copy_partial() 2021-08-02 20:52:45 -05:00
b192dc0738 Update EPNUM in usb_descriptors.c 2021-07-21 14:18:47 +02:00
ed8f117dd1 explicitly add dcd source file without vendor/family 2021-03-17 16:52:07 +07:00
83614418b5 get all device example build with rp2040 (except freeRTOS) 2021-01-25 13:28:23 +07:00
a097b7e51a net_device: re-factor code so as to not be specific to lwIP 2020-10-24 20:27:57 -05:00
56277ce216 net_lwip_webserver: efficiency tweaks 2020-10-14 20:26:40 -05:00
35fae201fb net_lwip_webserver: tweak main.c comments with smartphone suggestions 2020-10-10 16:49:45 -05:00
787c891702 add note for MS OS 1.0 Descriptor at 0xEE 2020-07-21 21:00:11 +07:00
c67b3a242e update example config and descriptor with better Highspeed support 2020-06-15 23:34:09 +07:00
e61bf415fe minor update net example
samg failed to run net example
2020-05-02 18:35:46 +07:00
3f8b9c59dd update example to include CXD56 for highspeed mode 2020-04-17 11:40:33 +07:00
bfec3b4479 Merge pull request #345 from hathach/add-alt-itf
Implement setInterface(alt) for usb net driver
2020-04-16 21:33:03 +07:00
be9326dc33 Set Net example to use IAD device class 2020-04-15 16:07:01 -04:00
ae9f01fe95 rename config num to id in net webserver example
also add configuration array bound check.
2020-04-15 22:28:13 +07:00