Paparazzi UAS  v5.17_devel-24-g2ae834f
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cc2500_rx_spi.c File Reference
#include "cc2500_compat.h"
#include "cc2500_settings.h"
#include "cc2500_rx_spi.h"
#include "cc2500_frsky_common.h"
#include <stdbool.h>
#include <stdint.h>
+ Include dependency graph for cc2500_rx_spi.c:

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)
 

Variables

uint16_t rxSpiRcData [MAX_SUPPORTED_RC_CHANNEL_COUNT]
 
STATIC_UNIT_TESTED uint8_t rxSpiPayload [RX_SPI_MAX_PAYLOAD_SIZE]
 
STATIC_UNIT_TESTED uint8_t rxSpiNewPacketAvailable
 
static protocolInitFnPtr protocolInit
 
static protocolDataReceivedFnPtr protocolDataReceived
 
static protocolProcessFrameFnPtr protocolProcessFrame
 
static
protocolSetRcDataFromPayloadFnPtr 
protocolSetRcDataFromPayload
 

Macro Definition Documentation

#define UNUSED (   x)    (void)(x)

Definition at line 7 of file cc2500_rx_spi.c.

Referenced by rxSpiFrameStatus(), and rxSpiProcessFrame().

Typedef Documentation

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.

typedef void(* protocolSetRcDataFromPayloadFnPtr)(uint16_t *rcData, const uint8_t *payload)

Definition at line 70 of file cc2500_rx_spi.c.

Function Documentation

static uint8_t rxSpiFrameStatus ( rxRuntimeConfig_t rxRuntimeConfig)
static
bool rxSpiInit ( const rxSpiConfig_t rxSpiConfig,
rxRuntimeConfig_t rxRuntimeConfig 
)
static bool rxSpiProcessFrame ( const rxRuntimeConfig_t rxRuntimeConfig)
static

Definition at line 206 of file cc2500_rx_spi.c.

References protocolProcessFrame, RX_SPI_RECEIVED_DATA, RX_SPI_ROCESSING_REQUIRED, rxSpiNewPacketAvailable, rxSpiPayload, and UNUSED.

Referenced by rxSpiInit().

+ Here is the caller graph for this function:

STATIC_UNIT_TESTED uint16_t rxSpiReadRawRC ( const rxRuntimeConfig_t rxRuntimeConfig,
uint8_t  channel 
)

Definition at line 77 of file cc2500_rx_spi.c.

References channel, rxRuntimeConfig_s::channelCount, protocolSetRcDataFromPayload, RX_SPI_MAX_PAYLOAD_SIZE, rxSpiNewPacketAvailable, rxSpiPayload, rxSpiRcData, and STATIC_ASSERT.

Referenced by rxSpiInit().

+ Here is the caller graph for this function:

Variable Documentation

protocolDataReceivedFnPtr protocolDataReceived
static

Definition at line 73 of file cc2500_rx_spi.c.

Referenced by rxSpiFrameStatus(), and rxSpiSetProtocol().

protocolInitFnPtr protocolInit
static

Definition at line 72 of file cc2500_rx_spi.c.

Referenced by rxSpiInit(), and rxSpiSetProtocol().

protocolProcessFrameFnPtr protocolProcessFrame
static

Definition at line 74 of file cc2500_rx_spi.c.

Referenced by rxSpiProcessFrame(), and rxSpiSetProtocol().

protocolSetRcDataFromPayloadFnPtr protocolSetRcDataFromPayload
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().

Definition at line 63 of file cc2500_rx_spi.c.

Referenced by rxSpiReadRawRC().