Skip to content

Commit 2186737

Browse files
committed
Update binaries with SLAAC support
1 parent 0b3f1a9 commit 2186737

File tree

125 files changed

+163
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+163
-59
lines changed

tools/sdk/esp32/include/bootloader_support/include/esp_app_format.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ typedef enum {
5555
ESP_IMAGE_FLASH_SIZE_4MB, /*!< SPI flash size 4 MB */
5656
ESP_IMAGE_FLASH_SIZE_8MB, /*!< SPI flash size 8 MB */
5757
ESP_IMAGE_FLASH_SIZE_16MB, /*!< SPI flash size 16 MB */
58+
ESP_IMAGE_FLASH_SIZE_32MB, /*!< SPI flash size 32 MB */
59+
ESP_IMAGE_FLASH_SIZE_64MB, /*!< SPI flash size 64 MB */
60+
ESP_IMAGE_FLASH_SIZE_128MB, /*!< SPI flash size 128 MB */
5861
ESP_IMAGE_FLASH_SIZE_MAX /*!< SPI flash size MAX */
5962
} esp_image_flash_size_t;
6063

tools/sdk/esp32/include/driver/include/driver/gpio.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,8 @@ esp_err_t gpio_sleep_set_pull_mode(gpio_num_t gpio_num, gpio_pull_mode_t pull);
498498

499499
#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
500500

501-
#define GPIO_IS_DEEP_SLEEP_WAKEUP_VALID_GPIO(gpio_num) ((gpio_num & ~SOC_GPIO_DEEP_SLEEP_WAKEUP_VALID_GPIO_MASK) == 0)
501+
#define GPIO_IS_DEEP_SLEEP_WAKEUP_VALID_GPIO(gpio_num) ((gpio_num >= 0) && \
502+
(((1ULL << (gpio_num)) & SOC_GPIO_DEEP_SLEEP_WAKEUP_VALID_GPIO_MASK) != 0))
502503

503504
/**
504505
* @brief Enable GPIO deep-sleep wake-up function.

tools/sdk/esp32/include/driver/include/driver/sdspi_host.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ typedef int sdspi_dev_handle_t;
2222

2323
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2
2424
#define SDSPI_DEFAULT_HOST HSPI_HOST
25+
#define SDSPI_DEFAULT_DMA SDSPI_DEFAULT_HOST
2526
#else
2627
#define SDSPI_DEFAULT_HOST SPI2_HOST
28+
#define SDSPI_DEFAULT_DMA SPI_DMA_CH_AUTO
2729
#endif
2830

2931
/**
@@ -216,7 +218,7 @@ typedef struct {
216218
.gpio_miso = GPIO_NUM_2, \
217219
.gpio_mosi = GPIO_NUM_15, \
218220
.gpio_sck = GPIO_NUM_14, \
219-
.dma_channel = 1, \
221+
.dma_channel = SDSPI_DEFAULT_DMA, \
220222
}
221223

222224
/**

tools/sdk/esp32/include/driver/include/driver/spi_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ esp_err_t spi_bus_initialize(spi_host_device_t host_id, const spi_bus_config_t *
163163
* @param host_id SPI peripheral to free
164164
* @return
165165
* - ESP_ERR_INVALID_ARG if parameter is invalid
166-
* - ESP_ERR_INVALID_STATE if not all devices on the bus are freed
166+
* - ESP_ERR_INVALID_STATE if bus hasn't been initialized before, or not all devices on the bus are freed
167167
* - ESP_OK on success
168168
*/
169169
esp_err_t spi_bus_free(spi_host_device_t host_id);

