Hi,
Please guide me how to permanently include custom_board.h file in board.h file.
MeshSDK v5.0
nRF5SDK v17.0.2
SES v4.52c
Regards,
Zolu
Hi,
Please guide me how to permanently include custom_board.h file in board.h file.
MeshSDK v5.0
nRF5SDK v17.0.2
SES v4.52c
Regards,
Zolu
Look at boards.h in the SDK:
#ifndef BOARDS_H #define BOARDS_H #include "nrf_gpio.h" #include "nordic_common.h" #if defined(BOARD_NRF6310) #include "nrf6310.h" #elif defined(BOARD_PCA10000) #include "pca10000.h" : : #elif defined(BOARD_SPARKFUN_NRF52_BREAKOUT) #include "sparkfun_nrf52_breakout.h" #elif defined(BOARD_CUSTOM) #include "custom_board.h" #else #error "Board is not defined" #endif
The above-mentioned Infocentre article suggests that you just call your header "custom_board.h", and define the symbol BOARD_CUSTOM
But, of course, there's nothing to stop you giving the file a meaningful name of your own, and defining a corresponding BOARD_... symbol. This is what I've done in the code above - I called the file "sparkfun_nrf52_breakout.h", and the symbol to select it is BOARD_SPARKFUN_NRF52_BREAKOUT
Look at boards.h in the SDK:
#ifndef BOARDS_H #define BOARDS_H #include "nrf_gpio.h" #include "nordic_common.h" #if defined(BOARD_NRF6310) #include "nrf6310.h" #elif defined(BOARD_PCA10000) #include "pca10000.h" : : #elif defined(BOARD_SPARKFUN_NRF52_BREAKOUT) #include "sparkfun_nrf52_breakout.h" #elif defined(BOARD_CUSTOM) #include "custom_board.h" #else #error "Board is not defined" #endif
The above-mentioned Infocentre article suggests that you just call your header "custom_board.h", and define the symbol BOARD_CUSTOM
But, of course, there's nothing to stop you giving the file a meaningful name of your own, and defining a corresponding BOARD_... symbol. This is what I've done in the code above - I called the file "sparkfun_nrf52_breakout.h", and the symbol to select it is BOARD_SPARKFUN_NRF52_BREAKOUT