/** ************************************************************************************************ * 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_mac.h * \brief This file contains interface header for SSDK Firewall MAC module. * * *
Date Version *
2023/11/29 1.0.0 *
**************************************************************************************************/ #ifndef FIREWALL_MAC_H #define FIREWALL_MAC_H #ifdef __cplusplus extern "C" { #endif /*************************************************************************************************** * Include header files **************************************************************************************************/ #include /*************************************************************************************************** * Global Function Declarations **************************************************************************************************/ /** * @brief Configure the mapping between masters and domains in MAC module. * * This function configure the mapping between masters and domains in MAC module. * The System should call sdrv_firewall_mac_lock_domain_assignment() to lock the MAC * configurations after calling this function. * * @param[in] base the address of the MAC module. * @param[in] mac_cfg the configuration of the MAC. * * @return The result of the MAC initialization function * @details - return FIREWALL_E_OK : initializa MAC success. * - return FIREWALL_E_NULL_POINTER : The pointer is a NULL_PTR. */ status_t sdrv_firewall_mac_configure(uint32_t base, const sdrv_mac_config_t *mac_cfg); /** * @brief Assigns the specified master to a domain. * * This function is called by sdrv_firewall_assign_domain(). * * @param[in] base the address of the MAC module. * @param[in] master_id the id of the master. * @param[in] domain_id the id of the domain. * * @return The result of this function. * @details - return FIREWALL_E_OK : Change domain success. * - return FIREWALL_E_MAC_MASTER_ID : invalid master id. * - return FIREWALL_E_MAC_DOMAIN_ID : invalid domain id. * - return FIREWALL_E_MAC_LOCKED : domain assign has been locked. */ status_t sdrv_firewall_mac_assign_domain(uint32_t base, uint8_t master_id, uint8_t domain_id); /** * @brief Lock the configuration of the map between masters and domains * in MAC module. * * This function lock the configuration of map between masters and domains * in MAC module. * This function is called by sdrv_firewall_lock_domain_assignment(). * * @param[in] base the address of the MAC module. */ void sdrv_firewall_mac_lock_domain_assignment(uint32_t base); /** * @brief Clear the interrupt status of the MAC module. * * @param[in] base the address of the MAC module. */ void sdrv_firewall_mac_clear_interrupt(uint32_t base); #ifdef __cplusplus } #endif #endif /* FIREWALL_MAC_H */ /* End of file */