• Paul Sokolovsky's avatar
    stmhal/modmachine: Initial attempt to add I2C & SPI classes. · 16d42368
    Paul Sokolovsky authored
    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
    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).