Fixing documentation

This commit is contained in:
Rodrigo Alfonso
2025-01-22 06:22:27 -03:00
parent 963dfb18a3
commit eceaa5d60b
3 changed files with 6 additions and 5 deletions

View File

@@ -117,7 +117,7 @@ You can also change these compile-time constants:
| `activate()` | - | Activates the library. |
| `deactivate()` | - | Deactivates the library. |
| `isConnected()` | **bool** | Returns `true` if there are at least 2 connected players. |
| `playerCount()` | **u8** _(0~4)_ | Returns the number of connected players. |
| `playerCount()` | **u8** _(1~4)_ | Returns the number of connected players. |
| `currentPlayerId()` | **u8** _(0~3)_ | Returns the current player ID. |
| `sync()` | - | Collects available messages from interrupts for later processing with `read(...)`. Call this method whenever you need to fetch new data. |
| `waitFor(playerId)` | **bool** | Waits for data from player #`playerId`. Returns `true` on success, or `false` on disconnection. |
@@ -283,7 +283,7 @@ https://github.com/afska/gba-link-connection/assets/1631752/9a648bff-b14f-4a85-9
| Name | Return type | Description |
| -------------------------------------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sendRom(rom, romSize, gameName, userName, gameId, players, listener, [keepConnectionAlive])` | **LinkWirelessMultiboot::Result** | Sends the `rom`. The `players` must be the exact number of consoles that will download the ROM. Once this number of players is reached, the code will start transmitting the ROM bytes. During the process, the library will continuously invoke `listener` (passing a `LinkWirelessMultiboot::MultibootProgress` object as argument), and abort the transfer if it returns `true`. The `romSize` must be a number between `448` and `262144`. It's recommended to use a ROM size that is a multiple of `16`, since this also ensures compatibility with Multiboot via Link Cable. Once completed, the return value should be `LinkWirelessMultiboot::Result::SUCCESS`. You can start the transfer before the player count is reached by running `*progress.ready = true;` in the`cancel` callback. If a `keepConnectionAlive` is `true`, the adapter won't be reset after a successful transfer, so users can continue the session using `LinkWireless::restoreExistingConnection()`. |
| `reset()` | - | Turns off the adapter. It returns a boolean indicating whether the transition to low consumption mode was successful. |
| `reset()` | - | Turns off the adapter and deactivates the library. It returns a boolean indicating whether the transition to low consumption mode was successful. |
# 🔧📻 LinkRawWireless

View File

@@ -155,7 +155,7 @@ class LinkCable {
}
/**
* @brief Returns the number of connected players (`0~4`).
* @brief Returns the number of connected players (`1~4`).
*/
[[nodiscard]] u8 playerCount() { return state.playerCount; }

View File

@@ -200,8 +200,9 @@ class LinkWirelessMultiboot {
}
/**
* @brief Turns off the adapter. It returns a boolean indicating whether the
* transition to low consumption mode was successful.
* @brief Turns off the adapter and deactivates the library. It returns a
* boolean indicating whether the transition to low consumption mode was
* successful.
*/
bool reset() {
bool success = linkRawWireless.bye();