Commit Graph

9081 Commits

Author SHA1 Message Date
bill88t e1891038c8 Forgor the one IO pin and sda-scl 2022-09-04 16:59:56 +03:00
Dan Halbert 449b43e5a6
Merge pull request #6863 from jepler/rp2pio-erroneous-mask
rp2pio: fix occasional bug when not using OUT pins
2022-09-04 09:15:35 -04:00
Jeff Epler a3e17189a4
rp2pio: fix occasional bug when not using OUT pins
a NULL first pin object is used to indicate that there are zero
of some kind of pin associated with the StateMachine. However,
mask_and_rotate wasn't checking for zero. It actually read data from
near address 0x0 and (in my case) got a nonzero mask, which then
caused a program with GPIO11 and GPIO12 as input with pull-up and no
out pins to erroneously encounter the error "pull masks conflict with
direction masks"
2022-09-03 20:39:42 -05:00
wemos 3a18d285a2 Add LOLIN S3 ESP32-S3 board. 2022-09-03 11:06:51 +08:00
latkinso42 6fe2ea4513 Merging back with updated main files 2022-09-02 15:51:45 -04:00
Pontus Oldberg 59fb3fbbd6
Merge branch 'adafruit:main' into main 2022-09-01 10:35:13 +02:00
Dan Halbert 52080e24eb status bar control 2022-08-30 15:23:44 -04:00
Dan Halbert 3ba385ff5c
Merge pull request #6794 from jepler/esp32-camera-error-checking
Esp32 camera error checking
2022-08-30 11:41:42 -04:00
Dan Halbert 371e544a92
Merge pull request #6823 from pypewpew/ugame10-fix
Fix ugame.py for the ugame10 board
2022-08-29 12:34:02 -04:00
Jeff Epler 2c6f57be5e
Update ports/espressif/common-hal/esp32_camera/Camera.c
Co-authored-by: Mark <56205165+gamblor21@users.noreply.github.com>
2022-08-28 16:46:50 -05:00
Lee Atkinson 04af01a672 Pin Validation fixed/readmultiple return fixed 2022-08-27 14:47:12 -04:00
Radomir Dopieralski 0a0c03c3d2 Fix ugame.py for the ugame10 board
It was still trying to use the gamepad module, and there was a typo
2022-08-26 17:07:44 +02:00
Jeff Epler ebd58155f2 bump pico-sdk to 1.4.0 2022-08-26 09:54:16 -05:00
Jeff Epler dc27fb967d error at runtime if no psram actually reserved 2022-08-26 09:27:50 -05:00
Jeff Epler 9f22e75e5e error if camera is configured but no psram 2022-08-26 09:27:50 -05:00
Jeff Epler 8ed6a6135a Disable camera on boards without psram 2022-08-26 09:27:50 -05:00
Dan Halbert 83838fc4fd
Merge pull request #6798 from DavePutz/issue_6735
Fix handling of zero-length pulseout pulse
2022-08-25 07:49:28 -04:00
Lee Atkinson 37b6079c05 Merge branch 'adcdma' of https://github.com/latkinso42/circuitpython into adcdma
Reconciling remote updates
2022-08-24 21:46:28 -04:00
Lee Atkinson 55c0404d85
Merge branch 'adafruit:main' into adcdma 2022-08-24 21:07:12 -04:00
Lee Atkinson 6fd08483e2 Tidying code for PR/ Minor Issues 2022-08-24 17:41:51 -04:00
DavePutz c00a630f50
Update PulseOut.c
reorder the tests for zero-length
2022-08-23 15:58:27 -05:00
root 3daebb36c3 Fix handling of zero-length pulseout pulse 2022-08-23 15:17:54 -05:00
Jeff Epler 6572f85913
Merge pull request #6779 from dhalbert/matrixportal-more-ram
matrixportal: remove ulab to make room to freeze portalbase
2022-08-23 09:41:36 -06:00
Lee Atkinson e23b621d69 Fixing 8 bit and 12 bit conversion 2022-08-22 18:55:55 -04:00
Lee Atkinson f5655dd48c Fixing Build errors/ DMA Xfer Rate 2022-08-21 11:44:40 -04:00
Lee Atkinson 68671399d1 More formating 2022-08-19 10:51:13 -04:00
Lee Atkinson d3c3c9eac4 Tidy a few things 2022-08-18 19:10:16 -04:00
Lee Atkinson f91af513b7 Introduced odule adcbuffer / removed analogio/AnalogFastIn 2022-08-18 16:23:17 -04:00
Dan Halbert 0c87d0b40d matrixportal: remove ulab instead of bleio HCI 2022-08-18 10:23:37 -04:00
Lee Atkinson 34b8fbaf14
Merge branch 'adafruit:main' into adcdma 2022-08-18 09:08:10 -04:00
Dan Halbert 2664d3766d matrixportal: remove BLEIO HCI to make room to freeze portalbase 2022-08-18 07:43:31 -04:00
arturo182 23f2b62196 Add the Solder Party BBQ20KBD board 2022-08-17 20:44:23 +02:00
Scott Shawcroft 2f0e209eca
Merge pull request #6772 from dhalbert/esp32-touch-fix
Fix ESP32 touch; rework common code a bit
2022-08-17 10:24:22 -07:00
Dan Halbert 2bc8d73776 Fix ESP32 touch; rework common code a bit 2022-08-16 20:04:27 -04:00
Scott Shawcroft 4b1d1fd72d
Merge pull request #6768 from mayrhomar/main
Add Waveshare ESP32-S2-Pico-LCD
2022-08-16 09:50:46 -07:00
Scott Shawcroft 3fbddfde59
Merge pull request #6758 from gamblor21/rp2040_i2ctarget
Rp2040 i2ctarget support
2022-08-15 13:57:49 -07:00
Martin 528da05f54 Add Waveshare ESP32-S2-Pico-LCD 2022-08-15 16:46:14 +02:00
Lee Atkinson 4542c801b0 Tidying up loose endson draft PR 2022-08-14 13:03:33 -04:00
lady ada 2f2ccdddbf pycam rev b pins 2022-08-13 23:41:35 -04:00
gamblor21 7584363f66 Forgot an include 2022-08-13 17:41:45 -05:00
gamblor21 1ae2a2154e Initial i2ctaret commit 2022-08-13 17:00:43 -05:00
MicroDev fa3e265bfb
Merge pull request #6753 from tannewt/esp_led_reset
Audit all boards with LED pins defined
2022-08-13 15:25:02 +05:30
Lee Atkinson 8cd12b2478 Copyright Change 2022-08-12 16:01:58 -04:00
Lee Atkinson 81c7ba899d Copyright Update/Acknowledgements 2022-08-12 13:57:45 -04:00
Lee Atkinson 6d8e8c71fc Merge branch 'adcdma' of https://github.com/latkinso42/circuitpython into adcdma
Fixing code behind commits
2022-08-11 17:58:46 -04:00
Lee Atkinson ce24469848
Merge branch 'adafruit:main' into adcdma 2022-08-11 17:57:01 -04:00
Lee Atkinson c3c1e307c4 Sample Rate Enhancements 2022-08-11 17:50:30 -04:00
Scott Shawcroft df1435ae94
Audit all boards with LED pins defined
Add them as MICROPY_HW_LED_STATUS so that we can share reset code
for them. They aren't actually used for the status if another RGB
option is available. (But maybe they should be.)

