1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00

opahrs_proto: Add new boot and versions messages

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1583 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
stac 2010-09-11 23:06:26 +00:00 committed by stac
parent d1dc300081
commit 7ecbb5f5b8

View File

@ -93,8 +93,10 @@ struct opahrs_msg_v0_req_fwup_verify {
union opahrs_msg_v0_req { union opahrs_msg_v0_req {
/* Mandatory for all bootloader and all application loads */ /* Mandatory for all bootloader and all application loads */
struct opahrs_msg_v0_req_nop nop; struct opahrs_msg_v0_req_nop nop;
struct opahrs_msg_v0_req_versions versions;
struct opahrs_msg_v0_req_serial serial; struct opahrs_msg_v0_req_serial serial;
struct opahrs_msg_v0_req_reset reset; struct opahrs_msg_v0_req_reset reset;
struct opahrs_msg_v0_req_boot boot;
/* Only implemented by the application */ /* Only implemented by the application */
@ -104,6 +106,12 @@ union opahrs_msg_v0_req {
struct opahrs_msg_v0_req_fwup_verify fwup_verify; struct opahrs_msg_v0_req_fwup_verify fwup_verify;
} __attribute__((__packed__)); } __attribute__((__packed__));
struct opahrs_msg_v0_rsp_versions {
uint8_t hw_version;
uint16_t bl_version;
uint32_t fw_version;
} __attribute__((__packed__));
struct opahrs_msg_v0_rsp_serial { struct opahrs_msg_v0_rsp_serial {
uint8_t serial_bcd[24]; uint8_t serial_bcd[24];
} __attribute__((__packed__)); } __attribute__((__packed__));
@ -112,6 +120,7 @@ struct opahrs_msg_v0_rsp_fwup_status {
} __attribute__((__packed__)); } __attribute__((__packed__));
union opahrs_msg_v0_rsp { union opahrs_msg_v0_rsp {
struct opahrs_msg_v0_rsp_versions versions;
/* Mandatory for all bootloader and all application loads */ /* Mandatory for all bootloader and all application loads */
struct opahrs_msg_v0_rsp_serial serial; struct opahrs_msg_v0_rsp_serial serial;
@ -121,13 +130,16 @@ union opahrs_msg_v0_rsp {
enum opahrs_msg_v0_tag { enum opahrs_msg_v0_tag {
OPAHRS_MSG_V0_REQ_NOP = 0x00, OPAHRS_MSG_V0_REQ_NOP = 0x00,
OPAHRS_MSG_V0_REQ_VERSIONS,
OPAHRS_MSG_V0_REQ_RESET, OPAHRS_MSG_V0_REQ_RESET,
OPAHRS_MSG_V0_REQ_BOOT,
OPAHRS_MSG_V0_REQ_SERIAL, OPAHRS_MSG_V0_REQ_SERIAL,
OPAHRS_MSG_V0_REQ_FWUP_START, OPAHRS_MSG_V0_REQ_FWUP_START,
OPAHRS_MSG_V0_REQ_FWUP_DATA, OPAHRS_MSG_V0_REQ_FWUP_DATA,
OPAHRS_MSG_V0_REQ_FWUP_VERIFY, OPAHRS_MSG_V0_REQ_FWUP_VERIFY,
OPAHRS_MSG_V0_RSP_VERSIONS,
OPAHRS_MSG_V0_RSP_SERIAL, OPAHRS_MSG_V0_RSP_SERIAL,
OPAHRS_MSG_V0_RSP_FWUP_STATUS, OPAHRS_MSG_V0_RSP_FWUP_STATUS,
}; };
@ -157,6 +169,9 @@ struct opahrs_msg_v0 {
struct opahrs_msg_v1_req_nop { struct opahrs_msg_v1_req_nop {
} __attribute__((__packed__)); } __attribute__((__packed__));
struct opahrs_msg_v1_req_versions {
} __attribute__((__packed__));
struct opahrs_msg_v1_req_reset { struct opahrs_msg_v1_req_reset {
uint32_t reset_delay_in_ms; uint32_t reset_delay_in_ms;
} __attribute__((__packed__)); } __attribute__((__packed__));
@ -207,6 +222,7 @@ struct opahrs_msg_v1_req_calibration {
union opahrs_msg_v1_req { union opahrs_msg_v1_req {
struct opahrs_msg_v1_req_nop nop; struct opahrs_msg_v1_req_nop nop;
struct opahrs_msg_v1_req_versions versions;
struct opahrs_msg_v1_req_reset reset; struct opahrs_msg_v1_req_reset reset;
struct opahrs_msg_v1_req_serial serial; struct opahrs_msg_v1_req_serial serial;
struct opahrs_msg_v1_req_update update; struct opahrs_msg_v1_req_update update;
@ -216,6 +232,12 @@ union opahrs_msg_v1_req {
struct opahrs_msg_v1_req_calibration calibration; struct opahrs_msg_v1_req_calibration calibration;
} __attribute__((__packed__)); } __attribute__((__packed__));
struct opahrs_msg_v1_rsp_versions {
uint8_t hw_version;
uint16_t bl_version;
uint32_t fw_version;
} __attribute__((__packed__));
struct opahrs_msg_v1_rsp_serial { struct opahrs_msg_v1_rsp_serial {
uint8_t serial_bcd[25]; uint8_t serial_bcd[25];
} __attribute__((__packed__)); } __attribute__((__packed__));
@ -277,6 +299,7 @@ struct opahrs_msg_v1_rsp_calibration {
} __attribute__((__packed__)); } __attribute__((__packed__));
union opahrs_msg_v1_rsp { union opahrs_msg_v1_rsp {
struct opahrs_msg_v1_rsp_versions versions;
struct opahrs_msg_v1_rsp_serial serial; struct opahrs_msg_v1_rsp_serial serial;
struct opahrs_msg_v1_rsp_north north; struct opahrs_msg_v1_rsp_north north;
struct opahrs_msg_v1_rsp_algorithm algorithm; struct opahrs_msg_v1_rsp_algorithm algorithm;
@ -287,6 +310,7 @@ union opahrs_msg_v1_rsp {
enum opahrs_msg_v1_tag { enum opahrs_msg_v1_tag {
OPAHRS_MSG_V1_REQ_NOP = 0x02000000, OPAHRS_MSG_V1_REQ_NOP = 0x02000000,
OPAHRS_MSG_V1_REQ_VERSIONS,
OPAHRS_MSG_V1_REQ_RESET, OPAHRS_MSG_V1_REQ_RESET,
OPAHRS_MSG_V1_REQ_SERIAL, OPAHRS_MSG_V1_REQ_SERIAL,
OPAHRS_MSG_V1_REQ_NORTH, OPAHRS_MSG_V1_REQ_NORTH,
@ -295,6 +319,7 @@ enum opahrs_msg_v1_tag {
OPAHRS_MSG_V1_REQ_ATTITUDERAW, OPAHRS_MSG_V1_REQ_ATTITUDERAW,
OPAHRS_MSG_V1_REQ_CALIBRATION, OPAHRS_MSG_V1_REQ_CALIBRATION,
OPAHRS_MSG_V1_RSP_VERSIONS,
OPAHRS_MSG_V1_RSP_SERIAL, OPAHRS_MSG_V1_RSP_SERIAL,
OPAHRS_MSG_V1_RSP_NORTH, OPAHRS_MSG_V1_RSP_NORTH,
OPAHRS_MSG_V1_RSP_ALGORITHM, OPAHRS_MSG_V1_RSP_ALGORITHM,