diff --git a/.github/workflows/basic_checks.yml b/.github/workflows/basic_checks.yml index 8cc4bec..e7c69d9 100644 --- a/.github/workflows/basic_checks.yml +++ b/.github/workflows/basic_checks.yml @@ -26,7 +26,7 @@ name: install dependencies shell: bash run: | - pip install -U scancode-toolkit click gemfileparser + pip install -U scancode-toolkit "click>=7,<8" - name: license check @@ -42,6 +42,7 @@ | ( grep -v '^tools/test/toolchains/api_test.py' || true ) \ | while read file; do cp --parents "${file}" SCANCODE; done ls SCANCODE + scancode --reindex-licenses # workaround for scancode-toolkit#3179 scancode -l --json-pp scancode.json SCANCODE python ./tools/test/ci/scancode-evaluate.py scancode.json || true cat scancode-evaluate.log @@ -106,21 +107,7 @@ | while read file; do astyle -n --options=.astylerc "${file}"; done git diff --exit-code --diff-filter=d --color - - docs-check: - runs-on: ubuntu-latest - container: - image: ghcr.io/armmbed/mbed-os-env:master-latest - - steps: - - - name: Checkout repo - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - - name: spell checks + - name: Spell Checks run: | set -x ./tools/test/ci/doxy-spellchecker/spell.sh drivers .codecheckignore @@ -129,18 +116,9 @@ ./tools/test/ci/doxy-spellchecker/spell.sh rtos .codecheckignore ./tools/test/ci/doxy-spellchecker/spell.sh connectivity/netsocket .codecheckignore - - - name: doxygen + - name: File Naming Checks run: | set -x - ccache -s - mkdir BUILD - # Assert that the Doxygen build produced no warnings. - # The strange command below asserts that the Doxygen command had an - # output of zero length - doxygen doxyfile_options 2>&1 - # Once Mbed OS has been fixed, enable the full test by replacing the top line with this: - # - ( ! doxygen doxyfile_options 2>&1 | grep . ) # Assert that all binary libraries are named correctly # The strange command below asserts that there are exactly 0 libraries # that do not start with lib @@ -153,6 +131,26 @@ find -name "*.s" | tee BUILD/badasm | sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ] + docs-check: + runs-on: ubuntu-latest + + steps: + + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: recursive + + - name: Create BUILD folder + run: | + mkdir -p ${{ github.workspace }}/BUILD + + - name: Doxygen Action + uses: mattnotmitt/doxygen-action@v1.9.1 + with: + doxyfile-path: ./doxyfile_options + python-tests: # these tests run in 3.7, hence running in vm not in pre-built docker runs-on: ubuntu-latest diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 5563bfa..d659919 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -11,7 +11,7 @@ runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive @@ -21,7 +21,7 @@ # Build the HTML documentation - name: Doxygen Action - uses: mattnotmitt/doxygen-action@v1.1.0 + uses: mattnotmitt/doxygen-action@v1.9.1 with: doxyfile-path: ./doxyfile_options diff --git a/README.md b/README.md index f00669b..1b74251 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,13 @@ We have a [developer website](https://os.mbed.com) for asking questions, engaging with others, finding information on boards and components, using an online IDE and compiler, reading the documentation and learning about what's new and what's coming next in Mbed OS. -## Getting started for contributors - -We also have a [contributing and publishing guide](https://os.mbed.com/contributing/) that covers licensing, contributor agreements and style guidelines. +Additionally, the [discussions page](https://github.com/mbed-ce/mbed-os/discussions) on this repo can be used for proposing and discussing specific code changes. ## Documentation -For more information about Mbed OS, please see [our published documentation](https://os.mbed.com/docs/latest). It includes Doxygen for our APIs, step-by-step tutorials, porting information and background reference materials about our architecture and tools. +For more information about Mbed OS, please see [our published documentation](https://os.mbed.com/docs/latest). It includes general overview information, step-by-step tutorials, porting information and background reference materials about our architecture and tools. + +For the Mbed OS CE class-level documentation, see [here](https://mbed-ce.github.io/mbed-os/group__mbed-os-public.html) To contribute to this documentation, please see the [mbed-os-5-docs repository](https://github.com/ARMmbed/mbed-os-5-docs). diff --git a/connectivity/FEATURE_BLE/include/ble/driver/CordioHCIDriver.h b/connectivity/FEATURE_BLE/include/ble/driver/CordioHCIDriver.h index a32d160..35a6951 100644 --- a/connectivity/FEATURE_BLE/include/ble/driver/CordioHCIDriver.h +++ b/connectivity/FEATURE_BLE/include/ble/driver/CordioHCIDriver.h @@ -115,6 +115,8 @@ /** * Get the random static address of the controller * + * @param[out] address MAC address is written here. + * * @return false if the address has not been set and true otherwise. */ virtual bool get_random_static_address(ble::address_t& address); diff --git a/connectivity/cellular/include/cellular/framework/API/ATHandler.h b/connectivity/cellular/include/cellular/framework/API/ATHandler.h index da2a6ea..7222daf 100644 --- a/connectivity/cellular/include/cellular/framework/API/ATHandler.h +++ b/connectivity/cellular/include/cellular/framework/API/ATHandler.h @@ -205,7 +205,7 @@ * command when you need multiple response parameters to be handled. * NOTE: Does not lock ATHandler for process! * - * @param cmd AT command in form + (will be used also in response reading, no extra chars allowed) + * @param cmd AT command in form +<CMD< (will be used also in response reading, no extra chars allowed) * @param cmd_chr Char to be added to specific AT command: '?', '=' or ''. Will be used as such so '=1' is valid as well. * @param format Format string for variadic arguments to be added to AT command; No separator needed. * Use %d for integer, %s for string and %b for byte string (requires 2 arguments: string and length) @@ -214,7 +214,7 @@ /** * @brief at_cmd_str Send an AT command and read a single string response. Locks and unlocks ATHandler for operation - * @param cmd AT command in form + (will be used also in response reading, no extra chars allowed) + * @param cmd AT command in form +<CMD< (will be used also in response reading, no extra chars allowed) * @param cmd_chr Char to be added to specific AT command: '?', '=' or ''. Will be used as such so '=1' is valid as well. * @param resp_buf Response buffer * @param resp_buf_size Response buffer size @@ -226,7 +226,7 @@ /** * @brief at_cmd_int Send an AT command and read a single integer response. Locks and unlocks ATHandler for operation - * @param cmd AT command in form + (will be used also in response reading, no extra chars allowed) + * @param cmd AT command in form +<CMD< (will be used also in response reading, no extra chars allowed) * @param cmd_chr Char to be added to specific AT command: '?', '=' or ''. Will be used as such so '=1' is valid as well. * @param resp Integer to hold response * @param format Format string for variadic arguments to be added to AT command; No separator needed. @@ -237,7 +237,7 @@ /** * @brief at_cmd_discard Send an AT command and read and discard a response. Locks and unlocks ATHandler for operation - * @param cmd AT command in form + (will be used also in response reading, no extra chars allowed) + * @param cmd AT command in form +<CMD< (will be used also in response reading, no extra chars allowed) * @param cmd_chr Char to be added to specific AT command: '?', '=' or ''. Will be used as such so '=1' is valid as well. * @param format Format string for variadic arguments to be added to AT command; No separator needed. * Use %d for integer, %s for string and %b for byte string (requires 2 arguments: string and length) diff --git a/connectivity/cellular/include/cellular/framework/API/CellularContext.h b/connectivity/cellular/include/cellular/framework/API/CellularContext.h index 254a61b..e9c22f9 100644 --- a/connectivity/cellular/include/cellular/framework/API/CellularContext.h +++ b/connectivity/cellular/include/cellular/framework/API/CellularContext.h @@ -36,7 +36,7 @@ * @ingroup mbed-os-public * @{ - * @defgroup Cellular + * @defgroup Cellular Cellular * @ingroup connectivity-public-api * @{ */ diff --git a/connectivity/cellular/include/cellular/framework/API/CellularDevice.h b/connectivity/cellular/include/cellular/framework/API/CellularDevice.h index f97d582..7d0adbf 100644 --- a/connectivity/cellular/include/cellular/framework/API/CellularDevice.h +++ b/connectivity/cellular/include/cellular/framework/API/CellularDevice.h @@ -218,8 +218,7 @@ /** Creates a new CellularContext interface. * - * @param fh file handle used in communication to modem. This can be, for example, UART handle. If null, then the default - * file handle is used. + * * @param apn access point to use with context, can be null. * @param cp_req flag indicating if EPS control plane optimization is required * @param nonip_req flag indicating if this context is required to be Non-IP @@ -297,8 +296,6 @@ /** Create new CellularNetwork interface. * - * @param fh file handle used in communication to modem. This can be, for example, UART handle. If null, then the default - * file handle is used. * @return New instance of interface CellularNetwork. */ virtual CellularNetwork *open_network() = 0; @@ -306,8 +303,6 @@ #if MBED_CONF_CELLULAR_USE_SMS || defined(DOXYGEN_ONLY) /** Create new CellularSMS interface. * - * @param fh file handle used in communication to modem. This can be, for example, UART handle. If null, then the default - * file handle is used. * @return New instance of interface CellularSMS. */ virtual CellularSMS *open_sms() = 0; @@ -320,8 +315,6 @@ /** Create new CellularInformation interface. * - * @param fh file handle used in communication to modem. This can be, for example, UART handle. If null, then the default - * file handle is used. * @return New instance of interface CellularInformation. */ virtual CellularInformation *open_information() = 0; diff --git a/connectivity/cellular/include/cellular/framework/AT/AT_CellularDevice.h b/connectivity/cellular/include/cellular/framework/AT/AT_CellularDevice.h index 2c5c2ee..5fc37e7 100755 --- a/connectivity/cellular/include/cellular/framework/AT/AT_CellularDevice.h +++ b/connectivity/cellular/include/cellular/framework/AT/AT_CellularDevice.h @@ -73,7 +73,15 @@ }; public: - AT_CellularDevice(FileHandle *fh, char *delim = "\r"); + + /** + * Create an AT_CellularDevice. + * + * @param fh file handle used for reading AT responses and writing AT commands + * @param delim delimiter used when parsing at responses, "\r" should be used as output_delimiter + */ + AT_CellularDevice(FileHandle *fh, char const *delim = "\r"); + virtual ~AT_CellularDevice(); virtual nsapi_error_t clear(); diff --git a/connectivity/cellular/source/framework/AT/AT_CellularDevice.cpp b/connectivity/cellular/source/framework/AT/AT_CellularDevice.cpp index e3fd5b5..7a2d79f 100644 --- a/connectivity/cellular/source/framework/AT/AT_CellularDevice.cpp +++ b/connectivity/cellular/source/framework/AT/AT_CellularDevice.cpp @@ -39,7 +39,7 @@ #define DEFAULT_AT_TIMEOUT 1s // at default timeout const int MAX_SIM_RESPONSE_LENGTH = 16; -AT_CellularDevice::AT_CellularDevice(FileHandle *fh, char *delim): +AT_CellularDevice::AT_CellularDevice(FileHandle *fh, char const *delim): CellularDevice(), _at(fh, _queue, DEFAULT_AT_TIMEOUT, delim), #if MBED_CONF_CELLULAR_USE_SMS diff --git a/connectivity/cellular/tests/UNITTESTS/doubles/AT_CellularDevice_stub.cpp b/connectivity/cellular/tests/UNITTESTS/doubles/AT_CellularDevice_stub.cpp index 300962b..0662425 100644 --- a/connectivity/cellular/tests/UNITTESTS/doubles/AT_CellularDevice_stub.cpp +++ b/connectivity/cellular/tests/UNITTESTS/doubles/AT_CellularDevice_stub.cpp @@ -33,7 +33,7 @@ bool AT_CellularDevice_stub::supported_bool = false; int AT_CellularDevice_stub::max_sock_value = 1; -AT_CellularDevice::AT_CellularDevice(FileHandle *fh, char *delim) : +AT_CellularDevice::AT_CellularDevice(FileHandle *fh, char const *delim) : CellularDevice(), _at(fh, _queue, get_property(AT_CellularDevice::PROPERTY_AT_SEND_DELAY), delim), #if MBED_CONF_CELLULAR_USE_SMS diff --git a/connectivity/drivers/ble/FEATURE_BLE/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/NRFCordioHCIDriver.h b/connectivity/drivers/ble/FEATURE_BLE/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/NRFCordioHCIDriver.h index a9d97ef..3df78ff 100644 --- a/connectivity/drivers/ble/FEATURE_BLE/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/NRFCordioHCIDriver.h +++ b/connectivity/drivers/ble/FEATURE_BLE/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/NRFCordioHCIDriver.h @@ -48,19 +48,7 @@ */ virtual void start_reset_sequence(); - /** - * Handle HCI messages received during the reset sequence. - * - * @param msg The HCI message received. - * @note The driver should signal to the stack that the initialization - * sequence is done by calling the function: signal_reset_sequence_done. - */ - //virtual void handle_reset_sequence(uint8_t *msg); - - /** - * @copydoc CordioHCIDriver::get_random_static_address - */ - virtual bool get_random_static_address(ble::address_t& address); + bool get_random_static_address(ble::address_t& address) override; private: /** diff --git a/connectivity/drivers/lora/COMPONENT_SX126X/SX126X_LoRaRadio.cpp b/connectivity/drivers/lora/COMPONENT_SX126X/SX126X_LoRaRadio.cpp index 5c3b29f..6033074 100644 --- a/connectivity/drivers/lora/COMPONENT_SX126X/SX126X_LoRaRadio.cpp +++ b/connectivity/drivers/lora/COMPONENT_SX126X/SX126X_LoRaRadio.cpp @@ -1269,13 +1269,18 @@ write_opmode_command((uint8_t) RADIO_SET_BUFFERBASEADDRESS, buf, 2); } -uint8_t SX126X_LoRaRadio::get_status(void) +radio_state_t SX126X_LoRaRadio::get_status(void) { - if (_operation_mode != MODE_STDBY_RC || _operation_mode != MODE_SLEEP) { - return 0; + switch (_operation_mode) { + case MODE_TX: + return RF_TX_RUNNING; + case MODE_RX: + return RF_RX_RUNNING; + case MODE_CAD: + return RF_CAD; + default: // various standby states + return RF_IDLE; } - - return 0xFF; } int8_t SX126X_LoRaRadio::get_rssi() diff --git a/connectivity/drivers/lora/COMPONENT_SX126X/SX126X_LoRaRadio.h b/connectivity/drivers/lora/COMPONENT_SX126X/SX126X_LoRaRadio.h index 5b4daf3..a1d72c9 100644 --- a/connectivity/drivers/lora/COMPONENT_SX126X/SX126X_LoRaRadio.h +++ b/connectivity/drivers/lora/COMPONENT_SX126X/SX126X_LoRaRadio.h @@ -89,48 +89,13 @@ */ virtual void standby(void); - /** - * Sets the reception parameters - * - * @param modem Radio modem to be used [0: FSK, 1: LoRa] - * @param bandwidth Sets the bandwidth - * FSK : >= 2600 and <= 250000 Hz - * LoRa: [0: 125 kHz, 1: 250 kHz, - * 2: 500 kHz, 3: Reserved] - * @param datarate Sets the Datarate - * FSK : 600..300000 bits/s - * LoRa: [6: 64, 7: 128, 8: 256, 9: 512, - * 10: 1024, 11: 2048, 12: 4096 chips] - * @param coderate Sets the coding rate ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8] - * @param bandwidth_afc Sets the AFC Bandwidth ( FSK only ) - * FSK : >= 2600 and <= 250000 Hz - * LoRa: N/A ( set to 0 ) - * @param preamble_len Sets the Preamble length ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: Length in symbols ( the hardware adds 4 more symbols ) - * @param symb_timeout Sets the RxSingle timeout value - * FSK : timeout number of bytes - * LoRa: timeout in symbols - * @param fixLen Fixed length packets [0: variable, 1: fixed] - * @param payload_len Sets payload length when fixed lenght is used - * @param crc_on Enables/Disables the CRC [0: OFF, 1: ON] - * @param freq_hop_on Enables disables the intra-packet frequency hopping [0: OFF, 1: ON] (LoRa only) - * @param hop_period Number of symbols bewteen each hop (LoRa only) - * @param iq_inverted Inverts IQ signals ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: [0: not inverted, 1: inverted] - * @param rx_continuous Sets the reception in continuous mode - * [false: single mode, true: continuous mode] - */ - virtual void set_rx_config(radio_modems_t modem, uint32_t bandwidth, - uint32_t datarate, uint8_t coderate, - uint32_t bandwidth_afc, uint16_t preamble_len, - uint16_t symb_timeout, bool fix_len, - uint8_t payload_len, - bool crc_on, bool freq_hop_on, uint8_t hop_period, - bool iq_inverted, bool rx_continuous); + void set_rx_config(radio_modems_t modem, uint32_t bandwidth, + uint32_t datarate, uint8_t coderate, + uint32_t bandwidth_afc, uint16_t preamble_len, + uint16_t symb_timeout, bool fix_len, + uint8_t payload_len, + bool crc_on, bool freq_hop_on, uint8_t hop_period, + bool iq_inverted, bool rx_continuous) override; /** * Sets the transmission parameters @@ -204,13 +169,7 @@ */ virtual uint32_t random(void); - /** - * Get radio status - * - * @param status Radio status [RF_IDLE, RF_RX_RUNNING, RF_TX_RUNNING] - * @return Return current radio status - */ - virtual uint8_t get_status(void); + radio_state_t get_status(void) override; /** * Sets the maximum payload length diff --git a/connectivity/drivers/lora/COMPONENT_SX126X/sx126x_ds.h b/connectivity/drivers/lora/COMPONENT_SX126X/sx126x_ds.h index b507525..da47062 100644 --- a/connectivity/drivers/lora/COMPONENT_SX126X/sx126x_ds.h +++ b/connectivity/drivers/lora/COMPONENT_SX126X/sx126x_ds.h @@ -1,9 +1,9 @@ /*! - * \file sx126x.h + * \file sx126x_ds.h * * \brief SX126x driver implementation * - * \copyright Revised BSD License, see section \ref LICENSE. + * \copyright Revised BSD License * * \code * ______ _ diff --git a/connectivity/drivers/lora/COMPONENT_SX1272/SX1272_LoRaRadio.h b/connectivity/drivers/lora/COMPONENT_SX1272/SX1272_LoRaRadio.h index 932d2ab..de5931e 100644 --- a/connectivity/drivers/lora/COMPONENT_SX1272/SX1272_LoRaRadio.h +++ b/connectivity/drivers/lora/COMPONENT_SX1272/SX1272_LoRaRadio.h @@ -113,48 +113,13 @@ */ virtual void standby(void); - /** - * Sets the reception parameters - * - * @param modem Radio modem to be used [0: FSK, 1: LoRa] - * @param bandwidth Sets the bandwidth - * FSK : >= 2600 and <= 250000 Hz - * LoRa: [0: 125 kHz, 1: 250 kHz, - * 2: 500 kHz, 3: Reserved] - * @param datarate Sets the Datarate - * FSK : 600..300000 bits/s - * LoRa: [6: 64, 7: 128, 8: 256, 9: 512, - * 10: 1024, 11: 2048, 12: 4096 chips] - * @param coderate Sets the coding rate ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8] - * @param bandwidth_afc Sets the AFC Bandwidth ( FSK only ) - * FSK : >= 2600 and <= 250000 Hz - * LoRa: N/A ( set to 0 ) - * @param preamble_len Sets the Preamble length ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: Length in symbols ( the hardware adds 4 more symbols ) - * @param symb_timeout Sets the RxSingle timeout value - * FSK : timeout number of bytes - * LoRa: timeout in symbols - * @param fixLen Fixed length packets [0: variable, 1: fixed] - * @param payload_len Sets payload length when fixed lenght is used - * @param crc_on Enables/Disables the CRC [0: OFF, 1: ON] - * @param freq_hop_on Enables disables the intra-packet frequency hopping [0: OFF, 1: ON] (LoRa only) - * @param hop_period Number of symbols bewteen each hop (LoRa only) - * @param iq_inverted Inverts IQ signals ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: [0: not inverted, 1: inverted] - * @param rx_continuous Sets the reception in continuous mode - * [false: single mode, true: continuous mode] - */ - virtual void set_rx_config(radio_modems_t modem, uint32_t bandwidth, - uint32_t datarate, uint8_t coderate, - uint32_t bandwidth_afc, uint16_t preamble_len, - uint16_t symb_timeout, bool fix_len, - uint8_t payload_len, - bool crc_on, bool freq_hop_on, uint8_t hop_period, - bool iq_inverted, bool rx_continuous); + void set_rx_config(radio_modems_t modem, uint32_t bandwidth, + uint32_t datarate, uint8_t coderate, + uint32_t bandwidth_afc, uint16_t preamble_len, + uint16_t symb_timeout, bool fix_len, + uint8_t payload_len, + bool crc_on, bool freq_hop_on, uint8_t hop_period, + bool iq_inverted, bool rx_continuous) override; /** * Sets the transmission parameters @@ -237,13 +202,7 @@ */ virtual uint32_t random(void); - /** - * Get radio status - * - * @param status Radio status [RF_IDLE, RF_RX_RUNNING, RF_TX_RUNNING] - * @return Return current radio status - */ - virtual uint8_t get_status(void); + radio_state_t get_status(void) override; /** * Sets the maximum payload length diff --git a/connectivity/drivers/lora/COMPONENT_SX1276/SX1276_LoRaRadio.h b/connectivity/drivers/lora/COMPONENT_SX1276/SX1276_LoRaRadio.h index 26481e9..a8a4d94 100644 --- a/connectivity/drivers/lora/COMPONENT_SX1276/SX1276_LoRaRadio.h +++ b/connectivity/drivers/lora/COMPONENT_SX1276/SX1276_LoRaRadio.h @@ -128,48 +128,13 @@ */ virtual void standby(void); - /** - * Sets the reception parameters - * - * @param modem Radio modem to be used [0: FSK, 1: LoRa] - * @param bandwidth Sets the bandwidth - * FSK : >= 2600 and <= 250000 Hz - * LoRa: [0: 125 kHz, 1: 250 kHz, - * 2: 500 kHz, 3: Reserved] - * @param datarate Sets the Datarate - * FSK : 600..300000 bits/s - * LoRa: [6: 64, 7: 128, 8: 256, 9: 512, - * 10: 1024, 11: 2048, 12: 4096 chips] - * @param coderate Sets the coding rate ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8] - * @param bandwidth_afc Sets the AFC Bandwidth ( FSK only ) - * FSK : >= 2600 and <= 250000 Hz - * LoRa: N/A ( set to 0 ) - * @param preamble_len Sets the Preamble length ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: Length in symbols ( the hardware adds 4 more symbols ) - * @param symb_timeout Sets the RxSingle timeout value - * FSK : timeout number of bytes - * LoRa: timeout in symbols - * @param fixLen Fixed length packets [0: variable, 1: fixed] - * @param payload_len Sets payload length when fixed lenght is used - * @param crc_on Enables/Disables the CRC [0: OFF, 1: ON] - * @param freq_hop_on Enables disables the intra-packet frequency hopping [0: OFF, 1: ON] (LoRa only) - * @param hop_period Number of symbols bewteen each hop (LoRa only) - * @param iq_inverted Inverts IQ signals ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: [0: not inverted, 1: inverted] - * @param rx_continuous Sets the reception in continuous mode - * [false: single mode, true: continuous mode] - */ - virtual void set_rx_config(radio_modems_t modem, uint32_t bandwidth, - uint32_t datarate, uint8_t coderate, - uint32_t bandwidth_afc, uint16_t preamble_len, - uint16_t symb_timeout, bool fix_len, - uint8_t payload_len, - bool crc_on, bool freq_hop_on, uint8_t hop_period, - bool iq_inverted, bool rx_continuous); + void set_rx_config(radio_modems_t modem, uint32_t bandwidth, + uint32_t datarate, uint8_t coderate, + uint32_t bandwidth_afc, uint16_t preamble_len, + uint16_t symb_timeout, bool fix_len, + uint8_t payload_len, + bool crc_on, bool freq_hop_on, uint8_t hop_period, + bool iq_inverted, bool rx_continuous) override; /** * Sets the transmission parameters @@ -252,13 +217,7 @@ */ virtual uint32_t random(void); - /** - * Get radio status - * - * @param status Radio status [RF_IDLE, RF_RX_RUNNING, RF_TX_RUNNING] - * @return Return current radio status - */ - virtual uint8_t get_status(void); + radio_state_t get_status(void) override; /** * Sets the maximum payload length diff --git a/connectivity/drivers/lora/TARGET_STM32WL/STM32WL_LoRaRadio.cpp b/connectivity/drivers/lora/TARGET_STM32WL/STM32WL_LoRaRadio.cpp index 257adf8..9a6f26d 100644 --- a/connectivity/drivers/lora/TARGET_STM32WL/STM32WL_LoRaRadio.cpp +++ b/connectivity/drivers/lora/TARGET_STM32WL/STM32WL_LoRaRadio.cpp @@ -1401,7 +1401,7 @@ write_opmode_command((uint8_t) RADIO_SET_BUFFERBASEADDRESS, buf, 2); } -uint8_t STM32WL_LoRaRadio::get_status(void) +radio_state_t STM32WL_LoRaRadio::get_status(void) { DEBUG_PRINTF("STM32WL_LoRaRadio::get_status\n"); switch (_operating_mode) { diff --git a/connectivity/drivers/lora/TARGET_STM32WL/STM32WL_LoRaRadio.h b/connectivity/drivers/lora/TARGET_STM32WL/STM32WL_LoRaRadio.h index 9ff36a8..d2ed638 100644 --- a/connectivity/drivers/lora/TARGET_STM32WL/STM32WL_LoRaRadio.h +++ b/connectivity/drivers/lora/TARGET_STM32WL/STM32WL_LoRaRadio.h @@ -1,4 +1,4 @@ -/** +/* / _____) _ | | ( (____ _____ ____ _| |_ _____ ____| |__ \____ \| ___ | (_ _) ___ |/ ___) _ \ @@ -83,48 +83,13 @@ */ virtual void standby(void); - /** - * Sets the reception parameters - * - * @param modem Radio modem to be used [0: FSK, 1: LoRa] - * @param bandwidth Sets the bandwidth - * FSK : >= 2600 and <= 250000 Hz - * LoRa: [0: 125 kHz, 1: 250 kHz, - * 2: 500 kHz, 3: Reserved] - * @param datarate Sets the Datarate - * FSK : 600..300000 bits/s - * LoRa: [6: 64, 7: 128, 8: 256, 9: 512, - * 10: 1024, 11: 2048, 12: 4096 chips] - * @param coderate Sets the coding rate ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8] - * @param bandwidth_afc Sets the AFC Bandwidth ( FSK only ) - * FSK : >= 2600 and <= 250000 Hz - * LoRa: N/A ( set to 0 ) - * @param preamble_len Sets the Preamble length ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: Length in symbols ( the hardware adds 4 more symbols ) - * @param symb_timeout Sets the RxSingle timeout value - * FSK : timeout number of bytes - * LoRa: timeout in symbols - * @param fixLen Fixed length packets [0: variable, 1: fixed] - * @param payload_len Sets payload length when fixed lenght is used - * @param crc_on Enables/Disables the CRC [0: OFF, 1: ON] - * @param freq_hop_on Enables disables the intra-packet frequency hopping [0: OFF, 1: ON] (LoRa only) - * @param hop_period Number of symbols bewteen each hop (LoRa only) - * @param iq_inverted Inverts IQ signals ( LoRa only ) - * FSK : N/A ( set to 0 ) - * LoRa: [0: not inverted, 1: inverted] - * @param rx_continuous Sets the reception in continuous mode - * [false: single mode, true: continuous mode] - */ - virtual void set_rx_config(radio_modems_t modem, uint32_t bandwidth, - uint32_t datarate, uint8_t coderate, - uint32_t bandwidth_afc, uint16_t preamble_len, - uint16_t symb_timeout, bool fix_len, - uint8_t payload_len, - bool crc_on, bool freq_hop_on, uint8_t hop_period, - bool iq_inverted, bool rx_continuous); + void set_rx_config(radio_modems_t modem, uint32_t bandwidth, + uint32_t datarate, uint8_t coderate, + uint32_t bandwidth_afc, uint16_t preamble_len, + uint16_t symb_timeout, bool fix_len, + uint8_t payload_len, + bool crc_on, bool freq_hop_on, uint8_t hop_period, + bool iq_inverted, bool rx_continuous) override; /** * Sets the transmission parameters @@ -207,13 +172,7 @@ */ virtual uint32_t random(void); - /** - * Get radio status - * - * @param status Radio status [RF_IDLE, RF_RX_RUNNING, RF_TX_RUNNING] - * @return Return current radio status - */ - virtual uint8_t get_status(void); + radio_state_t get_status(void) override; /** * Sets the maximum payload length diff --git a/connectivity/drivers/mbedtls/TARGET_Cypress/TARGET_MXCRYPTO/ecp_alt.h b/connectivity/drivers/mbedtls/TARGET_Cypress/TARGET_MXCRYPTO/ecp_alt.h index a047478..b752e51 100644 --- a/connectivity/drivers/mbedtls/TARGET_Cypress/TARGET_MXCRYPTO/ecp_alt.h +++ b/connectivity/drivers/mbedtls/TARGET_Cypress/TARGET_MXCRYPTO/ecp_alt.h @@ -18,7 +18,7 @@ */ /** - * \file ecp.h + * \file * \version 1.0 * * \brief This file provides an API for Elliptic Curves over GF(P) (ECP). diff --git a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha1_alt_sw.h b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha1_alt_sw.h index 5ba3aa8..1db063b 100644 --- a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha1_alt_sw.h +++ b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha1_alt_sw.h @@ -1,5 +1,5 @@ /** - * \file sha1.h + * \file * * \brief SHA-1 cryptographic hash function * diff --git a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha256_alt_sw.h b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha256_alt_sw.h index 6c292b7..56d079d 100644 --- a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha256_alt_sw.h +++ b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha256_alt_sw.h @@ -1,5 +1,5 @@ /** - * \file sha256.h + * \file sha256_alt_sw.h * * \brief SHA-224 and SHA-256 cryptographic hash function * diff --git a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha512_alt_sw.h b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha512_alt_sw.h index 6c0aed4..f9a1149 100644 --- a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha512_alt_sw.h +++ b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_M480/sha/sha512_alt_sw.h @@ -1,5 +1,5 @@ /** - * \file sha512.h + * \file sha512_alt_sw.h * * \brief SHA-384 and SHA-512 cryptographic hash function * diff --git a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_NUC472/sha/sha1_alt_sw.h b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_NUC472/sha/sha1_alt_sw.h index 7c84756..998e670 100644 --- a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_NUC472/sha/sha1_alt_sw.h +++ b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_NUC472/sha/sha1_alt_sw.h @@ -1,5 +1,5 @@ /** - * \file sha1.h + * \file * * \brief SHA-1 cryptographic hash function * diff --git a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_NUC472/sha/sha256_alt_sw.h b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_NUC472/sha/sha256_alt_sw.h index bd96f5c..aae4422 100644 --- a/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_NUC472/sha/sha256_alt_sw.h +++ b/connectivity/drivers/mbedtls/TARGET_NUVOTON/TARGET_NUC472/sha/sha256_alt_sw.h @@ -1,5 +1,5 @@ /** - * \file sha256.h + * \file sha256_alt_sw.h * * \brief SHA-224 and SHA-256 cryptographic hash function * diff --git a/connectivity/drivers/mbedtls/TARGET_STM/ccm_alt.h b/connectivity/drivers/mbedtls/TARGET_STM/ccm_alt.h index f9a21f4..05582ae 100644 --- a/connectivity/drivers/mbedtls/TARGET_STM/ccm_alt.h +++ b/connectivity/drivers/mbedtls/TARGET_STM/ccm_alt.h @@ -1,5 +1,5 @@ /** - * \file ccm.h + * \file ccm_alt.h * * \brief This file provides an API for the CCM authenticated encryption * mode for block ciphers. diff --git a/connectivity/drivers/mbedtls/TARGET_STM/gcm_alt.h b/connectivity/drivers/mbedtls/TARGET_STM/gcm_alt.h index 957ed02..466a482 100644 --- a/connectivity/drivers/mbedtls/TARGET_STM/gcm_alt.h +++ b/connectivity/drivers/mbedtls/TARGET_STM/gcm_alt.h @@ -1,5 +1,5 @@ /** - * \file gcm_alt.h.h + * \file gcm_alt.h * * \brief This file contains GCM definitions and functions. * diff --git a/connectivity/drivers/mbedtls/TARGET_STM/md5_alt.h b/connectivity/drivers/mbedtls/TARGET_STM/md5_alt.h index 3fcc941..fe77cdc 100644 --- a/connectivity/drivers/mbedtls/TARGET_STM/md5_alt.h +++ b/connectivity/drivers/mbedtls/TARGET_STM/md5_alt.h @@ -1,5 +1,5 @@ /** - * \file md5.h + * \file * * \brief MD5 message digest algorithm (hash function) * diff --git a/connectivity/drivers/mbedtls/TARGET_STM/sha1_alt.h b/connectivity/drivers/mbedtls/TARGET_STM/sha1_alt.h index 707d074..9d1c9e6 100644 --- a/connectivity/drivers/mbedtls/TARGET_STM/sha1_alt.h +++ b/connectivity/drivers/mbedtls/TARGET_STM/sha1_alt.h @@ -1,5 +1,5 @@ /** - * \file sha1.h + * \file * * \brief This file contains SHA-1 definitions and functions. * diff --git a/connectivity/drivers/mbedtls/TARGET_STM/sha256_alt.h b/connectivity/drivers/mbedtls/TARGET_STM/sha256_alt.h index 8152202..b441456 100644 --- a/connectivity/drivers/mbedtls/TARGET_STM/sha256_alt.h +++ b/connectivity/drivers/mbedtls/TARGET_STM/sha256_alt.h @@ -1,5 +1,5 @@ /** - * \file sha256.h + * \file sha256_alt.h * * \brief This file contains SHA-224 and SHA-256 definitions and functions. * diff --git a/connectivity/drivers/nfc/TARGET_M24SR/include/nfc/m24sr_driver.h b/connectivity/drivers/nfc/TARGET_M24SR/include/nfc/m24sr_driver.h index 3f7b623..511a635 100644 --- a/connectivity/drivers/nfc/TARGET_M24SR/include/nfc/m24sr_driver.h +++ b/connectivity/drivers/nfc/TARGET_M24SR/include/nfc/m24sr_driver.h @@ -225,9 +225,6 @@ * In async mode each function call returns immediately and the answer will be notified * through a callback. * The default behaviour is sync mode. - * To enable the async mode ManageI2CGPO(I2C_ANSWER_READY) function must be called. - * When the component notifies an interrupt user must call {@link ManageEvent} function. - * Note that passing a parameter other than I2C_ANSWER_READY to ManageI2CGPO initialize the component in sync mode. */ class M24srDriver : public NFCEEPROMDriver { public: diff --git a/connectivity/drivers/wifi/TARGET_STM/COMPONENT_EMW3080B/EMW3080B_EMAC.h b/connectivity/drivers/wifi/TARGET_STM/COMPONENT_EMW3080B/EMW3080B_EMAC.h index 17f3683..3a5860d 100644 --- a/connectivity/drivers/wifi/TARGET_STM/COMPONENT_EMW3080B/EMW3080B_EMAC.h +++ b/connectivity/drivers/wifi/TARGET_STM/COMPONENT_EMW3080B/EMW3080B_EMAC.h @@ -67,19 +67,7 @@ */ virtual uint8_t get_hwaddr_size() const; - /** - * Return interface-supplied HW address - * - * Copies HW address to provided memory, @param addr has to be of correct size see @a get_hwaddr_size - * - * HW address need not be provided if this interface does not have its own HW - * address configuration; stack will choose address from central system - * configuration if the function returns false and does not write to addr. - * - * @param addr HW address for underlying interface - * @return true if HW address is available - */ - virtual bool get_hwaddr(uint8_t *addr) const; + bool get_hwaddr(uint8_t *addr) const override; /** * Set HW address for interface diff --git a/connectivity/drivers/wifi/TARGET_WICED/wiced_interface/wiced_emac.h b/connectivity/drivers/wifi/TARGET_WICED/wiced_interface/wiced_emac.h index 88582ba..08d1482 100644 --- a/connectivity/drivers/wifi/TARGET_WICED/wiced_interface/wiced_emac.h +++ b/connectivity/drivers/wifi/TARGET_WICED/wiced_interface/wiced_emac.h @@ -62,19 +62,7 @@ */ virtual uint8_t get_hwaddr_size() const; - /** - * Return interface-supplied HW address - * - * Copies HW address to provided memory, @param addr has to be of correct size see @a get_hwaddr_size - * - * HW address need not be provided if this interface does not have its own HW - * address configuration; stack will choose address from central system - * configuration if the function returns false and does not write to addr. - * - * @param addr HW address for underlying interface - * @return true if HW address is available - */ - virtual bool get_hwaddr(uint8_t *addr) const; + bool get_hwaddr(uint8_t *addr) const override; /** * Set HW address for interface diff --git a/connectivity/libraries/ppp/include/ppp/ppp_service.h b/connectivity/libraries/ppp/include/ppp/ppp_service.h index 49f59e0..52964d4 100644 --- a/connectivity/libraries/ppp/include/ppp/ppp_service.h +++ b/connectivity/libraries/ppp/include/ppp/ppp_service.h @@ -79,14 +79,6 @@ */ void get_ifname(char *name, uint8_t size) const override; - /** - * Sends the packet over the link - * - * That cannot be called from an interrupt context. - * - * @param buf Packet to be send - * @return True if the packet was send successfully, false otherwise - */ bool link_out(net_stack_mem_buf_t *buf, nsapi_ip_stack_t ip_stack) override; /** diff --git a/connectivity/lorawan/include/lorawan/LoRaRadio.h b/connectivity/lorawan/include/lorawan/LoRaRadio.h index 03b02ff..608f34e 100644 --- a/connectivity/lorawan/include/lorawan/LoRaRadio.h +++ b/connectivity/lorawan/include/lorawan/LoRaRadio.h @@ -580,9 +580,9 @@ /** * Gets the radio status. * - * @return The current radio status. + * @return The current radio status (#RF_IDLE, #RF_RX_RUNNING, #RF_TX_RUNNING, etc.) */ - virtual uint8_t get_status(void) = 0; + virtual radio_state_t get_status(void) = 0; /** * Sets the maximum payload length. diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphy/Test_LoRaPHY.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphy/Test_LoRaPHY.cpp index 3664d40..7689955 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphy/Test_LoRaPHY.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphy/Test_LoRaPHY.cpp @@ -91,9 +91,9 @@ return 4; }; - virtual uint8_t get_status(void) + radio_state_t get_status(void) override { - return uint8_value; + return static_cast(uint8_value); }; virtual void set_max_payload_length(radio_modems_t modem, uint8_t max) diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp index 8b4054c..16cc246 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp @@ -74,9 +74,9 @@ return 4; }; - virtual uint8_t get_status(void) + radio_state_t get_status(void) override { - return uint8_value; + return static_cast(uint8_value); }; virtual void set_max_payload_length(radio_modems_t modem, uint8_t max) diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp index 36bec40..6cb5284 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp @@ -74,9 +74,9 @@ return 4; }; - virtual uint8_t get_status(void) + radio_state_t get_status(void) override { - return uint8_value; + return static_cast(uint8_value); }; virtual void set_max_payload_length(radio_modems_t modem, uint8_t max) diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp index 967a855..756990f 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp @@ -74,9 +74,9 @@ return 4; }; - virtual uint8_t get_status(void) + radio_state_t get_status(void) override { - return uint8_value; + return static_cast(uint8_value); }; virtual void set_max_payload_length(radio_modems_t modem, uint8_t max) diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp index c38ddcf..e0ccd32 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp @@ -74,9 +74,9 @@ return 4; }; - virtual uint8_t get_status(void) + radio_state_t get_status(void) override { - return 0; + return RF_IDLE; }; virtual void set_max_payload_length(radio_modems_t modem, uint8_t max) diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp index d367b22..5f54a4c 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp @@ -74,9 +74,9 @@ return 4; }; - virtual uint8_t get_status(void) + radio_state_t get_status(void) override { - return uint8_value; + return static_cast(uint8_value); }; virtual void set_max_payload_length(radio_modems_t modem, uint8_t max) diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawaninterface/Test_LoRaWANInterface.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawaninterface/Test_LoRaWANInterface.cpp index 75dbb6c..4dbf8a7 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawaninterface/Test_LoRaWANInterface.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawaninterface/Test_LoRaWANInterface.cpp @@ -73,9 +73,9 @@ return 4; }; - virtual uint8_t get_status(void) + radio_state_t get_status(void) override { - return 0; + return RF_IDLE; }; virtual void set_max_payload_length(radio_modems_t modem, uint8_t max) diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp index 33317c1..b07fa3f 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp @@ -100,9 +100,9 @@ return 4; }; - virtual uint8_t get_status(void) + radio_state_t get_status(void) override { - return uint8_value; + return static_cast(uint8_value); }; virtual void set_max_payload_length(radio_modems_t modem, uint8_t max) diff --git a/connectivity/lwipstack/include/lwipstack/LWIPStack.h b/connectivity/lwipstack/include/lwipstack/LWIPStack.h index 2707c52..36550f0 100644 --- a/connectivity/lwipstack/include/lwipstack/LWIPStack.h +++ b/connectivity/lwipstack/include/lwipstack/LWIPStack.h @@ -137,20 +137,8 @@ */ nsapi_error_t get_ipv6_link_local_address(SocketAddress *address) override; - /** Copies netmask of the network interface to user supplied buffer - * - * @param buf buffer to which netmask will be copied as "W:X:Y:Z" - * @param buflen size of supplied buffer - * @return Pointer to a buffer, or NULL if the buffer is too small - */ nsapi_error_t get_netmask(SocketAddress *address) override; - /** Copies gateway address of the network interface to user supplied buffer - * - * @param buf buffer to which gateway address will be copied as "W:X:Y:Z" - * @param buflen size of supplied buffer - * @return Pointer to a buffer, or NULL if the buffer is too small - */ nsapi_error_t get_gateway(SocketAddress *address) override; private: diff --git a/connectivity/mbedtls/include/mbedtls/aes.h b/connectivity/mbedtls/include/mbedtls/aes.h index 052f47c..0ed4b80 100644 --- a/connectivity/mbedtls/include/mbedtls/aes.h +++ b/connectivity/mbedtls/include/mbedtls/aes.h @@ -49,6 +49,13 @@ #include #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_aes_module AES + * \{ + */ + /* padlock.c and aesni.c rely on these values! */ #define MBEDTLS_AES_ENCRYPT 1 /**< AES encryption. */ #define MBEDTLS_AES_DECRYPT 0 /**< AES decryption. */ @@ -654,6 +661,8 @@ #undef MBEDTLS_DEPRECATED #endif /* !MBEDTLS_DEPRECATED_REMOVED */ +/// \} +/// \} #if defined(MBEDTLS_SELF_TEST) /** diff --git a/connectivity/mbedtls/include/mbedtls/arc4.h b/connectivity/mbedtls/include/mbedtls/arc4.h index 17728f4..d54bbc5 100644 --- a/connectivity/mbedtls/include/mbedtls/arc4.h +++ b/connectivity/mbedtls/include/mbedtls/arc4.h @@ -34,6 +34,13 @@ #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_arc4_module ARC4 + * \{ + */ + /* MBEDTLS_ERR_ARC4_HW_ACCEL_FAILED is deprecated and should not be used. */ #define MBEDTLS_ERR_ARC4_HW_ACCEL_FAILED -0x0019 /**< ARC4 hardware accelerator failed. */ @@ -121,6 +128,9 @@ int mbedtls_arc4_crypt( mbedtls_arc4_context *ctx, size_t length, const unsigned char *input, unsigned char *output ); +/// \} +/// \} + #if defined(MBEDTLS_SELF_TEST) /** diff --git a/connectivity/mbedtls/include/mbedtls/aria.h b/connectivity/mbedtls/include/mbedtls/aria.h index a4b27b3..cbeb4ef 100644 --- a/connectivity/mbedtls/include/mbedtls/aria.h +++ b/connectivity/mbedtls/include/mbedtls/aria.h @@ -40,6 +40,13 @@ #include "mbedtls/platform_util.h" +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_aria_module ARIA + * \{ + */ + #define MBEDTLS_ARIA_ENCRYPT 1 /**< ARIA encryption. */ #define MBEDTLS_ARIA_DECRYPT 0 /**< ARIA decryption. */ @@ -353,6 +360,9 @@ unsigned char *output ); #endif /* MBEDTLS_CIPHER_MODE_CTR */ +/// \} +/// \} + #if defined(MBEDTLS_SELF_TEST) /** * \brief Checkup routine. diff --git a/connectivity/mbedtls/include/mbedtls/asn1.h b/connectivity/mbedtls/include/mbedtls/asn1.h index 6b79196..abf0bdc 100644 --- a/connectivity/mbedtls/include/mbedtls/asn1.h +++ b/connectivity/mbedtls/include/mbedtls/asn1.h @@ -35,7 +35,9 @@ #endif /** - * \addtogroup asn1_module + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_asn1_module ASN.1 * \{ */ @@ -54,7 +56,7 @@ #define MBEDTLS_ERR_ASN1_ALLOC_FAILED -0x006A /**< Memory allocation failed */ #define MBEDTLS_ERR_ASN1_BUF_TOO_SMALL -0x006C /**< Buffer too small when writing ASN.1 data structure. */ -/* \} name */ +/** \} name */ /** * \name DER constants @@ -67,26 +69,26 @@ * Such sequences are typically read into \c ::mbedtls_x509_buf. * \{ */ -#define MBEDTLS_ASN1_BOOLEAN 0x01 -#define MBEDTLS_ASN1_INTEGER 0x02 -#define MBEDTLS_ASN1_BIT_STRING 0x03 -#define MBEDTLS_ASN1_OCTET_STRING 0x04 -#define MBEDTLS_ASN1_NULL 0x05 -#define MBEDTLS_ASN1_OID 0x06 -#define MBEDTLS_ASN1_ENUMERATED 0x0A -#define MBEDTLS_ASN1_UTF8_STRING 0x0C -#define MBEDTLS_ASN1_SEQUENCE 0x10 -#define MBEDTLS_ASN1_SET 0x11 -#define MBEDTLS_ASN1_PRINTABLE_STRING 0x13 -#define MBEDTLS_ASN1_T61_STRING 0x14 -#define MBEDTLS_ASN1_IA5_STRING 0x16 -#define MBEDTLS_ASN1_UTC_TIME 0x17 -#define MBEDTLS_ASN1_GENERALIZED_TIME 0x18 -#define MBEDTLS_ASN1_UNIVERSAL_STRING 0x1C -#define MBEDTLS_ASN1_BMP_STRING 0x1E -#define MBEDTLS_ASN1_PRIMITIVE 0x00 -#define MBEDTLS_ASN1_CONSTRUCTED 0x20 -#define MBEDTLS_ASN1_CONTEXT_SPECIFIC 0x80 +#define MBEDTLS_ASN1_BOOLEAN 0x01 ///< Boolean +#define MBEDTLS_ASN1_INTEGER 0x02 ///< Integer +#define MBEDTLS_ASN1_BIT_STRING 0x03 ///< Bit String +#define MBEDTLS_ASN1_OCTET_STRING 0x04 ///< Octet String +#define MBEDTLS_ASN1_NULL 0x05 ///< Null +#define MBEDTLS_ASN1_OID 0x06 ///< OID +#define MBEDTLS_ASN1_ENUMERATED 0x0A ///< Enumerated +#define MBEDTLS_ASN1_UTF8_STRING 0x0C ///< UTF-8 String +#define MBEDTLS_ASN1_SEQUENCE 0x10 ///< Sequence +#define MBEDTLS_ASN1_SET 0x11 ///< Set +#define MBEDTLS_ASN1_PRINTABLE_STRING 0x13 ///< Printable String +#define MBEDTLS_ASN1_T61_STRING 0x14 ///< T61 String +#define MBEDTLS_ASN1_IA5_STRING 0x16 ///< IA5 String +#define MBEDTLS_ASN1_UTC_TIME 0x17 ///< UTC Time +#define MBEDTLS_ASN1_GENERALIZED_TIME 0x18 ///< Generalized Time +#define MBEDTLS_ASN1_UNIVERSAL_STRING 0x1C ///< Universal String +#define MBEDTLS_ASN1_BMP_STRING 0x1E ///< BMP String +#define MBEDTLS_ASN1_PRIMITIVE 0x00 ///< Primitive +#define MBEDTLS_ASN1_CONSTRUCTED 0x20 ///< Constructed +#define MBEDTLS_ASN1_CONTEXT_SPECIFIC 0x80 ///< Context Specific /* Slightly smaller way to check if tag is a string tag * compared to canonical implementation. */ @@ -114,8 +116,7 @@ #define MBEDTLS_ASN1_TAG_PC_MASK 0x20 #define MBEDTLS_ASN1_TAG_VALUE_MASK 0x1F -/* \} name */ -/* \} addtogroup asn1_module */ +/** \} name */ /** Returns the size of the binary string, without the trailing \\0 */ #define MBEDTLS_OID_SIZE(x) (sizeof(x) - 1) @@ -139,11 +140,6 @@ #endif /** - * \name Functions to parse ASN.1 data structures - * \{ - */ - -/** * Type-length-value structure that allows for ASN1 using DER. */ typedef struct mbedtls_asn1_buf @@ -187,6 +183,7 @@ } mbedtls_asn1_named_data; + /** * \brief Get the length of an ASN.1 element. * Updates the pointer to immediately behind the length. @@ -604,4 +601,7 @@ } #endif +/// \} +/// \} + #endif /* asn1.h */ diff --git a/connectivity/mbedtls/include/mbedtls/asn1write.h b/connectivity/mbedtls/include/mbedtls/asn1write.h index 44afae0..aace385 100644 --- a/connectivity/mbedtls/include/mbedtls/asn1write.h +++ b/connectivity/mbedtls/include/mbedtls/asn1write.h @@ -30,6 +30,13 @@ #include "mbedtls/asn1.h" +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_asn1write_module ASN.1 Write + * \{ + */ + #define MBEDTLS_ASN1_CHK_ADD(g, f) \ do \ { \ @@ -363,6 +370,9 @@ const unsigned char *val, size_t val_len ); +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/base64.h b/connectivity/mbedtls/include/mbedtls/base64.h index 7e73a8b..8c1d347 100644 --- a/connectivity/mbedtls/include/mbedtls/base64.h +++ b/connectivity/mbedtls/include/mbedtls/base64.h @@ -30,6 +30,13 @@ #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_base64_module Base64 + * \{ + */ + #define MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL -0x002A /**< Output buffer too small. */ #define MBEDTLS_ERR_BASE64_INVALID_CHARACTER -0x002C /**< Invalid character in input. */ @@ -79,6 +86,9 @@ int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen ); +/// \} +/// \} + #if defined(MBEDTLS_SELF_TEST) /** * \brief Checkup routine diff --git a/connectivity/mbedtls/include/mbedtls/blowfish.h b/connectivity/mbedtls/include/mbedtls/blowfish.h index c2a6ff9..20c018b 100644 --- a/connectivity/mbedtls/include/mbedtls/blowfish.h +++ b/connectivity/mbedtls/include/mbedtls/blowfish.h @@ -33,8 +33,15 @@ #include "mbedtls/platform_util.h" -#define MBEDTLS_BLOWFISH_ENCRYPT 1 -#define MBEDTLS_BLOWFISH_DECRYPT 0 +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_blowfish_module Blowfish + * \{ + */ + +#define MBEDTLS_BLOWFISH_ENCRYPT 1 ///< Constant to select blowfish encryption +#define MBEDTLS_BLOWFISH_DECRYPT 0 ///< Constant to select blowfish decryption #define MBEDTLS_BLOWFISH_MAX_KEY_BITS 448 #define MBEDTLS_BLOWFISH_MIN_KEY_BITS 32 #define MBEDTLS_BLOWFISH_ROUNDS 16 /**< Rounds to use. When increasing this value, make sure to extend the initialisation vectors */ @@ -278,6 +285,9 @@ unsigned char *output ); #endif /* MBEDTLS_CIPHER_MODE_CTR */ +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/camellia.h b/connectivity/mbedtls/include/mbedtls/camellia.h index f7d2b23..5a7c05a 100644 --- a/connectivity/mbedtls/include/mbedtls/camellia.h +++ b/connectivity/mbedtls/include/mbedtls/camellia.h @@ -33,8 +33,15 @@ #include "mbedtls/platform_util.h" -#define MBEDTLS_CAMELLIA_ENCRYPT 1 -#define MBEDTLS_CAMELLIA_DECRYPT 0 +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_camellia_module Camellia + * \{ + */ + +#define MBEDTLS_CAMELLIA_ENCRYPT 1 ///< Constant to select camellia encryption +#define MBEDTLS_CAMELLIA_DECRYPT 0 ///< Constant to select camellia decryption #if !defined(MBEDTLS_DEPRECATED_REMOVED) #define MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x0024 ) @@ -306,6 +313,9 @@ unsigned char *output ); #endif /* MBEDTLS_CIPHER_MODE_CTR */ +/// \} +/// \} + #if defined(MBEDTLS_SELF_TEST) /** diff --git a/connectivity/mbedtls/include/mbedtls/ccm.h b/connectivity/mbedtls/include/mbedtls/ccm.h index 7193863..a6cf518 100644 --- a/connectivity/mbedtls/include/mbedtls/ccm.h +++ b/connectivity/mbedtls/include/mbedtls/ccm.h @@ -65,6 +65,13 @@ extern "C" { #endif +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_ccm_module CCM + * \{ + */ + #if !defined(MBEDTLS_CCM_ALT) // Regular implementation // @@ -305,4 +312,7 @@ } #endif +/// \} +/// \} + #endif /* MBEDTLS_CCM_H */ diff --git a/connectivity/mbedtls/include/mbedtls/chacha20.h b/connectivity/mbedtls/include/mbedtls/chacha20.h index e59dd1f..3b9c7a8 100644 --- a/connectivity/mbedtls/include/mbedtls/chacha20.h +++ b/connectivity/mbedtls/include/mbedtls/chacha20.h @@ -41,6 +41,13 @@ #include #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_chacha20_module ChaCha20 + * \{ + */ + #define MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA -0x0051 /**< Invalid input parameter(s). */ /* MBEDTLS_ERR_CHACHA20_FEATURE_UNAVAILABLE is deprecated and should not be @@ -218,6 +225,9 @@ int mbedtls_chacha20_self_test( int verbose ); #endif /* MBEDTLS_SELF_TEST */ +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/chachapoly.h b/connectivity/mbedtls/include/mbedtls/chachapoly.h index 1007f95..fc902bb 100644 --- a/connectivity/mbedtls/include/mbedtls/chachapoly.h +++ b/connectivity/mbedtls/include/mbedtls/chachapoly.h @@ -48,6 +48,11 @@ extern "C" { #endif +/** +* \addtogroup mbedtls_chacha20_module +* \{ +*/ + typedef enum { MBEDTLS_CHACHAPOLY_ENCRYPT, /**< The mode value for performing encryption. */ @@ -350,6 +355,8 @@ int mbedtls_chachapoly_self_test( int verbose ); #endif /* MBEDTLS_SELF_TEST */ +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/cipher.h b/connectivity/mbedtls/include/mbedtls/cipher.h index 1cafa6e..af9e17f 100644 --- a/connectivity/mbedtls/include/mbedtls/cipher.h +++ b/connectivity/mbedtls/include/mbedtls/cipher.h @@ -73,6 +73,13 @@ #endif /** +* \addtogroup mbedtls +* \{ +* \defgroup mbedtls_cipher_module Cipher +* \{ +*/ + +/** * \brief Supported cipher types. * * \warning RC4 and DES are considered weak ciphers and their use @@ -211,8 +218,8 @@ /** Type of operation. */ typedef enum { MBEDTLS_OPERATION_NONE = -1, - MBEDTLS_DECRYPT = 0, - MBEDTLS_ENCRYPT, + MBEDTLS_DECRYPT = 0, ///< Operation type for decryption + MBEDTLS_ENCRYPT, ///< Operation type for encryption } mbedtls_operation_t; enum { @@ -1087,6 +1094,10 @@ unsigned char *output, size_t output_len, size_t *olen, size_t tag_len ); #endif /* MBEDTLS_CIPHER_MODE_AEAD || MBEDTLS_NIST_KW_C */ + +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/cmac.h b/connectivity/mbedtls/include/mbedtls/cmac.h index cb538d0..98e1b1c 100644 --- a/connectivity/mbedtls/include/mbedtls/cmac.h +++ b/connectivity/mbedtls/include/mbedtls/cmac.h @@ -38,6 +38,13 @@ extern "C" { #endif +/** +* \addtogroup mbedtls +* \{ +* \defgroup mbedtls_cmac_module CMAC +* \{ +*/ + /* MBEDTLS_ERR_CMAC_HW_ACCEL_FAILED is deprecated and should not be used. */ #define MBEDTLS_ERR_CMAC_HW_ACCEL_FAILED -0x007A /**< CMAC hardware accelerator failed. */ @@ -204,6 +211,9 @@ int mbedtls_cmac_self_test( int verbose ); #endif /* MBEDTLS_SELF_TEST && ( MBEDTLS_AES_C || MBEDTLS_DES_C ) */ +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/ctr_drbg.h b/connectivity/mbedtls/include/mbedtls/ctr_drbg.h index 7f1d232..d2d4b3d 100644 --- a/connectivity/mbedtls/include/mbedtls/ctr_drbg.h +++ b/connectivity/mbedtls/include/mbedtls/ctr_drbg.h @@ -53,6 +53,13 @@ #include "mbedtls/threading.h" #endif +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_ctr_drbg_module CTR_DRBG + * \{ + */ + #define MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED -0x0034 /**< The entropy source failed. */ #define MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG -0x0036 /**< The requested random buffer length is too big. */ #define MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG -0x0038 /**< The input (entropy + additional data) is too large. */ @@ -134,7 +141,7 @@ /**< The maximum size of seed or reseed buffer in bytes. */ #endif -/* \} name SECTION: Module settings */ +/** \} name SECTION: Module settings */ #define MBEDTLS_CTR_DRBG_PR_OFF 0 /**< Prediction resistance is disabled. */ @@ -559,6 +566,9 @@ #endif /* MBEDTLS_SELF_TEST */ +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/debug.h b/connectivity/mbedtls/include/mbedtls/debug.h index ab5b037..32232fe 100644 --- a/connectivity/mbedtls/include/mbedtls/debug.h +++ b/connectivity/mbedtls/include/mbedtls/debug.h @@ -34,6 +34,14 @@ #include "mbedtls/ecp.h" #endif +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_debug_module Debug + * \{ + */ + + #if defined(MBEDTLS_DEBUG_C) #define MBEDTLS_DEBUG_STRIP_PARENS( ... ) __VA_ARGS__ @@ -255,6 +263,9 @@ mbedtls_debug_ecdh_attr attr ); #endif +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/des.h b/connectivity/mbedtls/include/mbedtls/des.h index 549d19b..18d367c 100644 --- a/connectivity/mbedtls/include/mbedtls/des.h +++ b/connectivity/mbedtls/include/mbedtls/des.h @@ -36,6 +36,13 @@ #include #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_des_module DES + * \{ + */ + #define MBEDTLS_DES_ENCRYPT 1 #define MBEDTLS_DES_DECRYPT 0 @@ -347,6 +354,9 @@ #endif /* MBEDTLS_SELF_TEST */ +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/dhm.h b/connectivity/mbedtls/include/mbedtls/dhm.h index c7830b9..7268c79 100644 --- a/connectivity/mbedtls/include/mbedtls/dhm.h +++ b/connectivity/mbedtls/include/mbedtls/dhm.h @@ -70,6 +70,14 @@ #endif #include "mbedtls/bignum.h" +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_dhm_module Diffie-Hellman-Merkle + * \{ + */ + + /* * DHM Error codes */ @@ -1089,4 +1097,7 @@ #define MBEDTLS_DHM_RFC7919_FFDHE8192_G_BIN { 0x02 } +/// \} +/// \} + #endif /* dhm.h */ diff --git a/connectivity/mbedtls/include/mbedtls/ecdh.h b/connectivity/mbedtls/include/mbedtls/ecdh.h index 05855cd..02fab9e 100644 --- a/connectivity/mbedtls/include/mbedtls/ecdh.h +++ b/connectivity/mbedtls/include/mbedtls/ecdh.h @@ -50,6 +50,14 @@ #endif /** +* \addtogroup mbedtls +* \{ +* \defgroup mbedtls_ecdh_module Elliptic Curve Diffie-Hellman +* \{ +*/ + + +/** * Defines the source of the imported EC key. */ typedef enum @@ -439,6 +447,9 @@ void mbedtls_ecdh_enable_restart( mbedtls_ecdh_context *ctx ); #endif /* MBEDTLS_ECP_RESTARTABLE */ +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/ecdsa.h b/connectivity/mbedtls/include/mbedtls/ecdsa.h index 264a638..9db2b42 100644 --- a/connectivity/mbedtls/include/mbedtls/ecdsa.h +++ b/connectivity/mbedtls/include/mbedtls/ecdsa.h @@ -40,6 +40,13 @@ #include "mbedtls/md.h" /** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_ecdsa_module ECDSA + * \{ + */ + +/** * \brief Maximum ECDSA signature size for a given curve bit size * * \param bits Curve size in bits @@ -329,7 +336,7 @@ * multiple threads. * * \note The deterministic version is used if - * #MBEDTLS_ECDSA_DETERMINISTIC is defined. For more + * MBEDTLS_ECDSA_DETERMINISTIC is defined. For more * information, see RFC-6979: Deterministic Usage * of the Digital Signature Algorithm (DSA) and Elliptic * Curve Digital Signature Algorithm (ECDSA). @@ -357,7 +364,7 @@ * \param slen The address at which to store the actual length of * the signature written. Must not be \c NULL. * \param f_rng The RNG function. This must not be \c NULL if - * #MBEDTLS_ECDSA_DETERMINISTIC is unset. Otherwise, + * MBEDTLS_ECDSA_DETERMINISTIC is unset. Otherwise, * it is used only for blinding and may be set to \c NULL, but * doing so is DEPRECATED. * \param p_rng The RNG context to be passed to \p f_rng. This may be @@ -399,7 +406,7 @@ * \param slen The address at which to store the actual length of * the signature written. Must not be \c NULL. * \param f_rng The RNG function. This must not be \c NULL if - * #MBEDTLS_ECDSA_DETERMINISTIC is unset. Otherwise, + * MBEDTLS_ECDSA_DETERMINISTIC is unset. Otherwise, * it is unused and may be set to \c NULL. * \param p_rng The RNG context to be passed to \p f_rng. This may be * \c NULL if \p f_rng is \c NULL or doesn't use a context. @@ -619,6 +626,9 @@ void mbedtls_ecdsa_restart_free( mbedtls_ecdsa_restart_ctx *ctx ); #endif /* MBEDTLS_ECP_RESTARTABLE */ +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/ecjpake.h b/connectivity/mbedtls/include/mbedtls/ecjpake.h index 891705d..a176388 100644 --- a/connectivity/mbedtls/include/mbedtls/ecjpake.h +++ b/connectivity/mbedtls/include/mbedtls/ecjpake.h @@ -52,6 +52,13 @@ #endif /** +* \addtogroup mbedtls +* \{ +* \defgroup mbedtls_ecjpake_module Elliptic Curve J-PAKE +* \{ +*/ + +/** * Roles in the EC J-PAKE exchange */ typedef enum { @@ -267,6 +274,9 @@ #endif /* MBEDTLS_SELF_TEST */ +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/ecp.h b/connectivity/mbedtls/include/mbedtls/ecp.h index 34dd0ea..aabdb12 100644 --- a/connectivity/mbedtls/include/mbedtls/ecp.h +++ b/connectivity/mbedtls/include/mbedtls/ecp.h @@ -42,6 +42,13 @@ #include "mbedtls/bignum.h" +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_ecp_module Elliptic Curves over GF(P) + * \{ + */ + /* * ECP error codes */ @@ -293,7 +300,7 @@ #define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up. */ #endif /* MBEDTLS_ECP_FIXED_POINT_OPTIM */ -/* \} name SECTION: Module settings */ +/** \} name SECTION: Module settings */ #else /* MBEDTLS_ECP_ALT */ #include "ecp_alt.h" @@ -878,7 +885,7 @@ * intermediate results to prevent potential timing attacks * targeting these results. We recommend always providing * a non-NULL \p f_rng. The overhead is negligible. - * Note: unless #MBEDTLS_ECP_NO_INTERNAL_RNG is defined, when + * Note: unless MBEDTLS_ECP_NO_INTERNAL_RNG is defined, when * \p f_rng is NULL, an internal RNG (seeded from the value * of \p m) will be used instead. * @@ -1247,6 +1254,9 @@ #endif /* MBEDTLS_SELF_TEST */ +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/entropy.h b/connectivity/mbedtls/include/mbedtls/entropy.h index 5a9c11c..13aa59f 100644 --- a/connectivity/mbedtls/include/mbedtls/entropy.h +++ b/connectivity/mbedtls/include/mbedtls/entropy.h @@ -48,6 +48,13 @@ #include "mbedtls/havege.h" #endif +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_entropy_module Entropy Accumulator + * \{ + */ + #define MBEDTLS_ERR_ENTROPY_SOURCE_FAILED -0x003C /**< Critical entropy source failure. */ #define MBEDTLS_ERR_ENTROPY_MAX_SOURCES -0x003E /**< No more sources can be added. */ #define MBEDTLS_ERR_ENTROPY_NO_SOURCES_DEFINED -0x0040 /**< No sources have been added to poll. */ @@ -70,7 +77,7 @@ #define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */ #endif -/* \} name SECTION: Module settings */ +/** \} name SECTION: Module settings */ #if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR) #define MBEDTLS_ENTROPY_BLOCK_SIZE 64 /**< Block size of entropy accumulator (SHA-512) */ @@ -280,6 +287,9 @@ #endif /* MBEDTLS_ENTROPY_HARDWARE_ALT */ #endif /* MBEDTLS_SELF_TEST */ +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/entropy_poll.h b/connectivity/mbedtls/include/mbedtls/entropy_poll.h index e1d7491..05508d7 100644 --- a/connectivity/mbedtls/include/mbedtls/entropy_poll.h +++ b/connectivity/mbedtls/include/mbedtls/entropy_poll.h @@ -34,6 +34,11 @@ extern "C" { #endif +/** + * \addtogroup mbedtls_entropy_module + * \{ + */ + /* * Default thresholds for built-in sources, in bytes */ @@ -101,6 +106,8 @@ unsigned char *output, size_t len, size_t *olen ); #endif +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/error.h b/connectivity/mbedtls/include/mbedtls/error.h index cd7731e..ba73409 100644 --- a/connectivity/mbedtls/include/mbedtls/error.h +++ b/connectivity/mbedtls/include/mbedtls/error.h @@ -31,6 +31,9 @@ #include /** + * \defgroup mbedtls_errors Error Codes + * \ingroup mbedtls + * * Error code layout. * * Currently we try to keep all error codes within the negative space of 16 @@ -42,14 +45,16 @@ * * 16 bit error code bit-segmentation * - * 1 bit - Unused (sign bit) - * 3 bits - High level module ID - * 5 bits - Module-dependent error code - * 7 bits - Low level module errors + * + * \li 1 bit - Unused (sign bit) + * \li 3 bits - High level module ID + * \li 5 bits - Module-dependent error code + * \li 7 bits - Low level module errors * * For historical reasons, low-level error codes are divided in even and odd, * even codes were assigned first, and -1 is reserved for other errors. * + * \code{.unparsed} * Low-level module errors (0x0002-0x007E, 0x0001-0x007F) * * Module Nr Codes assigned @@ -105,12 +110,18 @@ * SSL 7 32 * * Module dependent error code (5 bits 0x.00.-0x.F8.) + * \endcode */ #ifdef __cplusplus extern "C" { #endif +/** + * \addtogroup mbedtls_errors + * \{ + */ + #define MBEDTLS_ERR_ERROR_GENERIC_ERROR -0x0001 /**< Generic error */ #define MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED -0x006E /**< This is a bug in the library */ @@ -155,6 +166,8 @@ */ const char * mbedtls_low_level_strerr( int error_code ); +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/gcm.h b/connectivity/mbedtls/include/mbedtls/gcm.h index 6b67361..a50cd86 100644 --- a/connectivity/mbedtls/include/mbedtls/gcm.h +++ b/connectivity/mbedtls/include/mbedtls/gcm.h @@ -41,8 +41,15 @@ #include -#define MBEDTLS_GCM_ENCRYPT 1 -#define MBEDTLS_GCM_DECRYPT 0 +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_gcm_module Galois/Counter Mode + * \{ + */ + +#define MBEDTLS_GCM_ENCRYPT 1 ///< Encrypt operation +#define MBEDTLS_GCM_DECRYPT 0 ///< Decrypt operation #define MBEDTLS_ERR_GCM_AUTH_FAILED -0x0012 /**< Authenticated decryption failed. */ @@ -316,6 +323,9 @@ #endif /* MBEDTLS_SELF_TEST */ +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/havege.h b/connectivity/mbedtls/include/mbedtls/havege.h index 7d27039..bd852fe 100644 --- a/connectivity/mbedtls/include/mbedtls/havege.h +++ b/connectivity/mbedtls/include/mbedtls/havege.h @@ -38,6 +38,13 @@ #endif /** +* \addtogroup mbedtls +* \{ +* \defgroup mbedtls_havege_module HAVEGE +* \{ +*/ + +/** * \brief HAVEGE state structure */ typedef struct mbedtls_havege_state @@ -73,6 +80,9 @@ */ int mbedtls_havege_random( void *p_rng, unsigned char *output, size_t len ); +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/hkdf.h b/connectivity/mbedtls/include/mbedtls/hkdf.h index 2e6b363..71a8415 100644 --- a/connectivity/mbedtls/include/mbedtls/hkdf.h +++ b/connectivity/mbedtls/include/mbedtls/hkdf.h @@ -34,11 +34,18 @@ #include "mbedtls/md.h" /** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_hkdf_module HKDF + * \{ + */ + +/** * \name HKDF Error codes * \{ */ #define MBEDTLS_ERR_HKDF_BAD_INPUT_DATA -0x5F80 /**< Bad input parameters to function. */ -/* \} name */ +/** \} name */ #ifdef __cplusplus extern "C" { @@ -136,4 +143,7 @@ } #endif +/// \} +/// \} + #endif /* hkdf.h */ diff --git a/connectivity/mbedtls/include/mbedtls/hmac_drbg.h b/connectivity/mbedtls/include/mbedtls/hmac_drbg.h index 9116541..ee37766 100644 --- a/connectivity/mbedtls/include/mbedtls/hmac_drbg.h +++ b/connectivity/mbedtls/include/mbedtls/hmac_drbg.h @@ -38,6 +38,13 @@ #include "mbedtls/threading.h" #endif +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_hrmac_drbg_module HMAC_DRBG + * \{ + */ + /* * Error codes */ @@ -70,7 +77,7 @@ #define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ #endif -/* \} name SECTION: Module settings */ +/** \} name SECTION: Module settings */ #define MBEDTLS_HMAC_DRBG_PR_OFF 0 /**< No prediction resistance */ #define MBEDTLS_HMAC_DRBG_PR_ON 1 /**< Prediction resistance enabled */ @@ -411,6 +418,9 @@ int mbedtls_hmac_drbg_self_test( int verbose ); #endif +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/md.h b/connectivity/mbedtls/include/mbedtls/md.h index e4354ba..df26fbf 100644 --- a/connectivity/mbedtls/include/mbedtls/md.h +++ b/connectivity/mbedtls/include/mbedtls/md.h @@ -33,6 +33,14 @@ #include MBEDTLS_CONFIG_FILE #endif +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_md_module Message Digest (MD) + * \{ + */ + + #define MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE -0x5080 /**< The selected feature is not available. */ #define MBEDTLS_ERR_MD_BAD_INPUT_DATA -0x5100 /**< Bad input parameters to function. */ #define MBEDTLS_ERR_MD_ALLOC_FAILED -0x5180 /**< Failed to allocate memory. */ @@ -467,6 +475,9 @@ /* Internal use */ int mbedtls_md_process( mbedtls_md_context_t *ctx, const unsigned char *data ); +/// \} +/// \} + #ifdef __cplusplus } #endif diff --git a/connectivity/mbedtls/include/mbedtls/md2.h b/connectivity/mbedtls/include/mbedtls/md2.h index 23c48f4..4af1e7d 100644 --- a/connectivity/mbedtls/include/mbedtls/md2.h +++ b/connectivity/mbedtls/include/mbedtls/md2.h @@ -35,6 +35,11 @@ #include +/** + * \ingroup mbedtls_md_module + * \{ + */ + /* MBEDTLS_ERR_MD2_HW_ACCEL_FAILED is deprecated and should not be used. */ #define MBEDTLS_ERR_MD2_HW_ACCEL_FAILED -0x002B /**< MD2 hardware accelerator failed */ @@ -301,4 +306,6 @@ } #endif +/// \} + #endif /* mbedtls_md2.h */ diff --git a/connectivity/mbedtls/include/mbedtls/md4.h b/connectivity/mbedtls/include/mbedtls/md4.h index eeb1670..863e1d4 100644 --- a/connectivity/mbedtls/include/mbedtls/md4.h +++ b/connectivity/mbedtls/include/mbedtls/md4.h @@ -36,6 +36,11 @@ #include #include +/** + * \ingroup mbedtls_md_module + * \{ + */ + /* MBEDTLS_ERR_MD4_HW_ACCEL_FAILED is deprecated and should not be used. */ #define MBEDTLS_ERR_MD4_HW_ACCEL_FAILED -0x002D /**< MD4 hardware accelerator failed */ @@ -306,4 +311,6 @@ } #endif +/// \} + #endif /* mbedtls_md4.h */ diff --git a/connectivity/mbedtls/include/mbedtls/md5.h b/connectivity/mbedtls/include/mbedtls/md5.h index aaca0f2..4c2d9dd 100644 --- a/connectivity/mbedtls/include/mbedtls/md5.h +++ b/connectivity/mbedtls/include/mbedtls/md5.h @@ -35,6 +35,11 @@ #include #include +/** + * \ingroup mbedtls_md_module + * \{ + */ + /* MBEDTLS_ERR_MD5_HW_ACCEL_FAILED is deprecated and should not be used. */ #define MBEDTLS_ERR_MD5_HW_ACCEL_FAILED -0x002F /**< MD5 hardware accelerator failed */ @@ -306,4 +311,6 @@ } #endif +/// \} + #endif /* mbedtls_md5.h */ diff --git a/connectivity/mbedtls/include/mbedtls/memory_buffer_alloc.h b/connectivity/mbedtls/include/mbedtls/memory_buffer_alloc.h index 2339772..51358c4 100644 --- a/connectivity/mbedtls/include/mbedtls/memory_buffer_alloc.h +++ b/connectivity/mbedtls/include/mbedtls/memory_buffer_alloc.h @@ -31,6 +31,13 @@ #include /** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_memory_buffer_alloc_module Memory Buffer Alloc + * \{ + */ + +/** * \name SECTION: Module settings * * The configuration options you can set for this module are in this section. @@ -42,7 +49,7 @@ #define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ #endif -/* \} name SECTION: Module settings */ +/** \} name SECTION: Module settings */ #define MBEDTLS_MEMORY_VERIFY_NONE 0 #define MBEDTLS_MEMORY_VERIFY_ALLOC (1 << 0) @@ -146,4 +153,7 @@ } #endif +/// \} +/// \} + #endif /* memory_buffer_alloc.h */ diff --git a/connectivity/mbedtls/include/mbedtls/net_sockets.h b/connectivity/mbedtls/include/mbedtls/net_sockets.h index 55fd18b..f4c9696 100644 --- a/connectivity/mbedtls/include/mbedtls/net_sockets.h +++ b/connectivity/mbedtls/include/mbedtls/net_sockets.h @@ -49,6 +49,13 @@ #include #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_net_module Network Sockets Abstraction + * \{ + */ + #define MBEDTLS_ERR_NET_SOCKET_FAILED -0x0042 /**< Failed to open a socket. */ #define MBEDTLS_ERR_NET_CONNECT_FAILED -0x0044 /**< The connection to the given server / port failed. */ #define MBEDTLS_ERR_NET_BIND_FAILED -0x0046 /**< Binding of the socket failed. */ @@ -273,4 +280,7 @@ } #endif +/// \} +/// \} + #endif /* net_sockets.h */ diff --git a/connectivity/mbedtls/include/mbedtls/nist_kw.h b/connectivity/mbedtls/include/mbedtls/nist_kw.h index 7f3e64a..4219bdb 100644 --- a/connectivity/mbedtls/include/mbedtls/nist_kw.h +++ b/connectivity/mbedtls/include/mbedtls/nist_kw.h @@ -43,6 +43,13 @@ #include "mbedtls/cipher.h" +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_nist_kw_module NIST Key Wrapping + * \{ + */ + #ifdef __cplusplus extern "C" { #endif @@ -179,4 +186,7 @@ } #endif +/// \} +/// \} + #endif /* MBEDTLS_NIST_KW_H */ diff --git a/connectivity/mbedtls/include/mbedtls/oid.h b/connectivity/mbedtls/include/mbedtls/oid.h index e4c697b..d8ffcf9 100644 --- a/connectivity/mbedtls/include/mbedtls/oid.h +++ b/connectivity/mbedtls/include/mbedtls/oid.h @@ -41,6 +41,13 @@ #include "mbedtls/md.h" #endif +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_oid_module Object Identifier Database + * \{ + */ + #define MBEDTLS_ERR_OID_NOT_FOUND -0x002E /**< OID is not found. */ #define MBEDTLS_ERR_OID_BUF_TOO_SMALL -0x000B /**< output buffer is too small */ @@ -644,4 +651,7 @@ } #endif +/// \} +/// \} + #endif /* oid.h */ diff --git a/connectivity/mbedtls/include/mbedtls/pem.h b/connectivity/mbedtls/include/mbedtls/pem.h index 4769bec..c56543e 100644 --- a/connectivity/mbedtls/include/mbedtls/pem.h +++ b/connectivity/mbedtls/include/mbedtls/pem.h @@ -31,6 +31,13 @@ #include /** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_pem_module Privacy Enhanced Mail + * \{ + */ + +/** * \name PEM Error codes * These error codes are returned in case of errors reading the * PEM data. @@ -45,7 +52,7 @@ #define MBEDTLS_ERR_PEM_PASSWORD_MISMATCH -0x1380 /**< Given private key password does not allow for correct decryption. */ #define MBEDTLS_ERR_PEM_FEATURE_UNAVAILABLE -0x1400 /**< Unavailable feature, e.g. hashing/encryption combination. */ #define MBEDTLS_ERR_PEM_BAD_INPUT_DATA -0x1480 /**< Bad input parameters to function. */ -/* \} name */ +/** \} name */ #ifdef __cplusplus extern "C" { @@ -141,4 +148,7 @@ } #endif +/// \} +/// \} + #endif /* pem.h */ diff --git a/connectivity/mbedtls/include/mbedtls/pk.h b/connectivity/mbedtls/include/mbedtls/pk.h index 7d0f977..2eeb28d 100644 --- a/connectivity/mbedtls/include/mbedtls/pk.h +++ b/connectivity/mbedtls/include/mbedtls/pk.h @@ -78,14 +78,14 @@ * \brief Public key types */ typedef enum { - MBEDTLS_PK_NONE=0, - MBEDTLS_PK_RSA, - MBEDTLS_PK_ECKEY, - MBEDTLS_PK_ECKEY_DH, - MBEDTLS_PK_ECDSA, - MBEDTLS_PK_RSA_ALT, - MBEDTLS_PK_RSASSA_PSS, - MBEDTLS_PK_OPAQUE, + MBEDTLS_PK_NONE=0, ///< None + MBEDTLS_PK_RSA, ///< RSA + MBEDTLS_PK_ECKEY, ///< ECKEY + MBEDTLS_PK_ECKEY_DH, ///< ECKEY DH + MBEDTLS_PK_ECDSA, ///< ECDSA + MBEDTLS_PK_RSA_ALT, ///< RSA Alt + MBEDTLS_PK_RSASSA_PSS, ///< RSASSA PSS + MBEDTLS_PK_OPAQUE, ///< OPAQUE } mbedtls_pk_type_t; /** @@ -642,7 +642,7 @@ mbedtls_pk_type_t mbedtls_pk_get_type( const mbedtls_pk_context *ctx ); #if defined(MBEDTLS_PK_PARSE_C) -/** \ingroup pk_module */ +/** \ingroup mbedtls_pk_module */ /** * \brief Parse a private key in PEM or DER format * @@ -675,7 +675,7 @@ const unsigned char *key, size_t keylen, const unsigned char *pwd, size_t pwdlen ); -/** \ingroup pk_module */ +/** \ingroup mbedtls_pk_module */ /** * \brief Parse a public key in PEM or DER format * @@ -701,7 +701,7 @@ const unsigned char *key, size_t keylen ); #if defined(MBEDTLS_FS_IO) -/** \ingroup pk_module */ +/** \ingroup mbedtls_pk_module */ /** * \brief Load and parse a private key * @@ -725,7 +725,7 @@ int mbedtls_pk_parse_keyfile( mbedtls_pk_context *ctx, const char *path, const char *password ); -/** \ingroup pk_module */ +/** \ingroup mbedtls_pk_module */ /** * \brief Load and parse a public key * diff --git a/connectivity/mbedtls/include/mbedtls/pkcs12.h b/connectivity/mbedtls/include/mbedtls/pkcs12.h index 4b8ce7e..50a1fa4 100644 --- a/connectivity/mbedtls/include/mbedtls/pkcs12.h +++ b/connectivity/mbedtls/include/mbedtls/pkcs12.h @@ -34,6 +34,13 @@ #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_pkcs12_module PKCS#12 + * \{ + */ + #define MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA -0x1F80 /**< Bad input parameters to function. */ #define MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE -0x1F00 /**< Feature not available, e.g. unsupported encryption scheme. */ #define MBEDTLS_ERR_PKCS12_PBE_INVALID_FORMAT -0x1E80 /**< PBE ASN.1 data not as expected. */ @@ -125,4 +132,7 @@ } #endif +/// \} +/// \} + #endif /* pkcs12.h */ diff --git a/connectivity/mbedtls/include/mbedtls/pkcs5.h b/connectivity/mbedtls/include/mbedtls/pkcs5.h index 8f348ce..e8055d3 100644 --- a/connectivity/mbedtls/include/mbedtls/pkcs5.h +++ b/connectivity/mbedtls/include/mbedtls/pkcs5.h @@ -36,6 +36,13 @@ #include #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_pkcs5_module PKCS#5 + * \{ + */ + #define MBEDTLS_ERR_PKCS5_BAD_INPUT_DATA -0x2f80 /**< Bad input parameters to function. */ #define MBEDTLS_ERR_PKCS5_INVALID_FORMAT -0x2f00 /**< Unexpected ASN.1 data. */ #define MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE -0x2e80 /**< Requested encryption or digest alg not available. */ @@ -104,4 +111,7 @@ } #endif +/// \} +/// \} + #endif /* pkcs5.h */ diff --git a/connectivity/mbedtls/include/mbedtls/platform.h b/connectivity/mbedtls/include/mbedtls/platform.h index fde5ee8..b60b8bd 100644 --- a/connectivity/mbedtls/include/mbedtls/platform.h +++ b/connectivity/mbedtls/include/mbedtls/platform.h @@ -41,6 +41,13 @@ #include "mbedtls/platform_time.h" #endif +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_platform_module Platform Abstraction Layer + * \{ + */ + #define MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070 /**< Hardware accelerator failed */ #define MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED -0x0072 /**< The requested feature is not supported by the platform */ @@ -125,7 +132,7 @@ #endif /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */ -/* \} name SECTION: Module settings */ +/** \} name SECTION: Module settings */ /* * The function pointers for calloc and free. @@ -414,4 +421,7 @@ } #endif +/// \} +/// \} + #endif /* platform.h */ diff --git a/connectivity/mbedtls/include/mbedtls/platform_time.h b/connectivity/mbedtls/include/mbedtls/platform_time.h index 7e7daab..1dc69dd 100644 --- a/connectivity/mbedtls/include/mbedtls/platform_time.h +++ b/connectivity/mbedtls/include/mbedtls/platform_time.h @@ -28,6 +28,11 @@ #include MBEDTLS_CONFIG_FILE #endif +/** + * \ingroup mbedtls_platform_module + * \{ + */ + #ifdef __cplusplus extern "C" { #endif @@ -73,8 +78,12 @@ #endif /* MBEDTLS_PLATFORM_TIME_MACRO */ #endif /* MBEDTLS_PLATFORM_TIME_ALT */ +/// \} + #ifdef __cplusplus } #endif +/// \} + #endif /* platform_time.h */ diff --git a/connectivity/mbedtls/include/mbedtls/platform_util.h b/connectivity/mbedtls/include/mbedtls/platform_util.h index fbc2a0d..e12d47c 100644 --- a/connectivity/mbedtls/include/mbedtls/platform_util.h +++ b/connectivity/mbedtls/include/mbedtls/platform_util.h @@ -29,6 +29,11 @@ #include MBEDTLS_CONFIG_FILE #endif +/** + * \ingroup mbedtls_platform_module + * \{ + */ + #include #if defined(MBEDTLS_HAVE_TIME_DATE) #include "mbedtls/platform_time.h" @@ -191,4 +196,6 @@ } #endif +/// \} + #endif /* MBEDTLS_PLATFORM_UTIL_H */ diff --git a/connectivity/mbedtls/include/mbedtls/poly1305.h b/connectivity/mbedtls/include/mbedtls/poly1305.h index 905c145..da4a9c3 100644 --- a/connectivity/mbedtls/include/mbedtls/poly1305.h +++ b/connectivity/mbedtls/include/mbedtls/poly1305.h @@ -41,6 +41,13 @@ #include #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_poly1305_module Poly1305 + * \{ + */ + #define MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA -0x0057 /**< Invalid input parameter(s). */ /* MBEDTLS_ERR_POLY1305_FEATURE_UNAVAILABLE is deprecated and should not be @@ -188,4 +195,7 @@ } #endif +/// \} +/// \} + #endif /* MBEDTLS_POLY1305_H */ diff --git a/connectivity/mbedtls/include/mbedtls/ripemd160.h b/connectivity/mbedtls/include/mbedtls/ripemd160.h index 381c725..5faa045 100644 --- a/connectivity/mbedtls/include/mbedtls/ripemd160.h +++ b/connectivity/mbedtls/include/mbedtls/ripemd160.h @@ -31,6 +31,13 @@ #include #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_ripemd160_module RIPE MD-160 + * \{ + */ + /* MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED is deprecated and should not be used. */ #define MBEDTLS_ERR_RIPEMD160_HW_ACCEL_FAILED -0x0031 /**< RIPEMD160 hardware accelerator failed */ @@ -232,4 +239,7 @@ } #endif +/// \} +/// \} + #endif /* mbedtls_ripemd160.h */ diff --git a/connectivity/mbedtls/include/mbedtls/rsa.h b/connectivity/mbedtls/include/mbedtls/rsa.h index 6a31514..6dc5e8d 100644 --- a/connectivity/mbedtls/include/mbedtls/rsa.h +++ b/connectivity/mbedtls/include/mbedtls/rsa.h @@ -41,6 +41,13 @@ #include "mbedtls/threading.h" #endif +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_rsa_module RSA + * \{ + */ + /* * RSA Error codes */ @@ -73,7 +80,7 @@ #define MBEDTLS_RSA_SIGN 1 /**< Identifier for RSA signature operations. */ #define MBEDTLS_RSA_CRYPT 2 /**< Identifier for RSA encryption and decryption operations. */ -#define MBEDTLS_RSA_SALT_LEN_ANY -1 +#define MBEDTLS_RSA_SALT_LEN_ANY -1 ///< Constant for mbedtls_rsa_rsassa_pss_verify_ext to accept any salt length /* * The above constants may be used even if the RSA module is compile out, @@ -1272,4 +1279,7 @@ } #endif +/// \} +/// \} + #endif /* rsa.h */ diff --git a/connectivity/mbedtls/include/mbedtls/sha1.h b/connectivity/mbedtls/include/mbedtls/sha1.h index 86a3d06..1e12941 100644 --- a/connectivity/mbedtls/include/mbedtls/sha1.h +++ b/connectivity/mbedtls/include/mbedtls/sha1.h @@ -38,6 +38,13 @@ #include #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_sha1_module SHA-1 + * \{ + */ + /* MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED is deprecated and should not be used. */ #define MBEDTLS_ERR_SHA1_HW_ACCEL_FAILED -0x0035 /**< SHA-1 hardware accelerator failed */ #define MBEDTLS_ERR_SHA1_BAD_INPUT_DATA -0x0073 /**< SHA-1 input data was malformed. */ @@ -347,4 +354,7 @@ } #endif +/// \} +/// \} + #endif /* mbedtls_sha1.h */ diff --git a/connectivity/mbedtls/include/mbedtls/sha256.h b/connectivity/mbedtls/include/mbedtls/sha256.h index 73d9544..8a34878 100644 --- a/connectivity/mbedtls/include/mbedtls/sha256.h +++ b/connectivity/mbedtls/include/mbedtls/sha256.h @@ -34,6 +34,14 @@ #include #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_sha256_module SHA-224 and SHA-256 + * \{ + */ + + /* MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED is deprecated and should not be used. */ #define MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED -0x0037 /**< SHA-256 hardware accelerator failed */ #define MBEDTLS_ERR_SHA256_BAD_INPUT_DATA -0x0074 /**< SHA-256 input data was malformed. */ @@ -292,4 +300,7 @@ } #endif +/// \} +/// \} + #endif /* mbedtls_sha256.h */ diff --git a/connectivity/mbedtls/include/mbedtls/sha512.h b/connectivity/mbedtls/include/mbedtls/sha512.h index 4a8ab42..714be09 100644 --- a/connectivity/mbedtls/include/mbedtls/sha512.h +++ b/connectivity/mbedtls/include/mbedtls/sha512.h @@ -33,6 +33,13 @@ #include #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_sha512_module SHA-384 and SHA-512 + * \{ + */ + /* MBEDTLS_ERR_SHA512_HW_ACCEL_FAILED is deprecated and should not be used. */ #define MBEDTLS_ERR_SHA512_HW_ACCEL_FAILED -0x0039 /**< SHA-512 hardware accelerator failed */ #define MBEDTLS_ERR_SHA512_BAD_INPUT_DATA -0x0075 /**< SHA-512 input data was malformed. */ @@ -311,4 +318,7 @@ } #endif +/// \} +/// \} + #endif /* mbedtls_sha512.h */ diff --git a/connectivity/mbedtls/include/mbedtls/ssl.h b/connectivity/mbedtls/include/mbedtls/ssl.h index 7815ad9..b714cf8 100644 --- a/connectivity/mbedtls/include/mbedtls/ssl.h +++ b/connectivity/mbedtls/include/mbedtls/ssl.h @@ -28,6 +28,13 @@ #include MBEDTLS_CONFIG_FILE #endif +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_ssl_module SSL/TLS + * \{ + */ + #include "mbedtls/bignum.h" #include "mbedtls/ecp.h" @@ -291,7 +298,7 @@ #define MBEDTLS_SSL_TLS1_3_PADDING_GRANULARITY 1 #endif -/* \} name SECTION: Module settings */ +/** \} name SECTION: Module settings */ /* * Length of the verify data for secure renegotiation @@ -4349,4 +4356,7 @@ } #endif +/// \} +/// \} + #endif /* ssl.h */ diff --git a/connectivity/mbedtls/include/mbedtls/ssl_cache.h b/connectivity/mbedtls/include/mbedtls/ssl_cache.h index c6ef296..b4639e9 100644 --- a/connectivity/mbedtls/include/mbedtls/ssl_cache.h +++ b/connectivity/mbedtls/include/mbedtls/ssl_cache.h @@ -35,6 +35,11 @@ #endif /** + * \ingroup mbedtls_ssl_module + * \{ + */ + +/** * \name SECTION: Module settings * * The configuration options you can set for this module are in this section. @@ -50,7 +55,7 @@ #define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /*!< Maximum entries in cache */ #endif -/* \} name SECTION: Module settings */ +/** \} name SECTION: Module settings */ #ifdef __cplusplus extern "C" { @@ -146,4 +151,6 @@ } #endif +/// \} + #endif /* ssl_cache.h */ diff --git a/connectivity/mbedtls/include/mbedtls/ssl_ciphersuites.h b/connectivity/mbedtls/include/mbedtls/ssl_ciphersuites.h index 93c32a5..f434be1 100644 --- a/connectivity/mbedtls/include/mbedtls/ssl_ciphersuites.h +++ b/connectivity/mbedtls/include/mbedtls/ssl_ciphersuites.h @@ -32,6 +32,11 @@ #include "mbedtls/cipher.h" #include "mbedtls/md.h" +/** + * \ingroup mbedtls_ssl_module + * \{ + */ + #ifdef __cplusplus extern "C" { #endif @@ -553,4 +558,6 @@ } #endif +/// \} + #endif /* ssl_ciphersuites.h */ diff --git a/connectivity/mbedtls/include/mbedtls/ssl_cookie.h b/connectivity/mbedtls/include/mbedtls/ssl_cookie.h index 0a23870..4c4e6d9 100644 --- a/connectivity/mbedtls/include/mbedtls/ssl_cookie.h +++ b/connectivity/mbedtls/include/mbedtls/ssl_cookie.h @@ -35,6 +35,11 @@ #endif /** + * \ingroup mbedtls_ssl_module + * \{ + */ + +/** * \name SECTION: Module settings * * The configuration options you can set for this module are in this section. @@ -45,7 +50,7 @@ #define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */ #endif -/* \} name SECTION: Module settings */ +/** \} name SECTION: Module settings */ #ifdef __cplusplus extern "C" { @@ -110,4 +115,6 @@ } #endif +/// \} + #endif /* ssl_cookie.h */ diff --git a/connectivity/mbedtls/include/mbedtls/ssl_ticket.h b/connectivity/mbedtls/include/mbedtls/ssl_ticket.h index bf5fc97..80e7f65 100644 --- a/connectivity/mbedtls/include/mbedtls/ssl_ticket.h +++ b/connectivity/mbedtls/include/mbedtls/ssl_ticket.h @@ -41,6 +41,11 @@ #include "mbedtls/threading.h" #endif +/** + * \ingroup mbedtls_ssl_module + * \{ + */ + #ifdef __cplusplus extern "C" { #endif @@ -137,4 +142,6 @@ } #endif +/// \} + #endif /* ssl_ticket.h */ diff --git a/connectivity/mbedtls/include/mbedtls/timing.h b/connectivity/mbedtls/include/mbedtls/timing.h index b7290cf..bb24065 100644 --- a/connectivity/mbedtls/include/mbedtls/timing.h +++ b/connectivity/mbedtls/include/mbedtls/timing.h @@ -30,6 +30,13 @@ #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_timing_module Timing + * \{ + */ + #ifdef __cplusplus extern "C" { #endif @@ -148,4 +155,7 @@ } #endif +/// \} +/// \} + #endif /* timing.h */ diff --git a/connectivity/mbedtls/include/mbedtls/version.h b/connectivity/mbedtls/include/mbedtls/version.h index 10c4316..d6f2995 100644 --- a/connectivity/mbedtls/include/mbedtls/version.h +++ b/connectivity/mbedtls/include/mbedtls/version.h @@ -33,12 +33,20 @@ #endif /** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_version_module Versioning + * \{ + */ + + +/* * The version number x.y.z is split into three parts. * Major, Minor, Patchlevel */ -#define MBEDTLS_VERSION_MAJOR 2 -#define MBEDTLS_VERSION_MINOR 25 -#define MBEDTLS_VERSION_PATCH 0 +#define MBEDTLS_VERSION_MAJOR 2 ///< Major Mbed TLS version +#define MBEDTLS_VERSION_MINOR 25 ///< Minor Mbed TLS version +#define MBEDTLS_VERSION_PATCH 0 ///< Patch Mbed TLS version /** * The single version number has the following structure: @@ -46,7 +54,15 @@ * Major version | Minor version | Patch version */ #define MBEDTLS_VERSION_NUMBER 0x02190000 + +/** + * String constant containing the version number in the form "xx.yy.zz" + */ #define MBEDTLS_VERSION_STRING "2.25.0" + +/** + * String constant containing the library name and version, in the form "mbed TLS xx.yy.zz" + */ #define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.25.0" #if defined(MBEDTLS_VERSION_C) @@ -107,4 +123,7 @@ #endif /* MBEDTLS_VERSION_C */ +/// \} +/// \} + #endif /* version.h */ diff --git a/connectivity/mbedtls/include/mbedtls/x509.h b/connectivity/mbedtls/include/mbedtls/x509.h index 08525e2..69596ca 100644 --- a/connectivity/mbedtls/include/mbedtls/x509.h +++ b/connectivity/mbedtls/include/mbedtls/x509.h @@ -36,10 +36,14 @@ #endif /** - * \addtogroup x509_module + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_x509_module X.509 + * Structures for parsing X.509 certificates, CRLs and CSRs * \{ */ + #if !defined(MBEDTLS_X509_MAX_INTERMEDIATE_CA) /** * Maximum number of intermediate CAs in a verification chain. @@ -76,7 +80,7 @@ #define MBEDTLS_ERR_X509_FILE_IO_ERROR -0x2900 /**< Read/write of file failed. */ #define MBEDTLS_ERR_X509_BUFFER_TOO_SMALL -0x2980 /**< Destination buffer is too small. */ #define MBEDTLS_ERR_X509_FATAL_ERROR -0x3000 /**< A fatal error occurred, eg the chain is too long or the vrfy callback failed. */ -/* \} name */ +/** \} name */ /** * \name X509 Verify codes @@ -104,8 +108,7 @@ #define MBEDTLS_X509_BADCRL_BAD_PK 0x040000 /**< The CRL is signed with an unacceptable PK alg (eg RSA vs ECDSA). */ #define MBEDTLS_X509_BADCRL_BAD_KEY 0x080000 /**< The CRL is signed with an unacceptable key (eg bad curve, RSA too short). */ -/* \} name */ -/* \} addtogroup x509_module */ +/** \} name */ /* * X.509 v3 Subject Alternative Name types. @@ -197,10 +200,6 @@ #endif /** - * \addtogroup x509_module - * \{ */ - -/** * \name Structures for parsing X.509 certificates, CRLs and CSRs * \{ */ @@ -235,8 +234,6 @@ mbedtls_x509_time; /** \} name Structures for parsing X.509 certificates, CRLs and CSRs */ -/** \} addtogroup x509_module */ - /** * \brief Store the certificate DN in printable form into buf; * no more than size characters will be written. @@ -356,4 +353,7 @@ } #endif +/// \} +/// \} + #endif /* x509.h */ diff --git a/connectivity/mbedtls/include/mbedtls/x509_crl.h b/connectivity/mbedtls/include/mbedtls/x509_crl.h index 7e9e888..76ba4b3 100644 --- a/connectivity/mbedtls/include/mbedtls/x509_crl.h +++ b/connectivity/mbedtls/include/mbedtls/x509_crl.h @@ -35,7 +35,7 @@ #endif /** - * \addtogroup x509_module + * \addtogroup mbedtls_x509_module * \{ */ /** @@ -162,8 +162,8 @@ */ void mbedtls_x509_crl_free( mbedtls_x509_crl *crl ); -/* \} name */ -/* \} addtogroup x509_module */ +/** \} name */ +/** \} addtogroup mbedtls_x509_module */ #ifdef __cplusplus } diff --git a/connectivity/mbedtls/include/mbedtls/x509_crt.h b/connectivity/mbedtls/include/mbedtls/x509_crt.h index 8e389f8..dc83e7f 100644 --- a/connectivity/mbedtls/include/mbedtls/x509_crt.h +++ b/connectivity/mbedtls/include/mbedtls/x509_crt.h @@ -33,7 +33,7 @@ #include "mbedtls/bignum.h" /** - * \addtogroup x509_module + * \addtogroup mbedtls_x509_module * \{ */ @@ -841,8 +841,8 @@ #endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ #endif /* MBEDTLS_X509_CRT_PARSE_C */ -/* \} name */ -/* \} addtogroup x509_module */ +/** \} name */ +/** \} addtogroup mbedtls_x509_module */ #if defined(MBEDTLS_X509_CRT_WRITE_C) /** diff --git a/connectivity/mbedtls/include/mbedtls/x509_csr.h b/connectivity/mbedtls/include/mbedtls/x509_csr.h index b1dfc21..8876f99 100644 --- a/connectivity/mbedtls/include/mbedtls/x509_csr.h +++ b/connectivity/mbedtls/include/mbedtls/x509_csr.h @@ -35,7 +35,7 @@ #endif /** - * \addtogroup x509_module + * \addtogroup mbedtls_x509_module * \{ */ /** @@ -151,8 +151,8 @@ void mbedtls_x509_csr_free( mbedtls_x509_csr *csr ); #endif /* MBEDTLS_X509_CSR_PARSE_C */ -/* \} name */ -/* \} addtogroup x509_module */ +/** \} name */ +/** \} addtogroup mbedtls_x509_module */ #if defined(MBEDTLS_X509_CSR_WRITE_C) /** diff --git a/connectivity/mbedtls/include/mbedtls/xtea.h b/connectivity/mbedtls/include/mbedtls/xtea.h index 473dd4b..79de409 100644 --- a/connectivity/mbedtls/include/mbedtls/xtea.h +++ b/connectivity/mbedtls/include/mbedtls/xtea.h @@ -31,6 +31,13 @@ #include #include +/** + * \addtogroup mbedtls + * \{ + * \defgroup mbedtls_xtea_module XTEA + * \{ + */ + #define MBEDTLS_XTEA_ENCRYPT 1 #define MBEDTLS_XTEA_DECRYPT 0 @@ -134,4 +141,7 @@ } #endif +/// \} +/// \} + #endif /* xtea.h */ diff --git a/connectivity/mbedtls/platform/inc/platform_mbed.h b/connectivity/mbedtls/platform/inc/platform_mbed.h index 548874b..2db70c2 100644 --- a/connectivity/mbedtls/platform/inc/platform_mbed.h +++ b/connectivity/mbedtls/platform/inc/platform_mbed.h @@ -21,6 +21,16 @@ #ifndef __PLATFORM_MBED__H__ #define __PLATFORM_MBED__H__ +// Create doxygen group for mbedtls +/** \defgroup public-crypto Cryptography + * \ingroup mbed-os-public + */ + +/** + * \defgroup mbedtls Mbed TLS + * \ingroup public-crypto + */ + #if defined(FEATURE_EXPERIMENTAL_API) && defined(FEATURE_PSA) #if defined(MBEDTLS_ENTROPY_NV_SEED) diff --git a/connectivity/nanostack/include/nanostack-interface/Nanostack.h b/connectivity/nanostack/include/nanostack-interface/Nanostack.h index b4c8370..f6cc27b 100644 --- a/connectivity/nanostack/include/nanostack-interface/Nanostack.h +++ b/connectivity/nanostack/include/nanostack-interface/Nanostack.h @@ -58,7 +58,7 @@ Nanostack(); /** @copydoc NetworkStack::get_ip_address */ - nsapi_error_t get_ip_address(SocketAddress *sockAddr) override; + nsapi_error_t get_ip_address(SocketAddress *address) override; /** Translate a hostname to an IP address with specific version using network interface name. * @@ -75,7 +75,7 @@ * @param interface_name Network interface name * @return NSAPI_ERROR_OK on success, negative error code on failure. */ - virtual nsapi_error_t gethostbyname(const char *name, SocketAddress *address, nsapi_version_t version, const char *interface_name) override; + virtual nsapi_error_t gethostbyname(const char *host, SocketAddress *address, nsapi_version_t version, const char *interface_name) override; /** Translate a hostname to an IP address (asynchronous) using network interface name. * @@ -99,7 +99,7 @@ * a positive unique id that represents the hostname translation operation * and can be passed to cancel. */ - virtual nsapi_value_or_error_t gethostbyname_async(const char *name, hostbyname_cb_t callback, nsapi_version_t version, const char *interface_name) override; + virtual nsapi_value_or_error_t gethostbyname_async(const char *host, hostbyname_cb_t callback, nsapi_version_t version, const char *interface_name) override; /** Get a domain name server from a list of servers to query * @@ -304,24 +304,6 @@ private: - /** Call in callback - * - * Callback is used to call the call in method of the network stack. - */ - typedef mbed::Callback user_cb)> call_in_callback_cb_t; - - /** Get a call in callback - * - * Get a call in callback from the network stack context. - * - * Callback should not take more than 10ms to execute, otherwise it might - * prevent underlying thread processing. A portable user of the callback - * should not make calls to network operations due to stack size limitations. - * The callback should not perform expensive operations such as socket recv/send - * calls or blocking operations. - * - * @return Call in callback - */ call_in_callback_cb_t get_call_in_callback() override; /** Call a callback after a delay diff --git a/connectivity/nanostack/mbed-mesh-api/mbed-mesh-api/WisunInterface.h b/connectivity/nanostack/mbed-mesh-api/mbed-mesh-api/WisunInterface.h index 570f1c4..e1db224 100644 --- a/connectivity/nanostack/mbed-mesh-api/mbed-mesh-api/WisunInterface.h +++ b/connectivity/nanostack/mbed-mesh-api/mbed-mesh-api/WisunInterface.h @@ -644,8 +644,8 @@ * * Function reads CCA threshold table from nanostack. * - ** \param ws_cca_threshold_table_t Structure given to stack where information will be stored - ** + * \param table Structure given to stack where information will be stored + * * \return MESH_ERROR_NONE on success. * \return MESH_ERROR_UNKNOWN in case of failure. * */ diff --git a/connectivity/netsocket/include/netsocket/DNS.h b/connectivity/netsocket/include/netsocket/DNS.h index cd9ef06..d67f941 100644 --- a/connectivity/netsocket/include/netsocket/DNS.h +++ b/connectivity/netsocket/include/netsocket/DNS.h @@ -16,7 +16,7 @@ */ /** @file DNS.h Domain Name Service */ -/** @defgroup NetSocket +/** @defgroup NetSocket NetSocket * @ingroup connectivity-public-api * @{ */ diff --git a/connectivity/netsocket/include/netsocket/EMAC.h b/connectivity/netsocket/include/netsocket/EMAC.h index 515629b..6a688b2 100644 --- a/connectivity/netsocket/include/netsocket/EMAC.h +++ b/connectivity/netsocket/include/netsocket/EMAC.h @@ -91,7 +91,7 @@ /** * Return interface-supplied HW address * - * Copies HW address to provided memory, @param addr has to be of correct size see @a get_hwaddr_size + * Copies HW address to provided memory, \c addr has to be of correct size see #get_hwaddr_size * * HW address need not be provided if this interface does not have its own HW * address configuration; stack will choose address from central system diff --git a/connectivity/netsocket/include/netsocket/InternetDatagramSocket.h b/connectivity/netsocket/include/netsocket/InternetDatagramSocket.h index 19e6d4a..960394d 100644 --- a/connectivity/netsocket/include/netsocket/InternetDatagramSocket.h +++ b/connectivity/netsocket/include/netsocket/InternetDatagramSocket.h @@ -65,11 +65,11 @@ * @param address Destination for the source address or NULL. * @param data Destination buffer for RAW data to be received from the host. * @param size Size of the buffer in bytes. - * @retval int Number of received bytes on success. + * @retval Number of received bytes on success. * @retval NSAPI_ERROR_NO_SOCKET in case socket was not created correctly. * @retval NSAPI_ERROR_WOULD_BLOCK in case non-blocking mode is enabled * and send cannot be performed immediately. - * @retval int Other negative error codes for stack-related failures. + * @retval Other negative error codes for stack-related failures. * See \ref NetworkStack::socket_recv. */ nsapi_size_or_error_t recvfrom(SocketAddress *address, @@ -81,12 +81,11 @@ * nonblocking or times out, NSAPI_ERROR_WOULD_BLOCK is returned * immediately. * - * It uses sendto_control with zero ancillary data * @param address The SocketAddress of the remote host. * @param data Buffer of data to send to the host. * @param size Size of the buffer in bytes. - * @param control Size of the buffer in bytes. - * @param control_size Size of the buffer in bytes. + * @param control Control data, for instance a populated #nsapi_pktinfo structure. + * @param control_size Size of \c control in bytes. * @retval NSAPI_ERROR_NO_SOCKET in case socket was not created correctly. * @retval NSAPI_ERROR_WOULD_BLOCK in case non-blocking mode is enabled * and send cannot be performed immediately. @@ -103,7 +102,12 @@ * By default, recvfrom blocks until a datagram is received. If socket is set to * nonblocking or times out with no datagram, NSAPI_ERROR_WOULD_BLOCK * is returned. - * Ancillary data is stored in msghdr struct + * + * Ancillary data is stored into \c control. The caller needs to allocate a buffer + * that is large enough to contain the data they want to receive, then pass the pointer in + * through the \c control member. The data will be filled into \c control, beginning with a header + * specifying what data was received. See #MsgHeaderIterator for how to parse this data. + * * @note If the datagram is larger than the buffer, the excess data is silently discarded. * * @note If socket is connected, only packets coming from connected peer address @@ -114,13 +118,13 @@ * @param address Destination for the source address or NULL. * @param data Destination buffer for RAW data to be received from the host. * @param size Size of the buffer in bytes. - * @param control Size of the buffer in bytes. - * @param control_size Size of the buffer in bytes. - * @retval int Number of received bytes on success. + * @param control Caller-allocated buffer to store ancillary data. + * @param control_size Size of the \c control buffer that the caller has allocated. + * @retval Number of received bytes on success. * @retval NSAPI_ERROR_NO_SOCKET in case socket was not created correctly. * @retval NSAPI_ERROR_WOULD_BLOCK in case non-blocking mode is enabled * and send cannot be performed immediately. - * @retval int Other negative error codes for stack-related failures. + * @retval Other negative error codes for stack-related failures. * See \ref NetworkStack::socket_recv. */ nsapi_size_or_error_t recvfrom_control(SocketAddress *address, @@ -146,12 +150,12 @@ * * @param data Buffer of data to send to the host. * @param size Size of the buffer in bytes. - * @retval int Number of sent bytes on success. + * @retval Number of sent bytes on success. * @retval NSAPI_ERROR_NO_SOCKET in case socket was not created correctly. * @retval NSAPI_ERROR_WOULD_BLOCK in case non-blocking mode is enabled * and send cannot be performed immediately. - * #retval NSAPI_ERROR_NO_ADDRESS if the address was not set with connect(). - * @retval int Other negative error codes for stack-related failures. + * @retval NSAPI_ERROR_NO_ADDRESS if the address was not set with connect(). + * @retval Other negative error codes for stack-related failures. * See \ref NetworkStack::socket_send. */ nsapi_size_or_error_t send(const void *data, nsapi_size_t size) override; @@ -168,11 +172,11 @@ * * @param data Pointer to buffer for data received from the host. * @param size Size of the buffer in bytes. - * @retval int Number of received bytes on success. + * @retval Number of received bytes on success. * @retval NSAPI_ERROR_NO_SOCKET in case socket was not created correctly. * @retval NSAPI_ERROR_WOULD_BLOCK in case non-blocking mode is enabled * and send cannot be performed immediately. - * @retval int Other negative error codes for stack-related failures. + * @retval Other negative error codes for stack-related failures. * See \ref NetworkStack::socket_recv. */ nsapi_size_or_error_t recv(void *data, nsapi_size_t size) override; diff --git a/connectivity/netsocket/include/netsocket/NetworkInterface.h b/connectivity/netsocket/include/netsocket/NetworkInterface.h index 9071a1e..17b0294 100644 --- a/connectivity/netsocket/include/netsocket/NetworkInterface.h +++ b/connectivity/netsocket/include/netsocket/NetworkInterface.h @@ -346,6 +346,7 @@ /** Add a domain name server to list of servers to query * * @param address Address for the dns host. + * @param interface_name Network interface name. Currently unused, the server is added for all interfaces. * @return NSAPI_ERROR_OK on success, negative error code on failure. */ virtual nsapi_error_t add_dns_server(const SocketAddress &address, const char *interface_name); diff --git a/connectivity/netsocket/include/netsocket/NetworkStack.h b/connectivity/netsocket/include/netsocket/NetworkStack.h index 72fde98..37aab88 100644 --- a/connectivity/netsocket/include/netsocket/NetworkStack.h +++ b/connectivity/netsocket/include/netsocket/NetworkStack.h @@ -187,7 +187,7 @@ /** Add a domain name server to list of servers to query * * @param address Destination for the host address - * @param interface_name Network interface name + * @param interface_name Network interface name. Currently unused, the server is added for all interfaces. * @return NSAPI_ERROR_OK on success, negative error code on failure */ virtual nsapi_error_t add_dns_server(const SocketAddress &address, const char *interface_name = NULL); @@ -238,9 +238,16 @@ /** Dynamic downcast to a OnboardNetworkStack */ virtual OnboardNetworkStack *onboardNetworkStack() { - return 0; + return nullptr; } + /** + * Type for a call-in callback. + * This is a pointer to a function that will call the provided callback from the network stack + * after a given delay, or immediately if \p delay_ms is 0. + */ + typedef mbed::Callback user_cb)> call_in_callback_cb_t; + protected: friend class InternetSocket; friend class InternetDatagramSocket; @@ -428,17 +435,19 @@ * Receives data and stores the source address in address if address * is not NULL. Returns the number of bytes received into the buffer. * - * Additional information related to the message can be retrieved with - * the control data. + * Ancillary data is stored into \c control. The caller needs to allocate a buffer + * that is large enough to contain the data they want to receive, then pass the pointer in + * through the \c control member. The data will be filled into \c control, beginning with a header + * specifying what data was received. See #MsgHeaderIterator for how to parse this data. * * This call is non-blocking. If recvfrom would block, * NSAPI_ERROR_WOULD_BLOCK is returned immediately. * * @param handle Socket handle * @param address Destination for the source address or NULL - * @param buffer Destination buffer for data received from the host + * @param data Destination buffer for data received from the host * @param size Size of the buffer in bytes - * @param control Storage for ancillary data + * @param control Storage for ancillary data * @param control_size Size of ancillary data * @return Number of received bytes on success, negative error * code on failure @@ -503,12 +512,6 @@ private: - /** Call in callback - * - * Callback is used to call the call in method of the network stack. - */ - typedef mbed::Callback user_cb)> call_in_callback_cb_t; - /** Get a call in callback * * Get a call in callback from the network stack context. diff --git a/connectivity/netsocket/include/netsocket/OnboardNetworkStack.h b/connectivity/netsocket/include/netsocket/OnboardNetworkStack.h index 2c1608a..e42ab31 100644 --- a/connectivity/netsocket/include/netsocket/OnboardNetworkStack.h +++ b/connectivity/netsocket/include/netsocket/OnboardNetworkStack.h @@ -142,10 +142,18 @@ return NSAPI_ERROR_UNSUPPORTED; } - /** @copydoc NetworkStack::get_netmask */ + /** Writes the netmask of the network interface into a user-supplied #SocketAddress. + * + * @param address Structure to write netmask into. + * @return Error code or success. + */ virtual nsapi_error_t get_netmask(SocketAddress *address) = 0; - /** @copydoc NetworkStack::get_gateway */ + /** Writes the gateway address of the network interface into a user-supplied #SocketAddress. + * + * @param address Structure to write netmask into. + * @return Error code or success. + */ virtual nsapi_error_t get_gateway(SocketAddress *address) = 0; }; @@ -157,7 +165,8 @@ * * @param emac EMAC HAL implementation for this network interface * @param default_if true if the interface should be treated as the default one - * @param[out] interface_out pointer to stack interface object controlling the EMAC + * @param[out] interface_out Network stack's representation of the network interface will be saved to this pointer. + * @param[in] user_network_interface Pointer to NetworkInterface that represents the ethernet interface being added. * @return NSAPI_ERROR_OK on success, or error code */ virtual nsapi_error_t add_ethernet_interface(EMAC &emac, bool default_if, Interface **interface_out, NetworkInterface *user_network_interface = NULL) = 0; diff --git a/connectivity/netsocket/include/netsocket/PPP.h b/connectivity/netsocket/include/netsocket/PPP.h index b8a62ba..1b25d4a 100644 --- a/connectivity/netsocket/include/netsocket/PPP.h +++ b/connectivity/netsocket/include/netsocket/PPP.h @@ -79,8 +79,9 @@ * * That cannot be called from an interrupt context. * - * @param buf Packet to be sent - * @return True if the packet was sent, false otherwise + * @param buf Packet to be sent + * @param ip_stack IP version to use (4 or 6) to send the packet. + * @return True if the packet was sent, false otherwise */ virtual bool link_out(net_stack_mem_buf_t *buf, nsapi_ip_stack_t ip_stack) = 0; diff --git a/connectivity/netsocket/include/netsocket/Socket.h b/connectivity/netsocket/include/netsocket/Socket.h index 021bae5..aee303c 100644 --- a/connectivity/netsocket/include/netsocket/Socket.h +++ b/connectivity/netsocket/include/netsocket/Socket.h @@ -172,6 +172,8 @@ * @param address Remote address * @param data Buffer of data to send to the host * @param size Size of the buffer in bytes + * @param control Control data, for instance a populated #nsapi_pktinfo structure. + * @param control_size Size of \c control in bytes. * @return Number of sent bytes on success, negative subclass-dependent error * code on failure */ @@ -188,7 +190,10 @@ * If socket is connected, only packets coming from connected peer address * are accepted. * - * Additional information related to the message can be retrieved with the control data. + * Ancillary data is stored into \c control. The caller needs to allocate a buffer + * that is large enough to contain the data they want to receive, then pass the pointer in + * through the \c control member. The data will be filled into \c control, beginning with a header + * specifying what data was received. See #MsgHeaderIterator for how to parse this data. * * @note recvfrom_control() is allowed write to address and data buffers even if error occurs. * @@ -199,6 +204,8 @@ * @param address Destination for the source address or NULL * @param data Destination buffer for datagram received from the host * @param size Size of the buffer in bytes + * @param control Caller-allocated buffer to store ancillary data. + * @param control_size Size of the \c control buffer that the caller has allocated. * @return Number of received bytes on success, negative subclass-dependent * error code on failure */ diff --git a/connectivity/netsocket/include/netsocket/SocketStats.h b/connectivity/netsocket/include/netsocket/SocketStats.h index adbc0b1..90256b6 100644 --- a/connectivity/netsocket/include/netsocket/SocketStats.h +++ b/connectivity/netsocket/include/netsocket/SocketStats.h @@ -158,6 +158,7 @@ }; #if !MBED_CONF_NSAPI_SOCKET_STATS_ENABLED +#if !defined(DOXYGEN_ONLY) inline size_t SocketStats::mbed_stats_socket_get_each(mbed_stats_socket_t *, size_t) { return 0; @@ -186,6 +187,7 @@ inline void SocketStats::stats_update_recv_bytes(const Socket *, size_t) { } +#endif // !defined(DOXYGEN_ONLY) #endif // !MBED_CONF_NSAPI_SOCKET_STATS_ENABLED #endif diff --git a/connectivity/netsocket/include/netsocket/TCPSocket.h b/connectivity/netsocket/include/netsocket/TCPSocket.h index 846225d..943d78f 100644 --- a/connectivity/netsocket/include/netsocket/TCPSocket.h +++ b/connectivity/netsocket/include/netsocket/TCPSocket.h @@ -73,11 +73,11 @@ * * @param data Buffer of data to send to the host * @param size Size of the buffer in bytes - * @retval int Number of sent bytes on success + * @retval Number of sent bytes on success * @retval NSAPI_ERROR_NO_SOCKET in case socket was not created correctly * @retval NSAPI_ERROR_WOULD_BLOCK in case non-blocking mode is enabled * and send cannot be performed immediately - * @retval int Other negative error codes for stack-related failures. + * @retval Other negative error codes for stack-related failures. * See @ref NetworkStack::socket_send. */ nsapi_size_or_error_t send(const void *data, nsapi_size_t size) override; @@ -93,11 +93,11 @@ * * @param data Destination buffer for data received from the host * @param size Size of the buffer in bytes - * @retval int Number of received bytes on success + * @retval Number of received bytes on success * @retval NSAPI_ERROR_NO_SOCKET in case socket was not created correctly * @retval NSAPI_ERROR_WOULD_BLOCK in case non-blocking mode is enabled * and send cannot be performed immediately - * @retval int Other negative error codes for stack-related failures. + * @retval Other negative error codes for stack-related failures. * See @ref NetworkStack::socket_recv. */ nsapi_size_or_error_t recv(void *data, nsapi_size_t size) override; @@ -113,11 +113,11 @@ * @param address Remote address * @param data Buffer of data to send to the host * @param size Size of the buffer in bytes - * @retval int Number of sent bytes on success + * @retval Number of sent bytes on success * @retval NSAPI_ERROR_NO_SOCKET in case socket was not created correctly * @retval NSAPI_ERROR_WOULD_BLOCK in case non-blocking mode is enabled * and send cannot be performed immediately - * @retval int Other negative error codes for stack-related failures. + * @retval Other negative error codes for stack-related failures. * See @ref NetworkStack::socket_send. */ nsapi_size_or_error_t sendto(const SocketAddress &address, @@ -135,11 +135,11 @@ * @param address Destination for the source address or NULL * @param data Destination buffer for datagram received from the host * @param size Size of the buffer in bytes - * @retval int Number of received bytes on success + * @retval Number of received bytes on success * @retval NSAPI_ERROR_NO_SOCKET in case socket was not created correctly * @retval NSAPI_ERROR_WOULD_BLOCK in case non-blocking mode is enabled * and send cannot be performed immediately - * @retval int Other negative error codes for stack-related failures. + * @retval Other negative error codes for stack-related failures. * See @ref NetworkStack::socket_recv. */ nsapi_size_or_error_t recvfrom(SocketAddress *address, @@ -147,21 +147,7 @@ /** Send data on a packet with ancillary datasocket. * - * TCP socket is connection oriented protocol, so address is ignored. - * - * By default, sendto_control blocks until data is sent. If socket is set to - * non-blocking or times out, NSAPI_ERROR_WOULD_BLOCK is returned - * immediately. - * - * @param address Remote address - * @param data Buffer of data to send to the host - * @param size Size of the buffer in bytes - * @retval int Number of sent bytes on success - * @retval NSAPI_ERROR_NO_SOCKET in case socket was not created correctly - * @retval NSAPI_ERROR_WOULD_BLOCK in case non-blocking mode is enabled - * and send cannot be performed immediately - * @retval int Other negative error codes for stack-related failures. - * See @ref NetworkStack::socket_send. + * Control info is not supported for TCPSocket, use sendto() instead. */ nsapi_size_or_error_t sendto_control(const SocketAddress &address, const void *data, nsapi_size_t size, @@ -169,24 +155,7 @@ /** Receive a packet with ancillary data from a socket * - * Receives a data and stores the source address in address if address - * is not NULL. Returns the number of bytes written into the buffer. - * - * By default, recvfrom_control blocks until a data is received. If socket is set to - * non-blocking or times out with no datagram, NSAPI_ERROR_WOULD_BLOCK - * is returned. - * - * @param address Destination for the source address or NULL - * @param data Destination buffer for datagram received from the host - * @param size Size of the buffer in bytes - * @control Pointer to the control buffer - * @control_size Size of the control buffer in bytes - * @retval int Number of received bytes on success - * @retval NSAPI_ERROR_NO_SOCKET in case socket was not created correctly - * @retval NSAPI_ERROR_WOULD_BLOCK in case non-blocking mode is enabled - * and send cannot be performed immediately - * @retval int Other negative error codes for stack-related failures. - * See @ref NetworkStack::socket_recv. + * Control info is not supported for TCPSocket, use recvfrom() instead. */ nsapi_size_or_error_t recvfrom_control(SocketAddress *address, void *data, nsapi_size_t size, diff --git a/connectivity/netsocket/include/netsocket/TLSSocketWrapper.h b/connectivity/netsocket/include/netsocket/TLSSocketWrapper.h index cc1212a..d188aa8 100644 --- a/connectivity/netsocket/include/netsocket/TLSSocketWrapper.h +++ b/connectivity/netsocket/include/netsocket/TLSSocketWrapper.h @@ -82,8 +82,8 @@ /** Set hostname. * - * @note Implementation is inside following defines: - * #if defined(MBEDTLS_X509_CRT_PARSE_C) && !defined(MBEDTLS_X509_REMOVE_HOSTNAME_VERIFICATION) + * @note Implementation is a no-op unless MBEDTLS_X509_CRT_PARSE_C is defined and + * MBEDTLS_X509_REMOVE_HOSTNAME_VERIFICATION is not defined. * * TLSSocket requires hostname used to verify the certificate. * If hostname is not given in constructor, this function must be used before @@ -249,7 +249,6 @@ mbedtls_ssl_context *get_ssl_context(); protected: -#ifndef DOXYGEN_ONLY /** Initiates TLS Handshake. * * Initiates a TLS handshake to a remote peer. @@ -271,6 +270,7 @@ */ nsapi_error_t start_handshake(bool first_call); +#ifndef DOXYGEN_ONLY bool is_handshake_started() const; void event(); diff --git a/connectivity/netsocket/include/netsocket/nsapi_dns.h b/connectivity/netsocket/include/netsocket/nsapi_dns.h index 7f32598..14d4146 100644 --- a/connectivity/netsocket/include/netsocket/nsapi_dns.h +++ b/connectivity/netsocket/include/netsocket/nsapi_dns.h @@ -58,6 +58,7 @@ /** Add a domain name server to list of servers to query * * @param addr Destination for the host address + * @param interface_name Currently unused, the server is added for all interfaces. * @return 0 on success, negative error code on failure */ nsapi_error_t nsapi_dns_add_server(nsapi_addr_t addr, const char *interface_name); @@ -65,8 +66,6 @@ #else -typedef mbed::Callback user_cb)> call_in_callback_cb_t; - /** Query a domain name server for an IP address of a given hostname * * @param stack Network stack as target for DNS query @@ -84,7 +83,7 @@ * @param stack Network stack as target for DNS query * @param host Hostname to resolve * @param addr Destination for the host address - * @param interface_name Network interface name + * @param interface_name If not NULL, only this interface is used to make the DNS query. * @param version IP version to resolve (defaults to NSAPI_IPv4) * @return See @ref nsapi_dns_query_multiple */ @@ -98,12 +97,14 @@ * @param host Hostname to resolve * @param callback Callback that is called for result * @param version IP version to resolve (defaults to NSAPI_IPv4) + * @param call_in_cb Call-in callback from the network stack (see #NetworkStack::call_in_callback_cb_t) * @return 0 on success, negative error code on failure or an unique id that * represents the hostname translation operation and can be passed to * cancel, NSAPI_ERROR_DNS_FAILURE indicates the host could not be found */ nsapi_error_t nsapi_dns_query_async(NetworkStack *stack, const char *host, - NetworkStack::hostbyname_cb_t callback, call_in_callback_cb_t call_in_cb, + NetworkStack::hostbyname_cb_t callback, + NetworkStack::call_in_callback_cb_t call_in_cb, nsapi_version_t version = NSAPI_IPv4); /** Query a domain name server for an IP address of a given hostname using Network interface name @@ -111,14 +112,16 @@ * @param stack Network stack as target for DNS query * @param host Hostname to resolve * @param callback Callback that is called for result - * @param interface_name Network interface name + * @param call_in_cb Call-in callback from the network stack (see #NetworkStack::call_in_callback_cb_t) + * @param interface_name If not NULL, only this interface is used to make the DNS query. * @param version IP version to resolve (defaults to NSAPI_IPv4) * @return 0 on success, negative error code on failure or an unique id that * represents the hostname translation operation and can be passed to * cancel, NSAPI_ERROR_DNS_FAILURE indicates the host could not be found */ nsapi_error_t nsapi_dns_query_async(NetworkStack *stack, const char *host, - NetworkStack::hostbyname_cb_t callback, call_in_callback_cb_t call_in_cb, + NetworkStack::hostbyname_cb_t callback, + NetworkStack::call_in_callback_cb_t call_in_cb, const char *interface_name, nsapi_version_t version = NSAPI_IPv4); /** Query a domain name server for an IP address of a given hostname (asynchronous) @@ -155,6 +158,7 @@ * @param host Hostname to resolve * @param addr Array for the host addresses * @param addr_count Number of addresses allocated in the array + * @param interface_name If not NULL, only this interface is used to make the DNS query. * @param version IP version to resolve (defaults to NSAPI_IPv4) * @return Positive number of addresses found on success * @retval NSAPI_ERROR_PARAMETER if provided parameters are invalid @@ -172,14 +176,17 @@ * @param host Hostname to resolve * @param callback Callback that is called for result * @param addr_count Number of addresses allocated in the array + * @param call_in_cb Call-in callback from the network stack (see #NetworkStack::call_in_callback_cb_t) * @param version IP version to resolve (defaults to NSAPI_IPv4) + * @param interface_name If not NULL, only this interface is used to make the DNS query. * @return 0 on success, negative error code on failure or an unique id that represents the hostname translation operation and can be passed to * cancel, NSAPI_ERROR_DNS_FAILURE indicates the host could not be found */ nsapi_size_or_error_t nsapi_dns_query_multiple_async(NetworkStack *stack, const char *host, NetworkStack::hostbyname_cb_t callback, nsapi_size_t addr_count, - call_in_callback_cb_t call_in_cb, const char *interface_name, nsapi_version_t version = NSAPI_IPv4); + NetworkStack::call_in_callback_cb_t call_in_cb, + const char *interface_name, nsapi_version_t version = NSAPI_IPv4); /** Query a domain name server for multiple IP address of a given hostname * @@ -187,6 +194,7 @@ * @param host Hostname to resolve * @param addr Array for the host addresses * @param addr_count Number of addresses allocated in the array + * @param interface_name If not NULL, only this interface is used to make the DNS query. * @param version IP version to resolve (defaults to NSAPI_IPv4) * @return Number of addresses found on success, negative error code on failure * NSAPI_ERROR_DNS_FAILURE indicates the host could not be found @@ -230,7 +238,7 @@ * * @param callback Callback */ -void nsapi_dns_call_in_set(call_in_callback_cb_t callback); +void nsapi_dns_call_in_set(NetworkStack::call_in_callback_cb_t callback); /** * @brief nsapi_dns_reset Resets all internal states and frees reserved memory, see NOTE! @@ -243,6 +251,7 @@ /** Add a domain name server to list of servers to query * * @param addr Destination for the host address + * @param interface_name Currently unused, the server is added for all interfaces. * @return 0 on success, negative error code on failure */ extern "C" nsapi_error_t nsapi_dns_add_server(nsapi_addr_t addr, const char *interface_name); @@ -250,6 +259,7 @@ /** Add a domain name server to list of servers to query * * @param addr Destination for the host address + * @param interface_name Currently unused, the server is added for all interfaces. * @return 0 on success, negative error code on failure */ static inline nsapi_error_t nsapi_dns_add_server(const SocketAddress &address, const char *interface_name) @@ -260,6 +270,7 @@ /** Add a domain name server to list of servers to query * * @param addr Destination for the host address + * @param interface_name Currently unused, the server is added for all interfaces. * @return 0 on success, negative error code on failure */ static inline nsapi_error_t nsapi_dns_add_server(const char *address, const char *interface_name) diff --git a/connectivity/netsocket/include/netsocket/nsapi_types.h b/connectivity/netsocket/include/netsocket/nsapi_types.h index 4ba62ed..1703feb 100644 --- a/connectivity/netsocket/include/netsocket/nsapi_types.h +++ b/connectivity/netsocket/include/netsocket/nsapi_types.h @@ -409,7 +409,9 @@ uint16_t stagger_rand; /* [OUT] Randomized stagger value in seconds */ } nsapi_stagger_req_t; -/** nsapi_msghdr +/** + * Header structure for control info. + * See #MsgHeaderIterator. */ typedef struct nsapi_msghdr { /* In C alignment can't be specified in the type declaration. diff --git a/connectivity/netsocket/source/NetworkStack.cpp b/connectivity/netsocket/source/NetworkStack.cpp index 7ece7b6..21a9798 100644 --- a/connectivity/netsocket/source/NetworkStack.cpp +++ b/connectivity/netsocket/source/NetworkStack.cpp @@ -216,7 +216,7 @@ "NetworkStack::call_in() unable to add event to queue. Increase \"events.shared-eventsize\"\n"); } -call_in_callback_cb_t NetworkStack::get_call_in_callback() +NetworkStack::call_in_callback_cb_t NetworkStack::get_call_in_callback() { call_in_callback_cb_t cb(this, &NetworkStack::call_in); return cb; diff --git a/connectivity/netsocket/source/nsapi_dns.cpp b/connectivity/netsocket/source/nsapi_dns.cpp index 8372be1..0218dfc 100644 --- a/connectivity/netsocket/source/nsapi_dns.cpp +++ b/connectivity/netsocket/source/nsapi_dns.cpp @@ -61,7 +61,7 @@ }; struct SOCKET_CB_DATA { - call_in_callback_cb_t call_in_cb; + NetworkStack::call_in_callback_cb_t call_in_cb; NetworkStack *stack; }; @@ -78,7 +78,7 @@ char *host; const char *interface_name; NetworkStack::hostbyname_cb_t callback; - call_in_callback_cb_t call_in_cb; + NetworkStack::call_in_callback_cb_t call_in_cb; nsapi_size_t addr_count; nsapi_version_t version; UDPSocket *socket; @@ -135,7 +135,7 @@ static DNS_QUERY *dns_query_queue[DNS_QUERY_QUEUE_SIZE]; // Protects from several threads running asynchronous DNS static SingletonPtr dns_mutex; -static SingletonPtr dns_call_in; +static SingletonPtr dns_call_in; static bool dns_timer_running = false; // DNS server configuration @@ -654,20 +654,22 @@ } nsapi_value_or_error_t nsapi_dns_query_async(NetworkStack *stack, const char *host, - NetworkStack::hostbyname_cb_t callback, call_in_callback_cb_t call_in_cb, + NetworkStack::hostbyname_cb_t callback, + NetworkStack::call_in_callback_cb_t call_in_cb, nsapi_version_t version) { return nsapi_dns_query_multiple_async(stack, host, callback, 0, call_in_cb, NULL, version); } nsapi_value_or_error_t nsapi_dns_query_async(NetworkStack *stack, const char *host, - NetworkStack::hostbyname_cb_t callback, call_in_callback_cb_t call_in_cb, + NetworkStack::hostbyname_cb_t callback, + NetworkStack::call_in_callback_cb_t call_in_cb, const char *interface_name, nsapi_version_t version) { return nsapi_dns_query_multiple_async(stack, host, callback, 0, call_in_cb, interface_name, version); } -void nsapi_dns_call_in_set(call_in_callback_cb_t callback) +void nsapi_dns_call_in_set(NetworkStack::call_in_callback_cb_t callback) { *dns_call_in.get() = callback; } @@ -679,7 +681,7 @@ dns_unique_id = 1; } -nsapi_error_t nsapi_dns_call_in(call_in_callback_cb_t cb, int delay, mbed::Callback func) +nsapi_error_t nsapi_dns_call_in(NetworkStack::call_in_callback_cb_t cb, int delay, mbed::Callback func) { if (*dns_call_in.get()) { dns_call_in->call(delay, func); @@ -691,7 +693,8 @@ nsapi_value_or_error_t nsapi_dns_query_multiple_async(NetworkStack *stack, const char *host, NetworkStack::hostbyname_cb_t callback, nsapi_size_t addr_count, - call_in_callback_cb_t call_in_cb, const char *interface_name, nsapi_version_t version) + NetworkStack::call_in_callback_cb_t call_in_cb, + const char *interface_name, nsapi_version_t version) { dns_mutex->lock(); diff --git a/connectivity/netsocket/tests/UNITTESTS/doubles/NetworkStack_stub.cpp b/connectivity/netsocket/tests/UNITTESTS/doubles/NetworkStack_stub.cpp index 877bfc7..4cef0e1 100644 --- a/connectivity/netsocket/tests/UNITTESTS/doubles/NetworkStack_stub.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/doubles/NetworkStack_stub.cpp @@ -83,7 +83,7 @@ return NSAPI_ERROR_UNSUPPORTED; } -call_in_callback_cb_t NetworkStack::get_call_in_callback() +NetworkStack::call_in_callback_cb_t NetworkStack::get_call_in_callback() { return NULL; } diff --git a/connectivity/netsocket/tests/UNITTESTS/doubles/nsapi_dns_stub.cpp b/connectivity/netsocket/tests/UNITTESTS/doubles/nsapi_dns_stub.cpp index 9b7af9a..e26a8a3 100644 --- a/connectivity/netsocket/tests/UNITTESTS/doubles/nsapi_dns_stub.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/doubles/nsapi_dns_stub.cpp @@ -20,7 +20,7 @@ nsapi_error_t nsapi_stub_return_value = NSAPI_ERROR_DNS_FAILURE; NetworkStack::hostbyname_cb_t query_callback; -call_in_callback_cb_t callin_callback; +NetworkStack::call_in_callback_cb_t callin_callback; nsapi_error_t nsapi_dns_query(NetworkStack *stack, const char *host, SocketAddress *addr, const char *interface_name, nsapi_version_t version) @@ -35,7 +35,8 @@ } nsapi_error_t nsapi_dns_query_async(NetworkStack *stack, const char *host, - NetworkStack::hostbyname_cb_t callback, call_in_callback_cb_t call_in_cb, const char *interface_name, + NetworkStack::hostbyname_cb_t callback, + NetworkStack::call_in_callback_cb_t call_in_cb, const char *interface_name, nsapi_version_t version) { query_callback = callback; @@ -45,7 +46,8 @@ nsapi_value_or_error_t nsapi_dns_query_multiple_async(NetworkStack *stack, const char *host, NetworkStack::hostbyname_cb_t callback, nsapi_size_t addr_count, - call_in_callback_cb_t call_in_cb, const char *interface_name, nsapi_version_t version) + NetworkStack::call_in_callback_cb_t call_in_cb, + const char *interface_name, nsapi_version_t version) { query_callback = callback; callin_callback = call_in_cb; diff --git a/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkStack/test_NetworkStack.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkStack/test_NetworkStack.cpp index 4995ede..3b28998 100644 --- a/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkStack/test_NetworkStack.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkStack/test_NetworkStack.cpp @@ -45,7 +45,7 @@ noarg_callback_is_called = true; } -extern call_in_callback_cb_t callin_callback; +extern NetworkStack::call_in_callback_cb_t callin_callback; namespace mbed { extern events::EventQueue *mbed_shared_queue_stub; diff --git a/connectivity/nfc/libraries/acore/acore/ac_buffer.h b/connectivity/nfc/libraries/acore/acore/ac_buffer.h index 3eada4a..78c3da1 100644 --- a/connectivity/nfc/libraries/acore/acore/ac_buffer.h +++ b/connectivity/nfc/libraries/acore/acore/ac_buffer.h @@ -20,7 +20,7 @@ * \author Donatien Garnier */ -/** \defgroup ACore +/** \defgroup ACore ACore * \ingroup nfc * @{ * \name Buffer diff --git a/connectivity/nfc/libraries/stack/ndef/ndef.c b/connectivity/nfc/libraries/stack/ndef/ndef.c index 50fb192..e298d36 100644 --- a/connectivity/nfc/libraries/stack/ndef/ndef.c +++ b/connectivity/nfc/libraries/stack/ndef/ndef.c @@ -30,14 +30,6 @@ * @{ */ -/** Initialize NDEF tag abstraction - * \param pNdefTag pointer to ndef_tag_t structure to initialize - * \param encode function that will be called to generate the NDEF message before sending it to the other party - * \param decode function that will be called to parse the NDEF message after receiving it from the other party - * \param buffer underlying buffer to use (it should be big enough so that any NDEF message you might need could be stored inside) - * \param buffer_size size of the underlying buffer - * \param pImpl pointer to actual implementation - */ void ndef_msg_init(ndef_msg_t *pNdef, ndef_encode_fn_t encode, ndef_decode_fn_t decode, uint8_t *data, size_t size, void *pUserData) { pNdef->encode = encode; diff --git a/connectivity/nfc/libraries/stack/ndef/ndef.h b/connectivity/nfc/libraries/stack/ndef/ndef.h index 7e4ba75..95855bd 100644 --- a/connectivity/nfc/libraries/stack/ndef/ndef.h +++ b/connectivity/nfc/libraries/stack/ndef/ndef.h @@ -41,13 +41,15 @@ /** Function called to generate the tag's content on read (target mode) * \param pTag pointer to ndef_tag_t instance - * \param type pMem buffer in which to store the generated content + * \param pBufferBldr buffer in which to store the generated content + * \param pUserData User data pointer passed to #ndef_msg_init */ typedef nfc_err_t (*ndef_encode_fn_t)(ndef_msg_t *pTag, ac_buffer_builder_t *pBufferBldr, void *pUserData); /** Function called to decode the tag's content on write (target mode) or read (reader mode) * \param pTag pointer to ndef_tag_t instance - * \param type pMem buffer containing the tag's content + * \param pBuffer buffer containing the tag's content + * \param pUserData User data pointer passed to #ndef_msg_init */ typedef nfc_err_t (*ndef_decode_fn_t)(ndef_msg_t *pTag, ac_buffer_t *pBuffer, void *pUserData); @@ -58,6 +60,14 @@ void *pUserData; }; +/** Initialize NDEF tag abstraction + * \param pNdef pointer to ndef_tag_t structure to initialize + * \param encode function that will be called to generate the NDEF message before sending it to the other party + * \param decode function that will be called to parse the NDEF message after receiving it from the other party + * \param data underlying buffer to use (it should be big enough so that any NDEF message you might need could be stored inside) + * \param size size of the underlying buffer + * \param pUserData User data pointer to pass to callbacks. + */ void ndef_msg_init(ndef_msg_t *pNdef, ndef_encode_fn_t encode, ndef_decode_fn_t decode, uint8_t *data, size_t size, void *pUserData); static inline nfc_err_t ndef_msg_encode(ndef_msg_t *pNdef) diff --git a/connectivity/nfc/libraries/stack/nfc_common.h b/connectivity/nfc/libraries/stack/nfc_common.h index e481188..bfe1eef 100644 --- a/connectivity/nfc/libraries/stack/nfc_common.h +++ b/connectivity/nfc/libraries/stack/nfc_common.h @@ -40,8 +40,3 @@ #include "acore/ac_stream.h" #endif /* NFC_COMMON_H_ */ - -/** - * @} - * @} - * */ diff --git a/connectivity/nfc/libraries/stack/platform/nfc_transport.h b/connectivity/nfc/libraries/stack/platform/nfc_transport.h index df3a4d2..df504e2 100644 --- a/connectivity/nfc/libraries/stack/platform/nfc_transport.h +++ b/connectivity/nfc/libraries/stack/platform/nfc_transport.h @@ -47,8 +47,8 @@ /** Function called to read a register's value * \param address address to read packet from - * \param outBuf buffer to read - * \param outLen buffer's length + * \param inBuf buffer to read + * \param inLen buffer's length * \param pUser parameter passed to the nfc_transport_init function */ typedef void (*nfc_transport_read_fn_t)(uint8_t address, uint8_t *inBuf, size_t inLen, void *pUser); diff --git a/doxyfile_options b/doxyfile_options index 4619a64..cfa554b 100644 --- a/doxyfile_options +++ b/doxyfile_options @@ -1,4 +1,4 @@ -# Doxyfile 1.8.13 +# Doxyfile 1.9.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -17,11 +17,11 @@ # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 @@ -38,13 +38,13 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = +PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 @@ -58,7 +58,7 @@ # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = +OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -76,7 +76,7 @@ # U+3044. # The default value is: NO. -#ALLOW_UNICODE_NAMES = NO +ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this @@ -93,6 +93,14 @@ OUTPUT_LANGUAGE = English +# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all generated output in the proper direction. +# 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 # documentation (similar to Javadoc). Set to NO to disable this. @@ -118,7 +126,7 @@ # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief @@ -142,17 +150,6 @@ FULL_PATH_NAMES = NO -# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the FULL_SIDEBAR -# option determines if the side bar is limited to only the treeview area (value NO) or -# if it should extend to the full height of the window (value YES). Setting this to YES -# gives a layout similar to https://docs.readthedocs.io with more room for contents, but -# less room for the project logo, title, and description. -# If either GENERATE_TREEVIEW or DISABLE_INDEX is set to NO, this option has no effect. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FULL_SIDEBAR = NO - # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. @@ -163,7 +160,7 @@ # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -172,7 +169,7 @@ # specify the list of include paths that are normally passed to the compiler # using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't @@ -190,6 +187,16 @@ JAVADOC_AUTOBRIEF = YES +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus @@ -210,6 +217,14 @@ MULTILINE_CPP_IS_BRIEF = NO +# By default Python docstrings are displayed as preformatted text and doxygen's +# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the +# doxygen's special commands can be used and the contents of the docstring +# documentation blocks is shown as doxygen documentation. +# The default value is: YES. + +PYTHON_DOCSTRING = YES + # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. @@ -237,15 +252,14 @@ # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. +# When you need a literal { or } or , in the value part of an alias you have to +# escape them by means of a backslash (\), this can lead to conflicts with the +# commands \{ and \} for these it is advised to use the version @{ and @} or use +# a double escape (\\{ and \\}) -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = +ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For @@ -275,28 +289,40 @@ OPTIMIZE_OUTPUT_VHDL = NO +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, +# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files). For instance to make doxygen treat .inc files +# as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. +# the files are not read by doxygen. When specifying no_extension you should add +# * to the FILE_PATTERNS. +# +# Note see also the list of default file extension mappings. -EXTENSION_MAPPING = +EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. +# documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. @@ -308,10 +334,10 @@ # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 0. +# Minimum value: 0, maximum value: 99, default value: 5. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. -#TOC_INCLUDE_HEADINGS = 0 +TOC_INCLUDE_HEADINGS = 5 # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can @@ -338,7 +364,7 @@ CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. @@ -368,7 +394,7 @@ # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. -#GROUP_NESTED_COMPOUNDS = NO +GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that @@ -424,6 +450,19 @@ LOOKUP_CACHE_SIZE = 0 +# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use +# during processing. When set to 0 doxygen will based this on the number of +# cores available in the system. You can set it explicitly to a value larger +# than 0 to get more control over the balance between CPU load and processing +# speed. At this moment only the input processing can be done using multiple +# threads. Since this is still an experimental feature the default is set to 1, +# which efficively disables parallel processing. Please report any issues you +# encounter. Generating dot graphs in parallel is controlled by the +# DOT_NUM_THREADS setting. +# Minimum value: 0, maximum value: 32, default value: 1. + +NUM_PROC_THREADS = 1 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- @@ -444,6 +483,12 @@ EXTRACT_PRIVATE = NO +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. @@ -481,6 +526,13 @@ EXTRACT_ANON_NSPACES = YES +# If this flag is set to YES, the name of an unnamed parameter in a declaration +# will be determined by the corresponding definition. By default unnamed +# parameters remain unnamed in the output. +# The default value is: YES. + +RESOLVE_UNNAMED_PARAMS = YES + # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation @@ -498,8 +550,8 @@ HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. +# declarations. If set to NO, these declarations will be included in the +# documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = YES @@ -518,11 +570,18 @@ INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. +# With the correct setting of option CASE_SENSE_NAMES doxygen will better be +# able to match the capabilities of the underlying filesystem. In case the +# filesystem is case sensitive (i.e. it supports files in the same directory +# whose names only differ in casing), the option must be set to YES to properly +# deal with such files in case they appear in the input. For filesystems that +# are not case sensitive the option should be be set to NO to properly deal with +# output files written for symbols that only differ in casing, such as for two +# classes, one named CLASS and the other named Class, and to also support +# references to files without having to specify the exact matching casing. On +# Windows (including Cygwin) and MacOS, users should typically set this option +# to NO, whereas on Linux or other Unix flavors it should typically be set to +# YES. # The default value is: system dependent. CASE_SENSE_NAMES = NO @@ -539,7 +598,7 @@ # YES the compound reference will be hidden. # The default value is: NO. -#HIDE_COMPOUND_REFERENCE= NO +HIDE_COMPOUND_REFERENCE= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. @@ -649,7 +708,7 @@ # sections, marked by \if ... \endif and \cond # ... \endcond blocks. -ENABLED_SECTIONS = +ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the @@ -691,7 +750,7 @@ # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated @@ -704,17 +763,17 @@ # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = +LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. -CITE_BIB_FILES = +CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages @@ -741,7 +800,7 @@ # will automatically be disabled. # The default value is: YES. -WARN_IF_UNDOCUMENTED = YES +WARN_IF_UNDOCUMENTED = NO # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters @@ -754,16 +813,20 @@ # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. +# parameter documentation, but not about the absence of documentation. If +# EXTRACT_ALL is set to YES then this flag will automatically be disabled. # The default value is: NO. WARN_NO_PARAMDOC = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. +# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS +# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but +# at the end of the doxygen process doxygen will return with a non-zero status. +# Possible values are: NO, YES and FAIL_ON_WARNINGS. # The default value is: NO. -#WARN_AS_ERROR = NO +WARN_AS_ERROR = FAIL_ON_WARNINGS # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which @@ -779,7 +842,7 @@ # messages should be written. If left blank the output is written to standard # error (stderr). -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files @@ -796,8 +859,8 @@ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. +# documentation (see: +# https://www.gnu.org/software/libiconv/) for the list of possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 @@ -810,13 +873,18 @@ # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # +# Note the list of default checked file patterns might differ from the list of +# default file extension mappings. +# # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, -# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. +# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), +# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, +# *.ucf, *.qsf and *.ice. -FILE_PATTERNS = *.h DOXYGEN_FRONTPAGE.md +FILE_PATTERNS = *.h \ + DOXYGEN_FRONTPAGE.md # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. @@ -831,7 +899,7 @@ # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = +EXCLUDE = # 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 @@ -850,12 +918,12 @@ EXCLUDE_PATTERNS = */tools/* \ */targets/* \ */BUILD/* \ + */cmake-build-*/* \ */rtos/TARGET_CORTEX/rtx* \ */cmsis/* \ */connectivity/drivers/emac/* \ */features/cryptocell/* \ */features/frameworks/* \ - */connectivity/mbedtls/* \ */features/unsupported/* \ */connectivity/lwipstack/* \ */connectivity/lorawan/lorastack/* \ @@ -867,15 +935,20 @@ */mbed-client-randlib/* \ */nanostack/sal-stack-nanostack-eventloop/* \ */connectivity/drivers/802.15.4_RF/* \ + */connectivity/drivers/mbedtls/FEATURE_CRYPTOCELL310/include/cryptocell310/internal/* \ + */connectivity/drivers/ble/FEATURE_BLE/TARGET_STM32WB/STM32Cube_FW/* \ */connectivity/drivers/wifi/COMPONENT_WHD/* \ */connectivity/drivers/wifi/TARGET_STM/COMPONENT_EMW3080B/mx_wifi/* \ */components/wifi/* \ */UNITTESTS/* \ + */TESTS/* \ */connectivity/cellular/framework/device/* \ */connectivity/cellular/framework/common/* \ - */FEATURE_BLE/source/* \ + */FEATURE_BLE/source/* \ */FEATURE_BLE/libraries/cordio_stack/* \ - */FEATURE_BLE/libraries/TARGET_*/stack/* + */FEATURE_BLE/libraries/TARGET_*/stack/* \ + */platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/* \ + */platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/test_abstraction_layers/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -886,20 +959,20 @@ # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = +EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands @@ -912,7 +985,7 @@ # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = +IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -933,7 +1006,7 @@ # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. -INPUT_FILTER = +INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the @@ -946,7 +1019,7 @@ # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. -FILTER_PATTERNS = +FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for @@ -961,7 +1034,7 @@ # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. -FILTER_SOURCE_PATTERNS = +FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page @@ -997,7 +1070,7 @@ STRIP_CODE_COMMENTS = NO # If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. +# entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO @@ -1029,12 +1102,12 @@ # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version +# (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # @@ -1056,25 +1129,6 @@ VERBATIM_HEADERS = YES -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse-libclang=ON option for CMake. -# The default value is: NO. - -#CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -#CLANG_OPTIONS = - #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- @@ -1086,20 +1140,13 @@ ALPHABETICAL_INDEX = NO -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output @@ -1143,7 +1190,7 @@ # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1153,7 +1200,7 @@ # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1165,7 +1212,7 @@ # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_STYLESHEET = +HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets @@ -1189,12 +1236,12 @@ # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = +HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. @@ -1230,6 +1277,17 @@ 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 +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. @@ -1253,13 +1311,14 @@ # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in +# environment (see: +# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To +# create a documentation set, doxygen will generate a Makefile in the HTML +# output directory. Running make will produce the docset in that directory and +# running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1298,8 +1357,8 @@ # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. +# (see: +# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML @@ -1318,7 +1377,7 @@ # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_FILE = +CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, @@ -1326,10 +1385,10 @@ # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -HHC_LOCATION = +HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). +# (YES) or that it should be included in the main .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1339,7 +1398,7 @@ # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it @@ -1370,11 +1429,12 @@ # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. -QCH_FILE = +QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1382,8 +1442,8 @@ # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). +# Folders (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1391,33 +1451,33 @@ # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_ATTRS = +QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_SECT_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. +# The QHG_LOCATION tag can be used to specify the location (absolute path +# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to +# run qhelpgenerator on the generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. -QHG_LOCATION = +QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To @@ -1491,6 +1551,17 @@ EXT_LINKS_IN_WINDOW = NO +# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg +# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see +# https://inkscape.org) to generate formulas as SVG images instead of PNGs for +# the HTML output. These images will generally look nicer at scaled resolutions. +# Possible values are: png (the default) and svg (looks nicer but requires the +# pdf2svg or inkscape tool). +# The default value is: png. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FORMULA_FORMAT = png + # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML @@ -1500,7 +1571,7 @@ FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # @@ -1511,8 +1582,14 @@ 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 +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering +# https://www.mathjax.org) which uses client side JavaScript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path @@ -1524,7 +1601,7 @@ # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. @@ -1539,8 +1616,8 @@ # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. +# MathJax from https://www.mathjax.org before deployment. +# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest @@ -1550,15 +1627,16 @@ # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_EXTENSIONS = +MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_CODEFILE = +MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and @@ -1582,7 +1660,7 @@ SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a web server instead of a web client using Javascript. There +# implemented using a web server instead of a web client using JavaScript. There # are two flavors of web server based searching depending on the EXTERNAL_SEARCH # setting. When disabled, doxygen will generate a PHP script for searching and # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing @@ -1601,7 +1679,8 @@ # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). +# Xapian (see: +# https://xapian.org/). # # See the section "External Indexing and Searching" for details. # The default value is: NO. @@ -1614,11 +1693,12 @@ # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). See the section "External Indexing and -# Searching" for details. +# Xapian (see: +# https://xapian.org/). See the section "External Indexing and Searching" for +# details. # This tag requires that the tag SEARCHENGINE is set to YES. -SEARCHENGINE_URL = +SEARCHENGINE_URL = # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the @@ -1634,7 +1714,7 @@ # projects and redirect the results back to the right project. # This tag requires that the tag SEARCHENGINE is set to YES. -EXTERNAL_SEARCH_ID = +EXTERNAL_SEARCH_ID = # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # projects other than the one defined by this configuration file, but that are @@ -1644,7 +1724,7 @@ # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... # This tag requires that the tag SEARCHENGINE is set to YES. -EXTRA_SEARCH_MAPPINGS = +EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # Configuration options related to the LaTeX output @@ -1666,21 +1746,35 @@ # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. # -# Note that when enabling USE_PDFLATEX this option is only used for generating -# bitmaps for formulas in the HTML output, but not in the Makefile that is -# written to the output directory. -# The default file is: latex. +# Note that when not enabling USE_PDFLATEX the default is latex when enabling +# USE_PDFLATEX the default is pdflatex and when in the later case latex is +# chosen this is overwritten by pdflatex. For specific output languages the +# default can have been set differently, this depends on the implementation of +# the output language. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate # index for LaTeX. +# Note: This tag is used in the Makefile / make.bat. +# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file +# (.tex). # The default file is: makeindex. # This tag requires that the tag GENERATE_LATEX is set to YES. MAKEINDEX_CMD_NAME = makeindex +# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to +# generate index for LaTeX. In case there is no backslash (\) as first character +# it will be automatically added in the LaTeX code. +# Note: This tag is used in the generated output file (.tex). +# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat. +# The default value is: makeindex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_MAKEINDEX_CMD = makeindex + # If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. @@ -1696,7 +1790,7 @@ # The default value is: a4. # This tag requires that the tag GENERATE_LATEX is set to YES. -PAPER_TYPE = a4wide +PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names # that should be included in the LaTeX output. The package can be specified just @@ -1708,7 +1802,7 @@ # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. -EXTRA_PACKAGES = +EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the # generated LaTeX document. The header should contain everything until the first @@ -1724,7 +1818,7 @@ # to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_HEADER = +LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # generated LaTeX document. The footer should contain everything after the last @@ -1735,7 +1829,7 @@ # Note: Only use a user-defined footer if you know what you are doing! # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_FOOTER = +LATEX_FOOTER = # The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined # LaTeX style sheets that are included after the standard style sheets created @@ -1746,7 +1840,7 @@ # list). # This tag requires that the tag GENERATE_LATEX is set to YES. -#LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_STYLESHEET = # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output @@ -1754,7 +1848,7 @@ # markers available. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_EXTRA_FILES = +LATEX_EXTRA_FILES = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will @@ -1765,9 +1859,11 @@ PDF_HYPERLINKS = YES -# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES, to get a -# higher quality PDF documentation. +# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as +# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX +# files. Set this option to YES, to get a higher quality PDF documentation. +# +# See also section LATEX_CMD_NAME for selecting the engine. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1801,7 +1897,7 @@ # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See -# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# https://en.wikipedia.org/wiki/BibTeX and \cite for more info. # The default value is: plain. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1813,7 +1909,15 @@ # The default value is: NO. # This tag requires that the tag GENERATE_LATEX is set to YES. -#LATEX_TIMESTAMP = NO +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, +# it will be relative to the LATEX_OUTPUT directory. If left blank the +# LATEX_OUTPUT directory will be used. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EMOJI_DIRECTORY = #--------------------------------------------------------------------------- # Configuration options related to the RTF output @@ -1854,22 +1958,22 @@ RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's config -# file, i.e. a series of assignments. You only have to provide replacements, -# missing definitions are set to their default value. +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# configuration file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. # # See also section "Doxygen usage" for information on how to generate the # default style sheet that doxygen normally uses. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is -# similar to doxygen's config file. A template extensions file can be generated -# using doxygen -e rtf extensionFile. +# similar to doxygen's configuration file. A template extensions file can be +# generated using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = # If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code # with syntax highlighting in the RTF output. @@ -1879,7 +1983,7 @@ # The default value is: NO. # This tag requires that the tag GENERATE_RTF is set to YES. -#RTF_SOURCE_CODE = NO +RTF_SOURCE_CODE = NO #--------------------------------------------------------------------------- # Configuration options related to the man page output @@ -1914,7 +2018,7 @@ # MAN_EXTENSION with the initial . removed. # This tag requires that the tag GENERATE_MAN is set to YES. -#MAN_SUBDIR = +MAN_SUBDIR = # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it # will generate one additional man file for each entity documented in the real @@ -1952,6 +2056,13 @@ XML_PROGRAMLISTING = YES +# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include +# namespace members in file scope as well, matching the HTML output. +# The default value is: NO. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_NS_MEMB_FILE_SCOPE = NO + #--------------------------------------------------------------------------- # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- @@ -1977,16 +2088,16 @@ # The default value is: NO. # This tag requires that the tag GENERATE_DOCBOOK is set to YES. -#DOCBOOK_PROGRAMLISTING = NO +DOCBOOK_PROGRAMLISTING = NO #--------------------------------------------------------------------------- # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an -# AutoGen Definitions (see http://autogen.sf.net) file that captures the -# structure of the code including all documentation. Note that this feature is -# still experimental and incomplete at the moment. +# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures +# the structure of the code including all documentation. Note that this feature +# is still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -2027,7 +2138,7 @@ # overwrite each other's variables. # This tag requires that the tag GENERATE_PERLMOD is set to YES. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor @@ -2068,7 +2179,7 @@ # preprocessor. # This tag requires that the tag SEARCH_INCLUDES is set to YES. -INCLUDE_PATH = +INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the @@ -2076,7 +2187,7 @@ # used. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that are # defined before the preprocessor is started (similar to the -D option of e.g. @@ -2086,57 +2197,63 @@ # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = DOXYGEN_ONLY \ - DEVICE_ANALOGIN \ - DEVICE_ANALOGOUT \ - DEVICE_CAN \ - DEVICE_CRC \ - DEVICE_ETHERNET \ - DEVICE_EMAC \ - DEVICE_FLASH \ - DEVICE_I2C \ - DEVICE_I2CSLAVE \ - DEVICE_I2C_ASYNCH \ - DEVICE_INTERRUPTIN \ - DEVICE_ITM \ - DEVICE_LPTICKER \ - DEVICE_MPU \ - DEVICE_PORTIN \ - DEVICE_PORTINOUT \ - DEVICE_PORTOUT \ - DEVICE_PWMOUT \ - DEVICE_RESET_REASON \ - DEVICE_RTC \ - DEVICE_TRNG \ - DEVICE_SERIAL \ - DEVICE_SERIAL_ASYNCH \ - DEVICE_SERIAL_FC \ - DEVICE_SLEEP \ - DEVICE_SPI \ - DEVICE_SPI_ASYNCH \ - DEVICE_SPISLAVE \ - DEVICE_QSPI \ - DEVICE_STORAGE \ - DEVICE_WATCHDOG \ - DEVICE_LOCALFILESYSTEM \ - "TFM_LVL=1" \ +PREDEFINED = DOXYGEN_ONLY \ + __cplusplus=201703L \ + DEVICE_ANALOGIN \ + DEVICE_ANALOGOUT \ + DEVICE_CAN \ + DEVICE_CRC \ + DEVICE_ETHERNET \ + DEVICE_EMAC \ + DEVICE_FLASH \ + DEVICE_I2C \ + DEVICE_I2CSLAVE \ + DEVICE_I2C_ASYNCH \ + DEVICE_INTERRUPTIN \ + DEVICE_ITM \ + DEVICE_LPTICKER \ + DEVICE_MPU \ + DEVICE_PORTIN \ + DEVICE_PORTINOUT \ + DEVICE_PORTOUT \ + DEVICE_PWMOUT \ + DEVICE_RESET_REASON \ + DEVICE_RTC \ + DEVICE_TRNG \ + DEVICE_SERIAL \ + DEVICE_SERIAL_ASYNCH \ + DEVICE_SERIAL_FC \ + DEVICE_SLEEP \ + DEVICE_SPI \ + DEVICE_SPI_ASYNCH \ + DEVICE_SPISLAVE \ + DEVICE_QSPI \ + DEVICE_STORAGE \ + DEVICE_WATCHDOG \ + DEVICE_LOCALFILESYSTEM \ + TFM_LVL=1 \ + MBEDTLS_ENTROPY_C\ + MBEDTLS_CIPHER_MODE_CTR\ + MBEDTLS_CMAC_C\ + MBEDTLS_VERSION_C\ + DEVICEKEY_ENABLED\ "MBED_DEPRECATED_SINCE(d, m)=" \ "MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, M)=" \ - "MBED_DEPRECATED(s)=" \ - "BLE_ROLE_OBSERVER=1" \ - "BLE_ROLE_BROADCASTER=1" \ - "BLE_ROLE_PERIPHERAL=1" \ - "BLE_ROLE_CENTRAL=1" \ - "BLE_FEATURE_GATT_CLIENT=1" \ - "BLE_FEATURE_GATT_SERVER=1" \ - "BLE_FEATURE_SECURITY=1" \ - "BLE_FEATURE_SECURE_CONNECTIONS=1" \ - "BLE_FEATURE_SIGNING=1" \ - "BLE_FEATURE_PHY_MANAGEMENT=1" \ - "BLE_FEATURE_WHITELIST=1" \ - "BLE_FEATURE_PRIVACY=1" \ - "BLE_FEATURE_PERIODIC_ADVERTISING=1" \ - "BLE_FEATURE_EXTENDED_ADVERTISING=1" + MBED_DEPRECATED(s)= \ + BLE_ROLE_OBSERVER=1 \ + BLE_ROLE_BROADCASTER=1 \ + BLE_ROLE_PERIPHERAL=1 \ + BLE_ROLE_CENTRAL=1 \ + BLE_FEATURE_GATT_CLIENT=1 \ + BLE_FEATURE_GATT_SERVER=1 \ + BLE_FEATURE_SECURITY=1 \ + BLE_FEATURE_SECURE_CONNECTIONS=1 \ + BLE_FEATURE_SIGNING=1 \ + BLE_FEATURE_PHY_MANAGEMENT=1 \ + BLE_FEATURE_WHITELIST=1 \ + BLE_FEATURE_PRIVACY=1 \ + BLE_FEATURE_PERIODIC_ADVERTISING=1 \ + BLE_FEATURE_EXTENDED_ADVERTISING=1 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The @@ -2145,7 +2262,7 @@ # definition found in the source code. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # remove all references to function-like macros that are alone on a line, have @@ -2174,13 +2291,13 @@ # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create a # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. -GENERATE_TAGFILE = +GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES, all external class will be listed in # the class index. If set to NO, only the inherited external classes will be @@ -2203,12 +2320,6 @@ EXTERNAL_PAGES = YES -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of 'which perl'). -# The default file (with absolute path) is: /usr/bin/perl. - -PERL_PATH = /usr/bin/perl - #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- @@ -2222,21 +2333,12 @@ CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see: -# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - # 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 # DIA_PATH tag allows you to specify the directory where the dia binary resides. # If left empty dia is assumed to be found in the default search path. -DIA_PATH = +DIA_PATH = # If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. @@ -2285,7 +2387,7 @@ # the path where dot can find it using this tag. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTPATH = +DOT_FONTPATH = # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for # each documented class showing the direct and indirect inheritance relations. @@ -2328,10 +2430,32 @@ # but if the number exceeds 15, the total amount of fields shown is limited to # 10. # Minimum value: 0, maximum value: 100, default value: 10. -# This tag requires that the tag HAVE_DOT is set to YES. +# This tag requires that the tag UML_LOOK is set to YES. UML_LIMIT_NUM_FIELDS = 10 +# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and +# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS +# tag is set to YES, doxygen will add type and arguments for attributes and +# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen +# will not generate fields with class member information in the UML graphs. The +# class diagrams will look similar to the default class diagrams but using UML +# notation for the relationships. +# Possible values are: NO, YES and NONE. +# The default value is: NO. +# This tag requires that the tag UML_LOOK is set to YES. + +DOT_UML_DETAILS = NO + +# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters +# to display on a single line. If the actual line length exceeds this threshold +# significantly it will wrapped across multiple lines. Some heuristics are apply +# to avoid ugly line breaks. +# Minimum value: 0, maximum value: 1000, default value: 17. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_WRAP_THRESHOLD = 17 + # If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and # collaboration graphs will show the relations between templates and their # instances. @@ -2429,26 +2553,26 @@ # found. If left blank, it is assumed the dot tool can be found in the path. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_PATH = +DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the \dotfile # command). # This tag requires that the tag HAVE_DOT is set to YES. -DOTFILE_DIRS = +DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the \mscfile # command). -MSCFILE_DIRS = +MSCFILE_DIRS = # The DIAFILE_DIRS tag can be used to specify one or more directories that # contain dia files that are included in the documentation (see the \diafile # command). -DIAFILE_DIRS = +DIAFILE_DIRS = # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the # path where java can find the plantuml.jar file. If left blank, it is assumed @@ -2456,17 +2580,17 @@ # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -#PLANTUML_JAR_PATH = +PLANTUML_JAR_PATH = # When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a # configuration file for plantuml. -#PLANTUML_CFG_FILE = +PLANTUML_CFG_FILE = # When using plantuml, the specified paths are searched for files specified by # the !include statement in a plantuml block. -#PLANTUML_INCLUDE_PATH = +PLANTUML_INCLUDE_PATH = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes @@ -2521,9 +2645,11 @@ GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate # files that are used to generate the various graphs. +# +# Note: This setting is not only used for dot files but also for msc and +# plantuml temporary files. # The default value is: YES. -# This tag requires that the tag HAVE_DOT is set to YES. DOT_CLEANUP = YES diff --git a/drivers/include/drivers/AnalogOut.h b/drivers/include/drivers/AnalogOut.h index c6c34e9..662044e 100644 --- a/drivers/include/drivers/AnalogOut.h +++ b/drivers/include/drivers/AnalogOut.h @@ -56,7 +56,6 @@ class AnalogOut { public: - /** Create an AnalogOut connected to the specified pin * * @param pin AnalogOut pin to connect to @@ -66,11 +65,12 @@ analogout_init(&_dac, pin); } + AnalogOut(const PinMap &&) = delete; // prevent passing of temporary objects + /** Create an AnalogOut connected to the specified pin * * @param pinmap reference to structure which holds static pinmap. */ - AnalogOut(const PinMap &&) = delete; // prevent passing of temporary objects AnalogOut(const PinMap &pinmap) { analogout_init_direct(&_dac, &pinmap); diff --git a/drivers/include/drivers/CAN.h b/drivers/include/drivers/CAN.h index d66aefb..e5c539b 100644 --- a/drivers/include/drivers/CAN.h +++ b/drivers/include/drivers/CAN.h @@ -100,8 +100,6 @@ /** Initialize CAN interface * * @param pinmap reference to structure which holds static pinmap - * @param td the transmit pin - * @param hz the bus frequency in hertz */ CAN(const can_pinmap_t &pinmap); CAN(const can_pinmap_t &&) = delete; // prevent passing of temporary objects @@ -109,7 +107,6 @@ /** Initialize CAN interface and set the frequency * * @param pinmap reference to structure which holds static pinmap - * @param td the transmit pin * @param hz the bus frequency in hertz */ CAN(const can_pinmap_t &pinmap, int hz); diff --git a/drivers/include/drivers/I2C.h b/drivers/include/drivers/I2C.h index b36393f..01d9bcd 100644 --- a/drivers/include/drivers/I2C.h +++ b/drivers/include/drivers/I2C.h @@ -426,7 +426,7 @@ * @param tx_length The length of TX buffer in bytes. If 0, no transmission is done. * @param rx_buffer The RX buffer, which is used for received data. May be nullptr if tx_length is 0. * @param rx_length The length of RX buffer in bytes If 0, no reception is done. - * @param timeout timeout value. Use @link rtos::Kernel::wait_for_u32_forever to wait forever (the default). + * @param timeout timeout value. Use #rtos::Kernel::wait_for_u32_forever to wait forever (the default). * @param repeated Set up for a repeated start. If true, the Mbed processor does not relinquish the bus after * this operation. You may then call write(), read(), or start() again to start another operation. * diff --git a/drivers/include/drivers/LowPowerTimeout.h b/drivers/include/drivers/LowPowerTimeout.h index 5a1352e..13502ea 100644 --- a/drivers/include/drivers/LowPowerTimeout.h +++ b/drivers/include/drivers/LowPowerTimeout.h @@ -45,7 +45,12 @@ /** Clock to use with attach_absolute, running always */ using steady_clock = LowPowerClock; - /** @copydoc TimeoutBase::scheduled_time() */ + /** Return scheduled callback time + * + * @return scheduled callback time + * + * @note if the callback is overdue, or has already run, the returned value will be in the past + */ LowPowerClock::time_point scheduled_time() const { /* Massage from virtual TickerDataClock::time_point used internally to true LowPowerClock::time_point */ diff --git a/drivers/include/drivers/MbedCRC.h b/drivers/include/drivers/MbedCRC.h index 4069337..d010a88 100644 --- a/drivers/include/drivers/MbedCRC.h +++ b/drivers/include/drivers/MbedCRC.h @@ -49,6 +49,9 @@ BITWISE /// Always use bitwise manual computation }; +/** @}*/ +/** @}*/ + #ifndef DOXYGEN_ONLY namespace impl { template @@ -80,6 +83,10 @@ } // namespace impl +/** + * \ingroup drivers_MbedCRC + * @{ + */ /** CRC object provides CRC generation through hardware or software * * CRC sums can be generated using three different methods: hardware, software ROM tables @@ -298,6 +305,8 @@ } }; +/// @} + #if !defined(DOXYGEN_ONLY) /* Internal implementation - basically same as public, but actual mode locked in */ namespace impl { @@ -864,8 +873,7 @@ #endif // !defined(DOXYGEN_ONLY) -/** @}*/ -/** @}*/ + } // namespace mbed diff --git a/drivers/include/drivers/RawCAN.h b/drivers/include/drivers/RawCAN.h index fd3c842..8e1880b 100644 --- a/drivers/include/drivers/RawCAN.h +++ b/drivers/include/drivers/RawCAN.h @@ -30,50 +30,48 @@ namespace mbed { #ifndef FEATURE_EXPERIMENTAL_API + +/** Creates an unlocked CAN interface connected to specific pins. + * + * Example: + * @code + * #include "mbed.h" + * + * + * Ticker ticker; + * DigitalOut led1(LED1); + * DigitalOut led2(LED2); + * //The constructor takes in RX, and TX pin respectively. + * //These pins, for this example, are defined in mbed_app.json + * RawCAN can1(MBED_CONF_APP_CAN1_RD, MBED_CONF_APP_CAN1_TD); + * RawCAN can2(MBED_CONF_APP_CAN2_RD, MBED_CONF_APP_CAN2_TD); + * + * unsigned char counter = 0; + * + * void send() { + * if(can1.write(CANMessage(1337U, &counter, 1))) { + * printf("Message sent: %d\n", counter); + * counter++; + * } + * led1 = !led1; + * } + * + * int main() { + * ticker.attach(&send, 1); + * CANMessage msg; + * while(1) { + * if(can2.read(msg)) { + * printf("Message received: %d\n\n", msg.data[0]); + * led2 = !led2; + * } + * ThisThread::sleep_for(200); + * } + * } + * + * @endcode + */ class RawCAN: public CAN { public: - /** Creates an unlocked CAN interface connected to specific pins. - * - * @param rd read from transmitter - * @param td transmit to transmitter - * - * Example: - * @code - * #include "mbed.h" - * - * - * Ticker ticker; - * DigitalOut led1(LED1); - * DigitalOut led2(LED2); - * //The constructor takes in RX, and TX pin respectively. - * //These pins, for this example, are defined in mbed_app.json - * RawCAN can1(MBED_CONF_APP_CAN1_RD, MBED_CONF_APP_CAN1_TD); - * RawCAN can2(MBED_CONF_APP_CAN2_RD, MBED_CONF_APP_CAN2_TD); - * - * unsigned char counter = 0; - * - * void send() { - * if(can1.write(CANMessage(1337U, &counter, 1))) { - * printf("Message sent: %d\n", counter); - * counter++; - * } - * led1 = !led1; - * } - * - * int main() { - * ticker.attach(&send, 1); - * CANMessage msg; - * while(1) { - * if(can2.read(msg)) { - * printf("Message received: %d\n\n", msg.data[0]); - * led2 = !led2; - * } - * ThisThread::sleep_for(200); - * } - * } - * - * @endcode - */ /* Note: The can apis are unlocked hence using this when multiple * threads are accessing a single instance of CAN will lead to diff --git a/drivers/include/drivers/SPISlave.h b/drivers/include/drivers/SPISlave.h index 16a3a77..1f330e1 100644 --- a/drivers/include/drivers/SPISlave.h +++ b/drivers/include/drivers/SPISlave.h @@ -75,7 +75,7 @@ * * @note Either mosi or miso can be specified as NC if not used. * - * @param static_pinmap reference to structure which holds static pinmap. + * @param pinmap reference to structure which holds static pinmap. */ SPISlave(const spi_pinmap_t &pinmap); SPISlave(const spi_pinmap_t &&) = delete; // prevent passing of temporary objects diff --git a/drivers/include/drivers/SerialBase.h b/drivers/include/drivers/SerialBase.h index 71e94e3..a688f2b 100644 --- a/drivers/include/drivers/SerialBase.h +++ b/drivers/include/drivers/SerialBase.h @@ -168,7 +168,7 @@ /** Set the flow control type on the serial port * * @param type the flow control type (Disabled, RTS, CTS, RTSCTS) - * @param pinmap reference to structure which holds static pinmap + * @param static_pinmap reference to structure which holds static pinmap */ void set_flow_control(Flow type, const serial_fc_pinmap_t &static_pinmap); #endif diff --git a/drivers/include/drivers/Timeout.h b/drivers/include/drivers/Timeout.h index da703e9..ed87246 100644 --- a/drivers/include/drivers/Timeout.h +++ b/drivers/include/drivers/Timeout.h @@ -97,7 +97,12 @@ /** Clock to use with attach_absolute, guaranteeing running only while attached or manually locked */ using clock = HighResClock; - /** @copydoc TimeoutBase::scheduled_time() */ + /** Return scheduled callback time + * + * @return scheduled callback time + * + * @note if the callback is overdue, or has already run, the returned value will be in the past + */ HighResClock::time_point scheduled_time() const { /* Massage from virtual TickerDataClock::time_point used internally to true HighResClock::time_point */ diff --git a/drivers/usb/include/usb/internal/AsyncOp.h b/drivers/usb/include/usb/internal/AsyncOp.h index 16f8d64..9bed2ef 100644 --- a/drivers/usb/include/usb/internal/AsyncOp.h +++ b/drivers/usb/include/usb/internal/AsyncOp.h @@ -40,6 +40,11 @@ * \ingroup drivers-internal-api-usb * @{ */ + +/** + * Base class for asynchronous operations in the USB stack. + * Classes such as USBCDC use this to submit operations to be processed by an ISR. + */ class AsyncOp: public LinkEntry { public: diff --git a/events/include/events/Event.h b/events/include/events/Event.h index 51a543d..8a22c72 100644 --- a/events/include/events/Event.h +++ b/events/include/events/Event.h @@ -38,7 +38,7 @@ class Event; /** - * \defgroup events_Event Event class + * \defgroup events_Event Event classes * @{ */ @@ -438,6 +438,7 @@ /** @}*/ +#if !defined(DOXYGEN_ONLY) // Convenience functions declared here to avoid cyclic // dependency between Event and EventQueue @@ -657,6 +658,8 @@ return Event(this, cb, c0, c1, c2, c3, c4); } +#endif // !defined(DOXYGEN_ONLY) + /** @}*/ } #endif diff --git a/events/include/events/EventQueue.h b/events/include/events/EventQueue.h index a65c8a9..78fdfe1 100644 --- a/events/include/events/EventQueue.h +++ b/events/include/events/EventQueue.h @@ -122,7 +122,7 @@ /** Dispatch events without a timeout * * Executes events indefinitely unless the dispatch loop is forcibly broken. - * @See break_dispatch() + * @see break_dispatch() * */ void dispatch_forever(); @@ -725,6 +725,7 @@ * @endcode * * @param f Function to execute when the event is dispatched + * @param args List of arguments that will be passed to \c f * @return Event that will dispatch on the specific queue */ template diff --git a/events/include/events/UserAllocatedEvent.h b/events/include/events/UserAllocatedEvent.h index 27b6aa7..18e0de1 100644 --- a/events/include/events/UserAllocatedEvent.h +++ b/events/include/events/UserAllocatedEvent.h @@ -23,17 +23,12 @@ namespace events { /** - * \addtogroup events-public-api + * \addtogroup events_Event * @{ */ template class UserAllocatedEvent; -/** - * \defgroup events_Event UserAllocatedEvent class - * @{ - */ - /** UserAllocatedEvent * * Representation of an static event for fine-grain dispatch control. @@ -462,7 +457,5 @@ } /** @}*/ - -/** @}*/ } #endif diff --git a/hal/include/hal/analogin_api.h b/hal/include/hal/analogin_api.h index e0256fe..c5f01fb 100644 --- a/hal/include/hal/analogin_api.h +++ b/hal/include/hal/analogin_api.h @@ -51,16 +51,6 @@ * @{ */ -/** - * \defgroup hal_analogin_tests Analogin hal tests - * The Analogin HAL tests ensure driver conformance to defined behaviour. - * - * To run the Analogin hal tests use the command: - * - * mbed test -t -m -n tests-mbed_hal_fpga_ci_test_shield-analogin - * - */ - /** Initialize the analogin peripheral * * Configures the pin used by analogin. diff --git a/hal/include/hal/analogout_api.h b/hal/include/hal/analogout_api.h index 4212907..f136362 100644 --- a/hal/include/hal/analogout_api.h +++ b/hal/include/hal/analogout_api.h @@ -53,16 +53,6 @@ * @{ */ -/** - * \defgroup hal_analogin_tests Analogout hal tests - * The Analogout HAL tests ensure driver conformance to defined behaviour. - * - * To run the Analogout hal tests use the command: - * - * mbed test -t -m -n tests-mbed_hal_fpga_ci_test_shield-analogout - * - */ - /** Initialize the analogout peripheral * * Configures the pin used by analogout. diff --git a/hal/include/hal/crc_api.h b/hal/include/hal/crc_api.h index e59b678..2e06a4d 100644 --- a/hal/include/hal/crc_api.h +++ b/hal/include/hal/crc_api.h @@ -65,27 +65,27 @@ * # Defined behaviour * * * Macro HAL_CRC_IS_SUPPORTED() evaluates true if platform supports hardware - * CRC for the given polynomial/width - verified by test ::crc_is_supported_test. + * CRC for the given polynomial/width - verified by test crc_is_supported_test. * * Macro HAL_CRC_IS_SUPPORTED() evaluates false if platform does not support hardware - * CRC for the given polynomial/width - verified by test ::crc_is_supported_test. + * CRC for the given polynomial/width - verified by test crc_is_supported_test. * * If CRC module does not support any of the following settings: initial_xor, final_xor * reflect_in, reflect_out, then these operations must be handled by the driver - * - Verified by test ::crc_calc_single_test. + * - Verified by test crc_calc_single_test. * * Platform which supports hardware CRC must be able to handle at least one of the predefined * polynomial/width configurations that can be constructed in the MbedCRC class: POLY_8BIT_CCITT, * POLY_7BIT_SD, POLY_16BIT_CCITT, POLY_16BIT_IBM, POLY_32BIT_ANSI - * - verified by test ::crc_is_supported_test, ::crc_calc_single_test. + * - verified by test crc_is_supported_test, crc_calc_single_test. * * Function hal_crc_compute_partial_start() configures CRC module with the given configuration - * - Verified by test ::crc_calc_single_test. + * - Verified by test crc_calc_single_test. * * Calling hal_crc_compute_partial_start() without finalising the - * CRC calculation overrides the current configuration - Verified by test ::crc_reconfigure_test. - * * Function hal_crc_compute_partial() writes data to the CRC module - verified by test ::crc_calc_single_test. + * CRC calculation overrides the current configuration - Verified by test crc_reconfigure_test. + * * Function hal_crc_compute_partial() writes data to the CRC module - verified by test crc_calc_single_test. * * Function hal_crc_compute_partial() can be call multiple times in succession in order to - * provide additional data to CRC module - verified by test ::crc_calc_multi_test. + * provide additional data to CRC module - verified by test crc_calc_multi_test. * * Function hal_crc_compute_partial() does nothing if pointer to buffer is undefined or - * data length is equal to 0 - verified by test ::crc_compute_partial_invalid_param_test. + * data length is equal to 0 - verified by test crc_compute_partial_invalid_param_test. * * Function hal_crc_get_result() returns the checksum result from the CRC module - * - verified by tests ::crc_calc_single_test, ::crc_calc_multi_test, ::crc_reconfigure_test. + * - verified by tests crc_calc_single_test, crc_calc_multi_test, crc_reconfigure_test. * * # Undefined behaviour * @@ -121,8 +121,11 @@ * * Example: * + * @code * #define HAL_CRC_IS_SUPPORTED(polynomial, width) \ * ((width) == 16 || ((width) == 32 && (polynomial) == POLY_32BIT_ANSI) + * @endcode + * * @{ */ diff --git a/hal/include/hal/gpio_api.h b/hal/include/hal/gpio_api.h index c4f4d17..11cd5a3 100644 --- a/hal/include/hal/gpio_api.h +++ b/hal/include/hal/gpio_api.h @@ -32,8 +32,8 @@ * \defgroup hal_gpio GPIO HAL functions * * # Defined behavior - * * ::gpio_init and other init functions can be called with NC or a valid PinName for the target - Verified by ::gpio_nc_test - * * ::gpio_is_connected can be used to test whether a gpio_t object was initialized with NC - Verified by ::gpio_nc_test + * * ::gpio_init and other init functions can be called with NC or a valid PinName for the target - Verified by gpio_nc_test + * * ::gpio_is_connected can be used to test whether a gpio_t object was initialized with NC - Verified by gpio_nc_test * * ::gpio_init initializes the GPIO pin * * ::gpio_free returns the pin owned by the GPIO object to its reset state * * ::gpio_mode sets the mode of the given pin diff --git a/hal/include/hal/i2c_api.h b/hal/include/hal/i2c_api.h index 83285b3..48753be 100644 --- a/hal/include/hal/i2c_api.h +++ b/hal/include/hal/i2c_api.h @@ -155,7 +155,7 @@ * * Specifying an invalid address when calling any `read` or `write` functions * * Setting the length of the transfer or receive buffers to larger than the buffers are * * Passing an invalid pointer as `handler` - * * Calling ::i2c_abort_async when no transfer is currently in progress + * * Calling ::i2c_abort_asynch when no transfer is currently in progress * * * @{ diff --git a/hal/include/hal/lp_ticker_api.h b/hal/include/hal/lp_ticker_api.h index 82a67b7..574fd3f 100644 --- a/hal/include/hal/lp_ticker_api.h +++ b/hal/include/hal/lp_ticker_api.h @@ -35,9 +35,9 @@ * Low level interface to the low power ticker of a target * * # Defined behavior - * * Has a reported frequency between 4KHz and 64KHz - verified by ::lp_ticker_info_test - * * Has a counter that is at least 12 bits wide - verified by ::lp_ticker_info_test - * * Continues operating in deep sleep mode - verified by ::lp_ticker_deepsleep_test + * * Has a reported frequency between 4KHz and 64KHz - verified by lp_ticker_info_test + * * Has a counter that is at least 12 bits wide - verified by lp_ticker_info_test + * * Continues operating in deep sleep mode - verified by lp_ticker_deepsleep_test * * All behavior defined by the @ref hal_ticker_shared "ticker specification" * * # Undefined behavior @@ -45,7 +45,7 @@ * * Calling any function other than lp_ticker_init after calling lp_ticker_free * * # Potential bugs - * * Glitches due to ripple counter - Verified by ::lp_ticker_glitch_test + * * Glitches due to ripple counter - Verified by lp_ticker_glitch_test * * @see hal_lp_ticker_tests * @@ -63,7 +63,7 @@ * LP_TICKER_MASK: The value mask for the ticker - eg 0x07FFFFFF for a 27-bit ticker. * * If any are defined, all 3 must be defined, and the macros are checked for consistency with - * lp_ticker_get_info by test ::lp_ticker_info_test. + * lp_ticker_get_info by test lp_ticker_info_test. * @{ */ diff --git a/hal/include/hal/mbed_lp_ticker_wrapper.h b/hal/include/hal/mbed_lp_ticker_wrapper.h index 3493abe..a684e8f 100644 --- a/hal/include/hal/mbed_lp_ticker_wrapper.h +++ b/hal/include/hal/mbed_lp_ticker_wrapper.h @@ -69,8 +69,6 @@ */ void lp_ticker_wrapper_resume(void); -/**@}*/ - #ifdef __cplusplus } #endif diff --git a/hal/include/hal/mpu_api.h b/hal/include/hal/mpu_api.h index 95ee8fc..3905b1a 100644 --- a/hal/include/hal/mpu_api.h +++ b/hal/include/hal/mpu_api.h @@ -36,11 +36,11 @@ * execution from ram. * * # Defined behavior - * * The function ::mbed_mpu_init is safe to call repeatedly - Verified by ::mpu_init_test - * * The function ::mbed_mpu_free disables MPU protection - Verified by ::mpu_free_test + * * The function ::mbed_mpu_init is safe to call repeatedly - Verified by mpu_init_test + * * The function ::mbed_mpu_free disables MPU protection - Verified by mpu_free_test * * Execution from RAM results in a fault when execute never is enabled. - * This RAM includes heap, stack, data and zero init - Verified by ::mpu_fault_test_data, - * ::mpu_fault_test_bss, ::mpu_fault_test_stack and ::mpu_fault_test_heap. + * This RAM includes heap, stack, data and zero init - Verified by mpu_fault_test_data, + * mpu_fault_test_bss, mpu_fault_test_stack and mpu_fault_test_heap. * * Writing to ROM results in a fault when write never is enabled - Not verified * * # Undefined behavior diff --git a/hal/include/hal/rtc_api.h b/hal/include/hal/rtc_api.h index 5685f88..6426280 100644 --- a/hal/include/hal/rtc_api.h +++ b/hal/include/hal/rtc_api.h @@ -36,23 +36,23 @@ * target. * * # Defined behaviour - * * The function ::rtc_init is safe to call repeatedly - Verified by test ::rtc_init_test. - * * RTC accuracy is at least 10% - Verified by test ::rtc_accuracy_test. - * * Init/free doesn't stop RTC from counting - Verified by test ::rtc_persist_test. - * * Software reset doesn't stop RTC from counting - Verified by test ::rtc_reset_test. - * * Sleep modes don't stop RTC from counting - Verified by test ::rtc_sleep_test. + * * The function ::rtc_init is safe to call repeatedly - Verified by test rtc_init_test. + * * RTC accuracy is at least 10% - Verified by test rtc_accuracy_test. + * * Init/free doesn't stop RTC from counting - Verified by test rtc_persist_test. + * * Software reset doesn't stop RTC from counting - Verified by test rtc_reset_test. + * * Sleep modes don't stop RTC from counting - Verified by test rtc_sleep_test. * * Shutdown mode doesn't stop RTC from counting - Not verified. * * The functions ::rtc_write/::rtc_read provides availability to set/get RTC time - * - Verified by test ::rtc_write_read_test. + * - Verified by test rtc_write_read_test. * * The functions ::rtc_isenabled returns 1 if the RTC is counting and the time has been set, - * 0 otherwise - Verified by test ::rtc_enabled_test. + * 0 otherwise - Verified by test rtc_enabled_test. * * # Undefined behaviour * * Calling any function other than ::rtc_init before the initialisation of the RTC * * # Potential bugs - * * Incorrect overflow handling - Verified by ::rtc_range_test - * * Glitches due to ripple counter - Verified by ::rtc_glitch_test + * * Incorrect overflow handling - Verified by rtc_range_test + * * Glitches due to ripple counter - Verified by rtc_glitch_test * * @see hal_rtc_tests * @@ -75,7 +75,7 @@ * before any other RTC functions ares called. This does not change the state * of the RTC. It just enables access to it. * - * @note This function is safe to call repeatedly - Tested by ::rtc_init_test + * @note This function is safe to call repeatedly - Tested by rtc_init_test * * Example Implementation Pseudo Code: * @code @@ -102,7 +102,7 @@ * After this function is called no other RTC functions should be called * except for ::rtc_init. * - * @note This function does not stop the RTC from counting - Tested by ::rtc_persist_test + * @note This function does not stop the RTC from counting - Tested by rtc_persist_test * * Example Implementation Pseudo Code: * @code @@ -141,7 +141,7 @@ * @note Some RTCs are not synchronized with the main clock. If * this is the case with your RTC then you must read the RTC time * in a loop to prevent reading the wrong time due to a glitch. - * The test ::rtc_glitch_test is intended to catch this bug. + * The test rtc_glitch_test is intended to catch this bug. * * Example implementation for an unsynchronized ripple counter: * @code diff --git a/hal/include/hal/serial_api.h b/hal/include/hal/serial_api.h index 78a1ee8..0134a90 100644 --- a/hal/include/hal/serial_api.h +++ b/hal/include/hal/serial_api.h @@ -194,8 +194,8 @@ * * Calling any function other than ::serial_init on am uninitialized or freed `serial_t`. * * Passing an invalid pointer as `obj` to any function. * * Passing an invalid pointer as `handler` to ::serial_irq_handler, ::serial_tx_asynch, ::serial_rx_asynch. - * * Calling ::serial_tx_abort while no async TX transfer is being processed. - * * Calling ::serial_rx_abort while no async RX transfer is being processed. + * * Calling ::serial_tx_abort_asynch while no async TX transfer is being processed. + * * Calling ::serial_rx_abort_asynch while no async RX transfer is being processed. * * Devices behavior is undefined when the interrupt latency is longer than one packet transfer time * (packet_bits / baudrate) if the flow control is not used. * @{ diff --git a/hal/include/hal/spi_api.h b/hal/include/hal/spi_api.h index f67b6ef..0373385 100644 --- a/hal/include/hal/spi_api.h +++ b/hal/include/hal/spi_api.h @@ -96,41 +96,41 @@ * * # Defined behavior * * ::spi_init initializes the spi_t control structure - * * ::spi_init configures the pins used by SPI - Verified by ::fpga_spi_test_init_free, ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_get_capabilities() fills the given `spi_capabilities_t` instance - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common + * * ::spi_init configures the pins used by SPI + * * ::spi_get_capabilities() fills the given `spi_capabilities_t` instance * * ::spi_get_capabilities() should consider the `ssel` pin when evaluation the `support_slave_mode` and `hw_cs_handle` capability - TBD (basic test) * * ::spi_get_capabilities(): if the given `ssel` pin cannot be managed by hardware, `support_slave_mode` and `hw_cs_handle` should be false - TBD (basic test) - * * At least a symbol width of 8bit must be supported - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * The supported frequency range must include the range [0.2..2] MHz - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_free returns the pins owned by the SPI object to their reset state - Verified by ::fpga_spi_test_init_free - * * ::spi_format sets the number of bits per frame - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_format configures clock polarity and phase - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_format configures master/slave mode - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common; slave mode - TBD - * * ::spi_frequency sets the SPI baud rate - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_master_write writes a symbol out in master mode and receives a symbol - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_master_block_write writes `tx_length` words to the bus - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_master_block_write reads `rx_length` words from the bus - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_master_block_write returns the maximum of tx_length and rx_length - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_master_block_write specifies the write_fill which is default data transmitted while performing a read - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common + * * At least a symbol width of 8bit must be supported + * * The supported frequency range must include the range [0.2..2] MHz + * * ::spi_free returns the pins owned by the SPI object to their reset state + * * ::spi_format sets the number of bits per frame + * * ::spi_format configures clock polarity and phase + * * ::spi_format configures master/slave mode + * * ::spi_frequency sets the SPI baud rate + * * ::spi_master_write writes a symbol out in master mode and receives a symbol + * * ::spi_master_block_write writes `tx_length` words to the bus + * * ::spi_master_block_write reads `rx_length` words from the bus + * * ::spi_master_block_write returns the maximum of tx_length and rx_length + * * ::spi_master_block_write specifies the write_fill which is default data transmitted while performing a read * * ::spi_get_module returns the SPI module number - TBD (basic test) * * ::spi_slave_read returns a received value out of the SPI receive buffer in slave mode - TBD (SPI slave test) * * ::spi_slave_read blocks until a value is available - TBD (SPI slave test) * * ::spi_slave_write writes a value to the SPI peripheral in slave mode - TBD (SPI slave test) * * ::spi_slave_write blocks until the SPI peripheral can be written to - TBD (SPI slave test) * * ::spi_busy returns non-zero if the peripheral is currently transmitting, 0 otherwise - TBD (basic test) - * * ::spi_master_transfer starts the SPI asynchronous transfer - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_master_transfer writes `tx_len` words to the bus - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_master_transfer reads `rx_len` words from the bus - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_master_transfer specifies the bit width of buffer words - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * The callback given to ::spi_master_transfer is invoked when the transfer completes (with a success or an error) - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_master_transfer specifies the logical OR of events to be registered - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common + * * ::spi_master_transfer starts the SPI asynchronous transfer + * * ::spi_master_transfer writes `tx_len` words to the bus + * * ::spi_master_transfer reads `rx_len` words from the bus + * * ::spi_master_transfer specifies the bit width of buffer words + * * The callback given to ::spi_master_transfer is invoked when the transfer completes (with a success or an error) + * * ::spi_master_transfer specifies the logical OR of events to be registered * * The ::spi_master_transfer function may use the `DMAUsage` hint to select the appropriate async algorithm - Not testable - * * ::spi_irq_handler_asynch reads the received values out of the RX FIFO - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_irq_handler_asynch writes values into the TX FIFO - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_irq_handler_asynch checks for transfer termination conditions, such as buffer overflows or transfer complete - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_irq_handler_asynch returns event flags if a transfer termination condition was met, otherwise 0 - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common - * * ::spi_abort_asynch aborts an on-going async transfer - TBD (basic test) - * * ::spi_active returns non-zero if the SPI port is active or zero if it is not - TBD (basic test) + * * ::spi_irq_handler_asynch reads the received values out of the RX FIFO + * * ::spi_irq_handler_asynch writes values into the TX FIFO + * * ::spi_irq_handler_asynch checks for transfer termination conditions, such as buffer overflows or transfer complete + * * ::spi_irq_handler_asynch returns event flags if a transfer termination condition was met, otherwise 0 + * * ::spi_abort_asynch aborts an on-going async transfer + * * ::spi_active returns non-zero if the SPI port is active or zero if it is not * * # Undefined behavior * * Calling ::spi_init multiple times on the same `spi_t` without ::spi_free @@ -138,7 +138,7 @@ * * Passing pins that cannot be on the same peripheral * * Passing an invalid pointer as `obj` to any function * * Passing an invalid pointer as `handler` to ::spi_master_transfer - * * Calling ::spi_abort while no async transfer is being processed (no transfer or a synchronous transfer) + * * Calling ::spi_abort_asynch while no async transfer is being processed (no transfer or a synchronous transfer) * * @{ */ diff --git a/hal/include/hal/us_ticker_api.h b/hal/include/hal/us_ticker_api.h index f793e87..8c34d7f 100644 --- a/hal/include/hal/us_ticker_api.h +++ b/hal/include/hal/us_ticker_api.h @@ -32,9 +32,9 @@ * Low level interface to the microsecond ticker of a target * * # Defined behavior - * * Has a reported frequency between 250KHz and 8MHz for counters which are less than 32 bits wide - Verified by test ::us_ticker_info_test - * * Has a reported frequency up to 100MHz for counters which are 32 bits wide - Verified by test ::us_ticker_info_test - * * Has a counter that is at least 16 bits wide - Verified by test ::us_ticker_info_test + * * Has a reported frequency between 250KHz and 8MHz for counters which are less than 32 bits wide - Verified by test us_ticker_info_test + * * Has a reported frequency up to 100MHz for counters which are 32 bits wide - Verified by test us_ticker_info_test + * * Has a counter that is at least 16 bits wide - Verified by test us_ticker_info_test * * All behavior defined by the @ref hal_ticker_shared "ticker specification" * * # Undefined behavior @@ -55,7 +55,7 @@ * US_TICKER_MASK: The value mask for the ticker - eg 0x07FFFFFF for a 27-bit ticker. * * If any are defined, all 3 must be defined, and the macros are checked for consistency with - * us_ticker_get_info by test ::us_ticker_info_test. + * us_ticker_get_info by test us_ticker_info_test. * @{ */ @@ -77,19 +77,19 @@ * Low level interface to the ticker of a target * * # Defined behavior - * * The function ticker_init is safe to call repeatedly - Verified by test ::ticker_init_test - * * The function ticker_init allows the ticker to keep counting and disables the ticker interrupt - Verified by test ::ticker_init_test - * * Ticker frequency is non-zero and counter is at least 8 bits - Verified by ::ticker_info_test - * * The ticker rolls over at (1 << bits) and continues counting starting from 0 - Verified by ::ticker_overflow_test - * * The ticker counts at the specified frequency +- 10% - Verified by ::ticker_frequency_test - * * The ticker increments by 1 each tick - Verified by ::ticker_increment_test + * * The function ticker_init is safe to call repeatedly - Verified by test ticker_init_test + * * The function ticker_init allows the ticker to keep counting and disables the ticker interrupt - Verified by test ticker_init_test + * * Ticker frequency is non-zero and counter is at least 8 bits - Verified by ticker_info_test + * * The ticker rolls over at (1 << bits) and continues counting starting from 0 - Verified by ticker_overflow_test + * * The ticker counts at the specified frequency +- 10% - Verified by ticker_frequency_test + * * The ticker increments by 1 each tick - Verified by ticker_increment_test * * The ticker interrupt fires only when the ticker times increments to or past the value set by ticker_set_interrupt. - * Verified by ::ticker_interrupt_test and ::ticker_past_test - * * It is safe to call ticker_set_interrupt repeatedly before the handler is called - Verified by ::ticker_repeat_reschedule_test + * Verified by ticker_interrupt_test and ticker_past_test + * * It is safe to call ticker_set_interrupt repeatedly before the handler is called - Verified by ticker_repeat_reschedule_test * * The function ticker_fire_interrupt causes ticker_irq_handler to be called immediately from interrupt context - - * Verified by ::ticker_fire_now_test + * Verified by ticker_fire_now_test * * The ticker operations ticker_read, ticker_clear_interrupt, ticker_set_interrupt and ticker_fire_interrupt - * take less than 20us to complete - Verified by ::ticker_speed_test + * take less than 20us to complete - Verified by ticker_speed_test * * The ticker operations ticker_init and ticker_read are atomic. * * # Undefined behavior @@ -99,10 +99,10 @@ * * Calling any function other than us_ticker_init after calling us_ticker_free * * # Potential bugs - * * Drift due to reschedule - Verified by ::ticker_repeat_reschedule_test - * * Incorrect overflow handling of timers - Verified by ::ticker_overflow_test - * * Interrupting at a time of 0 - Verified by ::ticker_overflow_test - * * Interrupt triggered more than once - Verified by ::ticker_interrupt_test + * * Drift due to reschedule - Verified by ticker_repeat_reschedule_test + * * Incorrect overflow handling of timers - Verified by ticker_overflow_test + * * Interrupting at a time of 0 - Verified by ticker_overflow_test + * * Interrupt triggered more than once - Verified by ticker_interrupt_test * * @ingroup hal_us_ticker * @ingroup hal_lp_ticker @@ -155,7 +155,7 @@ * clocking and prescaler registers, along with disabling * the compare interrupt. * - * @note Initialization properties tested by ::ticker_init_test + * @note Initialization properties tested by ticker_init_test * * Pseudo Code: * @code diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto.h index 110f56b..86237e0 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto.h @@ -1,5 +1,5 @@ /** - * \file psa/crypto.h + * \file * \brief Platform Security Architecture cryptography module */ /* @@ -497,16 +497,13 @@ * already a persistent key with the given identifier. * \retval #PSA_ERROR_INVALID_ARGUMENT * The lifetime or identifier in \p attributes are invalid. - * \retval #PSA_ERROR_INVALID_ARGUMENT - * The policy constraints on the source and specified in + * Or, alternately, the policy constraints on the source and specified in * \p attributes are incompatible. - * \retval #PSA_ERROR_INVALID_ARGUMENT - * \p attributes specifies a key type or key size + * Or, alternately, \p attributes specifies a key type or key size * which does not match the attributes of the source key. * \retval #PSA_ERROR_NOT_PERMITTED * The source key does not have the #PSA_KEY_USAGE_COPY usage flag. - * \retval #PSA_ERROR_NOT_PERMITTED - * The source key is not exportable and its lifetime does not + * Or, alternately, the source key is not exportable and its lifetime does not * allow copying it to the target's lifetime. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_INSUFFICIENT_STORAGE @@ -627,11 +624,9 @@ * The key type or key size is not supported, either by the * implementation in general or in this particular persistent location. * \retval #PSA_ERROR_INVALID_ARGUMENT - * The key attributes, as a whole, are invalid. - * \retval #PSA_ERROR_INVALID_ARGUMENT - * The key data is not correctly formatted. - * \retval #PSA_ERROR_INVALID_ARGUMENT - * The size in \p attributes is nonzero and does not match the size + * Either, the key attributes, as a whole, are invalid, + * or the key data is not correctly formatted, or + * the size in \p attributes is nonzero and does not match the size * of the key data. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_INSUFFICIENT_STORAGE @@ -846,7 +841,6 @@ * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED - * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_BAD_STATE * The library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize @@ -882,7 +876,6 @@ * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED - * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_BAD_STATE * The library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize @@ -978,14 +971,13 @@ * \p alg is not a supported hash algorithm. * \retval #PSA_ERROR_INVALID_ARGUMENT * \p alg is not a hash algorithm. - * \retval #PSA_ERROR_BAD_STATE - * The operation state is not valid (it must be inactive). * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). + * The operation state is not valid (it must be inactive). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code. */ @@ -1005,14 +997,13 @@ * * \retval #PSA_SUCCESS * Success. - * \retval #PSA_ERROR_BAD_STATE - * The operation state is not valid (it muct be active). * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). + * The operation state is not valid (it must be active). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code. */ @@ -1050,6 +1041,9 @@ * Success. * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_BUFFER_TOO_SMALL * The size of the \p hash buffer is too small. You can determine a * sufficient buffer size by calling #PSA_HASH_SIZE(\c alg) @@ -1058,10 +1052,6 @@ * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_hash_finish(psa_hash_operation_t *operation, uint8_t *hash, @@ -1096,14 +1086,13 @@ * differs from the expected hash. * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_hash_verify(psa_hash_operation_t *operation, const uint8_t *hash, @@ -1154,16 +1143,14 @@ * \retval #PSA_SUCCESS * \retval #PSA_ERROR_BAD_STATE * The \p source_operation state is not valid (it must be active). - * \retval #PSA_ERROR_BAD_STATE - * The \p target_operation state is not valid (it must be inactive). + * Or, the \p target_operation state is not valid (it must be inactive). + * Or, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_INSUFFICIENT_MEMORY - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_hash_clone(const psa_hash_operation_t *source_operation, psa_hash_operation_t *target_operation); @@ -1364,8 +1351,7 @@ * The key could not be retrieved from storage. * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be inactive). - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code. */ @@ -1427,8 +1413,7 @@ * The key could not be retrieved from storage * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be inactive). - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code. */ @@ -1453,15 +1438,14 @@ * Success. * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_mac_update(psa_mac_operation_t *operation, const uint8_t *input, @@ -1500,6 +1484,9 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be an active mac sign * operation). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_BUFFER_TOO_SMALL * The size of the \p mac buffer is too small. You can determine a * sufficient buffer size by calling PSA_MAC_FINAL_SIZE(). @@ -1508,10 +1495,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_mac_sign_finish(psa_mac_operation_t *operation, uint8_t *mac, @@ -1547,15 +1530,14 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be an active mac verify * operation). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_mac_verify_finish(psa_mac_operation_t *operation, const uint8_t *mac, @@ -1789,8 +1771,7 @@ * \retval #PSA_ERROR_STORAGE_FAILURE * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be inactive). - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code. */ @@ -1853,8 +1834,7 @@ * \retval #PSA_ERROR_STORAGE_FAILURE * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be inactive). - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code. */ @@ -1884,6 +1864,9 @@ * Success. * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active, with no IV set). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_BUFFER_TOO_SMALL * The size of the \p iv buffer is too small. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY @@ -1891,10 +1874,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_cipher_generate_iv(psa_cipher_operation_t *operation, uint8_t *iv, @@ -1925,6 +1904,9 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be an active cipher * encrypt operation, with no IV set). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INVALID_ARGUMENT * The size of \p iv is not acceptable for the chosen algorithm, * or the chosen algorithm does not use an IV. @@ -1933,10 +1915,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_cipher_set_iv(psa_cipher_operation_t *operation, const uint8_t *iv, @@ -1968,6 +1946,9 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active, with an IV set * if required for the algorithm). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_BUFFER_TOO_SMALL * The size of the \p output buffer is too small. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY @@ -1975,10 +1956,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_cipher_update(psa_cipher_operation_t *operation, const uint8_t *input, @@ -2021,6 +1998,9 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active, with an IV set * if required for the algorithm). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_BUFFER_TOO_SMALL * The size of the \p output buffer is too small. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY @@ -2028,10 +2008,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_cipher_finish(psa_cipher_operation_t *operation, uint8_t *output, @@ -2291,6 +2267,9 @@ * Success. * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be inactive). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INVALID_HANDLE * \retval #PSA_ERROR_NOT_PERMITTED * \retval #PSA_ERROR_INVALID_ARGUMENT @@ -2302,10 +2281,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_aead_encrypt_setup(psa_aead_operation_t *operation, mbedtls_svc_key_id_t key, @@ -2358,6 +2333,9 @@ * Success. * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be inactive). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INVALID_HANDLE * \retval #PSA_ERROR_NOT_PERMITTED * \retval #PSA_ERROR_INVALID_ARGUMENT @@ -2369,10 +2347,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_aead_decrypt_setup(psa_aead_operation_t *operation, mbedtls_svc_key_id_t key, @@ -2402,6 +2376,9 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be an active aead encrypt * operation, with no nonce set). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_BUFFER_TOO_SMALL * The size of the \p nonce buffer is too small. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY @@ -2409,10 +2386,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_aead_generate_nonce(psa_aead_operation_t *operation, uint8_t *nonce, @@ -2443,6 +2416,9 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active, with no nonce * set). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INVALID_ARGUMENT * The size of \p nonce is not acceptable for the chosen algorithm. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY @@ -2450,10 +2426,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_aead_set_nonce(psa_aead_operation_t *operation, const uint8_t *nonce, @@ -2489,6 +2461,9 @@ * The operation state is not valid (it must be active, and * psa_aead_update_ad() and psa_aead_update() must not have been * called yet). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INVALID_ARGUMENT * At least one of the lengths is not acceptable for the chosen * algorithm. @@ -2496,10 +2471,6 @@ * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_aead_set_lengths(psa_aead_operation_t *operation, size_t ad_length, @@ -2537,6 +2508,9 @@ * The operation state is not valid (it must be active, have a nonce * set, have lengths set if required by the algorithm, and * psa_aead_update() must not have been called yet). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INVALID_ARGUMENT * The total input length overflows the additional data length that * was previously specified with psa_aead_set_lengths(). @@ -2545,10 +2519,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_aead_update_ad(psa_aead_operation_t *operation, const uint8_t *input, @@ -2606,6 +2576,9 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active, have a nonce * set, and have lengths set if required by the algorithm). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_BUFFER_TOO_SMALL * The size of the \p output buffer is too small. * You can determine a sufficient buffer size by calling @@ -2615,18 +2588,13 @@ * The total length of input to psa_aead_update_ad() so far is * less than the additional data length that was previously * specified with psa_aead_set_lengths(). - * \retval #PSA_ERROR_INVALID_ARGUMENT - * The total input length overflows the plaintext length that + * Or, the total input length overflows the plaintext length that * was previously specified with psa_aead_set_lengths(). * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_aead_update(psa_aead_operation_t *operation, const uint8_t *input, @@ -2679,6 +2647,9 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be an active encryption * operation with a nonce set). + * Or, alterately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_BUFFER_TOO_SMALL * The size of the \p ciphertext or \p tag buffer is too small. * You can determine a sufficient buffer size for \p ciphertext by @@ -2690,8 +2661,7 @@ * The total length of input to psa_aead_update_ad() so far is * less than the additional data length that was previously * specified with psa_aead_set_lengths(). - * \retval #PSA_ERROR_INVALID_ARGUMENT - * The total length of input to psa_aead_update() so far is + * Or, the total length of input to psa_aead_update() so far is * less than the plaintext length that was previously * specified with psa_aead_set_lengths(). * \retval #PSA_ERROR_INSUFFICIENT_MEMORY @@ -2699,10 +2669,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_aead_finish(psa_aead_operation_t *operation, uint8_t *ciphertext, @@ -2761,6 +2727,9 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be an active decryption * operation with a nonce set). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_BUFFER_TOO_SMALL * The size of the \p plaintext buffer is too small. * You can determine a sufficient buffer size for \p plaintext by @@ -2770,8 +2739,7 @@ * The total length of input to psa_aead_update_ad() so far is * less than the additional data length that was previously * specified with psa_aead_set_lengths(). - * \retval #PSA_ERROR_INVALID_ARGUMENT - * The total length of input to psa_aead_update() so far is + * Or, the total length of input to psa_aead_update() so far is * less than the plaintext length that was previously * specified with psa_aead_set_lengths(). * \retval #PSA_ERROR_INSUFFICIENT_MEMORY @@ -2779,10 +2747,6 @@ * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_aead_verify(psa_aead_operation_t *operation, uint8_t *plaintext, @@ -3151,8 +3115,7 @@ * \retval #PSA_ERROR_STORAGE_FAILURE * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be inactive). - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code. */ @@ -3173,12 +3136,11 @@ * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active). - * \retval #PSA_ERROR_HARDWARE_FAILURE - * \retval #PSA_ERROR_CORRUPTION_DETECTED - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). + * Or, alterately, the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code. + * \retval #PSA_ERROR_HARDWARE_FAILURE + * \retval #PSA_ERROR_CORRUPTION_DETECTED */ psa_status_t psa_key_derivation_get_capacity( const psa_key_derivation_operation_t *operation, @@ -3201,13 +3163,12 @@ * remains unchanged. * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_key_derivation_set_capacity( psa_key_derivation_operation_t *operation, @@ -3249,9 +3210,8 @@ * \retval #PSA_SUCCESS * Success. * \retval #PSA_ERROR_INVALID_ARGUMENT - * \c step is not compatible with the operation's algorithm. - * \retval #PSA_ERROR_INVALID_ARGUMENT - * \c step does not allow direct inputs. + * \c step is not compatible with the operation's algorithm, or + * or \c step does not allow direct inputs. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE @@ -3259,8 +3219,7 @@ * \retval #PSA_ERROR_STORAGE_FAILURE * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid for this input \p step. - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). + * Or, alterately, the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code. */ @@ -3301,9 +3260,8 @@ * \retval #PSA_ERROR_INVALID_HANDLE * \retval #PSA_ERROR_NOT_PERMITTED * \retval #PSA_ERROR_INVALID_ARGUMENT - * \c step is not compatible with the operation's algorithm. - * \retval #PSA_ERROR_INVALID_ARGUMENT - * \c step does not allow key inputs of the given type + * \c step is not compatible with the operation's algorithm, + * or \c step does not allow key inputs of the given type * or does not allow key inputs at all. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE @@ -3312,8 +3270,7 @@ * \retval #PSA_ERROR_STORAGE_FAILURE * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid for this input \p step. - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code. */ @@ -3367,25 +3324,23 @@ * Success. * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid for this key agreement \p step. + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INVALID_HANDLE * \retval #PSA_ERROR_NOT_PERMITTED * \retval #PSA_ERROR_INVALID_ARGUMENT * \c private_key is not compatible with \c alg, + * or \c step does not allow an input resulting from a key agreement, * or \p peer_key is not valid for \c alg or not compatible with * \c private_key. * \retval #PSA_ERROR_NOT_SUPPORTED * \c alg is not supported or is not a key derivation algorithm. - * \retval #PSA_ERROR_INVALID_ARGUMENT - * \c step does not allow an input resulting from a key agreement. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_key_derivation_key_agreement( psa_key_derivation_operation_t *operation, @@ -3422,15 +3377,14 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active and completed * all required input steps). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_key_derivation_output_bytes( psa_key_derivation_operation_t *operation, @@ -3562,16 +3516,15 @@ * \retval #PSA_ERROR_BAD_STATE * The operation state is not valid (it must be active and completed * all required input steps). + * Or, alternately, the library has not been previously initialized by psa_crypto_init(). + * It is implementation-dependent whether a failure to initialize + * results in this error code. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_INSUFFICIENT_STORAGE * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_STORAGE_FAILURE - * \retval #PSA_ERROR_BAD_STATE - * The library has not been previously initialized by psa_crypto_init(). - * It is implementation-dependent whether a failure to initialize - * results in this error code. */ psa_status_t psa_key_derivation_output_key( const psa_key_attributes_t *attributes, @@ -3636,9 +3589,8 @@ * \retval #PSA_ERROR_INVALID_HANDLE * \retval #PSA_ERROR_NOT_PERMITTED * \retval #PSA_ERROR_INVALID_ARGUMENT - * \p alg is not a key agreement algorithm - * \retval #PSA_ERROR_INVALID_ARGUMENT - * \p private_key is not compatible with \p alg, + * \p alg is not a key agreement algorithm, + * or \p private_key is not compatible with \p alg, * or \p peer_key is not valid for \p alg or not compatible with * \p private_key. * \retval #PSA_ERROR_BUFFER_TOO_SMALL diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_accel_driver.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_accel_driver.h index e762c13..3636e7e 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_accel_driver.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_accel_driver.h @@ -657,6 +657,7 @@ * \param[in] key_size The size in bytes of the `p_key` data * \param[in] alg A signature algorithm that is compatible * with the type of `p_key` + * \param[in] key_type Key type (one of the PSA_KEY_TYPE_xxx constants) * \param[in] p_hash The hash or message to sign * \param[in] hash_length Size of the `p_hash` buffer in bytes * \param[out] p_signature Buffer where the signature is to be written @@ -696,6 +697,7 @@ * \param[in] key_size The size in bytes of the `p_key` data * \param[in] alg A signature algorithm that is compatible with * the type of `key` + * \param[in] key_type Key type (one of the PSA_KEY_TYPE_xxx constants) * \param[in] p_hash The hash or message whose signature is to be * verified * \param[in] hash_length Size of the `p_hash` buffer in bytes @@ -734,6 +736,7 @@ * \param[in] key_size The size in bytes of the `p_key` data * \param[in] alg An asymmetric encryption algorithm that is * compatible with the type of `key` + * \param[in] key_type Key type (one of the PSA_KEY_TYPE_xxx constants) * \param[in] p_input The message to encrypt * \param[in] input_length Size of the `p_input` buffer in bytes * \param[in] p_salt A salt or label, if supported by the @@ -786,6 +789,7 @@ * \param[in] key_size The size in bytes of the `p_key` data * \param[in] alg An asymmetric encryption algorithm that is * compatible with the type of `key` + * \param[in] key_type Key type (one of the PSA_KEY_TYPE_xxx constants) * \param[in] p_input The message to decrypt * \param[in] input_length Size of the `p_input` buffer in bytes * \param[in] p_salt A salt or label, if supported by the diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_compat.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_compat.h index 5bb5669..da51d08 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_compat.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_compat.h @@ -1,5 +1,5 @@ /** - * \file psa/crypto_compat.h + * \file * * \brief PSA cryptography module: Backward compatibility aliases * @@ -84,14 +84,29 @@ /* * Deprecated PSA Crypto error code definitions (PSA Crypto API <= 1.0 beta2) */ +/** + * \deprecated Replaced by #PSA_ERROR_GENERIC_ERROR + */ #define PSA_ERROR_UNKNOWN_ERROR \ MBEDTLS_DEPRECATED_CONSTANT( psa_status_t, PSA_ERROR_GENERIC_ERROR ) +/** + * \deprecated Replaced by #PSA_ERROR_ALREADY_EXISTS + */ #define PSA_ERROR_OCCUPIED_SLOT \ MBEDTLS_DEPRECATED_CONSTANT( psa_status_t, PSA_ERROR_ALREADY_EXISTS ) +/** + * \deprecated Replaced by #PSA_ERROR_DOES_NOT_EXIST + */ #define PSA_ERROR_EMPTY_SLOT \ MBEDTLS_DEPRECATED_CONSTANT( psa_status_t, PSA_ERROR_DOES_NOT_EXIST ) +/** + * \deprecated Replaced by #PSA_ERROR_INSUFFICIENT_DATA + */ #define PSA_ERROR_INSUFFICIENT_CAPACITY \ MBEDTLS_DEPRECATED_CONSTANT( psa_status_t, PSA_ERROR_INSUFFICIENT_DATA ) +/** + * \deprecated Replaced by #PSA_ERROR_CORRUPTION_DETECTED + */ #define PSA_ERROR_TAMPERING_DETECTED \ MBEDTLS_DEPRECATED_CONSTANT( psa_status_t, PSA_ERROR_CORRUPTION_DETECTED ) diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_extra.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_extra.h index 010c6eb..ddac62e 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_extra.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_extra.h @@ -1,5 +1,5 @@ /** - * \file psa/crypto_extra.h + * \file * * \brief PSA cryptography module: Mbed TLS vendor extensions * @@ -36,7 +36,7 @@ extern "C" { #endif -/* UID for secure storage seed */ +/** UID for secure storage seed */ #define PSA_CRYPTO_ITS_RANDOM_SEED_UID 0xFFFFFF52 diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_platform.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_platform.h index 567398d..6166740 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_platform.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_platform.h @@ -1,5 +1,5 @@ /** - * \file psa/crypto_platform.h + * \file * * \brief PSA cryptography module: Mbed TLS platform definitions * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_se_driver.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_se_driver.h index 498031b..3c0e813 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_se_driver.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_se_driver.h @@ -1245,6 +1245,8 @@ /** \brief A function that performs the final step of a secure element key * agreement and place the generated key material in a buffer * + * \param[in,out] op_context A hardware-specific structure containing any + * context information for the implementation * \param[out] p_output Buffer in which to place the generated key * material * \param[in] output_size The size in bytes of `p_output` diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_sizes.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_sizes.h index 3df01b2..66d2ad4 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_sizes.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_sizes.h @@ -1,5 +1,5 @@ /** - * \file psa/crypto_sizes.h + * \file * * \brief PSA cryptography module: Mbed TLS buffer size macros * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_types.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_types.h index 0a2ae54..523df5d 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_types.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_types.h @@ -1,5 +1,5 @@ /** - * \file psa/crypto_types.h + * \file * * \brief PSA cryptography module: type aliases. * @@ -231,6 +231,9 @@ typedef uint32_t psa_key_id_t; #if !defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER) +/** + * Identifier for persistent keys. See #psa_key_lifetime_t. + */ typedef psa_key_id_t mbedtls_svc_key_id_t; #else /* MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER */ diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h index e6a6918..40ec30b 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h @@ -1,5 +1,5 @@ /** - * \file psa/crypto_values.h + * \file * * \brief PSA cryptography module: macros to build and analyze integer values. * @@ -1600,9 +1600,15 @@ */ #define PSA_KEY_PERSISTENCE_READ_ONLY ((psa_key_persistence_t)0xff) +/** + * Get the persistence (see #psa_key_persistence_t) from a #psa_key_lifetime_t. + */ #define PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) \ ((psa_key_persistence_t)((lifetime) & 0x000000ff)) +/** + * Get the location (see #psa_key_location_t) from a #psa_key_lifetime_t. + */ #define PSA_KEY_LIFETIME_GET_LOCATION(lifetime) \ ((psa_key_location_t)((lifetime) >> 8)) diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/protected_storage.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/protected_storage.h index 6b299a3..9a91a9d 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/protected_storage.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/protected_storage.h @@ -145,9 +145,9 @@ * has its own UID space, making other partitions' data unadressable * \retval PSA_ERROR_STORAGE_FAILURE The create action has a physical storage error * \retval PSA_ERROR_INSUFFICIENT_STORAGE The maximum size is bigger of the current available space - * \retval PSA_ERROR_NOT_SUPPORTED One or more create_flags are not valid or supported + * \retval PSA_ERROR_NOT_SUPPORTED One or more create_flags are not valid or supported. + * Or, the implementation of the API does not support this function * \retval PSA_ERROR_INVALID_ARGUMENT The asset exists and the input paramters are not the same as the existing asset - * \retval PSA_ERROR_NOT_SUPPORTED The implementation of the API does not support this function * \retval PSA_ERROR_GENERIC_ERROR The operation has failed due to an unspecified error */ psa_status_t psa_ps_create(psa_storage_uid_t uid, diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/storage_common.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/storage_common.h index 1747f14..ecc9057 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/storage_common.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/inc/psa/storage_common.h @@ -51,7 +51,7 @@ psa_storage_create_flags_t flags; /**< The flags set when the uid was created **/ }; -/** \brief Flag indicating that \ref psa_storage_create and \ref psa_storage_set_extended are supported */ +/** Flag indicating that \ref psa_ps_create and \ref psa_ps_set_extended are supported */ #define PSA_STORAGE_SUPPORT_SET_EXTENDED (1 << 0) /** \brief PSA storage specific error codes */ diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/crypto_struct.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/crypto_struct.h index 6a018e1..29d9b25 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/crypto_struct.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/crypto_struct.h @@ -1,5 +1,5 @@ /** - * \file psa/crypto_struct.h + * \file * * \brief PSA cryptography module: Mbed TLS structured type implementations * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/psa_crypto_its.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/psa_crypto_its.h index 11703a0..3f92186 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/psa_crypto_its.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/psa_crypto_its.h @@ -51,7 +51,7 @@ psa_storage_create_flags_t flags; /**< The flags set when the uid was created **/ }; -/** Flag indicating that \ref psa_storage_create and \ref psa_storage_set_extended are supported */ +/** Flag indicating that \ref psa_ps_create and \ref psa_ps_set_extended are supported */ #define PSA_STORAGE_SUPPORT_SET_EXTENDED (1 << 0) /** \brief PSA storage specific error codes @@ -99,7 +99,6 @@ * * \retval #PSA_SUCCESS The operation completed successfully * \retval #PSA_ERROR_DOES_NOT_EXIST The operation failed because the provided `uid` value was not found in the storage - * \retval #PSA_ERROR_INVALID_SIZE The operation failed because the data associated with provided uid is larger than `data_size` * \retval #PSA_ERROR_STORAGE_FAILURE The operation failed because the physical storage has failed (Fatal error) * \retval #PSA_ERROR_INVALID_ARGUMENT The operation failed because one of the provided pointers(`p_data`, `p_data_length`) * is invalid. For example is `NULL` or references memory the caller cannot access. diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/psa_crypto_slot_management.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/psa_crypto_slot_management.h index ef0814a..4e6044e 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/psa_crypto_slot_management.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/mbedtls/psa_crypto_slot_management.h @@ -1,5 +1,7 @@ -/* - * PSA crypto layer on top of Mbed TLS crypto +/** + * \file + * + * \brief PSA crypto layer on top of Mbed TLS crypto */ /* * Copyright The Mbed TLS Contributors @@ -25,7 +27,7 @@ #include "psa_crypto_core.h" #include "psa_crypto_se.h" -/* Number of key slots (plus one because 0 is not used). +/** Number of key slots (plus one because 0 is not used). * The value is a compile-time constant for now, for simplicity. */ #define PSA_KEY_SLOT_COUNT 32 diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/attestation.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/attestation.h index b2b8d1b..28d6da4e 100755 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/attestation.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/attestation.h @@ -34,7 +34,7 @@ * * \param[in] major_type Major type of TLV entries to copy * \param[out] ptr Pointer to the buffer to store the boot data - * \parma[in] len Size of the buffer to store the boot data + * \param[in] len Size of the buffer to store the boot data * * \return Returns error code as specified in \ref psa_attest_err_t */ @@ -57,7 +57,7 @@ * \param[in] addr Pointer to the base of the address range to check * \param[in] size Size of the address range to check * \param[in] access Type of memory access as specified in - * \ref attest_memory_access + * \ref attest_memory_access_t * * \return Returns error code as specified in \ref psa_attest_err_t */ @@ -81,7 +81,7 @@ * \param[in] in_vec Pointer to in_vec array, which contains input data * to attestation service * \param[in] num_invec Number of elements in in_vec array - * \param[in/out] out_vec Pointer out_vec array, which contains output data + * \param[inout] out_vec Pointer out_vec array, which contains output data * to attestation service * \param[in] num_outvec Number of elements in out_vec array * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/psa_attest_inject_key.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/psa_attest_inject_key.h index 3e934d3..a649240 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/psa_attest_inject_key.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/psa_attest_inject_key.h @@ -47,11 +47,11 @@ * In case of private key generation - 0 will pass. * \param type Key type - must be a ECC key type * (a \c PSA_KEY_TYPE_ECC_KEYPAIR(PSA_ECC_CURVE_XXX) value). - * \param[out] data Buffer where the key data is to be written. - * \param data_size Size of the \p data buffer in bytes - - * needs to be bigger then the max size of the public part. - * \param[out] data_length On success, the number of bytes - * that make up the key data. + * \param[out] public_key_data Buffer where the key data is to be written. + * \param public_key_data_size Size of the \p public_key_data buffer in bytes - + * needs to be bigger then the max size of the public part. + * \param[out] public_key_data_length On success, the number of bytes + * that make up the key data. * * \retval #PSA_SUCCESS * Success. diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/psa_initial_attestation_api.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/psa_initial_attestation_api.h index b797c0a..cf9f77f 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/psa_initial_attestation_api.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/psa_initial_attestation_api.h @@ -12,7 +12,7 @@ /* to a stable set of APIs once all the feedback has been considered. */ /***************************************************************************/ -/** @defgroup PSA-Attestation +/** @defgroup PSA-Attestation PSA-Attestation @ingroup experimental-crypto-psa * @{ */ @@ -29,6 +29,125 @@ #endif /** +* \file +* The list of fixed claims in the initial attestation token is still evolving, +* you can expect slight changes in the future. +* +* The initial attestation token is planned to be aligned with future version of +* Entity Attestation Token format: +* https://tools.ietf.org/html/draft-mandyam-eat-01 +* +* Current list of claims: +*
    +*
  • \b Challenge: Input object from caller. Can be a single nonce from server +* or hash of nonce and attested data. It is intended to provide +* freshness to reports and the caller has responsibility to +* arrange this. Allowed length: 32, 48, 64 bytes. The claim is +* modeled to be eventually represented by the EAT standard +* claim nonce. Until such a time as that standard exists, +* the claim will be represented by a custom claim. Value +* is encoded as byte string.
  • +* +*
  • \b Instance ID: It represents the unique identifier of the instance. In the +* PSA definition it is a hash of the public attestation key +* of the instance. The claim is modeled to be eventually +* represented by the EAT standard claim UEID of type GUID. +* Until such a time as that standard exists, the claim will be +* represented by a custom claim Value is encoded as byte +* string.
  • +* +*
  • \b Verification service indicator: Optional, recommended claim. It is used by +* a Relying Party to locate a validation service for the token. +* The value is a text string that can be used to locate the +* service or a URL specifying the address of the service. The +* claim is modeled to be eventually represented by the EAT +* standard claim origination. Until such a time as that +* standard exists, the claim will be represented by a custom +* claim. Value is encoded as text string.
  • +* +*
  • \b Profile definition: Optional, recommended claim. It contains the name of +* a document that describes the 'profile' of the token, being +* a full description of the claims, their usage, verification +* and token signing. The document name may include versioning. +* Custom claim with a value encoded as text string.
  • +* +*
  • \b Implementation ID: It represents the original implementation signer of the +* attestation key and identifies the contract between the +* report and verification. A verification service will use this +* claim to locate the details of the verification process. +* Custom claim with a value encoded as byte string.
  • +* +*
  • \b Security lifecycle: It represents the current lifecycle state of the +* instance. Custom claim with a value encoded as integer that +* is divided to convey a major state and a minor state. The +* PSA state and implementation state are encoded as follows:
      +*
    • version[15:8] - PSA lifecycle state - major
    • +*
    • version[7:0] - IMPLEMENTATION DEFINED state - minor
    +* Possible PSA lifecycle states:
      +*
    • Unknown (0x1000u)
    • +*
    • PSA_RoT_Provisioning (0x2000u)
    • +*
    • Secured (0x3000u)
    • +*
    • Non_PSA_RoT_Debug(0x4000u)
    • +*
    • Recoverable_PSA_RoT_Debug (0x5000u)
    • +*
    • Decommissioned (0x6000u)
  • +* +*
  • \b Client ID: The partition ID of that secure partition or non-secure +* thread who called the initial attestation API. Custom claim +* with a value encoded as a *signed* integer. Negative number +* represents non-secure caller, positive numbers represents +* secure callers, zero is invalid.
  • +* +*
  • \b HW version: Optional claim. Globally unique number in EAN-13 format +* identifying the GDSII that went to fabrication, HW and ROM. +* It can be used to reference the security level of the PSA-ROT +* via a certification website. Custom claim with a value is +* encoded as text string.
  • + +*
  • \b Boot seed: It represents a random value created at system boot time that +* will allow differentiation of reports from different system +* sessions. The size is 32 bytes. Custom claim with a value is +* encoded as byte string.
  • +* +*
  • \b Software components: Recommended claim. It represents the software state +* of the system. The value of the claim is an array of CBOR map +* entries, with one entry per software component within the +* device. Each map contains multiple claims that describe +* evidence about the details of the software component.
  • +* +*
  • \b Measurement type: Optional claim. It represents the role of the +* software component. Value is encoded as short(!) text +* string.
  • +* +*
  • \b Measurement value: It represents a hash of the invariant software +* component in memory at start-up time. The value must be a +* cryptographic hash of 256 bits or stronger.Value is +* encoded as byte string.
  • +* +*
  • \b Security epoch: Optional claim. It represents the security control +* point of the software component. Value is encoded as +* unsigned integer.
  • +* +*
  • \b Version: Optional claim. It represents the issued software version. +* Value is encoded as text string.
  • +* +*
  • \b Signer ID: It represents the hash of a signing authority public key. +* Value is encoded as byte string.
  • +* +*
  • \b Measurement description: Optional claim. It represents the way in which +* the measurement value of the software component is +* computed. Value is encoded as text string containing an +* abbreviated description (name) of the measurement method.
  • +* +*
  • \b No software measurements: In the event that the implementation does not +* contain any software measurements then the software +* components claim above can be omitted but instead +* it is mandatory to include this claim to indicate this is a +* deliberate state. Custom claim a value is encoded as unsigned +* integer set to 1.
  • +*
