@@ -28,7 +28,8 @@ extern "C" {
28
28
/** Send the microcontroller to sleep
29
29
*
30
30
* @note This function can be a noop if not implemented by the platform.
31
- * @note This function will be a noop in debug mode (debug build profile when MBED_DEBUG is defined)
31
+ * @note This function will be a noop in debug mode (debug build profile when MBED_DEBUG is defined).
32
+ * @note This function will be a noop while uVisor is in use.
32
33
*
33
34
* The processor is setup ready for sleep, and sent to sleep using __WFI(). In this mode, the
34
35
* system clock to the core is stopped until a reset or an interrupt occurs. This eliminates
@@ -44,17 +45,20 @@ extern "C" {
44
45
*/
45
46
__INLINE static void sleep (void )
46
47
{
48
+ #if !(defined(FEATURE_UVISOR ) && defined(TARGET_UVISOR_SUPPORTED ))
47
49
#ifndef MBED_DEBUG
48
50
#if DEVICE_SLEEP
49
51
hal_sleep ();
50
52
#endif /* DEVICE_SLEEP */
51
53
#endif /* MBED_DEBUG */
54
+ #endif /* !(defined(FEATURE_UVISOR) && defined(TARGET_UVISOR_SUPPORTED)) */
52
55
}
53
56
54
57
/** Send the microcontroller to deep sleep
55
58
*
56
59
* @note This function can be a noop if not implemented by the platform.
57
60
* @note This function will be a noop in debug mode (debug build profile when MBED_DEBUG is defined)
61
+ * @note This function will be a noop while uVisor is in use.
58
62
*
59
63
* This processor is setup ready for deep sleep, and sent to sleep using __WFI(). This mode
60
64
* has the same sleep features as sleep plus it powers down peripherals and clocks. All state
@@ -69,11 +73,13 @@ __INLINE static void sleep(void)
69
73
*/
70
74
__INLINE static void deepsleep (void )
71
75
{
76
+ #if !(defined(FEATURE_UVISOR ) && defined(TARGET_UVISOR_SUPPORTED ))
72
77
#ifndef MBED_DEBUG
73
78
#if DEVICE_SLEEP
74
79
hal_deepsleep ();
75
80
#endif /* DEVICE_SLEEP */
76
81
#endif /* MBED_DEBUG */
82
+ #endif /* !(defined(FEATURE_UVISOR) && defined(TARGET_UVISOR_SUPPORTED)) */
77
83
}
78
84
79
85
#ifdef __cplusplus
0 commit comments