Skip to content

Commit 4ec1397

Browse files
committed
fix(doc): documentation format
1 parent 6b0b9af commit 4ec1397

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

libraries/OpenThread/helper_functions.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# OpenThread Helper Functions and Types
22

3-
The following helper functions and types are designed to simplify writing Arduino sketches for OpenThread. They provide useful utilities for managing OpenThread stack behavior and interacting with the Thread network.
3+
The following helper functions and types are designed to simplify writing Arduino sketches for OpenThread.\
4+
They provide useful utilities for managing OpenThread stack behavior and interacting with the Thread network.
45

5-
## Enumerated Type: `ot_device_role_t`
6+
### Enumerated Type: `ot_device_role_t`
67

78
This enumeration defines the possible roles of a Thread device within the network:
89

@@ -12,46 +13,46 @@ This enumeration defines the possible roles of a Thread device within the networ
1213
- `OT_ROLE_ROUTER`: The device operates as a Thread Router.
1314
- `OT_ROLE_LEADER`: The device operates as a Thread Leader.
1415

15-
## Struct: `ot_cmd_return_t`
16+
### Struct: `ot_cmd_return_t`
1617

1718
This structure represents the return status of an OpenThread CLI command:
1819

1920
- `errorCode`: An integer representing the error code (if any).
2021
- `errorMessage`: A string containing an error message (if applicable).
2122

22-
## Function: `otGetDeviceRole()`
23+
### Function: `otGetDeviceRole()`
2324

2425
- Returns the current role of the device as an `ot_device_role_t` value.
2526

26-
## Function: `otGetStringDeviceRole()`
27+
### Function: `otGetStringDeviceRole()`
2728

2829
- Returns a human-readable string representation of the device role (e.g., "Child," "Router," etc.).
2930

30-
## Function: `otGetRespCmd(const char* cmd, char* resp = NULL, uint32_t respTimeout = 5000)`
31+
### Function: `otGetRespCmd(const char* cmd, char* resp = NULL, uint32_t respTimeout = 5000)`
3132

3233
- Executes an OpenThread CLI command and retrieves the response.
3334
- Parameters:
3435
- `cmd`: The OpenThread CLI command to execute.
3536
- `resp`: Optional buffer to store the response (if provided).
3637
- `respTimeout`: Timeout (in milliseconds) for waiting for the response.
3738

38-
## Function: `otExecCommand(const char* cmd, const char* arg, ot_cmd_return_t* returnCode = NULL)`
39+
### Function: `otExecCommand(const char* cmd, const char* arg, ot_cmd_return_t* returnCode = NULL)`
3940

4041
- Executes an OpenThread CLI command with an argument.
4142
- Parameters:
4243
- `cmd`: The OpenThread CLI command to execute.
4344
- `arg`: The argument for the command.
4445
- `returnCode`: Optional pointer to an `ot_cmd_return_t` structure to store the return status.
4546

46-
## Function: `otPrintRespCLI(const char* cmd, Stream& output, uint32_t respTimeout)`
47+
### Function: `otPrintRespCLI(const char* cmd, Stream& output, uint32_t respTimeout)`
4748

4849
- Executes an OpenThread CLI command and prints the response to the specified output stream.
4950
- Parameters:
5051
- `cmd`: The OpenThread CLI command to execute.
5152
- `output`: The output stream (e.g., Serial) to print the response.
5253
- `respTimeout`: Timeout (in milliseconds) for waiting for the response.
5354

54-
## Function: `otPrintNetworkInformation(Stream& output)`
55+
### Function: `otPrintNetworkInformation(Stream& output)`
5556

5657
- Prints information about the current Thread network to the specified output stream.
5758
- Parameters:

0 commit comments

Comments
 (0)