1 //***************************************************************************** 2 // 3 //! @file am_mcu_apollo.h 4 //! 5 //! @brief Top Include for Apollo4 Plus class devices. 6 //! 7 //! This file provides all the includes necessary for an apollo device. 8 //! 9 //! @addtogroup hal Hardware Abstraction Layer (HAL) 10 // 11 //! @defgroup apollo4p_hal apollo4p 12 //! @ingroup hal 13 //! @{ 14 // 15 //***************************************************************************** 16 17 //***************************************************************************** 18 // 19 // Copyright (c) 2023, Ambiq Micro, Inc. 20 // All rights reserved. 21 // 22 // Redistribution and use in source and binary forms, with or without 23 // modification, are permitted provided that the following conditions are met: 24 // 25 // 1. Redistributions of source code must retain the above copyright notice, 26 // this list of conditions and the following disclaimer. 27 // 28 // 2. Redistributions in binary form must reproduce the above copyright 29 // notice, this list of conditions and the following disclaimer in the 30 // documentation and/or other materials provided with the distribution. 31 // 32 // 3. Neither the name of the copyright holder nor the names of its 33 // contributors may be used to endorse or promote products derived from this 34 // software without specific prior written permission. 35 // 36 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 37 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 39 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 40 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 41 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 42 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 43 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 44 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 45 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 46 // POSSIBILITY OF SUCH DAMAGE. 47 // 48 // This is part of revision release_sdk_4_4_0-3c5977e664 of the AmbiqSuite Development Package. 49 // 50 //***************************************************************************** 51 52 #ifndef AM_MCU_APOLLO_H 53 #define AM_MCU_APOLLO_H 54 55 #ifdef __cplusplus 56 extern "C" 57 { 58 #endif 59 60 //***************************************************************************** 61 // 62 //! AM_PART_APOLLO4_API indicates that this device uses the Apollo4 API. 63 // 64 //***************************************************************************** 65 #define AM_PART_APOLLO4_API 1 66 67 //***************************************************************************** 68 // 69 //! Define AM_CMSIS_REGS to indicate that CMSIS registers are supported. 70 // 71 //***************************************************************************** 72 #define AM_CMSIS_REGS 1 73 74 //***************************************************************************** 75 // 76 // C99 77 // 78 //***************************************************************************** 79 #include <stdarg.h> 80 #include <stdbool.h> 81 #include <stddef.h> 82 #include <stdint.h> 83 84 #if !defined(__XTENSA__) 85 #define __XTENSA__ 0 86 #endif 87 88 #if __XTENSA__ 89 #include "core_ambiq_xtensa.h" 90 #include "apollo4_generic.h" 91 #else 92 #include "apollo4p.h" 93 #include "hal/am_hal_usbregs.h" 94 #endif 95 96 //***************************************************************************** 97 // 98 // Global HAL 99 // 100 //***************************************************************************** 101 // 102 // Define this macro to disable and remove parameter validation in functions 103 // throughout the HAL. 104 // 105 //#define AM_HAL_DISABLE_API_VALIDATION 106 107 //***************************************************************************** 108 // 109 // Registers 110 // 111 //***************************************************************************** 112 #include "regs/am_reg_base_addresses.h" 113 #include "regs/am_reg_macros.h" 114 #include "regs/am_reg.h" 115 116 #if __XTENSA__ 117 #include "regs/am_reg_dsp.h" 118 #else 119 #include "regs/am_reg_mcu.h" 120 #endif 121 122 //***************************************************************************** 123 // 124 // HAL 125 // 126 //***************************************************************************** 127 #include "hal/am_hal_global.h" 128 #include "hal/am_hal_status.h" 129 130 #if __XTENSA__ 131 #include "hal/dsp/am_hal_dsp.h" 132 #else 133 134 // 135 // MCU includes 136 // 137 #include "hal/mcu/am_hal_mram.h" 138 #include "hal/mcu/am_hal_cmdq.h" 139 #include "hal/mcu/am_hal_cachectrl.h" 140 #include "hal/mcu/am_hal_dsi.h" 141 #include "hal/mcu/am_hal_fault.h" 142 #include "hal/mcu/am_hal_itm.h" 143 #include "hal/am_hal_sysctrl.h" 144 #include "hal/mcu/am_hal_iom.h" 145 #include "hal/mcu/am_hal_ios.h" 146 #include "hal/mcu/am_hal_mcu.h" 147 #include "hal/mcu/am_hal_mcuctrl.h" 148 #include "hal/mcu/am_hal_mspi.h" 149 #include "hal/mcu/am_hal_reset.h" 150 #include "hal/mcu/am_hal_mcu_sysctrl.h" 151 #include "hal/mcu/am_hal_systick.h" 152 #include "hal/mcu/am_hal_tpiu.h" 153 #include "hal/mcu/am_hal_uart.h" 154 #include "hal/mcu/am_hal_clkgen.h" 155 #include "hal/mcu/am_hal_rtc.h" 156 #include "hal/mcu/am_hal_secure_ota.h" 157 #include "hal/mcu/am_hal_card_host.h" 158 #include "hal/mcu/am_hal_card.h" 159 #include "hal/mcu/am_hal_sdhc.h" 160 #include "hal/mcu/am_hal_mpu.h" 161 #endif 162 163 // 164 // HAL common includes 165 // 166 #include "hal/am_hal_access.h" 167 #include "hal/am_hal_adc.h" 168 #include "hal/am_hal_i2s.h" 169 #include "hal/am_hal_pin.h" 170 #include "hal/am_hal_gpio.h" 171 #include "hal/am_hal_audadc.h" 172 #include "hal/am_hal_pdm.h" 173 #include "hal/am_hal_pwrctrl.h" 174 #include "hal/am_hal_queue.h" 175 #include "hal/am_hal_stimer.h" 176 #include "hal/am_hal_system.h" 177 #include "hal/am_hal_timer.h" 178 #include "hal/am_hal_utils.h" 179 #include "hal/am_hal_security.h" 180 #include "hal/am_hal_wdt.h" 181 #include "hal/am_hal_usbcharger.h" 182 #include "hal/am_hal_usb.h" 183 #include "hal/am_hal_otp.h" 184 #include "hal/am_hal_dcu.h" 185 #include "regs/am_mcu_apollo4p_info0.h" 186 #include "regs/am_mcu_apollo4p_info1.h" 187 #include "regs/am_mcu_apollo4p_otp.h" 188 189 #ifdef __cplusplus 190 } 191 #endif 192 193 #endif // AM_MCU_APOLLO_H 194 195 //***************************************************************************** 196 // 197 // End Doxygen group. 198 //! @} 199 // 200 //***************************************************************************** 201