Showing with 25,112 additions and 3,713 deletions.
  1. +17 −20 .github/workflows/build.yml
  2. +1 −2 .github/workflows/create_website_pr.yml
  3. +1 −1 .github/workflows/pre-commit.yml
  4. +1 −0 .gitignore
  5. +1 −1 CONTRIBUTING.md
  6. +46 −0 Makefile
  7. +5 −6 README.rst
  8. +49 −2 conf.py
  9. +1 −1 docs/README.md
  10. +38 −1 docs/design_guide.rst
  11. +1 −1 docs/porting.rst
  12. +161 −0 docs/redirects.txt
  13. +25 −12 docs/shared_bindings_matrix.py
  14. +16 −0 docs/static/customstyle.css
  15. +0 −641 extmod/machine_i2c.c
  16. +0 −58 extmod/machine_i2c.h
  17. +0 −286 extmod/machine_spi.c
  18. +1 −1 extmod/ulab
  19. +119 −37 locale/ID.po
  20. +98 −37 locale/circuitpython.pot
  21. +98 −37 locale/cs.po
  22. +123 −43 locale/de_DE.po
  23. +44 −34 locale/en_US.po
  24. +56 −36 locale/en_x_pirate.po
  25. +298 −195 locale/es.po
  26. +119 −37 locale/fil.po
  27. +119 −39 locale/fr.po
  28. +119 −37 locale/it_IT.po
  29. +107 −37 locale/ko.po
  30. +121 −39 locale/nl.po
  31. +119 −37 locale/pl.po
  32. +777 −631 locale/pt_BR.po
  33. +119 −37 locale/sv.po
  34. +119 −37 locale/zh_Latn_pinyin.po
  35. +58 −12 ports/atmel-samd/Makefile
  36. +1 −1 ports/atmel-samd/README.rst
  37. +1 −1 ports/atmel-samd/asf4
  38. +24 −0 ports/atmel-samd/asf4_conf/samd51/hpl_sdhc_config.h
  39. +164 −0 ports/atmel-samd/asf4_conf/samd51/peripheral_clk_config.h
  40. +303 −0 ports/atmel-samd/asf4_conf/same54/hpl_adc_config.h
  41. +169 −0 ports/atmel-samd/asf4_conf/same54/hpl_dac_config.h
  42. +7,277 −0 ports/atmel-samd/asf4_conf/same54/hpl_dmac_config.h
  43. +924 −0 ports/atmel-samd/asf4_conf/same54/hpl_gclk_config.h
  44. +104 −0 ports/atmel-samd/asf4_conf/same54/hpl_mclk_config.h
  45. +36 −0 ports/atmel-samd/asf4_conf/same54/hpl_nvmctrl_config.h
  46. +163 −0 ports/atmel-samd/asf4_conf/same54/hpl_osc32kctrl_config.h
  47. +634 −0 ports/atmel-samd/asf4_conf/same54/hpl_oscctrl_config.h
  48. +145 −0 ports/atmel-samd/asf4_conf/same54/hpl_rtc_config.h
  49. +24 −0 ports/atmel-samd/asf4_conf/same54/hpl_sdhc_config.h
  50. +751 −0 ports/atmel-samd/asf4_conf/same54/hpl_sercom_config.h
  51. +18 −0 ports/atmel-samd/asf4_conf/same54/hpl_systick_config.h
  52. +209 −0 ports/atmel-samd/asf4_conf/same54/hpl_tc_config.h
  53. +27 −0 ports/atmel-samd/asf4_conf/same54/hpl_trng_config.h
  54. +413 −0 ports/atmel-samd/asf4_conf/same54/hpl_usb_config.h
  55. +1,170 −0 ports/atmel-samd/asf4_conf/same54/peripheral_clk_config.h
  56. +850 −0 ports/atmel-samd/asf4_conf/same54/usbd_config.h
  57. +1 −1 ports/atmel-samd/bindings/samd/Clock.c
  58. +1 −2 ports/atmel-samd/boards/8086_commander/mpconfigboard.mk
  59. +1 −1 ports/atmel-samd/boards/bdmicro_vina_m0/mpconfigboard.mk
  60. +1 −1 ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk
  61. +1 −1 ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk
  62. +1 −1 ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk
  63. +1 −1 ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk
  64. +1 −1 ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk
  65. +1 −1 ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk
  66. +1 −1 ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk
  67. +2 −0 ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk
  68. +17 −0 ports/atmel-samd/boards/grandcentral_m4_express/pins.c
  69. +1 −1 ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk
  70. +1 −1 ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk
  71. +39 −0 ports/atmel-samd/boards/loc_ber_m4_base_board/board.c
  72. +32 −0 ports/atmel-samd/boards/loc_ber_m4_base_board/mpconfigboard.h
  73. +17 −0 ports/atmel-samd/boards/loc_ber_m4_base_board/mpconfigboard.mk
  74. +49 −0 ports/atmel-samd/boards/loc_ber_m4_base_board/pins.c
  75. +1 −1 ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk
  76. +1 −3 ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk
  77. +39 −0 ports/atmel-samd/boards/same54_xplained/board.c
  78. +33 −0 ports/atmel-samd/boards/same54_xplained/mpconfigboard.h
  79. +14 −0 ports/atmel-samd/boards/same54_xplained/mpconfigboard.mk
  80. +116 −0 ports/atmel-samd/boards/same54_xplained/pins.c
  81. +39 −0 ports/atmel-samd/boards/seeeduino_wio_terminal/board.c
  82. +32 −0 ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.h
  83. +14 −0 ports/atmel-samd/boards/seeeduino_wio_terminal/mpconfigboard.mk
  84. +52 −0 ports/atmel-samd/boards/seeeduino_wio_terminal/pins.c
  85. +1 −1 ports/atmel-samd/boards/shirtty/mpconfigboard.mk
  86. +1 −1 ports/atmel-samd/boards/snekboard/mpconfigboard.mk
  87. +1 −1 ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk
  88. +2 −2 ports/atmel-samd/boards/sparkfun_samd51_thing_plus/mpconfigboard.h
  89. +1 −1 ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk
  90. +1 −1 ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk
  91. +1 −1 ports/atmel-samd/boards/ugame10/mpconfigboard.mk
  92. +2 −3 ports/atmel-samd/boards/winterbloom_big_honking_button/mpconfigboard.mk
  93. +1 −2 ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk
  94. +2 −2 {shared-module → ports/atmel-samd/common-hal}/_pew/PewPew.c
  95. 0 {shared-module → ports/atmel-samd/common-hal}/_pew/PewPew.h
  96. 0 {shared-module → ports/atmel-samd/common-hal}/_pew/__init__.c
  97. 0 {shared-module → ports/atmel-samd/common-hal}/_pew/__init__.h
  98. +10 −10 ports/atmel-samd/common-hal/analogio/AnalogOut.c
  99. +13 −13 ports/atmel-samd/common-hal/audiobusio/I2SOut.c
  100. +10 −10 ports/atmel-samd/common-hal/audiobusio/PDMIn.c
  101. +23 −23 ports/atmel-samd/common-hal/audioio/AudioOut.c
  102. +1 −1 ports/atmel-samd/common-hal/audioio/AudioOut.h
  103. +2 −2 ports/atmel-samd/common-hal/busio/SPI.c
  104. +4 −4 ports/atmel-samd/common-hal/busio/UART.c
  105. +22 −22 ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
  106. +1 −1 ports/atmel-samd/common-hal/frequencyio/FrequencyIn.h
  107. +20 −20 ports/atmel-samd/common-hal/{i2cslave/I2CSlave.c → i2cperipheral/I2CPeripheral.c}
  108. +4 −4 ports/atmel-samd/common-hal/{i2cslave/I2CSlave.h → i2cperipheral/I2CPeripheral.h}
  109. +1 −0 ports/atmel-samd/common-hal/i2cperipheral/__init__.c
  110. +0 −1 ports/atmel-samd/common-hal/i2cslave/__init__.c
  111. +6 −6 ports/atmel-samd/common-hal/microcontroller/Pin.c
  112. +12 −7 ports/atmel-samd/common-hal/microcontroller/Processor.c
  113. +10 −7 ports/atmel-samd/common-hal/neopixel_write/__init__.c
  114. +3 −3 ports/atmel-samd/common-hal/os/__init__.c
  115. +8 −8 ports/atmel-samd/common-hal/pulseio/PWMOut.c
  116. +3 −3 ports/atmel-samd/common-hal/pulseio/PulseIn.c
  117. +2 −2 ports/atmel-samd/common-hal/pulseio/PulseOut.c
  118. +272 −0 ports/atmel-samd/common-hal/sdioio/SDCard.c
  119. +40 −0 ports/atmel-samd/common-hal/sdioio/SDCard.h
  120. 0 ports/atmel-samd/common-hal/sdioio/__init__.c
  121. 0 ports/atmel-samd/common-hal/sdioio/__init__.h
  122. +9 −5 ports/atmel-samd/mpconfigport.h
  123. +2 −0 ports/atmel-samd/mpconfigport.mk
  124. +1 −1 ports/atmel-samd/mphalport.c
  125. +1 −1 ports/atmel-samd/peripherals
  126. +79 −0 ports/atmel-samd/sd_mmc/conf_sd_mmc.h
  127. +1,671 −0 ports/atmel-samd/sd_mmc/sd_mmc.c
  128. +310 −0 ports/atmel-samd/sd_mmc/sd_mmc.h
  129. +1,001 −0 ports/atmel-samd/sd_mmc/sd_mmc_protocol.h
  130. +7 −1 ports/atmel-samd/supervisor/internal_flash.c
  131. +21 −16 ports/atmel-samd/supervisor/port.c
  132. +27 −0 ports/atmel-samd/supervisor/same54_cpu.s
  133. +3 −3 ports/atmel-samd/supervisor/usb.c
  134. +1 −1 ports/atmel-samd/timer_handler.c
  135. +16 −0 ports/cxd56/boards/spresense/pins.c
  136. +1 −1 ports/cxd56/common-hal/busio/SPI.c
  137. +2 −2 ports/cxd56/common-hal/busio/UART.c
  138. +135 −0 ports/cxd56/common-hal/gnss/GNSS.c
  139. +45 −0 ports/cxd56/common-hal/gnss/GNSS.h
  140. 0 ports/cxd56/common-hal/gnss/PositionFix.c
  141. 0 ports/cxd56/common-hal/gnss/SatelliteSystem.c
  142. 0 ports/cxd56/common-hal/gnss/__init__.c
  143. +6 −0 ports/cxd56/common-hal/microcontroller/Pin.c
  144. +6 −0 ports/cxd56/common-hal/microcontroller/Pin.h
  145. +141 −0 ports/cxd56/common-hal/sdioio/SDCard.c
  146. +47 −0 ports/cxd56/common-hal/sdioio/SDCard.h
  147. 0 ports/cxd56/common-hal/sdioio/__init__.c
  148. +175 −0 ports/cxd56/mkspk/elf32.h
  149. +11 −1 ports/cxd56/mkspk/mkspk.h
  150. +13 −8 ports/cxd56/mpconfigport.mk
  151. +1 −1 ports/esp32s2/CMakeLists.txt
  152. +11 −3 ports/esp32s2/Makefile
  153. +5 −7 ports/esp32s2/background.c
  154. +4 −4 ports/esp32s2/boards/espressif_saola_1_wroom/board.c
  155. +0 −3 ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk
  156. +4 −4 ports/esp32s2/boards/espressif_saola_1_wrover/board.c
  157. +0 −3 ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk
  158. +56 −0 ports/esp32s2/boards/unexpectedmaker_feathers2/board.c
  159. +36 −0 ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
  160. +21 −0 ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk
  161. +57 −0 ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c
  162. 0 ports/esp32s2/boards/unexpectedmaker_feathers2/sdkconfig
  163. +228 −0 ports/esp32s2/common-hal/busio/I2C.c
  164. +48 −0 ports/esp32s2/common-hal/busio/I2C.h
  165. +33 −0 ports/esp32s2/common-hal/busio/OneWire.h
  166. +358 −0 ports/esp32s2/common-hal/busio/SPI.c
  167. +62 −0 ports/esp32s2/common-hal/busio/SPI.h
  168. +348 −0 ports/esp32s2/common-hal/busio/UART.c
  169. +49 −0 ports/esp32s2/common-hal/busio/UART.h
  170. +1 −0 ports/esp32s2/common-hal/busio/__init__.c
  171. +2 −2 ports/esp32s2/common-hal/digitalio/DigitalInOut.c
  172. +66 −0 ports/esp32s2/common-hal/displayio/ParallelBus.c
  173. +36 −0 ports/esp32s2/common-hal/displayio/ParallelBus.h
  174. +8 −1 ports/esp32s2/common-hal/microcontroller/Pin.c
  175. +4 −1 ports/esp32s2/common-hal/microcontroller/Pin.h
  176. +1 −1 ports/esp32s2/esp-idf
  177. +6 −6 ports/esp32s2/modules/wroom.c
  178. +7 −7 ports/esp32s2/modules/wrover.c
  179. +6 −6 ports/esp32s2/mpconfigport.mk
  180. +2 −1 ports/esp32s2/mphalport.c
  181. +16 −12 ports/esp32s2/sdkconfig.defaults
  182. +13 −23 ports/esp32s2/supervisor/internal_flash.c
  183. +16 −24 ports/esp32s2/supervisor/port.c
  184. +0 −1 ports/litex/boards/fomu/mpconfigboard.mk
  185. +2 −2 ports/litex/common-hal/digitalio/DigitalInOut.c
  186. +3 −2 ports/litex/mpconfigport.mk
  187. +2 −2 ports/mimxrt10xx/common-hal/busio/SPI.c
  188. +2 −2 ports/mimxrt10xx/common-hal/busio/UART.c
  189. +2 −2 ports/mimxrt10xx/mpconfigport.mk
  190. +2 −0 ports/mimxrt10xx/supervisor/port.c
  191. +2 −1 ports/nrf/boards/pca10100/mpconfigboard.mk
  192. +3 −3 ports/nrf/common-hal/busio/SPI.c
  193. +3 −3 ports/nrf/common-hal/busio/UART.c
  194. +2 −2 ports/nrf/mpconfigport.mk
  195. +19 −19 ports/stm/Makefile
  196. +4 −4 ports/stm/boards/STM32F411_nvm.ld
  197. +8 −2 ports/stm/boards/STM32F746xG_fs.ld
  198. +9 −2 ports/stm/boards/STM32F767_fs.ld
  199. +0 −1 ports/stm/boards/espruino_pico/mpconfigboard.mk
  200. +0 −1 ports/stm/boards/espruino_wifi/mpconfigboard.mk
  201. +0 −1 ports/stm/boards/feather_stm32f405_express/mpconfigboard.mk
  202. +0 −1 ports/stm/boards/meowbit_v121/mpconfigboard.mk
  203. +8 −0 ports/stm/boards/nucleo_f746zg/mpconfigboard.h
  204. +1 −2 ports/stm/boards/nucleo_f746zg/mpconfigboard.mk
  205. +8 −0 ports/stm/boards/nucleo_f767zi/mpconfigboard.h
  206. +1 −2 ports/stm/boards/nucleo_f767zi/mpconfigboard.mk
  207. +8 −0 ports/stm/boards/nucleo_h743zi_2/mpconfigboard.h
  208. +0 −1 ports/stm/boards/nucleo_h743zi_2/mpconfigboard.mk
  209. +8 −0 ports/stm/boards/openmv_h7/mpconfigboard.h
  210. +0 −1 ports/stm/boards/openmv_h7/mpconfigboard.mk
  211. +0 −1 ports/stm/boards/pyb_nano_v2/mpconfigboard.mk
  212. +0 −1 ports/stm/boards/pyboard_v11/mpconfigboard.mk
  213. +0 −1 ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk
  214. +0 −1 ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk
  215. +2 −1 ports/stm/boards/stm32f412zg_discovery/mpconfigboard.mk
  216. +0 −1 ports/stm/boards/stm32f4_discovery/mpconfigboard.mk
  217. +8 −0 ports/stm/boards/stm32f746g_discovery/mpconfigboard.h
  218. +1 −2 ports/stm/boards/stm32f746g_discovery/mpconfigboard.mk
  219. +8 −8 ports/stm/boards/thunderpack/mpconfigboard.h
  220. +0 −1 ports/stm/boards/thunderpack/mpconfigboard.mk
  221. +25 −1 ports/stm/common-hal/busio/I2C.c
  222. +2 −2 ports/stm/common-hal/busio/SPI.c
  223. +3 −3 ports/stm/common-hal/busio/UART.c
  224. +8 −11 ports/stm/common-hal/microcontroller/Pin.c
  225. +41 −38 ports/stm/mpconfigport.mk
  226. +1 −1 ports/stm/st_driver
  227. +0 −5 ports/stm/supervisor/internal_flash.h
  228. +7 −8 ports/stm/supervisor/port.c
  229. +0 −2 ports/unix/Makefile
  230. +52 −35 py/circuitpy_defns.mk
  231. +29 −5 py/circuitpy_mpconfig.h
  232. +11 −2 py/circuitpy_mpconfig.mk
  233. +1 −1 shared-bindings/_bleio/Address.c
  234. +1 −1 shared-bindings/_pew/PewPew.c
  235. +1 −1 shared-bindings/_pew/__init__.c
  236. +11 −3 shared-bindings/bitbangio/I2C.c
  237. +17 −7 shared-bindings/bitbangio/SPI.c
  238. +3 −3 shared-bindings/busio/I2C.c
  239. +15 −7 shared-bindings/busio/SPI.c
  240. +3 −1 shared-bindings/busio/SPI.h
  241. +7 −7 shared-bindings/busio/UART.c
  242. +5 −5 shared-bindings/busio/UART.h
  243. +1 −1 shared-bindings/displayio/Display.c
  244. +1 −1 shared-bindings/displayio/Palette.c
  245. +227 −0 shared-bindings/gnss/GNSS.c
  246. +49 −0 shared-bindings/gnss/GNSS.h
  247. +108 −0 shared-bindings/gnss/PositionFix.c
  248. +19 −27 extmod/machine_spi.h → shared-bindings/gnss/PositionFix.h
  249. +145 −0 shared-bindings/gnss/SatelliteSystem.c
  250. +55 −0 shared-bindings/gnss/SatelliteSystem.h
  251. +53 −0 shared-bindings/gnss/__init__.c
  252. +104 −104 shared-bindings/{i2cslave/I2CSlave.c → i2cperipheral/I2CPeripheral.c}
  253. +13 −13 shared-bindings/{i2cslave/I2CSlave.h → i2cperipheral/I2CPeripheral.h}
  254. +22 −21 shared-bindings/{i2cslave → i2cperipheral}/__init__.c
  255. +1 −1 shared-bindings/index.rst
  256. +12 −0 shared-bindings/microcontroller/Pin.c
  257. +1 −0 shared-bindings/microcontroller/Pin.h
  258. +1 −1 shared-bindings/nvm/ByteArray.c
  259. +4 −7 shared-bindings/rgbmatrix/RGBMatrix.c
  260. +183 −0 shared-bindings/sdcardio/SDCard.c
  261. +30 −0 shared-bindings/sdcardio/SDCard.h
  262. +47 −0 shared-bindings/sdcardio/__init__.c
  263. 0 shared-bindings/sdcardio/__init__.h
  264. +296 −0 shared-bindings/sdioio/SDCard.c
  265. +66 −0 shared-bindings/sdioio/SDCard.h
  266. +47 −0 shared-bindings/sdioio/__init__.c
  267. 0 shared-bindings/sdioio/__init__.h
  268. +17 −0 shared-bindings/ulab/filter/__init__.pyi
  269. +12 −2 shared-module/_bleio/ScanEntry.c
  270. +1 −1 shared-module/board/__init__.c
  271. +4 −0 shared-module/displayio/Display.h
  272. +0 −1 shared-module/displayio/EPaperDisplay.h
  273. +2 −0 shared-module/displayio/Palette.c
  274. +466 −0 shared-module/sdcardio/SDCard.c
  275. +51 −0 shared-module/sdcardio/SDCard.h
  276. 0 shared-module/sdcardio/__init__.c
  277. 0 shared-module/sdcardio/__init__.h
  278. +19 −0 supervisor/shared/external_flash/devices.h
  279. +1 −1 supervisor/shared/flash.c
  280. +1 −1 supervisor/shared/serial.c
  281. +8 −2 supervisor/shared/tick.c
  282. +7 −2 supervisor/supervisor.mk
  283. +0 −15 tests/pyb/halerror.py
  284. +0 −32 tests/pyb/i2c.py
  285. +0 −12 tests/pyb/i2c.py.exp
  286. +0 −50 tests/pyb/i2c_error.py
  287. +0 −33 tests/pyb/spi.py
  288. +0 −14 tests/pyb/spi.py.exp
  289. +12 −8 tests/run-tests
  290. +0 −175 tests/wipy/i2c.py
  291. +0 −51 tests/wipy/i2c.py.exp
  292. +0 −147 tests/wipy/spi.py
  293. +0 −35 tests/wipy/spi.py.exp
  294. +12 −1 tools/build_board_info.py
  295. +5 −5 tools/codestats.sh
  296. +40 −0 tools/mksdiodata.py
  297. +1 −1 tools/pyboard.py
