Commit Graph

12081 Commits

Author SHA1 Message Date
Dan Halbert ee896cdd41 restore I2C and UART. Don't do port.c resets and inits for modules that are not available. 2018-05-24 20:20:18 -04:00
Dan Halbert 7380e077ae
Merge pull request #871 from tannewt/remove_old_nvm_code
Remove asf3 nvm code.
2018-05-24 16:59:35 -04:00
Scott Shawcroft 42bf3a1306 Remove asf3 nvm code. 2018-05-24 13:14:40 -07:00
Dan Halbert b9f36184f5 refine pirkey build 2018-05-24 13:28:03 -04:00
Damien George 15ddc20436 stm32: Add new component, the mboot bootloader.
Mboot is a custom bootloader for STM32 MCUs.  It can provide a USB DFU
interface on either the FS or HS peripherals, as well as a custom I2C
bootloader interface.
2018-05-24 23:21:19 +10:00
Damien George f47eeab0ad stm32: Add low-level hardware I2C slave driver. 2018-05-24 23:11:13 +10:00
Damien George 4200018a05 stm32: Remove unneeded HTML release notes from usbdev and usbhost dirs.
These files provide no additional information, all the version and license
information is captured in the relevant files in these subdirectories.

Thanks to @JoeSc for the original patch.
2018-05-24 11:28:54 +10:00
Dan Halbert 083f91363a pirkey APA102 defs were commented out in mpconfigboard.h 2018-05-23 18:21:07 -04:00
Dan Halbert ff592ac791
Merge pull request #864 from pewpew-game/master
Multiple fixes in gamepad
2018-05-23 16:26:20 -04:00
Scott Shawcroft 8e6feecf11
Merge pull request #863 from dhalbert/3.0_doc_updates
RTD documentation updates
2018-05-23 12:57:34 -07:00
Radomir Dopieralski 42e36a883b Remove volatile from the gamepad struct 2018-05-23 21:49:20 +02:00
Radomir Dopieralski f17a235b40 Raise an error if more than 8 buttons passed to gamepad 2018-05-23 21:41:56 +02:00
Radomir Dopieralski 240678e714 Avoid uninitialized gamepad on exception
Raise exceptions before the gamepad_singleton is created.
Also, use mp_raise for creating the exceptions.
2018-05-23 21:39:06 +02:00
Dan Halbert 65cfbda79b
Merge pull request #866 from tannewt/touchio3
Use merged in FreeTouch
2018-05-23 15:29:53 -04:00
Dan Halbert 2fd9e9a744
Merge pull request #865 from tannewt/fix_rtd_build
Fix ReadTheDocs build due to c2rst.
2018-05-23 15:15:21 -04:00
Dan Halbert bbdca2f352 typos in builtins.rst 2018-05-23 15:07:32 -04:00
Dan Halbert 6a63ff096a ustruct -> struct in design_guide.rst 2018-05-23 15:05:38 -04:00
Scott Shawcroft aa86a1457f Use merged in FreeTouch 2018-05-23 11:57:35 -07:00
Scott Shawcroft 27551cbb4d Fix ReadTheDocs build due to c2rst. 2018-05-23 11:53:00 -07:00
Dan Halbert 079c20e58e use shared-bindings struct doc; remove docs/library one 2018-05-23 14:24:02 -04:00
Dan Halbert 6af5fc2796
Merge pull request #861 from tannewt/touchio3
Turn on touchio for M0 boards.
2018-05-23 14:20:15 -04:00
Scott Shawcroft 641caaa6dd Gain space back in non-Express builds by using -finline-limit 2018-05-23 10:36:59 -07:00
Radomir Dopieralski edf2935ab1 Make gamepad.get_pressed work when gamepad was created from frozen code
For some reason, when the GamePad is created from frozen code, the
get_pressed method would always return 0. This fixes it, and makes it
work properly no matter how the object was created.
2018-05-23 12:44:22 +02:00
Radomir Dopieralski 52d05bbc37 Cache pullup state in gamepad
Don't check the pin's pull direction on every tick, instead cache it
at the beginning. Also avoid a "can't get pull of output pin" error
when one of the pins passed is in output mode.
2018-05-23 11:26:16 +02:00
Damien George df9b7e8f24 esp32/esp32.custom_common.ld: Put soc code in iram0.
This is what the IDF does, it must be done.
2018-05-23 12:57:50 +10:00
Dan Halbert 20a13fa9fb fix title underline 2018-05-22 21:21:19 -04:00
Dan Halbert 59615fc993 add caveat language re MicroPython libraries; other slight changes 2018-05-22 20:49:08 -04:00
Dan Halbert e65cc07764 RTD documentation updates 2018-05-22 19:52:01 -04:00
Scott Shawcroft e274a02ff0
Merge pull request #862 from tannewt/contributing_update
Update CONTRIBUTING.md to include new learn guides and Dan and
2018-05-22 16:34:23 -07:00
Scott Shawcroft 783ffe6824 Update CONTRIBUTING.md to include new learn guides and Dan and
Kattni's info.

Fixes #858
2018-05-22 14:32:27 -07:00
Scott Shawcroft 3607d3ba2c Correctly reset the PTC 2018-05-22 14:20:35 -07:00
Scott Shawcroft 31bcd1c45c Fixup gclk init 2018-05-22 13:56:12 -07:00
Scott Shawcroft 99123a8621 Turn on touchio for M0 boards. M4 will come later once its supported
by FreeTouch.

