-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor cleanup of RP2040 code post addition of Pico-PIO-USB #1467
Conversation
* 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
@@ -49,7 +49,9 @@ | |||
|
|||
#define TCP_MSS (1500 /*mtu*/ - 20 /*iphdr*/ - 20 /*tcphhr*/) | |||
#define TCP_SND_BUF (2 * TCP_MSS) | |||
#ifndef TCP_WND |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note I should probably comment on this... there are pre-existing overrides of this to 2*TCP_MSS
in the CMakeLists.txt for the net_lwip_webserver example. This was causing a compiler warning, as this line just trashes it. So either my change is correct, or the override is unnecessary!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The defined in cmakelist.txt is added in this commit
95f2478#diff-12cfd80973cd9c09e8493c08a1eb623365231a9e2b0db14d109e9b6836985830R71-R74
PBUF_POOL_SIZE=2
HTTPD_USE_CUSTOM_FSDATA=0
are also redefined with the same values, maybe we should drop it altogether in cmakelist and adjust/use value in the header file only for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated by #1483
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everything looks great, except, maybe we should remove re-define of network example in cmakelist. If you agree, I could merge this first, and make an changes as separated PR afterwards.
@@ -49,7 +49,9 @@ | |||
|
|||
#define TCP_MSS (1500 /*mtu*/ - 20 /*iphdr*/ - 20 /*tcphhr*/) | |||
#define TCP_SND_BUF (2 * TCP_MSS) | |||
#ifndef TCP_WND |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The defined in cmakelist.txt is added in this commit
95f2478#diff-12cfd80973cd9c09e8493c08a1eb623365231a9e2b0db14d109e9b6836985830R71-R74
PBUF_POOL_SIZE=2
HTTPD_USE_CUSTOM_FSDATA=0
are also redefined with the same values, maybe we should drop it altogether in cmakelist and adjust/use value in the header file only for consistency
Sure. i wasn't sure why why was overridden in the CMakeLists.txt to start with, so didn't want to change that to remove the error. I 100% defer to your better knowledge of what it does, and if it is safe for all boards to change (or if it is even needed) |
ok thanks, I will do that later on with a bit of testing |
suppress_tinyusb_warnings()
family_configure_dual_usb_example()
for DUAL mode examples asfamily_configure_target()
may not generally be called multiple times for the same targetpico_pio_usb
totinyusb_pico_pio_usb
to be clearer and avoid conflict if someone already has apico_pio_usb
in their projectfamily_add_pico_pio_usb()
method for adding Pico-PIO-USB support to an existing exampletinyusb_pico_pio_usb
to be added as a dependency of regular apps using the Pico SDK