feat(freertos): Cleanup tick/idle hook functionality

Closes https://github.com/espressif/ESP8266_RTOS_SDK/issues/500
This commit is contained in:
Wu Jian Gang
2019-03-04 20:40:29 +08:00
committed by dongheng
parent d847d847e4
commit b6ea4eab21
7 changed files with 65 additions and 3 deletions

View File

@ -50,8 +50,10 @@
#define portNUM_PROCESSORS 1
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0
#define configUSE_TICK_HOOK 1
#define configUSE_TICKLESS_IDLE 1
#define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 )
#define configTICK_RATE_HZ ( ( portTickType ) CONFIG_FREERTOS_HZ )

View File

@ -15,6 +15,10 @@
#ifndef __ESP_FREERTOS_HOOKS_H__
#define __ESP_FREERTOS_HOOKS_H__
#include "sdkconfig.h"
#ifdef CONFIG_FREERTOS_EXTENED_HOOKS
#include <stdbool.h>
#include "esp_err.h"
@ -127,5 +131,6 @@ void esp_deregister_freertos_tick_hook(esp_freertos_tick_cb_t old_tick_cb);
}
#endif
#endif /* CONFIG_FREERTOS_EXTENED_HOOKS */
#endif

View File

@ -205,6 +205,9 @@ void _xt_enter_first_task(void);
#define xTaskCreatePinnedToCore(pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pvCreatedTask, tskNO_AFFINITY) \
xTaskCreate(pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pvCreatedTask)
extern void esp_vApplicationIdleHook( void );
extern void esp_vApplicationTickHook( void );
#ifdef __cplusplus
}
#endif