tools/sdk/esp32/include/driver/include/esp_private/gdma.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ esp_err_t gdma_register_rx_event_callbacks(gdma_channel_handle_t dma_chan, gdma_
269269
/**
270270
* @brief Set DMA descriptor address and start engine
271271
*
272+
* @note This function is allowed to run within ISR context
273+
* @note This function is also allowed to run when Cache is disabled, if `CONFIG_GDMA_CTRL_FUNC_IN_IRAM` is enabled
274+
*
272275
* @param[in] dma_chan GDMA channel handle, allocated by `gdma_new_channel`
273276
* @param[in] desc_base_addr Base address of descriptors (usually the descriptors are chained into a link or ring)
274277
* @return
@@ -281,6 +284,9 @@ esp_err_t gdma_start(gdma_channel_handle_t dma_chan, intptr_t desc_base_addr);
281284
/**
282285
* @brief Stop DMA engine
283286
*
287+
* @note This function is allowed to run within ISR context
288+
* @note This function is also allowed to run when Cache is disabled, if `CONFIG_GDMA_CTRL_FUNC_IN_IRAM` is enabled
289+
*
284290
* @param[in] dma_chan GDMA channel handle, allocated by `gdma_new_channel`
285291
* @return
286292
* - ESP_OK: Stop DMA engine successfully
@@ -291,6 +297,9 @@ esp_err_t gdma_stop(gdma_channel_handle_t dma_chan);
291297

292298
/**
293299
* @brief Make the appended descriptors be aware to the DMA engine
300+
*
301+
* @note This function is allowed to run within ISR context
302+
* @note This function is also allowed to run when Cache is disabled, if `CONFIG_GDMA_CTRL_FUNC_IN_IRAM` is enabled
294303
* @note This API could also resume a paused DMA engine, make sure new descriptors have been appended to the descriptor chain before calling it.
295304
*
296305
* @param[in] dma_chan GDMA channel handle, allocated by `gdma_new_channel`
@@ -303,6 +312,9 @@ esp_err_t gdma_append(gdma_channel_handle_t dma_chan);
303312

304313
/**
305314
* @brief Reset DMA channel FIFO and internal finite state machine
315+
*
316+
* @note This function is allowed to run within ISR context
317+
* @note This function is also allowed to run when Cache is disabled, if `CONFIG_GDMA_CTRL_FUNC_IN_IRAM` is enabled
306318
* @note Resetting a DMA channel won't break the connection with the target peripheral
307319
*
308320
* @param[in] dma_chan GDMA channel handle, allocated by `gdma_new_channel`

tools/sdk/esp32/include/esp_http_client/include/esp_http_client.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ typedef enum {
149149
HttpStatus_MultipleChoices = 300,
150150
HttpStatus_MovedPermanently = 301,
151151
HttpStatus_Found = 302,
152+
HttpStatus_SeeOther = 303,
152153
HttpStatus_TemporaryRedirect = 307,
154+
HttpStatus_PermanentRedirect = 308,
153155

154156
/* 4xx - Client Error */
155157
HttpStatus_BadRequest = 400,

tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_io.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ typedef struct {
9898
unsigned int dc_as_cmd_phase: 1; /*!< D/C line value is encoded into SPI transaction command phase */
9999
unsigned int dc_low_on_data: 1; /*!< If this flag is enabled, DC line = 0 means transfer data, DC line = 1 means transfer command; vice versa */
100100
unsigned int octal_mode: 1; /*!< transmit with octal mode (8 data lines), this mode is used to simulate Intel 8080 timing */
101-
} flags;
101+
unsigned int lsb_first: 1; /*!< transmit LSB bit first */
102+
} flags; /*!< Extra flags to fine-tune the SPI device */
102103
} esp_lcd_panel_io_spi_config_t;
103104

104105
/**
@@ -151,6 +152,8 @@ typedef struct {
151152
int data_gpio_nums[SOC_LCD_I80_BUS_WIDTH]; /*!< GPIOs used for data lines */
152153
size_t bus_width; /*!< Number of data lines, 8 or 16 */
153154
size_t max_transfer_bytes; /*!< Maximum transfer size, this determines the length of internal DMA link */
155+
size_t psram_trans_align; /*!< DMA transfer alignment for data allocated from PSRAM */
156+
size_t sram_trans_align; /*!< DMA transfer alignment for data allocated from SRAM */
154157
} esp_lcd_i80_bus_config_t;
155158

