stdio_set_driver_enabled(.., false) misbehaves if there is only 1 driver #808

Closed
opened 2022-05-04 17:51:13 -05:00 by bruelltuete · 1 comment
bruelltuete commented 2022-05-04 17:51:13 -05:00 (Migrated from github.com)

When there's one stdio driver registered (e.g. stdio_uart), calling stdio_set_driver_enabled(..., false) to disable it breaks the linked list represented by https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/pico_stdio/stdio.c#L32: the head of the list (drivers) will continue pointing to the just disabled driver.
see https://github.com/raspberrypi/pico-sdk/blob/develop/src/rp2_common/pico_stdio/stdio.c#L182

When there's one stdio driver registered (e.g. stdio_uart), calling `stdio_set_driver_enabled(..., false)` to disable it breaks the linked list represented by https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/pico_stdio/stdio.c#L32: the head of the list (`drivers`) will continue pointing to the just disabled driver. see https://github.com/raspberrypi/pico-sdk/blob/develop/src/rp2_common/pico_stdio/stdio.c#L182
kilograham commented 2022-05-11 14:50:38 -05:00 (Migrated from github.com)

merged into develop

merged into develop
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#808
No description provided.