37 changes: 17 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v2
- uses: actions/checkout@v2.2.0
with:
submodules: true
fetch-depth: 0
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
- run: git submodule sync
- run: git submodule foreach git remote -v
- run: git submodule foreach git fetch --recurse-submodules=no origin +refs/tags/*:refs/tags/*
- name: CircuitPython version
run: git describe --dirty --tags
- name: Set up Python 3.8
Expand Down Expand Up @@ -66,8 +63,16 @@ jobs:
working-directory: tests
- name: Stubs
run: make stubs -j2
- uses: actions/upload-artifact@v2
with:
name: stubs
path: circuitpython-stubs*
- name: Docs
run: sphinx-build -E -W -b html . _build/html
- uses: actions/upload-artifact@v2
with:
name: docs
path: _build/html
- name: Translations
run: make check-translate
- name: New boards check
Expand Down Expand Up @@ -110,14 +115,11 @@ jobs:
gcc --version
python3 --version
msgfmt --version
- uses: actions/checkout@v2
- uses: actions/checkout@v2.2.0
with:
submodules: true
fetch-depth: 0
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
- run: git submodule sync
- run: git submodule foreach git remote -v
- run: git submodule foreach git fetch --recurse-submodules=no origin +refs/tags/*:refs/tags/*
- name: CircuitPython version
run: git describe --dirty --tags
- name: Build mpy-cross
Expand Down Expand Up @@ -193,6 +195,7 @@ jobs:
- "itsybitsy_m4_express"
- "itsybitsy_nrf52840_express"
- "kicksat-sprite"
- "loc_ber_m4_base_board"
- "makerdiary_nrf52840_mdk"
- "makerdiary_nrf52840_mdk_usb_dongle"
- "meowbit_v121"
Expand Down Expand Up @@ -235,6 +238,8 @@ jobs:
- "pyruler"
- "robohatmm1_m4"
- "sam32"
- "same54_xplained"
- "seeeduino_wio_terminal"
- "seeeduino_xiao"
- "serpente"
- "shirtty"
Expand Down Expand Up @@ -286,14 +291,11 @@ jobs:
gcc --version
arm-none-eabi-gcc --version
python3 --version
- uses: actions/checkout@v2
- uses: actions/checkout@v2.2.0
with:
submodules: true
fetch-depth: 0
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
- run: git submodule sync
- run: git submodule foreach git remote -v
- run: git submodule foreach git fetch --recurse-submodules=no origin +refs/tags/*:refs/tags/*
- name: mpy-cross
run: make -C mpy-cross -j2
- name: build
Expand Down Expand Up @@ -337,14 +339,11 @@ jobs:
gcc --version
riscv64-unknown-elf-gcc --version
python3 --version
- uses: actions/checkout@v2
- uses: actions/checkout@v2.2.0
with:
submodules: true
fetch-depth: 0
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
- run: git submodule sync
- run: git submodule foreach git remote -v
- run: git submodule foreach git fetch --recurse-submodules=no origin +refs/tags/*:refs/tags/*
- name: mpy-cross
run: make -C mpy-cross -j2
- name: build
Expand All @@ -371,20 +370,18 @@ jobs:
board:
- "espressif_saola_1_wroom"
- "espressif_saola_1_wrover"
- "unexpectedmaker_feathers2"

steps:
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- uses: actions/checkout@v2
- uses: actions/checkout@v2.2.0
with:
submodules: true
fetch-depth: 0
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
- run: git submodule sync
- run: git submodule foreach git remote -v
- run: git submodule foreach git fetch --recurse-submodules=no origin +refs/tags/*:refs/tags/*
- name: CircuitPython version
run: git describe --dirty --tags
- uses: actions/cache@v1
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/create_website_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ jobs:
run: |
gcc --version
python3 --version
- uses: actions/checkout@v2
- uses: actions/checkout@v2.2.0
with:
submodules: true
fetch-depth: 0
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
- run: git submodule foreach git fetch --recurse-submodules=no origin +refs/tags/*:refs/tags/*
- name: CircuitPython version
run: git describe --dirty --tags
- name: Website
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: pre-commit
on:
pull_request:
push:
branches: [master]
branches: [main]

jobs:
pre-commit:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ _build
######################
genrst/
/autoapi/
/shared-bindings/**/*.rst

