Commit Graph

734 Commits

Author SHA1 Message Date
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
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
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
Scott Shawcroft 5643355e90
Merge remote-tracking branch 'adafruit/main' into simplify_status_led 2021-05-20 08:35:15 -07:00
Scott Shawcroft 499a4388cf
Handle inverted neopixel power 2021-05-19 17:29:02 -07: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
Lucian Copeland 633d83cc3e Merge remote-tracking branch 'upstream/main' into sleep-revamp 2021-05-17 18:57:10 -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 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 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
Neradoc dcfb7949d7
fix FunHome to FunHouse
FunHouse, sweet FunHouse.
2021-05-10 05:34:03 +02:00
Scott Shawcroft 42f4065c8a
Merge remote-tracking branch 'adafruit/main' into merge_1.13 2021-05-06 11:17:53 -07:00
Dan Halbert ebf9dcb47a
Merge pull request #4689 from dhalbert/dynamic-usb-descriptors
Dynamic USB descriptors
2021-05-06 13:51:38 -04:00
Scott Shawcroft 59c2787702
Fix esp32s2 build 2021-05-05 18:27:21 -07: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
Dan Halbert d2b558993e merge from main, including MicroPython 1.12 merge 2021-05-03 20:56:04 -04: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
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 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 670c49ed94 MagTag: Remove board.SPI(); rename display-only pins 2021-04-30 22:58:51 -04: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
microDev 7c845818b3
Merge branch 'main' into ap 2021-04-30 17:11:22 +05:30
microDev 1b972c51c3
add authmode class 2021-04-29 18:42:36 +05:30
Dan Halbert f06d54524d merge from adafruit 2021-04-28 23:48:26 -04:00
Lucian Copeland 9feef41c82 Merge remote-tracking branch 'upstream/main' into stm-alarm 2021-04-28 15:10:55 -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
Melissa LeBlanc-Williams d7faac11b8 Release display on FunHouse for DeepSleep 2021-04-27 09:09:23 -07:00
Scott Shawcroft 76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
anecdata a1e2afadce AP ip_info, gateway, & subnet 2021-04-26 00:22:51 -05: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
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
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
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
anecdata 4d267ef644 add get_ipv4_address_ap 2021-04-23 21:44:34 -05: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
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
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
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
Lucian Copeland e0024c70de Merge remote-tracking branch 'upstream/main' into stm-alarm 2021-04-15 16:32:30 -04:00
Lucian Copeland 7eeea869ac Fix light sleep global alarms, API revisions 2021-04-15 15:02:42 -04:00
Dan Halbert 82479b6a2c
Merge pull request #4503 from hierophect/sleep-api-update
Sleep API changes and fix for main.c silent issue
2021-04-06 16:53:25 -04:00
Jeff Epler 27d8832868
Merge pull request #4512 from m-byte/main
Add Artisense RD00 board files
2021-04-03 18:40:59 -05:00
Matthias Breithaupt 43ba81ffa1 Add Artisense RD00 board files 2021-04-03 17:20:59 +02:00
Lucian Copeland 17585e1e07 Clean up API 2021-04-02 14:08:48 -04:00
Lucian Copeland 91e530d36c Resolve wake alarm crash 2021-04-02 13:42:22 -04:00
Dan Halbert da16e4dce1
Merge pull request #4534 from UnexpectedCircuitPython/main
Changed some pins for TinyS2
2021-04-01 21:05:46 -04:00
Seon Rozenblum a9b4e04643 Changed some pins for TinyS2 2021-04-02 08:08:02 +11:00
Lucian Copeland 33418ce826 Merge remote-tracking branch 'upstream/main' into stm-alarm 2021-03-29 13:39:14 -04:00
Lucian Copeland d35a307ffa Merge branch 'sleep-api-update' into stm-alarm 2021-03-29 12:27:25 -04:00
Lucian Copeland 00178ca5e0 Sleep API changes, redundancy fix 2021-03-27 14:14:57 -04:00
Lucian Copeland 529fb52309 Style changes and wakeup detection 2021-03-27 13:16:12 -04:00
anecdata c106b432c5 swap recvfrom_into() port byte-order 2021-03-22 20:03:26 -05:00
Dan Halbert 1512ca520b Fix PWMOut non-error handling and never reset 2021-03-19 09:57:21 -04:00
Dan Halbert 8293e1eedc fix display rotation and position 2021-03-19 00:09:48 -04:00
Dan Halbert 47437cb415 make translate; fix display pins 2021-03-18 23:42:24 -04:00
Dan Halbert ea82ca1d02 correct PID 2021-03-18 23:24:20 -04:00
Dan Halbert 21c55f8e75 update funhouse pins for latest rev b 2021-03-18 23:14:59 -04:00
Dan Halbert b2d913412f merge from upstream 2021-03-18 23:14:43 -04:00
gamblor21 0890b54cd9 More formatting 2021-03-16 08:29:04 -05:00
gamblor21 fb437d8280 Formatting fixes 2021-03-16 08:22:02 -05:00
Mark e326d7ca80
Merge branch 'main' into rp_dp_parallel 2021-03-15 20:00:13 -05:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Dan Halbert 0ce5b2f594 put back pullup setting 2021-03-12 08:20:09 -05:00
gamblor21 56a219911f Add frequency support to parallel bus 2021-03-11 19:32:43 -06:00
Dan Halbert c71b6cb699 move to esp-idf PR merge 2021-03-11 20:05:31 -05:00
Lucian Copeland 6b2c9985ff Extract RTC, implement fake RTC deepsleep 2021-03-11 17:50:05 -05:00
Dan Halbert f75a009ed4 fix unnecessary statement order change 2021-03-11 15:16:32 -05:00
Dan Halbert de88fa37fb Merge remote-tracking branch 'adafruit/main' into esp32s2-i2c-bug 2021-03-11 12:27:29 -05:00
Dan Halbert 061d5910cb use fixed esp-idf 2021-03-11 12:09:01 -05:00
Dan Halbert 08c5dbb003 use return values in STM PWMOut constructor, not exceptions 2021-03-11 08:52:47 -05:00
Dan Halbert 7029783985 funhouse board 2021-03-08 21:24:28 -05:00
FBSeletronica 27703f3156 fix quote error 2021-03-08 10:32:37 -03:00
FBSeletronica fe29780afb updating USB_VID and USB_PID for Espressif modules 2021-03-08 08:51:48 -03:00
FBSeletronica 2771e7fe75 Updating USB vendor ID and producfor Espressif modules 2021-03-08 08:47:33 -03:00
Dan Halbert 26eb429cc6 restore install/delete for i2c driver 2021-03-07 18:23:14 -05:00
FBSeletronica 4a50f1dd6f Update Vendor ID for Espressif 2021-03-06 18:36:53 -03:00
FBSeletronica 48e727f7d6 adding port for Franzininho WIFI board ESP32S2 w/Wrover 2021-03-06 17:47:27 -03:00
FBSeletronica 6cf9c5158c adding port for Franzininho WIFI board 2021-03-06 17:15:54 -03:00
microDev 13453d35c6
fix watchdog deinit 2021-03-04 13:23:34 +05:30