Skip to content

Commit 5130803

Browse files
committed
added defines on sizes for fw and patch slots
1 parent d383819 commit 5130803

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

c/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Code for test the patching function
1010

1111
// define struct for flash memory
1212
typedef struct {
13-
uint8_t old_fw_slot[172*1024];
14-
uint8_t new_fw_slot[172*1024];
15-
uint8_t patch_slot[172*1024];
13+
uint8_t old_fw_slot[FW_SLOT_SIZE*1024];
14+
uint8_t new_fw_slot[FW_SLOT_SIZE*1024];
15+
uint8_t patch_slot[PATCH_SLOT_SIZE*1024];
1616
} memory_t;
1717

1818
// addresses of the slots

c/main.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@
55
#include <stdlib.h>
66
#include "bpatch.h"
77

8+
// Define the size of the firmware slots in Kilobytes
9+
#define FW_SLOT_SIZE 2000
10+
// Define the size of the patch slot in Kilobytes
11+
#define PATCH_SLOT_SIZE 1000
12+
813
#endif

0 commit comments

Comments
 (0)