PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <nuttx/compiler.h>
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) |
#define APP_DESCRIPTOR_SIGNATURE APP_DESCRIPTOR_SIGNATURE_ID, APP_DESCRIPTOR_SIGNATURE_REV |
Definition at line 57 of file boot_app_shared.h.
#define APP_DESCRIPTOR_SIGNATURE_ID 'A','P','D','e','s','c' |
Definition at line 55 of file boot_app_shared.h.
#define APP_DESCRIPTOR_SIGNATURE_REV '0','0' |
Definition at line 56 of file boot_app_shared.h.
#define boot_app_shared_section __attribute__((section(".app_descriptor"))) |
Definition at line 60 of file boot_app_shared.h.
typedef begin_packed_struct struct app_descriptor_t app_descriptor_t |
typedef begin_packed_struct struct bootloader_app_shared_t bootloader_app_shared_t |
enum eRole |
Enumerator | |
---|---|
Invalid | |
App | |
BootLoader |
Definition at line 68 of file boot_app_shared.h.
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().
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().
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().