|
1 | 1 | /*!
|
2 |
| - * \file lr1110_bootloader.h |
| 2 | + * @file lr1110_bootloader.h |
3 | 3 | *
|
4 |
| - * \brief Bootloader driver definition for LR1110 |
| 4 | + * @brief Bootloader driver definition for LR1110 |
5 | 5 | *
|
6 | 6 | * Revised BSD License
|
7 | 7 | * Copyright Semtech Corporation 2020. All rights reserved.
|
|
20 | 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
21 | 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
22 | 22 | * 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 |
25 | 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
26 | 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
27 | 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
28 | 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
29 | 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
30 | 30 | */
|
31 | 31 |
|
32 |
| -#ifndef __LR1110_BOOTLOADER_H__ |
33 |
| -#define __LR1110_BOOTLOADER_H__ |
| 32 | +#ifndef LR1110_BOOTLOADER_H |
| 33 | +#define LR1110_BOOTLOADER_H |
34 | 34 |
|
35 | 35 | /*
|
36 | 36 | * -----------------------------------------------------------------------------
|
@@ -65,174 +65,156 @@ extern "C" {
|
65 | 65 | */
|
66 | 66 |
|
67 | 67 | /*!
|
68 |
| - * \brief Return the version of the system (hardware and software) |
| 68 | + * @brief Return the version of the system (hardware and software) |
69 | 69 | *
|
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 |
71 | 72 | *
|
72 |
| - * \param [out] version Pointer to the structure holding the system version |
73 |
| - * |
74 |
| - * \returns Operation status |
| 73 | + * @returns Operation status |
75 | 74 | */
|
76 | 75 | lr1110_status_t lr1110_bootloader_get_version( const void* context, lr1110_bootloader_version_t* version );
|
77 | 76 |
|
78 | 77 | /*!
|
79 |
| - * \brief Erase the whole flash memory of the chip |
| 78 | + * @brief Erase the whole flash memory of the chip |
80 | 79 | *
|
81 | 80 | * This function shall be called before any attempt to write a new firmware in flash memory
|
82 | 81 | *
|
83 |
| - * \param [in] context Chip implementation context |
| 82 | + * @param [in] context Chip implementation context |
84 | 83 | *
|
85 |
| - * \returns Operation status |
| 84 | + * @returns Operation status |
86 | 85 | */
|
87 | 86 | lr1110_status_t lr1110_bootloader_erase_flash( const void* context );
|
88 | 87 |
|
89 | 88 | /*!
|
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 |
93 | 90 | *
|
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 |
95 | 93 | *
|
96 |
| - * \returns Operation status |
| 94 | + * @returns Operation status |
97 | 95 | */
|
98 | 96 | lr1110_status_t lr1110_bootloader_erase_page( const void* context, const uint8_t page_number );
|
99 | 97 |
|
100 | 98 | /*!
|
101 |
| - * \brief Write data in program flash memory of the chip |
| 99 | + * @brief Write data in program flash memory of the chip |
102 | 100 | *
|
103 | 101 | * This function shall be used when updating the flash content of the LR1110.
|
104 | 102 | * The flash payload to transfer shall be represented as an array of words (ie 4 bytes values).
|
105 | 103 | *
|
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 |
111 | 107 | * least length
|
| 108 | + * @param [in] length Number of words (i.e. 4 bytes) in the buffer to transfer |
112 | 109 | *
|
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 |
116 | 111 | */
|
117 | 112 | lr1110_status_t lr1110_bootloader_write_flash( const void* context, const uint32_t offset, const uint32_t* buffer,
|
118 | 113 | const uint8_t length );
|
119 | 114 |
|
120 | 115 | /*!
|
121 |
| - * \brief Write data in program flash memory of the chip |
| 116 | + * @brief Write data in program flash memory of the chip |
122 | 117 | *
|
123 | 118 | * This function shall be used when updating the flash content of the LR1110.
|
124 | 119 | * The flash payload to transfer shall be represented as an array of words (i.e. 4 bytes values).
|
125 | 120 | *
|
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 |
131 | 124 | * least length
|
| 125 | + * @param [in] length Number of words (i.e. 4 bytes) in the buffer to transfer |
132 | 126 | *
|
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 |
136 | 128 | */
|
137 | 129 | lr1110_status_t lr1110_bootloader_write_flash_full( const void* context, const uint32_t offset, const uint32_t* buffer,
|
138 | 130 | const uint32_t length );
|
139 | 131 |
|
140 | 132 | /*!
|
141 |
| - * \brief Write encrypted data in program flash memory of the chip |
| 133 | + * @brief Write encrypted data in program flash memory of the chip |
142 | 134 | *
|
143 | 135 | * This function shall be used when updating the encrypted flash content of the LR1110.
|
144 | 136 | * The encrypted flash payload to transfer shall be represented as an array of words (i.e. 4 bytes values).
|
145 | 137 | *
|
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 |
149 | 143 | *
|
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 |
156 | 145 | */
|
157 | 146 | lr1110_status_t lr1110_bootloader_write_flash_encrypted( const void* context, const uint32_t offset,
|
158 | 147 | const uint32_t* buffer, const uint8_t length );
|
159 | 148 |
|
160 | 149 | /*!
|
161 |
| - * \brief Write encrypted data in program flash memory of the chip |
| 150 | + * @brief Write encrypted data in program flash memory of the chip |
162 | 151 | *
|
163 | 152 | * This function shall be used when updating the encrypted flash content of the LR1110.
|
164 | 153 | * The encrypted flash payload to transfer shall be represented as an array of words (ie 4 * bytes values).
|
165 | 154 | *
|
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 |
174 | 160 | *
|
175 |
| - * \returns Operation status |
| 161 | + * @returns Operation status |
176 | 162 | */
|
177 | 163 | lr1110_status_t lr1110_bootloader_write_flash_encrypted_full( const void* context, const uint32_t offset,
|
178 | 164 | const uint32_t* buffer, const uint32_t length );
|
179 | 165 |
|
180 | 166 | /*!
|
181 |
| - * \brief Get calculated hash of flash content. |
| 167 | + * @brief Get calculated hash of flash content. |
182 | 168 | *
|
183 | 169 | * This method should be used to get the hash of flash content.
|
184 | 170 | *
|
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 |
186 | 173 | *
|
187 |
| - * \param [out] hash Pointer to the hash array to be populated with hash value |
188 |
| - * |
189 |
| - * \returns Operation status |
| 174 | + * @returns Operation status |
190 | 175 | */
|
191 | 176 | lr1110_status_t lr1110_bootloader_get_hash( const void* context, lr1110_bootloader_hash_t hash );
|
192 | 177 |
|
193 | 178 | /*!
|
194 |
| - * \brief Software reset of the chip. |
| 179 | + * @brief Software reset of the chip. |
195 | 180 | *
|
196 | 181 | * This method should be used to reboot the chip in a specified mode.
|
197 | 182 | * Rebooting in flash mode presumes that the content in flash memory is not corrupted (i.e. the integrity check
|
198 | 183 | * performed by the bootloader before executing the first instruction in flash is OK).
|
199 | 184 | *
|
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 |
203 | 187 | * bootloader will not execute the flash code but activate SPI interface to allow firmware upgrade
|
204 | 188 | *
|
205 |
| - * \returns Operation status |
| 189 | + * @returns Operation status |
206 | 190 | */
|
207 | 191 | lr1110_status_t lr1110_bootloader_reboot( const void* context, const bool stay_in_bootloader );
|
208 | 192 |
|
209 | 193 | /*!
|
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 |
211 | 195 | * services.
|
212 | 196 | *
|
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 |
214 | 199 | *
|
215 |
| - * \param [out] pin Pointer to the array to be populated with the PIN |
216 |
| - * |
217 |
| - * \returns Operation status |
| 200 | + * @returns Operation status |
218 | 201 | */
|
219 | 202 | lr1110_status_t lr1110_bootloader_read_pin( const void* context, lr1110_bootloader_pin_t pin );
|
220 | 203 |
|
221 | 204 | /*!
|
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. |
225 | 206 | *
|
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 |
227 | 209 | *
|
228 |
| - * \returns Operation status |
| 210 | + * @returns Operation status |
229 | 211 | */
|
230 | 212 | lr1110_status_t lr1110_bootloader_read_chip_eui( const void* context, lr1110_bootloader_chip_eui_t chip_eui );
|
231 | 213 |
|
232 | 214 | #ifdef __cplusplus
|
233 | 215 | }
|
234 | 216 | #endif
|
235 | 217 |
|
236 |
| -#endif // __LR1110_BOOTLOADER_H__ |
| 218 | +#endif // LR1110_BOOTLOADER_H |
237 | 219 |
|
238 | 220 | /* --- EOF ------------------------------------------------------------------ */
|
0 commit comments