Files
zephyr/dts/common/mem.h
Fin Maaß 6838e0cb5e dts: common: add DT_SIZE_G macro
add DT_SIZE_G macro

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-24 19:19:39 -04:00

20 lines
445 B
C

/*
* Copyright (c) 2018 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_DTS_COMMON_MEM_H_
#define ZEPHYR_DTS_COMMON_MEM_H_
#define DT_SIZE_K(x) ((x) * 1024)
#define DT_SIZE_M(x) (DT_SIZE_K(x) * 1024)
#define DT_SIZE_G(x) (DT_SIZE_M(x) * 1024)
/* concatenate the values of the arguments into one */
#define _DT_DO_CONCAT(x, y) x ## y
#define DT_ADDR(a) _DT_DO_CONCAT(0x, a)
#endif /* ZEPHYR_DTS_COMMON_MEM_H_ */