mirror of https://github.com/ARMmbed/mbed-os.git
Rename SLEEP_STATS_ENABLED to SLEEP_TRACING_ENABLED
parent
5a4027b71d
commit
bd23625d23
|
@ -14,8 +14,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
<<<<<<< HEAD
|
||||
#include "mbed_assert.h"
|
||||
#include "mbed_power_mgmt.h"
|
||||
=======
|
||||
#include "mbed_sleep.h"
|
||||
>>>>>>> Rename SLEEP_STATS_ENABLED to SLEEP_TRACING_ENABLED
|
||||
#include "mbed_critical.h"
|
||||
#include "sleep_api.h"
|
||||
#include "mbed_error.h"
|
||||
|
@ -27,7 +31,7 @@
|
|||
// deep sleep locking counter. A target is allowed to deep sleep if counter == 0
|
||||
static uint16_t deep_sleep_lock = 0U;
|
||||
|
||||
#ifdef MBED_SLEEP_STATS_ENABLED
|
||||
#ifdef MBED_SLEEP_TRACING_ENABLED
|
||||
|
||||
// Length of the identifier extracted from the driver name to store for logging.
|
||||
#define IDENTIFIER_WIDTH 7
|
||||
|
@ -85,7 +89,7 @@ static size_t sleep_tracker_find_index(const char *const filename)
|
|||
}
|
||||
|
||||
// Panic if there are no free indexes left to track with
|
||||
MBED_ASSERT(true);
|
||||
error("No free indexes left to use in mbed stats tracker");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@ -127,7 +131,7 @@ void sleep_tracker_unlock(const char* const filename, int line)
|
|||
sleep_tracker_print_stats();
|
||||
}
|
||||
|
||||
#endif // MBED_SLEEP_STATS_ENABLED
|
||||
#endif // MBED_SLEEP_TRACING_ENABLED
|
||||
|
||||
void sleep_manager_lock_deep_sleep_internal(void)
|
||||
{
|
||||
|
|
|
@ -59,7 +59,10 @@ extern "C" {
|
|||
* }
|
||||
* @endcode
|
||||
*/
|
||||
#ifdef MBED_SLEEP_STATS_ENABLED
|
||||
#ifdef MBED_SLEEP_TRACING_ENABLED
|
||||
|
||||
void sleep_tracker_lock(const char *const filename, int line);
|
||||
void sleep_tracker_unlock(const char *const filename, int line);
|
||||
|
||||
#define sleep_manager_lock_deep_sleep() \
|
||||
do \
|
||||
|
@ -75,9 +78,6 @@ extern "C" {
|
|||
sleep_tracker_unlock(__FILE__, __LINE__); \
|
||||
} while (0);
|
||||
|
||||
void sleep_tracker_lock(const char *const filename, int line);
|
||||
void sleep_tracker_unlock(const char *const filename, int line);
|
||||
|
||||
#else
|
||||
|
||||
#define sleep_manager_lock_deep_sleep() \
|
||||
|
@ -86,7 +86,7 @@ void sleep_tracker_unlock(const char *const filename, int line);
|
|||
#define sleep_manager_unlock_deep_sleep() \
|
||||
sleep_manager_lock_deep_sleep_internal()
|
||||
|
||||
#endif // MBED_SLEEP_STATS_ENABLED
|
||||
#endif // MBED_SLEEP_TRACING_ENABLED
|
||||
|
||||
/** Lock the deep sleep mode
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue