raspberrypi / pico-examples

BSD 3-Clause "New" or "Revised" License
2.83k stars 820 forks source link

Simplify example of stdio_set_chars_available_callback #495

Closed peterharperuk closed 2 months ago

peterharperuk commented 5 months ago

The example in here uses an async callback to avoid a race when using stdio_usb. But there's a fix available for this issue so simplify the example.

To test pass -DPICO_STDIO_USB=1 on the cmake command line.

Fixes #461

peterharperuk commented 5 months ago

Requires this fix in the sdk https://github.com/raspberrypi/pico-sdk/pull/1649

peterharperuk commented 2 months ago

@kilograham Simple fix to remove some of my sillyness. Will merge if that's ok.

peterharperuk commented 2 months ago

This is "demonstrating" clean shutdown of the wifi stack. The loop keeps going while the link is up so pressing "d" calls disable_sta_mode which disables wifi and causes the program to exit.