1
6
7
8
9
10
11
15
16
17
18
19
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* ... */
#ifndef _WL_Config_H_
#define _WL_Config_H_
#include "Flash_Access.h"
/* ... */
#if defined(_MSC_VER)
#define ALIGNED_(x) __declspec(align(x))
#else
#if defined(__GNUC__)
#define ALIGNED_(x) __attribute__ ((aligned(x)))
#endif/* ... */
#endif
typedef struct ALIGNED_(16) WL_Config_s {
size_t wl_partition_start_addr;
uint32_t wl_partition_size;
uint32_t wl_page_size;
uint32_t flash_sector_size;
uint32_t wl_update_rate;
uint32_t wl_pos_update_record_size;
uint32_t version;
size_t wl_temp_buff_size;
uint32_t crc32;
}{...} wl_config_t;
#ifndef _MSC_VER
static_assert(sizeof(wl_config_t) % 16 == 0, "Size of wl_config_t structure should be compatible with flash encryption");
#endif
/* ... */
#endif