• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15  * Description: Provides efuse driver source \n
16  *
17  * History: \n
18  * 2022-10-20, Create file. \n
19  */
20 #include <stdio.h>
21 #include "hal_efuse.h"
22 
23 hal_efuse_funcs_t *g_hal_efuses_funcs = NULL;
24 
hal_efuse_register_funcs(hal_efuse_funcs_t * funcs)25 errcode_t hal_efuse_register_funcs(hal_efuse_funcs_t *funcs)
26 {
27     if (funcs == NULL) {
28         return ERRCODE_INVALID_PARAM;
29     }
30     g_hal_efuses_funcs = funcs;
31     return ERRCODE_SUCC;
32 }
33 
hal_efuse_unregister_funcs(void)34 errcode_t hal_efuse_unregister_funcs(void)
35 {
36     g_hal_efuses_funcs = NULL;
37     return ERRCODE_SUCC;
38 }
39 
hal_efuse_get_funcs(void)40 hal_efuse_funcs_t *hal_efuse_get_funcs(void)
41 {
42     return g_hal_efuses_funcs;
43 }
44