Pico GPS Teseo I2C
Loading...
Searching...
No Matches
sx1280-hal.c
Go to the documentation of this file.
1/*
2 ______ _
3 / _____) _ | |
4( (____ _____ ____ _| |_ _____ ____| |__
5 \____ \| ___ | (_ _) ___ |/ ___) _ \
6 _____) ) ____| | | || |_| ____( (___| | | |
7(______/|_____)_|_|_| \__)_____)\____)_| |_|
8 (C)2016 Semtech
9
10Description: Handling of the node configuration protocol
11
12License: Revised BSD License, see LICENSE.TXT file include in the project
13
14Maintainer: Miguel Luis, Matthieu Verdy and Benjamin Boulet
15*/
16#include "hw.h"
17#include "sx1280-hal.h"
18#include "radio.h"
19#include <string.h>
20
21// logging on
22#include "SEGGER_RTT.h"
23#define printf(format, ...) SEGGER_RTT_printf(0, format, ## __VA_ARGS__)
24
25// make CubeMX defines usable
26#ifndef RADIO_BUSY_PORT
27#define RADIO_BUSY_PORT RADIO_BUSY_GPIO_Port
28#endif
29#ifndef RADIO_BUSY_PIN
30#define RADIO_BUSY_PIN RADIO_BUSY_Pin
31#endif
32#ifndef RADIO_nRESET_PORT
33#define RADIO_nRESET_PORT RADIO_nRESET_GPIO_Port
34#endif
35#ifndef RADIO_nRESET_PIN
36#define RADIO_nRESET_PIN RADIO_nRESET_Pin
37#endif
38#ifndef RADIO_NSS_PORT
39#define RADIO_NSS_PORT RADIO_NSS_GPIO_Port
40#endif
41#ifndef RADIO_NSS_PIN
42#define RADIO_NSS_PIN RADIO_NSS_Pin
43#endif
53#define MAX_HAL_BUFFER_SIZE 0xFFF
54
55#define IRQ_HIGH_PRIORITY 0
56
60const struct Radio_s Radio =
61{
133};
134
135// static uint8_t halRxBuffer[MAX_HAL_BUFFER_SIZE];
136static uint8_t halTxBuffer[MAX_HAL_BUFFER_SIZE];
137const static uint8_t halZeroBuffer[MAX_HAL_BUFFER_SIZE];
138static DioIrqHandler **dioIrqHandlers;
139
143
144
145#ifdef USE_BK_SPI
146
147static void spi_enable(SPI_HandleTypeDef *hspi){
148 /* Set fiforxthreshold according the reception data length: 8bit */
150
151 /* Check if the SPI is already enabled */
152 if ((hspi->Instance->CR1 & SPI_CR1_SPE) != SPI_CR1_SPE)
153 {
154 /* Enable SPI peripheral */
155 __HAL_SPI_ENABLE(hspi);
156 }
157}
158
159static void spi_tx(SPI_HandleTypeDef *hspi, const uint8_t * tx_data, uint16_t tx_len){
160 // send tx / ignore rx
161 uint8_t tx_byte = *tx_data++;
162 while (tx_len > 0){
163 tx_len--;
164 // while (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE) == 0);
165 *(__IO uint8_t *)&hspi->Instance->DR = tx_byte;
166 tx_byte = *tx_data++;
167 while (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_RXNE) == 0);
168 uint8_t rx_byte = *(__IO uint8_t *)&hspi->Instance->DR;
169 (void) rx_byte;
170 }
171}
172
173static void spi_rx(SPI_HandleTypeDef *hspi, uint8_t * rx_buffer, uint16_t rx_len){
174 // send NOP / store rx
175 while (rx_len > 0){
176 rx_len--;
177 // while (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE) == 0);
178 *(__IO uint8_t *)&hspi->Instance->DR = 0;
179 while (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_RXNE) == 0);
180 *rx_buffer++ = *(__IO uint8_t *)&hspi->Instance->DR;
181 }
182}
183
184static void spi_tx_only_dma(const uint8_t * tx_data, uint16_t tx_len) {
185
186 HAL_DMA_Start(&RADIO_SPI_DMA_TX, (uintptr_t) tx_data, (uintptr_t) &RADIO_SPI_HANDLE.Instance->DR, tx_len);
187
188 /* Enable Tx DMA Request */
190
192
193 /* Discard received byte */
194 (void) RADIO_SPI_HANDLE.Instance->DR;
195}
196
197static void spi_tx_rx_dma(const uint8_t * tx_data, uint8_t * rx_buffer, uint16_t size) {
198
199 /* Enable Rx DMA Request */
201
202 HAL_DMA_Start(&RADIO_SPI_DMA_RX, (uintptr_t) &RADIO_SPI_HANDLE.Instance->DR, (uintptr_t) rx_buffer, size);
203 HAL_DMA_Start(&RADIO_SPI_DMA_TX, (uintptr_t) tx_data, (uintptr_t) &RADIO_SPI_HANDLE.Instance->DR, size);
204
205 /* Enable Tx DMA Request */
207
210}
211
212#endif
213
214// assert: tx_data == tx_buffer (local call), tx_len > 0
215// DMA is disabled as one extra byte is read
216void SX1280HalSpiTxThenRx(uint16_t tx_len, uint8_t * rx_buffer, uint16_t rx_len){
217
218 spi_enable(&RADIO_SPI_HANDLE);
219
220 // min size for dma to be faster
221 const uint16_t dma_min_size_tx = 100;
222
223 if (tx_len < dma_min_size_tx) {
224 // Custom Polling
225 spi_tx(&RADIO_SPI_HANDLE, halTxBuffer, tx_len);
226 } else {
227 // Custom DMA
228 spi_tx_only_dma( halTxBuffer, tx_len );
229 }
230
231 // 'Flush' Fifo by reading until marked empty
233
234 if (rx_len == 0) return;
235
236 // min size for dma to be faster
237 const uint16_t dma_min_size_rx = 100;
238
239 if (rx_len < dma_min_size_rx){
240 // Custom Polling
241 spi_rx(&RADIO_SPI_HANDLE, rx_buffer, rx_len);
242 } else {
243 // Custom DMA
244 spi_tx_rx_dma( halZeroBuffer, rx_buffer, rx_len);
245 }
246}
247
253{
255}
256
257void SX1280HalInit( DioIrqHandler **irqHandlers )
258{
261 SX1280HalIoIrqInit( irqHandlers );
262}
263
264void HAL_GPIO_EXTI_Callback( uint16_t GPIO_Pin )
265{
266 dioIrqHandlers[0]();
267}
268
270{
271 dioIrqHandlers = irqHandlers;
272}
273
282
283#if 0
284// commented out as (3+IRAM_SIZE) > sizeof(halTxBuffer)
286{
287 // Clearing the instruction RAM is writing 0x00s on every bytes of the
288 // instruction RAM
289 uint16_t halSize = 3 + IRAM_SIZE;
290 halTxBuffer[0] = RADIO_WRITE_REGISTER;
291 halTxBuffer[1] = ( IRAM_START_ADDRESS >> 8 ) & 0x00FF;
292 halTxBuffer[2] = IRAM_START_ADDRESS & 0x00FF;
293 for( uint16_t index = 0; index < IRAM_SIZE; index++ )
294 {
295 halTxBuffer[3+index] = 0x00;
296 }
297
299
301
302 SX1280HalSpiTxThenRx( halTxBuffer, halSize, NULL, 0);
303
305
307}
308#endif
309
310void SX1280HalWakeup( void )
311{
312 __disable_irq( );
313
315
316 uint16_t halSize = 2;
317 halTxBuffer[0] = RADIO_GET_STATUS;
318 halTxBuffer[1] = 0x00;
319
320 SX1280HalSpiTxThenRx( halSize, NULL, 0);
321
323
324 // Wait for chip to be ready.
326
327 __enable_irq( );
328}
329
330void SX1280HalWriteCommand( RadioCommands_t command, uint8_t *buffer, uint16_t size )
331{
332 uint16_t halSize = size + 1;
334
336
337 halTxBuffer[0] = command;
338 memcpy( halTxBuffer + 1, ( uint8_t * )buffer, size * sizeof( uint8_t ) );
339
340 SX1280HalSpiTxThenRx( halSize, NULL, 0);
341
343
344 if( command != RADIO_SET_SLEEP )
345 {
347 }
348}
349
350void SX1280HalReadCommand( RadioCommands_t command, uint8_t *buffer, uint16_t size )
351{
352 halTxBuffer[0] = command;
353 halTxBuffer[1] = 0x00;
354
356
358
359 SX1280HalSpiTxThenRx( 2, buffer, size);
360
362
364}
365
366void SX1280HalWriteRegisters( uint16_t address, uint8_t *buffer, uint16_t size )
367{
368 uint16_t halSize = size + 3;
369 halTxBuffer[0] = RADIO_WRITE_REGISTER;
370 halTxBuffer[1] = ( address & 0xFF00 ) >> 8;
371 halTxBuffer[2] = address & 0x00FF;
372 memcpy( halTxBuffer + 3, buffer, size );
373
375
377
378 SX1280HalSpiTxThenRx( halSize, NULL, 0);
379
381
383}
384
385void SX1280HalWriteRegister( uint16_t address, uint8_t value )
386{
387 SX1280HalWriteRegisters( address, &value, 1 );
388}
389
390void SX1280HalReadRegisters( uint16_t address, uint8_t *buffer, uint16_t size )
391{
392 halTxBuffer[0] = RADIO_READ_REGISTER;
393 halTxBuffer[1] = ( address & 0xFF00 ) >> 8;
394 halTxBuffer[2] = address & 0x00FF;
395 halTxBuffer[3] = 0x00;
396
398
400
401 SX1280HalSpiTxThenRx( 4, buffer, size);
402
404
406}
407
408uint8_t SX1280HalReadRegister( uint16_t address )
409{
410 uint8_t data;
411
412 SX1280HalReadRegisters( address, &data, 1 );
413
414 return data;
415}
416
417void SX1280HalWriteBuffer( uint8_t offset, uint8_t *buffer, uint8_t size )
418{
419 uint16_t halSize = size + 2;
420 halTxBuffer[0] = RADIO_WRITE_BUFFER;
421 halTxBuffer[1] = offset;
422 memcpy( halTxBuffer + 2, buffer, size );
423
425
427
428 SX1280HalSpiTxThenRx( halSize, NULL, 0);
429
431
433}
434
435void SX1280HalReadBuffer( uint8_t offset, uint8_t *buffer, uint8_t size )
436{
437 halTxBuffer[0] = RADIO_READ_BUFFER;
438 halTxBuffer[1] = offset;
439 halTxBuffer[2] = 0x00;
440
442
444
445 SX1280HalSpiTxThenRx( 3, buffer, size);
446
448
450}
451
453{
455
456#if( RADIO_DIO1_ENABLE )
458#endif
459#if( RADIO_DIO2_ENABLE )
461#endif
462#if( RADIO_DIO3_ENABLE )
464#endif
465#if( !RADIO_DIO1_ENABLE && !RADIO_DIO2_ENABLE && !RADIO_DIO3_ENABLE )
466#error "Please define a DIO"
467#endif
468
469 return Status;
470}
const struct Radio_s Radio
Radio driver.
Definition sx1280-hal.c:60
const struct lc3_ltpf_data * data
Definition ctypes.h:398
#define __enable_irq
Enable IRQ Interrupts.
#define __disable_irq
Disable IRQ Interrupts.
HAL_StatusTypeDef HAL_DMA_Start(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, HAL_DMA_LevelCompleteTypeDef CompleteLevel, uint32_t Timeout)
struct __DMA_HandleTypeDef DMA_HandleTypeDef
DMA handle Structure definition.
@ HAL_DMA_FULL_TRANSFER
#define SET_BIT(REG, BIT)
Definition stm32f4xx.h:228
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
Definition sx1280-hal.c:264
GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
void HAL_Delay(uint32_t Delay)
This function provides minimum delay (in milliseconds) based on variable incremented.
#define NULL
Definition oi_stddefs.h:55
#define SPI_CR2_TXDMAEN
#define SPI_CR1_SPE
#define SPI_CR2_RXDMAEN
#define __HAL_SPI_ENABLE(__HANDLE__)
Enable the SPI peripheral.
#define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__)
Check whether the specified SPI flag is set or not.
struct __SPI_HandleTypeDef SPI_HandleTypeDef
SPI handle Structure definition.
#define SPI_RXFIFO_THRESHOLD
#define SPI_FLAG_RXNE
HAL_StatusTypeDef HAL_SPIEx_FlushRxFifo(SPI_HandleTypeDef *hspi)
#define RADIO_SPI_HANDLE
#define RADIO_DIO2_GPIO_Port
#define RADIO_DIO3_GPIO_Port
#define RADIO_DIO2_Pin
#define RADIO_DIO3_Pin
#define RADIO_DIO1_GPIO_Port
#define RADIO_DIO1_Pin
#define __IO
Definition core_cm4.h:269
#define HAL_MAX_DELAY
#define RADIO_SPI_DMA_TX
Definition hw.h:23
#define RADIO_SPI_DMA_RX
Definition hw.h:22
#define memcpy
Definition string.h:24
Class holding the basic communications with a radio.
Definition radio.h:28
__IO uint32_t DR
__IO uint32_t CR2
__IO uint32_t CR1
void SX1280HalWriteRegisters(uint16_t address, uint8_t *buffer, uint16_t size)
Write data to the radio memory.
Definition sx1280-hal.c:366
#define RADIO_BUSY_PIN
Definition sx1280-hal.c:30
void SX1280HalReset(void)
Soft resets the radio.
Definition sx1280-hal.c:274
void SX1280HalSpiTxThenRx(uint16_t tx_len, uint8_t *rx_buffer, uint16_t rx_len)
Definition sx1280-hal.c:216
void SX1280HalInit(DioIrqHandler **irqHandlers)
Definition sx1280-hal.c:257
uint8_t SX1280HalGetDioStatus(void)
Returns the status of DIOs pins.
Definition sx1280-hal.c:452
#define RADIO_nRESET_PORT
Definition sx1280-hal.c:33
void SX1280HalWaitOnBusy(void)
Used to block execution waiting for low state on radio busy pin. Essentially used in SPI communicatio...
Definition sx1280-hal.c:252
uint8_t SX1280HalReadRegister(uint16_t address)
Read a single byte of data from the radio memory.
Definition sx1280-hal.c:408
void SX1280HalWriteCommand(RadioCommands_t command, uint8_t *buffer, uint16_t size)
Send a command that write data to the radio.
Definition sx1280-hal.c:330
void SX1280HalReadCommand(RadioCommands_t command, uint8_t *buffer, uint16_t size)
Send a command that read data from the radio.
Definition sx1280-hal.c:350
#define RADIO_NSS_PIN
Definition sx1280-hal.c:42
void SX1280HalReadBuffer(uint8_t offset, uint8_t *buffer, uint8_t size)
Read data from the buffer holding the payload in the radio.
Definition sx1280-hal.c:435
void SX1280HalWriteRegister(uint16_t address, uint8_t value)
Write a single byte of data to the radio memory.
Definition sx1280-hal.c:385
void SX1280HalReadRegisters(uint16_t address, uint8_t *buffer, uint16_t size)
Read data from the radio memory.
Definition sx1280-hal.c:390
#define RADIO_BUSY_PORT
Definition sx1280-hal.c:27
void SX1280HalIoIrqInit(DioIrqHandler **irqHandlers)
Definition sx1280-hal.c:269
#define RADIO_nRESET_PIN
Definition sx1280-hal.c:36
void SX1280HalWriteBuffer(uint8_t offset, uint8_t *buffer, uint8_t size)
Write data to the buffer holding the payload in the radio.
Definition sx1280-hal.c:417
void SX1280HalWakeup(void)
Wakes up the radio.
Definition sx1280-hal.c:310
#define RADIO_NSS_PORT
Definition sx1280-hal.c:39
#define MAX_HAL_BUFFER_SIZE
Define the size of tx and rx hal buffers.
Definition sx1280-hal.c:53
void SX1280HalClearInstructionRam(void)
Clears the instruction ram memory block.
void SX1280SetBufferBaseAddresses(uint8_t txBaseAddress, uint8_t rxBaseAddress)
Sets the data buffer base address for transmission and reception.
Definition sx1280.c:270
void SX1280SetBleAdvertizerAccessAddress(void)
Set the Access Address for Advertizer BLE packets.
Definition sx1280.c:732
double SX1280GetFrequencyError()
Return the Estimated Frequency Error in LORA and RANGING operations.
Definition sx1280.c:1022
void SX1280DisableManualGain(void)
Disable the manual gain control and enable AGC.
Definition sx1280.c:777
void SX1280GetPacketStatus(PacketStatus_t *pktStatus)
Gets the last received packet payload length.
Definition sx1280.c:420
void SX1280ClearIrqStatus(uint16_t irq)
Clears the IRQs.
Definition sx1280.c:545
RadioPacketTypes_t SX1280GetPacketType(void)
Gets the current radio protocol.
Definition sx1280.c:236
void SX1280SetSyncWordErrorTolerance(uint8_t ErrorBits)
Defines how many error bits are tolerated in sync word detection.
Definition sx1280.c:699
double SX1280GetRangingResult(RadioRangingResultTypes_t resultType)
Return the ranging result value.
Definition sx1280.c:848
void SX1280SetDioIrqParams(uint16_t irqMask, uint16_t dio1Mask, uint16_t dio2Mask, uint16_t dio3Mask)
Sets the IRQ mask and DIO masks.
Definition sx1280.c:521
RadioStatus_t SX1280GetStatus(void)
Gets the current radio status.
Definition sx1280.c:111
void SX1280SetTxParams(int8_t power, RadioRampTimes_t rampTime)
Sets the transmission parameters.
Definition sx1280.c:253
void SX1280SetStandby(RadioStandbyModes_t standbyConfig)
Sets the radio in configuration mode.
Definition sx1280.c:137
void SX1280SetInterruptMode(void)
Set the driver in interrupt mode.
Definition sx1280.c:1179
void SX1280SetRegistersDefault(void)
Initializes the radio registers to the recommended default values.
Definition sx1280.c:98
void SX1280SetTxContinuousPreamble(void)
Sets the radio in continuous preamble transmission mode.
Definition sx1280.c:223
int8_t SX1280GetRssiInst(void)
Returns the instantaneous RSSI value for the last packet received.
Definition sx1280.c:512
void SX1280SetWhiteningSeed(uint8_t seed)
Sets the Initial value of the LFSR used for the whitening in GFSK, FLRC and BLE protocols.
Definition sx1280.c:756
void SX1280SendPayload(uint8_t *payload, uint8_t size, TickTime_t timeout)
Sends a payload.
Definition sx1280.c:620
void SX1280SetPayload(uint8_t *buffer, uint8_t size)
Saves the payload to be send in the radio buffer.
Definition sx1280.c:602
void SX1280SetPacketParams(PacketParams_t *packetParams)
Sets the packet parameters.
Definition sx1280.c:327
void SX1280SetRangingRequestAddress(uint32_t address)
Sets the device id to ping in a ranging request.
Definition sx1280.c:833
void SX1280SetAutoTx(uint16_t time)
Sets the chip to automatically send a packet after the end of a packet reception.
Definition sx1280.c:576
void SX1280SetAutoFS(uint8_t enable)
Sets the chip to automatically receive a packet after the end of a packet transmission.
Definition sx1280.c:592
void SX1280SetBleAccessAddress(uint32_t accessAddress)
Set the Access Address field of BLE packet.
Definition sx1280.c:724
void SX1280SetCrcPolynomial(uint16_t polynomial)
Sets the seed used for the CRC calculation.
Definition sx1280.c:737
RadioOperatingModes_t SX1280GetOpMode(void)
Gets the current Operation Mode of the Radio.
Definition sx1280.c:121
void SX1280RangingSetFilterNumSamples(uint8_t num)
Set the number of samples considered in the built-in filter.
Definition sx1280.c:918
void SX1280GetRxBufferStatus(uint8_t *payloadLength, uint8_t *rxStartBufferPointer)
Gets the last received packet buffer status.
Definition sx1280.c:394
uint8_t SX1280SetSyncWord(uint8_t syncWordIdx, uint8_t *syncWord)
Sets the Sync Word given by index used in GFSK, FLRC and BLE protocols.
Definition sx1280.c:626
void SX1280SetLNAGainSetting(const RadioLnaSettings_t lnaSetting)
Configure the LNA regime of operation.
Definition sx1280.c:788
void SX1280SetCad(void)
Sets the radio in CAD mode.
Definition sx1280.c:212
void SX1280RangingClearFilterResult(void)
Clears the ranging filter.
Definition sx1280.c:909
void SX1280SetRx(TickTime_t timeout)
Sets the radio in reception mode.
Definition sx1280.c:177
void SX1280SetTxContinuousWave(void)
Sets the radio in continuous wave transmission mode.
Definition sx1280.c:218
void SX1280SetRangingIdLength(RadioRangingIdCheckLengths_t length)
Sets the number of bits used to check that ranging request match ranging ID.
Definition sx1280.c:805
void SX1280StopAutoTx(void)
Stop the chip from automatically sending a packet after the end of a packet reception if previously a...
Definition sx1280.c:586
void SX1280Calibrate(CalibrationParams_t calibParam)
Calibrates the given radio block.
Definition sx1280.c:554
uint16_t SX1280GetFirmwareVersion(void)
Returns the current device firmware version.
Definition sx1280.c:106
void SX1280EnableManualGain(void)
Enable manual gain and disable AGC.
Definition sx1280.c:771
void SX1280SetFs(void)
Sets the radio in FS mode.
Definition sx1280.c:150
void SX1280SetSleep(SleepParams_t sleepConfig)
Sets the radio in sleep mode.
Definition sx1280.c:126
void SX1280SetCadParams(RadioLoRaCadSymbols_t cadSymbolNum)
Sets the number of symbols to be used for Channel Activity Detection operation.
Definition sx1280.c:264
void SX1280SetTx(TickTime_t timeout)
Sets the radio in transmission mode.
Definition sx1280.c:156
void SX1280SetRegulatorMode(RadioRegulatorModes_t mode)
Sets the power regulators operating mode.
Definition sx1280.c:566
void SX1280SetRxDutyCycle(RadioTickSizes_t Step, uint16_t NbStepRx, uint16_t RxNbStepSleep)
Sets the Rx duty cycle management parameters.
Definition sx1280.c:199
uint8_t SX1280GetRangingPowerDeltaThresholdIndicator(void)
Return the last ranging result power indicator.
Definition sx1280.c:887
void SX1280SetManualGainValue(uint8_t gain)
Set the gain for LNA.
Definition sx1280.c:783
void SX1280SetDeviceRangingAddress(uint32_t address)
Sets ranging device id.
Definition sx1280.c:818
void SX1280SetModulationParams(ModulationParams_t *modulationParams)
Set the modulation parameters.
Definition sx1280.c:279
void SX1280SetRangingRole(RadioRangingRoles_t role)
Set the role of the radio during ranging operations.
Definition sx1280.c:953
void SX1280SetRfFrequency(uint32_t frequency)
Sets the RF frequency.
Definition sx1280.c:241
uint8_t SX1280GetPayload(uint8_t *buffer, uint8_t *size, uint8_t maxSize)
Reads the payload received. If the received payload is longer than maxSize, then the method returns 1...
Definition sx1280.c:607
uint16_t SX1280GetIrqStatus(void)
Returns the current IRQ status.
Definition sx1280.c:536
void SX1280SetSaveContext(void)
Saves the current selected modem configuration into data RAM.
Definition sx1280.c:571
void SX1280SetLongPreamble(uint8_t enable)
Enables or disables long preamble detection mode.
Definition sx1280.c:597
void SX1280SetRangingCalibration(uint16_t cal)
Sets the standard processing delay between Master and Slave.
Definition sx1280.c:895
void SX1280Init(RadioCallbacks_t *callbacks)
Initializes the radio driver.
Definition sx1280.c:91
void SX1280SetCrcSeed(uint16_t seed)
Sets the Initial value for the LFSR used for the CRC calculation.
Definition sx1280.c:705
void SX1280SetPollingMode(void)
Set the driver in polling mode.
Definition sx1280.c:1051
void SX1280SetPacketType(RadioPacketTypes_t packetType)
Sets the radio for the given protocol.
Definition sx1280.c:228
#define IRAM_SIZE
Definition sx1280.h:159
void DioIrqHandler(void)
Hardware IO IRQ callback function definition.
Definition sx1280.h:31
#define IRAM_START_ADDRESS
The address of the instruction RAM and its size.
Definition sx1280.h:158
@ RADIO_GET_STATUS
Definition sx1280.h:693
@ RADIO_READ_REGISTER
Definition sx1280.h:695
@ RADIO_SET_SLEEP
Definition sx1280.h:698
@ RADIO_WRITE_BUFFER
Definition sx1280.h:696
@ RADIO_READ_BUFFER
Definition sx1280.h:697
@ RADIO_WRITE_REGISTER
Definition sx1280.h:694
enum RadioCommands_u RadioCommands_t
Represents all possible opcode understood by the radio.
uint32_t size
Definition main.c:130