1 /* 2 * Arm SCP/MCP Software 3 * Copyright (c) 2015-2021, Arm Limited and Contributors. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 * 7 * Description: 8 * Element definitions. 9 */ 10 11 #ifndef FWK_ELEMENT_H 12 #define FWK_ELEMENT_H 13 14 #include <stddef.h> 15 16 /*! 17 * \addtogroup GroupLibFramework Framework 18 * \{ 19 */ 20 21 /*! 22 * \defgroup GroupElement Elements 23 * \{ 24 */ 25 26 /*! 27 * \brief Element descriptor. 28 */ 29 struct fwk_element { 30 /*! Element name */ 31 const char *name; 32 33 /*! Number of sub-elements */ 34 size_t sub_element_count; 35 36 /*! 37 * \brief Pointer to element-specific configuration data 38 * 39 * \details Because each element is expected to have some associated 40 * configuration data this pointer must be non-NULL for the framework 41 * to consider the element as valid. 42 * 43 * A fake, non-NULL pointer should be provided in the case where no 44 * element-specific configuration data is available. In this case the 45 * module code must not make any attempt to dereference or store the 46 * pointer during element initialization. 47 */ 48 const void *data; 49 }; 50 51 /*! 52 * \} 53 */ 54 55 /*! 56 * \} 57 */ 58 59 #endif /* FWK_ELEMENT_H */ 60