Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
radio_control_cc2500_frsky module

Software implementation of Frsky radio control protocol for onboard CC2500 receiver.

No detailed description...

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="radio_control_cc2500_frsky">
b'<define name="CC2500_GDO0_GPIO" value="GPIOC" />\n '
b'<define name="CC2500_GDO0_PIN" value="GPIO14" />\n '
b'<define name="CC2500_RX_LED" value="LED_2|(undefined)" />\n '
b'<define name="CC2500_BIND_BUTTON" value="BIND_BUTTON|(undefined)" />\n '
b'<define name="CC2500_RX_SPI_PROTOCOL" value="RX_SPI_FRSKY_X_LBT (default)|RX_SPI_FRSKY_X|RX_SPI_FRSKY_D" />\n '
b'<define name="CC2500_AUTOBIND" value="FALSE" />\n '
b'<define name="CC2500_TELEMETRY_SENSORS" value="(SENSOR_VOLTAGE | SENSOR_CURRENT | SENSOR_FUEL | SENSOR_ALTITUDE | SENSOR_VARIO)" />\n '
b'<configure name="CC2500_SPI_DEV" value="SPIx" />\n '
b'<configure name="CC2500_SPI_SLAVE_IDX" value="2" />\n '
</module>

Module configuration options

Configure Options

  • name: CC2500_SPI_DEV value: SPIx
    Description: SPI device
  • name: CC2500_SPI_SLAVE_IDX value: 2
    Description: SPI slave index

Define Options

  • name: CC2500_GDO0_GPIO value: GPIOC
    Description: GDO0 GPIO port
  • name: CC2500_GDO0_PIN value: GPIO14
    Description: GDO0 GPIO pin
  • name: CC2500_RX_LED value: LED_2|(undefined)
    Description: FrSky RX LED
  • name: CC2500_BIND_BUTTON value: BIND_BUTTON|(undefined)
    Description: GPIO button used to enter bind mode
  • name: CC2500_RX_SPI_PROTOCOL value: RX_SPI_FRSKY_X_LBT (default)|RX_SPI_FRSKY_X|RX_SPI_FRSKY_D
    Description: RX protocol
  • name: CC2500_AUTOBIND value: FALSE
    Description: Enter BIND mode at startup
  • name: CC2500_TELEMETRY_SENSORS value: (SENSOR_VOLTAGE | SENSOR_CURRENT | SENSOR_FUEL | SENSOR_ALTITUDE | SENSOR_VARIO)
    Description: List of sensors to send over FrSky telemetry (set to SENSOR_NONE) to disable.

Module functions

Init Functions

These initialization functions are called once on startup.

Event Functions

These event functions are called in each cycle of the module event loop.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw radio_control_cc2500_frsky.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="radio_control_cc2500_frsky" dir="radio_control" task="radio_control">
<doc>
<description>
Software implementation of Frsky radio control protocol for onboard CC2500 receiver.
</description>
<configure name="CC2500_SPI_DEV" value="SPIx" description="SPI device"/>
<configure name="CC2500_SPI_SLAVE_IDX" value="2" description="SPI slave index"/>
<define name="CC2500_GDO0_GPIO" value="GPIOC" description="GDO0 GPIO port"/>
<define name="CC2500_GDO0_PIN" value="GPIO14" description="GDO0 GPIO pin"/>
<define name="CC2500_RX_LED" value="LED_2|(undefined)" description="FrSky RX LED"/>
<define name="CC2500_BIND_BUTTON" value="BIND_BUTTON|(undefined)" description="GPIO button used to enter bind mode"/>
<define name="CC2500_RX_SPI_PROTOCOL" value="RX_SPI_FRSKY_X_LBT (default)|RX_SPI_FRSKY_X|RX_SPI_FRSKY_D" description="RX protocol"/>
<define name="CC2500_AUTOBIND" value="FALSE" description="Enter BIND mode at startup"/>
<define name="CC2500_TELEMETRY_SENSORS" value="(SENSOR_VOLTAGE | SENSOR_CURRENT | SENSOR_FUEL | SENSOR_ALTITUDE | SENSOR_VARIO)" description="List of sensors to send over FrSky telemetry (set to SENSOR_NONE) to disable."/>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="cc2500_frsky">
<dl_setting var="cc2500_settings_persistent.bindVars" min="1" step="1" max="1" values="READ_ONLY" shortname="bindVars" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[0]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData0" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[1]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData1" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[2]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData2" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[3]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData3" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[4]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData4" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[5]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData5" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[6]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData6" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[7]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData7" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[8]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData8" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[9]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData9" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[10]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData10" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[11]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData11" persistent="true" type="uint32"/>
<dl_setting var="cc2500_settings_persistent.bindHopData[12]" min="1" step="1" max="1" values="READ_ONLY" shortname="bindHopData12" persistent="true" type="uint32"/>
</dl_settings>
</dl_settings>
</settings>
<dep>
<depends>spi_master,radio_control_common</depends>
<provides>radio_control</provides>
</dep>
<header>
<file name="cc2500.h" dir="peripherals"/>
<file name="cc2500_frsky/cc2500_paparazzi.h"/>
<file name="cc2500_frsky/cc2500_settings.h"/>
</header>
<init fun="radio_control_cc2500_init()"/>
<event fun="radio_control_cc2500_event()"/>
<makefile target="ap|fbw|sim|nps">
<configure name="CC2500_SPI_DEV" default="SPI3" case="upper|lower"/>
<configure name="CC2500_SPI_SLAVE_IDX" default="2"/>
</makefile>
<makefile target="ap|fbw">
<define name="USE_$(CC2500_SPI_DEV)"/>
<define name="USE_SPI_SLAVE$(CC2500_SPI_SLAVE_IDX)"/>
<define name="CC2500_SPI_DEV" value="$(CC2500_SPI_DEV_LOWER)"/>
<define name="CC2500_SPI_SLAVE_IDX" value="$(CC2500_SPI_SLAVE_IDX)"/>
<file name="cc2500.c" dir="peripherals"/>
<file name="cc2500_frsky/cc2500_paparazzi.c"/>
<file name="cc2500_frsky/cc2500_settings.c"/>
<file name="cc2500_frsky/cc2500_compat.c"/>
<file name="cc2500_frsky/cc2500_common.c"/>
<file name="cc2500_frsky/cc2500_rx.c"/>
<file name="cc2500_frsky/cc2500_rx_spi.c"/>
<file name="cc2500_frsky/cc2500_rx_spi_common.c"/>
<file name="cc2500_frsky/cc2500_frsky_shared.c"/>
<file name="cc2500_frsky/cc2500_frsky_x.c"/>
<file name="cc2500_frsky/cc2500_smartport.c"/>
<test>
<define name="RADIO_CONTROL"/>
<define name="CC2500_SPI_DEV" value="spi1"/>
<define name="CC2500_SPI_SLAVE_IDX" value="2"/>
<define name="USE_SPI1"/>
<define name="USE_SPI_SLAVE2"/>
<define name="SPI_MASTER"/>
<define name="CC2500_GDO0_GPIO" value="GPIOA"/>
<define name="CC2500_GDO0_PIN" value="GPIO0"/>
</test>
</makefile>
</module>