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 __APP_DEMO_NV_H__ 17 #define __APP_DEMO_NV_H__ 18 19 #include <hi_types_base.h> 20 #include <hi_stdlib.h> 21 #include <hi_early_debug.h> 22 #include <hi_nv.h> 23 #include <hi_flash.h> 24 #include <hi_partition_table.h> 25 26 #define HI_NV_DEMO_RST_CFG_ID 0x22 27 #define HI_FACTORY_NV_DEMO_ID 0x1 28 29 typedef struct { 30 hi_u32 nv_demo_test_num0; 31 hi_u32 nv_demo_test_num1; 32 hi_u32 nv_demo_test_num2; 33 hi_u32 nv_demo_test_num3; 34 } hi_nv_demo_tset_cfg; 35 36 typedef struct { 37 hi_s32 nv_factory_demo_test_num0; 38 hi_s32 nv_factory_demo_test_num1; 39 hi_s32 nv_factory_demo_test_num2; 40 } hi_factory_nv_demo_tset_cfg; 41 42 hi_void nv_demo(hi_void); 43 hi_void factory_nv_demo(hi_void); 44 45 #endif