Skip to content

update 010222 #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions cores/esp32/WMath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ long random(long howsmall, long howbig)
}

long map(long x, long in_min, long in_max, long out_min, long out_max) {
const long dividend = out_max - out_min;
const long divisor = in_max - in_min;
const long delta = x - in_min;
if(divisor == 0){
log_e("Invalid map input range, min == max");
return -1; //AVR returns -1, SAM returns 0
const long run = in_max - in_min;
if(run == 0){
log_e("map(): Invalid input range, min == max");
return -1; // AVR returns -1, SAM returns 0
}
return (delta * dividend + (divisor / 2)) / divisor + out_min;
const long rise = out_max - out_min;
const long delta = x - in_min;
return (delta * rise) / run + out_min;
}

uint16_t makeWord(uint16_t w)
Expand Down
47 changes: 0 additions & 47 deletions docs/ISSUE_TEMPLATE.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/api/i2c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -381,4 +381,4 @@ Here is an example of how to use the I2C in Slave Mode.
.. literalinclude:: ../../../libraries/Wire/examples/WireSlave/WireSlave.ino
:language: arduino

.. _Arduino Wire Library: https://www.arduino.cc/en/reference/wire
.. _Arduino Wire Library: https://www.arduino.cc/en/reference/wire
9 changes: 2 additions & 7 deletions docs/source/boards/boards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,13 @@ Generic Vendor
.. note::
Create one file per board or one file with multiple boards. Do not add board information/description on this file.

.. include:: ../common/datasheet.inc

Resources
---------

* `ESP32 Datasheet`_ (Datasheet)
* `ESP32-S2 Datasheet`_ (Datasheet)
* `ESP32-C3 Datasheet`_ (Datasheet)

.. _Espressif Systems: https://www.espressif.com
.. _Espressif Product Selector: https://products.espressif.com/
.. _ESP32 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
.. _ESP32-S2 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf
.. _ESP32-C3 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf

.. |board_lolin_d32| raw:: html

Expand Down
7 changes: 1 addition & 6 deletions docs/source/boards/generic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,4 @@ Pin Layout

Add here the pin layout image (not required).

Resources
---------

* `ESP32`_ (Datasheet)

.. _ESP32: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
.. include:: ../common/datasheet.inc
13 changes: 13 additions & 0 deletions docs/source/common/datasheet.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Datasheet
---------

* `ESP32`_ (Datasheet)
* `ESP32-S2`_ (Datasheet)
* `ESP32-C3`_ (Datasheet)
* `ESP32-S3`_ (Datasheet)

.. _Espressif Product Selector: https://products.espressif.com/
.. _ESP32: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
.. _ESP32-S2: https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf
.. _ESP32-C3: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf
.. _ESP32-S3: https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
# -- Project information -----------------------------------------------------

project = 'Arduino-ESP32'
copyright = '2021, Espressif'
copyright = '2022, Espressif'
author = 'Espressif'

# The full version, including alpha/beta/rc tags
release = '2.0.0'
release = '2.0.2'

# -- General configuration ---------------------------------------------------

Expand Down
19 changes: 10 additions & 9 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ Here are the ESP32 series supported by the Arduino-ESP32 project:
======== ====== =========== ===================================
SoC Stable Development Datasheet
======== ====== =========== ===================================
ESP32 Yes Yes `ESP32 Datasheet`_
ESP32-S2 Yes Yes `ESP32-S2 Datasheet`_
ESP32-C3 Yes Yes `ESP32-C3 Datasheet`_
ESP32-S3 No No `ESP32-S3 Datasheet`_
ESP32 Yes Yes `ESP32`_
ESP32-S2 Yes Yes `ESP32-S2`_
ESP32-C3 Yes Yes `ESP32-C3`_
ESP32-S3 No Yes `ESP32-S3`_
======== ====== =========== ===================================

See `Boards <boards/boards.html>`_ for more details about ESP32 development boards.
Expand Down Expand Up @@ -91,7 +91,9 @@ Before opening a new issue, please read this:
Be sure to search for a similar reported issue. This avoids duplicating or creating noise in the GitHub Issues reporting.
We also have the troubleshooting guide to save your time on the most common issues reported by users.

For more details, see the `Issue Template <https://github.com/espressif/arduino-esp32/blob/master/docs/ISSUE_TEMPLATE.md>`_.
For more details about creating new Issue, see the `Issue Template <https://github.com/espressif/arduino-esp32/blob/master/.github/ISSUE_TEMPLATE/Issue-report.yml>`_.

If you have any new idea, see the `Feature request Template <https://github.com/espressif/arduino-esp32/blob/master/.github/ISSUE_TEMPLATE/Feature-request.yml>`_.

First Steps
-----------
Expand All @@ -114,15 +116,14 @@ in the examples menu or inside each library folder.

https://github.com/espressif/arduino-esp32/tree/master/libraries


.. include:: common/datasheet.inc

Resources
---------

.. _Espressif Systems: https://www.espressif.com
.. _Espressif Product Selector: https://products.espressif.com/
.. _ESP32 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
.. _ESP32-S2 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf
.. _ESP32-C3 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf
.. _ESP32-S3 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf
.. _Arduino.cc: https://www.arduino.cc/en/Main/Software
.. _Arduino Reference: https://www.arduino.cc/reference/en/
.. _ESP32 Forum: https://esp32.com
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Here you will find all the relevant information about the project.
This is a work in progress documentation and we will appreciate your help! We are looking for contributors!

.. toctree::
:maxdepth: 2
:maxdepth: 1
:caption: Contents:

Getting Started <getting_started>
Expand Down
18 changes: 3 additions & 15 deletions docs/source/libraries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,7 @@ Notes

.. note:: Some peripherals are not available for all ESP32 families. To see more details about it, see the corresponding SoC at `Product Selector <https://products.espressif.com>`_ page.

Datasheet
^^^^^^^^^

* `ESP32 <https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf>`_
* `ESP32-S2 <https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf>`_
* `ESP32-C3 <https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf>`_
.. include:: common/datasheet.inc

APIs
----
Expand All @@ -78,13 +73,6 @@ The Arduino ESP32 offers some unique APIs, described in this section:

.. toctree::
:maxdepth: 1
:glob:

Bluetooth <api/bluetooth>
Deep Sleep <api/deepsleep>
ESPNOW <api/espnow>
GPIO <api/gpio>
I2C <api/i2c>
RainMaker <api/rainmaker>
Reset Reason <api/reset_reason>
USB <api/usb.rst>
Wi-Fi <api/wifi>
api/*
14 changes: 6 additions & 8 deletions docs/source/tutorials/io_mux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ JTAG Dedicated GPIOs
SD/SDIO/MMC HostController Dedicated GPIOs
Motor PWM Any GPIO
SDIO/SPI SlaveController Dedicated GPIOs
UART Any GPIO
UART Any GPIO[1]
I2C Any GPIO
I2S Any GPIO
LED PWM Any GPIO
Expand All @@ -72,8 +72,11 @@ Parallel QSPI Dedicated GPIOs
EMAC Dedicated GPIOs
Pulse Counter Any GPIO
TWAI Any GPIO
USB Dedicated GPIOs
============================== ===================================

[1] except for the download/programming mode decided by the bootloader.

This table is present on each datasheet provided by Espressif.

Usage Examples
Expand Down Expand Up @@ -106,16 +109,11 @@ To change the pins, we must call the ``Wire.setPins(int sda, int scl);`` functio

A similar approach also applies for the other peripherals.

.. include:: ../common/datasheet.inc

Resources
---------

* `ESP32`_ (Datasheet)
* `ESP32-S2`_ (Datasheet)
* `ESP32-C3`_ (Datasheet)

.. _Espressif Systems: https://www.espressif.com
.. _Espressif Product Selector: https://products.espressif.com/
.. _ESP32: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
.. _ESP32-S2: https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf
.. _ESP32-C3: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf
.. _IO MUX GPIO: https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf#iomuxgpio
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ void setup() {
config.frame_size = FRAMESIZE_SVGA;
config.jpeg_quality = 12;
config.fb_count = 1;
config.fb_location = CAMERA_FB_IN_DRAM;
}

#if defined(CAMERA_MODEL_ESP_EYE)
Expand Down