pub struct Mcp4x<DI, IC> { /* private fields */ }
Expand description
MCP4x digital potentiometer driver
Implementations§
source§impl<DI, IC, CommE> Mcp4x<DI, IC>where
DI: WriteCommand<Error = Error<CommE>>,
IC: CheckChannel<CommE>,
impl<DI, IC, CommE> Mcp4x<DI, IC>where
DI: WriteCommand<Error = Error<CommE>>,
IC: CheckChannel<CommE>,
source§impl<SPI> Mcp4x<SpiInterface<SPI>, Mcp41x>
impl<SPI> Mcp4x<SpiInterface<SPI>, Mcp41x>
sourcepub fn new_mcp41x(spi: SPI) -> Self
pub fn new_mcp41x(spi: SPI) -> Self
Create new MCP41x device instance
sourcepub fn destroy_mcp41x(self) -> SPI
pub fn destroy_mcp41x(self) -> SPI
Destroy driver instance, return SPI bus instance and CS output pin.
source§impl<SPI> Mcp4x<SpiInterface<SPI>, Mcp42x>
impl<SPI> Mcp4x<SpiInterface<SPI>, Mcp42x>
sourcepub fn new_mcp42x(spi: SPI) -> Self
pub fn new_mcp42x(spi: SPI) -> Self
Create new MCP42x device instance
sourcepub fn destroy_mcp42x(self) -> SPI
pub fn destroy_mcp42x(self) -> SPI
Destroy driver instance, return SPI bus instance and CS output pin.
Trait Implementations§
Auto Trait Implementations§
impl<DI, IC> Freeze for Mcp4x<DI, IC>where
DI: Freeze,
impl<DI, IC> RefUnwindSafe for Mcp4x<DI, IC>where
DI: RefUnwindSafe,
IC: RefUnwindSafe,
impl<DI, IC> Send for Mcp4x<DI, IC>
impl<DI, IC> Sync for Mcp4x<DI, IC>
impl<DI, IC> Unpin for Mcp4x<DI, IC>
impl<DI, IC> UnwindSafe for Mcp4x<DI, IC>where
DI: UnwindSafe,
IC: UnwindSafe,
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
Mutably borrows from an owned value. Read more