[−][src]Trait jrk_g2_rs::JrkG2
Trait that defines common operations for the Jrk G2, and has to be implemented for any particular communication bus (currently available: Serial / I2C / Blocking I2C).
Associated Constants
Loading content...Required methods
pub fn write(&mut self, data: &[u8]) -> Result<(), ComError>
[src]
pub fn read(&mut self, cmd: VarOffset) -> Result<u16, ComError>
[src]
Provided methods
pub fn set_target(&mut self, target: u16) -> Result<(), ComError>
[src]
Put the motor in motion
the target should be between 0 and 4095, and its meaning depends on the configurtion on the controller, usually made by USB
pub fn stop_motor(&mut self) -> Result<(), ComError>
[src]
Stop the motor
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>
Print one of the internal variables of the controller to a fmt::Write implementor
pub fn show_vars<W: Write>(&mut self, f: &mut W) -> Result<(), ComError>
[src]
Print main internal variables of the controller to a fmt::Write implementor
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>
Print one of the internal variables of the controller to a uWrite
pub fn ushow_vars<W: uWrite>(&mut self, f: &mut W) -> Result<(), ComError>
[src]
Print main internal variables of the controller to a uWrite implementor
Implementors
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]
impl<I2c, I2cError> JrkG2<I2cError> for JrkG2I2c<I2c> where
I2c: Write<Error = I2cError> + Read<Error = I2cError>,
[src]
I2c: Write<Error = I2cError> + Read<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]
impl<Serial> JrkG2<<Serial as Read<u8>>::Error> for JrkG2Serial<Serial> where
Serial: Read<u8> + Write<u8>,
[src]
Serial: Read<u8> + Write<u8>,