Callback to set default link state? #3661
morse-cedricvandenbergh
started this conversation in
General
Replies: 1 comment 2 replies
|
I prefer a weak callback with default value set to |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
What would be the best way to set
ncm_interface.link_is_upinnetd_init, if the link state could be either up or down?I have noted that if the host reboots, the USB device isn;t alwasys powered down, which in turn means the phycial link state remains the same befoire as after the reboot. However, because
netd_initresets thencm_interface.link_is_upstate toCFG_TUD_NCM_DEFAULT_LINK_UP(down in our case), tinyUSB will report the link state as down.I wonder what the suggested mechanism to fix this would be. I see a number of options.
netd_initCFG_TUD_NCM_DEFAULT_LINK_UPmacro to call a function (feels like a hack)tud_network_link_stateat some other USB event (tud_mount_cbperhaps?)I have implemented the first option and that appears to work well on both Ubuntu (24.04 on a Dell Latitude laptop) and Windows (on a dell XPS).
All reactions