• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  ****************************************************************************************
3  *
4  * @file    gr55xx_hal_efuse.h
5  * @author  BLE Driver Team
6  * @brief   Header file containing functions prototypes of eFuse HAL library.
7  *
8  ****************************************************************************************
9  * @attention
10   #####Copyright (c) 2019 GOODIX
11   All rights reserved.
12 
13     Redistribution and use in source and binary forms, with or without
14     modification, are permitted provided that the following conditions are met:
15   * Redistributions of source code must retain the above copyright
16     notice, this list of conditions and the following disclaimer.
17   * Redistributions in binary form must reproduce the above copyright
18     notice, this list of conditions and the following disclaimer in the
19     documentation and/or other materials provided with the distribution.
20   * Neither the name of GOODIX nor the names of its contributors may be used
21     to endorse or promote products derived from this software without
22     specific prior written permission.
23 
24   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34   POSSIBILITY OF SUCH DAMAGE.
35  ****************************************************************************************
36  */
37 
38 /** @addtogroup PERIPHERAL Peripheral Driver
39   * @{
40   */
41 
42 /** @addtogroup HAL_DRIVER HAL Driver
43   * @{
44   */
45 
46 /** @defgroup HAL_EFUSE EFUSE
47   * @brief eFuse HAL module driver.
48   * @{
49   */
50 
51 /* Define to prevent recursive inclusion -------------------------------------*/
52 #ifndef __GR55xx_HAL_EFUSE_H__
53 #define __GR55xx_HAL_EFUSE_H__
54 
55 /* Includes ------------------------------------------------------------------*/
56 #include "gr55xx_hal_def.h"
57 #include "gr55xx_ll_efuse.h"
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
63 /* Exported types ------------------------------------------------------------*/
64 /** @addtogroup HAL_EFUSE_ENUMERATIONS Enumerations
65   * @{
66   */
67 
68 /** @defgroup HAL_EFUSE_state HAL EFUSE state
69   * @{
70   */
71 
72 /**
73   * @brief  HAL eFuse State Enumerations definition
74   */
75 typedef enum {
76     HAL_EFUSE_STATE_RESET             = 0x00,    /**< Peripheral not yet initialized or disabled  */
77     HAL_EFUSE_STATE_READY             = 0x01,    /**< Peripheral Initialized and ready for use    */
78     HAL_EFUSE_STATE_BUSY              = 0x02,    /**< An internal process is ongoing              */
79     HAL_EFUSE_STATE_ERROR             = 0x04     /**< Reception process is error                  */
80 } hal_efuse_state_t;
81 /** @} */
82 
83 /** @} */
84 
85 /** @addtogroup HAL_EFUSE_STRUCTURES Structures
86   * @{
87   */
88 
89 /** @defgroup EFUSE_Configuration EFUSE Configuration
90   * @{
91   */
92 
93 /**
94   * @brief eFuse init Structure definition
95   */
96 typedef struct _efuse_init {
97     uint32_t info_mode;                     /**< Specifies the info mode, enable or disable main or backup info. */
98 } efuse_init_t;
99 
100 /** @} */
101 
102 /** @defgroup EFUSE_handle EFUSE handle
103   * @{
104   */
105 
106 /**
107   * @brief eFuse handle Structure definition
108   */
109 typedef struct _efuse_handle {
110     efuse_regs_t            *p_instance;    /**< Register base address          */
111 
112     efuse_init_t            init;           /**< eFuse base required parameters */
113 
114     __IO hal_lock_t         lock;           /**< Locking object                 */
115 
116     __IO hal_efuse_state_t  state;          /**< eFuse operation state          */
117 
118     __IO uint32_t           error_code;     /**< eFuse Error code               */
119 } efuse_handle_t;
120 /** @} */
121 
122 /** @defgroup EFUSE_Keyram Keyram configuration
123   * @{
124   */
125 
126 /**
127   * @brief eFuse Keyram Structure definition
128   */
129 typedef struct _keyram_mask {
130     uint32_t                aes_mask;         /**< AES port mask.                 */
131 
132     uint32_t                hmac_mask;        /**< HMAC port mask.                */
133 
134     uint32_t                present_mcu_mask; /**< Present of MCU port mask.      */
135 
136     uint32_t                present_xip_mask; /**< Present of XIP port mask.      */
137 
138     uint32_t                efuse_mask;       /**< eFuse port mask.               */
139 
140     uint32_t                enc_key_low;      /**< encrypt key low 32bit mask.    */
141 
142     uint32_t                enc_key_high;     /**< encrypt key high 32bit mask.   */
143 } keyram_mask_t;
144 
145 /** @} */
146 
147 /** @} */
148 
149 /** @addtogroup HAL_EFUSE_CALLBACK_STRUCTURES Callback Structures
150   * @{
151   */
152 
153 /** @defgroup HAL_EFUSE_Callback Callback
154   * @{
155   */
156 
157 /**
158   * @brief HAL_EFUSE Callback function definition
159   */
160 
161 typedef struct _hal_efuse_callback {
162     void (*efuse_msp_init)(efuse_handle_t *p_efuse);        /**< EFUSE init MSP callback            */
163     void (*efuse_msp_deinit)(efuse_handle_t *p_efuse);      /**< EFUSE de-init MSP callback         */
164 } hal_efuse_callback_t;
165 
166 /** @} */
167 
168 /** @} */
169 
170 /**
171   * @defgroup  HAL_EFUSE_MACRO Defines
172   * @{
173   */
174 
175 /* Exported macro ------------------------------------------------------------*/
176 /** @defgroup EFUSE_Exported_Macros EFUSE Exported Macros
177   * @{
178   */
179 
180 /** @defgroup EFUSE_Error_Code EFUSE Error Code
181   * @{
182   */
183 #define HAL_EFUSE_ERROR_NONE                   ((uint32_t)0x00000000)              /**< No error                 */
184 #define HAL_EFUSE_ERROR_TIMEOUT                ((uint32_t)0x00000001)              /**< Timeout error            */
185 #define HAL_EFUSE_ERROR_INVALID_PARAM          ((uint32_t)0x00000002)              /**< Invalid parameters error */
186 /** @} */
187 
188 /** @defgroup EFUSE_Flags EFUSE Flags
189   * @{
190   */
191 #define EFUSE_FLAG_WRITE_KEYRAM_BUSY           LL_EFUSE_WRITE_KEYRAM_BUSY  /**< Write keyram operation is in process  */
192 #define EFUSE_FLAG_READ_TRIM_DONE              LL_EFUSE_READ_TRIM_DONE     /**< Read trim from eFuse has done         */
193 #define EFUSE_FLAG_CRC_CHECK_DONE              LL_EFUSE_CRC_CHECK_DONE     /**< eFuse CRC check done                  */
194 #define EFUSE_FLAG_CRC_CHECK_SUCCESS           LL_EFUSE_CRC_CHECK_SUCCESS  /**< CRC check succeeded                   */
195 #define EFUSE_FLAG_INIT_CHECK_DONE             LL_EFUSE_INIT_CHECK_DONE    /**< eFuse initial value check done        */
196 #define EFUSE_FLAG_INIT_CHECK_SUCCESS          LL_EFUSE_INIT_CHECK_SUCCESS /**< eFuse initial value check succeeded   */
197 #define EFUSE_FLAG_WRITE_DONE                  LL_EFUSE_WRITE_DONE         /**< eFuse one word write done             */
198 #define EFUSE_FLAG_TEST_DONE                   LL_EFUSE_TEST_DONE          /**< Read from eFuse has done in test mode */
199 /** @} */
200 
201 /** @defgroup EFUSE_Loyout_Map EFUSE Loyout Map
202   * @{
203   */
204 #define EFUSE_OFFSET_USER_DSVD                 (0x0000UL)       /**< Reserved offset in backup info block             */
205 #define EFUSE_OFFSET_BBLK_TRIM                 (0x0020UL)       /**< Triming offset in backup info block              */
206 #define EFUSE_OFFSET_BBLK_CONFIG               (0x005CUL)       /**< Configuration offset in backup info block        */
207 #define EFUSE_OFFSET_BBLK_SWD                  (0x0060UL)       /**< SWD Enable offset in backup info block           */
208 #define EFUSE_OFFSET_BBLK_EncMode              (0x0062UL)       /**< Encryption Mode offset in backup info block      */
209 #define EFUSE_OFFSET_BBLK_CRC32                (0x0064UL)       /**< CRC32 offset in backup info block                */
210 #define EFUSE_OFFSET_BBLK_CHIP_ID              (0x0068UL)       /**< Chip ID offset in backup info block              */
211 #define EFUSE_OFFSET_BBLK_PRODUCT_ID           (0x006EUL)       /**< Product ID offset in backup info block           */
212 #define EFUSE_OFFSET_BBLK_FW_PUBLICKEY         (0x0070UL)       /**< Firmware public key offset in backup info block  */
213 #define EFUSE_OFFSET_BBLK_ROOT_PUBLICKEY       (0x0080UL)       /**< Root public key offset in backup info block      */
214 #define EFUSE_OFFSET_BBLK_ECC_KEY              (0x0090UL)       /**< ECC key offset in backup info block              */
215 #define EFUSE_OFFSET_BBLK_FW_KEY               (0x00B0UL)       /**< Firmware key offset in backup info block         */
216 #define EFUSE_OFFSET_BBLK_HMAC_KEY             (0x00D0UL)       /**< HMAC key offset in backup info block             */
217 #define EFUSE_OFFSET_BBLK_DATA_KEY             (0x00F0UL)       /**< Data key offset in backup info block             */
218 #define EFUSE_OFFSET_MBLK_TRIM                 (0x0110UL)       /**< Triming offset in main info block                */
219 #define EFUSE_OFFSET_MBLK_CONFIG               (0x014CUL)       /**< Configuration offset in main info block          */
220 #define EFUSE_OFFSET_MBLK_SWD                  (0x0150UL)       /**< SWD Enable offset in main info block             */
221 #define EFUSE_OFFSET_MBLK_EncMode              (0x0152UL)       /**< Encryption Mode offset in main info block        */
222 #define EFUSE_OFFSET_MBLK_CRC32                (0x0154UL)       /**< CRC32 offset in main info block                  */
223 #define EFUSE_OFFSET_MBLK_CHIP_ID              (0x0158UL)       /**< Chip ID offset in main info block                */
224 #define EFUSE_OFFSET_MBLK_PRODUCT_ID           (0x015EUL)       /**< Product ID offset in main info block             */
225 #define EFUSE_OFFSET_MBLK_FW_PUBLICKEY         (0x0160UL)       /**< Firmware public key offset in main info block    */
226 #define EFUSE_OFFSET_MBLK_ROOT_PUBLICKEY       (0x0170UL)       /**< Root public key offset in main info block        */
227 #define EFUSE_OFFSET_MBLK_ECC_KEY              (0x0180UL)       /**< ECC key offset in main info block                */
228 #define EFUSE_OFFSET_MBLK_FW_KEY               (0x01A0UL)       /**< Firmware key offset in main info block           */
229 #define EFUSE_OFFSET_MBLK_HMAC_KEY             (0x01C0UL)       /**< HMAC key offset in main info block               */
230 #define EFUSE_OFFSET_MBLK_DATA_KEY             (0x01E0UL)       /**< Data key offset in main info block               */
231 #define EFUSE_OFFSET_END                       (0x0200UL)       /**< eFuse Offset end                                 */
232 /** @} */
233 
234 /** @} */
235 
236 /* Exported macro ------------------------------------------------------------*/
237 /** @defgroup EFUSE_Exported_Macros EFUSE Exported Macros
238   * @{
239   */
240 
241 /** @brief  Enable the eFuse main or backup.
242   * @param  __HANDLE__ Specifies the eFuse Handle.
243   * @retval None.
244   */
245 #define HAL_EFUSE_ENABLE_MAIN_BACKUP(__HANDLE__)              ll_efuse_enable_main_backup((__HANDLE__)->p_instance)
246 
247 /** @brief  Disable the eFuse main or backup.
248   * @param  __HANDLE__ Specifies the eFuse Handle.
249   * @retval None.
250   */
251 #define HAL_EFUSE_DISABLE_MAIN_BACKUP(__HANDLE__)             ll_efuse_disable_main_backup((__HANDLE__)->p_instance)
252 
253 /** @brief  Enable the eFuse PGENB.
254   * @param  __HANDLE__ Specifies the eFuse Handle.
255   * @retval None.
256   */
257 #define HAL_EFUSE_ENABLE_PGENB(__HANDLE__)                    ll_efuse_enable_pgenb((__HANDLE__)->p_instance)
258 
259 /** @brief  Disable the eFuse PGENB.
260   * @param  __HANDLE__ Specifies the eFuse Handle.
261   * @retval None.
262   */
263 #define HAL_EFUSE_DISABLE_PGENB(__HANDLE__)                   ll_efuse_disable_pgenb((__HANDLE__)->p_instance)
264 
265 /** @brief  Check whether the specified eFuse flag is set or not.
266   * @param  __HANDLE__ specifies the eFuse Handle.
267   * @param  __FLAG__ specifies the flag to check.
268   *         This parameter can be one of the following values:
269   *            @arg @ref EFUSE_FLAG_WRITE_KEYRAM_BUSY  Write keyram operation is in process
270   *            @arg @ref EFUSE_FLAG_READ_TRIM_DONE     Read trim from eFuse has done
271   *            @arg @ref EFUSE_FLAG_CRC_CHECK_DONE     eFuse CRC check done
272   *            @arg @ref EFUSE_FLAG_CRC_CHECK_SUCCESS  CRC check succeeded
273   *            @arg @ref EFUSE_FLAG_INIT_CHECK_DONE    eFuse initial value check done
274   *            @arg @ref EFUSE_FLAG_INIT_CHECK_SUCCESS eFuse initial value check succeeded
275   *            @arg @ref EFUSE_FLAG_WRITE_DONE         eFuse one word write done
276   *            @arg @ref EFUSE_FLAG_TEST_DONE          Read from eFuse has done in test mode
277   * @retval The new state of __FLAG__ (TRUE or FALSE).
278   */
279 #define HAL_EFUSE_GET_FLAG(__HANDLE__, __FLAG__) \
280     ((READ_BITS((__HANDLE__)->p_instance->STAT, (__FLAG__)) != 0) ? SET : RESET)
281 /** @} */
282 
283 /** @} */
284 
285 /* Exported functions --------------------------------------------------------*/
286 /** @addtogroup HAL_EFUSE_DRIVER_FUNCTIONS Functions
287   * @{
288   */
289 
290 /** @defgroup EFUSE_Exported_Functions_Group1 Initialization and de-initialization functions
291  *  @brief    Initialization and de-initialization functions
292  *
293 @verbatim
294  ===============================================================================
295               ##### Initialization and de-initialization functions #####
296  ===============================================================================
297     [..]  This subsection provides a set of functions allowing to initialize and
298           de-initialize the EFUSEx peripheral.
299 
300       (+) User must implement hal_efuse_msp_init() function in which he configures
301           all related peripherals resources (GPIO, DMA, IT and NVIC ).
302 
303       (+) Call the function hal_efuse_init() to configure the selected device with
304           the selected configuration:
305         (++) info_mode
306 
307       (+) Call the function hal_efuse_deinit() to restore the default configuration
308           of the selected EFUSEx peripheral.
309 
310 @endverbatim
311   * @{
312   */
313 
314 /**
315  ****************************************************************************************
316  * @brief  Initialize the eFuse according to the specified parameters
317  *         in the efuse_init_t and initialize the associated handle.
318  *
319  * @param[in]  p_efuse: Pointer to a eFuse handle which contains the configuration information for the specified eFuse.
320  *
321  * @retval ::HAL_OK: Operation is OK.
322  * @retval ::HAL_ERROR: Parameter error or operation not supported.
323  * @retval ::HAL_BUSY: Driver is busy.
324  * @retval ::HAL_TIMEOUT: Timeout occurred.
325  ****************************************************************************************
326  */
327 hal_status_t hal_efuse_init(efuse_handle_t *p_efuse);
328 
329 /**
330  ****************************************************************************************
331  * @brief  De-initialize the eFuse peripheral.
332  *
333  * @param[in]  p_efuse: Pointer to a eFuse handle which contains the configuration information for the specified eFuse.
334  *
335  * @retval ::HAL_OK: Operation is OK.
336  * @retval ::HAL_ERROR: Parameter error or operation not supported.
337  * @retval ::HAL_BUSY: Driver is busy.
338  * @retval ::HAL_TIMEOUT: Timeout occurred.
339  ****************************************************************************************
340  */
341 hal_status_t hal_efuse_deinit(efuse_handle_t *p_efuse);
342 
343 /**
344  ****************************************************************************************
345  * @brief  Initialize the eFuse MSP.
346  *
347  * @note   This function should not be modified. When the callback is needed,
348  *          the hal_efuse_msp_deinit can be implemented in the user file.
349  *
350  * @param[in]  p_efuse: Pointer to a eFuse handle which contains the configuration information for the specified eFuse.
351  ****************************************************************************************
352  */
353 void hal_efuse_msp_init(efuse_handle_t *p_efuse);
354 
355 /**
356  ****************************************************************************************
357  * @brief  De-initialize the eFuse MSP.
358  *
359  * @note   This function should not be modified. When the callback is needed,
360  *          the hal_efuse_msp_deinit can be implemented in the user file.
361  *
362  * @param[in]  p_efuse: Pointer to a eFuse handle which contains the configuration information for the specified eFuse.
363  ****************************************************************************************
364  */
365 void hal_efuse_msp_deinit(efuse_handle_t *p_efuse);
366 
367 /** @} */
368 
369 /** @defgroup EFUSE_Exported_Functions_Group2 IO operation functions
370  *  @brief    eFuse Data manage functions
371  *
372  *  @{
373  */
374 
375 /**
376  ****************************************************************************************
377  * @brief  Write the eFuse memory data.
378  *
379  * @note   Address should be eFuse memory address.
380  *
381  * @param[in]  p_efuse: Pointer to a eFuse handle which contains the configuration information for the specified eFuse.
382  * @param[in]  word_offset: eFuse memory offset, unit word, this parament can be a value between: 0x00 ~ 0x80.
383  * @param[in]  p_data: Pointer to data buffer for storage eFuse data.
384  * @param[in]  nword: Size of data to be write, unit word.
385  *
386  * @retval ::HAL_OK: Operation is OK.
387  * @retval ::HAL_ERROR: Parameter error or operation not supported.
388  * @retval ::HAL_BUSY: Driver is busy.
389  * @retval ::HAL_TIMEOUT: Timeout occurred.
390  ****************************************************************************************
391  */
392 hal_status_t hal_efuse_write(efuse_handle_t *p_efuse, uint32_t word_offset, uint32_t *p_data, uint32_t nword);
393 
394 /**
395  ****************************************************************************************
396  * @brief  Read the eFuse memory data.
397  *
398  * @note   Address should be eFuse memory address.
399  *
400  * @param[in]  p_efuse: Pointer to a eFuse handle which contains the configuration information for the specified eFuse.
401  * @param[in]  word_offset: eFuse memory offset, unit word, this parament can be a value between: 0x000 ~ 0x80.
402  * @param[in]  p_data: Pointer to data buffer for storage eFuse data.
403  * @param[in]  nword: Size of data to be read, unit word.
404  *
405  * @retval ::HAL_OK: Operation is OK.
406  * @retval ::HAL_ERROR: Parameter error or operation not supported.
407  * @retval ::HAL_BUSY: Driver is busy.
408  * @retval ::HAL_TIMEOUT: Timeout occurred.
409  ****************************************************************************************
410  */
411 hal_status_t hal_efuse_read(efuse_handle_t *p_efuse, uint32_t word_offset, uint32_t *p_data, uint32_t nword);
412 
413 /**
414  ****************************************************************************************
415  * @brief  Read the key from eFuse memory and write to keyram.
416  *
417  * @param[in]  p_efuse: Pointer to a eFuse handle which contains the configuration information for the specified eFuse.
418  * @param[in]  p_mask: Pointer to a KEYRAM handle which contains the configuration information for the specified MASK.
419  *
420  * @retval ::HAL_OK: Operation is OK.
421  * @retval ::HAL_ERROR: Parameter error or operation not supported.
422  * @retval ::HAL_BUSY: Driver is busy.
423  * @retval ::HAL_TIMEOUT: Timeout occurred.
424  ****************************************************************************************
425  */
426 hal_status_t hal_efuse_write_keyram(efuse_handle_t *p_efuse, keyram_mask_t *p_mask);
427 
428 /**
429  ****************************************************************************************
430  * @brief  Check the eFuse memory with 0, if memory are all 0, return HAL_OK, then return HAL_ERROR.
431  *
432  * @param[in]  p_efuse: Pointer to a eFuse handle which contains the configuration information for the specified eFuse.
433  *
434  * @retval ::HAL_OK: Operation is OK.
435  * @retval ::HAL_ERROR: Parameter error or operation not supported.
436  * @retval ::HAL_BUSY: Driver is busy.
437  * @retval ::HAL_TIMEOUT: Timeout occurred.
438  ****************************************************************************************
439  */
440 hal_status_t hal_efuse_initial_value_check(efuse_handle_t *p_efuse);
441 
442 /**
443  ****************************************************************************************
444  * @brief  Calculate CRC of the eFuse memory data.
445  *
446  * @note   Address must be main info eFuse memory address.
447  *
448  * @param[in]  p_efuse: Pointer to a eFuse handle which contains the configuration information for the specified eFuse.
449  * @param[in]  word_offset: eFuse memory offset, unit word, this parament can be a value between: 0x00 ~ 0x80.
450  * @param[in]  nword: Size of data to be read, unit word, this parament can be a value between: 1 ~ 60.
451  * @param[in]  p_result: Pointer to result.
452  *
453  * @retval ::HAL_OK: Operation is OK.
454  * @retval ::HAL_ERROR: Parameter error or operation not supported.
455  * @retval ::HAL_BUSY: Driver is busy.
456  * @retval ::HAL_TIMEOUT: Timeout occurred.
457  ****************************************************************************************
458  */
459 hal_status_t hal_efuse_crc_calculate(efuse_handle_t *p_efuse, uint32_t word_offset, uint32_t nword, uint32_t *p_result);
460 
461 /**
462  ****************************************************************************************
463  * @brief  Read trim from eFuse memory data.
464  *
465  * @note   Address must be main info eFuse memory address.
466  *
467  * @param[in]  p_efuse: Pointer to a eFuse handle which contains the configuration information for the specified eFuse.
468  * @param[in]  word_offset: eFuse memory offset, unit word, this parament can be a value between: 0x00 ~ 0x80.
469  * @param[in]  p_data: Pointer to data buffer for storage eFuse data.
470  * @param[in]  nword: Size of data to be read, unit word, this parament can be a value between: 1 ~ 20.
471  *
472  * @retval ::HAL_OK: Operation is OK.
473  * @retval ::HAL_ERROR: Parameter error or operation not supported.
474  * @retval ::HAL_BUSY: Driver is busy.
475  * @retval ::HAL_TIMEOUT: Timeout occurred.
476  ****************************************************************************************
477  */
478 hal_status_t hal_efuse_read_trim(efuse_handle_t *p_efuse, uint32_t word_offset, uint32_t *p_data, uint32_t nword);
479 
480 /**
481  ****************************************************************************************
482  * @brief  Set the main or backup info of the eFuse memory.
483  *
484  * @param[in]  p_efuse: Pointer to a eFuse handle which contains the configuration information for the specified eFuse.
485  *
486  * @retval ::HAL_OK: Operation is OK.
487  * @retval ::HAL_ERROR: Parameter error or operation not supported.
488  * @retval ::HAL_BUSY: Driver is busy.
489  * @retval ::HAL_TIMEOUT: Timeout occurred.
490  ****************************************************************************************
491  */
492 hal_status_t hal_efuse_set_main_backup(efuse_handle_t *p_efuse);
493 
494 /** @} */
495 
496 /** @} */
497 
498 #ifdef __cplusplus
499 }
500 #endif
501 
502 #endif /* __GR55xx_HAL_EFUSE_H__ */
503 
504 /** @} */
505 
506 /** @} */
507 
508 /** @} */
509