riscv-rust / k210-pac

Peripheral access API crate (PAC) for K210 SoC, generated by svd2rust
29 stars 23 forks source link

SPI: remove incorrect constraint for addr length #18

Closed laanwj closed 5 years ago

laanwj commented 5 years ago

Address length is 0..60 according to the configASSERT, the value is in 4-bit units so the value can be 0..15 which covers all values for these four bits.

Edit: though thinking of it, if there is a practical constraint it's probably 0..8, it looks like the maximum transfer unit is 32 bits in practice, no idea how it could handle 64.

Disasm commented 5 years ago

Thanks! SVD file contains the same constraint for SPI3. Seems like it should be removed too.

laanwj commented 5 years ago

Agreed, removed that one too (I've noticed that this doesn't affect the generated Rust code at all, but anyhow, I suppose it might after a future svd2rust update)

Disasm commented 5 years ago

Yes, I hope so.