+*/ + +/** * \brief PSA INITIAL ATTESTATION API version */ #define PSA_INITIAL_ATTEST_API_VERSION_MAJOR (0) @@ -61,143 +180,26 @@ PSA_ATTEST_ERR_FORCE_INT_SIZE = INT_MAX }; -/** +/* * The allowed size of input challenge in bytes: 32, 48, 64 * Challenge can be a nonce from server * or the hash of some combined data : nonce + attested data by caller. */ -#define PSA_INITIAL_ATTEST_CHALLENGE_SIZE_32 (32u) -#define PSA_INITIAL_ATTEST_CHALLENGE_SIZE_48 (48u) -#define PSA_INITIAL_ATTEST_CHALLENGE_SIZE_64 (64u) - -/** - * The list of fixed claims in the initial attestation token is still evolving, - * you can expect slight changes in the future. - * - * The initial attestation token is planned to be aligned with future version of - * Entity Attestation Token format: - * https://tools.ietf.org/html/draft-mandyam-eat-01 - * - * Current list of claims: - * - Challenge: Input object from caller. Can be a single nonce from server - * or hash of nonce and attested data. It is intended to provide - * freshness to reports and the caller has responsibility to - * arrange this. Allowed length: 32, 48, 64 bytes. The claim is - * modeled to be eventually represented by the EAT standard - * claim nonce. Until such a time as that standard exists, - * the claim will be represented by a custom claim. Value - * is encoded as byte string. - * - * - Instance ID: It represents the unique identifier of the instance. In the - * PSA definition it is a hash of the public attestation key - * of the instance. The claim is modeled to be eventually - * represented by the EAT standard claim UEID of type GUID. - * Until such a time as that standard exists, the claim will be - * represented by a custom claim Value is encoded as byte - * string. - * - * - Verification service indicator: Optional, recommended claim. It is used by - * a Relying Party to locate a validation service for the token. - * The value is a text string that can be used to locate the - * service or a URL specifying the address of the service. The - * claim is modeled to be eventually represented by the EAT - * standard claim origination. Until such a time as that - * standard exists, the claim will be represented by a custom - * claim. Value is encoded as text string. - * - * - Profile definition: Optional, recommended claim. It contains the name of - * a document that describes the 'profile' of the token, being - * a full description of the claims, their usage, verification - * and token signing. The document name may include versioning. - * Custom claim with a value encoded as text string. - * - * - Implementation ID: It represents the original implementation signer of the - * attestation key and identifies the contract between the - * report and verification. A verification service will use this - * claim to locate the details of the verification process. - * Custom claim with a value encoded as byte string. - * - * - Security lifecycle: It represents the current lifecycle state of the - * instance. Custom claim with a value encoded as integer that - * is divided to convey a major state and a minor state. The - * PSA state and implementation state are encoded as follows: - * - version[15:8] - PSA lifecycle state - major - * - version[7:0] - IMPLEMENTATION DEFINED state - minor - * Possible PSA lifecycle states: - * - Unknown (0x1000u), - * - PSA_RoT_Provisioning (0x2000u), - * - Secured (0x3000u), - * - Non_PSA_RoT_Debug(0x4000u), - * - Recoverable_PSA_RoT_Debug (0x5000u), - * - Decommissioned (0x6000u) - * - * - Client ID: The partition ID of that secure partition or non-secure - * thread who called the initial attestation API. Custom claim - * with a value encoded as a *signed* integer. Negative number - * represents non-secure caller, positive numbers represents - * secure callers, zero is invalid. - * - * - HW version: Optional claim. Globally unique number in EAN-13 format - * identifying the GDSII that went to fabrication, HW and ROM. - * It can be used to reference the security level of the PSA-ROT - * via a certification website. Custom claim with a value is - * encoded as text string. - - * - Boot seed: It represents a random value created at system boot time that - * will allow differentiation of reports from different system - * sessions. The size is 32 bytes. Custom claim with a value is - * encoded as byte string. - * - * - Software components: Recommended claim. It represents the software state - * of the system. The value of the claim is an array of CBOR map - * entries, with one entry per software component within the - * device. Each map contains multiple claims that describe - * evidence about the details of the software component. - * - * - Measurement type: Optional claim. It represents the role of the - * software component. Value is encoded as short(!) text - * string. - * - * - Measurement value: It represents a hash of the invariant software - * component in memory at start-up time. The value must be a - * cryptographic hash of 256 bits or stronger.Value is - * encoded as byte string. - * - * - Security epoch: Optional claim. It represents the security control - * point of the software component. Value is encoded as - * unsigned integer. - * - * - Version: Optional claim. It represents the issued software version. - * Value is encoded as text string. - * - * - Signer ID: It represents the hash of a signing authority public key. - * Value is encoded as byte string. - * - * - Measurement description: Optional claim. It represents the way in which - * the measurement value of the software component is - * computed. Value is encoded as text string containing an - * abbreviated description (name) of the measurement method. - * - * - No software measurements: In the event that the implementation does not - * contain any software measurements then the software - * components claim above can be omitted but instead - * it is mandatory to include this claim to indicate this is a - * deliberate state. Custom claim a value is encoded as unsigned - * integer set to 1. - */ +#define PSA_INITIAL_ATTEST_CHALLENGE_SIZE_32 (32u) ///< 32 byte challenge +#define PSA_INITIAL_ATTEST_CHALLENGE_SIZE_48 (48u) ///< 48 byte challenge +#define PSA_INITIAL_ATTEST_CHALLENGE_SIZE_64 (64u) ///< 64 byte challenge /** * \brief Get initial attestation token * * \param[in] challenge_obj Pointer to buffer where challenge input is * stored. Nonce and / or hash of attested data. - * Must be always - * \ref PSA_INITIAL_ATTEST_CHALLENGE_SIZE bytes - * long. + * Must have a length equal to one of the + * PSA_INITIAL_ATTEST_CHALLENGE_SIZE_xxx constants. * \param[in] challenge_size Size of challenge object in bytes. * \param[out] token Pointer to the buffer where attestation token * must be stored. - * \param[in/out] token_size Size of allocated buffer for token, which + * \param[inout] token_size Size of allocated buffer for token, which * updated by initial attestation service with * final token size. * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/qcbor/inc/qcbor.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/qcbor/inc/qcbor.h index 8f061fb..15f5423 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/qcbor/inc/qcbor.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/qcbor/inc/qcbor.h @@ -1706,6 +1706,8 @@ @param[in] pCtx The decoder context to set up an allocator for @param[in] pAllocator The string allocator "object" + @param[in] bAllocAll Force copying of even definite length strings using this allocator. + Otherwise, if false, definite-length byte and text strings are simply decoded as pointers into the source data. See QCBORStringAllocator for the requirements of the string allocator. @@ -1719,7 +1721,7 @@ You can also write your own allocator. Create the allocate, free, and destroy functions and put pointers to them in a QCBORStringAllocator. */ -void QCBORDecode_SetUpAllocator(QCBORDecodeContext *pCtx, const QCBORStringAllocator *pAllocator, bool bAllStrings); +void QCBORDecode_SetUpAllocator(QCBORDecodeContext *pCtx, const QCBORStringAllocator *pAllocator, bool bAllocAll); /** diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/t_cose/src/t_cose_util.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/t_cose/src/t_cose_util.h index 7b39dc3..e4bafa8 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/t_cose/src/t_cose_util.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/t_cose/src/t_cose_util.h @@ -66,7 +66,7 @@ * * \retval T_COSE_ERR_SIG_STRUCT * Most likely this is because the protected_headers passed in - * is larger than \ref T_COSE_SIGN1_MAX_PROT_HEADER. + * is larger than T_COSE_SIGN1_MAX_PROT_HEADER. * \retval T_COSE_ERR_UNSUPPORTED_HASH * If the hash algorithm is not known. * \retval T_COSE_ERR_HASH_GENERAL_FAIL diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/tfm_plat_defs.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/tfm_plat_defs.h index 66747ee..7418467 100755 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/tfm_plat_defs.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/tfm_plat_defs.h @@ -8,6 +8,8 @@ #ifndef __TFM_PLAT_DEFS_H__ #define __TFM_PLAT_DEFS_H__ /** + * \file + * * \note The interfaces defined in this file must be implemented for each * target. */ @@ -15,6 +17,9 @@ #include #include +/** + * Error enum for TFM platform functions + */ enum tfm_plat_err_t { TFM_PLAT_ERR_SUCCESS = 0, TFM_PLAT_ERR_SYSTEM_ERR, diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/tfm_plat_device_id.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/tfm_plat_device_id.h index dcce837..1179c02 100755 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/tfm_plat_device_id.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/tfm_impl/tfm_plat_device_id.h @@ -62,12 +62,12 @@ * 128 & 256 bits but this implementation will use the full 256 bits to * accommodate a hash result. * - * \param[in/out] size As an input value it indicates the size of the caller + * \param[inout] size As an input value it indicates the size of the caller * allocated buffer (in bytes) to store the UEID. At return * its value is updated with the exact size of the UEID. * \param[out] buf Pointer to the buffer to store the UEID * - * \return Returns error code specified in \ref tfm_plat_err_t + * \return Returns error code specified in #tfm_plat_err_t */ enum tfm_plat_err_t tfm_plat_get_instance_id(uint32_t *size, uint8_t *buf); @@ -81,13 +81,13 @@ * custom EAT claim with a value consisting of a CBOR byte string. The size of * this string will normally be 32 bytes to accommodate a 256 bit hash. * - * \param[in/out] size As an input value it indicates the size of the caller + * \param[inout] size As an input value it indicates the size of the caller * allocated buffer (in bytes) to store the implementation * ID. At return its value is updated with the exact size * of the implementation ID. * \param[out] buf Pointer to the buffer to store the implementation ID * - * \return Returns error code specified in \ref tfm_plat_err_t + * \return Returns error code specified in #tfm_plat_err_t */ enum tfm_plat_err_t tfm_plat_get_implementation_id(uint32_t *size, uint8_t *buf); @@ -100,13 +100,13 @@ * It is recommended to use for identification the format of the European * Article Number: EAN-13+5. * - * \param[in/out] size As an input value it indicates the size of the caller + * \param[inout] size As an input value it indicates the size of the caller * allocated buffer (in bytes) to store the HW version. At * return its value is updated with the exact size of the * HW version. * \param[out] buf Pointer to the buffer to store the HW version * - * \return Returns error code specified in \ref tfm_plat_err_t + * \return Returns error code specified in #tfm_plat_err_t */ enum tfm_plat_err_t tfm_plat_get_hw_version(uint32_t *size, uint8_t *buf); diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/test_abstraction_layers/pal/pal_interfaces_ns.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/test_abstraction_layers/pal/pal_interfaces_ns.h index 6393a47..9624a88 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/test_abstraction_layers/pal/pal_interfaces_ns.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/test_abstraction_layers/pal/pal_interfaces_ns.h @@ -22,17 +22,17 @@ #include /** - @brief - This function will read peripherals using SPI commands - @param - addr : address of the peripheral - - data : read buffer - - len : length of the read buffer in bytes - @return - error status + @brief This function will read peripherals using SPI commands + @param addr address of the peripheral + @param data read buffer + @param len length of the read buffer in bytes + @return error status **/ int pal_spi_read(addr_t addr, uint8_t *data, uint32_t len); /** - * @brief - Retrieve the version of the PSA Framework API that is implemented. - * This is a wrapper API for psa_framework_version API. + * @brief Retrieve the version of the PSA Framework API that is implemented. + * This is a wrapper API for psa_framework_version API. * @param - void * @return - The PSA Framework API version. * Note - Return PAL_STATUS_ERROR if PSA IPC is not implemented. diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/mbedtls_svc_key_id.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/mbedtls_svc_key_id.h index 9679b91..22d4c19 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/mbedtls_svc_key_id.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/mbedtls_svc_key_id.h @@ -44,8 +44,6 @@ return( key == 0 ); } -/**@}*/ - #ifdef __cplusplus } #endif diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto.h index 5ccc5e7..eb88763 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto.h + * \file * \brief Platform Security Architecture cryptography module */ diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_compat.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_compat.h index 9a7de89..200252b 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_compat.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_compat.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_compat.h + * \file * * \brief PSA cryptography module: Backward compatibility aliases * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_extra.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_extra.h index e75c78f..0607005 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_extra.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_extra.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_extra.h + * \file * * \brief PSA cryptography module: vendor extensions * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_platform.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_platform.h index c3120e4..067295b 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_platform.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_platform.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_platform.h + * \file * * \brief PSA cryptography module: Mbed TLS platform definitions * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_sizes.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_sizes.h index 1e282e2..18052f6 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_sizes.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_sizes.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_sizes.h + * \file * * \brief PSA cryptography module: Mbed TLS buffer size macros * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_struct.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_struct.h index e0ceb2f..4318e09 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_struct.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_struct.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_struct.h + * \file * * \brief PSA cryptography module: structured type implementations * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_types.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_types.h index 0588d51..2f0a61d 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_types.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_types.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_types.h + * \file * * \brief PSA cryptography module: type aliases. * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h index d4bd565..f5134c1 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_values.h + * \file * * \brief PSA cryptography module: macros to build and analyze integer values. * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/error.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/error.h index e8903f0..8496ec1 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/error.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/include/psa/error.h @@ -6,7 +6,7 @@ */ /** - * \file psa/error.h + * \file * \brief Standard error codes for the SPM and RoT Services */ diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/mbedtls_svc_key_id.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/mbedtls_svc_key_id.h index 9679b91..22d4c19 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/mbedtls_svc_key_id.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/mbedtls_svc_key_id.h @@ -44,8 +44,6 @@ return( key == 0 ); } -/**@}*/ - #ifdef __cplusplus } #endif diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto.h index 9158117..23d76fe 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto.h + * \file * \brief Platform Security Architecture cryptography module */ diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_compat.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_compat.h index 518008b..97f1d9b 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_compat.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_compat.h @@ -1,5 +1,5 @@ /** - * \file psa/crypto_compat.h + * \file * * \brief PSA cryptography module: Backward compatibility aliases * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_extra.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_extra.h index e24f94a..87e7e48 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_extra.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_extra.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_extra.h + * \file * * \brief PSA cryptography module: vendor extensions * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_platform.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_platform.h index c3120e4..067295b 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_platform.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_platform.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_platform.h + * \file * * \brief PSA cryptography module: Mbed TLS platform definitions * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_sizes.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_sizes.h index 4f67501..bd541c3 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_sizes.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_sizes.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_sizes.h + * \file * * \brief PSA cryptography module: Mbed TLS buffer size macros * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_struct.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_struct.h index 403a734..9e5e374 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_struct.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_struct.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_struct.h + * \file * * \brief PSA cryptography module: structured type implementations * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_types.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_types.h index b8cc71e..97298f8 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_types.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_types.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_types.h + * \file * * \brief PSA cryptography module: type aliases. * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h index e7b91dc..eff01ab 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h @@ -5,7 +5,7 @@ * */ /** - * \file psa/crypto_values.h + * \file * * \brief PSA cryptography module: macros to build and analyze integer values. * diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/error.h b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/error.h index 439dba4..c1c4e79 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/error.h +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/include/psa/error.h @@ -6,7 +6,7 @@ */ /** - * \file psa/error.h + * \file * \brief Standard error codes for the SPM and RoT Services */ diff --git a/platform/include/platform/mbed_atomic.h b/platform/include/platform/mbed_atomic.h index b0268a2..5d015d4 100644 --- a/platform/include/platform/mbed_atomic.h +++ b/platform/include/platform/mbed_atomic.h @@ -139,10 +139,10 @@ */ MBED_INLINE_IF_EX bool core_util_atomic_flag_test_and_set(volatile core_util_atomic_flag *flagPtr); -/** \ copydoc core_util_atomic_flag_test_and_set +/** \copydoc core_util_atomic_flag_test_and_set * @param order memory ordering constraint */ -MBED_FORCEINLINE bool core_util_atomic_flag_test_and_set_explicit(volatile core_util_atomic_flag *valuePtr, mbed_memory_order order); +MBED_FORCEINLINE bool core_util_atomic_flag_test_and_set_explicit(volatile core_util_atomic_flag *flagPtr, mbed_memory_order order); /** * Atomic clear. @@ -151,7 +151,7 @@ */ MBED_FORCEINLINE void core_util_atomic_flag_clear(volatile core_util_atomic_flag *flagPtr); -/** \ copydoc core_util_atomic_flag_clear +/** \copydoc core_util_atomic_flag_clear * @param order memory ordering constraint */ MBED_FORCEINLINE void core_util_atomic_flag_clear_explicit(volatile core_util_atomic_flag *flagPtr, mbed_memory_order order); @@ -452,19 +452,21 @@ /** \copydoc core_util_atomic_load_u8 */ MBED_FORCEINLINE int64_t core_util_atomic_load_s64(const volatile int64_t *valuePtr); -/** \copydoc core_util_atomic_load_u8 */ +/** \copydoc core_util_atomic_load_u8 + * @param order Currently unused since 64-bit atomic ops must be emulated + */ MBED_FORCEINLINE int64_t core_util_atomic_load_explicit_s64(const volatile int64_t *valuePtr, MBED_UNUSED mbed_memory_order order); /** \copydoc core_util_atomic_load_u8 */ MBED_FORCEINLINE bool core_util_atomic_load_bool(const volatile bool *valuePtr); -/** \copydoc core_util_atomic_load_u8 */ +/** \copydoc core_util_atomic_load_explicit_u8 */ MBED_FORCEINLINE bool core_util_atomic_load_explicit_bool(const volatile bool *valuePtr, mbed_memory_order order); /** \copydoc core_util_atomic_load_u8 */ MBED_FORCEINLINE void *core_util_atomic_load_ptr(void *const volatile *valuePtr); -/** \copydoc core_util_atomic_load_u8 */ +/** \copydoc core_util_atomic_load_explicit_u8 */ MBED_FORCEINLINE void *core_util_atomic_load_explicit_ptr(void *const volatile *valuePtr, mbed_memory_order order); /** @@ -907,20 +909,20 @@ /** \copydoc core_util_atomic_store_u8 */ template void core_util_atomic_store(T *valuePtr, mstd::type_identity_t desiredValue) noexcept; /** \copydoc core_util_atomic_exchange_u8 */ -template T core_util_atomic_exchange(volatile T *ptr, mstd::type_identity_t desiredValue) noexcept; +template T core_util_atomic_exchange(volatile T *valuePtr, mstd::type_identity_t desiredValue) noexcept; /** \copydoc core_util_atomic_cas_u8 */ template bool core_util_atomic_compare_exchange_strong(volatile T *ptr, mstd::type_identity_t *expectedCurrentValue, mstd::type_identity_t desiredValue) noexcept; /** \copydoc core_util_atomic_compare_exchange_weak_u8 */ template bool core_util_atomic_compare_exchange_weak(volatile T *ptr, mstd::type_identity_t *expectedCurrentValue, mstd::type_identity_t desiredValue) noexcept; -/** \copydoc core_util_fetch_add_u8 */ +/** \copydoc core_util_atomic_fetch_add_u8 */ template T core_util_atomic_fetch_add(volatile T *valuePtr, mstd::type_identity_t arg) noexcept; -/** \copydoc core_util_fetch_sub_u8 */ +/** \copydoc core_util_atomic_fetch_sub_u8 */ template T core_util_atomic_fetch_sub(volatile T *valuePtr, mstd::type_identity_t arg) noexcept; -/** \copydoc core_util_fetch_and_u8 */ +/** \copydoc core_util_atomic_fetch_and_u8 */ template T core_util_atomic_fetch_and(volatile T *valuePtr, mstd::type_identity_t arg) noexcept; -/** \copydoc core_util_fetch_or_u8 */ +/** \copydoc core_util_atomic_fetch_or_u8 */ template T core_util_atomic_fetch_or(volatile T *valuePtr, mstd::type_identity_t arg) noexcept; -/** \copydoc core_util_fetch_xor_u8 */ +/** \copydoc core_util_atomic_fetch_xor_u8 */ template T core_util_atomic_fetch_xor(volatile T *valuePtr, mstd::type_identity_t arg) noexcept; /** \copydoc core_util_atomic_load_explicit_u8 */ @@ -932,58 +934,58 @@ /** \copydoc core_util_atomic_store_explicit_u8 */ template void core_util_atomic_store_explicit(T *valuePtr, mstd::type_identity_t desiredValue, mbed_memory_order order) noexcept; /** \copydoc core_util_atomic_exchange_explicit_u8 */ -template T core_util_atomic_exchange_explicit(volatile T *ptr, mstd::type_identity_t desiredValue, mbed_memory_order order) noexcept; +template T core_util_atomic_exchange_explicit(volatile T *valuePtr, mstd::type_identity_t desiredValue, mbed_memory_order order) noexcept; /** \copydoc core_util_atomic_cas_explicit_u8 */ template bool core_util_atomic_compare_exchange_strong_explicit(volatile T *ptr, mstd::type_identity_t *expectedCurrentValue, mstd::type_identity_t desiredValue, mbed_memory_order success, mbed_memory_order failure) noexcept; /** \copydoc core_util_atomic_compare_exchange_weak_explicit_u8 */ template bool core_util_atomic_compare_exchange_weak_explicit(volatile T *ptr, mstd::type_identity_t *expectedCurrentValue, mstd::type_identity_t desiredValue, mbed_memory_order success, mbed_memory_order failure) noexcept; -/** \copydoc core_util_fetch_add_explicit_u8 */ +/** \copydoc core_util_atomic_fetch_add_explicit_u8 */ template T core_util_atomic_fetch_add_explicit(volatile T *valuePtr, mstd::type_identity_t arg, mbed_memory_order order) noexcept; -/** \copydoc core_util_fetch_sub_explicit_u8 */ +/** \copydoc core_util_atomic_fetch_sub_explicit_u8 */ template T core_util_atomic_fetch_sub_explicit(volatile T *valuePtr, mstd::type_identity_t arg, mbed_memory_order order) noexcept; -/** \copydoc core_util_fetch_and_explicit_u8 */ +/** \copydoc core_util_atomic_fetch_and_explicit_u8 */ template T core_util_atomic_fetch_and_explicit(volatile T *valuePtr, mstd::type_identity_t arg, mbed_memory_order order) noexcept; -/** \copydoc core_util_fetch_or_explicit_u8 */ +/** \copydoc core_util_atomic_fetch_or_explicit_u8 */ template T core_util_atomic_fetch_or_explicit(volatile T *valuePtr, mstd::type_identity_t arg, mbed_memory_order order) noexcept; -/** \copydoc core_util_fetch_xor_explicit_u8 */ +/** \copydoc core_util_atomic_fetch_xor_explicit_u8 */ template T core_util_atomic_fetch_xor_explicit(volatile T *valuePtr, mstd::type_identity_t arg, mbed_memory_order order) noexcept; -/** \copydoc core_util_atomic_load_ptr */ +/** \copydoc core_util_atomic_load_u8 */ template inline T *core_util_atomic_load(T *const volatile *valuePtr) noexcept; -/** \copydoc core_util_atomic_load_ptr */ +/** \copydoc core_util_atomic_load_u8 */ template inline T *core_util_atomic_load(T *const *valuePtr) noexcept; -/** \copydoc core_util_atomic_store_ptr */ +/** \copydoc core_util_atomic_store_u8 */ template inline void core_util_atomic_store(T *volatile *valuePtr, mstd::type_identity_t *desiredValue) noexcept; -/** \copydoc core_util_atomic_store_ptr */ +/** \copydoc core_util_atomic_store_u8 */ template inline void core_util_atomic_store(T **valuePtr, mstd::type_identity_t *desiredValue) noexcept; -/** \copydoc core_util_atomic_exchange_ptr */ +/** \copydoc core_util_atomic_exchange_u8 */ template inline T *core_util_atomic_exchange(T *volatile *valuePtr, mstd::type_identity_t *desiredValue) noexcept; -/** \copydoc core_util_atomic_cas_ptr */ +/** \copydoc core_util_atomic_cas_u8 */ template inline bool core_util_atomic_compare_exchange_strong(T *volatile *ptr, mstd::type_identity_t **expectedCurrentValue, mstd::type_identity_t *desiredValue) noexcept; -/** \copydoc core_util_atomic_compare_exchange_weak_ptr */ +/** \copydoc core_util_atomic_compare_exchange_weak_u8 */ template inline bool core_util_atomic_compare_exchange_weak(T *volatile *ptr, mstd::type_identity_t **expectedCurrentValue, mstd::type_identity_t *desiredValue) noexcept; -/** \copydoc core_util_fetch_add_ptr */ +/** \copydoc core_util_atomic_fetch_add_u8 */ template inline T *core_util_atomic_fetch_add(T *volatile *valuePtr, ptrdiff_t arg) noexcept; -/** \copydoc core_util_fetch_sub_ptr */ +/** \copydoc core_util_atomic_fetch_sub_u8 */ template inline T *core_util_atomic_fetch_sub(T *volatile *valuePtr, ptrdiff_t arg) noexcept; -/** \copydoc core_util_atomic_load_explicit_ptr */ +/** \copydoc core_util_atomic_load_explicit_u8 */ template inline T *core_util_atomic_load_explicit(T *const volatile *valuePtr, mbed_memory_order order) noexcept; -/** \copydoc core_util_atomic_load_explicit_ptr */ +/** \copydoc core_util_atomic_load_explicit_u8 */ template inline T *core_util_atomic_load_explicit(T *const *valuePtr, mbed_memory_order order) noexcept; -/** \copydoc core_util_atomic_store_explicit_ptr */ +/** \copydoc core_util_atomic_store_explicit_u8 */ template inline void core_util_atomic_store_explicit(T *volatile *valuePtr, mstd::type_identity_t *desiredValue, mbed_memory_order order) noexcept; -/** \copydoc core_util_atomic_store_explicit_ptr */ +/** \copydoc core_util_atomic_store_explicit_u8 */ template inline void core_util_atomic_store_explicit(T **valuePtr, mstd::type_identity_t *desiredValue, mbed_memory_order order) noexcept; -/** \copydoc core_util_atomic_exchange_explicit_ptr */ +/** \copydoc core_util_atomic_exchange_explicit_u8 */ template inline T *core_util_atomic_exchange_explicit(T *volatile *valuePtr, mstd::type_identity_t *desiredValue, mbed_memory_order order) noexcept; -/** \copydoc core_util_atomic_cas_explicit_ptr */ +/** \copydoc core_util_atomic_cas_explicit_u8 */ template inline bool core_util_atomic_compare_exchange_strong_explicit(T *volatile *ptr, mstd::type_identity_t **expectedCurrentValue, mstd::type_identity_t *desiredValue, mbed_memory_order success, mbed_memory_order failure) noexcept; -/** \copydoc core_util_atomic_compare_exchange_weak_explicit_ptr */ +/** \copydoc core_util_atomic_compare_exchange_weak_explicit_u8 */ template inline bool core_util_atomic_compare_exchange_weak_explicit(T *volatile *ptr, mstd::type_identity_t **expectedCurrentValue, mstd::type_identity_t *desiredValue, mbed_memory_order success, mbed_memory_order failure) noexcept; -/** \copydoc core_util_fetch_add_explicit_ptr */ +/** \copydoc core_util_atomic_fetch_add_explicit_u8 */ template inline T *core_util_atomic_fetch_add_explicit(T *volatile *valuePtr, ptrdiff_t arg, mbed_memory_order order) noexcept; -/** \copydoc core_util_fetch_sub_explicit_ptr */ +/** \copydoc core_util_atomic_fetch_sub_explicit_u8 */ template inline T *core_util_atomic_fetch_sub_explicit(T *volatile *valuePtr, ptrdiff_t arg, mbed_memory_order order) noexcept; #endif // __cplusplus diff --git a/platform/include/platform/mbed_error.h b/platform/include/platform/mbed_error.h index 5c01bda..899614c 100644 --- a/platform/include/platform/mbed_error.h +++ b/platform/include/platform/mbed_error.h @@ -954,7 +954,7 @@ * Callback/Error hook function. If application implementation needs to receive this callback when an error is reported, * mbed_error_hook function should be overridden with custom implementation. When an error happens in the system error handling * implementation will invoke this callback with the mbed_error_status_t reported and the error context at the time of error. - * @param error_ctx Error context structure associated with this error. + * @param error_context Error context structure associated with this error. * @return void * */ @@ -969,7 +969,7 @@ * Note that this callback will be invoked before the system starts executing main() function. So the implementation of * the callback should be aware any resource limitations/availability of resources which are yet to be initialized by application main(). * - * @param error_ctx Error context structure associated with this error. + * @param error_context Error context structure associated with this error. * @return void * */ diff --git a/platform/include/platform/mbed_power_mgmt.h b/platform/include/platform/mbed_power_mgmt.h index caf1d02..c587d8d 100644 --- a/platform/include/platform/mbed_power_mgmt.h +++ b/platform/include/platform/mbed_power_mgmt.h @@ -48,13 +48,13 @@ * * # Defined behavior * * The lock is a counter - * * The lock can be locked up to USHRT_MAX - Verified by ::test_lock_eq_ushrt_max - * * The lock has to be equally unlocked as locked - Verified by ::test_lock_eq_ushrt_max - * * The function sleep_manager_lock_deep_sleep_internal() locks the automatic deep mode selection - Verified by ::test_lock_unlock - * * The function sleep_manager_unlock_deep_sleep_internal() unlocks the automatic deep mode selection - Verified by ::test_lock_unlock - * * The function sleep_manager_sleep_auto() chooses the sleep or deep sleep modes based on the lock - Verified by ::test_sleep_auto - * * The function sleep_manager_lock_deep_sleep_internal() is IRQ and thread safe - Verified by ::sleep_manager_multithread_test and ::sleep_manager_irq_test - * * The function sleep_manager_unlock_deep_sleep_internal() is IRQ and thread safe - Verified by ::sleep_manager_multithread_test and ::sleep_manager_irq_test + * * The lock can be locked up to USHRT_MAX - Verified by test_lock_eq_ushrt_max + * * The lock has to be equally unlocked as locked - Verified by test_lock_eq_ushrt_max + * * The function sleep_manager_lock_deep_sleep_internal() locks the automatic deep mode selection - Verified by test_lock_unlock + * * The function sleep_manager_unlock_deep_sleep_internal() unlocks the automatic deep mode selection - Verified by test_lock_unlock + * * The function sleep_manager_sleep_auto() chooses the sleep or deep sleep modes based on the lock - Verified by test_sleep_auto + * * The function sleep_manager_lock_deep_sleep_internal() is IRQ and thread safe - Verified by sleep_manager_multithread_test and sleep_manager_irq_test + * * The function sleep_manager_unlock_deep_sleep_internal() is IRQ and thread safe - Verified by sleep_manager_multithread_test and sleep_manager_irq_test * * The function sleep_manager_sleep_auto() is IRQ and thread safe * * Example: diff --git a/rtos/include/rtos/Mail.h b/rtos/include/rtos/Mail.h index 552ae8c..9a801ff 100644 --- a/rtos/include/rtos/Mail.h +++ b/rtos/include/rtos/Mail.h @@ -307,7 +307,7 @@ /** Get a mail from the queue. * - * @param rel_time Timeout value (default: Kernel::wait_for_u32_forever). + * @param millisec Timeout value (default: osWaitForever). * * @return Event that contains mail information and status code. The status code * is stored in the status member: @@ -316,7 +316,7 @@ * @a osEventTimeout No mail has arrived during the given timeout period. * @a osErrorParameter A parameter is invalid or outside of a permitted range. * - * @note You may call this function from ISR context if the millisec parameter is set to 0. + * @note You may call this function from ISR context if the \c millisec parameter is set to 0. * @deprecated Replaced with try_get and try_get_for. In future get will be an untimed blocking call. */ MBED_DEPRECATED_SINCE("mbed-os-6.0.0", "Replaced with try_get and try_get_for. In future get will be an untimed blocking call.") diff --git a/rtos/include/rtos/MemoryPool.h b/rtos/include/rtos/MemoryPool.h index 7b3fff6..7236d15 100644 --- a/rtos/include/rtos/MemoryPool.h +++ b/rtos/include/rtos/MemoryPool.h @@ -98,7 +98,7 @@ /** Allocate a memory block from a memory pool, without blocking. - This method works like `std::malloc` or `std::allocator::allocate` in that the + This method works like \c std\::malloc or \c std\::allocator<T>\::allocate in that the returned memory block is not initialized. For types with a non-trivial constructor placement new must be used to construct an object in the returned storage. @@ -280,7 +280,7 @@ /** Free a memory block. - This method works like `std::free` or `std::allocator::deallocate` in that any + This method works like \c std\::free or \c std\::allocator<T>\::deallocate in that any object in the memory is not destroyed. For types with a non-trivial destructor that destructor must be called manually before freeing the memory. diff --git a/rtos/include/rtos/Semaphore.h b/rtos/include/rtos/Semaphore.h index dd87e78..a3cd162 100644 --- a/rtos/include/rtos/Semaphore.h +++ b/rtos/include/rtos/Semaphore.h @@ -112,7 +112,7 @@ bool try_acquire_until(uint64_t millisec); /** Wait until a Semaphore resource becomes available. - @param millisec absolute timeout time, referenced to Kernel::Clock + @param abs_time absolute timeout time, referenced to Kernel::Clock @return true if a resource was acquired, false otherwise. @note the underlying RTOS may have a limit to the maximum wait time due to internal 32-bit computations, but this is guaranteed to work if the diff --git a/rtos/include/rtos/ThisThread.h b/rtos/include/rtos/ThisThread.h index 76c1387..45fa810 100644 --- a/rtos/include/rtos/ThisThread.h +++ b/rtos/include/rtos/ThisThread.h @@ -29,10 +29,12 @@ #include "rtos/mbed_rtos_types.h" namespace rtos { -/** \addtogroup rtos-public-api */ -/** @{*/ +namespace ThisThread { + /** + * \addtogroup rtos-public-api + * @{ * \defgroup rtos_ThisThread ThisThread namespace * @{ */ @@ -66,7 +68,6 @@ * @endcode * */ -namespace ThisThread { /** Clears the specified Thread Flags of the currently running thread. @param flags specifies the flags of the thread that should be cleared. @return thread flags before clearing. @@ -265,12 +266,12 @@ */ const char *get_name(); +/** @}*/ +/** @}*/ }; -/** @}*/ -/** @}*/ - namespace internal { + /** \addtogroup rtos-internal-api */ /** @{*/ @@ -284,7 +285,7 @@ bool non_rtos_check_flags(void *handle); -} /** @}*/ } +} #endif diff --git a/storage/blockdevice/COMPONENT_DATAFLASH/include/DataFlash/DataFlashBlockDevice.h b/storage/blockdevice/COMPONENT_DATAFLASH/include/DataFlash/DataFlashBlockDevice.h index 6880d5b..8a9e5ba 100644 --- a/storage/blockdevice/COMPONENT_DATAFLASH/include/DataFlash/DataFlashBlockDevice.h +++ b/storage/blockdevice/COMPONENT_DATAFLASH/include/DataFlash/DataFlashBlockDevice.h @@ -86,9 +86,9 @@ * @param miso SPI master in, slave out pin * @param sclk SPI clock pin * @param csel SPI chip select pin - * @param nowp GPIO not-write-protect * @param freq Clock speed of the SPI bus (defaults to 40MHz) - * @param nwp Not-write-protected pin + * @param nwp Not-write-protected pin. When writing to the chip, this pin is driven high. May be left NC + * to disable this functionality in the driver. */ DataFlashBlockDevice(PinName mosi = MBED_CONF_DATAFLASH_SPI_MOSI, PinName miso = MBED_CONF_DATAFLASH_SPI_MISO, diff --git a/storage/blockdevice/COMPONENT_I2CEE/include/I2CEE/I2CEEBlockDevice.h b/storage/blockdevice/COMPONENT_I2CEE/include/I2CEE/I2CEEBlockDevice.h index 09cc127..506246e 100644 --- a/storage/blockdevice/COMPONENT_I2CEE/include/I2CEE/I2CEEBlockDevice.h +++ b/storage/blockdevice/COMPONENT_I2CEE/include/I2CEE/I2CEEBlockDevice.h @@ -62,10 +62,10 @@ * * @param sda The pin name for the sda line of the I2C bus. * @param scl The pin name for the scl line of the I2C bus. - * @param addr The 8bit I2C address of the chip, common range 0xa0 - 0xae. + * @param address The 8bit I2C address of the chip, common range 0xa0 - 0xae. * @param size The size of the device in bytes * @param block The page size of the device in bytes, defaults to 32bytes - * @param freq The frequency of the I2C bus, defaults to 400K. + * @param bus_speed The frequency of the I2C bus, defaults to 400kHz. * @param address_is_eight_bit Specifies whether the EEPROM device is using eight bit * addresses instead of 16 bit addresses. This is used for example * in AT24C series chips. @@ -76,13 +76,12 @@ int bus_speed = 400000, bool address_is_eight_bit = false); - /** Constructor to create an I2CEEBlockDevice on I2C pins + /** Constructor to create an I2CEEBlockDevice using the pins and frequency of an existing I2C bus * - * @param i2c The I2C instance pointer - * @param addr The 8bit I2C address of the chip, common range 0xa0 - 0xae. + * @param i2c_obj The I2C instance pointer + * @param address The 8bit I2C address of the chip, common range 0xa0 - 0xae. * @param size The size of the device in bytes * @param block The page size of the device in bytes, defaults to 32bytes - * @param freq The frequency of the I2C bus, defaults to 400K. * @param address_is_eight_bit Specifies whether the EEPROM device is using eight bit * addresses instead of 16 bit addresses. This is used for example * in AT24C series chips. diff --git a/storage/blockdevice/COMPONENT_SD/include/SD/SDBlockDevice.h b/storage/blockdevice/COMPONENT_SD/include/SD/SDBlockDevice.h index 46a427e..4edb2ed 100644 --- a/storage/blockdevice/COMPONENT_SD/include/SD/SDBlockDevice.h +++ b/storage/blockdevice/COMPONENT_SD/include/SD/SDBlockDevice.h @@ -110,6 +110,7 @@ * a dedicated hardware CS pin. * * @param spi_pinmap Static SPI pin-map + * @param cs Chip select pin (can be any GPIO) * @param hz Clock speed of the SPI bus (defaults to 1MHz) * @param crc_on Enable cyclic redundancy check (defaults to disabled) */ diff --git a/storage/filesystem/littlefsv2/include/littlefsv2/LittleFileSystem2.h b/storage/filesystem/littlefsv2/include/littlefsv2/LittleFileSystem2.h index bc92281..bc7be0b 100644 --- a/storage/filesystem/littlefsv2/include/littlefsv2/LittleFileSystem2.h +++ b/storage/filesystem/littlefsv2/include/littlefsv2/LittleFileSystem2.h @@ -53,7 +53,7 @@ * Size of read/program caches. Each file uses 1 cache, and littlefs * allocates 2 caches for internal operations. Larger values should be * faster but uses more RAM. - * @param lookahead_size + * @param lookahead * Size of the lookahead buffer. A larger lookahead reduces the * allocation scans and results in a faster filesystem but uses * more RAM. diff --git a/storage/kvstore/filesystemstore/include/filesystemstore/FileSystemStore.h b/storage/kvstore/filesystemstore/include/filesystemstore/FileSystemStore.h index e62b65f..57d0774 100644 --- a/storage/kvstore/filesystemstore/include/filesystemstore/FileSystemStore.h +++ b/storage/kvstore/filesystemstore/include/filesystemstore/FileSystemStore.h @@ -23,13 +23,21 @@ namespace mbed { -/** FileSystemStore for Secure Store. - * This class implements the KVStore interface to - * create a key value store over FileSystem. +/** + * \addtogroup kvstore + * @{ + */ + +/** FileSystemStore is a lightweight implementation of the KVStore interface over file systems. * - * @code - * ... - * @endcode + * FileSystemStore implements the get/set interface using files, where a single file represents each key. + * A key is represented by the file name, and its value is stored as file data. Therefore, FileSystemStore + * imitates the get/set actions using simple file operations. Set is achieved using open-write-close, get + * using open-read-close and so on. + * + * All files are concentrated under a single directory, whose name is hard coded. So actions such as "reset" + * are mapped to the deletion of all files under this directory, and iteration actions use file system APIs to + * traverse the directory. */ class FileSystemStore : public KVStore { @@ -266,6 +274,7 @@ #endif }; +/// @} } //namespace mbed #endif //MBED_FILE_SYSTEM_STORE_H diff --git a/storage/kvstore/include/kvstore/KVStore.h b/storage/kvstore/include/kvstore/KVStore.h index a338399..138e0aa 100644 --- a/storage/kvstore/include/kvstore/KVStore.h +++ b/storage/kvstore/include/kvstore/KVStore.h @@ -23,9 +23,17 @@ namespace mbed { +/** + * \addtogroup storage + * @{ + * \defgroup kvstore KVStore + * Classes for key-value storage. + * @{ + */ + /** KVStore class * - * Interface class for Key Value Storage + * Interface class for all Key Value Storage providers. */ class KVStore { public: @@ -211,6 +219,7 @@ }; /** @}*/ +/** @}*/ } // namespace mbed diff --git a/storage/kvstore/kvstore_global_api/include/kvstore_global_api/kvstore_global_api.h b/storage/kvstore/kvstore_global_api/include/kvstore_global_api/kvstore_global_api.h index 12cfe06..bc2c988 100644 --- a/storage/kvstore/kvstore_global_api/include/kvstore_global_api/kvstore_global_api.h +++ b/storage/kvstore/kvstore_global_api/include/kvstore_global_api/kvstore_global_api.h @@ -23,6 +23,13 @@ extern "C" { #endif +/** + * \addtogroup kvstore + * @{ + * \defgroup kvstore_global_api KVStore Global API + * @{ + */ + typedef struct _opaque_kv_key_iterator *kv_iterator_t; #define KV_WRITE_ONCE_FLAG (1 << 0) @@ -138,6 +145,9 @@ */ int kv_reset(const char *kvstore_path); +/// @} +/// @} + #ifdef __cplusplus } // closing brace for extern "C" #endif diff --git a/storage/kvstore/securestore/include/securestore/SecureStore.h b/storage/kvstore/securestore/include/securestore/SecureStore.h index 9edaf54..4eb8c0f 100644 --- a/storage/kvstore/securestore/include/securestore/SecureStore.h +++ b/storage/kvstore/securestore/include/securestore/SecureStore.h @@ -45,9 +45,16 @@ namespace mbed { -/** TDBStore class +/** + * \addtogroup kvstore + * @{ + */ + +/** SecureStore class * - * Lightweight Key Value storage over a block device + * SecureStore is a KVStore-based storage solution, providing security features on the stored data, such as encryption, authentication, rollback protection and write once, over an underlying KVStore class. It references an additional KVStore class for storing the rollback protection keys. + * + * Only available if your device has Flash IAP and a hardware entropy source (TRNG). */ class SecureStore : public KVStore { diff --git a/storage/kvstore/tdbstore/include/tdbstore/TDBStore.h b/storage/kvstore/tdbstore/include/tdbstore/TDBStore.h index e2842b2..6015114 100644 --- a/storage/kvstore/tdbstore/include/tdbstore/TDBStore.h +++ b/storage/kvstore/tdbstore/include/tdbstore/TDBStore.h @@ -27,9 +27,19 @@ namespace mbed { -/** TDBStore class +/** +* \addtogroup kvstore +* @{ +*/ + +/** + * Tiny Database Storage (TDBStore) is a lightweight module that stores data on flash storage. It is part of of + * the KVStore class family, meaning it supports the get/set interface. It is designed to optimize performance + * (speed of access), reduce wearing of the flash and minimize storage overhead. It is also resilient to power + * failures. * - * Lightweight Key Value storage over a block device + * TDBStore assumes the underlying block device is fully dedicated to it (starting offset 0). If you want to + * dedicate only a part of the device to TDBStore, use a sliced block device, typically with SlicingBlockDevice. */ class TDBStore : public KVStore {