Skip to content

Commit 50f61cd

Browse files
committed
Remove deserialize_magic_hdr
This removes deserialize_magic_hdr function which is no longer used. Signed-off-by: John Lange <[email protected]>
1 parent 69b8db2 commit 50f61cd

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

dfu_gecko/dfu_gecko_lib.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -650,33 +650,6 @@ int dfu_mcu_firmware_upgrade(int slot_to_upgrade, char *bin_file, char *sha_file
650650
sys_le##sz##_to_cpu(*((uint##sz##_t *)var)); \
651651
var = ((uint8_t *)var) + sizeof(uint##sz##_t);
652652

653-
/**
654-
* @brief Deserialize the magic header once read from flash
655-
*
656-
* @param dst The dest structure to write into
657-
* @param read_buf The buffer read from flash
658-
*/
659-
static void deserialize_magic_hdr(struct image_header *dst, uint8_t *read_buf)
660-
{
661-
if (!dst || !read_buf) {
662-
return;
663-
}
664-
665-
dst->ih_magic = POP(read_buf, 32);
666-
dst->ih_load_addr = POP(read_buf, 32);
667-
dst->ih_hdr_size = POP(read_buf, 16);
668-
dst->ih_protect_tlv_size = POP(read_buf, 16);
669-
dst->ih_img_size = POP(read_buf, 32);
670-
dst->ih_flags = POP(read_buf, 32);
671-
672-
dst->ih_ver.iv_major = read_buf[0];
673-
read_buf++;
674-
dst->ih_ver.iv_minor = read_buf[0];
675-
read_buf++;
676-
dst->ih_ver.iv_revision = POP(read_buf, 16);
677-
dst->ih_ver.iv_build_num = POP(read_buf, 32);
678-
}
679-
680653
#ifdef BOOT_SLOT
681654
int get_current_slot()
682655
{

0 commit comments

Comments
 (0)