Lines Matching refs:index
237 #define XPT2046_INIT(index) \ argument
238 static const struct xpt2046_config xpt2046_config_##index = { \
240 index, SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8), 0), \
241 .int_gpio = GPIO_DT_SPEC_INST_GET(index, int_gpios), \
242 .min_x = DT_INST_PROP(index, min_x), \
243 .min_y = DT_INST_PROP(index, min_y), \
244 .max_x = DT_INST_PROP(index, max_x), \
245 .max_y = DT_INST_PROP(index, max_y), \
246 .threshold = DT_INST_PROP(index, z_threshold), \
247 .screen_size_x = DT_INST_PROP(index, touchscreen_size_x), \
248 .screen_size_y = DT_INST_PROP(index, touchscreen_size_y), \
249 .reads = DT_INST_PROP(index, reads), \
251 static struct xpt2046_data xpt2046_data_##index; \
252 DEVICE_DT_INST_DEFINE(index, xpt2046_init, NULL, &xpt2046_data_##index, \
253 &xpt2046_config_##index, POST_KERNEL, CONFIG_INPUT_INIT_PRIORITY, \
255 BUILD_ASSERT(DT_INST_PROP(index, min_x) < DT_INST_PROP(index, max_x), \
257 BUILD_ASSERT(DT_INST_PROP(index, min_y) < DT_INST_PROP(index, max_y), \
259 BUILD_ASSERT(DT_INST_PROP(index, z_threshold) > 10, "Too small threshold"); \
260 BUILD_ASSERT(DT_INST_PROP(index, touchscreen_size_x) > 1 && \
261 DT_INST_PROP(index, touchscreen_size_y) > 1, \
263 BUILD_ASSERT(DT_INST_PROP(index, reads) > 0, "Number of reads must be at least one");