dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_can.h
Go to the documentation of this file.
1 
15 /*
16  * This program is free software; you can redistribute it and/or modify
17  * it under the terms of the GNU General Public License as published by
18  * the Free Software Foundation; either version 3 of the License, or
19  * (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful, but
22  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24  * for more details.
25  *
26  * You should have received a copy of the GNU General Public License along
27  * with this program; if not, see <http://www.gnu.org/licenses/>
28  */
29 
30 #if !defined(PIOS_CAN_H)
31 #define PIOS_CAN_H
32 
33 #include "pios_queue.h"
34 
39 };
40 
43  int8_t fc_roll;
44  int8_t fc_pitch;
45  uint8_t fc_yaw;
46  int8_t setpoint_roll;
48  uint8_t setpoint_yaw;
49 } __attribute__((packed));;
50 
52 int32_t PIOS_CAN_TxData(uintptr_t id, enum pios_can_messages, uint8_t *data);
53 
55 struct pios_queue * PIOS_CAN_RegisterMessageQueue(uintptr_t id, enum pios_can_messages msg_id);
56 
57 #endif /* PIOS_CAN_H */
58 
enum pios_can_messages __attribute__
pios_can_messages
The set of CAN messages.
Definition: pios_can.h:36
uint8_t data[XFER_BYTES_PER_PACKET]
Definition: bl_messages.h:129
int32_t PIOS_CAN_TxData(uintptr_t id, enum pios_can_messages, uint8_t *data)
Transmit a data message with a particular message ID.
struct pios_queue * PIOS_CAN_RegisterMessageQueue(uintptr_t id, enum pios_can_messages msg_id)
Get a queue to receive messages of a particular message ID.
Message to tell gimbal the desired setpoint and FC state.
Definition: pios_can.h:42