CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Toggle main menu visibility
Loading...
Searching...
No Matches
sdk
include
tick_macros.h
1
// Copyright Microsoft and CHERIoT Contributors.
2
// SPDX-License-Identifier: MIT
3
4
#pragma once
5
6
#ifndef CPU_TIMER_HZ
7
# error "Timer frequency CPU_TIMER_HZ must be defined."
8
#endif
9
10
#ifndef TICK_RATE_HZ
11
# error "Scheduler tick rate TICK_RATE_HZ must be defined."
12
#endif
13
#define TIMERCYCLES_PER_TICK (CPU_TIMER_HZ / TICK_RATE_HZ)
14
#define MS_PER_TICK (1000U / TICK_RATE_HZ)
15
16
#define MS_TO_TICKS(x) ((x) / MS_PER_TICK)
Generated by
1.18.0