@@ -2169,10 +2169,12 @@ int nbgl_layoutAddTagValueList(nbgl_layout_t *layout, const nbgl_layoutTagValueL
2169
2169
* subtext if needed.
2170
2170
*
2171
2171
* @param layout the current layout
2172
- * @param text text to draw under the spinner
2172
+ * @param text text to draw under the progress bar
2173
2173
* @param subText text to draw under the text (can be NULL)
2174
- * @param percentage initial percentage position, zero by default.
2175
- * @return - 2 partial color refresh needed
2174
+ * @param percentage initial percentage position.
2175
+ * @return - -1 An error occurred
2176
+ * - 2 partial color refresh needed
2177
+ *
2176
2178
*/
2177
2179
int nbgl_layoutAddProgressBar (nbgl_layout_t * layout ,
2178
2180
const char * text ,
@@ -2200,8 +2202,7 @@ int nbgl_layoutAddProgressBar(nbgl_layout_t *layout,
2200
2202
container -> obj .alignment = CENTER ;
2201
2203
2202
2204
// Create progressbar
2203
- progress = (nbgl_progress_bar_t * ) nbgl_objPoolGet (PROGRESS_BAR ,
2204
- ((nbgl_layoutInternal_t * ) layout )-> layer );
2205
+ progress = (nbgl_progress_bar_t * ) nbgl_objPoolGet (PROGRESS_BAR , layoutInt -> layer );
2205
2206
progress -> foregroundColor = BLACK ;
2206
2207
progress -> withBorder = true;
2207
2208
progress -> state = percentage ;
@@ -2273,10 +2274,11 @@ int nbgl_layoutAddProgressBar(nbgl_layout_t *layout,
2273
2274
* @brief Update an existing progress Bar (must be the only object of the layout)
2274
2275
*
2275
2276
* @param layout the current layout
2276
- * @param text text to draw under the spinner
2277
+ * @param text text to draw under the progress bar
2277
2278
* @param subText text to draw under the text (can be NULL)
2278
2279
* @param percentage progress bar percentage.
2279
- * @return - 0 if no refresh needed
2280
+ * @return - -1 An error occurred
2281
+ * - 0 if no refresh needed
2280
2282
* - 1 if partial B&W refresh needed
2281
2283
* - 2 if partial color refresh needed
2282
2284
*/
0 commit comments