Update LoRaMac-node to Version 4.4.4,fix Security breach found by Tencent Blade Team please refer to security advisory - CVE-2020-11068
fix Security breach found by Tencent Blade Team please refer to security advisory - CVE-2020-11068
This commit is contained in:
@@ -23,6 +23,11 @@
|
||||
#ifndef __ADC_BOARD_H__
|
||||
#define __ADC_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "adc.h"
|
||||
|
||||
/*!
|
||||
@@ -46,4 +51,8 @@ void AdcMcuConfig( void );
|
||||
*/
|
||||
uint16_t AdcMcuReadChannel( Adc_t *obj, uint32_t channel );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __ADC_BOARD_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __BOARD_H__
|
||||
#define __BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "utilities.h"
|
||||
/*!
|
||||
@@ -113,4 +118,8 @@ uint8_t GetBoardPowerSource( void );
|
||||
*/
|
||||
Version_t BoardGetVersion( void );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __BOARD_H__
|
||||
|
@@ -25,6 +25,11 @@
|
||||
#ifndef __DELAY_BOARD_H__
|
||||
#define __DELAY_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*!
|
||||
@@ -34,4 +39,8 @@
|
||||
*/
|
||||
void DelayMsMcu( uint32_t ms );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __DELAY_BOARD_H__
|
||||
|
@@ -28,6 +28,11 @@
|
||||
#ifndef __DISPLAY_BOARD_H__
|
||||
#define __DISPLAY_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
@@ -290,4 +295,8 @@ void DisplayPrint( const char *string );
|
||||
*/
|
||||
void DisplayPrintf( const char *format, ... );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __DISPLAY_BOARD_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __EEPROM_BOARD_H__
|
||||
#define __EEPROM_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*!
|
||||
@@ -31,7 +36,7 @@
|
||||
* \param[IN] addr EEPROM address to write to
|
||||
* \param[IN] buffer Pointer to the buffer to be written.
|
||||
* \param[IN] size Size of the buffer to be written.
|
||||
* \retval status [LORA_SUCCESS, LORA_FAIL]
|
||||
* \retval status [SUCCESS, FAIL]
|
||||
*/
|
||||
uint8_t EepromMcuWriteBuffer( uint16_t addr, uint8_t *buffer, uint16_t size );
|
||||
|
||||
@@ -41,7 +46,7 @@ uint8_t EepromMcuWriteBuffer( uint16_t addr, uint8_t *buffer, uint16_t size );
|
||||
* \param[IN] addr EEPROM address to read from
|
||||
* \param[OUT] buffer Pointer to the buffer to be written with read data.
|
||||
* \param[IN] size Size of the buffer to be read.
|
||||
* \retval status [LORA_SUCCESS, LORA_FAIL]
|
||||
* \retval status [SUCCESS, FAIL]
|
||||
*/
|
||||
uint8_t EepromMcuReadBuffer( uint16_t addr, uint8_t *buffer, uint16_t size );
|
||||
|
||||
@@ -63,4 +68,8 @@ void EepromMcuSetDeviceAddr( uint8_t addr );
|
||||
*/
|
||||
uint8_t EepromMcuGetDeviceAddr( void );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __EEPROM_BOARD_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __GPIO_BOARD_H__
|
||||
#define __GPIO_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
/*!
|
||||
@@ -89,4 +94,8 @@ void GpioMcuToggle( Gpio_t *obj );
|
||||
*/
|
||||
uint32_t GpioMcuRead( Gpio_t *obj );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __GPIO_BOARD_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __GPS_BOARD_H__
|
||||
#define __GPS_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "uart.h"
|
||||
|
||||
/*!
|
||||
@@ -71,4 +76,8 @@ void GpsMcuProcess( void );
|
||||
*/
|
||||
void GpsMcuIrqNotify( UartNotifyId_t id );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __GPS_BOARD_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __I2C_BOARD_H__
|
||||
#define __I2C_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "i2c.h"
|
||||
@@ -137,4 +142,8 @@ uint8_t I2cMcuWaitStandbyState( I2c_t *obj, uint8_t deviceAddr );
|
||||
*/
|
||||
void I2cSetAddrSize( I2c_t *obj, I2cAddrSize addrSize );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __I2C_BOARD_H__
|
||||
|
@@ -25,8 +25,10 @@
|
||||
#ifndef __LPM_BOARD_H__
|
||||
#define __LPM_BOARD_H__
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "board-config.h"
|
||||
|
74
components/connectivity/LoraWAN/boards_common/lr1110-board.h
Normal file
74
components/connectivity/LoraWAN/boards_common/lr1110-board.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/*!
|
||||
* \file lr1110-board.h
|
||||
*
|
||||
* \brief Target board LR1110 driver implementation
|
||||
*
|
||||
* \copyright Revised BSD License, see section \ref LICENSE.
|
||||
*
|
||||
* \code
|
||||
* ______ _
|
||||
* / _____) _ | |
|
||||
* ( (____ _____ ____ _| |_ _____ ____| |__
|
||||
* \____ \| ___ | (_ _) ___ |/ ___) _ \
|
||||
* _____) ) ____| | | || |_| ____( (___| | | |
|
||||
* (______/|_____)_|_|_| \__)_____)\____)_| |_|
|
||||
* (C)2013-2017 Semtech
|
||||
*
|
||||
* \endcode
|
||||
*
|
||||
* \author Miguel Luis ( Semtech )
|
||||
*
|
||||
* \author Gregory Cristian ( Semtech )
|
||||
*/
|
||||
#ifndef __LR1110_BOARD_H__
|
||||
#define __LR1110_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "lr1110.h"
|
||||
|
||||
/*!
|
||||
* \brief Initializes the radio I/Os pins interface
|
||||
*/
|
||||
void lr1110_board_init_io( const void* context );
|
||||
|
||||
/*!
|
||||
* \brief De-initializes the radio I/Os pins interface.
|
||||
*
|
||||
* \remark Useful when going in MCU low power modes
|
||||
*/
|
||||
void lr1110_board_deinit_io( const void* context );
|
||||
|
||||
/*!
|
||||
* \brief Initializes the radio debug pins.
|
||||
*/
|
||||
void lr1110_board_init_dbg_io( const void* context );
|
||||
|
||||
/*!
|
||||
* \brief Sets the radio output power.
|
||||
*
|
||||
* \param [IN] power Sets the RF output power
|
||||
*/
|
||||
void lr1110_board_set_rf_tx_power( const void* context, int8_t power );
|
||||
|
||||
/*!
|
||||
* \brief Gets the Defines the time required for the TCXO to wakeup [ms].
|
||||
*
|
||||
* \retval time Board TCXO wakeup time in ms.
|
||||
*/
|
||||
uint32_t lr1110_board_get_tcxo_wakeup_time( const void* context );
|
||||
|
||||
/*!
|
||||
* \brief Initializes the radio driver
|
||||
*/
|
||||
void lr1110_board_init( const void* context, lr1110_dio_irq_handler dio_irq );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __LR1110_BOARD_H__
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __PIN_NAME_BOARD_H__
|
||||
#define __PIN_NAME_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* STM32 Pin Names
|
||||
*/
|
||||
@@ -35,4 +40,8 @@
|
||||
PF_0, PF_1, PF_2, PF_3, PF_4, PF_5, PF_6, PF_7, PF_8, PF_9, PF_10, PF_11, PF_12, PF_13, PF_14, PF_15, \
|
||||
PH_0, PH_1, PH_2, PH_3, PH_4, PH_5, PH_6, PH_7, PH_8, PH_9, PH_10, PH_11, PH_12, PH_13, PH_14, PH_15
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __PIN_NAME_BOARD_H__
|
||||
|
@@ -23,8 +23,18 @@
|
||||
#ifndef __PIN_NAME_IOE_H__
|
||||
#define __PIN_NAME_IOE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
// SX1509 Pin Names
|
||||
#define IOE_PINS \
|
||||
IOE_0, IOE_1, IOE_2, IOE_3, IOE_4, IOE_5, IOE_6, IOE_7, \
|
||||
IOE_8, IOE_9, IOE_10, IOE_11, IOE_12, IOE_13, IOE_14, IOE_15
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __PIN_NAME_IOE_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __RTC_BOARD_H__
|
||||
#define __RTC_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "timer.h"
|
||||
@@ -30,22 +35,22 @@
|
||||
/*!
|
||||
* \brief Temperature coefficient of the clock source
|
||||
*/
|
||||
#define RTC_TEMP_COEFFICIENT ( -0.035 )
|
||||
#define RTC_TEMP_COEFFICIENT ( -0.035f )
|
||||
|
||||
/*!
|
||||
* \brief Temperature coefficient deviation of the clock source
|
||||
*/
|
||||
#define RTC_TEMP_DEV_COEFFICIENT ( 0.0035 )
|
||||
#define RTC_TEMP_DEV_COEFFICIENT ( 0.0035f )
|
||||
|
||||
/*!
|
||||
* \brief Turnover temperature of the clock source
|
||||
*/
|
||||
#define RTC_TEMP_TURNOVER ( 25.0 )
|
||||
#define RTC_TEMP_TURNOVER ( 25.0f )
|
||||
|
||||
/*!
|
||||
* \brief Turnover temperature deviation of the clock source
|
||||
*/
|
||||
#define RTC_TEMP_DEV_TURNOVER ( 5.0 )
|
||||
#define RTC_TEMP_DEV_TURNOVER ( 5.0f )
|
||||
|
||||
/*!
|
||||
* \brief Initializes the RTC timer
|
||||
@@ -189,4 +194,8 @@ void RtcProcess( void );
|
||||
*/
|
||||
TimerTime_t RtcTempCompensation( TimerTime_t period, float temperature );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __RTC_BOARD_H__
|
||||
|
@@ -23,8 +23,17 @@
|
||||
#ifndef __SPI_BOARD_H__
|
||||
#define __SPI_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "spi.h"
|
||||
|
||||
// An Spi.c file has to be implmented under system directory.
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __SPI_BOARD_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __SX126x_BOARD_H__
|
||||
#define __SX126x_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "sx126x/sx126x.h"
|
||||
@@ -46,6 +51,16 @@ void SX126xIoIrqInit( DioIrqHandler dioIrq );
|
||||
*/
|
||||
void SX126xIoDeInit( void );
|
||||
|
||||
/*!
|
||||
* \brief Initializes the TCXO power pin.
|
||||
*/
|
||||
void SX126xIoTcxoInit( void );
|
||||
|
||||
/*!
|
||||
* \brief Initializes the radio debug pins.
|
||||
*/
|
||||
void SX126xIoDbgInit( void );
|
||||
|
||||
/*!
|
||||
* \brief HW Reset of the radio
|
||||
*/
|
||||
@@ -76,8 +91,10 @@ void SX126xWriteCommand( RadioCommands_t opcode, uint8_t *buffer, uint16_t size
|
||||
* \param [in] opcode Opcode of the command
|
||||
* \param [out] buffer Buffer holding data from the radio
|
||||
* \param [in] size Size of the buffer
|
||||
*
|
||||
* \retval status Return command radio status
|
||||
*/
|
||||
void SX126xReadCommand( RadioCommands_t opcode, uint8_t *buffer, uint16_t size );
|
||||
uint8_t SX126xReadCommand( RadioCommands_t opcode, uint8_t *buffer, uint16_t size );
|
||||
|
||||
/*!
|
||||
* \brief Write a single byte of data to the radio memory
|
||||
@@ -156,4 +173,8 @@ void SX126xDbgPinRxWrite( uint8_t state );
|
||||
*/
|
||||
extern SX126x_t SX126x;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __SX126x_BOARD_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __SX1272_BOARD_H__
|
||||
#define __SX1272_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "sx1272/sx1272.h"
|
||||
@@ -72,6 +77,16 @@ void SX1272IoIrqInit( DioIrqHandler **irqHandlers );
|
||||
*/
|
||||
void SX1272IoDeInit( void );
|
||||
|
||||
/*!
|
||||
* \brief Initializes the TCXO power pin.
|
||||
*/
|
||||
void SX1272IoTcxoInit( void );
|
||||
|
||||
/*!
|
||||
* \brief Initializes the radio debug pins.
|
||||
*/
|
||||
void SX1272IoDbgInit( void );
|
||||
|
||||
/*!
|
||||
* \brief Resets the radio
|
||||
*/
|
||||
@@ -120,6 +135,13 @@ void SX1272SetAntSw( uint8_t opMode );
|
||||
*/
|
||||
bool SX1272CheckRfFrequency( uint32_t frequency );
|
||||
|
||||
/*!
|
||||
* \brief Enables/disables the TCXO if available on board design.
|
||||
*
|
||||
* \param [IN] state TCXO enabled when true and disabled when false.
|
||||
*/
|
||||
void SX1272SetBoardTcxo( uint8_t state );
|
||||
|
||||
/*!
|
||||
* \brief Gets the Defines the time required for the TCXO to wakeup [ms].
|
||||
*
|
||||
@@ -146,4 +168,8 @@ void SX1272DbgPinRxWrite( uint8_t state );
|
||||
*/
|
||||
extern SX1272_t SX1272;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __SX1272_BOARD_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __SX1276_BOARD_H__
|
||||
#define __SX1276_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "sx1276/sx1276.h"
|
||||
@@ -73,6 +78,16 @@ void SX1276IoIrqInit( DioIrqHandler **irqHandlers );
|
||||
*/
|
||||
void SX1276IoDeInit( void );
|
||||
|
||||
/*!
|
||||
* \brief Initializes the TCXO power pin.
|
||||
*/
|
||||
void SX1276IoTcxoInit( void );
|
||||
|
||||
/*!
|
||||
* \brief Initializes the radio debug pins.
|
||||
*/
|
||||
void SX1276IoDbgInit( void );
|
||||
|
||||
/*!
|
||||
* \brief Resets the radio
|
||||
*/
|
||||
@@ -121,6 +136,13 @@ void SX1276SetAntSw( uint8_t opMode );
|
||||
*/
|
||||
bool SX1276CheckRfFrequency( uint32_t frequency );
|
||||
|
||||
/*!
|
||||
* \brief Enables/disables the TCXO if available on board design.
|
||||
*
|
||||
* \param [IN] state TCXO enabled when true and disabled when false.
|
||||
*/
|
||||
void SX1276SetBoardTcxo( uint8_t state );
|
||||
|
||||
/*!
|
||||
* \brief Gets the Defines the time required for the TCXO to wakeup [ms].
|
||||
*
|
||||
@@ -147,4 +169,8 @@ void SX1276DbgPinRxWrite( uint8_t state );
|
||||
*/
|
||||
extern SX1276_t SX1276;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __SX1276_BOARD_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __UART_BOARD_H__
|
||||
#define __UART_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "uart.h"
|
||||
|
||||
@@ -96,4 +101,8 @@ uint8_t UartMcuGetChar( Uart_t *obj, uint8_t *data );
|
||||
*/
|
||||
uint8_t UartMcuGetBuffer( Uart_t *obj, uint8_t *buffer, uint16_t size, uint16_t *nbReadBytes );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __UART_BOARD_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __UART_USB_BOARD_H__
|
||||
#define __UART_USB_BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "uart.h"
|
||||
|
||||
@@ -90,4 +95,8 @@ uint8_t UartUsbPutChar( Uart_t *obj, uint8_t data );
|
||||
*/
|
||||
uint8_t UartUsbGetChar( Uart_t *obj, uint8_t *data );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __UART_USB_BOARD_H__
|
||||
|
@@ -23,6 +23,11 @@
|
||||
#ifndef __UTILITIES_H__
|
||||
#define __UTILITIES_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*!
|
||||
@@ -43,7 +48,9 @@
|
||||
* \param [IN] b 2nd value
|
||||
* \retval minValue Minimum value
|
||||
*/
|
||||
#ifndef MIN
|
||||
#define MIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* \brief Returns the maximum value between a and b
|
||||
@@ -52,7 +59,9 @@
|
||||
* \param [IN] b 2nd value
|
||||
* \retval maxValue Maximum value
|
||||
*/
|
||||
#ifndef MAX
|
||||
#define MAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* \brief Returns 2 raised to the power of n
|
||||
@@ -69,8 +78,8 @@ typedef union Version_u
|
||||
{
|
||||
struct Version_s
|
||||
{
|
||||
uint8_t Rfu;
|
||||
uint8_t Revision;
|
||||
uint8_t Patch;
|
||||
uint8_t Minor;
|
||||
uint8_t Major;
|
||||
}Fields;
|
||||
@@ -162,4 +171,8 @@ void BoardCriticalSectionBegin( uint32_t *mask );
|
||||
*/
|
||||
void BoardCriticalSectionEnd( uint32_t *mask );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __UTILITIES_H__
|
||||
|
Reference in New Issue
Block a user