forked from M-Labs/zynq-rs
libboard_zynq::flash: use only 32-bit spi words in program()
This commit is contained in:
parent
da60be38b1
commit
9199bb7a16
|
@ -443,8 +443,7 @@ impl Flash<Manual> {
|
||||||
pub fn program<I: Iterator<Item=u32>>(&mut self, offset: u32, data: I) {
|
pub fn program<I: Iterator<Item=u32>>(&mut self, offset: u32, data: I) {
|
||||||
{
|
{
|
||||||
let len = 4 + 4 * data.size_hint().0;
|
let len = 4 + 4 * data.size_hint().0;
|
||||||
let args = Some(SpiWord::W32(((INST_PP as u32) << 24) | (offset as u32)))
|
let args = Some(SpiWord::W32(((INST_PP as u32) << 24) | (offset as u32))).into_iter()
|
||||||
.into_iter()
|
|
||||||
.chain(data.map(SpiWord::W32));
|
.chain(data.map(SpiWord::W32));
|
||||||
self.transfer(args, len);
|
self.transfer(args, len);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue