Skip to content

Commit 97c2672

Browse files
author
Jamie Smith
authored
Fix all Doxygen errors and make any future errors fatal (ARMmbed#118)
* Start working on fixing doxygen warnings * Upgrade doxyfile to Doxygen 1.9.1 * Clean up some unmatched groups and add some exclusions * Fix docs for rtos::ThisThread not showing up * Fix up KV store docs * Fix incorrect @files, some more incorrect groups * Fix lots of broken links * Start fixing mbedtls groups * Fix more mbedtls docs * Fix remaining mbedtls files with missing or incorrect grouping * Fix a huge amount of PSA docs errors * Fix a few more mbedtls docs errors * Fix __cplusplus not defined for docs, clean up call in callback typedef, fix some docs errors * Fix some broken doc links in HAL headers * Fix more PSA doc errors * Fix some doxygen errors in networking code * Fix lots of network related doc errors * Try and fix some CI failures * Use Doxygen Action instead of doxygen in Mbed container to get the right version * Try removing docs check * Add first part of doxygen action * Add next part of doxygen action * Fix yaml syntax error * Add in license check fix * Try using verbose scancode * Fix some more docs issues, workaround scancode-toolkit#3179 * Clean up the LoRaRadio get_state() function on each implementation. Also fix some other compile and doc errors. * Fix all remaining doxygen errors * Fix escaping, for realsies this time * Remove Doxygen unsupported config options, fix some more get_status() declarations * Fix some UNITTESTS build errors * Fix one more compile error * Another unittest error
1 parent 91d1cb8 commit 97c2672

File tree

214 files changed

+1905
-1425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+1905
-1425
lines changed

.github/workflows/basic_checks.yml

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
name: install dependencies
2727
shell: bash
2828
run: |
29-
pip install -U scancode-toolkit click gemfileparser
29+
pip install -U scancode-toolkit "click>=7,<8"
3030
3131
-
3232
name: license check
@@ -42,6 +42,7 @@ jobs:
4242
| ( grep -v '^tools/test/toolchains/api_test.py' || true ) \
4343
| while read file; do cp --parents "${file}" SCANCODE; done
4444
ls SCANCODE
45+
scancode --reindex-licenses # workaround for scancode-toolkit#3179
4546
scancode -l --json-pp scancode.json SCANCODE
4647
python ./tools/test/ci/scancode-evaluate.py scancode.json || true
4748
cat scancode-evaluate.log
@@ -106,21 +107,7 @@ jobs:
106107
| while read file; do astyle -n --options=.astylerc "${file}"; done
107108
git diff --exit-code --diff-filter=d --color
108109
109-
110-
docs-check:
111-
runs-on: ubuntu-latest
112-
container:
113-
image: ghcr.io/armmbed/mbed-os-env:master-latest
114-
115-
steps:
116-
117-
- name: Checkout repo
118-
uses: actions/checkout@v3
119-
with:
120-
fetch-depth: 0
121-
122-
-
123-
name: spell checks
110+
- name: Spell Checks
124111
run: |
125112
set -x
126113
./tools/test/ci/doxy-spellchecker/spell.sh drivers .codecheckignore
@@ -129,18 +116,9 @@ jobs:
129116
./tools/test/ci/doxy-spellchecker/spell.sh rtos .codecheckignore
130117
./tools/test/ci/doxy-spellchecker/spell.sh connectivity/netsocket .codecheckignore
131118
132-
-
133-
name: doxygen
119+
- name: File Naming Checks
134120
run: |
135121
set -x
136-
ccache -s
137-
mkdir BUILD
138-
# Assert that the Doxygen build produced no warnings.
139-
# The strange command below asserts that the Doxygen command had an
140-
# output of zero length
141-
doxygen doxyfile_options 2>&1
142-
# Once Mbed OS has been fixed, enable the full test by replacing the top line with this:
143-
# - ( ! doxygen doxyfile_options 2>&1 | grep . )
144122
# Assert that all binary libraries are named correctly
145123
# The strange command below asserts that there are exactly 0 libraries
146124
# that do not start with lib
@@ -153,6 +131,26 @@ jobs:
153131
find -name "*.s" | tee BUILD/badasm |
154132
sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ]
155133
134+
docs-check:
135+
runs-on: ubuntu-latest
136+
137+
steps:
138+
139+
- name: Checkout repo
140+
uses: actions/checkout@v3
141+
with:
142+
fetch-depth: 0
143+
submodules: recursive
144+
145+
- name: Create BUILD folder
146+
run: |
147+
mkdir -p ${{ github.workspace }}/BUILD
148+
149+
- name: Doxygen Action
150+
uses: mattnotmitt/[email protected]
151+
with:
152+
doxyfile-path: ./doxyfile_options
153+
156154
python-tests:
157155
# these tests run in 3.7, hence running in vm not in pre-built docker
158156
runs-on: ubuntu-latest

