pub struct I2C0 { /* private fields */ }
Implementations§
Source§impl I2C0
impl I2C0
Sourcepub const PTR: *const <I2C0 as Deref>::Target = {0x60004000 as *const <esp32c6::I2C0 as core::ops::Deref>::Target}
pub const PTR: *const <I2C0 as Deref>::Target = {0x60004000 as *const <esp32c6::I2C0 as core::ops::Deref>::Target}
Pointer to the register block
Methods from Deref<Target = RegisterBlock>§
Sourcepub fn scl_low_period(&self) -> &Reg<SCL_LOW_PERIOD_SPEC>
pub fn scl_low_period(&self) -> &Reg<SCL_LOW_PERIOD_SPEC>
0x00 - Configures the low level width of the SCL Clock
Sourcepub fn slave_addr(&self) -> &Reg<SLAVE_ADDR_SPEC>
pub fn slave_addr(&self) -> &Reg<SLAVE_ADDR_SPEC>
0x10 - Local slave address setting
Sourcepub fn fifo_st(&self) -> &Reg<FIFO_ST_SPEC>
pub fn fifo_st(&self) -> &Reg<FIFO_ST_SPEC>
0x14 - FIFO status register.
Sourcepub fn fifo_conf(&self) -> &Reg<FIFO_CONF_SPEC>
pub fn fifo_conf(&self) -> &Reg<FIFO_CONF_SPEC>
0x18 - FIFO configuration register.
Sourcepub fn int_raw(&self) -> &Reg<INT_RAW_SPEC>
pub fn int_raw(&self) -> &Reg<INT_RAW_SPEC>
0x20 - Raw interrupt status
Sourcepub fn int_clr(&self) -> &Reg<INT_CLR_SPEC>
pub fn int_clr(&self) -> &Reg<INT_CLR_SPEC>
0x24 - Interrupt clear bits
Sourcepub fn int_ena(&self) -> &Reg<INT_ENA_SPEC>
pub fn int_ena(&self) -> &Reg<INT_ENA_SPEC>
0x28 - Interrupt enable bits
Sourcepub fn int_status(&self) -> &Reg<INT_STATUS_SPEC>
pub fn int_status(&self) -> &Reg<INT_STATUS_SPEC>
0x2c - Status of captured I2C communication events
Sourcepub fn sda_hold(&self) -> &Reg<SDA_HOLD_SPEC>
pub fn sda_hold(&self) -> &Reg<SDA_HOLD_SPEC>
0x30 - Configures the hold time after a negative SCL edge.
Sourcepub fn sda_sample(&self) -> &Reg<SDA_SAMPLE_SPEC>
pub fn sda_sample(&self) -> &Reg<SDA_SAMPLE_SPEC>
0x34 - Configures the sample time after a positive SCL edge.
Sourcepub fn scl_high_period(&self) -> &Reg<SCL_HIGH_PERIOD_SPEC>
pub fn scl_high_period(&self) -> &Reg<SCL_HIGH_PERIOD_SPEC>
0x38 - Configures the high level width of SCL
Sourcepub fn scl_start_hold(&self) -> &Reg<SCL_START_HOLD_SPEC>
pub fn scl_start_hold(&self) -> &Reg<SCL_START_HOLD_SPEC>
0x40 - Configures the delay between the SDA and SCL negative edge for a start condition
Sourcepub fn scl_rstart_setup(&self) -> &Reg<SCL_RSTART_SETUP_SPEC>
pub fn scl_rstart_setup(&self) -> &Reg<SCL_RSTART_SETUP_SPEC>
0x44 - Configures the delay between the positive edge of SCL and the negative edge of SDA
Sourcepub fn scl_stop_hold(&self) -> &Reg<SCL_STOP_HOLD_SPEC>
pub fn scl_stop_hold(&self) -> &Reg<SCL_STOP_HOLD_SPEC>
0x48 - Configures the delay after the SCL clock edge for a stop condition
Sourcepub fn scl_stop_setup(&self) -> &Reg<SCL_STOP_SETUP_SPEC>
pub fn scl_stop_setup(&self) -> &Reg<SCL_STOP_SETUP_SPEC>
0x4c - Configures the delay between the SDA and SCL positive edge for a stop condition
Sourcepub fn filter_cfg(&self) -> &Reg<FILTER_CFG_SPEC>
pub fn filter_cfg(&self) -> &Reg<FILTER_CFG_SPEC>
0x50 - SCL and SDA filter configuration register
Sourcepub fn clk_conf(&self) -> &Reg<CLK_CONF_SPEC>
pub fn clk_conf(&self) -> &Reg<CLK_CONF_SPEC>
0x54 - I2C CLK configuration register
Sourcepub fn comd_iter(&self) -> impl Iterator<Item = &Reg<COMD_SPEC>>
pub fn comd_iter(&self) -> impl Iterator<Item = &Reg<COMD_SPEC>>
Iterator for array of: 0x58..0x78 - I2C command register %s
Sourcepub fn scl_st_time_out(&self) -> &Reg<SCL_ST_TIME_OUT_SPEC>
pub fn scl_st_time_out(&self) -> &Reg<SCL_ST_TIME_OUT_SPEC>
0x78 - SCL status time out register
Sourcepub fn scl_main_st_time_out(&self) -> &Reg<SCL_MAIN_ST_TIME_OUT_SPEC>
pub fn scl_main_st_time_out(&self) -> &Reg<SCL_MAIN_ST_TIME_OUT_SPEC>
0x7c - SCL main status time out register
Sourcepub fn scl_sp_conf(&self) -> &Reg<SCL_SP_CONF_SPEC>
pub fn scl_sp_conf(&self) -> &Reg<SCL_SP_CONF_SPEC>
0x80 - Power configuration register
Sourcepub fn scl_stretch_conf(&self) -> &Reg<SCL_STRETCH_CONF_SPEC>
pub fn scl_stretch_conf(&self) -> &Reg<SCL_STRETCH_CONF_SPEC>
0x84 - Set SCL stretch of I2C slave
Sourcepub fn txfifo_start_addr(&self) -> &Reg<TXFIFO_START_ADDR_SPEC>
pub fn txfifo_start_addr(&self) -> &Reg<TXFIFO_START_ADDR_SPEC>
0x100 - I2C TXFIFO base address register
Sourcepub fn rxfifo_start_addr(&self) -> &Reg<RXFIFO_START_ADDR_SPEC>
pub fn rxfifo_start_addr(&self) -> &Reg<RXFIFO_START_ADDR_SPEC>
0x180 - I2C RXFIFO base address register
Trait Implementations§
Source§impl Instance for I2C0
impl Instance for I2C0
fn scl_output_signal(&self) -> OutputSignal
fn scl_input_signal(&self) -> InputSignal
fn sda_output_signal(&self) -> OutputSignal
fn sda_input_signal(&self) -> InputSignal
fn register_block(&self) -> &RegisterBlock
fn i2c_number(&self) -> usize
fn setup( &mut self, frequency: Rate<u32, 1, 1>, clocks: &Clocks<'_>, timeout: Option<u32>, )
Source§fn reset_command_list(&self)
fn reset_command_list(&self)
Source§fn set_filter(&mut self, sda_threshold: Option<u8>, scl_threshold: Option<u8>)
fn set_filter(&mut self, sda_threshold: Option<u8>, scl_threshold: Option<u8>)
Source§fn set_frequency(
&mut self,
source_clk: Rate<u32, 1, 1>,
bus_freq: Rate<u32, 1, 1>,
timeout: Option<u32>,
)
fn set_frequency( &mut self, source_clk: Rate<u32, 1, 1>, bus_freq: Rate<u32, 1, 1>, timeout: Option<u32>, )
fn configure_clock( &mut self, sclk_div: u32, scl_low_period: u32, scl_high_period: u32, scl_wait_high_period: u32, sda_hold_time: u32, sda_sample_time: u32, scl_rstart_setup_time: u32, scl_stop_setup_time: u32, scl_start_hold_time: u32, scl_stop_hold_time: u32, time_out_value: u32, time_out_en: bool, )
fn setup_write<'a, I>( &self, addr: u8, bytes: &[u8], cmd_iterator: &mut I, ) -> Result<(), Error>
fn perform_write<'a, I>( &self, addr: u8, bytes: &[u8], cmd_iterator: &mut I, ) -> Result<(), Error>
fn setup_read<'a, I>( &self, addr: u8, buffer: &mut [u8], cmd_iterator: &mut I, ) -> Result<(), Error>
fn perform_read<'a, I>( &self, addr: u8, buffer: &mut [u8], cmd_iterator: &mut I, ) -> Result<(), Error>
fn read_all_from_fifo(&self, buffer: &mut [u8]) -> Result<(), Error>
fn clear_all_interrupts(&self)
fn wait_for_completion(&self) -> Result<(), Error>
fn check_errors(&self) -> Result<(), Error>
fn update_config(&self)
fn start_transmission(&self)
fn fill_tx_fifo(&self, bytes: &[u8]) -> usize
fn write_remaining_tx_fifo( &self, start_index: usize, bytes: &[u8], ) -> Result<(), Error>
Source§fn reset_fifo(&self)
fn reset_fifo(&self)
Source§fn master_write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Error>
fn master_write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Error>
bytes
array to a target slave with the
address addr