pico-sdk
pico-sdk copied to clipboard
Is the function `uart_get_instance` part of the official API?
The "hardware/uart.h" include file contains the function uart_get_instance to map from a uint to a uart_inst_t *. However, it is not listed on the API webpage as part of the API.
For Your Information, the TinyUSB github code does make use of uart_get_instance it's rp2040 bsp, so in some sense it has already "escaped".
I suspect that uart_get_instance is a drop-off from the Web page, but I get twitchy about using features that are not part of the official API. So, is the function uart_get_instance meant to be part of the official API? Should it be listed on the Webpage?
yes it is part of the public API
@kilograham - Thanks for the prompt reply. I'll go ahead and use it.
Housekeeping: I don't know whether uart_get_instance should be listed on the Webpage, and this issue has been tagged which might indicate that further work is indicated, so I won't close this issue myself. For whatever it's worth, I am content for it to be closed.
Yes, I believe Graham added the documentation label as a reminder to himself that he needs to add appropriate Doxygen comments to https://github.com/raspberrypi/pico-sdk/blob/develop/src/rp2_common/hardware_uart/include/hardware/uart.h#L105 , which is what causes it to "appear on the webpage" that you're referring to.