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!

  • In general I do agree, SDK files should be changed only if absolutely needed. But if you don't want to change the includes of all the examples to make them work on your board, I do think that adding a clause to boards.h and changing the board define is an acceptable workaround.

    However, you do what you find easiest and best for your project! :)

Reply Children
No Data
Related