MSP430 DriverLib for MSP430F5xx_6xx Devices  2.91.13.01
ram.h
1 //*****************************************************************************
2 //
3 // ram.h - Driver for the RAM Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_RAM_H__
8 #define __MSP430WARE_RAM_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_RC__
13 
14 //*****************************************************************************
15 //
16 // If building with a C++ compiler, make all of the definitions in this header
17 // have a C binding.
18 //
19 //*****************************************************************************
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 //*****************************************************************************
26 //
27 // The following are values that can be passed to the sector parameter for
28 // functions: RAM_setSectorOff(), and RAM_getSectorState() as well as returned
29 // by the RAM_getSectorState() function.
30 //
31 //*****************************************************************************
32 #define RAM_SECTOR0 RCRS0OFF
33 #define RAM_SECTOR1 RCRS1OFF
34 #define RAM_SECTOR2 RCRS2OFF
35 #define RAM_SECTOR3 RCRS3OFF
36 #define RAM_SECTOR4 RCRS4OFF
37 #define RAM_SECTOR5 RCRS5OFF
38 #define RAM_SECTOR6 RCRS6OFF
39 #define RAM_SECTOR7 RCRS7OFF
40 
41 //*****************************************************************************
42 //
43 // Prototypes for the APIs.
44 //
45 //*****************************************************************************
46 
47 //*****************************************************************************
48 //
49 //! \brief Set specified RAM sector off
50 //!
51 //! \param sector is specified sector to be set off.
52 //! Mask value is the logical OR of any of the following:
53 //! - \b RAM_SECTOR0
54 //! - \b RAM_SECTOR1
55 //! - \b RAM_SECTOR2
56 //! - \b RAM_SECTOR3
57 //! - \b RAM_SECTOR4
58 //! - \b RAM_SECTOR5
59 //! - \b RAM_SECTOR6
60 //! - \b RAM_SECTOR7
61 //!
62 //! Modified bits of \b RCCTL0 register.
63 //!
64 //! \return None
65 //
66 //*****************************************************************************
67 extern void RAM_setSectorOff(uint8_t sector);
68 
69 //*****************************************************************************
70 //
71 //! \brief Get RAM sector ON/OFF status
72 //!
73 //! \param sector is specified sector
74 //! Mask value is the logical OR of any of the following:
75 //! - \b RAM_SECTOR0
76 //! - \b RAM_SECTOR1
77 //! - \b RAM_SECTOR2
78 //! - \b RAM_SECTOR3
79 //! - \b RAM_SECTOR4
80 //! - \b RAM_SECTOR5
81 //! - \b RAM_SECTOR6
82 //! - \b RAM_SECTOR7
83 //!
84 //! Modified bits of \b RCCTL0 register.
85 //!
86 //! \return Logical OR of any of the following:
87 //! - \b RAM_SECTOR0
88 //! - \b RAM_SECTOR1
89 //! - \b RAM_SECTOR2
90 //! - \b RAM_SECTOR3
91 //! - \b RAM_SECTOR4
92 //! - \b RAM_SECTOR5
93 //! - \b RAM_SECTOR6
94 //! - \b RAM_SECTOR7
95 //! \n indicating the status of the masked sectors
96 //
97 //*****************************************************************************
98 extern uint8_t RAM_getSectorState(uint8_t sector);
99 
100 //*****************************************************************************
101 //
102 // Mark the end of the C bindings section for C++ compilers.
103 //
104 //*****************************************************************************
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #endif
110 #endif // __MSP430WARE_RAM_H__
uint8_t RAM_getSectorState(uint8_t sector)
Get RAM sector ON/OFF status.
Definition: ram.c:28
void RAM_setSectorOff(uint8_t sector)
Set specified RAM sector off.
Definition: ram.c:21

Copyright 2020, Texas Instruments Incorporated