.github/workflows/docs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
with:
1616
submodules: recursive
1717

@@ -21,7 +21,7 @@ jobs:
2121
2222
# Build the HTML documentation
2323
- name: Doxygen Action
24-
uses: mattnotmitt/doxygen-action@v1.1.0
24+
uses: mattnotmitt/doxygen-action@v1.9.1
2525
with:
2626
doxyfile-path: ./doxyfile_options
2727

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ To start a new project that uses Mbed CE, see the setup guide [here](https://git
3232

3333
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.
3434

35-
## Getting started for contributors
36-
37-
We also have a [contributing and publishing guide](https://os.mbed.com/contributing/) that covers licensing, contributor agreements and style guidelines.
35+
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.
3836

3937
## Documentation
4038

41-
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.
39+
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.
40+
41+
For the Mbed OS CE class-level documentation, see [here](https://mbed-ce.github.io/mbed-os/group__mbed-os-public.html)
4242

4343
To contribute to this documentation, please see the [mbed-os-5-docs repository](https://github.com/ARMmbed/mbed-os-5-docs).
4444

connectivity/FEATURE_BLE/include/ble/driver/CordioHCIDriver.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ class CordioHCIDriver {
115115
/**
116116
* Get the random static address of the controller
117117
*
118+
* @param[out] address MAC address is written here.
119+
*
118120
* @return false if the address has not been set and true otherwise.
119121
*/
120122
virtual bool get_random_static_address(ble::address_t& address);

connectivity/cellular/include/cellular/framework/API/ATHandler.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class ATHandler {
205205
* command when you need multiple response parameters to be handled.
206206
* NOTE: Does not lock ATHandler for process!
207207
*
208-
* @param cmd AT command in form +<CMD> (will be used also in response reading, no extra chars allowed)
208+
* @param cmd AT command in form +&lt;CMD&lt; (will be used also in response reading, no extra chars allowed)
209209
* @param cmd_chr Char to be added to specific AT command: '?', '=' or ''. Will be used as such so '=1' is valid as well.
210210
* @param format Format string for variadic arguments to be added to AT command; No separator needed.
211211
* Use %d for integer, %s for string and %b for byte string (requires 2 arguments: string and length)
@@ -214,7 +214,7 @@ class ATHandler {
214214

215215
/**
216216
* @brief at_cmd_str Send an AT command and read a single string response. Locks and unlocks ATHandler for operation
217-
* @param cmd AT command in form +<CMD> (will be used also in response reading, no extra chars allowed)
217+
* @param cmd AT command in form +&lt;CMD&lt; (will be used also in response reading, no extra chars allowed)
218218
* @param cmd_chr Char to be added to specific AT command: '?', '=' or ''. Will be used as such so '=1' is valid as well.
219219
* @param resp_buf Response buffer
220220
* @param resp_buf_size Response buffer size
@@ -226,7 +226,7 @@ class ATHandler {
226226

227227
/**
228228
* @brief at_cmd_int Send an AT command and read a single integer response. Locks and unlocks ATHandler for operation
229-
* @param cmd AT command in form +<CMD> (will be used also in response reading, no extra chars allowed)
229+
* @param cmd AT command in form +&lt;CMD&lt; (will be used also in response reading, no extra chars allowed)
230230
* @param cmd_chr Char to be added to specific AT command: '?', '=' or ''. Will be used as such so '=1' is valid as well.
231231
* @param resp Integer to hold response
232232
* @param format Format string for variadic arguments to be added to AT command; No separator needed.
@@ -237,7 +237,7 @@ class ATHandler {
237237

238238
/**
239239
* @brief at_cmd_discard Send an AT command and read and discard a response. Locks and unlocks ATHandler for operation
240-
* @param cmd AT command in form +<CMD> (will be used also in response reading, no extra chars allowed)
240+
* @param cmd AT command in form +&lt;CMD&lt; (will be used also in response reading, no extra chars allowed)
241241
* @param cmd_chr Char to be added to specific AT command: '?', '=' or ''. Will be used as such so '=1' is valid as well.
242242
* @param format Format string for variadic arguments to be added to AT command; No separator needed.
243243
* Use %d for integer, %s for string and %b for byte string (requires 2 arguments: string and length)

connectivity/cellular/include/cellular/framework/API/CellularContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace mbed {
3636
* @ingroup mbed-os-public
3737
* @{
3838
39-
* @defgroup Cellular
39+
* @defgroup Cellular Cellular
4040
* @ingroup connectivity-public-api
4141
* @{
4242
*/

connectivity/cellular/include/cellular/framework/API/CellularDevice.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,7 @@ class CellularDevice {
218218

219219
/** Creates a new CellularContext interface.
220220
*
221-
* @param fh file handle used in communication to modem. This can be, for example, UART handle. If null, then the default
222-
* file handle is used.
221+
*
223222
* @param apn access point to use with context, can be null.
224223
* @param cp_req flag indicating if EPS control plane optimization is required
225224
* @param nonip_req flag indicating if this context is required to be Non-IP
@@ -297,17 +296,13 @@ class CellularDevice {
297296

298297
/** Create new CellularNetwork interface.
299298
*
300-
* @param fh file handle used in communication to modem. This can be, for example, UART handle. If null, then the default
301-
* file handle is used.
302299
* @return New instance of interface CellularNetwork.
303300
*/
304301
virtual CellularNetwork *open_network() = 0;
305302

306303
#if MBED_CONF_CELLULAR_USE_SMS || defined(DOXYGEN_ONLY)
307304
/** Create new CellularSMS interface.
308305
*
309-
* @param fh file handle used in communication to modem. This can be, for example, UART handle. If null, then the default
310-
* file handle is used.
311306
* @return New instance of interface CellularSMS.
312307
*/
313308
virtual CellularSMS *open_sms() = 0;
@@ -320,8 +315,6 @@ class CellularDevice {
320315

321316
/** Create new CellularInformation interface.
322317
*
323-
* @param fh file handle used in communication to modem. This can be, for example, UART handle. If null, then the default
324-
* file handle is used.
325318
* @return New instance of interface CellularInformation.
326319
*/
327320
virtual CellularInformation *open_information() = 0;

connectivity/cellular/include/cellular/framework/AT/AT_CellularDevice.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,15 @@ class AT_CellularDevice : public CellularDevice {
7373
};
7474

7575
public:
76-
AT_CellularDevice(FileHandle *fh, char *delim = "\r");
76+
77+
/**
78+
* Create an AT_CellularDevice.
79+
*
80+
* @param fh file handle used for reading AT responses and writing AT commands
81+
* @param delim delimiter used when parsing at responses, "\r" should be used as output_delimiter
82+
*/
83+
AT_CellularDevice(FileHandle *fh, char const *delim = "\r");
84+
7785
virtual ~AT_CellularDevice();
7886

7987
virtual nsapi_error_t clear();

connectivity/cellular/source/framework/AT/AT_CellularDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ using namespace std::chrono_literals;
3939
#define DEFAULT_AT_TIMEOUT 1s // at default timeout
4040
const int MAX_SIM_RESPONSE_LENGTH = 16;
4141

42-
AT_CellularDevice::AT_CellularDevice(FileHandle *fh, char *delim):
42+
AT_CellularDevice::AT_CellularDevice(FileHandle *fh, char const *delim):
4343
CellularDevice(),
4444
_at(fh, _queue, DEFAULT_AT_TIMEOUT, delim),
4545
#if MBED_CONF_CELLULAR_USE_SMS

connectivity/cellular/tests/UNITTESTS/doubles/AT_CellularDevice_stub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ bool AT_CellularDevice_stub::pin_needed = false;
3333
bool AT_CellularDevice_stub::supported_bool = false;
3434
int AT_CellularDevice_stub::max_sock_value = 1;
3535

36-
AT_CellularDevice::AT_CellularDevice(FileHandle *fh, char *delim) :
36+
AT_CellularDevice::AT_CellularDevice(FileHandle *fh, char const *delim) :
3737
CellularDevice(),
3838
_at(fh, _queue, get_property(AT_CellularDevice::PROPERTY_AT_SEND_DELAY), delim),
3939
#if MBED_CONF_CELLULAR_USE_SMS

connectivity/drivers/ble/FEATURE_BLE/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/NRFCordioHCIDriver.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,7 @@ class NRFCordioHCIDriver : public CordioHCIDriver {
4848
*/
4949
virtual void start_reset_sequence();
5050

51-
/**
52-
* Handle HCI messages received during the reset sequence.
53-
*
54-
* @param msg The HCI message received.
55-
* @note The driver should signal to the stack that the initialization
56-
* sequence is done by calling the function: signal_reset_sequence_done.
57-
*/
58-
//virtual void handle_reset_sequence(uint8_t *msg);
59-
60-
/**
61-
* @copydoc CordioHCIDriver::get_random_static_address
62-
*/
63-
virtual bool get_random_static_address(ble::address_t& address);
51+
bool get_random_static_address(ble::address_t& address) override;
6452

6553
private:
6654
/**

connectivity/drivers/lora/COMPONENT_SX126X/SX126X_LoRaRadio.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,13 +1269,18 @@ void SX126X_LoRaRadio::set_buffer_base_addr(uint8_t tx_base_addr, uint8_t rx_bas
12691269
write_opmode_command((uint8_t) RADIO_SET_BUFFERBASEADDRESS, buf, 2);
12701270
}
12711271

1272-
uint8_t SX126X_LoRaRadio::get_status(void)
1272+
radio_state_t SX126X_LoRaRadio::get_status(void)
12731273
{
1274-
if (_operation_mode != MODE_STDBY_RC || _operation_mode != MODE_SLEEP) {
1275-
return 0;
1274+
switch (_operation_mode) {
1275+
case MODE_TX:
1276+
return RF_TX_RUNNING;
1277+
case MODE_RX:
1278+
return RF_RX_RUNNING;
1279+
case MODE_CAD:
1280+
return RF_CAD;
1281+
default: // various standby states
1282+
return RF_IDLE;
12761283
}
1277-
1278-
return 0xFF;
12791284
}
12801285

12811286
int8_t SX126X_LoRaRadio::get_rssi()

connectivity/drivers/lora/COMPONENT_SX126X/SX126X_LoRaRadio.h

Lines changed: 8 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -89,48 +89,13 @@ class SX126X_LoRaRadio : public LoRaRadio {
8989
*/
9090
virtual void standby(void);
9191

92-
/**
93-
* Sets the reception parameters
94-
*
95-
* @param modem Radio modem to be used [0: FSK, 1: LoRa]
96-
* @param bandwidth Sets the bandwidth
97-
* FSK : >= 2600 and <= 250000 Hz
98-
* LoRa: [0: 125 kHz, 1: 250 kHz,
99-
* 2: 500 kHz, 3: Reserved]
100-
* @param datarate Sets the Datarate
101-
* FSK : 600..300000 bits/s
102-
* LoRa: [6: 64, 7: 128, 8: 256, 9: 512,
103-
* 10: 1024, 11: 2048, 12: 4096 chips]
104-
* @param coderate Sets the coding rate ( LoRa only )
105-
* FSK : N/A ( set to 0 )
106-
* LoRa: [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8]
107-
* @param bandwidth_afc Sets the AFC Bandwidth ( FSK only )
108-
* FSK : >= 2600 and <= 250000 Hz
109-
* LoRa: N/A ( set to 0 )
110-
* @param preamble_len Sets the Preamble length ( LoRa only )
111-
* FSK : N/A ( set to 0 )
112-
* LoRa: Length in symbols ( the hardware adds 4 more symbols )
113-
* @param symb_timeout Sets the RxSingle timeout value
114-
* FSK : timeout number of bytes
115-
* LoRa: timeout in symbols
116-
* @param fixLen Fixed length packets [0: variable, 1: fixed]
117-
* @param payload_len Sets payload length when fixed lenght is used
118-
* @param crc_on Enables/Disables the CRC [0: OFF, 1: ON]
119-
* @param freq_hop_on Enables disables the intra-packet frequency hopping [0: OFF, 1: ON] (LoRa only)
120-
* @param hop_period Number of symbols bewteen each hop (LoRa only)
121-
* @param iq_inverted Inverts IQ signals ( LoRa only )
122-
* FSK : N/A ( set to 0 )
123-
* LoRa: [0: not inverted, 1: inverted]
124-
* @param rx_continuous Sets the reception in continuous mode
125-
* [false: single mode, true: continuous mode]
126-
*/
127-
virtual void set_rx_config(radio_modems_t modem, uint32_t bandwidth,
128-
uint32_t datarate, uint8_t coderate,
129-
uint32_t bandwidth_afc, uint16_t preamble_len,
130-
uint16_t symb_timeout, bool fix_len,
131-
uint8_t payload_len,
132-
bool crc_on, bool freq_hop_on, uint8_t hop_period,
133-
bool iq_inverted, bool rx_continuous);
92+
void set_rx_config(radio_modems_t modem, uint32_t bandwidth,
93+
uint32_t datarate, uint8_t coderate,
94+
uint32_t bandwidth_afc, uint16_t preamble_len,
95+
uint16_t symb_timeout, bool fix_len,
96+
uint8_t payload_len,
97+
bool crc_on, bool freq_hop_on, uint8_t hop_period,
98+
bool iq_inverted, bool rx_continuous) override;
13499

135100
/**
136101
* Sets the transmission parameters
@@ -204,13 +169,7 @@ class SX126X_LoRaRadio : public LoRaRadio {
204169
*/
205170
virtual uint32_t random(void);
206171

207-
/**
208-
* Get radio status
209-
*
210-
* @param status Radio status [RF_IDLE, RF_RX_RUNNING, RF_TX_RUNNING]
211-
* @return Return current radio status
212-
*/
213-
virtual uint8_t get_status(void);
172+
radio_state_t get_status(void) override;
214173

215174
/**
216175
* Sets the maximum payload length

connectivity/drivers/lora/COMPONENT_SX126X/sx126x_ds.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* \file sx126x.h
2+
* \file sx126x_ds.h
33
*
44
* \brief SX126x driver implementation
55
*
6-
* \copyright Revised BSD License, see section \ref LICENSE.
6+
* \copyright Revised BSD License
77
*
88
* \code
99
* ______ _

0 commit comments

Comments
 (0)