Home
last modified time | relevance | path

Searched +full:device +full:- +full:state +full:- +full:gpios (Results 1 – 25 of 107) sorted by relevance

12345

/Zephyr-latest/dts/bindings/base/
Dpower.yaml2 # SPDX-License-Identifier: Apache-2.0
7 supply-gpios:
8 type: phandle-array
10 GPIO specifier that controls power to the device.
12 This property should be provided when the device has a dedicated
13 switch that controls power to the device. The supply state is
14 entirely the responsibility of the device driver.
16 Contrast with vin-supply.
18 vin-supply:
21 Reference to the regulator that controls power to the device.
[all …]
/Zephyr-latest/dts/bindings/input/
Dgpio-qdec.yaml2 # SPDX-License-Identifier: Apache-2.0
5 GPIO based QDEC input device
7 Implement an input device generating relative axis event reports for a rotary
8 encoder connected to two GPIOs. The driver is normally idling until it sees a
15 #include <zephyr/dt-bindings/input/input-event-codes.h>
18 compatible = "gpio-qdec";
19 gpios = <&gpio0 14 (GPIO_PULL_UP | GPIO_ACTIVE_HIGH)>,
21 steps-per-period = <4>;
23 sample-time-us = <2000>;
24 idle-timeout-ms = <200>;
[all …]
Dgpio-kbd-matrix.yaml2 # SPDX-License-Identifier: Apache-2.0
5 GPIO based keyboard matrix input device
7 Implement an input device for a GPIO based keyboard matrix.
11 kbd-matrix {
12 compatible = "gpio-kbd-matrix";
13 row-gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>,
15 col-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>,
18 no-ghostkey-check;
21 compatible: "gpio-kbd-matrix"
24 - name: kbd-matrix-common.yaml
[all …]
/Zephyr-latest/dts/bindings/can/
Dti,tcan4x5x.yaml2 # SPDX-License-Identifier: Apache-2.0
12 spi-max-frequency = <18000000>;
13 clock-frequency = <40000000>;
14 device-state-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
15 device-wake-gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
16 reset-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
17 int-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
18 bosch,mram-cfg = <0x0 15 15 5 5 0 10 10>;
21 can-transceiver {
22 max-bitrate = <8000000>;
[all …]
/Zephyr-latest/drivers/regulator/
Dregulator_gpio.c3 * SPDX-License-Identifier: Apache-2.0
19 const struct gpio_dt_spec *gpios; member
33 static int regulator_gpio_apply_state(const struct device *dev, uint32_t state) in regulator_gpio_apply_state() argument
35 const struct regulator_gpio_config *cfg = dev->config; in regulator_gpio_apply_state()
37 for (unsigned int gpio_idx = 0; gpio_idx < cfg->num_gpios; gpio_idx++) { in regulator_gpio_apply_state()
39 int new_state_of_gpio = (state >> gpio_idx) & 0x1; in regulator_gpio_apply_state()
41 ret = gpio_pin_get_dt(&cfg->gpios[gpio_idx]); in regulator_gpio_apply_state()
43 LOG_ERR("%s: can't get pin state", dev->name); in regulator_gpio_apply_state()
48 ret = gpio_pin_set_dt(&cfg->gpios[gpio_idx], new_state_of_gpio); in regulator_gpio_apply_state()
50 LOG_ERR("%s: can't set pin state", dev->name); in regulator_gpio_apply_state()
[all …]
/Zephyr-latest/dts/bindings/lora/
Dsemtech,sx126x-base.yaml3 # SPDX-License-Identifier: Apache-2.0
5 include: spi-device.yaml
8 reset-gpios:
9 type: phandle-array
13 This signal is open-drain, active-low as interpreted by the
16 busy-gpios:
17 type: phandle-array
21 antenna-enable-gpios:
22 type: phandle-array
26 tx-enable-gpios:
[all …]
/Zephyr-latest/boards/shields/tcan4550evm/
Dtcan4550evm.overlay4 * SPDX-License-Identifier: Apache-2.0
7 #include <zephyr/dt-bindings/gpio/gpio.h>
17 cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */
22 /* reduced spi-max-frequency to accommodate flywire connections */
23 spi-max-frequency = <2000000>;
25 clock-frequency = <40000000>;
26 device-state-gpios = <&arduino_header 12 GPIO_ACTIVE_HIGH>; /* D6 */
27 device-wake-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>; /* D7 */
28 reset-gpios = <&arduino_header 14 GPIO_ACTIVE_HIGH>; /* D8 */
29 int-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
[all …]
/Zephyr-latest/dts/bindings/gpio/
Dti,tca9538.yaml3 # SPDX-License-Identifier: Apache-2.0
9 include: [i2c-device.yaml, gpio-controller.yaml]
12 "#gpio-cells":
19 Number of GPIOs available on port expander.
21 nint-gpios:
22 type: phandle-array
24 Connection for the NINT signal. This signal is active-low when
27 input-latch:
30 Input latch register bit is 0 by default and the input pin state
32 pin state is latched.
[all …]
Dnxp,pcal64xxa-base.yaml3 # SPDX-License-Identifier: Apache-2.0
5 include: [i2c-device.yaml, gpio-controller.yaml]
8 int-gpios:
9 type: phandle-array
11 GPIO connected to the controller INT pin. This pin is active-low.
13 reset-gpios:
14 type: phandle-array
16 GPIO connected to the controller RESET pin. This pin is active-low.
18 no-auto-reset:
22 of for instance an external state retention of the port expander. If
[all …]
Dzephyr,gpio-emul-sdl.yaml2 # SPDX-License-Identifier: Apache-2.0
7 Simulate GPIO state/interrupts using SDL keyboard events. This node has
8 to be a child of a `zephyr,gpio-emul` compatible.
12 and thus do not match Zephyr code values as described in input-event-codes.h.
17 - Scancode 30: "Keyboard 1 and !", mapped to gpio0 0
18 - Scancode 31: "Keyboard 2 and @", mapped to gpio0 1
19 - Scancode 32: "Keyboard 3 and \#", mapped to gpio0 2
23 INPUT_KEY_1, INPUT_KEY_2 and INPUT_KEY_3 in input-event-codes.h.
25 /* gpio0 has to be a zephyr,gpio-emul device */
30 compatible = "zephyr,gpio-emul-sdl";
[all …]
/Zephyr-latest/dts/bindings/ethernet/
Drealtek,rtl8211f.yaml1 # Copyright 2023-2024 NXP
2 # SPDX-License-Identifier: Apache-2.0
4 description: Realtek RTL8211F Ethernet PHY device
8 include: ethernet-phy.yaml
11 reset-gpios:
12 type: phandle-array
14 int-gpios:
15 type: phandle-array
16 description: GPIO for interrupt signal indicating PHY state change.
Dmicrochip,ksz8081.yaml2 # SPDX-License-Identifier: Apache-2.0
4 description: Microchip KSZ8081 Ethernet PHY device
8 include: ethernet-phy.yaml
11 reset-gpios:
12 type: phandle-array
14 int-gpios:
15 type: phandle-array
16 description: GPIO for interrupt signal indicating PHY state change.
17 microchip,interface-type:
22 - "mii"
[all …]
Dti,dp83825.yaml1 # Copyright 2023-2024 NXP
2 # SPDX-License-Identifier: Apache-2.0
4 description: TI DP83825 Ethernet PHY device
8 include: ethernet-phy.yaml
11 reset-gpios:
12 type: phandle-array
14 int-gpios:
15 type: phandle-array
16 description: GPIO for interrupt signal indicating PHY state change.
17 ti,interface-type:
[all …]
/Zephyr-latest/samples/subsys/modbus/rtu_server/src/
Dmain.c5 * SPDX-License-Identifier: Apache-2.0
21 GPIO_DT_SPEC_GET(DT_ALIAS(led0), gpios),
22 GPIO_DT_SPEC_GET(DT_ALIAS(led1), gpios),
23 GPIO_DT_SPEC_GET(DT_ALIAS(led2), gpios),
26 static int coil_rd(uint16_t addr, bool *state) in coil_rd() argument
29 return -ENOTSUP; in coil_rd()
33 *state = true; in coil_rd()
35 *state = false; in coil_rd()
38 LOG_INF("Coil read, addr %u, %d", addr, (int)*state); in coil_rd()
43 static int coil_wr(uint16_t addr, bool state) in coil_wr() argument
[all …]
/Zephyr-latest/doc/services/input/
Dgpio-kbd.rst1 .. _gpio-kbd:
6 The :dtcompatible:`gpio-kbd-matrix` driver supports a large variety of keyboard
12 row GPIOs (inputs) and selects on the columns GPIOs (output).
14 Base use case, no isolation diodes, interrupt capable GPIOs
21 .. figure:: no-diodes.svg
28 row GPIOs at the same time.
30 .. code-block:: devicetree
32 kbd-matrix {
33 compatible = "gpio-kbd-matrix";
34 row-gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>,
[all …]
/Zephyr-latest/tests/drivers/gpio/gpio_nrf/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
9 #include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
12 #if DT_NODE_HAS_PROP(DT_ALIAS(led0), gpios)
13 #define TEST_NODE DT_GPIO_CTLR(DT_ALIAS(led0), gpios)
14 #define TEST_PIN DT_GPIO_PIN(DT_ALIAS(led0), gpios)
25 const struct device *port; in ZTEST()
33 "Failed to configure the pin as an P-P output with drive: NRF_GPIO_DRIVE_S0H1, err=%d", in ZTEST()
39 "Failed to configure the pin as an P-P output with drive: NRF_GPIO_DRIVE_H0S1, err=%d", in ZTEST()
45 "Failed to configure the pin as an P-P output with drive: NRF_GPIO_DRIVE_H0H1, err=%d", in ZTEST()
51 "Failed to configure the pin as an O-D output with drive: NRF_GPIO_DRIVE_H0S1, err=%d", in ZTEST()
[all …]
/Zephyr-latest/boards/nordic/nrf9160dk/
Dnrf52840_reset.c4 * SPDX-License-Identifier: Apache-2.0
9 #include <zephyr/device.h>
17 #define RESET_GPIO_CTRL DT_GPIO_CTLR(RESET_NODE, gpios)
18 #define RESET_GPIO_PIN DT_GPIO_PIN(RESET_NODE, gpios)
19 #define RESET_GPIO_FLAGS DT_GPIO_FLAGS(RESET_NODE, gpios)
21 int bt_hci_transport_setup(const struct device *h4) in bt_hci_transport_setup()
25 const struct device *const port = DEVICE_DT_GET(RESET_GPIO_CTRL); in bt_hci_transport_setup()
28 return -EIO; in bt_hci_transport_setup()
31 /* Configure pin as output and initialize it to inactive state. */ in bt_hci_transport_setup()
40 * the H4 device is setup and ready to receive. in bt_hci_transport_setup()
/Zephyr-latest/dts/bindings/test/
Dvnd,busy-sim.yaml2 # SPDX-License-Identifier: Apache-2.0
7 compatible: "vnd,busy-sim"
14 Counter device used for generating intervals.
16 active-gpios:
17 type: phandle-array
19 Debug pin is set to active state when cpu load is active.
/Zephyr-latest/dts/bindings/auxdisplay/
Dhit,hd44780.yaml4 # SPDX-License-Identifier: Apache-2.0
11 include: [auxdisplay-device.yaml]
17 description: Operating mode of display, 8-bit or 4 for 4-bit mode
19 - 4
20 - 8
22 register-select-gpios:
23 type: phandle-array
27 read-write-gpios:
28 type: phandle-array
31 enable-gpios:
[all …]
/Zephyr-latest/dts/bindings/watchdog/
Dnxp,fs26-wdog.yaml2 # SPDX-License-Identifier: Apache-2.0
12 state. This driver covers only the watchdog functionality of FS26. The rest
15 The FS26 uses a 32-bit SPI interface. The MCU is the primary driving MOSI and
24 compatible = "nxp,fs26-wdog";
26 spi-max-frequency = <DT_FREQ_M(5)>;
28 int-gpios = <&gpioa_h 3 GPIO_ACTIVE_LOW>;
37 indicated through int-gpios property. It is also required to configure the
40 compatible: "nxp,fs26-wdog"
42 include: spi-device.yaml
49 - simple
[all …]
/Zephyr-latest/samples/boards/nordic/mesh/onoff-app/src/
Dmain.c1 /* main.c - Application main entry point */
6 * SPDX-License-Identifier: Apache-2.0
10 * This application is specific to the Nordic nRF52840-PDK board.
14 * Prior to provisioning, a button inverts the state of the
17 * The unprovisioned beacon uses the device address set by Nordic
29 * also publish its status on a state change.
32 * the LED's state has already been changed locally by the button client.
42 #include <zephyr/device.h>
94 * it is re-transmitted several times. This occurs
157 { .led_device = GPIO_DT_SPEC_GET(DT_ALIAS(led0), gpios), },
[all …]
/Zephyr-latest/dts/bindings/spi/
Dnordic,nrf-spi-common.yaml2 # SPDX-License-Identifier: Apache-2.0
6 include: [spi-controller.yaml, pinctrl-device.yaml, nordic-clockpin.yaml]
15 pinctrl-0:
18 pinctrl-names:
21 max-frequency:
28 overrun-character:
34 easydma-maxcnt-bits:
41 wake-gpios:
42 type: phandle-array
44 Optional bi-directional line that allows SPI master to indicate to SPI
[all …]
/Zephyr-latest/doc/hardware/peripherals/sensor/
Ddevice_tree.rst1 Device Tree
4 In the context of sensors device tree provides the initial hardware configuration
5 for sensors on a per device level. Each device must specify a device tree binding
8 then be used in a boards devicetree to configure a sensor to its initial state.
10 .. code-block:: dts
12 #include <zephyr/dt-bindings/icm42688.h>
20 … int-gpios = <&pioc 6 GPIO_ACTIVE_HIGH>; /* SoC specific pin to select for interrupt line */
21 spi-max-frequency = <DT_FREQ_M(24)>; /* Maximum SPI bus frequency */
22 accel-pwr-mode = <ICM42688_ACCEL_LN>; /* Low noise mode */
23 accel-odr = <ICM42688_ACCEL_ODR_2000>; /* 2000 Hz sampling */
[all …]
/Zephyr-latest/dts/bindings/power/
Datmel,sam-supc.yaml2 # SPDX-License-Identifier: Apache-2.0
5 Atmel SAM SUPC (Supply-Controller) controller
8 monitoring of the device. It have a special feature that it can wake-up the
9 device from a low-power state using special peripherals as wake-up sources.
11 The dedicated peripherals that can wake-up the core supply domain are: RTC,
12 RTT, Supply Monitor and GPIOs. In the first three peripherals it is necessary
13 inform the wakeup-source-id property on their respective nodes.
17 wakeup-source-id = <&supc SUPC_WAKEUP_SOURCE_RTC>;
21 The special peripheral will wake-up the device only when the standard property
22 wakeup-source is defined, e.g.:
[all …]
/Zephyr-latest/subsys/bluetooth/controller/coex/
Dreadme.rst2 Bluetooth co-existence drivers
5 Co-existence Ticker
8 …cker.c` is designed to utilize co-existence with another transmitter. Chips such as nordic nRF9160…
10 Nordic connect SDK provides detailed description of the 1-wire and 3-wire co-existence interface fo…
12 …the 1-wire interface, the coexistence ticker utilizes a single pin called BLE_GRANT, which active …
14 .. code-block:: DTS
17 compatible = "gpio-radio-coex";
18 grant-gpios = <&gpio0 0 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
19 grant-delay-us = <150>;
22-active (such as 1 for the nRF9160). state the implementation starts a ticker job, which in predef…

12345