Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "cc2500_compat.h"
#include "cc2500_settings.h"
#include "cc2500_rx_spi.h"
#include "cc2500_frsky_common.h"
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | UNUSED(x) (void)(x) |
Typedefs | |
typedef bool(* | protocolInitFnPtr) (const rxSpiConfig_t *rxSpiConfig, rxRuntimeConfig_t *rxRuntimeConfig) |
typedef rx_spi_received_e(* | protocolDataReceivedFnPtr) (uint8_t *payload) |
typedef rx_spi_received_e(* | protocolProcessFrameFnPtr) (uint8_t *payload) |
typedef void(* | protocolSetRcDataFromPayloadFnPtr) (uint16_t *rcData, const uint8_t *payload) |
Functions | |
STATIC_UNIT_TESTED uint16_t | rxSpiReadRawRC (const rxRuntimeConfig_t *rxRuntimeConfig, uint8_t channel) |
STATIC_UNIT_TESTED bool | rxSpiSetProtocol (rx_spi_protocol_e protocol) |
static uint8_t | rxSpiFrameStatus (rxRuntimeConfig_t *rxRuntimeConfig) |
static bool | rxSpiProcessFrame (const rxRuntimeConfig_t *rxRuntimeConfig) |
bool | rxSpiInit (const rxSpiConfig_t *rxSpiConfig, rxRuntimeConfig_t *rxRuntimeConfig) |
#define UNUSED | ( | x | ) | (void)(x) |
Definition at line 7 of file cc2500_rx_spi.c.
typedef rx_spi_received_e(* protocolDataReceivedFnPtr) (uint8_t *payload) |
Definition at line 68 of file cc2500_rx_spi.c.
typedef bool(* protocolInitFnPtr) (const rxSpiConfig_t *rxSpiConfig, rxRuntimeConfig_t *rxRuntimeConfig) |
Definition at line 67 of file cc2500_rx_spi.c.
typedef rx_spi_received_e(* protocolProcessFrameFnPtr) (uint8_t *payload) |
Definition at line 69 of file cc2500_rx_spi.c.
Definition at line 70 of file cc2500_rx_spi.c.
|
static |
Definition at line 186 of file cc2500_rx_spi.c.
References protocolDataReceived, RX_FRAME_COMPLETE, RX_FRAME_PENDING, RX_FRAME_PROCESSING_REQUIRED, RX_SPI_RECEIVED_DATA, RX_SPI_ROCESSING_REQUIRED, rxRuntimeConfig, rxSpiNewPacketAvailable, rxSpiPayload, status, and UNUSED.
Referenced by rxSpiInit().
bool rxSpiInit | ( | const rxSpiConfig_t * | rxSpiConfig, |
rxRuntimeConfig_t * | rxRuntimeConfig | ||
) |
Definition at line 228 of file cc2500_rx_spi.c.
References protocolInit, rxRuntimeConfig_s::rcFrameStatusFn, rxRuntimeConfig_s::rcProcessFrameFn, rxRuntimeConfig_s::rcReadRawFn, rxSpiConfig_s::rx_spi_protocol, rxRuntimeConfig_s::rxRefreshRate, rxRuntimeConfig, rxSpiConfig(), rxSpiDeviceInit, rxSpiFrameStatus(), rxSpiNewPacketAvailable, rxSpiProcessFrame(), rxSpiReadRawRC(), and rxSpiSetProtocol().
Referenced by rxInit().
|
static |
Definition at line 206 of file cc2500_rx_spi.c.
References protocolProcessFrame, RX_SPI_RECEIVED_DATA, RX_SPI_ROCESSING_REQUIRED, rxRuntimeConfig, rxSpiNewPacketAvailable, rxSpiPayload, and UNUSED.
Referenced by rxSpiInit().
STATIC_UNIT_TESTED uint16_t rxSpiReadRawRC | ( | const rxRuntimeConfig_t * | rxRuntimeConfig, |
uint8_t | channel | ||
) |
Definition at line 77 of file cc2500_rx_spi.c.
References rxRuntimeConfig_s::channelCount, protocolSetRcDataFromPayload, RX_SPI_MAX_PAYLOAD_SIZE, rxRuntimeConfig, rxSpiNewPacketAvailable, rxSpiPayload, rxSpiRcData, and STATIC_ASSERT.
Referenced by rxSpiInit().
STATIC_UNIT_TESTED bool rxSpiSetProtocol | ( | rx_spi_protocol_e | protocol | ) |
Definition at line 91 of file cc2500_rx_spi.c.
References frSkySpiDataReceived(), frSkySpiInit(), frSkySpiProcessFrame(), frSkySpiSetRcData(), protocolDataReceived, protocolInit, protocolProcessFrame, protocolSetRcDataFromPayload, RX_SPI_A7105_FLYSKY, RX_SPI_A7105_FLYSKY_2A, RX_SPI_CYRF6936_DSM, RX_SPI_FRSKY_D, RX_SPI_FRSKY_X, RX_SPI_FRSKY_X_LBT, RX_SPI_NRF24_CX10, RX_SPI_NRF24_CX10A, RX_SPI_NRF24_H8_3D, RX_SPI_NRF24_INAV, RX_SPI_NRF24_KN, RX_SPI_NRF24_SYMA_X, RX_SPI_NRF24_SYMA_X5C, RX_SPI_NRF24_V202_1M, RX_SPI_NRF24_V202_250K, and RX_SPI_SFHSS.
Referenced by rxSpiInit().
|
static |
Definition at line 73 of file cc2500_rx_spi.c.
Referenced by rxSpiFrameStatus(), and rxSpiSetProtocol().
|
static |
Definition at line 72 of file cc2500_rx_spi.c.
Referenced by rxSpiInit(), and rxSpiSetProtocol().
|
static |
Definition at line 74 of file cc2500_rx_spi.c.
Referenced by rxSpiProcessFrame(), and rxSpiSetProtocol().
|
static |
Definition at line 75 of file cc2500_rx_spi.c.
Referenced by rxSpiReadRawRC(), and rxSpiSetProtocol().
STATIC_UNIT_TESTED uint8_t rxSpiNewPacketAvailable |
Definition at line 65 of file cc2500_rx_spi.c.
Referenced by rxSpiFrameStatus(), rxSpiInit(), rxSpiProcessFrame(), and rxSpiReadRawRC().
STATIC_UNIT_TESTED uint8_t rxSpiPayload[RX_SPI_MAX_PAYLOAD_SIZE] |
Definition at line 64 of file cc2500_rx_spi.c.
Referenced by rxSpiFrameStatus(), rxSpiProcessFrame(), and rxSpiReadRawRC().
uint16_t rxSpiRcData[MAX_SUPPORTED_RC_CHANNEL_COUNT] |
Definition at line 63 of file cc2500_rx_spi.c.
Referenced by rxSpiReadRawRC().