# ctags and similar
###################
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing
Please note that this project is released with a
[Contributor Code of Conduct](https://github.com/adafruit/circuitpython/blob/master/CODE_OF_CONDUCT.md).
[Contributor Code of Conduct](https://github.com/adafruit/circuitpython/blob/main/CODE_OF_CONDUCT.md).
By participating in this project you agree to abide by its terms. Participation
covers any forum used to converse about CircuitPython including unofficial and official spaces. Failure to do
so will result in corrective actions such as time out or ban from the project.
Expand Down
46 changes: 46 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,49 @@ stubs:
update-frozen-libraries:
@echo "Updating all frozen libraries to latest tagged version."
cd frozen; for library in *; do cd $$library; ../../tools/git-checkout-latest-tag.sh; cd ..; done

one-of-each: samd21 samd51 esp32s2 litex mimxrt10xx nrf stm

samd21:
$(MAKE) -C ports/atmel-samd BOARD=trinket_m0

samd51:
$(MAKE) -C ports/atmel-samd BOARD=feather_m4_express

esp32s2:
$(MAKE) -C ports/esp32s2 BOARD=espressif_saola_1_wroom

litex:
$(MAKE) -C ports/litex BOARD=fomu

mimxrt10xx:
$(MAKE) -C ports/mimxrt10xx BOARD=feather_mimxrt1011

nrf:
$(MAKE) -C ports/nrf BOARD=feather_nrf52840_express

stm:
$(MAKE) -C ports/stm BOARD=feather_stm32f405_express

clean-one-of-each: clean-samd21 clean-samd51 clean-esp32s2 clean-litex clean-mimxrt10xx clean-nrf clean-stm

clean-samd21:
$(MAKE) -C ports/atmel-samd BOARD=trinket_m0 clean

clean-samd51:
$(MAKE) -C ports/atmel-samd BOARD=feather_m4_express clean

clean-esp32s2:
$(MAKE) -C ports/esp32s2 BOARD=espressif_saola_1_wroom clean

clean-litex:
$(MAKE) -C ports/litex BOARD=fomu clean

clean-mimxrt10xx:
$(MAKE) -C ports/mimxrt10xx BOARD=feather_mimxrt1011 clean

clean-nrf:
$(MAKE) -C ports/nrf BOARD=feather_nrf52840_express clean

clean-stm:
$(MAKE) -C ports/stm BOARD=feather_stm32f405_express clean
11 changes: 5 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ Contributing
------------

See
`CONTRIBUTING.md <https://github.com/adafruit/circuitpython/blob/master/CONTRIBUTING.md>`__
`CONTRIBUTING.md <https://github.com/adafruit/circuitpython/blob/main/CONTRIBUTING.md>`__
for full guidelines but please be aware that by contributing to this
project you are agreeing to the `Code of
Conduct <https://github.com/adafruit/circuitpython/blob/master/CODE_OF_CONDUCT.md>`__.
Conduct <https://github.com/adafruit/circuitpython/blob/main/CODE_OF_CONDUCT.md>`__.
Contributors who follow the `Code of
Conduct <https://github.com/adafruit/circuitpython/blob/master/CODE_OF_CONDUCT.md>`__
Conduct <https://github.com/adafruit/circuitpython/blob/main/CODE_OF_CONDUCT.md>`__
are welcome to submit pull requests and they will be promptly reviewed
by project admins. Please join the
`Discord <https://adafru.it/discord>`__ too.
Expand Down Expand Up @@ -96,7 +96,6 @@ CircuitPython:

- 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
Expand Down Expand Up @@ -211,8 +210,8 @@ The remaining port directories not listed above are in the repo to maintain comp

`back to top <#circuitpython>`__

.. |Build Status| image:: https://travis-ci.com/adafruit/circuitpython.svg?branch=master
:target: https://travis-ci.org/adafruit/circuitpython
.. |Build Status| image:: https://github.com/adafruit/circuitpython/workflows/Build%20CI/badge.svg
:target: https://github.com/adafruit/circuitpython/actions?query=branch%3Amain
.. |Doc Status| image:: https://readthedocs.org/projects/circuitpython/badge/?version=latest
:target: http://circuitpython.readthedocs.io/
.. |Discord| image:: https://img.shields.io/discord/327254708534116352.svg
Expand Down
51 changes: 49 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
# serve to show the default.

import json
import sys
import logging
import os
import subprocess
import sys
import urllib.parse

import recommonmark
import subprocess

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -79,6 +81,9 @@
autoapi_options = ['members', 'undoc-members', 'private-members', 'show-inheritance', 'special-members', 'show-module-summary']
autoapi_template_dir = 'docs/autoapi/templates'
autoapi_python_use_implicit_namespaces = True
autoapi_root = "shared-bindings"

redirects_file = 'docs/redirects.txt'

# The encoding of source files.
#source_encoding = 'utf-8-sig'
Expand Down Expand Up @@ -374,5 +379,47 @@
"bus_device": ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None),
"register": ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None)}

