Skip to content
Snippets Groups Projects
  1. Jul 31, 2017
  2. Jul 18, 2017
    • Alexander Steffen's avatar
      all: Unify header guard usage. · 299bc625
      Alexander Steffen authored
      The code conventions suggest using header guards, but do not define how
      those should look like and instead point to existing files. However, not
      all existing files follow the same scheme, sometimes omitting header guards
      altogether, sometimes using non-standard names, making it easy to
      accidentally pick a "wrong" example.
      
      This commit ensures that all header files of the MicroPython project (that
      were not simply copied from somewhere else) follow the same pattern, that
      was already present in the majority of files, especially in the py folder.
      
      The rules are as follows.
      
      Naming convention:
      * start with the words MICROPY_INCLUDED
      * contain the full path to the file
      * replace special characters with _
      
      In addition, there are no empty lines before #ifndef, between #ifndef and
      one empty line before #endif. #endif is followed by a comment containing
      the name of the guard macro.
      
      py/grammar.h cannot use header guards by design, since it has to be
      included multiple times in a single C file. Several other files also do not
      need header guards as they are only used internally and guaranteed to be
      included only once:
      * MICROPY_MPHALPORT_H
      * mpconfigboard.h
      * mpconfigport.h
      * mpthreadport.h
      * pin_defs_*.h
      * qstrdefs*.h
      299bc625
  3. Oct 14, 2016
  4. Jun 18, 2016
  5. May 26, 2016
    • Paul Sokolovsky's avatar
      extmod/virtpin: Initial implementation of open-ended C-level Pin interface. · 751e3b7a
      Paul Sokolovsky authored
      Using usual method of virtual method tables. Single virtual method,
      ioctl, is defined currently for all operations. This universal and
      extensible vtable-based method is also defined as a default MPHAL
      GPIO implementation, but a specific port may override it with its
      own implementation (e.g. close-ended, but very efficient, e.g. avoiding
      virtual method dispatch).
      751e3b7a
  6. May 20, 2016
  7. Oct 31, 2015
    • Damien George's avatar
      all: Add py/mphal.h and use it in all ports. · 731f3592
      Damien George authored
      py/mphal.h contains declarations for generic mp_hal_XXX functions, such
      as stdio and delay/ticks, which ports should provide definitions for.  A
      port will also provide mphalport.h with further HAL declarations.
      731f3592
  8. Oct 27, 2015
  9. Oct 18, 2015
  10. May 27, 2015
  11. Apr 03, 2015
    • Damien George's avatar
      pic16bit: Initial version of port to 16-bit PIC family. · 43ea73fa
      Damien George authored
      Reference MCU is dsPIC33J256GP506 with 256k ROM and 8k RAM, on the dsPIC
      DSC Starter Kit board.  The REPL works, GC works, pyb module has LED and
      Switch objects.  It passes some tests from the test suite (most it can't
      run because it doesn't have the Python features enabled).
      43ea73fa
  12. May 03, 2014
    • Damien George's avatar
      Add license header to (almost) all files. · 04b9147e
      Damien George authored
      Blanket wide to all .c and .h files.  Some files originating from ST are
      difficult to deal with (license wise) so it was left out of those.
      
      Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
      04b9147e
  13. Apr 21, 2014
    • Damien George's avatar
      stmhal: Make switch a class, to follow suit of all other modules. · 6125ba4a
      Damien George authored
      Instead of pyb.switch() as a function, it's more consistent (with
      respect to all the other modules and peripherals) to have
      pyb.Switch() create a switch object.  This then generalises to having
      multiple switches.  Call the object to get its state.  Use sw.callback
      to set the callback function for when the switch is pressed.
      6125ba4a
  14. Mar 30, 2014
    • Damien George's avatar
      stmhal: Implement selector for USB device mode; improve boot up. · 038df431
      Damien George authored
      Can now choose at boot up whether the USB device is CDC+MSC or CDC+HID.
      Choice is made by an option in boot.py, with default being CDC+MSC.
      HID+MSC is not currently supported, but should be easy to implement.
      
      Boot up now has ability to change the reset mode: hold down USR switch
      while booting and LEDs will count from 1 to 7 to indicate the boot mode.
      Release USR when correct mode is selected.  Current modes are 1 (normal
      boot), 2 (safe mode), 3 (reset FS mode).
      038df431
  15. Mar 15, 2014
  16. Jan 05, 2014
Loading