/Zephyr-latest/drivers/i2c/ |
D | i2c_nrfx_twim_common.h | 20 #define I2C_NRFX_TWIM_FREQUENCY(bitrate) \ argument 21 (bitrate == I2C_BITRATE_STANDARD ? NRF_TWIM_FREQ_100K \ 22 : bitrate == 250000 ? NRF_TWIM_FREQ_250K \ 23 : bitrate == I2C_BITRATE_FAST \ 26 (bitrate == I2C_BITRATE_FAST_PLUS ? NRF_TWIM_FREQ_1000K :)) \
|
D | i2c_nrfx_twi_common.h | 18 #define I2C_NRFX_TWI_FREQUENCY(bitrate) \ argument 19 (bitrate == I2C_BITRATE_STANDARD ? NRF_TWI_FREQ_100K \ 20 : bitrate == 250000 ? NRF_TWI_FREQ_250K \ 21 : bitrate == I2C_BITRATE_FAST ? NRF_TWI_FREQ_400K \
|
D | i2c-priv.h | 18 static inline uint32_t i2c_map_dt_bitrate(uint32_t bitrate) in i2c_map_dt_bitrate() argument 20 switch (bitrate) { in i2c_map_dt_bitrate()
|
D | i2c_sam_twihs.c | 47 uint32_t bitrate; member 108 uint32_t bitrate; in i2c_sam_twihs_configure() local 125 bitrate = BUS_SPEED_STANDARD_HZ; in i2c_sam_twihs_configure() 128 bitrate = BUS_SPEED_FAST_HZ; in i2c_sam_twihs_configure() 136 ret = i2c_clk_set(twihs, bitrate); in i2c_sam_twihs_configure() 308 bitrate_cfg = i2c_map_dt_bitrate(dev_cfg->bitrate); in i2c_sam_twihs_initialize() 344 .bitrate = DT_INST_PROP(n, clock_frequency), \
|
D | i2c_sam_twi.c | 47 uint32_t bitrate; member 110 uint32_t bitrate; in i2c_sam_twi_configure() local 127 bitrate = BUS_SPEED_STANDARD_HZ; in i2c_sam_twi_configure() 130 bitrate = BUS_SPEED_FAST_HZ; in i2c_sam_twi_configure() 140 ret = i2c_clk_set(twi, bitrate); in i2c_sam_twi_configure() 337 bitrate_cfg = i2c_map_dt_bitrate(dev_cfg->bitrate); in i2c_sam_twi_initialize() 376 .bitrate = DT_INST_PROP(n, clock_frequency), \
|
D | i2c_sam_twihs_rtio.c | 48 uint32_t bitrate; member 96 uint32_t bitrate; in i2c_sam_twihs_configure() local 113 bitrate = BUS_SPEED_STANDARD_HZ; in i2c_sam_twihs_configure() 116 bitrate = BUS_SPEED_FAST_HZ; in i2c_sam_twihs_configure() 124 ret = i2c_clk_set(twihs, bitrate); in i2c_sam_twihs_configure() 312 bitrate_cfg = i2c_map_dt_bitrate(dev_cfg->bitrate); in i2c_sam_twihs_initialize() 355 .bitrate = DT_INST_PROP(n, clock_frequency), \
|
D | i2c_sbcon.c | 43 uint32_t bitrate; /* I2C bus speed in Hz */ member 135 I2C_MODE_CONTROLLER | i2c_map_dt_bitrate(config->bitrate)); in i2c_sbcon_init() 149 .bitrate = DT_INST_PROP(_num, clock_frequency), \
|
D | i2c_b91.c | 21 uint32_t bitrate; member 127 uint32_t dev_config = (I2C_MODE_CONTROLLER | i2c_map_dt_bitrate(cfg->bitrate)); in i2c_b91_init() 169 .bitrate = DT_INST_PROP(inst, clock_frequency), \
|
D | i2c_esp32.c | 96 const uint32_t bitrate; member 265 static void IRAM_ATTR i2c_esp32_configure_bitrate(const struct device *dev, uint32_t bitrate) in i2c_esp32_configure_bitrate() argument 270 i2c_clock_source_t sclk = i2c_get_clk_src(bitrate); in i2c_esp32_configure_bitrate() 273 i2c_hal_set_bus_timing(&data->hal, bitrate, sclk, clk_freq_mhz); in i2c_esp32_configure_bitrate() 316 uint32_t bitrate; in i2c_esp32_configure() local 325 bitrate = KHZ(100); in i2c_esp32_configure() 328 bitrate = KHZ(400); in i2c_esp32_configure() 331 bitrate = MHZ(1); in i2c_esp32_configure() 342 i2c_esp32_configure_bitrate(dev, bitrate); in i2c_esp32_configure() 781 return i2c_esp32_configure(dev, I2C_MODE_CONTROLLER | i2c_map_dt_bitrate(config->bitrate)); in i2c_esp32_init() [all …]
|
D | i2c_ifx_xmc4.c | 75 uint32_t bitrate; member 140 uint32_t bitrate_cfg = i2c_map_dt_bitrate(config->bitrate); in ifx_xmc4_i2c_get_config() 174 uint32_t bitrate_cfg = i2c_map_dt_bitrate(config->bitrate); in ifx_xmc4_i2c_transfer() 335 uint32_t bitrate; in ifx_xmc4_i2c_target_register() local 337 bitrate = I2C_SPEED_GET(data->dev_config); in ifx_xmc4_i2c_target_register() 338 bitrate_cfg = i2c_map_dt_bitrate(bitrate); in ifx_xmc4_i2c_target_register() 340 bitrate_cfg = i2c_map_dt_bitrate(config->bitrate); in ifx_xmc4_i2c_target_register() 473 .bitrate = DT_INST_PROP_OR(n, clock_frequency, I2C_SPEED_STANDARD), \
|
D | i2c_renesas_ra_iic.c | 57 uint32_t bitrate; member 333 result->bitrate = in calc_iic_master_bitrate() 350 __func__, total_brl_brh, brh, divider, result->bitrate, result->duty, in calc_iic_master_bitrate() 380 struct ra_iic_master_bitrate bitrate = {}; in calc_iic_master_clock_setting() local 382 calc_iic_master_bitrate(config, min_brl_brh, min_brh, 0, &bitrate); in calc_iic_master_clock_setting() 463 bitrate = temp_bitrate; in calc_iic_master_clock_setting() 468 clk_cfg->brl_value = bitrate.brl; in calc_iic_master_clock_setting() 469 clk_cfg->brh_value = bitrate.brh; in calc_iic_master_clock_setting() 470 clk_cfg->cks_value = bitrate.divider; in calc_iic_master_clock_setting()
|
D | i2c_sam4l_twim.c | 69 uint32_t bitrate; member 169 uint32_t bitrate; in i2c_sam_twim_configure() local 186 bitrate = BUS_SPEED_STANDARD_HZ; in i2c_sam_twim_configure() 189 bitrate = BUS_SPEED_FAST_HZ; in i2c_sam_twim_configure() 192 bitrate = BUS_SPEED_PLUS_HZ; in i2c_sam_twim_configure() 195 bitrate = BUS_SPEED_HIGH_HZ; in i2c_sam_twim_configure() 203 ret = i2c_clk_set(dev, bitrate); in i2c_sam_twim_configure() 575 bitrate_cfg = i2c_map_dt_bitrate(cfg->bitrate); in i2c_sam_twim_initialize() 625 .bitrate = DT_INST_PROP(n, clock_frequency), \
|
D | i2c_litex.c | 33 uint32_t bitrate; member 102 I2C_MODE_CONTROLLER | i2c_map_dt_bitrate(config->bitrate)); in i2c_litex_init() 155 .bitrate = DT_INST_PROP(n, clock_frequency), \
|
D | i2c_gpio.c | 44 uint32_t bitrate; member 189 bitrate_cfg = i2c_map_dt_bitrate(config->bitrate); in i2c_gpio_init() 213 .bitrate = DT_INST_PROP(_num, clock_frequency), \
|
D | i2c_npcx_port.c | 46 uint32_t bitrate; member 194 i2c_config = (I2C_MODE_CONTROLLER | i2c_map_dt_bitrate(config->bitrate)); in i2c_npcx_port_init() 223 .bitrate = DT_INST_PROP(inst, clock_frequency), \
|
/Zephyr-latest/drivers/can/ |
D | can_common.c | 218 static uint16_t sample_point_for_bitrate(uint32_t bitrate) in sample_point_for_bitrate() argument 222 if (bitrate > 800000) { in sample_point_for_bitrate() 225 } else if (bitrate > 500000) { in sample_point_for_bitrate() 253 uint32_t bitrate, uint16_t sample_pnt) in can_calc_timing_internal() argument 262 if (bitrate == 0 || sample_pnt >= 1000) { in can_calc_timing_internal() 272 sample_pnt = sample_point_for_bitrate(bitrate); in can_calc_timing_internal() 275 for (prescaler = MAX(core_clock / (total_tq * bitrate), min->prescaler); in can_calc_timing_internal() 279 if (core_clock % (prescaler * bitrate)) { in can_calc_timing_internal() 284 total_tq = core_clock / (prescaler * bitrate); in can_calc_timing_internal() 319 uint32_t bitrate, uint16_t sample_pnt) in z_impl_can_calc_timing() argument [all …]
|
D | can_handlers.c | 11 uint32_t bitrate, uint16_t sample_pnt) in z_vrfy_can_calc_timing() argument 19 err = z_impl_can_calc_timing(dev, &res_copy, bitrate, sample_pnt); in z_vrfy_can_calc_timing() 83 uint32_t bitrate, uint16_t sample_pnt) in z_vrfy_can_calc_timing_data() argument 91 err = z_impl_can_calc_timing_data(dev, &res_copy, bitrate, sample_pnt); in z_vrfy_can_calc_timing_data() 195 static inline int z_vrfy_can_set_bitrate(const struct device *dev, uint32_t bitrate) in z_vrfy_can_set_bitrate() argument 199 return z_impl_can_set_bitrate(dev, bitrate); in z_vrfy_can_set_bitrate()
|
D | Kconfig | 27 int "Default CAN bitrate" 30 Default initial CAN bitrate in bits/s. This can be overridden per CAN controller using the 31 "bitrate" devicetree property. 34 int "Default CAN data phase bitrate" 38 Default initial CAN data phase bitrate in bits/s. This can be overridden per CAN controller 39 using the "bitrate-data" devicetree property.
|
D | can_shell.c | 440 uint32_t bitrate; in cmd_can_bitrate_set() local 449 bitrate = (uint32_t)strtoul(argv[2], &endptr, 10); in cmd_can_bitrate_set() 462 err = can_calc_timing(dev, &timing, bitrate, sample_pnt); in cmd_can_bitrate_set() 466 bitrate, sample_pnt / 10, sample_pnt % 10, err); in cmd_can_bitrate_set() 481 bitrate, sample_pnt / 10, sample_pnt % 10, err / 10, err % 10, in cmd_can_bitrate_set() 494 shell_print(sh, "setting bitrate to %d bps", bitrate); in cmd_can_bitrate_set() 496 err = can_set_bitrate(dev, bitrate); in cmd_can_bitrate_set() 511 uint32_t bitrate; in cmd_can_dbitrate_set() local 520 bitrate = (uint32_t)strtoul(argv[2], &endptr, 10); in cmd_can_dbitrate_set() 533 err = can_calc_timing_data(dev, &timing, bitrate, sample_pnt); in cmd_can_dbitrate_set() [all …]
|
/Zephyr-latest/tests/drivers/can/timing/src/ |
D | main.c | 29 uint32_t bitrate; member 76 uint32_t bitrate) in assert_bitrate_correct() argument 89 zassert_equal(bitrate, bitrate_calc, "bitrate mismatch"); in assert_bitrate_correct() 158 test->bitrate, test->sp / 10, test->sp % 10); in test_timing_values() 164 sp_err = can_calc_timing_data(dev, &timing, test->bitrate, test->sp); in test_timing_values() 171 sp_err = can_calc_timing(dev, &timing, test->bitrate, test->sp); in test_timing_values() 186 assert_bitrate_correct(dev, &timing, test->bitrate); in test_timing_values()
|
/Zephyr-latest/boards/shields/mcp2515/ |
D | dfrobot_can_bus_v2_0.overlay | 20 min-bitrate = <60000>; 21 max-bitrate = <1000000>;
|
/Zephyr-latest/drivers/peci/ |
D | peci_handlers.c | 12 uint32_t bitrate) in z_vrfy_peci_config() argument 16 return z_impl_peci_config(dev, bitrate); in z_vrfy_peci_config()
|
D | peci_ite_it8xxx2.c | 103 uint32_t bitrate; member 156 static int peci_it8xxx2_configure(const struct device *dev, uint32_t bitrate) in peci_it8xxx2_configure() argument 165 data->bitrate = bitrate; in peci_it8xxx2_configure() 170 switch (bitrate) { in peci_it8xxx2_configure() 185 data->bitrate = PECI_IT8XXX2_BITRATE_1MHZ; in peci_it8xxx2_configure()
|
/Zephyr-latest/include/zephyr/drivers/ |
D | peci.h | 249 typedef int (*peci_config_t)(const struct device *dev, uint32_t bitrate); 274 __syscall int peci_config(const struct device *dev, uint32_t bitrate); 277 uint32_t bitrate) in z_impl_peci_config() argument 282 return api->config(dev, bitrate); in z_impl_peci_config()
|
/Zephyr-latest/doc/hardware/peripherals/can/ |
D | shell.rst | 63 below. The properties include the core CAN clock rate, the maximum supported bitrate, the number of 71 max bitrate: 5000000 bps 104 initial timing is set according to the ``bitrate``, ``sample-point``, ``bitrate-data``, and 110 The classic CAN bitrate/CAN FD arbitration phase bitrate can be configured using the ``can bitrate`` 111 subcommand as shown below. The bitrate is specified in bits per second. 115 uart:~$ can bitrate can@0 125000 116 setting bitrate to 125000 bps 118 If :kconfig:option:`CONFIG_CAN_FD_MODE` is enabled, the data phase bitrate can be configured using 119 the ``can dbitrate`` subcommand as shown below. The bitrate is specified in bits per second. 124 setting data bitrate to 1000000 bps
|