156159
/**

tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_rgb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ typedef struct {
5959
unsigned int hsync_front_porch; /*!< Horizontal front porch, number of PCLK between the end of active data and the next hsync */
6060
unsigned int vsync_pulse_width; /*!< Vertical sync width, unit: number of lines */
6161
unsigned int vsync_back_porch; /*!< Vertical back porch, number of invalid lines between vsync and start of frame */
62-
unsigned int vsync_front_porch; /*!< Vertical front porch, number of invalid lines between then end of frame and the next vsync */
62+
unsigned int vsync_front_porch; /*!< Vertical front porch, number of invalid lines between the end of frame and the next vsync */
6363
struct {
6464
unsigned int hsync_idle_low: 1; /*!< The hsync signal is low in IDLE state */
6565
unsigned int vsync_idle_low: 1; /*!< The vsync signal is low in IDLE state */

tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_core.h

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ typedef struct {
6363
char *fw_version;
6464
/** Model (Optional). If not set, PROJECT_NAME is used as default (recommended)*/
6565
char *model;
66+
/** Subtype (Optional). */
67+
char *subtype;
6668
} esp_rmaker_node_info_t;
6769

6870
/** ESP RainMaker Configuration */
@@ -430,10 +432,11 @@ esp_err_t esp_rmaker_node_add_attribute(const esp_rmaker_node_t *node, const cha
430432
*/
431433
esp_err_t esp_rmaker_node_add_fw_version(const esp_rmaker_node_t *node, const char *fw_version);
432434

433-
/** Add model for a node (Not recommended)
435+
/** Add model for a node
434436
*
435437
* Model is set internally to the project name. This API can be used to
436-
* override that name.
438+
* override that name, now that a new field "project" has also been added
439+
* internally to the node info.
437440
*
438441
* @param node Node handle.
439442
* @param[in] model New model string.
@@ -443,6 +446,16 @@ esp_err_t esp_rmaker_node_add_fw_version(const esp_rmaker_node_t *node, const ch
443446
*/
444447
esp_err_t esp_rmaker_node_add_model(const esp_rmaker_node_t *node, const char *model);
445448

449+
/** Add subtype for a node
450+
*
451+
* @param node Node handle.
452+
* @param[in] subtype Subtype string.
453+
*
454+
* @return ESP_OK on success.
455+
* @return error in case of failure.
456+
*/
457+
esp_err_t esp_rmaker_node_add_subtype(const esp_rmaker_node_t *node, const char *subtype);
458+
446459
/**
447460
* Create a Device
448461
*
@@ -572,6 +585,18 @@ esp_err_t esp_rmaker_device_add_attribute(const esp_rmaker_device_t *device, con
572585
*/
573586
esp_err_t esp_rmaker_device_add_subtype(const esp_rmaker_device_t *device, const char *subtype);
574587

588+
/** Add a Device model
589+
*
590+
* This would primarily be used by the phone apps to render different icons for the same device type.
591+
*
592+
* @param[in] device Device handle.
593+
* @param[in] model String describing the model.
594+
*
595+
* @return ESP_OK if the model was added successfully.
596+
* @return error in case of failure.
597+
*/
598+
esp_err_t esp_rmaker_device_add_model(const esp_rmaker_device_t *device, const char *model);
599+
575600
/** Get device name from handle
576601
*
577602
* @param[in] device Device handle.

tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_ota.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ typedef enum {
3434
OTA_STATUS_FAILED,
3535
/** OTA was delayed by the application */
3636
OTA_STATUS_DELAYED,
37+
/** OTA rejected due to some reason (wrong project, version, etc.) */
38+
OTA_STATUS_REJECTED,
3739
} ota_status_t;
3840

3941
/** OTA Workflow type */
@@ -145,6 +147,29 @@ esp_err_t esp_rmaker_ota_enable(esp_rmaker_ota_config_t *ota_config, esp_rmaker_
145147
*/
146148
esp_err_t esp_rmaker_ota_report_status(esp_rmaker_ota_handle_t ota_handle, ota_status_t status, char *additional_info);
147149

150+
/** Default OTA callback
151+
*
152+
* This is the default OTA callback which will get used if you do not pass your own callback. You can call this
153+
* even from your callback, in case you want better control on when the OTA can proceed and yet let the actual
154+
* OTA process be managed by the RainMaker Core.
155+
*
156+
* @param[in] handle An OTA handle assigned by the ESP RainMaker Core
157+
* @param[in] ota_data The data to be used for the OTA
158+
*
159+
* @return ESP_OK if the OTA was successful
160+
* @return ESP_FAIL if the OTA failed.
161+
* */
162+
esp_err_t esp_rmaker_ota_default_cb(esp_rmaker_ota_handle_t handle, esp_rmaker_ota_data_t *ota_data);
163+
164+
/** Fetch OTA Info
165+
*
166+
* For OTA using Topics, this API can be used to explicitly ask the backend if an OTA is available.
167+
* If it is, then the OTA callback would get invoked.
168+
*
169+
* @return ESP_OK if the OTA fetch publish message was successful.
170+
* @return error on failure
171+
*/
172+
esp_err_t esp_rmaker_ota_fetch(void);
148173
#ifdef __cplusplus
149174
}
150175
#endif

0 commit comments

Comments
 (0)