nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs

Have any delay API can call?

Hi,

I'm a beginner, I want to do a test that will create a thread by "K_THREAD_DEFINE" marco.

Then I will continuous print "Hello~~~" per second. That's all.

But I don't know that what delay API should I call?

below is my test code

// Include delay API 

void PK_Test(void) {
    while (1)
    {
		printf("Hello~~~\n");
		
		// Call delay API
    }
}

K_THREAD_DEFINE(PK_Test_handler, PK_TEST_STACKSIZE, PK_Test,
		NULL, NULL, NULL, K_LOWEST_APPLICATION_THREAD_PRIO, 0, 0);

Have anyone can give me some suggestion?

===== my development info =====

- Board : nRF52840-DK

- SDK : nRF Connect v1.8.0 & homekit

=========================== 

Thanks,

Prince

Related