packetParams.Params.LoRa.PayloadLength = BUFFER_SIZE;
void SX1280SetPayload( uint8_t *buffer, uint8_t size )
{
SX1280HalWriteBuffer( 0x00, buffer, size );
}
void SX1280HalWriteBuffer( uint8_t offset, uint8_t *buffer, uint8_t size )
{
uint16_t halSize = size + 2;
halTxBuffer[0] = RADIO_WRITE_BUFFER;
halTxBuffer[1] = ( offset ) >> 8;
memcpy( halTxBuffer + 2, buffer, size );
SX1280HalWaitOnBusy( );
SpiIn( halTxBuffer, halSize );
SX1280HalWaitOnBusy( );
}
|