Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Documentation generation & update

on:
push:
tags:
- '*'
branches:
- master
pull_request:
branches:
- master

Expand Down Expand Up @@ -34,18 +29,33 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install graphviz doxygen
- name: Generate the documentation
run: make doc
- name: Generate Wallet documentation
run: |
make doc
mkdir -p build/doc/site/wallet
cp -a build/doc/html/. build/doc/site/wallet/

- name: Generate Nano documentation
run: |
TARGET=nanox make doc
mkdir -p build/doc/site/nano
cp -a build/doc/html/. build/doc/site/nano/

- name: Create landing page
run: |
cp doc/landing.html build/doc/site/index.html

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: build/doc/html/
path: build/doc/site/

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/'))
# Safety guard: keep deployment restricted to master even if triggers change later.
if: github.ref == 'refs/heads/master'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
29 changes: 27 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.PHONY: doc
.PHONY: doc doc-wallet doc-nano doc-all

BUILD_DIR := build
DOC_SITE_DIR := $(BUILD_DIR)/doc/site

# default target is stax
TARGET ?= stax
Expand All @@ -18,11 +19,35 @@ NBGL_DEFINES_nano := \

NBGL_DEFINES := $(NBGL_DEFINES_$(TARGET))

# For nano-family targets (nano, nanox, nanosplus, etc.), default to nano defines.
ifeq ($(strip $(NBGL_DEFINES)),)
ifneq ($(filter nano%,$(TARGET)),)
NBGL_DEFINES := $(NBGL_DEFINES_nano)
endif
endif

export NBGL_DEFINES

doc: | $(BUILD_DIR)
@doxygen doc/Doxyfile
@echo 'HTML doc can be found in '$(BUILD_DIR)/doc/html/index.html
@echo "HTML doc for '$(TARGET)' can be found in '$(BUILD_DIR)/doc/html/index.html'"

doc-wallet:
@$(MAKE) --no-print-directory TARGET=stax doc

doc-nano:
@$(MAKE) --no-print-directory TARGET=nanox doc

doc-all:
@mkdir -p $(DOC_SITE_DIR)
@$(MAKE) --no-print-directory TARGET=stax doc
@mkdir -p $(DOC_SITE_DIR)/wallet
@cp -a $(BUILD_DIR)/doc/html/. $(DOC_SITE_DIR)/wallet/
@$(MAKE) --no-print-directory TARGET=nanox doc
@mkdir -p $(DOC_SITE_DIR)/nano
@cp -a $(BUILD_DIR)/doc/html/. $(DOC_SITE_DIR)/nano/
@cp doc/landing.html $(DOC_SITE_DIR)/index.html
@echo 'Combined documentation can be found in '$(DOC_SITE_DIR)/index.html

$(BUILD_DIR):
@mkdir -p $@
21 changes: 3 additions & 18 deletions doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ OUTPUT_LANGUAGE = English
# Possible values are: None, LTR, RTL and Context.
# The default value is: None.

OUTPUT_TEXT_DIRECTION = None

# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
# descriptions after the members that are listed in the file and class
Expand Down Expand Up @@ -756,7 +755,7 @@ CITE_BIB_FILES =
# messages are off.
# The default value is: NO.

QUIET = NO
QUIET = YES

# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
Expand Down Expand Up @@ -838,19 +837,14 @@ INPUT = \
lib_nbgl/doc \
lib_nbgl/include \
lib_nbgl/src \
lib_blewbxx_impl/doc \
lib_blewbxx_impl/include \
lib_blewbxx_impl/src \
lib_nfc/doc \
lib_nfc/include \
lib_nfc/src \
lib_standard_app/doc \
lib_standard_app \
lib_stusb/doc \
lib_stusb \
lib_stusb_impl/doc \
lib_stusb_impl \
lib_u2f/doc \
lib_u2f/include \
lib_u2f/src \
lib_ux/doc \
Expand Down Expand Up @@ -945,7 +939,8 @@ RECURSIVE = NO
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE = app_features/address_book/doc/address_book_spec.md
EXCLUDE = app_features/address_book/doc/address_book_spec.md \
doc/landing.html

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down Expand Up @@ -1317,7 +1312,6 @@ HTML_COLORSTYLE_GAMMA = 80
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_TIMESTAMP = NO

# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
# documentation will contain a main index with vertical navigation menus that
Expand Down Expand Up @@ -1609,7 +1603,6 @@ FORMULA_FONTSIZE = 10
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.

FORMULA_TRANSPARENT = YES

# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
# to create new LaTeX commands to be used in formulas as building blocks. See
Expand Down Expand Up @@ -1917,7 +1910,6 @@ LATEX_HIDE_INDICES = NO
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_SOURCE_CODE = NO

# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. See
Expand All @@ -1933,7 +1925,6 @@ LATEX_BIB_STYLE = plain
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_TIMESTAMP = NO

# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
# path from which the emoji images will be read. If a relative path is entered,
Expand Down Expand Up @@ -2007,7 +1998,6 @@ RTF_EXTENSIONS_FILE =
# The default value is: NO.
# This tag requires that the tag GENERATE_RTF is set to YES.

RTF_SOURCE_CODE = NO

#---------------------------------------------------------------------------
# Configuration options related to the man page output
Expand Down Expand Up @@ -2112,7 +2102,6 @@ DOCBOOK_OUTPUT = docbook
# The default value is: NO.
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.

DOCBOOK_PROGRAMLISTING = NO

#---------------------------------------------------------------------------
# Configuration options for the AutoGen Definitions output
Expand Down Expand Up @@ -2301,7 +2290,6 @@ EXTERNAL_PAGES = YES
# powerful graphs.
# The default value is: YES.

CLASS_DIAGRAMS = YES

# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The
Expand Down Expand Up @@ -2343,14 +2331,12 @@ DOT_NUM_THREADS = 0
# The default value is: Helvetica.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_FONTNAME = Helvetica

# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
# dot graphs.
# Minimum value: 4, maximum value: 24, default value: 10.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_FONTSIZE = 10

# By default doxygen will tell dot to use the default font as specified with
# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
Expand Down Expand Up @@ -2579,7 +2565,6 @@ MAX_DOT_GRAPH_DEPTH = 0
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_TRANSPARENT = NO

# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
# files in one run (i.e. multiple -o and -T options on the command line). This
Expand Down
59 changes: 59 additions & 0 deletions doc/landing.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Embedded SDK Documentation</title>
<style>
:root {
color-scheme: light;
--bg: #f4f6f8;
--card: #ffffff;
--text: #1f2937;
--muted: #6b7280;
--accent: #0b6bcb;
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
background: linear-gradient(135deg, #eef2f7, #f8fafc);
color: var(--text);
min-height: 100vh;
display: grid;
place-items: center;
padding: 24px;
}
.wrap {
width: min(760px, 100%);
background: var(--card);
border-radius: 14px;
padding: 28px;
box-shadow: 0 8px 28px rgba(31, 41, 55, 0.08);
}
h1 { margin: 0 0 8px; font-size: 1.6rem; }
p { margin: 0 0 18px; color: var(--muted); }
.links { display: grid; gap: 12px; }
a {
display: block;
text-decoration: none;
padding: 14px 16px;
border-radius: 10px;
border: 1px solid #dbe3ee;
color: var(--text);
font-weight: 600;
}
a:hover { border-color: var(--accent); color: var(--accent); }
</style>
</head>
<body>
<main class="wrap">
<h1>Embedded SDK Documentation</h1>
<p>Choose the documentation variant:</p>
<div class="links">
<a href="wallet/index.html">Wallet documentation (Stax/Flex/Apex)</a>
<a href="nano/index.html">Nano documentation (Nano targets)</a>
</div>
</main>
</body>
</html>
10 changes: 5 additions & 5 deletions doc/mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ or Ledger-managed accounts.

@section ble_presentation BlueTooth Low-Energy Interface

The @subpage ble_mainpage page contains all information necessary to interact with BLE stack.
This section contains the interfaces necessary to interact with the BLE stack.

@section cxng_presentation Cryptographic Library

Expand All @@ -27,7 +27,7 @@ The @subpage list_mainpage page contains all information necessary to use the Ge

The @subpage mem_alloc_mainpage page contains all information necessary to interact with Dynamic Memory Allocator.

@section nbgl_presentation Screen drawing API
@section nbgl_presentation Display & Screen drawing API

The @subpage nbgl_mainpage page contains all information necessary to understand the Graphical Library for
\b Stax, \b Flex, \b NanoX and \b NanoS+ applications development.
Expand All @@ -44,15 +44,15 @@ The @subpage standard_app_mainpage page contains all information necessary to us

@subsection usb_core_presentation USB Core

The @subpage usb_mainpage page contains all information necessary to use the USB Core.
This section contains all information necessary to use the USB Core.

@subsection usb_impl_presentation USB Classes API

The @subpage usb_impl_mainpage page contains all information necessary to use the USB Classes API.
This section contains all information necessary to use the USB Classes API.

@subsection u2f_presentation U2F (Universal 2nd Factor) API

The @subpage u2f_mainpage page contains all information necessary to use the U2F API.
This section contains all information necessary to use the U2F API.

@section ux_presentation User eXperience

Expand Down
Binary file modified doc/plantuml.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion lib_alloc/doc/mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ Exit code is 0 if no errors detected, 1 if leaks or free errors found.

@subsection mem_alloc_profiling_persistent Persistent Allocations

Persistent allocations are those that are intentionally kept without being freed (@ref mem_buffer_persistent()).
Persistent allocations are those that are intentionally kept without being freed,
for example by using @ref APP_MEM_PERMANENT.
Such buffers will not be reported as leaks.

@code{.c}
Expand Down
8 changes: 6 additions & 2 deletions lib_alloc/mem_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,10 @@ void mem_free(mem_ctx_t ctx, void *ptr)
/**
* @brief parse the heap
*
* Iterates over blocks managed by @ref mem_alloc and @ref mem_free.
*
* @param ctx allocator context (returned by @ref mem_init())
* @param ptr buffer previously allocated with @ref mem_alloc
* @param callback callback called for each block while parsing
* @param data context data, passed to given callback
*/
void mem_parse(mem_ctx_t ctx, mem_parse_callback_t callback, void *data)
Expand Down Expand Up @@ -614,8 +616,10 @@ void mem_parse(mem_ctx_t ctx, mem_parse_callback_t callback, void *data)
* @brief function used to get statistics (nb chunks, nb allocated chunks, total size) about the
* heap
*
* Statistics are computed from the heap used by @ref mem_alloc and @ref mem_free.
*
* @param ctx allocator context (returned by @ref mem_init())
* @param ptr buffer previously allocated with @ref mem_alloc
* @param stat output statistics structure
*/
void mem_stat(mem_ctx_t *ctx, mem_stat_t *stat)
{
Expand Down
2 changes: 1 addition & 1 deletion lib_cxng/include/lcx_aead.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @file lcx_aead.h
* @brief Authenticated Encryption with Associated Data (AEAD)
*
* @section Description
* @details
*
* Authenticated encryption provides confidentiality for the plaintext
* and integrity and authenticity checks. Authentication Encryption with
Expand Down
2 changes: 1 addition & 1 deletion lib_cxng/include/lcx_aes_gcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @file lcx_aes_gcm.h
* @brief AES in Galois/Counter Mode (AES-GCM)
*
* @section Description
* @details
*
* The Galois/Counter Mode (GCM) is an authenticated encryption algorithm
* designed to provide both data authenticity (integrity) and confidentiality.
Expand Down
2 changes: 1 addition & 1 deletion lib_cxng/include/lcx_aes_siv.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @file lcx_aes_siv.h
* @brief Advanced Encryption Standard with Synthetic Initialization Vector (AES-SIV).
*
* @section Description
* @details
* AES-SIV is an algorithm which provides both authentication and encryption.
* It uses AES in CMAC mode to compute a synthetic initialization vector
* which is further used by the AES in counter mode to encrypt
Expand Down
2 changes: 1 addition & 1 deletion lib_cxng/include/lcx_blake3.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @file lcx_blake3.h
* @brief BLAKE3 hash function.
*
* @section Description
* @details
*
* BLAKE3 is a cryptographic algorithm which is an evolution of
* BLAKE2 cryptographic hash function. It provides keyed hashing and
Expand Down
2 changes: 1 addition & 1 deletion lib_cxng/include/lcx_chacha.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @file lcx_chacha.h
* @brief Chacha cipher
*
* @section Description
* @details
*
* The Chacha cipher is a stream cipher which generates a key stream of at most 2^70 bytes
* composed of blocks of size 512 bits. The possible key sizes are 128 bits and 256 bits and
Expand Down
Loading
Loading