Showing with 9,594 additions and 2,278 deletions.
  1. +56 −1 .github/workflows/build.yml
  2. +1 −1 .gitmodules
  3. +1 −1 Makefile
  4. +6 −7 README.rst
  5. +22 −12 extmod/modframebuf.c
  6. +2 −1 extmod/vfs_fat_file.c
  7. +1 −1 frozen/Adafruit_CircuitPython_BusDevice
  8. +1 −1 frozen/Adafruit_CircuitPython_CircuitPlayground
  9. +1 −1 frozen/Adafruit_CircuitPython_Crickit
  10. +1 −1 frozen/Adafruit_CircuitPython_DotStar
  11. +1 −1 frozen/Adafruit_CircuitPython_HID
  12. +1 −1 frozen/Adafruit_CircuitPython_IRRemote
  13. +1 −1 frozen/Adafruit_CircuitPython_LIS3DH
  14. +1 −1 frozen/Adafruit_CircuitPython_Motor
  15. +1 −1 frozen/Adafruit_CircuitPython_NeoPixel
  16. +1 −1 frozen/Adafruit_CircuitPython_SD
  17. +1 −1 frozen/Adafruit_CircuitPython_Thermistor
  18. +1 −1 frozen/Adafruit_CircuitPython_seesaw
  19. +1 −1 frozen/circuitpython-stage
  20. +1 −1 lib/tinyusb
  21. +218 −54 locale/ID.po
  22. +214 −46 locale/circuitpython.pot
  23. +238 −58 locale/de_DE.po
  24. +218 −54 locale/en_US.po
  25. +218 −54 locale/en_x_pirate.po
  26. +245 −59 locale/es.po
  27. +234 −57 locale/fil.po
  28. +246 −60 locale/fr.po
  29. +237 −58 locale/it_IT.po
  30. +218 −54 locale/ko.po
  31. +244 −58 locale/pl.po
  32. +218 −54 locale/pt_BR.po
  33. +247 −58 locale/zh_Latn_pinyin.po
  34. +5 −0 main.c
  35. +6 −1 mpy-cross/.gitignore
  36. +1 −81 mpy-cross/Makefile
  37. +5 −0 mpy-cross/Makefile.static
  38. +6 −0 mpy-cross/Makefile.static-mingw
  39. +8 −0 mpy-cross/Makefile.static-raspbian
  40. +49 −0 mpy-cross/fmode.c
  41. +37 −0 mpy-cross/fmode.h
  42. +5 −1 mpy-cross/main.c
  43. +81 −0 mpy-cross/mpy-cross.mk
  44. +2 −2 ports/atmel-samd/audio_dma.c
  45. +2 −10 ports/atmel-samd/boards/circuitplayground_express/board.c
  46. +2 −0 ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h
  47. +2 −10 ports/atmel-samd/boards/circuitplayground_express_crickit/board.c
  48. +2 −0 ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h
  49. +1 −1 ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk
  50. +2 −10 ports/atmel-samd/boards/circuitplayground_express_displayio/board.c
  51. +2 −0 ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
  52. +0 −1 ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk
  53. +1 −1 ports/atmel-samd/boards/hallowing_m4_express/board.c
  54. +1 −1 ports/atmel-samd/boards/monster_m4sk/board.c
  55. +39 −0 ports/atmel-samd/boards/ndgarage_ndbit6/board.c
  56. +32 −0 ports/atmel-samd/boards/ndgarage_ndbit6/mpconfigboard.h
  57. +15 −0 ports/atmel-samd/boards/ndgarage_ndbit6/mpconfigboard.mk
  58. +39 −0 ports/atmel-samd/boards/ndgarage_ndbit6/pins.c
  59. +1 −1 ports/atmel-samd/boards/openbook_m4/board.c
  60. +1 −1 ports/atmel-samd/boards/pewpew_m4/board.c
  61. +3 −0 ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk
  62. +3 −1 ports/atmel-samd/boards/pybadge/board.c
  63. +2 −0 ports/atmel-samd/boards/pybadge/mpconfigboard.h
  64. +3 −1 ports/atmel-samd/boards/pybadge_airlift/board.c
  65. +2 −0 ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h
  66. +3 −1 ports/atmel-samd/boards/pygamer/board.c
  67. +2 −0 ports/atmel-samd/boards/pygamer/mpconfigboard.h
  68. +3 −1 ports/atmel-samd/boards/pygamer_advance/board.c
  69. +2 −0 ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h
  70. +15 −8 ports/atmel-samd/common-hal/audioio/AudioOut.c
  71. +1 −1 ports/atmel-samd/common-hal/busio/UART.c
  72. +8 −3 ports/atmel-samd/supervisor/port.c
  73. +8 −0 ports/cxd56/supervisor/port.c
  74. +17 −25 ports/mimxrt10xx/Makefile
  75. +2 −1 ports/mimxrt10xx/background.c
  76. +0 −16 ports/mimxrt10xx/boards/feather_mimxrt1011/board.c
  77. +122 −0 ports/mimxrt10xx/boards/feather_mimxrt1011/flash_config.c
  78. +0 −11 ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.h
  79. +1 −14 ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.mk
  80. +0 −16 ports/mimxrt10xx/boards/feather_mimxrt1062/board.c
  81. +122 −0 ports/mimxrt10xx/boards/feather_mimxrt1062/flash_config.c
  82. +0 −8 ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.h
  83. +1 −14 ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.mk
  84. +0 −16 ports/mimxrt10xx/boards/imxrt1010_evk/board.c
  85. +121 −0 ports/mimxrt10xx/boards/imxrt1010_evk/flash_config.c
  86. +0 −17 ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.h
  87. +1 −15 ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk
  88. +25 −5 ports/mimxrt10xx/boards/imxrt1010_evk/pins.c
  89. +39 −0 ports/mimxrt10xx/boards/imxrt1020_evk/board.c
  90. +122 −0 ports/mimxrt10xx/boards/imxrt1020_evk/flash_config.c
  91. +14 −0 ports/mimxrt10xx/boards/imxrt1020_evk/mpconfigboard.h
  92. +8 −0 ports/mimxrt10xx/boards/imxrt1020_evk/mpconfigboard.mk
  93. +84 −0 ports/mimxrt10xx/boards/imxrt1020_evk/pins.c
  94. +39 −0 ports/mimxrt10xx/boards/imxrt1060_evk/board.c
  95. +122 −0 ports/mimxrt10xx/boards/imxrt1060_evk/flash_config.c
  96. +14 −0 ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.h
  97. +8 −0 ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.mk
  98. +128 −0 ports/mimxrt10xx/boards/imxrt1060_evk/pins.c
  99. +0 −106 ports/mimxrt10xx/boards/mimxrt1011-bootloader-external-flash.ld
  100. +0 −123 ports/mimxrt10xx/boards/mimxrt1011-external-flash.ld
  101. +0 −106 ports/mimxrt10xx/boards/mimxrt1062-bootloader-external-flash.ld
  102. +39 −0 ports/mimxrt10xx/boards/teensy40/board.c
  103. +1 −0 ports/mimxrt10xx/boards/teensy40/board.ld
  104. +126 −0 ports/mimxrt10xx/boards/teensy40/flash_config.c
  105. +18 −0 ports/mimxrt10xx/boards/teensy40/mpconfigboard.h
  106. +8 −0 ports/mimxrt10xx/boards/teensy40/mpconfigboard.mk
  107. +87 −0 ports/mimxrt10xx/boards/teensy40/pins.c
  108. +4 −2 ports/mimxrt10xx/common-hal/microcontroller/__init__.c
  109. +2 −0 ports/mimxrt10xx/linking/chip_family/MIMXRT1011.ld
  110. +2 −0 ports/mimxrt10xx/linking/chip_family/MIMXRT1021.ld
  111. +2 −0 ports/mimxrt10xx/linking/chip_family/MIMXRT1062.ld
  112. +154 −0 ports/mimxrt10xx/linking/common.ld
  113. +1 −0 ports/mimxrt10xx/linking/flash/AT25SF128A.ld
  114. +1 −0 ports/mimxrt10xx/linking/flash/IS25LP064A.ld
  115. +1 −0 ports/mimxrt10xx/linking/flash/IS25WP064A.ld
  116. +1 −0 ports/mimxrt10xx/linking/flash/W25Q16JV.ld
  117. +1 −0 ports/mimxrt10xx/linking/flash/W25Q64JV.ld
  118. +11 −1 ports/mimxrt10xx/mpconfigport.h
  119. +14 −3 ports/mimxrt10xx/mpconfigport.mk
  120. +1 −1 ports/mimxrt10xx/mphalport.c
  121. +0 −31 ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/clocks.c
  122. +341 −0 ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/clocks.c
  123. +218 −0 ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c
  124. +43 −0 ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.h
  125. +128 −0 ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.c
  126. +129 −0 ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.h
  127. +0 −28 ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/clocks.c
  128. +1 −1 ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c
  129. +2 −0 ports/mimxrt10xx/peripherals/mimxrt10xx/periph.h
  130. +2 −0 ports/mimxrt10xx/peripherals/mimxrt10xx/pins.h
  131. +1 −1 ports/mimxrt10xx/reset.c
  132. +0 −2 ports/mimxrt10xx/reset.h
  133. +1 −1 ports/mimxrt10xx/sdk
  134. +0 −9 ports/mimxrt10xx/supervisor/flexspi_nor_flash_ops.c
  135. +6 −4 ports/mimxrt10xx/supervisor/internal_flash.c
  136. +237 −18 ports/mimxrt10xx/supervisor/port.c
  137. +4 −0 ports/mimxrt10xx/supervisor/usb.c
  138. +26 −0 ports/nrf/Makefile
  139. +3 −0 ports/nrf/bluetooth/ble_drv.c
  140. +0 −2 ports/nrf/bluetooth/ble_drv.h
  141. +3 −0 ports/nrf/boards/circuitplayground_bluefruit/board.c
  142. +3 −1 ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h
  143. +4 −4 ports/nrf/boards/clue_nrf52840_express/board.c
  144. +2 −1 ports/nrf/boards/clue_nrf52840_express/mpconfigboard.h
  145. +14 −2 ports/nrf/boards/clue_nrf52840_express/pins.c
  146. +4 −5 ports/nrf/boards/common.template.ld
  147. +10 −19 shared-bindings/_pixelbuf/types.h → ports/nrf/boards/feather_bluefruit_sense/board.c
  148. +70 −0 ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.h
  149. +10 −0 ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk
  150. +58 −0 ports/nrf/boards/feather_bluefruit_sense/pins.c
  151. +5 −5 ports/nrf/boards/ohs2020_badge/board.c
  152. +2 −2 ports/nrf/boards/ohs2020_badge/mpconfigboard.h
  153. +1 −1 ports/nrf/boards/ohs2020_badge/mpconfigboard.mk
  154. +6 −0 ports/nrf/boards/ohs2020_badge/pins.c
  155. +4 −0 ports/nrf/boards/particle_argon/mpconfigboard.mk
  156. +4 −0 ports/nrf/boards/particle_boron/mpconfigboard.mk
  157. +4 −0 ports/nrf/boards/particle_xenon/mpconfigboard.mk
  158. +25 −6 ports/nrf/common-hal/_bleio/Adapter.c
  159. +1 −1 ports/nrf/common-hal/_bleio/Adapter.h
  160. +7 −3 ports/nrf/common-hal/_bleio/__init__.c
  161. +6 −5 ports/nrf/common-hal/_bleio/bonding.c
  162. +2 −2 ports/nrf/common-hal/busio/SPI.c
  163. +30 −0 ports/nrf/common-hal/microcontroller/__init__.c
  164. +12 −6 ports/nrf/common-hal/neopixel_write/__init__.c
  165. +14 −4 ports/nrf/peripherals/nrf/nrf52840/power.c
  166. +8 −3 ports/nrf/supervisor/port.c
  167. +34 −16 ports/stm32f4/Makefile
  168. +106 −0 ports/stm32f4/boards/STM32F401_boot.ld
  169. +107 −0 ports/stm32f4/boards/STM32F401_fs.ld
  170. +107 −0 ports/stm32f4/boards/STM32F405_boot.ld
  171. +107 −0 ports/stm32f4/boards/STM32F405_default.ld
  172. 0 ports/stm32f4/boards/{STM32F405.ld → STM32F405_fs.ld}
  173. +5 −0 ports/stm32f4/boards/feather_stm32f405_express/mpconfigboard.h
  174. +6 −3 ports/stm32f4/boards/feather_stm32f405_express/mpconfigboard.mk
  175. +121 −0 ports/stm32f4/boards/meowbit_v121/board.c
  176. +47 −0 ports/stm32f4/boards/meowbit_v121/mpconfigboard.h
  177. +24 −0 ports/stm32f4/boards/meowbit_v121/mpconfigboard.mk
  178. +68 −0 ports/stm32f4/boards/meowbit_v121/pins.c
  179. +440 −0 ports/stm32f4/boards/meowbit_v121/stm32f4xx_hal_conf.h
  180. +44 −0 ports/stm32f4/boards/openocd_stm32f4.cfg
  181. +1 −2 ports/stm32f4/boards/pyb_nano_v2/mpconfigboard.mk
  182. +2 −3 ports/stm32f4/boards/pyboard_v11/mpconfigboard.mk
  183. +448 −0 ports/stm32f4/boards/startup_stm32f401xe.s
  184. +1 −2 ports/stm32f4/boards/stm32f411ce_blackpill/mpconfigboard.mk
  185. +0 −1 ports/stm32f4/boards/stm32f411ce_blackpill/pins.c
  186. +1 −2 ports/stm32f4/boards/stm32f411ve_discovery/mpconfigboard.mk
  187. +1 −2 ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.mk
  188. +12 −0 ports/stm32f4/common-hal/busio/SPI.c
  189. +1 −0 ports/stm32f4/common-hal/microcontroller/Pin.c
  190. +1 −1 ports/stm32f4/common-hal/microcontroller/__init__.c
  191. +6 −9 ports/stm32f4/common-hal/pulseio/PWMOut.c
  192. +6 −0 ports/stm32f4/peripherals/stm32f4/periph.h
  193. +6 −2 ports/stm32f4/peripherals/stm32f4/pins.h
  194. +61 −0 ports/stm32f4/peripherals/stm32f4/stm32f401xe/clocks.c
  195. +52 −0 ports/stm32f4/peripherals/stm32f4/stm32f401xe/gpio.c
  196. +173 −0 ports/stm32f4/peripherals/stm32f4/stm32f401xe/periph.c
  197. +57 −0 ports/stm32f4/peripherals/stm32f4/stm32f401xe/periph.h
  198. +123 −0 ports/stm32f4/peripherals/stm32f4/stm32f401xe/pins.c
  199. +121 −0 ports/stm32f4/peripherals/stm32f4/stm32f401xe/pins.h
  200. +5 −0 ports/stm32f4/supervisor/internal_flash.h
  201. +8 −1 ports/stm32f4/supervisor/port.c
  202. +1 −1 ports/stm32f4/supervisor/usb.c
  203. +31 −4 ports/stm32f4/system_stm32f4xx.c
  204. +1 −0 py/emitnative.c
  205. +3 −1 py/map.c
  206. +2 −1 py/mpstate.c
  207. +2 −1 py/obj.c
  208. +3 −2 py/objdict.c
  209. +14 −8 py/objexcept.c
  210. +3 −1 py/objfun.c
  211. +15 −15 py/objlist.c
  212. +2 −2 py/objstr.c
  213. +1 −8 py/objtype.c
  214. +3 −1 py/qstr.c
  215. +14 −4 py/runtime.c
  216. +7 −4 py/runtime.h
  217. +5 −0 py/sequence.c
  218. +3 −1 py/vm.c
  219. +3 −1 py/vmentrytable.h
  220. +1 −1 shared-bindings/_bleio/Characteristic.c
  221. +2 −2 shared-bindings/_bleio/PacketBuffer.c
  222. +127 −200 shared-bindings/_pixelbuf/PixelBuf.c
  223. +17 −18 shared-bindings/_pixelbuf/PixelBuf.h
  224. +4 −31 shared-bindings/_pixelbuf/__init__.c
  225. +0 −1 shared-bindings/_pixelbuf/__init__.h
  226. +8 −3 shared-bindings/_stage/__init__.c
  227. +1 −1 shared-bindings/displayio/I2CDisplay.c
  228. +10 −2 shared-bindings/displayio/Palette.c
  229. +237 −69 shared-module/_pixelbuf/PixelBuf.c
  230. +29 −8 shared-module/_pixelbuf/PixelBuf.h
  231. +5 −1 shared-module/_stage/__init__.c
  232. +2 −1 shared-module/_stage/__init__.h
  233. +129 −248 shared-module/audiomixer/Mixer.c
  234. +3 −3 shared-module/audiomixer/MixerVoice.c
  235. +1 −1 shared-module/audiomixer/MixerVoice.h
  236. +8 −0 shared-module/displayio/__init__.c
  237. +42 −0 supervisor/linker.h
  238. +6 −0 supervisor/port.h
  239. +49 −0 supervisor/shared/board.c
  240. +38 −0 supervisor/shared/board.h
  241. +16 −16 supervisor/shared/external_flash/spi_flash.c
  242. +1 −1 supervisor/shared/filesystem.c
  243. +5 −2 supervisor/shared/memory.c
  244. +3 −0 supervisor/shared/safe_mode.c
  245. +1 −0 supervisor/shared/safe_mode.h
  246. +7 −0 supervisor/shared/stack.c
  247. +5 −3 supervisor/shared/tick.c
  248. +4 −0 supervisor/spi_flash_api.h
  249. +1 −0 supervisor/supervisor.mk
  250. +2 −1 tools/build_board_info.py
  251. +1 −1 tools/uf2
57 changes: 56 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
python-version: 3.5
- name: Install deps
run: |
sudo apt-get install -y gettext librsvg2-bin
sudo apt-get install -y eatmydata
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64
pip install requests sh click setuptools cpp-coveralls Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml
- name: Versions
run: |
Expand Down Expand Up @@ -66,6 +67,54 @@ jobs:
run: python3 -u ci_new_boards_check.py
working-directory: tools

- name: Build mpy-cross.static-raspbian
run: make -C mpy-cross -j2 -f Makefile.static-raspbian
- uses: actions/upload-artifact@v1.0.0
with:
name: mpy-cross.static-raspbian
path: mpy-cross/mpy-cross.static-raspbian

- name: Build mpy-cross.static
run: make -C mpy-cross -j2 -f Makefile.static
- uses: actions/upload-artifact@v1.0.0
with:
name: mpy-cross.static-amd64-linux
path: mpy-cross/mpy-cross.static

- name: Build mpy-cross.static-mingw
run: make -C mpy-cross -j2 -f Makefile.static-mingw
- uses: actions/upload-artifact@v1.0.0
with:
name: mpy-cross.static-x64-windows
path: mpy-cross/mpy-cross.static.exe

mpy-cross-mac:
runs-on: macos-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Install deps
run: |
brew link --force gettext
- name: Versions
run: |
gcc --version
python3 --version
msgfmt --version
- uses: actions/checkout@v1
with:
submodules: true
- name: CircuitPython version
run: git describe --dirty --always --tags
- name: Build mpy-cross
run: make -C mpy-cross -j2
- uses: actions/upload-artifact@v1.0.0
with:
name: mpy-cross-macos-catalina
path: mpy-cross/mpy-cross

