pub struct DsiHost<'d, T: Instance> { /* private fields */ }Expand description
DSIHOST driver.
Implementations§
Source§impl<'d, T: Instance> DsiHost<'d, T>
impl<'d, T: Instance> DsiHost<'d, T>
Sourcepub async fn enable_pll(&mut self, config: &DsiHostPllConfig)
pub async fn enable_pll(&mut self, config: &DsiHostPllConfig)
Enable the DSIHOST PLL
Source§impl<'d, T: Instance> DsiHost<'d, T>
impl<'d, T: Instance> DsiHost<'d, T>
Sourcepub fn phy_init(&mut self, config: &DsiHostPhyConfig)
pub fn phy_init(&mut self, config: &DsiHostPhyConfig)
Initialize DSI D-PHY
Source§impl<'d, T: Instance> DsiHost<'d, T>
impl<'d, T: Instance> DsiHost<'d, T>
Sourcepub fn set_mode<Panel: DsiPanel>(
&mut self,
mode: &DsiHostMode,
) -> Result<(), Error>
pub fn set_mode<Panel: DsiPanel>( &mut self, mode: &DsiHostMode, ) -> Result<(), Error>
Set the DSI mode
Sourcepub fn ltdc_refresh(&self)
pub fn ltdc_refresh(&self)
Manual refresh of a frame from LTDC
Sourcepub fn enable_pattern_generator(&mut self, enable: bool)
pub fn enable_pattern_generator(&mut self, enable: bool)
Eneable video mode pattern generator. The DSI host must be initialized in video more before enabling the pattern generator
Sourcepub fn debug_registers()
pub fn debug_registers()
Debug dump registers to defmt
Source§impl<'d, T: Instance> DsiHost<'d, T>
impl<'d, T: Instance> DsiHost<'d, T>
Sourcepub fn new(_peri: Peri<'d, T>, te: Peri<'d, impl TePin<T>>) -> Self
pub fn new(_peri: Peri<'d, T>, te: Peri<'d, impl TePin<T>>) -> Self
Note: Full-Duplex modes are not supported at this time
Sourcepub async fn start_panel<Panel: DsiPanel>(
&mut self,
pll_config: &DsiHostPllConfig,
phy_config: &DsiHostPhyConfig,
mode: &DsiHostMode,
) -> Result<(), Error>
pub async fn start_panel<Panel: DsiPanel>( &mut self, pll_config: &DsiHostPllConfig, phy_config: &DsiHostPhyConfig, mode: &DsiHostMode, ) -> Result<(), Error>
Start the DSI host
LTDC should be initialized before starting DSIHOST
- Enable regulator
- Initialize PLL and wait for lock
- Initialize PHY
- Initialize Mode
- Initialize Panel
- Enable DSI peripheral and DSI Wrapper
Sourcepub fn get_version(&self) -> u32
pub fn get_version(&self) -> u32
Get the DSIHOST hardware version. Found in the reference manual for comparison.
Sourcepub fn enable(&mut self)
pub fn enable(&mut self)
Set the enable bit in the control register and assert that it has been enabled
Sourcepub fn disable(&mut self)
pub fn disable(&mut self)
Unset the enable bit in the control register and assert that it has been disabled
Sourcepub fn enable_wrapper_dsi(&mut self)
pub fn enable_wrapper_dsi(&mut self)
Set the DSI enable bit in the wrapper control register and assert that it has been enabled
Sourcepub fn disable_wrapper_dsi(&mut self)
pub fn disable_wrapper_dsi(&mut self)
Unset the DSI enable bit in the wrapper control register and assert that it has been disabled
Sourcepub async fn enable_regulator(&mut self)
pub async fn enable_regulator(&mut self)
Enable the regulator
Sourcepub async fn wait_refresh(&mut self)
pub async fn wait_refresh(&mut self)
Wait for an end of refresh interrupt