29 #include "generated/modules.h"
67 #ifdef delayMicroseconds
68 #undef delayMicroseconds
70 #define delayMicroseconds(us) cc2500_delayMicroseconds(us)
87 for (
uint8_t i = 0; i < length; ++i) {
107 for (
uint8_t i = 0; i < length; ++i) {
void cc2500WriteReg(uint8_t address, uint8_t data)
static uint8_t rxSpiReadCommand(uint8_t command, uint8_t commandData)
static void rxSpiWriteCommand(uint8_t command, uint8_t data)
void cc2500ReadFifo(uint8_t *dpbuffer, uint8_t len)
uint8_t cc2500ReadReg(uint8_t reg)
void cc2500ReadRegisterMulti(uint8_t address, uint8_t *data, uint8_t length)
void cc2500WriteRegisterMulti(uint8_t address, uint8_t *data, uint8_t length)
void cc2500WriteFifo(uint8_t *dpbuffer, uint8_t len)
static struct spi_transaction cc2500_spi_t
#define delayMicroseconds(us)
void cc2500Strobe(uint8_t address)
static uint8_t cc2500_input_buf[64]
static struct spi_periph * cc2500_spi_p
uint8_t cc2500Reset(void)
void cc2500SetPower(uint8_t power)
static void rxSpiWriteCommandMulti(uint8_t command, uint8_t *data, uint8_t length)
static void rxSpiReadCommandMulti(uint8_t command, uint8_t commandData, uint8_t *retData, uint8_t length)
static uint8_t cc2500_output_buf[64]
static void cc2500_delayMicroseconds(uint32_t us)
static void rxSpiWriteByte(uint8_t data)
#define CC2500_READ_BURST
#define CC2500_WRITE_BURST
Common code for AP and FBW telemetry.
enum SPIClockPolarity cpol
clock polarity control
enum SPIClockPhase cpha
clock phase control
enum SPISlaveSelect select
slave selection behavior
enum SPIDataSizeSelect dss
data transfer word size
volatile uint8_t * output_buf
pointer to transmit buffer for DMA
uint16_t input_length
number of data words to read
enum SPIClockDiv cdiv
prescaler of main clock to use as SPI clock
volatile uint8_t * input_buf
pointer to receive buffer for DMA
uint8_t slave_idx
slave id: SPI_SLAVE0 to SPI_SLAVE4
enum SPIBitOrder bitorder
MSB/LSB order.
uint16_t output_length
number of data words to write
enum SPITransactionStatus status
bool spi_submit(struct spi_periph *p, struct spi_transaction *t)
Submit SPI transaction.
@ SPICpolIdleLow
CPOL = 0.
@ SPISelectUnselect
slave is selected before transaction and unselected after
SPI peripheral structure.
SPI transaction structure.
Architecture independent SPI (Serial Peripheral Interface) API.
Architecture independent timing functions.
static float get_sys_time_float(void)
Get the time in seconds since startup.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.