Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
cc2500_rx_spi_common.c File Reference
#include "cc2500_compat.h"
#include "cc2500_rx_spi_common.h"
#include <stdbool.h>
#include <stdint.h>
+ Include dependency graph for cc2500_rx_spi_common.c:

Go to the source code of this file.

Functions

void rxSpiCommonIOInit (const rxSpiConfig_t *rxSpiConfig)
 
void rxSpiLedOn (void)
 
void rxSpiLedOff (void)
 
void rxSpiLedToggle (void)
 
void rxSpiLedBlink (timeMs_t blinkMs)
 
void rxSpiLedBlinkRxLoss (rx_spi_received_e result)
 
void rxSpiLedBlinkBind (void)
 
void rxSpiBind (void)
 
bool rxSpiCheckBindRequested (bool reset)
 

Variables

static IO_t ledPin
 
static bool ledInversion = false
 
static IO_t bindPin
 
static bool bindRequested
 
static bool lastBindPinStatus
 

Function Documentation

◆ rxSpiBind()

void rxSpiBind ( void  )

Definition at line 123 of file cc2500_rx_spi_common.c.

References bindRequested.

◆ rxSpiCheckBindRequested()

bool rxSpiCheckBindRequested ( bool  reset)

Definition at line 128 of file cc2500_rx_spi_common.c.

References bindPin, bindRequested, IORead, lastBindPinStatus, and reset.

Referenced by frSkySpiDataReceived(), and frSkyXHandlePacket().

+ Here is the caller graph for this function:

◆ rxSpiCommonIOInit()

void rxSpiCommonIOInit ( const rxSpiConfig_t rxSpiConfig)

Definition at line 45 of file cc2500_rx_spi_common.c.

References rxSpiConfig_s::bindIoTag, bindPin, IO_NONE, IOCFG_IPU, IOCFG_OUT_PP, IOConfigGPIO, IOGetByTag, IOInit, IORead, lastBindPinStatus, ledInversion, rxSpiConfig_s::ledInversion, rxSpiConfig_s::ledIoTag, ledPin, OWNER_LED, OWNER_RX_SPI_BIND, rxSpiConfig(), and rxSpiLedOff().

Referenced by frSkySpiInit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rxSpiLedBlink()

void rxSpiLedBlink ( timeMs_t  blinkMs)

Definition at line 88 of file cc2500_rx_spi_common.c.

References millis, and rxSpiLedToggle().

Referenced by rxSpiLedBlinkBind(), and rxSpiLedBlinkRxLoss().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rxSpiLedBlinkBind()

void rxSpiLedBlinkBind ( void  )

Definition at line 118 of file cc2500_rx_spi_common.c.

References INTERVAL_RX_BIND_MS, and rxSpiLedBlink().

+ Here is the call graph for this function:

◆ rxSpiLedBlinkRxLoss()

void rxSpiLedBlinkRxLoss ( rx_spi_received_e  result)

Definition at line 100 of file cc2500_rx_spi_common.c.

References INTERVAL_RX_LOSS_MS, ledPin, RX_LOSS_COUNT, RX_SPI_RECEIVED_DATA, rxSpiLedBlink(), and rxSpiLedOn().

+ Here is the call graph for this function:

◆ rxSpiLedOff()

void rxSpiLedOff ( void  )

Definition at line 74 of file cc2500_rx_spi_common.c.

References IOHi, IOLo, ledInversion, and ledPin.

Referenced by rxSpiCommonIOInit().

+ Here is the caller graph for this function:

◆ rxSpiLedOn()

void rxSpiLedOn ( void  )

Definition at line 67 of file cc2500_rx_spi_common.c.

References IOHi, IOLo, ledInversion, and ledPin.

Referenced by frSkySpiDataReceived(), frSkyXHandlePacket(), and rxSpiLedBlinkRxLoss().

+ Here is the caller graph for this function:

◆ rxSpiLedToggle()

void rxSpiLedToggle ( void  )

Definition at line 81 of file cc2500_rx_spi_common.c.

References IOToggle, and ledPin.

Referenced by frSkySpiDataReceived(), frSkyXHandlePacket(), and rxSpiLedBlink().

+ Here is the caller graph for this function:

Variable Documentation

◆ bindPin

IO_t bindPin
static

Definition at line 41 of file cc2500_rx_spi_common.c.

Referenced by rxSpiCheckBindRequested(), and rxSpiCommonIOInit().

◆ bindRequested

bool bindRequested
static

Definition at line 42 of file cc2500_rx_spi_common.c.

Referenced by rxSpiBind(), and rxSpiCheckBindRequested().

◆ lastBindPinStatus

bool lastBindPinStatus
static

Definition at line 43 of file cc2500_rx_spi_common.c.

Referenced by rxSpiCheckBindRequested(), and rxSpiCommonIOInit().

◆ ledInversion

bool ledInversion = false
static

Definition at line 39 of file cc2500_rx_spi_common.c.

Referenced by rxSpiCommonIOInit(), rxSpiLedOff(), and rxSpiLedOn().

◆ ledPin

IO_t ledPin
static