Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the RP2040-specific PS/2 implementation #22079

Merged
merged 4 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/feature_ps2_mouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,29 @@ In your keyboard config.h:
#endif
```

### RP2040 PIO Version :id=rp2040-pio-version

The `PIO` subsystem is a Raspberry Pi RP2040 specific implementation, using the integrated PIO peripheral and is therefore only available on this MCU.

There are strict requirements for pin ordering but any pair of GPIO pins can be used. The GPIO used for clock must be directly after data, see the included info.json snippet for an example of correct order.

You may optionally switch the PIO peripheral used with the following define in config.h:
```c
#define PS2_PIO_USE_PIO1 // Force the usage of PIO1 peripheral, by default the PS2 implementation uses the PIO0 peripheral
```

Example info.json content:

```json
"ps2": {
"clock_pin": "GP1",
"data_pin": "GP0",
"driver": "vendor",
"enabled": true,
"mouse_enabled": true
}
```

## Additional Settings :id=additional-settings

### PS/2 Mouse Features :id=ps2-mouse-features
Expand Down
2 changes: 1 addition & 1 deletion platforms/chibios/drivers/vendor/RP/RP2040/ps2_vendor.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#endif

#if PS2_DATA_PIN + 1 != PS2_CLOCK_PIN
# error PS/2 Clock pin must be followed by data pin!
# error PS/2 clock pin must be data pin + 1!
#endif

static inline void pio_serve_interrupt(void);
Expand Down