aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-03-29 00:55:05 +0200
committerDario Nieuwenhuis <[email protected]>2021-03-29 00:58:58 +0200
commit5b74e326e5da8214eec9360e67f42ff2ca3905e8 (patch)
tree893ea3221e0ca0b6ec1b9685cae40249b12c36ac /embassy-nrf/src
parentb9e709403d8073861ae9f5010ddf2cfa6d90f41e (diff)
nrf/qpsi: make config non_exhaustive
Diffstat (limited to 'embassy-nrf/src')
-rw-r--r--embassy-nrf/src/qspi.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/embassy-nrf/src/qspi.rs b/embassy-nrf/src/qspi.rs
index e05186ab5..033c9e012 100644
--- a/embassy-nrf/src/qspi.rs
+++ b/embassy-nrf/src/qspi.rs
@@ -36,6 +36,7 @@ pub struct DeepPowerDownConfig {
36 pub exit_time: u16, 36 pub exit_time: u16,
37} 37}
38 38
39#[non_exhaustive]
39pub struct Config { 40pub struct Config {
40 pub xip_offset: u32, 41 pub xip_offset: u32,
41 pub read_opcode: ReadOpcode, 42 pub read_opcode: ReadOpcode,
@@ -44,6 +45,18 @@ pub struct Config {
44 pub deep_power_down: Option<DeepPowerDownConfig>, 45 pub deep_power_down: Option<DeepPowerDownConfig>,
45} 46}
46 47
48impl Default for Config {
49 fn default() -> Self {
50 Self {
51 read_opcode: ReadOpcode::READ4IO,
52 write_opcode: WriteOpcode::PP4IO,
53 xip_offset: 0,
54 write_page_size: WritePageSize::_256BYTES,
55 deep_power_down: None,
56 }
57 }
58}
59
47pub struct Qspi<'d, T: Instance> { 60pub struct Qspi<'d, T: Instance> {
48 peri: T, 61 peri: T,
49 irq: T::Interrupt, 62 irq: T::Interrupt,