Struct rp_pac::i2c::regs::IcTxAbrtSource
source · #[repr(transparent)]pub struct IcTxAbrtSource(pub u32);
Expand description
I2C Transmit Abort Source Register This register has 32 bits that indicate the source of the TX_ABRT bit. Except for Bit 9, this register is cleared whenever the IC_CLR_TX_ABRT register or the IC_CLR_INTR register is read. To clear Bit 9, the source of the ABRT_SBYTE_NORSTRT must be fixed first; RESTART must be enabled (IC_CON[5]=1), the SPECIAL bit must be cleared (IC_TAR[11]), or the GC_OR_START bit must be cleared (IC_TAR[10]). Once the source of the ABRT_SBYTE_NORSTRT is fixed, then this bit can be cleared in the same manner as other bits in this register. If the source of the ABRT_SBYTE_NORSTRT is not fixed before attempting to clear this bit, Bit 9 clears for one cycle and is then re-asserted.
Tuple Fields§
§0: u32
Implementations§
source§impl IcTxAbrtSource
impl IcTxAbrtSource
sourcepub const fn abrt_7b_addr_noack(&self) -> bool
pub const fn abrt_7b_addr_noack(&self) -> bool
This field indicates that the Master is in 7-bit addressing mode and the address sent was not acknowledged by any slave. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
sourcepub fn set_abrt_7b_addr_noack(&mut self, val: bool)
pub fn set_abrt_7b_addr_noack(&mut self, val: bool)
This field indicates that the Master is in 7-bit addressing mode and the address sent was not acknowledged by any slave. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
sourcepub const fn abrt_10addr1_noack(&self) -> bool
pub const fn abrt_10addr1_noack(&self) -> bool
This field indicates that the Master is in 10-bit address mode and the first 10-bit address byte was not acknowledged by any slave. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
sourcepub fn set_abrt_10addr1_noack(&mut self, val: bool)
pub fn set_abrt_10addr1_noack(&mut self, val: bool)
This field indicates that the Master is in 10-bit address mode and the first 10-bit address byte was not acknowledged by any slave. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
sourcepub const fn abrt_10addr2_noack(&self) -> bool
pub const fn abrt_10addr2_noack(&self) -> bool
This field indicates that the Master is in 10-bit address mode and that the second address byte of the 10-bit address was not acknowledged by any slave. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
sourcepub fn set_abrt_10addr2_noack(&mut self, val: bool)
pub fn set_abrt_10addr2_noack(&mut self, val: bool)
This field indicates that the Master is in 10-bit address mode and that the second address byte of the 10-bit address was not acknowledged by any slave. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
sourcepub const fn abrt_txdata_noack(&self) -> bool
pub const fn abrt_txdata_noack(&self) -> bool
This field indicates the master-mode only bit. When the master receives an acknowledgement for the address, but when it sends data byte(s) following the address, it did not receive an acknowledge from the remote slave(s). Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
sourcepub fn set_abrt_txdata_noack(&mut self, val: bool)
pub fn set_abrt_txdata_noack(&mut self, val: bool)
This field indicates the master-mode only bit. When the master receives an acknowledgement for the address, but when it sends data byte(s) following the address, it did not receive an acknowledge from the remote slave(s). Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
sourcepub const fn abrt_gcall_noack(&self) -> bool
pub const fn abrt_gcall_noack(&self) -> bool
This field indicates that DW_apb_i2c in master mode has sent a General Call and no slave on the bus acknowledged the General Call. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
sourcepub fn set_abrt_gcall_noack(&mut self, val: bool)
pub fn set_abrt_gcall_noack(&mut self, val: bool)
This field indicates that DW_apb_i2c in master mode has sent a General Call and no slave on the bus acknowledged the General Call. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
sourcepub const fn abrt_gcall_read(&self) -> bool
pub const fn abrt_gcall_read(&self) -> bool
This field indicates that DW_apb_i2c in the master mode has sent a General Call but the user programmed the byte following the General Call to be a read from the bus (IC_DATA_CMD[9] is set to 1). Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
sourcepub fn set_abrt_gcall_read(&mut self, val: bool)
pub fn set_abrt_gcall_read(&mut self, val: bool)
This field indicates that DW_apb_i2c in the master mode has sent a General Call but the user programmed the byte following the General Call to be a read from the bus (IC_DATA_CMD[9] is set to 1). Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
sourcepub const fn abrt_hs_ackdet(&self) -> bool
pub const fn abrt_hs_ackdet(&self) -> bool
This field indicates that the Master is in High Speed mode and the High Speed Master code was acknowledged (wrong behavior). Reset value: 0x0 Role of DW_apb_i2c: Master
sourcepub fn set_abrt_hs_ackdet(&mut self, val: bool)
pub fn set_abrt_hs_ackdet(&mut self, val: bool)
This field indicates that the Master is in High Speed mode and the High Speed Master code was acknowledged (wrong behavior). Reset value: 0x0 Role of DW_apb_i2c: Master
sourcepub const fn abrt_sbyte_ackdet(&self) -> bool
pub const fn abrt_sbyte_ackdet(&self) -> bool
This field indicates that the Master has sent a START Byte and the START Byte was acknowledged (wrong behavior). Reset value: 0x0 Role of DW_apb_i2c: Master
sourcepub fn set_abrt_sbyte_ackdet(&mut self, val: bool)
pub fn set_abrt_sbyte_ackdet(&mut self, val: bool)
This field indicates that the Master has sent a START Byte and the START Byte was acknowledged (wrong behavior). Reset value: 0x0 Role of DW_apb_i2c: Master
sourcepub const fn abrt_hs_norstrt(&self) -> bool
pub const fn abrt_hs_norstrt(&self) -> bool
This field indicates that the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is trying to use the master to transfer data in High Speed mode. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
sourcepub fn set_abrt_hs_norstrt(&mut self, val: bool)
pub fn set_abrt_hs_norstrt(&mut self, val: bool)
This field indicates that the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is trying to use the master to transfer data in High Speed mode. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
sourcepub const fn abrt_sbyte_norstrt(&self) -> bool
pub const fn abrt_sbyte_norstrt(&self) -> bool
To clear Bit 9, the source of the ABRT_SBYTE_NORSTRT must be fixed first; restart must be enabled (IC_CON[5]=1), the SPECIAL bit must be cleared (IC_TAR[11]), or the GC_OR_START bit must be cleared (IC_TAR[10]). Once the source of the ABRT_SBYTE_NORSTRT is fixed, then this bit can be cleared in the same manner as other bits in this register. If the source of the ABRT_SBYTE_NORSTRT is not fixed before attempting to clear this bit, bit 9 clears for one cycle and then gets reasserted. When this field is set to 1, the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is trying to send a START Byte. Reset value: 0x0 Role of DW_apb_i2c: Master
sourcepub fn set_abrt_sbyte_norstrt(&mut self, val: bool)
pub fn set_abrt_sbyte_norstrt(&mut self, val: bool)
To clear Bit 9, the source of the ABRT_SBYTE_NORSTRT must be fixed first; restart must be enabled (IC_CON[5]=1), the SPECIAL bit must be cleared (IC_TAR[11]), or the GC_OR_START bit must be cleared (IC_TAR[10]). Once the source of the ABRT_SBYTE_NORSTRT is fixed, then this bit can be cleared in the same manner as other bits in this register. If the source of the ABRT_SBYTE_NORSTRT is not fixed before attempting to clear this bit, bit 9 clears for one cycle and then gets reasserted. When this field is set to 1, the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is trying to send a START Byte. Reset value: 0x0 Role of DW_apb_i2c: Master
sourcepub const fn abrt_10b_rd_norstrt(&self) -> bool
pub const fn abrt_10b_rd_norstrt(&self) -> bool
This field indicates that the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the master sends a read command in 10-bit addressing mode. Reset value: 0x0 Role of DW_apb_i2c: Master-Receiver
sourcepub fn set_abrt_10b_rd_norstrt(&mut self, val: bool)
pub fn set_abrt_10b_rd_norstrt(&mut self, val: bool)
This field indicates that the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the master sends a read command in 10-bit addressing mode. Reset value: 0x0 Role of DW_apb_i2c: Master-Receiver
sourcepub const fn abrt_master_dis(&self) -> bool
pub const fn abrt_master_dis(&self) -> bool
This field indicates that the User tries to initiate a Master operation with the Master mode disabled. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
sourcepub fn set_abrt_master_dis(&mut self, val: bool)
pub fn set_abrt_master_dis(&mut self, val: bool)
This field indicates that the User tries to initiate a Master operation with the Master mode disabled. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Master-Receiver
sourcepub const fn arb_lost(&self) -> bool
pub const fn arb_lost(&self) -> bool
This field specifies that the Master has lost arbitration, or if IC_TX_ABRT_SOURCE[14] is also set, then the slave transmitter has lost arbitration. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter
sourcepub fn set_arb_lost(&mut self, val: bool)
pub fn set_arb_lost(&mut self, val: bool)
This field specifies that the Master has lost arbitration, or if IC_TX_ABRT_SOURCE[14] is also set, then the slave transmitter has lost arbitration. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter
sourcepub const fn abrt_slvflush_txfifo(&self) -> bool
pub const fn abrt_slvflush_txfifo(&self) -> bool
This field specifies that the Slave has received a read command and some data exists in the TX FIFO, so the slave issues a TX_ABRT interrupt to flush old data in TX FIFO. Reset value: 0x0 Role of DW_apb_i2c: Slave-Transmitter
sourcepub fn set_abrt_slvflush_txfifo(&mut self, val: bool)
pub fn set_abrt_slvflush_txfifo(&mut self, val: bool)
This field specifies that the Slave has received a read command and some data exists in the TX FIFO, so the slave issues a TX_ABRT interrupt to flush old data in TX FIFO. Reset value: 0x0 Role of DW_apb_i2c: Slave-Transmitter
sourcepub const fn abrt_slv_arblost(&self) -> bool
pub const fn abrt_slv_arblost(&self) -> bool
This field indicates that a Slave has lost the bus while transmitting data to a remote master. IC_TX_ABRT_SOURCE[12] is set at the same time. Note: Even though the slave never ‘owns’ the bus, something could go wrong on the bus. This is a fail safe check. For instance, during a data transmission at the low-to-high transition of SCL, if what is on the data bus is not what is supposed to be transmitted, then DW_apb_i2c no longer own the bus. Reset value: 0x0 Role of DW_apb_i2c: Slave-Transmitter
sourcepub fn set_abrt_slv_arblost(&mut self, val: bool)
pub fn set_abrt_slv_arblost(&mut self, val: bool)
This field indicates that a Slave has lost the bus while transmitting data to a remote master. IC_TX_ABRT_SOURCE[12] is set at the same time. Note: Even though the slave never ‘owns’ the bus, something could go wrong on the bus. This is a fail safe check. For instance, during a data transmission at the low-to-high transition of SCL, if what is on the data bus is not what is supposed to be transmitted, then DW_apb_i2c no longer own the bus. Reset value: 0x0 Role of DW_apb_i2c: Slave-Transmitter
sourcepub const fn abrt_slvrd_intx(&self) -> bool
pub const fn abrt_slvrd_intx(&self) -> bool
1: When the processor side responds to a slave mode request for data to be transmitted to a remote master and user writes a 1 in CMD (bit 8) of IC_DATA_CMD register. Reset value: 0x0 Role of DW_apb_i2c: Slave-Transmitter
sourcepub fn set_abrt_slvrd_intx(&mut self, val: bool)
pub fn set_abrt_slvrd_intx(&mut self, val: bool)
1: When the processor side responds to a slave mode request for data to be transmitted to a remote master and user writes a 1 in CMD (bit 8) of IC_DATA_CMD register. Reset value: 0x0 Role of DW_apb_i2c: Slave-Transmitter
sourcepub const fn abrt_user_abrt(&self) -> bool
pub const fn abrt_user_abrt(&self) -> bool
This is a master-mode-only bit. Master has detected the transfer abort (IC_ENABLE[1]) Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
sourcepub fn set_abrt_user_abrt(&mut self, val: bool)
pub fn set_abrt_user_abrt(&mut self, val: bool)
This is a master-mode-only bit. Master has detected the transfer abort (IC_ENABLE[1]) Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter
sourcepub const fn tx_flush_cnt(&self) -> u16
pub const fn tx_flush_cnt(&self) -> u16
This field indicates the number of Tx FIFO Data Commands which are flushed due to TX_ABRT interrupt. It is cleared whenever I2C is disabled. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter
sourcepub fn set_tx_flush_cnt(&mut self, val: u16)
pub fn set_tx_flush_cnt(&mut self, val: u16)
This field indicates the number of Tx FIFO Data Commands which are flushed due to TX_ABRT interrupt. It is cleared whenever I2C is disabled. Reset value: 0x0 Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter
Trait Implementations§
source§impl Clone for IcTxAbrtSource
impl Clone for IcTxAbrtSource
source§fn clone(&self) -> IcTxAbrtSource
fn clone(&self) -> IcTxAbrtSource
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for IcTxAbrtSource
impl Default for IcTxAbrtSource
source§fn default() -> IcTxAbrtSource
fn default() -> IcTxAbrtSource
source§impl PartialEq for IcTxAbrtSource
impl PartialEq for IcTxAbrtSource
impl Copy for IcTxAbrtSource
impl Eq for IcTxAbrtSource
impl StructuralPartialEq for IcTxAbrtSource
Auto Trait Implementations§
impl Freeze for IcTxAbrtSource
impl RefUnwindSafe for IcTxAbrtSource
impl Send for IcTxAbrtSource
impl Sync for IcTxAbrtSource
impl Unpin for IcTxAbrtSource
impl UnwindSafe for IcTxAbrtSource
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)