Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
cc2500_rx.h File Reference
#include "cc2500_compat.h"
+ Include dependency graph for cc2500_rx.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rxRuntimeConfig_s
 

Macros

#define MAX_SUPPORTED_RC_CHANNEL_COUNT   18
 
#define NON_AUX_CHANNEL_COUNT   4
 
#define MAX_AUX_CHANNEL_COUNT   (MAX_SUPPORTED_RC_CHANNEL_COUNT - NON_AUX_CHANNEL_COUNT)
 

Typedefs

typedef uint16_t(* rcReadRawDataFnPtr) (const struct rxRuntimeConfig_s *rxRuntimeConfig, uint8_t chan)
 
typedef uint8_t(* rcFrameStatusFnPtr) (struct rxRuntimeConfig_s *rxRuntimeConfig)
 
typedef bool(* rcProcessFrameFnPtr) (const struct rxRuntimeConfig_s *rxRuntimeConfig)
 
typedef struct rxRuntimeConfig_s rxRuntimeConfig_t
 

Enumerations

enum  rxFrameState_e {
  RX_FRAME_PENDING = 0 , RX_FRAME_COMPLETE = (1 << 0) , RX_FRAME_FAILSAFE = (1 << 1) , RX_FRAME_PROCESSING_REQUIRED = (1 << 2) ,
  RX_FRAME_DROPPED = (1 << 3)
}
 
enum  SerialRXType {
  SERIALRX_SPEKTRUM1024 = 0 , SERIALRX_SPEKTRUM2048 = 1 , SERIALRX_SBUS = 2 , SERIALRX_SUMD = 3 ,
  SERIALRX_SUMH = 4 , SERIALRX_XBUS_MODE_B = 5 , SERIALRX_XBUS_MODE_B_RJ01 = 6 , SERIALRX_IBUS = 7 ,
  SERIALRX_JETIEXBUS = 8 , SERIALRX_CRSF = 9 , SERIALRX_SRXL = 10 , SERIALRX_TARGET_CUSTOM = 11 ,
  SERIALRX_FPORT = 12 , SERIALRX_SRXL2 = 13
}
 
enum  rxProvider_t {
  RX_PROVIDER_NONE = 0 , RX_PROVIDER_PARALLEL_PWM , RX_PROVIDER_PPM , RX_PROVIDER_SERIAL ,
  RX_PROVIDER_MSP , RX_PROVIDER_SPI
}
 
enum  rssiSource_e {
  RSSI_SOURCE_NONE = 0 , RSSI_SOURCE_ADC , RSSI_SOURCE_RX_CHANNEL , RSSI_SOURCE_RX_PROTOCOL ,
  RSSI_SOURCE_MSP , RSSI_SOURCE_FRAME_ERRORS , RSSI_SOURCE_RX_PROTOCOL_CRSF
}
 

Functions

void rxInit (void)
 !TODO remove this extern, only needed once for channelCount More...
 
void setRssiDirect (uint16_t newRssi, rssiSource_e source)
 
void setRssi (uint16_t rssiValue, rssiSource_e source)
 

Variables

rssiSource_e rssiSource
 
rxRuntimeConfig_t rxRuntimeConfig
 

Data Structure Documentation

◆ rxRuntimeConfig_s

struct rxRuntimeConfig_s

Definition at line 142 of file cc2500_rx.h.

+ Collaboration diagram for rxRuntimeConfig_s:
Data Fields
uint8_t channelCount
uint16_t * channelData
void * frameData
rcFrameStatusFnPtr rcFrameStatusFn
rcProcessFrameFnPtr rcProcessFrameFn
rcReadRawDataFnPtr rcReadRawFn
rxProvider_t rxProvider
uint16_t rxRefreshRate
SerialRXType serialrxProvider

Macro Definition Documentation

◆ MAX_AUX_CHANNEL_COUNT

#define MAX_AUX_CHANNEL_COUNT   (MAX_SUPPORTED_RC_CHANNEL_COUNT - NON_AUX_CHANNEL_COUNT)

Definition at line 81 of file cc2500_rx.h.

◆ MAX_SUPPORTED_RC_CHANNEL_COUNT

#define MAX_SUPPORTED_RC_CHANNEL_COUNT   18

Definition at line 78 of file cc2500_rx.h.

◆ NON_AUX_CHANNEL_COUNT

#define NON_AUX_CHANNEL_COUNT   4

Definition at line 80 of file cc2500_rx.h.

Typedef Documentation

◆ rcFrameStatusFnPtr

typedef uint8_t(* rcFrameStatusFnPtr) (struct rxRuntimeConfig_s *rxRuntimeConfig)

Definition at line 130 of file cc2500_rx.h.

◆ rcProcessFrameFnPtr

typedef bool(* rcProcessFrameFnPtr) (const struct rxRuntimeConfig_s *rxRuntimeConfig)

Definition at line 131 of file cc2500_rx.h.

◆ rcReadRawDataFnPtr

typedef uint16_t(* rcReadRawDataFnPtr) (const struct rxRuntimeConfig_s *rxRuntimeConfig, uint8_t chan)

Definition at line 129 of file cc2500_rx.h.

◆ rxRuntimeConfig_t

Enumeration Type Documentation

◆ rssiSource_e

Enumerator
RSSI_SOURCE_NONE 
RSSI_SOURCE_ADC 
RSSI_SOURCE_RX_CHANNEL 
RSSI_SOURCE_RX_PROTOCOL 
RSSI_SOURCE_MSP 
RSSI_SOURCE_FRAME_ERRORS 
RSSI_SOURCE_RX_PROTOCOL_CRSF 

Definition at line 154 of file cc2500_rx.h.

◆ rxFrameState_e

Enumerator
RX_FRAME_PENDING 
RX_FRAME_COMPLETE 
RX_FRAME_FAILSAFE 
RX_FRAME_PROCESSING_REQUIRED 
RX_FRAME_DROPPED 

Definition at line 51 of file cc2500_rx.h.

◆ rxProvider_t

Enumerator
RX_PROVIDER_NONE 
RX_PROVIDER_PARALLEL_PWM 
RX_PROVIDER_PPM 
RX_PROVIDER_SERIAL 
RX_PROVIDER_MSP 
RX_PROVIDER_SPI 

Definition at line 133 of file cc2500_rx.h.

◆ SerialRXType

Enumerator
SERIALRX_SPEKTRUM1024 
SERIALRX_SPEKTRUM2048 
SERIALRX_SBUS 
SERIALRX_SUMD 
SERIALRX_SUMH 
SERIALRX_XBUS_MODE_B 
SERIALRX_XBUS_MODE_B_RJ01 
SERIALRX_IBUS 
SERIALRX_JETIEXBUS 
SERIALRX_CRSF 
SERIALRX_SRXL 
SERIALRX_TARGET_CUSTOM 
SERIALRX_FPORT 
SERIALRX_SRXL2 

Definition at line 59 of file cc2500_rx.h.

Function Documentation

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

Variable Documentation

◆ rssiSource

rssiSource_e rssiSource
extern

Definition at line 100 of file cc2500_rx.c.

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

◆ rxRuntimeConfig