Updating README, adding note about resetting GPIO

This commit is contained in:
Rodrigo Alfonso 2024-02-25 09:10:03 -03:00
parent 7e50be40dd
commit c99c34ea81
3 changed files with 7 additions and 3 deletions

View File

@ -6,7 +6,7 @@ A set of Game Boy Advance (GBA) C++ libraries to interact with the Serial Port.
- [💻](#-LinkCableMultiboot) [LinkCableMultiboot.hpp](lib/LinkCableMultiboot.hpp): Send **Multiboot software** (small 256KiB ROMs) to other GBAs with no cartridge!
- [🔧👾](#-LinkRawCable) [LinkRawCable.hpp](lib/LinkRawCable.hpp): A **minimal** low-level API for the 16-bit Multi-Play mode.
- [📻](#-LinkWireless) [LinkWireless.hpp](lib/LinkWireless.hpp): Connect up to 5 consoles with the **Wireless Adapter**!
- [📡](#-LinkWirelessMultiboot) [LinkWirelessMultiboot.hpp](lib/LinkWirelessMultiboot.hpp): Send **Multiboot software** (small 256KiB ROMs) to other GBAs **over the air**!
- [📡](#-LinkWirelessMultiboot) [LinkWirelessMultiboot.hpp](lib/LinkWirelessMultiboot.hpp): Send Multiboot software (small 256KiB ROMs) to other GBAs **over the air**!
- [🔧📻](#-LinkRawWireless) [LinkRawWireless.hpp](lib/LinkRawWireless.hpp): A **minimal** low-level API for the Wireless Adapter.
- [🔧🏛️](#-LinkWirelessOpenSDK) [LinkWirelessOpenSDK.hpp](lib/LinkWirelessOpenSDK.hpp): An abstraction of the **official** software level protocol of the Wireless Adapter.
- [🌎](#-LinkUniversal) [LinkUniversal.hpp](lib/LinkUniversal.hpp): Add multiplayer support to your game, both with 👾 *Link Cables* and 📻 *Wireless Adapters*, using the **same API**!
@ -17,6 +17,8 @@ A set of Game Boy Advance (GBA) C++ libraries to interact with the Serial Port.
> <img alt="rlabs" width="16" height="16" src="https://user-images.githubusercontent.com/1631752/116227197-400d2380-a72a-11eb-9e7b-389aae76f13e.png" /> Created by [[r]labs](https://r-labs.io).
> 💬 Check out my other GBA projects: [piuGBA](https://github.com/afska/piugba), [gba-remote-play](https://github.com/afska/gba-remote-play)
## Usage
- Include the library you want (e.g. [LinkCable.hpp](lib/LinkCable.hpp)) in your game code, and refer to its comments for instructions. Most of these libraries are provided as single header files for simplicity. The only external dependency is **libtonc**, which comes preinstalled with *devkitPro*.
@ -286,6 +288,7 @@ Name | Return type | Description
`setSIInterrupts(isEnabled)` | - | If it `isEnabled`, an IRQ will be generated when `SI` changes from *HIGH* to *LOW*.
⚠️ always set the `SI` terminal to an input!
⚠️ call `reset()` when you finish doing GPIO stuff! (for compatibility with the other libraries)
# 🔗 LinkSPI

View File

@ -621,7 +621,7 @@ enum CommState : unsigned int {
- There's a short initialization ritual until reaching the `COMMUNICATING` state.
- Once the `COMMUNICATING` state is reached, the initial sequence is `n=1, phase=0`.
- After each packet, the other node responds with a packet containing the same `n`, `phase` and `commState`, but with the `isACK` bit set.
- The sequence continues: `n=1,ph=1` | `n=1,ph=2` | `n=1,ph=3` | `n=2,ph=0` | `n=2,ph=1` | `n=2,ph=2` | `n=2,ph=3` | `n=3,ph=0` | `n=3,ph=1` | `n=3,ph=2` | `n=3,ph=3` | `n=0,ph=0` | `n=0,ph=1` | `n=0,ph=2` | `n=0,ph=3` | `n=1,ph=0` | `n=0,ph=1` | etc.
- The sequence continues: `n=1,ph=1` | `n=1,ph=2` | `n=1,ph=3` | `n=2,ph=0` | `n=2,ph=1` | `n=2,ph=2` | `n=2,ph=3` | `n=3,ph=0` | `n=3,ph=1` | `n=3,ph=2` | `n=3,ph=3` | `n=0,ph=0` | `n=0,ph=1` | `n=0,ph=2` | `n=0,ph=3` | `n=1,ph=0` | `n=1,ph=1` | etc.
- Repeated or old sequence numbers are ignored, that's how they handle retransmission.
- Transfers can contain more than one packet.
- As the maximum transfer lengths are `87` (server) and `16` (client), based on header sizes, the maximum payload lengths are `84` and `14`.

View File

@ -19,8 +19,9 @@
// linkGPIO->setSIInterrupts(true);
// // (when SI changes from high to low, an IRQ will be generated)
// --------------------------------------------------------------------------
// `setMode` restrictions:
// considerations:
// - always set the SI terminal to an input!
// - call reset() when you finish doing GPIO stuff!
// --------------------------------------------------------------------------
#include <tonc_core.h>