Skip to content

Commit 29cc295

Browse files
committed
Add a feature flag to disable the chip version assertion
1 parent 689bdeb commit 29cc295

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ embedded-hal = "0.2.4"
1616
embedded-nal = "0.2.0"
1717
bit_field = "0.10.1"
1818
nb = "1.0.0"
19+
20+
[features]
21+
default = []
22+
no-chip-version-assertion = []

src/uninitialized_device.rs

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ impl<SpiBus: ActiveBus> UninitializedDevice<SpiBus> {
115115
mut host: HostImpl,
116116
mode_options: Mode,
117117
) -> Result<Device<SpiBus, HostImpl>, InitializeError<SpiBus::Error>> {
118+
#[cfg(not(feature = "no-chip-version-assertion"))]
118119
self.assert_chip_version(0x4)?;
119120

120121
// RESET

0 commit comments

Comments
 (0)