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

#define DELAY_10_HZ   (1000000 / 10)

Definition at line 126 of file cc2500_rx.c.

Referenced by rxInit().

#define MAX_INVALID_PULS_TIME   300

Definition at line 121 of file cc2500_rx.c.

Referenced by rxInit().

#define RSSI_SAMPLE_COUNT   16

Definition at line 709 of file cc2500_rx.c.

Referenced by updateRssiSamples().

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

Definition at line 7 of file cc2500_rx.c.

Referenced by nullFrameStatus(), nullProcessFrame(), and nullReadRawRC().

Function Documentation

static uint8_t nullFrameStatus ( rxRuntimeConfig_t rxRuntimeConfig)
static

Definition at line 172 of file cc2500_rx.c.

References RX_FRAME_PENDING, and UNUSED.

Referenced by rxInit().

+ Here is the caller graph for this function:

static bool nullProcessFrame ( const rxRuntimeConfig_t rxRuntimeConfig)
static

Definition at line 179 of file cc2500_rx.c.

References UNUSED.

Referenced by rxInit().

+ Here is the caller graph for this function:

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, and UNUSED.

Referenced by rxInit().

+ Here is the caller graph for this function:

void setRssi ( uint16_t  rssiValue,
rssiSource_e  source 
)

Definition at line 723 of file cc2500_rx.c.

References 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:

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:

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

pt1Filter_t frameErrFilter
static

Definition at line 89 of file cc2500_rx.c.

uint32_t needRxSignalMaxDelayUs
static

Definition at line 113 of file cc2500_rx.c.

Referenced by rxInit().

Definition at line 118 of file cc2500_rx.c.

Referenced by rxInit().

Definition at line 119 of file cc2500_rx.c.

Referenced by rxInit().

uint8_t rcSampleIndex = 0
static

Definition at line 132 of file cc2500_rx.c.

Referenced by rxInit().

uint16_t rssi = 0
static
rssiSource_e rssiSource

Definition at line 100 of file cc2500_rx.c.

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

uint8_t rxChannelCount
static

Definition at line 109 of file cc2500_rx.c.

Referenced by rxInit().

rxRuntimeConfig_t rxRuntimeConfig

Definition at line 131 of file cc2500_rx.c.

Referenced by radio_control_impl_event().