1 // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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 #ifndef __ESP_BIN_TYPES_H__
15 #define __ESP_BIN_TYPES_H__
24 #define ESP_PARTITION_TABLE_ADDR 0x8000
25 #define ESP_PARTITION_MAGIC 0x50AA
27 /* OTA selection structure (two copies in the OTA data partition.)
28 Size of 32 bytes is friendly to flash encryption */
31 uint8_t seq_label[24];
32 uint32_t crc; /* CRC32 of ota_seq field only */
33 } esp_ota_select_entry_t;
39 } esp_partition_pos_t;
41 /* Structure which describes the layout of partition table entry.
42 * See docs/partition_tables.rst for more information about individual fields.
48 esp_partition_pos_t pos;
51 } esp_partition_info_t;
53 #define PART_TYPE_APP 0x00
54 #define PART_SUBTYPE_FACTORY 0x00
55 #define PART_SUBTYPE_OTA_FLAG 0x10
56 #define PART_SUBTYPE_OTA_MASK 0x0f
57 #define PART_SUBTYPE_TEST 0x20
59 #define PART_TYPE_DATA 0x01
60 #define PART_SUBTYPE_DATA_OTA 0x00
61 #define PART_SUBTYPE_DATA_RF 0x01
62 #define PART_SUBTYPE_DATA_WIFI 0x02
64 #define PART_TYPE_END 0xff
65 #define PART_SUBTYPE_END 0xff
67 #define PART_FLAG_ENCRYPTED (1<<0)
73 #endif //__ESP_BIN_TYPES_H__