Skip to content

Release candidate for mbed-os-5.3.0-rc2 #3361

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 6 commits into from
Dec 5, 2016
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
42 changes: 30 additions & 12 deletions features/FEATURE_LWIP/lwip-interface/lwip_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,16 +293,20 @@ static void mbed_lwip_netif_status_irq(struct netif *lwip_netif)
{
static bool any_addr = true;

// Indicates that has address
if (any_addr == true && mbed_lwip_get_ip_addr(true, lwip_netif)) {
sys_sem_signal(&lwip_netif_has_addr);
any_addr = false;
return;
}
if (netif_is_up(lwip_netif)) {
// Indicates that has address
if (any_addr == true && mbed_lwip_get_ip_addr(true, lwip_netif)) {
sys_sem_signal(&lwip_netif_has_addr);
any_addr = false;
return;
}

// Indicates that has preferred address
if (mbed_lwip_get_ip_addr(false, lwip_netif)) {
sys_sem_signal(&lwip_netif_has_addr);
// Indicates that has preferred address
if (mbed_lwip_get_ip_addr(false, lwip_netif)) {
sys_sem_signal(&lwip_netif_has_addr);
}
} else {
any_addr = true;
}
}

Expand Down Expand Up @@ -509,6 +513,15 @@ nsapi_error_t mbed_lwip_bringup(bool dhcp, const char *ip, const char *netmask,
return 0;
}

#if LWIP_IPV6
void mbed_lwip_clear_ipv6_addresses(struct netif *lwip_netif)
{
for (u8_t i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) {
netif_ip6_addr_set_state(lwip_netif, i, IP6_ADDR_INVALID);
}
}
#endif

nsapi_error_t mbed_lwip_bringdown(void)
{
// Check if we've connected
Expand All @@ -522,13 +535,18 @@ nsapi_error_t mbed_lwip_bringdown(void)
dhcp_release(&lwip_netif);
dhcp_stop(&lwip_netif);
lwip_dhcp = false;
} else {
netif_set_down(&lwip_netif);
}
#endif

netif_set_down(&lwip_netif);

#if LWIP_IPV6
mbed_lwip_clear_ipv6_addresses(&lwip_netif);
#endif

sys_sem_free(&lwip_netif_has_addr);
sys_sem_new(&lwip_netif_has_addr, 0);
lwip_connected = false;
// TO DO - actually remove addresses from stack, and shut down properly
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
extern ARM_DRIVER_STORAGE ARM_Driver_Storage_MTD_K64F;
static ARM_DRIVER_STORAGE *cfstore_svm_storage_drv = &ARM_Driver_Storage_MTD_K64F;

#endif /* CFSTORE_CONFIG_BACKEND_FLASH_ENABLED */

/* the storage volume manager instance used to generate virtual mtd descriptors */
StorageVolumeManager volumeManager;

Expand Down Expand Up @@ -79,3 +77,6 @@ int32_t cfstore_svm_init(struct _ARM_DRIVER_STORAGE *storage_mtd)
}
return ret;
}

#endif /* CFSTORE_CONFIG_BACKEND_FLASH_ENABLED */

29 changes: 26 additions & 3 deletions tools/test/examples/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,31 @@
{
"name": "mbed-os-example-uvisor",
"github":"https://github.com/ARMmbed/mbed-os-example-uvisor",
"mbed": [
],
"mbed": [],
"features" : [],
"targets" : ["K64F"],
"toolchains" : ["GCC_ARM"],
"exporters": [],
"compile" : true,
"export": false,
"auto-update" : false
},
{
"name": "mbed-os-example-uvisor-thread",
"github":"https://github.com/ARMmbed/mbed-os-example-uvisor-thread",
"mbed": [],
"features" : [],
"targets" : ["K64F"],
"toolchains" : ["GCC_ARM"],
"exporters": [],
"compile" : true,
"export": false,
"auto-update" : false
},
{
"name": "mbed-os-example-uvisor-number-store",
"github":"https://github.com/ARMmbed/mbed-os-example-uvisor-number-store",
"mbed": [],
"features" : [],
"targets" : ["K64F"],
"toolchains" : ["GCC_ARM"],
Expand All @@ -122,4 +145,4 @@
"auto-update" : false
}
]
}
}