pico-extras icon indicating copy to clipboard operation
pico-extras copied to clipboard

usb_device.h not wrapped in `extern "C"` clause

Open rvodden opened this issue 5 months ago • 1 comments

Most of the headers are wrapped in line such as:

#ifdef __cplusplus
extern "C" {
#endif

and the associated closure - see this as an example:

https://github.com/raspberrypi/pico-extras/blob/master/src/rp2_common/pico_audio_i2s/include/pico/audio_i2s.h#L23-L25

this is missing from usb_device.h which makes for having to wrap the include statement - a simple, but not pretty workaround.

Is there a reason this has been omitted deliberately? If not I'll happily raise a PR to include it, and do a sweep of all the other headers to ensure they're consistent.

Thanks!

RIchard

rvodden avatar Jun 04 '25 07:06 rvodden

A PR would be very welcome, thank you!

lurch avatar Jun 05 '25 11:06 lurch