From 0efc67fde7e5e7fb23f4ccc42f5d6c6f6558618d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20St=C3=B6r?= Date: Thu, 7 Mar 2024 22:51:45 +0100 Subject: [PATCH] Docs clean-up --- docs/modules/espnow.md | 21 +++++++++++---------- docs/modules/rtcmem.md | 2 +- mkdocs.yml | 1 + 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/modules/espnow.md b/docs/modules/espnow.md index c572f9b8..07b9311f 100644 --- a/docs/modules/espnow.md +++ b/docs/modules/espnow.md @@ -113,8 +113,8 @@ Registers a peer MAC address. Optionally parameters for the peer may be included espnow.addpeer(mac, options) ``` #### Parameters -`mac` The peer mac address, given as a string in `00:11:22:33:44:55` format (colons optional, and may also be replaced by '-' or ' '). -`options` A table with with following entries: +- `mac` The peer mac address, given as a string in `00:11:22:33:44:55` format (colons optional, and may also be replaced by '-' or ' '). +- `options` A table with with following entries: - `channel` An integer indicating the WiFi channel to be used. The default is `0`, indicating that the current WiFi channel should be used. If non-zero, must match the current WiFi channel. - `lmk` The LMK for the peer, if encryption is to be used. - `encrypt` A non-zero integer to indicate encryption should be enabled. When set, makes `lmk` a required field. @@ -166,10 +166,11 @@ Only a single callback function can be registered for each event. The callback function for the `sent` event is invoked with two parameters, the destination MAC address, and a `1`/`nil` to indicate whether the send was believed to be successful or not. The callback function for the `receive` event is invoked with a single parameter, a table with the following keys: - - `src` The sender MAC address - - `dst` The destination MAC address (likely either the local MAC of the receiver, or the broadcast address) - - `rssi` The RSSI value from the packet, indicating signal strength between the two devices - - `data` The actual payload data, as a string. The string may contain binary data. + +- `src` The sender MAC address +- `dst` The destination MAC address (likely either the local MAC of the receiver, or the broadcast address) +- `rssi` The RSSI value from the packet, indicating signal strength between the two devices +- `data` The actual payload data, as a string. The string may contain binary data. #### Syntax ```lua @@ -177,8 +178,8 @@ espnow.on(event, callbackfn) ``` #### Parameters -`event` The event name, one of `sent` or `receive`. -`callbackfn` The callback function to register, or `nil` to unregister the previously set callback function for the event. +- `event` The event name, one of `sent` or `receive`. +- `callbackfn` The callback function to register, or `nil` to unregister the previously set callback function for the event. #### Returns `nil` @@ -215,8 +216,8 @@ espnow.send(peer, data) ``` #### Parameters -`peer` The peer MAC address to send to. Must have previously been added via `espnow.addpeer()`. If `peer` is given as `nil`, the packet is sent to all registered non-broadcast/multicast peers, and the `sent` callback is invoked for each of those peers. -`data` A string of data to send. May contain binary bytes. Maximum supported length at the time of writing is 250 bytes. +- `peer` The peer MAC address to send to. Must have previously been added via `espnow.addpeer()`. If `peer` is given as `nil`, the packet is sent to all registered non-broadcast/multicast peers, and the `sent` callback is invoked for each of those peers. +- `data` A string of data to send. May contain binary bytes. Maximum supported length at the time of writing is 250 bytes. #### Returns `nil`, but the `sent` callback is invoked with the status afterwards. diff --git a/docs/modules/rtcmem.md b/docs/modules/rtcmem.md index bd4020dd..0b0347b2 100644 --- a/docs/modules/rtcmem.md +++ b/docs/modules/rtcmem.md @@ -1,7 +1,7 @@ # RTC User Memory Module | Since | Origin / Contributor | Maintainer | Source | | :----- | :-------------------- | :---------- | :------ | -| 2015-06-25 | [DiUS](https://github.com/DiUS), [Johny Mattsson](https://github.com/jmattsson) | [PJSG](https://github.com/pjsg) | [rtcmem.c](../../app/modules/rtcmem.c)| +| 2015-06-25 | [DiUS](https://github.com/DiUS), [Johny Mattsson](https://github.com/jmattsson) | [PJSG](https://github.com/pjsg) | [rtcmem.c](../../components/modules/rtcmem.c)| The rtcmem module provides basic access to the RTC memory. diff --git a/mkdocs.yml b/mkdocs.yml index c307bd45..8682c4c9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -67,6 +67,7 @@ nav: - 'pulsecnt': 'modules/pulsecnt.md' - 'qrcodegen': 'modules/qrcodegen.md' - 'rmt': 'modules/rmt.md' + - 'rtcmem': 'modules/rtcmem.md' - 'sdmmc': 'modules/sdmmc.md' - 'sigma delta': 'modules/sigma-delta.md' - 'sjson': 'modules/sjson.md' -- 2.39.3 (Apple Git-146)