hdr.h File Reference

RIOT "partition" header and tools. More...

Detailed Description

RIOT "partition" header and tools.

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e
Francisco Acosta franc.nosp@m.isco.nosp@m..acos.nosp@m.ta@i.nosp@m.nria..nosp@m.fr

Definition in file hdr.h.

#include <stdint.h>
+ Include dependency graph for hdr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  riotboot_hdr_t
 Structure to store image header - All members are little endian. More...
 

Macros

#define RIOTBOOT_MAGIC   0x544f4952 /* "RIOT" */
 Magic number for riotboot_hdr. More...
 

Functions

void riotboot_hdr_print (const riotboot_hdr_t *riotboot_hdr)
 Print formatted riotboot_hdr_t to STDIO. More...
 
int riotboot_hdr_validate (const riotboot_hdr_t *riotboot_hdr)
 Validate image header. More...
 
uint32_t riotboot_hdr_checksum (const riotboot_hdr_t *riotboot_hdr)
 Calculate header checksum. More...
 

Macro Definition Documentation

◆ RIOTBOOT_MAGIC

#define RIOTBOOT_MAGIC   0x544f4952 /* "RIOT" */

Magic number for riotboot_hdr.

Definition at line 45 of file hdr.h.

Function Documentation

◆ riotboot_hdr_checksum()

uint32_t riotboot_hdr_checksum ( const riotboot_hdr_t riotboot_hdr)

Calculate header checksum.

Parameters
[in]riotboot_hdrptr to image header
Returns
the checksum of the given riotboot_hdr

◆ riotboot_hdr_print()

void riotboot_hdr_print ( const riotboot_hdr_t riotboot_hdr)

Print formatted riotboot_hdr_t to STDIO.

Parameters
[in]riotboot_hdrptr to image header

◆ riotboot_hdr_validate()

int riotboot_hdr_validate ( const riotboot_hdr_t riotboot_hdr)

Validate image header.

Parameters
[in]riotboot_hdrptr to image header
Returns
0 if OK
-1 if not OK