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

How to include existing header files to main.c?

Hello.

I want to integrate UART and SPI ,I am using SDK15.2. The problem here is i am not able to add app_uart.h to main.c(spi).

My question here is how to add it to main,c? 

I am using Keil uVision.

Thanks in Advance. 

Parents
  • Hi

    What most people have trouble with is forgetting to enable something in the sdk_config.h file. You have to go through the sdk_config.h file of a uart example, and make sure that all functions enabled there are also enabled in your projects sdk_config file, as in setting all functions that are set to 1 in the example sdk_config to 1 in your project as well. If there are some functions enabled in the example file that is not at all in your project, you will have to copy/paste those. 

    Best regards,

    Simon

Reply
  • Hi

    What most people have trouble with is forgetting to enable something in the sdk_config.h file. You have to go through the sdk_config.h file of a uart example, and make sure that all functions enabled there are also enabled in your projects sdk_config file, as in setting all functions that are set to 1 in the example sdk_config to 1 in your project as well. If there are some functions enabled in the example file that is not at all in your project, you will have to copy/paste those. 

    Best regards,

    Simon

Children
Related