Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4907

SDK • Re: Pico SDK compilation question re placement of preprocessor directives

$
0
0

Yeah - that is hard to imagine - for sure... perhaps even silly. :)
Not so silly. The intended use with the SDK is that you define a board file that defines all your pin usage; a board that uses all the pins for other purposes may not declare any for I2C.

The Pico examples have top-level makefiles to build the whole lot in one go. A user might well want to go "let's build all of the pico-examples for my new board". So it's important for the pico examples to tolerate the I2C pins being undefined rather than stop with an error.
The case we were pondering was a case in which a user was starting with a new/"fresh" Pico board... I'm not sure your reasoning applies here.
Well,it is not silly for the examples to have this check since like arg001 said, different biards could use all the pins differently. Also the Pico itself - a programmer could redesign what pins do what in software. But yes, if you have a standard Pico hardware and config. then no check needed.

Statistics: Posted by breaker — Wed Feb 07, 2024 1:36 am



Viewing all articles
Browse latest Browse all 4907

Trending Articles