@@ -268,36 +268,31 @@ static void bundleNavStartHome(void);
268
268
static void bundleNavStartSettingsAtPage (uint8_t initSettingPage );
269
269
static void bundleNavStartSettings (void );
270
270
271
- static void bundleNavReviewStreamingChoice (bool confirm );
272
- static void blindSigningWarning (void );
273
- static void useCaseReview (nbgl_operationType_t operationType ,
274
- const nbgl_contentTagValueList_t * tagValueList ,
275
- const nbgl_icon_details_t * icon ,
276
- const char * reviewTitle ,
277
- const char * reviewSubTitle ,
278
- const char * finishTitle ,
279
- const nbgl_tipBox_t * tipBox ,
280
- nbgl_choiceCallback_t choiceCallback ,
281
- bool isLight ,
282
- bool playNotifSound );
283
- static void useCaseReviewStreamingStart (nbgl_operationType_t operationType ,
284
- const nbgl_icon_details_t * icon ,
285
- const char * reviewTitle ,
286
- const char * reviewSubTitle ,
287
- nbgl_choiceCallback_t choiceCallback ,
288
- bool playNotifSound );
289
- static void useCaseHomeExt (const char * appName ,
290
- const nbgl_icon_details_t * appIcon ,
291
- const char * tagline ,
292
- bool withSettings ,
293
- nbgl_homeAction_t * homeAction ,
294
- nbgl_callback_t topRightCallback ,
295
- nbgl_callback_t quitCallback );
296
- static uint8_t useCaseGetNbTagValuesInPage (uint8_t nbPairs ,
297
- const nbgl_contentTagValueList_t * tagValueList ,
298
- uint8_t startIndex ,
299
- bool isSkippable ,
300
- bool * requireSpecificDisplay );
271
+ static void bundleNavReviewStreamingChoice (bool confirm );
272
+ static void blindSigningWarning (void );
273
+ static void useCaseReview (nbgl_operationType_t operationType ,
274
+ const nbgl_contentTagValueList_t * tagValueList ,
275
+ const nbgl_icon_details_t * icon ,
276
+ const char * reviewTitle ,
277
+ const char * reviewSubTitle ,
278
+ const char * finishTitle ,
279
+ const nbgl_tipBox_t * tipBox ,
280
+ nbgl_choiceCallback_t choiceCallback ,
281
+ bool isLight ,
282
+ bool playNotifSound );
283
+ static void useCaseReviewStreamingStart (nbgl_operationType_t operationType ,
284
+ const nbgl_icon_details_t * icon ,
285
+ const char * reviewTitle ,
286
+ const char * reviewSubTitle ,
287
+ nbgl_choiceCallback_t choiceCallback ,
288
+ bool playNotifSound );
289
+ static void useCaseHomeExt (const char * appName ,
290
+ const nbgl_icon_details_t * appIcon ,
291
+ const char * tagline ,
292
+ bool withSettings ,
293
+ nbgl_homeAction_t * homeAction ,
294
+ nbgl_callback_t topRightCallback ,
295
+ nbgl_callback_t quitCallback );
301
296
302
297
static void reset_callbacks (void )
303
298
{
@@ -1491,7 +1486,7 @@ static uint8_t nbgl_useCaseGetNbPagesForContent(const nbgl_content_t *content,
1491
1486
// if the current page is not the first one (or last), a navigation bar exists
1492
1487
bool hasNav = !isLast || (pageIdxStart > 0 ) || (elemIdx > 0 );
1493
1488
if (content -> type == TAG_VALUE_LIST ) {
1494
- nbElementsInPage = useCaseGetNbTagValuesInPage (
1489
+ nbElementsInPage = nbgl_useCaseGetNbTagValuesInPageExt (
1495
1490
nbElements , & content -> content .tagValueList , elemIdx , isSkippable , & flag );
1496
1491
}
1497
1492
else if (content -> type == INFOS_LIST ) {
@@ -1952,11 +1947,49 @@ static void useCaseHomeExt(const char *appName,
1952
1947
nbgl_refreshSpecial (FULL_COLOR_CLEAN_REFRESH );
1953
1948
}
1954
1949
1955
- static uint8_t useCaseGetNbTagValuesInPage (uint8_t nbPairs ,
1956
- const nbgl_contentTagValueList_t * tagValueList ,
1957
- uint8_t startIndex ,
1958
- bool isSkippable ,
1959
- bool * requireSpecificDisplay )
1950
+ /**********************
1951
+ * GLOBAL FUNCTIONS
1952
+ **********************/
1953
+
1954
+ /**
1955
+ * @brief computes the number of tag/values pairs displayable in a page, with the given list of
1956
+ * tag/value pairs
1957
+ *
1958
+ * @param nbPairs number of tag/value pairs to use in \b tagValueList
1959
+ * @param tagValueList list of tag/value pairs
1960
+ * @param startIndex first index to consider in \b tagValueList
1961
+ * @param requireSpecificDisplay (output) set to true if the tag/value needs a specific display:
1962
+ * - centeredInfo flag is enabled
1963
+ * - the tag/value doesn't fit in a page
1964
+ * @return the number of tag/value pairs fitting in a page
1965
+ */
1966
+ uint8_t nbgl_useCaseGetNbTagValuesInPage (uint8_t nbPairs ,
1967
+ const nbgl_contentTagValueList_t * tagValueList ,
1968
+ uint8_t startIndex ,
1969
+ bool * requireSpecificDisplay )
1970
+ {
1971
+ return nbgl_useCaseGetNbTagValuesInPageExt (
1972
+ nbPairs , tagValueList , startIndex , false, requireSpecificDisplay );
1973
+ }
1974
+
1975
+ /**
1976
+ * @brief computes the number of tag/values pairs displayable in a page, with the given list of
1977
+ * tag/value pairs
1978
+ *
1979
+ * @param nbPairs number of tag/value pairs to use in \b tagValueList
1980
+ * @param tagValueList list of tag/value pairs
1981
+ * @param startIndex first index to consider in \b tagValueList
1982
+ * @param isSkippable if true, a skip header is added
1983
+ * @param requireSpecificDisplay (output) set to true if the tag/value needs a specific display:
1984
+ * - centeredInfo flag is enabled
1985
+ * - the tag/value doesn't fit in a page
1986
+ * @return the number of tag/value pairs fitting in a page
1987
+ */
1988
+ uint8_t nbgl_useCaseGetNbTagValuesInPageExt (uint8_t nbPairs ,
1989
+ const nbgl_contentTagValueList_t * tagValueList ,
1990
+ uint8_t startIndex ,
1991
+ bool isSkippable ,
1992
+ bool * requireSpecificDisplay )
1960
1993
{
1961
1994
uint8_t nbPairsInPage = 0 ;
1962
1995
#ifdef TARGET_STAX
@@ -2045,31 +2078,6 @@ static uint8_t useCaseGetNbTagValuesInPage(uint8_t nbP
2045
2078
return nbPairsInPage ;
2046
2079
}
2047
2080
2048
- /**********************
2049
- * GLOBAL FUNCTIONS
2050
- **********************/
2051
-
2052
- /**
2053
- * @brief computes the number of tag/values pairs displayable in a page, with the given list of
2054
- * tag/value pairs
2055
- *
2056
- * @param nbPairs number of tag/value pairs to use in \b tagValueList
2057
- * @param tagValueList list of tag/value pairs
2058
- * @param startIndex first index to consider in \b tagValueList
2059
- * @param requireSpecificDisplay (output) set to true if the tag/value needs a specific display:
2060
- * - centeredInfo flag is enabled
2061
- * - the tag/value doesn't fit in a page
2062
- * @return the number of tag/value pairs fitting in a page
2063
- */
2064
- uint8_t nbgl_useCaseGetNbTagValuesInPage (uint8_t nbPairs ,
2065
- const nbgl_contentTagValueList_t * tagValueList ,
2066
- uint8_t startIndex ,
2067
- bool * requireSpecificDisplay )
2068
- {
2069
- return useCaseGetNbTagValuesInPage (
2070
- nbPairs , tagValueList , startIndex , false, requireSpecificDisplay );
2071
- }
2072
-
2073
2081
/**
2074
2082
* @brief computes the number of infos displayable in a page, with the given list of
2075
2083
* infos
@@ -2270,7 +2278,7 @@ uint8_t nbgl_useCaseGetNbPagesForTagValueList(const nbgl_contentTagValueList_t *
2270
2278
2271
2279
while (i < tagValueList -> nbPairs ) {
2272
2280
// upper margin
2273
- nbPairsInPage = useCaseGetNbTagValuesInPage (nbPairs , tagValueList , i , false, & flag );
2281
+ nbPairsInPage = nbgl_useCaseGetNbTagValuesInPageExt (nbPairs , tagValueList , i , false, & flag );
2274
2282
i += nbPairsInPage ;
2275
2283
nbPairs -= nbPairsInPage ;
2276
2284
nbPages ++ ;
0 commit comments