nrf/qpsi: make config non_exhaustive

This commit is contained in:
Dario Nieuwenhuis
2021-03-29 00:55:05 +02:00
parent b9e709403d
commit 5b74e326e5
2 changed files with 14 additions and 8 deletions

View File

@ -36,6 +36,7 @@ pub struct DeepPowerDownConfig {
pub exit_time: u16,
}
#[non_exhaustive]
pub struct Config {
pub xip_offset: u32,
pub read_opcode: ReadOpcode,
@ -44,6 +45,18 @@ pub struct Config {
pub deep_power_down: Option<DeepPowerDownConfig>,
}
impl Default for Config {
fn default() -> Self {
Self {
read_opcode: ReadOpcode::READ4IO,
write_opcode: WriteOpcode::PP4IO,
xip_offset: 0,
write_page_size: WritePageSize::_256BYTES,
deep_power_down: None,
}
}
}
pub struct Qspi<'d, T: Instance> {
peri: T,
irq: T::Interrupt,