Struct stm32_metapac::cec::regs::Cfgr
#[repr(transparent)]pub struct Cfgr(pub u32);
Expand description
This register is used to configure the HDMI-CEC controller. It is mandatory to write CEC_CFGR only when CECEN=0.
Tuple Fields§
§0: u32
Implementations§
§impl Cfgr
impl Cfgr
pub const fn sft(&self) -> u8
pub const fn sft(&self) -> u8
Signal Free Time SFT bits are set by software. In the SFT=0x0 configuration the number of nominal data bit periods waited before transmission is ruled by hardware according to the transmission history. In all the other configurations the SFT number is determined by software. * 0x0 ** 2.5 Data-Bit periods if CEC is the last bus initiator with unsuccessful transmission (ARBLST=1, TXERR=1, TXUDR=1 or TXACKE= 1) ** 4 Data-Bit periods if CEC is the new bus initiator ** 6 Data-Bit periods if CEC is the last bus initiator with successful transmission (TXEOM=1) * 0x1: 0.5 nominal data bit periods * 0x2: 1.5 nominal data bit periods * 0x3: 2.5 nominal data bit periods * 0x4: 3.5 nominal data bit periods * 0x5: 4.5 nominal data bit periods * 0x6: 5.5 nominal data bit periods * 0x7: 6.5 nominal data bit periods.
pub fn set_sft(&mut self, val: u8)
pub fn set_sft(&mut self, val: u8)
Signal Free Time SFT bits are set by software. In the SFT=0x0 configuration the number of nominal data bit periods waited before transmission is ruled by hardware according to the transmission history. In all the other configurations the SFT number is determined by software. * 0x0 ** 2.5 Data-Bit periods if CEC is the last bus initiator with unsuccessful transmission (ARBLST=1, TXERR=1, TXUDR=1 or TXACKE= 1) ** 4 Data-Bit periods if CEC is the new bus initiator ** 6 Data-Bit periods if CEC is the last bus initiator with successful transmission (TXEOM=1) * 0x1: 0.5 nominal data bit periods * 0x2: 1.5 nominal data bit periods * 0x3: 2.5 nominal data bit periods * 0x4: 3.5 nominal data bit periods * 0x5: 4.5 nominal data bit periods * 0x6: 5.5 nominal data bit periods * 0x7: 6.5 nominal data bit periods.
pub const fn rxtol(&self) -> bool
pub const fn rxtol(&self) -> bool
Rx-Tolerance The RXTOL bit is set and cleared by software. ** Start-Bit, +/- 200 s rise, +/- 200 s fall. ** Data-Bit: +/- 200 s rise. +/- 350 s fall. ** Start-Bit: +/- 400 s rise, +/- 400 s fall ** Data-Bit: +/-300 s rise, +/- 500 s fall.
pub fn set_rxtol(&mut self, val: bool)
pub fn set_rxtol(&mut self, val: bool)
Rx-Tolerance The RXTOL bit is set and cleared by software. ** Start-Bit, +/- 200 s rise, +/- 200 s fall. ** Data-Bit: +/- 200 s rise. +/- 350 s fall. ** Start-Bit: +/- 400 s rise, +/- 400 s fall ** Data-Bit: +/-300 s rise, +/- 500 s fall.
pub const fn brestp(&self) -> bool
pub const fn brestp(&self) -> bool
Rx-Stop on Bit Rising Error The BRESTP bit is set and cleared by software.
pub fn set_brestp(&mut self, val: bool)
pub fn set_brestp(&mut self, val: bool)
Rx-Stop on Bit Rising Error The BRESTP bit is set and cleared by software.
pub const fn bregen(&self) -> bool
pub const fn bregen(&self) -> bool
Generate Error-Bit on Bit Rising Error The BREGEN bit is set and cleared by software. Note: If BRDNOGEN=0, an Error-bit is generated upon BRE detection with BRESTP=1 in broadcast even if BREGEN=0.
pub fn set_bregen(&mut self, val: bool)
pub fn set_bregen(&mut self, val: bool)
Generate Error-Bit on Bit Rising Error The BREGEN bit is set and cleared by software. Note: If BRDNOGEN=0, an Error-bit is generated upon BRE detection with BRESTP=1 in broadcast even if BREGEN=0.
pub const fn lbpegen(&self) -> bool
pub const fn lbpegen(&self) -> bool
Generate Error-Bit on Long Bit Period Error The LBPEGEN bit is set and cleared by software. Note: If BRDNOGEN=0, an Error-bit is generated upon LBPE detection in broadcast even if LBPEGEN=0.
pub fn set_lbpegen(&mut self, val: bool)
pub fn set_lbpegen(&mut self, val: bool)
Generate Error-Bit on Long Bit Period Error The LBPEGEN bit is set and cleared by software. Note: If BRDNOGEN=0, an Error-bit is generated upon LBPE detection in broadcast even if LBPEGEN=0.
pub const fn brdnogen(&self) -> bool
pub const fn brdnogen(&self) -> bool
Avoid Error-Bit Generation in Broadcast The BRDNOGEN bit is set and cleared by software.
pub fn set_brdnogen(&mut self, val: bool)
pub fn set_brdnogen(&mut self, val: bool)
Avoid Error-Bit Generation in Broadcast The BRDNOGEN bit is set and cleared by software.
pub fn set_sftopt(&mut self, val: bool)
pub fn set_sftopt(&mut self, val: bool)
SFT Option Bit The SFTOPT bit is set and cleared by software.
pub const fn oar(&self) -> u16
pub const fn oar(&self) -> u16
Own addresses configuration The OAR bits are set by software to select which destination logical addresses has to be considered in receive mode. Each bit, when set, enables the CEC logical address identified by the given bit position. At the end of HEADER reception, the received destination address is compared with the enabled addresses. In case of matching address, the incoming message is acknowledged and received. In case of non-matching address, the incoming message is received only in listen mode (LSTN=1), but without acknowledge sent. Broadcast messages are always received. Example: OAR = 0b000 0000 0010 0001 means that CEC acknowledges addresses 0x0 and 0x5. Consequently, each message directed to one of these addresses is received.
pub fn set_oar(&mut self, val: u16)
pub fn set_oar(&mut self, val: u16)
Own addresses configuration The OAR bits are set by software to select which destination logical addresses has to be considered in receive mode. Each bit, when set, enables the CEC logical address identified by the given bit position. At the end of HEADER reception, the received destination address is compared with the enabled addresses. In case of matching address, the incoming message is acknowledged and received. In case of non-matching address, the incoming message is received only in listen mode (LSTN=1), but without acknowledge sent. Broadcast messages are always received. Example: OAR = 0b000 0000 0010 0001 means that CEC acknowledges addresses 0x0 and 0x5. Consequently, each message directed to one of these addresses is received.
Trait Implementations§
impl Copy for Cfgr
impl Eq for Cfgr
impl StructuralPartialEq for Cfgr
Auto Trait Implementations§
impl Freeze for Cfgr
impl RefUnwindSafe for Cfgr
impl Send for Cfgr
impl Sync for Cfgr
impl Unpin for Cfgr
impl UnwindSafe for Cfgr
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
)