(SOLVED) Calling pico-sdk methods within a sketch

I would like to call watchdog_reboot, which is defined in


The include statement I am using is
#include <hardware/watchdog.h>

The compiler can't find watchdog_reboot when I compile, but it does not give an error on the include statement.

More generally, how can I incorporate calls to the pico-sdk from a sketch?

Some of the sdk .h files aren't "protected" against being included by C++
Try this:

extern "C" {
#include <hardware/watchdog.h>

That did it. I totally forgot about the extern "C" sytanx.

Thanks much. This has saved me a large amount of work.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.