[−][src]Struct jrk_g2_rs::JrkG2BlockingI2c
Implement the JrkG2 trait for Blocking I2C
Implementations
impl<I2c, I2cError> JrkG2BlockingI2c<I2c> where
I2c: Write<Error = Error<I2cError>> + Read<Error = Error<I2cError>>,
[src]
I2c: Write<Error = Error<I2cError>> + Read<Error = Error<I2cError>>,
pub fn new(i2c: I2c) -> Self
[src]
pub fn set_device(&mut self, device: u8)
[src]
The controller have a default 0x0B I2C address, but this can be manually changed in the configuration utility.
Trait Implementations
impl<I2c, I2cError> JrkG2<I2cError> for JrkG2BlockingI2c<I2c> where
I2c: Write<Error = Error<I2cError>> + Read<Error = Error<I2cError>>,
[src]
I2c: Write<Error = Error<I2cError>> + Read<Error = Error<I2cError>>,
pub const HEADER: &'static str
[src]
pub fn write(&mut self, data: &[u8]) -> Result<(), I2cError>
[src]
pub fn read(&mut self, cmd: VarOffset) -> Result<u16, I2cError>
[src]
pub fn set_target(&mut self, target: u16) -> Result<(), ComError>
[src]
pub fn stop_motor(&mut self) -> Result<(), ComError>
[src]
pub fn show_var<W: Write>(
&mut self,
f: &mut W,
var: VarOffset
) -> Result<(), ComError>
[src]
&mut self,
f: &mut W,
var: VarOffset
) -> Result<(), ComError>
pub fn show_vars<W: Write>(&mut self, f: &mut W) -> Result<(), ComError>
[src]
pub fn ushow_var<W: uWrite>(
&mut self,
f: &mut W,
var: VarOffset
) -> Result<(), ComError>
[src]
&mut self,
f: &mut W,
var: VarOffset
) -> Result<(), ComError>
pub fn ushow_vars<W: uWrite>(&mut self, f: &mut W) -> Result<(), ComError>
[src]
Auto Trait Implementations
impl<I2c> Send for JrkG2BlockingI2c<I2c> where
I2c: Send,
[src]
I2c: Send,
impl<I2c> Sync for JrkG2BlockingI2c<I2c> where
I2c: Sync,
[src]
I2c: Sync,
impl<I2c> Unpin for JrkG2BlockingI2c<I2c> where
I2c: Unpin,
[src]
I2c: 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,
pub 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.
pub 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>,