Skip to content

Commit

Permalink
firmware: drivers: sx1271x: Fixing compilation errors #60
Browse files Browse the repository at this point in the history
  • Loading branch information
mgm8 committed Apr 23, 2022
1 parent ac825d2 commit 7a16e42
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
10 changes: 5 additions & 5 deletions firmware/drivers/sx127x/sx127x.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.1.3
* \version 0.1.21
*
* \date 2021/12/14
*
Expand Down Expand Up @@ -191,9 +191,9 @@ int sx127x_set_frequency(uint32_t freq)
/* Checking the register's value */
uint8_t reg_buf[3] = {0};

if ((sx127x_read_reg(SX127X_REG_FRF_MSB, &read_reg[0]) != 0) ||
(sx127x_read_reg(SX127X_REG_FRF_MID, &read_reg[1]) != 0) ||
(sx127x_read_reg(SX127X_REG_FRF_LSB, &read_reg[2]) != 0))
if ((sx127x_read_reg(SX127X_REG_FRF_MSB, &reg_buf[0]) != 0) ||
(sx127x_read_reg(SX127X_REG_FRF_MID, &reg_buf[1]) != 0) ||
(sx127x_read_reg(SX127X_REG_FRF_LSB, &reg_buf[2]) != 0))
{
#if defined(CONFIG_DRIVERS_DEBUG_ENABLED) && (CONFIG_DRIVERS_DEBUG_ENABLED == 1)
sys_log_print_event_from_module(SYS_LOG_ERROR, SX127X_MODULE_NAME, "Error reading the register FRF!");
Expand Down Expand Up @@ -684,7 +684,7 @@ int sx127x_burst_write(uint8_t adr, uint8_t *ptr, uint8_t len)

memcpy(&wbuf[1], ptr, len);

err = sx127x_spi_write(wbuf, 1U + len)
err = sx127x_spi_write(wbuf, 1U + len);
}

return err;
Expand Down
4 changes: 3 additions & 1 deletion firmware/drivers/sx127x/sx127x_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.1.3
* \version 0.1.21
*
* \date 2021/12/15
*
Expand All @@ -36,6 +36,8 @@
#include <config/config.h>
#include <system/sys_log/sys_log.h>

#include <drivers/gpio/gpio.h>

#include "sx127x.h"

/* GPIO configuration */
Expand Down
4 changes: 3 additions & 1 deletion firmware/drivers/sx127x/sx127x_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.1.3
* \version 0.1.21
*
* \date 2021/12/15
*
Expand All @@ -36,6 +36,8 @@
#include <config/config.h>
#include <system/sys_log/sys_log.h>

#include <drivers/spi/spi.h>

#include "sx127x.h"

/* SPI configuration */
Expand Down
4 changes: 2 additions & 2 deletions firmware/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.1.20
* \version 0.1.21
*
* \date 2021/04/04
*
Expand All @@ -36,7 +36,7 @@
#ifndef VERSION_H_
#define VERSION_H_

#define FIRMWARE_VERSION "0.1.20"
#define FIRMWARE_VERSION "0.1.21"

#define FIRMWARE_STATUS "Development"

Expand Down

0 comments on commit 7a16e42

Please sign in to comment.