forked from espressif/arduino-esp32
IDF master d93887f9f (#5336)
* Update toolchain * Update package_esp32_index.template.json * add optional component dependencies after Kconfig options are known (#5404) Until this commit, Kconfig options (e.g. CONFIG_TINYUSB_ENABLED) were used in conditions preceding idf_component_register to determine which components need to be added to `arduino` component requirements. However the Kconfig options aren't known at the early expansion stage, when the component CMakeLists.txt files are expanded the first time and requirements are evaluated. So all the conditions evaluated as if the options were not set. This commit changes the logic to only add these components as dependencies when the Kconfig options are known. Dependencies become "weak", which means that if one of the components isn't included into the build for some reason, it is not added as a dependency. This may happen, for example, if the component is not present in the `components` directory or is excluded by setting `COMPONENTS` variable in the project CMakeLists.txt file. This also ensures that if the component is not present, it will not be added as a dependency, and this will allow the build to proceed. Follow-up to https://github.com/espressif/arduino-esp32/pull/5391. Closes https://github.com/espressif/arduino-esp32/issues/5319. * IDF master d93887f9f * PlatformIO updates for CI (#5387) * Update PlatformIO CI build script - Switch to the latest toolchains 8.4.0 for ESP32, ESP32S2, ESP32C3 - Use PlatformIO from master branch for better robustness * Update package.json for PlatformIO Co-authored-by: Ivan Grokhotkov <ivan@espressif.com> Co-authored-by: Valerii Koval <valeros@users.noreply.github.com>
This commit is contained in:
@ -85,6 +85,9 @@ extern "C" {
|
||||
|
||||
#define ESP_IP4TOADDR(a,b,c,d) esp_netif_htonl(ESP_IP4TOUINT32(a, b, c, d))
|
||||
|
||||
#define ESP_IP4ADDR_INIT(a, b, c, d) { .type = ESP_IPADDR_TYPE_V4, .u_addr = { .ip4 = { .addr = ESP_IP4TOADDR(a, b, c, d) }}};
|
||||
#define ESP_IP6ADDR_INIT(a, b, c, d) { .type = ESP_IPADDR_TYPE_V6, .u_addr = { .ip6 = { .addr = { a, b, c, d }, .zone = 0 }}};
|
||||
|
||||
struct esp_ip6_addr {
|
||||
uint32_t addr[4];
|
||||
uint8_t zone;
|
||||
@ -124,6 +127,30 @@ typedef enum {
|
||||
*/
|
||||
esp_ip6_addr_type_t esp_netif_ip6_get_addr_type(esp_ip6_addr_t* ip6_addr);
|
||||
|
||||
/**
|
||||
* @brief Copy IP addresses
|
||||
*
|
||||
* @param[out] dest destination IP
|
||||
* @param[in] src source IP
|
||||
*/
|
||||
static inline void esp_netif_ip_addr_copy(esp_ip_addr_t *dest, const esp_ip_addr_t *src)
|
||||
{
|
||||
dest->type = src->type;
|
||||
if (src->type == ESP_IPADDR_TYPE_V6) {
|
||||
dest->u_addr.ip6.addr[0] = src->u_addr.ip6.addr[0];
|
||||
dest->u_addr.ip6.addr[1] = src->u_addr.ip6.addr[1];
|
||||
dest->u_addr.ip6.addr[2] = src->u_addr.ip6.addr[2];
|
||||
dest->u_addr.ip6.addr[3] = src->u_addr.ip6.addr[3];
|
||||
dest->u_addr.ip6.zone = src->u_addr.ip6.zone;
|
||||
} else {
|
||||
dest->u_addr.ip4.addr = src->u_addr.ip4.addr;
|
||||
dest->u_addr.ip6.addr[1] = 0;
|
||||
dest->u_addr.ip6.addr[2] = 0;
|
||||
dest->u_addr.ip6.addr[3] = 0;
|
||||
dest->u_addr.ip6.zone = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -76,4 +76,7 @@ void esp_netif_lwip_slip_raw_output(esp_netif_t *netif, void *buffer, size_t len
|
||||
*/
|
||||
const esp_ip6_addr_t *esp_slip_get_ip6(esp_netif_t *slip_netif);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif //_ESP_NETIF_SLIP_H_
|
||||
|
Reference in New Issue
Block a user