# Adapted from sphinxcontrib-redirects
from sphinx.builders import html as builders

TEMPLATE = """<html>
<head><meta http-equiv="refresh" content="0; url=%s"/></head>
</html>
"""


def generate_redirects(app):
path = os.path.join(app.srcdir, app.config.redirects_file)
if not os.path.exists(path):
logging.error("Could not find redirects file at '%s'" % path)
return

if not isinstance(app.builder, builders.StandaloneHTMLBuilder):
logging.warn("The 'sphinxcontib-redirects' plugin is only supported "
"by the 'html' builder and subclasses. Skipping...")
logging.warn(f"Builder is {app.builder.name} ({type(app.builder)})")
return

with open(path) as redirects:
for line in redirects.readlines():
from_path, to_path = line.rstrip().split(' ')

logging.debug("Redirecting '%s' to '%s'" % (from_path, to_path))

from_path = os.path.splitext(from_path)[0] + ".html"
to_path_prefix = '..%s' % os.path.sep * (
len(from_path.split(os.path.sep)) - 1)
to_path = to_path_prefix + to_path

redirected_filename = os.path.join(app.builder.outdir, from_path)
redirected_directory = os.path.dirname(redirected_filename)
if not os.path.exists(redirected_directory):
os.makedirs(redirected_directory)

