1. 04 Dec, 2014 1 commit
    • Damien George's avatar
      stmhal: Overhaul network drivers; has generic network protocol in C. · 29a1ec1b
      Damien George authored
      This patch overhauls the network driver interface.  A generic NIC must
      provide a set of C-level functions to implement low-level socket control
      (eg socket, bind, connect, send, recv).  Doing this, the network and
      usocket modules can then use such a NIC to implement proper socket
      control at the Python level.
      
      This patch also updates the CC3K and WIZNET5K drivers to conform to the
      new interface, and fixes some bugs in the drivers.  They now work
      reasonably well.
      29a1ec1b
  2. 02 Dec, 2014 1 commit
  3. 31 Oct, 2014 1 commit
  4. 29 Oct, 2014 1 commit
  5. 23 Oct, 2014 1 commit
  6. 22 Oct, 2014 1 commit
  7. 12 Oct, 2014 1 commit
  8. 09 Oct, 2014 1 commit
  9. 06 Oct, 2014 1 commit
  10. 02 Oct, 2014 1 commit
  11. 30 Sep, 2014 2 commits
    • Damien George's avatar
      de37775a
    • Damien George's avatar
      stmhal: Add network and usocket module. · 3a1c4c5b
      Damien George authored
      As per issue #876, the network module is used to configure NICs
      (hardware modules) and configure routing.  The usocket module is
      supposed to implement the normal Python socket module and selects the
      underlying NIC using routing logic.
      
      Right now the routing logic is brain dead: first-initialised,
      first-used.  And the routing table is just a list of registered NICs.
      
      cc3k and wiznet5k work, but not at the same time due to C name clashes
      (to be fixed).
      
      Note that the usocket module has alias socket, so that one can import
      socket and it works as normal.  But you can also override socket with
      your own module, using usocket at the backend.
      3a1c4c5b
  12. 25 Sep, 2014 1 commit
  13. 13 Sep, 2014 1 commit
  14. 11 Sep, 2014 1 commit
  15. 07 Sep, 2014 1 commit
  16. 01 Sep, 2014 1 commit
    • Damien George's avatar
      stmhal: Add wiznet5k module, to control WIZnet ethernet adaptor. · bcf041f1
      Damien George authored
      Allows to create socket objects that support TCP and UDP in server and
      client mode.  Interface is very close to standard Python socket class,
      except bind and accept do not work the same (due to hardware not
      supporting them in the usual way).
      
      Not compiled by default.  To compile this module, use:
      make MICROPY_PY_WIZNET5K=1
      bcf041f1
  17. 29 Aug, 2014 1 commit
    • Damien George's avatar
      lib: Add lib and libm, moving current files from stmhal. · 8707ea34
      Damien George authored
      Top-level lib directory is for standard C libraries that we want to
      provide our own versions of (for efficiency and stand-alone reasons).
      It currently has libm in it for math functions.
      
      Also add atanf and atan2f, which addresses issue #837.
      8707ea34
  18. 25 Aug, 2014 1 commit
  19. 24 Aug, 2014 1 commit
  20. 16 Aug, 2014 2 commits
  21. 08 Aug, 2014 2 commits
    • Damien George's avatar
      stmhal/teensy: Use _ instead of - in source file names. · 284efa89
      Damien George authored
      Trying to move towards consistency, let's use _ exclusively in names of
      source files (eg .c, .h, .csv).
      284efa89
    • Dave Hylands's avatar
      Add support for selecting pin alternate functions from python. · 6f418fc1
      Dave Hylands authored
      Converts generted pins to use qstrs instead of string pointers.
      
      This patch also adds the following functions:
      pyb.Pin.names()
      pyb.Pin.af_list()
      pyb.Pin.gpio()
      
      dir(pyb.Pin.board) and dir(pyb.Pin.cpu) also produce useful results.
      
      pyb.Pin now takes kw args.
      
      pyb.Pin.__str__ now prints more useful information about the pin
      configuration.
      
      I found the following functions in my boot.py to be useful:
      ```python
      def pins():
          for pin_name in dir(pyb.Pin.board):
              pin = pyb.Pin(pin_name)
              print('{:10s} {:s}'.format(pin_name, str(pin)))
      
      def af():
          for pin_name in dir(pyb.Pin.board):
              pin = pyb.Pin(pin_name)
              print('{:10s} {:s}'.format(pin_name, str(pin.af_list())))
      ```
      6f418fc1
  22. 06 Aug, 2014 1 commit
    • Damien George's avatar
      stmhal: Update STM32Cube F4 HAL driver to V1.3.0. · 3ef91134
      Damien George authored
      This patch updates ST's HAL to the latest version, V1.3.0, dated 19 June
      2014.  Files were copied verbatim from the ST package.  Only change was
      to suppress compiler warning of unused variables in 4 places.
      
      A lot of the changes from ST are cosmetic: comments and white space.
      Some small code changes here and there, and addition of F411 header.
      
      Main code change is how SysTick interrupt is set: it now has a
      configuration variable to set the priority, so we no longer need to work
      around this (originall in system_stm32f4xx.c).
      3ef91134
  23. 31 Jul, 2014 1 commit
    • Damien George's avatar
      stmhal: Change 0:/ and 1:/ to /flash and /sd; add CWD support. · 65dd7bc1
      Damien George authored
      Some important changes to the way the file system is structured on the
      pyboard:
      
      1. 0: and 1: drive names are now replaced with POSIX inspired
      directories, namely /flash and /sd.
      
      2. Filesystem now supports the notion of a current working directory.
      Supports the standard Python way of manipulating it: os.chdir and
      os.getcwd.
      
      3. On boot up, current directory is /flash if no SD inserted, else /sd
      if SD inserted.  Then runs boot.py and main.py from the current dir.
      This is the same as the old behaviour, but is much more consistent and
      flexible (eg you can os.chdir in boot.py to change where main.py is run
      from).
      
      4. sys.path (for import) is now set to '' (current dir), plus /flash
      and /flash/lib, and then /sd and /sd/lib if SD inserted.  This, along
      with CWD, means that import now works properly.  You can import a file
      from the current directory.
      
      5. os.listdir is fixed to return just the basename, not the full path.
      
      See issue #537 for background and discussion.
      65dd7bc1
  24. 21 Jul, 2014 1 commit
  25. 20 Jun, 2014 1 commit
  26. 18 Jun, 2014 2 commits
  27. 03 Jun, 2014 1 commit
  28. 02 Jun, 2014 1 commit
  29. 03 May, 2014 3 commits
  30. 01 May, 2014 1 commit
  31. 30 Apr, 2014 1 commit
  32. 21 Apr, 2014 1 commit
    • Damien George's avatar
      stmhal: Rename USART to UART. · 75337003
      Damien George authored
      It's really a UART because there is no external clock line (and hence no
      synchronous ability, at least in the implementation of this module).
      USART should be reserved for a module that has "S"ynchronous capabilities.
      
      Also, UART is shorter and easier to type :)
      75337003
  33. 20 Apr, 2014 1 commit
  34. 19 Apr, 2014 1 commit