Home
last modified time | relevance | path

Searched refs:sw0_gpio (Results 1 – 4 of 4) sorted by relevance

/Zephyr-latest/samples/boards/ti/cc13x2_cc26x2/system_off/src/
Dmain.c17 static const struct gpio_dt_spec sw0_gpio = GPIO_DT_SPEC_GET(DT_ALIAS(sw0), gpios); variable
35 if (!gpio_is_ready_dt(&sw0_gpio)) { in main()
36 printk("%s: device not ready.\n", sw0_gpio.port->name); in main()
40 gpio_pin_configure_dt(&sw0_gpio, GPIO_INPUT); in main()
43 config = IOCPortConfigureGet(sw0_gpio.pin); in main()
45 IOCPortConfigureSet(sw0_gpio.pin, IOC_PORT_GPIO, config); in main()
/Zephyr-latest/samples/boards/bbc/microbit/sound/src/
Dmain.c28 static const struct gpio_dt_spec sw0_gpio = GPIO_DT_SPEC_GET(DT_ALIAS(sw0), gpios); variable
62 if (pins & BIT(sw0_gpio.pin)) { in button_pressed()
94 if (!gpio_is_ready_dt(&sw0_gpio)) { in main()
95 printk("%s: device not ready.\n", sw0_gpio.port->name); in main()
101 gpio_pin_configure_dt(&sw0_gpio, GPIO_INPUT); in main()
104 gpio_pin_interrupt_configure_dt(&sw0_gpio, GPIO_INT_EDGE_TO_ACTIVE); in main()
108 BIT(sw0_gpio.pin) | BIT(sw1_gpio.pin)); in main()
114 gpio_add_callback(sw0_gpio.port, &button_cb_data); in main()
/Zephyr-latest/samples/boards/bbc/microbit/pong/src/
Dmain.c120 static const struct gpio_dt_spec sw0_gpio = GPIO_DT_SPEC_GET(DT_ALIAS(sw0), gpios); variable
407 if (pins & BIT(sw0_gpio.pin)) { in button_pressed()
440 if (pins & BIT(sw0_gpio.pin)) { in button_pressed()
503 if (!gpio_is_ready_dt(&sw0_gpio)) { in configure_buttons()
504 printk("%s: device not ready.\n", sw0_gpio.port->name); in configure_buttons()
508 gpio_pin_configure_dt(&sw0_gpio, GPIO_INPUT); in configure_buttons()
511 gpio_pin_interrupt_configure_dt(&sw0_gpio, GPIO_INT_EDGE_TO_ACTIVE); in configure_buttons()
515 BIT(sw0_gpio.pin) | BIT(sw1_gpio.pin)); in configure_buttons()
517 gpio_add_callback(sw0_gpio.port, &button_cb_data); in configure_buttons()
/Zephyr-latest/samples/boards/phytec/reel_board/mesh_badge/src/
Dreel_board.c70 static const struct gpio_dt_spec sw0_gpio = GPIO_DT_SPEC_GET(DT_ALIAS(sw0), gpios); variable
443 return gpio_pin_get_dt(&sw0_gpio) > 0; in button_is_pressed()
474 if (pins & BIT(sw0_gpio.pin)) { in button_interrupt()
507 if (!gpio_is_ready_dt(&sw0_gpio)) { in configure_button()
508 printk("%s: device not ready.\n", sw0_gpio.port->name); in configure_button()
512 gpio_pin_configure_dt(&sw0_gpio, GPIO_INPUT); in configure_button()
514 gpio_pin_interrupt_configure_dt(&sw0_gpio, GPIO_INT_EDGE_BOTH); in configure_button()
516 gpio_init_callback(&button_cb, button_interrupt, BIT(sw0_gpio.pin)); in configure_button()
518 gpio_add_callback(sw0_gpio.port, &button_cb); in configure_button()