forked from nrfconnect/sdk-nrf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathram_pwrdn.h
66 lines (55 loc) · 1.42 KB
/
ram_pwrdn.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* Copyright (c) 2020 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/
/** @file
* @brief RAM section power down header.
*/
#ifndef RAM_PWRDN_H__
#define RAM_PWRDN_H__
/**
* @defgroup ram_pwrdn RAM Power Down
* @{
* @brief Module for powering on and off RAM sections.
*
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Request powering down RAM sections for the given address range.
*
* Power down RAM sections which fully fall within the given address range.
*/
void power_down_ram(uintptr_t start_address, uintptr_t end_address);
/**
* @brief Request powering up RAM sections for the given address range.
*
* Power up RAM sections which overlap with the given address range.
*/
void power_up_ram(uintptr_t start_address, uintptr_t end_address);
/**
* @brief Request powering down unused RAM sections.
*
* Power down RAM sections which are not used by the application image.
*
* @note
* Some libc implementations use the memory area following the application
* image for heap. If this is the case and the application relies on dynamic
* memory allocations, this function should not be used.
*/
void power_down_unused_ram(void);
/**
* @brief Request powering up unused RAM sections.
*
* Power up RAM sections which were disabled by @ref power_down_unused_ram function.
*/
void power_up_unused_ram(void);
#ifdef __cplusplus
}
#endif
/**
* @}
*/
#endif /* RAM_PWRDN_H__ */