2012-02-29 05:30:06 +01:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
* @addtogroup PIOS PIOS Core hardware abstraction layer
|
|
|
|
* @{
|
|
|
|
* @addtogroup PIOS_RFM22B Radio Functions
|
|
|
|
* @brief PIOS interface for RFM22B Radio
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file pios_rfm22b.h
|
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
|
|
|
* @brief RFM22B functions header.
|
|
|
|
* @see The GNU Public License (GPL) Version 3
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PIOS_RFM22B_H
|
|
|
|
#define PIOS_RFM22B_H
|
|
|
|
|
|
|
|
/* Global Types */
|
2012-04-11 05:22:53 +02:00
|
|
|
struct pios_rfm22b_cfg {
|
2012-08-25 04:25:02 +02:00
|
|
|
const struct pios_spi_cfg * spi_cfg; /* Pointer to SPI interface configuration */
|
|
|
|
const struct pios_exti_cfg * exti_cfg; /* Pointer to the EXTI configuration */
|
2012-04-11 05:22:53 +02:00
|
|
|
uint32_t frequencyHz;
|
|
|
|
uint32_t minFrequencyHz;
|
|
|
|
uint32_t maxFrequencyHz;
|
|
|
|
uint8_t RFXtalCap;
|
|
|
|
uint32_t maxRFBandwidth;
|
|
|
|
uint8_t maxTxPower;
|
|
|
|
};
|
|
|
|
|
2012-02-29 05:30:06 +01:00
|
|
|
/* Public Functions */
|
2012-04-11 05:22:53 +02:00
|
|
|
extern int32_t PIOS_RFM22B_Init(uint32_t *rfb22b_id, const struct pios_rfm22b_cfg *cfg);
|
|
|
|
extern uint32_t PIOS_RFM22B_DeviceID(uint32_t rfb22b_id);
|
2012-04-22 03:31:49 +02:00
|
|
|
extern int8_t PIOS_RFM22B_RSSI(uint32_t rfm22b_id);
|
|
|
|
extern int16_t PIOS_RFM22B_Resets(uint32_t rfm22b_id);
|
2012-08-26 09:41:19 +02:00
|
|
|
extern void PIOS_RFM22_processPendingISR(uint32_t wait_ms);
|
2012-02-29 05:30:06 +01:00
|
|
|
|
|
|
|
#endif /* PIOS_RFM22B_H */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
* @}
|
|
|
|
*/
|