Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
cc2500_rx.c File Reference
#include "cc2500_compat.h"
#include "cc2500_rx.h"
#include "cc2500_rx_spi.h"
#include "cc2500_settings.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
+ Include dependency graph for cc2500_rx.c:

Go to the source code of this file.

Macros

#define UNUSED(x)   (void)(x)
 
#define MAX_INVALID_PULS_TIME   300
 
#define DELAY_10_HZ   (1000000 / 10)
 
#define RSSI_SAMPLE_COUNT   16
 

Functions

static uint16_t nullReadRawRC (const rxRuntimeConfig_t *rxRuntimeConfig, uint8_t channel)
 
static uint8_t nullFrameStatus (rxRuntimeConfig_t *rxRuntimeConfig)
 
static bool nullProcessFrame (const rxRuntimeConfig_t *rxRuntimeConfig)
 
void rxInit (void)
 !TODO remove this extern, only needed once for channelCount More...
 
void setRssiDirect (uint16_t newRssi, rssiSource_e source)
 
static uint16_t updateRssiSamples (uint16_t value)
 
void setRssi (uint16_t rssiValue, rssiSource_e source)
 

Variables

static uint16_t rssi = 0
 
static pt1Filter_t frameErrFilter
 
rssiSource_e rssiSource
 
static uint8_t rxChannelCount
 
static uint32_t needRxSignalMaxDelayUs
 
int16_t rcData [MAX_SUPPORTED_RC_CHANNEL_COUNT]
 
uint32_t rcInvalidPulsPeriod [MAX_SUPPORTED_RC_CHANNEL_COUNT]
 
rxRuntimeConfig_t rxRuntimeConfig
 
static uint8_t rcSampleIndex = 0
 

Macro Definition Documentation

◆ DELAY_10_HZ

#define DELAY_10_HZ   (1000000 / 10)

Definition at line 126 of file cc2500_rx.c.

◆ MAX_INVALID_PULS_TIME

#define MAX_INVALID_PULS_TIME   300

Definition at line 121 of file cc2500_rx.c.

◆ RSSI_SAMPLE_COUNT

#define RSSI_SAMPLE_COUNT   16

Definition at line 709 of file cc2500_rx.c.

◆ UNUSED

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

Definition at line 7 of file cc2500_rx.c.

Function Documentation

◆ nullFrameStatus()

static uint8_t nullFrameStatus ( rxRuntimeConfig_t rxRuntimeConfig)
static

Definition at line 172 of file cc2500_rx.c.

References RX_FRAME_PENDING, rxRuntimeConfig, and UNUSED.

Referenced by rxInit().

+ Here is the caller graph for this function:

◆ nullProcessFrame()

static bool nullProcessFrame ( const rxRuntimeConfig_t rxRuntimeConfig)
static

Definition at line 179 of file cc2500_rx.c.

References rxRuntimeConfig, and UNUSED.

Referenced by rxInit().

+ Here is the caller graph for this function:

◆ nullReadRawRC()

static uint16_t nullReadRawRC ( const rxRuntimeConfig_t rxRuntimeConfig,
uint8_t  channel 
)
static

Definition at line 164 of file cc2500_rx.c.

References PPM_RCVR_TIMEOUT, rxRuntimeConfig, and UNUSED.

Referenced by rxInit().

+ Here is the caller graph for this function:

◆ rxInit()

◆ setRssi()

void setRssi ( uint16_t  rssiValue,
rssiSource_e  source 
)

Definition at line 723 of file cc2500_rx.c.

References frameErrFilter, pt1FilterApply(), rssi, RSSI_SOURCE_FRAME_ERRORS, rssiSource, and updateRssiSamples().

Referenced by cc2500setRssiDbm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setRssiDirect()

void setRssiDirect ( uint16_t  newRssi,
rssiSource_e  source 
)

Definition at line 700 of file cc2500_rx.c.

References rssi, and rssiSource.

Referenced by frSkyXHandlePacket().

+ Here is the caller graph for this function:

◆ updateRssiSamples()

static uint16_t updateRssiSamples ( uint16_t  value)
static

Definition at line 711 of file cc2500_rx.c.

References RSSI_SAMPLE_COUNT.

Referenced by setRssi().

+ Here is the caller graph for this function:

Variable Documentation

◆ frameErrFilter

pt1Filter_t frameErrFilter
static

Definition at line 89 of file cc2500_rx.c.

Referenced by rxInit(), and setRssi().

◆ needRxSignalMaxDelayUs

uint32_t needRxSignalMaxDelayUs
static

Definition at line 113 of file cc2500_rx.c.

Referenced by rxInit().

◆ rcData

◆ rcInvalidPulsPeriod

Definition at line 119 of file cc2500_rx.c.

Referenced by rxInit().

◆ rcSampleIndex

uint8_t rcSampleIndex = 0
static

Definition at line 132 of file cc2500_rx.c.

Referenced by rxInit().

◆ rssi

uint16_t rssi = 0
static

◆ rssiSource

rssiSource_e rssiSource

Definition at line 100 of file cc2500_rx.c.

Referenced by cc2500SpiInit(), frSkySpiInit(), rxInit(), setRssi(), and setRssiDirect().

◆ rxChannelCount

uint8_t rxChannelCount
static

Definition at line 109 of file cc2500_rx.c.

Referenced by rxInit().

◆ rxRuntimeConfig