change LoraDataFormat to SX127xDataFormat for sx127x on nuttx

This commit is contained in:
wgz-code 2022-03-15 09:40:55 +08:00
parent 76a080b130
commit 35ab6fcf8f
3 changed files with 6 additions and 4 deletions

View File

@ -58,7 +58,7 @@ config LPWAN_SX127X_RXFIFO_LEN
config LPWAN_SX127X_RXFIFO_DATA_LEN
int "SX127X RX FIFO data length"
default 128
default 256
endif #LPWAN_SX127X_RXSUPPORT

View File

@ -904,7 +904,9 @@ static ssize_t sx127x_read(FAR struct file *filep, FAR char *buffer,
/* Get RX data from fifo */
wlinfo("buflen=%d \n", buflen);
ret = sx127x_rxfifo_get(dev, (uint8_t *)buffer, buflen);
sx127x_writeregbyte(dev, SX127X_LRM_IRQ, 8);
nxsem_post(&dev->dev_sem);

View File

@ -111,7 +111,7 @@
#ifdef CONFIG_ADAPTER_LORA_SX1278
/* Framework connect Lora data */
struct LoraDataFormat
struct SX127xDataFormat
{
uint8_t flame_head;
uint32_t length;
@ -134,7 +134,7 @@ struct sx127x_read_hdr_s
int16_t rssi;
uint8_t reserved[3];
#ifdef CONFIG_ADAPTER_LORA_SX1278
struct LoraDataFormat data;
struct SX127xDataFormat data;
#else
uint8_t data[SX127X_READ_DATA_MAX];
#endif