Home
last modified time | relevance | path

Searched refs:cfg (Results 1 – 25 of 1089) sorted by relevance

12345678910>>...44

/Zephyr-Core-3.6.0/drivers/dma/
Ddma_intel_adsp_hda.c34 const struct intel_adsp_hda_dma_cfg *const cfg = dev->config; in intel_adsp_hda_dma_host_in_config() local
39 __ASSERT(channel < cfg->dma_channels, "Channel does not exist"); in intel_adsp_hda_dma_host_in_config()
43 __ASSERT(dma_cfg->channel_direction == cfg->direction, in intel_adsp_hda_dma_host_in_config()
49 res = intel_adsp_hda_set_buffer(cfg->base, cfg->regblock_size, channel, buf, in intel_adsp_hda_dma_host_in_config()
53 *DGMBS(cfg->base, cfg->regblock_size, channel) = in intel_adsp_hda_dma_host_in_config()
56 intel_adsp_hda_set_sample_container_size(cfg->base, cfg->regblock_size, channel, in intel_adsp_hda_dma_host_in_config()
68 const struct intel_adsp_hda_dma_cfg *const cfg = dev->config; in intel_adsp_hda_dma_host_out_config() local
73 __ASSERT(channel < cfg->dma_channels, "Channel does not exist"); in intel_adsp_hda_dma_host_out_config()
77 __ASSERT(dma_cfg->channel_direction == cfg->direction, in intel_adsp_hda_dma_host_out_config()
84 res = intel_adsp_hda_set_buffer(cfg->base, cfg->regblock_size, channel, buf, in intel_adsp_hda_dma_host_out_config()
[all …]
/Zephyr-Core-3.6.0/subsys/modbus/
Dmodbus_serial.c34 struct modbus_serial_config *cfg = ctx->cfg; in modbus_serial_tx_on() local
36 if (cfg->de != NULL) { in modbus_serial_tx_on()
37 gpio_pin_set(cfg->de->port, cfg->de->pin, 1); in modbus_serial_tx_on()
40 uart_irq_tx_enable(cfg->dev); in modbus_serial_tx_on()
45 struct modbus_serial_config *cfg = ctx->cfg; in modbus_serial_tx_off() local
47 uart_irq_tx_disable(cfg->dev); in modbus_serial_tx_off()
48 if (cfg->de != NULL) { in modbus_serial_tx_off()
49 gpio_pin_set(cfg->de->port, cfg->de->pin, 0); in modbus_serial_tx_off()
55 struct modbus_serial_config *cfg = ctx->cfg; in modbus_serial_rx_on() local
57 if (cfg->re != NULL) { in modbus_serial_rx_on()
[all …]
/Zephyr-Core-3.6.0/drivers/modem/
Dmodem_socket.c22 uint16_t modem_socket_next_packet_size(struct modem_socket_config *cfg, struct modem_socket *sock) in modem_socket_next_packet_size() argument
26 k_sem_take(&cfg->sem_lock, K_FOREVER); in modem_socket_next_packet_size()
35 k_sem_give(&cfg->sem_lock); in modem_socket_next_packet_size()
72 int modem_socket_packet_size_update(struct modem_socket_config *cfg, struct modem_socket *sock, in modem_socket_packet_size_update() argument
81 k_sem_take(&cfg->sem_lock, K_FOREVER); in modem_socket_packet_size_update()
92 k_sem_give(&cfg->sem_lock); in modem_socket_packet_size_update()
120 k_sem_give(&cfg->sem_lock); in modem_socket_packet_size_update()
128 k_sem_give(&cfg->sem_lock); in modem_socket_packet_size_update()
138 k_sem_give(&cfg->sem_lock); in modem_socket_packet_size_update()
150 int modem_socket_get(struct modem_socket_config *cfg, int family, int type, int proto) in modem_socket_get() argument
[all …]
/Zephyr-Core-3.6.0/include/zephyr/dt-bindings/pinctrl/
Dnxp-s32-pinctrl.h33 #define NXP_S32_PINMUX_MSCR_SSS(cfg) \ argument
34 (((cfg) & NXP_S32_MSCR_SSS_MASK) << NXP_S32_MSCR_SSS_SHIFT)
36 #define NXP_S32_PINMUX_IMCR_SSS(cfg) \ argument
37 (((cfg) & NXP_S32_IMCR_SSS_MASK) << NXP_S32_IMCR_SSS_SHIFT)
39 #define NXP_S32_PINMUX_IMCR_IDX(cfg) \ argument
40 (((cfg) & NXP_S32_IMCR_IDX_MASK) << NXP_S32_IMCR_IDX_SHIFT)
42 #define NXP_S32_PINMUX_MSCR_IDX(cfg) \ argument
43 (((cfg) & NXP_S32_MSCR_IDX_MASK) << NXP_S32_MSCR_IDX_SHIFT)
45 #define NXP_S32_PINMUX_SIUL2_IDX(cfg) \ argument
46 (((cfg) & NXP_S32_SIUL2_IDX_MASK) << NXP_S32_SIUL2_IDX_SHIFT)
[all …]
/Zephyr-Core-3.6.0/drivers/serial/
Duart_lpc11u6x.c19 const struct lpc11u6x_uart0_config *cfg = dev->config; in lpc11u6x_uart0_poll_in() local
21 if (!(cfg->uart0->lsr & LPC11U6X_UART0_LSR_RDR)) { in lpc11u6x_uart0_poll_in()
24 *c = cfg->uart0->rbr; in lpc11u6x_uart0_poll_in()
31 const struct lpc11u6x_uart0_config *cfg = dev->config; in lpc11u6x_uart0_poll_out() local
33 while (!(cfg->uart0->lsr & LPC11U6X_UART0_LSR_THRE)) { in lpc11u6x_uart0_poll_out()
35 cfg->uart0->thr = c; in lpc11u6x_uart0_poll_out()
40 const struct lpc11u6x_uart0_config *cfg = dev->config; in lpc11u6x_uart0_err_check() local
44 lsr = cfg->uart0->lsr; in lpc11u6x_uart0_err_check()
78 const struct lpc11u6x_uart0_config *cfg, in lpc11u6x_uart0_config_baudrate() argument
89 clock_control_get_rate(clk_drv, (clock_control_subsys_t) cfg->clkid, in lpc11u6x_uart0_config_baudrate()
[all …]
Dusart_gd32.c56 const struct gd32_usart_config *const cfg = dev->config; in usart_gd32_init() local
62 ret = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT); in usart_gd32_init()
71 switch (cfg->parity) { in usart_gd32_init()
89 (clock_control_subsys_t)&cfg->clkid); in usart_gd32_init()
91 (void)reset_line_toggle_dt(&cfg->reset); in usart_gd32_init()
93 usart_baudrate_set(cfg->reg, data->baud_rate); in usart_gd32_init()
94 usart_parity_config(cfg->reg, parity); in usart_gd32_init()
95 usart_word_length_set(cfg->reg, word_length); in usart_gd32_init()
97 usart_stop_bit_set(cfg->reg, USART_STB_1BIT); in usart_gd32_init()
98 usart_receive_config(cfg->reg, USART_RECEIVE_ENABLE); in usart_gd32_init()
[all …]
Duart_sam.c47 const struct uart_sam_dev_cfg *const cfg = dev->config; in uart_sam_poll_in() local
49 Uart * const uart = cfg->regs; in uart_sam_poll_in()
63 const struct uart_sam_dev_cfg *const cfg = dev->config; in uart_sam_poll_out() local
65 Uart * const uart = cfg->regs; in uart_sam_poll_out()
77 const struct uart_sam_dev_cfg *const cfg = dev->config; in uart_sam_err_check() local
79 volatile Uart * const uart = cfg->regs; in uart_sam_err_check()
103 const struct uart_sam_dev_cfg *const cfg = dev->config; in uart_sam_baudrate_set() local
105 volatile Uart * const uart = cfg->regs; in uart_sam_baudrate_set()
145 const struct uart_sam_dev_cfg *const cfg = dev->config; in uart_sam_get_parity() local
147 volatile Uart * const uart = cfg->regs; in uart_sam_get_parity()
[all …]
/Zephyr-Core-3.6.0/drivers/clock_control/
Dclock_control_sam_pmc.c26 const struct atmel_sam_pmc_config *cfg = (const struct atmel_sam_pmc_config *)sys; in atmel_sam_clock_control_on() local
28 if (cfg == NULL) { in atmel_sam_clock_control_on()
33 LOG_DBG("Type: %x, Id: %d", cfg->clock_type, cfg->peripheral_id); in atmel_sam_clock_control_on()
35 switch (cfg->clock_type) { in atmel_sam_clock_control_on()
37 soc_pmc_peripheral_enable(cfg->peripheral_id); in atmel_sam_clock_control_on()
52 const struct atmel_sam_pmc_config *cfg = (const struct atmel_sam_pmc_config *)sys; in atmel_sam_clock_control_off() local
54 if (cfg == NULL) { in atmel_sam_clock_control_off()
59 LOG_DBG("Type: %x, Id: %d", cfg->clock_type, cfg->peripheral_id); in atmel_sam_clock_control_off()
61 switch (cfg->clock_type) { in atmel_sam_clock_control_off()
63 soc_pmc_peripheral_disable(cfg->peripheral_id); in atmel_sam_clock_control_off()
[all …]
/Zephyr-Core-3.6.0/subsys/ipc/ipc_service/lib/
Dpbuf.c27 static int validate_cfg(const struct pbuf_cfg *cfg) in validate_cfg() argument
30 if (!cfg || !cfg->rd_idx_loc || !cfg->wr_idx_loc || !cfg->data_loc) { in validate_cfg()
35 if (!IS_PTR_ALIGNED_BYTES(cfg->rd_idx_loc, MAX(cfg->dcache_alignment, _PBUF_IDX_SIZE)) || in validate_cfg()
36 !IS_PTR_ALIGNED_BYTES(cfg->wr_idx_loc, MAX(cfg->dcache_alignment, _PBUF_IDX_SIZE)) || in validate_cfg()
37 !IS_PTR_ALIGNED_BYTES(cfg->data_loc, _PBUF_IDX_SIZE)) { in validate_cfg()
42 if (cfg->len < _PBUF_MIN_DATA_LEN || !IS_PTR_ALIGNED_BYTES(cfg->len, _PBUF_IDX_SIZE)) { in validate_cfg()
47 if (!(cfg->rd_idx_loc < cfg->wr_idx_loc) || in validate_cfg()
48 !((uint8_t *)cfg->wr_idx_loc < cfg->data_loc) || in validate_cfg()
49 !(((uint8_t *)cfg->rd_idx_loc + MAX(_PBUF_IDX_SIZE, cfg->dcache_alignment)) == in validate_cfg()
50 (uint8_t *)cfg->wr_idx_loc)) { in validate_cfg()
[all …]
/Zephyr-Core-3.6.0/drivers/input/
Dinput_kbd_matrix.c28 const struct input_kbd_matrix_common_config *cfg = dev->config; in input_kbd_matrix_ghosting() local
29 const kbd_row_t *state = cfg->matrix_new_state; in input_kbd_matrix_ghosting()
45 for (int c = 0; c < cfg->col_size; c++) { in input_kbd_matrix_ghosting()
50 for (int c_next = c + 1; c_next < cfg->col_size; c_next++) { in input_kbd_matrix_ghosting()
73 const struct input_kbd_matrix_common_config *cfg = dev->config; in input_kbd_matrix_drive_column() local
74 const struct input_kbd_matrix_api *api = cfg->api; in input_kbd_matrix_drive_column()
85 const struct input_kbd_matrix_common_config *cfg = dev->config; in input_kbd_matrix_scan() local
86 const struct input_kbd_matrix_api *api = cfg->api; in input_kbd_matrix_scan()
90 for (int col = 0; col < cfg->col_size; col++) { in input_kbd_matrix_scan()
94 k_busy_wait(cfg->settle_time_us); in input_kbd_matrix_scan()
[all …]
/Zephyr-Core-3.6.0/drivers/spi/
Dspi_smartbond.c38 static inline void spi_smartbond_enable(const struct spi_smartbond_cfg *cfg, bool enable) in spi_smartbond_enable() argument
41 cfg->regs->SPI_CTRL_REG |= SPI_SPI_CTRL_REG_SPI_ON_Msk; in spi_smartbond_enable()
42 cfg->regs->SPI_CTRL_REG &= ~SPI_SPI_CTRL_REG_SPI_RST_Msk; in spi_smartbond_enable()
44 cfg->regs->SPI_CTRL_REG &= ~SPI_SPI_CTRL_REG_SPI_ON_Msk; in spi_smartbond_enable()
45 cfg->regs->SPI_CTRL_REG |= SPI_SPI_CTRL_REG_SPI_RST_Msk; in spi_smartbond_enable()
49 static inline bool spi_smartbond_isenabled(const struct spi_smartbond_cfg *cfg) in spi_smartbond_isenabled() argument
51 return (!!(cfg->regs->SPI_CTRL_REG & SPI_SPI_CTRL_REG_SPI_ON_Msk)) && in spi_smartbond_isenabled()
52 (!(cfg->regs->SPI_CTRL_REG & SPI_SPI_CTRL_REG_SPI_RST_Msk)); in spi_smartbond_isenabled()
55 static inline int spi_smartbond_set_speed(const struct spi_smartbond_cfg *cfg, in spi_smartbond_set_speed() argument
62 cfg->regs->SPI_CTRL_REG = in spi_smartbond_set_speed()
[all …]
Dspi_mchp_mss.c116 static inline uint32_t mss_spi_read(const struct mss_spi_config *cfg, mm_reg_t offset) in mss_spi_read() argument
118 return sys_read32(cfg->base + offset); in mss_spi_read()
121 static inline void mss_spi_write(const struct mss_spi_config *cfg, mm_reg_t offset, uint32_t val) in mss_spi_write() argument
123 sys_write32(val, cfg->base + offset); in mss_spi_write()
126 static inline void mss_spi_hw_tfsz_set(const struct mss_spi_config *cfg, int len) in mss_spi_hw_tfsz_set() argument
130 mss_spi_write(cfg, MSS_SPI_REG_FRAMESUP, (len & MSS_SPI_FRAMESUP_UP_BYTES_MSK)); in mss_spi_hw_tfsz_set()
131 control = mss_spi_read(cfg, MSS_SPI_REG_CONTROL); in mss_spi_hw_tfsz_set()
134 mss_spi_write(cfg, MSS_SPI_REG_CONTROL, control); in mss_spi_hw_tfsz_set()
137 static inline void mss_spi_enable_controller(const struct mss_spi_config *cfg) in mss_spi_enable_controller() argument
141 control = mss_spi_read(cfg, MSS_SPI_REG_CONTROL); in mss_spi_enable_controller()
[all …]
/Zephyr-Core-3.6.0/drivers/pwm/
Dpwm_stm32.c320 const struct pwm_stm32_config *cfg = dev->config; in pwm_stm32_set_cycles() local
335 if (!IS_TIM_32B_COUNTER_INSTANCE(cfg->timer) && in pwm_stm32_set_cycles()
341 if (LL_TIM_IsEnabledIT_CC1(cfg->timer) || LL_TIM_IsEnabledIT_CC2(cfg->timer) || in pwm_stm32_set_cycles()
342 LL_TIM_IsEnabledIT_CC3(cfg->timer) || LL_TIM_IsEnabledIT_CC4(cfg->timer)) { in pwm_stm32_set_cycles()
371 LL_TIM_CC_DisableChannel(cfg->timer, current_ll_channel); in pwm_stm32_set_cycles()
375 if (cfg->countermode == LL_TIM_COUNTERMODE_UP) { in pwm_stm32_set_cycles()
378 } else if (cfg->countermode == LL_TIM_COUNTERMODE_DOWN) { in pwm_stm32_set_cycles()
383 } else if (is_center_aligned(cfg->countermode)) { in pwm_stm32_set_cycles()
390 if (!LL_TIM_CC_IsEnabledChannel(cfg->timer, current_ll_channel)) { in pwm_stm32_set_cycles()
404 oc_init.OCState = LL_TIM_CC_IsEnabledChannel(cfg->timer, ll_channel) in pwm_stm32_set_cycles()
[all …]
Dpwm_gecko.c31 const struct pwm_gecko_config *cfg = dev->config; in pwm_gecko_set_cycles() local
33 if (BUS_RegMaskedRead(&cfg->timer->CC[channel].CTRL, in pwm_gecko_set_cycles()
37 BUS_RegMaskedWrite(&cfg->timer->ROUTE, in pwm_gecko_set_cycles()
39 cfg->location << _TIMER_ROUTE_LOCATION_SHIFT); in pwm_gecko_set_cycles()
40 BUS_RegMaskedSet(&cfg->timer->ROUTE, 1 << channel); in pwm_gecko_set_cycles()
42 BUS_RegMaskedWrite(&cfg->timer->ROUTELOC0, in pwm_gecko_set_cycles()
45 cfg->location << (channel * _TIMER_ROUTELOC0_CC1LOC_SHIFT)); in pwm_gecko_set_cycles()
46 BUS_RegMaskedSet(&cfg->timer->ROUTEPEN, 1 << channel); in pwm_gecko_set_cycles()
52 TIMER_InitCC(cfg->timer, channel, &compare_config); in pwm_gecko_set_cycles()
55 cfg->timer->CC[channel].CTRL |= (flags & PWM_POLARITY_INVERTED) ? in pwm_gecko_set_cycles()
[all …]
/Zephyr-Core-3.6.0/drivers/i2c/
Di2c_gd32.c57 static inline void i2c_gd32_enable_interrupts(const struct i2c_gd32_config *cfg) in i2c_gd32_enable_interrupts() argument
59 I2C_CTL1(cfg->reg) |= I2C_CTL1_ERRIE; in i2c_gd32_enable_interrupts()
60 I2C_CTL1(cfg->reg) |= I2C_CTL1_EVIE; in i2c_gd32_enable_interrupts()
61 I2C_CTL1(cfg->reg) |= I2C_CTL1_BUFIE; in i2c_gd32_enable_interrupts()
64 static inline void i2c_gd32_disable_interrupts(const struct i2c_gd32_config *cfg) in i2c_gd32_disable_interrupts() argument
66 I2C_CTL1(cfg->reg) &= ~I2C_CTL1_ERRIE; in i2c_gd32_disable_interrupts()
67 I2C_CTL1(cfg->reg) &= ~I2C_CTL1_EVIE; in i2c_gd32_disable_interrupts()
68 I2C_CTL1(cfg->reg) &= ~I2C_CTL1_BUFIE; in i2c_gd32_disable_interrupts()
72 const struct i2c_gd32_config *cfg) in i2c_gd32_xfer_read() argument
75 *data->current->buf = I2C_DATA(cfg->reg); in i2c_gd32_xfer_read()
[all …]
/Zephyr-Core-3.6.0/drivers/regulator/
Dregulator_gpio.c35 const struct regulator_gpio_config *cfg = dev->config; in regulator_gpio_apply_state() local
37 for (unsigned int gpio_idx = 0; gpio_idx < cfg->num_gpios; gpio_idx++) { in regulator_gpio_apply_state()
41 ret = gpio_pin_get_dt(&cfg->gpios[gpio_idx]); in regulator_gpio_apply_state()
48 ret = gpio_pin_set_dt(&cfg->gpios[gpio_idx], new_state_of_gpio); in regulator_gpio_apply_state()
61 const struct regulator_gpio_config *cfg = dev->config; in regulator_gpio_enable() local
64 if (cfg->enable.port == NULL) { in regulator_gpio_enable()
68 ret = gpio_pin_set_dt(&cfg->enable, 1); in regulator_gpio_enable()
79 const struct regulator_gpio_config *cfg = dev->config; in regulator_gpio_disable() local
81 if (cfg->enable.port == NULL) { in regulator_gpio_disable()
85 return gpio_pin_set_dt(&cfg->enable, 0); in regulator_gpio_disable()
[all …]
/Zephyr-Core-3.6.0/drivers/sdhc/
Dimx_usdhc.c151 const struct usdhc_config *cfg = dev->config; in card_detect_gpio_cb() local
154 if (gpio_pin_get_dt(&cfg->detect_gpio)) { in card_detect_gpio_cb()
163 static int imx_usdhc_dat3_pull(const struct usdhc_config *cfg, bool pullup) in imx_usdhc_dat3_pull() argument
167 ret = pinctrl_apply_state(cfg->pincfg, PINCTRL_STATE_NOPULL); in imx_usdhc_dat3_pull()
175 if (cfg->pwr_gpio.port) { in imx_usdhc_dat3_pull()
176 ret = gpio_pin_set_dt(&cfg->pwr_gpio, 0); in imx_usdhc_dat3_pull()
182 ret = gpio_pin_set_dt(&cfg->pwr_gpio, 1); in imx_usdhc_dat3_pull()
199 const struct usdhc_config *cfg = dev->config; in imx_usdhc_error_recovery() local
200 uint32_t status = USDHC_GetPresentStatusFlags(cfg->base); in imx_usdhc_error_recovery()
204 USDHC_Reset(cfg->base, kUSDHC_ResetCommand, 100U); in imx_usdhc_error_recovery()
[all …]
/Zephyr-Core-3.6.0/drivers/sensor/icm42688/
Dicm42688.c26 struct icm42688_cfg *cfg) in icm42688_convert_accel() argument
28 icm42688_accel_ms(cfg, (int32_t)raw_val, &val->val1, &val->val2); in icm42688_convert_accel()
32 struct icm42688_cfg *cfg) in icm42688_convert_gyro() argument
34 icm42688_gyro_rads(cfg, (int32_t)raw_val, &val->val1, &val->val2); in icm42688_convert_gyro()
43 struct icm42688_cfg *cfg, struct sensor_value *val) in icm42688_channel_parse_readings() argument
47 icm42688_convert_accel(&val[0], readings[1], cfg); in icm42688_channel_parse_readings()
48 icm42688_convert_accel(&val[1], readings[2], cfg); in icm42688_channel_parse_readings()
49 icm42688_convert_accel(&val[2], readings[3], cfg); in icm42688_channel_parse_readings()
52 icm42688_convert_accel(val, readings[1], cfg); in icm42688_channel_parse_readings()
55 icm42688_convert_accel(val, readings[2], cfg); in icm42688_channel_parse_readings()
[all …]
/Zephyr-Core-3.6.0/tests/drivers/input/kbd_matrix/src/
Dmain.c151 const struct input_kbd_matrix_common_config *cfg = test_dev->config; in ZTEST() local
156 k_sleep(K_USEC(cfg->debounce_down_us / 2)); in ZTEST()
159 k_sleep(K_USEC(cfg->debounce_down_us)); in ZTEST()
163 k_sleep(K_USEC(cfg->debounce_up_us / 2)); in ZTEST()
166 k_sleep(K_USEC(cfg->debounce_up_us)); in ZTEST()
179 const struct input_kbd_matrix_common_config *cfg = test_dev->config; in ZTEST() local
184 k_sleep(K_USEC(cfg->debounce_down_us / 2)); in ZTEST()
188 k_sleep(K_USEC(cfg->debounce_down_us)); in ZTEST()
198 const struct input_kbd_matrix_common_config *cfg = test_dev->config; in ZTEST() local
203 k_sleep(K_USEC(cfg->debounce_down_us / 2)); in ZTEST()
[all …]
/Zephyr-Core-3.6.0/samples/drivers/audio/dmic/src/
Dmain.c32 struct dmic_cfg *cfg, in do_pdm_transfer() argument
38 cfg->streams[0].pcm_rate, cfg->channel.req_num_chan); in do_pdm_transfer()
40 ret = dmic_configure(dmic_dev, cfg); in do_pdm_transfer()
92 struct dmic_cfg cfg = { in main() local
109 cfg.channel.req_num_chan = 1; in main()
110 cfg.channel.req_chan_map_lo = in main()
112 cfg.streams[0].pcm_rate = MAX_SAMPLE_RATE; in main()
113 cfg.streams[0].block_size = in main()
114 BLOCK_SIZE(cfg.streams[0].pcm_rate, cfg.channel.req_num_chan); in main()
116 ret = do_pdm_transfer(dmic_dev, &cfg, 2 * BLOCK_COUNT); in main()
[all …]
/Zephyr-Core-3.6.0/drivers/w1/
Dw1_ds2477_85_common.c22 const struct w1_ds2477_85_config *cfg = dev->config; in ds2477_85_write_port_config() local
29 ret = i2c_write_dt(&cfg->i2c_spec, buf, (CMD_WR_W1_PORT_CFG_LEN + CMD_OVERHEAD_LEN)); in ds2477_85_write_port_config()
34 k_usleep(cfg->t_op_us); in ds2477_85_write_port_config()
36 ret = i2c_read_dt(&cfg->i2c_spec, buf, 2); in ds2477_85_write_port_config()
49 const struct w1_ds2477_85_config *cfg = dev->config; in ds2477_85_read_port_config() local
55 ret = i2c_write_dt(&cfg->i2c_spec, buf, (CMD_RD_W1_PORT_CFG_LEN + CMD_OVERHEAD_LEN)); in ds2477_85_read_port_config()
60 k_usleep(cfg->t_op_us); in ds2477_85_read_port_config()
62 ret = i2c_read_dt(&cfg->i2c_spec, buf, 4); in ds2477_85_read_port_config()
77 const struct w1_ds2477_85_config *cfg = dev->config; in ds2477_85_reset_master() local
81 ret = i2c_write_dt(&cfg->i2c_spec, buf, 1); in ds2477_85_reset_master()
[all …]
/Zephyr-Core-3.6.0/drivers/sensor/lis2dw12/
Dlis2dw12_trigger.c28 const struct lis2dw12_device_config *cfg = dev->config; in lis2dw12_enable_int() local
29 stmdev_ctx_t *ctx = (stmdev_ctx_t *)&cfg->ctx; in lis2dw12_enable_int()
34 if (cfg->int_pin == 1) { in lis2dw12_enable_int()
113 const struct lis2dw12_device_config *cfg = dev->config; in lis2dw12_trigger_set() local
114 stmdev_ctx_t *ctx = (stmdev_ctx_t *)&cfg->ctx; in lis2dw12_trigger_set()
119 if (cfg->gpio_int.port == NULL) { in lis2dw12_trigger_set()
138 if ((cfg->tap_threshold[0] == 0) && in lis2dw12_trigger_set()
139 (cfg->tap_threshold[1] == 0) && in lis2dw12_trigger_set()
140 (cfg->tap_threshold[2] == 0)) { in lis2dw12_trigger_set()
251 const struct lis2dw12_device_config *cfg = dev->config; in lis2dw12_handle_interrupt() local
[all …]
/Zephyr-Core-3.6.0/boards/arm/efr32mg_sltb004a/
Dboard.c17 static int enable_supply(const struct supply_cfg *cfg) in enable_supply() argument
21 if (device_is_ready(cfg->gpio)) { in enable_supply()
22 gpio_pin_configure(cfg->gpio, cfg->pin, in enable_supply()
23 GPIO_OUTPUT | cfg->flags); in enable_supply()
24 gpio_pin_set(cfg->gpio, cfg->pin, 1); in enable_supply()
33 struct supply_cfg cfg; in efr32mg_sltb004a_init() local
36 (void)cfg; in efr32mg_sltb004a_init()
41 cfg = (struct supply_cfg){ in efr32mg_sltb004a_init()
48 rc = enable_supply(&cfg); in efr32mg_sltb004a_init()
/Zephyr-Core-3.6.0/drivers/sensor/icm42605/
Dicm42605_setup.c19 const struct icm42605_config *cfg = dev->config; in icm42605_set_fs() local
23 result = inv_spi_read(&cfg->spi, REG_ACCEL_CONFIG0, &databuf, 1); in icm42605_set_fs()
31 result = inv_spi_single_write(&cfg->spi, REG_ACCEL_CONFIG0, &databuf); in icm42605_set_fs()
33 result = inv_spi_read(&cfg->spi, REG_GYRO_CONFIG0, &databuf, 1); in icm42605_set_fs()
42 result = inv_spi_single_write(&cfg->spi, REG_GYRO_CONFIG0, &databuf); in icm42605_set_fs()
53 const struct icm42605_config *cfg = dev->config; in icm42605_set_odr() local
63 result = inv_spi_read(&cfg->spi, REG_ACCEL_CONFIG0, &databuf, 1); in icm42605_set_odr()
99 result = inv_spi_single_write(&cfg->spi, REG_ACCEL_CONFIG0, &databuf); in icm42605_set_odr()
107 result = inv_spi_read(&cfg->spi, REG_GYRO_CONFIG0, &databuf, 1); in icm42605_set_odr()
139 result = inv_spi_single_write(&cfg->spi, REG_GYRO_CONFIG0, &databuf); in icm42605_set_odr()
[all …]
/Zephyr-Core-3.6.0/scripts/west_commands/runners/
Dhifive1.py15 def __init__(self, cfg): argument
16 super().__init__(cfg)
17 self.openocd_config = path.join(cfg.board_dir, 'support', 'openocd.cfg')
32 def do_create(cls, cfg, args): argument
33 if cfg.gdb is None:
36 return HiFive1BinaryRunner(cfg)
39 self.require(self.cfg.openocd)
40 self.require(self.cfg.gdb)
41 openocd_cmd = ([self.cfg.openocd, '-f', self.openocd_config])
42 gdb_cmd = ([self.cfg.gdb, self.cfg.elf_file, '--batch',

12345678910>>...44