/Zephyr-latest/tests/drivers/gpio/gpio_hogs/src/ |
D | main.c | 19 static void assert_gpio_hog_direction(const struct gpio_dt_spec *spec, bool output) in assert_gpio_hog_direction() argument 23 if (spec->port == NULL) { in assert_gpio_hog_direction() 28 err = gpio_pin_is_output(spec->port, spec->pin); in assert_gpio_hog_direction() 30 err = gpio_pin_is_input(spec->port, spec->pin); in assert_gpio_hog_direction() 38 spec->port->name, spec->pin, in assert_gpio_hog_direction() 57 static void assert_gpio_hog_config(const struct gpio_dt_spec *spec, gpio_flags_t expected) in assert_gpio_hog_config() argument 62 if (spec->port == NULL) { in assert_gpio_hog_config() 66 err = gpio_pin_get_config_dt(spec, &actual); in assert_gpio_hog_config() 72 spec->port->name, spec->pin, err); in assert_gpio_hog_config() 75 spec->port->name, spec->pin, actual, expected); in assert_gpio_hog_config()
|
/Zephyr-latest/drivers/w1/ |
D | w1_ds2482_84_common.h | 105 static inline int ds2482_84_write(const struct i2c_dt_spec *spec, uint8_t cmd, const uint8_t *data) in ds2482_84_write() argument 111 ret = i2c_write_dt(spec, buf, data ? 2 : 1); in ds2482_84_write() 119 static inline int ds2482_84_read(const struct i2c_dt_spec *spec, uint8_t rp, uint8_t *reg) in ds2482_84_read() argument 138 ret = ds2482_84_write(spec, CMD_SRP, &rp); in ds2482_84_read() 147 ret = i2c_read_dt(spec, reg, 1); in ds2482_84_read() 155 static inline int ds2482_84_reset_bus(const struct i2c_dt_spec *spec) in ds2482_84_reset_bus() argument 161 ret = ds2482_84_write(spec, CMD_1WRS, NULL); in ds2482_84_reset_bus() 167 ret = ds2482_84_read(spec, REG_NONE, ®); in ds2482_84_reset_bus() 176 static inline int ds2482_84_reset_device(const struct i2c_dt_spec *spec) in ds2482_84_reset_device() argument 182 ret = ds2482_84_write(spec, CMD_DRST, NULL); in ds2482_84_reset_device() [all …]
|
D | w1_zephyr_gpio.c | 97 const struct gpio_dt_spec spec; member 140 const struct gpio_dt_spec *spec = &cfg->spec; in w1_gpio_reset_bus() local 147 ret = gpio_pin_set_dt(spec, 0); in w1_gpio_reset_bus() 153 ret = gpio_pin_set_dt(spec, 1); in w1_gpio_reset_bus() 159 ret = gpio_pin_get_dt(spec); in w1_gpio_reset_bus() 176 const struct gpio_dt_spec *spec = &cfg->spec; in w1_gpio_read_bit() local 182 ret = gpio_pin_set_dt(spec, 0); in w1_gpio_read_bit() 188 ret = gpio_pin_set_dt(spec, 1); in w1_gpio_read_bit() 194 ret = gpio_pin_get_dt(spec); in w1_gpio_read_bit() 211 const struct gpio_dt_spec *spec = &cfg->spec; in w1_gpio_write_bit() local [all …]
|
/Zephyr-latest/scripts/logging/dictionary/dictionary_parser/ |
D | log_parser.py | 36 for spec in ['d', 'i', 'o', 'u', 'x', 'X']: 38 new_str = new_str.replace("%ll" + spec, "%l" + spec) 40 if spec in ['x', 'X']: 41 new_str = new_str.replace("%#ll" + spec, "%#l" + spec) 44 new_str = new_str.replace("%hh" + spec, "%h" + spec)
|
/Zephyr-latest/samples/basic/threads/src/ |
D | main.c | 40 struct gpio_dt_spec spec; member 45 .spec = GPIO_DT_SPEC_GET_OR(LED0_NODE, gpios, {0}), 50 .spec = GPIO_DT_SPEC_GET_OR(LED1_NODE, gpios, {0}), 56 const struct gpio_dt_spec *spec = &led->spec; in blink() local 60 if (!device_is_ready(spec->port)) { in blink() 61 printk("Error: %s device is not ready\n", spec->port->name); in blink() 65 ret = gpio_pin_configure_dt(spec, GPIO_OUTPUT); in blink() 68 ret, spec->pin, led->num); in blink() 73 gpio_pin_set(spec->port, spec->pin, cnt % 2); in blink()
|
/Zephyr-latest/include/zephyr/drivers/ |
D | reset.h | 55 * const struct reset_dt_spec spec = RESET_DT_SPEC_GET_BY_IDX(DT_NODELABEL(n), 0); 56 * // Initializes 'spec' to: 242 * reset_status(spec->dev, spec->id, status); 244 * @param spec Reset controller specification from devicetree 249 static inline int reset_status_dt(const struct reset_dt_spec *spec, uint8_t *status) in reset_status_dt() argument 251 return reset_status(spec->dev, spec->id, status); in reset_status_dt() 285 * reset_line_assert(spec->dev, spec->id); 287 * @param spec Reset controller specification from devicetree 291 static inline int reset_line_assert_dt(const struct reset_dt_spec *spec) in reset_line_assert_dt() argument 293 return reset_line_assert(spec->dev, spec->id); in reset_line_assert_dt() [all …]
|
D | i2c.h | 462 * @param spec I2C specification from devicetree 467 static inline bool i2c_is_ready_dt(const struct i2c_dt_spec *spec) in i2c_is_ready_dt() argument 470 return device_is_ready(spec->bus); in i2c_is_ready_dt() 874 * i2c_transfer_cb(spec->bus, msgs, num_msgs, spec->addr, cb, userdata); 876 * @param spec I2C specification from devicetree. 884 static inline int i2c_transfer_cb_dt(const struct i2c_dt_spec *spec, in i2c_transfer_cb_dt() argument 890 return i2c_transfer_cb(spec->bus, msgs, num_msgs, spec->addr, cb, userdata); in i2c_transfer_cb_dt() 941 * i2c_write_read_cb(spec->bus, msgs, num_msgs, 942 * spec->addr, write_buf, 945 * @param spec I2C specification from devicetree. [all …]
|
D | mbox.h | 114 * const struct mbox_dt_spec spec = MBOX_DT_SPEC_GET(DT_NODELABEL(n), tx); 235 * @param spec MBOX specification from devicetree 239 static inline bool mbox_is_ready_dt(const struct mbox_dt_spec *spec) in mbox_is_ready_dt() argument 241 return device_is_ready(spec->dev); in mbox_is_ready_dt() 283 * @param spec MBOX specification from devicetree 288 static inline int mbox_send_dt(const struct mbox_dt_spec *spec, in mbox_send_dt() argument 291 return mbox_send(spec->dev, spec->channel_id, msg); in mbox_send_dt() 329 * @param spec MBOX specification from devicetree 336 static inline int mbox_register_callback_dt(const struct mbox_dt_spec *spec, in mbox_register_callback_dt() argument 339 return mbox_register_callback(spec->dev, spec->channel_id, cb, in mbox_register_callback_dt() [all …]
|
D | led.h | 355 * @param spec LED device specification from devicetree. 361 static inline int led_set_brightness_dt(const struct led_dt_spec *spec, in led_set_brightness_dt() argument 364 return led_set_brightness(spec->dev, spec->index, value); in led_set_brightness_dt() 370 * @param spec LED device specification from devicetree. 375 static inline int led_on_dt(const struct led_dt_spec *spec) in led_on_dt() argument 377 return led_on(spec->dev, spec->index); in led_on_dt() 383 * @param spec LED device specification from devicetree. 388 static inline int led_off_dt(const struct led_dt_spec *spec) in led_off_dt() argument 390 return led_off(spec->dev, spec->index); in led_off_dt() 396 * @param spec LED specification from devicetree. [all …]
|
D | gpio.h | 313 * const struct gpio_dt_spec spec = GPIO_DT_SPEC_GET_BY_IDX(DT_NODELABEL(n), 315 * // Initializes 'spec' to: 831 * @param spec GPIO specification from devicetree 833 * @retval true if the GPIO spec is ready for use. 834 * @retval false if the GPIO spec is not ready for use. 836 static inline bool gpio_is_ready_dt(const struct gpio_dt_spec *spec) in gpio_is_ready_dt() argument 839 return device_is_ready(spec->port); in gpio_is_ready_dt() 943 * gpio_pin_interrupt_configure(spec->port, spec->pin, flags); 945 * The <tt>spec->dt_flags</tt> value is not used. 947 * @param spec GPIO specification from devicetree [all …]
|
/Zephyr-latest/modules/openthread/platform/ |
D | diag.c | 170 static otError gpio_get_spec(uint32_t gpio_idx, const struct gpio_dt_spec **spec) in gpio_get_spec() argument 176 *spec = &gpio_spec[gpio_idx]; in gpio_get_spec() 182 if (!gpio_is_ready_dt(*spec)) { in gpio_get_spec() 187 (const struct gpio_driver_config *)((*spec)->port->config); in gpio_get_spec() 189 if ((cfg->port_pin_mask & (gpio_port_pins_t)BIT((*spec)->pin)) == 0U) { in gpio_get_spec() 198 const struct gpio_dt_spec *spec; in otPlatDiagGpioSet() local 201 error = gpio_get_spec(aGpio, &spec); in otPlatDiagGpioSet() 208 if (gpio_pin_is_output_dt(spec) != 1) { in otPlatDiagGpioSet() 213 if (gpio_pin_set_dt(spec, (int)aValue) != 0) { in otPlatDiagGpioSet() 222 const struct gpio_dt_spec *spec; in otPlatDiagGpioGet() local [all …]
|
/Zephyr-latest/drivers/clock_control/ |
D | clock_control_nrf2_hsfll.c | 104 const struct nrf_clock_spec *spec) in hsfll_find_mgr() argument 109 if (!spec) { in hsfll_find_mgr() 113 if (spec->accuracy || spec->precision) { in hsfll_find_mgr() 118 frequency = spec->frequency == NRF_CLOCK_CONTROL_FREQUENCY_MAX in hsfll_find_mgr() 120 : spec->frequency; in hsfll_find_mgr() 136 const struct nrf_clock_spec *spec, in api_request_hsfll() argument 140 struct onoff_manager *mgr = hsfll_find_mgr(dev, spec); in api_request_hsfll() 153 const struct nrf_clock_spec *spec) in api_release_hsfll() argument 156 struct onoff_manager *mgr = hsfll_find_mgr(dev, spec); in api_release_hsfll() 169 const struct nrf_clock_spec *spec, in api_cancel_or_release_hsfll() argument [all …]
|
D | clock_control_pwm.c | 41 const struct pwm_dt_spec *spec; in clock_control_pwm_on() local 49 spec = &config->pwm_dt; in clock_control_pwm_on() 51 ret = pwm_set_dt(spec, spec->period, spec->period / 2); in clock_control_pwm_on() 56 ret = pwm_get_cycles_per_sec(spec->dev, spec->channel, &cycles_per_sec); in clock_control_pwm_on() 66 ret = pwm_set_cycles(spec->dev, spec->channel, period_cycles, period_cycles / 2, in clock_control_pwm_on() 67 spec->flags); in clock_control_pwm_on()
|
D | clock_control_nrf2_hfxo.c | 174 const struct nrf_clock_spec *spec) in is_clock_spec_valid() argument 178 if (spec->frequency > dev_config->fixed_frequency) { in is_clock_spec_valid() 184 if (spec->accuracy && in is_clock_spec_valid() 185 spec->accuracy != NRF_CLOCK_CONTROL_ACCURACY_MAX && in is_clock_spec_valid() 186 spec->accuracy < dev_config->fixed_accuracy) { in is_clock_spec_valid() 197 const struct nrf_clock_spec *spec, in api_request_hfxo() argument 202 if (spec && !is_clock_spec_valid(dev, spec)) { in api_request_hfxo() 210 const struct nrf_clock_spec *spec) in api_release_hfxo() argument 214 if (spec && !is_clock_spec_valid(dev, spec)) { in api_release_hfxo() 222 const struct nrf_clock_spec *spec, in api_cancel_or_release_hfxo() argument [all …]
|
D | clock_control_nrf2_fll16m.c | 137 const struct nrf_clock_spec *spec) in fll16m_find_mgr() argument 143 if (!spec) { in fll16m_find_mgr() 147 if (spec->frequency > dev_config->fixed_frequency) { in fll16m_find_mgr() 152 if (spec->precision) { in fll16m_find_mgr() 157 accuracy = spec->accuracy == NRF_CLOCK_CONTROL_ACCURACY_MAX in fll16m_find_mgr() 159 : spec->accuracy; in fll16m_find_mgr() 175 const struct nrf_clock_spec *spec, in api_request_fll16m() argument 178 struct onoff_manager *mgr = fll16m_find_mgr(dev, spec); in api_request_fll16m() 188 const struct nrf_clock_spec *spec) in api_release_fll16m() argument 190 struct onoff_manager *mgr = fll16m_find_mgr(dev, spec); in api_release_fll16m() [all …]
|
D | clock_control_nrf2_global_hsfll.c | 66 const struct nrf_clock_spec *spec) in global_hsfll_find_mgr() argument 72 if (!spec) { in global_hsfll_find_mgr() 76 if (spec->accuracy || spec->precision) { in global_hsfll_find_mgr() 81 frequency = spec->frequency == NRF_CLOCK_CONTROL_FREQUENCY_MAX in global_hsfll_find_mgr() 83 : spec->frequency; in global_hsfll_find_mgr() 98 const struct nrf_clock_spec *spec, in api_request_global_hsfll() argument 101 struct onoff_manager *mgr = global_hsfll_find_mgr(dev, spec); in api_request_global_hsfll() 111 const struct nrf_clock_spec *spec) in api_release_global_hsfll() argument 113 struct onoff_manager *mgr = global_hsfll_find_mgr(dev, spec); in api_release_global_hsfll() 123 const struct nrf_clock_spec *spec, in api_cancel_or_release_global_hsfll() argument [all …]
|
D | clock_control_nrf2_lfclk.c | 109 const struct nrf_clock_spec *spec) in lfclk_find_mgr() argument 115 if (!spec) { in lfclk_find_mgr() 119 if (spec->frequency > dev_config->fixed_frequency) { in lfclk_find_mgr() 124 accuracy = spec->accuracy == NRF_CLOCK_CONTROL_ACCURACY_MAX in lfclk_find_mgr() 126 : spec->accuracy; in lfclk_find_mgr() 131 spec->precision > clock_options[i].precision) { in lfclk_find_mgr() 143 const struct nrf_clock_spec *spec, in api_request_lfclk() argument 146 struct onoff_manager *mgr = lfclk_find_mgr(dev, spec); in api_request_lfclk() 156 const struct nrf_clock_spec *spec) in api_release_lfclk() argument 158 struct onoff_manager *mgr = lfclk_find_mgr(dev, spec); in api_release_lfclk() [all …]
|
/Zephyr-latest/include/zephyr/drivers/adc/ |
D | voltage_divider.h | 38 * @param[in] spec voltage divider specification from Devicetree. 45 static inline int voltage_divider_scale_dt(const struct voltage_divider_dt_spec *spec, in voltage_divider_scale_dt() argument 49 if (spec->full_ohms == 0) { in voltage_divider_scale_dt() 54 *v_to_v = (int64_t)*v_to_v * spec->full_ohms / spec->output_ohms; in voltage_divider_scale_dt()
|
D | current_sense_amplifier.h | 43 * @param[in] spec current sensor specification from Devicetree. 48 current_sense_amplifier_scale_dt(const struct current_sense_amplifier_dt_spec *spec, in current_sense_amplifier_scale_dt() argument 57 tmp = tmp * 1000 * spec->sense_gain_div / spec->sense_milli_ohms / spec->sense_gain_mult; in current_sense_amplifier_scale_dt()
|
D | current_sense_shunt.h | 36 * @param[in] spec current sensor specification from Devicetree. 40 static inline void current_sense_shunt_scale_dt(const struct current_sense_shunt_dt_spec *spec, in current_sense_shunt_scale_dt() argument 47 tmp = tmp * 1000000 / spec->shunt_micro_ohms; in current_sense_shunt_scale_dt()
|
/Zephyr-latest/tests/drivers/input/gpio_keys/src/ |
D | main.c | 20 struct gpio_dt_spec spec; member 57 const struct gpio_dt_spec *spec = &pin_cfg->spec; in ZTEST() local 62 zassert_ok(gpio_emul_input_set(spec->port, spec->pin, 0)); in ZTEST() 74 zassert_ok(gpio_emul_input_set(spec->port, spec->pin, 1)); in ZTEST()
|
/Zephyr-latest/include/zephyr/drivers/clock_control/ |
D | nrf_clock_control.h | 193 const struct nrf_clock_spec *spec, 196 const struct nrf_clock_spec *spec); 198 const struct nrf_clock_spec *spec, 214 * @param spec specification of minimal acceptable attributes, like frequency, 236 const struct nrf_clock_spec *spec, in nrf_clock_control_request() argument 242 return api->request(dev, spec, cli); in nrf_clock_control_request() 252 * @param spec See nrf_clock_control_request(). 260 const struct nrf_clock_spec *spec, 267 * @param spec the same specification of the clock attributes that was used 279 const struct nrf_clock_spec *spec) in nrf_clock_control_release() argument [all …]
|
/Zephyr-latest/tests/subsys/sd/sdio/src/ |
D | main.c | 102 TC_PRINT("Card spec: 3.0\n"); in ZTEST() 104 TC_PRINT("Card spec: 2.0\n"); in ZTEST() 106 TC_PRINT("Card spec: 1.1\n"); in ZTEST() 108 TC_PRINT("Card spec: 1.0\n"); in ZTEST() 110 zassert_unreachable("Card spec is unknown value"); in ZTEST()
|
/Zephyr-latest/include/zephyr/usb/ |
D | usb_ch9.h | 39 /** USB Setup Data packet defined in spec. Table 9-2 */ 96 /** USB Standard Request Codes defined in spec. Table 9-4 */ 109 /** Descriptor Types defined in spec. Table 9-5 */ 118 /** Additional Descriptor Types defined in USB 3 spec. Table 9-5 */ 134 /** USB Standard Feature Selectors defined in spec. Table 9-6 */ 139 /** Bits used for GetStatus response defined in spec. Figure 9-4 */ 149 /** USB Standard Device Descriptor defined in spec. Table 9-8 */ 167 /** USB Device Qualifier Descriptor defined in spec. Table 9-9 */ 180 /** USB Standard Configuration Descriptor defined in spec. Table 9-10 */ 192 /** USB Standard Interface Descriptor defined in spec. Table 9-12 */ [all …]
|
/Zephyr-latest/drivers/gpio/ |
D | gpio_hogs.c | 96 const struct gpio_hog_dt_spec *spec; in gpio_hogs_init() local 111 spec = &hogs->specs[j]; in gpio_hogs_init() 113 err = gpio_pin_configure(hogs->port, spec->pin, spec->flags); in gpio_hogs_init() 116 hogs->port->name, spec->pin, err); in gpio_hogs_init()
|