KSDK 2.1 Time Management

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

KSDK 2.1 Time Management

1,193 次查看
anbui
Contributor II

What is the equivalent time management functions like OSA_TimeDelay() ?

标签 (1)
0 项奖励
回复
1 回复

870 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, AnBui,

I think the OSA_TimeDelay()  api function is the function of SDK1.3, if you use SDK2.1 with FreeRtos, you can use the function vTaskDelay();

This page describes the RTOS vTaskDelay() FreeRTOS API function which is part of the RTOS task control API. FreeRTOS is a professional grade, small footprint, open source RTOS for microcontrollers.

Example usage:
 void vTaskFunction( void * pvParameters )  {  /* Block for 500ms. */ const TickType_t xDelay = 500 / portTICK_PERIOD_MS;       for( ;; )      {          /* Simply toggle the LED every 500ms, blocking between each toggle. */         vToggleLED();          vTaskDelay( xDelay );      } }

Hope it can help you

BR

xiangjun Rong

0 项奖励
回复