Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
hdr.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018 Kaspar Schleiser <kaspar@schleiser.de>
3
* 2018 Inria
4
* 2018 Freie Universität Berlin
5
*
6
* This file is subject to the terms and conditions of the GNU Lesser
7
* General Public License v2.1. See the file LICENSE in the top level
8
* directory for more details.
9
*/
10
32
#ifndef RIOTBOOT_HDR_H
33
#define RIOTBOOT_HDR_H
34
35
#ifdef __cplusplus
36
extern
"C"
{
37
#endif
38
39
#include <stdint.h>
40
45
#define RIOTBOOT_MAGIC 0x544f4952
/* "RIOT" */
46
51
typedef
struct
{
52
uint32_t
magic_number
;
53
uint32_t
version
;
54
uint32_t
start_addr
;
55
uint32_t
chksum
;
56
}
riotboot_hdr_t
;
65
void
riotboot_hdr_print
(
const
riotboot_hdr_t
*riotboot_hdr);
66
75
int
riotboot_hdr_validate
(
const
riotboot_hdr_t
*riotboot_hdr);
76
84
uint32_t
riotboot_hdr_checksum
(
const
riotboot_hdr_t
*riotboot_hdr);
85
86
#ifdef __cplusplus
87
}
88
#endif
89
90
#endif
/* RIOTBOOT_HDR_H */
riotboot_hdr_t::version
uint32_t version
Integer representing the partition version
Definition:
hdr.h:53
riotboot_hdr_t::magic_number
uint32_t magic_number
Header magic number (always "RIOT")
Definition:
hdr.h:52
riotboot_hdr_t::chksum
uint32_t chksum
Checksum of riotboot_hdr
Definition:
hdr.h:55
riotboot_hdr_validate
int riotboot_hdr_validate(const riotboot_hdr_t *riotboot_hdr)
Validate image header.
riotboot_hdr_print
void riotboot_hdr_print(const riotboot_hdr_t *riotboot_hdr)
Print formatted riotboot_hdr_t to STDIO.
riotboot_hdr_t
Structure to store image header - All members are little endian.
Definition:
hdr.h:51
riotboot_hdr_checksum
uint32_t riotboot_hdr_checksum(const riotboot_hdr_t *riotboot_hdr)
Calculate header checksum.
riotboot_hdr_t::start_addr
uint32_t start_addr
Address after the allocated space for the header.
Definition:
hdr.h:54
Generated on Tue Nov 24 2020 19:46:52 by
1.8.17