[−][src]Struct dw1000::ll::RegAccessor
Provides access to a register
You can get an instance for a given register using one of the methods on
DW1000
.
Methods
impl<'s, R, SPI, CS> RegAccessor<'s, R, SPI, CS> where
SPI: Transfer<u8> + Write<u8>,
CS: OutputPin,
[src]
SPI: Transfer<u8> + Write<u8>,
CS: OutputPin,
pub fn read(&mut self) -> Result<R::Read, Error<SPI, CS>> where
R: Register + Readable,
[src]
R: Register + Readable,
Read from the register
pub fn write<F>(&mut self, f: F) -> Result<(), Error<SPI, CS>> where
R: Register + Writable,
F: FnOnce(&mut R::Write) -> &mut R::Write,
[src]
R: Register + Writable,
F: FnOnce(&mut R::Write) -> &mut R::Write,
Write to the register
pub fn modify<F>(&mut self, f: F) -> Result<(), Error<SPI, CS>> where
R: Register + Readable + Writable,
F: for<'r> FnOnce(&mut R::Read, &'r mut R::Write) -> &'r mut R::Write,
[src]
R: Register + Readable + Writable,
F: for<'r> FnOnce(&mut R::Read, &'r mut R::Write) -> &'r mut R::Write,
Modify the register
Auto Trait Implementations
impl<'s, R, SPI, CS> Send for RegAccessor<'s, R, SPI, CS> where
CS: Send,
R: Send,
SPI: Send,
CS: Send,
R: Send,
SPI: Send,
impl<'s, R, SPI, CS> Sync for RegAccessor<'s, R, SPI, CS> where
CS: Sync,
R: Sync,
SPI: Sync,
CS: Sync,
R: Sync,
SPI: Sync,
impl<'s, R, SPI, CS> Unpin for RegAccessor<'s, R, SPI, CS> where
R: Unpin,
R: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,