1 /*
2  * Copyright 2022 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef _FSL_SILICON_ID_H_
8 #define _FSL_SILICON_ID_H_
9 
10 #include "fsl_common.h"
11 
12 #define SILICONID_MAX_LENGTH 16U
13 
14 #if defined(__cplusplus)
15 extern "C" {
16 #endif
17 
18 /*!
19  * @brief Get the silicon ID.
20  *
21  * @param siliconId[out]  Memory address to store silicon ID, array length depends on specific Soc. The
22  * SILICONID_MAX_LENGTH is the maximun length of all supported Socs.
23  * @param idLen[in/out]  Silicon ID byte length. Set the length to read, return the length read out.
24  * @retval kStatus_Success  Succeed to get silicon ID.
25  * @retval kStatus_Fail  Fail to get silicon ID.
26  */
27 status_t SILICONID_GetID(uint8_t *siliconId, uint32_t *idLen);
28 
29 /*!
30  * @brief Get and convert the silicon ID to ethernet MAC address.
31  *
32  * @param macAddr[out]  Memory address to store ethernet MAC address.
33  * @retval kStatus_Success  Succeed to get silicon ID and finish conversion.
34  * @retval kStatus_Fail  Fail to get silicon ID and finish conversion.
35  */
36 status_t SILICONID_ConvertToMacAddr(uint8_t (*macAddr)[6]);
37 
38 #if defined(__cplusplus)
39 }
40 #endif
41 
42 #endif /* _FSL_SILICON_ID_H_ */
43