You are on page 1of 1

#include <msp430g2553.

h>
#include "HdsSx1272SPIB.h"
uint8_t temp =0;
uint8_t msg[]={0,1,2,3,4,5,6,7,8,9};
void main(void)
{
TSx1272Lora sx1272;
sx1272.spi.InitSpiB();
sx1272.InitLoraMode();
sx1272.spi.WriteByteToRegister(RegOcp,0x1B);
sx1272.SetCodingRate(CR45);
sx1272.SetSpreadingFactor(SF12);
sx1272.SetBandWidth(BW500);
sx1272.SetFreqChannel(CH_10_868);
sx1272.SetPower(MAX_POWER);
sx1272.SetHeaderMode(IMPLICIT);
while(1)
{
sx1272.Transmitter(msg,10);
__delay_cycles(5000);
}

You might also like