-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootload.h
106 lines (90 loc) · 3.53 KB
/
bootload.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*
* Copyright (C) 2015-2018 Swift Navigation Inc.
* Contact: Swift Navigation <dev@swiftnav.com>
*
* This source is subject to the license found in the file 'LICENSE' which must
* be be distributed together with this source. All other rights reserved.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
*/
/*****************************************************************************
* Automatically generated from yaml/swiftnav/sbp/bootload.yaml
* with generate.py. Please do not hand edit!
*****************************************************************************/
/** \defgroup bootload Bootload
*
* * Messages for the bootloading configuration of a Piksi 2.3.1. This message
* group does not apply to Piksi Multi.
*
* Note that some of these messages share the same message type ID for both the
* host request and the device response.
* \{ */
#ifndef LIBSBP_BOOTLOAD_MESSAGES_H
#define LIBSBP_BOOTLOAD_MESSAGES_H
#include "common.h"
/** Bootloading handshake request (host => device)
*
* The handshake message request from the host establishes a
* handshake between the device bootloader and the host. The
* response from the device is MSG_BOOTLOADER_HANDSHAKE_RESP.
*/
#define SBP_MSG_BOOTLOADER_HANDSHAKE_REQ 0x00B3
/** Bootloading handshake response (host <= device)
*
* The handshake message response from the device establishes a
* handshake between the device bootloader and the host. The
* request from the host is MSG_BOOTLOADER_HANDSHAKE_REQ. The
* payload contains the bootloader version number and the SBP
* protocol version number.
*/
#define SBP_MSG_BOOTLOADER_HANDSHAKE_RESP 0x00B4
typedef struct {
u32 flags; /**< Bootloader flags */
char version[0]; /**< Bootloader version number */
} msg_bootloader_handshake_resp_t;
/** Bootloader jump to application (host => device)
*
* The host initiates the bootloader to jump to the application.
*/
#define SBP_MSG_BOOTLOADER_JUMP_TO_APP 0x00B1
typedef struct {
u8 jump; /**< Ignored by the device */
} msg_bootloader_jump_to_app_t;
/** Read FPGA device ID over UART request (host => device)
*
* The device message from the host reads a unique device
* identifier from the SwiftNAP, an FPGA. The host requests the ID
* by sending a MSG_NAP_DEVICE_DNA_REQ message. The device
* responds with a MSG_NAP_DEVICE_DNA_RESP message with the
* device ID in the payload. Note that this ID is tied to the FPGA,
* and not related to the Piksi's serial number.
*/
#define SBP_MSG_NAP_DEVICE_DNA_REQ 0x00DE
/** Read FPGA device ID over UART response (host <= device)
*
* The device message from the host reads a unique device
* identifier from the SwiftNAP, an FPGA. The host requests the ID
* by sending a MSG_NAP_DEVICE_DNA_REQ message. The device
* responds with a MSG_NAP_DEVICE_DNA_RESP messagage with the
* device ID in the payload. Note that this ID is tied to the FPGA,
* and not related to the Piksi's serial number.
*/
#define SBP_MSG_NAP_DEVICE_DNA_RESP 0x00DD
typedef struct {
u8 dna
[8]; /**< 57-bit SwiftNAP FPGA Device ID. Remaining bits are padded
on the right.
*/
} msg_nap_device_dna_resp_t;
/** Deprecated
*
* Deprecated.
*/
#define SBP_MSG_BOOTLOADER_HANDSHAKE_DEP_A 0x00B0
typedef struct {
u8 handshake[0]; /**< Version number string (not NULL terminated) */
} msg_bootloader_handshake_dep_a_t;
/** \} */
#endif /* LIBSBP_BOOTLOAD_MESSAGES_H */