8000 sync by Jason2866 · Pull Request #9 · Jason2866/arduino-esp32 · GitHub
[go: up one dir, main page]

Skip to content

sync #9

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 101 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
676f5cf
fix UART FIFO test for being full (#5390)
SuGlider Jul 16, 2021
cf6ab9c
component: Remove circular dependency around 'main' (#5391)
projectgus Jul 16, 2021
dd25e2b
Fix some WiFi issues (#5395)
me-no-dev Jul 16, 2021
c8a4010
Rename LITTLEFS to LittleFS to match ESP8266 (#5396)
me-no-dev Jul 16, 2021
5eda278
Update camera example (#5397)
me-no-dev Jul 16, 2021
a9bd39d
Fix pin attenuation being overwritten (#5399)
me-no-dev Jul 16, 2021
eac8b2d
fix port{Input,Output,Mode}Register macros for chips with <=32 pins (…
igrr Jul 16, 2021
780588d
Remove undocumented and uncontrollable WiFI RSSI filter. (#5393)
rtrbt Jul 16, 2021
16f4b0f
IDF master d93887f9f (#5336)
me-no-dev Jul 16, 2021
0aafa05
Added function to retrieve the amount of data received from an BLECha…
xBiohazardx Jul 16, 2021
d9833f9
Remove mkfatfs tool from package json
me-no-dev Jul 18, 2021
1effae4
Docs: Initial documentation structure using Sphinx (#5355)
pedrominatel Jul 19, 2021
f64ca2e
Fixed typo in comments. (#5407)
Sagar73594 Jul 19, 2021
db4e766
add callback to HTTPUpdate (#5408)
jayanta525 Jul 19, 2021
f79411f
Links to the new docs updated and new docs build badge added
pedrominatel Jul 19, 2021
49df877
Merge pull request #5417 from pedrominatel/docs/readme_docs_update
VojtechBartoska Jul 19, 2021
6393dbc
Fix gh-pages update script
me-no-dev Jul 19, 2021
4a0305a
Fixes SD begin() end() memory leak #2897 (#5419)
SuGlider Jul 19, 2021
268595c
Various USB fixes (#5422)
me-no-dev Jul 20, 2021
4ada3f5
Fix Windows USB issues
me-no-dev Jul 20, 2021
b974fbd
Fix wdt OTA update
Jason2866 Jul 20, 2021
e12d8c8
fix: WiFiClientSecure connection timeout (#5398) (#5418)
vlastahajek Jul 21, 2021
cd56d8d
Fix ESP32-Solo WDT on HTTP OTA update
Jason2866 Jul 21, 2021
5458df0
Fixes Serial.end() hanging on ESP32-S2 (#5434)
SuGlider Jul 21, 2021
ee24736
Update README.md
me-no-dev Jul 22, 2021
34125ce
Examples update, add a note for configTime() that only one ntp server…
vortigont Jul 22, 2021
6e47e18
Add files via upload (#5433)
nqh2412 Jul 22, 2021
51e9c0b
IDF master c69f0ec32
me-no-dev Jul 25, 2021
dce7bc9
Merge branch 'espressif:master' into master
Jason2866 Jul 25, 2021
7db15b4
Fix WDT only for solo core
Jason2866 Jul 25, 2021
f3600ac
Merge pull request #9 from espressif/idf-master
Jason2866 Jul 25, 2021
e0e5c88
Create PULL_REQUEST_TEMPLATE.md (#5439)
VojtechBartoska Jul 26, 2021
6972695
IDF master c69f0ec32 (#5449)
me-no-dev Jul 26, 2021
1775dd1
Add ReadTheDocs CI (#5456)
me-no-dev Jul 26, 2021
3780b5c
Unbreak integer to string conversion functions. (#5423) (#5438)
rtrbt Jul 26, 2021
5334075
Merge branch 'espressif:master' into master
Jason2866 Jul 26, 2021
d5a98f9
Doc: Updated Troubleshooting file (#5430)
Sagar73594 Jul 26, 2021
65eafd1
Fixes ESP32-S2 LEDC PWM #5375 #5050 (#5452)
SuGlider Jul 26, 2021
43a39f7
Merge branch 'espressif:master' into master
Jason2866 Jul 26, 2021
9406f8e
Weaken tinyusb callbacks (#5475)
chegewara Jul 29, 2021
c5a1f3e
Corrected CLASSIC_BT_ENABLED to CONFIG_BT_CLASSIC_ENABLED. (#5471)
pulquero Jul 29, 2021
505926c
IDF master 58022f859
me-no-dev Jul 29, 2021
023ae75
Rework pulseIn to work on ESP32-C3
me-no-dev Aug 2, 2021
4365a45
Fix WiFi Deinit bug
me-no-dev Aug 2, 2021
31127f4
Support for Transfer-Encoding headers that specify "identify" (#5486)
Aug 2, 2021
be84c82
[WiFiClient] Default connection timeout, when no timeout provided (#5…
cziter15 Aug 2, 2021
5bb8177
Add initial support for USB MSC (#5466)
me-no-dev Aug 2, 2021
0174bf2
IDF master 606557b48
me-no-dev Aug 4, 2021
c8a8313
IDF master 8131d6f46
me-no-dev Aug 5, 2021
5b04b60
IDF master 59aa60d52
me-no-dev Aug 6, 2021
5614564
IDF master 83956ebba
me-no-dev Aug 7, 2021
a7fd5f6
IDF master 83956ebbae
me-no-dev Aug 10, 2021
5fd7379
Fix wrong attenuation being set to pins (#5522)
me-no-dev Aug 11, 2021
0b0dfab
Fix race in log_printf (#5523)
me-no-dev Aug 11, 2021
0acbe78
Increase default timeout for WiFiClient from 3ms to 3s (#5496)
drzony Aug 11, 2021
c4fcab2
Fix issue #5506 "WebServer serveStatic () can cause LoadProhibited ex…
timr49 Aug 11, 2021
a4118ea
Add ET-Board BUILTIN_LED pin (#5490)
ketri2484 Aug 11, 2021
0d5a12f
IDF master b1c3ee71c5
me-no-dev Aug 12, 2021
e5bd18d
Fix I2C Scan for S2 and C3 (#5528)
me-no-dev Aug 12, 2021
2af8cc3
Fixes Touchpad Interrupt (#5527)
SuGlider Aug 12, 2021
29cd5cd
IDF master 2c49af9e75
me-no-dev Aug 12, 2021
8fe7dce
Merge branch 'espressif:master' into master
Jason2866 Aug 12, 2021
fa81335
IDF master eb1a66e7c9
me-no-dev Aug 13, 2021
dc0ff8c
IDF master a20df743f1
me-no-dev Aug 13, 2021
a7ea737
Added LOLIN boards o the boards list.
pedrominatel Aug 16, 2021
b580bb2
Add log_buf to pretty print buffers
me-no-dev Aug 17, 2021
44dd99f
Merge branch 'master' into docs/wemos_boards
pedrominatel Aug 18, 2021
000d967
Merge pull request #5547 from pedrominatel/docs/wemos_boards
pedrominatel Aug 18, 2021
90c01da
Fix build error in ESP-IDF
me-no-dev Aug 19, 2021
ce68070
Fixed the external link to a new tab (LOLIN boards) (#5571)
pedrominatel Aug 23, 2021
78499c4
Added Franzininho WiFi board support (#5570)
pedrominatel Aug 23, 2021
29455a0
Fix issue #5507 "Constructor WebServer::WebServer(IPAddress addr, int…
timr49 Aug 23, 2021
94809ce
fix: timerRead() is returning the last read value, not the actual #34…
LoriLori Aug 23, 2021
e265bd0
Add new board (Deneyap Mini) (#5531)
zeynepdicle Aug 23, 2021
8785335
Add SparkFun ESP32 MicroMod microcontroller (#5556)
seanhagen Aug 23, 2021
929cf2c
Add ATMegaZero ESP32-S2 microcontroller (#5569)
eddieespinal Aug 23, 2021
b1d072d
Implements UART SerialHardware Refactoring on top of IDF (#5549)
SuGlider Aug 23, 2021
c45cff5
Implement USB HID Device Support for ESP32-S2 (#5538)
me-no-dev Aug 23, 2021
0730e0e
Include nvs_commit() on three methods (#5309)
beamholder Aug 23, 2021
1f59c5a
Adds HardwareSerial::setRxBufferSize() (#5583)
SuGlider Aug 24, 2021
a62979d
Add missing upload.flags (#5589)
riosnav Aug 25, 2021
9ced459
Fix build compilation due to changes in the HW_TIMER's structs
me-no-dev Aug 30, 2021
249a3e2
Merge branch 'master' into idf-master
me-no-dev Aug 30, 2021
82404b0
Fix compilation warnings and errors with USB
me-no-dev Aug 30, 2021
c6ff727
Update USBCDC.cpp
me-no-dev Aug 30, 2021
f5fee39
Update CMakeLists.txt
me-no-dev Aug 30, 2021
9afc0bd
IDF master b63ec47238
me-no-dev Aug 30, 2021
b05f3f5
Update libarduino_tinyusb.a
me-no-dev Aug 30, 2021
4a55ff9
Add support for the hardware CDC in ESP32-C3 (#5614)
me-no-dev Aug 31, 2021
24b76cb
Add string constructor and concat routines taking explicit length arg…
rcombs Aug 31, 2021
9eea85f
Check if m_pServerCallbacks is not null before calling method. (#5603)
Marcus10110 Aug 31, 2021
44c1198
Added UM FeatherS2 Neo to boards.txt and added appropriate variants. …
UnexpectedMaker Aug 31, 2021
6c72afd
Merge branch 'master' into idf-master
me-no-dev Aug 31, 2021
0101877
Update HWCDC.cpp
me-no-dev Aug 31, 2021
453af38
Supported devices table updated due the 2.0.0 release
pedrominatel Aug 31, 2021
92ce408
Merge pull request #5616 from pedrominatel/docs/update_for_release_2-0-0
pedrominatel Aug 31, 2021
6ed9294
IDF master 5f38b766a8
me-no-dev Sep 1, 2021
b3c651c
IDF master b1f851b8f8
me-no-dev Sep 1, 2021
5641a10
IDF master 61299f879e
me-no-dev Sep 2, 2021
52404b4
Merge branch 'espressif:master' into master
Jason2866 Sep 2, 2021
48fb4e4
Merge pull request #14 from espressif/idf-master
Jason2866 Sep 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 9 additions & 9 deletions platform.txt

Large diffs are not rendered by default.

226 changes: 130 additions & 96 deletions tools/esptool.py

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions tools/platformio-build-esp32.py

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions tools/platformio-build-esp32c3.py

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions tools/platformio-build-esp32s2.py

Large diffs are not rendered by default.

Binary file modified tools/sdk/esp32/bin/bootloader_dio_40m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_dio_80m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_dout_40m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_dout_80m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_qio_40m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_qio_80m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_qout_40m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_qout_80m.bin
Binary file not shown.
1 change: 1 addition & 0 deletions tools/sdk/esp32/include/app_update/include/esp_ota_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "esp_partition.h"
#include "esp_image_format.h"
#include "esp_flash_partitions.h"
#include "soc/soc_caps.h"

#ifdef __cplusplus
extern "C"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include "esp_flash_partitions.h"
#include "esp_image_format.h"
#include "esp_app_format.h"
// RESET_REASON is declared in rom/rtc.h
// [refactor-todo]: we shouldn't expose ROM header files in a public API header, remove them in v5.0
// Tracked in IDF-1968
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32S2
Expand Down Expand Up @@ -62,18 +63,37 @@ bool bootloader_common_ota_select_valid(const esp_ota_select_entry_t *s);
bool bootloader_common_ota_select_invalid(const esp_ota_select_entry_t *s);

/**
* @brief Check if the GPIO input is a long hold or a short hold.
* @brief Check if a GPIO input is held low for a long period, short period, or not
* at all.
*
* This function will configure the specified GPIO as an input with internal pull-up enabled.
*
* Number of the GPIO input will be configured as an input with internal pull-up enabled.
* If the GPIO input is held low continuously for delay_sec period then it is a long hold.
* If the GPIO input is held low for less period then it is a short hold.
*
* @param[in] num_pin Number of the GPIO input.
* @param[in] delay_sec Input must be driven low for at least this long, continuously.
* @return esp_comm_gpio_hold_t Defines type of hold a GPIO in low state.
* @return esp_comm_gpio_hold_t Type of low level hold detected, if any.
*/
esp_comm_gpio_hold_t bootloader_common_check_long_hold_gpio(uint32_t num_pin, uint32_t delay_sec);

/**
* @brief Check if a GPIO input is held low or high for a long period, short period, or not
* at all.
*
* This function will configure the specified GPIO as an input with internal pull-up enabled.
*
* If the GPIO input is held at 'level' continuously for delay_sec period then it is a long hold.
* If the GPIO input is held at 'level' for less period then it is a short hold.
*
* @param[in] num_pin Number of the GPIO input.
* @param[in] delay_sec Input must be driven to 'level' for at least this long, continuously.
* @param[in] level Input pin level to trigger on hold
* @return esp_comm_gpio_hold_t Type of hold detected, if any.
*/
esp_comm_gpio_hold_t bootloader_common_check_long_hold_gpio_level(uint32_t num_pin, uint32_t delay_sec, bool level);


/**
* @brief Erase the partition data that is specified in the transferred list.
*
Expand Down
32 changes: 32 additions & 0 deletions tools/sdk/esp32/include/bt/include/esp32/include/esp_bt.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,38 @@
extern "C" {
#endif

#ifdef CONFIG_BT_ENABLED

#define SOC_MEM_BT_DATA_START 0x3ffae6e0
#define SOC_MEM_BT_DATA_END 0x3ffaff10
#define SOC_MEM_BT_EM_START 0x3ffb0000
#define SOC_MEM_BT_EM_END 0x3ffb7cd8
#define SOC_MEM_BT_EM_BTDM0_START 0x3ffb0000
#define SOC_MEM_BT_EM_BTDM0_END 0x3ffb09a8
#define SOC_MEM_BT_EM_BLE_START 0x3ffb09a8
#define SOC_MEM_BT_EM_BLE_END 0x3ffb1ddc
#define SOC_MEM_BT_EM_BTDM1_START 0x3ffb1ddc
#define SOC_MEM_BT_EM_BTDM1_END 0x3ffb2730
#define SOC_MEM_BT_EM_BREDR_START 0x3ffb2730
#define SOC_MEM_BT_EM_BREDR_NO_SYNC_END 0x3ffb6388 //Not calculate with synchronize connection support
#define SOC_MEM_BT_EM_BREDR_END 0x3ffb7cd8 //Calculate with synchronize connection support
#define SOC_MEM_BT_EM_SYNC0_START 0x3ffb6388
#define SOC_MEM_BT_EM_SYNC0_END 0x3ffb6bf8
#define SOC_MEM_BT_EM_SYNC1_START 0x3ffb6bf8
#define SOC_MEM_BT_EM_SYNC1_END 0x3ffb7468
#define SOC_MEM_BT_EM_SYNC2_START 0x3ffb7468
#define SOC_MEM_BT_EM_SYNC2_END 0x3ffb7cd8
#define SOC_MEM_BT_BSS_START 0x3ffb8000
#define SOC_MEM_BT_BSS_END 0x3ffb9a20
#define SOC_MEM_BT_MISC_START 0x3ffbdb28
#define SOC_MEM_BT_MISC_END 0x3ffbdb5c

#define SOC_MEM_BT_EM_PER_SYNC_SIZE 0x870

#define SOC_MEM_BT_EM_BREDR_REAL_END (SOC_MEM_BT_EM_BREDR_NO_SYNC_END + CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF * SOC_MEM_BT_EM_PER_SYNC_SIZE)

#endif //CONFIG_BT_ENABLED

#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20200622

/**
Expand Down
6 changes: 5 additions & 1 deletion tools/sdk/esp32/include/config/sdkconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@
#define CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB 8
#define CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS 1000
#define CONFIG_FMB_PORT_TASK_PRIO 10
#define CONFIG_FMB_PORT_TASK_AFFINITY_CPU0 1
#define CONFIG_FMB_PORT_TASK_AFFINITY 0x0
#define CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT 20
#define CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE 20
#define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096
Expand Down Expand Up @@ -454,6 +456,8 @@
#define CONFIG_MBEDTLS_SSL_PROTO_DTLS 1
#define CONFIG_MBEDTLS_SSL_ALPN 1
#define CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS 1
#define CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE 1
#define CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE 1
#define CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS 1
#define CONFIG_MBEDTLS_AES_C 1
#define CONFIG_MBEDTLS_RC4_DISABLED 1
Expand Down Expand Up @@ -686,5 +690,5 @@
#define CONFIG_ULP_COPROC_ENABLED CONFIG_ESP32_ULP_COPROC_ENABLED
#define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
#define CONFIG_ARDUINO_IDF_COMMIT "d93887f9f"
#define CONFIG_ARDUINO_IDF_COMMIT "c69f0ec32"
#define CONFIG_ARDUINO_IDF_BRANCH "master"
2 changes: 2 additions & 0 deletions tools/sdk/esp32/include/console/esp_console.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ typedef struct {
uint32_t task_stack_size; //!< repl task stack size
uint32_t task_priority; //!< repl task priority
const char *prompt; //!< prompt (NULL represents default: "esp> ")
size_t max_cmdline_length; //!< maximum length of a command line. If 0, default value will be used
} esp_console_repl_config_t;

/**
Expand All @@ -61,6 +62,7 @@ typedef struct {
.task_stack_size = 4096, \
.task_priority = 2, \
.prompt = NULL, \
.max_cmdline_length = 0, \
}

/**
Expand Down
1 change: 1 addition & 0 deletions tools/sdk/esp32/include/console/linenoise/linenoise.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void linenoiseSetDumbMode(int set);
bool linenoiseIsDumbMode(void);
void linenoisePrintKeyCodes(void);
void linenoiseAllowEmpty(bool);
int linenoiseSetMaxLineLen(size_t len);

#ifdef __cplusplus
}
Expand Down
13 changes: 7 additions & 6 deletions tools/sdk/esp32/include/driver/include/driver/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ typedef struct{

union {
struct {
uint32_t clk_speed; /*!< I2C clock frequency for master mode, (no higher than 1MHz for now) */
} master; /*!< I2C master config */
uint32_t clk_speed; /*!< I2C clock frequency for master mode, (no higher than 1MHz for now) */
} master; /*!< I2C master config */
struct {
uint8_t addr_10bit_en; /*!< I2C 10bit address mode enable for slave mode */
uint16_t slave_addr; /*!< I2C address for slave mode */
} slave; /*!< I2C slave config */
uint8_t addr_10bit_en; /*!< I2C 10bit address mode enable for slave mode */
uint16_t slave_addr; /*!< I2C address for slave mode */
uint32_t maximum_speed; /*!< I2C expected clock speed from SCL. */
} slave; /*!< I2C slave config */
};
uint32_t clk_flags; /*!< Bitwise of ``I2C_SCLK_SRC_FLAG_**FOR_DFS**`` for clk source choice*/
uint32_t clk_flags; /*!< Bitwise of ``I2C_SCLK_SRC_FLAG_**FOR_DFS**`` for clk source choice*/
} i2c_config_t;


Expand Down
8 changes: 5 additions & 3 deletions tools/sdk/esp32/include/driver/include/driver/spi_master.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ typedef struct {
#define SPI_TRANS_VARIABLE_ADDR (1<<6) ///< Use the ``address_bits`` in ``spi_transaction_ext_t`` rather than default value in ``spi_device_interface_config_t``.
#define SPI_TRANS_VARIABLE_DUMMY (1<<7) ///< Use the ``dummy_bits`` in ``spi_transaction_ext_t`` rather than default value in ``spi_device_interface_config_t``.
#define SPI_TRANS_SET_CD (1<<7) ///< Set the CD pin

#define SPI_TRANS_CS_KEEP_ACTIVE (1<<8) ///< Keep CS active after data transfer
/**
* This structure describes one SPI transaction. The descriptor should not be modified until the transaction finishes.
*/
Expand Down Expand Up @@ -194,7 +194,8 @@ esp_err_t spi_bus_remove_device(spi_device_handle_t handle);
* @param ticks_to_wait Ticks to wait until there's room in the queue; use portMAX_DELAY to
* never time out.
* @return
* - ESP_ERR_INVALID_ARG if parameter is invalid
* - ESP_ERR_INVALID_ARG if parameter is invalid. This can happen if SPI_DEVICE_CS_KEEP_LOW flag is specified while
* the bus was not acquired (`spi_device_acquire_bus()` should be called first)
* - ESP_ERR_TIMEOUT if there was no room in the queue before ticks_to_wait expired
* - ESP_ERR_NO_MEM if allocating DMA-capable temporary buffer failed
* - ESP_ERR_INVALID_STATE if previous transactions are not finished
Expand Down Expand Up @@ -257,7 +258,8 @@ esp_err_t spi_device_transmit(spi_device_handle_t handle, spi_transaction_t *tra
* currently only portMAX_DELAY is supported.
*
* @return
* - ESP_ERR_INVALID_ARG if parameter is invalid
* - ESP_ERR_INVALID_ARG if parameter is invalid. This can happen if SPI_DEVICE_CS_KEEP_LOW flag is specified while
* the bus was not acquired (`spi_device_acquire_bus()` should be called first)
* - ESP_ERR_TIMEOUT if the device cannot get control of the bus before ``ticks_to_wait`` expired
* - ESP_ 10000 ERR_NO_MEM if allocating DMA-capable temporary buffer failed
* - ESP_ERR_INVALID_STATE if previous transactions are not finished
Expand Down
33 changes: 31 additions & 2 deletions tools/sdk/esp32/include/driver/include/esp_private/gdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ typedef enum {
GDMA_TRIG_PERIPH_ADC, /*!< GDMA trigger peripheral: ADC */
GDMA_TRIG_PERIPH_DAC, /*!< GDMA trigger peripheral: DAC */
GDMA_TRIG_PERIPH_LCD, /*!< GDMA trigger peripheral: LCD */
GDMA_TRIG_PERIPH_CAM /*!< GDMA trigger peripheral: CAM */
GDMA_TRIG_PERIPH_CAM, /*!< GDMA trigger peripheral: CAM */
GDMA_TRIG_PERIPH_RMT, /*!< GDMA trigger peripheral: RMT */
} gdma_trigger_peripheral_t;

/**
Expand All @@ -58,10 +59,23 @@ typedef struct {
gdma_channel_handle_t sibling_chan; /*!< DMA sibling channel handle (NULL means having sibling is not necessary) */
gdma_channel_direction_t direction; /*!< DMA channel direction */
struct {
int reserve_sibling: 1; /*!< If set, DMA channel allocator would prefer to allocate new channel in a new pair, and reserve sibling channel for future use */
int reserve_sibling: 1; /*!< If set, DMA channel allocator would prefer to allocate new channel in a new pair, and reserve sibling channel for future use */
} flags;
} gdma_channel_alloc_config_t;

/**
* @brief GDMA transfer ability
*
* @note The alignment set in this structure is **not** a guarantee that gdma driver will take care of the nonalignment cases.
* Actually the GDMA driver has no knowledge about the DMA buffer (address and size) used by upper layer.
* So it's the responsibility of the **upper layer** to take care of the buffer address and size.
*
*/
typedef struct {
size_t sram_trans_align; /*!< DMA transfer alignment for memory in SRAM, in bytes. The driver enables/disables burst mode based on this value. 0 means no alignment is required */
size_t psram_trans_align; /*!< DMA transfer alignment for memory in PSRAM, in bytes. The driver sets proper burst block size based on the alignment value. 0 means no alignment is required */
} gdma_transfer_ability_t;

/**
* @brief Type of GDMA event data
*
Expand All @@ -79,6 +93,9 @@ typedef struct {
* @param event_data GDMA event data
* @param user_data User registered data from `gdma_register_tx_event_callbacks` or `gdma_register_rx_event_callbacks`
*
* @return Whether a task switch is needed after the callback function returns,
* this is usually due to the callback wakes up some high priority task.
*
*/
typedef bool (*gdma_event_callback_t)(gdma_channel_handle_t dma_chan, gdma_event_data_t *event_data, void *user_data);

Expand Down Expand Up @@ -171,6 +188,18 @@ esp_err_t gdma_connect(gdma_channel_handle_t dma_chan, gdma_trigger_t trig_perip
*/
esp_err_t gdma_disconnect(gdma_channel_handle_t dma_chan);

/**
* @brief Set DMA channel transfer ability
*
* @param[in] dma_chan GDMA channel handle, allocated by `gdma_new_channel`
* @param[in] ability Transfer ability, e.g. alignment
* @return
* - ESP_OK: Set DMA channel transfer ability successfully
* - ESP_ERR_INVALID_ARG: Set DMA channel transfer ability failed because of invalid argument
* - ESP_FAIL: Set DMA channel transfer ability failed because of other error
*/
esp_err_t gdma_set_transfer_ability(gdma_channel_handle_t dma_chan, const gdma_transfer_ability_t *ability);

/**
* @brief Apply channel strategy for GDMA channel
*
Expand Down
Loading
0