• 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 
16 #ifndef _UPG_START_UP_H_
17 #define _UPG_START_UP_H_
18 
19 #include <upg_common.h>
20 
21 #ifndef offsetof
22 #define offsetof(type, member) ((hi_u32) & ((type *)0)->member)
23 #endif
24 
25 #define ENV_REFRESH_NV 0x55
26 #define ENV_REFRESH_NV_WAIT 0x56
27 
28 hi_u32 upg_get_start_up_nv(hi_nv_ftm_startup_cfg *cfg);
29 hi_u32 upg_save_start_up_nv(hi_nv_ftm_startup_cfg *cfg);
30 
31 hi_u32 upg_get_wait_mode_nv(hi_nv_ftm_upg_wait_mode *cfg);
32 hi_u32 upg_save_wait_mode_nv(hi_nv_ftm_upg_wait_mode *cfg);
33 
34 #endif /* _UPG_START_UP_H_ */
35