Fix SPI: shorten timing & simplify API #11

Merged
sb10q merged 9 commits from fix-spi into master 2021-06-23 13:29:36 +08:00

9 Commits (master)

Author SHA1 Message Date
Harry Ho fbcc3778d2 spi: Always delay for NSS setup time
* Fixes the lack of setup time delay of an fixed-byte command that immediately follows an N-byte command.
* Extra 50ns will be inserted in-between fixed-byte commands but should be acceptable.
2021-06-23 12:49:21 +08:00
Harry Ho bb6824b944 nal: Remove delay_ns func pointer 2021-06-04 13:21:02 +08:00
Harry Ho d8b1132b8a examples: Replace delay_ns with cortex-m delay 2021-06-03 15:06:24 +08:00
Harry Ho 999ca5f08a spi: Replace delay_ns func pointer with delay on cortex-m
* SPI NSS nanosecond delays now only takes place on Cortex-M CPUs
2021-06-03 15:03:43 +08:00
Harry Ho 9de8d77a24 Restore embedded_hal DelayUs for device init 2021-06-03 13:38:59 +08:00
Harry Ho ec20970a50 spi: Impose stricter NSS timing 2021-06-03 12:03:35 +08:00
Harry Ho 35b7924431 spi: Add back NSS high delay conditionally based on opcode type 2021-06-03 11:51:09 +08:00
Harry Ho d05d7f91e2 spi: Simplify all reg reads/writes as rw_n() 2021-06-03 11:51:09 +08:00
Harry Ho 27ba42c4fb spi: Introduce certain 1 & 3-byte opcodes to replace reg read/writes 2021-06-03 11:51:09 +08:00