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 configuration definitions related to partitions. 16 */ 17 #ifndef PARTITION_RESOURCE_ID_H 18 #define PARTITION_RESOURCE_ID_H 19 20 #ifdef __cplusplus 21 #if __cplusplus 22 extern "C" { 23 #endif /* __cplusplus */ 24 #endif /* __cplusplus */ 25 26 /* partition image id, must be same as flash partition bin */ 27 #define PARTITION_IMAGE_ID 0x4B87A54B 28 29 /** 30 * @defgroup middleware_chips_brandy_partition Partition 31 * @ingroup middleware_chips_brandy 32 * @{ 33 */ 34 35 /** 36 * @if Eng 37 * @brief Partition ids. 38 * @else 39 * @brief 分区ID 40 * @endif 41 */ 42 typedef enum { 43 PARTITION_SSB = 0x0, 44 PARTITION_FLASH_BOOT_IMAGE = 0x1, 45 PARTITION_FLASH_BOOT_IMAGE_BACKUP = 0x2, 46 PARTITION_FLASH_ROOT_PUBLIC_KEYS_AREA = 0x3, 47 48 PARTITION_CUSTOMER_FACTORY = 0x8, 49 PARTITION_NV_DATA_BACKUP = 0x9, 50 PARTITION_NV_DATA = 0x10, 51 PARTITION_CRASH_INFO = 0x11, 52 PARTITION_APP_IMAGE = 0x20, 53 PARTITION_FOTA_DATA = 0x21, 54 55 PARTITION_RESERVE0 = 0x30, 56 PARTITION_HILINK_IMAGE = 0x31, 57 PARTITION_RESERVE1 = 0x31, 58 PARTITION_RESERVE2 = 0x32, 59 PARTITION_RESERVE3 = 0x33, 60 PARTITION_RESERVE4 = 0x34, 61 PARTITION_RESERVE5 = 0x35, 62 PARTITION_MAX_CNT = 16 /*!< @if Eng Maximum number of partitions. 63 The value is recorded only as the number of partitions and is not used to determine the ID validity. 64 @else 分区的数量,这个枚举只用来记录分区的数量,不作为分区ID有效性的判断 @endif */ 65 } partition_ids_t; 66 67 /** 68 * @} 69 */ 70 71 #ifdef __cplusplus 72 #if __cplusplus 73 } 74 #endif /* __cplusplus */ 75 #endif /* __cplusplus */ 76 77 #endif /* PARTITION_RESOURCE_ID_H */ 78