Merge pull request #8219 from jeromecoutant/PR_EMAC_SLEEP

STM32 EMAC : lock deep sleep
pull/8253/merge
Cruz Monrreal 2018-10-11 10:10:32 -05:00 committed by GitHub
commit 2a91a91313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@
#include "cmsis_os.h" #include "cmsis_os.h"
#include "mbed.h"
#include "mbed_interface.h" #include "mbed_interface.h"
#include "mbed_assert.h" #include "mbed_assert.h"
#include "mbed_shared_queues.h" #include "mbed_shared_queues.h"
@ -474,6 +475,8 @@ void mbed_default_mac_address(char *mac)
bool STM32_EMAC::power_up() bool STM32_EMAC::power_up()
{ {
sleep_manager_lock_deep_sleep();
/* Initialize the hardware */ /* Initialize the hardware */
if (!low_level_init_successful()) { if (!low_level_init_successful()) {
return false; return false;
@ -556,6 +559,7 @@ void STM32_EMAC::set_all_multicast(bool all)
void STM32_EMAC::power_down() void STM32_EMAC::power_down()
{ {
/* No-op at this stage */ /* No-op at this stage */
sleep_manager_unlock_deep_sleep();
} }
void STM32_EMAC::set_memory_manager(EMACMemoryManager &mem_mngr) void STM32_EMAC::set_memory_manager(EMACMemoryManager &mem_mngr)