Skip to content
  • Damien George's avatar
    stmhal: Improve USART class, to be more like SPI and I2C. · 3771a097
    Damien George authored
    The three classes I2C, SPI and USART now have a fairly uniform (Python)
    API.  All are constructed, initialised and deinitialised in the same
    way.  They can have most of their parameters set, using keyword arguments.
    All have send and recv (although slightly different with I2C requiring an
    address in master mode).  recv can do inplace receiving (ie store the
    data in a previously-created bytearray).
    It's just polling mode at the moment, but interrupt and DMA would be
    nice to add.