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

master
Astro 2019-12-22 03:14:18 +01:00
rodzic da60be38b1
commit 9199bb7a16
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -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);
}