Refactor SPI and fix write bug

* SPI write v2 was hanging in write due to an infinite loop
* SPI word write was not followed by a read back

The u8 and u16 write/read logic have been refactored into write_word and
read_word.
This commit is contained in:
Ulf Lilleengen
2021-05-27 23:05:42 +02:00
parent c4ea7427fa
commit edec5833b3
2 changed files with 59 additions and 106 deletions

View File

@ -12,6 +12,7 @@ use crate::gpio::Pin;
pub enum Error {
Framing,
Crc,
ModeFault,
Overrun,
}