/**
 * @file    Mpu_Lld_M33.h
 * @version V0.8.0
 *
 * @brief   YUNTU Mpu_Lld_M33 module interface
 * @details API implementation for Mpu_Lld_M33 driver
 *
 * @addtogroup MPU_LLD_M33_MODULE
 * @{
 */
/*==================================================================================================
 *   Project              : YTMicro AUTOSAR 4.4.0 MCAL
 *   Platform             : ARM
 *   Peripheral           : Cortex M33 MPU
 *   Dependencies         : none
 *
 *   Autosar Version      : V4.4.0
 *   Autosar Revision     : ASR_REL_4_4_REV_0000
 *   Autosar Conf.Variant :
 *   SW Version           : V0.8.0
 *
 *   (c) Copyright 2020-2026 Yuntu Microelectronics co.,ltd.
 *   All Rights Reserved.
==================================================================================================*/

#ifndef MPU_LLD_M33_H
#define MPU_LLD_M33_H

#ifdef __cplusplus
extern "C" {
#endif

/*==================================================================================================
 *                                        INCLUDE FILES
==================================================================================================*/
#include "Mpu_Lld_M33_Types.h"

/*==================================================================================================
 *                              SOURCE FILE VERSION INFORMATION
==================================================================================================*/
#define MPU_LLD_M33_VENDOR_ID                      (180)
#define MPU_LLD_M33_MODULE_ID              (121)
#define MPU_LLD_M33_AR_RELEASE_MAJOR_VERSION       (4)
#define MPU_LLD_M33_AR_RELEASE_MINOR_VERSION       (4)
#define MPU_LLD_M33_AR_RELEASE_REVISION_VERSION    (0)
#define MPU_LLD_M33_SW_MAJOR_VERSION               (0)
#define MPU_LLD_M33_SW_MINOR_VERSION               (8)
#define MPU_LLD_M33_SW_PATCH_VERSION               (0)

/*==================================================================================================
 *                                     FILE VERSION CHECKS
==================================================================================================*/
/* Check if Mpu_Lld_M33.h and Mpu_Lld_M33_Types.h are of the same vendor */
#if (MPU_LLD_M33_VENDOR_ID != MPU_LLD_M33_TYPES_VENDOR_ID)
#error "Mpu_Lld_M33.h and Mpu_Lld_M33_Types.h have different vendor ids"
#endif
/* Check if Mpu_Lld_M33.h and Mpu_Lld_M33_Types.h are of the same Autosar version */
#if ((MPU_LLD_M33_AR_RELEASE_MAJOR_VERSION != MPU_LLD_M33_TYPES_AR_RELEASE_MAJOR_VERSION) || \
     (MPU_LLD_M33_AR_RELEASE_MINOR_VERSION != MPU_LLD_M33_TYPES_AR_RELEASE_MINOR_VERSION) || \
     (MPU_LLD_M33_AR_RELEASE_REVISION_VERSION != MPU_LLD_M33_TYPES_AR_RELEASE_REVISION_VERSION))
#error "AutoSar Version Numbers of Mpu_Lld_M33.h and Mpu_Lld_M33_Types.h are different"
#endif
/* Check if Mpu_Lld_M33.h and Mpu_Lld_M33_Types.h are of the same software version */
#if ((MPU_LLD_M33_SW_MAJOR_VERSION != MPU_LLD_M33_TYPES_SW_MAJOR_VERSION) || \
     (MPU_LLD_M33_SW_MINOR_VERSION != MPU_LLD_M33_TYPES_SW_MINOR_VERSION) || \
     (MPU_LLD_M33_SW_PATCH_VERSION != MPU_LLD_M33_TYPES_SW_PATCH_VERSION))
#error "Software Version Numbers of Mpu_Lld_M33.h and Mpu_Lld_M33_Types.h are different"
#endif

/*==================================================================================================
 *                                    FUNCTION PROTOTYPES
==================================================================================================*/
#define PLATFORM_START_SEC_CODE
#include "Platform_MemMap.h"  /* NOSONAR, memory map */

/**
 * @brief         Initializes the Cortex-M33 MPU. Disables the MPU, clears all regions, sets memory attributes, programs regions from the provided configuration, and re-enables the MPU with the requested options.
 * @autosar       N/A
 *
 * @details       Service ID: N/A
 *                Sync/Async: Synchronous
 *                Reentrancy: Non Reentrant
 *                Available via: Mpu_Lld_M33.h
 *
 * @param[in] MpuConfig: Pointer to MPU configuration: DefaultMapEn, RunHFNMIEn, MemManageIrqEn, AttributeCount/AttributeConfig for MAIR, RegionCount/RegionConfig entries with RegionIndex/RBAR/RLAR.
 * @return No return value.
*/
void Mpu_Lld_M33_Init(const Mpu_Lld_M33_ConfigType *MpuConfig);

#define PLATFORM_STOP_SEC_CODE
#include "Platform_MemMap.h"  /* NOSONAR, memory map */

#ifdef __cplusplus
}
#endif

#endif /* MPU_LLD_M33_H */

/** @} */

