libboard_zynq::flash: use only 32-bit spi words in program()

This commit is contained in:
Astro 2019-12-22 03:14:18 +01:00
parent da60be38b1
commit 9199bb7a16
1 changed files with 1 additions and 2 deletions

View File

@ -443,8 +443,7 @@ impl Flash<Manual> {
pub fn program<I: Iterator<Item=u32>>(&mut self, offset: u32, data: I) {
{
let len = 4 + 4 * data.size_hint().0;
let args = Some(SpiWord::W32(((INST_PP as u32) << 24) | (offset as u32)))
.into_iter()
let args = Some(SpiWord::W32(((INST_PP as u32) << 24) | (offset as u32))).into_iter()
.chain(data.map(SpiWord::W32));
self.transfer(args, len);
}