with open(redirected_filename, 'w') as f:
f.write(TEMPLATE % urllib.parse.quote(to_path, '#/'))

def setup(app):
app.add_css_file("customstyle.css")
app.add_config_value('redirects_file', 'redirects', 'env')
app.connect('builder-inited', generate_redirects)
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The latest documentation can be found at:
http://circuitpython.readthedocs.io/en/latest/

The documentation you see there is generated from the files in the whole tree:
https://github.com/adafruit/circuitpython/tree/master
https://github.com/adafruit/circuitpython/tree/main

Building the documentation locally
----------------------------------
Expand Down
39 changes: 38 additions & 1 deletion docs/design_guide.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.. role:: strike

Design Guide
============

This guide covers a variety of development practices for CircuitPython core and library APIs. These
APIs are both `built-into CircuitPython
<https://github.com/adafruit/circuitpython/tree/master/shared-bindings>`_ and those that are
<https://github.com/adafruit/circuitpython/tree/main/shared-bindings>`_ and those that are
`distributed on GitHub <https://github.com/search?utf8=%E2%9C%93&q=topic%3Acircuitpython&type=>`_
and in the `Adafruit <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_ and `Community
<https://github.com/adafruit/CircuitPython_Community_Bundle/>`_ bundles. Consistency with these
Expand Down Expand Up @@ -46,6 +48,41 @@ not have the ``adafruit_`` module or package prefix.

