From 4ec13979462d7206de339aac152ad18e1e8bccb4 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Sun, 23 Jun 2024 22:06:34 -0300 Subject: [PATCH] fix(doc): documentation format --- libraries/OpenThread/helper_functions.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/libraries/OpenThread/helper_functions.md b/libraries/OpenThread/helper_functions.md index a3c4a2692e8..db8b7db29e9 100644 --- a/libraries/OpenThread/helper_functions.md +++ b/libraries/OpenThread/helper_functions.md @@ -1,8 +1,9 @@ # OpenThread Helper Functions and Types -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. +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. -## Enumerated Type: `ot_device_role_t` +### Enumerated Type: `ot_device_role_t` This enumeration defines the possible roles of a Thread device within the network: @@ -12,22 +13,22 @@ This enumeration defines the possible roles of a Thread device within the networ - `OT_ROLE_ROUTER`: The device operates as a Thread Router. - `OT_ROLE_LEADER`: The device operates as a Thread Leader. -## Struct: `ot_cmd_return_t` +### Struct: `ot_cmd_return_t` This structure represents the return status of an OpenThread CLI command: - `errorCode`: An integer representing the error code (if any). - `errorMessage`: A string containing an error message (if applicable). -## Function: `otGetDeviceRole()` +### Function: `otGetDeviceRole()` - Returns the current role of the device as an `ot_device_role_t` value. -## Function: `otGetStringDeviceRole()` +### Function: `otGetStringDeviceRole()` - Returns a human-readable string representation of the device role (e.g., "Child," "Router," etc.). -## Function: `otGetRespCmd(const char* cmd, char* resp = NULL, uint32_t respTimeout = 5000)` +### Function: `otGetRespCmd(const char* cmd, char* resp = NULL, uint32_t respTimeout = 5000)` - Executes an OpenThread CLI command and retrieves the response. - Parameters: @@ -35,7 +36,7 @@ This structure represents the return status of an OpenThread CLI command: - `resp`: Optional buffer to store the response (if provided). - `respTimeout`: Timeout (in milliseconds) for waiting for the response. -## Function: `otExecCommand(const char* cmd, const char* arg, ot_cmd_return_t* returnCode = NULL)` +### Function: `otExecCommand(const char* cmd, const char* arg, ot_cmd_return_t* returnCode = NULL)` - Executes an OpenThread CLI command with an argument. - Parameters: @@ -43,7 +44,7 @@ This structure represents the return status of an OpenThread CLI command: - `arg`: The argument for the command. - `returnCode`: Optional pointer to an `ot_cmd_return_t` structure to store the return status. -## Function: `otPrintRespCLI(const char* cmd, Stream& output, uint32_t respTimeout)` +### Function: `otPrintRespCLI(const char* cmd, Stream& output, uint32_t respTimeout)` - Executes an OpenThread CLI command and prints the response to the specified output stream. - Parameters: @@ -51,7 +52,7 @@ This structure represents the return status of an OpenThread CLI command: - `output`: The output stream (e.g., Serial) to print the response. - `respTimeout`: Timeout (in milliseconds) for waiting for the response. -## Function: `otPrintNetworkInformation(Stream& output)` +### Function: `otPrintNetworkInformation(Stream& output)` - Prints information about the current Thread network to the specified output stream. - Parameters: