Hi,
can anyone help me with tih error, because of the nrf_delay i cant compile. i use keil to programm the nrf51822.
Thanks, Nils
Hi,
can anyone help me with tih error, because of the nrf_delay i cant compile. i use keil to programm the nrf51822.
Thanks, Nils
If you need to use the nrf_delay_ms function, which it seems you do, you have to include the nrf_delay.c file in your project. This can be done by right-clicking one of the folders in the project overview and then click add file, finding the nrf_delay.c file and selecting it.
The error you see in nrf_delay.c is actually a bogus error reported by Keil, and not the actual cause of the problem.
I'd be very happy if you accepted my answer instead of posting a separate answer just with thank you. :-) This makes it easier for someone else looking for a correct solution.
I want to edit, that it works now with the delay, but the error is still ther. I think my linker or compiler needs an include to understand, because he istelling me that there is an "implict declaration of the function nrf_delay_us" which is invalid in C99. How can i fix this problem?
The error shown in your initial screenshot is as I said caused by Keil, and is not actually a problem. If you get a warning when compiling about an implicit declaration, I'd recommend you to make sure that you have included the appropriate header file (nrf_delay.h in this case). I don't see any such errors when compiling for example the blinky-project from the SDK which uses the delay module.