Zephyr Project API
3.3.0
A Scalable Open Source RTOS
|
Macros | |
#define | DT_NODE_BY_FIXED_PARTITION_LABEL(label) DT_CAT(DT_COMPAT_fixed_partitions_LABEL_, label) |
Get a node identifier for a fixed partition with a given label property. More... | |
#define | DT_HAS_FIXED_PARTITION_LABEL(label) IS_ENABLED(DT_CAT3(DT_COMPAT_fixed_partitions_LABEL_, label, _EXISTS)) |
Test if a fixed partition with a given label property exists. More... | |
#define | DT_FIXED_PARTITION_EXISTS(node_id) DT_NODE_HAS_COMPAT(DT_PARENT(node_id), fixed_partitions) |
Test if fixed-partition compatible node exists. More... | |
#define | DT_FIXED_PARTITION_ID(node_id) DT_CAT(node_id, _PARTITION_ID) |
Get a numeric identifier for a fixed partition. More... | |
#define | DT_MTD_FROM_FIXED_PARTITION(node_id) |
Get the node identifier of the flash device for a partition. More... | |
#define DT_FIXED_PARTITION_EXISTS | ( | node_id | ) | DT_NODE_HAS_COMPAT(DT_PARENT(node_id), fixed_partitions) |
#include <include/zephyr/devicetree/fixed-partitions.h>
Test if fixed-partition compatible node exists.
node_id | DTS node to test |
#define DT_FIXED_PARTITION_ID | ( | node_id | ) | DT_CAT(node_id, _PARTITION_ID) |
#include <include/zephyr/devicetree/fixed-partitions.h>
Get a numeric identifier for a fixed partition.
node_id | node identifier for a fixed-partitions child node |
#define DT_HAS_FIXED_PARTITION_LABEL | ( | label | ) | IS_ENABLED(DT_CAT3(DT_COMPAT_fixed_partitions_LABEL_, label, _EXISTS)) |
#include <include/zephyr/devicetree/fixed-partitions.h>
Test if a fixed partition with a given label property exists.
label | lowercase-and-underscores label property value |
#define DT_MTD_FROM_FIXED_PARTITION | ( | node_id | ) |
#include <include/zephyr/devicetree/fixed-partitions.h>
Get the node identifier of the flash device for a partition.
node_id | node identifier for a fixed-partitions child node |
#define DT_NODE_BY_FIXED_PARTITION_LABEL | ( | label | ) | DT_CAT(DT_COMPAT_fixed_partitions_LABEL_, label) |
#include <include/zephyr/devicetree/fixed-partitions.h>
Get a node identifier for a fixed partition with a given label property.
Example devicetree fragment:
flash@... { partitions { compatible = "fixed-partitions"; boot_partition: partition@0 { label = "mcuboot"; }; slot0_partition: partition@c000 { label = "image-0"; }; ... }; };
Example usage:
DT_NODE_BY_FIXED_PARTITION_LABEL(mcuboot) // node identifier for boot_partition DT_NODE_BY_FIXED_PARTITION_LABEL(image_0) // node identifier for slot0_partition
label | lowercase-and-underscores label property value |