build-arm:
runs-on: ubuntu-16.04
needs: test
Expand Down Expand Up @@ -95,6 +144,7 @@ jobs:
- "electronut_labs_blip"
- "electronut_labs_papyr"
- "escornabot_makech"
- "feather_bluefruit_sense"
- "feather_m0_adalogger"
- "feather_m0_basic"
- "feather_m0_express"
Expand All @@ -113,19 +163,23 @@ jobs:
- "hallowing_m0_express"
- "hallowing_m4_express"
- "imxrt1010_evk"
- "imxrt1020_evk"
- "imxrt1060_evk"
- "itsybitsy_m0_express"
- "itsybitsy_m4_express"
- "itsybitsy_nrf52840_express"
- "kicksat-sprite"
- "makerdiary_nrf52840_mdk"
- "makerdiary_nrf52840_mdk_usb_dongle"
- "meowbit_v121"
- "meowmeow"
- "metro_m0_express"
- "metro_m4_airlift_lite"
- "metro_m4_express"
- "metro_nrf52840_express"
- "mini_sam_m4"
- "monster_m4sk"
- "ndgarage_ndbit6"
- "ohs2020_badge"
- "openbook_m4"
- "particle_argon"
Expand Down Expand Up @@ -163,6 +217,7 @@ jobs:
- "stm32f411ve_discovery"
- "stm32f412zg_discovery"
- "stringcar_m0_express"
- "teensy40"
- "teknikio_bluebird"
- "trellis_m4_express"
- "trinket_m0"
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@
url = https://github.com/adafruit/Adafruit_MP3
[submodule "ports/mimxrt10xx/sdk"]
path = ports/mimxrt10xx/sdk
url = https://github.com/arturo182/MIMXRT10xx_SDK
url = https://github.com/adafruit/MIMXRT10xx_SDK
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(BASEOPTS)
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(BASEOPTS)

TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/nrf py shared-bindings shared-module supervisor
TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/mimxrt10xx ports/nrf ports/stm32f4 py shared-bindings shared-module supervisor

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext stubs

Expand Down
13 changes: 6 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,12 @@ Differences from `MicroPython <https://github.com/micropython/micropython>`__

CircuitPython:

- includes ports for MicroChip SAMD21 (Commonly known as M0 in Adafruit
product names) and SAMD51 (M4).
- supports only SAMD21, SAMD51, and nRF52840 ports.
- tracks MicroPython's releases (not master).
- floats (aka decimals) are enabled for all builds.
- error messages are translated into 10+ languages.
- does not support concurrency within Python (including interrupts and threading). Some concurrency
- Supports native USB on all boards, allowing file editing without special tools.
- Supports only SAMD21, SAMD51, nRF52840, CXD56, STM32F4 and i.MX RT ports.
- Tracks MicroPython's releases (not master).
- Floats (aka decimals) are enabled for all builds.
- Error messages are translated into 10+ languages.
- Does not support concurrency within Python (including interrupts and threading). Some concurrency
is achieved with native modules for tasks that require it such as audio file playback.

Behavior
Expand Down
34 changes: 22 additions & 12 deletions extmod/modframebuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <string.h>

#include "py/runtime.h"
#include "py/objtype.h"
#include "py/proto.h"

