Skip to content

Commit

Permalink
Document the RP2040-specific PS/2 implementation
Browse files Browse the repository at this point in the history
Document the use of the PIO state machine code for RP2040 devices as an
alternative implementation of a PS/2 interface.
  • Loading branch information
sly547 committed Sep 20, 2023
1 parent 16f2a3e commit 1e7c122
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions docs/feature_ps2_mouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,27 @@ In your keyboard config.h:
#endif
```

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

This uses the RP2040's hardware feature called PIO and is therefore only
available on boards that are based on the RP2040 MCU.

The pin for the data signal must be followed directly by the pin for the clock
within the GPIO pin numbering scheme. This is required due to the design of the
PIO state machine code.

Example info.json content:

```
"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 data pin must be followed by clock pin!
#endif

static inline void pio_serve_interrupt(void);
Expand Down

0 comments on commit 1e7c122

Please sign in to comment.