pub struct ClockConfigs {
pub sckpcs: u8,
pub pcssck: u8,
pub dbt: u8,
pub sckdiv: u8,
}Expand description
LPSPI clock configurations.
This is a low-level API. You should prefer set_clock_hz
if you’re not sure how to use these configurations.
All delays and dividers are in terms of the LPSPI functional clock cycles. They’re written directly to the corresponding clock configuration register fields. See inline documentation to understand what values of zero represent.
Fields§
§sckpcs: u8SCK-to-PCS delay.
This value is off-by-one: a value of zero indicates one cycle.
pcssck: u8PCS-to-SCK delay.
This value is off-by-one: a value of zero indicates one cycle.
dbt: u8Delay between transfers.
For normal transactions, this affects the PCS negation duration. In this configuration, this value is off-by-two: a value of zero indicates two cycle.
For continuous transactions, this affects the clock delay between words. In this configuration, this value is off-by-one.
sckdiv: u8SCK divider.
This value is off-by-two: a value of zero indicates two cycles.
Trait Implementations§
Source§impl Clone for ClockConfigs
impl Clone for ClockConfigs
Source§fn clone(&self) -> ClockConfigs
fn clone(&self) -> ClockConfigs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more