void sleep_manager_unlock_deep_sleep_internal(void) { if (core_util_atomic_decr_u16(&deep_sleep_lock, 1) == 0xFFFF) { MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_HAL, MBED_ERROR_CODE_UNDERFLOW), "DeepSleepLock underflow (< 0)", deep_sleep_lock); } }
/* * Heap error handler, called when heap problem is detected. * Function is for-ever loop. */ static void mesh_system_heap_error_handler(heap_fail_t event) { MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_NETWORK_STACK, MBED_ERROR_CODE_OUT_OF_MEMORY), "Heap error, mesh_system_heap_error_handler()", event); }
void sleep_manager_lock_deep_sleep_internal(void) { if (core_util_atomic_incr_u16(&deep_sleep_lock, 1) == 0) { MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_HAL, MBED_ERROR_CODE_OVERFLOW), "DeepSleepLock overflow (> 0xFFFF)", deep_sleep_lock); } }