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.
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.
i am not able to add app_uart.h to main.c
What, exactly, do you mean by that?
What have you tried?
What was the result?
My question here is how to add it to main,c?
The simple answer is:
#include "app_uart.h"
In addition, as Shrinidhi Bhat said, you will have to correctly configure your Include Paths so that the compiler knows where to find the file.
The documentation for your particular IDE will tell you how to do this.
All of the above is completely standard and would be the same for any 'C' project - it is not specific to Nordic.
In addition to the above, many of the Nordic headers rely on settings in the sdk_config.h file to "enable" them - so you will also need to have these settings correct.
BTW - how to post source code:
I tried #include app_uart.h" at the first place but when it comes to specifying path,I am not having a proper picture how to do that.
Thanks for replying.
It would have been helpful if you have said that in the first place!
Again, instructions for setting up Include Paths will be in your IDE's documentation.
I am able to include all the necessary files,but when i build it shows 2 errors.
I am attaching the picture of error message along with Screenshot of a file in program which appears in faded form.
It's generally better to copy & paste errors as text - rather than a picture.
But your picture is clear enough to see in this case.
Again, this is a standard 'C' issue: header files just contain declarations (function prototypes) - so you also need to add the source (.c) file (or pre-built binary library) with the definitions of those functions.
http://c-faq.com/decl/decldef.html
And, again, there is a Nordic-specific twist that the correct settings in sdk_config.h are also required.
https://devzone.nordicsemi.com/f/nordic-q-a/39503/undefined-reference-on-the-linker-level
Have done all the necessary steps in program,also in sdk_config.h.Its not showing any errors now,but when i look on putty nothing appears.If we comment uart portion in main, nrf_log_info statements appear.
Whats the problem?
Any help would be appreciated.
Have done all the necessary steps in program,also in sdk_config.h.Its not showing any errors now,but when i look on putty nothing appears.If we comment uart portion in main, nrf_log_info statements appear.
Whats the problem?
Any help would be appreciated.