what is the function of bsp.h header file. if i use my custom product should i also use this header file? i am tring to make LED blink with custom port pin. (different pin beside DK) how can i able to do that?
what is the function of bsp.h header file. if i use my custom product should i also use this header file? i am tring to make LED blink with custom port pin. (different pin beside DK) how can i able to do that?
Hi HiberXen
You can read more about the Board Support Package (BSP) here, or in the BSP tutorial, here.
It is possible to use it with a custom board. You can copy one of the existing board files (e.g pca10040.h), rename it to custom_boards.h and the modify it to your requirements (change pin config. etc). After you have created your custom board file, you have to modify the boards.h file to include the file you created.
Like this:
..
#elif defined(BOARD_CUSTOM)
#include "custom_board.h"
..
Then, in Keil, go to options for target -> C/C++ tab -> Define -> Remove the board_pca10040 and add your BOARD_CUSTOM.
As for blinking the LED, I would recommend that you take a look at this tutorial, which sets up a timer that toggles an LED.
Best regards
Joakim.
Thanks for you reply boss