This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BUTTON_PULL in app_uart.c

Since I'm writing code for my own board, I decided to create my own board.h file to hold the board-specific definitions.

However, I can't do this without hacking the SDK, as app_uart.c includes boards.h, which is part of the sdk, and it won't pickup my board.h without hackery.

Call me a purist, but the SDK shouldn't depend on files that change with board-level configuration. I assume this is a bug, but please correct me if there's another appropriate way to have my own board.h file without modifying the SDK or masquerading as a PCA10001.

-Jim

Parents
  • To add your own board, the best way is to add an extra clause to the default boards.h and set the compile-time define you configure. This would limit your change to the SDK files to just boards.h, and I can't see any way to avoid the need for this.

    However, I do agree that this particular use of the define seems unnecessary, so I've reported it internally to change it to NRF_GPIO_PIN_PULLUP. Thanks for letting us know!

  • I think it's better to not have the SDK depend on my files, and better not to have to change the SDK at all. (Things that should change ought to be examples and not in the core source and includes directories).

    With this one change I no longer need boards.h (unless I run into it somewhere els) so I think that's the right fix. Thanks!

Reply Children
No Data
Related