Fixes #670
2018-05-22 13:49:08 -07:00
Dan Halbert 22405d6bdb
Merge pull request #860 from dhalbert/3.0-cpx-crickit
turn off longint on cpx crickit; update frozen libs
2018-05-22 16:28:42 -04:00
Scott Shawcroft 165b28438a
Merge pull request #854 from python-ugame/extra-override
Allow overriding EXTRA_BUILTIN_MODULES in mpconfigboard.h
2018-05-22 10:22:35 -07:00
Dan Halbert 0d7db29630 turn off longint on cpx crickit; update frozen libs 2018-05-22 13:03:13 -04:00
Scott Shawcroft 422525fa4c
Merge pull request #859 from dhalbert/3.0-cpx-crickit
refactor longint settings; make crickit cpx build
2018-05-22 09:59:21 -07:00
Damien George 18e6358480 py/emit: Combine setup with/except/finally into one emit function.
This patch reduces code size by:

   bare-arm:   -16
minimal x86:  -156
   unix x64:  -288
unix nanbox:  -184
      stm32:   -48
     cc3200:   -16
    esp8266:   -96
      esp32:   -16

The last 10 patches combined reduce code size by:

   bare-arm:  -164
minimal x86: -1260
   unix x64: -3416
unix nanbox: -1616
      stm32:  -676
     cc3200:  -232
    esp8266: -1144
      esp32:  -268
2018-05-23 00:35:16 +10:00
Damien George 436e0d4c54 py/emit: Merge build set/slice into existing build emit function.
Reduces code size by:

   bare-arm:    +0
minimal x86:    +0
   unix x64:  -368
unix nanbox:  -248
      stm32:  -128
     cc3200:   -48
    esp8266:  -184
      esp32:   -40
2018-05-23 00:23:36 +10:00
Damien George d97906ca9a py/emit: Combine import from/name/star into one emit function.
Change in code size is:

   bare-arm:    +4
minimal x86:   -88
   unix x64:  -456
unix nanbox:   -88
      stm32:   -44
     cc3200:    +0
    esp8266:  -104
      esp32:    +8
2018-05-23 00:23:08 +10:00
Damien George 8a513da5a5 py/emit: Combine break_loop and continue_loop into one emit function.
Reduces code size by:

   bare-arm:    +0
minimal x86:    +0
   unix x64:   -80
unix nanbox:    +0
      stm32:   -12
     cc3200:    +0
    esp8266:   -28
      esp32:    +0
2018-05-23 00:23:04 +10:00
Damien George 6211d979ee py/emit: Combine load/store/delete attr into one emit function.
Reduces code size by:

   bare-arm:   -20
minimal x86:  -140
   unix x64:  -408
unix nanbox:  -140
      stm32:   -68
     cc3200:   -16
    esp8266:   -80
      esp32:   -32
2018-05-23 00:22:59 +10:00
Damien George a4941a8ba4 py/emit: Combine load/store/delete subscr into one emit function.
Reduces code size by:

   bare-arm:    -8
minimal x86:  -104
   unix x64:  -312
unix nanbox:  -120
      stm32:   -60
     cc3200:   -16
    esp8266:   -92
      esp32:   -24
2018-05-23 00:22:55 +10:00
Damien George d298013939 py/emit: Combine name and global into one func for load/store/delete.
Reduces code size by:

   bare-arm:   -56
minimal x86:  -300
   unix x64:  -576
unix nanbox:  -300
      stm32:  -164
     cc3200:   -56
    esp8266:  -236
      esp32:   -76
2018-05-23 00:22:47 +10:00
Damien George 26b5754092 py/emit: Combine build tuple/list/map emit funcs into one.
Reduces code size by:

   bare-arm:   -24
minimal x86:  -192
   unix x64:  -288
unix nanbox:  -184
      stm32:   -72
     cc3200:   -16
    esp8266:  -148
      esp32:   -32
2018-05-23 00:22:44 +10:00
Damien George e686c94052 py/emit: Combine yield value and yield-from emit funcs into one.
Reduces code size by:

   bare-arm:   -24
minimal x86:   -72
   unix x64:  -200
unix nanbox:   -72
      stm32:   -52
     cc3200:   -32
    esp8266:   -84
      esp32:   -24
2018-05-23 00:22:35 +10:00
Damien George 0a25fff956 py/emit: Combine fast and deref into one function for load/store/delete.
Reduces code size by:

   bare-arm:   -16
minimal x86:  -208
   unix x64:  -408
unix nanbox:  -248
      stm32:   -12
     cc3200:   -24
    esp8266:   -96
      esp32:   -44
2018-05-23 00:22:20 +10:00
Dan Halbert 49a81d5c4b LONGLONG typo 2018-05-22 09:35:29 -04:00
Dan Halbert 45db48bbaa make longint choice mechanism more readable 2018-05-22 08:04:14 -04:00
Damien George 400273a799 py/objgenerator: Protect against reentering a generator.
Generators that are already executing cannot be reexecuted.  This patch
puts in a check for such a case.

Thanks to @jepler for finding the bug.
2018-05-22 16:54:03 +10:00