Both should have the CircuitPython repository topic on GitHub.

Terminology
-----------

As our Code of Conduct states, we strive to use "welcoming and inclusive
language." Whether it is in documentation or in code, the words we use matter.
This means we disfavor language that due to historical and social context can
make community members and potential community members feel unwelcome.

There are specific terms to avoid except where technical limitations require it.
While specific cases may call for other terms, consider using these suggested
terms first:

+--------------------+---------------------+
| Preferred | Deprecated |
+====================+=====================+
| Main (device) | :strike:`Master` |
+--------------------+---------------------+
| Peripheral | :strike:`Slave` |
+--------------------+ +
| Sensor | |
+--------------------+ +
| Secondary (device) | |
+--------------------+---------------------+
| Denylist | :strike:`Blacklist` |
+--------------------+---------------------+
| Allowlist | :strike:`Whitelist` |
+--------------------+---------------------+

Note that "technical limitations" refers e.g., to the situation where an
upstream library or URL has to contain those substrings in order to work.
However, when it comes to documentation and the names of parameters and
properties in CircuitPython, we will use alternate terms even if this breaks
tradition with past practice.


.. _lifetime-and-contextmanagers:

Lifetime and ContextManagers
Expand Down
2 changes: 1 addition & 1 deletion docs/porting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ as a natural "TODO" list. An example minimal build list is shown below:
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CSLAVE = 0
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_DISPLAYIO = 0 # Requires SPI, PulseIO (stub ok)
# These modules are implemented in shared-module/ - they can be included in
Expand Down
Loading