Skip to content

Commit bdee279

Browse files
author
Matthieu Antoine
committed
Release v2.0.0
1 parent d511076 commit bdee279

18 files changed

+1042
-1207
lines changed

CHANGELOG.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
1-
# LR1110 Modem Driver Changelog
1+
# LR1110 modem driver changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
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).
6+
7+
## [v2.0.0] 2020-10-23
8+
9+
### Added
10+
11+
### Changed
12+
13+
* `lr1110_modem_almanac_read_by_index` is renamed `lr1110_modem_gnss_almanac_read_by_index`
14+
* `lr1110_modem_gnss_scan_autonomous_md` takes an effort mode as parameter
15+
16+
### Fixed
17+
18+
* Various compilation warnings
19+
* Harmonization of the documentation
220

321
## [v1.0.0] 2020-10-19
422

5-
Initial release
23+
### Added
24+
25+
* Initial release

src/lr1110_bootloader.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
2-
* \file lr1110_bootloader.c
2+
* @file lr1110_bootloader.c
33
*
4-
* \brief Bootloader driver implementation for LR1110
4+
* @brief Bootloader driver implementation for LR1110
55
*
66
* Revised BSD License
77
* Copyright Semtech Corporation 2020. All rights reserved.
@@ -20,8 +20,8 @@
2020
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2121
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2222
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23-
* ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH S.A. BE LIABLE FOR ANY DIRECT,
24-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
* ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY
24+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2525
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2626
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2727
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
@@ -103,30 +103,30 @@ uint32_t min( uint32_t a, uint32_t b )
103103
}
104104

105105
/*!
106-
* \brief Helper function to fill cbuffer with opcode and offset
106+
* @brief Helper function to fill cbuffer with opcode and offset
107107
*
108108
* Typically used in write flash functions.
109109
*
110-
* \warning It is up to the caller to ensure the size of cbuffer is big enough to contain all information!
110+
* @warning It is up to the caller to ensure the size of cbuffer is big enough to contain all information!
111111
*/
112112
static void lr1110_bootloader_fill_cbuffer_opcode_offset_flash( uint8_t* cbuffer, uint16_t opcode, uint32_t offset );
113113

114114
/*!
115-
* \brief Helper function to fill cdata with data
115+
* @brief Helper function to fill cdata with data
116116
*
117117
* Typically used in write flash functions.
118118
*
119-
* \warning It is up to the caller to ensure the size of cdata is big enough to contain all data!
119+
* @warning It is up to the caller to ensure the size of cdata is big enough to contain all data!
120120
*/
121121
static void lr1110_bootloader_fill_cdata_flash( uint8_t* cdata, const uint32_t* data, uint8_t data_length );
122122

