2018-10-08 12:20:49 +02:00
|
|
|
/*
|
2022-02-01 21:42:57 +01:00
|
|
|
* Copyright (C) 2021 Gunar Schorcht
|
2018-10-08 12:20:49 +02:00
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*
|
|
|
|
* FreeRTOS to RIOT-OS adaption module for source code compatibility
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DOXYGEN
|
|
|
|
|
2020-10-22 11:34:00 +02:00
|
|
|
#define ENABLE_DEBUG 0
|
2018-10-08 12:20:49 +02:00
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "esp_common.h"
|
|
|
|
#include "log.h"
|
2020-10-21 21:25:34 +02:00
|
|
|
#include "timex.h"
|
2018-10-08 12:20:49 +02:00
|
|
|
|
|
|
|
#include "freertos/FreeRTOS.h"
|
|
|
|
|
|
|
|
uint32_t xPortGetTickRateHz(void) {
|
2021-12-09 11:43:20 +01:00
|
|
|
return MS_PER_SEC / portTICK_PERIOD_MS;
|
2018-10-08 12:20:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
BaseType_t xPortInIsrContext(void)
|
|
|
|
{
|
|
|
|
/* is working on single core in that way */
|
|
|
|
return irq_is_in();
|
|
|
|
}
|
|
|
|
|
2022-02-01 21:42:57 +01:00
|
|
|
UBaseType_t xPortSetInterruptMaskFromISR(void)
|
|
|
|
{
|
|
|
|
UBaseType_t state = irq_disable();
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
|
|
|
|
void vPortClearInterruptMaskFromISR(UBaseType_t state)
|
|
|
|
{
|
|
|
|
irq_restore(state);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool xPortCanYield(void)
|
|
|
|
{
|
|
|
|
return irq_is_enabled();
|
|
|
|
}
|
|
|
|
|
2018-10-08 12:20:49 +02:00
|
|
|
#endif /* DOXYGEN */
|