aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-03-30 10:21:51 +0000
committerGitHub <[email protected]>2023-03-30 10:21:51 +0000
commitd3fb9ddf3374acb7772bf5da16f15fb4e5534958 (patch)
tree3994a282807a4d3b80dbf2bab6e9d047e05edeef /src
parentfe57e4d9f8f42ec2803758b52ea29a813208ef8e (diff)
parentb2d63d851df68effce2c4ef7276139380a496c88 (diff)
Merge pull request #57 from kbleeke/faster-pio2
Maximum pio speed
Diffstat (limited to 'src')
-rw-r--r--src/bus.rs2
-rw-r--r--src/consts.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/bus.rs b/src/bus.rs
index 65caea8ec..add346b2f 100644
--- a/src/bus.rs
+++ b/src/bus.rs
@@ -74,7 +74,7 @@ where
74 // 32-bit word length, little endian (which is the default endianess). 74 // 32-bit word length, little endian (which is the default endianess).
75 self.write32_swapped( 75 self.write32_swapped(
76 REG_BUS_CTRL, 76 REG_BUS_CTRL,
77 WORD_LENGTH_32 | HIGH_SPEED | INTERRUPT_HIGH | WAKE_UP | STATUS_ENABLE, 77 WORD_LENGTH_32 | HIGH_SPEED | INTERRUPT_HIGH | WAKE_UP | STATUS_ENABLE | INTERRUPT_WITH_STATUS,
78 ) 78 )
79 .await; 79 .await;
80 80
diff --git a/src/consts.rs b/src/consts.rs
index 6ed7feb92..fee2d01ab 100644
--- a/src/consts.rs
+++ b/src/consts.rs
@@ -16,7 +16,8 @@ pub(crate) const WORD_LENGTH_32: u32 = 0x1;
16pub(crate) const HIGH_SPEED: u32 = 0x10; 16pub(crate) const HIGH_SPEED: u32 = 0x10;
17pub(crate) const INTERRUPT_HIGH: u32 = 1 << 5; 17pub(crate) const INTERRUPT_HIGH: u32 = 1 << 5;
18pub(crate) const WAKE_UP: u32 = 1 << 7; 18pub(crate) const WAKE_UP: u32 = 1 << 7;
19pub(crate) const STATUS_ENABLE: u32 = 0x10000; 19pub(crate) const STATUS_ENABLE: u32 = 1 << 16;
20pub(crate) const INTERRUPT_WITH_STATUS: u32 = 1 << 17;
20 21
21// SPI_STATUS_REGISTER bits 22// SPI_STATUS_REGISTER bits
22pub(crate) const STATUS_DATA_NOT_AVAILABLE: u32 = 0x00000001; 23pub(crate) const STATUS_DATA_NOT_AVAILABLE: u32 = 0x00000001;