Lines Matching refs:buf
177 uint8_t buf[2]; in SX126xSetCrcSeed() local
179 buf[0] = ( uint8_t )( ( seed >> 8 ) & 0xFF ); in SX126xSetCrcSeed()
180 buf[1] = ( uint8_t )( seed & 0xFF ); in SX126xSetCrcSeed()
185 SX126xWriteRegisters( REG_LR_CRCSEEDBASEADDR, buf, 2 ); in SX126xSetCrcSeed()
195 uint8_t buf[2]; in SX126xSetCrcPolynomial() local
197 buf[0] = ( uint8_t )( ( polynomial >> 8 ) & 0xFF ); in SX126xSetCrcPolynomial()
198 buf[1] = ( uint8_t )( polynomial & 0xFF ); in SX126xSetCrcPolynomial()
203 SX126xWriteRegisters( REG_LR_CRCPOLYBASEADDR, buf, 2 ); in SX126xSetCrcPolynomial()
292 uint8_t buf[3]; in SX126xSetTx() local
296 buf[0] = ( uint8_t )( ( timeout >> 16 ) & 0xFF ); in SX126xSetTx()
297 buf[1] = ( uint8_t )( ( timeout >> 8 ) & 0xFF ); in SX126xSetTx()
298 buf[2] = ( uint8_t )( timeout & 0xFF ); in SX126xSetTx()
299 SX126xWriteCommand( RADIO_SET_TX, buf, 3 ); in SX126xSetTx()
304 uint8_t buf[3]; in SX126xSetRx() local
310 buf[0] = ( uint8_t )( ( timeout >> 16 ) & 0xFF ); in SX126xSetRx()
311 buf[1] = ( uint8_t )( ( timeout >> 8 ) & 0xFF ); in SX126xSetRx()
312 buf[2] = ( uint8_t )( timeout & 0xFF ); in SX126xSetRx()
313 SX126xWriteCommand( RADIO_SET_RX, buf, 3 ); in SX126xSetRx()
318 uint8_t buf[3]; in SX126xSetRxBoosted() local
324 buf[0] = ( uint8_t )( ( timeout >> 16 ) & 0xFF ); in SX126xSetRxBoosted()
325 buf[1] = ( uint8_t )( ( timeout >> 8 ) & 0xFF ); in SX126xSetRxBoosted()
326 buf[2] = ( uint8_t )( timeout & 0xFF ); in SX126xSetRxBoosted()
327 SX126xWriteCommand( RADIO_SET_RX, buf, 3 ); in SX126xSetRxBoosted()
332 uint8_t buf[6]; in SX126xSetRxDutyCycle() local
334 buf[0] = ( uint8_t )( ( rxTime >> 16 ) & 0xFF ); in SX126xSetRxDutyCycle()
335 buf[1] = ( uint8_t )( ( rxTime >> 8 ) & 0xFF ); in SX126xSetRxDutyCycle()
336 buf[2] = ( uint8_t )( rxTime & 0xFF ); in SX126xSetRxDutyCycle()
337 buf[3] = ( uint8_t )( ( sleepTime >> 16 ) & 0xFF ); in SX126xSetRxDutyCycle()
338 buf[4] = ( uint8_t )( ( sleepTime >> 8 ) & 0xFF ); in SX126xSetRxDutyCycle()
339 buf[5] = ( uint8_t )( sleepTime & 0xFF ); in SX126xSetRxDutyCycle()
340 SX126xWriteCommand( RADIO_SET_RXDUTYCYCLE, buf, 6 ); in SX126xSetRxDutyCycle()
443 uint8_t buf[4]; in SX126xSetPaConfig() local
445 buf[0] = paDutyCycle; in SX126xSetPaConfig()
446 buf[1] = hpMax; in SX126xSetPaConfig()
447 buf[2] = deviceSel; in SX126xSetPaConfig()
448 buf[3] = paLut; in SX126xSetPaConfig()
449 SX126xWriteCommand( RADIO_SET_PACONFIG, buf, 4 ); in SX126xSetPaConfig()
459 uint8_t buf[8]; in SX126xSetDioIrqParams() local
461 buf[0] = ( uint8_t )( ( irqMask >> 8 ) & 0x00FF ); in SX126xSetDioIrqParams()
462 buf[1] = ( uint8_t )( irqMask & 0x00FF ); in SX126xSetDioIrqParams()
463 buf[2] = ( uint8_t )( ( dio1Mask >> 8 ) & 0x00FF ); in SX126xSetDioIrqParams()
464 buf[3] = ( uint8_t )( dio1Mask & 0x00FF ); in SX126xSetDioIrqParams()
465 buf[4] = ( uint8_t )( ( dio2Mask >> 8 ) & 0x00FF ); in SX126xSetDioIrqParams()
466 buf[5] = ( uint8_t )( dio2Mask & 0x00FF ); in SX126xSetDioIrqParams()
467 buf[6] = ( uint8_t )( ( dio3Mask >> 8 ) & 0x00FF ); in SX126xSetDioIrqParams()
468 buf[7] = ( uint8_t )( dio3Mask & 0x00FF ); in SX126xSetDioIrqParams()
469 SX126xWriteCommand( RADIO_CFG_DIOIRQ, buf, 8 ); in SX126xSetDioIrqParams()
487 uint8_t buf[4]; in SX126xSetDio3AsTcxoCtrl() local
489 buf[0] = tcxoVoltage & 0x07; in SX126xSetDio3AsTcxoCtrl()
490 buf[1] = ( uint8_t )( ( timeout >> 16 ) & 0xFF ); in SX126xSetDio3AsTcxoCtrl()
491 buf[2] = ( uint8_t )( ( timeout >> 8 ) & 0xFF ); in SX126xSetDio3AsTcxoCtrl()
492 buf[3] = ( uint8_t )( timeout & 0xFF ); in SX126xSetDio3AsTcxoCtrl()
494 SX126xWriteCommand( RADIO_SET_TCXOMODE, buf, 4 ); in SX126xSetDio3AsTcxoCtrl()
499 uint8_t buf[4]; in SX126xSetRfFrequency() local
509 buf[0] = ( uint8_t )( ( freqInPllSteps >> 24 ) & 0xFF ); in SX126xSetRfFrequency()
510 buf[1] = ( uint8_t )( ( freqInPllSteps >> 16 ) & 0xFF ); in SX126xSetRfFrequency()
511 buf[2] = ( uint8_t )( ( freqInPllSteps >> 8 ) & 0xFF ); in SX126xSetRfFrequency()
512 buf[3] = ( uint8_t )( freqInPllSteps & 0xFF ); in SX126xSetRfFrequency()
513 SX126xWriteCommand( RADIO_SET_RFFREQUENCY, buf, 4 ); in SX126xSetRfFrequency()
530 uint8_t buf[2]; in SX126xSetTxParams() local
567 buf[0] = power; in SX126xSetTxParams()
568 buf[1] = ( uint8_t )rampTime; in SX126xSetTxParams()
569 SX126xWriteCommand( RADIO_SET_TXPARAMS, buf, 2 ); in SX126xSetTxParams()
576 uint8_t buf[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; in SX126xSetModulationParams() local
590 buf[0] = ( tempVal >> 16 ) & 0xFF; in SX126xSetModulationParams()
591 buf[1] = ( tempVal >> 8 ) & 0xFF; in SX126xSetModulationParams()
592 buf[2] = tempVal & 0xFF; in SX126xSetModulationParams()
593 buf[3] = modulationParams->Params.Gfsk.ModulationShaping; in SX126xSetModulationParams()
594 buf[4] = modulationParams->Params.Gfsk.Bandwidth; in SX126xSetModulationParams()
596 buf[5] = ( tempVal >> 16 ) & 0xFF; in SX126xSetModulationParams()
597 buf[6] = ( tempVal >> 8 ) & 0xFF; in SX126xSetModulationParams()
598 buf[7] = ( tempVal& 0xFF ); in SX126xSetModulationParams()
599 SX126xWriteCommand( RADIO_SET_MODULATIONPARAMS, buf, n ); in SX126xSetModulationParams()
603 buf[0] = modulationParams->Params.LoRa.SpreadingFactor; in SX126xSetModulationParams()
604 buf[1] = modulationParams->Params.LoRa.Bandwidth; in SX126xSetModulationParams()
605 buf[2] = modulationParams->Params.LoRa.CodingRate; in SX126xSetModulationParams()
606 buf[3] = modulationParams->Params.LoRa.LowDatarateOptimize; in SX126xSetModulationParams()
608 SX126xWriteCommand( RADIO_SET_MODULATIONPARAMS, buf, n ); in SX126xSetModulationParams()
621 uint8_t buf[9] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; in SX126xSetPacketParams() local
650 buf[0] = ( packetParams->Params.Gfsk.PreambleLength >> 8 ) & 0xFF; in SX126xSetPacketParams()
651 buf[1] = packetParams->Params.Gfsk.PreambleLength; in SX126xSetPacketParams()
652 buf[2] = packetParams->Params.Gfsk.PreambleMinDetect; in SX126xSetPacketParams()
653 buf[3] = ( packetParams->Params.Gfsk.SyncWordLength /*<< 3*/ ); // convert from byte to bit in SX126xSetPacketParams()
654 buf[4] = packetParams->Params.Gfsk.AddrComp; in SX126xSetPacketParams()
655 buf[5] = packetParams->Params.Gfsk.HeaderType; in SX126xSetPacketParams()
656 buf[6] = packetParams->Params.Gfsk.PayloadLength; in SX126xSetPacketParams()
657 buf[7] = crcVal; in SX126xSetPacketParams()
658 buf[8] = packetParams->Params.Gfsk.DcFree; in SX126xSetPacketParams()
662 buf[0] = ( packetParams->Params.LoRa.PreambleLength >> 8 ) & 0xFF; in SX126xSetPacketParams()
663 buf[1] = packetParams->Params.LoRa.PreambleLength; in SX126xSetPacketParams()
664 buf[2] = LoRaHeaderType = packetParams->Params.LoRa.HeaderType; in SX126xSetPacketParams()
665 buf[3] = packetParams->Params.LoRa.PayloadLength; in SX126xSetPacketParams()
666 buf[4] = packetParams->Params.LoRa.CrcMode; in SX126xSetPacketParams()
667 buf[5] = packetParams->Params.LoRa.InvertIQ; in SX126xSetPacketParams()
673 SX126xWriteCommand( RADIO_SET_PACKETPARAMS, buf, n ); in SX126xSetPacketParams()
678 uint8_t buf[7]; in SX126xSetCadParams() local
680 buf[0] = ( uint8_t )cadSymbolNum; in SX126xSetCadParams()
681 buf[1] = cadDetPeak; in SX126xSetCadParams()
682 buf[2] = cadDetMin; in SX126xSetCadParams()
683 buf[3] = ( uint8_t )cadExitMode; in SX126xSetCadParams()
684 buf[4] = ( uint8_t )( ( cadTimeout >> 16 ) & 0xFF ); in SX126xSetCadParams()
685 buf[5] = ( uint8_t )( ( cadTimeout >> 8 ) & 0xFF ); in SX126xSetCadParams()
686 buf[6] = ( uint8_t )( cadTimeout & 0xFF ); in SX126xSetCadParams()
687 SX126xWriteCommand( RADIO_SET_CADPARAMS, buf, 7 ); in SX126xSetCadParams()
693 uint8_t buf[2]; in SX126xSetBufferBaseAddress() local
695 buf[0] = txBaseAddress; in SX126xSetBufferBaseAddress()
696 buf[1] = rxBaseAddress; in SX126xSetBufferBaseAddress()
697 SX126xWriteCommand( RADIO_SET_BUFFERBASEADDRESS, buf, 2 ); in SX126xSetBufferBaseAddress()
713 uint8_t buf[1]; in SX126xGetRssiInst() local
716 SX126xReadCommand( RADIO_GET_RSSIINST, buf, 1 ); in SX126xGetRssiInst()
717 rssi = -buf[0] >> 1; in SX126xGetRssiInst()
793 uint8_t buf[2] = { 0x00, 0x00 }; in SX126xClearDeviceErrors() local
794 SX126xWriteCommand( RADIO_CLR_ERROR, buf, 2 ); in SX126xClearDeviceErrors()
799 uint8_t buf[2]; in SX126xClearIrqStatus() local
801 buf[0] = ( uint8_t )( ( ( uint16_t )irq >> 8 ) & 0x00FF ); in SX126xClearIrqStatus()
802 buf[1] = ( uint8_t )( ( uint16_t )irq & 0x00FF ); in SX126xClearIrqStatus()
803 SX126xWriteCommand( RADIO_CLR_IRQSTATUS, buf, 2 ); in SX126xClearIrqStatus()