Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
memory-attr-sw.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Carlo Caione <ccaione@baylibre.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_MEM_ATTR_SW_H_
14#define ZEPHYR_INCLUDE_DT_BINDINGS_MEM_ATTR_SW_H_
15
18
24
26#define DT_MEM_SW_MASK DT_MEM_SW_ATTR_MASK
27#define DT_MEM_SW(x) ((x) << DT_MEM_SW_ATTR_SHIFT)
28
29#define ATTR_SW_ALLOC_CACHE BIT(0)
30#define ATTR_SW_ALLOC_NON_CACHE BIT(1)
31#define ATTR_SW_ALLOC_DMA BIT(2)
33
41
42#define DT_MEM_SW_GET(x) ((x) & DT_MEM_SW_ATTR_MASK)
44#define DT_MEM_SW_ALLOC_CACHE DT_MEM_SW(ATTR_SW_ALLOC_CACHE)
46#define DT_MEM_SW_ALLOC_NON_CACHE DT_MEM_SW(ATTR_SW_ALLOC_NON_CACHE)
48#define DT_MEM_SW_ALLOC_DMA DT_MEM_SW(ATTR_SW_ALLOC_DMA)
49
51
52#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_MEM_ATTR_SW_H_ */
Generic devicetree memory attribute definitions.
Macro utilities.