金牌会员
- 积分
- 1163
- 金钱
- 1163
- 注册时间
- 2019-10-22
- 在线时间
- 226 小时
|
10金钱
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( );
}
|
|