Zephyr API Documentation
3.0.0
A Scalable Open Source RTOS
|
|
3.0.0 |
#include <devicetree.h>
Go to the source code of this file.
Macros | |
#define | LINKER_DT_RESERVED_MEM_REGIONS() _RESERVED_REGION_APPLY(_RESERVED_REGION_DECLARE) |
Generate region definitions for all the reserved memory regions. More... | |
#define | LINKER_DT_RESERVED_MEM_SECTIONS() _RESERVED_REGION_APPLY(_RESERVED_SECTION_DECLARE) |
Generate section definitions for all the reserved memory regions. More... | |
#define | LINKER_DT_RESERVED_MEM_SYMBOLS() _RESERVED_REGION_APPLY(_RESERVED_SYMBOL_DECLARE) |
Generate linker script symbols for all the reserved memory regions. More... | |
#define | LINKER_DT_RESERVED_MEM_GET_PTR(node_id) _DT_RESERVED_START(node_id) |
Get the pointer to the reserved-memory region. More... | |
#define | LINKER_DT_RESERVED_MEM_GET_SIZE(node_id) DT_REG_SIZE(node_id) |
Get the size of the reserved-memory region. More... | |
#define | LINKER_DT_RESERVED_MEM_GET_PTR_BY_PHANDLE(node_id, ph) LINKER_DT_RESERVED_MEM_GET_PTR(DT_PHANDLE(node_id, ph)) |
Get the pointer to the reserved-memory region from a memory-reserved phandle. More... | |
#define | LINKER_DT_RESERVED_MEM_GET_SIZE_BY_PHANDLE(node_id, ph) LINKER_DT_RESERVED_MEM_GET_SIZE(DT_PHANDLE(node_id, ph)) |
Get the size of the reserved-memory region from a memory-reserved phandle. More... | |
#define LINKER_DT_RESERVED_MEM_GET_PTR | ( | node_id | ) | _DT_RESERVED_START(node_id) |
Get the pointer to the reserved-memory region.
Example devicetree fragment:
reserved: reserved-memory { compatible = "reserved-memory"; ... n: node { reg = <0x42000000 0x1000>; }; };
Example usage:
LINKER_DT_RESERVED_MEM_GET_PTR(DT_NODELABEL(n)) // (uint8_t *) 0x42000000
node_id | node identifier |
#define LINKER_DT_RESERVED_MEM_GET_PTR_BY_PHANDLE | ( | node_id, | |
ph | |||
) | LINKER_DT_RESERVED_MEM_GET_PTR(DT_PHANDLE(node_id, ph)) |
Get the pointer to the reserved-memory region from a memory-reserved phandle.
Example devicetree fragment:
reserved: reserved-memory { compatible = "reserved-memory"; ... res0: res { reg = <0x42000000 0x1000>; label = "res0"; }; }; n: node { memory-region = <&res0>; };
Example usage:
LINKER_DT_RESERVED_MEM_GET_PTR_BY_PHANDLE(DT_NODELABEL(n), \ memory_region) // (uint8_t *) 0x42000000
node_id | node identifier |
ph | phandle to reserved-memory region |
#define LINKER_DT_RESERVED_MEM_GET_SIZE | ( | node_id | ) | DT_REG_SIZE(node_id) |
Get the size of the reserved-memory region.
Example devicetree fragment:
reserved: reserved-memory { compatible = "reserved-memory"; ... n: node { reg = <0x42000000 0x1000>; }; };
Example usage:
LINKER_DT_RESERVED_MEM_GET_SIZE(DT_NODELABEL(n)) // 0x1000
node_id | node identifier |
#define LINKER_DT_RESERVED_MEM_GET_SIZE_BY_PHANDLE | ( | node_id, | |
ph | |||
) | LINKER_DT_RESERVED_MEM_GET_SIZE(DT_PHANDLE(node_id, ph)) |
Get the size of the reserved-memory region from a memory-reserved phandle.
Example devicetree fragment:
reserved: reserved-memory { compatible = "reserved-memory"; ... res0: res { reg = <0x42000000 0x1000>; label = "res0"; }; }; n: node { memory-region = <&res0>; };
Example usage:
LINKER_DT_RESERVED_MEM_GET_SIZE_BY_PHANDLE(DT_NODELABEL(n), \ memory_region) // (uint8_t *) 0x42000000
node_id | node identifier |
ph | phandle to reserved-memory region |
#define LINKER_DT_RESERVED_MEM_REGIONS | ( | ) | _RESERVED_REGION_APPLY(_RESERVED_REGION_DECLARE) |
Generate region definitions for all the reserved memory regions.
#define LINKER_DT_RESERVED_MEM_SECTIONS | ( | ) | _RESERVED_REGION_APPLY(_RESERVED_SECTION_DECLARE) |
Generate section definitions for all the reserved memory regions.
#define LINKER_DT_RESERVED_MEM_SYMBOLS | ( | ) | _RESERVED_REGION_APPLY(_RESERVED_SYMBOL_DECLARE) |
Generate linker script symbols for all the reserved memory regions.