Hi Mark, In fact some examples are ("incorrectly") hard-code to some I2C Bus or uses #ifdef to compile only if that I2C Bus is enabled in the menuconfig.
There are pros and cons of using this approach: PROS: - 'Guarantee' that such config works (dev tested it); - Developer doesn't need to test all different setup combinations. CONS: - User will lost much time figuring out which configuration to use (case there is not Documentation in the README.txt explaining about how to use it) - Some #ifdefs inside board are very dangerous to end user, because it is silent, users don't know that content of C file wasn't compiled. A better approach could be creating some device configuration inside boards/xxx/xxx/xxx/Kconfig to let user to define what bus number to use. These are things that we need to improve to make NuttX more user friendly. But, of course, it could bring more challenges as well, case a board doesn't have support to some I2C or SPI Bus and the user enabled it in the menuconfig. BR, Alan On 7/23/23, Mark Stevens <mark.stev...@wildernesslabs.co> wrote: > Had some fun and games today working with the SLCD example on the Pico W. > > It appears that the example has hard wired parameters for > > I2C bus > Number of characters > Number of rows > > Is it supposed to work like this or should these parameters be > configurable? > > Regards, > Mark > ______________________________ > mark.stev...@wildernesslabs.co > > > > >