pub struct MA734<SPI, CS> { /* private fields */ }
Expand description
Driver for the MA734
Implementations§
source§impl<SPI, CS> MA734<SPI, CS>where
SPI: Transfer<u8>,
CS: OutputPin,
impl<SPI, CS> MA734<SPI, CS>where SPI: Transfer<u8>, CS: OutputPin,
sourcepub fn read_angle(&mut self) -> Result<u16, Error<SPI>>
pub fn read_angle(&mut self) -> Result<u16, Error<SPI>>
Read current angle.
sourcepub fn get_zero_angle(&mut self) -> Result<u16, Error<SPI>>
pub fn get_zero_angle(&mut self) -> Result<u16, Error<SPI>>
Get zero position angle
sourcepub fn get_bias_current_trimming(
&mut self
) -> Result<BiasCurrentTrimming, Error<SPI>>
pub fn get_bias_current_trimming( &mut self ) -> Result<BiasCurrentTrimming, Error<SPI>>
Get bias current trimming settings
sourcepub fn set_bias_current_trimming(
&mut self,
bct: BiasCurrentTrimming
) -> Result<(), Error<SPI>>
pub fn set_bias_current_trimming( &mut self, bct: BiasCurrentTrimming ) -> Result<(), Error<SPI>>
Set bias current trimming settings
sourcepub fn get_angle_change_interrupt(
&mut self
) -> Result<AngleChangeInterrupt, Error<SPI>>
pub fn get_angle_change_interrupt( &mut self ) -> Result<AngleChangeInterrupt, Error<SPI>>
Get angle change interrupt config
sourcepub fn set_angle_change_interrupt(
&mut self,
aci: AngleChangeInterrupt
) -> Result<(), Error<SPI>>
pub fn set_angle_change_interrupt( &mut self, aci: AngleChangeInterrupt ) -> Result<(), Error<SPI>>
Set angle change interrupt config
sourcepub fn get_magnetic_thresholds(
&mut self
) -> Result<MagneticFieldThresholds, Error<SPI>>
pub fn get_magnetic_thresholds( &mut self ) -> Result<MagneticFieldThresholds, Error<SPI>>
Get magnetic field thresholds
sourcepub fn set_magnetic_thresholds(
&mut self,
mft: MagneticFieldThresholds
) -> Result<(), Error<SPI>>
pub fn set_magnetic_thresholds( &mut self, mft: MagneticFieldThresholds ) -> Result<(), Error<SPI>>
Set magnetic field thresholds
sourcepub fn get_rotation_dir(&mut self) -> Result<Dir, Error<SPI>>
pub fn get_rotation_dir(&mut self) -> Result<Dir, Error<SPI>>
Get rotation direction
sourcepub fn get_filter_window(&mut self) -> Result<u8, Error<SPI>>
pub fn get_filter_window(&mut self) -> Result<u8, Error<SPI>>
Get filter window
sourcepub fn store_register_into_nvm(&mut self, reg: u8) -> Result<(), Error<SPI>>
pub fn store_register_into_nvm(&mut self, reg: u8) -> Result<(), Error<SPI>>
Store Register into the NVM
sourcepub fn store_all_registers_into_nvm(&mut self) -> Result<(), Error<SPI>>
pub fn store_all_registers_into_nvm(&mut self) -> Result<(), Error<SPI>>
Store All Registers into the NVM
sourcepub fn restore_all_registers_from_nvm(&mut self) -> Result<(), Error<SPI>>
pub fn restore_all_registers_from_nvm(&mut self) -> Result<(), Error<SPI>>
Restore All Registers from the NVM
sourcepub fn get_magnetic_flags(&mut self) -> Result<MagneticFlags, Error<SPI>>
pub fn get_magnetic_flags(&mut self) -> Result<MagneticFlags, Error<SPI>>
Get magnetic flags
sourcepub fn get_error_flags(&mut self) -> Result<ErrorFlags, Error<SPI>>
pub fn get_error_flags(&mut self) -> Result<ErrorFlags, Error<SPI>>
Get error flags
sourcepub fn clear_error_flags(&mut self) -> Result<(), Error<SPI>>
pub fn clear_error_flags(&mut self) -> Result<(), Error<SPI>>
Clear error flags