Home
last modified time | relevance | path

Searched refs:spec (Results 1 – 25 of 130) sorted by relevance

123456

/Zephyr-latest/drivers/w1/
Dw1_ds2482_84_common.h105 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, &reg); 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 …]
Dw1_zephyr_gpio.c97 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/tests/drivers/gpio/gpio_hogs/src/
Dmain.c19 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/scripts/logging/dictionary/dictionary_parser/
Dlog_parser.py36 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/
Dmain.c40 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/
Dmbox.h239 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()
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()
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()
385 static inline int mbox_mtu_get_dt(const struct mbox_dt_spec *spec) in mbox_mtu_get_dt() argument
387 return mbox_mtu_get(spec->dev); in mbox_mtu_get_dt()
441 static inline int mbox_set_enabled_dt(const struct mbox_dt_spec *spec, in mbox_set_enabled_dt() argument
444 return mbox_set_enabled(spec->dev, spec->channel_id, enabled); in mbox_set_enabled_dt()
[all …]
Dadc.h741 static inline int adc_channel_setup_dt(const struct adc_dt_spec *spec) in adc_channel_setup_dt() argument
743 if (!spec->channel_cfg_dt_node_exists) { in adc_channel_setup_dt()
747 return adc_channel_setup(spec->dev, &spec->channel_cfg); in adc_channel_setup_dt()
789 static inline int adc_read_dt(const struct adc_dt_spec *spec, in adc_read_dt() argument
792 return adc_read(spec->dev, sequence); in adc_read_dt()
894 static inline int adc_raw_to_millivolts_dt(const struct adc_dt_spec *spec, in adc_raw_to_millivolts_dt() argument
900 if (!spec->channel_cfg_dt_node_exists) { in adc_raw_to_millivolts_dt()
904 if (spec->channel_cfg.reference == ADC_REF_INTERNAL) { in adc_raw_to_millivolts_dt()
905 vref_mv = (int32_t)adc_ref_internal(spec->dev); in adc_raw_to_millivolts_dt()
907 vref_mv = spec->vref_mv; in adc_raw_to_millivolts_dt()
[all …]
Dreset.h249 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()
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()
333 static inline int reset_line_deassert_dt(const struct reset_dt_spec *spec) in reset_line_deassert_dt() argument
335 return reset_line_deassert(spec->dev, spec->id); in reset_line_deassert_dt()
374 static inline int reset_line_toggle_dt(const struct reset_dt_spec *spec) in reset_line_toggle_dt() argument
376 return reset_line_toggle(spec->dev, spec->id); in reset_line_toggle_dt()
Di2c.h467 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()
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()
957 static inline int i2c_write_read_cb_dt(const struct i2c_dt_spec *spec, struct i2c_msg *msgs, in i2c_write_read_cb_dt() argument
962 return i2c_write_read_cb(spec->bus, msgs, num_msgs, spec->addr, write_buf, num_write, in i2c_write_read_cb_dt()
1110 static inline int i2c_transfer_dt(const struct i2c_dt_spec *spec, in i2c_transfer_dt() argument
1113 return i2c_transfer(spec->bus, msgs, num_msgs, spec->addr); in i2c_transfer_dt()
1297 static inline int i2c_write_dt(const struct i2c_dt_spec *spec, in i2c_write_dt() argument
1300 return i2c_write(spec->bus, buf, num_bytes, spec->addr); in i2c_write_dt()
[all …]
Dled.h361 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()
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()
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()
401 static inline bool led_is_ready_dt(const struct led_dt_spec *spec) in led_is_ready_dt() argument
403 return device_is_ready(spec->dev); in led_is_ready_dt()
Dspi.h725 static inline bool spi_cs_is_gpio_dt(const struct spi_dt_spec *spec) in spi_cs_is_gpio_dt() argument
727 return spi_cs_is_gpio(&spec->config); in spi_cs_is_gpio_dt()
738 static inline bool spi_is_ready_dt(const struct spi_dt_spec *spec) in spi_is_ready_dt() argument
741 if (!device_is_ready(spec->bus)) { in spi_is_ready_dt()
745 if (spi_cs_is_gpio_dt(spec) && in spi_is_ready_dt()
746 !gpio_is_ready_dt(&spec->config.cs.gpio)) { in spi_is_ready_dt()
805 static inline int spi_transceive_dt(const struct spi_dt_spec *spec, in spi_transceive_dt() argument
809 return spi_transceive(spec->bus, &spec->config, tx_bufs, rx_bufs); in spi_transceive_dt()
848 static inline int spi_read_dt(const struct spi_dt_spec *spec, in spi_read_dt() argument
851 return spi_read(spec->bus, &spec->config, rx_bufs); in spi_read_dt()
[all …]
Dgpio.h836 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()
951 static inline int gpio_pin_interrupt_configure_dt(const struct gpio_dt_spec *spec, in gpio_pin_interrupt_configure_dt() argument
954 return gpio_pin_interrupt_configure(spec->port, spec->pin, flags); in gpio_pin_interrupt_configure_dt()
1044 static inline int gpio_pin_configure_dt(const struct gpio_dt_spec *spec, in gpio_pin_configure_dt() argument
1047 return gpio_pin_configure(spec->port, in gpio_pin_configure_dt()
1048 spec->pin, in gpio_pin_configure_dt()
1049 spec->dt_flags | extra_flags); in gpio_pin_configure_dt()
1134 static inline int gpio_pin_is_input_dt(const struct gpio_dt_spec *spec) in gpio_pin_is_input_dt() argument
1136 return gpio_pin_is_input(spec->port, spec->pin); in gpio_pin_is_input_dt()
[all …]
/Zephyr-latest/include/zephyr/drivers/clock_control/
Dnrf_clock_control.h193 const struct nrf_clock_spec *spec,
196 const struct nrf_clock_spec *spec);
198 const struct nrf_clock_spec *spec,
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()
260 const struct nrf_clock_spec *spec,
279 const struct nrf_clock_spec *spec) in nrf_clock_control_release() argument
284 return api->release(dev, spec); in nrf_clock_control_release()
311 const struct nrf_clock_spec *spec, in nrf_clock_control_cancel_or_release() argument
317 return api->cancel_or_release(dev, spec, cli); in nrf_clock_control_cancel_or_release()
/Zephyr-latest/modules/openthread/platform/
Ddiag.c170 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/
Dclock_control_pwm.c41 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()
Dclock_control_nrf2_hsfll.c104 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 …]
Dclock_control_nrf2_hfxo.c174 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 …]
Dclock_control_nrf2_fll16m.c137 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 …]
Dclock_control_nrf2_global_hsfll.c66 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 …]
Dclock_control_nrf2_lfclk.c109 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/tests/drivers/input/gpio_keys/src/
Dmain.c20 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/adc/
Dvoltage_divider.h45 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()
Dcurrent_sense_amplifier.h48 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()
/Zephyr-latest/drivers/crypto/
Dcrypto_ataes132a_priv.h139 static inline int burst_write_i2c(const struct i2c_dt_spec *spec, in burst_write_i2c() argument
156 return i2c_transfer_dt(spec, msg, 2); in burst_write_i2c()
160 static inline int burst_read_i2c(const struct i2c_dt_spec *spec, in burst_read_i2c() argument
177 return i2c_transfer_dt(spec, msg, 2); in burst_read_i2c()
180 static inline int read_reg_i2c(const struct i2c_dt_spec *spec, in read_reg_i2c() argument
183 return burst_read_i2c(spec, reg_addr, value, 1); in read_reg_i2c()
186 static inline int write_reg_i2c(const struct i2c_dt_spec *spec, in write_reg_i2c() argument
189 return burst_write_i2c(spec, reg_addr, &value, 1); in write_reg_i2c()
/Zephyr-latest/drivers/gpio/
Dgpio_hogs.c96 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()

123456