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_settings.c File Reference
#include "cc2500_settings.h"
#include "cc2500_rx_spi.h"
#include <BOARD_CONFIG>
#include "mcu_periph/gpio.h"
#include "generated/airframe.h"
#include "subsystems/settings.h"
#include <string.h>
+ Include dependency graph for cc2500_settings.c:

Go to the source code of this file.

Macros

#define _LED_GPIO(l)   l ## _GPIO
 
#define LED_GPIO(l)   _LED_GPIO(l)
 
#define _LED_GPIO_PIN(l)   l ## _GPIO_PIN
 
#define LED_GPIO_PIN(l)   _LED_GPIO_PIN(l)
 
#define _LED_GPIO_ON(l)   l ## _GPIO_ON
 
#define LED_GPIO_ON(l)   _LED_GPIO_ON(l)
 
#define _LED_GPIO_OFF(l)   l ## _GPIO_OFF
 
#define LED_GPIO_OFF(l)   _LED_GPIO_OFF(l)
 
#define _BUTTON_GPIO(b)   b ## _GPIO
 
#define BUTTON_GPIO(b)   _BUTTON_GPIO(b)
 
#define _BUTTON_PIN(b)   b ## _PIN
 
#define BUTTON_PIN(b)   _BUTTON_PIN(b)
 
#define CC2500_RX_SPI_PROTOCOL   RX_SPI_FRSKY_X_LBT
 
#define CC2500_AUTOBIND   FALSE
 
#define CC2500_TELEMETRY_SENSORS   (SENSOR_VOLTAGE | SENSOR_CURRENT | SENSOR_FUEL | SENSOR_ALTITUDE | SENSOR_VARIO)
 

Functions

static void cc2500_persistent_write (void)
 
void bf_writeEEPROM (void)
 
const rxConfig_trxConfig (void)
 
const rxSpiConfig_trxSpiConfig (void)
 
const rxCc2500SpiConfig_trxCc2500SpiConfig (void)
 
rxCc2500SpiConfig_trxCc2500SpiConfigMutable (void)
 
const telemetryConfig_ttelemetryConfig (void)
 
bool telemetryIsSensorEnabled (sensor_e sensor)
 
static void cc2500_persistent_read (void)
 
void cc2500_settings_init (void)
 

Variables

static rxConfig_t rxconfig
 
static struct gpio_t extiIo
 
static struct gpio_t ledIo
 
static struct gpio_t bindIo
 
static rxSpiConfig_t spiconfig
 
static rxCc2500SpiConfig_t cc2500spiconfig
 
static telemetryConfig_t telemetryconfig
 
struct cc2500_settings_persistent_s cc2500_settings_persistent
 

Macro Definition Documentation

#define _BUTTON_GPIO (   b)    b ## _GPIO

Definition at line 46 of file cc2500_settings.c.

#define _BUTTON_PIN (   b)    b ## _PIN

Definition at line 48 of file cc2500_settings.c.

#define _LED_GPIO (   l)    l ## _GPIO

Definition at line 37 of file cc2500_settings.c.

#define _LED_GPIO_OFF (   l)    l ## _GPIO_OFF

Definition at line 43 of file cc2500_settings.c.

#define _LED_GPIO_ON (   l)    l ## _GPIO_ON

Definition at line 41 of file cc2500_settings.c.

#define _LED_GPIO_PIN (   l)    l ## _GPIO_PIN

Definition at line 39 of file cc2500_settings.c.

#define BUTTON_GPIO (   b)    _BUTTON_GPIO(b)

Definition at line 47 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

#define BUTTON_PIN (   b)    _BUTTON_PIN(b)

Definition at line 49 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

#define CC2500_AUTOBIND   FALSE

Definition at line 57 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

#define CC2500_RX_SPI_PROTOCOL   RX_SPI_FRSKY_X_LBT

Definition at line 53 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

#define CC2500_TELEMETRY_SENSORS   (SENSOR_VOLTAGE | SENSOR_CURRENT | SENSOR_FUEL | SENSOR_ALTITUDE | SENSOR_VARIO)

Definition at line 61 of file cc2500_settings.c.

Referenced by telemetryIsSensorEnabled().

#define LED_GPIO (   l)    _LED_GPIO(l)

Definition at line 38 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

#define LED_GPIO_OFF (   l)    _LED_GPIO_OFF(l)

Definition at line 44 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

#define LED_GPIO_ON (   l)    _LED_GPIO_ON(l)

Definition at line 42 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

#define LED_GPIO_PIN (   l)    _LED_GPIO_PIN(l)

Definition at line 40 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

Function Documentation

void bf_writeEEPROM ( void  )

Definition at line 68 of file cc2500_settings.c.

References cc2500_persistent_write(), and settings_StoreSettings.

+ Here is the call graph for this function:

static void cc2500_persistent_write ( void  )
static
const rxCc2500SpiConfig_t* rxCc2500SpiConfig ( void  )

Definition at line 94 of file cc2500_settings.c.

References cc2500spiconfig.

Referenced by buildTelemetryFrame(), cc2500SpiInit(), frSkySpiDataReceived(), getBind2(), initialiseData(), isValidPacket(), and nextChannel().

+ Here is the caller graph for this function:

rxCc2500SpiConfig_t* rxCc2500SpiConfigMutable ( void  )

Definition at line 97 of file cc2500_settings.c.

References cc2500spiconfig.

Referenced by getBind1(), getBind2(), and tuneRx().

+ Here is the caller graph for this function:

const rxConfig_t* rxConfig ( void  )

Definition at line 77 of file cc2500_settings.c.

References rxconfig.

Referenced by rxInit().

+ Here is the caller graph for this function:

const rxSpiConfig_t* rxSpiConfig ( void  )

Definition at line 87 of file cc2500_settings.c.

References spiconfig.

Referenced by cc2500SpiInit(), and rxInit().

+ Here is the caller graph for this function:

const telemetryConfig_t* telemetryConfig ( void  )

Definition at line 105 of file cc2500_settings.c.

References telemetryconfig.

Referenced by processSmartPortTelemetry().

+ Here is the caller graph for this function:

bool telemetryIsSensorEnabled ( sensor_e  sensor)

Definition at line 111 of file cc2500_settings.c.

References CC2500_TELEMETRY_SENSORS.

Referenced by initSmartPortSensors().

+ Here is the caller graph for this function:

Variable Documentation

struct gpio_t bindIo
static

Definition at line 85 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

struct cc2500_settings_persistent_s cc2500_settings_persistent

Definition at line 117 of file cc2500_settings.c.

Referenced by cc2500_persistent_read(), and cc2500_persistent_write().

rxCc2500SpiConfig_t cc2500spiconfig
static

Definition at line 93 of file cc2500_settings.c.

Referenced by rxCc2500SpiConfig(), and rxCc2500SpiConfigMutable().

struct gpio_t extiIo
static

Definition at line 83 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

struct gpio_t ledIo
static

Definition at line 84 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

rxConfig_t rxconfig
static

Definition at line 76 of file cc2500_settings.c.

Referenced by rxConfig().

rxSpiConfig_t spiconfig
static

Definition at line 86 of file cc2500_settings.c.

Referenced by rxSpiConfig().

telemetryConfig_t telemetryconfig
static

Definition at line 103 of file cc2500_settings.c.

Referenced by telemetryConfig().