10000 document the pycom_config_block_t layout · pycom/pycom-micropython-sigfox@873040c · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 873040c

Browse files
committed
document the pycom_config_block_t layout
1 parent 97620ae commit 873040c

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

esp32/pycom_config.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,20 @@ typedef struct {
110110
} pycom_pybytes_lte_config_t;
111111
// pycom_pybytes_lte_config_t is the last used member of pycom_config_block_t, so no _Static_assert(sizeof()) needed
112112

113-
typedef struct {
114-
pycom_lpwan_config_t lpwan_config;
115-
pycom_wifi_config_t wifi_config;
116-
pycom_wifi_sta_config_t wifi_sta_config;
117-
pycom_rgbled_config_t rgbled_config;
118-
pycom_pybytes_config_t pybytes_config;
119-
pycom_wdt_config_t wdt_config;
120-
pycom_lte_config_t lte_config;
121-
pycom_config_t pycom_config;
122-
pycom_wifi_ap_config_t wifi_ap_config;
123-
pycom_pybytes_lte_config_t pycom_pybytes_lte_config;
124-
uint8_t pycom_reserved[112];
125-
} pycom_config_block_t;
113+
typedef struct { // size
114+
pycom_lpwan_config_t lpwan_config; // 53
115+
pycom_wifi_config_t wifi_config; // 1
116+
pycom_wifi_sta_config_t wifi_sta_config; // 98
117+
pycom_rgbled_config_t rgbled_config; // 10
118+
pycom_pybytes_config_t pybytes_config; // 348
119+
uint8_t pycom_unused[2]; // 2 since wdt_config has 4byte-alignment, there are currently two bytes of padding before it
120+
pycom_wdt_config_t wdt_config; // 8 since wdt_config contains a uint32_t, it has 4byte-alignment
121+
pycom_lte_config_t lte_config; // 1
122+
pycom_config_t pycom_config; // 15
123+
pycom_wifi_ap_config_t wifi_ap_config; // 98
124+
pycom_pybytes_lte_config_t pycom_pybytes_lte_config; // 278
125+
uint8_t pycom_reserved[112]; // 112
126+
} pycom_config_block_t; // 1024
126127
_Static_assert(sizeof(pycom_config_block_t) == 1024, "pycom_config_block_t should have a size of 1024 bytes"); // partition is 4Kb, I think multiples of 1Kb <= 4Kb are ok
127128

128129
typedef enum

0 commit comments

Comments
 (0)
0