Lines Matching +full:child +full:- +full:prop +full:- +full:1
4 * SPDX-License-Identifier: Apache-2.0
118 zassert_equal(DT_NUM_REGS(TEST_DEADBEEF), 1, ""); in ZTEST()
121 zassert_equal(DT_PROP(TEST_DEADBEEF, gpio_controller), 1, ""); in ZTEST()
124 zassert_equal(DT_PROP_LEN(TEST_DEADBEEF, compatible), 1, ""); in ZTEST()
126 "vnd,gpio-device"), ""); in ZTEST()
127 zassert_true(!strcmp(DT_PROP_LAST(TEST_DEADBEEF, compatible), "vnd,gpio-device"), ""); in ZTEST()
133 zassert_equal(DT_PROP(TEST_ABCD1234, gpio_controller), 1, ""); in ZTEST()
136 zassert_equal(DT_PROP_LEN(TEST_ABCD1234, compatible), 1, ""); in ZTEST()
137 zassert_equal(DT_PROP_LEN_OR(TEST_ABCD1234, compatible, 4), 1, ""); in ZTEST()
140 "vnd,gpio-device"), ""); in ZTEST()
145 zassert_equal(DT_HAS_ALIAS(test_alias), 1, ""); in ZTEST()
147 zassert_equal(DT_NUM_REGS(TEST_ALIAS), 1, ""); in ZTEST()
151 zassert_equal(DT_PROP(TEST_ALIAS, gpio_controller), 1, ""); in ZTEST()
154 zassert_equal(DT_PROP_LEN(TEST_ALIAS, compatible), 1, ""); in ZTEST()
156 "vnd,gpio-device"), ""); in ZTEST()
161 zassert_equal(DT_NUM_REGS(TEST_NODELABEL), 1, ""); in ZTEST()
164 zassert_equal(DT_PROP(TEST_NODELABEL, gpio_controller), 1, ""); in ZTEST()
167 zassert_equal(DT_PROP_LEN(TEST_NODELABEL, compatible), 1, ""); in ZTEST()
169 "vnd,gpio-device"), ""); in ZTEST()
170 zassert_equal(DT_PROP_LEN(TEST_ENUM_0, val), 1, ""); in ZTEST()
185 zassert_equal(DT_PROP(TEST_INST, gpio_controller), 1, ""); in ZTEST()
188 zassert_equal(DT_PROP_LEN(TEST_INST, compatible), 1, ""); in ZTEST()
190 "vnd,gpio-device"), ""); in ZTEST()
192 zassert_equal(DT_INST_NODE_HAS_PROP(0, gpio_controller), 1, ""); in ZTEST()
193 zassert_equal(DT_INST_PROP(0, gpio_controller), 1, ""); in ZTEST()
197 zassert_equal(DT_INST_PROP_LEN(0, compatible), 1, ""); in ZTEST()
199 "vnd,gpio-device"), ""); in ZTEST()
206 zassert_equal(DT_ANY_INST_HAS_PROP_STATUS_OKAY(foo), 1, ""); in ZTEST()
207 zassert_equal(DT_ANY_INST_HAS_PROP_STATUS_OKAY(bar), 1, ""); in ZTEST()
225 zassert_equal(IF_ENABLED(DT_ANY_INST_HAS_PROP_STATUS_OKAY(foo), (1)) + 1, in ZTEST()
227 zassert_equal(IF_ENABLED(DT_ANY_INST_HAS_PROP_STATUS_OKAY(baz), (1)) + 1, in ZTEST()
228 1, ""); in ZTEST()
234 zassert_equal(DT_ANY_COMPAT_HAS_PROP_STATUS_OKAY(vnd_device_with_props, foo), 1, ""); in ZTEST()
235 zassert_equal(DT_ANY_COMPAT_HAS_PROP_STATUS_OKAY(vnd_device_with_props, bar), 1, ""); in ZTEST()
245 zassert_equal(DT_ANY_INST_HAS_BOOL_STATUS_OKAY(bool_foo), 1, ""); in ZTEST()
246 zassert_equal(DT_ANY_INST_HAS_BOOL_STATUS_OKAY(bool_bar), 1, ""); in ZTEST()
264 zassert_equal(IF_ENABLED(DT_ANY_INST_HAS_BOOL_STATUS_OKAY(bool_foo), (1)) + 1, in ZTEST()
266 zassert_equal(IF_ENABLED(DT_ANY_INST_HAS_BOOL_STATUS_OKAY(bool_baz), (1)) + 1, in ZTEST()
267 1, ""); in ZTEST()
284 zassert_equal(DT_PROP_OR(TEST_REG, not_a_property, -1), -1, ""); in ZTEST()
286 zassert_equal(DT_PHA_BY_IDX_OR(TEST_TEMP, dmas, 1, channel, X), 3, ""); in ZTEST()
287 zassert_equal(DT_PHA_BY_IDX_OR(TEST_TEMP, dmas, 1, not_a_cell, -1), -1, in ZTEST()
290 zassert_equal(DT_PHA_OR(TEST_TEMP, dmas, channel, X), 1, ""); in ZTEST()
291 zassert_equal(DT_PHA_OR(TEST_TEMP, dmas, not_a_cell, -1), -1, ""); in ZTEST()
293 zassert_equal(DT_PHA_BY_NAME_OR(TEST_TEMP, dmas, tx, channel, X), 1, in ZTEST()
295 zassert_equal(DT_PHA_BY_NAME_OR(TEST_TEMP, dmas, tx, not_a_cell, -1), in ZTEST()
296 -1, ""); in ZTEST()
302 zassert_equal(DT_INST_PROP_OR(0, not_a_property, -1), -1, ""); in ZTEST()
307 zassert_equal(DT_INST_PROP_LEN_OR(0, not_a_property, -1), -1, ""); in ZTEST()
311 zassert_equal(DT_INST_PHA_BY_IDX_OR(0, dmas, 1, channel, X), 3, ""); in ZTEST()
312 zassert_equal(DT_INST_PHA_BY_IDX_OR(0, dmas, 1, not_a_cell, -1), -1, in ZTEST()
315 zassert_equal(DT_INST_PHA_OR(0, dmas, channel, X), 1, ""); in ZTEST()
316 zassert_equal(DT_INST_PHA_OR(0, dmas, not_a_cell, -1), -1, ""); in ZTEST()
318 zassert_equal(DT_INST_PHA_BY_NAME_OR(0, dmas, tx, channel, X), 1, in ZTEST()
320 zassert_equal(DT_INST_PHA_BY_NAME_OR(0, dmas, tx, not_a_cell, -1), -1, in ZTEST()
329 zassert_equal(DT_NODE_HAS_STATUS(DT_PATH(test, gpio_deadbeef), okay), 1, in ZTEST()
331 zassert_equal(DT_NODE_HAS_STATUS(DT_PATH(test, gpio_abcd1234), okay), 1, in ZTEST()
337 zassert_equal(DT_NODE_HAS_STATUS(DT_ALIAS(test_alias), okay), 1, ""); in ZTEST()
343 zassert_equal(DT_NODE_EXISTS(DT_INST(0, vnd_gpio_device)), 1, ""); in ZTEST()
344 zassert_equal(DT_NODE_EXISTS(DT_INST(1, vnd_gpio_device)), 1, ""); in ZTEST()
345 zassert_equal(DT_NODE_EXISTS(DT_INST(2, vnd_gpio_device)), 1, ""); in ZTEST()
355 zassert_equal(DT_NODE_HAS_STATUS(DT_NODELABEL(test_nodelabel), okay), 1, in ZTEST()
359 1, ""); in ZTEST()
371 zassert_equal(TA_HAS_COMPAT(vnd_array_holder), 1, ""); in ZTEST()
372 zassert_equal(TA_HAS_COMPAT(vnd_undefined_compat), 1, ""); in ZTEST()
375 (TA_HAS_COMPAT(vnd_undefined_compat) << 1) | in ZTEST()
387 1, ""); in ZTEST()
394 1, ""); in ZTEST()
401 1, ""); in ZTEST()
408 1, ""); in ZTEST()
417 zassert_equal(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(test_gpio_1)), 1); in ZTEST()
419 zassert_equal(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(test_no_status)), 1); in ZTEST()
435 zassert_equal(DT_SPI_DEV_HAS_CS_GPIOS(TEST_SPI_DEV_0), 1, ""); in ZTEST()
438 /* Test a nested I2C bus using vnd,i2c-mux. */ in ZTEST()
450 "expected TEST_SPI_NO_CS as bus for vnd,spi-device-2"); in ZTEST()
456 * either vnd,spi-device. in ZTEST()
458 zassert_equal(DT_INST_SPI_DEV_HAS_CS_GPIOS(0), 1, ""); in ZTEST()
471 zassert_equal(DT_ON_BUS(TEST_SPI_DEV_0, spi), 1, ""); in ZTEST()
475 zassert_equal(DT_ON_BUS(TEST_I2C_DEV, i2c), 1, ""); in ZTEST()
483 zassert_equal(DT_INST_ON_BUS(0, spi), 1, ""); in ZTEST()
487 zassert_equal(DT_ANY_INST_ON_BUS_STATUS_OKAY(spi), 1, ""); in ZTEST()
495 zassert_equal(DT_INST_ON_BUS(0, i2c), 1, ""); in ZTEST()
499 zassert_equal(DT_ANY_INST_ON_BUS_STATUS_OKAY(i2c), 1, ""); in ZTEST()
505 zassert_equal(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT), 1, ""); in ZTEST()
507 zassert_equal(DT_INST_ON_BUS(0, i2c), 1, ""); in ZTEST()
508 zassert_equal(DT_INST_ON_BUS(0, i3c), 1, ""); in ZTEST()
511 zassert_equal(DT_ANY_INST_ON_BUS_STATUS_OKAY(i2c), 1, ""); in ZTEST()
512 zassert_equal(DT_ANY_INST_ON_BUS_STATUS_OKAY(i3c), 1, ""); in ZTEST()
517 zassert_equal(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT), 1, ""); in ZTEST()
519 zassert_equal(DT_INST_ON_BUS(0, i2c), 1, ""); in ZTEST()
520 zassert_equal(DT_INST_ON_BUS(0, i3c), 1, ""); in ZTEST()
523 zassert_equal(DT_ANY_INST_ON_BUS_STATUS_OKAY(i2c), 1, ""); in ZTEST()
524 zassert_equal(DT_ANY_INST_ON_BUS_STATUS_OKAY(i3c), 1, ""); in ZTEST()
533 zassert_equal(DT_HAS_COMPAT_ON_BUS_STATUS_OKAY(vnd_spi_device, spi), 1); in ZTEST()
536 zassert_equal(DT_HAS_COMPAT_ON_BUS_STATUS_OKAY(vnd_i2c_device, i2c), 1); in ZTEST()
539 zassert_equal(DT_HAS_COMPAT_ON_BUS_STATUS_OKAY(vnd_gpio_expander, i2c), 1, in ZTEST()
541 zassert_equal(DT_HAS_COMPAT_ON_BUS_STATUS_OKAY(vnd_gpio_expander, spi), 1, in ZTEST()
548 #define VND_VENDOR "A stand-in for a real vendor which can be used in examples and tests"
549 #define ZEP_VENDOR "Zephyr-specific binding"
555 zassert_false(DT_NODE_VENDOR_HAS_IDX(TEST_VENDOR, 1), ""); in ZTEST()
565 zassert_is_null(DT_NODE_VENDOR_BY_IDX_OR(TEST_VENDOR, 1, NULL), ""); in ZTEST()
580 zassert_false(DT_NODE_MODEL_HAS_IDX(TEST_MODEL, 1), ""); in ZTEST()
590 zassert_is_null(DT_NODE_MODEL_BY_IDX_OR(TEST_MODEL, 1, NULL), ""); in ZTEST()
607 zassert_true(DT_REG_HAS_IDX(TEST_ABCD1234, 1), ""); in ZTEST()
617 zassert_equal(DT_REG_ADDR_BY_IDX(TEST_ABCD1234, 1), 0x98765432, ""); in ZTEST()
621 zassert_equal(DT_REG_SIZE_BY_IDX(TEST_ABCD1234, 1), 0xff, ""); in ZTEST()
655 zassert_equal(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT), 1, ""); in ZTEST()
659 zassert_true(DT_INST_REG_HAS_IDX(0, 1), ""); in ZTEST()
669 zassert_equal(DT_INST_REG_ADDR_BY_IDX(0, 1), 0xbbbbcccc, ""); in ZTEST()
673 zassert_equal(DT_INST_REG_SIZE_BY_IDX(0, 1), 0x3f, ""); in ZTEST()
729 zassert_equal(DT_NUM_IRQS(TEST_DEADBEEF), 1, ""); in ZTEST()
735 zassert_true(DT_IRQ_HAS_IDX(TEST_SPI_BUS_0, 1), ""); in ZTEST()
740 zassert_false(DT_IRQ_HAS_IDX(TEST_DEADBEEF, 1), ""); in ZTEST()
743 zassert_true(DT_IRQ_HAS_IDX(TEST_I2C_BUS, 1), ""); in ZTEST()
748 zassert_equal(DT_IRQ_BY_IDX(TEST_SPI_BUS_0, 1, irq), 9, ""); in ZTEST()
751 zassert_equal(DT_IRQ_BY_IDX(TEST_SPI_BUS_0, 1, priority), 0, ""); in ZTEST()
752 zassert_equal(DT_IRQ_BY_IDX(TEST_SPI_BUS_0, 2, priority), 1, ""); in ZTEST()
758 zassert_equal(DT_IRQ_BY_NAME(TEST_I2C_BUS, error, priority), 1, ""); in ZTEST()
789 ((6 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11, ""); in ZTEST()
791 ((30 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11, ""); in ZTEST()
797 zassert_equal(DT_IRQN_BY_IDX(DT_INST(0, DT_DRV_COMPAT), 1), 40, ""); in ZTEST()
801 ((30 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11, ""); in ZTEST()
802 zassert_equal(DT_IRQN_BY_IDX(DT_INST(0, DT_DRV_COMPAT), 1), in ZTEST()
803 ((40 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11, ""); in ZTEST()
805 ((60 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11, ""); in ZTEST()
809 zassert_equal(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT), 1, ""); in ZTEST()
815 zassert_equal(DT_INST_IRQ_HAS_IDX(0, 0), 1, ""); in ZTEST()
816 zassert_equal(DT_INST_IRQ_HAS_IDX(0, 1), 1, ""); in ZTEST()
817 zassert_equal(DT_INST_IRQ_HAS_IDX(0, 2), 1, ""); in ZTEST()
822 zassert_equal(DT_INST_IRQ_BY_IDX(0, 1, irq), 40, ""); in ZTEST()
825 zassert_equal(DT_INST_IRQ_BY_IDX(0, 1, priority), 5, ""); in ZTEST()
844 zassert_equal(DT_INST_IRQN(0), ((30 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11, ""); in ZTEST()
850 zassert_equal(DT_INST_IRQN_BY_IDX(0, 1), 40, ""); in ZTEST()
854 ((30 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11, ""); in ZTEST()
855 zassert_equal(DT_INST_IRQN_BY_IDX(0, 1), in ZTEST()
856 ((40 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11, ""); in ZTEST()
858 ((60 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11, ""); in ZTEST()
886 ((70 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11, ""); in ZTEST()
888 ((42 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 12, ""); in ZTEST()
899 zassert_equal(DT_IRQ_LEVEL(TEST_INTC), 1, ""); in ZTEST()
909 zassert_equal(DT_INST_IRQ_LEVEL(1), 1, ""); in ZTEST()
921 #define CLOCK_FREQUENCY_AND_COMMA(node_id, prop, idx) \ argument
922 DT_PROP_BY_PHANDLE_IDX(node_id, prop, idx, clock_frequency),
925 #define DT_GPIO_ELEM(idx, node_id, prop) \ argument
927 DT_PHA_BY_IDX(node_id, prop, idx, pin),\
928 DT_PHA_BY_IDX(node_id, prop, idx, flags),\
930 #define DT_GPIO_LISTIFY(node_id, prop) \ argument
931 { LISTIFY(DT_PROP_LEN(node_id, prop), DT_GPIO_ELEM, (,), \
932 node_id, prop) }
946 zassert_equal(DT_PROP_LEN(TEST_PH, ph), 1, ""); in ZTEST()
956 zassert_true(DT_SAME_NODE(DT_PROP_BY_IDX(TEST_PH, phs, 1), in ZTEST()
961 zassert_equal(phs_freqs[1], 2000000, ""); in ZTEST()
966 zassert_equal(DT_PROP_BY_PHANDLE_IDX(TEST_PH, phs, 1, clock_frequency), in ZTEST()
969 /* DT_PROP_BY_PHANDLE_IDX on a phandle-array type property */ in ZTEST()
972 zassert_equal(DT_PROP_BY_PHANDLE_IDX(TEST_PH, gpios, 1, in ZTEST()
976 zassert_true(!strcmp(DT_PROP_BY_PHANDLE_IDX(TEST_PH, gpios, 1, status), in ZTEST()
982 zassert_true(!strcmp(DT_PROP_BY_PHANDLE_IDX_OR(TEST_PH, phs_or, 1, in ZTEST()
985 /* phandle-array */ in ZTEST()
992 zassert_true(DT_PROP_HAS_IDX(TEST_PH, gpios, 1), ""); in ZTEST()
998 zassert_false(DT_PROP_HAS_NAME(TEST_PH, foos, b-c), ""); in ZTEST()
1003 zassert_true(DT_PHA_HAS_CELL_AT_IDX(TEST_PH, gpios, 1, pin), ""); in ZTEST()
1004 zassert_true(DT_PHA_HAS_CELL_AT_IDX(TEST_PH, gpios, 1, flags), ""); in ZTEST()
1005 /* pha-gpios index 1 has nothing, not even a phandle */ in ZTEST()
1006 zassert_false(DT_PROP_HAS_IDX(TEST_PH, pha_gpios, 1), ""); in ZTEST()
1007 zassert_false(DT_PHA_HAS_CELL_AT_IDX(TEST_PH, pha_gpios, 1, pin), ""); in ZTEST()
1008 zassert_false(DT_PHA_HAS_CELL_AT_IDX(TEST_PH, pha_gpios, 1, flags), in ZTEST()
1017 /* even though index 1 has nothing, the length is still 4 */ in ZTEST()
1026 zassert_true(DT_SAME_NODE(DT_PHANDLE_BY_IDX(TEST_PH, gpios, 1), TEST_GPIO_2), ""); in ZTEST()
1039 zassert_equal(DT_PHA_BY_IDX(TEST_PH, gpios, 1, pin), 30, ""); in ZTEST()
1040 zassert_equal(DT_PHA_BY_IDX(TEST_PH, gpios, 1, flags), 40, ""); in ZTEST()
1054 zassert_equal(gps[1].pin, 30, ""); in ZTEST()
1055 zassert_equal(gps[1].flags, 40, ""); in ZTEST()
1058 zassert_equal(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT), 1, ""); in ZTEST()
1066 zassert_equal(DT_INST_PROP_BY_PHANDLE_IDX(0, phs, 1, clock_frequency), in ZTEST()
1070 1, ""); in ZTEST()
1071 zassert_equal(DT_INST_PROP_BY_PHANDLE_IDX(0, gpios, 1, in ZTEST()
1073 1, ""); in ZTEST()
1076 zassert_equal(DT_INST_PROP_BY_PHANDLE_IDX(0, gpios, 1, ngpios), in ZTEST()
1081 zassert_true(DT_INST_PROP_HAS_IDX(0, gpios, 1), ""); in ZTEST()
1087 zassert_false(DT_INST_PROP_HAS_NAME(0, foos, b-c), ""); in ZTEST()
1092 zassert_true(DT_INST_PHA_HAS_CELL_AT_IDX(0, gpios, 1, pin), ""); in ZTEST()
1093 zassert_true(DT_INST_PHA_HAS_CELL_AT_IDX(0, gpios, 1, flags), ""); in ZTEST()
1094 /* index 1 has nothing, not even a phandle */ in ZTEST()
1095 zassert_false(DT_INST_PROP_HAS_IDX(0, pha_gpios, 1), ""); in ZTEST()
1096 zassert_false(DT_INST_PHA_HAS_CELL_AT_IDX(0, pha_gpios, 1, pin), ""); in ZTEST()
1097 zassert_false(DT_INST_PHA_HAS_CELL_AT_IDX(0, pha_gpios, 1, flags), ""); in ZTEST()
1104 /* even though index 1 has nothing, the length is still 4 */ in ZTEST()
1113 zassert_true(DT_SAME_NODE(DT_INST_PHANDLE_BY_IDX(0, gpios, 1), TEST_GPIO_2), ""); in ZTEST()
1126 zassert_equal(DT_INST_PHA_BY_IDX(0, gpios, 1, pin), 30, ""); in ZTEST()
1127 zassert_equal(DT_INST_PHA_BY_IDX(0, gpios, 1, flags), 40, ""); in ZTEST()
1145 zassert_true(!strcmp(TO_STRING(DT_GPIO_CTLR_BY_IDX(TEST_PH, gpios, 1)), in ZTEST()
1154 zassert_equal(DT_GPIO_PIN_BY_IDX(TEST_PH, gpios, 1), 30, ""); in ZTEST()
1161 zassert_equal(DT_GPIO_FLAGS_BY_IDX(TEST_PH, gpios, 1), 40, ""); in ZTEST()
1168 zassert_equal(DT_NUM_GPIO_HOGS(TEST_GPIO_HOG_2), 1, ""); in ZTEST()
1169 zassert_equal(DT_NUM_GPIO_HOGS(TEST_GPIO_HOG_3), 1, ""); in ZTEST()
1173 zassert_equal(DT_GPIO_HOG_PIN_BY_IDX(TEST_GPIO_HOG_1, 1), 1, ""); in ZTEST()
1179 zassert_equal(DT_GPIO_HOG_FLAGS_BY_IDX(TEST_GPIO_HOG_1, 1), 0x10, ""); in ZTEST()
1184 zassert_equal(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT), 1, ""); in ZTEST()
1188 zassert_equal(DT_INST_GPIO_PIN_BY_IDX(0, gpios, 1), 30, ""); in ZTEST()
1195 zassert_equal(DT_INST_GPIO_FLAGS_BY_IDX(0, gpios, 1), 40, ""); in ZTEST()
1208 zassert_true(DT_SAME_NODE(DT_IO_CHANNELS_CTLR_BY_IDX(TEST_TEMP, 1), in ZTEST()
1224 zassert_true(DT_SAME_NODE(DT_INST_IO_CHANNELS_CTLR_BY_IDX(0, 1), in ZTEST()
1238 zassert_equal(DT_IO_CHANNELS_INPUT_BY_IDX(TEST_TEMP, 1), 20, ""); in ZTEST()
1244 zassert_equal(DT_INST_IO_CHANNELS_INPUT_BY_IDX(0, 1), 20, ""); in ZTEST()
1278 zassert_true(DT_SAME_NODE(DT_DMAS_CTLR_BY_IDX(TEST_TEMP, 1), in ZTEST()
1294 zassert_true(DT_SAME_NODE(DT_INST_DMAS_CTLR_BY_IDX(0, 1), in ZTEST()
1311 zassert_equal(DT_DMAS_CELL_BY_IDX(TEST_TEMP, 1, channel), 3, ""); in ZTEST()
1312 zassert_equal(DT_INST_DMAS_CELL_BY_IDX(0, 1, channel), 3, ""); in ZTEST()
1313 zassert_equal(DT_DMAS_CELL_BY_IDX(TEST_TEMP, 1, slot), 4, ""); in ZTEST()
1314 zassert_equal(DT_INST_DMAS_CELL_BY_IDX(0, 1, slot), 4, ""); in ZTEST()
1321 zassert_true(DT_DMAS_HAS_IDX(TEST_TEMP, 1), ""); in ZTEST()
1322 zassert_true(DT_INST_DMAS_HAS_IDX(0, 1), ""); in ZTEST()
1338 zassert_true(DT_SAME_NODE(DT_INST_PORT_BY_ID(1, 0), TEST_VIDEO1_PORT), in ZTEST()
1344 zassert_true(DT_SAME_NODE(DT_INST_PORT_BY_ID(0, 1), TEST_VIDEO2_PORT1), in ZTEST()
1345 "get port@1 node of video2"); in ZTEST()
1352 zassert_true(DT_SAME_NODE(DT_INST_ENDPOINT_BY_ID(1, 0, 0), TEST_VIDEO1_OUT0), in ZTEST()
1354 zassert_true(DT_SAME_NODE(DT_INST_ENDPOINT_BY_ID(1, 0, 1), TEST_VIDEO1_OUT1), in ZTEST()
1355 "get endpoint@1 node of port node of video1"); in ZTEST()
1360 zassert_true(DT_SAME_NODE(DT_INST_ENDPOINT_BY_ID(0, 0, 1), TEST_VIDEO2_PORT0_IN1), in ZTEST()
1361 "get endpoint@1 node of port@0 node of video2"); in ZTEST()
1362 zassert_true(DT_SAME_NODE(DT_INST_ENDPOINT_BY_ID(0, 1, 0), TEST_VIDEO2_PORT1_IN), in ZTEST()
1363 "get endpoint node of port@1 node of video2"); in ZTEST()
1372 "get video1 node from its endpoint@1"); in ZTEST()
1376 "get video2 node from its endpoint@1 at port@0"); in ZTEST()
1378 "get video2 node from its endpoint at port@1"); in ZTEST()
1387 "get remote device node of video1's endpoint@1"); in ZTEST()
1393 "get remote device node of video2's port@0 endpoint@1"); in ZTEST()
1395 "get remote device node of video2's port@1 endpoint"); in ZTEST()
1406 zassert_true(DT_SAME_NODE(DT_PWMS_CTLR_BY_IDX(TEST_PH, 1), in ZTEST()
1420 zassert_equal(DT_PWMS_CELL_BY_IDX(TEST_PH, 1, channel), 5, ""); in ZTEST()
1421 zassert_equal(DT_PWMS_CELL_BY_IDX(TEST_PH, 1, period), 100, ""); in ZTEST()
1422 zassert_equal(DT_PWMS_CELL_BY_IDX(TEST_PH, 1, flags), 1, ""); in ZTEST()
1435 zassert_equal(DT_PWMS_CHANNEL_BY_IDX(TEST_PH, 1), 5, ""); in ZTEST()
1444 zassert_equal(DT_PWMS_PERIOD_BY_IDX(TEST_PH, 1), 100, ""); in ZTEST()
1453 zassert_equal(DT_PWMS_FLAGS_BY_IDX(TEST_PH, 1), 1, ""); in ZTEST()
1456 zassert_equal(DT_PWMS_FLAGS_BY_NAME(TEST_PH, green), 1, ""); in ZTEST()
1462 zassert_equal(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT), 1, ""); in ZTEST()
1467 zassert_true(DT_SAME_NODE(DT_INST_PWMS_CTLR_BY_IDX(0, 1), in ZTEST()
1480 zassert_equal(DT_INST_PWMS_CELL_BY_IDX(0, 1, channel), 5, ""); in ZTEST()
1481 zassert_equal(DT_INST_PWMS_CELL_BY_IDX(0, 1, period), 100, ""); in ZTEST()
1482 zassert_equal(DT_INST_PWMS_CELL_BY_IDX(0, 1, flags), 1, ""); in ZTEST()
1487 zassert_equal(DT_INST_PWMS_CELL_BY_NAME(0, green, flags), 1, ""); in ZTEST()
1495 zassert_equal(DT_INST_PWMS_CHANNEL_BY_IDX(0, 1), 5, ""); in ZTEST()
1504 zassert_equal(DT_INST_PWMS_PERIOD_BY_IDX(0, 1), 100, ""); in ZTEST()
1513 zassert_equal(DT_INST_PWMS_FLAGS_BY_IDX(0, 1), 1, ""); in ZTEST()
1544 zassert_equal(DT_INST_CAN_TRANSCEIVER_MIN_BITRATE(1, 0), 50000, ""); in ZTEST()
1545 zassert_equal(DT_INST_CAN_TRANSCEIVER_MIN_BITRATE(1, 50000), 50000, ""); in ZTEST()
1546 zassert_equal(DT_INST_CAN_TRANSCEIVER_MIN_BITRATE(1, 100000), 100000, ""); in ZTEST()
1572 zassert_equal(DT_INST_CAN_TRANSCEIVER_MAX_BITRATE(1, 125000), 125000, ""); in ZTEST()
1573 zassert_equal(DT_INST_CAN_TRANSCEIVER_MAX_BITRATE(1, 2000000), 2000000, ""); in ZTEST()
1574 zassert_equal(DT_INST_CAN_TRANSCEIVER_MAX_BITRATE(1, 5000000), 2000000, ""); in ZTEST()
1618 zassert_equal(a[1], 2000, ""); in ZTEST()
1622 zassert_true(DT_PROP_HAS_IDX(TEST_ARRAYS, a, 1), ""); in ZTEST()
1628 * and COND_CODE_0(), i.e. its expansion is a literal 1 or 0, in ZTEST()
1629 * not an equivalent expression that evaluates to 1 or 0. in ZTEST()
1632 COND_CODE_1(DT_PROP_HAS_IDX(TEST_ARRAYS, a, 0), (ok = 1;), ()); in ZTEST()
1633 zassert_equal(ok, 1, ""); in ZTEST()
1635 COND_CODE_0(DT_PROP_HAS_IDX(TEST_ARRAYS, a, 3), (ok = 1;), ()); in ZTEST()
1636 zassert_equal(ok, 1, ""); in ZTEST()
1639 zassert_equal(DT_PROP_BY_IDX(TEST_ARRAYS, a, 1), a[1], ""); in ZTEST()
1646 zassert_equal(b[1], 0xbb, ""); in ZTEST()
1651 zassert_true(DT_PROP_HAS_IDX(TEST_ARRAYS, b, 1), ""); in ZTEST()
1657 zassert_equal(DT_PROP_BY_IDX(TEST_ARRAYS, b, 1), b[1], ""); in ZTEST()
1664 zassert_true(!strcmp(c[1], "baz"), ""); in ZTEST()
1667 zassert_true(DT_PROP_HAS_IDX(TEST_ARRAYS, c, 1), ""); in ZTEST()
1671 zassert_true(!strcmp(DT_PROP_BY_IDX(TEST_ARRAYS, c, 1), c[1]), ""); in ZTEST()
1685 zassert_equal(1, DT_FOREACH_NODE(IS_ALIASES), ""); in ZTEST()
1686 zassert_equal(1, DT_FOREACH_NODE(IS_DISABLED_GPIO), ""); in ZTEST()
1687 zassert_equal(1, DT_FOREACH_STATUS_OKAY_NODE(IS_ALIASES), ""); in ZTEST()
1710 * For-each-node type macro tests. in ZTEST()
1713 * for-each-property type macros. in ZTEST()
1720 * "/test/enum-0" "/test/enum-1" in ZTEST()
1726 zassert_true(!strcmp(str, "/test/enum-0/test/enum-1") || in ZTEST()
1727 !strcmp(str, "/test/enum-1/test/enum-0"), ""); in ZTEST()
1766 DT_INST_FOREACH_STATUS_OKAY_VARGS(INC, 1) in ZTEST()
1784 DT_INST_FOREACH_STATUS_OKAY_VARGS(BUILD_BUG_ON_EXPANSION, 1) in ZTEST()
1800 zassert_equal(enum_TEST_NODELABEL_ALLCAPS, 1, ""); in ZTEST()
1804 DT_FOREACH_NODELABEL_VARGS(DT_NODELABEL(test_nodelabel), VAR_PLUS, 1); in ZTEST()
1805 zassert_equal(test_nodelabel_added, 1, ""); in ZTEST()
1814 zassert_true(!strcmp(nodelabels[1], "TEST_NODELABEL_ALLCAPS"), ""); in ZTEST()
1829 DT_INST_FOREACH_NODELABEL_VARGS(0, VAR_PLUS, 1); in ZTEST()
1830 zassert_equal(test_temp_sensor_added, 1, ""); in ZTEST()
1835 zassert_equal(ARRAY_SIZE(inst_nodelabels), 1); in ZTEST()
1839 zassert_equal(DT_INST_NUM_NODELABELS(0), 1, ""); in ZTEST()
1848 #define TIMES_TWO(node_id, prop, idx) \ in ZTEST() argument
1849 (2 * DT_PROP_BY_IDX(node_id, prop, idx)), in ZTEST()
1850 #define BY_IDX_COMMA(node_id, prop, idx) DT_PROP_BY_IDX(node_id, prop, idx), in ZTEST() argument
1858 zassert_equal(array_a[1], 4000, ""); in ZTEST()
1867 zassert_equal(array_b[1], 2 * 0xBB, ""); in ZTEST()
1877 zassert_true(!strcmp(array_c[1], "baz"), ""); in ZTEST()
1883 zassert_equal(ARRAY_SIZE(array_val), 1, ""); in ZTEST()
1890 zassert_equal(ARRAY_SIZE(string_zephyr_user), 1, ""); in ZTEST()
1895 #define PATH_COMMA(node_id, prop, idx) \ in ZTEST() argument
1896 DT_NODE_PATH(DT_PROP_BY_IDX(node_id, prop, idx)), in ZTEST()
1902 zassert_equal(ARRAY_SIZE(array_ph), 1, ""); in ZTEST()
1909 zassert_equal(ARRAY_SIZE(array_zephyr_user_ph), 1, ""); in ZTEST()
1919 zassert_true(!strcmp(array_phs[1], DT_NODE_PATH(TEST_SPI)), ""); in ZTEST()
1923 #define PIN_COMMA(node_id, prop, idx) DT_GPIO_PIN_BY_IDX(node_id, prop, idx), in ZTEST() argument
1931 zassert_equal(array_gpios[1], 30, ""); in ZTEST()
1941 zassert_equal(array_sep[1], 2000, ""); in ZTEST()
1953 zassert_equal(inst_array[1], array_a[1], ""); in ZTEST()
1962 zassert_equal(inst_array_sep[1], array_sep[1], ""); in ZTEST()
1969 #define TIMES_TWO_ADD(node_id, prop, idx, arg) \ in ZTEST() argument
1970 ((2 * DT_PROP_BY_IDX(node_id, prop, idx)) + arg), in ZTEST()
1978 zassert_equal(array[1], 4003, ""); in ZTEST()
1981 #define PROP_PLUS_ARG(node_id, prop, idx, arg) \ in ZTEST() argument
1982 (DT_PROP_BY_IDX(node_id, prop, idx) + arg) in ZTEST()
1991 zassert_equal(array_sep[1], 2003, ""); in ZTEST()
2003 zassert_equal(inst_array[1], array[1], ""); in ZTEST()
2013 zassert_equal(inst_array_sep[1], array_sep[1], ""); in ZTEST()
2030 struct test_gpio_data *data = dev->data; in test_gpio_init()
2032 data->init_called = 1; in test_gpio_init()
2063 const struct device *devs[2] = { DEVICE_DT_INST_GET(0), DEVICE_DT_INST_GET(1) }; in ZTEST()
2071 data_dev0 = devs[0]->data; in ZTEST()
2072 data_dev1 = devs[1]->data; in ZTEST()
2075 zassert_not_null(devs[1], ""); in ZTEST()
2077 zassert_true(data_dev0->is_gpio_ctlr, ""); in ZTEST()
2078 zassert_true(data_dev1->is_gpio_ctlr, ""); in ZTEST()
2079 zassert_true(data_dev0->init_called, ""); in ZTEST()
2080 zassert_true(data_dev1->init_called, ""); in ZTEST()
2083 config_abdc = dev_abcd->config; in ZTEST()
2085 zassert_equal(config_abdc->reg_addr, 0xabcd1234, ""); in ZTEST()
2086 zassert_equal(config_abdc->reg_len, 0x500, ""); in ZTEST()
2094 zassert_equal(DT_SPI_HAS_CS_GPIOS(TEST_SPI), 1, ""); in ZTEST()
2107 zassert_equal(DT_HAS_CHOSEN(ztest_gpio), 1, ""); in ZTEST()
2133 /* DT_ENUM_IDX_BY_IDX and DT_ENUM_HAS_VALUE_BY_IDX on string-array enum */ in ZTEST()
2135 zassert_equal(DT_ENUM_IDX_BY_IDX(DT_NODELABEL(test_enum_string_array), val, 1), 3); in ZTEST()
2141 zassert_true(DT_ENUM_HAS_VALUE_BY_IDX(DT_NODELABEL(test_enum_string_array), val, 1, zoo)); in ZTEST()
2142 zassert_false(DT_ENUM_HAS_VALUE_BY_IDX(DT_NODELABEL(test_enum_string_array), val, 1, foo)); in ZTEST()
2143 zassert_false(DT_ENUM_HAS_VALUE_BY_IDX(DT_NODELABEL(test_enum_string_array), val, 1, bar)); in ZTEST()
2144 zassert_false(DT_ENUM_HAS_VALUE_BY_IDX(DT_NODELABEL(test_enum_string_array), val, 1, baz)); in ZTEST()
2150 /* DT_ENUM_IDX_BY_IDX and DT_ENUM_HAS_VALUE_BY_IDX on int-array enum */ in ZTEST()
2152 zassert_equal(DT_ENUM_IDX_BY_IDX(DT_NODELABEL(test_enum_int_array), val, 1), 4); in ZTEST()
2158 zassert_true(DT_ENUM_HAS_VALUE_BY_IDX(DT_NODELABEL(test_enum_int_array), val, 1, 3)); in ZTEST()
2159 zassert_false(DT_ENUM_HAS_VALUE_BY_IDX(DT_NODELABEL(test_enum_int_array), val, 1, 0)); in ZTEST()
2160 zassert_false(DT_ENUM_HAS_VALUE_BY_IDX(DT_NODELABEL(test_enum_int_array), val, 1, 1)); in ZTEST()
2166 zassert_false(DT_ENUM_HAS_VALUE_BY_IDX(DT_NODELABEL(test_enum_int_array), val, 3, 1)); in ZTEST()
2175 1, ""); in ZTEST()
2185 /* DT_ENUM_IDX_OR on string-array value */ in ZTEST()
2190 /* DT_ENUM_IDX_OR on int-array value */ in ZTEST()
2224 zassert_equal(DT_INST_ENUM_IDX_BY_IDX(0, val, 1), 3, ""); in ZTEST()
2227 zassert_true(DT_INST_ENUM_HAS_VALUE_BY_IDX(0, val, 1, zoo), ""); in ZTEST()
2236 zassert_equal(DT_INST_ENUM_IDX_BY_IDX_OR(0, val, 1, 10), 4, ""); in ZTEST()
2245 zassert_true(DT_SAME_NODE(DT_CLOCKS_CTLR_BY_IDX(TEST_TEMP, 1), in ZTEST()
2279 /* clock-freq on fixed clock */ in ZTEST()
2280 zassert_equal(DT_PROP_BY_PHANDLE_IDX(TEST_TEMP, clocks, 1, in ZTEST()
2285 zassert_equal(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT), 1, ""); in ZTEST()
2288 zassert_true(DT_SAME_NODE(DT_INST_CLOCKS_CTLR_BY_IDX(0, 1), in ZTEST()
2322 /* clock-freq on fixed clock */ in ZTEST()
2323 zassert_equal(DT_INST_PROP_BY_PHANDLE_IDX(0, clocks, 1, in ZTEST()
2335 * The parent's label for the first instance of vnd,spi-device, in ZTEST()
2336 * child of TEST_SPI, is the same as TEST_SPI. in ZTEST()
2378 zassert_true(DT_SAME_NODE(DT_INST_GPARENT(1), TEST_I2C), ""); in ZTEST()
2388 val), 1, ""); in ZTEST()
2393 zassert_equal(DT_PROP(DT_INST_CHILD(0, child_b), val), 1, ""); in ZTEST()
2401 #define TEST_FUNC(child) { DT_PROP(child, val) } in ZTEST() argument
2402 #define TEST_FUNC_AND_COMMA(child) TEST_FUNC(child), in ZTEST() argument
2451 zassert_equal(vals[1].val, 1, ""); in ZTEST()
2454 zassert_equal(vals_sep[1].val, 1, ""); in ZTEST()
2457 zassert_equal(vals_inst[1].val, 1, ""); in ZTEST()
2460 zassert_equal(vals_inst_sep[1].val, 1, ""); in ZTEST()
2463 zassert_equal(vals_status_okay[1].val, 1, ""); in ZTEST()
2465 zassert_equal(vals_status_okay_inst[1].val, 1, ""); in ZTEST()
2467 zassert_equal(vals_status_okay_sep[1].val, 1, ""); in ZTEST()
2469 zassert_equal(vals_status_okay_inst_sep[1].val, 1, ""); in ZTEST()
2480 #define TEST_FUNC(child, arg) { DT_PROP(child, val) + arg } in ZTEST() argument
2481 #define TEST_FUNC_AND_COMMA(child, arg) TEST_FUNC(child, arg), in ZTEST() argument
2489 DT_FOREACH_CHILD_VARGS(TEST_PARENT, TEST_FUNC_AND_COMMA, 1) in ZTEST()
2493 DT_FOREACH_CHILD_SEP_VARGS(TEST_PARENT, TEST_FUNC, (,), 1) in ZTEST()
2497 DT_INST_FOREACH_CHILD_VARGS(0, TEST_FUNC_AND_COMMA, 1) in ZTEST()
2501 DT_INST_FOREACH_CHILD_SEP_VARGS(0, TEST_FUNC, (,), 1) in ZTEST()
2505 DT_FOREACH_CHILD_STATUS_OKAY_VARGS(TEST_PARENT, TEST_FUNC_AND_COMMA, 1) in ZTEST()
2509 DT_INST_FOREACH_CHILD_STATUS_OKAY_VARGS(0, TEST_FUNC_AND_COMMA, 1) in ZTEST()
2513 DT_FOREACH_CHILD_STATUS_OKAY_SEP_VARGS(TEST_PARENT, TEST_FUNC, (,), 1) in ZTEST()
2517 DT_INST_FOREACH_CHILD_STATUS_OKAY_SEP_VARGS(0, TEST_FUNC, (,), 1) in ZTEST()
2529 zassert_equal(vals[0].val, 1, ""); in ZTEST()
2530 zassert_equal(vals[1].val, 2, ""); in ZTEST()
2532 zassert_equal(vals_sep[0].val, 1, ""); in ZTEST()
2533 zassert_equal(vals_sep[1].val, 2, ""); in ZTEST()
2535 zassert_equal(vals_inst[0].val, 1, ""); in ZTEST()
2536 zassert_equal(vals_inst[1].val, 2, ""); in ZTEST()
2538 zassert_equal(vals_inst_sep[0].val, 1, ""); in ZTEST()
2539 zassert_equal(vals_inst_sep[1].val, 2, ""); in ZTEST()
2541 zassert_equal(vals_status_okay[0].val, 1, ""); in ZTEST()
2542 zassert_equal(vals_status_okay[1].val, 2, ""); in ZTEST()
2543 zassert_equal(vals_status_okay_inst[0].val, 1, ""); in ZTEST()
2544 zassert_equal(vals_status_okay_inst[1].val, 2, ""); in ZTEST()
2545 zassert_equal(vals_status_okay_sep[0].val, 1, ""); in ZTEST()
2546 zassert_equal(vals_status_okay_sep[1].val, 2, ""); in ZTEST()
2547 zassert_equal(vals_status_okay_inst_sep[0].val, 1, ""); in ZTEST()
2548 zassert_equal(vals_status_okay_inst_sep[1].val, 2, ""); in ZTEST()
2602 zassert_equal(DT_RANGES_HAS_IDX(TEST_RANGES_PCIE, 0), 1, ""); in ZTEST()
2603 zassert_equal(DT_RANGES_HAS_IDX(TEST_RANGES_PCIE, 1), 1, ""); in ZTEST()
2604 zassert_equal(DT_RANGES_HAS_IDX(TEST_RANGES_PCIE, 2), 1, ""); in ZTEST()
2608 1, ""); in ZTEST()
2609 zassert_equal(DT_RANGES_HAS_CHILD_BUS_FLAGS_AT_IDX(TEST_RANGES_PCIE, 1), in ZTEST()
2610 1, ""); in ZTEST()
2612 1, ""); in ZTEST()
2617 zassert_equal(ranges_pcie_flags[1], 0x2000000, ""); in ZTEST()
2620 zassert_equal(ranges_child_bus_addr[1], 0x10000000, ""); in ZTEST()
2623 zassert_equal(ranges_parent_bus_addr[1], 0x10000000, ""); in ZTEST()
2626 zassert_equal(ranges_length[1], 0x2eff0000, ""); in ZTEST()
2663 zassert_equal(DT_RANGES_HAS_IDX(TEST_RANGES_OTHER, 0), 1, ""); in ZTEST()
2664 zassert_equal(DT_RANGES_HAS_IDX(TEST_RANGES_OTHER, 1), 1, ""); in ZTEST()
2669 zassert_equal(HAS_FLAGS(TEST_RANGES_OTHER, 1), 0, ""); in ZTEST()
2674 zassert_equal(ranges_child_bus_addr[1], 0x10000000, ""); in ZTEST()
2676 zassert_equal(ranges_parent_bus_addr[1], 0x10000000, ""); in ZTEST()
2678 zassert_equal(ranges_length[1], 0x2eff0000, ""); in ZTEST()
2689 zassert_equal(DT_NODE_HAS_PROP(TEST_RANGES_EMPTY, ranges), 1, ""); in ZTEST()
2694 zassert_equal(DT_RANGES_HAS_IDX(TEST_RANGES_EMPTY, 1), 0, ""); in ZTEST()
2798 * Combined ordinals for /test/test-children are from in ZTEST()
2824 "test-children at %zu", i); in ZTEST()
2829 * Combined ordinals for /test/test-children/child-a in ZTEST()
2851 "child-a at %zu", i); in ZTEST()
2864 zassert_equal(ARRAY_SIZE(inst_requires), 1, ""); in ZTEST()
2884 * We go through the STRINGIFY()->atoi conversion cycle to avoid in ZTEST()
2911 "temperature-sensor"), ""); in ZTEST()
2913 "reg-holder"), ""); in ZTEST()
2919 zassert_equal(DT_NODE_CHILD_IDX(DT_NODELABEL(test_child_b)), 1, ""); in ZTEST()
2941 zassert_true(DT_SAME_NODE(DT_PINCTRL_BY_IDX(TEST_TEMP, 0, 1), in ZTEST()
2943 zassert_true(DT_SAME_NODE(DT_PINCTRL_BY_IDX(TEST_TEMP, 1, 0), in ZTEST()
2949 zassert_true(DT_SAME_NODE(DT_PINCTRL_BY_NAME(TEST_TEMP, default, 1), in ZTEST()
2957 zassert_equal(DT_PINCTRL_NAME_TO_IDX(TEST_TEMP, sleep), 1, ""); in ZTEST()
2963 zassert_equal(DT_NUM_PINCTRLS_BY_NAME(TEST_TEMP, f_o_o2), 1, ""); in ZTEST()
2967 zassert_equal(DT_PINCTRL_HAS_IDX(TEST_TEMP, 0), 1, ""); in ZTEST()
2968 zassert_equal(DT_PINCTRL_HAS_IDX(TEST_TEMP, 1), 1, ""); in ZTEST()
2969 zassert_equal(DT_PINCTRL_HAS_IDX(TEST_TEMP, 2), 1, ""); in ZTEST()
2972 zassert_equal(DT_PINCTRL_HAS_NAME(TEST_TEMP, default), 1, ""); in ZTEST()
2973 zassert_equal(DT_PINCTRL_HAS_NAME(TEST_TEMP, sleep), 1, ""); in ZTEST()
2974 zassert_equal(DT_PINCTRL_HAS_NAME(TEST_TEMP, f_o_o2), 1, ""); in ZTEST()
2987 MAKE_TOKEN(1) = 11, in ZTEST()
2992 MAKE_UPPER_TOKEN(1) = 21, in ZTEST()
3009 zassert_true(DT_SAME_NODE(DT_INST_PINCTRL_BY_IDX(0, 0, 1), in ZTEST()
3011 zassert_true(DT_SAME_NODE(DT_INST_PINCTRL_BY_IDX(0, 1, 0), in ZTEST()
3017 zassert_true(DT_SAME_NODE(DT_INST_PINCTRL_BY_NAME(0, default, 1), in ZTEST()
3025 zassert_equal(DT_INST_PINCTRL_NAME_TO_IDX(0, sleep), 1, ""); in ZTEST()
3031 zassert_equal(DT_INST_NUM_PINCTRLS_BY_NAME(0, f_o_o2), 1, ""); in ZTEST()
3035 zassert_equal(DT_INST_PINCTRL_HAS_IDX(0, 0), 1, ""); in ZTEST()
3036 zassert_equal(DT_INST_PINCTRL_HAS_IDX(0, 1), 1, ""); in ZTEST()
3037 zassert_equal(DT_INST_PINCTRL_HAS_IDX(0, 2), 1, ""); in ZTEST()
3040 zassert_equal(DT_INST_PINCTRL_HAS_NAME(0, default), 1, ""); in ZTEST()
3041 zassert_equal(DT_INST_PINCTRL_HAS_NAME(0, sleep), 1, ""); in ZTEST()
3042 zassert_equal(DT_INST_PINCTRL_HAS_NAME(0, f_o_o2), 1, ""); in ZTEST()
3055 MAKE_TOKEN(1) = 11, in ZTEST()
3059 MAKE_UPPER_TOKEN(1) = 21, in ZTEST()
3101 zassert_equal(channel_tx.channel_id, 1, ""); in ZTEST()
3104 zassert_equal(DT_MBOX_CHANNEL_BY_NAME(TEST_TEMP, tx), 1, ""); in ZTEST()
3112 zassert_equal(DT_MBOX_CHANNEL_BY_NAME(TEST_TEMP, tx), 1, ""); in ZTEST()
3189 zassert_between_inclusive(ids[i], 0, ARRAY_SIZE(ids) - 1, ""); in ZTEST()
3208 TOKEN_ZERO = token_no_inst + 1, in ZTEST()
3326 zassert_equal(DT_STRING_TOKEN_BY_IDX(DT_NODELABEL(test_str_array_token_0), val, 1), in ZTEST()
3332 zassert_equal(DT_STRING_TOKEN_BY_IDX(DT_NODELABEL(test_str_array_token_1), val, 1), in ZTEST()
3341 zassert_equal(DT_STRING_UPPER_TOKEN_BY_IDX(DT_NODELABEL(test_str_array_token_0), val, 1), in ZTEST()
3347 zassert_equal(DT_STRING_UPPER_TOKEN_BY_IDX(DT_NODELABEL(test_str_array_token_1), val, 1), in ZTEST()
3359 DT_INST_STRING_TOKEN_BY_IDX(inst, val, 1), \ in ZTEST()
3366 zassert_equal(STRING_TOKEN_BY_IDX_VAR(DT_NODELABEL(test_str_array_token_0))[1], in ZTEST()
3372 zassert_equal(STRING_TOKEN_BY_IDX_VAR(DT_NODELABEL(test_str_array_token_1))[1], in ZTEST()
3381 DT_INST_STRING_UPPER_TOKEN_BY_IDX(inst, val, 1), \ in ZTEST()
3388 zassert_equal(STRING_UPPER_TOKEN_BY_IDX_VAR(DT_NODELABEL(test_str_array_token_0))[1], in ZTEST()
3394 zassert_equal(STRING_UPPER_TOKEN_BY_IDX_VAR(DT_NODELABEL(test_str_array_token_1))[1], in ZTEST()
3410 const double f1_expected = 0.9e-3; in ZTEST()
3411 const double delta = 0.1e-4; in ZTEST()
3477 zassert_within(STRING_UNQUOTED_OR_VAR(DT_NODELABEL(test_str_unquoted_f0))[1], in ZTEST()
3479 zassert_within(STRING_UNQUOTED_OR_VAR(DT_NODELABEL(test_str_unquoted_f1))[1], in ZTEST()
3481 zassert_within(STRING_UNQUOTED_OR_VAR(DT_NODELABEL(test_str_unquoted_t))[1], in ZTEST()
3483 zassert_within(STRING_UNQUOTED_OR_VAR(DT_NODELABEL(test_str_unquoted_esc_t))[1], 1.0e10, in ZTEST()
3501 #define XMINUS - in ZTEST()
3504 const double delta = 0.1e-4; in ZTEST()
3509 zassert_within(DT_STRING_UNQUOTED_BY_IDX(DT_NODELABEL(test_stra_unquoted_f0), val, 1), in ZTEST()
3518 zassert_within(DT_STRING_UNQUOTED_BY_IDX(DT_NODELABEL(test_stra_unquoted_f1), val, 1), in ZTEST()
3527 zassert_within(DT_STRING_UNQUOTED_BY_IDX(DT_NODELABEL(test_stra_unquoted_t), val, 1), in ZTEST()
3536 zassert_str_equal(DT_STRING_UNQUOTED_BY_IDX(DT_NODELABEL(test_stra_unquoted_esc), val, 1), in ZTEST()
3543 DT_INST_STRING_UNQUOTED_BY_IDX(inst, val, 1), \ in ZTEST()
3551 zassert_within(STRING_UNQUOTED_BY_IDX_VAR(DT_NODELABEL(test_stra_unquoted_f0))[1], in ZTEST()
3560 zassert_within(STRING_UNQUOTED_BY_IDX_VAR(DT_NODELABEL(test_stra_unquoted_f1))[1], in ZTEST()
3569 zassert_within(STRING_UNQUOTED_BY_IDX_VAR(DT_NODELABEL(test_stra_unquoted_t))[1], in ZTEST()
3597 zassert_str_equal(DT_PROP_BY_IDX(DT_NODELABEL(test_stra_escape), val, 1), in ZTEST()
3608 zassert_true(DT_SAME_NODE(DT_RESET_CTLR_BY_IDX(TEST_TEMP, 1), in ZTEST()
3620 zassert_equal(DT_RESET_CELL_BY_IDX(TEST_TEMP, 1, id), 20, ""); in ZTEST()
3630 /* reg-width on reset */ in ZTEST()
3631 zassert_equal(DT_PROP_BY_PHANDLE_IDX(TEST_TEMP, resets, 1, reg_width), 4, ""); in ZTEST()
3634 zassert_equal(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT), 1, ""); in ZTEST()
3637 zassert_true(DT_SAME_NODE(DT_INST_RESET_CTLR_BY_IDX(0, 1), in ZTEST()
3649 zassert_equal(DT_INST_RESET_CELL_BY_IDX(0, 1, id), 20, ""); in ZTEST()
3659 /* reg-width on reset */ in ZTEST()
3660 zassert_equal(DT_INST_PROP_BY_PHANDLE_IDX(0, resets, 1, reg_width), 4, ""); in ZTEST()
3664 zassert_equal(DT_RESET_ID_BY_IDX(TEST_TEMP, 1), 20, ""); in ZTEST()
3671 zassert_equal(DT_INST_RESET_ID_BY_IDX(0, 1), 20, ""); in ZTEST()
3683 zassert_true(DT_SAME_NODE(DT_IRQ_INTC_BY_IDX(TEST_IRQ_EXT, 1), TEST_GPIO_4), ""); in ZTEST()
3694 zassert_true(DT_SAME_NODE(DT_INST_IRQ_INTC_BY_IDX(0, 1), TEST_GPIO_4), ""); in ZTEST()