Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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 "modules/core/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

◆ _BUTTON_GPIO

#define _BUTTON_GPIO (   b)    b ## _GPIO

Definition at line 46 of file cc2500_settings.c.

◆ _BUTTON_PIN

#define _BUTTON_PIN (   b)    b ## _PIN

Definition at line 48 of file cc2500_settings.c.

◆ _LED_GPIO

#define _LED_GPIO (   l)    l ## _GPIO

Definition at line 37 of file cc2500_settings.c.

◆ _LED_GPIO_OFF

#define _LED_GPIO_OFF (   l)    l ## _GPIO_OFF

Definition at line 43 of file cc2500_settings.c.

◆ _LED_GPIO_ON

#define _LED_GPIO_ON (   l)    l ## _GPIO_ON

Definition at line 41 of file cc2500_settings.c.

◆ _LED_GPIO_PIN

#define _LED_GPIO_PIN (   l)    l ## _GPIO_PIN

Definition at line 39 of file cc2500_settings.c.

◆ BUTTON_GPIO

#define BUTTON_GPIO (   b)    _BUTTON_GPIO(b)

Definition at line 47 of file cc2500_settings.c.

◆ BUTTON_PIN

#define BUTTON_PIN (   b)    _BUTTON_PIN(b)

Definition at line 49 of file cc2500_settings.c.

◆ CC2500_AUTOBIND

#define CC2500_AUTOBIND   FALSE

Definition at line 57 of file cc2500_settings.c.

◆ CC2500_RX_SPI_PROTOCOL

#define CC2500_RX_SPI_PROTOCOL   RX_SPI_FRSKY_X_LBT

Definition at line 53 of file cc2500_settings.c.

◆ CC2500_TELEMETRY_SENSORS

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

Definition at line 61 of file cc2500_settings.c.

◆ LED_GPIO

#define LED_GPIO (   l)    _LED_GPIO(l)

Definition at line 38 of file cc2500_settings.c.

◆ LED_GPIO_OFF

#define LED_GPIO_OFF (   l)    _LED_GPIO_OFF(l)

Definition at line 44 of file cc2500_settings.c.

◆ LED_GPIO_ON

#define LED_GPIO_ON (   l)    _LED_GPIO_ON(l)

Definition at line 42 of file cc2500_settings.c.

◆ LED_GPIO_PIN

#define LED_GPIO_PIN (   l)    _LED_GPIO_PIN(l)

Definition at line 40 of file cc2500_settings.c.

Function Documentation

◆ bf_writeEEPROM()

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:

◆ cc2500_persistent_read()

◆ cc2500_persistent_write()

◆ cc2500_settings_init()

◆ rxCc2500SpiConfig()

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:

◆ rxCc2500SpiConfigMutable()

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:

◆ rxConfig()

const rxConfig_t* rxConfig ( void  )

Definition at line 77 of file cc2500_settings.c.

Referenced by rxInit().

+ Here is the caller graph for this function:

◆ rxSpiConfig()

const rxSpiConfig_t* rxSpiConfig ( void  )

Definition at line 87 of file cc2500_settings.c.

References spiconfig.

Referenced by cc2500SpiInit(), frSkySpiInit(), rxInit(), rxSpiCommonIOInit(), and rxSpiInit().

+ Here is the caller graph for this function:

◆ telemetryConfig()

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:

◆ telemetryIsSensorEnabled()

bool telemetryIsSensorEnabled ( sensor_e  sensor)

Definition at line 111 of file cc2500_settings.c.

Referenced by initSmartPortSensors().

+ Here is the caller graph for this function:

Variable Documentation

◆ bindIo

struct gpio_t bindIo
static

Definition at line 77 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ cc2500_settings_persistent

struct cc2500_settings_persistent_s cc2500_settings_persistent

Definition at line 111 of file cc2500_settings.c.

Referenced by cc2500_persistent_read(), and cc2500_persistent_write().

◆ cc2500spiconfig

◆ extiIo

struct gpio_t extiIo
static

Definition at line 77 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ ledIo

struct gpio_t ledIo
static

Definition at line 77 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ rxconfig

rxConfig_t rxconfig
static

Definition at line 76 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ spiconfig

rxSpiConfig_t spiconfig
static

Definition at line 86 of file cc2500_settings.c.

Referenced by cc2500_settings_init(), and rxSpiConfig().

◆ telemetryconfig

telemetryConfig_t telemetryconfig
static

Definition at line 103 of file cc2500_settings.c.

Referenced by cc2500_settings_init(), and telemetryConfig().