update credits
[librepilot.git] / flight / pios / inc / pios_openlrs.h
blobac9e57e6fdf4742781a70f8e84ed677ceec3a231
1 /**
2 ******************************************************************************
3 * @addtogroup PIOS PIOS Core hardware abstraction layer
4 * @{
5 * @addtogroup PIOS_RFM22B Radio Functions
6 * @brief PIOS OpenLRS interface for for the RFM22B radio
7 * @{
9 * @file pios_openlrs.h
10 * @author Tau Labs, http://taulabs.org, Copyright (C) 2015
11 * @author dRonin, http://dronin.org Copyright (C) 2015
12 * @brief Implements an OpenLRS driver for the RFM22B
13 * @see The GNU Public License (GPL) Version 3
15 *****************************************************************************/
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 3 of the License, or
20 * (at your option) any later version.
22 * This program is distributed in the hope that it will be useful, but
23 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
24 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25 * for more details.
27 * You should have received a copy of the GNU General Public License along
28 * with this program; if not, write to the Free Software Foundation, Inc.,
29 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 #ifndef PIOS_OPENLRS_H
33 #define PIOS_OPENLRS_H
35 /* Global Types */
36 struct pios_openlrs_cfg {
37 const struct pios_spi_cfg *spi_cfg; /* Pointer to SPI interface configuration */
38 const struct pios_exti_cfg *exti_cfg; /* Pointer to the EXTI configuration */
39 enum gpio_direction gpio_direction; /* Definition comes from pios_rfm22b.h */
42 typedef void (*PIOS_OpenLRS_PPMReceivedCallback)(uint32_t context, const int16_t *channels);
44 extern int32_t PIOS_OpenLRS_Init(uint32_t *openlrs_id, uint32_t spi_id,
45 uint32_t slave_num, const struct pios_openlrs_cfg *cfg);
47 extern void PIOS_OpenLRS_RegisterPPMCallback(uint32_t openlrs_id, PIOS_OpenLRS_PPMReceivedCallback callback, uint32_t context);
48 extern uint8_t PIOS_OpenLRS_RSSI_Get(void);
49 #endif /* PIOS_OPENLRS_H */
50 /**
51 * @}
52 * @}