Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
units.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2020 ML!PA Consulting GmbH
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
17
18
#ifdef __cplusplus
19
extern
"C"
{
20
#endif
21
25
#define KiB(x) ((unsigned long)(x) << 10)
26
30
#define MiB(x) (KiB(x) << 10)
31
35
#define GiB(x) ((unsigned long long)MiB(x) << 10)
36
40
#define KHZ(x) ((x) * 1000UL)
41
45
#define MHZ(x) (KHZ(x) * 1000UL)
46
50
#define GHZ(x) (MHZ(x) * 1000ULL)
51
52
#ifdef __cplusplus
53
}
54
#endif
55
Generated on Sun Nov 23 2025 23:27:56 by
1.13.2