Commit Graph

7008 Commits

Author SHA1 Message Date
Kong Wai Weng
b06ec0a776 Added libraries dependency. 2021-05-30 09:57:00 +08:00
root
a2b220370e Fix formatting issue 2021-05-29 12:26:41 -05:00
root
760e8c77bd Changes to correct repeat playing on a channel 2021-05-29 11:55:10 -05:00
Jeff Epler
6b476c19ba fix formatting 2021-05-29 08:10:10 -05:00
Kong Wai Weng
ebe4d90ac3 Updated the copyright information. 2021-05-29 10:12:22 +08:00
Jeff Epler
b0dd0e344c
Merge pull request #4772 from EmergReanimator/atmel-samd
[resolves #4771] DEBUG UART supported on ATMSAME5x
2021-05-28 20:05:06 -06:00
Jeff Epler
49db85cb3d Check that select firmwares build on Windows with MSYS2
This configuration is used by @ladyada and more often than it should
we've discovered late that a change introduced problems building
there.

By adding this to regular CI, hopefully we learn about and fix these
issues sooner rather than later.
2021-05-28 16:47:29 -05:00
Lucian Copeland
feff243e8f Add RTC deep sleep alarm support 2021-05-28 13:52:05 -04:00
Kong Wai Weng
ebda9e07f4 Use 4 spaces instead of tab. 2021-05-29 01:04:13 +08:00
Kong Wai Weng
bfcb8c5896 Do not use neopixel as status LED. Also removed the unused definition. 2021-05-29 00:47:14 +08:00
Kong Wai Weng
5920ac647a Modified the essential files for Maker Pi RP2040. 2021-05-28 22:42:54 +08:00
Kong Wai Weng
321e5dd16f Use underscore instead of dash for board name. 2021-05-28 18:01:02 +08:00
Damien George
db8704ecbd esp8266,esp32: Update manifest to point to new dirs in micropython-lib.
Following a refactoring of micropython-lib.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-28 18:32:56 +10:00
Lucian Copeland
24041f34b0 Merge remote-tracking branch 'upstream/main' into rp2040-alarms 2021-05-27 18:40:40 -04:00
Lucian Copeland
8e1892ac6f Implement RP2040 Alarm module
Adds light and deep sleep functionality for the TimeAlarm and PinAlarm
alarm categories. Adds board deinit for all platforms.
2021-05-27 18:33:29 -04:00
Damien George
211c3e41f1 stm32/boards/PYBD_SF2: Disable GCC 11 warnings for array bounds.
With GCC 11 there is now a warning about array bounds of OTP-mac, due to
the OTP being a literal address.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-27 23:57:51 +10:00
Kong Wai Weng
da7c74f614 Initial commit. 2021-05-27 18:02:52 +08:00
Damien George
62f75376dd stm32/boards/NUCLEO_L432KC: Fix FS size and enable LFS1 filesystem.
Signed-off-by: Damien George <damien@micropython.org>
2021-05-27 12:18:41 +10:00
Dan Halbert
6e71f6099f
Merge pull request #4812 from dhalbert/remove-a-few-boards
Remove non-product Adafruit boards
2021-05-26 18:22:26 -04:00
Dan Halbert
5eb4cc6489 Remove non-product Adafruit boards 2021-05-26 16:01:17 -04:00
Jeff Epler
11288c1c28 esp32s2: Add rgbmatrix support 2021-05-26 11:21:59 -05:00
Jeff Epler
4de8fa09ab esp32s2: peripherals: store address of timer peripheral in its struct
.. this is helpful if we need to go down to the esp-idf low level
I/O routines
2021-05-26 11:18:02 -05:00
Jeff Epler
60c9a57815 esp32s2: Add pin_number, reset_pin_number needed by rgbmatrix 2021-05-26 11:18:02 -05:00
Jeff Epler
6750d3feab esp32s2: Introduce, use NO_PIN
GPIO_NUM_NC is -1 so it's equivalent to the existing code.
2021-05-26 11:18:02 -05:00
Damien George
0abf6f830c esp8266/boards/GENERIC_512K: Add custom manifest without FS modules.
The 512k build does not have a filesystem so there is no reason to include
the filesystem-related modules.  This commit provides a custom manifest.py
for this board which no longer includes: _boot.py, flashbdev.py,
inisetup.py, upip.py, upip_utarfile.py.  This cuts the build down by about
9k of flash.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-26 21:41:40 +10:00
Damien George
b84406f313 qemu-arm: Add support for Cortex-A9 via sabrelite board.
Signed-off-by: Damien George <damien@micropython.org>
2021-05-26 16:24:00 +10:00
root
24e641a834 Fix for Issue #4266 2021-05-25 16:06:00 -05:00
robert-hh
c732b80f05 mimxrt: Extend the Pin module for SoftI2C, SoftSPI support.
This change consists mostly of changing and extending the required
definitions in mphalport.h.
2021-05-25 20:43:52 +02:00
Dan Halbert
d79d68705b
Merge pull request #4763 from jepler/esp32s2-build-memory-info
Add build_memory_info for esp32s2
2021-05-25 13:41:35 -04:00
Jeff Epler
f21eec5fe1 Work for non-psram builds
This is more or less a complete re-organization of the code.

 * Use the actual byte size of the .bin file as the flash size,
   as the algorithm for packing sections into the flash is complicated
 * Match each section to a data region & find the high water mark in the
   region
 * Report on all the RAM regions, separately

Note that elftools is a requirement of esp-idf and so does not need to
be listed in our requirements.txt.
2021-05-25 10:06:31 -05:00
Philipp Ebensberger
c326d9a67b mimxrt: Enable built-in help. 2021-05-26 00:12:45 +10:00
Philipp Ebensberger
ff5d39529c mimxrt: Implement machine.Pin class.
- modified pin type from pin_obj_t to machine_pin_obj_t
- created machine_pin.c
- implemented basic version of make-pins.py to genertate pins.c/.h files
  automatically; the only alternate function currently supported is GPIO
- added af.csv files for all supported MCUs
- replaced pins.c/pins.h files with pin.csv for all boards
- implemented on/off/high/low/value/init methods
- Implemented IN/OUT/OPEN_DRAIN modes
- modified LDFLAGS for DEBUG build to get usefull .elf file for debugging

Signed-off-by: Philipp Ebensberger
2021-05-26 00:12:42 +10:00
Scott Shawcroft
038c9d6194
Merge pull request #4796 from Neradoc/nera-pwmrgb-status-pimoroni
Enable the PWM status LED on Pimoroni Tiny 2040 and PicoSystem
2021-05-24 13:30:55 -07:00
lady ada
2e90d5ed07 clang a bit 2021-05-22 12:39:42 -04:00
lady ada
d52f149e84 add ESP CS pin to make wifi demos easier 2021-05-22 12:22:28 -04:00
lady ada
ac855afb48 Some pin neatening and updated PID to unused Adafruit one! 2021-05-22 11:57:46 -04:00
BlitzCityDIY
14dbec7c04 Merge branch 'main' of https://github.com/blitzcitydiy/circuitpython into main 2021-05-22 01:02:21 -04:00
BlitzCityDIY
9f4eb48e70 Updating MISO
While testing WIFI realized MISO was defined incorrectly
2021-05-22 01:02:06 -04:00
BlitzCityDIY
352281e23e Adding Arduino Nano RP2040 Connect
Re-commiting to fix local GitHub config issues. Adding CircuitPython support for the Arduino Nano RP2040 Connect. Have tested all digital and analog I/O, I2C, onboard LSM6DSOX. Uses the AT25SF128A external flash.
2021-05-21 20:44:11 -04:00
Neradoc
6808d04d53 enable the PWM status LED on Pimonoroni Tiny 2040 and PicoSystem 2021-05-21 20:13:30 +02:00
Kevin Matocha
b14d573655 reduce SPI display baudrate from 60 MHz to 5 MHz to reduce display glitch 2021-05-20 21:23:59 -05:00
Scott Shawcroft
561ffec693
Merge remote-tracking branch 'adafruit/main' into simplify_status_led 2021-05-20 13:46:42 -07:00
Dan Halbert
f5aa55c247
Merge pull request #4606 from hierophect/sleep-revamp
Internal API revisions to sleep
2021-05-20 16:00:52 -04:00
Lucian Copeland
af43f956d3 Merge remote-tracking branch 'upstream/main' into sleep-revamp 2021-05-20 15:56:34 -04:00
Scott Shawcroft
5643355e90
Merge remote-tracking branch 'adafruit/main' into simplify_status_led 2021-05-20 08:35:15 -07:00
Damien George
ea81bcf1c0 stm32/mboot: Leave bootloader from thread mode, not from IRQ.
Leaving the bootloader from an IRQ (eg USB or I2C IRQ) will not work if
MBOOT_LEAVE_BOOTLOADER_VIA_RESET is disabled, ie if mboot jumps directly to
the application.  This is because the CPU will still be in IRQ state when
the application starts and IRQs of lower priority will be blocked.

Fix this by setting a flag when the bootloader should finish, and exit the
bootloader always from the main (top level) thread.

This also improves the USB behaviour of mboot: it no longer abruptly
disconnects when the manifest command is sent.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-21 00:46:01 +10:00
Damien George
748339b281 stm32/uart: Configure pull-up only on RX and CTS, not TX and RTS.
RX and CTS are the input pins and pull-ups are enabled so they don't cause
a problem if left unconnected.  But the output pins don't need a pull up
(they were originally all configured with pull up in commit
8f7491a109).

If needed, the pull-ups can be disabled in Python using machine.Pin after
the UART is constructed.

See issue #4369.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-21 00:38:04 +10:00
Damien George
a96afae90f stm32/sdio: Fix case of SDIO DMA turning off mid transfer.
The DMA driver will turn off DMA if it hasn't been used for an amount of
time (to save power).  The SDIO driver for cyw43 WLAN was not informing the
DMA driver that it was using DMA and there was a chance that the DMA would
turn off in the middle of an SDIO DMA transfer.  The symptoms of this would
be printing of SDIO error messages and a failure to communicate with the
cyw43 WLAN module.

This commit fixes this issue by changing the SDIO driver to use the
dma_nohal_XXX API to initialise and start the DMA.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-21 00:08:13 +10:00
Mike Causer
47b778332a all: Replace busses with buses.
"buses" is the widely accepted plural form of "bus".
2021-05-20 23:22:03 +10:00
Mike Causer
1ca66efbf7 stm32/boards: Add VCC_GND_F407ZG board. 2021-05-20 23:17:51 +10:00
Mike Causer
c24003abec stm32/boards: Add VCC_GND_F407VE board. 2021-05-20 23:15:56 +10:00
Dan Halbert
74355e8281
Merge pull request #4783 from tannewt/fix_sm_rp2040_7
Fix safe mode on rp2040 (in 7.x)
2021-05-20 09:02:35 -04:00
Scott Shawcroft
499a4388cf
Handle inverted neopixel power 2021-05-19 17:29:02 -07:00
Scott Shawcroft
42ee48ccb5
Improve error for invalid parameters 2021-05-19 14:09:11 -07:00
Scott Shawcroft
ee7a701487
Switch to start_advertising arg 2021-05-19 12:21:48 -07:00
gabewillen
e29158483e
Update Adapter.h
Added the tx_power to the adapter object
2021-05-19 11:56:49 -07:00
gabewillen
6b39df406a
Update Adapter.c
Added support for setting transmitter power currently done during every time advertising starts as implemented in the Arduino library
2021-05-19 11:55:47 -07:00
Scott Shawcroft
b78e9fcd19
Improve STM reset reason
This causes safe mode to skip the wait for reset when waking up
from an alarm. (It also means we don't flash the LED for it.)
2021-05-19 11:48:02 -07:00
EmergReanimator
7805392b9e
Update UART.c
Incorporating feedback: https://github.com/adafruit/circuitpython/pull/4772#discussion_r634112839
2021-05-19 20:19:16 +02:00
Scott Shawcroft
642fbcf87a
Handle status led power
This no longer turns on status LED power before running user code.
Therefore, use of the status LED on some boards will also have to
enable the power.
2021-05-19 10:57:14 -07:00
Scott Shawcroft
9dabe882f1
Fix safe mode on rp2040 2021-05-19 10:18:43 -07:00
Scott Shawcroft
14a550c395
Merge pull request #4770 from ladyada/main
Add rev A of macropad definition
2021-05-19 10:09:19 -07:00
Dan Halbert
4c928acbd4
Merge pull request #4774 from kamtom480/spresense_usb_fix
spresense: Fix USB CDC and MSC
2021-05-19 12:42:08 -04:00
lady ada
9a70aa1e8d figure out the AREF thing later 2021-05-18 22:20:38 -04:00
Limor "Ladyada" Fried
b667736110 Merge branch 'adafruit:main' into main 2021-05-18 20:55:55 -04:00
lady ada
d8b895f1d7 add LED and speaker - natch! 2021-05-18 20:53:13 -04:00
Lucian Copeland
bce541dcc5 Minor text fixes 2021-05-18 15:16:25 -04:00
lady ada
fdbd3bc8c2 add missing AREF pin 2021-05-18 11:09:31 -04:00
ladyada
cec9015e19 iz makropad with oled 2021-05-18 11:09:03 -04:00
Kamil Tomaszewski
da248d1594 spresense: Fix USB CDC and MSC 2021-05-18 17:02:16 +02:00
Damien George
7408ca1d78 mimxrt: Improve ticks and sleep functions using GPT.
SysTick cannot wake the CPU from WFI/WFE so a hardware timer is needed to
keep track of ticks/delay (similar to the nrf port).

Fixes issue #7234.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-18 22:36:32 +10:00
root
9393467819 Update comment for spelling 2021-05-17 22:13:00 -05:00
Bruno Martins
ea2d83e961 nrf/boards: Add support for evk_nina_b3 board. 2021-05-18 12:14:57 +10:00
Bruno Martins
94fb5e7f5a nrf: Add machine.memXX, and allow boards to customise some features. 2021-05-18 12:01:51 +10:00
Lucian Copeland
633d83cc3e Merge remote-tracking branch 'upstream/main' into sleep-revamp 2021-05-17 18:57:10 -04:00
root
ff4b1b28d2 iFormatting fixes 2021-05-17 16:43:55 -05:00
root
11ef36d09d Implement pulseout for RP2040 2021-05-17 16:24:45 -05:00
EmergReanimator
2b64b1d335 [resolves #4771] DEBUG UART supported on ATMSAME5x 2021-05-17 21:22:24 +02:00
Limor "Ladyada" Fried
9752162508
Merge pull request #4765 from dhalbert/rotary-trinkey-rev-c-pins
Update various Trinkey pins and add _pixelbuf
2021-05-15 11:52:33 -04:00
Dan Halbert
ea0e18d2e0 fix logic for suppressing ja and ko clean builds when not necessary 2021-05-14 23:41:44 -04:00
Dan Halbert
1e2a945782 Make busio.SPI be NotImplementedError on proxlight to save space 2021-05-14 21:52:54 -04:00
Scott Shawcroft
5c33c9d597
Fix SAMD
RTC needed to wait for sync. NeoPixel on SAMD doesn't need disabled
caches. It just needed timing adjustment for 120mhz clock speed.
2021-05-14 16:14:24 -07:00
Dan Halbert
990e58902d add CIRCUITPY_PIXELBUF to all trinkeys; add NeoPixel to prox 2021-05-14 17:09:15 -04:00
Dan Halbert
6a2ba83e30 Update Rotary Trinkey and Slide Trinkey pins 2021-05-14 15:40:29 -04:00
Lucian Copeland
715f7ee490 Add STM32 and NRF52 compatibility 2021-05-14 14:34:35 -04:00
Scott Shawcroft
689ec86225
Merge pull request #4754 from dhalbert/fix-endpoint-checking
Fix endpoint checking; Clean up safe mode printing
2021-05-14 11:25:01 -07:00
Jeff Epler
c931e5deb7 Add build_memory_info for esp32s2
This detects an overflowed flash partition, such as
```
1452105 bytes used, -10313 bytes free in flash firmware space out of 1441792 bytes (1408.0kB).
444428 bytes used, 1652724 bytes free in ram for stack and heap out of 2097152 bytes (2048.0kB).
```
on a metro esp32-s2 built with debugging.
2021-05-14 10:39:07 -05:00
Dan Halbert
c65986f526 shrink a bit more 2021-05-14 09:18:14 -04:00
Mike Causer
605b74f390 esp32/boards: Fix spelling mistakes in comments for UM_xxx boards. 2021-05-14 22:26:29 +10:00
Mike Causer
9e65662a11 esp32/boards: Set default I2C and SPI pins on UM_xxx boards.
And fix incorrect I2C and SPI pins in the feathers2 module.
2021-05-14 22:26:05 +10:00
Mike Causer
538b9a9be5 esp32/machine_i2c: Allow boards to configure I2C pins using new macros.
Following how SPI is configured (and how stm32 does it).
2021-05-14 22:22:13 +10:00
Dan Halbert
0fcb11b7b2 shrink some STM32F4 builds: turn MIDI back off 2021-05-13 23:14:12 -04:00
Dan Halbert
fa6c06fb38 count in/out endpoints; allow more usb modules on low-endpoint boards 2021-05-13 21:59:02 -04:00
Scott Shawcroft
1a0b4193b7
Simplify the status LED to save power
This also removes the need to pin share because we don't use the
status LED while user code is running.

The status flashes fallback to the HW_STATUS LED if no RGB LED is
present. Each status has a unique blink pattern as well.

One caveat is the REPL state. In order to not pin share, we set the
RGB color once. PWM and single color will be shutoff immediately but
DotStars and NeoPixels will hold the color until the user overrides
it.

Fixes #4133
2021-05-13 14:41:20 -07:00
Lucian Copeland
295103bb31 Merge remote-tracking branch 'upstream/main' into sleep-revamp 2021-05-13 16:22:12 -04:00
Scott Shawcroft
35ee4add63
Merge pull request #4388 from hierophect/stm-alarm
STM32: Alarms and sleep
2021-05-13 10:27:51 -07:00
Lucian Copeland
849e3a7319 Style fixes, submodules 2021-05-13 11:24:27 -04:00
Jeff Epler
47947dc23c
Merge pull request #4749 from tannewt/merge_1.15
Merge in MicroPython 1.15
2021-05-12 20:52:11 -05:00
Scott Shawcroft
966d25c6a5
Merge MicroPython v1.15 into CircuitPython 2021-05-12 17:51:42 -07:00
Damien George
9a0bca2c2a stm32/mboot: Make LEDs and reset-mode selection more configurable.
A board can now customise mboot with:
- MBOOT_LED1, MBOOT_LED2, MBOOT_LED3, MBOOT_LED4: if it needs to have
  different LEDs for mboot compared to the application
- MBOOT_BOARD_LED_INIT: if it needs a fully customised LED init function
- MBOOT_BOARD_LED_STATE: if it needs a fully customised LED state-setting
  function
- MBOOT_BOARD_GET_RESET_MODE: if it needs a fully customised function to
  get the reset mode

With full customisation, the only requirement is a single LED to show the
status of the bootloader (idle, erasing, flashing, etc), which can be
configured to do nothing if needed.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-12 13:44:57 +10:00
Damien George
6639e282c7 stm32/mboot: Add MBOOT_LEAVE_BOOTLOADER_VIA_RESET option.
It is enabled by default to get the standard behaviour of doing a reset
after it is finished, but can be disabled by a board to jump straight to
the application (likely the board needs to use MBOOT_BOARD_CLEANUP to make
this work).

The application is passed a reset mode of BOARDCTRL_RESET_MODE_BOOTLOADER
if the bootloader was active and entered via a jump.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-12 13:44:52 +10:00
Damien George
9ee116c452 stm32/boardctrl: Adjust logic for running boot.py, main.py.
This new logic is equivalent to the old logic when the only possibilities
for reset_mode are NORMAL, SAFE_MODE and FILESYSTEM, which is the standard
case.  But the new logic also allows other reset_mode values (eg
BOOTLOADER) to run boot.py and main.py.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-12 13:44:47 +10:00
Damien George
ee4ffc1804 stm32/powerctrl: Add MICROPY_HW_ENTER_BOOTLOADER_VIA_RESET option.
When disabled the bootloader is entered via a direct jump.  When enabled
the bootloader is entered via a system reset then a jump.  It's enabled by
default to retain the existing behaviour, which is the recommended way.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-12 13:44:41 +10:00
lady ada
502b66eac0 moar trinkz 2021-05-11 22:03:05 -04:00
Scott Shawcroft
a70fc0caee
Merge pull request #4744 from tannewt/merge_1.14
Merge MicroPython 1.14
2021-05-11 16:11:58 -07:00
Scott Shawcroft
e02a26453c
Merge MicroPython 1.14 into CircuitPython 2021-05-11 15:07:40 -07:00
Damien George
4404dababb rp2/CMakeLists.txt: Include tinyusb_common in PICO_SDK_COMPONENTS.
So the TinyUSB headers can be found during qstr processing.

Fixes issue #7236.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-11 12:46:18 +10:00
Dan Halbert
0eb4b9b982
Merge pull request #4742 from kattni/led
Add LED pin to Adafruit boards.
2021-05-10 21:12:02 -04:00
Chris Greening
cce7096d1a esp32/boards/UM_TINYPICO: Fix include of sdkconfig fragment.
This was broken by 32ec07a350
2021-05-11 09:36:41 +10:00
Lucian Copeland
525b34b042 Fix formatting and broken links
Implmements missed pre-commit changes for all files, and fixes links broken by
cleanup in #4698
2021-05-10 18:04:43 -04:00
Lucian Copeland
0d3c5222d8 Merge remote-tracking branch 'upstream/main' into stm-alarm 2021-05-10 17:30:33 -04:00
Kattni Rembor
294ef59f27 Add LED pin to Adafruit boards. 2021-05-10 16:39:01 -04:00
Scott Shawcroft
4eb4f14840
Merge pull request #4734 from dhalbert/dynamic-usb-fixes
fix HID; fix interface name table creation
2021-05-10 12:55:29 -07:00
Kattni
054317d47d
Merge pull request #4735 from bleything/bhb-unreserve-pa00-pa01
free up PA00 and PA01 on BHB
2021-05-10 12:38:02 -04:00
Damien George
0e87459e2b esp32/boards: Add UM_FEATHERS2 and UM_TINYS2 board definitions.
Based on original commit made by Seon Rozenblum aka @UnexpectedMaker.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-10 16:56:53 +10:00
Seon Rozenblum
32ec07a350 esp32/boards: Rename TINYPICO board to UM_TINYPICO.
And add default hardware SPI 0 pins in mpconfigboard.h, and
CONFIG_LWIP_LOCAL_HOSTNAME in sdkconfig.board.
2021-05-10 16:56:53 +10:00
Damien George
5093d49fae esp32: Extend support for S2 series, and S3 where applicable.
Improvements made:
- PSRAM support for S2
- partition definition for 16MiB flash
- correct ADC and DAC pins
- correct GPIO and IRQ pins
- S3 components in CMakeLists

Based on original commit made by Seon Rozenblum aka @UnexpectedMaker.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-10 16:56:53 +10:00
Neradoc
dcfb7949d7
fix FunHome to FunHouse
FunHouse, sweet FunHouse.
2021-05-10 05:34:03 +02:00
Ben Bleything
44f162bb64
free up PA00 and PA01 on BHB 2021-05-09 10:19:48 -07:00
Dan Halbert
becff6f93d restore pulseio to pirkey 2021-05-09 11:33:35 -04:00
nm3210
a3de9bda5f Swap mis-labelled D0/D1 pins on SparkFun Pro Micro RP2040 2021-05-08 21:35:37 -04:00
Damien George
d0de16266f rp2/mpthreadport: Add mp_thread_deinit to reset core1 on soft reset.
Any code running on core1 should be stopped on soft-reset (the GC heap is
reset so if code continues to run on core1 it will see corrupt memory).

Signed-off-by: Damien George <damien@micropython.org>
2021-05-09 00:08:30 +10:00
Jeff Epler
5e06c91244
Merge pull request #4716 from tyomitch/main
s/Circuit Python/CircuitPython/g
2021-05-08 08:47:29 -05:00
Jeff Epler
446169e078
Merge pull request #4720 from tannewt/merge_1.13
Merge in MicroPython 1.13
2021-05-08 08:46:03 -05:00
Damien George
864e4ecc47 esp32/mpthreadport: Use binary semaphore instead of mutex.
So a lock can be acquired on one Python thread and then released on
another.  A test for this is added.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-08 22:47:03 +10:00
Damien George
31e0b8c71c esp32/mpthreadport: Don't explicitly free thread struct in TCB cleanup.
Because vPortCleanUpTCB runs on the FreeRTOS idle task and cannot execute
any VM or runtime related code like freeing memory.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-08 22:47:03 +10:00
Lucian Copeland
9920741c2f Merge remote-tracking branch 'upstream/main' into stm-espr-pico-fix 2021-05-06 17:43:38 -04:00
Scott Shawcroft
42f4065c8a
Merge remote-tracking branch 'adafruit/main' into merge_1.13 2021-05-06 11:17:53 -07:00
Lucian Copeland
80a459d1f8 Remove settings for DNP oscillator 2021-05-06 13:52:07 -04:00
Dan Halbert
ebf9dcb47a
Merge pull request #4689 from dhalbert/dynamic-usb-descriptors
Dynamic USB descriptors
2021-05-06 13:51:38 -04:00
Artyom Skrobov
908d83d1f2 s/Circuit Python/CircuitPython/g
Some comments and messages used the non-standard spelling
2021-05-06 16:22:35 +03:00
mishafarms
8ff3520f67 esp32/esp32_rmt: Clear config struct before filling it out.
Or unset entries will have garbage in them.

Signed-off-by: mishafarms <github@mishafarms.us>
2021-05-06 15:53:56 +10:00
Damien George
9e29217c73 unix/modffi: Use a union for passing/returning FFI values.
This fixes a bug where double arguments on a 32-bit architecture would not
be passed correctly because they only had 4 bytes of storage (not 8).  It
also fixes a compiler warning/error in return_ffi_value on certian
architectures: array subscript 'double[0]' is partly outside array bounds
of 'ffi_arg[1]' {aka 'long unsigned int[1]'}.

Fixes issue #7064.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-06 12:17:10 +10:00
Scott Shawcroft
59c2787702
Fix esp32s2 build 2021-05-05 18:27:21 -07:00
Scott Shawcroft
3fda0c0a1b
Fix board builds and use MP_ERROR_TEXT in py and extmod 2021-05-05 17:51:52 -07:00
Dan Halbert
843598ec3a fix more board builds 2021-05-05 18:44:27 -04:00
Dan Halbert
579cdf30f1 fix more build errors 2021-05-05 16:49:29 -04:00
Dan Halbert
c37f021791 regularize and shrink many builds 2021-05-05 12:35:41 -04:00
Dan Halbert
fc8e1c4c2e address review comments 2021-05-05 12:35:12 -04:00
Jeff Epler
4054860ff3 Name the variant like micropython does 2021-05-05 11:00:39 -05:00
Jeff Epler
607148bb85 Add frzqstr to coverage build
This fixes a fail in extra_coverage.py.
2021-05-05 11:00:39 -05:00
Scott Shawcroft
30c7aa8fc9
Merge pull request #4650 from anecdata/ap
wifi.radio Access Point modes
2021-05-05 08:47:55 -07:00
Scott Shawcroft
f0bb26d70f
Merge MicroPython 1.13 into CircuitPython 2021-05-04 18:06:33 -07:00
Damien George
8172c2e9c5 rp2: Move manifest.py to boards directory.
To match other ports.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-04 23:39:24 +10:00
David Lechner
ca0c75f504 stm32/boards: Change default LSI_VALUE to 32000 for F4 MCUs.
In the STM32 HAL libraries, the default value for LSI_VALUE for F4 MCUs is
32 kHz.

Signed-off-by: David Lechner <david@pybricks.com>
2021-05-04 16:53:40 +10:00
Dan Halbert
adc3d7d55e update Python API according to review comments 2021-05-03 22:29:02 -04:00
Dan Halbert
d2b558993e merge from main, including MicroPython 1.12 merge 2021-05-03 20:56:04 -04:00
Scott Shawcroft
b35fa44c8a
Merge MicroPython 1.12 into CircuitPython 2021-05-03 14:01:18 -07:00
Scott Shawcroft
25ccd5d8f1
Merge pull request #4679 from t-ikegami/wio_add_pin_assign
Add DAC* and RTL_* pin assignments to Wio Terminal board.
2021-05-03 11:08:28 -07:00
Scott Shawcroft
678279720f
Merge pull request #4702 from rsbohn/patch-1
esp32-s2: Don't set PWMOut frequency to 0
2021-05-03 11:01:59 -07:00
Randall Bohn
d1db782760
Move validation code to the right spot.
As MicroDev1 pointed out the problem is a divide by zero when calculating the duty cycle.
Maybe need to check again in `common_hal_pwmio_pwmout_set_frequency()`.
2021-05-03 09:16:46 -06:00
Randall Bohn
8613b9a9fe
Trim Trailing Whitespace
was causing pre-commit checks to fail
2021-05-03 07:41:52 -06:00
Dan Halbert
94ed5e0048
Merge pull request #4696 from dhalbert/no-pulseio-on-small-boards
Include pulseio only on CIRCUITPY_FULL_BUILD
2021-05-03 09:35:29 -04:00
Dan Halbert
9ca0e689a5
Merge branch 'main' into wio_add_pin_assign 2021-05-03 09:33:18 -04:00
Dan Halbert
8b8968101d
Merge pull request #4691 from nm3210/sparkfunthingplusrp2040_boardupdate
Update Sparkfun Thing Plus RP2040 pins to match board breakouts
2021-05-03 09:27:19 -04:00
Randall Bohn
2db113f191
esp32-s2: Don't set PWMOut frequency to 0
FeatherS2 crashes if you set the PWMOut frequency to 0.
This change will raise `ValueError: Invalid PWM frequency` if the requested frequency is 0.
(Lifted from the atmel-samd port)
2021-05-03 07:15:39 -06:00
Dan Halbert
e475dc8899 Fix broken builds 2021-05-03 00:09:15 -04:00
robert-hh
1e2f0d2809 rp2/tusb_port: Add the device unique-id to the USB id.
The number shown in the USB id is now the same as that returned by
machine.unique_id().  All 8 bytes are inserted as hex into the USB id.  A
usb id at /dev/serial/by-id then looks like:

    usb-MicroPython_Board_in_FS_mode_e469b03567342f37-if00
2021-05-02 23:38:01 +10:00
Jan Jurgen Griesfeller
d80a037e6b rp2/boards: Add board definition for SparkFun Pro Micro board. 2021-05-02 23:23:27 +10:00
Jan Jurgen Griesfeller
3c918d0f58 rp2/boards: Add board definition for SparkFun Thing Plus RP2040. 2021-05-02 23:22:46 +10:00
Artyom Skrobov
ca35c0059c py/repl: Autocomplete builtin modules.
Doing "import <tab>" will now complete/list built-in modules.

Originally at adafruit#4548 and adafruit#4608

Signed-off-by: Artyom Skrobov <tyomitch@gmail.com>
2021-05-02 23:11:14 +10:00
Dan Halbert
749a3ac978 remove pwmio from litex port 2021-05-01 23:22:52 -04:00
Dan Halbert
ebedeeb51d
Merge pull request #4695 from dhalbert/magtag-spi-naming
MagTag: Remove board.SPI(); rename display-only pins
2021-05-01 09:44:42 -04:00
Dan Halbert
07dab34294 re-enable for pirkey 2021-05-01 09:32:13 -04:00
Dan Halbert
670c49ed94 MagTag: Remove board.SPI(); rename display-only pins 2021-04-30 22:58:51 -04:00
Jeff Epler
1a52cbcf5d Format a straggler file 2021-04-30 16:42:25 -05:00
Jeff Epler
da19e8e2d7 Merge remote-tracking branch 'origin/main' into fix-codeformat-subdirs 2021-04-30 15:31:08 -05:00
Jeff Epler
dfa7c3d32d codeformat: Fix handling of **
After discussing with danh, I noticed that `a/**/b` would not match `a/b`.

After correcting this and re-running "pre-commit run --all", additional
files were reindented, including the codeformat script itself.
2021-04-30 15:30:13 -05:00
nm3210
929ee8d3b4 Fix pre-commit whitespace error 2021-04-30 14:16:13 -04:00
Scott Shawcroft
d93a9a1dbc
Merge pull request #4683 from DavePutz/issue_4661
Issue #4661 - Wrap pulsein values when maxlen is exceeded.
2021-04-30 11:07:54 -07:00
microDev
eebcd2eeaf
remove unsupported authmodes 2021-04-30 22:11:32 +05:30
microDev
6640db9555
make authmode settable 2021-04-30 21:35:02 +05:30
Jeff Epler
e95e921ca1 codeformat: Fix filename matching
In #4683, tannewt noticed that uncrustify was not running on some
file in common-hal.

I investigated and found that it was not being run on a bunch of paths.

Rather than make incremental changes, I rewrote list_files to work
bsaed on regular expressions; these regular expressions are created from
the same git-style glob patterns.

I spot-checked some specific filenames after this change, and all looks good:

```
$ python3 tools/codeformat.py -v --dry-run tests/basics/int_small.py ports/raspberrypi/common-hal/pulseio/PulseIn.c extmod/virtpin.c tests/thread/thread_exit1.py  ports/raspberrypi/background.h extmod/re1.5/recursiveloop.c
tools/codeformat.py -v --dry-run tests/basics/int_small.py ports/raspberrypi/common-hal/pulseio/PulseIn.c extmod/virtpin.c tests/thread/thread_exit1.py ports/raspberrypi/background.h extmod/re1.5/recursiveloop.c
uncrustify -c /home/jepler/src/circuitpython/tools/uncrustify.cfg -lC --no-backup extmod/virtpin.c ports/raspberrypi/background.h ports/raspberrypi/common-hal/pulseio/PulseIn.c
black --fast --line-length=99 -v tests/thread/thread_exit1.py
```
recursiveloop and int_small are excluded, while PulseIn, virtpin,
and background are included.

Testing running from a subdirectory (not _specifically_ supported though):
```
(cd ports && python3 ../tools/codeformat.py -v --dry-run raspberrypi/common-hal/pulseio/PulseIn.c ../extmod/virtpin.c)
../tools/codeformat.py -v --dry-run raspberrypi/common-hal/pulseio/PulseIn.c ../extmod/virtpin.c
uncrustify -c /home/jepler/src/circuitpython/tools/uncrustify.cfg -lC --no-backup ../extmod/virtpin.c raspberrypi/common-hal/pulseio/PulseIn.
```

As a side-effect, a bunch more files are re-formatted now. :-P
2021-04-30 10:48:08 -05:00
Dan Halbert
353e55d710
Merge pull request #4688 from jepler/fix-pixelbuf-subscr
objtype: Restore our customized behavior of instance_subscr
2021-04-30 10:45:44 -04:00
Dan Halbert
be7b2b00a8 uncrustify with newer version of uncrustify 2021-04-30 10:40:12 -04:00
nm3210
9c1466a330 Update Sparkfun Thing Plus RP2040 pins to match board
This fixes some missing and incorrectly-assigned pins for the SparkFun Thing Plus RP2040 protoboard so that they actually match what the board says. This also changes the default SPI pins from the SD card pins to the breakout pins on the side of the board.
2021-04-30 09:37:37 -04:00
microDev
7c845818b3
Merge branch 'main' into ap 2021-04-30 17:11:22 +05:30
Damien George
888664130c zephyr/boards: Add config for nucleo_wb55rg board.
This board does not work with CONFIG_NETWORKING enabled.  And
CONFIG_CONSOLE_SUBSYS is enabled so that ctrl-C works.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 15:32:16 +10:00
Damien George
b46a033e25 zephyr/modmachine: Add machine.idle().
Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 15:32:16 +10:00
Damien George
d120859857 zephyr: Run scheduled callbacks at REPL and during mp_hal_delay_ms.
And ctrl-C can now interrupt a time.sleep call.  This uses Zephyr's k_poll
API to wait efficiently for an event signal, and an optional semaphore.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 15:32:16 +10:00
Damien George
e9e9c76ddf all: Rename mp_keyboard_interrupt to mp_sched_keyboard_interrupt.
To match mp_sched_exception() and mp_sched_schedule().

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 15:13:43 +10:00
Damien George
bd54eb566f nrf/boards/microbit: Use mp_sched_exception() where appropriate.
Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 15:13:43 +10:00
Damien George
7cbf826a95 py/scheduler: Add mp_sched_exception() to schedule a pending exception.
This helper is added to properly set a pending exception, to mirror
mp_sched_schedule(), which schedules a function.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 15:13:43 +10:00
Damien George
a41cd150be esp8266/modnetwork: Use mp_handle_pending() to raise pending exception.
If MICROPY_ENABLE_SCHEDULER is enabled then MP_STATE_VM(sched_state) must
be updated after handling the pending exception, which is done by the
mp_handle_pending() function.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 15:13:43 +10:00
Tsutomu IKEGAMI
11a9372da3 Set Xtal, Aref, and NC pins to be IGNORE_ed in microcontroller.pin for Wio Terminal. 2021-04-30 13:06:09 +09:00
Tsutomu IKEGAMI
d79d6ba688 Add I2S_* pin assignments to Wio Terminal board. 2021-04-30 13:03:29 +09:00
Mark
5ef9b10669
Merge pull request #4685 from microDev1/authmode
Add AuthMode class
2021-04-29 22:12:58 -05:00
Dan Halbert
b5efce12cd delete hid .py; undo some debugging changes 2021-04-29 23:05:31 -04:00
iabdalkader
a1111b83ed stm32/sdio: Allow configuring the SDMMC periph used for SDIO.
This can now be selected by setting MICROPY_HW_SDIO_SDMMC, which defaults
to 1, ie SDMMC1.  The pins can also be selected and default to the standard
C8/C9/C10/C11/C12/D2.
2021-04-30 11:26:04 +10:00
Mark
5679eb4fd7
Merge pull request #4677 from skerr92/add-cp-sapling-rev-b
Add cp sapling rev b
2021-04-29 19:22:49 -05:00
iabdalkader
baa712b7f0 stm32/boards/PYBD_SF2: Enable RF switch compile option. 2021-04-30 10:16:15 +10:00
Seth Kerr
8b611d4b6b changing mpconfigboard makefile 2021-04-29 16:45:08 -06:00
Lucian Copeland
07b86fcb76 fix sleepmemory object redefine error 2021-04-29 17:28:06 -04:00
Jeff Epler
90bdb25219 ignore some pins to reclaim flash space 2021-04-29 14:36:29 -05:00
Jeff Epler
6498684f5e ignore some pins to reclaim flash space 2021-04-29 14:30:31 -05:00
Lucian Copeland
bab5a22f0c Fix build issues
H7 compatibility problems in port.c and peripherals/exti
NRF build failures due to new use of const for PinAlarm pin objects
Isolated board flash overage on blackpill_with_flash, remove audio modules
2021-04-29 14:48:16 -04:00
Kattni Rembor
4d97680cae Fix board definition. 2021-04-29 13:45:39 -04:00
DavePutz
1ec59cd534
Fix up indentation 2021-04-29 12:38:13 -05:00
Kattni Rembor
0bf747870a Fixing board definition. 2021-04-29 12:41:23 -04:00
iabdalkader
80788154b3 stm32/sdio: Add functions to re/enable SDIO/SDIOIT. 2021-04-30 01:12:08 +10:00
iabdalkader
4d96786823 stm32/uart: Enable HW flow control for UART 1/5/7/8. 2021-04-30 01:10:02 +10:00
Damien George
cf7e71fa43 stm32/sdcard: Allow configuring the SDMMC periph used for SD/MMC card.
This can now be selected by setting MICROPY_HW_SDCARD_SDMMC, which defaults
to 1, ie SDMMC1.  This commit also renames the SD pin configuration macros
from MICROPY_HW_SDMMC2_xxx to MICROPY_HW_SDCARD_xxx, as well as renaming
MICROPY_HW_SDMMC_BUS_WIDTH to MICROPY_HW_SDCARD_BUS_WIDTH.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 00:58:17 +10:00
Damien George
37494b8c8a stm32/mboot: Allow mboot to be placed at any location in flash.
A board can now define MBOOT_TEXT0_ADDR to place mboot at a location other
than 0x08000000.  This can be useful if, for example, there is already a
different bootloader on the device.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 00:42:59 +10:00
Damien George
58be5a5aa3 stm32/mboot: Allow a board to customise the linker scripts.
A board can now define MBOOT_LD_FILES (at the Makefile-level) to specify
custom linker scripts.  And stm32_generic.ld has been split into 2 pieces
so one or the other can be reused (usually stm32_sections.ld wolud be
reused by a board, and stm32_memory.ld redefined).

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 00:42:59 +10:00
Damien George
97f09fda3e stm32/mboot: Fix mp_hal_delay_us() and add mp_hal_ticks_ms().
Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 00:42:59 +10:00
Damien George
fd01b6c779 stm32/adc: Allow mboot to use basic ADC functions.
Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 00:42:59 +10:00
Damien George
ef2896bdea stm32/mboot: Allow a board to add source files to the build.
A board can now use BUILDING_MBOOT at the Makefile-level to do things
conditional on building mboot, for example add source files to SRC_C.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 00:42:59 +10:00
Damien George
885b246ca9 stm32/boardctrl: Show first reset-mode state on LEDs when selecting.
Commit 1e297c8898 introduced a bug where the
very first reset-mode state on the LEDs was not shown, because prior to
that commit the first reset-mode state was the same as the initial LED
state (green on, others off) and update_reset_mode() was called after
setting this initial LED state.

This is fixed in this commit by changing the update_reset_mode() loop so
that it displays the current reset mode before doing the delay.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 00:32:12 +10:00
Damien George
a72b8443ca stm32/boardctrl: Add constants for reset mode values.
And use the same boardctrl.h header for both the application and mboot so
these constants are consistent.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 00:31:35 +10:00
microDev
1b972c51c3
add authmode class 2021-04-29 18:42:36 +05:30
Damien George
647fa63f9c stm32/softtimer: Support static soft timer instances.
This adds support for making static (ie not on the Python GC heap) soft
timers.  This can be useful for a board to define a custom background
handler, or eventually for BLE/network processing to use instead of systick
slots; it will be more efficient using soft timer for this.

The main issue with using the existing code for static soft timers is that
it would combine heap allocated and statically allocated soft_timer_entry_t
instances in the same pairing-heap data structure.  This would prevent the
GC from tracing some of the heap allocated entries (because the GC won't
follow pointers outside the heap).

This commit makes it so that soft timer entries are explicitly marked,
instead of relying on implicit marking by having the root of the pairing
heap in the root pointer section.  Also, on soft reset only the heap-
allocated soft timers are deleted from the pairing heap, leaving the
statically allocated ones.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-29 16:54:35 +10:00
Damien George
89b64478c7 stm32/softtimer: Add support for having a C-based callback.
Signed-off-by: Damien George <damien@micropython.org>
2021-04-29 16:54:35 +10:00
Dan Halbert
f06d54524d merge from adafruit 2021-04-28 23:48:26 -04:00
Seth Kerr
555ade7ff3 final change to ja flags i think 2021-04-28 20:42:13 -06:00
Steve App
21fee92be6 esp32: Restore FROZEN_MANIFEST support with new CMake build system.
This commit re-enables the command-line make option "FROZEN_MANIFEST".  The
boards/*/mpconfigboard.cmake will now use the command-line FROZEN_MANIFEST
value if supplied.

Usage: make FROZEN_MANIFEST=~/foo/my-manifest.py
2021-04-29 12:34:00 +10:00
Seth Kerr
8090af07dd fix ja build issue 2021-04-28 19:14:45 -06:00
Lucian Copeland
9fe8d61656 Fix broken MP macros from 1.11 merge 2021-04-28 18:26:52 -04:00
Lucian Copeland
5c4500dbfa Fix MP type macros 2021-04-28 15:35:15 -04:00
Lucian Copeland
9feef41c82 Merge remote-tracking branch 'upstream/main' into stm-alarm 2021-04-28 15:10:55 -04:00
Tsutomu IKEGAMI
0d25b95f0d Add definitions of PB2[4-9] pins to microcontroller.pin for atmel-samd. 2021-04-29 02:19:34 +09:00
root
cfac07c1cc Wrap pulsein when maxlen is exceeded 2021-04-28 11:20:13 -05:00
Dan Halbert
d4d96bb25f
Merge pull request #4236 from jun2sak/nrf52-sleep
sleep and wakeup for nrf52
2021-04-28 12:11:31 -04:00
Tsutomu IKEGAMI
22c4abd28f Add DAC* and RTL_* pin assignments to Wio Terminal board. 2021-04-28 18:57:21 +09:00
Dan Halbert
8500e846c6 partially working 2021-04-27 23:53:23 -04:00
Seth Kerr
e85091193b adding CP Sapling Rev B 2021-04-27 16:30:44 -06:00
Dan Halbert
f98a54628b wip: compiles 2021-04-27 14:37:36 -04:00
Scott Shawcroft
17fcd499b2
Merge pull request #4649 from tannewt/merge_1.11_2
Merge MicroPython v1.11 into CircuitPython
2021-04-27 11:02:02 -07:00
Scott Shawcroft
f99deeda68
Merge pull request #4668 from DavePutz/issue_4659
Increased possible pulsein length to ~65 ms.
2021-04-27 11:01:51 -07:00
Scott Shawcroft
9e183bbbba
Merge pull request #4674 from kattni/dotstar-pins
Adding clearer on-board DotStar pin names.
2021-04-27 10:56:47 -07:00
Kattni Rembor
4e1d2fa056 Adding clearer on-board DotStar pin names. 2021-04-27 12:52:24 -04:00
Melissa LeBlanc-Williams
d7faac11b8 Release display on FunHouse for DeepSleep 2021-04-27 09:09:23 -07:00
iabdalkader
a708848b0c stm32/uart: Fix H7 UART clock source configuration.
Previously to this commit, Usart16ClockSelection was overwritten and
Usart234578ClockSelection was not set.
2021-04-28 00:46:48 +10:00
plan-do-break-fix
4dc802400f stm32,teensy: Correct typos in project README files. 2021-04-28 00:29:18 +10:00
Daniel Maslowski
f452b9c265 pic16bit/Makefile: Make the XC compiler version user-configurable. 2021-04-28 00:18:04 +10:00
Damien George
43a8c8178e bare-arm: Switch to use MICROPY_ERROR_REPORTING_NONE to reduce size.
Reduces size of this port by about 3300 bytes, and demonstrates how to use
this feature.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-27 23:52:40 +10:00
Damien George
65b90cd0f9 teensy: Provide own implementation of gc_collect, to not use stm32.
Signed-off-by: Damien George <damien@micropython.org>
2021-04-27 12:08:00 +10:00
root
91739de71a Increased max pulse to 65535 us 2021-04-26 18:52:15 -05:00
Scott Shawcroft
76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
Lucian Copeland
43840363c2 Fix submodule 2021-04-26 17:59:21 -04:00
Kattni
65c1ddb570
Merge pull request #4667 from ajs256/trinkey_pixel_fixes
Trinkey pixel fixes
2021-04-26 17:19:14 -04:00
anecdata
a1e2afadce AP ip_info, gateway, & subnet 2021-04-26 00:22:51 -05:00
Dan Halbert
c26e49c2e6 wip: starting to try to compile 2021-04-25 23:17:41 -04:00
root
5bd1da21a2 Increased possible pulsein length to 32 ms. 2021-04-25 21:38:57 -05:00
Jeff Epler
92919c25c2
Merge pull request #4666 from DavePutz/issue_4660
Reset buffer index in PulseIn clear
2021-04-25 20:33:58 -05:00
ajs256
de3c5ff976
oh crud, i forgot a semicolon 2021-04-25 16:42:58 -07:00
anecdata
f20a53177b add authmode to start_ap() 2021-04-25 18:20:18 -05:00
anecdata
747d72f5a5 redundant with system log 2021-04-25 18:18:45 -05:00
ajs256
4bafbca0c3 Trinkeys: Clear neopixels on board reset 2021-04-25 12:58:52 -07:00
root
d1861a6b9c Reset buffer index in PulseIn clear 2021-04-25 14:24:21 -05:00
Limor "Ladyada" Fried
f7f6a42f3d
Merge pull request #4663 from zapwizard/patch-1
Update pins.c
2021-04-25 15:09:13 -04:00
zapwizard
889da596ff
Update pins.c
Both D0 and D1 were assigned to pin_GPIO7, fixed D0 to pin_GPIO6, which also matches the comment.
2021-04-25 13:10:52 -05:00
gamblor21
30f31639d3 Added statemachine deinit 2021-04-25 11:58:22 -05:00
jun2sak
872fff7fbb simplify system_on_idle_until_alarm() 2021-04-25 23:59:21 +09:00
anecdata
c510c4d501 allow start/stop sta/ap (changing modes) when wifi.radio.enabled = False 2021-04-25 09:29:15 -05:00
Dan Halbert
9d1fcc3b14 merge from main 2021-04-25 10:27:52 -04:00
jun2sak
7accb8b173 modify copyright notice. 2021-04-25 19:57:21 +09:00
jun2sak
a17fcb6d1a add copyright notice. remove obsolete comments. 2021-04-25 19:19:11 +09:00
anecdata
dc3c47d396 ap channel param 2021-04-25 00:22:08 -05:00
anecdata
354b442867 fixes 2021-04-24 19:36:11 -05:00
anecdata
2e52c0ae62 set all wifi modes; add sta start & sta/ap stop 2021-04-24 16:41:41 -05:00
Mark
ed374a89fb
Merge pull request #4655 from DavePutz/issue_4602
Issue 4602 - Correct timing of PulseOut on SAMD21
2021-04-24 10:45:10 -05:00
Dan Halbert
2ba2574ebf
Merge pull request #4619 from tyomitch/microbit
[build] Allow USB to be set to 0
2021-04-24 10:31:29 -04:00
Dan Halbert
80f05c76a8
Merge pull request #4654 from dhalbert/6.2.x-merge-1
Port #4645 to main
2021-04-24 10:29:52 -04:00
anecdata
4d267ef644 add get_ipv4_address_ap 2021-04-23 21:44:34 -05:00
Scott Shawcroft
80e8b4ac14
Merge pull request #4635 from jepler/pcc
WIP: Implement 'ParallelImageCapture' for samd51
2021-04-23 13:31:53 -07:00
Dan Halbert
454e78f41f merge #4645 from 6.2.x to main 2021-04-23 13:33:58 -04:00
Artyom Skrobov
4e3c1d4a4c [build] Allow USB to be set to 0
Unify USB-related makefile var and C def as CIRCUITPY_USB.

Always define it as 0 or 1, same as all other settings.

USB_AVAILABLE was conditionally defined in supervisor.mk,
but never actually used to #ifdef USB-related code.

Loosely related to #4546
2021-04-23 11:13:34 -04:00
Jeff Epler
34c4cc1bd9 samd: Rename dma_{allocate,free} channel
These are now used in the (video) parallel capture device as well.
2021-04-23 09:46:33 -05:00
Jeff Epler
f838ff9528 raspberrypi: Remove debug prints 2021-04-23 09:44:01 -05:00
stijn
bb2007b05c windows/mpconfigport.h: Enable features also present in unix port. 2021-04-23 23:15:10 +10:00
Damien George
df4e9bdf5c esp32/CMakeLists.txt: Require CMake version 3.12.
Because "find_package(Python3 ...)" requires at least this version of
CMake.  And other features like GREATER_EQUAL and COMMAND_EXPAND_LISTS need
at least CMake 3.7 and 3.8 respectively.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-23 23:03:03 +10:00
Dan Halbert
346740e152
Merge pull request #4609 from Neradoc/add_nrf_countio
NRF: implement countio
2021-04-23 08:37:00 -04:00
anecdata
3d60ed1322 loc & common_hal start_ap(), + AP MAC getter 2021-04-22 22:55:32 -05:00
anecdata
7e95dc1261 ap additions to radio object 2021-04-22 22:23:33 -05:00
anecdata
bfc5eb1660 event_handler, init, and reset 2021-04-22 22:21:50 -05:00
David Michieli
5669a60954 stm32/mboot: Allow unpacking dfu without secret key.
- unpack-dfu command no longer requies a secret key to be present
- pack-dfu command raises an exception if no secret key is found
2021-04-23 11:04:37 +10:00
Dan Halbert
8f73270f2b
Merge pull request #4646 from tannewt/merge_mp1.10
Merge in MicroPython v1.10
2021-04-22 13:16:27 -04:00
Jeff Epler
10fee3e673 raspberrypi: Increase PIO clock speed in ParallelImageCapture
.. this allows DIV_4 and DIV_2 resolutions to work without being
jumbled.
2021-04-22 12:14:44 -05:00
Jeff Epler
2def016fd0 raspberrypi: Use 32-bit elements in FIFO
.. these do come in the right
2021-04-22 12:14:03 -05:00
Jeff Epler
7fb751808f raspberrypi: Implement ParallelImageCapture using PIO
.. based on code from Phil B.
2021-04-22 12:02:51 -05:00
Dan Halbert
f1b5249d3c Fix esp32s2 uart.write() return value 2021-04-22 09:47:54 -04:00
Dan Halbert
64e0958916 wip: descriptor building 2021-04-21 23:25:36 -04:00
Scott Shawcroft
09f7b43c64
Merge MicroPython 1.10 into CircuitPython 2021-04-21 15:59:17 -07:00
Dan Halbert
b3ffb3ab1f Return bytes written from RP2040 UART.write() 2021-04-21 18:38:35 -04:00
Lucian Copeland
8ce89860e6 Pass pre-commit formatting 2021-04-21 17:34:13 -04:00
Damien George
00d6a79b3d stm32/machine_timer: Improve usability of Timer constructor and init.
Improvements are:
- Default period is 1000ms with callback disabled.
- if period is not specified then it's not updated (previously, if period
  was not specified then it was set to -1 and running the timer callback as
  fast as possible, making the REPL unresponsive).
- Use uint64_t to compute delta_ms, and raise a ValueError if the period is
  too large.
- If callback is not specified then it's not updated.
- Specifying None for the callback will disable the timer.

Signed-off-by: Damien George <damien@micropython.org>
2021-04-21 14:22:09 +10:00
root
0e2431048d Fix PWMOut on SAMD21 2021-04-20 15:21:05 -05:00
Jeff Epler
46c9b1bc37 atmel-sam: Use DMA for ParallelImageCapture
This allows ctrl-c to interrupt the capture, and ensures we handle
interrupts & background tasks.
2021-04-20 13:52:44 -05:00
Jeff Epler
d50feebd2c atmel-sam: Factor out find_sync_event_channel_raise 2021-04-20 13:33:11 -05:00
Jeff Epler
4dcbdac97e Complete the 'horizontal_reference' rename 2021-04-20 11:33:32 -05:00
Dan Halbert
01979acd48
Merge pull request #4604 from tannewt/buffer_size
Assume max characteristic size when the client
2021-04-20 12:02:06 -04:00
Jeff Epler
5c5736ee1e atmel-sam: Allow PWM to go up to cpu_frequency/2
24MHz is the nominal external clock to use with OV7670.  (My testing
was actually at 16MHz)
2021-04-20 10:22:21 -05:00
Jeff Epler
99799cded6 imagecapture: implement to review suggestions 2021-04-20 10:21:32 -05:00
Damien George
6e0f9b9262 stm32/boards/pllvalues.py: Support wider range of PLL values for F413.
Signed-off-by: Damien George <damien@micropython.org>
2021-04-20 23:33:33 +10:00
Scott Shawcroft
b057fb8a4b
codeformat 2021-04-19 22:22:44 -07:00
Limor "Ladyada" Fried
83c768b25d
Merge pull request #4627 from aramcon-badge/aramcon2-badge
Add board definition files for ARAMCON2 Badge
2021-04-19 15:17:47 -04:00
Limor "Ladyada" Fried
17e419f129
Merge pull request #4633 from ZodiusInfuser/main
Tweaked Pimoroni board names
2021-04-19 15:16:37 -04:00
Benny Meisels
f0b04d403d Add board definition files for ARAMCON2 Badge 2021-04-19 20:41:01 +03:00
Eddie Espinal
0e8b99dc65 Removes the USB_DEVICES entry as it's causing the build to fail. 2021-04-19 10:24:44 -04:00
Eddie Espinal
fce6226ca5 Add board definition for the ATMegaZero ESP32-S2 2021-04-19 08:47:29 -04:00