Fixes for PR 2043 (LCD delay) (#142)

Refactor sim code to be closer to FreeRTOS.

Add some defines needed for LCD delay PR
This commit is contained in:
mark9064
2024-05-03 09:30:10 +01:00
committed by GitHub
parent 8b22bcd1cd
commit 5ad8c0356e
7 changed files with 129 additions and 10 deletions

View File

@@ -28,7 +28,7 @@
#pragma once
#include "portmacro_cmsis.h" // TickType_t
#include "FreeRTOS.h" // TickType_t
#include "task.h" // configTICK_RATE_HZ
#include <SDL2/SDL.h>
@@ -55,9 +55,6 @@ struct TimerHandle_t {
};
constexpr uint32_t pdMS_TO_TICKS(uint32_t pdMS) {
return pdMS * configTICK_RATE_HZ / 1000;
}
// function only available in Simulator
constexpr uint32_t pdTICKS_TO_MS(uint32_t ticks) {
return ticks * 1000 / configTICK_RATE_HZ;