fix(spi_master): make the address field more intuitive to use.

The address field should be placed at the highest bits of address and slv_wr_status registers. Instead of breaking the address into two parts and fill in each register, move the address to the highest bits and write to the registers respectively.

Breaking change: if you fill-in the SPI address filed in a previous version in some way and it works correctly, you still have to rewrite the address, in a more intuitive way.
This commit is contained in:
michael
2017-08-01 16:00:58 +08:00
parent 8f44efc619
commit ed1d084aea
4 changed files with 14 additions and 7 deletions

View File

@@ -36,7 +36,7 @@ typedef volatile struct {
};
uint32_t val;
} cmd;
uint32_t addr; /*addr to slave / from master */
uint32_t addr; /*addr to slave / from master. SPI transfer from the MSB to the LSB. If length > 32 bits, then address continues from MSB of slv_wr_status.*/
union {
struct {
uint32_t reserved0: 10; /*reserved*/