Fixes #6717
2022-08-11 14:41:20 -07:00
Scott Shawcroft 5823bcc744
Merge branch 'main' into c3_short_send 2022-08-11 12:45:02 -07:00
Scott Shawcroft f1053fb963
Introduce port_yield()
This allows the web workflow send code to yield briefly when
waiting for more room to send in a socket. Waiting for an "interrupt"
could wait forever because the select task only waits for read and
error. Adding wait on write is tricky because much of the time we
don't care if the sockets are ready to write. Using yield avoids
this trickiness.
2022-08-11 11:25:34 -07:00
Lee Atkinson 5fb5fd0558
Merge branch 'adafruit:main' into adcdma 2022-08-10 18:33:52 -04:00
Scott Shawcroft f9d724c09e
Fix retries after successful connection.
We may have set retries to 0 to enforce a timeout but the connect
succeeded. When it succeeds, we want to allow retries later in
case we lose signal briefly. (The callback will do this too but
the connect function will override it after.)

Also, remove extra code from websocket that is leftover from
debugging.
2022-08-10 15:24:08 -07:00
Jeff Epler c2a45c1f27
Merge pull request #6739 from jepler/qrio-esp32camera
Enable qrio to work with rgb565 data, including byte-swapped data
2022-08-10 13:54:40 -05:00
Scott Shawcroft 7a5d2e81fc
Merge pull request #6734 from dhalbert/remove-autobrightness
Remove support for auto-brightness
2022-08-10 10:22:53 -07:00
Jeff Epler 86f9d98a5d fix documentation of framebuffer_count 2022-08-10 11:12:54 -05:00
Dan Halbert af64faae1e switch back one I2C message 2022-08-10 12:06:43 -04:00
Lee Atkinson e778112710
Merge branch 'adafruit:main' into adcdma 2022-08-10 10:29:17 -04:00
Lee Atkinson 9e0c580d3d AnalogFastIn 2022-08-10 09:42:24 -04:00
Dan Halbert 198c8fea11 merge from upstream and fix espressif_esp32s3_eye 2022-08-10 08:43:08 -04:00
Dan Halbert 02cc6c2aee Merge remote-tracking branch 'adafruit/main' into remove-autobrightness 2022-08-10 08:35:53 -04:00
Scott Shawcroft 138c92f035
Merge pull request #6727 from dhalbert/restore-deleted-modules
restore rainbowio and onewireio to a number of boards
2022-08-09 21:44:26 -07:00
Dan Halbert 41bcd7b260 Remove support for auto-brightness 2022-08-09 22:40:21 -04:00
Scott Shawcroft 59b4353282
Merge pull request #6713 from tannewt/exception_filename
Add exception filename to title bar
2022-08-09 16:59:12 -07:00
Jeff Epler 5040e1b7a5
Merge pull request #6684 from jepler/espressif-camera-2
Rewrite camera support for the Espressif port
2022-08-09 18:50:25 -05:00
Scott Shawcroft db837e2b48
Merge pull request #6725 from dhalbert/esp-stack-size-16kB
increase main task stack size from 8kB to 16kB
2022-08-09 16:40:16 -07:00
Scott Shawcroft 554063a817
Merge branch 'main' into espressif-camera-2 2022-08-09 14:07:14 -07:00
Scott Shawcroft 5084de1b73
Merge pull request #6708 from strid3r21/main
Added Smart Bee Design Boards
2022-08-09 14:06:11 -07:00
Dan Halbert c4db71d12e
Merge pull request #6721 from dhalbert/i2c-target
Change I2C terminology from "peripheral" to "target"
2022-08-09 16:12:17 -04:00
Dan Halbert 34b22eac2a restore rainbowio and onewireio to a number of boards 2022-08-09 16:10:17 -04:00
Dan Halbert 4021b44a39 increase main task stack size from 8kB to 16kB 2022-08-09 15:00:01 -04:00
Scott Shawcroft df52d995ed
Merge pull request #6714 from dannystaple/patch-2
Improve docs for rp2Pio Statemachine frequency
2022-08-09 10:50:27 -07:00
Scott Shawcroft b3b27a1d80
Remove extra leading spaces 2022-08-09 10:45:47 -07:00
Scott Shawcroft 556d01a685
Remove extra newline at end of file 2022-08-09 10:44:57 -07:00
Scott Shawcroft ce1273be7a
Pull Feather S2 TFT LED down on reset 2022-08-09 10:42:56 -07:00
Jeff Epler c74746f052 Cross references in documentation always help 2022-08-09 12:20:02 -05:00
Dan Halbert 84807cd6eb Change I2C terminology from "peripheral" to "target" 2022-08-09 13:13:19 -04:00
Scott Shawcroft d95cfc3abc
Merge pull request #6719 from dhalbert/huzzah32-web-workflow
enable web workflow on Feather HUZZAH32
2022-08-09 10:08:39 -07:00
Jeff Epler 5a85b8ab95 improve docstrings based on my best sleuthing 2022-08-09 11:42:19 -05:00
Jeff Epler ec839d6f90 these items should not have been disabled 2022-08-09 11:42:19 -05:00
Jeff Epler f87e34b9ed add shutter button 2022-08-09 11:42:19 -05:00
takayoshiotake 5ce3778d75 Add custom board: Octave RP2040 2022-08-09 22:19:38 +09:00
Dan Halbert 10275001ac enable web workflow on Feather HUZZAH32 2022-08-09 07:26:18 -04:00
paul 15ad24ba62 ran pre-commit. 2022-08-09 04:32:21 -04:00
Danny Staple 3c1c477c5b
Improve docs for rp2Pio Statemachine frequency
This frequency can be set to 0 for the system (133mhz) clock speed.
2022-08-08 22:14:55 +01:00
lady ada 2cd9222e5e add includes 2022-08-07 14:32:29 -04:00
lady ada 029b6b6fbe add default display 2022-08-07 14:12:40 -04:00
paul a6eadd6259 Added Bee Motion S3 board 2022-08-07 11:59:43 -04:00
paul f39058edc4 Added Bee S3 board 2022-08-06 22:22:20 -04:00
Lee Atkinson f69939c49c First Commit for AnalogFastIn 2022-08-06 16:22:50 -04:00
Lee Atkinson 56c44f6265 Merge remote-tracking branch 'origin/main' 2022-08-06 15:53:54 -04:00
Lee Atkinson 552f6af4a1 clean up 2022-08-06 15:50:22 -04:00
Jeff Epler 1a11ff864a
Merge remote-tracking branch 'origin/main' into espressif-camera-2 2022-08-05 21:08:12 -05:00
Jeff Epler 1da8065d6b
Merge remote-tracking branch 'origin/main' into espressif-camera-2 2022-08-05 16:38:51 -05:00
Scott Shawcroft 207311b02a
Merge branch 'main' into title_execution_status 2022-08-05 13:42:58 -07:00
Dan Halbert 8c10e09ba0
Merge pull request #6667 from jepler/esp-reserve-heap-for-idf
Add ability to reserve psram
2022-08-05 15:06:44 -04:00
Jeff Epler 3f49d77036
Improve esp32-s3-eye board definition 2022-08-05 13:10:21 -05:00
Scott Shawcroft e7d72b1ebe
Use libgcc from Arch on SAMD21 (it's smaller.)
Fixes #4705
2022-08-04 16:33:41 -07:00
Scott Shawcroft 83cbbc9946
Add BLE status to title bar 2022-08-04 16:33:10 -07:00
Scott Shawcroft 125b276af0
Get CIRCUITPY FATFS directly.
Otherwise, you may actually get a non-root filesystem.

Fixes #6575
2022-08-04 16:06:27 -07:00
Jeff Epler 861fa9625d
Add the ESP32-EYE aka ESP-EYE 2022-08-04 15:12:12 -05:00
Jeff Epler 98202c8568
Allow changing camera settings that require reinit
These can only be changed in a group, though any items to keep
unchanged can be unspecified or specified as None.
2022-08-04 15:12:11 -05:00
Jeff Epler 428fbcd343
remove debug message during build 2022-08-04 15:12:10 -05:00
Jeff Epler 0e26a937cc
Disable camera everywhere it doesn't fit 2022-08-04 15:12:08 -05:00
Jeff Epler 230532f0eb
one last doc build fix 2022-08-04 15:12:07 -05:00
Jeff Epler a9d53ad2a6
Fix "check-stubs" problems 2022-08-04 15:12:06 -05:00
Jeff Epler 7cb40c9054
further doc build fixes 2022-08-04 15:12:05 -05:00
Jeff Epler 81fb9a5f20
specify return type for docs 2022-08-04 15:12:04 -05:00
Jeff Epler 8bdbe0355a
Add more getters 2022-08-04 15:12:02 -05:00
Jeff Epler badcae5ace
Fix docstring errors 2022-08-04 15:12:01 -05:00
Jeff Epler aead0dfe45
Return a Bitmap from take() when appropriate 2022-08-04 15:12:00 -05:00
Jeff Epler 54fe753602
Enable gifio and qrio when appropriate 2022-08-04 15:11:59 -05:00
Jeff Epler 258f72640a
Implement a pile of getters & setters 2022-08-04 15:11:57 -05:00
Jeff Epler 69949ecb43
update PID for this board 2022-08-04 15:11:56 -05:00
Jeff Epler d1b89fca91
Reset camera when interpreter is reset 2022-08-04 15:11:55 -05:00
Jeff Epler f54c7adddc
Must treat NO_PIN cast to uint8_t the same as NO_PIN
Otherwise, deinitializing a camera with e.g., the powerdown
pin unspecified results in an assertion failure in a debug build.
2022-08-04 15:11:54 -05:00
Jeff Epler 1d1e139379
fix taking multiple pictures 2022-08-04 15:11:53 -05:00
Jeff Epler b903a020fd
Enable display on esp32-s3-eye 2022-08-04 15:11:52 -05:00
Jeff Epler 8d673bdbf5
reserve 1MB of PSRAM for camera framebuffer on esp32s3-eye
.. this setting can be overridden with a bigger or smaller value in
CIRCUITPY/.env but 1/8 of PSRAM seems like a good initial value. It's
enough to store a single 800x600 or 640x480 RGB565 frame, or multiple
smaller frames such as 320x240.
2022-08-04 15:11:51 -05:00
Jeff Epler 5db6db0128
add esp32-camera
This uses the esp32-camera code instead of our own homebrewed camera code.
In theory it supports esp32, esp32-s2 and esp32-s3, as long as they have
PSRAM.

This is very basic and doesn't support changing any camera parameters,
including switching resolution or pixelformat.

This is tested on the Kaluga (ESP32-S2) and ESP32-S3-Eye boards.

First, reserve some PSRAM by putting this line in `CIRCUITPY/_env`:
```
CIRCUITPY_RESERVED_PSRAM=524288
```
and hard-reset the board for it to take effect.

Now, the following script will take a very low-resolution jpeg file and print
it in the REPL in escape coded form:

```python
import board
import esp32_camera

c = esp32_camera.Camera(
    data_pins=board.CAMERA_DATA,
    external_clock_pin=board.CAMERA_XCLK,
    pixel_clock_pin=board.CAMERA_PCLK,
    vsync_pin=board.CAMERA_VSYNC,
    href_pin=board.CAMERA_HREF,
    pixel_format=esp32_camera.PixelFormat.JPEG,
    i2c=board.I2C(),
    external_clock_frequency=20_000_000)

m = c.take()
if m is not None:
    print(bytes(m))
```

Then on desktop open a python repl and run something like
```python
>>> with open("my.jpg", "wb") as f: f.write(<BIG PASTE FROM REPL>)
```
and open my.jpg in a viewer.
2022-08-04 15:11:50 -05:00
Jeff Epler 8e08cc38f8
Add default I2C bus to Kaluga 2022-08-04 15:11:48 -05:00
Scott Shawcroft e0cb8ef17e
Merge pull request #6694 from dhalbert/esp32-no-psram
ESP32 no psram support; other ESP32 cleanup
2022-08-04 11:49:39 -07:00
Scott Shawcroft 3707b54e3b
Merge pull request #6672 from bill88t/main
Add Waveshare ESP32-S2-Pico
2022-08-04 11:09:59 -07:00
Dan Halbert 202fac59f8 ESP32 fixes for no PSRAM; some cleanup 2022-08-04 13:44:52 -04:00
Dan Halbert d4e8c19b49 merge from main 2022-08-04 12:43:23 -04:00
Jeff Epler 82be75adb5 Add ability to reserve psram
.. the primary user of which will be the camera, since the framebuffers
must be allocated via esp-idf allocation function and never from the
gc heap.

A board can have a default value, and the value can also be set in the
/.env file using the key CIRCUITPY_RESERVED_PSRAM with the value being
the reserved size in bytes.

Co-authored-by: Dan Halbert <halbert@adafruit.com>
2022-08-03 16:19:40 -05:00
Pontus Oldberg c884194c92 Fixed incorrect PID. 2022-08-03 08:45:39 +02:00
bill88t 68bb6b9988 ran precommit 2022-08-03 09:14:26 +03:00
Bill Sideris efa3e40f90
Add the one obtained from esp 2022-08-03 08:48:28 +03:00
Dan Halbert d3d5e36548 update adafruit/esp-idf for ESP32_ECO3_CACHE_LOCK_FIX fix 2022-08-02 22:37:06 -04:00
Dan Halbert b027d111a9 remove custom console UART from sdkconfig-esp32.defaults 2022-08-02 22:00:59 -04:00
Dan Halbert 534a482d94 initial HUZZAH32 bring-up, with hacked pins 2022-08-02 21:47:46 -04:00
Dan Halbert 767234e79c
Merge pull request #6688 from tannewt/fix_esp32c3_paste
Fix C3 when pasting 128+ characters
2022-08-02 21:35:02 -04:00
Dan Halbert 524cc5e274
Merge pull request #6685 from tannewt/esp32_ww
Enable Web Workflow on Feather ESP32 V2
2022-08-02 21:30:23 -04:00
Scott Shawcroft 9de8ae70b6
Fix C3 when pasting 128+ characters
The ringbuf used to fill up and the recv interrupt would block CP.
Now it'll disable the interrupt until we have enough room in the
ringbuf.

Fixes #6678
2022-08-02 15:25:19 -07:00
Scott Shawcroft 1c69fe1727
Fix S2/S3 USB
The new Kconfig that fixed C3 added a dependency on USB_OTG_SUPPORTED
that is only calculated if we include the usb module in cmake.

Fixes #6679
2022-08-02 14:11:09 -07:00
Scott Shawcroft 74e841d835
Read fuses to know what flash and ram pins to never reset 2022-08-02 12:01:42 -07:00
Pontus Oldberg dfcbc79cdf
Merge branch 'adafruit:main' into main 2022-08-02 14:07:09 +02:00
Bill Sideris 60429f51c7
Add official vid/pid 2022-08-02 09:43:17 +03:00
Scott Shawcroft f0c6a8c49a
Odroid pin defs 2022-08-01 15:52:08 -07:00
Scott Shawcroft 9661d3256c
Add more ESP32 boards and enable web workflow 2022-08-01 15:52:08 -07:00
Dan Halbert 9baa2724a7 code formatting suggestion 2022-08-01 00:27:25 -04:00
Pontus Oldberg 03181fe362 Adds support for the Challenger RP2040 SubGHz board. 2022-07-31 10:36:04 +02:00
bill88t c71cc4e0dd Add Waveshare ESP32-S2-Pico 2022-07-30 15:35:48 +03:00
Dan Halbert 1348cb435b Fix SAMD I2C frequency check 2022-07-29 19:07:33 -04:00
Scott Shawcroft 312e298890
Fix other ESP builds and arduino_nano_33_iot 2022-07-29 11:02:35 -07:00
Scott Shawcroft d6344812e8
Lots of web workflow, C3 and title bar fixes
* Fixes #6221 - C3 hang on `import wifi`. Enabling the WiFi PHY was
  disabling USB. Now boards that use it set CONFIG_ESP_PHY_ENABLE_USB
  explicitly.
* Fixes #6655 - Allows pasting into the web serial page. Fixes reading
  more than 0xf bytes at a time.
* Fixes #6653 - Fixes web socket encoding of payloads >125 bytes. Can
  happen when printing a long string.
* Fixes C3 responsiveness when waiting for key to enter REPL. (It
  now correctly stops sleeping.)
* Disables title bar updates when in raw REPL. Related to #6548.
* Adds version to title bar.
2022-07-28 16:06:56 -07:00
Dan Halbert 3817d007aa clean up esp32 sdkconfigs 2022-07-28 17:52:27 -04:00
Scott Shawcroft c4c15206e7
Merge pull request #6608 from tannewt/web_workflow_port
Allow for dynamic reconfigure including port
2022-07-28 12:59:31 -07:00
Dan Halbert 282f8c49a6
Merge pull request #6660 from tannewt/fix_c3_serial_tx
Improve USB to Serial/JTAG TX
2022-07-28 14:42:56 -04:00
Scott Shawcroft cb5fa3eaa6
Merge pull request #6664 from dglaude/patch-1
Add board.LED (alias of board.LED_R part of RGB)
2022-07-28 11:26:31 -07:00