1 /******************************************************************************
2 *  Filename:       aux_sysif.h
3 *  Revised:        2020-02-14 11:30:20 +0100 (Fri, 14 Feb 2020)
4 *  Revision:       56760
5 *
6 *  Description:    Defines and prototypes for the AUX System Interface
7 *
8 *  Copyright (c) 2015 - 2020, Texas Instruments Incorporated
9 *  All rights reserved.
10 *
11 *  Redistribution and use in source and binary forms, with or without
12 *  modification, are permitted provided that the following conditions are met:
13 *
14 *  1) Redistributions of source code must retain the above copyright notice,
15 *     this list of conditions and the following disclaimer.
16 *
17 *  2) Redistributions in binary form must reproduce the above copyright notice,
18 *     this list of conditions and the following disclaimer in the documentation
19 *     and/or other materials provided with the distribution.
20 *
21 *  3) Neither the name of the ORGANIZATION nor the names of its contributors may
22 *     be used to endorse or promote products derived from this software without
23 *     specific prior written permission.
24 *
25 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 *  POSSIBILITY OF SUCH DAMAGE.
36 *
37 ******************************************************************************/
38 
39 //*****************************************************************************
40 //
41 //! \addtogroup aux_group
42 //! @{
43 //! \addtogroup auxsysif_api
44 //! @{
45 //
46 //*****************************************************************************
47 
48 #ifndef __AUX_SYSIF_H__
49 #define __AUX_SYSIF_H__
50 
51 //*****************************************************************************
52 //
53 // If building with a C++ compiler, make all of the definitions in this header
54 // have a C binding.
55 //
56 //*****************************************************************************
57 #ifdef __cplusplus
58 extern "C"
59 {
60 #endif
61 
62 #include <stdbool.h>
63 #include <stdint.h>
64 #include "../inc/hw_types.h"
65 #include "../inc/hw_memmap.h"
66 #include "../inc/hw_aux_sysif.h"
67 #include "debug.h"
68 
69 //*****************************************************************************
70 //
71 // Support for DriverLib in ROM:
72 // This section renames all functions that are not "static inline", so that
73 // calling these functions will default to implementation in flash. At the end
74 // of this file a second renaming will change the defaults to implementation in
75 // ROM for available functions.
76 //
77 // To force use of the implementation in flash, e.g. for debugging:
78 // - Globally: Define DRIVERLIB_NOROM at project level
79 // - Per function: Use prefix "NOROM_" when calling the function
80 //
81 //*****************************************************************************
82 #if !defined(DOXYGEN)
83     #define AUXSYSIFOpModeChange            NOROM_AUXSYSIFOpModeChange
84 #endif
85 
86 
87 //*****************************************************************************
88 //
89 // API Functions and prototypes
90 //
91 //*****************************************************************************
92 
93 //*****************************************************************************
94 //
95 // Defines for AUX operational modes.
96 //
97 //*****************************************************************************
98 #define AUX_SYSIF_OPMODE_TARGET_PDLP (AUX_SYSIF_OPMODEREQ_REQ_PDLP)
99 #define AUX_SYSIF_OPMODE_TARGET_PDA  (AUX_SYSIF_OPMODEREQ_REQ_PDA)
100 #define AUX_SYSIF_OPMODE_TARGET_LP   (AUX_SYSIF_OPMODEREQ_REQ_LP)
101 #define AUX_SYSIF_OPMODE_TARGET_A    (AUX_SYSIF_OPMODEREQ_REQ_A)
102 
103 //*****************************************************************************
104 //
105 //! \brief Changes the AUX operational mode to the requested target mode.
106 //!
107 //! This function controls the change of the AUX operational mode.
108 //! The function controls the change of the current operational mode to the
109 //! operational mode target by adhering to rules specified by HW.
110 //!
111 //! \param targetOpMode
112 //!     AUX operational mode:
113 //!     - \ref AUX_SYSIF_OPMODE_TARGET_PDLP (Powerdown operational mode with wakeup to lowpower mode)
114 //!     - \ref AUX_SYSIF_OPMODE_TARGET_PDA  (Powerdown operational mode with wakeup to active mode)
115 //!     - \ref AUX_SYSIF_OPMODE_TARGET_LP   (Lowpower operational mode)
116 //!     - \ref AUX_SYSIF_OPMODE_TARGET_A    (Active operational mode)
117 //!
118 //! \return None
119 //
120 //*****************************************************************************
121 extern void AUXSYSIFOpModeChange(uint32_t targetOpMode);
122 
123 //*****************************************************************************
124 //
125 // Support for DriverLib in ROM:
126 // Redirect to implementation in ROM when available.
127 //
128 //*****************************************************************************
129 #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
130     #include "../driverlib/rom.h"
131     #ifdef ROM_AUXSYSIFOpModeChange
132         #undef  AUXSYSIFOpModeChange
133         #define AUXSYSIFOpModeChange            ROM_AUXSYSIFOpModeChange
134     #endif
135 #endif
136 
137 //*****************************************************************************
138 //
139 // Mark the end of the C bindings section for C++ compilers.
140 //
141 //*****************************************************************************
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif // __AUX_SYSIF_H__
147 
148 //*****************************************************************************
149 //
150 //! Close the Doxygen group.
151 //! @}
152 //! @}
153 //
154 //*****************************************************************************
155