Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
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)
#define LED_GPIO(l)
#define _LED_GPIO_PIN(l)
#define LED_GPIO_PIN(l)
#define _LED_GPIO_ON(l)
#define LED_GPIO_ON(l)
#define _LED_GPIO_OFF(l)
#define LED_GPIO_OFF(l)
#define _BUTTON_GPIO(b)
#define BUTTON_GPIO(b)
#define _BUTTON_PIN(b)
#define 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_t * rxConfig (void)
const rxSpiConfig_t * rxSpiConfig (void)
const rxCc2500SpiConfig_t * rxCc2500SpiConfig (void)
rxCc2500SpiConfig_t * rxCc2500SpiConfigMutable (void)
const telemetryConfig_t * telemetryConfig (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)
Value:
b ## _GPIO
float b
Definition wedgebug.c:202

Definition at line 46 of file cc2500_settings.c.

◆ _BUTTON_PIN

#define _BUTTON_PIN ( b)
Value:
b ## _PIN

Definition at line 48 of file cc2500_settings.c.

◆ _LED_GPIO

#define _LED_GPIO ( l)
Value:
l ## _GPIO

Definition at line 37 of file cc2500_settings.c.

◆ _LED_GPIO_OFF

#define _LED_GPIO_OFF ( l)
Value:
l ## _GPIO_OFF

Definition at line 43 of file cc2500_settings.c.

◆ _LED_GPIO_ON

#define _LED_GPIO_ON ( l)
Value:
l ## _GPIO_ON

Definition at line 41 of file cc2500_settings.c.

◆ _LED_GPIO_PIN

#define _LED_GPIO_PIN ( l)
Value:
l ## _GPIO_PIN

Definition at line 39 of file cc2500_settings.c.

◆ BUTTON_GPIO

#define BUTTON_GPIO ( b)
Value:
#define _BUTTON_GPIO(b)

Definition at line 47 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ BUTTON_PIN

#define BUTTON_PIN ( b)
Value:
#define _BUTTON_PIN(b)

Definition at line 49 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ CC2500_AUTOBIND

#define CC2500_AUTOBIND   FALSE

Definition at line 57 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ CC2500_RX_SPI_PROTOCOL

#define CC2500_RX_SPI_PROTOCOL   RX_SPI_FRSKY_X_LBT

Definition at line 53 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

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

Referenced by telemetryIsSensorEnabled().

◆ LED_GPIO

#define LED_GPIO ( l)
Value:
#define _LED_GPIO(l)

Definition at line 38 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ LED_GPIO_OFF

#define LED_GPIO_OFF ( l)
Value:
#define _LED_GPIO_OFF(l)

Definition at line 44 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ LED_GPIO_ON

#define LED_GPIO_ON ( l)
Value:
#define _LED_GPIO_ON(l)

Definition at line 42 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ LED_GPIO_PIN

#define LED_GPIO_PIN ( l)
Value:
#define _LED_GPIO_PIN(l)

Definition at line 40 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

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()

void cc2500_persistent_read ( void )
static

Definition at line 138 of file cc2500_settings.c.

References cc2500_settings_persistent, and cc2500spiconfig.

Referenced by cc2500_settings_init().

Here is the caller graph for this function:

◆ cc2500_persistent_write()

void cc2500_persistent_write ( void )
static

Definition at line 119 of file cc2500_settings.c.

References cc2500_settings_persistent, and cc2500spiconfig.

Referenced by bf_writeEEPROM().

Here is the caller graph for this function:

◆ cc2500_settings_init()

void cc2500_settings_init ( void )

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

References rxconfig.

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.

References CC2500_TELEMETRY_SENSORS.

Referenced by initSmartPortSensors().

Here is the caller graph for this function:

Variable Documentation

◆ bindIo

struct gpio_t bindIo
static

Definition at line 85 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ cc2500_settings_persistent

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

◆ cc2500spiconfig

◆ extiIo

struct gpio_t extiIo
static

Definition at line 83 of file cc2500_settings.c.

Referenced by cc2500_settings_init().

◆ ledIo

struct gpio_t ledIo
static

Definition at line 84 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(), and rxConfig().

◆ 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().