1. 20 May, 2019 4 commits
    • Damien George's avatar
    • Damien George's avatar
      extmod/machine_i2c: Change C-level API to allow split I2C transactions. · 606ea2b1
      Damien George authored
      API is:
      
          int transfer(
              mp_obj_base_t *obj,
              uint16_t addr,
              size_t n,
              mp_machine_i2c_buf_t *bufs,
              unsigned int flags
          )
      606ea2b1
    • Damien George's avatar
      docs/machine.I2C: Add writevto method to write a vector of byte bufs. · 8bec0e86
      Damien George authored
      This allows to efficiently send to an I2C slave data that is made up of
      more than one buffer.  Instead of needing to allocate temporary memory to
      combine buffers together this new method allows to pass in a tuple or list
      of buffers.  The name is based on the POSIX function writev() which has
      similar intentions and signature.
      
      The reasons for taking this approach (compared to having an interface with
      separate start/write/stop methods) are:
      - It's a backwards compatible extension.
      - It's convenient for the user.
      - It's efficient because there is only one Python call, then the C code can
        do everything in one go.
      - It's efficient on the I2C bus because the implementation can do
        everything in one go without pauses between blocks of bytes.
      - It should be possible to implement this extension in all ports, for
        hardware and software I2C.
      
      Further discussion is found in issue #3482, PR #4020 and PR #4763.
      8bec0e86
    • Damien George's avatar
      stm32/adc: Fix VBAT_DIV to be 4 for STM32F411. · 1f63e9b7
      Damien George authored
      Fixes issue #4794.
      1f63e9b7
  2. 17 May, 2019 4 commits
  3. 15 May, 2019 6 commits
  4. 14 May, 2019 4 commits
  5. 13 May, 2019 4 commits
  6. 10 May, 2019 2 commits
  7. 09 May, 2019 4 commits
  8. 08 May, 2019 2 commits
  9. 07 May, 2019 4 commits
    • Damien George's avatar
      stm32: Move factory reset files and code to separate source file. · 97753a1b
      Damien George authored
      The new function factory_reset_make_files() populates the given filesystem
      with the default factory files.  It is defined with weak linkage so it can
      be overridden by a board.
      
      This commit also brings some minor user-facing changes:
      
      - boot.py is now no longer created unconditionally if it doesn't exist, it
        is now only created when the filesystem is formatted and the other files
        are populated (so, before, if the user deleted boot.py it would be
        recreated at next boot; now it won't be).
      
      - pybcdc.inf and README.txt are only created if the board has USB, because
        they only really make sense if the filesystem is exposed via USB.
      97753a1b
    • Damien George's avatar
      stm32/machine_uart: Change default UART timeout to 0, for non blocking. · 34942d0a
      Damien George authored
      It's more common to need non-blocking behaviour when reading from a UART,
      rather than having a large timeout like 1000ms (the original behaviour).
      With a large timeout it's 1) likely that the function will read forever if
      characters keep trickling it; or 2) the function will unnecessarily wait
      when characters come sporadically, eg at a REPL prompt.
      34942d0a
    • Damien George's avatar
      mpy-cross: Add --version command line option to print version info. · 7e90e22e
      Damien George authored
      Prints something like:
      
      MicroPython v1.10-304-g8031b7a2 on 2019-05-02; mpy-cross emitting mpy v4
      7e90e22e
    • Mike Causer's avatar
      docs/esp8266: Add tutorial for APA102 LEDs. · 6323cbda
      Mike Causer authored
      6323cbda
  10. 06 May, 2019 3 commits
  11. 03 May, 2019 3 commits