@@ -23,48 +23,26 @@ extern "C" {
23
23
*/
24
24
25
25
/**
26
- * @brief Get a node identifier for a fixed partition with
27
- * a given label property
28
- *
29
- * Example devicetree fragment:
30
- *
31
- * flash@... {
32
- * partitions {
33
- * compatible = "fixed-partitions";
34
- * boot_partition: partition@0 {
35
- * label = "mcuboot";
36
- * };
37
- * slot0_partition: partition@c000 {
38
- * label = "image-0";
39
- * };
40
- * ...
41
- * };
42
- * };
43
- *
44
- * Example usage:
45
- *
46
- * DT_NODE_BY_FIXED_PARTITION_LABEL(mcuboot) // node identifier for boot_partition
47
- * DT_NODE_BY_FIXED_PARTITION_LABEL(image_0) // node identifier for slot0_partition
48
- *
49
- * @param label lowercase-and-underscores label property value
50
- * @return a node identifier for the partition with that label property
26
+ * @brief Get fixed partition with "label" property that matches label
27
+ * @param label lowercase-and-underscores value for "label" property
28
+ * @return a node identifier for the partition that matches label
51
29
*/
52
30
#define DT_NODE_BY_FIXED_PARTITION_LABEL (label ) \
53
31
DT_CAT(DT_COMPAT_fixed_partitions_LABEL_, label)
54
32
55
33
/**
56
- * @brief Test if a fixed partition with a given label property exists
57
- * @param label lowercase-and-underscores label property value
58
- * @return 1 if any "fixed-partitions" child node has the given label,
34
+ * @brief Test if a fixed partition with the " label" property exists
35
+ * @param label lowercase-and-underscores value for " label" property
36
+ * @return 1 if the label exists across all 'fixed-partitions' nodes
59
37
* 0 otherwise.
60
38
*/
61
39
#define DT_HAS_FIXED_PARTITION_LABEL (label ) \
62
40
IS_ENABLED(DT_COMPAT_fixed_partitions_LABEL_##label##_EXISTS)
63
41
64
42
/**
65
- * @brief Get a numeric identifier for a fixed partition
66
- * @param node_id node identifier for a fixed-partitions child node
67
- * @return the partition's ID, a unique zero-based index number
43
+ * @brief ' fixed-partitions' ID
44
+ * @param node_id node identifier
45
+ * @return unique fixed partition id for given partition referenced by node_id
68
46
*/
69
47
#define DT_FIXED_PARTITION_ID (node_id ) DT_CAT(node_id, _PARTITION_ID)
70
48
0 commit comments