pub struct ServoMonstrosity {
pub timers: [TimerEnum; 4],
pub chan_list: [(usize, TimerChannel); 12],
/* private fields */
}Fields§
§timers: [TimerEnum; 4]§chan_list: [(usize, TimerChannel); 12]Implementations§
Source§impl ServoMonstrosity
impl ServoMonstrosity
pub fn new( timers: [TimerEnum; 4], chan_list: [(usize, TimerChannel); 12], ) -> Self
pub fn with_timer_kinds( timers: [TimerEnum; 4], chan_list: [(usize, TimerChannel); 12], timer_kinds: [PwmTimerBlockKind; 4], ) -> Self
pub fn len(&mut self) -> usize
pub fn enable(&mut self, ch: usize) -> Result<(), TimerError>
pub fn disable(&mut self, ch: usize) -> Result<(), TimerError>
pub fn set_duty_cycle(&mut self, ch: usize, duty: u16) -> Result<(), TimerError>
pub fn configure_output_rates( &mut self, rates_hz: &[f64], ) -> Result<(), TimerError>
pub fn output_protocol( &self, ch: usize, ) -> Result<PwmOutputProtocol, TimerError>
pub fn send_normalized_commands( &mut self, commands: &[f64], ) -> Result<(), TimerError>
pub fn send_disarmed_commands( &mut self, output_types: &[MixerOutputType], ) -> Result<(), TimerError>
Auto Trait Implementations§
impl Freeze for ServoMonstrosity
impl RefUnwindSafe for ServoMonstrosity
impl Send for ServoMonstrosity
impl Sync for ServoMonstrosity
impl Unpin for ServoMonstrosity
impl UnsafeUnpin for ServoMonstrosity
impl !UnwindSafe for ServoMonstrosity
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.