From 3cd5a8dff9a8eac1d300d1191dba9a553da8fee8 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sun, 21 Apr 2024 11:28:05 -0500 Subject: [PATCH] convert files from CRLF endings to LF endings (#49) % find . -type f -exec file {} \; | grep CRLF | cut -d ':' -f 1 | xargs dos2unix dos2unix: converting file ./.gitignore to Unix format... dos2unix: converting file ./sidebars.js to Unix format... dos2unix: converting file ./tsconfig.json to Unix format... dos2unix: converting file ./docusaurus.config.js to Unix format... dos2unix: converting file ./babel.config.js to Unix format... dos2unix: converting file ./src/components/Download.tsx to Unix format... dos2unix: converting file ./src/components/LinkIcon.tsx to Unix format... dos2unix: converting file ./src/components/labelselector.module.css to Unix format... dos2unix: converting file ./src/components/download.module.css to Unix format... dos2unix: converting file ./src/components/LabelSelector.tsx to Unix format... dos2unix: converting file ./src/css/custom.css to Unix format... dos2unix: converting file ./src/config/boards.tsx to Unix format... dos2unix: converting file ./src/hooks/useGitHubInfo.ts to Unix format... dos2unix: converting file ./development/documentation-preview.mdx to Unix format... dos2unix: converting file ./development/contribution-guide.mdx to Unix format... dos2unix: converting file ./development/firmware-development.mdx to Unix format... dos2unix: converting file ./development/templates.mdx to Unix format... dos2unix: converting file ./development/documentation-update-downloads.mdx to Unix format... dos2unix: converting file ./.github/workflows/deploy.yml to Unix format... dos2unix: converting file ./.github/workflows/test-deploy.yml to Unix format... dos2unix: converting file ./docs/rgb-leds.mdx to Unix format... dos2unix: converting file ./docs/add-ons/bootsel-button.mdx to Unix format... dos2unix: converting file ./docs/add-ons/joystick-selection-slider.mdx to Unix format... dos2unix: converting file ./docs/add-ons/input-reverse.mdx to Unix format... dos2unix: converting file ./docs/add-ons/analog.mdx to Unix format... dos2unix: converting file ./docs/add-ons/focus-mode.mdx to Unix format... dos2unix: converting file ./docs/add-ons/socd-selection-slider.mdx to Unix format... dos2unix: converting file ./docs/add-ons/wii-extensions.mdx to Unix format... dos2unix: converting file ./docs/add-ons/turbo.mdx to Unix format... dos2unix: converting file ./docs/add-ons/player-number.mdx to Unix format... dos2unix: converting file ./docs/add-ons/i2c-analog-ads1219.mdx to Unix format... dos2unix: converting file ./docs/add-ons/snes-input.mdx to Unix format... dos2unix: converting file ./docs/add-ons/on-board-led.mdx to Unix format... dos2unix: converting file ./docs/add-ons/dual-direction-input.mdx to Unix format... dos2unix: converting file ./docs/add-ons/input-history.mdx to Unix format... dos2unix: converting file ./docs/add-ons/keyboard-host.mdx to Unix format... dos2unix: converting file ./docs/add-ons/tilt-input.mdx to Unix format... dos2unix: converting file ./docs/add-ons/buzzer-speaker.mdx to Unix format... dos2unix: converting file ./docs/snippets/_input-table.mdx to Unix format... dos2unix: converting file ./docs/snippets/_hotkey-note.mdx to Unix format... dos2unix: converting file ./docs/snippets/_add-usb-host-port.mdx to Unix format... dos2unix: converting file ./docs/snippets/_pin-options-USB-Host.mdx to Unix format... dos2unix: converting file ./docs/snippets/_i2c-block-table.mdx to Unix format... dos2unix: converting file ./docs/usage.mdx to Unix format... dos2unix: converting file ./docs/installation.mdx to Unix format... dos2unix: converting file ./docs/faq/faq-troubleshooting.mdx to Unix format... dos2unix: converting file ./docs/faq/faq-general.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/menu-pages/02-pin-mapping.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/menu-pages/11-danger-zone.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/menu-pages/05-led-configuration.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/menu-pages/10-data-backup-restoration.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/menu-pages/06-custom-led-theme.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/menu-pages/00-home.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/menu-pages/08-add-ons-configuration.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/menu-pages/01-settings.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/menu-pages/09-macros.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/menu-pages/07-display-configuration.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/web-configurator.mdx to Unix format... dos2unix: converting file ./docs/web-configurator/community-splash-screens.mdx to Unix format... dos2unix: converting file ./docs/hotkeys.mdx to Unix format... dos2unix: converting file ./docs/getting-help-support.mdx to Unix format... dos2unix: converting file ./docs/controller-build/wiring.mdx to Unix format... dos2unix: converting file ./docs/introduction.mdx to Unix format... --- .gitattributes | 1 + .github/workflows/deploy.yml | 80 +- .github/workflows/test-deploy.yml | 52 +- .gitignore | 36 +- babel.config.js | 6 +- development/contribution-guide.mdx | 110 +- development/documentation-preview.mdx | 134 +- .../documentation-update-downloads.mdx | 92 +- development/firmware-development.mdx | 1084 ++++++++--------- development/templates.mdx | 312 ++--- docs/add-ons/analog.mdx | 134 +- docs/add-ons/bootsel-button.mdx | 64 +- docs/add-ons/buzzer-speaker.mdx | 74 +- docs/add-ons/dual-direction-input.mdx | 116 +- docs/add-ons/focus-mode.mdx | 68 +- docs/add-ons/i2c-analog-ads1219.mdx | 136 +-- docs/add-ons/i2c-analog-ads1256-spi.mdx | 66 +- docs/add-ons/input-history.mdx | 110 +- docs/add-ons/input-reverse.mdx | 86 +- docs/add-ons/joystick-selection-slider.mdx | 90 +- docs/add-ons/keyboard-host.mdx | 152 +-- docs/add-ons/on-board-led.mdx | 76 +- docs/add-ons/player-number.mdx | 64 +- docs/add-ons/rotary-encoders.mdx | 70 +- docs/add-ons/snes-input.mdx | 168 +-- docs/add-ons/socd-selection-slider.mdx | 102 +- docs/add-ons/tilt-input.mdx | 106 +- docs/add-ons/turbo.mdx | 166 +-- docs/add-ons/wii-extensions.mdx | 256 ++-- docs/controller-build/wiring.mdx | 100 +- docs/faq/faq-general.mdx | 162 +-- docs/faq/faq-troubleshooting.mdx | 372 +++--- docs/getting-help-support.mdx | 54 +- docs/hotkeys.mdx | 452 +++---- docs/installation.mdx | 168 +-- docs/introduction.mdx | 82 +- docs/rgb-leds.mdx | 292 ++--- docs/snippets/_add-usb-host-port.mdx | 168 +-- docs/snippets/_hotkey-note.mdx | 10 +- docs/snippets/_i2c-block-table.mdx | 20 +- docs/snippets/_input-table.mdx | 32 +- docs/snippets/_pin-options-USB-Host.mdx | 18 +- docs/usage.mdx | 286 ++--- .../community-splash-screens.mdx | 320 ++--- docs/web-configurator/menu-pages/00-home.mdx | 28 +- .../menu-pages/01-settings.mdx | 230 ++-- .../menu-pages/02-pin-mapping.mdx | 138 +-- .../menu-pages/05-led-configuration.mdx | 120 +- .../menu-pages/06-custom-led-theme.mdx | 58 +- .../menu-pages/07-display-configuration.mdx | 212 ++-- .../menu-pages/08-add-ons-configuration.mdx | 94 +- .../web-configurator/menu-pages/09-macros.mdx | 196 ++- .../menu-pages/10-data-backup-restoration.mdx | 46 +- .../menu-pages/11-danger-zone.mdx | 24 +- docs/web-configurator/web-configurator.mdx | 136 +-- docusaurus.config.js | 362 +++--- sidebars.js | 150 +-- src/components/Download.tsx | 176 +-- src/components/LabelSelector.tsx | 486 ++++---- src/components/LinkIcon.tsx | 74 +- src/components/download.module.css | 140 +-- src/components/labelselector.module.css | 4 +- src/config/boards.tsx | 950 +++++++-------- src/css/custom.css | 276 ++--- src/hooks/useGitHubInfo.ts | 56 +- tsconfig.json | 18 +- 66 files changed, 5247 insertions(+), 5274 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 66bff30..a658727 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,40 +1,40 @@ -name: Deploy to GitHub Pages - -on: - push: - branches: - - main - -permissions: - id-token: write - pages: write - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - # Build steps - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: npm - - name: Install dependencies - run: npm install --frozen-lockfile - working-directory: ./ - - name: Build - run: npm run build - working-directory: ./ - - - name: Setup Pages - uses: actions/configure-pages@v3 - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - path: ./build - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + +permissions: + id-token: write + pages: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + # Build steps + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + - name: Install dependencies + run: npm install --frozen-lockfile + working-directory: ./ + - name: Build + run: npm run build + working-directory: ./ + + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ./build + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index c1a26fc..8fc1f0c 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -1,26 +1,26 @@ -name: Test Docs Deployment - -on: - pull_request: - branches: - - main - # Review gh actions docs if you want to further define triggers, paths, etc - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on - -jobs: - test-deploy: - name: Test docs deployment - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: npm - - - name: Install dependencies - run: npm install --frozen-lockfile - working-directory: ./ - - name: Test build website - run: npm run build - working-directory: ./ +name: Test Docs Deployment + +on: + pull_request: + branches: + - main + # Review gh actions docs if you want to further define triggers, paths, etc + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on + +jobs: + test-deploy: + name: Test docs deployment + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + + - name: Install dependencies + run: npm install --frozen-lockfile + working-directory: ./ + - name: Test build website + run: npm run build + working-directory: ./ diff --git a/.gitignore b/.gitignore index 33f9be8..31271f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,19 @@ -.DS_Store -.vscode/* -!.vscode/extensions.json -.idea -*.iml -*.code-workspace -.changelog -.history - -node_modules -.yarn - -.eslintcache - -yarn-error.log -build - -.docusaurus +.DS_Store +.vscode/* +!.vscode/extensions.json +.idea +*.iml +*.code-workspace +.changelog +.history + +node_modules +.yarn + +.eslintcache + +yarn-error.log +build + +.docusaurus .cache-loader \ No newline at end of file diff --git a/babel.config.js b/babel.config.js index 92d391e..e00595d 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,3 @@ -module.exports = { - presets: [require.resolve('@docusaurus/core/lib/babel/preset')], -}; +module.exports = { + presets: [require.resolve('@docusaurus/core/lib/babel/preset')], +}; diff --git a/development/contribution-guide.mdx b/development/contribution-guide.mdx index 4d08b4d..cfaeecf 100644 --- a/development/contribution-guide.mdx +++ b/development/contribution-guide.mdx @@ -1,55 +1,55 @@ ---- -title: How to Contribute -# tags: -# - -pagination_next: null -pagination_prev: null -description: "How to contribute to the GP2040-CE Project" ---- - -# How to Contribute - -Thank you for taking the time to read this and contributing to the project! - -Third-party contributions help us grow and improve GP2040-CE. We want to make the pull request and contribution process useful and easy for both contributors and maintainers. - -To this end we’ve put together some guidelines for contributors to help your pull request be accepted without major changes. - -## Project Overview - -GP2040-CE is largely written in C/C++, with a significant portion of the web configurator written in JavaScript within a React framework. - -## How do I make a contribution? - -Never made an open source contribution before? Wondering how contributions work in GP2040-CE? Here’s a quick rundown! - -1. Sign up for a GitHub account. -2. Find an issue you are interested in addressing, or a feature you would like to add. -3. Fork the repository associated with the issue to your GitHub account. This means that you will have a copy of the repository under `your-GitHub-username/GP2040-CE`. -4. Clone the repository to your local machine using `git clone https://github.com/OpenStickCommunity/GP2040-CE` -5. If you’re working on a new feature consider opening an issue to talk with us about the work you’re about to undertake. -6. Create a new branch for your fix using `git checkout -b branch-name-here`. -7. Make the appropriate changes for the issue you are trying to address or the feature that you want to add. -8. Use `git add insert-paths-of-changed-files-here` to add the file contents of the changed files to the “snapshot” git uses to manage the state of the project, also known as the index. -9. Use `git commit -m "Insert a short message of the changes made here"` to store the contents of the index with a descriptive message. -10. Push the changes to your repository on GitHub using `git push origin branch-name-here`. -11. Submit a pull request to [OpenStickCommunity/GP2040-CE](https://github.com/OpenStickCommunity/GP2040-CE). -12. Title the pull request with a short description of the changes made and the issue or bug number associated with your change. For example, you can title an issue like so “Added more log outputting to resolve #4352”. -13. In the description of the pull request explain the changes that you made, any issues you think exist with the pull request you made, and any questions you have for the maintainer. It’s OK if your pull request is not perfect (no pull request is), the reviewer will be able to help you fix any problems and improve it! -14. Wait for the pull request to be reviewed by a maintainer. -15. Make changes to the pull request if the reviewing maintainer recommends them. -16. Celebrate your success after your pull request is merged! - -## Coding Conventions - -## General Guidelines - -- **Before you contribute**: Please make sure your fork is up to date with the upstream `GP2040-CE` repo. This will help minimize CI failures that may not occur for you when compiling locally. -- Separate PRs into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature. -- Check for unnecessary whitespace with `git diff --check` before committing. -- Make sure your code change actually compiles. -- Make sure commit messages are understandable on their own. You should put a short description (no more than 70 characters) on the first line, the second line should be empty, and on the 3rd and later lines you should describe your commit in detail, if required. - -## Documentation - -Documentation is one of the easiest ways to get started contributing to GP2040-CE. Finding places where the documentation is wrong or incomplete and fixing those is easy! We also very badly need someone to edit our documentation, so if you have editing skills but aren’t sure where or how to jump in please [reach out for help](/getting-help-support)! +--- +title: How to Contribute +# tags: +# - +pagination_next: null +pagination_prev: null +description: "How to contribute to the GP2040-CE Project" +--- + +# How to Contribute + +Thank you for taking the time to read this and contributing to the project! + +Third-party contributions help us grow and improve GP2040-CE. We want to make the pull request and contribution process useful and easy for both contributors and maintainers. + +To this end we’ve put together some guidelines for contributors to help your pull request be accepted without major changes. + +## Project Overview + +GP2040-CE is largely written in C/C++, with a significant portion of the web configurator written in JavaScript within a React framework. + +## How do I make a contribution? + +Never made an open source contribution before? Wondering how contributions work in GP2040-CE? Here’s a quick rundown! + +1. Sign up for a GitHub account. +2. Find an issue you are interested in addressing, or a feature you would like to add. +3. Fork the repository associated with the issue to your GitHub account. This means that you will have a copy of the repository under `your-GitHub-username/GP2040-CE`. +4. Clone the repository to your local machine using `git clone https://github.com/OpenStickCommunity/GP2040-CE` +5. If you’re working on a new feature consider opening an issue to talk with us about the work you’re about to undertake. +6. Create a new branch for your fix using `git checkout -b branch-name-here`. +7. Make the appropriate changes for the issue you are trying to address or the feature that you want to add. +8. Use `git add insert-paths-of-changed-files-here` to add the file contents of the changed files to the “snapshot” git uses to manage the state of the project, also known as the index. +9. Use `git commit -m "Insert a short message of the changes made here"` to store the contents of the index with a descriptive message. +10. Push the changes to your repository on GitHub using `git push origin branch-name-here`. +11. Submit a pull request to [OpenStickCommunity/GP2040-CE](https://github.com/OpenStickCommunity/GP2040-CE). +12. Title the pull request with a short description of the changes made and the issue or bug number associated with your change. For example, you can title an issue like so “Added more log outputting to resolve #4352”. +13. In the description of the pull request explain the changes that you made, any issues you think exist with the pull request you made, and any questions you have for the maintainer. It’s OK if your pull request is not perfect (no pull request is), the reviewer will be able to help you fix any problems and improve it! +14. Wait for the pull request to be reviewed by a maintainer. +15. Make changes to the pull request if the reviewing maintainer recommends them. +16. Celebrate your success after your pull request is merged! + +## Coding Conventions + +## General Guidelines + +- **Before you contribute**: Please make sure your fork is up to date with the upstream `GP2040-CE` repo. This will help minimize CI failures that may not occur for you when compiling locally. +- Separate PRs into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature. +- Check for unnecessary whitespace with `git diff --check` before committing. +- Make sure your code change actually compiles. +- Make sure commit messages are understandable on their own. You should put a short description (no more than 70 characters) on the first line, the second line should be empty, and on the 3rd and later lines you should describe your commit in detail, if required. + +## Documentation + +Documentation is one of the easiest ways to get started contributing to GP2040-CE. Finding places where the documentation is wrong or incomplete and fixing those is easy! We also very badly need someone to edit our documentation, so if you have editing skills but aren’t sure where or how to jump in please [reach out for help](/getting-help-support)! diff --git a/development/documentation-preview.mdx b/development/documentation-preview.mdx index 098feea..b3adf0f 100644 --- a/development/documentation-preview.mdx +++ b/development/documentation-preview.mdx @@ -1,67 +1,67 @@ ---- -title: Documentation Preview -# tags: -# - -pagination_next: null -pagination_prev: null -description: "How to preview documentation locally" ---- - -# Documentation Preview - -While writing and developing the documentation, you will want to build locally so you can see changes without making updates to the main repository. However, when you are ready to test for a pull request, compile for production as this will build the files that would be used for a live site and will reveal issues that may not be present when building locally. - -## Clear Local Build - -This process will clear generated assets, caches, build artifacts from your docs folder. It's recommended to do so anytime there are issues with the Docusaurus site when building locally or compiling for production. - -1. Open a terminal in the root of the GP2040-CE project -2. Run the following commands - -```shell -cd site/ -npm run docusaurus clear -``` - -## Build Locally - -This will build and serve your site locally with [Webpack Dev Server](https://webpack.js.org/configuration/dev-server/). - -:::note - -Changes made to documents while the dev server is running will update the live site on save. - -::: - -1. Open a terminal in the root of the GP2040-CE project -2. Run the following commands - -```shell -cd site/ -npm install -npm start -``` - -3. In the default web browser, `http://localhost:port` should automatically open and allow you to preview the site. - -## Production Preview - -This will compile your site for production, creating a build folder that would be used as a static site. - -:::note - -Changes made to documents while the dev server is running will **not** update the live site on save. - -::: - -1. Open a terminal in the root of the GP2040-CE project -2. Run the following commands - -```shell -cd site/ -npm install -npm run build -npm run serve -``` - -3. In the default web browser, `http://localhost:port` should automatically open and allow you to preview the site. +--- +title: Documentation Preview +# tags: +# - +pagination_next: null +pagination_prev: null +description: "How to preview documentation locally" +--- + +# Documentation Preview + +While writing and developing the documentation, you will want to build locally so you can see changes without making updates to the main repository. However, when you are ready to test for a pull request, compile for production as this will build the files that would be used for a live site and will reveal issues that may not be present when building locally. + +## Clear Local Build + +This process will clear generated assets, caches, build artifacts from your docs folder. It's recommended to do so anytime there are issues with the Docusaurus site when building locally or compiling for production. + +1. Open a terminal in the root of the GP2040-CE project +2. Run the following commands + +```shell +cd site/ +npm run docusaurus clear +``` + +## Build Locally + +This will build and serve your site locally with [Webpack Dev Server](https://webpack.js.org/configuration/dev-server/). + +:::note + +Changes made to documents while the dev server is running will update the live site on save. + +::: + +1. Open a terminal in the root of the GP2040-CE project +2. Run the following commands + +```shell +cd site/ +npm install +npm start +``` + +3. In the default web browser, `http://localhost:port` should automatically open and allow you to preview the site. + +## Production Preview + +This will compile your site for production, creating a build folder that would be used as a static site. + +:::note + +Changes made to documents while the dev server is running will **not** update the live site on save. + +::: + +1. Open a terminal in the root of the GP2040-CE project +2. Run the following commands + +```shell +cd site/ +npm install +npm run build +npm run serve +``` + +3. In the default web browser, `http://localhost:port` should automatically open and allow you to preview the site. diff --git a/development/documentation-update-downloads.mdx b/development/documentation-update-downloads.mdx index d0f6b60..a407ca9 100644 --- a/development/documentation-update-downloads.mdx +++ b/development/documentation-update-downloads.mdx @@ -1,46 +1,46 @@ ---- -title: Update Downloads Page -# tags: -# - -pagination_next: null -pagination_prev: null -description: "How to update the Downloads Page to add a new microcontroller board or controller" ---- - -# Update Downloads Page - -Adding a microcontroller board or device to the [Downloads](/downloads) page requires an update to the `src/config/boards.tsx` file. The information required will depend on whether you are adding a microcontroller board or a controller. - -| Key | Value | -| ------------ | ---------------------------------------------------------------------------------------------------------------- | -| `name` | The name of the device what will be listed on the Downloads page | -| `configName` | The name of the device that will be used to generate the .uf2 file and used to generate link to release firmware | -| `pinout` | Link to the devices pinout diagram | -| `website` | Link to the website containing device information | -| `image` | Absolute link to the asset used for device, change only `BoardName` to match file name in `static/img/boards/` | -| `supported` | (Microcontroller Board Only) Whether the device is currently supported by the project | -| `category` | (Controller Only) The category classification following convention listed below | -| `desc` | Short description of the device and manufacturer to be displayed on Downloads page | - -## Microcontroller Board - -The template for microcontroller boards can be found in [Templates - Microcontroller Boards](..//development/templates.mdx#microcontroller-boards). - -To add a microcontroller board to the download list, fill out the template with all of the information and add it to the array `boards['Microcontroller Boards']`. The order that the boards are listed determine the order that they appear on the page so note the following order of boards. - -- Raspberry Pi Pico -- Raspberry Pi Pico W -- The rest of the microcontroller boards in alphabetical order - -## Controllers - -The template for controllers can be found in [Templates - Controllers](..//development/templates.mdx#controllers). - -To add a controller to the download list, fill out the template with all of the information and add it to the array `boards['Controllers']`. The order of the controllers in this array should be alphabetical. - -For categories, the convention is as follows. - -- `official` - Official boards of the project -- `open` - Open source devices -- `closed` - Closed source devices -- `legacy` - Devices that are not or are no longer supported by the project +--- +title: Update Downloads Page +# tags: +# - +pagination_next: null +pagination_prev: null +description: "How to update the Downloads Page to add a new microcontroller board or controller" +--- + +# Update Downloads Page + +Adding a microcontroller board or device to the [Downloads](/downloads) page requires an update to the `src/config/boards.tsx` file. The information required will depend on whether you are adding a microcontroller board or a controller. + +| Key | Value | +| ------------ | ---------------------------------------------------------------------------------------------------------------- | +| `name` | The name of the device what will be listed on the Downloads page | +| `configName` | The name of the device that will be used to generate the .uf2 file and used to generate link to release firmware | +| `pinout` | Link to the devices pinout diagram | +| `website` | Link to the website containing device information | +| `image` | Absolute link to the asset used for device, change only `BoardName` to match file name in `static/img/boards/` | +| `supported` | (Microcontroller Board Only) Whether the device is currently supported by the project | +| `category` | (Controller Only) The category classification following convention listed below | +| `desc` | Short description of the device and manufacturer to be displayed on Downloads page | + +## Microcontroller Board + +The template for microcontroller boards can be found in [Templates - Microcontroller Boards](..//development/templates.mdx#microcontroller-boards). + +To add a microcontroller board to the download list, fill out the template with all of the information and add it to the array `boards['Microcontroller Boards']`. The order that the boards are listed determine the order that they appear on the page so note the following order of boards. + +- Raspberry Pi Pico +- Raspberry Pi Pico W +- The rest of the microcontroller boards in alphabetical order + +## Controllers + +The template for controllers can be found in [Templates - Controllers](..//development/templates.mdx#controllers). + +To add a controller to the download list, fill out the template with all of the information and add it to the array `boards['Controllers']`. The order of the controllers in this array should be alphabetical. + +For categories, the convention is as follows. + +- `official` - Official boards of the project +- `open` - Open source devices +- `closed` - Closed source devices +- `legacy` - Devices that are not or are no longer supported by the project diff --git a/development/firmware-development.mdx b/development/firmware-development.mdx index 06d9346..dc3dc82 100644 --- a/development/firmware-development.mdx +++ b/development/firmware-development.mdx @@ -1,542 +1,542 @@ ---- -title: Firmware Development -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Documentation on building and developing for GP2040-CE Firmware" ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# Firmware Development - -GP2040-CE is written in C++ and set up as a standard Pico SDK project. - -See [Getting Started with the Raspberry Pi Pico](https://rptl.io/pico-get-started). - -## Environment Setup - -Most of this will be parroting the above linked PDF from the Raspberry Pi Foundation. - - - - -1. Download and install [CMake](https://github.com/Kitware/CMake/releases/download/v3.27.4/cmake-3.27.4-windows-x86_64.msi). -2. Install [NodeJS](https://nodejs.org/en/download) -3. Install [NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) -4. Download and install [pico-setup-windows-x64-standalone](https://github.com/raspberrypi/pico-setup-windows/releases/). -5. Download and install VSCode. -6. Download and install [Windows Terminal](https://github.com/microsoft/terminal/releases/tag/v1.17.11461.0). -7. Open Windows Terminal. -8. Download the GP2040-CE-main repository by running the following commands in the Windows Terminal. This will download the folder to `C:\Users\user\GP2040-CE`. - - ```console - git clone https://github.com/OpenStickCommunity/GP2040-CE.git - cd GP2040-CE - git submodule update --init - ``` - -After installing the Raspberry Pi Pico SDK, you should now have a shortcut to "Pico-Visual Studio Code" (search for it using Windows Search). - -8. Open "Pico-Visual Studio Code" via Windows search. This is a shortcut with pre-configured environment variables (this will be explained later). -9. Navigate to the Extensions window by pressing `Ctrl+Shift+X`. -10. Install "CMake Tools" by Microsoft. -11. Open the GP2040-CE folder you downloaded earlier via "File > Open Folder." - - - - -1. Install the latest[Arm GNU Toolchain](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads) -2. Install latest version of [CMake](https://cmake.org/download/) -3. Install [Visual Studio Build tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022), or the full [Visual Studio Community Edition IDE](https://visualstudio.microsoft.com/downloads/#visual-studio-community-2022) - - Make sure to select the Desktop development with C++ workload - - Select the latest Windows 10 or Windows 11 SDK from the Individual Components -4. Install [Python 3.10](https://www.python.org/downloads/windows/) - - At the end of the installation, there is an option to disable max file path length. You want to select this. -5. Install [Visual Studio Code](https://code.visualstudio.com/) - Optional -6. Install git - - Set default editor to anything other than VIM, such as Visual Studio Code -7. Install [NodeJS](https://nodejs.org/en/download) and NPM -8. Clone the Pico SDK to your local computer - - ```console - git clone https://github.com/raspberrypi/pico-sdk.git - cd pico-sdk - git submodule update --init - cd .. - ``` - -9. From a command-prompt, Clone GP2040-CE to your local computer - - ```console - git clone https://github.com/OpenStickCommunity/GP2040-CE.git - cd GP2040-CE - ``` - - - - -#### Ubuntu - -This setup assumes an understanding of Linux terminal usage. - -1. Get the SDK - - ```bash - cd ~/ - mkdir pico - cd pico - git clone https://github.com/raspberrypi/pico-sdk.git --branch master - cd pico-sdk - git submodule update --init - cd .. - ``` - -2. Install the toolchain - - ```bash - sudo apt update - sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential - ``` - - - May additionally need to install `libstdc++-arm-none-eabi-newlib` - -3. Install NodeJS and NPM - - ```bash - curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\ - sudo apt-get install -y nodejs - ``` - -4. Get GP2040-CE - - ```bash - git clone https://github.com/OpenStickCommunity/GP2040-CE.git - cd GP2040-CE - git submodule update --init - ``` - -#### Raspberry Pi - -This setup script requires approximately 2.5GB of disk space on your SD card. - -1. Download the setup script - - ```bash - wget https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh - ``` - -2. Make script executable and Run it. - - ```bash - chmod +x pico_setup.sh - ``` - -3. Install NodeJS and NPM - - ```bash - curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\ - sudo apt-get install -y nodejs - ``` - -4. Reboot your Pi - - ```bash - sudo reboot - ``` - -5. Get GP2040-CE - - ```bash - git clone https://github.com/OpenStickCommunity/GP2040-CE.git - cd GP2040-CE - git submodule update --init - ``` - - - - -## Building - -### Environment Variables - -A number of new environment variables have been setup to control parts of the build flow. - -| Name | Default | Description | -| ------------------ | ------- | ------------------------------------------------------------------------------------------------------- | -| GP2040_BOARDCONFIG | Pico | The boards.h config file to use for the build. | -| SKIP_WEBBUILD | FALSE | Determines whether the web configurator is built during the cmake configuration step. | -| SKIP_SUBMODULES | FALSE | Determines whether the submodule init command is run automatically during the cmake configuration step. | - -#### SDK Variables - -There are a few SDK variables we take advantage of for our builds. - -| Name | Default | Description | -| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| PICO_BOARD | pico | This is the embedded board that the RP2040 chip is part of. By default, it assumes the Pico. This variable would match the `` file in the board's configs folder. | - - - - -After installing the Raspberry Pi Pico SDK, you should now have a shortcut to "Pico-Visual Studio Code" (search for it using Windows Search). This shortcut should already have everything configured, **allowing you to skip to step 7**. If you're experiencing compilation issues, consider following the manual steps outlined here. - -Ensure the `PICO_SDK_PATH` environment variable is set: - -1. Search for "Edit environment variables for your account" in Windows. -2. Under "User Variables," click "New...". -3. In the dialog that appears, enter `PICO_SDK_PATH` for the Variable Name. -4. Click "Browse Directory" and navigate to `C:\Program Files\Raspberry Pi\Pico SDK v1.5.1\pico-sdk` for the Variable Value. -5. Create another new variable. -6. Enter `GP2040_BOARDCONFIG` for the Variable Name. -7. Enter `Pico` (or the name of your edited config folder) for the Variable Value. - -You can also set the variable within VSCode: - -1. Press `Ctrl + ,` to open the settings. -2. Use the search bar to find "CMake." -3. Scroll until you see "CMake: Configure Environment." -4. Click "Add Item." -5. Key: `GP2040_BOARDCONFIG` -6. Value: `Pico` (or your working folder name). - -When prompted, choose `GCC 10.3.1 ARM NONE EABI` for "Select a kit for GP2040-CE" - -From inside VSCode: - -1. Click the CMake icon on the left sidebar of VSCode. -2. You'll see three icons at the top-right corner of the CMake project outline. Click the "Configure All Projects" icon (looks like a page with an arrow). -3. Wait for the configuration process to complete. If progress isn't visible, open a new terminal in VSCode by clicking on the "Terminal" menu, then "New Terminal". A new terminal window will open at the bottom, navigate the "Output" tab. -4. Click "Build All Projects" in the CMake project outline. -5. The files should be in a new folder named "build" inside the GP2040-CE folder - - - - -Start in the GP2040-CE folder. **From a Developer Powershell or Developer Command Command Prompt**: - -:::note - -A new Powershell or Command Prompt session will be required after setting an environment variable. - -::: - -1. Ensure you have the `PICO_SDK_PATH` environment variable set to the path to your pico-sdk folder. -2. (optional) Set the `GP2040_BOARDCONFIG` environment variable to the folder name for your board configuration. - - - Default value is `Pico` - -3. Create a build directory, configure the build, and execute the build. - - ```console - mkdir build - cd build - cmake -G "NMake Makefiles" .. - nmake - ``` - -4. Your UF2 file should be in the build directory. - - - - -Start in the GP2040-CE folder - -1. Ensure you have the `PICO_SDK_PATH` environment variable set to the path to your pico-sdk folder. -2. (optional) Set the `GP2040_BOARDCONFIG` environment variable to the folder name for your board configuration. - - Default value is `Pico` -3. Create a build directory, configure the build, and execute the build. - - ```bash - mkdir build - cd build - cmake .. - make - ``` - -4. Your UF2 file should be in the build directory. - - - - -## Configuration - -:::note - -We're looking to move away from compile time configuration, in favor of runtime configuration. - -::: - -There are two simple options for building GP2040-CE for your board. You can either edit an existing board definition, or create your own. Several example configurations are located in the repository **[configs](https://github.com/OpenStickCommunity/GP2040-CE/tree/main/configs)** folder. This document will outline setting up a new build configuration. - -### Board Configuration Folder - -Each subfolder in [`configs`](https://github.com/OpenStickCommunity/GP2040-CE/tree/main/configs) contains a separate board configuration, which consists of the following: - -| Name | Required? | Description | -| ----------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `BoardConfig.h` | Yes | The configuration file used when building GP2040-CE for a specific controller/board. Contains initial pin mappings, LED configuration, etc. | -| `README.mdx` | No | Provides information related to this board configuration. Not required for the build process, but suggested for pull requests of new board configurations. | -| `assets/` | No | Folder for containing assets included in the `README.mdx`. Not required for the build process. | -| '\' | No | Board definition file, named after the board itself, used by the Pico SDK for configuring board specific SDK features. [Pico Example](https://github.com/raspberrypi/pico-sdk/blob/master/src/boards/include/boards/pico.h) | - -### Board Configuration (`BoardConfig.h`) - -The following board options are available in the `BoardConfig.h` file: - -| Name | Description | Required? | -| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -| **PIN*DPAD*_X_**
**PIN*BUTTON*_X_** | The GPIO pin for the button. Replace the _`X`_ with GP2040-CE button or DPad direction. | Yes | -| **DEFAULT_SOCD_MODE** | The default SOCD mode to use, defaults to `SOCD_MODE_NEUTRAL`.
Available options are:
`SOCD_MODE_NEUTRAL`
`SOCD_MODE_UP_PRIORITY`
`SOCD_MODE_SECOND_INPUT_PRIORITY` | No | -| **BUTTON_LAYOUT** | The layout of controls/buttons for use with per-button LEDs and external displays.
Available options are:
`BUTTON_LAYOUT_STICKLESS`
`BUTTON_LAYOUT_WASD` | Yes | - -Create `configs/NewBoard/BoardConfig.h` and add your pin configuration and options. An example `BoardConfig.h` file: - -```cpp -// BoardConfig.h - -#include - -#define PIN_DPAD_UP 2 -#define PIN_DPAD_DOWN 3 -#define PIN_DPAD_LEFT 4 -#define PIN_DPAD_RIGHT 5 -#define PIN_BUTTON_B1 6 -#define PIN_BUTTON_B2 7 -#define PIN_BUTTON_B3 8 -#define PIN_BUTTON_B4 9 -#define PIN_BUTTON_L1 10 -#define PIN_BUTTON_R1 11 -#define PIN_BUTTON_L2 26 -#define PIN_BUTTON_R2 27 -#define PIN_BUTTON_S1 16 -#define PIN_BUTTON_S2 17 -#define PIN_BUTTON_L3 18 -#define PIN_BUTTON_R3 19 -#define PIN_BUTTON_A1 20 -#define PIN_BUTTON_A2 21 -#define PIN_BUTTON_TURBO -1 -#define PIN_SLIDER_LS -1 -#define PIN_SLIDER_RS -1 - -#define DEFAULT_SOCD_MODE SOCD_MODE_NEUTRAL -#define BUTTON_LAYOUT BUTTON_LAYOUT_ARCADE -``` - -#### RGB LEDs - -GP2040-CE supports per-button WS2812 and similar RGB LEDs. - -The following RGB LED options are available in the `BoardConfig.h` file: - -| Name | Description | Required? | -| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | -| **BUTTON_LAYOUT** | The layout of controls/buttons for use with per-button LEDs and external displays.
Available options are:
`BUTTON_LAYOUT_STICKLESS`
`BUTTON_LAYOUT_WASD` | Yes | -| **BOARD_LEDS_PIN** | Data PIN for your LED strand | Yes | -| **LED_FORMAT** | The color data format for the LED chain.
Available options are:
`LED_FORMAT_GRB`
`LED_FORMAT_RGB`
`LED_FORMAT_GRBW`
`LED_FORMAT_RGBW` | No, default value `LED_FORMAT_GRB` | -| **LEDS_PER_PIXEL** | The number of LEDs per button. | Yes | -| **LED_BRIGHTNESS_MAXIMUM** | Max brightness value, `uint8_t` 0-255. | Yes | -| **LED_BRIGHTNESS_STEPS** | The number of brightness steps when using the up/down hotkey. | Yes | -| **LEDS*DPAD*_X_**
**LEDS*BUTTON*_X_** | The index of the button on the LED chain. Replace the _`X`_ with GP2040-CE button or DPad direction. | Yes | -| **LEDS_BASE_ANIMATION_INDEX** | The default LED animation index. | No, defaults to `1` | -| **LEDS_STATIC_COLOR_INDEX** | The default color index for the static color theme | No, defaults to `2` | -| **LEDS_BUTTON_COLOR_INDEX** | The default color index for the pressed button color | No, defaults to `1` | -| **LEDS_THEME_INDEX** | The default theme index for static themes | No, defaults to `0` | -| **LEDS_RAINBOW_CYCLE_TIME** | The color cycle time for rainbow cycle theme | No, defaults to `40` | -| **LEDS_CHASE_CYCLE_TIME** | The animation speed for the rainbow chase theme | No, defaults to `85` | - -An example RGB LED setup in the `BoardConfig.h` file: - -```cpp -// BoardConfig.h - -#include "gp2040.h" -#include "NeoPico.hpp" - -#define BUTTON_LAYOUT BUTTON_LAYOUT_STICKLESS - -#define BOARD_LEDS_PIN 22 - -#define LED_BRIGHTNESS_MAXIMUM 100 -#define LED_BRIGHTNESS_STEPS 5 -#define LED_FORMAT LED_FORMAT_GRB -#define LEDS_PER_PIXEL 2 - -#define LEDS_DPAD_LEFT 0 -#define LEDS_DPAD_DOWN 1 -#define LEDS_DPAD_RIGHT 2 -#define LEDS_DPAD_UP 3 -#define LEDS_BUTTON_B3 4 -#define LEDS_BUTTON_B4 5 -#define LEDS_BUTTON_R1 6 -#define LEDS_BUTTON_L1 7 -#define LEDS_BUTTON_B1 8 -#define LEDS_BUTTON_B2 9 -#define LEDS_BUTTON_R2 10 -#define LEDS_BUTTON_L2 11 -``` - -#### Player LEDs - -GP2040-CE supports PWM and RGB player LEDs (PLEDs) and can be configured in the `BoardConfig.h` file. - -:::note - -RGB PLEDs require [RGB LEDs](#rgb-leds) to be configured. - -::: - -The following PLED options are available in the `BoardConfig.h` file: - -| Name | Description | Required? | -| ------------- | ------------------------------------------------------------------------------------------ | --------- | -| **PLED_TYPE** | Configures the type of PLEDs.
Available options are: `PLED_TYPE_PWM`, `PLED_TYPE_RGB` | Yes | -| **PLED1_PIN** | (PWM) The GPIO pin for PLED #1.
(RGB) The index of PLED #1 on the LED chain. | Yes | -| **PLED2_PIN** | (PWM) The GPIO pin for PLED #2.
(RGB) The index of PLED #2 on the LED chain. | Yes | -| **PLED3_PIN** | (PWM) The GPIO pin for PLED #3.
(RGB) The index of PLED #3 on the LED chain. | Yes | -| **PLED4_PIN** | (PWM) The GPIO pin for PLED #4.
(RGB) The index of PLED #4 on the LED chain. | Yes | - -An example PLED setup in the `BoardConfig.h` file: - -```cpp -// BoardConfig.h - -#include "PlayerLEDs.h" - -#define PLED_TYPE PLED_TYPE_RGB -#define PLED1_PIN 12 -#define PLED2_PIN 13 -#define PLED3_PIN 14 -#define PLED4_PIN 15 -``` - -#### I2C Displays - -GP2040-CE supports 128x64 monochrome displays that run on the SSD1306, SH1106 or SH1107 drivers. The following options are available for displays: - -| Name | Description | Required? | -| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- | -| **BUTTON_LAYOUT** | The layout of controls/buttons for use with per-button LEDs and external displays.
Available options are:
`BUTTON_LAYOUT_STICKLESS`
`BUTTON_LAYOUT_WASD` | Yes | -| **HAS_I2C_DISPLAY** | Flag to indicate the controller contains an I2C display module. | No | -| **DISPLAY_I2C_ADDR** | The I2C address of the display. | No, defaults to `0x3C` | -| **I2C_SDA_PIN** | The GPIO pin for the I2C SDA line. | If `HAS_I2C_DISPLAY` is enabled | -| **I2C_SCL_PIN** | The GPIO pin for the I2C SCL line. | If `HAS_I2C_DISPLAY` is enabled | -| **I2C_BLOCK** | The I2C block on the Pico. Refer to the [Pico Pinout Diagram](https://datasheets.raspberrypi.com/pico/Pico-R3-A4-Pinout.pdf) to identify which block is in use based on the SDA and SCL pins being used.
Available options are:
`i2c0`
`i2c1` | No, defaults to `i2c0` | -| **I2C_SPEED** | The speed of the I2C bus. `100000` is standard mode, while `400000` is used for fast mode communication. Higher values may be used but will require testing the device for support. | No, defaults to `400000` | -| **DISPLAY_FLIP** | Flag to flip the rendered display output. Set to `1` to enable. | No, defaults to `0` | -| **DISPLAY_INVERT** | Flag to invert the rendered display output. Set to `1` to enable. | No, defaults to `0` | - -An example I2C display setup in the `BoardConfig.h` file: - -```cpp -#define BUTTON_LAYOUT BUTTON_LAYOUT_WASD -#define HAS_I2C_DISPLAY 1 -#define I2C_SDA_PIN 0 -#define I2C_SCL_PIN 1 -#define I2C_BLOCK i2c0 -#define I2C_SPEED 800000 -``` - -#### I2C Display Splash - -The firmware also has a splash display feature. The default splash image has been defined in `headers/add-ons/i2cdisplay.h`. The data for the splash image are bytes representing the bitmap to be displayed on the OLED screen. The splash image can be set via the web-config. If you would like to change the default version of the splash image (to preserve it beyond data wipe), it can be customized with a C define named `DEFAULT_SPLASH` in the active `BoardConfig.h` file. -The instructions on how to generate those bytes are as follows: - -1. Navigate to [Bitmap Converter web utility](https://marlinfw.org/tools/u8glib/converter.html) -2. Configure generated code - - Select Marlin 2.x and Bitmap, untick all the rest. -3. Upload the splash image file - - Set the image file after clicking on "Choose file". The image file needs to be preprocessed to your liking and cropped to 128x64. This should populate a code block below. -4. Use the generated code - - - Copy the hex numbers inside the curly braces from the code block. - - Navigate to the `BoardConfig.h` of your choice and at the end of the file right before `#endif`. Create a C define like so: - - ```cpp - #define DEFAULT_SPLASH \ - ``` - - - Then paste what you copied below what you just typed. Be sure to edit the array of bytes as follows: - - ```cpp - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ // First line - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ // Second line - ... // All lines below previous ones end in \ similar to those above - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // Last line doesn't have an \ to escape the new line - ``` - - - Here's a sample entry from Pico `BoardConfig.h`: - - ```cpp - #define DEFAULT_SPLASH \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x80,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xDF,0xC0, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xC1,0xFF,0xA0, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xCF,0xFE,0x80, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xE0,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xAB,0xC0,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x00,0x00,0xFB,0x83,0xFF,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x01,0xFF,0x00,0x01,0xF3,0x07,0xFC,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x07,0xFF,0x00,0x03,0xE0,0x3F,0xF4,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x38,0x0A,0xE7,0x80,0x03,0xC0,0x5F,0x80,0x00, \ - 0x00,0x00,0x00,0x20,0x07,0x81,0xFF,0x39,0xC3,0xC7,0x01,0xD7,0x80,0x3F,0x00,0x00, \ - 0x00,0x00,0x00,0xE0,0x1F,0xE7,0xFF,0x79,0xC7,0x87,0x9F,0xA7,0x80,0x6E,0x3C,0x00, \ - 0x00,0x00,0xA0,0xC0,0x3F,0xEA,0xE7,0xF3,0xEF,0x07,0x7F,0xC7,0x01,0xCF,0xFF,0x80, \ - 0x00,0x03,0x8F,0xFC,0x7F,0xC3,0xC7,0x7F,0xFE,0x0F,0x7E,0x8F,0x87,0xDF,0xFC,0x00, \ - 0x00,0x0F,0xFF,0xFF,0x73,0xC7,0x87,0xFF,0xDE,0x0E,0x50,0x07,0x1F,0x1F,0xD0,0x00, \ - 0x00,0x1F,0x57,0xFF,0xE7,0x8F,0x07,0xFF,0x1C,0x3E,0x00,0x0F,0xFF,0x7F,0x00,0x00, \ - 0x00,0x7E,0x0B,0x8F,0x8F,0x8E,0x0F,0xFF,0x9E,0x7C,0x00,0x07,0xFD,0xFC,0x00,0x00, \ - 0x00,0x7C,0x37,0x9F,0x1F,0x1E,0x0F,0x87,0x1E,0xF8,0x00,0x07,0xF0,0x30,0x00,0x00, \ - 0x00,0xF1,0xF7,0xFE,0x1E,0x1C,0x3E,0x0E,0x1F,0xF0,0x00,0x01,0x40,0x28,0x00,0x00, \ - 0x01,0xEF,0xE7,0xF8,0x3C,0x3E,0x7C,0x0F,0x1F,0xE0,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x03,0xFF,0x8F,0xF0,0x7F,0xFE,0xF8,0x0E,0x0F,0x80,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x03,0xFF,0xCF,0xC0,0xFF,0xFF,0xF0,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x07,0x8B,0xFF,0x01,0xFF,0x8F,0xC0,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x07,0x87,0xFE,0x01,0xFE,0x0F,0x80,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x07,0x1F,0xDE,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x07,0xBF,0x9E,0x01,0xC0,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x07,0xFF,0x9C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x07,0xFB,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x03,0xE7,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x01,0x47,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x0E,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - ``` - -5. Test and verify - - Compile, if you did everything right, it should compile fine - - Load the UF2 after the compile. Check and verify in the web-config, if you have set a custom image before, you might need to reset data. +--- +title: Firmware Development +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Documentation on building and developing for GP2040-CE Firmware" +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# Firmware Development + +GP2040-CE is written in C++ and set up as a standard Pico SDK project. + +See [Getting Started with the Raspberry Pi Pico](https://rptl.io/pico-get-started). + +## Environment Setup + +Most of this will be parroting the above linked PDF from the Raspberry Pi Foundation. + + + + +1. Download and install [CMake](https://github.com/Kitware/CMake/releases/download/v3.27.4/cmake-3.27.4-windows-x86_64.msi). +2. Install [NodeJS](https://nodejs.org/en/download) +3. Install [NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +4. Download and install [pico-setup-windows-x64-standalone](https://github.com/raspberrypi/pico-setup-windows/releases/). +5. Download and install VSCode. +6. Download and install [Windows Terminal](https://github.com/microsoft/terminal/releases/tag/v1.17.11461.0). +7. Open Windows Terminal. +8. Download the GP2040-CE-main repository by running the following commands in the Windows Terminal. This will download the folder to `C:\Users\user\GP2040-CE`. + + ```console + git clone https://github.com/OpenStickCommunity/GP2040-CE.git + cd GP2040-CE + git submodule update --init + ``` + +After installing the Raspberry Pi Pico SDK, you should now have a shortcut to "Pico-Visual Studio Code" (search for it using Windows Search). + +8. Open "Pico-Visual Studio Code" via Windows search. This is a shortcut with pre-configured environment variables (this will be explained later). +9. Navigate to the Extensions window by pressing `Ctrl+Shift+X`. +10. Install "CMake Tools" by Microsoft. +11. Open the GP2040-CE folder you downloaded earlier via "File > Open Folder." + + + + +1. Install the latest[Arm GNU Toolchain](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads) +2. Install latest version of [CMake](https://cmake.org/download/) +3. Install [Visual Studio Build tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022), or the full [Visual Studio Community Edition IDE](https://visualstudio.microsoft.com/downloads/#visual-studio-community-2022) + - Make sure to select the Desktop development with C++ workload + - Select the latest Windows 10 or Windows 11 SDK from the Individual Components +4. Install [Python 3.10](https://www.python.org/downloads/windows/) + - At the end of the installation, there is an option to disable max file path length. You want to select this. +5. Install [Visual Studio Code](https://code.visualstudio.com/) - Optional +6. Install git + - Set default editor to anything other than VIM, such as Visual Studio Code +7. Install [NodeJS](https://nodejs.org/en/download) and NPM +8. Clone the Pico SDK to your local computer + + ```console + git clone https://github.com/raspberrypi/pico-sdk.git + cd pico-sdk + git submodule update --init + cd .. + ``` + +9. From a command-prompt, Clone GP2040-CE to your local computer + + ```console + git clone https://github.com/OpenStickCommunity/GP2040-CE.git + cd GP2040-CE + ``` + + + + +#### Ubuntu + +This setup assumes an understanding of Linux terminal usage. + +1. Get the SDK + + ```bash + cd ~/ + mkdir pico + cd pico + git clone https://github.com/raspberrypi/pico-sdk.git --branch master + cd pico-sdk + git submodule update --init + cd .. + ``` + +2. Install the toolchain + + ```bash + sudo apt update + sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential + ``` + + - May additionally need to install `libstdc++-arm-none-eabi-newlib` + +3. Install NodeJS and NPM + + ```bash + curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\ + sudo apt-get install -y nodejs + ``` + +4. Get GP2040-CE + + ```bash + git clone https://github.com/OpenStickCommunity/GP2040-CE.git + cd GP2040-CE + git submodule update --init + ``` + +#### Raspberry Pi + +This setup script requires approximately 2.5GB of disk space on your SD card. + +1. Download the setup script + + ```bash + wget https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh + ``` + +2. Make script executable and Run it. + + ```bash + chmod +x pico_setup.sh + ``` + +3. Install NodeJS and NPM + + ```bash + curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\ + sudo apt-get install -y nodejs + ``` + +4. Reboot your Pi + + ```bash + sudo reboot + ``` + +5. Get GP2040-CE + + ```bash + git clone https://github.com/OpenStickCommunity/GP2040-CE.git + cd GP2040-CE + git submodule update --init + ``` + + + + +## Building + +### Environment Variables + +A number of new environment variables have been setup to control parts of the build flow. + +| Name | Default | Description | +| ------------------ | ------- | ------------------------------------------------------------------------------------------------------- | +| GP2040_BOARDCONFIG | Pico | The boards.h config file to use for the build. | +| SKIP_WEBBUILD | FALSE | Determines whether the web configurator is built during the cmake configuration step. | +| SKIP_SUBMODULES | FALSE | Determines whether the submodule init command is run automatically during the cmake configuration step. | + +#### SDK Variables + +There are a few SDK variables we take advantage of for our builds. + +| Name | Default | Description | +| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| PICO_BOARD | pico | This is the embedded board that the RP2040 chip is part of. By default, it assumes the Pico. This variable would match the `` file in the board's configs folder. | + + + + +After installing the Raspberry Pi Pico SDK, you should now have a shortcut to "Pico-Visual Studio Code" (search for it using Windows Search). This shortcut should already have everything configured, **allowing you to skip to step 7**. If you're experiencing compilation issues, consider following the manual steps outlined here. + +Ensure the `PICO_SDK_PATH` environment variable is set: + +1. Search for "Edit environment variables for your account" in Windows. +2. Under "User Variables," click "New...". +3. In the dialog that appears, enter `PICO_SDK_PATH` for the Variable Name. +4. Click "Browse Directory" and navigate to `C:\Program Files\Raspberry Pi\Pico SDK v1.5.1\pico-sdk` for the Variable Value. +5. Create another new variable. +6. Enter `GP2040_BOARDCONFIG` for the Variable Name. +7. Enter `Pico` (or the name of your edited config folder) for the Variable Value. + +You can also set the variable within VSCode: + +1. Press `Ctrl + ,` to open the settings. +2. Use the search bar to find "CMake." +3. Scroll until you see "CMake: Configure Environment." +4. Click "Add Item." +5. Key: `GP2040_BOARDCONFIG` +6. Value: `Pico` (or your working folder name). + +When prompted, choose `GCC 10.3.1 ARM NONE EABI` for "Select a kit for GP2040-CE" + +From inside VSCode: + +1. Click the CMake icon on the left sidebar of VSCode. +2. You'll see three icons at the top-right corner of the CMake project outline. Click the "Configure All Projects" icon (looks like a page with an arrow). +3. Wait for the configuration process to complete. If progress isn't visible, open a new terminal in VSCode by clicking on the "Terminal" menu, then "New Terminal". A new terminal window will open at the bottom, navigate the "Output" tab. +4. Click "Build All Projects" in the CMake project outline. +5. The files should be in a new folder named "build" inside the GP2040-CE folder + + + + +Start in the GP2040-CE folder. **From a Developer Powershell or Developer Command Command Prompt**: + +:::note + +A new Powershell or Command Prompt session will be required after setting an environment variable. + +::: + +1. Ensure you have the `PICO_SDK_PATH` environment variable set to the path to your pico-sdk folder. +2. (optional) Set the `GP2040_BOARDCONFIG` environment variable to the folder name for your board configuration. + + - Default value is `Pico` + +3. Create a build directory, configure the build, and execute the build. + + ```console + mkdir build + cd build + cmake -G "NMake Makefiles" .. + nmake + ``` + +4. Your UF2 file should be in the build directory. + + + + +Start in the GP2040-CE folder + +1. Ensure you have the `PICO_SDK_PATH` environment variable set to the path to your pico-sdk folder. +2. (optional) Set the `GP2040_BOARDCONFIG` environment variable to the folder name for your board configuration. + - Default value is `Pico` +3. Create a build directory, configure the build, and execute the build. + + ```bash + mkdir build + cd build + cmake .. + make + ``` + +4. Your UF2 file should be in the build directory. + + + + +## Configuration + +:::note + +We're looking to move away from compile time configuration, in favor of runtime configuration. + +::: + +There are two simple options for building GP2040-CE for your board. You can either edit an existing board definition, or create your own. Several example configurations are located in the repository **[configs](https://github.com/OpenStickCommunity/GP2040-CE/tree/main/configs)** folder. This document will outline setting up a new build configuration. + +### Board Configuration Folder + +Each subfolder in [`configs`](https://github.com/OpenStickCommunity/GP2040-CE/tree/main/configs) contains a separate board configuration, which consists of the following: + +| Name | Required? | Description | +| ----------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `BoardConfig.h` | Yes | The configuration file used when building GP2040-CE for a specific controller/board. Contains initial pin mappings, LED configuration, etc. | +| `README.mdx` | No | Provides information related to this board configuration. Not required for the build process, but suggested for pull requests of new board configurations. | +| `assets/` | No | Folder for containing assets included in the `README.mdx`. Not required for the build process. | +| '\' | No | Board definition file, named after the board itself, used by the Pico SDK for configuring board specific SDK features. [Pico Example](https://github.com/raspberrypi/pico-sdk/blob/master/src/boards/include/boards/pico.h) | + +### Board Configuration (`BoardConfig.h`) + +The following board options are available in the `BoardConfig.h` file: + +| Name | Description | Required? | +| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | +| **PIN*DPAD*_X_**
**PIN*BUTTON*_X_** | The GPIO pin for the button. Replace the _`X`_ with GP2040-CE button or DPad direction. | Yes | +| **DEFAULT_SOCD_MODE** | The default SOCD mode to use, defaults to `SOCD_MODE_NEUTRAL`.
Available options are:
`SOCD_MODE_NEUTRAL`
`SOCD_MODE_UP_PRIORITY`
`SOCD_MODE_SECOND_INPUT_PRIORITY` | No | +| **BUTTON_LAYOUT** | The layout of controls/buttons for use with per-button LEDs and external displays.
Available options are:
`BUTTON_LAYOUT_STICKLESS`
`BUTTON_LAYOUT_WASD` | Yes | + +Create `configs/NewBoard/BoardConfig.h` and add your pin configuration and options. An example `BoardConfig.h` file: + +```cpp +// BoardConfig.h + +#include + +#define PIN_DPAD_UP 2 +#define PIN_DPAD_DOWN 3 +#define PIN_DPAD_LEFT 4 +#define PIN_DPAD_RIGHT 5 +#define PIN_BUTTON_B1 6 +#define PIN_BUTTON_B2 7 +#define PIN_BUTTON_B3 8 +#define PIN_BUTTON_B4 9 +#define PIN_BUTTON_L1 10 +#define PIN_BUTTON_R1 11 +#define PIN_BUTTON_L2 26 +#define PIN_BUTTON_R2 27 +#define PIN_BUTTON_S1 16 +#define PIN_BUTTON_S2 17 +#define PIN_BUTTON_L3 18 +#define PIN_BUTTON_R3 19 +#define PIN_BUTTON_A1 20 +#define PIN_BUTTON_A2 21 +#define PIN_BUTTON_TURBO -1 +#define PIN_SLIDER_LS -1 +#define PIN_SLIDER_RS -1 + +#define DEFAULT_SOCD_MODE SOCD_MODE_NEUTRAL +#define BUTTON_LAYOUT BUTTON_LAYOUT_ARCADE +``` + +#### RGB LEDs + +GP2040-CE supports per-button WS2812 and similar RGB LEDs. + +The following RGB LED options are available in the `BoardConfig.h` file: + +| Name | Description | Required? | +| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | +| **BUTTON_LAYOUT** | The layout of controls/buttons for use with per-button LEDs and external displays.
Available options are:
`BUTTON_LAYOUT_STICKLESS`
`BUTTON_LAYOUT_WASD` | Yes | +| **BOARD_LEDS_PIN** | Data PIN for your LED strand | Yes | +| **LED_FORMAT** | The color data format for the LED chain.
Available options are:
`LED_FORMAT_GRB`
`LED_FORMAT_RGB`
`LED_FORMAT_GRBW`
`LED_FORMAT_RGBW` | No, default value `LED_FORMAT_GRB` | +| **LEDS_PER_PIXEL** | The number of LEDs per button. | Yes | +| **LED_BRIGHTNESS_MAXIMUM** | Max brightness value, `uint8_t` 0-255. | Yes | +| **LED_BRIGHTNESS_STEPS** | The number of brightness steps when using the up/down hotkey. | Yes | +| **LEDS*DPAD*_X_**
**LEDS*BUTTON*_X_** | The index of the button on the LED chain. Replace the _`X`_ with GP2040-CE button or DPad direction. | Yes | +| **LEDS_BASE_ANIMATION_INDEX** | The default LED animation index. | No, defaults to `1` | +| **LEDS_STATIC_COLOR_INDEX** | The default color index for the static color theme | No, defaults to `2` | +| **LEDS_BUTTON_COLOR_INDEX** | The default color index for the pressed button color | No, defaults to `1` | +| **LEDS_THEME_INDEX** | The default theme index for static themes | No, defaults to `0` | +| **LEDS_RAINBOW_CYCLE_TIME** | The color cycle time for rainbow cycle theme | No, defaults to `40` | +| **LEDS_CHASE_CYCLE_TIME** | The animation speed for the rainbow chase theme | No, defaults to `85` | + +An example RGB LED setup in the `BoardConfig.h` file: + +```cpp +// BoardConfig.h + +#include "gp2040.h" +#include "NeoPico.hpp" + +#define BUTTON_LAYOUT BUTTON_LAYOUT_STICKLESS + +#define BOARD_LEDS_PIN 22 + +#define LED_BRIGHTNESS_MAXIMUM 100 +#define LED_BRIGHTNESS_STEPS 5 +#define LED_FORMAT LED_FORMAT_GRB +#define LEDS_PER_PIXEL 2 + +#define LEDS_DPAD_LEFT 0 +#define LEDS_DPAD_DOWN 1 +#define LEDS_DPAD_RIGHT 2 +#define LEDS_DPAD_UP 3 +#define LEDS_BUTTON_B3 4 +#define LEDS_BUTTON_B4 5 +#define LEDS_BUTTON_R1 6 +#define LEDS_BUTTON_L1 7 +#define LEDS_BUTTON_B1 8 +#define LEDS_BUTTON_B2 9 +#define LEDS_BUTTON_R2 10 +#define LEDS_BUTTON_L2 11 +``` + +#### Player LEDs + +GP2040-CE supports PWM and RGB player LEDs (PLEDs) and can be configured in the `BoardConfig.h` file. + +:::note + +RGB PLEDs require [RGB LEDs](#rgb-leds) to be configured. + +::: + +The following PLED options are available in the `BoardConfig.h` file: + +| Name | Description | Required? | +| ------------- | ------------------------------------------------------------------------------------------ | --------- | +| **PLED_TYPE** | Configures the type of PLEDs.
Available options are: `PLED_TYPE_PWM`, `PLED_TYPE_RGB` | Yes | +| **PLED1_PIN** | (PWM) The GPIO pin for PLED #1.
(RGB) The index of PLED #1 on the LED chain. | Yes | +| **PLED2_PIN** | (PWM) The GPIO pin for PLED #2.
(RGB) The index of PLED #2 on the LED chain. | Yes | +| **PLED3_PIN** | (PWM) The GPIO pin for PLED #3.
(RGB) The index of PLED #3 on the LED chain. | Yes | +| **PLED4_PIN** | (PWM) The GPIO pin for PLED #4.
(RGB) The index of PLED #4 on the LED chain. | Yes | + +An example PLED setup in the `BoardConfig.h` file: + +```cpp +// BoardConfig.h + +#include "PlayerLEDs.h" + +#define PLED_TYPE PLED_TYPE_RGB +#define PLED1_PIN 12 +#define PLED2_PIN 13 +#define PLED3_PIN 14 +#define PLED4_PIN 15 +``` + +#### I2C Displays + +GP2040-CE supports 128x64 monochrome displays that run on the SSD1306, SH1106 or SH1107 drivers. The following options are available for displays: + +| Name | Description | Required? | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- | +| **BUTTON_LAYOUT** | The layout of controls/buttons for use with per-button LEDs and external displays.
Available options are:
`BUTTON_LAYOUT_STICKLESS`
`BUTTON_LAYOUT_WASD` | Yes | +| **HAS_I2C_DISPLAY** | Flag to indicate the controller contains an I2C display module. | No | +| **DISPLAY_I2C_ADDR** | The I2C address of the display. | No, defaults to `0x3C` | +| **I2C_SDA_PIN** | The GPIO pin for the I2C SDA line. | If `HAS_I2C_DISPLAY` is enabled | +| **I2C_SCL_PIN** | The GPIO pin for the I2C SCL line. | If `HAS_I2C_DISPLAY` is enabled | +| **I2C_BLOCK** | The I2C block on the Pico. Refer to the [Pico Pinout Diagram](https://datasheets.raspberrypi.com/pico/Pico-R3-A4-Pinout.pdf) to identify which block is in use based on the SDA and SCL pins being used.
Available options are:
`i2c0`
`i2c1` | No, defaults to `i2c0` | +| **I2C_SPEED** | The speed of the I2C bus. `100000` is standard mode, while `400000` is used for fast mode communication. Higher values may be used but will require testing the device for support. | No, defaults to `400000` | +| **DISPLAY_FLIP** | Flag to flip the rendered display output. Set to `1` to enable. | No, defaults to `0` | +| **DISPLAY_INVERT** | Flag to invert the rendered display output. Set to `1` to enable. | No, defaults to `0` | + +An example I2C display setup in the `BoardConfig.h` file: + +```cpp +#define BUTTON_LAYOUT BUTTON_LAYOUT_WASD +#define HAS_I2C_DISPLAY 1 +#define I2C_SDA_PIN 0 +#define I2C_SCL_PIN 1 +#define I2C_BLOCK i2c0 +#define I2C_SPEED 800000 +``` + +#### I2C Display Splash + +The firmware also has a splash display feature. The default splash image has been defined in `headers/add-ons/i2cdisplay.h`. The data for the splash image are bytes representing the bitmap to be displayed on the OLED screen. The splash image can be set via the web-config. If you would like to change the default version of the splash image (to preserve it beyond data wipe), it can be customized with a C define named `DEFAULT_SPLASH` in the active `BoardConfig.h` file. +The instructions on how to generate those bytes are as follows: + +1. Navigate to [Bitmap Converter web utility](https://marlinfw.org/tools/u8glib/converter.html) +2. Configure generated code + - Select Marlin 2.x and Bitmap, untick all the rest. +3. Upload the splash image file + - Set the image file after clicking on "Choose file". The image file needs to be preprocessed to your liking and cropped to 128x64. This should populate a code block below. +4. Use the generated code + + - Copy the hex numbers inside the curly braces from the code block. + - Navigate to the `BoardConfig.h` of your choice and at the end of the file right before `#endif`. Create a C define like so: + + ```cpp + #define DEFAULT_SPLASH \ + ``` + + - Then paste what you copied below what you just typed. Be sure to edit the array of bytes as follows: + + ```cpp + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ // First line + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ // Second line + ... // All lines below previous ones end in \ similar to those above + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // Last line doesn't have an \ to escape the new line + ``` + + - Here's a sample entry from Pico `BoardConfig.h`: + + ```cpp + #define DEFAULT_SPLASH \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x80,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xDF,0xC0, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xC1,0xFF,0xA0, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xCF,0xFE,0x80, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xE0,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xAB,0xC0,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x00,0x00,0xFB,0x83,0xFF,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x01,0xFF,0x00,0x01,0xF3,0x07,0xFC,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x07,0xFF,0x00,0x03,0xE0,0x3F,0xF4,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x38,0x0A,0xE7,0x80,0x03,0xC0,0x5F,0x80,0x00, \ + 0x00,0x00,0x00,0x20,0x07,0x81,0xFF,0x39,0xC3,0xC7,0x01,0xD7,0x80,0x3F,0x00,0x00, \ + 0x00,0x00,0x00,0xE0,0x1F,0xE7,0xFF,0x79,0xC7,0x87,0x9F,0xA7,0x80,0x6E,0x3C,0x00, \ + 0x00,0x00,0xA0,0xC0,0x3F,0xEA,0xE7,0xF3,0xEF,0x07,0x7F,0xC7,0x01,0xCF,0xFF,0x80, \ + 0x00,0x03,0x8F,0xFC,0x7F,0xC3,0xC7,0x7F,0xFE,0x0F,0x7E,0x8F,0x87,0xDF,0xFC,0x00, \ + 0x00,0x0F,0xFF,0xFF,0x73,0xC7,0x87,0xFF,0xDE,0x0E,0x50,0x07,0x1F,0x1F,0xD0,0x00, \ + 0x00,0x1F,0x57,0xFF,0xE7,0x8F,0x07,0xFF,0x1C,0x3E,0x00,0x0F,0xFF,0x7F,0x00,0x00, \ + 0x00,0x7E,0x0B,0x8F,0x8F,0x8E,0x0F,0xFF,0x9E,0x7C,0x00,0x07,0xFD,0xFC,0x00,0x00, \ + 0x00,0x7C,0x37,0x9F,0x1F,0x1E,0x0F,0x87,0x1E,0xF8,0x00,0x07,0xF0,0x30,0x00,0x00, \ + 0x00,0xF1,0xF7,0xFE,0x1E,0x1C,0x3E,0x0E,0x1F,0xF0,0x00,0x01,0x40,0x28,0x00,0x00, \ + 0x01,0xEF,0xE7,0xF8,0x3C,0x3E,0x7C,0x0F,0x1F,0xE0,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x03,0xFF,0x8F,0xF0,0x7F,0xFE,0xF8,0x0E,0x0F,0x80,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x03,0xFF,0xCF,0xC0,0xFF,0xFF,0xF0,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x07,0x8B,0xFF,0x01,0xFF,0x8F,0xC0,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x07,0x87,0xFE,0x01,0xFE,0x0F,0x80,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x07,0x1F,0xDE,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x07,0xBF,0x9E,0x01,0xC0,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x07,0xFF,0x9C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x07,0xFB,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x03,0xE7,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x01,0x47,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x0E,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + ``` + +5. Test and verify + - Compile, if you did everything right, it should compile fine + - Load the UF2 after the compile. Check and verify in the web-config, if you have set a custom image before, you might need to reset data. diff --git a/development/templates.mdx b/development/templates.mdx index 50e8a36..7663adb 100644 --- a/development/templates.mdx +++ b/development/templates.mdx @@ -1,156 +1,156 @@ ---- -title: Templates -# tags: -# - -pagination_next: null -pagination_prev: null -description: "PAGE DESCRIPTION" ---- - -# Templates - -## Configuration Templates - -### README Template - -```md -# Board Name - -![Image of Board](site/docs/assets/gp2040-ce-placeholder.png) - -Basic description of the board - -(RP2040 Pinout as a markdown table) -| GPIO Pin | Input/Function | -|:--------:|:--------------:| -| 0 | | -| 1 | | -| 2 | | -| 3 | | -| 4 | | -| 5 | | -| 6 | | -| 7 | | -| 8 | | -| 9 | | -| 10 | | -| 11 | | -| 12 | | -| 13 | | -| 14 | | -| 15 | | -| 16 | | -| 17 | | -| 18 | | -| 19 | | -| 20 | | -| 21 | | -| 22 | | -| 23 | | -| 24 | | -| 25 | | -| 26 | | -| 27 | | -| 28 | | -| 29 | | - -Device Maintainer: [Name, Username, or Business Name](https://github.com/username) -Supported Hardware Variations: List versions/variations that share this configuration -Hardware Availability: List where one can purchase the boards that share this configuration -``` - -## Documentation Templates - -### Page Template - -```md ---- -title: TITLE -# tags: -# - -pagination_next: null -pagination_prev: null -description: "PAGE DESCRIPTION" ---- - -# Document Title - -CONTENT -``` - -### Add-On Template - -```md ---- -title: ADD-ON NAME -# tags: -# - -pagination_next: null -pagination_prev: null -description: "PAGE DESCRIPTION" ---- - -# Add-On Name - -Purpose: The intended function and purpose of this add-on for an end user. - -![Web Configurator Image](../assets/gp2040-ce-placeholder.png) - -## Web Configurator Options - -- Web Configurator Option 1 -- Web Configurator Option 2 -- Web Configurator Option 3 - -## Hardware - -### Requirements - -TODO: List any hardware that is required for the intended functioning of this add-on. - -### Installation - -TODO: List instructions on how to install the hardware for use with this add-on. - -## Miscellaneous Notes - -TODO: Provide any miscellaneous notes that an end user may want or need to know with regard to this add-on. -``` - -### Downloads Page Configurations - -#### Microcontroller Boards - -```tsx -{ - name: 'Microcontroller Board Name', - configName: 'ConfigName', - pinout: null, - website: 'http://www.example.com/index.html', - image: require('@site/docs/assets/gp2040-ce-placeholder.png').default, - supported: true, - desc: () => ( -

- Description of Microcontroller board and manufacturer -

- ), -}, - -``` - -#### Controllers - -```tsx -{ - name: 'Controller Name', - configName: 'ConfigName', - pinout: null, - website: 'http://www.example.com/index.html', - image: require('@site/docs/gp2040-ce-placeholder.png').default, - category: 'official/open/closed/legacy', - desc: () => -

- Description of the device and maker. -

, -}, -``` +--- +title: Templates +# tags: +# - +pagination_next: null +pagination_prev: null +description: "PAGE DESCRIPTION" +--- + +# Templates + +## Configuration Templates + +### README Template + +```md +# Board Name + +![Image of Board](site/docs/assets/gp2040-ce-placeholder.png) + +Basic description of the board + +(RP2040 Pinout as a markdown table) +| GPIO Pin | Input/Function | +|:--------:|:--------------:| +| 0 | | +| 1 | | +| 2 | | +| 3 | | +| 4 | | +| 5 | | +| 6 | | +| 7 | | +| 8 | | +| 9 | | +| 10 | | +| 11 | | +| 12 | | +| 13 | | +| 14 | | +| 15 | | +| 16 | | +| 17 | | +| 18 | | +| 19 | | +| 20 | | +| 21 | | +| 22 | | +| 23 | | +| 24 | | +| 25 | | +| 26 | | +| 27 | | +| 28 | | +| 29 | | + +Device Maintainer: [Name, Username, or Business Name](https://github.com/username) +Supported Hardware Variations: List versions/variations that share this configuration +Hardware Availability: List where one can purchase the boards that share this configuration +``` + +## Documentation Templates + +### Page Template + +```md +--- +title: TITLE +# tags: +# - +pagination_next: null +pagination_prev: null +description: "PAGE DESCRIPTION" +--- + +# Document Title + +CONTENT +``` + +### Add-On Template + +```md +--- +title: ADD-ON NAME +# tags: +# - +pagination_next: null +pagination_prev: null +description: "PAGE DESCRIPTION" +--- + +# Add-On Name + +Purpose: The intended function and purpose of this add-on for an end user. + +![Web Configurator Image](../assets/gp2040-ce-placeholder.png) + +## Web Configurator Options + +- Web Configurator Option 1 +- Web Configurator Option 2 +- Web Configurator Option 3 + +## Hardware + +### Requirements + +TODO: List any hardware that is required for the intended functioning of this add-on. + +### Installation + +TODO: List instructions on how to install the hardware for use with this add-on. + +## Miscellaneous Notes + +TODO: Provide any miscellaneous notes that an end user may want or need to know with regard to this add-on. +``` + +### Downloads Page Configurations + +#### Microcontroller Boards + +```tsx +{ + name: 'Microcontroller Board Name', + configName: 'ConfigName', + pinout: null, + website: 'http://www.example.com/index.html', + image: require('@site/docs/assets/gp2040-ce-placeholder.png').default, + supported: true, + desc: () => ( +

+ Description of Microcontroller board and manufacturer +

+ ), +}, + +``` + +#### Controllers + +```tsx +{ + name: 'Controller Name', + configName: 'ConfigName', + pinout: null, + website: 'http://www.example.com/index.html', + image: require('@site/docs/gp2040-ce-placeholder.png').default, + category: 'official/open/closed/legacy', + desc: () => +

+ Description of the device and maker. +

, +}, +``` diff --git a/docs/add-ons/analog.mdx b/docs/add-ons/analog.mdx index 95ea65d..11456b1 100644 --- a/docs/add-ons/analog.mdx +++ b/docs/add-ons/analog.mdx @@ -1,67 +1,67 @@ ---- -title: Analog -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to use hardware analog joysticks with GP2040-CE" ---- - -# Analog - -Purpose: This add-on is intended for the use of an hardware analog joystick with GP2040-CE for the left and right analog sticks of the gamepad. - -![GP2040-CE Configurator - Add-Ons Analog](../assets/images/gpc-add-ons-analog.png) - -## Web Configurator Options - -- `Analog Stick 1 X Pin` - The GPIO pin used for the Analog joystick 1 X value. Only ADC pins 26, 27, 28 and 29 are allowed here. -- `Analog Stick 1 Y Pin` - The GPIO pin used for the Analog joystick 1 Y value. Only ADC pins 26, 27, 28 and 29 are allowed here. -- `Analog Stick 1 Mode` - Choose if Analog joystick 1 is to be used for Left Analog or Right Analog. -- `Analog joystick 1 Invert` - Choose if you would like to flip the X or Y axis Analog Stick 1 inputs (or both). -- `Analog joystick 2 X Pin` - The GPIO pin used for the Analog Stick 2 X value. Only ADC pins 26, 27, 28 and 29 are allowed here. -- `Analog joystick 2 Y Pin` - The GPIO pin used for the Analog Stick 2 Y value. Only ADC pins 26, 27, 28 and 29 are allowed here. -- `Analog joystick 2 Mode` - Choose if Analog Stick 2 is to be used for Left Analog or Right Analog (must be different than Analog Stick 1). -- `Analog joystick 2 Invert` - Choose if you would like to flip the X or Y axis Analog joystick 2 inputs (or both). -- `Deadzone Size (%)` - Enter the % value of dead zone you would like on the analog joysticks. -- `Forced Circularity` - Force the analog joysticks to be bound within a perfect circle. This can be beneficial for certain games. However, be aware that this may negatively impact some games which account for sticks moving outside of a circle. -- `Auto Calibration` - Automatically centers the analog joysticks. This works by reading in the offset from center during boot and then accounts for that until the next power cycle. This can be helpful for analog joysticks experiencing drift. - -## Hardware - -### Requirements - -A minimum of one hardware analog joystick is required for the use of this add-on. Each joystick will have at least 4 pins, one for each of the following. - -- Reference Voltage (ADC_VREF/3.3V) -- X-Axis Input Voltage (Vx) -- Y-Axis Input Voltage (Vy) -- Ground (GND) - -Each axis input voltage pin requires an Analog to Digital Converter (ADC) pin to operate. As such, some boards may have a limit on the maximum number of possible joysticks that can be used (e.g. the Raspberry Pi Pico only has 3 ADC pins available so only 1 joystick can be used). - -:::note Joystick Buttons - -The analog joystick may have an additional pin for the joystick button. This can be connected to any GPIO pin and used as a regular button. - -::: - -### Installation - -Connect the pins of the analog joystick to the board as follows and then set the GPIO pin values in `Web Configurator > Configurations > Add-Ons > Analog`. - -- Reference Voltage (ADC_VREF/3.3V) -> ADC_VREF/3.3V Pin -- X-Axis Input Voltage (Vx) -> Any ADC GPIO Pin -- Y-Axis Input Voltage (Vy) -> Any ADC GPIO Pin -- Ground (GND) -> Any GND Pin - -The specific location of the ADC pins on your board will vary depending on the design and manufacturer, but they will always be one of the following GPIO pins on the RP2040 - -- GPIO 26 -- GPIO 27 -- GPIO 28 -- GPIO 29 - -## Miscellaneous Notes - -Both potentiometer and Hall Effect based joysticks are supported, provided that they use a 3.0-3.3V reference voltage and output voltages in the range of 0-3.3V as an input for the RP2040. This is because the GPIO pins for the RP2040 utilize 3.3V logic and are not 5V-safe. +--- +title: Analog +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to use hardware analog joysticks with GP2040-CE" +--- + +# Analog + +Purpose: This add-on is intended for the use of an hardware analog joystick with GP2040-CE for the left and right analog sticks of the gamepad. + +![GP2040-CE Configurator - Add-Ons Analog](../assets/images/gpc-add-ons-analog.png) + +## Web Configurator Options + +- `Analog Stick 1 X Pin` - The GPIO pin used for the Analog joystick 1 X value. Only ADC pins 26, 27, 28 and 29 are allowed here. +- `Analog Stick 1 Y Pin` - The GPIO pin used for the Analog joystick 1 Y value. Only ADC pins 26, 27, 28 and 29 are allowed here. +- `Analog Stick 1 Mode` - Choose if Analog joystick 1 is to be used for Left Analog or Right Analog. +- `Analog joystick 1 Invert` - Choose if you would like to flip the X or Y axis Analog Stick 1 inputs (or both). +- `Analog joystick 2 X Pin` - The GPIO pin used for the Analog Stick 2 X value. Only ADC pins 26, 27, 28 and 29 are allowed here. +- `Analog joystick 2 Y Pin` - The GPIO pin used for the Analog Stick 2 Y value. Only ADC pins 26, 27, 28 and 29 are allowed here. +- `Analog joystick 2 Mode` - Choose if Analog Stick 2 is to be used for Left Analog or Right Analog (must be different than Analog Stick 1). +- `Analog joystick 2 Invert` - Choose if you would like to flip the X or Y axis Analog joystick 2 inputs (or both). +- `Deadzone Size (%)` - Enter the % value of dead zone you would like on the analog joysticks. +- `Forced Circularity` - Force the analog joysticks to be bound within a perfect circle. This can be beneficial for certain games. However, be aware that this may negatively impact some games which account for sticks moving outside of a circle. +- `Auto Calibration` - Automatically centers the analog joysticks. This works by reading in the offset from center during boot and then accounts for that until the next power cycle. This can be helpful for analog joysticks experiencing drift. + +## Hardware + +### Requirements + +A minimum of one hardware analog joystick is required for the use of this add-on. Each joystick will have at least 4 pins, one for each of the following. + +- Reference Voltage (ADC_VREF/3.3V) +- X-Axis Input Voltage (Vx) +- Y-Axis Input Voltage (Vy) +- Ground (GND) + +Each axis input voltage pin requires an Analog to Digital Converter (ADC) pin to operate. As such, some boards may have a limit on the maximum number of possible joysticks that can be used (e.g. the Raspberry Pi Pico only has 3 ADC pins available so only 1 joystick can be used). + +:::note Joystick Buttons + +The analog joystick may have an additional pin for the joystick button. This can be connected to any GPIO pin and used as a regular button. + +::: + +### Installation + +Connect the pins of the analog joystick to the board as follows and then set the GPIO pin values in `Web Configurator > Configurations > Add-Ons > Analog`. + +- Reference Voltage (ADC_VREF/3.3V) -> ADC_VREF/3.3V Pin +- X-Axis Input Voltage (Vx) -> Any ADC GPIO Pin +- Y-Axis Input Voltage (Vy) -> Any ADC GPIO Pin +- Ground (GND) -> Any GND Pin + +The specific location of the ADC pins on your board will vary depending on the design and manufacturer, but they will always be one of the following GPIO pins on the RP2040 + +- GPIO 26 +- GPIO 27 +- GPIO 28 +- GPIO 29 + +## Miscellaneous Notes + +Both potentiometer and Hall Effect based joysticks are supported, provided that they use a 3.0-3.3V reference voltage and output voltages in the range of 0-3.3V as an input for the RP2040. This is because the GPIO pins for the RP2040 utilize 3.3V logic and are not 5V-safe. diff --git a/docs/add-ons/bootsel-button.mdx b/docs/add-ons/bootsel-button.mdx index e1d99a4..afebaad 100644 --- a/docs/add-ons/bootsel-button.mdx +++ b/docs/add-ons/bootsel-button.mdx @@ -1,32 +1,32 @@ ---- -title: BOOTSEL Button Configuration -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to use the BOOTSEL button as an additional button input" ---- - -# BOOTSEL Button Configuration - -Purpose: This add-on is mean to allow for the use of a BOOTSEL button to be used as an additional button input. - -![GP2040-CE Configurator - Add-Ons BOOTSEL Button Configuration](../assets/images/gpc-add-ons-bootsel-button.png) - -## Web Configurator Options - -- `BOOTSEL Button` - Choose an input to be mapped to the BOOTSEL button. - -## Hardware - -### Requirements - -This add-on can only be used on devices that have a BOOTSEL button. - -### Installation - -There are no installation instructions for this add-on. - -## Miscellaneous Notes - -The OLED might become unresponsive if this button is set. You can unset it to restore OLED functionality. +--- +title: BOOTSEL Button Configuration +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to use the BOOTSEL button as an additional button input" +--- + +# BOOTSEL Button Configuration + +Purpose: This add-on is mean to allow for the use of a BOOTSEL button to be used as an additional button input. + +![GP2040-CE Configurator - Add-Ons BOOTSEL Button Configuration](../assets/images/gpc-add-ons-bootsel-button.png) + +## Web Configurator Options + +- `BOOTSEL Button` - Choose an input to be mapped to the BOOTSEL button. + +## Hardware + +### Requirements + +This add-on can only be used on devices that have a BOOTSEL button. + +### Installation + +There are no installation instructions for this add-on. + +## Miscellaneous Notes + +The OLED might become unresponsive if this button is set. You can unset it to restore OLED functionality. diff --git a/docs/add-ons/buzzer-speaker.mdx b/docs/add-ons/buzzer-speaker.mdx index 3729374..c89acef 100644 --- a/docs/add-ons/buzzer-speaker.mdx +++ b/docs/add-ons/buzzer-speaker.mdx @@ -1,37 +1,37 @@ ---- -title: Buzzer Speaker -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to add a buzzer to your controller" ---- - -# Buzzer Speaker - -Purpose: This add-on is intended to allow you to add a buzzer to your GP2040-CE device and play sounds. - -![GP2040-CE Configurator - Add-Ons Buzzer](../assets/images/gpc-add-ons-buzzer.png) - -## Web Configurator Options - -- `Use buzzer` - Turns on/off the buzzer module. -- `Buzzer Pin` - The GPIO pin used for the buzzer. -- `Buzzer Volume` - Audio volume of buzzer. Ranges from 0-100. - -## Hardware - -### Requirements - -- 3-3.3V Piezo speaker - -The speaker only needs to have pins for power (VCC) and ground (GND). If there is an I/O pin on speaker, you can jump the pins and use only the VCC connected to RP2040 GPIO pin. - -### Installation - -- Plug into GPIO pin on board to VCC on speaker -- Enter GPIO pin into web config - -## Miscellaneous Notes - -None +--- +title: Buzzer Speaker +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to add a buzzer to your controller" +--- + +# Buzzer Speaker + +Purpose: This add-on is intended to allow you to add a buzzer to your GP2040-CE device and play sounds. + +![GP2040-CE Configurator - Add-Ons Buzzer](../assets/images/gpc-add-ons-buzzer.png) + +## Web Configurator Options + +- `Use buzzer` - Turns on/off the buzzer module. +- `Buzzer Pin` - The GPIO pin used for the buzzer. +- `Buzzer Volume` - Audio volume of buzzer. Ranges from 0-100. + +## Hardware + +### Requirements + +- 3-3.3V Piezo speaker + +The speaker only needs to have pins for power (VCC) and ground (GND). If there is an I/O pin on speaker, you can jump the pins and use only the VCC connected to RP2040 GPIO pin. + +### Installation + +- Plug into GPIO pin on board to VCC on speaker +- Enter GPIO pin into web config + +## Miscellaneous Notes + +None diff --git a/docs/add-ons/dual-direction-input.mdx b/docs/add-ons/dual-direction-input.mdx index 7ede9dd..8419131 100644 --- a/docs/add-ons/dual-direction-input.mdx +++ b/docs/add-ons/dual-direction-input.mdx @@ -1,58 +1,58 @@ ---- -title: Dual Directional Input -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to add more digital DPad, left analog stick, and right analog stick directional inputs to your controller" ---- - -# Dual Directional Input - -Purpose: This add-on is intended to allow additional digital buttons to be used for directional inputs with either the D-Pad, or the cardinal directions of the Left and Right analog joystick at maximum magnitude. - -![GP2040-CE Configuration - Add-Ons Dual Directional Input](../assets/images/gpc-add-ons-dual-directional.png) - -## Web Configurator Options - -:::info GPIO Pin Mapping Moved - -The pin(s) are now configured on the [Pin Mapping page](../web-configurator/menu-pages/02-pin-mapping.mdx) by choosing the correct option for the selected pin. - -- DDI Up -- DDI Down -- DDI Left -- DDI Right - -::: - -- `Dual D-Pad Mode` - Choose if this should act as an additional instance of a D-Pad, Left analog joystick, or Right analog joystick. -- `Combination Mode` - Choose how these direction inputs should be combined with gamepad directions. -- `Dual Directional 4-Way Joystick Mode` - Enables 4-Way Joystick mode on the DDI Joystick, which will prevent non-cardinal directions from registering. When a second cardinal direction input is received, the gamepad direction will change to the newest cardinal direction, similar to [SOCD Last Win](../hotkeys.mdx#socd-last-win). - -### Dual D-Pad Mode Values - -- `D-PAD` for D-Pad mode. -- `Left Analog` for Left analog joystick mode. -- `Right Analog` for Right analog joystick mode. - -### Combination Mode - -- `Mixed` - Combines both the Gamepad directions and Dual Direction Input directions and allows for all 3 SOCD modes. -- `Gamepad` - Gamepad always takes over when pressed, otherwise Gamepad and Dual act independently. -- `Dual Directional` - Dual always takes over when pressed, otherwise Gamepad and Dual act independently. -- `None` - Gamepad input and dual directional act independently of each other. - -## Hardware - -### Requirements - -Additional buttons are required for each of the additional directions desired. - -### Installation - -For each button, connect one side of the button to their respective GPIO pin as assigned in the Web Configurator. Connect the other side of the buttons to GND. - -## Miscellaneous Notes - -"Gamepad direction" refers to the core directions ("Up"), whereas "Dual Direction Input directions" refers to the directions used by this add-on ("DDI Up"). +--- +title: Dual Directional Input +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to add more digital DPad, left analog stick, and right analog stick directional inputs to your controller" +--- + +# Dual Directional Input + +Purpose: This add-on is intended to allow additional digital buttons to be used for directional inputs with either the D-Pad, or the cardinal directions of the Left and Right analog joystick at maximum magnitude. + +![GP2040-CE Configuration - Add-Ons Dual Directional Input](../assets/images/gpc-add-ons-dual-directional.png) + +## Web Configurator Options + +:::info GPIO Pin Mapping Moved + +The pin(s) are now configured on the [Pin Mapping page](../web-configurator/menu-pages/02-pin-mapping.mdx) by choosing the correct option for the selected pin. + +- DDI Up +- DDI Down +- DDI Left +- DDI Right + +::: + +- `Dual D-Pad Mode` - Choose if this should act as an additional instance of a D-Pad, Left analog joystick, or Right analog joystick. +- `Combination Mode` - Choose how these direction inputs should be combined with gamepad directions. +- `Dual Directional 4-Way Joystick Mode` - Enables 4-Way Joystick mode on the DDI Joystick, which will prevent non-cardinal directions from registering. When a second cardinal direction input is received, the gamepad direction will change to the newest cardinal direction, similar to [SOCD Last Win](../hotkeys.mdx#socd-last-win). + +### Dual D-Pad Mode Values + +- `D-PAD` for D-Pad mode. +- `Left Analog` for Left analog joystick mode. +- `Right Analog` for Right analog joystick mode. + +### Combination Mode + +- `Mixed` - Combines both the Gamepad directions and Dual Direction Input directions and allows for all 3 SOCD modes. +- `Gamepad` - Gamepad always takes over when pressed, otherwise Gamepad and Dual act independently. +- `Dual Directional` - Dual always takes over when pressed, otherwise Gamepad and Dual act independently. +- `None` - Gamepad input and dual directional act independently of each other. + +## Hardware + +### Requirements + +Additional buttons are required for each of the additional directions desired. + +### Installation + +For each button, connect one side of the button to their respective GPIO pin as assigned in the Web Configurator. Connect the other side of the buttons to GND. + +## Miscellaneous Notes + +"Gamepad direction" refers to the core directions ("Up"), whereas "Dual Direction Input directions" refers to the directions used by this add-on ("DDI Up"). diff --git a/docs/add-ons/focus-mode.mdx b/docs/add-ons/focus-mode.mdx index 592b52d..b1cd36d 100644 --- a/docs/add-ons/focus-mode.mdx +++ b/docs/add-ons/focus-mode.mdx @@ -1,34 +1,34 @@ ---- -title: Focus Mode Configuration -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to disable functions and inputs while Focus Mode is enabled" ---- - -# Focus Mode Configuration - -Purpose: This add-on is intended to allow you to disable a number of functions or inputs while Focus Mode is enabled, but otherwise still retain access to them. - -![GP2040-CE Configurator - Focus Mode](../assets/images/gpc-add-ons-focus-mode.png) - -## Web Configurator Options - -- `Focus Mode Pin` - The GPIO pin used to enable Focus Mode -- `Lock Macro` - When enabled, macro triggers will not activate macro sequences during Focus Mode -- `Lock Buttons` - When enabled, listed inputs will not be sent during Focus Mode. As inputs are added, new dropdowns will appear for additional inputs. - -## Hardware - -### Requirements - -The GPIO pin set in `Focus Mode Pin` needs to be brought and kept low to remain active. A toggle switch, slide toggle, or latching switch is necessary for proper use of this add-on. - -### Installation - -Installation will depend on whether a toggle switch, slide toggle, or latching switch is used. In general, on one side of the switch, connect the pin to the GPIO pin set in `Focus Mode Pin`. On the other side of the switch or the center if there are 3 contacts, connect it to any GND pin. - -## Miscellaneous Notes - -None. +--- +title: Focus Mode Configuration +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to disable functions and inputs while Focus Mode is enabled" +--- + +# Focus Mode Configuration + +Purpose: This add-on is intended to allow you to disable a number of functions or inputs while Focus Mode is enabled, but otherwise still retain access to them. + +![GP2040-CE Configurator - Focus Mode](../assets/images/gpc-add-ons-focus-mode.png) + +## Web Configurator Options + +- `Focus Mode Pin` - The GPIO pin used to enable Focus Mode +- `Lock Macro` - When enabled, macro triggers will not activate macro sequences during Focus Mode +- `Lock Buttons` - When enabled, listed inputs will not be sent during Focus Mode. As inputs are added, new dropdowns will appear for additional inputs. + +## Hardware + +### Requirements + +The GPIO pin set in `Focus Mode Pin` needs to be brought and kept low to remain active. A toggle switch, slide toggle, or latching switch is necessary for proper use of this add-on. + +### Installation + +Installation will depend on whether a toggle switch, slide toggle, or latching switch is used. In general, on one side of the switch, connect the pin to the GPIO pin set in `Focus Mode Pin`. On the other side of the switch or the center if there are 3 contacts, connect it to any GND pin. + +## Miscellaneous Notes + +None. diff --git a/docs/add-ons/i2c-analog-ads1219.mdx b/docs/add-ons/i2c-analog-ads1219.mdx index 6494240..6fdcd9b 100644 --- a/docs/add-ons/i2c-analog-ads1219.mdx +++ b/docs/add-ons/i2c-analog-ads1219.mdx @@ -1,68 +1,68 @@ ---- -title: I2C Analog ADS1219 -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to use an ADS1219 ADC for Left and Right analog joysticks on your controller" ---- - -import I2CTable from "../snippets/_i2c-block-table.mdx"; - -# I2C Analog ADS1219 - -Purpose: This add-on is intended to allow you to add Left and Right analog joystick functionality using the ADS1219 24-bit, analog-to-digital -converter (ADC). - -![GP2040-CE Configurator - Add-Ons ADS1219](../assets/images/gpc-add-ons-ads1219.png) - -## Web Configurator Options - -:::info GPIO Pin Assignment - -The SDA and SCL pins for I2C and speed are now configured in [`Configuration > Peripheral Mapping - I2C`](../web-configurator/menu-pages/03-peripheral-mapping.mdx#i2c). - -::: - -- `I2C Analog ADS1219 Block` - The block of I2C to use (i2c0 or i2c1). -- `I2C Analog ADS1219 Address` - Sets the address for the I2C Analog ADS1219 based on the pins used for SDA and SCL according to the table below. - -| A0 | A1 | I2C Address | -| :-: | --- | :---------: | -| SDA | SCL | 1001110 | -| SCL | SDA | 1001011 | - -## Hardware - -### Requirements - -This add-on requires an ADS1219 analog-to-digital converter (ADC) to function properly. - -### Installation - -Connect the pins on the ADS1219 according to the table below - -| ADS1219 Pin | Function | -| :---------: | ---------------------------- | -| A0 | SDA or SCL | -| A1 | SDA or SCL | -| AIN0 | Left analog joystick X-Axis | -| AIN1 | Left analog joystick Y-Axis | -| AIN2 | Right analog joystick X-Axis | -| AIN3 | Right analog joystick Y-Axis | - -
- -:::info A0/A1 GPIO Assignment - -These pins will need to be wired to the appropriate SDA/SCL pins on the RP2040 and set the correct I2C block in Web Configurator. - -See [Peripheral Mapping](../web-configurator/menu-pages/03-peripheral-mapping.mdx#i2c) for more information on setting up I2C. - -::: - -## Miscellaneous Notes - -These installation instructions do not cover the additional circuitry required for the use of the ADS1219 ADC, only the wiring to the RP2040. - -[ADS1219 Product Sheet](https://www.ti.com/lit/ds/symlink/ads1219.pdf) +--- +title: I2C Analog ADS1219 +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to use an ADS1219 ADC for Left and Right analog joysticks on your controller" +--- + +import I2CTable from "../snippets/_i2c-block-table.mdx"; + +# I2C Analog ADS1219 + +Purpose: This add-on is intended to allow you to add Left and Right analog joystick functionality using the ADS1219 24-bit, analog-to-digital +converter (ADC). + +![GP2040-CE Configurator - Add-Ons ADS1219](../assets/images/gpc-add-ons-ads1219.png) + +## Web Configurator Options + +:::info GPIO Pin Assignment + +The SDA and SCL pins for I2C and speed are now configured in [`Configuration > Peripheral Mapping - I2C`](../web-configurator/menu-pages/03-peripheral-mapping.mdx#i2c). + +::: + +- `I2C Analog ADS1219 Block` - The block of I2C to use (i2c0 or i2c1). +- `I2C Analog ADS1219 Address` - Sets the address for the I2C Analog ADS1219 based on the pins used for SDA and SCL according to the table below. + +| A0 | A1 | I2C Address | +| :-: | --- | :---------: | +| SDA | SCL | 1001110 | +| SCL | SDA | 1001011 | + +## Hardware + +### Requirements + +This add-on requires an ADS1219 analog-to-digital converter (ADC) to function properly. + +### Installation + +Connect the pins on the ADS1219 according to the table below + +| ADS1219 Pin | Function | +| :---------: | ---------------------------- | +| A0 | SDA or SCL | +| A1 | SDA or SCL | +| AIN0 | Left analog joystick X-Axis | +| AIN1 | Left analog joystick Y-Axis | +| AIN2 | Right analog joystick X-Axis | +| AIN3 | Right analog joystick Y-Axis | + +
+ +:::info A0/A1 GPIO Assignment + +These pins will need to be wired to the appropriate SDA/SCL pins on the RP2040 and set the correct I2C block in Web Configurator. + +See [Peripheral Mapping](../web-configurator/menu-pages/03-peripheral-mapping.mdx#i2c) for more information on setting up I2C. + +::: + +## Miscellaneous Notes + +These installation instructions do not cover the additional circuitry required for the use of the ADS1219 ADC, only the wiring to the RP2040. + +[ADS1219 Product Sheet](https://www.ti.com/lit/ds/symlink/ads1219.pdf) diff --git a/docs/add-ons/i2c-analog-ads1256-spi.mdx b/docs/add-ons/i2c-analog-ads1256-spi.mdx index ba7dfd9..bb93106 100644 --- a/docs/add-ons/i2c-analog-ads1256-spi.mdx +++ b/docs/add-ons/i2c-analog-ads1256-spi.mdx @@ -1,33 +1,33 @@ ---- -title: Analog ADS1256-SPI -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to use ADS1256 SPI for compatible accessories (currently in early beta)" ---- - -# Analog ADS1256 (SPI) - -Purpose: This add-on is intended to allow you to use ADS1256 SPI compatible accessories (currently in early beta). - -![GP2040-CE Configurator - Add-Ons ADS1219](../assets/images/gpc-add-ons-ads1256-spi.png) - -## Web Configurator Options - -:::info GPIO Pin Assignment - -The `SPI Block`, `Chip Select Pin` and `Data Ready Pin` are now configured in [`Configuration > Peripheral Mapping - SPI`](../web-configurator/menu-pages/03-peripheral-mapping.mdx#spi). - -::: - -- `SPI Block` - The block of SPI to use (spi0 or spi1). -- `Chip Select (CS) Pin` - The GPIO pin to use for Chip Select. -- `Data Ready (DRDY) Pin` - The GPIO pin to use for Data Ready. -- `Analog Max` - The maximum voltage that will be used, `3.3V` and `5V` are selectable here. - -## Hardware - -### Requirements - -Please note that this add-on is currently in early beta and no examples of use are offered. +--- +title: Analog ADS1256-SPI +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to use ADS1256 SPI for compatible accessories (currently in early beta)" +--- + +# Analog ADS1256 (SPI) + +Purpose: This add-on is intended to allow you to use ADS1256 SPI compatible accessories (currently in early beta). + +![GP2040-CE Configurator - Add-Ons ADS1219](../assets/images/gpc-add-ons-ads1256-spi.png) + +## Web Configurator Options + +:::info GPIO Pin Assignment + +The `SPI Block`, `Chip Select Pin` and `Data Ready Pin` are now configured in [`Configuration > Peripheral Mapping - SPI`](../web-configurator/menu-pages/03-peripheral-mapping.mdx#spi). + +::: + +- `SPI Block` - The block of SPI to use (spi0 or spi1). +- `Chip Select (CS) Pin` - The GPIO pin to use for Chip Select. +- `Data Ready (DRDY) Pin` - The GPIO pin to use for Data Ready. +- `Analog Max` - The maximum voltage that will be used, `3.3V` and `5V` are selectable here. + +## Hardware + +### Requirements + +Please note that this add-on is currently in early beta and no examples of use are offered. diff --git a/docs/add-ons/input-history.mdx b/docs/add-ons/input-history.mdx index 2e618d6..b593fa1 100644 --- a/docs/add-ons/input-history.mdx +++ b/docs/add-ons/input-history.mdx @@ -1,55 +1,55 @@ ---- -title: Input History -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to show input history" ---- - -# Input History - -Purpose: This add-on is intended to allow you to display input history - -![GP2040-CE Configurator - Add-Ons Input History](../assets/images/gpc-add-ons-input-history.png) - -## Web Configurator Options - -- `History Length` - Set the max character length of the history. -- `Column` - Specify the column at which the history begins on the display. ( 0 - left, 20 - right ) -- `Row` - Specify the row on which the history appears on the display. ( 0 - top, 7 - bottom ) - -## Hardware - -### Requirements - -An already configured [monochrome display](../web-configurator/menu-pages/07-display-configuration.mdx). - -### Installation - -None. - -## Miscellaneous Notes - -Input - Symbol mapping: - -| GP2040-CE | PS3 | Switch | XINPUT | KEYBOARD | PS4 | CONFIG | -|-----------|:---:|:------:|:------:|:--------:|:---:|:------:| -| Up | U | U | U | U | U | U | -| Down | D | D | D | D | D | D | -| Left | L | L | L | L | L | L | -| Right | R | R | R | R | R | R | -| B1 | X | B | A | B1 | X | B1 | -| B2 | O | A | B | B2 | O | B2 | -| B3 | # | Y | X | B3 | # | B3 | -| B4 | ^ | X | Y | B4 | ^ | B4 | -| L1 | L1 | L | LB | L1 | L1 | L1 | -| R1 | R1 | R | RB | R1 | R1 | R1 | -| L2 | L2 | ZL | LT | L2 | L2 | L2 | -| R2 | R2 | ZR | RT | R2 | R2 | R2 | -| S1 | SL | - | BK | S1 | SH | S1 | -| S2 | ST | + | ST | S2 | OP | S2 | -| L3 | L3 | LS | LS | L3 | L3 | L3 | -| R3 | R3 | RS | RS | R3 | R3 | R3 | -| A1 | PS | H | G | A1 | PS | A1 | -| A2 | A2 | C | A2 | A2 | T | A2 | +--- +title: Input History +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to show input history" +--- + +# Input History + +Purpose: This add-on is intended to allow you to display input history + +![GP2040-CE Configurator - Add-Ons Input History](../assets/images/gpc-add-ons-input-history.png) + +## Web Configurator Options + +- `History Length` - Set the max character length of the history. +- `Column` - Specify the column at which the history begins on the display. ( 0 - left, 20 - right ) +- `Row` - Specify the row on which the history appears on the display. ( 0 - top, 7 - bottom ) + +## Hardware + +### Requirements + +An already configured [monochrome display](../web-configurator/menu-pages/07-display-configuration.mdx). + +### Installation + +None. + +## Miscellaneous Notes + +Input - Symbol mapping: + +| GP2040-CE | PS3 | Switch | XINPUT | KEYBOARD | PS4 | CONFIG | +|-----------|:---:|:------:|:------:|:--------:|:---:|:------:| +| Up | U | U | U | U | U | U | +| Down | D | D | D | D | D | D | +| Left | L | L | L | L | L | L | +| Right | R | R | R | R | R | R | +| B1 | X | B | A | B1 | X | B1 | +| B2 | O | A | B | B2 | O | B2 | +| B3 | # | Y | X | B3 | # | B3 | +| B4 | ^ | X | Y | B4 | ^ | B4 | +| L1 | L1 | L | LB | L1 | L1 | L1 | +| R1 | R1 | R | RB | R1 | R1 | R1 | +| L2 | L2 | ZL | LT | L2 | L2 | L2 | +| R2 | R2 | ZR | RT | R2 | R2 | R2 | +| S1 | SL | - | BK | S1 | SH | S1 | +| S2 | ST | + | ST | S2 | OP | S2 | +| L3 | L3 | LS | LS | L3 | L3 | L3 | +| R3 | R3 | RS | RS | R3 | R3 | R3 | +| A1 | PS | H | G | A1 | PS | A1 | +| A2 | A2 | C | A2 | A2 | T | A2 | diff --git a/docs/add-ons/input-reverse.mdx b/docs/add-ons/input-reverse.mdx index d748c6a..62488e6 100644 --- a/docs/add-ons/input-reverse.mdx +++ b/docs/add-ons/input-reverse.mdx @@ -1,43 +1,43 @@ ---- -title: Input Reverse -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to use a button to reverse cardinal directions of the DPad of your controller" ---- - -# Input Reverse - -Purpose: This add-on is intended to allow the user to press or hold an additional button to granularly reverse, neutralize, or leave unaltered cardinal directions on the gamepad and input the new direction instead. - -![GP2040-CE Configurator - Add-Ons Input Reverse](../assets/images/gpc-add-ons-input-reverse.png) - -## Web Configurator Options - -- `Reverse Input Pin` - The GPIO pin used for the Reverse Input button. -- `Reverse Input Pin LED` - The GPIO pin used for the Reverse Input LED. -- `Reverse Up` - Enables the up direction to be reversed when the Reverse Input button is pressed or held. -- `Reverse Down` - Enables the down direction to be reversed when the Reverse Input button is pressed or held. -- `Reverse Left` - Enables the left direction to be reversed when the Reverse Input button is pressed or held. -- `Reverse Right` - Enables the right direction to be reversed when the Reverse Input button is pressed or held. - -Each of the four directions can be independently given one of three options for what behavior occurs when the Reverse Input Pin is held: - -- `Disable` - No change is made to this direction (e.g. Up + Reverse = Up). -- `Enable` - The opposite direction is activated instead for this direction (e.g. Left + Reverse = Right). -- `Neutral` - This direction is brought to neutral (e.g. Down + Reverse = Neutral). - -## Hardware - -### Requirements - -This add-on requires an additional button to be mapped to a GPIO pin. - -### Installation - -For both arcade buttons and keyboard switches, one side of the contacts needs to be connected to the GPIO pin (i.e. by wire or trace on a PCB) and the other connected to ground (i.e. by wire or trace on a PCB). - -## Miscellaneous Notes - -None. +--- +title: Input Reverse +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to use a button to reverse cardinal directions of the DPad of your controller" +--- + +# Input Reverse + +Purpose: This add-on is intended to allow the user to press or hold an additional button to granularly reverse, neutralize, or leave unaltered cardinal directions on the gamepad and input the new direction instead. + +![GP2040-CE Configurator - Add-Ons Input Reverse](../assets/images/gpc-add-ons-input-reverse.png) + +## Web Configurator Options + +- `Reverse Input Pin` - The GPIO pin used for the Reverse Input button. +- `Reverse Input Pin LED` - The GPIO pin used for the Reverse Input LED. +- `Reverse Up` - Enables the up direction to be reversed when the Reverse Input button is pressed or held. +- `Reverse Down` - Enables the down direction to be reversed when the Reverse Input button is pressed or held. +- `Reverse Left` - Enables the left direction to be reversed when the Reverse Input button is pressed or held. +- `Reverse Right` - Enables the right direction to be reversed when the Reverse Input button is pressed or held. + +Each of the four directions can be independently given one of three options for what behavior occurs when the Reverse Input Pin is held: + +- `Disable` - No change is made to this direction (e.g. Up + Reverse = Up). +- `Enable` - The opposite direction is activated instead for this direction (e.g. Left + Reverse = Right). +- `Neutral` - This direction is brought to neutral (e.g. Down + Reverse = Neutral). + +## Hardware + +### Requirements + +This add-on requires an additional button to be mapped to a GPIO pin. + +### Installation + +For both arcade buttons and keyboard switches, one side of the contacts needs to be connected to the GPIO pin (i.e. by wire or trace on a PCB) and the other connected to ground (i.e. by wire or trace on a PCB). + +## Miscellaneous Notes + +None. diff --git a/docs/add-ons/joystick-selection-slider.mdx b/docs/add-ons/joystick-selection-slider.mdx index f1a9f9a..726f24a 100644 --- a/docs/add-ons/joystick-selection-slider.mdx +++ b/docs/add-ons/joystick-selection-slider.mdx @@ -1,45 +1,45 @@ ---- -title: Joystick Selection Slider -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to change input mode of the DPad on your controller" ---- - -# Joystick Selection Slider - -Purpose: This add-on is intended to allow users change the input mode of the primary gamepad directional inputs between D-Pad, Left analog joystick, and Right analog joystick using a two/three position toggle switch or slide toggle. - -![GP2040-CE Configurator - Add-Ons Joystick Slider](../assets/images/gpc-add-ons-joystick-slider.png) - -## Web Configurator Options - -:::info GPIO Pin Mapping Moved - -The pin(s) are now configured on the [Pin Mapping page](../web-configurator/menu-pages/02-pin-mapping.mdx) by choosing the correct option for the selected pin. - -- D-Pad Mode: D-Pad -- D-Pad Mode: Left Stick -- D-Pad Mode: Right Stick - -::: - -- `Slider Pin Mode Default` - The directional input mode that is active when no `D-Pad Mode` pins are held. - - `Digital` - D-Pad directional inputs - - `Left Analog` - Cardinal directions on the Left Analog joystick at maximum magnitude. - - `Right Analog` - Cardinal directions on the Right Analog joystick at maximum magnitude. - -## Hardware - -### Requirements - -The GPIO pins set on the Pin Mappings page will each need to be brought and kept low to remain active to use that mode, and when using the default mode, none of the pins can be brought low. Therefore, a 2 or 3 position toggle switch or slide toggle is necessary for proper use of this add-on. - -### Installation - -Installation will depend on whether a toggle switch or slide toggle is used. In general, on one side of the switch, connect the selection pin(s) to the GPIO pin(s) set. On the center pin, connect it to any GND pin. - -## Miscellaneous Notes - -Enabling this add-on will disable the use of the DPad [Hotkey Shortcuts](../hotkeys.mdx), resulting in the toggle switch or slide toggle set up with this add-on being the only method to set the DPad mode. +--- +title: Joystick Selection Slider +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to change input mode of the DPad on your controller" +--- + +# Joystick Selection Slider + +Purpose: This add-on is intended to allow users change the input mode of the primary gamepad directional inputs between D-Pad, Left analog joystick, and Right analog joystick using a two/three position toggle switch or slide toggle. + +![GP2040-CE Configurator - Add-Ons Joystick Slider](../assets/images/gpc-add-ons-joystick-slider.png) + +## Web Configurator Options + +:::info GPIO Pin Mapping Moved + +The pin(s) are now configured on the [Pin Mapping page](../web-configurator/menu-pages/02-pin-mapping.mdx) by choosing the correct option for the selected pin. + +- D-Pad Mode: D-Pad +- D-Pad Mode: Left Stick +- D-Pad Mode: Right Stick + +::: + +- `Slider Pin Mode Default` - The directional input mode that is active when no `D-Pad Mode` pins are held. + - `Digital` - D-Pad directional inputs + - `Left Analog` - Cardinal directions on the Left Analog joystick at maximum magnitude. + - `Right Analog` - Cardinal directions on the Right Analog joystick at maximum magnitude. + +## Hardware + +### Requirements + +The GPIO pins set on the Pin Mappings page will each need to be brought and kept low to remain active to use that mode, and when using the default mode, none of the pins can be brought low. Therefore, a 2 or 3 position toggle switch or slide toggle is necessary for proper use of this add-on. + +### Installation + +Installation will depend on whether a toggle switch or slide toggle is used. In general, on one side of the switch, connect the selection pin(s) to the GPIO pin(s) set. On the center pin, connect it to any GND pin. + +## Miscellaneous Notes + +Enabling this add-on will disable the use of the DPad [Hotkey Shortcuts](../hotkeys.mdx), resulting in the toggle switch or slide toggle set up with this add-on being the only method to set the DPad mode. diff --git a/docs/add-ons/keyboard-host.mdx b/docs/add-ons/keyboard-host.mdx index ed0753c..a9912f4 100644 --- a/docs/add-ons/keyboard-host.mdx +++ b/docs/add-ons/keyboard-host.mdx @@ -1,76 +1,76 @@ ---- -title: Keyboard Host Configuration -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to use a USB keyboard in conjunction with GP2040-CE to send inputs to supported systems" ---- - -import InputLabelSelector, { - Hotkey, -} from "@site/src/components/LabelSelector.tsx"; -import InstallUSBHostPort from "../snippets/_add-usb-host-port.mdx"; - -Select the button labels to be displayed in the usage guide: - - -
- -Purpose: This add-on is intended to allow you to use a keyboard with GP2040-CE to be used with GP2040-CE supported systems. - -![GP2040-CE Configurator - Keyboard Host Configuration](../assets/images/gpc-add-ons-keyboard-host-configuration.png) - -## Web Configurator Options - -:::info GPIO Pin Assignment - -The Data, 5V Enable, and Pin Orientation options for USB host ports are now configured in [`Configuration > Peripheral Mapping - USB Host`](../web-configurator/menu-pages/03-peripheral-mapping.mdx#usb-host). - -::: - -### Default Keybindings - -| GP2040 | Key | -| -------------------------------- | ------------ | -| | Arrow Up | -| | Arrow Down | -| | Arrow Left | -| | Arrow Right | -| | Shift Left | -| | Z | -| | Control Left | -| | Alt Left | -| | C | -| | Space | -| | V | -| | X | -| | 5 | -| | 1 | -| | Equal | -| | Minus | -| | 9 | -| | F2 | -| | None | - -## Hardware - -### Requirements - -This add-on requires that you have a USB host port available on your device connected to GPIO pins on the RP2040 board. There are a number of methods to do so. - -See [USB Host Port Installation](../controller-build/usb-host.mdx) for more information on the requirements for adding a USB host port to your controller. - -### Installation - - - -## Miscellaneous Notes - -As long as the keyboard has a USB plug, any keyboard should work with this addon, including wireless USB keyboards. - -Due to current implementation of Pico-PIO-USB and the add-on system, the following limitations are present. - -- The keyboard is limited to only as many inputs as listed above. All other keys on the keyboard will not function and will send no inputs to the system reading inputs. -- The keyboard is limited to 6 key rollover, meaning that a maximum of 6 keyboard keys can be activated at a time. This is the case regardless if the keyboard being used normally has N key rollover (NKRO). -- The keyboard is unable to affect the Input Mode on boot. The Input Mode must either be set using `Web Configurator > Settings` or an additional switch on the GP2040-CE device using the add-on. +--- +title: Keyboard Host Configuration +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to use a USB keyboard in conjunction with GP2040-CE to send inputs to supported systems" +--- + +import InputLabelSelector, { + Hotkey, +} from "@site/src/components/LabelSelector.tsx"; +import InstallUSBHostPort from "../snippets/_add-usb-host-port.mdx"; + +Select the button labels to be displayed in the usage guide: + + +
+ +Purpose: This add-on is intended to allow you to use a keyboard with GP2040-CE to be used with GP2040-CE supported systems. + +![GP2040-CE Configurator - Keyboard Host Configuration](../assets/images/gpc-add-ons-keyboard-host-configuration.png) + +## Web Configurator Options + +:::info GPIO Pin Assignment + +The Data, 5V Enable, and Pin Orientation options for USB host ports are now configured in [`Configuration > Peripheral Mapping - USB Host`](../web-configurator/menu-pages/03-peripheral-mapping.mdx#usb-host). + +::: + +### Default Keybindings + +| GP2040 | Key | +| -------------------------------- | ------------ | +| | Arrow Up | +| | Arrow Down | +| | Arrow Left | +| | Arrow Right | +| | Shift Left | +| | Z | +| | Control Left | +| | Alt Left | +| | C | +| | Space | +| | V | +| | X | +| | 5 | +| | 1 | +| | Equal | +| | Minus | +| | 9 | +| | F2 | +| | None | + +## Hardware + +### Requirements + +This add-on requires that you have a USB host port available on your device connected to GPIO pins on the RP2040 board. There are a number of methods to do so. + +See [USB Host Port Installation](../controller-build/usb-host.mdx) for more information on the requirements for adding a USB host port to your controller. + +### Installation + + + +## Miscellaneous Notes + +As long as the keyboard has a USB plug, any keyboard should work with this addon, including wireless USB keyboards. + +Due to current implementation of Pico-PIO-USB and the add-on system, the following limitations are present. + +- The keyboard is limited to only as many inputs as listed above. All other keys on the keyboard will not function and will send no inputs to the system reading inputs. +- The keyboard is limited to 6 key rollover, meaning that a maximum of 6 keyboard keys can be activated at a time. This is the case regardless if the keyboard being used normally has N key rollover (NKRO). +- The keyboard is unable to affect the Input Mode on boot. The Input Mode must either be set using `Web Configurator > Settings` or an additional switch on the GP2040-CE device using the add-on. diff --git a/docs/add-ons/on-board-led.mdx b/docs/add-ons/on-board-led.mdx index 4ee4bdd..9c7cf0c 100644 --- a/docs/add-ons/on-board-led.mdx +++ b/docs/add-ons/on-board-led.mdx @@ -1,38 +1,38 @@ ---- -title: On-board LED Configuration -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to use the on-board LED as an mode, input, or PS4/5 authentication status indicator" ---- - -# On-board LED Configuration - -Purpose: This add-on is intended to allow you to use the onboard LED of a board to act as either a Mode, Input Test or PS4/5 Authentication indicator. - -![GP2040-CE Configurator - Add-Ons On-Board LED Configuration](../assets/images/gpc-add-ons-onboard-led.png) - -## Web Configurator Options - -- `Off` - LED is off -- `Mode Indicator` - - LED is solid if device is powered with connected data - - LED blinks rapidly if powered with no data - - LED blinks slowly when in web-config mode -- `Input Test` - LED is off but turns on when any input is pressed (LED turns off when button is released). -- `PS4/5 Authentication` - LED is solid is when the authentication call has been triggered and is successful - -## Hardware - -### Requirements - -This add-on requires that the RP2040 board being used already has a LED onboard. - -### Installation - -None. - -## Miscellaneous Notes - -None. +--- +title: On-board LED Configuration +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to use the on-board LED as an mode, input, or PS4/5 authentication status indicator" +--- + +# On-board LED Configuration + +Purpose: This add-on is intended to allow you to use the onboard LED of a board to act as either a Mode, Input Test or PS4/5 Authentication indicator. + +![GP2040-CE Configurator - Add-Ons On-Board LED Configuration](../assets/images/gpc-add-ons-onboard-led.png) + +## Web Configurator Options + +- `Off` - LED is off +- `Mode Indicator` + - LED is solid if device is powered with connected data + - LED blinks rapidly if powered with no data + - LED blinks slowly when in web-config mode +- `Input Test` - LED is off but turns on when any input is pressed (LED turns off when button is released). +- `PS4/5 Authentication` - LED is solid is when the authentication call has been triggered and is successful + +## Hardware + +### Requirements + +This add-on requires that the RP2040 board being used already has a LED onboard. + +### Installation + +None. + +## Miscellaneous Notes + +None. diff --git a/docs/add-ons/player-number.mdx b/docs/add-ons/player-number.mdx index 6b7f50a..a01e402 100644 --- a/docs/add-ons/player-number.mdx +++ b/docs/add-ons/player-number.mdx @@ -1,32 +1,32 @@ ---- -title: Player Number -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to set a static XInput player number" ---- - -# Player Number - -Purpose: This add-on is intended to allow you to set a static Player Number while using XInput mode. - -![GP2040-CE Configurator - Player Number](../assets/images/gpc-add-ons-player-number.png) - -## Web Configurator Options - -- `Player Number` - Choose what player number this RP2040 based device will be representing. - -## Hardware - -### Requirements - -This add-on is requires the controller input mode to be set to XInput mode. - -### Installation - -None - -## Miscellaneous Notes - -None +--- +title: Player Number +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to set a static XInput player number" +--- + +# Player Number + +Purpose: This add-on is intended to allow you to set a static Player Number while using XInput mode. + +![GP2040-CE Configurator - Player Number](../assets/images/gpc-add-ons-player-number.png) + +## Web Configurator Options + +- `Player Number` - Choose what player number this RP2040 based device will be representing. + +## Hardware + +### Requirements + +This add-on is requires the controller input mode to be set to XInput mode. + +### Installation + +None + +## Miscellaneous Notes + +None diff --git a/docs/add-ons/rotary-encoders.mdx b/docs/add-ons/rotary-encoders.mdx index bbeb0b3..53d77e5 100644 --- a/docs/add-ons/rotary-encoders.mdx +++ b/docs/add-ons/rotary-encoders.mdx @@ -1,36 +1,36 @@ ---- -title: Rotary Encoders -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to allow for the use of rotary encoders." ---- - -# Rotary Encoders - -:::Note - -Please note that rotary encoders are currently in beta. -::: - -Purpose: Rotary encoders allow for continuous or limited min-max pulses on specified pins. - -![GP2040-CE Configuration - Add-Ons Rotary Encoders](../assets/images/gpc-add-ons-rotary-encoders.png) - -## Web Configurator Options - -- `Enabled` - Enables or disables `Encoder 1` or `Encoder 2`. -- `Pin A/CLK` - The `Clock` pin for the encoder. -- `Pin B/DT` - The `Data` pin for the encoder`. -- `Pulses/Revolutions (PPR)` - The number of puleses/revolutions on your encoder. -- `Multiplier` - Use this multiplier to fine tune your encoder performance in GP2040-CE. -- `Reset After (ms)` - The number of miliseconds to wait before resetting the value to `0` / `center`. -- `Control Mode` - Choose how this encoder will function. -- `Allow Wrap-Around` - Allows the encoder to reach an axis max and wrap-around to the axis minimum. - -- - -## Hardware - +--- +title: Rotary Encoders +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to allow for the use of rotary encoders." +--- + +# Rotary Encoders + +:::Note + +Please note that rotary encoders are currently in beta. +::: + +Purpose: Rotary encoders allow for continuous or limited min-max pulses on specified pins. + +![GP2040-CE Configuration - Add-Ons Rotary Encoders](../assets/images/gpc-add-ons-rotary-encoders.png) + +## Web Configurator Options + +- `Enabled` - Enables or disables `Encoder 1` or `Encoder 2`. +- `Pin A/CLK` - The `Clock` pin for the encoder. +- `Pin B/DT` - The `Data` pin for the encoder`. +- `Pulses/Revolutions (PPR)` - The number of puleses/revolutions on your encoder. +- `Multiplier` - Use this multiplier to fine tune your encoder performance in GP2040-CE. +- `Reset After (ms)` - The number of miliseconds to wait before resetting the value to `0` / `center`. +- `Control Mode` - Choose how this encoder will function. +- `Allow Wrap-Around` - Allows the encoder to reach an axis max and wrap-around to the axis minimum. + +- + +## Hardware + At this time we do not have recommended modules. This is a newly introduced feature. \ No newline at end of file diff --git a/docs/add-ons/snes-input.mdx b/docs/add-ons/snes-input.mdx index 1558d8d..f1ea090 100644 --- a/docs/add-ons/snes-input.mdx +++ b/docs/add-ons/snes-input.mdx @@ -1,84 +1,84 @@ ---- -title: SNES Input -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to use various NES and SNES controllers/peripherals in conjunction with GP2040-CE to send inputs to supported systems" ---- - -import InputLabelSelector, { - Hotkey, -} from "@site/src/components/LabelSelector.tsx"; - -# SNES Input - -Select the button labels to be displayed in the usage guide: - - -
- -Purpose: This add-on is intended to allow you to use a GP2040-CE as an adapter to connect an NES controller, SNES controller, or a Super NES Mouse to supported systems. - -![GP2040-CE Configurator - SNES Input](../assets/images/gpc-add-ons-snespad-input.png) - -## Web Configurator Options - -- `CLOCK Pin` - The GPIO pin used for SNES CLOCK. -- `LATCH Pin` - The GPIO pin used for SNES LATCH. -- `DATA Pin` - The GPIO pin used for SNES DATA. - -Supported controller types and their mapping is as follows: - -| GP2040 | NES | SNES | Super NES Mouse | -| ----------------------------- | ------ | ------ | --------------- | -| | Up | Up | | -| | Down | Down | | -| | Left | Left | | -| | Right | Right | | -| | B | B | Left Click | -| | A | A | Right Click | -| | | Y | | -| | | X | | -| | | L | | -| | | R | | -| | | | | -| | | | | -| | Select | Select | | -| | Start | Start | | -| | | | | -| `Analog` | | | Mouse Movement | - -## Hardware - -### Requirements - -SNES extension cable with individual wires, or just directly wire from the controller. - -### Installation - -![GP2040-CE Configurator - SNES Controller Cable Connector Pinout](../assets/images/gpc-add-ons-snespad-input-pinout.svg) - -Please refer to the SNES Controller cable connector pinout found on [Super Nintendo Entertainment System: pinouts & protocol](https://www.repairfaq.org/REPAIR/F_SNES.html). The orientation of this pinout is looking back "into" the connector on the CABLE. - -:::caution - -Extension wire colors are inconsistent, so it's best to test continuity. - -::: - -Connect the SNES pins to the GPIO pins on the RP2040 board following this table. - -| SNES Pin | Pin on RP2040 Board | -| :------: | ---------------------------- | -| 1 | VBUS | -| 2 | `CLOCK Pin` in web interface | -| 3 | `LATCH Pin` in web interface | -| 4 | `DATA Pin` in web interface | -| 5 | No connection | -| 6 | No connection | -| 7 | Ground | - -## Miscellaneous Notes - -None. +--- +title: SNES Input +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to use various NES and SNES controllers/peripherals in conjunction with GP2040-CE to send inputs to supported systems" +--- + +import InputLabelSelector, { + Hotkey, +} from "@site/src/components/LabelSelector.tsx"; + +# SNES Input + +Select the button labels to be displayed in the usage guide: + + +
+ +Purpose: This add-on is intended to allow you to use a GP2040-CE as an adapter to connect an NES controller, SNES controller, or a Super NES Mouse to supported systems. + +![GP2040-CE Configurator - SNES Input](../assets/images/gpc-add-ons-snespad-input.png) + +## Web Configurator Options + +- `CLOCK Pin` - The GPIO pin used for SNES CLOCK. +- `LATCH Pin` - The GPIO pin used for SNES LATCH. +- `DATA Pin` - The GPIO pin used for SNES DATA. + +Supported controller types and their mapping is as follows: + +| GP2040 | NES | SNES | Super NES Mouse | +| ----------------------------- | ------ | ------ | --------------- | +| | Up | Up | | +| | Down | Down | | +| | Left | Left | | +| | Right | Right | | +| | B | B | Left Click | +| | A | A | Right Click | +| | | Y | | +| | | X | | +| | | L | | +| | | R | | +| | | | | +| | | | | +| | Select | Select | | +| | Start | Start | | +| | | | | +| `Analog` | | | Mouse Movement | + +## Hardware + +### Requirements + +SNES extension cable with individual wires, or just directly wire from the controller. + +### Installation + +![GP2040-CE Configurator - SNES Controller Cable Connector Pinout](../assets/images/gpc-add-ons-snespad-input-pinout.svg) + +Please refer to the SNES Controller cable connector pinout found on [Super Nintendo Entertainment System: pinouts & protocol](https://www.repairfaq.org/REPAIR/F_SNES.html). The orientation of this pinout is looking back "into" the connector on the CABLE. + +:::caution + +Extension wire colors are inconsistent, so it's best to test continuity. + +::: + +Connect the SNES pins to the GPIO pins on the RP2040 board following this table. + +| SNES Pin | Pin on RP2040 Board | +| :------: | ---------------------------- | +| 1 | VBUS | +| 2 | `CLOCK Pin` in web interface | +| 3 | `LATCH Pin` in web interface | +| 4 | `DATA Pin` in web interface | +| 5 | No connection | +| 6 | No connection | +| 7 | Ground | + +## Miscellaneous Notes + +None. diff --git a/docs/add-ons/socd-selection-slider.mdx b/docs/add-ons/socd-selection-slider.mdx index e9a29c9..9776b53 100644 --- a/docs/add-ons/socd-selection-slider.mdx +++ b/docs/add-ons/socd-selection-slider.mdx @@ -1,51 +1,51 @@ ---- -title: SOCD Selection Slider -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to select SOCD cleaning modes with toggle or slide switch" ---- - -# SOCD Selection Slider - -Purpose: This add-on is intended to allow users change the method of SOCD cleaning using a two/three position toggle switch or slide toggle. - -![GP2040-CE Configurator - SOCD Selection Slider](../assets/images/gpc-add-ons-socd-slider.png) - -## Web Configurator Options - -- `SOCD Slider Mode Default` - The default SOCD mode to be used when the slider pin is not activated. - -:::info GPIO Pin Mapping Moved - -The pin(s) are now configured on the [Pin Mapping page](../web-configurator/menu-pages/02-pin-mapping.mdx) by choosing the correct option for the selected pin. - -- [Up Priority SOCD Cleaning](../hotkeys.mdx#socd-up-priority) -- [Neutral SOCD Cleaning](../hotkeys.mdx#socd-neutral) -- [Last Win SOCD Cleaning](../hotkeys.mdx#socd-last-win) -- [First Wins SOCD Cleaning](../hotkeys.mdx#socd-first-wins) -- [SOCD Cleaning Off](../hotkeys.mdx#socd-cleaning-off) - -::: - -- `SOCD Slider Mode Default` - The SOCD cleaning mode that is active when no `SOCD Cleaning Mode` pins are held. - - [Up Priority](../hotkeys.mdx#socd-up-priority) - - [Neutral](../hotkeys.mdx#socd-neutral) - - [Last Win](../hotkeys.mdx#socd-last-win) - - [First Wins](../hotkeys.mdx#socd-first-wins) - - [SOCD Cleaning Off](../hotkeys.mdx#socd-cleaning-off) - -## Hardware - -### Requirements - -The GPIO pins set on the Pin Mappings page will each need to be brought and kept low to remain active to use that mode and when using the default mode, none of the pins can be brought low. Therefore, a 2 or 3 position toggle switch or slide toggle is necessary for proper use of this add-on. - -### Installation - -Installation will depend on whether a toggle switch or slide toggle is used. In general, on one side of the switch, connect the selection pin(s) to the GPIO pin(s) set. On the center pin, connect it to any GND pin. - -## Miscellaneous Notes - -Enabling this add-on will disable the use of the SOCD cleaning [Hotkey Shortcuts](../hotkeys.mdx), resulting in the toggle switch or slide toggle set up with this add-on being the only method to set the SOCD cleaning mode. +--- +title: SOCD Selection Slider +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to select SOCD cleaning modes with toggle or slide switch" +--- + +# SOCD Selection Slider + +Purpose: This add-on is intended to allow users change the method of SOCD cleaning using a two/three position toggle switch or slide toggle. + +![GP2040-CE Configurator - SOCD Selection Slider](../assets/images/gpc-add-ons-socd-slider.png) + +## Web Configurator Options + +- `SOCD Slider Mode Default` - The default SOCD mode to be used when the slider pin is not activated. + +:::info GPIO Pin Mapping Moved + +The pin(s) are now configured on the [Pin Mapping page](../web-configurator/menu-pages/02-pin-mapping.mdx) by choosing the correct option for the selected pin. + +- [Up Priority SOCD Cleaning](../hotkeys.mdx#socd-up-priority) +- [Neutral SOCD Cleaning](../hotkeys.mdx#socd-neutral) +- [Last Win SOCD Cleaning](../hotkeys.mdx#socd-last-win) +- [First Wins SOCD Cleaning](../hotkeys.mdx#socd-first-wins) +- [SOCD Cleaning Off](../hotkeys.mdx#socd-cleaning-off) + +::: + +- `SOCD Slider Mode Default` - The SOCD cleaning mode that is active when no `SOCD Cleaning Mode` pins are held. + - [Up Priority](../hotkeys.mdx#socd-up-priority) + - [Neutral](../hotkeys.mdx#socd-neutral) + - [Last Win](../hotkeys.mdx#socd-last-win) + - [First Wins](../hotkeys.mdx#socd-first-wins) + - [SOCD Cleaning Off](../hotkeys.mdx#socd-cleaning-off) + +## Hardware + +### Requirements + +The GPIO pins set on the Pin Mappings page will each need to be brought and kept low to remain active to use that mode and when using the default mode, none of the pins can be brought low. Therefore, a 2 or 3 position toggle switch or slide toggle is necessary for proper use of this add-on. + +### Installation + +Installation will depend on whether a toggle switch or slide toggle is used. In general, on one side of the switch, connect the selection pin(s) to the GPIO pin(s) set. On the center pin, connect it to any GND pin. + +## Miscellaneous Notes + +Enabling this add-on will disable the use of the SOCD cleaning [Hotkey Shortcuts](../hotkeys.mdx), resulting in the toggle switch or slide toggle set up with this add-on being the only method to set the SOCD cleaning mode. diff --git a/docs/add-ons/tilt-input.mdx b/docs/add-ons/tilt-input.mdx index 1f8258a..2798ed9 100644 --- a/docs/add-ons/tilt-input.mdx +++ b/docs/add-ons/tilt-input.mdx @@ -1,53 +1,53 @@ ---- -title: Tilt Input -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to allow analog directional inputs on Left and Right analog joystick at a percentage of maximum magnitude" ---- - -# Tilt Input - -Purpose: The Tilt Input add-on allows users to send analog inputs from the Left and Right analog joysticks that are some percent of the maximum directional input (e.g. send 65% of a Down-Right input on the Right analog joystick). - -![GP2040-CE Configuration - Add-Ons Tilt Input](../assets/images/gpc-add-ons-tilt.png) - -## Web Configurator Options - -- `Tilt 1 Pin` - The GPIO pin used for the Tilt 1 direction. -- `Tilt 1 Factor Left X` - The percentage of the X-axis input for the Left analog joystick sent when `Tilt 1 Pin` is activated. (Min. 0, Max 100) -- `Tilt 1 Factor Left Y` - The percentage of the Y-axis input for the Left analog joystick sent when `Tilt 1 Pin` is activated. (Min. 0, Max 100) -- `Tilt 1 Factor Left X` - The percentage of the X-axis input for the Right analog joystick sent when `Tilt 1 Pin` is activated. (Min. 0, Max 100) -- `Tilt 1 Factor Left Y` - The percentage of the Y-axis input for the Right analog joystick sent when `Tilt 1 Pin` is activated. (Min. 0, Max 100) -- `Tilt 2 Pin` - The GPIO pin used for the Tilt 2 direction. -- `Tilt 2 Factor Left X` - The percentage of the X-axis input for the Left analog joystick sent when `Tilt 2 Pin` is activated. (Min. 0, Max 100) -- `Tilt 2 Factor Left Y` - The percentage of the Y-axis input for the Left analog joystick sent when `Tilt 2 Pin` is activated. (Min. 0, Max 100) -- `Tilt 2 Factor Left X` - The percentage of the X-axis input for the Right analog joystick sent when `Tilt 2 Pin` is activated. (Min. 0, Max 100) -- `Tilt 2 Factor Left Y` - The percentage of the Y-axis input for the Right analog joystick sent when `Tilt 2 Pin` is activated. (Min. 0, Max 100) -- `Tilt Left Analog Up Pin` - The GPIO pin used for the Up direction on the Left analog joystick. -- `Tilt Left Analog Down Pin` - The GPIO pin used for the Down direction on the Left analog joystick. -- `Tilt Left Analog Left Pin` - The GPIO pin used for the Left direction on the Left analog joystick. -- `Tilt Left Analog Right Pin` - The GPIO pin used for the Right direction on the Left analog joystick. -- `Tilt Right Analog Up Pin` - The GPIO pin used for the Up direction on the Right analog joystick. -- `Tilt Right Analog Down Pin` - The GPIO pin used for the Down direction on the Right analog joystick. -- `Tilt Right Analog Left Pin` - The GPIO pin used for the Left direction on the Right analog joystick. -- `Tilt Right Analog Right Pin` - The GPIO pin used for the Right direction on the Right analog joystick. -- `Tilt SOCD Mode` - Choose the default SOCD Cleaning Mode (Neutral, Last Win, First Win). - -## Hardware - -### Requirements - -This add-on requires additional buttons or switches as this add-on entirely prevents the primary DPad from being set as the Left analog or Right analog joystick. - -### Installation - -For each button, connect one side of the button to their respective GPIO pin as assigned in the Web Configurator. Connect the other side of the buttons to GND. - -## Miscellaneous Notes - -- Because this add-on disables the DPad from being set as Left analog and Right analog, using the hotkeys `DPad Left Analog` and `DPad Right Analog` deactivates the DPad and using the `DPad Digital` will reactivate the DPad once more. -- Not all Tilt analog pins are required to be set, but not setting the pins will prevent you from using that input without using the Web Configurator to remap the inputs. -- Additionally, pressing Tilt 1 and Tilt 2 simultaneously while inputting Right analog joystick directions allows the Right analog joystick to function as the D-Pad directions. -- Pressing Tilt 1 and Tilt 2 simultaneously while inputting Left analog joystick will prioritize Tilt 1 and ignore Tilt 2. +--- +title: Tilt Input +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to allow analog directional inputs on Left and Right analog joystick at a percentage of maximum magnitude" +--- + +# Tilt Input + +Purpose: The Tilt Input add-on allows users to send analog inputs from the Left and Right analog joysticks that are some percent of the maximum directional input (e.g. send 65% of a Down-Right input on the Right analog joystick). + +![GP2040-CE Configuration - Add-Ons Tilt Input](../assets/images/gpc-add-ons-tilt.png) + +## Web Configurator Options + +- `Tilt 1 Pin` - The GPIO pin used for the Tilt 1 direction. +- `Tilt 1 Factor Left X` - The percentage of the X-axis input for the Left analog joystick sent when `Tilt 1 Pin` is activated. (Min. 0, Max 100) +- `Tilt 1 Factor Left Y` - The percentage of the Y-axis input for the Left analog joystick sent when `Tilt 1 Pin` is activated. (Min. 0, Max 100) +- `Tilt 1 Factor Left X` - The percentage of the X-axis input for the Right analog joystick sent when `Tilt 1 Pin` is activated. (Min. 0, Max 100) +- `Tilt 1 Factor Left Y` - The percentage of the Y-axis input for the Right analog joystick sent when `Tilt 1 Pin` is activated. (Min. 0, Max 100) +- `Tilt 2 Pin` - The GPIO pin used for the Tilt 2 direction. +- `Tilt 2 Factor Left X` - The percentage of the X-axis input for the Left analog joystick sent when `Tilt 2 Pin` is activated. (Min. 0, Max 100) +- `Tilt 2 Factor Left Y` - The percentage of the Y-axis input for the Left analog joystick sent when `Tilt 2 Pin` is activated. (Min. 0, Max 100) +- `Tilt 2 Factor Left X` - The percentage of the X-axis input for the Right analog joystick sent when `Tilt 2 Pin` is activated. (Min. 0, Max 100) +- `Tilt 2 Factor Left Y` - The percentage of the Y-axis input for the Right analog joystick sent when `Tilt 2 Pin` is activated. (Min. 0, Max 100) +- `Tilt Left Analog Up Pin` - The GPIO pin used for the Up direction on the Left analog joystick. +- `Tilt Left Analog Down Pin` - The GPIO pin used for the Down direction on the Left analog joystick. +- `Tilt Left Analog Left Pin` - The GPIO pin used for the Left direction on the Left analog joystick. +- `Tilt Left Analog Right Pin` - The GPIO pin used for the Right direction on the Left analog joystick. +- `Tilt Right Analog Up Pin` - The GPIO pin used for the Up direction on the Right analog joystick. +- `Tilt Right Analog Down Pin` - The GPIO pin used for the Down direction on the Right analog joystick. +- `Tilt Right Analog Left Pin` - The GPIO pin used for the Left direction on the Right analog joystick. +- `Tilt Right Analog Right Pin` - The GPIO pin used for the Right direction on the Right analog joystick. +- `Tilt SOCD Mode` - Choose the default SOCD Cleaning Mode (Neutral, Last Win, First Win). + +## Hardware + +### Requirements + +This add-on requires additional buttons or switches as this add-on entirely prevents the primary DPad from being set as the Left analog or Right analog joystick. + +### Installation + +For each button, connect one side of the button to their respective GPIO pin as assigned in the Web Configurator. Connect the other side of the buttons to GND. + +## Miscellaneous Notes + +- Because this add-on disables the DPad from being set as Left analog and Right analog, using the hotkeys `DPad Left Analog` and `DPad Right Analog` deactivates the DPad and using the `DPad Digital` will reactivate the DPad once more. +- Not all Tilt analog pins are required to be set, but not setting the pins will prevent you from using that input without using the Web Configurator to remap the inputs. +- Additionally, pressing Tilt 1 and Tilt 2 simultaneously while inputting Right analog joystick directions allows the Right analog joystick to function as the D-Pad directions. +- Pressing Tilt 1 and Tilt 2 simultaneously while inputting Left analog joystick will prioritize Tilt 1 and ignore Tilt 2. diff --git a/docs/add-ons/turbo.mdx b/docs/add-ons/turbo.mdx index 5300619..120f0da 100644 --- a/docs/add-ons/turbo.mdx +++ b/docs/add-ons/turbo.mdx @@ -1,83 +1,83 @@ ---- -title: Turbo -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to allow hold a button to be held and fast series of button presses and inputs to be sent." ---- - -import InputTable from "../snippets/_input-table.mdx"; - -# Turbo - -Purpose: This add-on is intended for you to change the behavior of controls so that holding a button triggers a fast series of separate button presses. - -Turbo Mode is enabled/disabled on individual buttons by holding an input and then pressing the Turbo Button. This results in the input being repeatedly sent in rapid succession (according to the `Turbo Shot Count` set in the Web Configurator). - -:::note - -Turbo Mode is limited to non-directional inputs on the game pad. - -::: - -![GP2040-CE Configurator - Add-Ons Turbo](../assets/images/gpc-add-ons-turbo.png) - -## Web Configurator Options - -### General Options - -- `Turbo Pin` - The GPIO pin used for the Turbo button, which toggles Turbo Mode on a button. -- `Turbo Pin LED` - The GPIO pin used for the Turbo LED. -- `Turbo Shot Count` - The number of of presses per second that the Turbo will activate at. (Default: 15, Range: 0-30) -- `Turbo Dial (ADC ONLY)` - The GPIO pin used for the Turbo dial. - -:::caution - -`Turbo Dial (ADC ONLY)` must be set as one of the ADC pins (GPIO 26-29) on the RP2040 board. - -::: - -### Turbo - SHMUP MODE - -![GP2040-CE Configurator - Add-Ons Turbo SHMUP MODE](../assets/images/gpc-add-ons-turbo-shmup.png) - -- `Turbo Always On 1-4` - These gamepad inputs will always send Turbo inputs (rapid, distinct button presses) even when Turbo mode is not enabled. -- `Charge Button 1-4 Pin` - These GPIO pins used for an additional button that can be held down and send one sustained input regardless of Turbo status. -- `Charge Button 1-4 Assignment` - These inputs that are associated with their respective`Charge Button 1-4` buttons. -- `Simultaneous Priority Mode` - Which of the two modes below should take priority. - - `Turbo Priority` - When a Charge Button and a gamepad input with Turbo Mode are pressed simultaneously, apply Turbo Mode behavior. - - `Charge Priority` - When a Charge Button and a gamepad input with Turbo Mode are pressed simultaneously, only send the input being held as a Charge Shot. - -:::note - -- In order for these options to work, the `Turbo Pin` must be set to some GPIO pin and not disabled (-1). -- `Charge Button 1-4 Pin` must be set to GPIO pins that are not currently assigned to any other inputs. - -::: - -Some of the options above uses the following GP2040 input labels for input mapping from controller to GP2040-CE. - - - -### Requirements - -Additional buttons are required for the Turbo Button as well as each of the additional Charge Buttons desired for a minimum of one button and a maximum of 4 buttons. - -If a Turbo LED is desired, an 3.3V non-addressable non-RGB LED is required. This type of LED should only have 2 conductors, power and ground. - -:::note 3.3V+ Forward Voltage LED - -The LED is using power from GPIO pin, which can only supply +3.3V. Verify that the forward voltage of the LED is below 3.3V, otherwise the LED will not turn on. - -::: - -### Installation - -For each button, connect one side of the button to their respective GPIO pin as assigned in the Web Configurator. Connect the other side of the buttons to GND. - -For the Turbo LED, connect one side of the LED to the GPIO pin assigned in the Web Configurator. Connect the other side of the LED to GND. - -## Miscellaneous Notes - -When using an OLED display, buttons that have Turbo enabled will have an additional, internal ring or square to indicate that when pressed, the input mapped to that button will repeatedly be sent by the controller. +--- +title: Turbo +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to allow hold a button to be held and fast series of button presses and inputs to be sent." +--- + +import InputTable from "../snippets/_input-table.mdx"; + +# Turbo + +Purpose: This add-on is intended for you to change the behavior of controls so that holding a button triggers a fast series of separate button presses. + +Turbo Mode is enabled/disabled on individual buttons by holding an input and then pressing the Turbo Button. This results in the input being repeatedly sent in rapid succession (according to the `Turbo Shot Count` set in the Web Configurator). + +:::note + +Turbo Mode is limited to non-directional inputs on the game pad. + +::: + +![GP2040-CE Configurator - Add-Ons Turbo](../assets/images/gpc-add-ons-turbo.png) + +## Web Configurator Options + +### General Options + +- `Turbo Pin` - The GPIO pin used for the Turbo button, which toggles Turbo Mode on a button. +- `Turbo Pin LED` - The GPIO pin used for the Turbo LED. +- `Turbo Shot Count` - The number of of presses per second that the Turbo will activate at. (Default: 15, Range: 0-30) +- `Turbo Dial (ADC ONLY)` - The GPIO pin used for the Turbo dial. + +:::caution + +`Turbo Dial (ADC ONLY)` must be set as one of the ADC pins (GPIO 26-29) on the RP2040 board. + +::: + +### Turbo - SHMUP MODE + +![GP2040-CE Configurator - Add-Ons Turbo SHMUP MODE](../assets/images/gpc-add-ons-turbo-shmup.png) + +- `Turbo Always On 1-4` - These gamepad inputs will always send Turbo inputs (rapid, distinct button presses) even when Turbo mode is not enabled. +- `Charge Button 1-4 Pin` - These GPIO pins used for an additional button that can be held down and send one sustained input regardless of Turbo status. +- `Charge Button 1-4 Assignment` - These inputs that are associated with their respective`Charge Button 1-4` buttons. +- `Simultaneous Priority Mode` - Which of the two modes below should take priority. + - `Turbo Priority` - When a Charge Button and a gamepad input with Turbo Mode are pressed simultaneously, apply Turbo Mode behavior. + - `Charge Priority` - When a Charge Button and a gamepad input with Turbo Mode are pressed simultaneously, only send the input being held as a Charge Shot. + +:::note + +- In order for these options to work, the `Turbo Pin` must be set to some GPIO pin and not disabled (-1). +- `Charge Button 1-4 Pin` must be set to GPIO pins that are not currently assigned to any other inputs. + +::: + +Some of the options above uses the following GP2040 input labels for input mapping from controller to GP2040-CE. + + + +### Requirements + +Additional buttons are required for the Turbo Button as well as each of the additional Charge Buttons desired for a minimum of one button and a maximum of 4 buttons. + +If a Turbo LED is desired, an 3.3V non-addressable non-RGB LED is required. This type of LED should only have 2 conductors, power and ground. + +:::note 3.3V+ Forward Voltage LED + +The LED is using power from GPIO pin, which can only supply +3.3V. Verify that the forward voltage of the LED is below 3.3V, otherwise the LED will not turn on. + +::: + +### Installation + +For each button, connect one side of the button to their respective GPIO pin as assigned in the Web Configurator. Connect the other side of the buttons to GND. + +For the Turbo LED, connect one side of the LED to the GPIO pin assigned in the Web Configurator. Connect the other side of the LED to GND. + +## Miscellaneous Notes + +When using an OLED display, buttons that have Turbo enabled will have an additional, internal ring or square to indicate that when pressed, the input mapped to that button will repeatedly be sent by the controller. diff --git a/docs/add-ons/wii-extensions.mdx b/docs/add-ons/wii-extensions.mdx index 866d715..c97d7cf 100644 --- a/docs/add-ons/wii-extensions.mdx +++ b/docs/add-ons/wii-extensions.mdx @@ -1,128 +1,128 @@ ---- -title: Wii Extensions -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Add-on to use various Wii controllers in conjunction with GP2040-CE to send inputs to supported systems" ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; -import InputTable from "../snippets/_input-table.mdx"; - -# Wii Extensions - -Purpose: This add-on is intended to allow you to use various Wii controllers (e.g. Nunchuck, Classic Wii Controller, Guitar, Drums, Turntable, and Taiko) with GP2040-CE to be used with GP2040-CE supported systems. - -:::note - -The Wii Extensions add-on is not meant to work with Wii consoles. - -::: - -![GP2040-CE Configurator - Wii Extensions](../assets/images/gpc-add-ons-wii-extensions.png) - -## Web Configurator Options - -:::info GPIO Pin Assignment - -The SDA and SCL pins for I2C and speed are now configured in [`Configuration > Peripheral Mapping - I2C`](../web-configurator/menu-pages/03-peripheral-mapping.mdx#i2c). - -::: - -- `I2C Block` - The block of I2C to use (i2c0 or i2c1). - -### Controller Specific Options - - - - -![GP2040-CE Configurator - Wii Nunchuck Settings](../assets/images/gpc-add-ons-wii-extensions-nunchuck.png) - -![GP2040-CE Configurator - Wii Nunchuck Controller](../assets/images/wii-extension-controllers/nunchuck.svg) - - - - -:::note - -- Classic Controller support includes Classic, Classic Pro, and NES/SNES Mini Controllers. -- Original Classic Controller L & R triggers are analog sensitive, where Pro triggers are not. - -::: - -![GP2040-CE Configurator - Wii Classic Controller Settings](../assets/images/gpc-add-ons-wii-extensions-classic.png) - -![GP2040-CE Configurator - Wii Classic Controller](../assets/images/wii-extension-controllers/classic.svg) - - - - -![GP2040-CE Configurator - Wii Guitar Settings](../assets/images/gpc-add-ons-wii-extensions-guitar.png) - -![GP2040-CE Configurator - Wii Guitar](../assets/images/wii-extension-controllers/guitar.svg) - - - - -:::note - -Due to an accessory hardware issue, Drum & DJ turntable controllers may require hot-swapping from a Nunchuk or Classic controller before being usable. - -::: - -![GP2040-CE Configurator - Wii Drums Settings](../assets/images/gpc-add-ons-wii-extensions-drums.png) - -![GP2040-CE Configurator - Wii Drums](../assets/images/wii-extension-controllers/drums.svg) - - - - -![GP2040-CE Configurator - Wii Turntable Settings](../assets/images/gpc-add-ons-wii-extensions-turntable.png) - -![GP2040-CE Configurator - Wii Turntable](../assets/images/wii-extension-controllers/turntable.svg) - - - - -![GP2040-CE Configurator - Wii Taiko Settings](../assets/images/gpc-add-ons-wii-extensions-taiko.png) - -![GP2040-CE Configurator - Wii Taiko](../assets/images/wii-extension-controllers/taiko.svg) - - - - -Each of the options above uses the following GP2040 input labels for input mapping from controller to GP2040-CE. - - - -### Requirements - -This add-on requires some way to connect to the following pins as needed from the controller to the GP2040-CE device. - -- `PWR` - 3.3V to power the device (May also be labeled `+` or `VIN`) -- `GND` - Ground (May also be labeled `-`) -- `SDA` - Serial Data Line (May also be labeled `C`) -- `SCL` - Serial Clock Line (May also be labeled `D`) - -:::note - -Breakout boards are commercially available and searching online for "Wiichuck Adapter" will produce a number of options. - -Some boards will include a 3.3V output that is not necessary for this add-on to function. - -::: - -### Installation - -Connect from Wii controller/adapter to the GP2040-CE board according to GPIO pins set in the Web Configurator. - -- `PWR` - 3.3V to power the device (May also be labeled `+` or `VIN`) -- `GND` - Ground (May also be labeled `-`) -- `SDA` - Serial Data Line (May also be labeled `C`) -- `SCL` - Serial Clock Line (May also be labeled `D`) - -## Miscellaneous Notes - -None. +--- +title: Wii Extensions +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Add-on to use various Wii controllers in conjunction with GP2040-CE to send inputs to supported systems" +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; +import InputTable from "../snippets/_input-table.mdx"; + +# Wii Extensions + +Purpose: This add-on is intended to allow you to use various Wii controllers (e.g. Nunchuck, Classic Wii Controller, Guitar, Drums, Turntable, and Taiko) with GP2040-CE to be used with GP2040-CE supported systems. + +:::note + +The Wii Extensions add-on is not meant to work with Wii consoles. + +::: + +![GP2040-CE Configurator - Wii Extensions](../assets/images/gpc-add-ons-wii-extensions.png) + +## Web Configurator Options + +:::info GPIO Pin Assignment + +The SDA and SCL pins for I2C and speed are now configured in [`Configuration > Peripheral Mapping - I2C`](../web-configurator/menu-pages/03-peripheral-mapping.mdx#i2c). + +::: + +- `I2C Block` - The block of I2C to use (i2c0 or i2c1). + +### Controller Specific Options + + + + +![GP2040-CE Configurator - Wii Nunchuck Settings](../assets/images/gpc-add-ons-wii-extensions-nunchuck.png) + +![GP2040-CE Configurator - Wii Nunchuck Controller](../assets/images/wii-extension-controllers/nunchuck.svg) + + + + +:::note + +- Classic Controller support includes Classic, Classic Pro, and NES/SNES Mini Controllers. +- Original Classic Controller L & R triggers are analog sensitive, where Pro triggers are not. + +::: + +![GP2040-CE Configurator - Wii Classic Controller Settings](../assets/images/gpc-add-ons-wii-extensions-classic.png) + +![GP2040-CE Configurator - Wii Classic Controller](../assets/images/wii-extension-controllers/classic.svg) + + + + +![GP2040-CE Configurator - Wii Guitar Settings](../assets/images/gpc-add-ons-wii-extensions-guitar.png) + +![GP2040-CE Configurator - Wii Guitar](../assets/images/wii-extension-controllers/guitar.svg) + + + + +:::note + +Due to an accessory hardware issue, Drum & DJ turntable controllers may require hot-swapping from a Nunchuk or Classic controller before being usable. + +::: + +![GP2040-CE Configurator - Wii Drums Settings](../assets/images/gpc-add-ons-wii-extensions-drums.png) + +![GP2040-CE Configurator - Wii Drums](../assets/images/wii-extension-controllers/drums.svg) + + + + +![GP2040-CE Configurator - Wii Turntable Settings](../assets/images/gpc-add-ons-wii-extensions-turntable.png) + +![GP2040-CE Configurator - Wii Turntable](../assets/images/wii-extension-controllers/turntable.svg) + + + + +![GP2040-CE Configurator - Wii Taiko Settings](../assets/images/gpc-add-ons-wii-extensions-taiko.png) + +![GP2040-CE Configurator - Wii Taiko](../assets/images/wii-extension-controllers/taiko.svg) + + + + +Each of the options above uses the following GP2040 input labels for input mapping from controller to GP2040-CE. + + + +### Requirements + +This add-on requires some way to connect to the following pins as needed from the controller to the GP2040-CE device. + +- `PWR` - 3.3V to power the device (May also be labeled `+` or `VIN`) +- `GND` - Ground (May also be labeled `-`) +- `SDA` - Serial Data Line (May also be labeled `C`) +- `SCL` - Serial Clock Line (May also be labeled `D`) + +:::note + +Breakout boards are commercially available and searching online for "Wiichuck Adapter" will produce a number of options. + +Some boards will include a 3.3V output that is not necessary for this add-on to function. + +::: + +### Installation + +Connect from Wii controller/adapter to the GP2040-CE board according to GPIO pins set in the Web Configurator. + +- `PWR` - 3.3V to power the device (May also be labeled `+` or `VIN`) +- `GND` - Ground (May also be labeled `-`) +- `SDA` - Serial Data Line (May also be labeled `C`) +- `SCL` - Serial Clock Line (May also be labeled `D`) + +## Miscellaneous Notes + +None. diff --git a/docs/controller-build/wiring.mdx b/docs/controller-build/wiring.mdx index ec08954..98f54cc 100644 --- a/docs/controller-build/wiring.mdx +++ b/docs/controller-build/wiring.mdx @@ -1,50 +1,50 @@ ---- -title: Microcontroller Board Wiring -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Default pinouts for precompiled, common, commercially available microcontroller boards" ---- - -# Wiring - -:::caution - -Custom builds using these microcontroller boards may have different pin mappings from the ones listed below, depending on the vendor. - -Resetting through the Web Configurator may result in incorrect pin mappings so it is recommended to speak with the vendor first. - -::: - -These are the pinouts of the GP2040-CE supported microcontroller board that are precompiled and available for [download](/downloads). - -They do not cover all cases and your particular RP2040 based board will likely had a different pin out, which depends entirely on how the board manufacturer decided to make the board. Exercise caution and do not assume that the pins on your board match the ones listed here. - -:::note Reconfigure GPIO Pin Out - -None of these pinouts are permanent. The pinouts can be changed to suit your needs through the [Web Configurator - Pin Mapping](../web-configurator/menu-pages/02-pin-mapping.mdx). - -::: - -## Raspberry Pi Pico - -:::info Alternative Pico Boards and Clones - -The Raspberry Pi Pico pinout can also be used on clone boards with the same form factor and pinout, such as the Pimironi Pico LiPo and the Waveshare RP2040-Plus. - -::: - -![Raspberry Pi Pico Pinout](../assets//wiring/RaspberryPiPico_Pinout.svg) - -## SparkFun Pro Micro - RP2040 - -![SparkFun Pro Micro - RP2040 Pinout](../assets/wiring/SparkFunProMicroRP2040_Pinout.svg) - -## Waveshare RP2040-Zero - -![Waveshare RP2040-Zero Pinout](../assets/wiring/WaveshareRP2040Zero_Pinout.svg) - -## Adafruit KB2040 - -![Adafruit KB2040 Pinout](../assets/wiring/AdafruitKB2040_Pinout.svg) +--- +title: Microcontroller Board Wiring +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Default pinouts for precompiled, common, commercially available microcontroller boards" +--- + +# Wiring + +:::caution + +Custom builds using these microcontroller boards may have different pin mappings from the ones listed below, depending on the vendor. + +Resetting through the Web Configurator may result in incorrect pin mappings so it is recommended to speak with the vendor first. + +::: + +These are the pinouts of the GP2040-CE supported microcontroller board that are precompiled and available for [download](/downloads). + +They do not cover all cases and your particular RP2040 based board will likely had a different pin out, which depends entirely on how the board manufacturer decided to make the board. Exercise caution and do not assume that the pins on your board match the ones listed here. + +:::note Reconfigure GPIO Pin Out + +None of these pinouts are permanent. The pinouts can be changed to suit your needs through the [Web Configurator - Pin Mapping](../web-configurator/menu-pages/02-pin-mapping.mdx). + +::: + +## Raspberry Pi Pico + +:::info Alternative Pico Boards and Clones + +The Raspberry Pi Pico pinout can also be used on clone boards with the same form factor and pinout, such as the Pimironi Pico LiPo and the Waveshare RP2040-Plus. + +::: + +![Raspberry Pi Pico Pinout](../assets//wiring/RaspberryPiPico_Pinout.svg) + +## SparkFun Pro Micro - RP2040 + +![SparkFun Pro Micro - RP2040 Pinout](../assets/wiring/SparkFunProMicroRP2040_Pinout.svg) + +## Waveshare RP2040-Zero + +![Waveshare RP2040-Zero Pinout](../assets/wiring/WaveshareRP2040Zero_Pinout.svg) + +## Adafruit KB2040 + +![Adafruit KB2040 Pinout](../assets/wiring/AdafruitKB2040_Pinout.svg) diff --git a/docs/faq/faq-general.mdx b/docs/faq/faq-general.mdx index c1883cb..a6fe316 100644 --- a/docs/faq/faq-general.mdx +++ b/docs/faq/faq-general.mdx @@ -1,81 +1,81 @@ ---- -title: General FAQ -# tags: -# - -pagination_next: null -pagination_prev: null -description: "General FAQ related to the GP2040-CE project" ---- - -# General FAQ - -## General Questions - -### Which input mode should I use? - -This will depend on the platform you will be playing on: - -- Use `XInput Mode` as the preferred mode for compatibility with PC games and 3rd party console adapters -- Use `PS4 Mode` on PS4, and on PS4 games on PS5 systems -- Use `PS3 Mode` on PS3, and on PS4 with games that support legacy controllers -- Use `Switch Mode` on Nintendo Switch -- Use `Keyboard Mode` for MAME cabinets, PC rhythm games, etc. - -If you have a configured USB Host port, Passthrough enabled, and an appropriate authentication device, you can use a GP2040-CE controller in the following situations. - -- Use [`PS4 Input Mode`](../web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings) on PS5 games on PS5 systems that support "categorized" controller (e.g. arcade stick, racing wheel, flight sim joystick, etc.) -- Use [`Xbox One Input Mode`](../web-configurator/menu-pages/01-settings.mdx#additional-xbox-one-settings) on Xbox One, Xbox Series X, and Xbox Series S. - -If you are using a Classic or Mini console, there are additional USB input modes to use with these emulated consoles. - -- `Sega Genesis/MegaDrive Mini` -- `NEOGEO Mini` -- `PC Engine/Turbografx 16 Mini` -- `EGRET II Mini` -- `ASTROCITY Mini` -- `Playstation Classic` - -### Does GP2040-CE natively support PS5, Xbox One, or Xbox Series consoles? - -These consoles implement security measures that prevent unauthorized accessories from being used. The process of cracking or bypassing that security may not be legal everywhere. These consoles are supported in the future if a user-friendly and completely legal implementation method is found, such as the implementation of [PS4 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings). - -Currently PS5, Xbox One, and Xbox Series consoles are supported through passthrough authentication - -- PS5 is at present supported using passthrough authentication only; see [PS5 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps5-settings). -- Xbox One, and Xbox Series consoles are supported using passthrough authentication only; see [Xbox One Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-xbox-one-settings) - -### Can I use multiple controllers with GP2040-CE on the same system? - -Yes! Each GP2040-CE board is treated as a separate controller. Be sure to only run the embedded web configurator for each controller one at a time. - -If you're installing boards with GP2040-CE in an arcade cabinet, check out the [Player Number add-on](../add-ons/player-number.mdx) to force each board to a specific player number. - -### Does GP2040-CE really have less than 1 ms of input latency? - -Yes! If your platform supports 1000 Hz USB polling, input latency will be less than 1ms. GP2040-CE is configured for 1000 Hz / 1 ms polling by default in all modes, however some systems override or ignore the polling rate the controller requests. The 1000 Hz polling rate is confirmed to work on PC and MiSTer. Even if your platform doesn't support high rate USB polling, GP2040-CE is still reading and processing your inputs as fast as the target system will allow. - -### Do the additional features like RGB LEDs, Player LEDs, and OLED displays affect performance? - -Not at all! The RP2040 processor of the Pico has two cores. GP2040-CE dedicates one of these cores strictly to reading, processing and sending player inputs. All secondary functions such as LEDs and displays are run on the secondary core. No matter how crazy the feature set becomes, GP2040-CE is unlikely to introduce any additional input latency. - -### Why do the buttons have weird labels like B3, A1, S2, etc.? - -GP2040-CE uses a generic system for handling button inputs that resembles a traditional PlayStation controller layout with a few extra buttons. - -- 4 face buttons (B1-B4) -- 4 shoulder buttons (L1, L2, R1, R2) -- Select and Start (S1, S2), 2 stick buttons (L3, R3) -- 2 auxiliary buttons (A1, A2) for things like Guide, PS and Touchpad, or Home and Capture. - -The GP2040-CE documentation and web configurator both provide a dropdown to change the button labels to more familiar controller layouts. You can refer to the button mapping table on the [GP2040-CE Usage](../usage.mdx#buttons) page. - -## Technical Questions - -### What kind of voodoo is that built-in web configurator? - -There's no magic here, just a few cool libraries working together: - -- Single page application using React and Bootstrap is embedded in the GP2040-CE firmware -- TinyUSB library provides virtual network connection via RNDIS -- lwIP library provides an HTTP server which serves up the embedded React app and the web configuration API -- ArduinoJson library is used for serialization and deserialization of web API requests +--- +title: General FAQ +# tags: +# - +pagination_next: null +pagination_prev: null +description: "General FAQ related to the GP2040-CE project" +--- + +# General FAQ + +## General Questions + +### Which input mode should I use? + +This will depend on the platform you will be playing on: + +- Use `XInput Mode` as the preferred mode for compatibility with PC games and 3rd party console adapters +- Use `PS4 Mode` on PS4, and on PS4 games on PS5 systems +- Use `PS3 Mode` on PS3, and on PS4 with games that support legacy controllers +- Use `Switch Mode` on Nintendo Switch +- Use `Keyboard Mode` for MAME cabinets, PC rhythm games, etc. + +If you have a configured USB Host port, Passthrough enabled, and an appropriate authentication device, you can use a GP2040-CE controller in the following situations. + +- Use [`PS4 Input Mode`](../web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings) on PS5 games on PS5 systems that support "categorized" controller (e.g. arcade stick, racing wheel, flight sim joystick, etc.) +- Use [`Xbox One Input Mode`](../web-configurator/menu-pages/01-settings.mdx#additional-xbox-one-settings) on Xbox One, Xbox Series X, and Xbox Series S. + +If you are using a Classic or Mini console, there are additional USB input modes to use with these emulated consoles. + +- `Sega Genesis/MegaDrive Mini` +- `NEOGEO Mini` +- `PC Engine/Turbografx 16 Mini` +- `EGRET II Mini` +- `ASTROCITY Mini` +- `Playstation Classic` + +### Does GP2040-CE natively support PS5, Xbox One, or Xbox Series consoles? + +These consoles implement security measures that prevent unauthorized accessories from being used. The process of cracking or bypassing that security may not be legal everywhere. These consoles are supported in the future if a user-friendly and completely legal implementation method is found, such as the implementation of [PS4 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings). + +Currently PS5, Xbox One, and Xbox Series consoles are supported through passthrough authentication + +- PS5 is at present supported using passthrough authentication only; see [PS5 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps5-settings). +- Xbox One, and Xbox Series consoles are supported using passthrough authentication only; see [Xbox One Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-xbox-one-settings) + +### Can I use multiple controllers with GP2040-CE on the same system? + +Yes! Each GP2040-CE board is treated as a separate controller. Be sure to only run the embedded web configurator for each controller one at a time. + +If you're installing boards with GP2040-CE in an arcade cabinet, check out the [Player Number add-on](../add-ons/player-number.mdx) to force each board to a specific player number. + +### Does GP2040-CE really have less than 1 ms of input latency? + +Yes! If your platform supports 1000 Hz USB polling, input latency will be less than 1ms. GP2040-CE is configured for 1000 Hz / 1 ms polling by default in all modes, however some systems override or ignore the polling rate the controller requests. The 1000 Hz polling rate is confirmed to work on PC and MiSTer. Even if your platform doesn't support high rate USB polling, GP2040-CE is still reading and processing your inputs as fast as the target system will allow. + +### Do the additional features like RGB LEDs, Player LEDs, and OLED displays affect performance? + +Not at all! The RP2040 processor of the Pico has two cores. GP2040-CE dedicates one of these cores strictly to reading, processing and sending player inputs. All secondary functions such as LEDs and displays are run on the secondary core. No matter how crazy the feature set becomes, GP2040-CE is unlikely to introduce any additional input latency. + +### Why do the buttons have weird labels like B3, A1, S2, etc.? + +GP2040-CE uses a generic system for handling button inputs that resembles a traditional PlayStation controller layout with a few extra buttons. + +- 4 face buttons (B1-B4) +- 4 shoulder buttons (L1, L2, R1, R2) +- Select and Start (S1, S2), 2 stick buttons (L3, R3) +- 2 auxiliary buttons (A1, A2) for things like Guide, PS and Touchpad, or Home and Capture. + +The GP2040-CE documentation and web configurator both provide a dropdown to change the button labels to more familiar controller layouts. You can refer to the button mapping table on the [GP2040-CE Usage](../usage.mdx#buttons) page. + +## Technical Questions + +### What kind of voodoo is that built-in web configurator? + +There's no magic here, just a few cool libraries working together: + +- Single page application using React and Bootstrap is embedded in the GP2040-CE firmware +- TinyUSB library provides virtual network connection via RNDIS +- lwIP library provides an HTTP server which serves up the embedded React app and the web configuration API +- ArduinoJson library is used for serialization and deserialization of web API requests diff --git a/docs/faq/faq-troubleshooting.mdx b/docs/faq/faq-troubleshooting.mdx index d709d4f..8aabdba 100644 --- a/docs/faq/faq-troubleshooting.mdx +++ b/docs/faq/faq-troubleshooting.mdx @@ -1,186 +1,186 @@ ---- -title: Troubleshooting -# tags: -# - -pagination_next: null -pagination_prev: null -description: "FAQ related to user-side troubleshooting of common issues" ---- - -import InputLabelSelector, { - Hotkey, -} from "@site/src/components/LabelSelector.tsx"; -import HotkeyNote from "../snippets/_hotkey-note.mdx"; - -Select the button labels to be displayed in the usage guide: - - - -## Input Issues - -### Why are my buttons out of order? - -There are many different reasons why this could be the case. - -#### Incorrect Mapping in Steam - -Verify that your controller settings in Steam are correctly set, both global settings and the per-game settings. See [Steam Support](https://partner.steamgames.com/doc/features/steam_controller/getting_started_for_players) for more information on how to resolve this issue. - -#### Incorrect Input Mode - -Verify that you are using the correct input mode as different modes may swap the mapping of inputs (e.g. Switch vs XInput, PS3/PS4, etc). See [GP2040-CE Usage](../usage.mdx#input-modes) for more information on how to change input modes. - -#### Incorrect Button Wiring - -Verify that your buttons are correctly connected to the controller board according to the GPIO pin mapping provided by the vendor of your controller board. - -#### Incorrect Firmware - -Firmware is built to assume a specific GPIO pin out and there may be a mismatch between what the firmware expects and what you expect the controls to be. You can either update the GPIO pin mappings in the [Web Configurator](../web-configurator/menu-pages/02-pin-mapping.mdx) or install the correct firmware onto this device. - -See [Incorrect Firmware](#incorrect-firmware-for-a-supported-device) below for more information on how to resolve this issue. - -### Why does my button not register when I press it? - -Check your wiring. The button should have two terminals where one side goes to the GPIO pin and the other to ground. Test whether wiring is working properly by touching the wires together and verifying that an input is received. - -There might also be an issue with your button. Try using different buttons. - -### Why do I keep getting an input even though the button is not being pressed? - -Check your wiring. There may be an unintended short where the signal wire is in contact with ground (GND) or a wire connected to GND. - -There might also be an issue with your button. Try using different buttons. - -### Up/Down or Left/Right have been swapped. How do I fix this? - -You've likely activated [Invert Y-Axis](../hotkeys.mdx#invert-y-axis) or [Invert X-Axis](../hotkeys.mdx#invert-x-axis) hotkey on your controller. Activate the hotkey again to disable the feature. - - - -### My SOCD cleaning changed. How do I get it back to X cleaning mode? - -You've likely activated one of the following SOCD cleaning mode hotkeys on your controller. Activate the hotkey again to disable the feature. - -- [SOCD Up Priority](../hotkeys.mdx#socd-up-priority) -- [SOCD Neutral](../hotkeys.mdx#socd-neutral) -- [SOCD Last Win](../hotkeys.mdx#socd-last-win) -- [SOCD First Wins](../hotkeys.mdx#socd-first-wins) -- [SOCD Cleaning Off](../hotkeys.mdx#socd-cleaning-off) - - - -### Why is my DPad stuck outputting directions on the Left/Right Analog Joystick? - -You've likely activated [DPad Left Analog](../hotkeys.mdx#dpad-left-analog) or [DPad Right Analog](../hotkeys.mdx#dpad-right-analog) hotkey on your controller. Activate the hotkey again to disable the feature. - - - -## Connection Issues - -### Why is the controller connected to the PC/Console not being recognized? - -There are a number of reasons this could be happening. Check for the following issues. - -#### Keyboard Mode - -Check that the input mode of the device is not in keyboard mode. This will cause your computer to only recognize your controller as a keyboard and not as a gamepad. - -#### Web Configurator - -When booting into the Web Configurator, the controller initializes as a RNDIS device and will not be recognized by the PC/Console as a controller. Check that the controller is not booting into the Web Configurator and is not being activated while booting. - -### Why does my controller not connect to the PC/console when using a USB Type C-C? - -Depending on how your device hardware is designed, it may not be set up to use a reversible USB Type C. Try reversing the cable. If that does not work, try using a USB 2.0 Type C-C cable or a USB 2.0 Type C-A cable with an adapter. - -### Why does my controller stop responding on Playstation 4 or Playstation 5? - -Regarding PS4 disconnection issues, verify that you have the [PS4 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings) with uploaded key files or USB Host with a valid passthrough authentication device. - -Regarding PS5 disconnection issues. verify that you have the [PS5 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps5-settings) with USB Host using a valid passthrough authentication device. - -For more information, refer to the [PS4/PS5 Compatibility FAQ](../faq/faq-console-compatibility.mdx). - -### Why can't I access the Web Configurator? - -#### Controller is not booting into Web Configurator Mode - -If the Web Configurator page is timing out, verify that the controller is booting into Web Configurator Mode. - -:::info How to get into Webconfig Mode - -- Holding while plugging in -- Holding for 5 seconds. - -::: - -Test that you are holding correct buttons, using a using the website like [Gamepad Tester](https://gamepad-tester.com/), or in another application such as the Steam Input Overlay. to verify that you are pressing the correct button. - -#### Another device on your network has the IPV4 address of 192.168.7.1 - -If another device (e.g. router, managed switch/hub, IoT device, etc.) is on the network and has the same IP address, the web configurator will not be able to access the Web Configurator due to IP conflicts. - -Disconnect your computer from your local network (e.g. unplug the ethernet cable) and then attempt to access the Web Configurator again. - -## Configuration Issues - -### Why does PS4 or PS5 Input Mode not work on my device? - -#### Did not press A1 after connecting the controller. - -After connecting a controller that is correctly configured for PS4 or PS5 Input Mode, you need to press in order to have the PS4 or PS5 register the controller. Once you have done so, the console should now properly receive inputs from the controller. - -#### The controller mode is incorrectly configured. - -Ensure that, under the `Settings` section, you have uploaded key files for PS4 or selected Host USB for PS4 and PS5. - -For more information, refer to the [PS4 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings) or [PS5 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps5-settings) documentation. - -#### USB Host Port not configured correctly - -Verify that your USB host port is correctly configured in the Web Configurator under [Peripheral Mapping](/docs/web-configurator/menu-pages/03-peripheral-mapping.mdx#usb-host). The specific pins for Data+ and Data- may differ between devices and device manufacturers so check with the documentation provided by the vendor. - -#### Incompatible Controller/Dongle is being used - -Only compatible devices will allow the use of a GP2040-CE controller with PS Passthrough to work on PS4 and not all devices will work with PS5. - -For more information, refer to the [PS4/PS5 Compatibility FAQ](../faq/faq-console-compatibility.mdx). - -### I cannot get to WebConfig using the shortcuts. How do I get to the Web Configurator? - -**_Without flash nuking your device_**, flash this [firmware file](/assets/force_webconfig.uf2) using the [firmware installation](../installation.mdx) instructions. This will force your device to reboot into Web Configurator mode. - -### Why are my RGB LEDs the wrong color? - -Verify that the `LED Format` is correctly set as different LEDs may have a different order to the Red, Green, and Blue data being sent. - -For more information, refer to the [RGB LED Button Order](../web-configurator/menu-pages/05-led-configuration.mdx#rgb-led-button-order) section of the Web Configurator menu. - -### Why are my RGB LEDs out of order? - -The order of RGB LEDs can be set in the Web Configurator and the correct configuration is determined by the hardware, how the user wires up the LED chain or the device designer set the LED chain on the board. - -For more information, refer to the [RGB LED Button Order](../web-configurator/menu-pages/05-led-configuration.mdx#rgb-led-button-order) section of the Web Configurator menu. - -### When I updated my device, why did my controller stop working? - -If you updated your device and suddenly your inputs aren't correct and your OLED Display or RGB LED stopped working, it's likely that the incorrect compiled firmware was flashed onto your device or your device is not supported and thus the precompiled builds on the [Downloads](/downloads) page may not work for your device. - -#### Incorrect Firmware for a Supported Device - -If your device is supported and the incorrect firmware was flashed, follow the [firmware installation](../installation.mdx) instructions and reflash the correct firmware, verifying that the name of the firmware file matches your device. - -#### Unsupported Devices - -If your device is not supported, please speak with the vendor you purchased the device from for the proper firmware file to flash onto your device using the [firmware installation](../installation.mdx) instructions. - -If your vendor is incapable of supporting their device, you will need to perform some investigative work to properly set up your device. - -1. Flash the compiled **Pico** GP2040 firmware from the downloads page using the [firmware installation](../installation.mdx) instructions. -2. Repeat those steps **_without flash nuking your device_**, flashing this [firmware file](/assets/force_webconfig.uf2). This will force your device to boot into Web Configurator mode on boot. -3. Go to Configuration>Pin Mapping -4. For each gamepad input, use the “Press Button to Map” feature to map the input to a GPIO Pin connected to that button. Repeat for all inputs -5. For any additional features (e.g. RGB LED, OLED display, USB Host Port, etc.), you will need to determine what GPIO pin is associated. This can be done by tracing physical copper paths on the PCB to the button/component. - -No further assistance can be supplied as this last step is entirely determined by the manufacturer and how they designed the PCB, which is unsupported. +--- +title: Troubleshooting +# tags: +# - +pagination_next: null +pagination_prev: null +description: "FAQ related to user-side troubleshooting of common issues" +--- + +import InputLabelSelector, { + Hotkey, +} from "@site/src/components/LabelSelector.tsx"; +import HotkeyNote from "../snippets/_hotkey-note.mdx"; + +Select the button labels to be displayed in the usage guide: + + + +## Input Issues + +### Why are my buttons out of order? + +There are many different reasons why this could be the case. + +#### Incorrect Mapping in Steam + +Verify that your controller settings in Steam are correctly set, both global settings and the per-game settings. See [Steam Support](https://partner.steamgames.com/doc/features/steam_controller/getting_started_for_players) for more information on how to resolve this issue. + +#### Incorrect Input Mode + +Verify that you are using the correct input mode as different modes may swap the mapping of inputs (e.g. Switch vs XInput, PS3/PS4, etc). See [GP2040-CE Usage](../usage.mdx#input-modes) for more information on how to change input modes. + +#### Incorrect Button Wiring + +Verify that your buttons are correctly connected to the controller board according to the GPIO pin mapping provided by the vendor of your controller board. + +#### Incorrect Firmware + +Firmware is built to assume a specific GPIO pin out and there may be a mismatch between what the firmware expects and what you expect the controls to be. You can either update the GPIO pin mappings in the [Web Configurator](../web-configurator/menu-pages/02-pin-mapping.mdx) or install the correct firmware onto this device. + +See [Incorrect Firmware](#incorrect-firmware-for-a-supported-device) below for more information on how to resolve this issue. + +### Why does my button not register when I press it? + +Check your wiring. The button should have two terminals where one side goes to the GPIO pin and the other to ground. Test whether wiring is working properly by touching the wires together and verifying that an input is received. + +There might also be an issue with your button. Try using different buttons. + +### Why do I keep getting an input even though the button is not being pressed? + +Check your wiring. There may be an unintended short where the signal wire is in contact with ground (GND) or a wire connected to GND. + +There might also be an issue with your button. Try using different buttons. + +### Up/Down or Left/Right have been swapped. How do I fix this? + +You've likely activated [Invert Y-Axis](../hotkeys.mdx#invert-y-axis) or [Invert X-Axis](../hotkeys.mdx#invert-x-axis) hotkey on your controller. Activate the hotkey again to disable the feature. + + + +### My SOCD cleaning changed. How do I get it back to X cleaning mode? + +You've likely activated one of the following SOCD cleaning mode hotkeys on your controller. Activate the hotkey again to disable the feature. + +- [SOCD Up Priority](../hotkeys.mdx#socd-up-priority) +- [SOCD Neutral](../hotkeys.mdx#socd-neutral) +- [SOCD Last Win](../hotkeys.mdx#socd-last-win) +- [SOCD First Wins](../hotkeys.mdx#socd-first-wins) +- [SOCD Cleaning Off](../hotkeys.mdx#socd-cleaning-off) + + + +### Why is my DPad stuck outputting directions on the Left/Right Analog Joystick? + +You've likely activated [DPad Left Analog](../hotkeys.mdx#dpad-left-analog) or [DPad Right Analog](../hotkeys.mdx#dpad-right-analog) hotkey on your controller. Activate the hotkey again to disable the feature. + + + +## Connection Issues + +### Why is the controller connected to the PC/Console not being recognized? + +There are a number of reasons this could be happening. Check for the following issues. + +#### Keyboard Mode + +Check that the input mode of the device is not in keyboard mode. This will cause your computer to only recognize your controller as a keyboard and not as a gamepad. + +#### Web Configurator + +When booting into the Web Configurator, the controller initializes as a RNDIS device and will not be recognized by the PC/Console as a controller. Check that the controller is not booting into the Web Configurator and is not being activated while booting. + +### Why does my controller not connect to the PC/console when using a USB Type C-C? + +Depending on how your device hardware is designed, it may not be set up to use a reversible USB Type C. Try reversing the cable. If that does not work, try using a USB 2.0 Type C-C cable or a USB 2.0 Type C-A cable with an adapter. + +### Why does my controller stop responding on Playstation 4 or Playstation 5? + +Regarding PS4 disconnection issues, verify that you have the [PS4 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings) with uploaded key files or USB Host with a valid passthrough authentication device. + +Regarding PS5 disconnection issues. verify that you have the [PS5 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps5-settings) with USB Host using a valid passthrough authentication device. + +For more information, refer to the [PS4/PS5 Compatibility FAQ](../faq/faq-console-compatibility.mdx). + +### Why can't I access the Web Configurator? + +#### Controller is not booting into Web Configurator Mode + +If the Web Configurator page is timing out, verify that the controller is booting into Web Configurator Mode. + +:::info How to get into Webconfig Mode + +- Holding while plugging in +- Holding for 5 seconds. + +::: + +Test that you are holding correct buttons, using a using the website like [Gamepad Tester](https://gamepad-tester.com/), or in another application such as the Steam Input Overlay. to verify that you are pressing the correct button. + +#### Another device on your network has the IPV4 address of 192.168.7.1 + +If another device (e.g. router, managed switch/hub, IoT device, etc.) is on the network and has the same IP address, the web configurator will not be able to access the Web Configurator due to IP conflicts. + +Disconnect your computer from your local network (e.g. unplug the ethernet cable) and then attempt to access the Web Configurator again. + +## Configuration Issues + +### Why does PS4 or PS5 Input Mode not work on my device? + +#### Did not press A1 after connecting the controller. + +After connecting a controller that is correctly configured for PS4 or PS5 Input Mode, you need to press in order to have the PS4 or PS5 register the controller. Once you have done so, the console should now properly receive inputs from the controller. + +#### The controller mode is incorrectly configured. + +Ensure that, under the `Settings` section, you have uploaded key files for PS4 or selected Host USB for PS4 and PS5. + +For more information, refer to the [PS4 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings) or [PS5 Input Mode](../web-configurator/menu-pages/01-settings.mdx#additional-ps5-settings) documentation. + +#### USB Host Port not configured correctly + +Verify that your USB host port is correctly configured in the Web Configurator under [Peripheral Mapping](/docs/web-configurator/menu-pages/03-peripheral-mapping.mdx#usb-host). The specific pins for Data+ and Data- may differ between devices and device manufacturers so check with the documentation provided by the vendor. + +#### Incompatible Controller/Dongle is being used + +Only compatible devices will allow the use of a GP2040-CE controller with PS Passthrough to work on PS4 and not all devices will work with PS5. + +For more information, refer to the [PS4/PS5 Compatibility FAQ](../faq/faq-console-compatibility.mdx). + +### I cannot get to WebConfig using the shortcuts. How do I get to the Web Configurator? + +**_Without flash nuking your device_**, flash this [firmware file](/assets/force_webconfig.uf2) using the [firmware installation](../installation.mdx) instructions. This will force your device to reboot into Web Configurator mode. + +### Why are my RGB LEDs the wrong color? + +Verify that the `LED Format` is correctly set as different LEDs may have a different order to the Red, Green, and Blue data being sent. + +For more information, refer to the [RGB LED Button Order](../web-configurator/menu-pages/05-led-configuration.mdx#rgb-led-button-order) section of the Web Configurator menu. + +### Why are my RGB LEDs out of order? + +The order of RGB LEDs can be set in the Web Configurator and the correct configuration is determined by the hardware, how the user wires up the LED chain or the device designer set the LED chain on the board. + +For more information, refer to the [RGB LED Button Order](../web-configurator/menu-pages/05-led-configuration.mdx#rgb-led-button-order) section of the Web Configurator menu. + +### When I updated my device, why did my controller stop working? + +If you updated your device and suddenly your inputs aren't correct and your OLED Display or RGB LED stopped working, it's likely that the incorrect compiled firmware was flashed onto your device or your device is not supported and thus the precompiled builds on the [Downloads](/downloads) page may not work for your device. + +#### Incorrect Firmware for a Supported Device + +If your device is supported and the incorrect firmware was flashed, follow the [firmware installation](../installation.mdx) instructions and reflash the correct firmware, verifying that the name of the firmware file matches your device. + +#### Unsupported Devices + +If your device is not supported, please speak with the vendor you purchased the device from for the proper firmware file to flash onto your device using the [firmware installation](../installation.mdx) instructions. + +If your vendor is incapable of supporting their device, you will need to perform some investigative work to properly set up your device. + +1. Flash the compiled **Pico** GP2040 firmware from the downloads page using the [firmware installation](../installation.mdx) instructions. +2. Repeat those steps **_without flash nuking your device_**, flashing this [firmware file](/assets/force_webconfig.uf2). This will force your device to boot into Web Configurator mode on boot. +3. Go to Configuration>Pin Mapping +4. For each gamepad input, use the “Press Button to Map” feature to map the input to a GPIO Pin connected to that button. Repeat for all inputs +5. For any additional features (e.g. RGB LED, OLED display, USB Host Port, etc.), you will need to determine what GPIO pin is associated. This can be done by tracing physical copper paths on the PCB to the button/component. + +No further assistance can be supplied as this last step is entirely determined by the manufacturer and how they designed the PCB, which is unsupported. diff --git a/docs/getting-help-support.mdx b/docs/getting-help-support.mdx index ce71ae9..4d5648e 100644 --- a/docs/getting-help-support.mdx +++ b/docs/getting-help-support.mdx @@ -1,27 +1,27 @@ ---- -title: Getting Help/Support -# tags: -# - -pagination_next: null -pagination_prev: null -description: "How to get help on issues with GP2040-CE" ---- - -# Getting Help/Support - -## Discord - -If you need help with something, the best place to get quick support is our [Discord Server](https://discord.gg/k2pxhke7q8). Once you've read the [pinned post](https://discord.com/channels/1049366310389289001/1132450634243772519), create a post in the [support channel](https://discord.com/channels/1049366310389289001/1132447732662018089) with the following information. - -1. What is the name of the device are you using? -2. Where did you buy it? Provide a link to sales page. -3. What version of the firmware are you currently running? Check this via the Web Configurator (e.g. 0.4.3, 0.5.0, 0.7.4, etc.) -4. Which distribution of the firmware are you currently running? Provide the exact file name (e.g. GP2040-CE_X.X.X_Pico.uf2). -5. What is the problem that you are having? -6. What troubleshooting steps have you already done? - -If this is a custom device, a hardware issue or you believe the firmware issue may be caused by hardware include any images . - -## Github Issues - -You can open an [issue on Github](https://github.com/OpenStickCommunity/GP2040-CE/issues/new/choose). +--- +title: Getting Help/Support +# tags: +# - +pagination_next: null +pagination_prev: null +description: "How to get help on issues with GP2040-CE" +--- + +# Getting Help/Support + +## Discord + +If you need help with something, the best place to get quick support is our [Discord Server](https://discord.gg/k2pxhke7q8). Once you've read the [pinned post](https://discord.com/channels/1049366310389289001/1132450634243772519), create a post in the [support channel](https://discord.com/channels/1049366310389289001/1132447732662018089) with the following information. + +1. What is the name of the device are you using? +2. Where did you buy it? Provide a link to sales page. +3. What version of the firmware are you currently running? Check this via the Web Configurator (e.g. 0.4.3, 0.5.0, 0.7.4, etc.) +4. Which distribution of the firmware are you currently running? Provide the exact file name (e.g. GP2040-CE_X.X.X_Pico.uf2). +5. What is the problem that you are having? +6. What troubleshooting steps have you already done? + +If this is a custom device, a hardware issue or you believe the firmware issue may be caused by hardware include any images . + +## Github Issues + +You can open an [issue on Github](https://github.com/OpenStickCommunity/GP2040-CE/issues/new/choose). diff --git a/docs/hotkeys.mdx b/docs/hotkeys.mdx index 0e4bac2..2fd5a6d 100644 --- a/docs/hotkeys.mdx +++ b/docs/hotkeys.mdx @@ -1,226 +1,226 @@ ---- -title: Hotkeys -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Hotkey descriptions available for use with GP2040-CE" ---- - -import InputLabelSelector, { - Hotkey, -} from "@site/src/components/LabelSelector.tsx"; - -# Hotkeys - -Select the button labels to be displayed in the usage guide: - - -
- -:::note - -All of the following hotkey bindings can be changed or assigned to different button combinations in [Hotkeys Settings](./web-configurator/menu-pages/01-settings.mdx#hotkey-settings) section of the Web Configurator. - -::: - -## No Action - -This hotkey does nothing. Use this hotkey to disable a specific hotkey combination. - -## DPad Digital - -This hotkey changes the DPad mode such the directions to be read as digital inputs on the DPad. - -**Default**: - -## DPad Left Analog - -This hotkey changes the DPad mode to such the directions to be read as inputs on the Left analog joystick. The directional input is always the minimum, maximum, or zero value on that axis. - -**Default**: - -## DPad Right Analog - -This hotkey changes the DPad mode to such the directions to be read as inputs on the Right analog joystick. The directional input is always the minimum, maximum, or zero value on that axis. - -**Default**: - -## Home Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -**Default**: - -## Capture Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## SOCD Up Priority - -This hotkey changes the SOCD cleaning method to resolve to a neutral input (no input) on the X-axis, but prioritize the `Up` input on the Y-axis when both directions are pressed simultaneously. - -**Default**: - -| 1st Input + 2nd Input | Result | -| :-------------------: | :-----: | -| Left + Right | Neutral | -| Right + Left | Neutral | -| Up + Down | Up | -| Down + Up | Up | - -## SOCD Neutral - -This hotkey changes the SOCD cleaning method to resolve to a neutral input (no input) on both the X-axis and Y-axis when both directions are pressed simultaneously. - -**Default**: - -| 1st Input + 2nd Input | Result | -| :-------------------: | :-----: | -| Left + Right | Neutral | -| Right + Left | Neutral | -| Up + Down | Neutral | -| Down + Up | Neutral | - -## SOCD Last Win - -This hotkey changes the SOCD cleaning method to prioritize the second directional input on both the X-axis and Y-axis when both directions are pressed simultaneously. - -**Default**: - -| 1st Input + 2nd Input | Result | -| :-------------------: | :----: | -| Left + Right | Right | -| Right + Left | Left | -| Up + Down | Down | -| Down + Up | Up | - -## SOCD First Wins - -This hotkey changes the SOCD cleaning method to prioritize the first directional input on both the X-axis and Y-axis when both directions are pressed simultaneously. - -| 1st Input + 2nd Input | Result | -| :-------------------: | :----: | -| Left + Right | Left | -| Right + Left | Right | -| Up + Down | Up | -| Down + Up | Down | - -## SOCD Cleaning Off - -This hotkey changes the SOCD cleaning method to not resolve any directional inputs on both the X-axis and Y-axis when both directions are pressed simultaneously. The controller will send both directional inputs. - -:::note - -This cleaning mode is only available in XInput mode as PS3/DirectInput, PS4 and Nintendo Switch modes do not support setting SOCD Cleaning to Off and will default to Neutral SOCD Cleaning mode. - -::: - -| 1st Input + 2nd Input | Result | -| :-------------------: | :------------: | -| Left + Right | Left and Right | -| Right + Left | Left and Right | -| Up + Down | Up and Down | -| Down + Up | Up and Down | - -## Invert X Axis - -This hotkey will invert the X-axis of your controller (i.e. pressing the Right button will result a Left input and vice versa). - -## Invert Y Axis - -This hotkey will invert the Y-axis of your controller (i.e. pressing the Up button will result in a Down input and vice versa). - -## Toggle 4-Way Joystick Mode - -This hotkey will prevent non-cardinal directions from registering. When a second cardinal direction input is received, the gamepad direction will change to the newest cardinal direction, similar to [SOCD Last Win](#socd-last-win). - -## Toggle DDI 4-Way Joystick Mode - -This hotkey will alter the behavior of the directional buttons mapped with the [Dual Direction Input](./add-ons/dual-direction-input.mdx) add-on to prevent non-cardinal directions from registering. When a second cardinal direction input is received, the gamepad direction will change to the newest cardinal direction, similar to [SOCD Last Win](#socd-last-win). - -## Load Profile #1-4 - -This hotkey will load various input to pin mapping profiles set in [Profile Settings](./web-configurator/menu-pages/02-pin-mapping.mdx#profiles) in the Web Configurator. - -:::caution Multiple Load Profile Hotkeys - -It is recommended that multiple `Load Profile` hotkeys be configured so as to prevent you from changing profiles without any way to change the profiles back. - -::: - -## L3 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## R3 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## Touchpad Button - -This hotkey emulates a press of the Touchpad button as not all controllers may have this button natively on the controller. - -:::note - -The Touchpad Button is distinct from the [A1 Button](#a1-button) hotkey as this hotkey will trigger the Touchpad button regardless of whether the toggle for `Switch Touchpad and Share` is on or off. - -::: - -## Restart GP2040-CE - -This hotkey will restart the controller without pressing the hardware reset button on the board (if present) or requiring the controller to be unplugged from the PC or game console. - -## B1 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## B2 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## B3 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## B4 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## L1 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## R1 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## L2 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## R2 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## S1 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## S2 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -## A1 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. - -:::note - -The A1 Button hotkey is distinct from the [Touchpad Button](#touchpad-button) hotkey as this hotkey will trigger either the Touchpad button or Share button depending on whether the toggle for [`Switch Touchpad and Share`](./web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings) is on or off. - -::: - -## A2 Button - -This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. +--- +title: Hotkeys +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Hotkey descriptions available for use with GP2040-CE" +--- + +import InputLabelSelector, { + Hotkey, +} from "@site/src/components/LabelSelector.tsx"; + +# Hotkeys + +Select the button labels to be displayed in the usage guide: + + +
+ +:::note + +All of the following hotkey bindings can be changed or assigned to different button combinations in [Hotkeys Settings](./web-configurator/menu-pages/01-settings.mdx#hotkey-settings) section of the Web Configurator. + +::: + +## No Action + +This hotkey does nothing. Use this hotkey to disable a specific hotkey combination. + +## DPad Digital + +This hotkey changes the DPad mode such the directions to be read as digital inputs on the DPad. + +**Default**: + +## DPad Left Analog + +This hotkey changes the DPad mode to such the directions to be read as inputs on the Left analog joystick. The directional input is always the minimum, maximum, or zero value on that axis. + +**Default**: + +## DPad Right Analog + +This hotkey changes the DPad mode to such the directions to be read as inputs on the Right analog joystick. The directional input is always the minimum, maximum, or zero value on that axis. + +**Default**: + +## Home Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +**Default**: + +## Capture Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## SOCD Up Priority + +This hotkey changes the SOCD cleaning method to resolve to a neutral input (no input) on the X-axis, but prioritize the `Up` input on the Y-axis when both directions are pressed simultaneously. + +**Default**: + +| 1st Input + 2nd Input | Result | +| :-------------------: | :-----: | +| Left + Right | Neutral | +| Right + Left | Neutral | +| Up + Down | Up | +| Down + Up | Up | + +## SOCD Neutral + +This hotkey changes the SOCD cleaning method to resolve to a neutral input (no input) on both the X-axis and Y-axis when both directions are pressed simultaneously. + +**Default**: + +| 1st Input + 2nd Input | Result | +| :-------------------: | :-----: | +| Left + Right | Neutral | +| Right + Left | Neutral | +| Up + Down | Neutral | +| Down + Up | Neutral | + +## SOCD Last Win + +This hotkey changes the SOCD cleaning method to prioritize the second directional input on both the X-axis and Y-axis when both directions are pressed simultaneously. + +**Default**: + +| 1st Input + 2nd Input | Result | +| :-------------------: | :----: | +| Left + Right | Right | +| Right + Left | Left | +| Up + Down | Down | +| Down + Up | Up | + +## SOCD First Wins + +This hotkey changes the SOCD cleaning method to prioritize the first directional input on both the X-axis and Y-axis when both directions are pressed simultaneously. + +| 1st Input + 2nd Input | Result | +| :-------------------: | :----: | +| Left + Right | Left | +| Right + Left | Right | +| Up + Down | Up | +| Down + Up | Down | + +## SOCD Cleaning Off + +This hotkey changes the SOCD cleaning method to not resolve any directional inputs on both the X-axis and Y-axis when both directions are pressed simultaneously. The controller will send both directional inputs. + +:::note + +This cleaning mode is only available in XInput mode as PS3/DirectInput, PS4 and Nintendo Switch modes do not support setting SOCD Cleaning to Off and will default to Neutral SOCD Cleaning mode. + +::: + +| 1st Input + 2nd Input | Result | +| :-------------------: | :------------: | +| Left + Right | Left and Right | +| Right + Left | Left and Right | +| Up + Down | Up and Down | +| Down + Up | Up and Down | + +## Invert X Axis + +This hotkey will invert the X-axis of your controller (i.e. pressing the Right button will result a Left input and vice versa). + +## Invert Y Axis + +This hotkey will invert the Y-axis of your controller (i.e. pressing the Up button will result in a Down input and vice versa). + +## Toggle 4-Way Joystick Mode + +This hotkey will prevent non-cardinal directions from registering. When a second cardinal direction input is received, the gamepad direction will change to the newest cardinal direction, similar to [SOCD Last Win](#socd-last-win). + +## Toggle DDI 4-Way Joystick Mode + +This hotkey will alter the behavior of the directional buttons mapped with the [Dual Direction Input](./add-ons/dual-direction-input.mdx) add-on to prevent non-cardinal directions from registering. When a second cardinal direction input is received, the gamepad direction will change to the newest cardinal direction, similar to [SOCD Last Win](#socd-last-win). + +## Load Profile #1-4 + +This hotkey will load various input to pin mapping profiles set in [Profile Settings](./web-configurator/menu-pages/02-pin-mapping.mdx#profiles) in the Web Configurator. + +:::caution Multiple Load Profile Hotkeys + +It is recommended that multiple `Load Profile` hotkeys be configured so as to prevent you from changing profiles without any way to change the profiles back. + +::: + +## L3 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## R3 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## Touchpad Button + +This hotkey emulates a press of the Touchpad button as not all controllers may have this button natively on the controller. + +:::note + +The Touchpad Button is distinct from the [A1 Button](#a1-button) hotkey as this hotkey will trigger the Touchpad button regardless of whether the toggle for `Switch Touchpad and Share` is on or off. + +::: + +## Restart GP2040-CE + +This hotkey will restart the controller without pressing the hardware reset button on the board (if present) or requiring the controller to be unplugged from the PC or game console. + +## B1 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## B2 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## B3 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## B4 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## L1 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## R1 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## L2 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## R2 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## S1 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## S2 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +## A1 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. + +:::note + +The A1 Button hotkey is distinct from the [Touchpad Button](#touchpad-button) hotkey as this hotkey will trigger either the Touchpad button or Share button depending on whether the toggle for [`Switch Touchpad and Share`](./web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings) is on or off. + +::: + +## A2 Button + +This hotkey emulates a press of the button as not all controllers may have this button natively on the controller. diff --git a/docs/installation.mdx b/docs/installation.mdx index 3ea7630..38bd497 100644 --- a/docs/installation.mdx +++ b/docs/installation.mdx @@ -1,84 +1,84 @@ ---- -title: Firmware Installation -# tags: -# - -pagination_next: null -pagination_prev: null -description: "How to install firmware onto devices" ---- - -import InputLabelSelector, { - Hotkey, -} from "@site/src/components/LabelSelector.tsx"; - -# Firmware Installation - -Select the button labels to be displayed in the usage guide: - - - -## General Process - -> If the device has been previously used for something other than GP2040-CE, you will need to follow the [Flash Nuke Process](#flash-nuke-process) below first to clear the memory entirely in preparation for installing GP2040-CE. - -1. Download the compiled firmware (.uf2 file) for your device -2. Unplug your device. -3. Put your device into Bootsel/USB mode. If successful, a new removable drive named `RPI-RP2` should appear in your file explorer. - -:::info How to get into Bootsel Mode - -- Holding the BootSel button while plugging in -- Holding while plugging in -- Holding for 5 seconds. - -::: - -4. Drag and drop the compiled firmware (.uf2 file) downloaded in step 1 into the removable drive -5. Wait for the device to automatically disconnect. - -Congratulations! The board is now running the GP2040-CE firmware and will appear as a controller on your computer. You can test it in a game, using the website like [Gamepad Tester](https://gamepad-tester.com/), or in another application such as the Steam Input Overlay. - -If you would like to customize your device, check out the built-in [Web Configurator](./web-configurator/web-configurator.mdx). - -### Example Process (Raspberry Pi Pico) - -**The instructions will slightly vary based on your device. These instructions are for a Raspberry Pi Pico.** - -1. Download the latest `GP2040-CE_X.X.X_Pico.uf2` file for the Raspberry Pi Pico from the [Download](/downloads) page. -2. Unplug your Pico. -3. Put your device into Bootsel/USB mode. If successful, a new removable drive named `RPI-RP2` should appear in your file explorer. - -:::info How to get into Bootsel Mode - -- Holding the BootSel button while plugging in -- Holding while plugging in -- Holding for 5 seconds. - -::: - -4. Drag and drop the `GP2040-CE_X.X.X_Pico.uf2` file into the removable drive. -5. Wait for the Pico to automatically disconnect. - -## Flash Nuke process - -:::caution - -_Warning_ - Flash nuking your board wipes all your custom configuration for pin mappings and add-ons. - -::: - -1. Download the [flash_nuke.uf2 file](/assets/flash_nuke.uf2) -2. Put your device into Bootsel/USB mode. If successful, a new removable drive named `RPI-RP2` should appear in your file explorer. - -:::info How to get into Bootsel Mode - -- Holding the BootSel button while plugging in -- Holding while plugging in -- Holding for 5 seconds. - -::: - -3. Drag [flash_nuke.uf2 file](/assets/flash_nuke.uf2) onto the drive -4. **_Wait for the drive to disconnect and reconnect without unplugging_** -5. Drag your firmware onto the RPI drive and wait for disconnect -6. Check that the controller connects using this [gamepad tester](https://hardwaretester.com/gamepad) and pressing a button. +--- +title: Firmware Installation +# tags: +# - +pagination_next: null +pagination_prev: null +description: "How to install firmware onto devices" +--- + +import InputLabelSelector, { + Hotkey, +} from "@site/src/components/LabelSelector.tsx"; + +# Firmware Installation + +Select the button labels to be displayed in the usage guide: + + + +## General Process + +> If the device has been previously used for something other than GP2040-CE, you will need to follow the [Flash Nuke Process](#flash-nuke-process) below first to clear the memory entirely in preparation for installing GP2040-CE. + +1. Download the compiled firmware (.uf2 file) for your device +2. Unplug your device. +3. Put your device into Bootsel/USB mode. If successful, a new removable drive named `RPI-RP2` should appear in your file explorer. + +:::info How to get into Bootsel Mode + +- Holding the BootSel button while plugging in +- Holding while plugging in +- Holding for 5 seconds. + +::: + +4. Drag and drop the compiled firmware (.uf2 file) downloaded in step 1 into the removable drive +5. Wait for the device to automatically disconnect. + +Congratulations! The board is now running the GP2040-CE firmware and will appear as a controller on your computer. You can test it in a game, using the website like [Gamepad Tester](https://gamepad-tester.com/), or in another application such as the Steam Input Overlay. + +If you would like to customize your device, check out the built-in [Web Configurator](./web-configurator/web-configurator.mdx). + +### Example Process (Raspberry Pi Pico) + +**The instructions will slightly vary based on your device. These instructions are for a Raspberry Pi Pico.** + +1. Download the latest `GP2040-CE_X.X.X_Pico.uf2` file for the Raspberry Pi Pico from the [Download](/downloads) page. +2. Unplug your Pico. +3. Put your device into Bootsel/USB mode. If successful, a new removable drive named `RPI-RP2` should appear in your file explorer. + +:::info How to get into Bootsel Mode + +- Holding the BootSel button while plugging in +- Holding while plugging in +- Holding for 5 seconds. + +::: + +4. Drag and drop the `GP2040-CE_X.X.X_Pico.uf2` file into the removable drive. +5. Wait for the Pico to automatically disconnect. + +## Flash Nuke process + +:::caution + +_Warning_ - Flash nuking your board wipes all your custom configuration for pin mappings and add-ons. + +::: + +1. Download the [flash_nuke.uf2 file](/assets/flash_nuke.uf2) +2. Put your device into Bootsel/USB mode. If successful, a new removable drive named `RPI-RP2` should appear in your file explorer. + +:::info How to get into Bootsel Mode + +- Holding the BootSel button while plugging in +- Holding while plugging in +- Holding for 5 seconds. + +::: + +3. Drag [flash_nuke.uf2 file](/assets/flash_nuke.uf2) onto the drive +4. **_Wait for the drive to disconnect and reconnect without unplugging_** +5. Drag your firmware onto the RPI drive and wait for disconnect +6. Check that the controller connects using this [gamepad tester](https://hardwaretester.com/gamepad) and pressing a button. diff --git a/docs/introduction.mdx b/docs/introduction.mdx index a40e716..8e05822 100644 --- a/docs/introduction.mdx +++ b/docs/introduction.mdx @@ -1,41 +1,41 @@ ---- -id: introduction -title: Introduction -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Introduction to GP2040-CE" ---- - -# Introduction - -Your controller has a board in it that processes your inputs and translates that to commands that your computer or game console understands. GP2040-CE is firmware that facilitates this process, providing compatibility with a number of consoles and input modes. In addition to this, there are many other useful features through the Web Configurator and the system of community developed add-ons. - -Not sure if your board can run GP2040-CE? As long as it has a RP2040 microprocessor, it's likely that it can. If your current controller board does not, there are a large number of hobbyist boards from the community that do support GP2040-CE. - -## Overview - -This section of the documentation is primarily geared towards end users who are looking to use their controllers without diving into the minutiae of configuring and customizing their device. Given a controller, how to get to using it as soon as possible. It consists of the following sections. - -- [Firmware Installation](./installation.mdx "GP2040-CE | Firmware Installation"): In the event that you need to install firmware (e.g. setting up a new board, updating to a new version, or as part of troubleshooting) -- [Usage](./usage.mdx "GP2040-CE | Usage"): Descriptions of the various features and functions available for use with GP2040-CE -- [Hotkeys](./hotkeys.mdx "GP2040-CE | Hotkeys"): A list of the various hotkey shortcuts available for use with GP2040-CE. - -:::note - -The actual buttons for the shortcut may differ as they are customizable and can be set by your device's vendor or seller. - -::: - -- [Web Configurator](./web-configurator/web-configurator.mdx): The built-in web-based configuration application to changes various settings related to firmware operations and features. -- [RGB LED](./rgb-leds.mdx): A list of the various hotkey shortcuts to control RGB LED animations, color patterns, and behaviors. -- [Getting Help/Support](./getting-help-support.mdx "GP2040-CE | Getting Help"): How to get help in the event of issues or malfunction - -## Additional Resources - -If you feel ready to start customizing your controller's functions, have a look at the [`Web Configurator`](./web-configurator/web-configurator.mdx) section of documentation. - -If you want to build your own device, check out the `Controller Building` section in the sidebar. - -If you want to go even deeper into the firmware to compile your own configuration of the firmware or even contributing to the code, have a look at the [`Contribute`](/development/contribution-guide) section of the documentation. +--- +id: introduction +title: Introduction +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Introduction to GP2040-CE" +--- + +# Introduction + +Your controller has a board in it that processes your inputs and translates that to commands that your computer or game console understands. GP2040-CE is firmware that facilitates this process, providing compatibility with a number of consoles and input modes. In addition to this, there are many other useful features through the Web Configurator and the system of community developed add-ons. + +Not sure if your board can run GP2040-CE? As long as it has a RP2040 microprocessor, it's likely that it can. If your current controller board does not, there are a large number of hobbyist boards from the community that do support GP2040-CE. + +## Overview + +This section of the documentation is primarily geared towards end users who are looking to use their controllers without diving into the minutiae of configuring and customizing their device. Given a controller, how to get to using it as soon as possible. It consists of the following sections. + +- [Firmware Installation](./installation.mdx "GP2040-CE | Firmware Installation"): In the event that you need to install firmware (e.g. setting up a new board, updating to a new version, or as part of troubleshooting) +- [Usage](./usage.mdx "GP2040-CE | Usage"): Descriptions of the various features and functions available for use with GP2040-CE +- [Hotkeys](./hotkeys.mdx "GP2040-CE | Hotkeys"): A list of the various hotkey shortcuts available for use with GP2040-CE. + +:::note + +The actual buttons for the shortcut may differ as they are customizable and can be set by your device's vendor or seller. + +::: + +- [Web Configurator](./web-configurator/web-configurator.mdx): The built-in web-based configuration application to changes various settings related to firmware operations and features. +- [RGB LED](./rgb-leds.mdx): A list of the various hotkey shortcuts to control RGB LED animations, color patterns, and behaviors. +- [Getting Help/Support](./getting-help-support.mdx "GP2040-CE | Getting Help"): How to get help in the event of issues or malfunction + +## Additional Resources + +If you feel ready to start customizing your controller's functions, have a look at the [`Web Configurator`](./web-configurator/web-configurator.mdx) section of documentation. + +If you want to build your own device, check out the `Controller Building` section in the sidebar. + +If you want to go even deeper into the firmware to compile your own configuration of the firmware or even contributing to the code, have a look at the [`Contribute`](/development/contribution-guide) section of the documentation. diff --git a/docs/rgb-leds.mdx b/docs/rgb-leds.mdx index 1f748d4..cdcda9d 100644 --- a/docs/rgb-leds.mdx +++ b/docs/rgb-leds.mdx @@ -1,146 +1,146 @@ ---- -title: RGB LEDs -# tags: -# - -pagination_next: null -pagination_prev: null -description: "How to use addressable RGB LEDs to your controller. Hotkeys and animation themes." ---- - -import InputLabelSelector, { - Hotkey, -} from "@site/src/components/LabelSelector.tsx"; -import { ColorBlock } from "@site/src/components/LEDColors"; - -# RGB LEDs - -Select the button labels to be displayed in the usage guide: - - - -## Hardware Requirements - -GP2040-CE requires that addressable RGB LEDs be used for nearly all LED functions. - -The exception to this are [Player LEDs](./add-ons/player-number.mdx), which can use pulse width modulation (PWM) to vary -the brightness of the LEDs. - -## RGB LED Hotkeys - -| Hotkey | Description | -| -------------------------------------- | -------------------------- | -| | Next Animation | -| | Previous Animation | -| | Brightness Up | -| | Brightness Down | -| | LED Parameter Up | -| | LED Parameter Down | -| | Pressed Parameter Up | -| | Pressed Parameter Down | -| | Decrease LED Fade Duration | -| | Increase LED Fade Duration | - -:::note - -The `LED Parameter` hotkeys may affect color, speed or theme depending on the current RGB LED animation. - -The `Pressed Parameter` options will change the colors/effects for the on-press animations. - -::: - -### RGB LED Animations - -Using these hotkeys will cycle through the animation modes. The following animations are available: - -| Name | Description | -| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | -| Rainbow Chase | A fading, rainbow cycling lines travels across the LED chain | -| Static Theme | Set the LEDs to a pre-defined static theme | -| Custom Theme | Set the LEDs to a custom theme set up in [WebConfig - Custom LED Theme](./web-configurator/menu-pages/06-custom-led-theme.mdx) | -| Static Color | Sets all LEDs to the same color | -| Rainbow Cycle | All LEDs cycle through the color wheel displaying the same color | - -### RGB LED Brightness - -These hotkeys will increase or decrease the brightness of the controller LEDs based on the `Brightness Steps` and -`Max Brightness` settings in [LED Configuration](/docs/web-configurator/menu-pages/05-led-configuration.mdx#rgb-led-configuration). - -### RGB LED Parameter - -Depending on the specific animation, changing the LED parameter will result in different behavior. - -| Name | LED Parameter | -| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Rainbow Chase | Adjust animation speed | -| Static Theme | Cycle through themes, see [RGB LED Static Themes](#rgb-led-static-themes) for details. | -| Static Color | Cycle through colors: Black, White, Red, Orange, Yellow, Lime Green, Green, Seafoam, Aqua, Sky Blue, Blue, Purple, Pink, Magenta | -| Rainbow Cycle | Adjust animation speed | - -:::note Custom LED Theme - -When using a custom LED theme, these hotkeys will not affect the settings in any other animation mode. - -::: - -### RGB LED Pressed Parameter - -Changes the color the LED changes to when the button is pressed - -Cycle through colors: Black, White, Red, -Orange, Yellow, Lime Green, -Green, Seafoam, Aqua, -Sky Blue, Blue, Purple, -Pink, Magenta - -:::note Custom LED Theme - -When using a custom LED theme, these hotkeys will not affect the settings in any other animation mode. - -::: - -### RGB LED Fade Duration - -Using these hotkeys will affect the duration for the fade animation on the LED after a button press. - -:::note - -This duration is shared across all themes and buttons and cannot be set individually per theme nor per button. - -::: - -| Parameter | Description | -| ---------------- | ----------- | -| Default Duration | 500ms | -| Duration Range | 0ms - 500ms | -| Hotkey Increment | 500ms | - -:::tip - -If you want to disable the Fade animation, set the duration to 0ms. - -::: - -## RGB LED Static Themes - -| Name | Preview | -| ------------------------ | ------------------------------------------------------------------------------- | -| **Static Rainbow** | ![Static Rainbow](./assets/images/led-themes/static-rainbow.png) | -| **Xbox** | ![Xbox](./assets/images/led-themes/xbox.png) | -| **Xbox (All)** | ![Xbox (All)](./assets/images/led-themes/xbox-all.png) | -| **Super Famicom** | ![Super Famicom](./assets/images/led-themes/super-famicom.png) | -| **Super Famicom (All)** | ![Super Famicom (All)](./assets/images/led-themes/super-famicom-all.png) | -| **PlayStation** | ![Xbox](./assets/images/led-themes/playstation.png) | -| **PlayStation (All)** | ![Xbox (All)](./assets/images/led-themes/playstation-all.png) | -| **Neo Geo Straight** | ![Neo Geo Classic](./assets/images/led-themes/neogeo-straight.png) | -| **Neo Geo Curved** | ![Neo Geo Curved](./assets/images/led-themes/neogeo-curved.png) | -| **Neo Geo Modern** | ![Neo Geo Modern](./assets/images/led-themes/neogeo-modern.png) | -| **Six Button Fighter** | ![Six Button Fighter](./assets/images/led-themes/six-button-fighter.png) | -| **Six Button Fighter +** | ![Six Button Fighter +](./assets/images/led-themes/six-button-fighter-plus.png) | -| **Street Fighter 2** | ![Street Fighter 2](./assets/images/led-themes/street-fighter-2.png) | -| **Tekken** | ![Tekken](./assets/images/led-themes/tekken.png) | -| **Guilty Gear Type-A** | ![Guilty Gear Type-A](./assets/images/led-themes/guilty-gear-type-a.png) | -| **Guilty Gear Type-B** | ![Guilty Gear Type-B](./assets/images/led-themes/guilty-gear-type-b.png) | -| **Guilty Gear Type-C** | ![Guilty Gear Type-C](./assets/images/led-themes/guilty-gear-type-c.png) | -| **Guilty Gear Type-D** | ![Guilty Gear Type-D](./assets/images/led-themes/guilty-gear-type-d.png) | -| **Guilty Gear Type-E** | ![Guilty Gear Type-E](./assets/images/led-themes/guilty-gear-type-e.png) | -| **Fightboard** | ![Fightboard](./assets/images/led-themes/fightboard.png) | +--- +title: RGB LEDs +# tags: +# - +pagination_next: null +pagination_prev: null +description: "How to use addressable RGB LEDs to your controller. Hotkeys and animation themes." +--- + +import InputLabelSelector, { + Hotkey, +} from "@site/src/components/LabelSelector.tsx"; +import { ColorBlock } from "@site/src/components/LEDColors"; + +# RGB LEDs + +Select the button labels to be displayed in the usage guide: + + + +## Hardware Requirements + +GP2040-CE requires that addressable RGB LEDs be used for nearly all LED functions. + +The exception to this are [Player LEDs](./add-ons/player-number.mdx), which can use pulse width modulation (PWM) to vary +the brightness of the LEDs. + +## RGB LED Hotkeys + +| Hotkey | Description | +| -------------------------------------- | -------------------------- | +| | Next Animation | +| | Previous Animation | +| | Brightness Up | +| | Brightness Down | +| | LED Parameter Up | +| | LED Parameter Down | +| | Pressed Parameter Up | +| | Pressed Parameter Down | +| | Decrease LED Fade Duration | +| | Increase LED Fade Duration | + +:::note + +The `LED Parameter` hotkeys may affect color, speed or theme depending on the current RGB LED animation. + +The `Pressed Parameter` options will change the colors/effects for the on-press animations. + +::: + +### RGB LED Animations + +Using these hotkeys will cycle through the animation modes. The following animations are available: + +| Name | Description | +| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| Rainbow Chase | A fading, rainbow cycling lines travels across the LED chain | +| Static Theme | Set the LEDs to a pre-defined static theme | +| Custom Theme | Set the LEDs to a custom theme set up in [WebConfig - Custom LED Theme](./web-configurator/menu-pages/06-custom-led-theme.mdx) | +| Static Color | Sets all LEDs to the same color | +| Rainbow Cycle | All LEDs cycle through the color wheel displaying the same color | + +### RGB LED Brightness + +These hotkeys will increase or decrease the brightness of the controller LEDs based on the `Brightness Steps` and +`Max Brightness` settings in [LED Configuration](/docs/web-configurator/menu-pages/05-led-configuration.mdx#rgb-led-configuration). + +### RGB LED Parameter + +Depending on the specific animation, changing the LED parameter will result in different behavior. + +| Name | LED Parameter | +| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Rainbow Chase | Adjust animation speed | +| Static Theme | Cycle through themes, see [RGB LED Static Themes](#rgb-led-static-themes) for details. | +| Static Color | Cycle through colors: Black, White, Red, Orange, Yellow, Lime Green, Green, Seafoam, Aqua, Sky Blue, Blue, Purple, Pink, Magenta | +| Rainbow Cycle | Adjust animation speed | + +:::note Custom LED Theme + +When using a custom LED theme, these hotkeys will not affect the settings in any other animation mode. + +::: + +### RGB LED Pressed Parameter + +Changes the color the LED changes to when the button is pressed + +Cycle through colors: Black, White, Red, +Orange, Yellow, Lime Green, +Green, Seafoam, Aqua, +Sky Blue, Blue, Purple, +Pink, Magenta + +:::note Custom LED Theme + +When using a custom LED theme, these hotkeys will not affect the settings in any other animation mode. + +::: + +### RGB LED Fade Duration + +Using these hotkeys will affect the duration for the fade animation on the LED after a button press. + +:::note + +This duration is shared across all themes and buttons and cannot be set individually per theme nor per button. + +::: + +| Parameter | Description | +| ---------------- | ----------- | +| Default Duration | 500ms | +| Duration Range | 0ms - 500ms | +| Hotkey Increment | 500ms | + +:::tip + +If you want to disable the Fade animation, set the duration to 0ms. + +::: + +## RGB LED Static Themes + +| Name | Preview | +| ------------------------ | ------------------------------------------------------------------------------- | +| **Static Rainbow** | ![Static Rainbow](./assets/images/led-themes/static-rainbow.png) | +| **Xbox** | ![Xbox](./assets/images/led-themes/xbox.png) | +| **Xbox (All)** | ![Xbox (All)](./assets/images/led-themes/xbox-all.png) | +| **Super Famicom** | ![Super Famicom](./assets/images/led-themes/super-famicom.png) | +| **Super Famicom (All)** | ![Super Famicom (All)](./assets/images/led-themes/super-famicom-all.png) | +| **PlayStation** | ![Xbox](./assets/images/led-themes/playstation.png) | +| **PlayStation (All)** | ![Xbox (All)](./assets/images/led-themes/playstation-all.png) | +| **Neo Geo Straight** | ![Neo Geo Classic](./assets/images/led-themes/neogeo-straight.png) | +| **Neo Geo Curved** | ![Neo Geo Curved](./assets/images/led-themes/neogeo-curved.png) | +| **Neo Geo Modern** | ![Neo Geo Modern](./assets/images/led-themes/neogeo-modern.png) | +| **Six Button Fighter** | ![Six Button Fighter](./assets/images/led-themes/six-button-fighter.png) | +| **Six Button Fighter +** | ![Six Button Fighter +](./assets/images/led-themes/six-button-fighter-plus.png) | +| **Street Fighter 2** | ![Street Fighter 2](./assets/images/led-themes/street-fighter-2.png) | +| **Tekken** | ![Tekken](./assets/images/led-themes/tekken.png) | +| **Guilty Gear Type-A** | ![Guilty Gear Type-A](./assets/images/led-themes/guilty-gear-type-a.png) | +| **Guilty Gear Type-B** | ![Guilty Gear Type-B](./assets/images/led-themes/guilty-gear-type-b.png) | +| **Guilty Gear Type-C** | ![Guilty Gear Type-C](./assets/images/led-themes/guilty-gear-type-c.png) | +| **Guilty Gear Type-D** | ![Guilty Gear Type-D](./assets/images/led-themes/guilty-gear-type-d.png) | +| **Guilty Gear Type-E** | ![Guilty Gear Type-E](./assets/images/led-themes/guilty-gear-type-e.png) | +| **Fightboard** | ![Fightboard](./assets/images/led-themes/fightboard.png) | diff --git a/docs/snippets/_add-usb-host-port.mdx b/docs/snippets/_add-usb-host-port.mdx index 4a3a74c..ae80f4e 100644 --- a/docs/snippets/_add-usb-host-port.mdx +++ b/docs/snippets/_add-usb-host-port.mdx @@ -1,84 +1,84 @@ -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -### Example Wiring - -:::note - -While this example wiring guide uses a Raspberry Pi Pico, the general principle applies to **ALL** RP2040 based boards. - -::: - -![USB Host Wiring Diagram](../assets/images/gpc-add-ons-example-wiring-diagram-usb-host-port.png) - -- `VCC` - Connects to 5V power (Example: VBUS on the Raspberry Pi Pico) -- `D+` - Connects to the `D+` GPIO Pin above, set in the Web Configurator. (Example: GPIO0 on the Raspberry Pi Pico) -- `D-` - Connects to the `D-` GPIO Pin above, automatically set based on D+. (Example: GPIO1 on the Raspberry Pi Pico) -- `GND` - Connects to a ground pin, any `GND` pin will work. (Example: GND on the Raspberry Pi Pico) - -
- -:::note - -For `D+` and `D-`, any set of GPIO pins can be used from the RP2040. However, there is a requirement that `D-` GPIO must immediately precede or follow `D+` (i.e. `D+` = GPIO Pin X -> `D-` must be X+1 or X-1). - -::: - -
- - -### Example Wiring - -Step 1: Take the USB passthrough board and place it on a clean surface. - ---- - -Step 2: Take one of the cables and place it on a clean surface. - -:::note - -The cables are JST 2.00mm 2pin same direction cables that are 10cm (100mm) in length. They can be made by hand or purchased directly from a variety of sellers on AliExpress. If you plan on installing the USB passthrough board somewhere else in your case you may want to get longer cables. For this install guide you will need three of the cables. - -::: - ---- - -Step 3: Connect one end of the first JST 2.00mm 2pin cable into the socket labeled 5V IN on the USB passthrough board. - -:::note - -The direction of the cable does not matter as they are all same direction cables. - -::: - ---- - -Step 4: Connect the other end of the first JST 2.00mm 2pin cable to the socket labeled 5v OUT on the RP2040 Advanced Breakout Board. - ---- - -Step 5: Connect one end of the second JST 2.00mm 2pin cable into the socket labeled D+ OUT on the USB passthrough board. - ---- - -Step 6: Connect the other end of the second JST 2.00mm 2pin cable to the socket labeled OPTION 5 on the RP2040 Advanced Breakout Board. - -:::note - -You can use other option sockets for this as well, but for the sake of this installation guide we will be using Option 5 and Option 6. - -::: - ---- - -Step 7: Connect one end of the third JST 2.00mm 2pin cable into the socket labeled D- OUT on the USB passthrough board. - ---- - -Step 8: Connect the other end of the third JST 2.00mm 2pin cable to the socket labeled OPTION 6 on the RP2040 Advanced Breakout Board. - - -
+import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + + + + +### Example Wiring + +:::note + +While this example wiring guide uses a Raspberry Pi Pico, the general principle applies to **ALL** RP2040 based boards. + +::: + +![USB Host Wiring Diagram](../assets/images/gpc-add-ons-example-wiring-diagram-usb-host-port.png) + +- `VCC` - Connects to 5V power (Example: VBUS on the Raspberry Pi Pico) +- `D+` - Connects to the `D+` GPIO Pin above, set in the Web Configurator. (Example: GPIO0 on the Raspberry Pi Pico) +- `D-` - Connects to the `D-` GPIO Pin above, automatically set based on D+. (Example: GPIO1 on the Raspberry Pi Pico) +- `GND` - Connects to a ground pin, any `GND` pin will work. (Example: GND on the Raspberry Pi Pico) + +
+ +:::note + +For `D+` and `D-`, any set of GPIO pins can be used from the RP2040. However, there is a requirement that `D-` GPIO must immediately precede or follow `D+` (i.e. `D+` = GPIO Pin X -> `D-` must be X+1 or X-1). + +::: + +
+ + +### Example Wiring + +Step 1: Take the USB passthrough board and place it on a clean surface. + +--- + +Step 2: Take one of the cables and place it on a clean surface. + +:::note + +The cables are JST 2.00mm 2pin same direction cables that are 10cm (100mm) in length. They can be made by hand or purchased directly from a variety of sellers on AliExpress. If you plan on installing the USB passthrough board somewhere else in your case you may want to get longer cables. For this install guide you will need three of the cables. + +::: + +--- + +Step 3: Connect one end of the first JST 2.00mm 2pin cable into the socket labeled 5V IN on the USB passthrough board. + +:::note + +The direction of the cable does not matter as they are all same direction cables. + +::: + +--- + +Step 4: Connect the other end of the first JST 2.00mm 2pin cable to the socket labeled 5v OUT on the RP2040 Advanced Breakout Board. + +--- + +Step 5: Connect one end of the second JST 2.00mm 2pin cable into the socket labeled D+ OUT on the USB passthrough board. + +--- + +Step 6: Connect the other end of the second JST 2.00mm 2pin cable to the socket labeled OPTION 5 on the RP2040 Advanced Breakout Board. + +:::note + +You can use other option sockets for this as well, but for the sake of this installation guide we will be using Option 5 and Option 6. + +::: + +--- + +Step 7: Connect one end of the third JST 2.00mm 2pin cable into the socket labeled D- OUT on the USB passthrough board. + +--- + +Step 8: Connect the other end of the third JST 2.00mm 2pin cable to the socket labeled OPTION 6 on the RP2040 Advanced Breakout Board. + + +
diff --git a/docs/snippets/_hotkey-note.mdx b/docs/snippets/_hotkey-note.mdx index 5959538..8ec79c6 100644 --- a/docs/snippets/_hotkey-note.mdx +++ b/docs/snippets/_hotkey-note.mdx @@ -1,5 +1,5 @@ -:::note Configurable Hotkeys - -If the hotkey combination is not present in or differs from the documentation, please refer to the Web Configurator on your device to verify which input combinations are assigned to each hotkey. - -::: +:::note Configurable Hotkeys + +If the hotkey combination is not present in or differs from the documentation, please refer to the Web Configurator on your device to verify which input combinations are assigned to each hotkey. + +::: diff --git a/docs/snippets/_i2c-block-table.mdx b/docs/snippets/_i2c-block-table.mdx index 80074eb..9ad93b2 100644 --- a/docs/snippets/_i2c-block-table.mdx +++ b/docs/snippets/_i2c-block-table.mdx @@ -1,10 +1,10 @@ -| SDA | SCL | I2C Block | SDA | SCL | I2C Block | -| :--: | :--: | :-------- | :--: | :--: | :-------- | -| GP00 | GP01 | **I2C0** | GP02 | GP03 | **I2C1** | -| GP04 | GP05 | **I2C0** | GP06 | GP07 | **I2C1** | -| GP08 | GP09 | **I2C0** | GP10 | GP11 | **I2C1** | -| GP12 | GP13 | **I2C0** | GP14 | GP15 | **I2C1** | -| GP16 | GP17 | **I2C0** | GP18 | GP19 | **I2C1** | -| GP20 | GP21 | **I2C0** | GP22 | GP23 | **I2C1** | -| GP24 | GP25 | **I2C0** | GP26 | GP27 | **I2C1** | -| GP28 | GP29 | **I2C0** | ---- | ---- | ---- | +| SDA | SCL | I2C Block | SDA | SCL | I2C Block | +| :--: | :--: | :-------- | :--: | :--: | :-------- | +| GP00 | GP01 | **I2C0** | GP02 | GP03 | **I2C1** | +| GP04 | GP05 | **I2C0** | GP06 | GP07 | **I2C1** | +| GP08 | GP09 | **I2C0** | GP10 | GP11 | **I2C1** | +| GP12 | GP13 | **I2C0** | GP14 | GP15 | **I2C1** | +| GP16 | GP17 | **I2C0** | GP18 | GP19 | **I2C1** | +| GP20 | GP21 | **I2C0** | GP22 | GP23 | **I2C1** | +| GP24 | GP25 | **I2C0** | GP26 | GP27 | **I2C1** | +| GP28 | GP29 | **I2C0** | ---- | ---- | ---- | diff --git a/docs/snippets/_input-table.mdx b/docs/snippets/_input-table.mdx index 61a9184..2d69a66 100644 --- a/docs/snippets/_input-table.mdx +++ b/docs/snippets/_input-table.mdx @@ -1,16 +1,16 @@ -| GP2040-CE | XInput
Xbox One | Switch | PS4 | PS3 | DirectInput | Arcade | -| --------- | --------------------- | ------- | -------- | -------- | ----------- | ------ | -| B1 | A | B | Cross | Cross | 2 | K1 | -| B2 | B | A | Circle | Circle | 3 | K2 | -| B3 | X | Y | Square | Square | 1 | P1 | -| B4 | Y | X | Triangle | Triangle | 4 | P2 | -| L1 | LB | L | L1 | L1 | 5 | P4 | -| R1 | RB | R | R1 | R1 | 6 | P3 | -| L2 | LT | ZL | L2 | L2 | 7 | K4 | -| R2 | RT | ZR | R2 | R2 | 8 | K3 | -| S1 | Back | Minus | Share | Select | 9 | Coin | -| S2 | Start | Plus | Options | Start | 10 | Start | -| L3 | LS | LS | L3 | L3 | 11 | LS | -| R3 | RS | RS | R3 | R3 | 12 | RS | -| A1 | Guide | Home | PS | PS | 13 | Home | -| A2 | - | Capture | Touchpad | - | 14 | - | +| GP2040-CE | XInput
Xbox One | Switch | PS4 | PS3 | DirectInput | Arcade | +| --------- | --------------------- | ------- | -------- | -------- | ----------- | ------ | +| B1 | A | B | Cross | Cross | 2 | K1 | +| B2 | B | A | Circle | Circle | 3 | K2 | +| B3 | X | Y | Square | Square | 1 | P1 | +| B4 | Y | X | Triangle | Triangle | 4 | P2 | +| L1 | LB | L | L1 | L1 | 5 | P4 | +| R1 | RB | R | R1 | R1 | 6 | P3 | +| L2 | LT | ZL | L2 | L2 | 7 | K4 | +| R2 | RT | ZR | R2 | R2 | 8 | K3 | +| S1 | Back | Minus | Share | Select | 9 | Coin | +| S2 | Start | Plus | Options | Start | 10 | Start | +| L3 | LS | LS | L3 | L3 | 11 | LS | +| R3 | RS | RS | R3 | R3 | 12 | RS | +| A1 | Guide | Home | PS | PS | 13 | Home | +| A2 | - | Capture | Touchpad | - | 14 | - | diff --git a/docs/snippets/_pin-options-USB-Host.mdx b/docs/snippets/_pin-options-USB-Host.mdx index 84be66b..f98df5b 100644 --- a/docs/snippets/_pin-options-USB-Host.mdx +++ b/docs/snippets/_pin-options-USB-Host.mdx @@ -1,9 +1,9 @@ -- `D+` - The GPIO Pin used to carry Data Plus between the USB Host Port and RP2040 -- `D-` - The GPIO Pin used to carry Data Minus between the USB Host Port and RP2040. This cannot be set and will be automatically determined from `D+`. -- `5V Power (optional)` - The GPIO Pin used to enable 5V power to the host port on the board. - -:::note 5V Power - -This is only applicable to a small number of boards (e.g. Adafruit RP2040 Feather USB Host) and most boards do not require this to be set. - -::: +- `D+` - The GPIO Pin used to carry Data Plus between the USB Host Port and RP2040 +- `D-` - The GPIO Pin used to carry Data Minus between the USB Host Port and RP2040. This cannot be set and will be automatically determined from `D+`. +- `5V Power (optional)` - The GPIO Pin used to enable 5V power to the host port on the board. + +:::note 5V Power + +This is only applicable to a small number of boards (e.g. Adafruit RP2040 Feather USB Host) and most boards do not require this to be set. + +::: diff --git a/docs/usage.mdx b/docs/usage.mdx index 0bd6722..8c0d951 100644 --- a/docs/usage.mdx +++ b/docs/usage.mdx @@ -1,143 +1,143 @@ ---- -title: GP2040-CE Usage -# tags: -# - -pagination_next: null -pagination_prev: null -description: "General How-To on using GP2040-CE" ---- - -import InputLabelSelector, { - Hotkey, -} from "@site/src/components/LabelSelector.tsx"; -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; -import InputTable from "./snippets/_input-table.mdx"; -import InputTableMiniClassic from "./snippets/_input-table-mini-classic.mdx"; - -# GP2040-CE Usage - -Select the button labels to be displayed in the usage guide: - - -
- -:::caution - -The v0.5+ release has some breaking changes to boards other than the Raspberry Pi Pico. If you are using such a board, do not update from an older version unless you have a backup .uf2 from a known good version, or you know what you're doing. - -::: - -## Buttons - -GP2040-CE uses generic button labeling for gamepad state, which is then converted to the appropriate input type before sending. This table provides a map of GP2040-CE buttons to the supported input types and layouts: - - - - - - - - - - - - - - - - - -If your controller is missing dedicated buttons for any specific inputs, check the [Hotkeys page](./hotkeys.mdx) on how to map a button combination that will emulate those missing inputs. - -:::note - -Unlike other controllers, Keyboard gets different keys for directional buttons. You can change the key mappings for Keyboard mode in [Webconfig mode > Configuration > Keyboard Mapping](./web-configurator/menu-pages/01-settings.mdx#keyboard-mapping) - -::: - -| Direction | Keyboard | -| --------- | ----------- | -| Up | Up Arrow | -| Down | Down Arrow | -| Left | Left Arrow | -| Right | Right Arrow | - -## Bootsel Mode - -Bootsel Mode is the state of the board where firmware can be flashed onto the board. You will need to use this whenever there is an update or as part of the troubleshooting process. - -You can boot into Bootsel Mode by either holding buttons while plugging in the controller, by booting into the Web Configurator and then restarting in Bootsel Mode, or by holding together for five seconds while the controller is plugged in. There is no way to leave Bootsel mode once activated other than by flashing new firmware or by unplugging the device. - -Generally, there is a Bootsel button somewhere on the board. This is often an exposed button on the PCB or a button inside the controller that requires either a pin to press or disassembly of the controller. - -:::note - -There are a number of controllers that elect not to include the Bootsel button. In these instances, you will need to locate the placement of the button and use conductor to connect the 2 sides of the contacts or pads together while plugging in or booting the controller. - -::: - -## WebConfig Mode - -WebConfig Mode is the state of the board where built-in web browser-based configuration application is launched. From here, you can customize and configure your controller as needed. For more information, click [here](./web-configurator/web-configurator.mdx) for more information. - -You can boot into WebConfig Mode by holding the button while plugging in the controller or by holding for five seconds while the controller is plugged in. Holding this same combination again for five seconds while in webconfig mode will swap the device back to the previously used controller mode. - -## Input Modes - -GP2040-CE is compatible with a number of systems and input modes. The specific input modes assigned to 8 buttons when held is configurable in the Web Configurator under [Settings](./web-configurator/menu-pages/01-settings.mdx#boot-input-modes). - -However, there are default input modes assigned in precompiled firmware. To change input modes, **hold one of the following buttons as the controller is plugged in:** - -| Primary Input Mode | Button Held | -| :----------------- | :------------------------: | -| Nintendo Switch | | -| XInput | | -| PS3/DirectInput | | -| PS5 | | -| Xbox One | | -| Keyboard | | -| Original XBox | `Unassigned` | - -| Mini/Classic Consoles | Button Held | -| :--------------------------- | :----------: | -| Sega Genesis/MegaDrive Mini | `Unassigned` | -| NEOGEO mini | `Unassigned` | -| PC Engine/Turbografx 16 Mini | `Unassigned` | -| EGRET II Mini | `Unassigned` | -| ASTROCITY Mini | `Unassigned` | -| Playstation Classic | `Unassigned` | - -:::note - -Input mode is saved across power cycles. - -::: - -## Hotkeys - -A number of useful hotkeys exist that change the functionality of GP2040 without needing to access the Web Configurator. All of the hotkeys and hotkey bindings can be changed or assigned to different button combinations in [Hotkeys Settings](./web-configurator/menu-pages/01-settings.mdx#hotkey-settings) section of the Web Configurator. - -Commonly used hotkeys include changing the directions to emulate a digital DPad, Left analog joystick, Right analog joystick or to change [Simultaneous Opposite Cardinal Direction (SOCD)](https://glossary.infil.net/?t=SOCD) cleaning modes. Different SOCD cleaning modes will ensure the controller obeys certain directional input rules when sending inputs to the computer or game console. - -A number of hotkeys are enabled by default and if you are encountering issues with unexpected behavior on your controller, verify that you did not accidentally trigger a hotkey. - -| Hotkeys Enabled By Default | Inputs | -| :------------------------------------------------- | :-------------------------------------- | -| [Home Button](hotkeys.mdx#home-button) | | -| [Dpad Digital](hotkeys.mdx#dpad-digital) | | -| [Dpad Left Analog](hotkeys.mdx#dpad-left-analog) | | -| [Dpad Right Analog](hotkeys.mdx#dpad-right-analog) | | -| [SOCD Up Priority](hotkeys.mdx#socd-up-priority) | | -| [SOCD Neutral](hotkeys.mdx#socd-neutral) | | -| [SOCD Last Wins](hotkeys.mdx#socd-last-win) | | - -:::note - -Selected D-Pad mode and SOCD cleaning mode are saved across power cycles. - -::: - -## Add-Ons and Additional Features - -There are a number of add-ons that expand the functionality of GP2040-CE, such as [analog joystick emulation](./add-ons/analog.mdx) and [turbo functions](./add-ons/turbo.mdx). Due to the large number of add-ons created by the community, they are located in a separate documentation page. Navigate to Add-Ons page for more information on the individual add-ons. +--- +title: GP2040-CE Usage +# tags: +# - +pagination_next: null +pagination_prev: null +description: "General How-To on using GP2040-CE" +--- + +import InputLabelSelector, { + Hotkey, +} from "@site/src/components/LabelSelector.tsx"; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; +import InputTable from "./snippets/_input-table.mdx"; +import InputTableMiniClassic from "./snippets/_input-table-mini-classic.mdx"; + +# GP2040-CE Usage + +Select the button labels to be displayed in the usage guide: + + +
+ +:::caution + +The v0.5+ release has some breaking changes to boards other than the Raspberry Pi Pico. If you are using such a board, do not update from an older version unless you have a backup .uf2 from a known good version, or you know what you're doing. + +::: + +## Buttons + +GP2040-CE uses generic button labeling for gamepad state, which is then converted to the appropriate input type before sending. This table provides a map of GP2040-CE buttons to the supported input types and layouts: + + + + + + + + + + + + + + + + + +If your controller is missing dedicated buttons for any specific inputs, check the [Hotkeys page](./hotkeys.mdx) on how to map a button combination that will emulate those missing inputs. + +:::note + +Unlike other controllers, Keyboard gets different keys for directional buttons. You can change the key mappings for Keyboard mode in [Webconfig mode > Configuration > Keyboard Mapping](./web-configurator/menu-pages/01-settings.mdx#keyboard-mapping) + +::: + +| Direction | Keyboard | +| --------- | ----------- | +| Up | Up Arrow | +| Down | Down Arrow | +| Left | Left Arrow | +| Right | Right Arrow | + +## Bootsel Mode + +Bootsel Mode is the state of the board where firmware can be flashed onto the board. You will need to use this whenever there is an update or as part of the troubleshooting process. + +You can boot into Bootsel Mode by either holding buttons while plugging in the controller, by booting into the Web Configurator and then restarting in Bootsel Mode, or by holding together for five seconds while the controller is plugged in. There is no way to leave Bootsel mode once activated other than by flashing new firmware or by unplugging the device. + +Generally, there is a Bootsel button somewhere on the board. This is often an exposed button on the PCB or a button inside the controller that requires either a pin to press or disassembly of the controller. + +:::note + +There are a number of controllers that elect not to include the Bootsel button. In these instances, you will need to locate the placement of the button and use conductor to connect the 2 sides of the contacts or pads together while plugging in or booting the controller. + +::: + +## WebConfig Mode + +WebConfig Mode is the state of the board where built-in web browser-based configuration application is launched. From here, you can customize and configure your controller as needed. For more information, click [here](./web-configurator/web-configurator.mdx) for more information. + +You can boot into WebConfig Mode by holding the button while plugging in the controller or by holding for five seconds while the controller is plugged in. Holding this same combination again for five seconds while in webconfig mode will swap the device back to the previously used controller mode. + +## Input Modes + +GP2040-CE is compatible with a number of systems and input modes. The specific input modes assigned to 8 buttons when held is configurable in the Web Configurator under [Settings](./web-configurator/menu-pages/01-settings.mdx#boot-input-modes). + +However, there are default input modes assigned in precompiled firmware. To change input modes, **hold one of the following buttons as the controller is plugged in:** + +| Primary Input Mode | Button Held | +| :----------------- | :------------------------: | +| Nintendo Switch | | +| XInput | | +| PS3/DirectInput | | +| PS5 | | +| Xbox One | | +| Keyboard | | +| Original XBox | `Unassigned` | + +| Mini/Classic Consoles | Button Held | +| :--------------------------- | :----------: | +| Sega Genesis/MegaDrive Mini | `Unassigned` | +| NEOGEO mini | `Unassigned` | +| PC Engine/Turbografx 16 Mini | `Unassigned` | +| EGRET II Mini | `Unassigned` | +| ASTROCITY Mini | `Unassigned` | +| Playstation Classic | `Unassigned` | + +:::note + +Input mode is saved across power cycles. + +::: + +## Hotkeys + +A number of useful hotkeys exist that change the functionality of GP2040 without needing to access the Web Configurator. All of the hotkeys and hotkey bindings can be changed or assigned to different button combinations in [Hotkeys Settings](./web-configurator/menu-pages/01-settings.mdx#hotkey-settings) section of the Web Configurator. + +Commonly used hotkeys include changing the directions to emulate a digital DPad, Left analog joystick, Right analog joystick or to change [Simultaneous Opposite Cardinal Direction (SOCD)](https://glossary.infil.net/?t=SOCD) cleaning modes. Different SOCD cleaning modes will ensure the controller obeys certain directional input rules when sending inputs to the computer or game console. + +A number of hotkeys are enabled by default and if you are encountering issues with unexpected behavior on your controller, verify that you did not accidentally trigger a hotkey. + +| Hotkeys Enabled By Default | Inputs | +| :------------------------------------------------- | :-------------------------------------- | +| [Home Button](hotkeys.mdx#home-button) | | +| [Dpad Digital](hotkeys.mdx#dpad-digital) | | +| [Dpad Left Analog](hotkeys.mdx#dpad-left-analog) | | +| [Dpad Right Analog](hotkeys.mdx#dpad-right-analog) | | +| [SOCD Up Priority](hotkeys.mdx#socd-up-priority) | | +| [SOCD Neutral](hotkeys.mdx#socd-neutral) | | +| [SOCD Last Wins](hotkeys.mdx#socd-last-win) | | + +:::note + +Selected D-Pad mode and SOCD cleaning mode are saved across power cycles. + +::: + +## Add-Ons and Additional Features + +There are a number of add-ons that expand the functionality of GP2040-CE, such as [analog joystick emulation](./add-ons/analog.mdx) and [turbo functions](./add-ons/turbo.mdx). Due to the large number of add-ons created by the community, they are located in a separate documentation page. Navigate to Add-Ons page for more information on the individual add-ons. diff --git a/docs/web-configurator/community-splash-screens.mdx b/docs/web-configurator/community-splash-screens.mdx index 1299a90..b1bac58 100644 --- a/docs/web-configurator/community-splash-screens.mdx +++ b/docs/web-configurator/community-splash-screens.mdx @@ -1,160 +1,160 @@ ---- -title: Community Splash Screens -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Community created splash screens for use with an OLED screen" ---- - -export const Image = ({ name, path }) => { - return ( -
- {name} -
{name}
-
- ); -}; - -# Community Splash Screens - -Here is a collection of community created splash screens that can be used with an optional OLED screen. Upload the image using the web configurator to set it up. - -All images been formatted to 128x64 in black / white color. - -## GP2040-CE - -
- - - - - - - -
- -## Vendors - -
- - - -
- -## Video Games - -
- - - - - - - - -
+--- +title: Community Splash Screens +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Community created splash screens for use with an OLED screen" +--- + +export const Image = ({ name, path }) => { + return ( +
+ {name} +
{name}
+
+ ); +}; + +# Community Splash Screens + +Here is a collection of community created splash screens that can be used with an optional OLED screen. Upload the image using the web configurator to set it up. + +All images been formatted to 128x64 in black / white color. + +## GP2040-CE + +
+ + + + + + + +
+ +## Vendors + +
+ + + +
+ +## Video Games + +
+ + + + + + + + +
diff --git a/docs/web-configurator/menu-pages/00-home.mdx b/docs/web-configurator/menu-pages/00-home.mdx index b95d9e5..4389ff6 100644 --- a/docs/web-configurator/menu-pages/00-home.mdx +++ b/docs/web-configurator/menu-pages/00-home.mdx @@ -1,14 +1,14 @@ ---- -title: Home -# tags: -# - -# pagination_next: null -pagination_prev: null -description: "Home page for the GP2040-CE Web Configurator" ---- - -# Web Configurator - Home - -![GP2040-CE Configurator - Home](../../assets/images/gpc-home.png) - -Here you can see the current version of your firmware and the latest version available on GitHub in the releases section. If a firmware update is available, a link to that release will appear. +--- +title: Home +# tags: +# - +# pagination_next: null +pagination_prev: null +description: "Home page for the GP2040-CE Web Configurator" +--- + +# Web Configurator - Home + +![GP2040-CE Configurator - Home](../../assets/images/gpc-home.png) + +Here you can see the current version of your firmware and the latest version available on GitHub in the releases section. If a firmware update is available, a link to that release will appear. diff --git a/docs/web-configurator/menu-pages/01-settings.mdx b/docs/web-configurator/menu-pages/01-settings.mdx index 63e98fe..8c8d819 100644 --- a/docs/web-configurator/menu-pages/01-settings.mdx +++ b/docs/web-configurator/menu-pages/01-settings.mdx @@ -1,115 +1,115 @@ ---- -title: Settings -# tags: -# - -# pagination_next: null -# pagination_prev: null -description: "Select the input mode, DPad Mode, SOCD Cleaning Mode, etc. and configure Hotkey Shortcuts" ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# Settings - -## Input Mode Settings - -![GP2040-CE Configurator - Input Mode Settings](../../assets/images/gpc-settings-input-mode.png) - -- `Current Input Mode` - Choose the main input mode (XINPUT, DINPUT, Switch, PS4, HID-Keyboard, etc.) this connected device will boot into when powered on. This selection will persist through unplug and plugging back in the controller. - -### Keyboard Mapping - -Here you can remap the GP2040-CE buttons to different keyboard keycodes that will be sent to the PC or game console when pressed in Keyboard Mode. - -![GP2040-CE Configurator - Keyboard Mapping](../../assets/images/gpc-settings-keyboard-mapping.png) - -### Additional PS4 Settings - -![GP2040-CE Configurator - Additional PS4 Settings](../../assets/images/gpc-settings-ps4.png) - -- `Switch Touchpad and Share` - Share will now be mapped to A2 rather than S1, Touchpad will be now mapped to S1 rather than A2 -- `Authentication Settings` - - `Uploaded Key File` - Upload key files obtained from a Dualshock 4 to authenticate and bypass the PS4's 8-minute time out - - `Host USB` - Use a dongle, converter, or licensed PS4 controller to authenticate your GP2040-CE device - - - - - -![GP2040-CE Configurator - Additional PS4 Settings](../../assets/images/gpc-settings-ps4-upload-key-files.png) - -- `Uploaded Key File` - - `Private Key (PEM)` - Choose your PEM file. - - `Serial Number (16 Bytes in Hex Ascii)` - Choose your serial number file. - - `Signature (256 Bytes in Binary)` - Choose your signature file. - -:::danger Warning - -The GP2040-CE project will not provide any files or information related to acquiring these keys and files under any circumstances. - -Do not ask via any of communication channels (e.g. social media, direct messages, Github Issues, GP2040-CE Discord) as this will result in a permanent blacklist/ban. - -::: - - - - - -![GP2040-CE Configurator - Additional PS4 Settings](../../assets/images/gpc-settings-ps4-host-usb.png) - -In order to use this setting, a USB Peripheral must be configured in [Web Configurator > Peripheral Mapping > USB Host](./03-peripheral-mapping.mdx#usb-host) - - - - -### Additional PS5 Settings - -![GP2040-CE Configurator - Additional PS5 Settings](../../assets/images/gpc-settings-ps5.png) - -- `Switch Touchpad and Share` - Share will now be mapped to A2 rather than S1, Touchpad will be now mapped to S1 rather than A2 -- `Authentication Settings` - - `Host USB` - Use a dongle, converter, or licensed PS4 controller to authenticate your GP2040-CE device - - - - -![GP2040-CE Configurator - Additional PS5 Settings](../../assets/images/gpc-settings-ps5-host-usb.png) - -In order to use this setting, a USB Peripheral must be configured in [Web Configurator > Peripheral Mapping > USB Host](./03-peripheral-mapping.mdx#usb-host) - - - - -### Additional Xbox One Settings - -![GP2040-CE Configurator - Additional PS5 Settings](../../assets/images/gpc-settings-xbox-one.png) - -In order to use this setting, a USB Peripheral must be configured in [Web Configurator > Peripheral Mapping > USB Host](./03-peripheral-mapping.mdx#usb-host) - -## Gamepad Settings - -![GP2040-CE Configurator - Gamepad Settings](../../assets/images/gpc-settings-gamepad.png) - -- `D-Pad Mode` - Choose the default D-Pad mode (D-Pad, Left Stick or Right Stick). -- `SOCD Cleaning Mode` - Choose the default SOCD Cleaning Mode (Neutral, Last Win, First Win, OFF). Please note that PS4, PS3 and Nintendo Switch modes do not support setting SOCD to off and will default to Neutral SOCD. -- `Forced Setup Mode` - Allows you to lock out Input Mode, the ability to enter Web-Config or both. Enabling a web-config lockout will require you to nuke and reload the firmware if you wish to make further changes. -- `4-Way Joystick Mode` - Enables 4-Way Joystick mode which will prevent non-cardinal directions from registering. When a second cardinal direction input is received, the gamepad direction will change to the newest cardinal direction, similar to [SOCD Last Win](../../hotkeys.mdx#socd-last-win). -- `Profile Number` - Enables different GPIO pin mappings per profile. Changeable through the Web-Config or [hotkeys](../../hotkeys.mdx#load-profile-1-4). -- `Debounce Delay in milliseconds` - Timeframe where the firmware will ignore additional inputs to prevent switch noise from accidentally triggering unintended inputs. - -## Boot Input Modes - -![GP2040-CE Configurator - Boot Input Modes](../../assets/images/gpc-settings-boot-input-modes.png) - -For each of the buttons listed in the menu, you can assign a different input mode to enter while holding that button during boot (e.g. when plugging in the controller or immediately after resetting the controller). - -For the list of input modes to select from, see [Input Modes](../../usage.mdx#input-modes). - -## Hotkey Settings - -![GP2040-CE Configurator - Boot Input Modes](../../assets/images/gpc-settings-hotkey.png) - -An arbitrary number of buttons and directions, plus the optional Function (Fn) button, can be used to define desired hotkey actions. Select `Fn` if desired, plus one or more buttons/directions, and associate them with a hotkey action. The default hotkeys can be modified or removed, and new ones added, up to 12 in total. - -The available hotkey actions will expand over time. We may also expand the number of hotkeys available to configure in the future. For a list of the available hotkey actions, see [Hotkeys](../../hotkeys.mdx). +--- +title: Settings +# tags: +# - +# pagination_next: null +# pagination_prev: null +description: "Select the input mode, DPad Mode, SOCD Cleaning Mode, etc. and configure Hotkey Shortcuts" +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# Settings + +## Input Mode Settings + +![GP2040-CE Configurator - Input Mode Settings](../../assets/images/gpc-settings-input-mode.png) + +- `Current Input Mode` - Choose the main input mode (XINPUT, DINPUT, Switch, PS4, HID-Keyboard, etc.) this connected device will boot into when powered on. This selection will persist through unplug and plugging back in the controller. + +### Keyboard Mapping + +Here you can remap the GP2040-CE buttons to different keyboard keycodes that will be sent to the PC or game console when pressed in Keyboard Mode. + +![GP2040-CE Configurator - Keyboard Mapping](../../assets/images/gpc-settings-keyboard-mapping.png) + +### Additional PS4 Settings + +![GP2040-CE Configurator - Additional PS4 Settings](../../assets/images/gpc-settings-ps4.png) + +- `Switch Touchpad and Share` - Share will now be mapped to A2 rather than S1, Touchpad will be now mapped to S1 rather than A2 +- `Authentication Settings` + - `Uploaded Key File` - Upload key files obtained from a Dualshock 4 to authenticate and bypass the PS4's 8-minute time out + - `Host USB` - Use a dongle, converter, or licensed PS4 controller to authenticate your GP2040-CE device + + + + + +![GP2040-CE Configurator - Additional PS4 Settings](../../assets/images/gpc-settings-ps4-upload-key-files.png) + +- `Uploaded Key File` + - `Private Key (PEM)` - Choose your PEM file. + - `Serial Number (16 Bytes in Hex Ascii)` - Choose your serial number file. + - `Signature (256 Bytes in Binary)` - Choose your signature file. + +:::danger Warning + +The GP2040-CE project will not provide any files or information related to acquiring these keys and files under any circumstances. + +Do not ask via any of communication channels (e.g. social media, direct messages, Github Issues, GP2040-CE Discord) as this will result in a permanent blacklist/ban. + +::: + + + + + +![GP2040-CE Configurator - Additional PS4 Settings](../../assets/images/gpc-settings-ps4-host-usb.png) + +In order to use this setting, a USB Peripheral must be configured in [Web Configurator > Peripheral Mapping > USB Host](./03-peripheral-mapping.mdx#usb-host) + + + + +### Additional PS5 Settings + +![GP2040-CE Configurator - Additional PS5 Settings](../../assets/images/gpc-settings-ps5.png) + +- `Switch Touchpad and Share` - Share will now be mapped to A2 rather than S1, Touchpad will be now mapped to S1 rather than A2 +- `Authentication Settings` + - `Host USB` - Use a dongle, converter, or licensed PS4 controller to authenticate your GP2040-CE device + + + + +![GP2040-CE Configurator - Additional PS5 Settings](../../assets/images/gpc-settings-ps5-host-usb.png) + +In order to use this setting, a USB Peripheral must be configured in [Web Configurator > Peripheral Mapping > USB Host](./03-peripheral-mapping.mdx#usb-host) + + + + +### Additional Xbox One Settings + +![GP2040-CE Configurator - Additional PS5 Settings](../../assets/images/gpc-settings-xbox-one.png) + +In order to use this setting, a USB Peripheral must be configured in [Web Configurator > Peripheral Mapping > USB Host](./03-peripheral-mapping.mdx#usb-host) + +## Gamepad Settings + +![GP2040-CE Configurator - Gamepad Settings](../../assets/images/gpc-settings-gamepad.png) + +- `D-Pad Mode` - Choose the default D-Pad mode (D-Pad, Left Stick or Right Stick). +- `SOCD Cleaning Mode` - Choose the default SOCD Cleaning Mode (Neutral, Last Win, First Win, OFF). Please note that PS4, PS3 and Nintendo Switch modes do not support setting SOCD to off and will default to Neutral SOCD. +- `Forced Setup Mode` - Allows you to lock out Input Mode, the ability to enter Web-Config or both. Enabling a web-config lockout will require you to nuke and reload the firmware if you wish to make further changes. +- `4-Way Joystick Mode` - Enables 4-Way Joystick mode which will prevent non-cardinal directions from registering. When a second cardinal direction input is received, the gamepad direction will change to the newest cardinal direction, similar to [SOCD Last Win](../../hotkeys.mdx#socd-last-win). +- `Profile Number` - Enables different GPIO pin mappings per profile. Changeable through the Web-Config or [hotkeys](../../hotkeys.mdx#load-profile-1-4). +- `Debounce Delay in milliseconds` - Timeframe where the firmware will ignore additional inputs to prevent switch noise from accidentally triggering unintended inputs. + +## Boot Input Modes + +![GP2040-CE Configurator - Boot Input Modes](../../assets/images/gpc-settings-boot-input-modes.png) + +For each of the buttons listed in the menu, you can assign a different input mode to enter while holding that button during boot (e.g. when plugging in the controller or immediately after resetting the controller). + +For the list of input modes to select from, see [Input Modes](../../usage.mdx#input-modes). + +## Hotkey Settings + +![GP2040-CE Configurator - Boot Input Modes](../../assets/images/gpc-settings-hotkey.png) + +An arbitrary number of buttons and directions, plus the optional Function (Fn) button, can be used to define desired hotkey actions. Select `Fn` if desired, plus one or more buttons/directions, and associate them with a hotkey action. The default hotkeys can be modified or removed, and new ones added, up to 12 in total. + +The available hotkey actions will expand over time. We may also expand the number of hotkeys available to configure in the future. For a list of the available hotkey actions, see [Hotkeys](../../hotkeys.mdx). diff --git a/docs/web-configurator/menu-pages/02-pin-mapping.mdx b/docs/web-configurator/menu-pages/02-pin-mapping.mdx index 7639a12..dc0a0f3 100644 --- a/docs/web-configurator/menu-pages/02-pin-mapping.mdx +++ b/docs/web-configurator/menu-pages/02-pin-mapping.mdx @@ -1,69 +1,69 @@ ---- -title: Pin Mapping -# tags: -# - -# pagination_next: null -# pagination_prev: null -description: "Map GPIO pins from RP2040 to gamepad inputs in GP2040-CE" ---- - -# Pin Mapping - -![GP2040-CE Configurator - Pin Mapping](../../assets/images/gpc-pin-mapping.png) - -Here you can remap the GP2040-CE buttons to different GPIO pins on the RP2040 chip. This can be used to simply remap buttons or bypass a GPIO pin that may have issues on your device. - -The following options are available for assignment to each GPIO Pin. - -- Standard Gamepad inputs found in [Buttons](../../usage.mdx#buttons) -- [Dual Direction Input](../../add-ons/dual-direction-input.mdx) Up, Down, Left and Right -- [D-Pad Mode](../../add-ons/joystick-selection-slider.mdx): Digital, Left Stick, and Right Stick -- [Up Priority SOCD Cleaning](../../hotkeys.mdx#socd-up-priority) -- [Neutral SOCD Cleaning](../../hotkeys.mdx#socd-neutral) -- [Last Win SOCD Cleaning](../../hotkeys.mdx#socd-last-win) -- [First Wins SOCD Cleaning](../../hotkeys.mdx#socd-first-wins) -- [SOCD Cleaning Off](../../hotkeys.mdx#socd-cleaning-off) -- [Turbo](../../add-ons/turbo.mdx) - -:::note - -Options are not limited to a single GPIO pin assignment and can be assigned multiple times (e.g. GPIO pins 0-29 can all be assigned to Up, if desired). - -::: - -## Pin Viewer :video_game: - -This tool is available to see what GPIO pin is physically wired to a button. Click on the button and follow the prompt. It will ask you to press the button and then display a "Pressed pin". - -## Map Buttons With :video_game: - -![GP2040-CE Configurator - Pin Mapping - "Map buttons with..." ](../../assets/images/gpc-pin-mapping-map-buttons.png) - -If you do not know what pins are mapped to which button on your device, there is a tool available to help. Click on the button shown above and follow the prompt. It will ask you to press each standard gamepad input found in [Buttons](../../usage.mdx#buttons) one at a time. - -![GP2040-CE Configurator - Pin Mapping - Prompt](../../assets/images/gpc-pin-mapping-map-buttons-prompt.png) - -- If you do not wish to map a specific input, you can click `Skip Button` and proceed. -- If you do not need to map any more inputs, click `Stop Capture`. - -## Profiles - -You can configure profiles that will change the GPIO to GP2040-CE button mappings based on what profile number you have set. This means that you can have button layouts for different use cases and change between them without the need to enter the Web Configurator and remap GPIO pins. - -The profile number either using the Web Configurator on the [Settings page](../../web-configurator/menu-pages/01-settings.mdx) or using a [hotkey shortcut](../../hotkeys.mdx#load-profile-1-4). There is not a default input combination associated with these `Load Profile #1-4` hotkey shortcuts so you will likely need to set them up in the Settings page under [Hotkey Settings](../../web-configurator/menu-pages/01-settings.mdx#hotkey-settings). - -:::info - -At this time, profiles are limited to changing GPIO pin assignment can cannot be used to change other settings and add-ons that are not directly related to GPIO pin assignment and available to set. This includes, but is not limited to, settings and add-ons such as - -- Boot Input Modes -- Hotkeys -- Peripheral Mapping -- Keyboard Mapping Assignments -- Tilt Input -- Wii Extension -- SNES Extension -- Focus Mode -- Keyboard Host Button-to-Key mapping - -::: +--- +title: Pin Mapping +# tags: +# - +# pagination_next: null +# pagination_prev: null +description: "Map GPIO pins from RP2040 to gamepad inputs in GP2040-CE" +--- + +# Pin Mapping + +![GP2040-CE Configurator - Pin Mapping](../../assets/images/gpc-pin-mapping.png) + +Here you can remap the GP2040-CE buttons to different GPIO pins on the RP2040 chip. This can be used to simply remap buttons or bypass a GPIO pin that may have issues on your device. + +The following options are available for assignment to each GPIO Pin. + +- Standard Gamepad inputs found in [Buttons](../../usage.mdx#buttons) +- [Dual Direction Input](../../add-ons/dual-direction-input.mdx) Up, Down, Left and Right +- [D-Pad Mode](../../add-ons/joystick-selection-slider.mdx): Digital, Left Stick, and Right Stick +- [Up Priority SOCD Cleaning](../../hotkeys.mdx#socd-up-priority) +- [Neutral SOCD Cleaning](../../hotkeys.mdx#socd-neutral) +- [Last Win SOCD Cleaning](../../hotkeys.mdx#socd-last-win) +- [First Wins SOCD Cleaning](../../hotkeys.mdx#socd-first-wins) +- [SOCD Cleaning Off](../../hotkeys.mdx#socd-cleaning-off) +- [Turbo](../../add-ons/turbo.mdx) + +:::note + +Options are not limited to a single GPIO pin assignment and can be assigned multiple times (e.g. GPIO pins 0-29 can all be assigned to Up, if desired). + +::: + +## Pin Viewer :video_game: + +This tool is available to see what GPIO pin is physically wired to a button. Click on the button and follow the prompt. It will ask you to press the button and then display a "Pressed pin". + +## Map Buttons With :video_game: + +![GP2040-CE Configurator - Pin Mapping - "Map buttons with..." ](../../assets/images/gpc-pin-mapping-map-buttons.png) + +If you do not know what pins are mapped to which button on your device, there is a tool available to help. Click on the button shown above and follow the prompt. It will ask you to press each standard gamepad input found in [Buttons](../../usage.mdx#buttons) one at a time. + +![GP2040-CE Configurator - Pin Mapping - Prompt](../../assets/images/gpc-pin-mapping-map-buttons-prompt.png) + +- If you do not wish to map a specific input, you can click `Skip Button` and proceed. +- If you do not need to map any more inputs, click `Stop Capture`. + +## Profiles + +You can configure profiles that will change the GPIO to GP2040-CE button mappings based on what profile number you have set. This means that you can have button layouts for different use cases and change between them without the need to enter the Web Configurator and remap GPIO pins. + +The profile number either using the Web Configurator on the [Settings page](../../web-configurator/menu-pages/01-settings.mdx) or using a [hotkey shortcut](../../hotkeys.mdx#load-profile-1-4). There is not a default input combination associated with these `Load Profile #1-4` hotkey shortcuts so you will likely need to set them up in the Settings page under [Hotkey Settings](../../web-configurator/menu-pages/01-settings.mdx#hotkey-settings). + +:::info + +At this time, profiles are limited to changing GPIO pin assignment can cannot be used to change other settings and add-ons that are not directly related to GPIO pin assignment and available to set. This includes, but is not limited to, settings and add-ons such as + +- Boot Input Modes +- Hotkeys +- Peripheral Mapping +- Keyboard Mapping Assignments +- Tilt Input +- Wii Extension +- SNES Extension +- Focus Mode +- Keyboard Host Button-to-Key mapping + +::: diff --git a/docs/web-configurator/menu-pages/05-led-configuration.mdx b/docs/web-configurator/menu-pages/05-led-configuration.mdx index a082d8e..1a7f99a 100644 --- a/docs/web-configurator/menu-pages/05-led-configuration.mdx +++ b/docs/web-configurator/menu-pages/05-led-configuration.mdx @@ -1,60 +1,60 @@ ---- -title: LED Configuration -# tags: -# - -# pagination_next: null -# pagination_prev: null -description: "Configure settings for addressable RGB LEDs on your controller" ---- - -# LED Configuration - -If you have a setup with per-button RGB LEDs, they can be configured here. - -## RGB LED Configuration - -![GP2040-CE Configurator - LED Configuration](../../assets/images/gpc-rgb-led-config.png) - -- `Data Pin` - The GPIO pin that will drive the data line for your RGB LED chain. Set to `-1` to disable RGB LEDs. -- `LED Format` - The data format used to communicate with your RGB LEDs. If unsure the default `GRB` value is usually safe. -- `LED Layout` - Select the layout for your controls/buttons. This is used for static themes and some per-button animations. -- `LEDs Per Button` - Set the number of LEDs in each button on your chain. -- `Max Brightness` - Set the maximum brightness for the LEDs. Ranges from 0-255. -- `Brightness Steps` - The number of levels of brightness to cycle through when turning brightness up and down. - -## RGB LED Button Order - -:::note - -Please note that RGB Button LEDs must be the first LEDs configured. They will start at index 0 on the RGB LED strip. - -Also, at the current time, each button can only have one instance in the LED chain. This is the case even if multiple LEDs are assigned per button and multiple buttons are assigned to different GPIO pins. - -::: - -![GP2040-CE Configurator - RGB LED Button Order](../../assets/images/gpc-rgb-led-button-order.png) - -Rearrange the Buttons in the order of the LED Chain. This is different between devices and is determined by manufacturer of the board and LEDs. - -## Player LEDs (XInput) - -Available selections for `Player LED Type` are `None`, `PWM` or `RGB`. - -### PWM Player LEDs - -![GP2040-CE Configurator - PWM Player LEDs](../../assets/images/gpc-pled-pwm.png) - -- `PLED #[1-4] Pin` - The GPIO pin the standard LED is connected to. - -### RGB Player LEDs - -:::note - -Please note that RGB Player LEDs must be located at an index after the RGB LED Buttons on the LED strip! The Web Config interface will suggest a starting index based on the number of LED buttons mapped in [RGB LED Button Order](#rgb-led-button-order) and the select `LEDs Per Button` value. We hope to remove this limitation in the future. - -::: - -![GP2040-CE Configurator - PWM Player LEDs](../../assets/images/gpc-pled-rgb.png) - -- `PLED #[1-4] Index` - The index of the LED module on the RGB strip. -- `RGB PLED Color` - Click the box to reveal a color picker, or manually enter the color. +--- +title: LED Configuration +# tags: +# - +# pagination_next: null +# pagination_prev: null +description: "Configure settings for addressable RGB LEDs on your controller" +--- + +# LED Configuration + +If you have a setup with per-button RGB LEDs, they can be configured here. + +## RGB LED Configuration + +![GP2040-CE Configurator - LED Configuration](../../assets/images/gpc-rgb-led-config.png) + +- `Data Pin` - The GPIO pin that will drive the data line for your RGB LED chain. Set to `-1` to disable RGB LEDs. +- `LED Format` - The data format used to communicate with your RGB LEDs. If unsure the default `GRB` value is usually safe. +- `LED Layout` - Select the layout for your controls/buttons. This is used for static themes and some per-button animations. +- `LEDs Per Button` - Set the number of LEDs in each button on your chain. +- `Max Brightness` - Set the maximum brightness for the LEDs. Ranges from 0-255. +- `Brightness Steps` - The number of levels of brightness to cycle through when turning brightness up and down. + +## RGB LED Button Order + +:::note + +Please note that RGB Button LEDs must be the first LEDs configured. They will start at index 0 on the RGB LED strip. + +Also, at the current time, each button can only have one instance in the LED chain. This is the case even if multiple LEDs are assigned per button and multiple buttons are assigned to different GPIO pins. + +::: + +![GP2040-CE Configurator - RGB LED Button Order](../../assets/images/gpc-rgb-led-button-order.png) + +Rearrange the Buttons in the order of the LED Chain. This is different between devices and is determined by manufacturer of the board and LEDs. + +## Player LEDs (XInput) + +Available selections for `Player LED Type` are `None`, `PWM` or `RGB`. + +### PWM Player LEDs + +![GP2040-CE Configurator - PWM Player LEDs](../../assets/images/gpc-pled-pwm.png) + +- `PLED #[1-4] Pin` - The GPIO pin the standard LED is connected to. + +### RGB Player LEDs + +:::note + +Please note that RGB Player LEDs must be located at an index after the RGB LED Buttons on the LED strip! The Web Config interface will suggest a starting index based on the number of LED buttons mapped in [RGB LED Button Order](#rgb-led-button-order) and the select `LEDs Per Button` value. We hope to remove this limitation in the future. + +::: + +![GP2040-CE Configurator - PWM Player LEDs](../../assets/images/gpc-pled-rgb.png) + +- `PLED #[1-4] Index` - The index of the LED module on the RGB strip. +- `RGB PLED Color` - Click the box to reveal a color picker, or manually enter the color. diff --git a/docs/web-configurator/menu-pages/06-custom-led-theme.mdx b/docs/web-configurator/menu-pages/06-custom-led-theme.mdx index 08d2150..6f926bb 100644 --- a/docs/web-configurator/menu-pages/06-custom-led-theme.mdx +++ b/docs/web-configurator/menu-pages/06-custom-led-theme.mdx @@ -1,29 +1,29 @@ ---- -title: Custom LED Theme -# tags: -# - -# pagination_next: null -# pagination_prev: null -description: "Create a custom RGB LED theme for your controller with different colors on rest and when pressed" ---- - -# Custom LED Theme - -![GP2040-CE Configurator - Custom LED Theme](../../assets/images/gpc-rgb-led-custom-theme.png) - -- `Enable` - Enables the use of Custom LED Theme. -- `Preview Layout` - Predefined layouts for previewing LED theme. **NOTE:** This is for preview only, does not affect controller operation. -- `Clear All` - Prompts for confirmation to reset the current theme to all buttons black (LEDs off). Make sure you have saved and have a backup if you don't want to lose your customizations. -- `Set All To Color` - Presents a color picker to set all buttons to the same normal or pressed color. -- `Set Gradient` - Sets a horizontal gradient across the action buttons according to the `Preview Layout` selection. -- `Set Pressed Gradient` - Same as `Set Gradient`, but for pressed button state. -- `Save Color` - Save a custom color to the color picker palette. -- `Delete Color` - Deletes a custom color from the color picker palette. Stock colors cannot be deleted. - -:::note - -All saved colors and gradient selections are saved to your browser's local storage. - -::: - -If enabled, the Custom LED Theme will be available as another animation mode and will cycle with the `Previous Animation` and `Next Animation` shortcuts on your controller. You can also use the [Data Backup and Restoration](./10-data-backup-restoration.mdx) feature to create and share themes! +--- +title: Custom LED Theme +# tags: +# - +# pagination_next: null +# pagination_prev: null +description: "Create a custom RGB LED theme for your controller with different colors on rest and when pressed" +--- + +# Custom LED Theme + +![GP2040-CE Configurator - Custom LED Theme](../../assets/images/gpc-rgb-led-custom-theme.png) + +- `Enable` - Enables the use of Custom LED Theme. +- `Preview Layout` - Predefined layouts for previewing LED theme. **NOTE:** This is for preview only, does not affect controller operation. +- `Clear All` - Prompts for confirmation to reset the current theme to all buttons black (LEDs off). Make sure you have saved and have a backup if you don't want to lose your customizations. +- `Set All To Color` - Presents a color picker to set all buttons to the same normal or pressed color. +- `Set Gradient` - Sets a horizontal gradient across the action buttons according to the `Preview Layout` selection. +- `Set Pressed Gradient` - Same as `Set Gradient`, but for pressed button state. +- `Save Color` - Save a custom color to the color picker palette. +- `Delete Color` - Deletes a custom color from the color picker palette. Stock colors cannot be deleted. + +:::note + +All saved colors and gradient selections are saved to your browser's local storage. + +::: + +If enabled, the Custom LED Theme will be available as another animation mode and will cycle with the `Previous Animation` and `Next Animation` shortcuts on your controller. You can also use the [Data Backup and Restoration](./10-data-backup-restoration.mdx) feature to create and share themes! diff --git a/docs/web-configurator/menu-pages/07-display-configuration.mdx b/docs/web-configurator/menu-pages/07-display-configuration.mdx index 8a3bdf6..94497fb 100644 --- a/docs/web-configurator/menu-pages/07-display-configuration.mdx +++ b/docs/web-configurator/menu-pages/07-display-configuration.mdx @@ -1,106 +1,106 @@ ---- -title: Display Configuration -# tags: -# - -# pagination_next: null -# pagination_prev: null -description: "Configure settings for an optional OLED display on your controller" ---- - -# Display Configuration - -GP2040-CE supports the use of a display module such as an OLED with a SSD1306, SH1106, or SH1107 display IC. - -![GP2040-CE Configurator - Display Configuration](../../assets/images/gpc-display-config.png) - -## Hardware Options - -- `Enabled` - Turns on/off the display module. -- `I2C Block` - The Pico I2C block that will be used. Set based on pins, refer to table on page. -- `I2C Address` - The I2C address of your device, defaults to the very commonly used `0x3C`. - -## Screen Options - -- `Flip Display` - Allows you to flip or mirror the display in a variety of ways. -- `Invert Display` - Inverts the pixel colors, effectively giving you a negative image when enabled. - -## Layout Options - -:::note Button Layout Combinations - -Be sure to pick left and right layouts that match. Some layout combinations result in overlapping buttons on the screen. - -::: - -- `Button Layout (Left)` - Changes the onscreen layout for the left side of the display and stick. -- `Button Layout (Right)` - Changes the onscreen layout for the right side of the display and stick. -- `Splash Mode` - Enables or disables a splash screen displaying when the unit is turned on. -- `Splash Duration` - Sets the amount of time the splash screen displays for on boot. -- `Display Saver Timeout` - Will cause the display to turn off after the specified number of minutes. Pressing any input will cause the display to turn back on. -- `Choose File` - Upload your own image to be used for the splash screen. - -## Custom Splash Screen - -It is recommend that you use a two color 128x64 image (or one that is sized appropriately for your display). Uploading any other type of image will result in a conversion and sizing of the image automatically. - -Supported Formats: BMP, GIF, JPG, JPEG, PNG, WEBP - -:::caution - -Animated GIFs are not supported at this time. - -::: - -Check out our collection of great custom splash screens from the community [HERE](../community-splash-screens.mdx) - -## Display Elements - -![GP2040-CE Configurator - Display Example](../../assets/images/gpc-display-example.png) - -This area contains an explanation of display elements and provide an example for how it may appear on your device. - -### Top Row - -Going from left to right, the display elements are - -- [Input Mode](../../usage.mdx#input-modes) - Displays the current input mode - - `XINPUT` - XInput - - `SWITCH` - Nintendo Switch - - `DINPUT` - PS3/DirectInput - - `HID-KB` - Keyboard - - `PS4` - Controller Mode set as `Controller`, will change to `PS4:AS` on successful authentication - - `PS4:AS` - [PS4 Input Mode](../../web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings) add-on successfully authenticated - - `PS5` - Controller Mode Set as `Arcade Stick`, will change to `PS5:AS` on successful authentication - - `PS5:AS` - [PS5 Input Mode](../../web-configurator/menu-pages/01-settings.mdx#additional-ps5-settings) add-on successfully authenticated - - `XBONE` - Xbox One compatible with [Xbox One Input Mode](./01-settings.mdx#additional-xbox-one-settings) - - `OGXBOX` - Original XBox - - `GEN/MD` - Sega Genesis/MegaDrive Mini - - `NGMINI` - NEOGEO mini - - `PCE/TG` - PC Engine/Turbografx 16 Mini - - `EGRET` - EGRET II Mini - - `ASTRO` - ASTROCITY Mini - - `PSC` - Playstation Classic -- [Turbo](../../add-ons/turbo.mdx) - Will display `T##` when Turbo is enabled where ## is the number of presses per second -- DPad Mode - Displays the current DPad Mode - - `D` - [DPad Digital](../../hotkeys.mdx#dpad-digital) - - `L` - [DPad Left Analog](../../hotkeys.mdx#dpad-left-analog) - - `R` - [DPad Right Analog](../../hotkeys.mdx#dpad-right-analog) -- SOCD Cleaning Mode - Displays the current SOCD cleaning Mode - - `SOCD-U` - [SOCD Up Priority](../../hotkeys.mdx#socd-up-priority) - - `SOCD-N` - [SOCD Neutral](../../hotkeys.mdx#socd-neutral) - - `SOCD-L` - [SOCD Last Win](../../hotkeys.mdx#socd-last-win) - - `SOCD-F` - [SOCD First Wins](../../hotkeys.mdx#socd-first-wins) - - `SOCD-X` - [SOCD Cleaning Off](../../hotkeys.mdx#socd-cleaning-off) -- [Macros](./09-macros.mdx) - `M` will appear if Macros are enabled and this cannot be disabled. - -### Middle - -The appearance of this area will depend on the particular configuration of your [Button Layouts](#layout-options) on the Left and Right sides - -- Turbo Rings - When using the Turbo Mode is enabled on individual buttons, the buttons will have a smaller inner ring as an indicator. When disabled, this button will disappear. - -![GP2040-CE Configurator - Display Example - Turbo Enabled](../../assets/images/gpc-display-example-turbo.png) - -### Bottom - -- Input History - Will display input history when the [Input History](../../add-ons/input-history.mdx) add-on is enabled and configured +--- +title: Display Configuration +# tags: +# - +# pagination_next: null +# pagination_prev: null +description: "Configure settings for an optional OLED display on your controller" +--- + +# Display Configuration + +GP2040-CE supports the use of a display module such as an OLED with a SSD1306, SH1106, or SH1107 display IC. + +![GP2040-CE Configurator - Display Configuration](../../assets/images/gpc-display-config.png) + +## Hardware Options + +- `Enabled` - Turns on/off the display module. +- `I2C Block` - The Pico I2C block that will be used. Set based on pins, refer to table on page. +- `I2C Address` - The I2C address of your device, defaults to the very commonly used `0x3C`. + +## Screen Options + +- `Flip Display` - Allows you to flip or mirror the display in a variety of ways. +- `Invert Display` - Inverts the pixel colors, effectively giving you a negative image when enabled. + +## Layout Options + +:::note Button Layout Combinations + +Be sure to pick left and right layouts that match. Some layout combinations result in overlapping buttons on the screen. + +::: + +- `Button Layout (Left)` - Changes the onscreen layout for the left side of the display and stick. +- `Button Layout (Right)` - Changes the onscreen layout for the right side of the display and stick. +- `Splash Mode` - Enables or disables a splash screen displaying when the unit is turned on. +- `Splash Duration` - Sets the amount of time the splash screen displays for on boot. +- `Display Saver Timeout` - Will cause the display to turn off after the specified number of minutes. Pressing any input will cause the display to turn back on. +- `Choose File` - Upload your own image to be used for the splash screen. + +## Custom Splash Screen + +It is recommend that you use a two color 128x64 image (or one that is sized appropriately for your display). Uploading any other type of image will result in a conversion and sizing of the image automatically. + +Supported Formats: BMP, GIF, JPG, JPEG, PNG, WEBP + +:::caution + +Animated GIFs are not supported at this time. + +::: + +Check out our collection of great custom splash screens from the community [HERE](../community-splash-screens.mdx) + +## Display Elements + +![GP2040-CE Configurator - Display Example](../../assets/images/gpc-display-example.png) + +This area contains an explanation of display elements and provide an example for how it may appear on your device. + +### Top Row + +Going from left to right, the display elements are + +- [Input Mode](../../usage.mdx#input-modes) - Displays the current input mode + - `XINPUT` - XInput + - `SWITCH` - Nintendo Switch + - `DINPUT` - PS3/DirectInput + - `HID-KB` - Keyboard + - `PS4` - Controller Mode set as `Controller`, will change to `PS4:AS` on successful authentication + - `PS4:AS` - [PS4 Input Mode](../../web-configurator/menu-pages/01-settings.mdx#additional-ps4-settings) add-on successfully authenticated + - `PS5` - Controller Mode Set as `Arcade Stick`, will change to `PS5:AS` on successful authentication + - `PS5:AS` - [PS5 Input Mode](../../web-configurator/menu-pages/01-settings.mdx#additional-ps5-settings) add-on successfully authenticated + - `XBONE` - Xbox One compatible with [Xbox One Input Mode](./01-settings.mdx#additional-xbox-one-settings) + - `OGXBOX` - Original XBox + - `GEN/MD` - Sega Genesis/MegaDrive Mini + - `NGMINI` - NEOGEO mini + - `PCE/TG` - PC Engine/Turbografx 16 Mini + - `EGRET` - EGRET II Mini + - `ASTRO` - ASTROCITY Mini + - `PSC` - Playstation Classic +- [Turbo](../../add-ons/turbo.mdx) - Will display `T##` when Turbo is enabled where ## is the number of presses per second +- DPad Mode - Displays the current DPad Mode + - `D` - [DPad Digital](../../hotkeys.mdx#dpad-digital) + - `L` - [DPad Left Analog](../../hotkeys.mdx#dpad-left-analog) + - `R` - [DPad Right Analog](../../hotkeys.mdx#dpad-right-analog) +- SOCD Cleaning Mode - Displays the current SOCD cleaning Mode + - `SOCD-U` - [SOCD Up Priority](../../hotkeys.mdx#socd-up-priority) + - `SOCD-N` - [SOCD Neutral](../../hotkeys.mdx#socd-neutral) + - `SOCD-L` - [SOCD Last Win](../../hotkeys.mdx#socd-last-win) + - `SOCD-F` - [SOCD First Wins](../../hotkeys.mdx#socd-first-wins) + - `SOCD-X` - [SOCD Cleaning Off](../../hotkeys.mdx#socd-cleaning-off) +- [Macros](./09-macros.mdx) - `M` will appear if Macros are enabled and this cannot be disabled. + +### Middle + +The appearance of this area will depend on the particular configuration of your [Button Layouts](#layout-options) on the Left and Right sides + +- Turbo Rings - When using the Turbo Mode is enabled on individual buttons, the buttons will have a smaller inner ring as an indicator. When disabled, this button will disappear. + +![GP2040-CE Configurator - Display Example - Turbo Enabled](../../assets/images/gpc-display-example-turbo.png) + +### Bottom + +- Input History - Will display input history when the [Input History](../../add-ons/input-history.mdx) add-on is enabled and configured diff --git a/docs/web-configurator/menu-pages/08-add-ons-configuration.mdx b/docs/web-configurator/menu-pages/08-add-ons-configuration.mdx index afe6e7c..bd42b00 100644 --- a/docs/web-configurator/menu-pages/08-add-ons-configuration.mdx +++ b/docs/web-configurator/menu-pages/08-add-ons-configuration.mdx @@ -1,50 +1,44 @@ ---- -title: Add-Ons Configuration -# tags: -# - -# pagination_next: null -# pagination_prev: null -description: "General overview for community created add-ons that extend functionality on the GP2040-CE feature set" ---- - -# Add-Ons Configuration - -This section is for custom add-ons that can be enabled to expand the functionality of GP2040-CE. Due to the large number of add-ons created by the community, each add-on has its own separate documentation page. - -:::caution - -Some of these add-ons are experimental and not all add-ons are interoperable with all other add-ons. - -::: - -## Available Add-ons - -- [Analog](../../add-ons/analog.mdx) -- [BOOTSEL Button Configuration](../../add-ons/bootsel-button.mdx) -- [Buzzer Speaker](../../add-ons/buzzer-speaker.mdx) -- [Dual Directional Input](../../add-ons/dual-direction-input.mdx) -- [Focus Mode Configuration](../../add-ons/focus-mode.mdx) -- [I2C Analog ADS1219](../../add-ons/i2c-analog-ads1219.mdx) -- [I2C Analog ADS1256 (SPI)](../../add-ons/i2c-analog-ads1256-spi.mdx) -- [Input History](../../add-ons/input-history.mdx) -- [Input Reverse](../../add-ons/input-reverse.mdx) -- [Joystick Selection Slider](../../add-ons/joystick-selection-slider.mdx) -- [Keyboard Host Configuration](../../add-ons/keyboard-host.mdx) -- [On-board LED Configuration](../../add-ons/on-board-led.mdx) -- [Player Number (X-INPUT ONLY)](../../add-ons/player-number.mdx) -- [Rotary Encoders](../../add-ons/rotary-encoders.mdx) -- [SNES Extension Configuration](../../add-ons/snes-input.mdx) -- [SOCD Cleaning Mode Selection Slider](../../add-ons/socd-selection-slider.mdx) -- [Tilt Input](../../add-ons/tilt-input.mdx) -- [Turbo](../../add-ons/turbo.mdx) -- [Wii Extensions](../../add-ons/wii-extensions.mdx) - -## Deprecated Add-ons - -- PS4 Mode * -- PS Passthrough ** -- Xbox One Passthrough *** - -* PS4 Mode has been moved to the main settings section under `Current Input Mode` / `PS4` when you select `Upload Key Files` for the `Authentication Settings`. -** PS Passthrough mode has been moved to the main settings section under both `PS4` and `PS5` modes. -*** Xbox One Passthrough mode has been moved to the main settins section under `Xbox One` mode and is turned on by default. +--- +title: Add-Ons Configuration +# tags: +# - +# pagination_next: null +# pagination_prev: null +description: "General overview for community created add-ons that extend functionality on the GP2040-CE feature set" +--- + +# Add-Ons Configuration + +This section is for custom add-ons that can be enabled to expand the functionality of GP2040-CE. Due to the large number of add-ons created by the community, each add-on has its own separate documentation page. + +:::caution + +Some of these add-ons are experimental and not all add-ons are interoperable with all other add-ons. + +::: + +## Available Add-ons + +- [Analog](../../add-ons/analog.mdx) +- [BOOTSEL Button Configuration](../../add-ons/bootsel-button.mdx) +- [Buzzer Speaker](../../add-ons/buzzer-speaker.mdx) +- [Dual Directional Input](../../add-ons/dual-direction-input.mdx) +- [Focus Mode Configuration](../../add-ons/focus-mode.mdx) +- [I2C Analog ADS1219](../../add-ons/i2c-analog-ads1219.mdx) +- [Input History](../../add-ons/input-history.mdx) +- [Input Reverse](../../add-ons/input-reverse.mdx) +- [Joystick Selection Slider](../../add-ons/joystick-selection-slider.mdx) +- [Keyboard Host Configuration](../../add-ons/keyboard-host.mdx) +- [On-board LED Configuration](../../add-ons/on-board-led.mdx) +- [Player Number (X-INPUT ONLY)](../../add-ons/player-number.mdx) +- [SNES Input](../../add-ons/snes-input.mdx) +- [SOCD Selection Slider](../../add-ons/socd-selection-slider.mdx) +- [Tilt Input](../../add-ons/tilt-input.mdx) +- [Turbo](../../add-ons/turbo.mdx) +- [Wii Extensions](../../add-ons/wii-extensions.mdx) + +## Deprecated Add-ons + +- PS4 Mode +- PS Passthrough +- Xbox One Passthrough diff --git a/docs/web-configurator/menu-pages/09-macros.mdx b/docs/web-configurator/menu-pages/09-macros.mdx index 4301e52..79129ee 100644 --- a/docs/web-configurator/menu-pages/09-macros.mdx +++ b/docs/web-configurator/menu-pages/09-macros.mdx @@ -1,109 +1,87 @@ ---- -title: Macro Settings -# tags: -# - -# pagination_next: null -# pagination_prev: null -description: "Macro settings and how to create input macros" ---- - -# Macro Settings - -Macros are a series or combination of gamepad inputs triggered with a single button or a combination of buttons. - -:::note - -Setting an overall `Macro` button as well as dedicated individual `Macro` buttons for any of the six available macro slots is now set via the `Configuration` / `Pin Mapping` page. - -::: - -## Macros Overview - -The Macros Overview screen will show you key information about your macro setup like which macros are currently activated, which pins (if any) they are assigned to and the label which has been assigned for each. - -![GP2040-CE Configurator - Macros](../../assets/images/gpc-macros.png) - -You can also have the onbload LED (on the Pico and other devices that have a connected onboard LED) turn on while a macro is active. - -Use Board LED to Display Macro Status: -- `Off` - The Board LED will not turn on while a macro is active -- `On` - The Board LED will turn on while a macro is active - -![GP2040-CE Configurator - Macro Options](../../assets/images/gpc-macro-options.png) - -## Macro Options - -On the left hand column you will see the `Macros Overview` link as well as links to each of the six configurable macros. - -### Macro Enabled - -The `Enabled` slider will allow you to enable and disable a macro. - -- `Off` - The macro is not available for use. -- `On` - The macro is available for use when triggered by either the GPIO pin or the combination set in [`Uses Button`](#uses-button). - -### Macro Name - -This is the name of the macro and is optional. - -### Macro Activation Type - -This describes is how the GPIO pin or the combination set in [`Uses Button`](#uses-button) triggers and repeats the macro. - -- Press - Full press of button triggers the macro once -- Hold Repeat - Holding button to repeatedly triggers macro -- Toggle - Full press of button causes the macro to repeatedly trigger, another full press of the button will stop the macro from repeatedly triggering. - -### Interruptible - -- `Off` - The macro cannot be stopped and will execute all lines until the macro is completed. -- `On` - Any input will stop the current ongoing macro or, if the input is another macro, the interrupting macro trigger will start executing instead. - -:::note Interrupting Macros - -When a macro stops for any reason and are triggered. again, the macro starts again from the beginning. - -::: - -### Exclusive - -- `Off` - Additional inputs from user will be sent as the macro continues to execute, resulting in a blend of macro and user inputs. -- `On` - Filters only the macro inputs through and excludes any additional user gamepad inputs - -:::note - -This option is **only** available when `Interruptible` is disabled. - -::: - -### Use Macro Button + Gamepad Button to Trigger - -If you have set an overall `Macro Button` in the `Pin Mapping` configuration page this will allow you to set a `Button Assignment` + the set Macro button to activate the Macro. - -- `Off` - This macro is assigned to a GPIO pin on the board and when pressed, the macro will be triggered. -- `On` - This macro is assigned to a button combination of `Macro Button Pin + Input` where the input can be any of the standard gamepad inputs. - -### Show Frames - -- `Off` - The duration in the macro input line editor will appear in milliseconds (ms). -- `On` - The duration in the macro input line editor will appear as a number of frames, assuming 60 frames per second. - -## Macro Input Line Editor - -Each individual macro has a maximum of 50 lines where each input line has a maximum of 18 gamepad inputs (using all available gamepad inputs). - -![GP2040-CE Configurator - Macro Input Line](../../assets/images/gpc-macros-input-line.png) - -Each input line is composed of the following elements from left to right. - -`Input Line Duration` ms/frame(s) `Inputs` | `Post Input Wait Duration` ms - -- Input Line Duration - The duration that the inputs are held for. (Maximum 4,294,967ms or 268,435 frames) -- Inputs - The inputs to be held during the execution of the input line. -- Post Input Wait Duration - The duration in-between when that input line finishes executing and when the next line will start executing. (Maximum 4,294,967ms or 268,435 frames) - -:::note Deleting Input Lines - -To delete an input line, double-click the "firework" image. - -::: \ No newline at end of file +--- +title: Macro Settings +# tags: +# - +# pagination_next: null +# pagination_prev: null +description: "Macro settings and how to create input macros" +--- + +# Macro Settings + +Macros are a series or combination of gamepad inputs triggered with a single button or a combination of buttons. + +![GP2040-CE Configurator - Macros](../../assets/images/gpc-macros.png) + +## Macro Options + +`Macro Button Pin` - The GPIO Pin used to activate macros in combination with other inputs when `Uses Button` is enabled and set. + +### Label + +This is the name of the macro and is optional. + +### Activate + +- `Off` - The macro is not available for use. +- `On` - The macro is available for use when triggered by either the GPIO pin or the combination set in [`Uses Button`](#uses-button). + +### Interruptible + +- `Off` - The macro cannot be stopped and will execute all lines until the macro is completed. +- `On` - Any input will stop the current ongoing macro or, if the input is another macro, the interrupting macro trigger will start executing instead. + +:::note Interrupting Macros + +When a macro stops for any reason and are triggered. again, the macro starts again from the beginning. + +::: + +### Exclusive + +- `Off` - Additional inputs from user will be sent as the macro continues to execute, resulting in a blend of macro and user inputs. +- `On` - Filters only the macro inputs through and excludes any additional user gamepad inputs + +:::note + +This option is **only** available when `Interruptible` is disabled. + +::: + +### Show Frames + +- `Off` - The duration in the macro input line editor will appear in milliseconds (ms). +- `On` - The duration in the macro input line editor will appear as a number of frames, assuming 60 frames per second. + +### Uses Button + +- `Off` - This macro is assigned to a GPIO pin on the board and when pressed, the macro will be triggered. +- `On` - This macro is assigned to a button combination of `Macro Button Pin + Input` where the input can be any of the standard gamepad inputs. + +### Trigger Mode + +This describes is how the GPIO pin or the combination set in [`Uses Button`](#uses-button) triggers and repeats the macro. + +- Press - Full press of button triggers the macro once +- Hold Repeat - Holding button to repeatedly triggers macro +- Toggle - Full press of button causes the macro to repeatedly trigger, another full press of the button will stop the macro from repeatedly triggering. + +## Macro Input Line Editor + +Each individual macro has a maximum of 50 lines where each input line has a maximum of 18 gamepad inputs (using all available gamepad inputs). + +![GP2040-CE Configurator - Macro Input Line](../../assets/images/gpc-macros-input-line.png) + +Each input line is composed of the following elements from left to right. + +`Input Line Duration` ms/frame(s) `Inputs` | `Post Input Wait Duration` ms + +- Input Line Duration - The duration that the inputs are held for. (Maximum 4,294,967ms or 268,435 frames) +- Inputs - The inputs to be held during the execution of the input line. +- Post Input Wait Duration - The duration in-between when that input line finishes executing and when the next line will start executing. (Maximum 4,294,967ms or 268,435 frames) + +:::note Deleting Input Lines + +To delete an input line, double-click the "x" button. + +::: diff --git a/docs/web-configurator/menu-pages/10-data-backup-restoration.mdx b/docs/web-configurator/menu-pages/10-data-backup-restoration.mdx index 8b3ea1d..8276c5c 100644 --- a/docs/web-configurator/menu-pages/10-data-backup-restoration.mdx +++ b/docs/web-configurator/menu-pages/10-data-backup-restoration.mdx @@ -1,23 +1,23 @@ ---- -title: Data Backup and Restoration -# tags: -# - -# pagination_next: null -# pagination_prev: null -description: "Backup and Restore your controller settings to an external configuration JSON file" ---- - -# Data Backup and Restoration - -![GP2040-CE Configurator - Add-Ons Backup and Restore](../../assets/images/gpc-backup-and-restore.png) - -- `Backup To File` - Allows you to select what to backup to a file (default is all selected). -- `Restore From File` - Allows you to select what to restore from a file (default is all selected). - -:::warning - -As of GP2040-CE version 0.7.6, importing pin mappings from backups made in prior versions will have no effect. If the firmware file for your controller is available, it is recommended to [flash nuke](../../installation.mdx#flash-nuke-process) your controller and flash the GP2040-CE v0.7.6 onto your controllers. - -Do note that this will wipe any and all data your controller had prior to the flash nuke process. - -::: +--- +title: Data Backup and Restoration +# tags: +# - +# pagination_next: null +# pagination_prev: null +description: "Backup and Restore your controller settings to an external configuration JSON file" +--- + +# Data Backup and Restoration + +![GP2040-CE Configurator - Add-Ons Backup and Restore](../../assets/images/gpc-backup-and-restore.png) + +- `Backup To File` - Allows you to select what to backup to a file (default is all selected). +- `Restore From File` - Allows you to select what to restore from a file (default is all selected). + +:::warning + +As of GP2040-CE version 0.7.6, importing pin mappings from backups made in prior versions will have no effect. If the firmware file for your controller is available, it is recommended to [flash nuke](../../installation.mdx#flash-nuke-process) your controller and flash the GP2040-CE v0.7.6 onto your controllers. + +Do note that this will wipe any and all data your controller had prior to the flash nuke process. + +::: diff --git a/docs/web-configurator/menu-pages/11-danger-zone.mdx b/docs/web-configurator/menu-pages/11-danger-zone.mdx index 0619cb4..2e36d0e 100644 --- a/docs/web-configurator/menu-pages/11-danger-zone.mdx +++ b/docs/web-configurator/menu-pages/11-danger-zone.mdx @@ -1,12 +1,12 @@ ---- -title: DANGER ZONE -# tags: -# - -pagination_next: null -pagination_prev: null -description: "Perform a firmware reset on your controller" ---- - -# DANGER ZONE - -![GP2040-CE Configurator - Reset Settings](../../assets/images/gpc-reset-settings.png) +--- +title: DANGER ZONE +# tags: +# - +pagination_next: null +pagination_prev: null +description: "Perform a firmware reset on your controller" +--- + +# DANGER ZONE + +![GP2040-CE Configurator - Reset Settings](../../assets/images/gpc-reset-settings.png) diff --git a/docs/web-configurator/web-configurator.mdx b/docs/web-configurator/web-configurator.mdx index a97e041..4eda449 100644 --- a/docs/web-configurator/web-configurator.mdx +++ b/docs/web-configurator/web-configurator.mdx @@ -1,68 +1,68 @@ ---- -title: GP2040-CE Web Configurator -# tags: -# - -pagination_next: null -pagination_prev: null -description: "GP2040-CE's Web-Based Configuration Application: Just hold S2 on boot or hold S2+B3+B4 while already plugged in. Then go to http://192.168.7.1 to access the Web Configurator." ---- - -import InputLabelSelector, { - Hotkey, -} from "@site/src/components/LabelSelector.tsx"; - -# GP2040-CE Web Configurator - -Select the button labels to be displayed in the usage guide: - - -
- -GP2040-CE contains a built-in web-based configuration application which can be started by holding when plugging your controller into a PC or by holding for five seconds while the controller is plugged in. Then access [http://192.168.7.1](http://192.168.7.1) in a web browser to begin configuration. - -### Supported -- Windows -- Mac -- Linux -- SteamOS -- iPadOS - -### Not supported - - Android - - iOS - -:::note - -Linux distributions may need some extra steps to access the web configurator; see [Linux Setup](#linux-setup). - -::: - -## Linux Setup - -When you plug in your controller while holding , you should see it connect in the kernel logs if you run `dmesg`: - -```sh -[ 72.291060] usb 1-3: new full-speed USB device number 12 using xhci_hcd -[ 72.450166] usb 1-3: New USB device found, idVendor=cafe, idProduct=4028, bcdDevice= 1.01 -[ 72.450172] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 -[ 72.450174] usb 1-3: Product: TinyUSB Device -[ 72.450176] usb 1-3: Manufacturer: TinyUSB -[ 72.450177] usb 1-3: SerialNumber: 123456 -[ 72.484285] rndis_host 1-3:1.0 usb0: register 'rndis_host' at usb-0000:06:00.1-3, RNDIS device, 02:02:84:6a:96:00 -[ 72.498630] rndis_host 1-3:1.0 enp6s0f1u3: renamed from usb0 -``` - -In the above example, **enp6s0f1u3** is the virtual Ethernet interface for your controller. If you don't see the first `rndis_host` line, make sure `CONFIG_USB_NET_RNDIS_HOST` is compiled in your kernel or as a module. - -The web configurator is automatically running, you just need to be able to reach it. Some configurations automatically set up the route, so try [http://192.168.7.1](http://192.168.7.1) in your browser now. If it doesn't load, try configuring an IP for the interface manually via: `sudo ifconfig enp6s0f1u3 192.168.7.2`. - -Whether or not you had to add an IP manually, you should end up with a route something like this: - -```sh -% ip route -default via 10.0.5.1 dev enp5s0 proto dhcp src 10.0.5.38 metric 2 -10.0.5.0/24 dev enp5s0 proto dhcp scope link src 10.0.5.38 metric 2 -192.168.7.0/24 dev enp6s0f1u3 proto kernel scope link src 192.168.7.2 <--- -``` - -Then the configurator should be reachable in your browser. +--- +title: GP2040-CE Web Configurator +# tags: +# - +pagination_next: null +pagination_prev: null +description: "GP2040-CE's Web-Based Configuration Application: Just hold S2 on boot or hold S2+B3+B4 while already plugged in. Then go to http://192.168.7.1 to access the Web Configurator." +--- + +import InputLabelSelector, { + Hotkey, +} from "@site/src/components/LabelSelector.tsx"; + +# GP2040-CE Web Configurator + +Select the button labels to be displayed in the usage guide: + + +
+ +GP2040-CE contains a built-in web-based configuration application which can be started by holding when plugging your controller into a PC or by holding for five seconds while the controller is plugged in. Then access [http://192.168.7.1](http://192.168.7.1) in a web browser to begin configuration. + +### Supported +- Windows +- Mac +- Linux +- SteamOS +- iPadOS + +### Not supported + - Android + - iOS + +:::note + +Linux distributions may need some extra steps to access the web configurator; see [Linux Setup](#linux-setup). + +::: + +## Linux Setup + +When you plug in your controller while holding , you should see it connect in the kernel logs if you run `dmesg`: + +```sh +[ 72.291060] usb 1-3: new full-speed USB device number 12 using xhci_hcd +[ 72.450166] usb 1-3: New USB device found, idVendor=cafe, idProduct=4028, bcdDevice= 1.01 +[ 72.450172] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 +[ 72.450174] usb 1-3: Product: TinyUSB Device +[ 72.450176] usb 1-3: Manufacturer: TinyUSB +[ 72.450177] usb 1-3: SerialNumber: 123456 +[ 72.484285] rndis_host 1-3:1.0 usb0: register 'rndis_host' at usb-0000:06:00.1-3, RNDIS device, 02:02:84:6a:96:00 +[ 72.498630] rndis_host 1-3:1.0 enp6s0f1u3: renamed from usb0 +``` + +In the above example, **enp6s0f1u3** is the virtual Ethernet interface for your controller. If you don't see the first `rndis_host` line, make sure `CONFIG_USB_NET_RNDIS_HOST` is compiled in your kernel or as a module. + +The web configurator is automatically running, you just need to be able to reach it. Some configurations automatically set up the route, so try [http://192.168.7.1](http://192.168.7.1) in your browser now. If it doesn't load, try configuring an IP for the interface manually via: `sudo ifconfig enp6s0f1u3 192.168.7.2`. + +Whether or not you had to add an IP manually, you should end up with a route something like this: + +```sh +% ip route +default via 10.0.5.1 dev enp5s0 proto dhcp src 10.0.5.38 metric 2 +10.0.5.0/24 dev enp5s0 proto dhcp scope link src 10.0.5.38 metric 2 +192.168.7.0/24 dev enp6s0f1u3 proto kernel scope link src 192.168.7.2 <--- +``` + +Then the configurator should be reachable in your browser. diff --git a/docusaurus.config.js b/docusaurus.config.js index a9d56ab..406e52c 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,181 +1,181 @@ -// @ts-check -// Note: type annotations allow type checking and IDEs autocompletion - -const lightCodeTheme = require("prism-react-renderer").themes.github; -const darkCodeTheme = require("prism-react-renderer").themes.dracula; - -const releaseVersion = "0.7.8"; - -/** @type {import('@docusaurus/types').Config} */ -const config = { - title: "GP2040-CE", - tagline: "Community Edition Firmware", - favicon: "img/favicon.ico", - - url: "https://gp2040-ce.info", - baseUrl: "/", - - organizationName: "OpenStickCommunity", - projectName: "GP2040-CE", - - onBrokenLinks: "throw", - onBrokenMarkdownLinks: "warn", - - i18n: { - defaultLocale: "en", - locales: ["en"], - }, - markdown: { - mermaid: true, - }, - presets: [ - [ - "classic", - /** @type {import('@docusaurus/preset-classic').Options} */ - ({ - docs: { - sidebarPath: require.resolve("./sidebars.js"), - routeBasePath: "/", - }, - blog: false, - theme: { - customCss: require.resolve("./src/css/custom.css"), - }, - }), - ], - ], - themes: [ - [ - "@easyops-cn/docusaurus-search-local", - { - hashed: true, - highlightSearchTermsOnTargetPage: true, - docsRouteBasePath: "/", - indexBlog: false, - }, - ], - "@docusaurus/theme-mermaid", - ], - themeConfig: - /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ - ({ - colorMode: { - defaultMode: "light", - disableSwitch: false, - respectPrefersColorScheme: true, - }, - announcementBar: { - id: "new_release", - content: `New Version Available! To get the v${releaseVersion} update, go to GP2040-CE Releases`, - backgroundColor: "#ec008c", - textColor: "#FFFFFF", - isCloseable: true, - }, - navbar: { - logo: { - alt: "GP2040-CE Logo", - src: "img/gp2040-ce-logo.png", - }, - items: [ - { - type: "docSidebar", - position: "right", - sidebarId: "docSidebar", - label: "Documentation", - docId: "introduction", - }, - { - type: "docSidebar", - position: "right", - sidebarId: "webConfigSidebar", - label: "Web Config", - docId: "introduction", - }, - { - to: "/development/contribution-guide", - label: "Contribute", - position: "right", - // activeBaseRegex: `/development/`, - }, - { - position: "right", - to: "/downloads", - label: "Downloads", - }, - // { - // type: "docsVersionDropdown", - // position: "left", - // dropdownActiveClassDisabled: true, - // }, - { - "aria-label": "Discord Invite", - className: "navbar-discord-link", - href: "https://discord.gg/k2pxhke7q8", - position: "right", - }, - { - "aria-label": "GitHub Repository", - className: "navbar-github-link", - href: "https://github.com/OpenStickCommunity/GP2040-CE", - position: "right", - }, - ], - }, - docs: { - sidebar: { - hideable: true, - autoCollapseCategories: false, - }, - }, - prism: { - theme: lightCodeTheme, - darkTheme: darkCodeTheme, - }, - }), - plugins: [ - [ - "docusaurus-plugin-remote-content", - { - // options here - name: "README", // used by CLI, must be path safe - sourceBaseUrl: - "https://raw.githubusercontent.com/OpenStickCommunity/GP2040-CE/main/", // the base url for the markdown (gets prepended to all of the documents when fetching) - outDir: "/", // the base directory to output to. - documents: ["README.md"], // the file names to download - performCleanup: false, - modifyContent(filename, content) { - if (filename.includes("README")) { - return content; // <-- this last part adds in the rest of the content, which would otherwise be discarded - } - - // we don't want to modify this item, since it doesn't contain "README" in the name - return undefined; - }, - }, - ], - [ - "@docusaurus/plugin-client-redirects", - { - redirects: [ - { - // Redirect for console compatibility update - to: "/faq/faq-console-compatibility", - from: ["/faq/faq-ps4-ps5-compatibility"], - }, - ], - }, - ], - [ - "content-docs", - { - id: "development", - path: "development", - routeBasePath: "development", - editCurrentVersion: true, - sidebarPath: "./sidebarsDevelopment.json", - }, - ], - ], -}; - -module.exports = config; +// @ts-check +// Note: type annotations allow type checking and IDEs autocompletion + +const lightCodeTheme = require("prism-react-renderer").themes.github; +const darkCodeTheme = require("prism-react-renderer").themes.dracula; + +const releaseVersion = "0.7.8"; + +/** @type {import('@docusaurus/types').Config} */ +const config = { + title: "GP2040-CE", + tagline: "Community Edition Firmware", + favicon: "img/favicon.ico", + + url: "https://gp2040-ce.info", + baseUrl: "/", + + organizationName: "OpenStickCommunity", + projectName: "GP2040-CE", + + onBrokenLinks: "throw", + onBrokenMarkdownLinks: "warn", + + i18n: { + defaultLocale: "en", + locales: ["en"], + }, + markdown: { + mermaid: true, + }, + presets: [ + [ + "classic", + /** @type {import('@docusaurus/preset-classic').Options} */ + ({ + docs: { + sidebarPath: require.resolve("./sidebars.js"), + routeBasePath: "/", + }, + blog: false, + theme: { + customCss: require.resolve("./src/css/custom.css"), + }, + }), + ], + ], + themes: [ + [ + "@easyops-cn/docusaurus-search-local", + { + hashed: true, + highlightSearchTermsOnTargetPage: true, + docsRouteBasePath: "/", + indexBlog: false, + }, + ], + "@docusaurus/theme-mermaid", + ], + themeConfig: + /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ + ({ + colorMode: { + defaultMode: "light", + disableSwitch: false, + respectPrefersColorScheme: true, + }, + announcementBar: { + id: "new_release", + content: `New Version Available! To get the v${releaseVersion} update, go to GP2040-CE Releases`, + backgroundColor: "#ec008c", + textColor: "#FFFFFF", + isCloseable: true, + }, + navbar: { + logo: { + alt: "GP2040-CE Logo", + src: "img/gp2040-ce-logo.png", + }, + items: [ + { + type: "docSidebar", + position: "right", + sidebarId: "docSidebar", + label: "Documentation", + docId: "introduction", + }, + { + type: "docSidebar", + position: "right", + sidebarId: "webConfigSidebar", + label: "Web Config", + docId: "introduction", + }, + { + to: "/development/contribution-guide", + label: "Contribute", + position: "right", + // activeBaseRegex: `/development/`, + }, + { + position: "right", + to: "/downloads", + label: "Downloads", + }, + // { + // type: "docsVersionDropdown", + // position: "left", + // dropdownActiveClassDisabled: true, + // }, + { + "aria-label": "Discord Invite", + className: "navbar-discord-link", + href: "https://discord.gg/k2pxhke7q8", + position: "right", + }, + { + "aria-label": "GitHub Repository", + className: "navbar-github-link", + href: "https://github.com/OpenStickCommunity/GP2040-CE", + position: "right", + }, + ], + }, + docs: { + sidebar: { + hideable: true, + autoCollapseCategories: false, + }, + }, + prism: { + theme: lightCodeTheme, + darkTheme: darkCodeTheme, + }, + }), + plugins: [ + [ + "docusaurus-plugin-remote-content", + { + // options here + name: "README", // used by CLI, must be path safe + sourceBaseUrl: + "https://raw.githubusercontent.com/OpenStickCommunity/GP2040-CE/main/", // the base url for the markdown (gets prepended to all of the documents when fetching) + outDir: "/", // the base directory to output to. + documents: ["README.md"], // the file names to download + performCleanup: false, + modifyContent(filename, content) { + if (filename.includes("README")) { + return content; // <-- this last part adds in the rest of the content, which would otherwise be discarded + } + + // we don't want to modify this item, since it doesn't contain "README" in the name + return undefined; + }, + }, + ], + [ + "@docusaurus/plugin-client-redirects", + { + redirects: [ + { + // Redirect for console compatibility update + to: "/faq/faq-console-compatibility", + from: ["/faq/faq-ps4-ps5-compatibility"], + }, + ], + }, + ], + [ + "content-docs", + { + id: "development", + path: "development", + routeBasePath: "development", + editCurrentVersion: true, + sidebarPath: "./sidebarsDevelopment.json", + }, + ], + ], +}; + +module.exports = config; diff --git a/sidebars.js b/sidebars.js index d2d1de7..4dad869 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1,75 +1,75 @@ -/** - * Creating a sidebar enables you to: - - create an ordered group of docs -- render a sidebar for each doc of that group -- provide next/previous navigation - -The sidebars can be generated from the filesystem, or explicitly defined here. - -Create as many sidebars as you want. -*/ - -// @ts-check - -/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ -const sidebars = { - // By default, Docusaurus generates a sidebar from the docs folder structure - // tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], - - // But you can create a sidebar manually - docSidebar: [ - { - type: "category", - label: "General", - collapsed: false, - items: [ - "introduction", - "installation", - "usage", - "hotkeys", - { - type: "ref", - label: "Web Configurator", - id: "web-configurator/web-configurator", - }, - "rgb-leds", - "getting-help-support", - ], - }, - { - type: "category", - label: "FAQ", - collapsed: false, - items: [ - "faq/faq-general", - "faq/faq-console-compatibility", - "faq/faq-troubleshooting", - ], - }, - { - type: "category", - label: "Controller Building", - collapsed: false, - items: ["controller-build/wiring", "controller-build/usb-host"], - }, - ], - webConfigSidebar: [ - "web-configurator/web-configurator", - { - type: "category", - label: "Web Configurator Menu", - collapsed: false, - items: [ - { type: "autogenerated", dirName: "web-configurator/menu-pages" }, - ], - }, - { - type: "category", - label: "Add-Ons", - collapsed: false, - items: [{ type: "autogenerated", dirName: "add-ons" }], - }, - ], -}; - -module.exports = sidebars; +/** + * Creating a sidebar enables you to: + - create an ordered group of docs +- render a sidebar for each doc of that group +- provide next/previous navigation + +The sidebars can be generated from the filesystem, or explicitly defined here. + +Create as many sidebars as you want. +*/ + +// @ts-check + +/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ +const sidebars = { + // By default, Docusaurus generates a sidebar from the docs folder structure + // tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], + + // But you can create a sidebar manually + docSidebar: [ + { + type: "category", + label: "General", + collapsed: false, + items: [ + "introduction", + "installation", + "usage", + "hotkeys", + { + type: "ref", + label: "Web Configurator", + id: "web-configurator/web-configurator", + }, + "rgb-leds", + "getting-help-support", + ], + }, + { + type: "category", + label: "FAQ", + collapsed: false, + items: [ + "faq/faq-general", + "faq/faq-console-compatibility", + "faq/faq-troubleshooting", + ], + }, + { + type: "category", + label: "Controller Building", + collapsed: false, + items: ["controller-build/wiring", "controller-build/usb-host"], + }, + ], + webConfigSidebar: [ + "web-configurator/web-configurator", + { + type: "category", + label: "Web Configurator Menu", + collapsed: false, + items: [ + { type: "autogenerated", dirName: "web-configurator/menu-pages" }, + ], + }, + { + type: "category", + label: "Add-Ons", + collapsed: false, + items: [{ type: "autogenerated", dirName: "add-ons" }], + }, + ], +}; + +module.exports = sidebars; diff --git a/src/components/Download.tsx b/src/components/Download.tsx index 40e6c4b..e0b1a62 100644 --- a/src/components/Download.tsx +++ b/src/components/Download.tsx @@ -1,88 +1,88 @@ -import React, { useEffect } from 'react'; -import styles from './download.module.css'; -import LinkIcon from './LinkIcon'; -import boards from '../config/boards'; -import { useGitHubInfo } from '../hooks/useGitHubInfo'; - -const createDownloadLink = ({ releaseVersion, configName }) => - releaseVersion - ? `https://github.com/OpenStickCommunity/GP2040-CE/releases/download/${releaseVersion}/GP2040-CE_${releaseVersion.substring( - 1 - )}_${configName}.uf2` - : ''; - -const RenderDownloadBox = ({ - name, - configName, - pinout, - desc, - image, - website, -}) => { - const releaseVersion = useGitHubInfo((state) => state.releaseVersion); - return ( -
- -
-

{name}

-
-
    - - - -
-
-
{desc()}
-
-
- ); -}; - -const Container = ({ children }) => { - const getInfo = useGitHubInfo((state) => state.getInfo); - useEffect(() => { - getInfo(); - }, []); - return
{children}
; -}; - -export const Microcontrollers = () => ( - - {boards['Microcontroller Boards'].map(RenderDownloadBox)} - -); - -export const OfficialDevices = () => ( - - {boards['Community Devices'] - .filter((config) => config.category === 'official') - .map(RenderDownloadBox)} - -); - -export const OpenSourceDevices = () => ( - - {boards['Community Devices'] - .filter((config) => config.category === 'open') - .map(RenderDownloadBox)} - -); - -export const ClosedSourceDevices = () => ( - - {boards['Community Devices'] - .filter((config) => config.category === 'closed') - .map(RenderDownloadBox)} - -); - -export const LegacyDevices = () => ( - - {boards['Community Devices'] - .filter((config) => config.category === 'legacy') - .map(RenderDownloadBox)} - -); +import React, { useEffect } from 'react'; +import styles from './download.module.css'; +import LinkIcon from './LinkIcon'; +import boards from '../config/boards'; +import { useGitHubInfo } from '../hooks/useGitHubInfo'; + +const createDownloadLink = ({ releaseVersion, configName }) => + releaseVersion + ? `https://github.com/OpenStickCommunity/GP2040-CE/releases/download/${releaseVersion}/GP2040-CE_${releaseVersion.substring( + 1 + )}_${configName}.uf2` + : ''; + +const RenderDownloadBox = ({ + name, + configName, + pinout, + desc, + image, + website, +}) => { + const releaseVersion = useGitHubInfo((state) => state.releaseVersion); + return ( +
+ +
+

{name}

+
+
    + + + +
+
+
{desc()}
+
+
+ ); +}; + +const Container = ({ children }) => { + const getInfo = useGitHubInfo((state) => state.getInfo); + useEffect(() => { + getInfo(); + }, []); + return
{children}
; +}; + +export const Microcontrollers = () => ( + + {boards['Microcontroller Boards'].map(RenderDownloadBox)} + +); + +export const OfficialDevices = () => ( + + {boards['Community Devices'] + .filter((config) => config.category === 'official') + .map(RenderDownloadBox)} + +); + +export const OpenSourceDevices = () => ( + + {boards['Community Devices'] + .filter((config) => config.category === 'open') + .map(RenderDownloadBox)} + +); + +export const ClosedSourceDevices = () => ( + + {boards['Community Devices'] + .filter((config) => config.category === 'closed') + .map(RenderDownloadBox)} + +); + +export const LegacyDevices = () => ( + + {boards['Community Devices'] + .filter((config) => config.category === 'legacy') + .map(RenderDownloadBox)} + +); diff --git a/src/components/LabelSelector.tsx b/src/components/LabelSelector.tsx index 23d0bef..a45a983 100644 --- a/src/components/LabelSelector.tsx +++ b/src/components/LabelSelector.tsx @@ -1,243 +1,243 @@ -import React from 'react'; -import Select from 'react-select'; -import { create } from 'zustand'; -import styles from '@site/src/components/labelselector.module.css'; -import { persist } from 'zustand/middleware'; - -const inputLabels = [ - { value: 'GP2040', label: 'GP2040' }, - { value: 'XInput', label: 'XInput' }, - { value: 'DirectInput', label: 'DirectInput' }, - { value: 'Nintendo Switch', label: 'Nintendo Switch' }, - { value: 'PS3', label: 'PS3' }, - { value: 'PS4', label: 'PS4' }, - { value: 'Arcade', label: 'Arcade' }, -]; - -const labelData = { - GP2040: { - name: 'GP2040', - Up: 'Up', - Down: 'Down', - Left: 'Left', - Right: 'Right', - B1: 'B1', - B2: 'B2', - B3: 'B3', - B4: 'B4', - L1: 'L1', - R1: 'R1', - L2: 'L2', - R2: 'R2', - S1: 'S1', - S2: 'S2', - L3: 'L3', - R3: 'R3', - A1: 'A1', - A2: 'A2', - Function: 'Function', - }, - XInput: { - name: 'XInput', - Up: 'Up', - Down: 'Down', - Left: 'Left', - Right: 'Right', - B1: 'A', - B2: 'B', - B3: 'X', - B4: 'Y', - L1: 'LB', - R1: 'RB', - L2: 'LT', - R2: 'RT', - S1: 'Back', - S2: 'Start', - L3: 'LS', - R3: 'RS', - A1: 'Guide', - A2: '(A2)', - Function: 'Function', - }, - DirectInput: { - name: 'DirectInput', - Up: 'Up', - Down: 'Down', - Left: 'Left', - Right: 'Right', - B1: '2', - B2: '3', - B3: '1', - B4: '4', - L1: '5', - R1: '6', - L2: '7', - R2: '8', - S1: '9', - S2: '10', - L3: '11', - R3: '12', - A1: '13', - A2: '14', - Function: 'Function', - }, - 'Nintendo Switch': { - name: 'Nintendo Switch', - Up: 'Up', - Down: 'Down', - Left: 'Left', - Right: 'Right', - B1: 'B', - B2: 'A', - B3: 'Y', - B4: 'X', - L1: 'L', - R1: 'R', - L2: 'ZL', - R2: 'ZR', - S1: 'Minus', - S2: 'Plus', - L3: 'LS', - R3: 'RS', - A1: 'Home', - A2: 'Capture', - Function: 'Function', - }, - PS4: { - name: 'PS4', - Up: 'Up', - Down: 'Down', - Left: 'Left', - Right: 'Right', - B1: 'Cross', - B2: 'Circle', - B3: 'Square', - B4: 'Triangle', - L1: 'L1', - R1: 'R1', - L2: 'L2', - R2: 'R2', - S1: 'Share', - S2: 'Options', - L3: 'L3', - R3: 'R3', - A1: 'PS', - A2: 'Touchpad', - Function: 'Function', - }, - PS3: { - name: 'PS3', - Up: 'Up', - Down: 'Down', - Left: 'Left', - Right: 'Right', - B1: 'Cross', - B2: 'Circle', - B3: 'Square', - B4: 'Triangle', - L1: 'L1', - R1: 'R1', - L2: 'L2', - R2: 'R2', - S1: 'Select', - S2: 'Start', - L3: 'L3', - R3: 'R3', - A1: 'PS', - A2: '(A2)', - Function: 'Function', - }, - Arcade: { - name: 'Arcade', - Up: 'Up', - Down: 'Down', - Left: 'Left', - Right: 'Right', - B1: 'K1', - B2: 'K2', - B3: 'P1', - B4: 'P2', - L1: 'P4', - R1: 'P3', - L2: 'K4', - R2: 'K3', - S1: 'Select', - S2: 'Start', - L3: 'LS', - R3: 'RS', - A1: 'Home', - A2: '(A2)', - Function: 'Function', - }, -} as const; - -type SelectedType = { value: string; label: string }; - -type State = { - selected: SelectedType; -}; - -type Actions = { - select: (value: SelectedType) => void; -}; - -const INITIAL_STATE: State = { - selected: inputLabels[0], -}; - -const useLabelSelector = create()( - persist( - (set) => ({ - ...INITIAL_STATE, - select: (selected) => { - set({ selected }); - }, - }), - { name: 'SelectedLabel' }, - ), -); - -const customStyles = { - option: (styles, { data, isDisabled, isSelected }) => { - const color = 0x000000; - return { - ...styles, - color: isDisabled ? '#ccc' : isSelected ? 'white' : 'black', - ':active': { - ...styles[':active'], - backgroundColor: !isDisabled - ? isSelected - ? data.color - : color - : undefined, - }, - }; - }, -}; - -export default function InputLabelSelector() { - const { selected, select } = useLabelSelector(); - return ( - select(option as SelectedType)} + styles={customStyles} + /> + ); +} + +export function Hotkey({ buttons }) { + const selected = useLabelSelector((state) => state.selected); + + const hotKeyCombo = buttons + .map((input) => labelData[selected.value][input]) + .join(' + '); + + return ( +
+ {hotKeyCombo} + + ); +} diff --git a/src/components/LinkIcon.tsx b/src/components/LinkIcon.tsx index af10ed4..6b7b62f 100644 --- a/src/components/LinkIcon.tsx +++ b/src/components/LinkIcon.tsx @@ -1,37 +1,37 @@ -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import React from 'react'; -import { - faFileDownload, - faGamepad, - faGlobe, - faX, -} from '@fortawesome/free-solid-svg-icons'; -import { icon, text } from '@fortawesome/fontawesome-svg-core'; - -const icons = { - Download: faFileDownload, - Pinout: faGamepad, - Website: faGlobe, -} as const; - -type LinkIconTypes = { - link: string; - text: keyof typeof icons; -}; - -const LinkIcon = ({ link, text }: LinkIconTypes) => { - if(link === null) { - return null; - } else{ - return( -
  • - - - {text} - -
  • - ) - } -} - -export default LinkIcon; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import React from 'react'; +import { + faFileDownload, + faGamepad, + faGlobe, + faX, +} from '@fortawesome/free-solid-svg-icons'; +import { icon, text } from '@fortawesome/fontawesome-svg-core'; + +const icons = { + Download: faFileDownload, + Pinout: faGamepad, + Website: faGlobe, +} as const; + +type LinkIconTypes = { + link: string; + text: keyof typeof icons; +}; + +const LinkIcon = ({ link, text }: LinkIconTypes) => { + if(link === null) { + return null; + } else{ + return( +
  • + + + {text} + +
  • + ) + } +} + +export default LinkIcon; diff --git a/src/components/download.module.css b/src/components/download.module.css index a98d72c..987801d 100644 --- a/src/components/download.module.css +++ b/src/components/download.module.css @@ -1,71 +1,71 @@ -.row { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - grid-column-gap: 1em; - grid-row-gap: 1em; -} - -.box { - border-radius: 1em; - overflow: hidden; - background-color: var(--ifm-color-secondary); - border: 1px solid var(--ifm-background-color); -} -.boxImage { - width: 100%; - overflow: hidden; -} - -.boxInfo { - padding: 1em; - color: var(--ifm-color-gray-900); -} - -.boxTitle { - text-align: center; - min-height: 56.2667px; - color: var(--ifm-color-primary); -} - -.downloadLinks { - display: flex; - list-style: none; - justify-content: space-around; - margin: 0; - padding: 0; - padding-bottom: 0.75rem; -} - -.downloadLinks li { - font-weight: 600; - margin-top: 0 !important; -} - -.downloadLinks li a { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - text-decoration: none; - font-size: 0.85rem; -} - -.downloadLinks li a:hover { - color: var(--theme-color); -} - -.downloadLinks li a i { - height: 1rem; -} - -@media screen and (max-width: 500px) { - .row { - grid-template-columns: 1fr; - } -} - -@media screen and (max-width: 900px) { - .download-category-list { - grid-template-columns: 1fr 1fr 1fr; - } +.row { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + grid-column-gap: 1em; + grid-row-gap: 1em; +} + +.box { + border-radius: 1em; + overflow: hidden; + background-color: var(--ifm-color-secondary); + border: 1px solid var(--ifm-background-color); +} +.boxImage { + width: 100%; + overflow: hidden; +} + +.boxInfo { + padding: 1em; + color: var(--ifm-color-gray-900); +} + +.boxTitle { + text-align: center; + min-height: 56.2667px; + color: var(--ifm-color-primary); +} + +.downloadLinks { + display: flex; + list-style: none; + justify-content: space-around; + margin: 0; + padding: 0; + padding-bottom: 0.75rem; +} + +.downloadLinks li { + font-weight: 600; + margin-top: 0 !important; +} + +.downloadLinks li a { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + text-decoration: none; + font-size: 0.85rem; +} + +.downloadLinks li a:hover { + color: var(--theme-color); +} + +.downloadLinks li a i { + height: 1rem; +} + +@media screen and (max-width: 500px) { + .row { + grid-template-columns: 1fr; + } +} + +@media screen and (max-width: 900px) { + .download-category-list { + grid-template-columns: 1fr 1fr 1fr; + } } \ No newline at end of file diff --git a/src/components/labelselector.module.css b/src/components/labelselector.module.css index e85f84c..b12cea3 100644 --- a/src/components/labelselector.module.css +++ b/src/components/labelselector.module.css @@ -1,3 +1,3 @@ -.labelSelector { - position: inherit; +.labelSelector { + position: inherit; } \ No newline at end of file diff --git a/src/config/boards.tsx b/src/config/boards.tsx index 294113c..574cf75 100644 --- a/src/config/boards.tsx +++ b/src/config/boards.tsx @@ -1,475 +1,475 @@ -import React from 'react'; - -const boards = { - 'Microcontroller Boards': [ - { - name: 'Raspberry Pi Pico', - configName: 'Pico', - pinout: '/controller-build/wiring#raspberry-pi-pico', - website: 'https://www.raspberrypi.com/products/raspberry-pi-pico/', - image: '/img/boards/Pico.jpg', - supported: true, - desc: () => ( -

    - The Raspberry Pi Pico is a powerful, low-cost board based on the - Raspberry Pi RP2040 microcontroller. This build is the reference - implementation for GP2040-CE. -

    - ), - }, - { - name: 'Raspberry Pi Pico W', - configName: 'PicoW', - pinout: '/controller-build/wiring#raspberry-pi-pico', - website: 'https://www.raspberrypi.com/products/raspberry-pi-pico/', - image: '/img/boards/PicoW.jpg', - supported: true, - desc: () => ( -

    - The Raspberry Pi Pico W is a powerful, low-cost board based on the - Raspberry Pi RP2040 microcontroller. -

    - ), - }, - { - name: 'Adafruit KB2040', - configName: 'KB2040', - pinout: '/controller-build/wiring#adafruit-kb2040', - website: 'https://learn.adafruit.com/adafruit-kb2040', - image: '/img/boards/KB2040.jpg', - supported: true, - desc: () => ( -

    - Another RP2040 board in the Pro Micro form factor, with 2 additional - pins for USB data. This build is configured for DIY gamepad mods. -

    - ), - }, - { - name: 'Liatris', - configName: 'SparkFunProMicro', - pinout: '/controller-build/wiring#sparkfun-pro-micro---rp2040', - website: - 'https://splitkb.com/products/liatris', - image: '/img/boards/Liatris.jpg', - supported: true, - desc: () => ( -

    - Drop in RP2040 replacement for Pro Micro builds by {' '} - - SplitKB.com - - . -

    - ), - }, - { - name: 'SparkFun Pro Micro', - configName: 'SparkFunProMicro', - pinout: '/controller-build/wiring#sparkfun-pro-micro---rp2040', - website: - 'https://learn.sparkfun.com/tutorials/pro-micro-rp2040-hookup-guide', - image: '/img/boards/SparkFunProMicro.jpg', - supported: true, - desc: () => ( -

    - An RP2040 board in the Pro Micro form factor. This build is a drop-in - replacement for the{' '} - - Daemonbite Arcade Encoder - - . -

    - ), - }, - { - name: 'Waveshare RP2040-Zero', - configName: 'WaveshareZero', - pinout: '/controller-build/wiring#waveshare-rp2040-zero', - website: 'https://www.waveshare.com/wiki/RP2040-Zero', - image: '/img/boards/WaveshareZero.jpg', - supported: true, - desc: () => ( -

    - The{' '} - - Waveshare RP2040-Zero - {' '} - is a small form factor board with castellated pins and USB-C, making - this a popular choice for custom built PCBs without the need for SMT - assembly. -

    - ), - }, - ], - 'Community Devices': [ - { - name: 'Flatbox Rev 4', - configName: 'FlatboxRev4', - pinout: null, - website: 'https://github.com/jfedor2/flatbox/tree/master/hardware-rev4', - image: '/img/boards/FlatboxRev4.jpg', - category: 'open', - desc: () => ( -

    - Stickless PCB designed by{' '} - jfedor2 using an embedded - RP2040 chip. -

    - ), - }, - { - name: 'Flatbox Rev 5', - configName: 'FlatboxRev5', - pinout: null, - website: 'https://github.com/jfedor2/flatbox/tree/master/hardware-rev5', - image: '/img/boards/FlatboxRev5.jpg', - category: 'open', - desc: () => ( -

    - Stickless PCB designed by{' '} - jfedor2 using the Waveshare - RP2040-Zero. -

    - ), - }, - { - name: 'Flatbox Rev 5 Southpaw', - configName: 'FlatboxRev5Southpaw', - pinout: null, - website: 'https://github.com/SkylaHila/flatbox-southpaw', - image: '/img/boards/FlatboxRev5Southpaw.jpg', - category: 'open', - desc: () => ( -

    - Mirrored version of the Flatbox Rev 5 by SkylaHila. Based on the Flatbox Rev 5 by - jfedor2. -

    - ), - }, - { - name: 'Flatbox Rev 5 RGB', - configName: 'FlatboxRev5RGB', - pinout: null, - website: - 'https://github.com/OpenStickCommunity/Hardware/tree/main/Flatbox%20Rev%205%20RGB', - image: '/img/boards/FlatboxRev5RGB.jpg', - category: 'open', - desc: () => ( -

    - Stickless PCB designed by{' '} - jfedor2 and{' '} - TheTrain using the - Waveshare RP2040-Zero. -

    - ), - }, - { - name: 'GP2040-CE Keyboard Converter', - configName: 'KeyboardConverter', - pinout: null, - website: - 'https://github.com/OpenStickCommunity/Hardware/blob/main/GP2040%20Keyboard%20Converter/Waveshare%20Zero-PCB/README.md', - image: '/img/boards/KeyboardConverter.jpg', - category: 'open', - desc: () => ( -

    - The GP2040-CE Keyboard Converter Case is designed to be a USB Host - Device for the use of a keyboard with the GP2040-CE project. -

    - ), - }, - { - name: 'Granola Summit', - configName: 'Granola', - pinout: null, - website: 'https://granola.games/collections/controllers', - image: '/img/boards/Granola.jpg', - category: 'open', - desc: () => ( -

    - Configuration for the {' '} - - Granola Summit - - . PCB and design files can be found here. -

    - ), - }, - { - name: 'Haute42 Series', - configName: 'Haute42COSMOX', - pinout: null, - website: 'https://haute42.com/', - image: '/img/boards/Haute42.jpg', - category: 'closed', - desc: () => ( -

    - Configuration for the {' '} - - Haute42 Series - - . The Haute42 products are all compatible with the same configuration file. - These products include the Haute42 Pad M Series, T Series, G Series, and mini. -

    - ), - }, - { - name: 'Mavercade', - configName: 'Mavercade', - pinout: null, - website: - 'https://mavercade.com/', - image: '/img/boards/MavercadeKeebfighter.jpg', - category: 'closed', - desc: () => ( -

    - Configuration for the{' '} - - Mavercade - - . These revisions use a Waveshare RP2040-Zero board. -

    - ), - }, { - name: 'Open Core0', - configName: 'OpenCore0', - pinout: null, - website: - 'https://github.com/OpenStickCommunity/Hardware/tree/main/Open_Core0', - image: '/img/boards/OpenCore0.jpg', - category: 'official', - desc: () => ( -

    - Open source stickless controller designed by {' '} - - TheTrain - . -

    - ), - }, - { - name: 'Open Core0 WASD', - configName: 'OpenCore0WASD', - pinout: null, - website: - 'https://github.com/OpenStickCommunity/Hardware/tree/main/Open_Core0', - image: '/img/boards/OpenCore0WASD.jpg', - category: 'official', - desc: () => ( -

    - Open source stickless WASD controller designed by {' '} - - TheTrain - . -

    - ), - }, - { - name: 'Pico Fighting Board', - configName: 'PicoFightingBoard', - pinout: null, - website: 'https://github.com/FeralAI/PicoFightingBoard', - image: '/img/boards/PicoFightingBoard.jpg', - category: 'open', - desc: () => ( -

    - Arcade encoder board designed by {' '} - FeralAI using a Raspberry Pi - Pico or pin-equivalent RP2040 board. -

    - ), - }, - { - name: 'Rana Tadpole', - configName: 'RanaTadpole', - pinout: null, - website: 'https://github.com/rana-sylvatica/rana-tadpole', - image: '/img/boards/RanaTadpole.jpg', - category: 'open', - desc: () => ( -

    - Pocket-sized digital controller from RanaLabs. -

    - ), - }, - { - name: 'Reflex Encode v1.2', - configName: 'ReflexEncodeV1.2', - pinout: null, - website: 'https://github.com/misteraddons/ReflexFightingBoard', - image: '/img/boards/ReflexEncode_v1.2.jpg', - category: 'open', - desc: () => ( -

    - Arcade encoder board designed and sold by{' '} - MiSTerAddons using an - embedded RP2040 chip. -

    - ), - }, - { - name: 'Reflex Encode v2.0', - configName: 'ReflexEncodeV2.0', - pinout: null, - website: 'https://github.com/misteraddons/ReflexFightingBoard', - image: '/img/boards/ReflexEncode_v2.0.jpg', - category: 'open', - desc: () => ( -

    - Arcade encoder board designed and sold by {' '} - MiSTerAddons using an - embedded RP2040 chip. -

    - ), - }, - { - name: 'Reflex CTRL SNES', - configName: 'ReflexCtrlSNES', - pinout: null, - website: 'https://github.com/misteraddons/Reflex-CTRL', - image: '/img/boards/ReflexCtrlSNES.jpg', - category: 'open', - desc: () => ( -

    - Reflex Board Open source PCB for SNES Controller replacement PCBs - designed and sold by{' '} - MiSTerAddons using an - embedded RP2040 chip. -

    - ), - }, - { - name: 'RP2040 Advanced Breakout', - configName: 'RP2040AdvancedBreakoutBoard', - pinout: null, - website: - 'https://github.com/OpenStickCommunity/Hardware/tree/main/RP2040%20Advanced%20Breakout%20Board', - image: '/img/boards/RP2040AdvancedBreakoutBoard.jpg', - category: 'official', - desc: () => ( -

    - Arcade encoder board designed by {' '} - TheTrain using an - embedded RP2040, and is the official board of the GP2040-CE project. -

    - ), - }, - { - name: 'RP2040 Advanced Breakout (USB Passthrough)', - configName: 'RP2040AdvancedBreakoutBoardUSBPassthrough', - pinout: null, - website: 'https://github.com/OpenStickCommunity/Hardware/tree/main/RP2040%20Advanced%20Breakout%20Board%20-%20Passthrough', - image: '/img/boards/RP2040AdvancedBreakoutBoardUSBPassthrough.jpg', - category: 'official', - desc: () => -

    - Official USB Passthrough Board of the Open Stick project. Updated version of - the RP2040 Advanced Breakout Board with USB passthrough included on the board. -

    , - }, - { - name: 'RP2040 Mini Breakout Board', - configName: 'RP2040MiniBreakoutBoard', - pinout: null, - website: - 'https://github.com/OpenStickCommunity/Hardware/tree/main/RP2040%20Mini%20Breakout%20Board', - image: '/img/boards/RP2040MiniBreakoutBoard.jpg', - category: 'open', - desc: () => ( -

    - A reduced-footprint spin off of the RP2040 Advanced Breakout Board designed by {' '} - - TheTrain - . -

    - ), - }, - { - name: 'ScrubTier BentoBox', - configName: 'BentoBox', - pinout: null, - website: - 'https://github.com/OpenStickCommunity/GP2040-CE/tree/main/configs/BentoBox', - image: '/img/boards/BentoBox.jpg', - category: 'closed', - desc: () => ( -

    - Configuration for the{' '} - - ScrubTier BentoBox v1 and v2 as well as the GGEZStick Keebfighters - - . -

    - ), - }, - { - name: 'SGF Bridget', - configName: 'SGFBridget', - pinout: null, - website: 'https://sgfdevices.com/products/sgf-bridget-mx-stickless-controller', - image: '/img/boards/SGFBridget.jpg', - category: 'open', - desc: () => ( -

    - The SGF Bridget MX stickless controller is based on the open-source - flatbox rev4 design by jfedor. -

    - ), - }, - { - name: 'SGF Faust', - configName: 'SGFFaust', - pinout: null, - website: 'https://sgfdevices.com/products/sgf-faust-all-button-controller', - image: '/img/boards/SGFFaust.jpg', - category: 'closed', - desc: () => ( -

    - The SGF Faust stickless controller is an all new design - from SGF Devices running on the open source GP2040-CE firmware. -

    - ), - }, - { - name: 'Stress', - configName: 'Stress', - pinout: null, - website: 'https://github.com/GroooveBob/Stress', - image: '/img/boards/Stress.jpg', - category: 'open', - desc: () => ( -

    - A small and portable PCB-as-a-controller designed by{' '} - GroooveBob using the - Waveshare RP-2040-Zero. -

    - ), - }, - { - name: 'thnikk Fightboard V3', - configName: 'FightboardV3', - pinout: null, - website: 'https://docs.thnikk.moe/models/fightboard/v3.html', - image: '/img/boards/FightboardV3.jpg', - category: 'legacy', - desc: () =>

    Configuration for the Fightboard v3

    , - }, - { - name: 'thnikk Fightboard V3 (Mirrored)', - configName: 'FightboardV3Mirrored', - pinout: null, - website: 'https://docs.thnikk.moe/models/fightboard/v3.html', - image: '/img/boards/FightboardV3Mirrored.jpg', - category: 'legacy', - desc: () => ( -

    - Configuration for the Fightboard v3 mirrored with directional inputs - on the right hand and the action buttons on the left. -

    - ), - }, - ], -}; - -export default boards; +import React from 'react'; + +const boards = { + 'Microcontroller Boards': [ + { + name: 'Raspberry Pi Pico', + configName: 'Pico', + pinout: '/controller-build/wiring#raspberry-pi-pico', + website: 'https://www.raspberrypi.com/products/raspberry-pi-pico/', + image: '/img/boards/Pico.jpg', + supported: true, + desc: () => ( +

    + The Raspberry Pi Pico is a powerful, low-cost board based on the + Raspberry Pi RP2040 microcontroller. This build is the reference + implementation for GP2040-CE. +

    + ), + }, + { + name: 'Raspberry Pi Pico W', + configName: 'PicoW', + pinout: '/controller-build/wiring#raspberry-pi-pico', + website: 'https://www.raspberrypi.com/products/raspberry-pi-pico/', + image: '/img/boards/PicoW.jpg', + supported: true, + desc: () => ( +

    + The Raspberry Pi Pico W is a powerful, low-cost board based on the + Raspberry Pi RP2040 microcontroller. +

    + ), + }, + { + name: 'Adafruit KB2040', + configName: 'KB2040', + pinout: '/controller-build/wiring#adafruit-kb2040', + website: 'https://learn.adafruit.com/adafruit-kb2040', + image: '/img/boards/KB2040.jpg', + supported: true, + desc: () => ( +

    + Another RP2040 board in the Pro Micro form factor, with 2 additional + pins for USB data. This build is configured for DIY gamepad mods. +

    + ), + }, + { + name: 'Liatris', + configName: 'SparkFunProMicro', + pinout: '/controller-build/wiring#sparkfun-pro-micro---rp2040', + website: + 'https://splitkb.com/products/liatris', + image: '/img/boards/Liatris.jpg', + supported: true, + desc: () => ( +

    + Drop in RP2040 replacement for Pro Micro builds by {' '} + + SplitKB.com + + . +

    + ), + }, + { + name: 'SparkFun Pro Micro', + configName: 'SparkFunProMicro', + pinout: '/controller-build/wiring#sparkfun-pro-micro---rp2040', + website: + 'https://learn.sparkfun.com/tutorials/pro-micro-rp2040-hookup-guide', + image: '/img/boards/SparkFunProMicro.jpg', + supported: true, + desc: () => ( +

    + An RP2040 board in the Pro Micro form factor. This build is a drop-in + replacement for the{' '} + + Daemonbite Arcade Encoder + + . +

    + ), + }, + { + name: 'Waveshare RP2040-Zero', + configName: 'WaveshareZero', + pinout: '/controller-build/wiring#waveshare-rp2040-zero', + website: 'https://www.waveshare.com/wiki/RP2040-Zero', + image: '/img/boards/WaveshareZero.jpg', + supported: true, + desc: () => ( +

    + The{' '} + + Waveshare RP2040-Zero + {' '} + is a small form factor board with castellated pins and USB-C, making + this a popular choice for custom built PCBs without the need for SMT + assembly. +

    + ), + }, + ], + 'Community Devices': [ + { + name: 'Flatbox Rev 4', + configName: 'FlatboxRev4', + pinout: null, + website: 'https://github.com/jfedor2/flatbox/tree/master/hardware-rev4', + image: '/img/boards/FlatboxRev4.jpg', + category: 'open', + desc: () => ( +

    + Stickless PCB designed by{' '} + jfedor2 using an embedded + RP2040 chip. +

    + ), + }, + { + name: 'Flatbox Rev 5', + configName: 'FlatboxRev5', + pinout: null, + website: 'https://github.com/jfedor2/flatbox/tree/master/hardware-rev5', + image: '/img/boards/FlatboxRev5.jpg', + category: 'open', + desc: () => ( +

    + Stickless PCB designed by{' '} + jfedor2 using the Waveshare + RP2040-Zero. +

    + ), + }, + { + name: 'Flatbox Rev 5 Southpaw', + configName: 'FlatboxRev5Southpaw', + pinout: null, + website: 'https://github.com/SkylaHila/flatbox-southpaw', + image: '/img/boards/FlatboxRev5Southpaw.jpg', + category: 'open', + desc: () => ( +

    + Mirrored version of the Flatbox Rev 5 by SkylaHila. Based on the Flatbox Rev 5 by + jfedor2. +

    + ), + }, + { + name: 'Flatbox Rev 5 RGB', + configName: 'FlatboxRev5RGB', + pinout: null, + website: + 'https://github.com/OpenStickCommunity/Hardware/tree/main/Flatbox%20Rev%205%20RGB', + image: '/img/boards/FlatboxRev5RGB.jpg', + category: 'open', + desc: () => ( +

    + Stickless PCB designed by{' '} + jfedor2 and{' '} + TheTrain using the + Waveshare RP2040-Zero. +

    + ), + }, + { + name: 'GP2040-CE Keyboard Converter', + configName: 'KeyboardConverter', + pinout: null, + website: + 'https://github.com/OpenStickCommunity/Hardware/blob/main/GP2040%20Keyboard%20Converter/Waveshare%20Zero-PCB/README.md', + image: '/img/boards/KeyboardConverter.jpg', + category: 'open', + desc: () => ( +

    + The GP2040-CE Keyboard Converter Case is designed to be a USB Host + Device for the use of a keyboard with the GP2040-CE project. +

    + ), + }, + { + name: 'Granola Summit', + configName: 'Granola', + pinout: null, + website: 'https://granola.games/collections/controllers', + image: '/img/boards/Granola.jpg', + category: 'open', + desc: () => ( +

    + Configuration for the {' '} + + Granola Summit + + . PCB and design files can be found here. +

    + ), + }, + { + name: 'Haute42 Series', + configName: 'Haute42COSMOX', + pinout: null, + website: 'https://haute42.com/', + image: '/img/boards/Haute42.jpg', + category: 'closed', + desc: () => ( +

    + Configuration for the {' '} + + Haute42 Series + + . The Haute42 products are all compatible with the same configuration file. + These products include the Haute42 Pad M Series, T Series, G Series, and mini. +

    + ), + }, + { + name: 'Mavercade', + configName: 'Mavercade', + pinout: null, + website: + 'https://mavercade.com/', + image: '/img/boards/MavercadeKeebfighter.jpg', + category: 'closed', + desc: () => ( +

    + Configuration for the{' '} + + Mavercade + + . These revisions use a Waveshare RP2040-Zero board. +

    + ), + }, { + name: 'Open Core0', + configName: 'OpenCore0', + pinout: null, + website: + 'https://github.com/OpenStickCommunity/Hardware/tree/main/Open_Core0', + image: '/img/boards/OpenCore0.jpg', + category: 'official', + desc: () => ( +

    + Open source stickless controller designed by {' '} + + TheTrain + . +

    + ), + }, + { + name: 'Open Core0 WASD', + configName: 'OpenCore0WASD', + pinout: null, + website: + 'https://github.com/OpenStickCommunity/Hardware/tree/main/Open_Core0', + image: '/img/boards/OpenCore0WASD.jpg', + category: 'official', + desc: () => ( +

    + Open source stickless WASD controller designed by {' '} + + TheTrain + . +

    + ), + }, + { + name: 'Pico Fighting Board', + configName: 'PicoFightingBoard', + pinout: null, + website: 'https://github.com/FeralAI/PicoFightingBoard', + image: '/img/boards/PicoFightingBoard.jpg', + category: 'open', + desc: () => ( +

    + Arcade encoder board designed by {' '} + FeralAI using a Raspberry Pi + Pico or pin-equivalent RP2040 board. +

    + ), + }, + { + name: 'Rana Tadpole', + configName: 'RanaTadpole', + pinout: null, + website: 'https://github.com/rana-sylvatica/rana-tadpole', + image: '/img/boards/RanaTadpole.jpg', + category: 'open', + desc: () => ( +

    + Pocket-sized digital controller from RanaLabs. +

    + ), + }, + { + name: 'Reflex Encode v1.2', + configName: 'ReflexEncodeV1.2', + pinout: null, + website: 'https://github.com/misteraddons/ReflexFightingBoard', + image: '/img/boards/ReflexEncode_v1.2.jpg', + category: 'open', + desc: () => ( +

    + Arcade encoder board designed and sold by{' '} + MiSTerAddons using an + embedded RP2040 chip. +

    + ), + }, + { + name: 'Reflex Encode v2.0', + configName: 'ReflexEncodeV2.0', + pinout: null, + website: 'https://github.com/misteraddons/ReflexFightingBoard', + image: '/img/boards/ReflexEncode_v2.0.jpg', + category: 'open', + desc: () => ( +

    + Arcade encoder board designed and sold by {' '} + MiSTerAddons using an + embedded RP2040 chip. +

    + ), + }, + { + name: 'Reflex CTRL SNES', + configName: 'ReflexCtrlSNES', + pinout: null, + website: 'https://github.com/misteraddons/Reflex-CTRL', + image: '/img/boards/ReflexCtrlSNES.jpg', + category: 'open', + desc: () => ( +

    + Reflex Board Open source PCB for SNES Controller replacement PCBs + designed and sold by{' '} + MiSTerAddons using an + embedded RP2040 chip. +

    + ), + }, + { + name: 'RP2040 Advanced Breakout', + configName: 'RP2040AdvancedBreakoutBoard', + pinout: null, + website: + 'https://github.com/OpenStickCommunity/Hardware/tree/main/RP2040%20Advanced%20Breakout%20Board', + image: '/img/boards/RP2040AdvancedBreakoutBoard.jpg', + category: 'official', + desc: () => ( +

    + Arcade encoder board designed by {' '} + TheTrain using an + embedded RP2040, and is the official board of the GP2040-CE project. +

    + ), + }, + { + name: 'RP2040 Advanced Breakout (USB Passthrough)', + configName: 'RP2040AdvancedBreakoutBoardUSBPassthrough', + pinout: null, + website: 'https://github.com/OpenStickCommunity/Hardware/tree/main/RP2040%20Advanced%20Breakout%20Board%20-%20Passthrough', + image: '/img/boards/RP2040AdvancedBreakoutBoardUSBPassthrough.jpg', + category: 'official', + desc: () => +

    + Official USB Passthrough Board of the Open Stick project. Updated version of + the RP2040 Advanced Breakout Board with USB passthrough included on the board. +

    , + }, + { + name: 'RP2040 Mini Breakout Board', + configName: 'RP2040MiniBreakoutBoard', + pinout: null, + website: + 'https://github.com/OpenStickCommunity/Hardware/tree/main/RP2040%20Mini%20Breakout%20Board', + image: '/img/boards/RP2040MiniBreakoutBoard.jpg', + category: 'open', + desc: () => ( +

    + A reduced-footprint spin off of the RP2040 Advanced Breakout Board designed by {' '} + + TheTrain + . +

    + ), + }, + { + name: 'ScrubTier BentoBox', + configName: 'BentoBox', + pinout: null, + website: + 'https://github.com/OpenStickCommunity/GP2040-CE/tree/main/configs/BentoBox', + image: '/img/boards/BentoBox.jpg', + category: 'closed', + desc: () => ( +

    + Configuration for the{' '} + + ScrubTier BentoBox v1 and v2 as well as the GGEZStick Keebfighters + + . +

    + ), + }, + { + name: 'SGF Bridget', + configName: 'SGFBridget', + pinout: null, + website: 'https://sgfdevices.com/products/sgf-bridget-mx-stickless-controller', + image: '/img/boards/SGFBridget.jpg', + category: 'open', + desc: () => ( +

    + The SGF Bridget MX stickless controller is based on the open-source + flatbox rev4 design by jfedor. +

    + ), + }, + { + name: 'SGF Faust', + configName: 'SGFFaust', + pinout: null, + website: 'https://sgfdevices.com/products/sgf-faust-all-button-controller', + image: '/img/boards/SGFFaust.jpg', + category: 'closed', + desc: () => ( +

    + The SGF Faust stickless controller is an all new design + from SGF Devices running on the open source GP2040-CE firmware. +

    + ), + }, + { + name: 'Stress', + configName: 'Stress', + pinout: null, + website: 'https://github.com/GroooveBob/Stress', + image: '/img/boards/Stress.jpg', + category: 'open', + desc: () => ( +

    + A small and portable PCB-as-a-controller designed by{' '} + GroooveBob using the + Waveshare RP-2040-Zero. +

    + ), + }, + { + name: 'thnikk Fightboard V3', + configName: 'FightboardV3', + pinout: null, + website: 'https://docs.thnikk.moe/models/fightboard/v3.html', + image: '/img/boards/FightboardV3.jpg', + category: 'legacy', + desc: () =>

    Configuration for the Fightboard v3

    , + }, + { + name: 'thnikk Fightboard V3 (Mirrored)', + configName: 'FightboardV3Mirrored', + pinout: null, + website: 'https://docs.thnikk.moe/models/fightboard/v3.html', + image: '/img/boards/FightboardV3Mirrored.jpg', + category: 'legacy', + desc: () => ( +

    + Configuration for the Fightboard v3 mirrored with directional inputs + on the right hand and the action buttons on the left. +

    + ), + }, + ], +}; + +export default boards; diff --git a/src/css/custom.css b/src/css/custom.css index aa6d119..fb9a763 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -1,139 +1,139 @@ -/** - * Any CSS included here will be global. The classic template - * bundles Infima by default. Infima is a CSS framework designed to - * work well for content-centric websites. - */ - -/* You can override the default Infima variables here. */ -:root { - --ifm-color-primary: #ec008c; - --ifm-color-primary-dark: #d4007e; - --ifm-color-primary-darker: #c90077; - --ifm-color-primary-darkest: #a50062; - --ifm-color-primary-light: #ff0599; - --ifm-color-primary-lighter: #ff109e; - --ifm-color-primary-lightest: #ff34ac; - --ifm-code-font-size: 95%; - --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); -} - -/* For readability concerns, you should choose a lighter palette in dark mode. */ -[data-theme="dark"] { - --ifm-color-primary: #ec008c; - --ifm-color-primary-dark: #d4007e; - --ifm-color-primary-darker: #c90077; - --ifm-color-primary-darkest: #a50062; - --ifm-color-primary-light: #ff0599; - --ifm-color-primary-lighter: #ff109e; - --ifm-color-primary-lightest: #ff34ac; - --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); -} - -img { - width: auto; - height: auto; -} - -.splash { - padding: 0px 0px 10px 0px; -} - -.splash-image { - width: auto; - height: auto; -} - -@media only screen and (max-width: 600px) { - .splash-image { - width: 100%; - height: auto; - } -} - -#img-wrapper { - text-align: center; -} - -nav.navbar { - white-space: nowrap; -} - -@media only screen and (min-width: 600px) { - #img-wrapper { - text-align: center; - display: flex; - flex-wrap: wrap; - } -} - -@media only screen and (min-width: 600px) { - #img-wrapper>div { - flex: 0 1 20%; - } -} - -.navbar-discord-link:after { - transition: opacity 0.2s; - content: ""; - width: 24px; - height: 24px; - display: flex; - background-image: url("data:image/svg+xml,%3Csvg fill='black' viewBox='0 0 32 32' version='1.1' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3Ediscord%3C/title%3E%3Cpath d='M20.992 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.050 0.005 0.109 0.005 0.168 0 1.523-1.191 2.768-2.693 2.854l-0.008 0zM11.026 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.048 0.005 0.104 0.005 0.161 0 1.525-1.19 2.771-2.692 2.862l-0.008 0zM26.393 6.465c-1.763-0.832-3.811-1.49-5.955-1.871l-0.149-0.022c-0.005-0.001-0.011-0.002-0.017-0.002-0.035 0-0.065 0.019-0.081 0.047l-0 0c-0.234 0.411-0.488 0.924-0.717 1.45l-0.043 0.111c-1.030-0.165-2.218-0.259-3.428-0.259s-2.398 0.094-3.557 0.275l0.129-0.017c-0.27-0.63-0.528-1.142-0.813-1.638l0.041 0.077c-0.017-0.029-0.048-0.047-0.083-0.047-0.005 0-0.011 0-0.016 0.001l0.001-0c-2.293 0.403-4.342 1.060-6.256 1.957l0.151-0.064c-0.017 0.007-0.031 0.019-0.040 0.034l-0 0c-2.854 4.041-4.562 9.069-4.562 14.496 0 0.907 0.048 1.802 0.141 2.684l-0.009-0.11c0.003 0.029 0.018 0.053 0.039 0.070l0 0c2.14 1.601 4.628 2.891 7.313 3.738l0.176 0.048c0.008 0.003 0.018 0.004 0.028 0.004 0.032 0 0.060-0.015 0.077-0.038l0-0c0.535-0.72 1.044-1.536 1.485-2.392l0.047-0.1c0.006-0.012 0.010-0.027 0.010-0.043 0-0.041-0.026-0.075-0.062-0.089l-0.001-0c-0.912-0.352-1.683-0.727-2.417-1.157l0.077 0.042c-0.029-0.017-0.048-0.048-0.048-0.083 0-0.031 0.015-0.059 0.038-0.076l0-0c0.157-0.118 0.315-0.24 0.465-0.364 0.016-0.013 0.037-0.021 0.059-0.021 0.014 0 0.027 0.003 0.038 0.008l-0.001-0c2.208 1.061 4.8 1.681 7.536 1.681s5.329-0.62 7.643-1.727l-0.107 0.046c0.012-0.006 0.025-0.009 0.040-0.009 0.022 0 0.043 0.008 0.059 0.021l-0-0c0.15 0.124 0.307 0.248 0.466 0.365 0.023 0.018 0.038 0.046 0.038 0.077 0 0.035-0.019 0.065-0.046 0.082l-0 0c-0.661 0.395-1.432 0.769-2.235 1.078l-0.105 0.036c-0.036 0.014-0.062 0.049-0.062 0.089 0 0.016 0.004 0.031 0.011 0.044l-0-0.001c0.501 0.96 1.009 1.775 1.571 2.548l-0.040-0.057c0.017 0.024 0.046 0.040 0.077 0.040 0.010 0 0.020-0.002 0.029-0.004l-0.001 0c2.865-0.892 5.358-2.182 7.566-3.832l-0.065 0.047c0.022-0.016 0.036-0.041 0.039-0.069l0-0c0.087-0.784 0.136-1.694 0.136-2.615 0-5.415-1.712-10.43-4.623-14.534l0.052 0.078c-0.008-0.016-0.022-0.029-0.038-0.036l-0-0z'%3E%3C/path%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: center; -} - -.navbar-discord-link:hover:after { - opacity: 0.5; -} - -.navbar-github-link:after { - transition: opacity 0.2s; - content: ""; - width: 24px; - height: 24px; - display: flex; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: center; -} - -.navbar-github-link:hover:after { - opacity: 0.5; -} - -html[data-theme='dark'] .navbar-discord-link:after { - background-image: url("data:image/svg+xml,%3Csvg viewBox='0 -28.5 256 256' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' preserveAspectRatio='xMidYMid'%3E%3Cg%3E%3Cpath d='M216.856339 16.5966031 C200.285002 8.84328665 182.566144 3.2084988 164.041564 0 C161.766523 4.11318106 159.108624 9.64549908 157.276099 14.0464379 C137.583995 11.0849896 118.072967 11.0849896 98.7430163 14.0464379 C96.9108417 9.64549908 94.1925838 4.11318106 91.8971895 0 C73.3526068 3.2084988 55.6133949 8.86399117 39.0420583 16.6376612 C5.61752293 67.146514 -3.4433191 116.400813 1.08711069 164.955721 C23.2560196 181.510915 44.7403634 191.567697 65.8621325 198.148576 C71.0772151 190.971126 75.7283628 183.341335 79.7352139 175.300261 C72.104019 172.400575 64.7949724 168.822202 57.8887866 164.667963 C59.7209612 163.310589 61.5131304 161.891452 63.2445898 160.431257 C105.36741 180.133187 151.134928 180.133187 192.754523 160.431257 C194.506336 161.891452 196.298154 163.310589 198.110326 164.667963 C191.183787 168.842556 183.854737 172.420929 176.223542 175.320965 C180.230393 183.341335 184.861538 190.991831 190.096624 198.16893 C211.238746 191.588051 232.743023 181.531619 254.911949 164.955721 C260.227747 108.668201 245.831087 59.8662432 216.856339 16.5966031 Z M85.4738752 135.09489 C72.8290281 135.09489 62.4592217 123.290155 62.4592217 108.914901 C62.4592217 94.5396472 72.607595 82.7145587 85.4738752 82.7145587 C98.3405064 82.7145587 108.709962 94.5189427 108.488529 108.914901 C108.508531 123.290155 98.3405064 135.09489 85.4738752 135.09489 Z M170.525237 135.09489 C157.88039 135.09489 147.510584 123.290155 147.510584 108.914901 C147.510584 94.5396472 157.658606 82.7145587 170.525237 82.7145587 C183.391518 82.7145587 193.761324 94.5189427 193.539891 108.914901 C193.539891 123.290155 183.391518 135.09489 170.525237 135.09489 Z' fill='white' fill-rule='nonzero'%3E%3C/path%3E%3C/g%3E%3C/svg%3E"); -} - -html[data-theme='dark'] .navbar-github-link:after { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E"); -} - -html[data-theme='dark'] .navbar-sidebar .navbar-discord-link:after { - background-image: none; -} - -html[data-theme='dark'] .navbar-sidebar .navbar-github-link:after { - background-image: none; -} - -.navbar-sidebar .navbar-discord-link:after { - content: "Discord"; - background-image: none; - height: 20px; -} - -.navbar-sidebar .navbar-discord-link:hover:after { - opacity: 1; -} - -.navbar-sidebar .navbar-github-link:after { - content: "GitHub"; - background-image: none; - height: 20px; -} - -.navbar-sidebar .navbar-github-link:hover:after { - opacity: 1; +/** + * Any CSS included here will be global. The classic template + * bundles Infima by default. Infima is a CSS framework designed to + * work well for content-centric websites. + */ + +/* You can override the default Infima variables here. */ +:root { + --ifm-color-primary: #ec008c; + --ifm-color-primary-dark: #d4007e; + --ifm-color-primary-darker: #c90077; + --ifm-color-primary-darkest: #a50062; + --ifm-color-primary-light: #ff0599; + --ifm-color-primary-lighter: #ff109e; + --ifm-color-primary-lightest: #ff34ac; + --ifm-code-font-size: 95%; + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); +} + +/* For readability concerns, you should choose a lighter palette in dark mode. */ +[data-theme="dark"] { + --ifm-color-primary: #ec008c; + --ifm-color-primary-dark: #d4007e; + --ifm-color-primary-darker: #c90077; + --ifm-color-primary-darkest: #a50062; + --ifm-color-primary-light: #ff0599; + --ifm-color-primary-lighter: #ff109e; + --ifm-color-primary-lightest: #ff34ac; + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); +} + +img { + width: auto; + height: auto; +} + +.splash { + padding: 0px 0px 10px 0px; +} + +.splash-image { + width: auto; + height: auto; +} + +@media only screen and (max-width: 600px) { + .splash-image { + width: 100%; + height: auto; + } +} + +#img-wrapper { + text-align: center; +} + +nav.navbar { + white-space: nowrap; +} + +@media only screen and (min-width: 600px) { + #img-wrapper { + text-align: center; + display: flex; + flex-wrap: wrap; + } +} + +@media only screen and (min-width: 600px) { + #img-wrapper>div { + flex: 0 1 20%; + } +} + +.navbar-discord-link:after { + transition: opacity 0.2s; + content: ""; + width: 24px; + height: 24px; + display: flex; + background-image: url("data:image/svg+xml,%3Csvg fill='black' viewBox='0 0 32 32' version='1.1' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3Ediscord%3C/title%3E%3Cpath d='M20.992 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.050 0.005 0.109 0.005 0.168 0 1.523-1.191 2.768-2.693 2.854l-0.008 0zM11.026 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.048 0.005 0.104 0.005 0.161 0 1.525-1.19 2.771-2.692 2.862l-0.008 0zM26.393 6.465c-1.763-0.832-3.811-1.49-5.955-1.871l-0.149-0.022c-0.005-0.001-0.011-0.002-0.017-0.002-0.035 0-0.065 0.019-0.081 0.047l-0 0c-0.234 0.411-0.488 0.924-0.717 1.45l-0.043 0.111c-1.030-0.165-2.218-0.259-3.428-0.259s-2.398 0.094-3.557 0.275l0.129-0.017c-0.27-0.63-0.528-1.142-0.813-1.638l0.041 0.077c-0.017-0.029-0.048-0.047-0.083-0.047-0.005 0-0.011 0-0.016 0.001l0.001-0c-2.293 0.403-4.342 1.060-6.256 1.957l0.151-0.064c-0.017 0.007-0.031 0.019-0.040 0.034l-0 0c-2.854 4.041-4.562 9.069-4.562 14.496 0 0.907 0.048 1.802 0.141 2.684l-0.009-0.11c0.003 0.029 0.018 0.053 0.039 0.070l0 0c2.14 1.601 4.628 2.891 7.313 3.738l0.176 0.048c0.008 0.003 0.018 0.004 0.028 0.004 0.032 0 0.060-0.015 0.077-0.038l0-0c0.535-0.72 1.044-1.536 1.485-2.392l0.047-0.1c0.006-0.012 0.010-0.027 0.010-0.043 0-0.041-0.026-0.075-0.062-0.089l-0.001-0c-0.912-0.352-1.683-0.727-2.417-1.157l0.077 0.042c-0.029-0.017-0.048-0.048-0.048-0.083 0-0.031 0.015-0.059 0.038-0.076l0-0c0.157-0.118 0.315-0.24 0.465-0.364 0.016-0.013 0.037-0.021 0.059-0.021 0.014 0 0.027 0.003 0.038 0.008l-0.001-0c2.208 1.061 4.8 1.681 7.536 1.681s5.329-0.62 7.643-1.727l-0.107 0.046c0.012-0.006 0.025-0.009 0.040-0.009 0.022 0 0.043 0.008 0.059 0.021l-0-0c0.15 0.124 0.307 0.248 0.466 0.365 0.023 0.018 0.038 0.046 0.038 0.077 0 0.035-0.019 0.065-0.046 0.082l-0 0c-0.661 0.395-1.432 0.769-2.235 1.078l-0.105 0.036c-0.036 0.014-0.062 0.049-0.062 0.089 0 0.016 0.004 0.031 0.011 0.044l-0-0.001c0.501 0.96 1.009 1.775 1.571 2.548l-0.040-0.057c0.017 0.024 0.046 0.040 0.077 0.040 0.010 0 0.020-0.002 0.029-0.004l-0.001 0c2.865-0.892 5.358-2.182 7.566-3.832l-0.065 0.047c0.022-0.016 0.036-0.041 0.039-0.069l0-0c0.087-0.784 0.136-1.694 0.136-2.615 0-5.415-1.712-10.43-4.623-14.534l0.052 0.078c-0.008-0.016-0.022-0.029-0.038-0.036l-0-0z'%3E%3C/path%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: center; +} + +.navbar-discord-link:hover:after { + opacity: 0.5; +} + +.navbar-github-link:after { + transition: opacity 0.2s; + content: ""; + width: 24px; + height: 24px; + display: flex; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: center; +} + +.navbar-github-link:hover:after { + opacity: 0.5; +} + +html[data-theme='dark'] .navbar-discord-link:after { + background-image: url("data:image/svg+xml,%3Csvg viewBox='0 -28.5 256 256' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' preserveAspectRatio='xMidYMid'%3E%3Cg%3E%3Cpath d='M216.856339 16.5966031 C200.285002 8.84328665 182.566144 3.2084988 164.041564 0 C161.766523 4.11318106 159.108624 9.64549908 157.276099 14.0464379 C137.583995 11.0849896 118.072967 11.0849896 98.7430163 14.0464379 C96.9108417 9.64549908 94.1925838 4.11318106 91.8971895 0 C73.3526068 3.2084988 55.6133949 8.86399117 39.0420583 16.6376612 C5.61752293 67.146514 -3.4433191 116.400813 1.08711069 164.955721 C23.2560196 181.510915 44.7403634 191.567697 65.8621325 198.148576 C71.0772151 190.971126 75.7283628 183.341335 79.7352139 175.300261 C72.104019 172.400575 64.7949724 168.822202 57.8887866 164.667963 C59.7209612 163.310589 61.5131304 161.891452 63.2445898 160.431257 C105.36741 180.133187 151.134928 180.133187 192.754523 160.431257 C194.506336 161.891452 196.298154 163.310589 198.110326 164.667963 C191.183787 168.842556 183.854737 172.420929 176.223542 175.320965 C180.230393 183.341335 184.861538 190.991831 190.096624 198.16893 C211.238746 191.588051 232.743023 181.531619 254.911949 164.955721 C260.227747 108.668201 245.831087 59.8662432 216.856339 16.5966031 Z M85.4738752 135.09489 C72.8290281 135.09489 62.4592217 123.290155 62.4592217 108.914901 C62.4592217 94.5396472 72.607595 82.7145587 85.4738752 82.7145587 C98.3405064 82.7145587 108.709962 94.5189427 108.488529 108.914901 C108.508531 123.290155 98.3405064 135.09489 85.4738752 135.09489 Z M170.525237 135.09489 C157.88039 135.09489 147.510584 123.290155 147.510584 108.914901 C147.510584 94.5396472 157.658606 82.7145587 170.525237 82.7145587 C183.391518 82.7145587 193.761324 94.5189427 193.539891 108.914901 C193.539891 123.290155 183.391518 135.09489 170.525237 135.09489 Z' fill='white' fill-rule='nonzero'%3E%3C/path%3E%3C/g%3E%3C/svg%3E"); +} + +html[data-theme='dark'] .navbar-github-link:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E"); +} + +html[data-theme='dark'] .navbar-sidebar .navbar-discord-link:after { + background-image: none; +} + +html[data-theme='dark'] .navbar-sidebar .navbar-github-link:after { + background-image: none; +} + +.navbar-sidebar .navbar-discord-link:after { + content: "Discord"; + background-image: none; + height: 20px; +} + +.navbar-sidebar .navbar-discord-link:hover:after { + opacity: 1; +} + +.navbar-sidebar .navbar-github-link:after { + content: "GitHub"; + background-image: none; + height: 20px; +} + +.navbar-sidebar .navbar-github-link:hover:after { + opacity: 1; } \ No newline at end of file diff --git a/src/hooks/useGitHubInfo.ts b/src/hooks/useGitHubInfo.ts index c874d50..9a39509 100644 --- a/src/hooks/useGitHubInfo.ts +++ b/src/hooks/useGitHubInfo.ts @@ -1,28 +1,28 @@ -import { create } from 'zustand'; -type State = { - loading: boolean; - releaseVersion: string; -}; - -type Actions = { - getInfo: () => void; -}; - -const INITIAL_STATE: State = { - releaseVersion: null, - loading: false, -}; - -export const useGitHubInfo = create()((set, get) => ({ - ...INITIAL_STATE, - getInfo: () => { - // Hacky way to make sure we don't call this multiple times from different components - if (get().loading || get().releaseVersion) return; - set({ loading: true }); - fetch( - `https://api.github.com/repos/OpenStickCommunity/GP2040-CE/releases/latest` - ) - .then((res) => res.json()) - .then(({ name }) => set({ loading: false, releaseVersion: name })); - }, -})); +import { create } from 'zustand'; +type State = { + loading: boolean; + releaseVersion: string; +}; + +type Actions = { + getInfo: () => void; +}; + +const INITIAL_STATE: State = { + releaseVersion: null, + loading: false, +}; + +export const useGitHubInfo = create()((set, get) => ({ + ...INITIAL_STATE, + getInfo: () => { + // Hacky way to make sure we don't call this multiple times from different components + if (get().loading || get().releaseVersion) return; + set({ loading: true }); + fetch( + `https://api.github.com/repos/OpenStickCommunity/GP2040-CE/releases/latest` + ) + .then((res) => res.json()) + .then(({ name }) => set({ loading: false, releaseVersion: name })); + }, +})); diff --git a/tsconfig.json b/tsconfig.json index afa30c0..6fcbe04 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,9 @@ -{ - // This file is not used in compilation. It is here just for a nice editor experience. - "extends": "@tsconfig/docusaurus/tsconfig.json", - "compilerOptions": { - "jsx": "react", - "target": "es2017", - "baseUrl": "." - } -} +{ + // This file is not used in compilation. It is here just for a nice editor experience. + "extends": "@tsconfig/docusaurus/tsconfig.json", + "compilerOptions": { + "jsx": "react", + "target": "es2017", + "baseUrl": "." + } +}