123123
/*!
124-
* \brief Helper function to fill cbuffer and cdata with information to write flash
124+
* @brief Helper function to fill cbuffer and cdata with information to write flash
125125
*
126126
* Typically used in write flash functions. Internally calls lr1110_bootloader_fill_cbuffer_opcode_offset_flash and
127127
* lr1110_bootloader_fill_cdata_flash.
128128
*
129-
* \warning It is up to the caller to ensure the sizes of cbuffer and cdata are big enough to contain their respective
129+
* @warning It is up to the caller to ensure the sizes of cbuffer and cdata are big enough to contain their respective
130130
* information!
131131
*/
132132
static void lr1110_bootloader_fill_cbuffer_cdata_flash( uint8_t* cbuffer, uint8_t* cdata, uint16_t opcode,

src/lr1110_bootloader.h

Lines changed: 60 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
2-
* \file lr1110_bootloader.h
2+
* @file lr1110_bootloader.h
33
*
4-
* \brief Bootloader driver definition for LR1110
4+
* @brief Bootloader driver definition for LR1110
55
*
66
* Revised BSD License
77
* Copyright Semtech Corporation 2020. All rights reserved.
@@ -20,17 +20,17 @@
2020
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2121
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2222
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23-
* ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH S.A. BE LIABLE FOR ANY DIRECT,
24-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
* ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY
24+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2525
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2626
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2727
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2828
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2929
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
*/
3131

32-
#ifndef __LR1110_BOOTLOADER_H__
33-
#define __LR1110_BOOTLOADER_H__
32+
#ifndef LR1110_BOOTLOADER_H
33+
#define LR1110_BOOTLOADER_H
3434

3535
/*
3636
* -----------------------------------------------------------------------------
@@ -65,174 +65,156 @@ extern "C" {
6565
*/
6666

6767
/*!
68-
* \brief Return the version of the system (hardware and software)
68+
* @brief Return the version of the system (hardware and software)
6969
*
70-
* \param [in] context Chip implementation context
70+
* @param [in] context Chip implementation context
71+
* @param [out] version Pointer to the structure holding the system version
7172
*
72-
* \param [out] version Pointer to the structure holding the system version
73-
*
74-
* \returns Operation status
73+
* @returns Operation status
7574
*/
7675
lr1110_status_t lr1110_bootloader_get_version( const void* context, lr1110_bootloader_version_t* version );
7776

7877
/*!
79-
* \brief Erase the whole flash memory of the chip
78+
* @brief Erase the whole flash memory of the chip
8079
*
8180
* This function shall be called before any attempt to write a new firmware in flash memory
8281
*
83-
* \param [in] context Chip implementation context
82+
* @param [in] context Chip implementation context
8483
*
85-
* \returns Operation status
84+
* @returns Operation status
8685
*/
8786
lr1110_status_t lr1110_bootloader_erase_flash( const void* context );
8887

8988
/*!
90-
* \brief Erase the specified page in the flash memory
91-
*
92-
* \param [in] context Chip implementation context
89+
* @brief Erase the specified page in the flash memory
9390
*
94-
* \param [in] page_number The index of the page to erase
91+
* @param [in] context Chip implementation context
92+
* @param [in] page_number The index of the page to erase
9593
*
96-
* \returns Operation status
94+
* @returns Operation status
9795
*/
9896
lr1110_status_t lr1110_bootloader_erase_page( const void* context, const uint8_t page_number );
9997

10098
/*!
101-
* \brief Write data in program flash memory of the chip
99+
* @brief Write data in program flash memory of the chip
102100
*
103101
* This function shall be used when updating the flash content of the LR1110.
104102
* The flash payload to transfer shall be represented as an array of words (ie 4 bytes values).
105103
*
106-
* \param [in] context Chip implementation context
107-
*
108-
* \param [in] offset The offset from start register of flash
109-
*
110-
* \param [in] buffer A pointer to the buffer holding the content of flash to transfert. Its size in words must be at
104+
* @param [in] context Chip implementation context
105+
* @param [in] offset The offset from start register of flash
106+
* @param [in] buffer A pointer to the buffer holding the content of flash to transfert. Its size in words must be at
111107
* least length
108+
* @param [in] length Number of words (i.e. 4 bytes) in the buffer to transfer
112109
*
113-
* \param [in] length Number of words (i.e. 4 bytes) in the buffer to transfer
114-
*
115-
* \returns Operation status
110+
* @returns Operation status
116111
*/
117112
lr1110_status_t lr1110_bootloader_write_flash( const void* context, const uint32_t offset, const uint32_t* buffer,
118113
const uint8_t length );
119114

120115
/*!
121-
* \brief Write data in program flash memory of the chip
116+
* @brief Write data in program flash memory of the chip
122117
*
123118
* This function shall be used when updating the flash content of the LR1110.
124119
* The flash payload to transfer shall be represented as an array of words (i.e. 4 bytes values).
125120
*
126-
* \param [in] context Chip implementation context
127-
*
128-
* \param [in] offset The offset from start register of flash
129-
*
130-
* \param [in] buffer A pointer to the buffer holding the content of flash to transfert. Its size in words must be at
121+
* @param [in] context Chip implementation context
122+
* @param [in] offset The offset from start register of flash
123+
* @param [in] buffer A pointer to the buffer holding the content of flash to transfert. Its size in words must be at
131124
* least length
125+
* @param [in] length Number of words (i.e. 4 bytes) in the buffer to transfer
132126
*
133-
* \param [in] length Number of words (i.e. 4 bytes) in the buffer to transfer
134-
*
135-
* \returns Operation status
127+
* @returns Operation status
136128
*/
137129
lr1110_status_t lr1110_bootloader_write_flash_full( const void* context, const uint32_t offset, const uint32_t* buffer,
138130
const uint32_t length );
139131

140132
/*!
141-
* \brief Write encrypted data in program flash memory of the chip
133+
* @brief Write encrypted data in program flash memory of the chip
142134
*
143135
* This function shall be used when updating the encrypted flash content of the LR1110.
144136
* The encrypted flash payload to transfer shall be represented as an array of words (i.e. 4 bytes values).
145137
*
146-
* \param [in] context Chip implementation context
147-
*
148-
* \param [in] offset The offset from start register of flash
138+
* @param [in] context Chip implementation context
139+
* @param [in] offset The offset from start register of flash
140+
* @param [in] buffer A pointer to the buffer holding the encrypted content of flash to transfert. Its size in words
141+
* must be at least length
142+
* @param [in] length Number of words (i.e. 4 bytes) in the buffer to transfer
149143
*
150-
* \param [in] buffer A pointer to the buffer holding the encrypted content of
151-
* flash to transfert. Its size in words must be at least length
152-
*
153-
* \param [in] length Number of words (i.e. 4 bytes) in the buffer to transfer
154-
*
155-
* \returns Operation status
144+
* @returns Operation status
156145
*/
157146
lr1110_status_t lr1110_bootloader_write_flash_encrypted( const void* context, const uint32_t offset,
158147
const uint32_t* buffer, const uint8_t length );
159148

160149
/*!
161-
* \brief Write encrypted data in program flash memory of the chip
150+
* @brief Write encrypted data in program flash memory of the chip
162151
*
163152
* This function shall be used when updating the encrypted flash content of the LR1110.
164153
* The encrypted flash payload to transfer shall be represented as an array of words (ie 4 * bytes values).
165154
*
166-
* \param [in] context Chip implementation context
167-
*
168-
* \param [in] offset The offset from start register of flash
169-
*
170-
* \param [in] buffer A pointer to the buffer holding the encrypted content of
171-
* flash to transfert. Its size in words must be at least length
172-
*
173-
* \param [in] length Number of words (i.e. 4 bytes) in the buffer to transfer
155+
* @param [in] context Chip implementation context
156+
* @param [in] offset The offset from start register of flash
157+
* @param [in] buffer A pointer to the buffer holding the encrypted content of flash to transfert. Its size in words
158+
* must be at least length
159+
* @param [in] length Number of words (i.e. 4 bytes) in the buffer to transfer
174160
*
175-
* \returns Operation status
161+
* @returns Operation status
176162
*/
177163
lr1110_status_t lr1110_bootloader_write_flash_encrypted_full( const void* context, const uint32_t offset,
178164
const uint32_t* buffer, const uint32_t length );
179165

180166
/*!
181-
* \brief Get calculated hash of flash content.
167+
* @brief Get calculated hash of flash content.
182168
*
183169
* This method should be used to get the hash of flash content.
184170
*
185-
* \param [in] context Chip implementation context
171+
* @param [in] context Chip implementation context
172+
* @param [out] hash Pointer to the hash array to be populated with hash value
186173
*
187-
* \param [out] hash Pointer to the hash array to be populated with hash value
188-
*
189-
* \returns Operation status
174+
* @returns Operation status
190175
*/
191176
lr1110_status_t lr1110_bootloader_get_hash( const void* context, lr1110_bootloader_hash_t hash );
192177

193178
/*!
194-
* \brief Software reset of the chip.
179+
* @brief Software reset of the chip.
195180
*
196181
* This method should be used to reboot the chip in a specified mode.
197182
* Rebooting in flash mode presumes that the content in flash memory is not corrupted (i.e. the integrity check
198183
* performed by the bootloader before executing the first instruction in flash is OK).
199184
*
200-
* \param [in] context Chip implementation context
201-
*
202-
* \param [in] stay_in_bootloader Selector to stay in bootloader or execute flash code after reboot. If true, the
185+
* @param [in] context Chip implementation context
186+
* @param [in] stay_in_bootloader Selector to stay in bootloader or execute flash code after reboot. If true, the
203187
* bootloader will not execute the flash code but activate SPI interface to allow firmware upgrade
204188
*
205-
* \returns Operation status
189+
* @returns Operation status
206190
*/
207191
lr1110_status_t lr1110_bootloader_reboot( const void* context, const bool stay_in_bootloader );
208192

209193
/*!
210-
* \brief Returns the 4-byte PIN which can be used to register a device on cloud
194+
* @brief Returns the 4-byte PIN which can be used to register a device on cloud
211195
* services.
212196
*
213-
* \param [in] context Chip implementation context
197+
* @param [in] context Chip implementation context
198+
* @param [out] pin Pointer to the array to be populated with the PIN
214199
*
215-
* \param [out] pin Pointer to the array to be populated with the PIN
216-
*
217-
* \returns Operation status
200+
* @returns Operation status
218201
*/
219202
lr1110_status_t lr1110_bootloader_read_pin( const void* context, lr1110_bootloader_pin_t pin );
220203

221204
/*!
222-
* \brief Returns the 8-byte the factory UUID.
223-
*
224-
* \param [in] context Chip implementation context
205+
* @brief Returns the 8-byte the factory UUID.
225206
*
226-
* \param [out] chip_eui Pointer to the array to be populated with the chip eui
207+
* @param [in] context Chip implementation context
208+
* @param [out] chip_eui Pointer to the array to be populated with the chip eui
227209
*
228-
* \returns Operation status
210+
* @returns Operation status
229211
*/
230212
lr1110_status_t lr1110_bootloader_read_chip_eui( const void* context, lr1110_bootloader_chip_eui_t chip_eui );
231213

232214
#ifdef __cplusplus
233215
}
234216
#endif
235217

236-
#endif // __LR1110_BOOTLOADER_H__
218+
#endif // LR1110_BOOTLOADER_H
237219

238220
/* --- EOF ------------------------------------------------------------------ */

0 commit comments

Comments
 (0)