mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-26 20:00:27 +00:00
Unify derivation of Clone, Copy and defmt::format for all *SPI configs
This commit is contained in:
parent
92a6fd2946
commit
542ae72ca7
@ -86,6 +86,8 @@ impl Default for Config {
|
||||
}
|
||||
|
||||
/// HSPI transfer configuration.
|
||||
#[derive(Clone, Copy)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct TransferConfig {
|
||||
/// Instruction width (IMODE)
|
||||
pub iwidth: HspiWidth,
|
||||
|
@ -23,6 +23,7 @@ use crate::{peripherals, Peri};
|
||||
|
||||
/// OPSI driver config.
|
||||
#[derive(Clone, Copy)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct Config {
|
||||
/// Fifo threshold used by the peripheral to generate the interrupt indicating data
|
||||
/// or space is available in the FIFO
|
||||
@ -83,6 +84,8 @@ impl Default for Config {
|
||||
}
|
||||
|
||||
/// OSPI transfer configuration.
|
||||
#[derive(Clone, Copy)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct TransferConfig {
|
||||
/// Instruction width (IMODE)
|
||||
pub iwidth: OspiWidth,
|
||||
|
@ -18,6 +18,7 @@ use crate::{peripherals, Peri};
|
||||
|
||||
/// QSPI transfer configuration.
|
||||
#[derive(Clone, Copy)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct TransferConfig {
|
||||
/// Instruction width (IMODE)
|
||||
pub iwidth: QspiWidth,
|
||||
@ -48,6 +49,7 @@ impl Default for TransferConfig {
|
||||
|
||||
/// QSPI driver configuration.
|
||||
#[derive(Clone, Copy)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
#[non_exhaustive]
|
||||
pub struct Config {
|
||||
/// Flash memory size representend as 2^[0-32], as reasonable minimum 1KiB(9) was chosen.
|
||||
|
@ -23,6 +23,7 @@ use crate::{peripherals, Peri};
|
||||
|
||||
/// XPSI driver config.
|
||||
#[derive(Clone, Copy)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct Config {
|
||||
/// Fifo threshold used by the peripheral to generate the interrupt indicating data
|
||||
/// or space is available in the FIFO
|
||||
@ -80,6 +81,8 @@ impl Default for Config {
|
||||
}
|
||||
|
||||
/// XSPI transfer configuration.
|
||||
#[derive(Clone, Copy)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct TransferConfig {
|
||||
/// Instruction width (IMODE)
|
||||
pub iwidth: XspiWidth,
|
||||
|
Loading…
x
Reference in New Issue
Block a user