IDF release/v4.0 230931310

This commit is contained in:
me-no-dev
2020-02-13 00:13:59 +00:00
parent 8817e536fd
commit 60f20a7869
83 changed files with 67 additions and 31 deletions

View File

@ -2005,5 +2005,5 @@
#define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
#endif
#define CONFIG_ARDUINO_IDF_COMMIT "a61fd1e42"
#define CONFIG_ARDUINO_IDF_COMMIT "230931310"
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.0"

View File

@ -155,6 +155,17 @@ typedef struct {
typedef intr_handle_t uart_isr_handle_t;
/**
* @brief Checks whether the driver is installed or not
*
* @param uart_num UART port number, the max port number is (UART_NUM_MAX -1).
*
* @return
* - true driver is installed
* - false driver is not installed
*/
bool uart_is_driver_installed(uart_port_t uart_num);
/**
* @brief Set UART data bits.
*

View File

@ -24,7 +24,6 @@ extern "C" {
#include "driver/spi_master.h"
#endif
/**
* @brief Ethernet MAC
*
@ -248,8 +247,11 @@ typedef struct {
uint32_t rx_task_prio; /*!< Priority of the receive task */
int smi_mdc_gpio_num; /*!< SMI MDC GPIO number */
int smi_mdio_gpio_num; /*!< SMI MDIO GPIO number */
uint32_t flags; /*!< Flags that specify extra capability for mac driver */
} eth_mac_config_t;
#define ETH_MAC_FLAG_WORK_WITH_CACHE_DISABLE (1 << 0) /*!< MAC driver can work when cache is disabled */
/**
* @brief Default configuration for Ethernet MAC object
*
@ -261,6 +263,7 @@ typedef struct {
.rx_task_prio = 15, \
.smi_mdc_gpio_num = 23, \
.smi_mdio_gpio_num = 18, \
.flags = 0, \
}
#if CONFIG_ETH_USE_ESP32_EMAC

View File

@ -242,6 +242,8 @@ typedef struct {
#define EMAC_DMATXDESC_CHECKSUM_TCPUDPICMPSEGMENT 2 /*!< TCP/UDP/ICMP Checksum Insertion calculated over segment only */
#define EMAC_DMATXDESC_CHECKSUM_TCPUDPICMPFULL 3 /*!< TCP/UDP/ICMP Checksum Insertion fully calculated */
_Static_assert(sizeof(eth_dma_tx_descriptor_t) == 32, "eth_dma_tx_descriptor_t should occupy 32 bytes in memory");
/**
* @brief Ethernet DMA RX Descriptor
*
@ -328,6 +330,8 @@ typedef struct {
#define EMAC_DMADESC_OWNER_CPU (0)
#define EMAC_DMADESC_OWNER_DMA (1)
_Static_assert(sizeof(eth_dma_rx_descriptor_t) == 32, "eth_dma_rx_descriptor_t should occupy 32 bytes in memory");
typedef struct {
emac_mac_dev_t *mac_regs;
emac_dma_dev_t *dma_regs;
@ -378,7 +382,7 @@ void emac_hal_stop(emac_hal_context_t *hal);
uint32_t emac_hal_get_tx_desc_owner(emac_hal_context_t *hal);
void emac_hal_transmit_frame(emac_hal_context_t *hal, uint8_t *buf, uint32_t length);
uint32_t emac_hal_transmit_frame(emac_hal_context_t *hal, uint8_t *buf, uint32_t length);
uint32_t emac_hal_receive_frame(emac_hal_context_t *hal, uint8_t *buf, uint32_t size, uint32_t *frames_remain);

View File

@ -155,6 +155,10 @@ inline static bool IRAM_ATTR esp_ptr_executable(const void *p)
intptr_t ip = (intptr_t) p;
return (ip >= SOC_IROM_LOW && ip < SOC_IROM_HIGH)
|| (ip >= SOC_IRAM_LOW && ip < SOC_IRAM_HIGH)
|| (ip >= SOC_IROM_MASK_LOW && ip < SOC_IROM_MASK_HIGH)
#if defined(SOC_CACHE_APP_LOW) && defined(CONFIG_FREERTOS_UNICORE)
|| (ip >= SOC_CACHE_APP_LOW && ip < SOC_CACHE_APP_HIGH)
#endif
|| (ip >= SOC_RTC_IRAM_LOW && ip < SOC_RTC_IRAM_HIGH);
}

View File

@ -71,13 +71,20 @@ typedef struct {
wps_factory_information_t factory_info;
} esp_wps_config_t;
/* C & C++ compilers have different rules about C99-style named initializers */
#ifdef __cplusplus
#define WPS_AGG(X) { X }
#else
#define WPS_AGG(X) X
#endif
#define WPS_CONFIG_INIT_DEFAULT(type) { \
.wps_type = type, \
.factory_info = { \
.manufacturer = "ESPRESSIF", \
.model_number = "ESP32", \
.model_name = "ESPRESSIF IOT", \
.device_name = "ESP STATION", \
WPS_AGG( .manufacturer = "ESPRESSIF" ), \
WPS_AGG( .model_number = "ESP32" ), \
WPS_AGG( .model_name = "ESPRESSIF IOT" ), \
WPS_AGG( .device_name = "ESP STATION" ), \
} \
}

View File

@ -71,13 +71,20 @@ typedef struct {
wps_factory_information_t factory_info;
} esp_wps_config_t;
/* C & C++ compilers have different rules about C99-style named initializers */
#ifdef __cplusplus
#define WPS_AGG(X) { X }
#else
#define WPS_AGG(X) X
#endif
#define WPS_CONFIG_INIT_DEFAULT(type) { \
.wps_type = type, \
.factory_info = { \
.manufacturer = "ESPRESSIF", \
.model_number = "ESP32", \
.model_name = "ESPRESSIF IOT", \
.device_name = "ESP STATION", \
WPS_AGG( .manufacturer = "ESPRESSIF" ), \
WPS_AGG( .model_number = "ESP32" ), \
WPS_AGG( .model_name = "ESPRESSIF IOT" ), \
WPS_AGG( .device_name = "ESP STATION" ), \
} \
}