Home
last modified time | relevance | path

Searched +full:negative +full:- +full:port +full:- +full:input (Results 1 – 25 of 43) sorted by relevance

12

/Zephyr-latest/tests/drivers/build_all/comparator/mcux_acmp/
Dmke15z7_mux_dac.dts4 * SPDX-License-Identifier: Apache-2.0
10 pinctrl-0 = <&cmp0_default>;
11 pinctrl-names = "default";
14 positive-mux-input = "IN0";
15 positive-port-input = "MUX";
16 negative-mux-input = "IN0";
17 negative-port-input = "DAC";
19 dac-vref-source = "VIN1";
20 dac-value = <128>;
21 dac-enable;
Dmimxrt1176_mux_dac.dts4 * SPDX-License-Identifier: Apache-2.0
11 drive-strength = "high";
12 bias-pull-up;
13 slew-rate = "fast";
20 pinctrl-0 = <&acmp1_default>;
21 pinctrl-names = "default";
23 positive-mux-input = "IN2";
24 positive-port-input = "MUX";
25 negative-mux-input = "IN2";
26 negative-port-input = "DAC";
[all …]
/Zephyr-latest/tests/drivers/comparator/gpio_loopback/boards/
Dfrdm_ke15z.overlay4 * SPDX-License-Identifier: Apache-2.0
7 #include <nxp/kinetis/MKE17Z256VLL7-pinctrl.h>
8 #include <zephyr/dt-bindings/gpio/gpio.h>
16 test-comp = &cmp0;
20 test-gpios = <&gpioa 1 GPIO_ACTIVE_HIGH>;
32 drive-strength = "high";
38 pinctrl-0 = <&cmp0_default>;
39 pinctrl-names = "default";
42 positive-mux-input = "IN0";
43 positive-port-input = "MUX";
[all …]
/Zephyr-latest/dts/bindings/comparator/
Dsilabs,acmp.yaml2 # SPDX-License-Identifier: Apache-2.0
8 #include <zephyr/dt-bindings/comparator/silabs-acmp.h>
13 input-positive = <ACMP_INPUT_VSENSE01DIV4>;
14 input-negative = <ACMP_INPUT_VREFDIVAVDD>;
17 Note that there are bindings to retrieve the values for `input-positive` and
18 `input-negative` properties. See the included bindings in the example above.
24 #include <zephyr/dt-bindings/comparator/silabs-acmp.h>
30 hysteresis-mode = "disabled";
31 accuracy-mode = "low";
32 input-range = "full";
[all …]
Dnxp,kinetis-acmp.yaml3 # SPDX-License-Identifier: Apache-2.0
11 compatible = "nxp,kinetis-acmp";
20 positive and negative inputs, and routing them using pinctrl:
32 pinctrl-0 = <&acmp0_default>;
33 pinctrl-names = "default";
35 positive-mux-input = "IN0";
36 negative-mux-input = "IN1";
39 compatible: "nxp,kinetis-acmp"
42 - base.yaml
43 - pinctrl-device.yaml
[all …]
/Zephyr-latest/include/zephyr/drivers/sensor/
Dmcux_acmp.h5 * SPDX-License-Identifier: Apache-2.0
70 * Analog Comparator Digital-to-Analog Converter voltage
74 /** Analog Comparator Digital-to-Analog Converter value. */
76 /** Analog Comparator positive port input. */
78 /** Analog Comparator positive mux input. */
80 /** Analog Comparator negative port input. */
82 /** Analog Comparator negative mux input. */
87 /** Analog Comparator Negative Channel Discrete Mode Enable. */
/Zephyr-latest/samples/sensor/mcux_lpcmp/
DREADME.rst1 .. zephyr:code-sample:: mcux_lpcmp
2 :name: NXP MCUX Low-power Analog Comparator (LPCMP)
3 :relevant-api: sensor_interface
5 Get analog comparator data from an NXP MCUX Low-power Analog Comparator (LPCMP).
10 This sample show how to use the NXP MCUX Low-power Analog Comparator (LPCMP) driver.
12 In this application, the negative input port of the LPCMP is set to 7 which
13 means the input voltage comes from the LPCMP internal DAC, the reference
18 The positive input port is set to 0, the user needs to check the reference
19 manual and board schematic to confirm which specific port is used and can
20 connect an external voltage to that port and change the input voltage to
[all …]
/Zephyr-latest/drivers/gpio/
Dgpio_pcf857x.c4 * 2023 Amrith Venkat Kesavamoorthi <amrith@mr-beam.org>
7 * SPDX-License-Identifier: Apache-2.0
9 * @see https://www.nxp.com/docs/en/data-sheet/PCF8575.pdf
10 * @see https://www.nxp.com/docs/en/data-sheet/PCF8574_PCF8574A.pdf
26 uint16_t configured_as_outputs; /* 0 for input, 1 for output */
56 * @param value Pointer to the input value. It contains the received Bytes(receives 2 Bytes for P0
60 * @retval Negative value for error code.
64 const struct pcf857x_drv_cfg *drv_cfg = dev->config; in pcf857x_process_input()
65 struct pcf857x_drv_data *drv_data = dev->data; in pcf857x_process_input()
69 rc = i2c_read_dt(&drv_cfg->i2c, rx_buf, drv_data->num_bytes); in pcf857x_process_input()
[all …]
Dgpio_tca6424a.c4 * SPDX-License-Identifier: Apache-2.0
24 uint32_t input; member
68 * @retval Negative value for error code.
72 const struct tca6424a_drv_cfg *const config = dev->config; in read_port_regs()
76 ret = i2c_burst_read_dt(&config->i2c_spec, reg, (uint8_t *)&port_data, 3); in read_port_regs()
78 LOG_ERR("%s: error reading register 0x%X (%d)", dev->name, in read_port_regs()
87 dev->name, reg, (*buf & 0xFF), (reg + 1), ((*buf >> 8) & 0xFF), in read_port_regs()
103 * @retval Negative value for error code.
107 const struct tca6424a_drv_cfg *const config = dev->config; in write_port_regs()
113 dev->name, reg, (value & 0xFF), (reg + 1), ((value >> 8) & 0xFF), in write_port_regs()
[all …]
Dgpio_pca6416.c2 * Copyright 2024-2025 NXP
4 * SPDX-License-Identifier: Apache-2.0
42 uint16_t input; member
75 * @brief Gets the state of input pins of the PCA6416 I/O Port and
81 * @retval Negative value for error code.
85 const struct pca6416_config *cfg = dev->config; in update_input()
86 struct pca6416_drv_data *drv_data = dev->data; in update_input()
90 rc = i2c_burst_read_dt(&cfg->i2c, PCA6416_INPUT_PORT0, (uint8_t *)&input_states, 2); in update_input()
92 drv_data->pin_state.input = input_states; in update_input()
98 * @brief Handles interrupt triggered by the interrupt pin of PCA6416 I/O Port.
[all …]
Dgpio_pca953x.c9 * SPDX-License-Identifier: Apache-2.0
42 uint8_t input; member
77 * @brief Gets the state of input pins of the PCA953X I/O Port and
83 * @retval Negative value for error code.
87 const struct pca953x_config *cfg = dev->config; in update_input()
88 struct pca953x_drv_data *drv_data = dev->data; in update_input()
92 rc = i2c_reg_read_byte_dt(&cfg->i2c, PCA953X_INPUT_PORT, &input_states); in update_input()
95 drv_data->pin_state.input = input_states; in update_input()
101 * @brief Handles interrupt triggered by the interrupt pin of PCA953X I/O Port.
104 * time a gpio configured as an input changes state. The gpio input states are
[all …]
Dgpio_mfxstm32l152.c4 * SPDX-License-Identifier: Apache-2.0
10 * @file Driver for ST MFXstm32l152 I2C-based GPIO driver.
43 #define REG_GPIO_PUPD 0x68 /* GPIO pull-up/pull-down control */
90 * @retval Negative value for error code.
94 const struct mfxstm32l152_drv_cfg *const config = dev->config; in read_reg()
98 ret = i2c_burst_read_dt(&config->i2c_spec, reg, (uint8_t *)&value, 1); in read_reg()
100 LOG_ERR("%s: error reading register 0x%X (%d)", dev->name, reg, ret); in read_reg()
105 LOG_DBG("%s: Read: REG[0x%X] = 0x%X", dev->name, reg, value); in read_reg()
118 * @retval Negative value for error code.
122 const struct mfxstm32l152_drv_cfg *const config = dev->config; in write_reg()
[all …]
/Zephyr-latest/samples/sensor/mcux_acmp/src/
Dmain.c4 * SPDX-License-Identifier: Apache-2.0
43 /* Positive input port set to MUX */
46 /* Positive input channel */
50 /* Negative input port set to DAC */
53 /* Negative input channel */
83 printf("ACMP input above threshold\n"); in acmp_input_handler()
85 printf("ACMP input below threshold\n"); in acmp_input_handler()
94 acmp_input_handler((int16_t)trigger->type == in acmp_trigger_handler()
137 printf("Adjust ACMP input voltage by turning the potentiometer\n"); in main()
/Zephyr-latest/include/zephyr/audio/
Ddmic.h7 * SPDX-License-Identifier: Apache-2.0
76 * PDM Input/Output signal configuration
103 /** Collection of clock skew values for each PDM port */
137 * Each channel is described as a 4-bit number, the least significant
141 * - bits 0-3 are for channel 0, bit 0 indicates LEFT or RIGHT
142 * - bits 4-7 are for channel 1, bit 4 indicates LEFT or RIGHT
176 * Input configuration structure for the DMIC configuration API
202 * the bit position corresponding to the input logical channel value
208 * @return Bit-map containing the PDM and L/R channel information
221 * the channel map and the logical channel provided as input
[all …]
/Zephyr-latest/include/zephyr/drivers/
Dgpio.h2 * Copyright (c) 2019-2020 Nordic Semiconductor ASA
5 * Copyright (c) 2015-2016 Intel Corporation.
7 * SPDX-License-Identifier: Apache-2.0
27 #include <zephyr/dt-bindings/gpio/gpio.h>
43 * @name GPIO input/output configuration flags
47 /** Enables pin as input. */
53 /** Disables pin for both input and output. */
86 * The `GPIO_INT_*` flags are used to specify how input GPIO pins will trigger
124 /* Trigger detection when input state is (or transitions to) physical low or
132 /* Trigger detection on input state is (or transitions to) physical high or
[all …]
Di2c.h10 * SPDX-License-Identifier: Apache-2.0
65 /** Use 10-bit addressing. DEPRECATED - Use I2C_MSG_ADDR_10_BITS instead. */
160 * that follows a write, or vice-versa. Some drivers will merge
165 /** Use 10-bit addressing for this message.
199 * @param result Result code of the transfer request. 0 is success, -errno for failure.
271 /** Target device responds to 10-bit addressing. */
287 * @return 0 if the write is accepted, or a negative error code.
307 * @return 0 if more data can be accepted, or a negative error
330 * @return 0 if more data can be requested, or a negative error code.
352 * @return 0 if data has been provided, or a negative error code.
[all …]
/Zephyr-latest/drivers/sensor/ti/fdc2x1x/
Dfdc2x1x.c1 /* fdc2x1x.c - Driver for the Texas Instruments FDC2X1X */
6 * SPDX-License-Identifier: Apache-2.0
26 * @param dev - The device structure.
27 * @param ch - Channel to convert the data from.
28 * @param freq - Calculated frequency value .
33 struct fdc2x1x_data *data = dev->data; in fdc2x1x_raw_to_freq()
34 const struct fdc2x1x_config *cfg = dev->config; in fdc2x1x_raw_to_freq()
36 if (data->fdc221x) { in fdc2x1x_raw_to_freq()
37 *freq = (cfg->ch_cfg->fin_sel * (cfg->fref / 1000.0) * in fdc2x1x_raw_to_freq()
38 data->channel_buf[ch]) / pow(2, 28); in fdc2x1x_raw_to_freq()
[all …]
/Zephyr-latest/drivers/adc/
Dadc_ads1x1x.c5 * SPDX-License-Identifier: Apache-2.0
85 /* +/-6.144V range = Gain 1/3 */
87 /* +/-4.096V range = Gain 1/2 */
89 /* +/-2.048V range = Gain 1 (default) */
91 /* +/-1.024V range = Gain 2 */
93 /* +/-0.512V range = Gain 4 */
95 /* +/-0.256V range = Gain 8 */
119 /* Non-latching comparator (default) */
169 const struct ads1x1x_config *config = dev->config; in ads1x1x_setup_rdy_pin()
171 ? GPIO_INPUT | config->alert_rdy.dt_flags in ads1x1x_setup_rdy_pin()
[all …]
Dadc_max1125x.c4 * SPDX-License-Identifier: Apache-2.0
241 k_sem_give(&data->data_ready_signal); in max1125x_data_ready_handler()
248 const struct max1125x_config *config = dev->config; in max1125x_read_reg()
271 ret = spi_transceive_dt(&config->bus, &tx, &rx); in max1125x_read_reg()
286 const struct max1125x_config *config = dev->config; in max1125x_write_reg()
293 ret = spi_write_dt(&config->bus, &tx); in max1125x_write_reg()
305 const struct max1125x_config *config = dev->config; in max1125x_send_command()
310 ret = spi_write_dt(&config->bus, &tx); in max1125x_send_command()
321 const struct max1125x_data *data = dev->data; in max1125x_start_conversion()
323 return max1125x_send_command(dev, MAX1125X_CMD_SEQUENCER, data->rate); in max1125x_start_conversion()
[all …]
Dadc_ads1x4s0x.c4 * SPDX-License-Identifier: Apache-2.0
12 #include <zephyr/dt-bindings/adc/ads1x4s0x_adc.h>
95 FIELD_GET(GENMASK(pos + length - 1, pos), value)
97 target &= ~GENMASK(pos + length - 1, pos); \
98 target |= FIELD_PREP(GENMASK(pos + length - 1, pos), value)
366 * - AIN0 as positive input
367 * - AIN1 as negative input
373 * - disable reference monitor
374 * - enable positive reference buffer
375 * - disable negative reference buffer
[all …]
/Zephyr-latest/drivers/input/
Dinput_xpt2046.c4 * SPDX-License-Identifier: Apache-2.0
10 #include <zephyr/input/input.h>
64 /* Read all Z1, X, Y, Z2 channels using 16 Clocks-per-Conversion mode.
65 * See the manual https://www.waveshare.com/w/upload/9/98/XPT2046-EN.pdf for details.
66 * Each follow-up command interleaves with previous conversion.
79 const struct xpt2046_config *config = data->dev->config; in xpt2046_isr_handler()
81 gpio_remove_callback(config->int_gpio.port, &data->int_gpio_cb); in xpt2046_isr_handler()
82 k_work_submit(&data->work); in xpt2046_isr_handler()
95 uint8_t *buf = rx->buffers->buf; in xpt2046_read_and_cumulate()
97 meas->z += CONVERT_U16(buf, 1) + 4096 - CONVERT_U16(buf, 3); in xpt2046_read_and_cumulate()
[all …]
Dinput_gpio_qdec.c4 * SPDX-License-Identifier: Apache-2.0
14 #include <zephyr/input/input.h>
58 /* Negative transitions */
66 const struct gpio_qdec_config *cfg = dev->config; in gpio_qdec_irq_setup()
71 const struct gpio_dt_spec *gpio = &cfg->ab_gpio[i]; in gpio_qdec_irq_setup()
83 const struct gpio_qdec_config *cfg = dev->config; in gpio_qdec_idle_polling_mode()
85 if (cfg->idle_poll_time_us > 0) { in gpio_qdec_idle_polling_mode()
94 const struct gpio_qdec_config *cfg = dev->config; in gpio_qdec_poll_mode()
95 struct gpio_qdec_data *data = dev->data; in gpio_qdec_poll_mode()
101 k_timer_start(&data->sample_timer, K_NO_WAIT, in gpio_qdec_poll_mode()
[all …]
/Zephyr-latest/drivers/serial/
Duart_native_tty.c14 * SPDX-License-Identifier: Apache-2.0
40 /* Serial port set from the command line. If NULL, it was not set. */
51 /* Instance-specific RX thread. */
74 * @return 0 on success, negative errno otherwise.
79 bottom_cfg->baudrate = cfg->baudrate; in native_tty_conv_to_bottom_cfg()
81 switch (cfg->parity) { in native_tty_conv_to_bottom_cfg()
83 bottom_cfg->parity = NTB_PARITY_NONE; in native_tty_conv_to_bottom_cfg()
86 bottom_cfg->parity = NTB_PARITY_ODD; in native_tty_conv_to_bottom_cfg()
89 bottom_cfg->parity = NTB_PARITY_EVEN; in native_tty_conv_to_bottom_cfg()
92 return -ENOTSUP; in native_tty_conv_to_bottom_cfg()
[all …]
/Zephyr-latest/include/zephyr/net/
Dcoap.h5 * SPDX-License-Identifier: Apache-2.0
47 COAP_OPTION_IF_MATCH = 1, /**< If-Match */
48 COAP_OPTION_URI_HOST = 3, /**< Uri-Host */
50 COAP_OPTION_IF_NONE_MATCH = 5, /**< If-None-Match */
52 COAP_OPTION_URI_PORT = 7, /**< Uri-Port */
53 COAP_OPTION_LOCATION_PATH = 8, /**< Location-Path */
54 COAP_OPTION_URI_PATH = 11, /**< Uri-Path */
55 COAP_OPTION_CONTENT_FORMAT = 12, /**< Content-Format */
56 COAP_OPTION_MAX_AGE = 14, /**< Max-Age */
57 COAP_OPTION_URI_QUERY = 15, /**< Uri-Query */
[all …]
/Zephyr-latest/drivers/i2c/
Di2c_npcx_controller.c4 * SPDX-License-Identifier: Apache-2.0
15 * support for a two-wire SMBus/I2C synchronous serial interface. The following
21 * +<----------------+<----------------------+
23 * +------+ +------------+ | +------- ----+ | +------- -------+ |
24 * +->| IDLE |-->| WAIT_START |--->| WRITE_FIFO |-+--->| WRITE_SUSPEND |--+
25 * | +------+ +------------+ +------------+ Yes +---------------+ |
27 * | +-----------+ |
28 * +--------------------------------------------| WAIT_STOP |<------------+
29 * STOP is completed +-----------+ Issue STOP
35 * +<-----------------+<---------------------+
[all …]

12