diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 000000000..a8da2225e --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,46 @@ +name: Documentation generation & update + +on: + push: + tags: + - '*' + branches: + - master + pull_request: + branches: + - master + +jobs: + generate: + name: Generate the documentation + runs-on: ubuntu-latest + steps: + - name: Clone + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install APT dependencies + run: | + sudo apt-get update + sudo apt-get install graphviz doxygen + - name: Generate the documentation + run: make doc + - name: Upload documentation bundle + uses: actions/upload-artifact@v4 + with: + name: documentation + path: build/doc/html/ + + deploy: + name: Deploy the documentation on Github pages + runs-on: ubuntu-latest + needs: generate + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) + steps: + - name: Download documentation bundle + uses: actions/download-artifact@v4 + - name: Deploy documentation on pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: documentation/ diff --git a/doc/mainpage.dox b/doc/mainpage.dox index 909c7b893..5d5943464 100644 --- a/doc/mainpage.dox +++ b/doc/mainpage.dox @@ -47,9 +47,9 @@ The @subpage u2f_mainpage page contains all information necessary to use the U2F The @subpage ux_mainpage page contains all information necessary to user the User eXperience (and partially Graphical Library) for \b Nanos applications development (using \b BAGL). -@subsection ux_stax_presentation User eXperience on Applications using \b NBGL +@subsection ux_nbgl_presentation User eXperience on Applications using \b NBGL -The @subpage ux_stax_mainpage page contains all information necessary to user the User eXperience for +The @subpage ux_nbgl_mainpage page contains all information necessary to user the User eXperience for \b Stax, \b NanoX and \b NanoS+ applications development using \b NBGL (most recent ones). diff --git a/include/os_pki.h b/include/os_pki.h index 236cdf116..b27f5b297 100644 --- a/include/os_pki.h +++ b/include/os_pki.h @@ -17,6 +17,8 @@ #define CERTIFICATE_STRUCTURE_TYPE_CERTIFICATE (0x01) /** Maximum certificate trusted name length */ #define CERTIFICATE_TRUSTED_NAME_MAXLEN (32) +/** Certificate depth maximum value */ +#define CERTIFICATE_DEPTH_MAX_VALUE (0xFF) /** Certificate tags associated to each certificate field */ typedef enum { @@ -88,6 +90,7 @@ enum { CERTIFICATE_TARGET_DEVICE_NANOX, CERTIFICATE_TARGET_DEVICE_NANOSP, CERTIFICATE_TARGET_DEVICE_STAX, + CERTIFICATE_TARGET_DEVICE_FLEX, CERTIFICATE_TARGET_DEVICE_UNKNOWN }; @@ -137,7 +140,7 @@ static const os_pki_certificate_tag_info_t C_os_pki_certificate_tag_info[] = { [CERTIFICATE_INFO_INDEX_PK_SIGN_ALGO_ID] = {CERTIFICATE_SIGN_ALGO_ID_UNKNOWN, 0x01 }, [CERTIFICATE_INFO_INDEX_TARGET_DEVICE] = {CERTIFICATE_TARGET_DEVICE_UNKNOWN, 0x01 }, [CERTIFICATE_INFO_INDEX_SIGNATURE] = {CERTIFICATE_FIELD_UNKNOWN_VALUE, CERTIFICATE_FIELD_VAR_LEN}, - [CERTIFICATE_INFO_INDEX_DEPTH] = {CERTIFICATE_FIELD_UNKNOWN_VALUE, 0x01 }, + [CERTIFICATE_INFO_INDEX_DEPTH] = {CERTIFICATE_DEPTH_MAX_VALUE, 0x01 }, }; static const cx_md_t C_os_sign_algo_hash_info[] = { diff --git a/include/sdk_apdu_commands.h b/include/sdk_apdu_commands.h index 93076152d..5d5333ae8 100644 --- a/include/sdk_apdu_commands.h +++ b/include/sdk_apdu_commands.h @@ -97,13 +97,9 @@ * |DATA |CERT_LEN|CERT |Certificate | * * - Response APDU - * |DATA |LENGTH | DESCRIPTION | - * |-----------------|-----------------|---------------------------------| - * |TRUSTED_NAME_LEN |0x01 | Certificate trusted name length | - * |TRUSTED_NAME |TRUSTED_NAME_LEN | Certificate trusted name | - * |PUBLIC_KEY_LEN |0x01 | Certificate public key length | - * |PUBLIC_KEY |PUBLIC_KEY_LEN | Certificate public key | - * |STATUS_WORD |0x02 | 0x9000 on success | + * |DATA |LENGTH | DESCRIPTION | + * |-----------------|-----------------|-------------------| + * |STATUS_WORD |0x02 | 0x9000 on success | */ #define DEFAULT_APDU_INS_LOAD_CERTIFICATE 0x06 #endif // HAVE_LEDGER_PKI diff --git a/lib_blewbxx_impl/doc/mainpage.dox b/lib_blewbxx_impl/doc/mainpage.dox index 498881fb2..3ed046e5a 100644 --- a/lib_blewbxx_impl/doc/mainpage.dox +++ b/lib_blewbxx_impl/doc/mainpage.dox @@ -1,6 +1,6 @@ /** @page ble_mainpage BlueTooth Low-Energy Stack -@section mainpage_intro Introduction +@section ble_mainpage_intro Introduction This page describes the API of BLE (BlueTooth Low-Energy) Stack provided in \b NanoX and \b Stax products. diff --git a/lib_cxng/doc/mainpage.dox b/lib_cxng/doc/mainpage.dox index 0c7fcb56b..d99827285 100644 --- a/lib_cxng/doc/mainpage.dox +++ b/lib_cxng/doc/mainpage.dox @@ -1,6 +1,6 @@ /** @page cxng_mainpage Cryptographic Library -@section mainpage_intro Introduction +@section cxng_mainpage_intro Introduction This documentation describes the different interfaces of Bolos Cryptographic Library. diff --git a/lib_nbgl/doc/mainpage.dox b/lib_nbgl/doc/mainpage.dox index aa5467a24..926e24936 100644 --- a/lib_nbgl/doc/mainpage.dox +++ b/lib_nbgl/doc/mainpage.dox @@ -1,7 +1,7 @@ #ifdef HAVE_SE_TOUCH /** @page nbgl_mainpage New BOLOS Graphic API for Stax -@section mainpage_intro Introduction +@section nbgl_mainpage_intro Introduction This documentation describes the different interfaces of NBGL, the library that is targeted to be integrated in Stax product. diff --git a/lib_nbgl/doc/nbgl_use_case.dox b/lib_nbgl/doc/nbgl_use_case.dox index 99753c22f..cb28898bb 100644 --- a/lib_nbgl/doc/nbgl_use_case.dox +++ b/lib_nbgl/doc/nbgl_use_case.dox @@ -25,38 +25,31 @@ for end-users, getting more and more familiar with the user experience of applic @subsection nbgl_use_case_example_1 Example 1: transaction review -\image{inline} html UseCase-Review1.png "caption" height=300 +\image{inline} html UseCase-Review.png "caption" height=300 In this example, a transaction review consists in 3 successive pages, and can be seen as a use-case -@subsection nbgl_use_case_example_2 Example 2: settings pages +@subsection nbgl_use_case_example_2 Example 2: home & settings pages -\image{inline} html UseCase-Settings1.png "caption" height=300 +\image{inline} html UseCase-HomeSettings.png "caption" height=300 -In this example, a parsing the settings (single level) consists in 2 pages, and can be seen as another use-case. +In this other example, displaying home page, then the settings and info consists in 3 pages, and can be seen as another use-case. @section nbgl_use_cases Use Cases A few APIs are available to draw typical Use-Cases, such as: -- for Home Screen: - - @ref nbgl_useCaseHome() to draw the home screen of an application (see @subpage use_case_home) - - @ref nbgl_useCaseHomeExt() to draw an extended version of home screen of an application (with action button) (see @subpage use_case_ext_home) - - @ref nbgl_useCasePlugInHome() to draw the home screen of a Plug-In application (see @subpage use_case_plugin_home) -- for Settings: - - @ref nbgl_useCaseSettings() to draw a level of settings pages (see @subpage use_case_settings) +- for Home Screen & Settings: + - @ref nbgl_useCaseHomeAndSettings() to draw the home page and settings/info pages (see @subpage use_case_home_settings) - for Individual pages: - @ref nbgl_useCaseConfirm() to draw a typical confirmation page, for example when rejecting a transaction (see @subpage use_case_confirm) - @ref nbgl_useCaseChoice() to draw a typical dual choice page (see @subpage use_case_choice) - @ref nbgl_useCaseStatus() to draw a transient status page, without control, for example when a transaction is successfully signed (see @subpage use_case_status) - @ref nbgl_useCaseSpinner() to draw an infinite spinner page (see @subpage use_case_spinner) - for most used reviews: - - @ref nbgl_useCaseStaticReview() to draw the pages of a regular review, when all info are available from the beginning (see @subpage use_case_static_review) - - @ref nbgl_useCaseReviewStart() to draw the cover page of a review (initial page, without data) (see @subpage use_case_review_start) - - @ref nbgl_useCaseRegularReview() to draw the pages of a regular review (all pages but the cover one) (see @subpage use_case_regular_review) -- for rare reviews: - - @ref nbgl_useCaseForwardOnlyReview() to draw the pages of a forward-only review (without back key) (see @subpage use_case_forward_only_review) - - @ref nbgl_useCaseViewDetails() to draw the pages displaying the full value of a given long data of a review (see @subpage use_case_details_view) + - @ref nbgl_useCaseReview() to draw the pages of a regular coin transaction review, when all info are available from the beginning (see @subpage use_case_review) + - @ref nbgl_useCaseReviewLight() to draw the pages of a transaction review with a simple button confirmation, when all info are available from the beginning (see @subpage use_case_review_light) + - @ref nbgl_useCaseReviewStreamingStart() to draw the pages of a regular coin transaction review, when all info are not available from the beginning (see @subpage use_case_review_streaming) - for address verification: - @ref nbgl_useCaseAddressConfirmation() to draw an address confirmation page, with a possibility to see it as QR Code (see @subpage use_case_addr_confirm) - @ref nbgl_useCaseAddressConfirmationExt() to draw an address confirmation page, with a possibility to see it as QR Code and some extra tag/value pairs (see @subpage use_case_addr_confirm_ext) @@ -64,211 +57,101 @@ A few APIs are available to draw typical Use-Cases, such as: - @ref nbgl_useCaseKeypadPIN() to draw a default keypad implementation with hidden digits (see @subpage use_case_keypad) - @ref nbgl_useCaseKeypadDigits() to draw a default keypad implementation, showing digits (see @subpage use_case_keypad) -@subsection use_case_home Home screen Use Case - -\image{inline} html UseCase-Home.png "caption" height=300 - -Ledger would like all application to have the same home screen, so the @ref nbgl_useCaseHome() function enables to -create such a page, the only configurable parameters being: - -- the application name -- the application icon -- the tagline, a text under app name (if NULL, it will be "This app enables signing transactions on the network.") -- the callbacks when touching *quit* or *top-right* buttons -- the type of top-right button (info or settings) +Some APIs have also been kept for backward compatibility, and for some rare cases: -@code -extern const nbgl_icon_details_t *myAppIcon; - -void myAppSettings(void) { - // draw settings page here -} -void onQuit(void) { - // exit app here -} -void appMain(void) { - nbgl_useCaseHome("MyApp", - &myAppIcon, - NULL, - true, // with settings button - myAppSettings, - onQuit); -} -@endcode - -@subsection use_case_ext_home Extended Home screen Use Case - -\image{inline} html UseCase-HomeExt.png "caption" height=300 - -In some very specific case, the Home page should provide an "action" button. @ref nbgl_useCaseHomeExt() function enables to -create such a page, adding to @ref nbgl_useCaseHome() the following parameters: - -- the text to display in "action" button -- the callback when touching "action" buttons - -Here is the source code to display something similar to the example: - -@code -extern const nbgl_icon_details_t *myAppIcon; - -void myAppSettings(void) { - // draw settings page here -} - -void onQuit(void) { - // exit app here -} - -// function called when "Do something" button is touched -void onAction(void) { -} - -void appMain(void) { - nbgl_useCaseHomeExt("MyApp", - &myAppIcon, - "This application is intended to do\nsomething", - false, // with info button - "Do something", - onAction, - myAppSettings, - onQuit); -} -@endcode - -@subsection use_case_plugin_home Plug-In Home screen Use Case - -\image{inline} html UseCase-HomePlugIn.png "caption" height=300 +- for Home Screen: + - @ref nbgl_useCaseHome() to draw the home screen of an application. + - @ref nbgl_useCaseHomeExt() to draw an extended version of home screen of an application (with action button) + - @ref nbgl_useCasePlugInHome() to draw the home screen of a Plug-In application +- for Settings: + - @ref nbgl_useCaseSettings() to draw a level of settings pages +- for most used reviews: + - @ref nbgl_useCaseReviewStart() to draw the cover page of a review (initial page, without data) + - @ref nbgl_useCaseStaticReview() to draw the data pages of a regular review, when all info are available from the beginning (all pages but the cover one) + - @ref nbgl_useCaseRegularReview() to draw the data pages of a regular review (all pages but the cover one) +- for rare reviews: + - @ref nbgl_useCaseForwardOnlyReview() to draw the pages of a forward-only review (without back key) + - @ref nbgl_useCaseViewDetails() to draw the pages displaying the full value of a given long data of a review -For some plug-in apps (relying on a master application), the Home page should display extra lines of text. @ref nbgl_useCasePlugInHome() function enables to -create such a page, adding to @ref nbgl_useCaseHome() the following parameter: +@subsection use_case_home_settings Home & Settings screen Use Case -- The name of the master application name -- A text (subTagLine) to display under the master application icon (if NULL, it will be "This app relies on\n") +\image{inline} html UseCase-HomeSettingsAPI.png "caption" height=300 -Moreover, the default tagline, if the "tagline" parameter is NULL, is: "This app confirms actions for\n." +Ledger would like all application to have the same layout for home screen and settings/info, so the @ref nbgl_useCaseHomeAndSettings() function enables to +create such a set of page, the configurable parameters being: -Here is the source code to display something similar to the example: +- the application name (appName) +- the application icon (appIcon) +- the tagline, a text under app name (if NULL, it will be "This app enables signing transactions on the network.") +- the callback when touching *quit application* button @code -extern const nbgl_icon_details_t *myAppIcon; - -void myAppSettings(void) { - // draw settings page here -} - -void onQuit(void) { - // exit app here -} - -void appMain(void) { - nbgl_useCasePlugInHome("Ledger Market", // - "Ethereum", // - &C_Ethereum32px, // - NULL, // will use the default tagline ("This app confirms actions for\n.") - NULL, // will use the default subTagline ("This app relies on\n") - false, // use "info" type top-right icon - myAppSettings, - onQuit); -} -@endcode - -@subsection use_case_settings Settings Use Case - -\image{inline} html UseCase-Settings1.png "caption" height=300 - -Usually settings (or information) of an application consist in a list of pages, each page containing: - -- some radio buttons to make a choice -- some switches for various configuration -- a list of information organized by pairs [info_name, info_value] +extern const nbgl_icon_details_t *eth_icon; -The API to initiate the display of the series of pages is @ref nbgl_useCaseSettings(), providing: - -- the title of the settings series -- the page in which to start -- the number of pages -- a boolean to indicate whether the title is touchable or not (if touchable, it is used to quit the series, -so no Quit button in navigation bar) -- a callback called when the quit button (or touchable title) is touched -- a navigation callback called when navigation arrow buttons are touched (and to fill the initial page), to retrieve -the content of the page -- a last callback called when any of the controls provided in content is touched - -@note All tokens used for the given "settings" must be greater or equal than \ref FIRST_USER_TOKEN - -\image{inline} html UseCase-Settings2.png "caption" height=300 - -Here is the source code to display the first example of settings: - -@code enum { - SWITCH1_TOKEN = FIRST_USER_TOKEN, - SWITCH2_TOKEN, - SWITCH3_TOKEN + SWITCH1_TOKEN = FIRST_USER_TOKEN, + SWITCH2_TOKEN }; static const nbgl_layoutSwitch_t switches[] = { - { - .initState = false, - .text = "Blind signing", - .subText = "Enable transaction blind\n" "signing", - .token = SWITCH1_TOKEN, - .tuneId = TUNE_TAP_CASUAL - }, - { - .initState = true, - .text = "Debug", - .subText = "Display contract data details", - .token = SWITCH2_TOKEN, - .tuneId = TUNE_TAP_CASUAL - }, - { - .initState = true, - .text = "Nonce", - .subText = "Display account nonce\n" "in transaction", - .token = SWITCH3_TOKEN, - .tuneId = TUNE_TAP_CASUAL - }, + {.initState = false, + .text = "ENS addresses", + .subText = "Displays the resolved address of ENS domains.", + .token = SWITCH1_TOKEN, + .tuneId = TUNE_TAP_CASUAL}, + {.initState = true, + .text = "Raw messages", + .subText = "Displays raw content from EIP712 messages.", + .token = SWITCH2_TOKEN, + .tuneId = TUNE_TAP_CASUAL} }; +static const char *infoTypes[] = {"Version", "Developer"}; +static const char *infoContents[] = {"1.9.18", "Ledger"}; -static const char* infoTypes[] = { - "Version" -}; - -static const char* infoContents[] = { - "1.9.18" -}; - -static bool navCallback(uint8_t page, nbgl_pageContent_t *content) { - // the first settings page contains 3 switches - if (page == 0) { - content->type = SWITCHES_LIST; - content->switchesList.nbSwitches = 3; - content->switchesList.switches = (nbgl_layoutSwitch_t*)switches; - } - // the second settings page contains only the version of the app - else if (page == 1) { - content->type = INFOS_LIST; - content->infosList.nbInfos = 1; - content->infosList.infoTypes = infoTypes; - content->infosList.infoContents = infoContents; +// function called in case of action on switches +static void controlsCallback(int token, uint8_t index, int page) { + if (token == SWITCH1_TOKEN) { + if (index == 0) { + // deactivate something related with ENS + } + else { + // activate something related with ENS + } } - else { - return false; + else if (token == SWITCH2_TOKEN) { + if (index == 0) { + // deactivate something related with EIP712 + } + else { + // activate something related with EIP712 + } } - // valid page so return true - return true; } -static void controlsCallback(int token, uint8_t index) { - if (token == SWITCH1_TOKEN) { - // First switch touched - } -} +static nbgl_content_t contentsList = { + .content.switchesList.nbSwitches = 2, + .content.switchesList.switches = switches, + .type = SWITCHES_LIST, + .contentActionCallback = controlsCallback +}; -void myAppSettings(void) { - // draw the settings Use Case (2 pages), starting at page 0 - nbgl_useCaseSettings("Ethereum settings",0,2,false,appMain,navCallback,controlsCallback); +nbgl_genericContents_t eth_settingContents + = {.contentsList = &contentsList, .nbContents = 1}; +nbgl_contentInfoList_t eth_infosList + = {.nbInfos = 2, .infoTypes = infoTypes, .infoContents = infoContents}; + +void onQuit(void) { + // exit app here +} +void appMain(void) { + nbgl_useCaseHomeAndSettings("Ethereum", + eth_icon, + NULL, // use default tag line + INIT_HOME_PAGE, // start at home page + ð_settingContents, // description of settings + ð_infosList, // description of app info + NULL, // no action button on home screen + onQuit); // when quitting } @endcode @@ -276,7 +159,7 @@ void myAppSettings(void) { \image{inline} html UseCase-Confirm.png "caption" height=300 -A confirmation use-case consists in a single page containing a fixed icon, a configurable message, a black button and a footer to make +A confirmation use-case consists in a single modal page containing a fixed icon, a configurable message, a black button and a footer to make the choice, with configuration texts. The @ref nbgl_useCaseConfirm() function enables to create such a page. The *callback* argument is called when the button is touched. @@ -326,6 +209,7 @@ void onRejectTransaction(void) { onChoice); } @endcode + @subsection use_case_status Status Use Case \image{inline} html UseCase-Status.png "caption" height=300 @@ -333,226 +217,46 @@ void onRejectTransaction(void) { A status is a transient page, without control, to display during a short time, for example when a transaction is successfully signed. The @ref nbgl_useCaseStatus() function enables to create such a page, with the following arguments: -- a message string to set in middle of page (Upper case for success) +- a message string to set in middle of page - a boolean to indicate if true, that the message is drawn in a Ledger style (with corners) -- a quit callback, called when quit timer times out +- a quit callback, called when quit timer times out (or the page is "tapped") If it's a success status, a "success" tune will be automatically played. -@subsection use_case_review_start Review Start Use Case - -\image{inline} html UseCase-ReviewStart.png "caption" height=300 - -All message/transaction reviews should start with a same cover page, presenting an icon, the goal of the review, and offering -the end-user to possibility to enter the review (by "tapping to continue") or to reject it immediately by touching the footer. - -The @ref nbgl_useCaseReviewStart() function enables to create such a page, with the following arguments: - -- the icon to use in centered info -- the string to set in middle of page (in 32px font) -- the string to set under reviewTitle (in 24px font) (can be NULL) -- the string to set in footer, to reject review -- the callback called when main panel is touched -- the callback called when footer is touched - -A "look at me" tune will be automatically played when displaying the screen. - -Here is the code to display the example picture: - -@code -static void reviewContinue(void) { - // when review start page is "tapped", display the review itself - nbgl_useCaseRegularReview(0, NB_PAGES, "Reject transaction", confirmTransaction, - displayTransactionPage, reviewReject); -} - -void reviewStart(void) { - nbgl_useCaseReviewStart(myAppIcon, "Review transaction\nMyCoin send", NULL, - "Reject transaction", reviewContinue, reviewReject); -} - -@endcode - -@subsection use_case_regular_review Regular Review Use Case - -\image{inline} html UseCase-Review1.png "caption" height=300 +@subsection use_case_review_status Pre-defined status Use Case -Usually transaction/message reviews consist in a sequence of pages, each page containing: +\image{inline} html UseCase-Review-Status.png "caption" height=300 -- one or several tag/value pair or a long press button for the final page, to validate the review -- a footer to reject the review +Similar as @subpage use_case_status, this is used to display transient page, without control, during a short time, for example when a transaction is successfully signed. +The @ref nbgl_useCaseReviewStatus() function enables to create such a page, with the following arguments: -To navigate between pages, a back arrow is available on the top-left of the screen, and the whole page is "tappable". +- a type of status (with predefined message) +- a quit callback, called when quit timer times out (or the page is "tapped") -The API to initiate the display of the series of pages is @ref nbgl_useCaseRegularReview(), providing: - -- the page in which to start (usually 0) -- the number of pages (if unknown, set to 0) -- a "button" callback called when a potential button in the page's content is touched -- a navigation callback called when back key or screen is "tapped" , to retrieve -the content of the previous/next page. It is also called to fill the initial page. -- a callback called when the long press button (with param true) on last page or the footer to reject is used (with param false) - -If the number of pages is unknown at the beginning, no progress indicator will be display on top of the screen. - -Here is the code to display something similar to example picture: - -@code -// 4 pairs of tag/value to display -static nbgl_layoutTagValue_t pairs[4]; - -static void onConfirmAbandon(void) { - // display a status page and go back to main - nbgl_useCaseStatus("Transaction rejected",false,appMain); -} - -// called when long press button on 3rd page is long-touched or when reject footer is touched -static void reviewChoice(bool confirm) { - if (confirm) { - // display a status page and go back to main - nbgl_useCaseStatus("Transaction signed",true,appMain); - } - else { - nbgl_useCaseConfirm("Reject transaction?","Yes, Reject","Go back to transaction",onConfirmAbandon); - } -} - -// called to get the content of the given page -static bool displayTransactionPage(uint8_t page, nbgl_pageContent_t *content) { - if (page == 0) { - // the first page contains 3 tag/value pairs - content->type = TAG_VALUE_LIST; - content->tagValueList.nbPairs = 3; - content->tagValueList.pairs = (nbgl_layoutTagValue_t *)pairs; - content->tagValueList.smallCaseForValue = false; - } - else if (page == 1) { - // the second page contains 1 tag/value pair - content->type = TAG_VALUE_LIST; - content->tagValueList.nbPairs = 1; - content->tagValueList.pairs = (nbgl_layoutTagValue_t *)&pairs[3]; - content->tagValueList.smallCaseForValue = false; - } - else if (page == 2) { - // the last page must contain a long press button - content->type = INFO_LONG_PRESS, - content->infoLongPress.icon = &myAppIcon; - content->infoLongPress.text = "Confirm transaction\nMyCoin send"; - content->infoLongPress.longPressText = "Hold to send"; - content->infoLongPress.longPressToken = VALIDATE_TRANSACTION_TOKEN; - } - else { - return false; - } - // valid page so return true - return true; -} - -void reviewContinue(void) { - // review on 3 pages, starting at 0 - nbgl_useCaseRegularReview(0, 3, "Reject transaction", - NULL, // no buttons because no value is too long to fit - displayTransactionPage, reviewChoice); -} -@endcode - -@subsection use_case_forward_only_review Forward only Review Use Case - -\image{inline} html UseCase-ReviewForwardOnly.png "caption" height=500 - -Some message/transaction reviews may be too long to be memorized, so it is only possible to move forward. - -In this case, no back arrow is available on the top-left of the screen. Moreover, these reviews are always done with -an unknown number of pages. -A "Skip" button is added automatically in all pages except the one with Long Press button, -to jump to last page, after an automatic confirmation modal window is displayed. - -The API to initiate the display of the series of forward-only review pages is @ref nbgl_useCaseForwardOnlyReview(), providing: - -- a "button" callback called when a potential button in the page's content is touched -- a navigation callback called when screen is "tapped" , to retrieve -the content of the next page. It is also called to fill the initial page. -- a callback called when the long press button (with param true) on last page or the footer to reject is used (with param false) - -Here is the code to display something similar to example picture: - -@code - -// 5 pairs of tag/value to display -static nbgl_layoutTagValue_t pairs[5]; - -// result of the rejection -static void onConfirmAbandon(void) { - // display a status page and go back to main - nbgl_useCaseStatus("Transaction rejected",false,appMain); -} - -// called when long press button on 3rd page is long-touched or when reject footer is touched -static void reviewChoice(bool confirm) { - if (confirm) { - // display a status page and go back to main - nbgl_useCaseStatus("Transaction signed",true,appMain); - } - else { - nbgl_useCaseConfirm("Reject transaction?","Yes, Reject","Go back to transaction",onConfirmAbandon); - } -} - -// called to get the content of the given page -static bool displayTransactionPage(uint8_t page, nbgl_pageContent_t *content) { - if (page == 0) { - // the first page contains 3 tag/value pairs - content->type = TAG_VALUE_LIST; - content->tagValueList.nbPairs = 3; - content->tagValueList.pairs = (nbgl_layoutTagValue_t *)pairs; - content->tagValueList.smallCaseForValue = false; - } - else if (page == 1) { - // the second page contains 2 tag/value pairs - content->type = TAG_VALUE_LIST; - content->tagValueList.nbPairs = 2; - content->tagValueList.pairs = (nbgl_layoutTagValue_t *)&pairs[3]; - content->tagValueList.smallCaseForValue = false; - } - else if (page == 2) { - // the last page must contain a long press button - content->type = INFO_LONG_PRESS, - content->infoLongPress.icon = &myAppIcon; - content->infoLongPress.text = "Confirm transaction\nMyCoin send"; - content->infoLongPress.longPressText = "Hold to send"; - } - else { - return false; - } - // valid page so return true - return true; -} - -void reviewContinue(void) { - nbgl_useCaseForwardOnlyReview("Reject transaction", - NULL, // No details button so no callback needed - displayTransactionPage, reviewChoice); -} -@endcode +If it's a success status, a "success" tune will be automatically played. -@subsection use_case_static_review Static Review Use Case +@subsection use_case_review Review Use Case -\image{inline} html UseCase-Review1.png "caption" height=300 +\image{inline} html UseCase-Review.png "caption" height=300 -In some cases, the developer may know all tag/value pairs of a transaction when it is submitted. +In most cases, the developer may know all tag/value pairs of a transaction when it is submitted. -In this case, what we call a "static" review can be used. It is similar to a regular review with know number of pages in terms of -presentation and interactions with end-users, but much easier to use for developer. +In this case, what we call a "static" review can be used. The number of pages is computed automatically and pages can be navigated forward +and backward. -Indeed, in this case, NBGL automatically computes the number of pages, and the pairs to draw in each page. In case of a tag/value pair too long to be fully displayed, the "more" button will be automatically drawn and its handling automatically performed by NBGL by building a detailed modal view. -The API to initiate the display of the series of pages is @ref nbgl_useCaseStaticReview(), providing: +When the user taps on "Reject" in any page, a confirmation page is automatically drawned to let user confirm that he rejects +the transaction. In this case, the given callback is called and it's up to app's developer to call @ref nbgl_useCaseReviewStatus(), as in +case of long-press. +The API to initiate the display of the series of pages is @ref nbgl_useCaseReview(), providing: + +- the type of operation to review (transaction, message or generic operation) - the list of tag/value pairs (or a callback to get them one by one) -- the texts to use in footer and in last page -- a callback called when the long press button on last page or the footer to reject is used. The callback's param is true for confirmation, false for rejection. +- the texts/icon to use in presentation page and in last page +- a callback called when the long press button on last page or reject confirmation is used. The callback's param is *true* for confirmation, *false* for rejection. Here is the code to display something similar to example picture: @@ -566,33 +270,26 @@ static nbgl_contentTagValueList_t pairList = { .pairs = (nbgl_layoutTagValue_t*)pairs }; -// result of the rejection choice -static void onConfirmAbandon(void) { - // display a status page and go back to main - nbgl_useCaseStatus("Transaction rejected",false,appMain); -} - // called when long press button on 3rd page is long-touched or when reject footer is touched -static void reviewChoice(bool confirm) { +static void onReviewResult(bool confirm) { + // display a status page and go back to main if (confirm) { - // display a status page and go back to main - nbgl_useCaseStatus("Transaction signed",true,appMain); + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_SIGNED, appMain); } else { - // display a confirmation to confirm/cancel rejection - nbgl_useCaseConfirm("Reject transaction?","Yes, Reject","Go back to transaction",onConfirmAbandon); + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_REJECTED, appMain); } } -void reviewContinue(void) { - static nbgl_pageInfoLongPress_t infoLongPress = { - .icon = &myAppIcon, - .text = "Confirm transaction\nMyAppCoin send", - .longPressText = "Hold to send" - }; - +void staticReview(void) { // static review, providing the whole list of pairs - nbgl_useCaseStaticReview(&pairList, &infoLongPress, "Reject transaction", reviewChoice); + nbgl_useCaseReview(TYPE_TRANSACTION, // type of operation + &pairList, // list of tag/value pairs + coinIcon, // icon of the coin + "Review transaction\nto send coin", // title of the first page + NULL, // sub-title of the first page + "Sign transaction to\nsend coin?", // title of the last page + onReviewResult); // callback on result of the review } @endcode @@ -612,21 +309,14 @@ static nbgl_contentTagValueList_t pairList = { .startIndex = 0 }; -// result of the rejection choice -static void onConfirmAbandon(void) { - // display a status page and go back to main - nbgl_useCaseStatus("Transaction rejected",false,appMain); -} - // called when long press button on 3rd page is long-touched or when reject footer is touched -static void reviewChoice(bool confirm) { +static void onReviewResult(bool confirm) { + // display a status page and go back to main if (confirm) { - // display a status page and go back to main - nbgl_useCaseStatus("Transaction signed",true,appMain); + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_SIGNED, appMain); } else { - // display a confirmation to confirm/cancel rejection - nbgl_useCaseConfirm("Reject transaction?","Yes, Reject","Go back to transaction",onConfirmAbandon); + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_REJECTED, appMain); } } @@ -653,122 +343,107 @@ static nbgl_layoutTagValue_t* getPair(uint8_t index) { return &pair; } -void reviewContinue(void) { - static nbgl_pageInfoLongPress_t infoLongPress = { - .icon = &myAppIcon, - .text = "Confirm transaction\nMyAppCoin send", - .longPressText = "Hold to send" - }; - +void staticReview(void) { // static review, providing the whole list of pairs - nbgl_useCaseStaticReview(&pairList, &infoLongPress, "Reject transaction", reviewChoice); + nbgl_useCaseReview(TYPE_TRANSACTION, // type of operation + &pairList, // list of tag/value pairs + coinIcon, // icon of the coin + "Review transaction\nto send coin", // title of the first page + NULL, // sub-title of the first page + "Sign transaction to\nsend coin?", // title of the last page + onReviewResult); // callback on result of the review } @endcode -@subsection use_case_static_review_light Light Static Review Use Case - -\image{inline} html UseCase-ReviewLight.png "caption" height=300 +@subsection use_case_review_light Light review Use Case In some cases, the developer may want to display a review but with a less intense confirmation than a long-press button. A simple button is used in this case. -The API to initiate the display of the series of pages is @ref nbgl_useCaseStaticReviewLight(), providing: +The API to initiate the display of the series of pages is @ref nbgl_useCaseReviewLight(), providing: - the list of tag/value pairs (or a callback to get them one by one) -- the texts to use in footer and in last page (icon, title, confirmation button text) -- a callback called when the black button on last page or the footer to reject is used. The callback's param is true for confirmation, false for rejection. +- the texts/icon to use in presentation page and in last page +- a callback called when the long press button on last page or reject confirmation is used. The callback's param is *true* for confirmation, *false* for rejection. + +@subsection use_case_review_streaming Streaming review Use Case + +\image{inline} html UseCase-Streaming.png "caption" height=300 + +In some cases, the application cannot know all tag/value pairs of a transaction when the review is started. + +In this case, what we call a "streaming" review can be used. The pages to display for each "stream are computed automatically and pages can be navigated forward +and backward (only within a "stream" for backward). -@subsection use_case_details_view Details View Use Case +In case of a tag/value pair too long to be fully displayed, the "more" button will be automatically drawn and its handling +automatically performed by NBGL by building a detailed modal view. + +When the user taps on "Reject" in any page, a confirmation page is automatically drawned to let user confirm that he rejects +the transaction. In this case, the given callback is called and it's up to app's developer to call @ref nbgl_useCaseReviewStatus(), as in +case of long-press. -\image{inline} html UseCase-DetailsView.png "caption" height=300 +The API to initiate the display of the series of pages is @ref nbgl_useCaseReviewStreamingStart(), providing: -Sometimes some values in tag/value pairs are too long to be displayed in a transaction/message review, and for that a -special content type (@ref TAG_VALUE_DETAILS) to display only the first lines of value, ended with "...". -And a button (for example with "More" text) is display to offer to the end-user a way to view details on this -tag/value, in a modal set of pages. +- the type of operation to review (transaction, message or generic operation) +- the texts/icon to use in presentation page +- a callback with one boolean parameter. + - If this parameter is *false*, it means that the transaction is rejected. + - If this parameter is *true*, it means that NBGL is waiting for new data, sent with @ref nbgl_useCaseReviewStreamingContinue() or @ref nbgl_useCaseReviewStreamingContinueExt() -To navigate in this set of pages, a navigation bar is available, with a quit button that will close the modal and redisplay the -page with the "More" button. +As long as there are new tag/value pairs to send, the API to call is either @ref nbgl_useCaseReviewStreamingContinueExt() (if skip is possible) or +@ref nbgl_useCaseReviewStreamingContinue(), providing: -The API to initiate the display of the set of pages is @ref nbgl_useCaseViewDetails(), providing: +- the list of tag/value pairs (or a callback to get them one by one) +- a callback with one boolean parameter. + - If this parameter is *false*, it means that the transaction is rejected. + - If this parameter is *true*, it means that NBGL is waiting for new data, to be sent with @ref nbgl_useCaseReviewStreamingContinue() or @ref nbgl_useCaseReviewStreamingContinueExt() -- the tag name (displayed in gray) -- the value full value string, that will automatically be split in multiple pages -- a boolean to indicate whether to wrap \b value text on ' ' or not +When there is no more data to senf, the API to call is either @ref nbgl_useCaseReviewStreamingFinish(), providing: -In every page except the last one, the last 3 characters of the last line of value are replaced by "...". +- the title to use for last page (with long-press button) +- a callback called when the long press button on last page or reject confirmation is used. The callback's param is *true* for confirmation, *false* for rejection. Here is the code to display something similar to example picture: @code -// 4 pairs of tag/value to display -static nbgl_layoutTagValue_t pair[] = { - { - .item = "msg/value/funds", - .value = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor"\ - "congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada"\ - libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim."\ - Fusce est. Vivamus a tellus. Pellentesque habitant morbi tristique senectus"\ - et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede."\ - Mauris et orci. Aenean nec lorem. In porttitor. Donec laoreet nonummy augue." - } -}; - -// result of the rejection choice -static void onConfirmAbandon(void) { +// called when long press button on last page is long-touched or when reject footer is touched +static void onReviewResult(bool confirm) { // display a status page and go back to main - nbgl_useCaseStatus("Transaction rejected",false,appMain); -} - -// called when long press button on 3rd page is long-touched or when reject footer is touched -static void reviewChoice(bool confirm) { if (confirm) { - // display a status page and go back to main - nbgl_useCaseStatus("Transaction signed",true,appMain); + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_SIGNED, appMain); } else { - nbgl_useCaseConfirm("Reject transaction?","Yes, Reject","Go back to transaction",onConfirmAbandon); + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_REJECTED, appMain); } } -// called when "more" button is touched -static void onButton(int token, uint8_t index) { - if (token == MORE_DETAILS_TOKEN) { - // display details review (no wrapping) - nbgl_useCaseViewDetails(pair[0].item,pairs[0].value,false); - } -} - -// called to get the content of the given page -static bool displayTransactionPage(uint8_t page, nbgl_pageContent_t *content) { - if (page == 0) { - // the first page contains 1 tag/value pair, with long text - content->type = TAG_VALUE_DETAILS; - content->tagValueList.nbPairs = 1; - content->tagValueList.pairs = (nbgl_layoutTagValue_t *)pair; - content->tagValueDetails.detailsButtonText = "More"; - content->tagValueDetails.detailsButtonToken = MORE_DETAILS_TOKEN; - } - else (page == 1) { - // the second page contains a long press button - content->type = INFO_LONG_PRESS, - content->infoLongPress.icon = &myAppIcon; - content->infoLongPress.text = "Confirm transaction\nMyCoin send"; - content->infoLongPress.longPressText = "Hold to send"; - content->infoLongPress.longPressToken = VALIDATE_TRANSACTION_TOKEN; +static void onTransactionContinue(bool askMore) +{ + if (askMore) { + nbgl_contentTagValueList_t pairsToSend; + // try to get more data + if (moreDataToSend(&pairsToSend)) { + nbgl_useCaseReviewStreamingContinue(&pairsToSend, onTransactionContinue); + } + else { + // all data sent, so finish + nbgl_useCaseReviewStreamingFinish("Sign transaction to transfer Cardano?", // title on last page + onReviewResult); // callback to handle reject/accept + } } else { - return false; + onReviewResult(false); } - // valid page so return true - return true; } -void reviewContinue(void) { - // review on 2 pages, starting at 0 - nbgl_useCaseRegularReview(0, 2, "Reject transaction", confirmTransaction, - displayTransactionPage, reviewChoice); +void staticReview(void) { + // initiate the streaming review + nbgl_useCaseReviewStreamingStart(TYPE_TRANSACTION, + &C_ic_asset_cardano_64, // icon on first and last page + "Review transaction", // title of the first page + NULL, // sub-title of the first page + onTransactionContinue); // callback to reject or ask more data } @endcode diff --git a/lib_nbgl/doc/resources/UseCase-AddressConfirmation.png b/lib_nbgl/doc/resources/UseCase-AddressConfirmation.png index de7a42aaa..3f4cc7e12 100755 Binary files a/lib_nbgl/doc/resources/UseCase-AddressConfirmation.png and b/lib_nbgl/doc/resources/UseCase-AddressConfirmation.png differ diff --git a/lib_nbgl/doc/resources/UseCase-AddressConfirmationExt.png b/lib_nbgl/doc/resources/UseCase-AddressConfirmationExt.png index f47b764c1..38f0f113b 100755 Binary files a/lib_nbgl/doc/resources/UseCase-AddressConfirmationExt.png and b/lib_nbgl/doc/resources/UseCase-AddressConfirmationExt.png differ diff --git a/lib_nbgl/doc/resources/UseCase-Choice.png b/lib_nbgl/doc/resources/UseCase-Choice.png index c92c3d30e..ea08dcee8 100755 Binary files a/lib_nbgl/doc/resources/UseCase-Choice.png and b/lib_nbgl/doc/resources/UseCase-Choice.png differ diff --git a/lib_nbgl/doc/resources/UseCase-HomeExt.png b/lib_nbgl/doc/resources/UseCase-HomeExt.png deleted file mode 100755 index 112ee5458..000000000 Binary files a/lib_nbgl/doc/resources/UseCase-HomeExt.png and /dev/null differ diff --git a/lib_nbgl/doc/resources/UseCase-HomePlugIn.png b/lib_nbgl/doc/resources/UseCase-HomePlugIn.png deleted file mode 100755 index ac1b00161..000000000 Binary files a/lib_nbgl/doc/resources/UseCase-HomePlugIn.png and /dev/null differ diff --git a/lib_nbgl/doc/resources/UseCase-HomeSettings.png b/lib_nbgl/doc/resources/UseCase-HomeSettings.png new file mode 100755 index 000000000..718ec6317 Binary files /dev/null and b/lib_nbgl/doc/resources/UseCase-HomeSettings.png differ diff --git a/lib_nbgl/doc/resources/UseCase-HomeSettingsAPI.png b/lib_nbgl/doc/resources/UseCase-HomeSettingsAPI.png new file mode 100755 index 000000000..bbc11ba14 Binary files /dev/null and b/lib_nbgl/doc/resources/UseCase-HomeSettingsAPI.png differ diff --git a/lib_nbgl/doc/resources/UseCase-Keypad.png b/lib_nbgl/doc/resources/UseCase-Keypad.png old mode 100644 new mode 100755 index 67270321b..f30eaade6 Binary files a/lib_nbgl/doc/resources/UseCase-Keypad.png and b/lib_nbgl/doc/resources/UseCase-Keypad.png differ diff --git a/lib_nbgl/doc/resources/UseCase-Review-Status.png b/lib_nbgl/doc/resources/UseCase-Review-Status.png new file mode 100755 index 000000000..2ff37bc17 Binary files /dev/null and b/lib_nbgl/doc/resources/UseCase-Review-Status.png differ diff --git a/lib_nbgl/doc/resources/UseCase-Review.png b/lib_nbgl/doc/resources/UseCase-Review.png new file mode 100755 index 000000000..d3dee441c Binary files /dev/null and b/lib_nbgl/doc/resources/UseCase-Review.png differ diff --git a/lib_nbgl/doc/resources/UseCase-Review1.png b/lib_nbgl/doc/resources/UseCase-Review1.png deleted file mode 100755 index cbe85469a..000000000 Binary files a/lib_nbgl/doc/resources/UseCase-Review1.png and /dev/null differ diff --git a/lib_nbgl/doc/resources/UseCase-ReviewForwardOnly.png b/lib_nbgl/doc/resources/UseCase-ReviewForwardOnly.png deleted file mode 100755 index 9ff2bbd11..000000000 Binary files a/lib_nbgl/doc/resources/UseCase-ReviewForwardOnly.png and /dev/null differ diff --git a/lib_nbgl/doc/resources/UseCase-ReviewLight.png b/lib_nbgl/doc/resources/UseCase-ReviewLight.png deleted file mode 100755 index 046e00561..000000000 Binary files a/lib_nbgl/doc/resources/UseCase-ReviewLight.png and /dev/null differ diff --git a/lib_nbgl/doc/resources/UseCase-ReviewStart.png b/lib_nbgl/doc/resources/UseCase-ReviewStart.png deleted file mode 100755 index b2757c1c0..000000000 Binary files a/lib_nbgl/doc/resources/UseCase-ReviewStart.png and /dev/null differ diff --git a/lib_nbgl/doc/resources/UseCase-Settings1.png b/lib_nbgl/doc/resources/UseCase-Settings1.png deleted file mode 100755 index d1957cce9..000000000 Binary files a/lib_nbgl/doc/resources/UseCase-Settings1.png and /dev/null differ diff --git a/lib_nbgl/doc/resources/UseCase-Settings2.png b/lib_nbgl/doc/resources/UseCase-Settings2.png deleted file mode 100755 index a354cb70e..000000000 Binary files a/lib_nbgl/doc/resources/UseCase-Settings2.png and /dev/null differ diff --git a/lib_nbgl/doc/resources/UseCase-Spinner.png b/lib_nbgl/doc/resources/UseCase-Spinner.png index 99c26c8b4..e6ee2c77e 100755 Binary files a/lib_nbgl/doc/resources/UseCase-Spinner.png and b/lib_nbgl/doc/resources/UseCase-Spinner.png differ diff --git a/lib_nbgl/doc/resources/UseCase-Status.png b/lib_nbgl/doc/resources/UseCase-Status.png index d381c43fe..ac46f4309 100755 Binary files a/lib_nbgl/doc/resources/UseCase-Status.png and b/lib_nbgl/doc/resources/UseCase-Status.png differ diff --git a/lib_nbgl/doc/resources/UseCase-Streaming.png b/lib_nbgl/doc/resources/UseCase-Streaming.png new file mode 100755 index 000000000..a42131f59 Binary files /dev/null and b/lib_nbgl/doc/resources/UseCase-Streaming.png differ diff --git a/lib_nbgl/src/nbgl_layout_keypad.c b/lib_nbgl/src/nbgl_layout_keypad.c index 33589682e..29a9bd9cf 100644 --- a/lib_nbgl/src/nbgl_layout_keypad.c +++ b/lib_nbgl/src/nbgl_layout_keypad.c @@ -1,5 +1,5 @@ /** - * @file nbgl_layout_kbd.c + * @file nbgl_layout_keypad.c * @brief Implementation of keypad management of predefined layouts management for Applications * @note This file applies only to wallet size products (Stax, Flex...) */ diff --git a/lib_nbgl/src/nbgl_layout_navigation.c b/lib_nbgl/src/nbgl_layout_navigation.c index 5bec637c9..426feccad 100644 --- a/lib_nbgl/src/nbgl_layout_navigation.c +++ b/lib_nbgl/src/nbgl_layout_navigation.c @@ -1,6 +1,6 @@ /** - * @file nbgl_navigation.c + * @file nbgl_layout_navigation.c * @brief The construction of a navigation bar with buttons super-object * */ diff --git a/lib_nfc/doc/mainpage.dox b/lib_nfc/doc/mainpage.dox index b6e46a7d0..df9cde602 100644 --- a/lib_nfc/doc/mainpage.dox +++ b/lib_nfc/doc/mainpage.dox @@ -1,6 +1,6 @@ /** @page nfc_mainpage NFC API -@section mainpage_intro Introduction +@section nfc_mainpage_intro Introduction This page describes the API of NFC (Near-Field Communication) Stack (only available on \b Stax product). diff --git a/lib_standard_app/doc/mainpage.dox b/lib_standard_app/doc/mainpage.dox index 202f9fb5a..5ba8f4bad 100644 --- a/lib_standard_app/doc/mainpage.dox +++ b/lib_standard_app/doc/mainpage.dox @@ -1,6 +1,6 @@ /** @page standard_app_mainpage Standard Application Framework -@section mainpage_intro Introduction +@section standard_app_mainpage_intro Introduction This page describes a framework of utilities to be used with a standard application. It includes the \b main() entry point, and many helpers like APDU parser skeleton, IO parser, and standard crypto (like derivation) and buffer management. diff --git a/lib_stusb/doc/mainpage.dox b/lib_stusb/doc/mainpage.dox index 4db1d4023..74204fa68 100644 --- a/lib_stusb/doc/mainpage.dox +++ b/lib_stusb/doc/mainpage.dox @@ -1,6 +1,6 @@ /** @page usb_mainpage USB Core library -@section mainpage_intro Introduction +@section usb_mainpage_intro Introduction This page describes the core part of the USB Stack (only available on \b NanoX and \b Stax products). It also contains the mid-level API of the HID and CCID classes (see also @ref usb_impl_mainpage). diff --git a/lib_stusb_impl/doc/mainpage.dox b/lib_stusb_impl/doc/mainpage.dox index c5f1c23c5..b353bb2e6 100644 --- a/lib_stusb_impl/doc/mainpage.dox +++ b/lib_stusb_impl/doc/mainpage.dox @@ -1,6 +1,6 @@ /** @page usb_impl_mainpage USB Classes library -@section mainpage_intro Introduction +@section usb_impl_mainpage_intro Introduction This page describes the API of the HID and CCID classes (see also @ref usb_mainpage), and the mid-level API of the U2F protocol offered on \b NanoX and \b Stax products. diff --git a/lib_stusb_impl/usbd_impl.c b/lib_stusb_impl/usbd_impl.c index 28390e656..a7fa7ec27 100644 --- a/lib_stusb_impl/usbd_impl.c +++ b/lib_stusb_impl/usbd_impl.c @@ -1,6 +1,6 @@ /** ****************************************************************************** - * @file usbd_hid.c + * @file usbd_impl.c * @author MCD Application Team * @version V2.2.0 * @date 13-June-2014 diff --git a/lib_u2f/doc/mainpage.dox b/lib_u2f/doc/mainpage.dox index 8814c171c..dbf4e0620 100644 --- a/lib_u2f/doc/mainpage.dox +++ b/lib_u2f/doc/mainpage.dox @@ -1,6 +1,6 @@ /** @page u2f_mainpage Universal 2nd Factor library -@section mainpage_intro Introduction +@section u2f_mainpage_intro Introduction This page describes the API of U2F (Universal 2nd Factor), available on \b NanoX and \b Stax products. diff --git a/lib_ux/doc/mainpage.dox b/lib_ux/doc/mainpage.dox index 9e37bc6c4..6fd3720a5 100644 --- a/lib_ux/doc/mainpage.dox +++ b/lib_ux/doc/mainpage.dox @@ -1,6 +1,6 @@ /** @page ux_mainpage User Experience (graphical) library for Nanos -@section mainpage_intro Introduction +@section ux_mainpage_intro Introduction This page describes the UX (User eXperience) library, available on \b NanoS, \b NanoS+ and \b NanoX products. This library offers API to draw steps and flows, respectively as arrays of BAGL objects or of UX Steps. diff --git a/lib_ux_nbgl/doc/mainpage.dox b/lib_ux_nbgl/doc/mainpage.dox index 84b54bf16..cb4711b7c 100644 --- a/lib_ux_nbgl/doc/mainpage.dox +++ b/lib_ux_nbgl/doc/mainpage.dox @@ -1,8 +1,8 @@ -/** @page ux_stax_mainpage User Experience library for Stax +/** @page ux_nbgl_mainpage User Experience library for Stax -@section mainpage_intro Introduction +@section ux_nbgl_mainpage_intro Introduction -This page describes the UX (User eXperience) library, available on \b Stax product. +This page describes the UX (User eXperience) library, available on all products (except Nano S). @note TO BE COMPLETED