Skip to content

Commit 98674d5

Browse files
committed
to match w25q datasheet
1 parent 858163f commit 98674d5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

examples/qspi-w25q.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ where
123123
QspiReadCommand::new(data, QspiMode::QuadChannel)
124124
.instruction(0xEB, QspiMode::SingleChannel)
125125
.address(address, QspiMode::QuadChannel)
126-
.dummy_cycles(6),
126+
// the M0-M7 bits will be send by alternate_bytes, and the value should be 0xFX
127+
.alternate_bytes(&[0xFF], QspiMode::QuadChannel)
128+
.dummy_cycles(4),
127129
)?;
128130

129131
Ok(())
@@ -135,7 +137,9 @@ where
135137
.instruction(0xEB, QspiMode::SingleChannel)
136138
.address_mode(QspiMode::QuadChannel)
137139
.data_mode(QspiMode::QuadChannel)
138-
.dummy_cycles(6),
140+
// the M0-M7 bits will be send by alternate_bytes, and the value should be 0xFX
141+
.alternate_bytes(&[0xFF], QspiMode::QuadChannel)
142+
.dummy_cycles(4),
139143
)
140144
}
141145
}

0 commit comments

Comments
 (0)