/** ************************************************************************************************ * SEMIDRIVE Copyright Statement * Copyright (c) SEMIDRIVE. All rights reserved * * This software and all rights therein are owned by SEMIDRIVE, and are * protected by copyright law and other relevant laws, regulations and * protection. Without SEMIDRIVE's prior written consent and/or related rights, * please do not use this software or any potion thereof in any form or by any * means. You may not reproduce, modify or distribute this software except in * compliance with the License. Unless required by applicable law or agreed to * in writing, software distributed under the License is distributed on * an 'AS IS' basis, WITHOUT WARRANTIES OF ANY KIND, either express or implied. * **************************************************************************************************/ /** ************************************************************************************************ * \file sdrv_firewall_ppc.h * \brief This file contains interface header for SSDK Firewall PPC module. * * *
Date Version *
2023/11/29 1.0.0 *
**************************************************************************************************/ #ifndef FIREWALL_PPC_H #define FIREWALL_PPC_H #ifdef __cplusplus extern "C" { #endif /*************************************************************************************************** * Include header files **************************************************************************************************/ #include /*************************************************************************************************** * Global Function Declarations **************************************************************************************************/ /** * @brief Configure the permission of peripherals in PPC module. * * This function configure the permission of peripherals in PPC module. * The permissions of peripherals in PPC module will be locked after configuring. * This function controls the features of interrupt and error response according * to the macro configuration. * * @param[in] base the address of the MAC module. * @param[in] ppc_cfg The configuration of the apbmux IP permission. * @param[in] ip_num The number of ip. * * @return The result of the PPC initialization function * @details - return FIREWALL_E_OK : Configurate PPC ip permission success. * - return FIREWALL_E_NULL_POINTER : The pointer is a NULL_PTR. * - return FIREWALL_E_PPC_IP_NUM : The number of peripherals is unvalid. */ status_t sdrv_firewall_ppc_ip_configure(uint32_t base, const sdrv_ppc_ip_config_t *ppc_cfg, uint16_t ip_num); /** * @brief Configure the permission of peripherals' regions in PPC module. * * This function configure the permission of peripherals' regions in PPC module. * The permissions of regions will be locked after configuring. * This function controls the features of interrupt and error response according * to the macro configuration. * * @param[in] base the address of the MAC module. * @param[in] ppc_cfg The configuration of the apbmux addr permission. * @param[in] region_num The number of address region. * * @return The result of the PPC initialization function * @details - return FIREWALL_E_OK : Configurate PPC ip permission success. * - return FIREWALL_E_NULL_POINTER : The pointer is a NULL_PTR. * - return FIREWALL_E_PPC_REGION_NUM : The number of peripherals' regions is unvalid. */ status_t sdrv_firewall_ppc_addr_configure( uint32_t base, const sdrv_ppc_region_config_t *ppc_cfg, uint16_t region_num); /** * @brief Locks the configurations of the PPC module. * * This function locks the permissions of all peripherals and * apb regions in the PPC module. * * @param[in] base the address of the MAC module. */ void sdrv_firewall_ppc_lock(uint32_t base); /** * @brief Get the interrupt status of the PPC module. * * This function get the illegal access error information of the PPC module. * The function exits as soon as it gets an illegal access message. * This function should be called by the firewall interrupt handler * sdrv_firewall_irq_handler(). * * @param[in] base the address of the MAC module. * * @return The illegal access error status of the PPC module. */ sdrv_ppc_irqsta_t sdrv_firewall_ppc_irq_handler(uint32_t base); /** * @brief Clear the interrupt status of the PPC module. * * This function clear the interrupt status of the PPC module. * * @param[in] base the base address of the MAC module. */ void sdrv_firewall_ppc_clear_interrupt(uint32_t base); #ifdef __cplusplus } #endif #endif /* FIREWALL_PPC_H */ /* End of file */