stmhal/modmachine: Initial attempt to add I2C & SPI classes.
In new hardware API, these classes implement master modes of interfaces, and "mode" parameter is not accepted. Trying to implement new HW API in terms of older pyb module leaves variuos corner cases: In new HW API, I2C(1) means "I2C #1 in master mode" (? depends on interpretation), while in old API, it means "I2C #1, with no settings changes". For I2C class, it's easy to make mode optional, because that's last positional param, but for SPI, there's "baudrate" after it (which is inconsistent with I2C, which requires "baudrate" to be kwonly-arg).
Showing
Please register or sign in to comment