Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
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.


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


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)


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)


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.

Typedef Documentation

◆ protocolDataReceivedFnPtr

typedef rx_spi_received_e(* protocolDataReceivedFnPtr) (uint8_t *payload)

Definition at line 68 of file cc2500_rx_spi.c.

◆ protocolInitFnPtr

typedef bool(* protocolInitFnPtr) (const rxSpiConfig_t *rxSpiConfig, rxRuntimeConfig_t *rxRuntimeConfig)

Definition at line 67 of file cc2500_rx_spi.c.

◆ protocolProcessFrameFnPtr

typedef rx_spi_received_e(* protocolProcessFrameFnPtr) (uint8_t *payload)

Definition at line 69 of file cc2500_rx_spi.c.

◆ protocolSetRcDataFromPayloadFnPtr

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

Definition at line 70 of file cc2500_rx_spi.c.

Function Documentation

◆ rxSpiFrameStatus()

static uint8_t rxSpiFrameStatus ( rxRuntimeConfig_t rxRuntimeConfig)

◆ rxSpiInit()

◆ rxSpiProcessFrame()

static bool rxSpiProcessFrame ( const rxRuntimeConfig_t rxRuntimeConfig)

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

+ Here is the caller graph for this function:

◆ rxSpiReadRawRC()

STATIC_UNIT_TESTED uint16_t rxSpiReadRawRC ( const rxRuntimeConfig_t rxRuntimeConfig,
uint8_t  channel 

◆ rxSpiSetProtocol()

Variable Documentation

◆ protocolDataReceived

protocolDataReceivedFnPtr protocolDataReceived

Definition at line 73 of file cc2500_rx_spi.c.

Referenced by rxSpiFrameStatus(), and rxSpiSetProtocol().

◆ protocolInit

protocolInitFnPtr protocolInit

Definition at line 72 of file cc2500_rx_spi.c.

Referenced by rxSpiInit(), and rxSpiSetProtocol().

◆ protocolProcessFrame

protocolProcessFrameFnPtr protocolProcessFrame

Definition at line 74 of file cc2500_rx_spi.c.

Referenced by rxSpiProcessFrame(), and rxSpiSetProtocol().

◆ protocolSetRcDataFromPayload

protocolSetRcDataFromPayloadFnPtr protocolSetRcDataFromPayload

Definition at line 75 of file cc2500_rx_spi.c.

Referenced by rxSpiReadRawRC(), and rxSpiSetProtocol().

◆ rxSpiNewPacketAvailable

STATIC_UNIT_TESTED uint8_t rxSpiNewPacketAvailable

Definition at line 65 of file cc2500_rx_spi.c.

Referenced by rxSpiFrameStatus(), rxSpiInit(), rxSpiProcessFrame(), and rxSpiReadRawRC().

◆ rxSpiPayload

◆ rxSpiRcData

Definition at line 63 of file cc2500_rx_spi.c.

Referenced by rxSpiReadRawRC().