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