Enum atmega_hal::spi::SerialClockRate
source · pub enum SerialClockRate {
OscfOver2 = 1,
OscfOver4 = 2,
OscfOver8 = 3,
OscfOver16 = 4,
OscfOver32 = 5,
OscfOver64 = 6,
OscfOver128 = 7,
}
Expand description
Oscillator Clock Frequency division options.
The bus speed is calculated by dividing the IO clock by the prescaler:
F_sck = CLK_io / Prescaler
Please note that the overall transfer speed might be lower due to software overhead while sending / receiving.
Prescale | 16 MHz Clock | 8 MHz Clock |
---|---|---|
OscfOver2 | 8 MHz | 4 MHz |
OscfOver4 | 4 MHz | 2 MHz |
OscfOver8 | 2 MHz | 1 MHz |
OscfOver16 | 1 MHz | 500 kHz |
OscfOver32 | 500 kHz | 250 kHz |
OscfOver64 | 250 kHz | 125 kHz |
OscfOver128 | 125 kHz | 62.5 kHz |
Variants§
OscfOver2 = 1
OscfOver4 = 2
OscfOver8 = 3
OscfOver16 = 4
OscfOver32 = 5
OscfOver64 = 6
OscfOver128 = 7
Implementations§
source§impl SerialClockRate
impl SerialClockRate
pub fn into_divider(self) -> u8
Trait Implementations§
source§impl Clone for SerialClockRate
impl Clone for SerialClockRate
source§fn clone(&self) -> SerialClockRate
fn clone(&self) -> SerialClockRate
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SerialClockRate
impl Debug for SerialClockRate
source§impl PartialEq for SerialClockRate
impl PartialEq for SerialClockRate
source§fn eq(&self, other: &SerialClockRate) -> bool
fn eq(&self, other: &SerialClockRate) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SerialClockRate
impl Eq for SerialClockRate
impl StructuralPartialEq for SerialClockRate
Auto Trait Implementations§
impl Freeze for SerialClockRate
impl RefUnwindSafe for SerialClockRate
impl Send for SerialClockRate
impl Sync for SerialClockRate
impl Unpin for SerialClockRate
impl UnwindSafe for SerialClockRate
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