Merge branch 'feature/riscv_get_tickrate_v4.3' into 'release/v4.3'

freertos: add API for getting tick rate on C3 (v4.3)

See merge request espressif/esp-idf!12471
This commit is contained in:
Angus Gratton 2021-02-24 08:29:59 +00:00
commit a0fdf4b06c
2 changed files with 7 additions and 0 deletions

View File

@ -294,6 +294,9 @@ void vApplicationSleep( TickType_t xExpectedIdleTime );
#define portVALID_TCB_MEM(ptr) esp_ptr_byte_accessible(ptr)
#define portVALID_STACK_MEM(ptr) esp_ptr_byte_accessible(ptr)
/* Get tick rate per second */
uint32_t xPortGetTickRateHz(void);
// configASSERT_2 if requested
#if configASSERT_2
#include <stdio.h>

View File

@ -309,6 +309,10 @@ void vPortSetStackWatchpoint(void *pxStackStart)
esp_set_watchpoint(7, (char *)addr, STACK_WATCH_AREA_SIZE, ESP_WATCHPOINT_STORE);
}
uint32_t xPortGetTickRateHz(void) {
return (uint32_t)configTICK_RATE_HZ;
}
BaseType_t xPortInIsrContext(void)
{
return uxInterruptNesting;