Skip to main content

VChip

Struct VChip 

Source
pub struct VChip<'a, 'b, 'c>
where 'b: 'a, 'c: 'b,
{ /* private fields */ }
Expand description

Virtual chip of the DCMI

Implementations§

Source§

impl<'a, 'b, 'c> VChip<'a, 'b, 'c>
where 'b: 'a, 'c: 'b,

Source

pub fn new_unchecked(chip: &'a Chip<'b, 'c>, id: u32, vfg_id: u32) -> Self

Create a new virtual chip

§Warning

It is your responsibility to ensure that the virtual chip ID is valid

Source

pub fn id(&self) -> u32

Query the ID of this virtual chip

Source

pub fn vfg_id(&self) -> u32

Query the group ID of this virtual chip

Source

pub fn chip(&self) -> &Chip<'_, '_>

Query the chip of this virtual chip

§Returns

chip

Source

pub fn create( chip: &'a Chip<'b, 'c>, param: VChipCreateParam, ) -> DCMIResult<(VChipOutput, Self)>

Create a virtual chip

§Warning

if param is VChipCreateParam::SpecificId, make sure that the id is not 65535

§Parameters
  • chip: the chip you want to create a virtual chip on
  • param: virtual chip creation parameters
§Returns
  • out: output virtual chip info
Source

pub fn destroy_all(chip: &'a Chip<'b, 'c>) -> DCMIResult<()>

Destroy all virtual chips

§Parameters
  • chip: the chip you want to destroy all virtual chips on
Source§

impl VChip<'_, '_, '_>

Source

pub fn set_compute_power_splitting_mode( _dcmi: &DCMI, mode: VChipPowerSplittingMode, ) -> DCMIResult<()>

Set the computing power splitting mode

§Parameters
  • mode: computing power splitting mode
§Warning

make sure that no vchip is created before calling this function

Source

pub fn get_compute_power_splitting_mode( _dcmi: &DCMI, ) -> DCMIResult<VChipPowerSplittingMode>

Query the computing power splitting mode

§Returns

computing power splitting mode

Source

pub fn set_recovery_mode(_dcmi: &DCMI, mode: bool) -> DCMIResult<()>

Set the vchip configuration recover mode

§Parameters
  • mode: vchip configuration recover mode (0: disable, 1: enable)
Source

pub fn get_recovery_mode(_dcmi: &DCMI) -> DCMIResult<bool>

Query the vchip configuration recover mode

§Returns

vchip configuration recover mode (0: disable, 1: enable)

Source§

impl VChip<'_, '_, '_>

Source

pub fn destroy(self) -> DCMIResult<()>

Destroy VChip

Trait Implementations§

Source§

impl<'a, 'b, 'c> Debug for VChip<'a, 'b, 'c>
where 'b: 'a, 'c: 'b,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, 'b, 'c> Freeze for VChip<'a, 'b, 'c>

§

impl<'a, 'b, 'c> !RefUnwindSafe for VChip<'a, 'b, 'c>

§

impl<'a, 'b, 'c> !Send for VChip<'a, 'b, 'c>

§

impl<'a, 'b, 'c> !Sync for VChip<'a, 'b, 'c>

§

impl<'a, 'b, 'c> Unpin for VChip<'a, 'b, 'c>

§

impl<'a, 'b, 'c> UnsafeUnpin for VChip<'a, 'b, 'c>

§

impl<'a, 'b, 'c> !UnwindSafe for VChip<'a, 'b, 'c>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.