Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
intermcu_dl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Gautier Hattenberger <gautier.hattenberger@enac.fr>
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  *
20  */
21 
26 #ifndef INTERMCU_DL_H
27 #define INTERMCU_DL_H
28 
29 #include "std.h"
30 #include "pprzlink/pprzlink_device.h"
31 #include "pprzlink/pprzlink_transport.h"
32 
33 /* Structure for forwarding telemetry over InterMCU */
34 struct intermcu_dl_t {
35  struct link_device *dev;
36  struct transport_tx *trans;
37 };
38 
39 extern struct intermcu_dl_t intermcu_dl;
40 
44 extern void intermcu_dl_init(void);
45 
53 extern void intermcu_dl_repack(struct transport_tx *trans, struct link_device *dev, uint8_t *msg, uint8_t size);
54 
60 extern void intermcu_dl_on_msg(uint8_t* msg, uint8_t size);
61 
62 #endif /* INTERMCU_DL_H */
63 
64 
uint8_t msg[10]
Buffer used for general comunication over SPI (out buffer)
struct link_device * dev
Device structure for communication.
Definition: intermcu_dl.h:35
struct transport_tx * trans
Forwarding transport.
Definition: intermcu_dl.h:36
void intermcu_dl_repack(struct transport_tx *trans, struct link_device *dev, uint8_t *msg, uint8_t size)
repack a message and send on device
Definition: intermcu_dl.c:57
void intermcu_dl_on_msg(uint8_t *msg, uint8_t size)
function to forward telemetry on new message
Definition: intermcu_dl.c:79
void intermcu_dl_init(void)
Init function.
Definition: intermcu_dl.c:40
struct intermcu_dl_t intermcu_dl
Definition: intermcu_dl.c:37
static const struct usb_device_descriptor dev
Definition: usb_ser_hw.c:74
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98