#if MICROPY_PY_FRAMEBUF
Expand Down Expand Up @@ -304,17 +305,26 @@ STATIC mp_obj_t framebuf_make_new(const mp_obj_type_t *type, size_t n_args, cons
return MP_OBJ_FROM_PTR(o);
}

STATIC const mp_obj_type_t mp_type_framebuf;

// Helper to ensure we have the native super class instead of a subclass.
static mp_obj_framebuf_t* native_framebuf(mp_obj_t framebuf_obj) {
mp_obj_t native_framebuf = mp_instance_cast_to_native_base(framebuf_obj, &mp_type_framebuf);
mp_obj_assert_native_inited(native_framebuf);
return MP_OBJ_TO_PTR(native_framebuf);
}

STATIC mp_int_t framebuf_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) {
(void)flags;
mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(self_in);
mp_obj_framebuf_t *self = native_framebuf(self_in);
bufinfo->buf = self->buf;
bufinfo->len = self->stride * self->height * (self->format == FRAMEBUF_RGB565 ? 2 : 1);
bufinfo->typecode = 'B'; // view framebuf as bytes
return 0;
}

STATIC mp_obj_t framebuf_fill(mp_obj_t self_in, mp_obj_t col_in) {
mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(self_in);
mp_obj_framebuf_t *self = native_framebuf(self_in);
mp_int_t col = mp_obj_get_int(col_in);
formats[self->format].fill_rect(self, 0, 0, self->width, self->height, col);
return mp_const_none;
Expand All @@ -324,7 +334,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(framebuf_fill_obj, framebuf_fill);
STATIC mp_obj_t framebuf_fill_rect(size_t n_args, const mp_obj_t *args) {
(void)n_args;

mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(args[0]);
mp_obj_framebuf_t *self = native_framebuf(args[0]);
mp_int_t x = mp_obj_get_int(args[1]);
mp_int_t y = mp_obj_get_int(args[2]);
mp_int_t width = mp_obj_get_int(args[3]);
Expand All @@ -338,7 +348,7 @@ STATIC mp_obj_t framebuf_fill_rect(size_t n_args, const mp_obj_t *args) {
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(framebuf_fill_rect_obj, 6, 6, framebuf_fill_rect);

STATIC mp_obj_t framebuf_pixel(size_t n_args, const mp_obj_t *args) {
mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(args[0]);
mp_obj_framebuf_t *self = native_framebuf(args[0]);
mp_int_t x = mp_obj_get_int(args[1]);
mp_int_t y = mp_obj_get_int(args[2]);
if (0 <= x && x < self->width && 0 <= y && y < self->height) {
Expand All @@ -357,7 +367,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(framebuf_pixel_obj, 3, 4, framebuf_pi
STATIC mp_obj_t framebuf_hline(size_t n_args, const mp_obj_t *args) {
(void)n_args;

mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(args[0]);
mp_obj_framebuf_t *self = native_framebuf(args[0]);
mp_int_t x = mp_obj_get_int(args[1]);
mp_int_t y = mp_obj_get_int(args[2]);
mp_int_t w = mp_obj_get_int(args[3]);
Expand All @@ -372,7 +382,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(framebuf_hline_obj, 5, 5, framebuf_hl
STATIC mp_obj_t framebuf_vline(size_t n_args, const mp_obj_t *args) {
(void)n_args;

mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(args[0]);
mp_obj_framebuf_t *self = native_framebuf(args[0]);
mp_int_t x = mp_obj_get_int(args[1]);
mp_int_t y = mp_obj_get_int(args[2]);
mp_int_t h = mp_obj_get_int(args[3]);
Expand All @@ -387,7 +397,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(framebuf_vline_obj, 5, 5, framebuf_vl
STATIC mp_obj_t framebuf_rect(size_t n_args, const mp_obj_t *args) {
(void)n_args;

mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(args[0]);
mp_obj_framebuf_t *self = native_framebuf(args[0]);
mp_int_t x = mp_obj_get_int(args[1]);
mp_int_t y = mp_obj_get_int(args[2]);
mp_int_t w = mp_obj_get_int(args[3]);
Expand All @@ -406,7 +416,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(framebuf_rect_obj, 6, 6, framebuf_rec
STATIC mp_obj_t framebuf_line(size_t n_args, const mp_obj_t *args) {
(void)n_args;

mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(args[0]);
mp_obj_framebuf_t *self = native_framebuf(args[0]);
mp_int_t x1 = mp_obj_get_int(args[1]);
mp_int_t y1 = mp_obj_get_int(args[2]);
mp_int_t x2 = mp_obj_get_int(args[3]);
Expand Down Expand Up @@ -470,8 +480,8 @@ STATIC mp_obj_t framebuf_line(size_t n_args, const mp_obj_t *args) {
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(framebuf_line_obj, 6, 6, framebuf_line);

STATIC mp_obj_t framebuf_blit(size_t n_args, const mp_obj_t *args) {
mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(args[0]);
mp_obj_framebuf_t *source = MP_OBJ_TO_PTR(args[1]);
mp_obj_framebuf_t *self = native_framebuf(args[0]);
mp_obj_framebuf_t *source = native_framebuf(args[1]);
mp_int_t x = mp_obj_get_int(args[2]);
mp_int_t y = mp_obj_get_int(args[3]);
mp_int_t key = -1;
Expand Down Expand Up @@ -513,7 +523,7 @@ STATIC mp_obj_t framebuf_blit(size_t n_args, const mp_obj_t *args) {
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(framebuf_blit_obj, 4, 5, framebuf_blit);

STATIC mp_obj_t framebuf_scroll(mp_obj_t self_in, mp_obj_t xstep_in, mp_obj_t ystep_in) {
mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(self_in);
mp_obj_framebuf_t *self = native_framebuf(self_in);
mp_int_t xstep = mp_obj_get_int(xstep_in);
mp_int_t ystep = mp_obj_get_int(ystep_in);
int sx, y, xend, yend, dx, dy;
Expand Down Expand Up @@ -546,7 +556,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_3(framebuf_scroll_obj, framebuf_scroll);

STATIC mp_obj_t framebuf_text(size_t n_args, const mp_obj_t *args) {
// extract arguments
mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(args[0]);
mp_obj_framebuf_t *self = native_framebuf(args[0]);
const char *str = mp_obj_str_get_str(args[1]);
mp_int_t x0 = mp_obj_get_int(args[2]);
mp_int_t y0 = mp_obj_get_int(args[3]);
Expand Down
3 changes: 2 additions & 1 deletion extmod/vfs_fat_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#if MICROPY_VFS && MICROPY_VFS_FAT

#include <stdio.h>
#include <string.h>

#include "py/runtime.h"
#include "py/stream.h"
Expand Down Expand Up @@ -199,7 +200,7 @@ STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_ar
FRESULT res = f_open(&vfs->fatfs, &o->fp, fname, mode);
if (res != FR_OK) {
m_del_obj(pyb_file_obj_t, o);
mp_raise_OSError(fresult_to_errno_table[res]);
mp_raise_OSError_errno_str(fresult_to_errno_table[res], args[0].u_obj);
}
// If we're reading, turn on fast seek.
if (mode == FA_READ) {
Expand Down
2 changes: 1 addition & 1 deletion frozen/Adafruit_CircuitPython_BusDevice
2 changes: 1 addition & 1 deletion frozen/Adafruit_CircuitPython_HID
2 changes: 1 addition & 1 deletion frozen/Adafruit_CircuitPython_SD
2 changes: 1 addition & 1 deletion frozen/circuitpython-stage
2 changes: 1 addition & 1 deletion lib/tinyusb
Submodule tinyusb updated 108 files
Loading