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

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

$
0
0
This version will fail to compile if the required macros are not defined. I tend to prefer this version. Not much point in creating an executable if it is known that it will not run.
Yup; the reason the pico-examples do a compile time warning, is we don't want to fail the build (of all examples) if you a re building for a PICO_BOARD which doesn't have I2C
By 'PICO_BOARD', do you mean a custom-fabricated board that didn't have I2C enabled??
yeah, you can specify a board header (selected by PICO_BOARD=) which defines what pins do what... it is entirely possible that there are no pins exposed that could be used for I2C (in which case the default i2c pins will not be specified in the board header)

Statistics: Posted by kilograham — Sun Feb 04, 2024 7:21 pm



Viewing all articles
Browse latest Browse all 5521

Trending Articles