TI BLE5-Stack API Documentation  2.01.00.00
ext_flash_layout.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  @file ext_flash_layout.h
4 
5  @brief Contains common structures and defines related to external flash
6  layout as it for the OAD usecase
7 
8  Group: WCS, BTS
9  $Target Device: DEVICES $
10 
11  ******************************************************************************
12  $License: BSD3 2017 $
13  ******************************************************************************
14  $Release Name: PACKAGE NAME $
15  $Release Date: PACKAGE RELEASE DATE $
16  *****************************************************************************/
17 
46 #ifndef EXT_FLASH_LAYOUT_H
47 #define EXT_FLASH_LAYOUT_H
48 
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif
53 
54 /*******************************************************************************
55  * INCLUDES
56  ******************************************************************************/
57 
59 
68 #define OAD_EFL_MAGIC {'O', 'A', 'D', ' ', 'N', 'V', 'M', '1'}
69 
74 #define OAD_EFL_MAGIC_SZ 8
75 
80 #define EFL_ADDR_META 0x00000
81 
86 #define EFL_SIZE_META EFL_PAGE_SIZE
87 
92 #define EFL_META_PG_INVALID 0xFF
93 
98 #define EFL_FACT_IMG_META_PG 0
99 
103 #define EFL_ADDR_META_FACT_IMG EFL_ADDR_META
104 
108 #define EFL_META_COPY_SZ offsetof(ExtImageInfo_t, fixedHdr.rfu) + \
109  sizeof(((ExtImageInfo_t){0}).fixedHdr.rfu)
110 
114 #define EFL_METADATA_LEN sizeof(ExtImageInfo_t)
115 
120 #define EFL_IMG_STR_ADDR_OFFSET offsetof(ExtImageInfo_t, extFlAddr)
121 
125 #define EFL_META_COUNTER_OFFSET offsetof(ExtImageInfo_t, counter)
126 
132 {
133  imgFixedHdr_t fixedHdr;
134  uint32_t extFlAddr;
135  uint32_t counter;
136 } ExtImageInfo_t;
137 
140 #ifdef __cplusplus
141 }
142 #endif
143 
144 
145 #endif /* EXT_FLASH_LAYOUT_H */
TYPEDEF_STRUCT_PACKED
This is the core image header.
Definition: ext_flash_layout.h:132
uint32_t counter
Timestamp/counter of image.
Definition: ext_flash_layout.h:135
uint32_t extFlAddr
Location of the image in ext flash.
Definition: ext_flash_layout.h:134
Structure definition for image header and segments, these are prepended to the over the air images...
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale