PX4 Firmware
PX4 Autopilot Software http://px4.io
boot_app_shared.h File Reference
#include <nuttx/compiler.h>
Include dependency graph for boot_app_shared.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  bootloader_app_shared_t
 
struct  app_descriptor_t
 

Macros

#define APP_DESCRIPTOR_SIGNATURE_ID   'A','P','D','e','s','c'
 
#define APP_DESCRIPTOR_SIGNATURE_REV   '0','0'
 
#define APP_DESCRIPTOR_SIGNATURE   APP_DESCRIPTOR_SIGNATURE_ID, APP_DESCRIPTOR_SIGNATURE_REV
 
#define boot_app_shared_section   __attribute__((section(".app_descriptor")))
 

Typedefs

typedef enum eRole eRole_t
 
typedef begin_packed_struct struct bootloader_app_shared_t bootloader_app_shared_t
 
typedef begin_packed_struct struct app_descriptor_t app_descriptor_t
 

Enumerations

enum  eRole { Invalid, App, BootLoader }
 

Functions

int bootloader_app_shared_read (bootloader_app_shared_t *shared, eRole_t role)
 
void bootloader_app_shared_write (bootloader_app_shared_t *shared, eRole_t role)
 
void bootloader_app_shared_invalidate (void)
 

Macro Definition Documentation

◆ APP_DESCRIPTOR_SIGNATURE

#define APP_DESCRIPTOR_SIGNATURE   APP_DESCRIPTOR_SIGNATURE_ID, APP_DESCRIPTOR_SIGNATURE_REV

Definition at line 57 of file boot_app_shared.h.

◆ APP_DESCRIPTOR_SIGNATURE_ID

#define APP_DESCRIPTOR_SIGNATURE_ID   'A','P','D','e','s','c'

Definition at line 55 of file boot_app_shared.h.

◆ APP_DESCRIPTOR_SIGNATURE_REV

#define APP_DESCRIPTOR_SIGNATURE_REV   '0','0'

Definition at line 56 of file boot_app_shared.h.

◆ boot_app_shared_section

#define boot_app_shared_section   __attribute__((section(".app_descriptor")))

Definition at line 60 of file boot_app_shared.h.

Typedef Documentation

◆ app_descriptor_t

typedef begin_packed_struct struct app_descriptor_t app_descriptor_t

◆ bootloader_app_shared_t

typedef begin_packed_struct struct bootloader_app_shared_t bootloader_app_shared_t

◆ eRole_t

typedef enum eRole eRole_t

Enumeration Type Documentation

◆ eRole

enum eRole
Enumerator
Invalid 
App 
BootLoader 

Definition at line 68 of file boot_app_shared.h.

Function Documentation

◆ bootloader_app_shared_invalidate()

void bootloader_app_shared_invalidate ( void  )

Definition at line 260 of file boot_app_shared.c.

References bootloader_app_shared_init(), Invalid, and write().

Referenced by uavcannode_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bootloader_app_shared_read()

int bootloader_app_shared_read ( bootloader_app_shared_t shared,
eRole_t  role 
)

Definition at line 186 of file boot_app_shared.c.

References App, BOOTLOADER_COMMON_APP_SIGNATURE, BOOTLOADER_COMMON_BOOTLOADER_SIGNATURE, calulate_signature(), bootloader_app_shared_t::crc, OK, read(), bootloader_app_shared_t::signature, and bootloader_app_shared_t::ull.

Referenced by uavcannode_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bootloader_app_shared_write()

void bootloader_app_shared_write ( bootloader_app_shared_t shared,
eRole_t  role 
)

Definition at line 228 of file boot_app_shared.c.

References App, BOOTLOADER_COMMON_APP_SIGNATURE, BOOTLOADER_COMMON_BOOTLOADER_SIGNATURE, calulate_signature(), bootloader_app_shared_t::crc, bootloader_app_shared_t::signature, bootloader_app_shared_t::ull, and write().

Referenced by UavcanEsc::cb_beginfirmware_update(), and UavcanNode::cb_beginfirmware_update().

Here is the call graph for this function:
Here is the caller graph for this function: