Skip to content

Commit

Permalink
Release v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
smtc-bot committed Jun 29, 2023
1 parent de10d43 commit a82429d
Show file tree
Hide file tree
Showing 6 changed files with 254 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.2.0] - 2023-03-27

### Added

- `llcc68_driver_version_get_version_string()` function - produces a c-string representation of the driver version
- `LLCC68_DRIVER_VERSION_CHECK` macro - validates the provided version information is compatible with the driver

## [2.1.0] - 2022-05-18

### Added

- `llcc68_set_gfsk_pkt_address()` function - configure both GFSK node and brodcast filtering addresses
- `llcc68_handle_rx_done()` function - perform all requested actions when the chip leaves the Rx mode

## [2.0.1] - 2021-11-23

### Added
Expand Down
13 changes: 13 additions & 0 deletions src/llcc68.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,14 @@ llcc68_status_t llcc68_set_lora_pkt_params( const void* context, const llcc68_pk
return status;
}

llcc68_status_t llcc68_set_gfsk_pkt_address( const void* context, const uint8_t node_address,
const uint8_t broadcast_address )
{
const uint8_t addresses[2] = { node_address, broadcast_address };

return llcc68_write_register( context, LLCC68_REG_GFSK_NODE_ADDRESS, addresses, 2 );
}

llcc68_status_t llcc68_set_cad_params( const void* context, const llcc68_cad_params_t* params )
{
const uint8_t buf[LLCC68_SIZE_SET_CAD_PARAMS] = {
Expand Down Expand Up @@ -1241,6 +1249,11 @@ uint32_t llcc68_convert_timeout_in_ms_to_rtc_step( uint32_t timeout_in_ms )
return ( uint32_t )( timeout_in_ms * ( LLCC68_RTC_FREQ_IN_HZ / 1000 ) );
}

llcc68_status_t llcc68_handle_rx_done( const void* context )
{
return llcc68_stop_rtc( context );
}

//
// Registers access
//
Expand Down
35 changes: 35 additions & 0 deletions src/llcc68.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ extern "C" {
*/
#define LLCC68_OCP_PARAM_VALUE_140_MA 0x38

/**
* @brief XTA and XTB trimming capacitor default value after the chip entered @ref LLCC68_STANDBY_CFG_XOSC mode
*/
#define LLCC68_XTAL_TRIMMING_CAPACITOR_DEFAULT_VALUE_STDBY_XOSC 0x12

/**
* @brief Maximum value for parameter nb_of_symbs in @ref llcc68_set_lora_symb_nb_timeout
*/
Expand Down Expand Up @@ -713,6 +718,8 @@ llcc68_status_t llcc68_set_tx_with_timeout_in_rtc_step( const void* context, con
* | ----------------------| --------------------------------------------------------------------------------------|
* | LLCC68_RX_SINGLE_MODE | Single: the chip stays in RX mode until a reception occurs, then switch to standby RC |
*
* @remark Refer to @ref llcc68_handle_rx_done
*
* @param [in] context Chip implementation context
* @param [in] timeout_in_ms The timeout configuration in millisecond for Rx operation
*
Expand Down Expand Up @@ -741,6 +748,8 @@ llcc68_status_t llcc68_set_rx( const void* context, const uint32_t timeout_in_ms
* | LLCC68_RX_SINGLE_MODE | Single: the chip stays in RX mode until a reception occurs, then switch to standby RC |
* | LLCC68_RX_CONTINUOUS | Continuous: the chip stays in RX mode even after reception of a packet |
*
* @remark Refer to @ref llcc68_handle_rx_done
*
* @param [in] context Chip implementation context
* @param [in] timeout_in_rtc_step The timeout configuration for Rx operation
*
Expand Down Expand Up @@ -1174,6 +1183,20 @@ llcc68_status_t llcc68_set_gfsk_pkt_params( const void* context, const llcc68_pk
*/
llcc68_status_t llcc68_set_lora_pkt_params( const void* context, const llcc68_pkt_params_lora_t* params );

/*!
* @brief Set the Node and Broadcast address used for GFSK
*
* This setting is used only when filtering is enabled.
*
* @param [in] context Chip implementation context
* @param [in] node_address The node address used as filter
* @param [in] broadcast_address The broadcast address used as filter
*
* @returns Operation status
*/
llcc68_status_t llcc68_set_gfsk_pkt_address( const void* context, const uint8_t node_address,
const uint8_t broadcast_address );

/**
* @brief Set the parameters for CAD operation
*
Expand Down Expand Up @@ -1448,6 +1471,18 @@ uint32_t llcc68_convert_freq_in_hz_to_pll_step( uint32_t freq_in_hz );
*/
uint32_t llcc68_convert_timeout_in_ms_to_rtc_step( uint32_t timeout_in_ms );

/**
* @brief Generic finalizing function after reception
*
* @remark This function can be called after any reception sequence and must be called after any reception with timeout
* active sequence.
*
* @param [in] context Chip implementation context
*
* @returns Operation status
*/
llcc68_status_t llcc68_handle_rx_done( const void* context );

//
// Registers access
//
Expand Down
88 changes: 88 additions & 0 deletions src/llcc68_driver_version.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*!
* @file llcc68_driver_version.c
*
* @brief Placeholder to keep the version of LLCC68 driver.
*
* The Clear BSD License
* Copyright Semtech Corporation 2023. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the disclaimer
* below) provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Semtech corporation nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
* THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

/*
* -----------------------------------------------------------------------------
* --- DEPENDENCIES ------------------------------------------------------------
*/

#include "llcc68_driver_version.h"

/*
* -----------------------------------------------------------------------------
* --- PRIVATE MACROS-----------------------------------------------------------
*/

#define STR_HELPER( x ) #x
#define STR( x ) STR_HELPER( x )

#define LLCC68_DRIVER_VERSION_FULL \
"v" STR( LLCC68_DRIVER_VERSION_MAJOR ) "." STR( LLCC68_DRIVER_VERSION_MINOR ) "." STR( LLCC68_DRIVER_VERSION_PATCH )

/*
* -----------------------------------------------------------------------------
* --- PRIVATE CONSTANTS -------------------------------------------------------
*/

/*
* -----------------------------------------------------------------------------
* --- PRIVATE TYPES -----------------------------------------------------------
*/

/*
* -----------------------------------------------------------------------------
* --- PRIVATE VARIABLES -------------------------------------------------------
*/

/*
* -----------------------------------------------------------------------------
* --- PRIVATE FUNCTIONS DECLARATION -------------------------------------------
*/

/*
* -----------------------------------------------------------------------------
* --- PUBLIC FUNCTIONS DEFINITION ---------------------------------------------
*/

const char* llcc68_driver_version_get_version_string( void )
{
return ( const char* ) LLCC68_DRIVER_VERSION_FULL;
}

/*
* -----------------------------------------------------------------------------
* --- PRIVATE FUNCTIONS DEFINITION --------------------------------------------
*/

/* --- EOF ------------------------------------------------------------------ */
90 changes: 90 additions & 0 deletions src/llcc68_driver_version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/*!
* @file llcc68_driver_version.h
*
* @brief Placeholder to keep the version of LLCC68 driver.
*
* The Clear BSD License
* Copyright Semtech Corporation 2023. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the disclaimer
* below) provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Semtech corporation nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
* THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef LLCC68_DRIVER_VERSION_H
#define LLCC68_DRIVER_VERSION_H

#ifdef __cplusplus
extern "C" {
#endif

/*
* -----------------------------------------------------------------------------
* --- DEPENDENCIES ------------------------------------------------------------
*/

/*
* -----------------------------------------------------------------------------
* --- PUBLIC MACROS -----------------------------------------------------------
*/

/*
* -----------------------------------------------------------------------------
* --- PUBLIC CONSTANTS --------------------------------------------------------
*/

#define LLCC68_DRIVER_VERSION_MAJOR 2
#define LLCC68_DRIVER_VERSION_MINOR 2
#define LLCC68_DRIVER_VERSION_PATCH 0

/*
* -----------------------------------------------------------------------------
* --- PUBLIC TYPES ------------------------------------------------------------
*/

/*
* -----------------------------------------------------------------------------
* --- PUBLIC FUNCTIONS PROTOTYPES ---------------------------------------------
*/

/*!
* @brief Compare version information with current ones
*
* This macro expands to true boolean value if the version information provided in argument is compatible or
* retro-compatible with the version of this code base
*/
#define LLCC68_DRIVER_VERSION_CHECK( x, y, z ) \
( x == LLCC68_DRIVER_VERSION_MAJOR && \
( y < LLCC68_DRIVER_VERSION_MINOR || \
( y == LLCC68_DRIVER_VERSION_MINOR && z <= LLCC68_DRIVER_VERSION_PATCH ) ) )

const char* llcc68_driver_version_get_version_string( void );

#ifdef __cplusplus
}
#endif

#endif // LLCC68_DRIVER_VERSION_H

/* --- EOF ------------------------------------------------------------------ */
14 changes: 14 additions & 0 deletions src/llcc68_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,20 @@
*/
#define LLCC68_REG_RETENTION_LIST_BASE_ADDRESS 0x029F

/**
* @brief GFSK node address
*
* @remark Reset value is 0x00
*/
#define LLCC68_REG_GFSK_NODE_ADDRESS 0x06CD

/**
* @brief GFSK broadcast address
*
* @remark Reset value is 0x00
*/
#define LLCC68_REG_GFSK_BROADCAST_ADDRESS 0x06CE

/*
* -----------------------------------------------------------------------------
* --- PUBLIC TYPES ------------------------------------------------------------
Expand Down

0 comments on commit a82429d

Please sign in to comment.