Full Code of Dewb/monome-rack for AI

main 1f5a9ca734a1 cached
238 files
2.6 MB
706.0k tokens
1196 symbols
1 requests
Download .txt
Showing preview only (2,822K chars total). Download the full file or copy to clipboard to get everything.
Repository: Dewb/monome-rack
Branch: main
Commit: 1f5a9ca734a1
Files: 238
Total size: 2.6 MB

Directory structure:
gitextract_oiynfstl/

├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug-report.md
│   │   └── build-error.md
│   └── workflows/
│       ├── build-plugin.yaml
│       └── deploy-pages.yml
├── .gitignore
├── .gitmodules
├── .vscode/
│   ├── c_cpp_properties.json
│   ├── launch.json
│   ├── settings.json
│   └── tasks.json
├── DEVELOPING.md
├── LICENSE
├── Makefile
├── README.md
├── docs/
│   ├── content/
│   │   ├── extra.css
│   │   ├── general/
│   │   │   ├── connections.md
│   │   │   ├── credits.md
│   │   │   ├── intro.md
│   │   │   └── voltage.md
│   │   ├── help.md
│   │   ├── index.md
│   │   ├── modules/
│   │   │   ├── ansible.md
│   │   │   ├── earthsea.md
│   │   │   ├── faderbank.md
│   │   │   ├── grids.md
│   │   │   ├── meadowphysics.md
│   │   │   ├── teletype.md
│   │   │   └── whitewhale.md
│   │   └── patches/
│   │       ├── ansible-earthsea-quickstart.vcv
│   │       ├── ansible-kria-grid-legend.vcv
│   │       ├── ansible-kria-quickstart.vcv
│   │       ├── ansible-meadowphysics-quickstart.vcv
│   │       ├── earthsea-grid-legend.vcv
│   │       ├── earthsea-quickstart.vcv
│   │       ├── meadowphysics-grid-legends.vcv
│   │       ├── meadowphysics-quickstart.vcv
│   │       ├── teletype-quickstart-1.vcv
│   │       ├── teletype-quickstart-2.vcv
│   │       ├── whitewhale-grid-legend.vcv
│   │       └── whitewhale-quickstart.vcv
│   ├── custom-theme/
│   │   ├── main.html
│   │   └── partials/
│   │       └── search/
│   │           └── mkdocs/
│   │               └── search-modal.html
│   └── requirements.txt
├── firmware/
│   ├── ansible.mk
│   ├── common.mk
│   ├── compile.mk
│   ├── earthsea.mk
│   ├── meadowphysics.mk
│   ├── mock_hardware/
│   │   ├── common/
│   │   │   ├── adc.c
│   │   │   ├── cdc.c
│   │   │   ├── flashc.c
│   │   │   ├── ftdi.c
│   │   │   ├── gpio.c
│   │   │   ├── i2c.c
│   │   │   ├── init_common.c
│   │   │   ├── interrupts.c
│   │   │   ├── midi.c
│   │   │   ├── monome.c
│   │   │   ├── print_funcs.c
│   │   │   ├── screen.c
│   │   │   └── spi.c
│   │   ├── include/
│   │   │   ├── adc.h
│   │   │   ├── avr32/
│   │   │   │   ├── abi.h
│   │   │   │   ├── adc_200.h
│   │   │   │   ├── core_sc0_130.h
│   │   │   │   ├── eic_230.h
│   │   │   │   ├── flashc_200.h
│   │   │   │   ├── freqm_230.h
│   │   │   │   ├── gpio_110.h
│   │   │   │   ├── hmatrix_230.h
│   │   │   │   ├── intc_101.h
│   │   │   │   ├── io.h
│   │   │   │   ├── ocd_s0_130.h
│   │   │   │   ├── pdca_102.h
│   │   │   │   ├── pm_230.h
│   │   │   │   ├── pwm_130.h
│   │   │   │   ├── rtc_230.h
│   │   │   │   ├── spi_199.h
│   │   │   │   ├── ssc_310.h
│   │   │   │   ├── tc_222.h
│   │   │   │   ├── twi_211.h
│   │   │   │   ├── uc3b0256.h
│   │   │   │   ├── uc3b0512.h
│   │   │   │   ├── usart_400.h
│   │   │   │   ├── usbb_310.h
│   │   │   │   └── wdt_230.h
│   │   │   ├── board.h
│   │   │   ├── compiler.h
│   │   │   ├── conf_usb_host.h
│   │   │   ├── delay.h
│   │   │   ├── flashc.h
│   │   │   ├── fs_com.h
│   │   │   ├── ftdi.h
│   │   │   ├── gpio.h
│   │   │   ├── intc.h
│   │   │   ├── interrupt.h
│   │   │   ├── parts.h
│   │   │   ├── pm.h
│   │   │   ├── preprocessor.h
│   │   │   ├── print_funcs.h
│   │   │   ├── spi.h
│   │   │   ├── sysclk.h
│   │   │   ├── tc.h
│   │   │   ├── twi.h
│   │   │   ├── usart.h
│   │   │   └── usb_protocol.h
│   │   ├── mock_hardware_api.c
│   │   ├── mock_hardware_api.h
│   │   ├── mock_hardware_api_private.h
│   │   ├── mock_interrupt.c
│   │   ├── mock_interrupt.h
│   │   ├── mock_serial.c
│   │   ├── mock_serial.h
│   │   └── modules/
│   │       ├── ansible/
│   │       │   ├── adapter_ansible.c
│   │       │   └── ansible_usb_disk.c
│   │       ├── teletype/
│   │       │   ├── adapter_teletype.c
│   │       │   └── usb_disk_mode.c
│   │       └── trilogy/
│   │           └── adapter_trilogy.c
│   ├── teletype.mk
│   └── whitewhale.mk
├── lib/
│   ├── base64/
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── base64.cpp
│   │   └── base64.h
│   ├── cbbq/
│   │   ├── LICENSE.md
│   │   ├── README.md
│   │   ├── cbbq.h
│   │   └── test/
│   │       ├── .gitignore
│   │       ├── cbbq_test.c
│   │       ├── cbbq_utils.h
│   │       └── test.sh
│   ├── oscpack/
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── ip/
│   │   │   ├── IpEndpointName.cpp
│   │   │   ├── IpEndpointName.h
│   │   │   ├── NetworkingUtils.h
│   │   │   ├── PacketListener.h
│   │   │   ├── TimerListener.h
│   │   │   ├── UdpSocket.h
│   │   │   ├── posix/
│   │   │   │   ├── NetworkingUtils.cpp
│   │   │   │   └── UdpSocket.cpp
│   │   │   └── win32/
│   │   │       ├── NetworkingUtils.cpp
│   │   │       └── UdpSocket.cpp
│   │   └── osc/
│   │       ├── MessageMappingOscPacketListener.h
│   │       ├── OscException.h
│   │       ├── OscHostEndianness.h
│   │       ├── OscOutboundPacketStream.cpp
│   │       ├── OscOutboundPacketStream.h
│   │       ├── OscPacketListener.h
│   │       ├── OscPrintReceivedElements.cpp
│   │       ├── OscPrintReceivedElements.h
│   │       ├── OscReceivedElements.cpp
│   │       ├── OscReceivedElements.h
│   │       ├── OscTypes.cpp
│   │       └── OscTypes.h
│   ├── serialosc/
│   │   ├── MonomeDevice.h
│   │   ├── README.md
│   │   ├── SerialOsc.cpp
│   │   └── SerialOsc.h
│   └── simple-svg/
│       ├── CMakeLists.txt
│       ├── LICENSE
│       ├── README.md
│       ├── main_1.0.0.cpp
│       └── simple_svg_1.0.0.hpp
├── mkdocs.yml
├── plugin.json
├── presets/
│   └── teletype/
│       ├── 00_TRIANGLE MOUNTAIN.vcvm
│       ├── 01_RANDOMS.vcvm
│       ├── 02_HIDDEN PATH NO PATH.vcvm
│       ├── 03_4TRACK.vcvm
│       ├── 04_MOOD RING.vcvm
│       └── MINIM.vcvm
├── res/
│   └── keymaps/
│       ├── README.md
│       ├── uk.json
│       ├── us-dvorak.json
│       └── us-qwerty.json
└── src/
    ├── ansible/
    │   ├── AnsibleModule.hpp
    │   └── AnsibleWidget.hpp
    ├── common/
    │   ├── core/
    │   │   ├── ActionQueue.hpp
    │   │   ├── FirmwareManager.cpp
    │   │   ├── FirmwareManager.hpp
    │   │   ├── GridConnection/
    │   │   │   ├── GridConnection.cpp
    │   │   │   ├── GridConnection.hpp
    │   │   │   ├── GridConnectionMenu.cpp
    │   │   │   ├── GridConnectionMenu.hpp
    │   │   │   ├── GridConsumerBase.cpp
    │   │   │   ├── GridConsumerBase.hpp
    │   │   │   ├── SerialOscGrid.cpp
    │   │   │   ├── SerialOscGrid.hpp
    │   │   │   ├── SerialOscInterface.cpp
    │   │   │   └── SerialOscInterface.hpp
    │   │   ├── IIBus.cpp
    │   │   ├── IIBus.h
    │   │   ├── LibAVR32Module.cpp
    │   │   ├── LibAVR32Module.hpp
    │   │   ├── LibAVR32ModuleWidget.cpp
    │   │   └── LibAVR32ModuleWidget.hpp
    │   ├── util/
    │   │   ├── Clock12BitParam.hpp
    │   │   ├── Screenshot.cpp
    │   │   └── Screenshot.hpp
    │   └── widgets/
    │       ├── CustomMenuTemplates.hpp
    │       ├── HoldableButton.hpp
    │       ├── SifamTPM.hpp
    │       ├── USBAJack.hpp
    │       └── YellowWhiteLight.hpp
    ├── earthsea/
    │   ├── EarthseaModule.hpp
    │   └── EarthseaWidget.hpp
    ├── faderbank/
    │   ├── FaderbankModule.cpp
    │   ├── FaderbankModule.hpp
    │   ├── FaderbankWidget.cpp
    │   └── FaderbankWidget.hpp
    ├── meadowphysics/
    │   ├── MeadowphysicsModule.hpp
    │   └── MeadowphysicsWidget.hpp
    ├── plugin.cpp
    ├── teletype/
    │   ├── TeletypeKeyboard.cpp
    │   ├── TeletypeKeyboard.hpp
    │   ├── TeletypeModule.cpp
    │   ├── TeletypeModule.hpp
    │   ├── TeletypeWidget.cpp
    │   ├── TeletypeWidget.hpp
    │   ├── scene/
    │   │   ├── TeletypeSceneIO.cpp
    │   │   ├── TeletypeSceneIO.hpp
    │   │   ├── TeletypeSceneIOMenu.cpp
    │   │   └── TeletypeSceneIOMenu.hpp
    │   └── screen/
    │       ├── EngineStoppedScreen.hpp
    │       ├── ExampleScreen.hpp
    │       ├── TeletypeScreenWidget.cpp
    │       └── TeletypeScreenWidget.hpp
    ├── virtualgrid/
    │   ├── VirtualGridKey.hpp
    │   ├── VirtualGridModule.cpp
    │   ├── VirtualGridModule.hpp
    │   ├── VirtualGridTheme.cpp
    │   ├── VirtualGridTheme.hpp
    │   ├── VirtualGridWidget.cpp
    │   └── VirtualGridWidget.hpp
    └── whitewhale/
        ├── WhiteWhaleModule.hpp
        └── WhiteWhaleWidget.hpp

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
*.cpp     text diff=cpp
*.hpp     text diff=cpp
*.c       text diff=cpp
*.h       text diff=cpp
*.md      text 
Makefile  text
*.mk      text
*.sh      text
*.command text
*.svg     text
*.yml     text
*.py      text
*.pip     text
*.css     text
*.html    text
*.js      text

*.png     binary
*.jpg     binary
*.jpeg    binary
*.ttf     binary



================================================
FILE: .github/ISSUE_TEMPLATE/bug-report.md
================================================
---
name: Bug report
about: Report unexpected or confusing behavior when using the modules inside VCV Rack
title: "[BUG REPORT]"
labels: ''
assignees: ''

---

** Platform/Version **
 - OS version:
 - Rack version:
 - Plugin version:

**Describe the bug**
Describe the behavior you're seeing, and what you expected the behavior should have been.

**VCV Rack logfile**
Attach `log.txt` from your VCV Rack user folder ([Where is the VCV Rack user folder?](https://vcvrack.com/manual/FAQ#Where-is-the-Rack-user-folder))

**How to Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. See error

**Patch file**
If the steps to reproduce require a particular arrangement of several modules, please attach a VCV Rack patch that demonstrates the issue.

**Additional context**
Add any other context, screenshots, etc., about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/build-error.md
================================================
---
name: Build issue
about: Report a problem building the modules in your own environment
title: "[BUILD ISSUE]"
labels: ''
assignees: ''

---

** Platform/Version **
- OS version:
- Plugin version:
- Rack SDK version:

**Please run these commands and include the complete output:**
```git status
git submodule status
make clean
make dep
make```

**Please include any other details about your system and build environment, e.g. "I'm trying to build for Mac ARM64 using Visual Studio Code", etc.**


================================================
FILE: .github/workflows/build-plugin.yaml
================================================
name: Build VCV Rack Plugin
on: 
  push:
    paths-ignore:
      - 'docs/**'
      - '*.md'
      - 'mkdocs.yml'
      - 'LICENSE'
      - '.github/ISSUE_TEMPLATE/**'
      - '.github/workflows/deploy-pages.yaml'

env:
  rack-sdk-version: 2.4.0
  rack-plugin-toolchain-dir: /home/build/rack-plugin-toolchain

defaults:
  run:
    shell: bash

jobs:

  modify-plugin-version:
    name: Modify plugin version
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/cache@v3
        id: plugin-version-cache
        with:
          path: plugin.json
          key: ${{ github.sha }}-${{ github.run_id }}
      - run: |
          gitrev=`git rev-parse --short HEAD`
          pluginversion=`jq -r '.version' plugin.json`
          echo "Set plugin version from $pluginversion to $pluginversion-$gitrev"
          cat <<< `jq --arg VERSION "$pluginversion-$gitrev" '.version=$VERSION' plugin.json` > plugin.json
        # only modify plugin version if no tag was created
        if: "! startsWith(github.ref, 'refs/tags/v')"
  build:
    name: ${{ matrix.platform }}
    needs: modify-plugin-version
    runs-on: ubuntu-latest
    container:
      image: ghcr.io/qno/rack-plugin-toolchain-win-linux
      options: --user root
    strategy:
      matrix:
        platform: [win-x64, lin-x64]
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: recursive
          fetch-depth: 0
      - uses: actions/cache@v3
        id: plugin-version-cache
        with:
          path: plugin.json
          key: ${{ github.sha }}-${{ github.run_id }}
      - name: Build plugin
        run: |
          export PLUGIN_DIR=$GITHUB_WORKSPACE
          pushd ${{ env.rack-plugin-toolchain-dir }}
          sed -i 's/\(RACK_SDK_VERSION \:\= \)[0-9\.]\+$/\1${{ env.rack-sdk-version }}/' Makefile
          make rack-sdk-clean
          make rack-sdk-${{ matrix.platform }}
          make plugin-build-${{ matrix.platform }}
      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          path: ${{ env.rack-plugin-toolchain-dir }}/plugin-build
          name: ${{ matrix.platform }}

  build-mac:
    name: mac-${{ matrix.platform }}
    needs: modify-plugin-version
    runs-on: macos-latest
    strategy:
      fail-fast: false
      matrix:
        platform: [x64, arm64]
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: recursive
          fetch-depth: 0
      - uses: actions/cache@v3
        id: plugin-version-cache
        with:
          path: plugin.json
          key: ${{ github.sha }}-${{ github.run_id }}
      - name: Get Rack-SDK
        run: |
          pushd $HOME
          curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-${{ env.rack-sdk-version }}-mac-${{ matrix.platform }}.zip
          unzip Rack-SDK.zip
      - name: Build plugin
        run: |
          CROSS_COMPILE_TARGET_x64=x86_64-apple-darwin
          CROSS_COMPILE_TARGET_arm64=arm64-apple-darwin
          export RACK_DIR=$HOME/Rack-SDK
          export CROSS_COMPILE=$CROSS_COMPILE_TARGET_${{ matrix.platform }}
          make dep
          make dist
      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          path: dist/*.vcvplugin
          name: mac-${{ matrix.platform }}

  publish:
    name: Publish plugin
    # only create a release if a tag was created that is called e.g. v1.2.3
    # see also https://vcvrack.com/manual/Manifest#version
    if: startsWith(github.ref, 'refs/tags/v')
    runs-on: ubuntu-latest
    permissions:
      contents: write
    needs:  [build, build-mac]
    steps:
      - uses: actions/checkout@v4
      - uses: FranzDiebold/github-env-vars-action@v2
      - name: Check if plugin version matches tag
        run: |
          pluginversion=`jq -r '.version' plugin.json`
          if [ "v$pluginversion" != "${{ env.CI_REF_NAME }}" ]; then
            echo "Plugin version from plugin.json 'v$pluginversion' doesn't match with tag version '${{ env.CI_REF_NAME }}'"
            exit 1
          fi
      - name: Create Release
        uses: softprops/action-gh-release@v1
        with:
          tag_name: ${{ github.ref }}
          name: Release ${{ env.CI_REF_NAME }}
          body: |
            ${{ env.CI_REPOSITORY_NAME }} VCV Rack Plugin ${{ env.CI_REF_NAME }}
          draft: false
          prerelease: false
      - uses: actions/download-artifact@v4
        with:
          path: _artifacts
      - name: Upload release assets
        uses: svenstaro/upload-release-action@v2
        with:
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          file: _artifacts/**/*.vcvplugin
          tag: ${{ github.ref }}
          file_glob: true


================================================
FILE: .github/workflows/deploy-pages.yml
================================================
name: Update Docs Site

on:
  push:
    paths: 
      - 'docs/**'
      - 'mkdocs.yml'
      - '.github/workflows/deploy-pages.yml'
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  build:
    name: "Build MkDocs static site"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Setup MkDocs
        run: pip install -r docs/requirements.txt
      - name: Run MkDocs
        run: |
          mkdir -p build/docs
          mkdocs build
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: 'build/docs'

  deploy:
    needs: [ build ]
    if: github.ref == 'refs/heads/main'
    name: "Deploy content to GitHub Pages"
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    steps:
      - name: Setup Pages
        uses: actions/configure-pages@v3
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v1


================================================
FILE: .gitignore
================================================
/build
plugin*.dylib
plugin*.dll
plugin*.so
.DS_Store
/res/firmware
/firmware/build
/dist
.vscode/ipch
/Rack-SDK
Rack-SDK*.zip
/dep
ragel*.tar.gz


================================================
FILE: .gitmodules
================================================
[submodule "firmware/whitewhale"]
	path = firmware/whitewhale
	url = https://github.com/Dewb/whitewhale
	branch = vcvrack_pr
[submodule "firmware/teletype4"]
	path = firmware/teletype4
	url = https://github.com/Dewb/teletype
	branch = vcvrack-4.0.0
[submodule "firmware/meadowphysics"]
	path = firmware/meadowphysics
	url = https://github.com/Dewb/meadowphysics
	branch = vcvrack
[submodule "firmware/earthsea"]
	path = firmware/earthsea
	url = https://github.com/Dewb/earthsea
	branch = vcvrack
[submodule "firmware/ansible"]
	path = firmware/ansible
	url = https://github.com/Dewb/ansible
	branch = vcvrack
[submodule "firmware/teletype5"]
	path = firmware/teletype5
	url = https://github.com/monome/teletype
	branch = main
[submodule "firmware/whitewhale-kria"]
	path = firmware/whitewhale-kria
	url = https://github.com/Dewb/kria
	branch = vcvrack


================================================
FILE: .vscode/c_cpp_properties.json
================================================
{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/**",
                "${workspaceFolder}/Rack-SDK/dep/**",
                "${workspaceFolder}/Rack-SDK/include/**",
                "/Library/Developer/CommandLineTools/usr/include/c++/v1",
                "/usr/local/include",
                "/Library/Developer/CommandLineTools/usr/include",
                "/usr/include"
            ],
            "defines": [],
            "intelliSenseMode": "clang-x64",
            "browse": {
                "path": [
                    "${workspaceFolder}/**",
                    "${workspaceFolder}/Rack-SDK/dep/**",
                    "${workspaceFolder}/Rack-SDK/include/**",
                    "/Library/Developer/CommandLineTools/usr/include/c++/v1",
                    "/usr/local/include",
                    "/Library/Developer/CommandLineTools/usr/include",
                    "/usr/include"
                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
            },
            "macFrameworkPath": [
                "/System/Library/Frameworks",
                "/Library/Frameworks"
            ],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c11",
            "cppStandard": "c++17"
        },
        {
            "name": "Linux",
            "includePath": [
                "/usr/include",
                "/usr/local/include",
                "${workspaceFolder}/**",
                "${workspaceFolder}/Rack-SDK/dep/**",
                "${workspaceFolder}/Rack-SDK/include/**"
            ],
            "defines": [],
            "intelliSenseMode": "clang-x64",
            "browse": {
                "path": [
                    "/usr/include",
                    "/usr/local/include",
                    "${workspaceFolder}",
                    "${workspaceFolder}/../../include"
                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
            }
        },
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "${workspaceFolder}/Rack-SDK/dep/**",
                "${workspaceFolder}/Rack-SDK/include/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.18362.0",
            "compilerPath": "C:\\msys64\\mingw64\\bin\\g++.exe",
            "intelliSenseMode": "windows-gcc-x64",
            "cStandard": "c11",
            "cppStandard": "c++17"
        }
    ],
    "version": 4
}

================================================
FILE: .vscode/launch.json
================================================
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug Plugin in VCV Rack",
            "type": "cppdbg",
            "request": "launch",
            "windows": {
                "program": "C:\\Program Files\\VCV\\Rack2Free\\Rack.exe",
                "args": [
                ],
                "MIMode": "gdb",
                "environment": [
                    
                ],
                "miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
                "setupCommands": [
                    {
                        "description": "Enable pretty-printing for gdb",
                        "text": "-enable-pretty-printing",
                        "ignoreFailures": true
                    }
                ]
            },
            "osx" : {
                "program": "/Applications/VCV Rack 2 Free.app/Contents/MacOS/Rack",
                "args": [],
                "MIMode": "lldb",
                "environment": [
                    {
                        "name": "DYLD_FALLBACK_LIBRARY_PATH",
                        "value": "dep/lib"
                    },
                    {
                        "name": "LD_LIBRARY_PATH",
                        "value": "dep/lib"
                    }
                ]
            },
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "externalConsole": false,
        }
    ]
}

================================================
FILE: .vscode/settings.json
================================================
{
    "editor.tabSize": 4,
    "editor.insertSpaces": true,
    "editor.formatOnType": true,
    "editor.formatOnPaste": true,
    "C_Cpp.clang_format_style": "{ BasedOnStyle: WebKit, BreakBeforeBraces: Allman, IndentCaseLabels: true }",
    "files.associations": {
        "ios": "cpp",
        "random": "cpp",
        "*.ipp": "cpp",
        "typeinfo": "cpp",
        "stdexcept": "cpp",
        "string": "cpp",
        "chrono": "cpp",
        "istream": "cpp",
        "__bit_reference": "cpp",
        "__functional_base": "cpp",
        "algorithm": "cpp",
        "atomic": "cpp",
        "bitset": "cpp",
        "deque": "cpp",
        "functional": "cpp",
        "iterator": "cpp",
        "limits": "cpp",
        "memory": "cpp",
        "ratio": "cpp",
        "system_error": "cpp",
        "tuple": "cpp",
        "type_traits": "cpp",
        "vector": "cpp",
        "sstream": "cpp",
        "strstream": "cpp",
        "locale": "cpp",
        "__locale": "cpp",
        "stdint.h": "c",
        "globals.h": "c",
        "cmath": "cpp",
        "complex": "cpp",
        "cstdarg": "cpp",
        "cstddef": "cpp",
        "cstdint": "cpp",
        "cstdio": "cpp",
        "cstdlib": "cpp",
        "cstring": "cpp",
        "cwchar": "cpp",
        "exception": "cpp",
        "fstream": "cpp",
        "initializer_list": "cpp",
        "iosfwd": "cpp",
        "iostream": "cpp",
        "list": "cpp",
        "map": "cpp",
        "new": "cpp",
        "ostream": "cpp",
        "queue": "cpp",
        "set": "cpp",
        "streambuf": "cpp",
        "unordered_set": "cpp",
        "utility": "cpp",
        "xfacet": "cpp",
        "xhash": "cpp",
        "xiosbase": "cpp",
        "xlocale": "cpp",
        "xlocinfo": "cpp",
        "xlocnum": "cpp",
        "xmemory": "cpp",
        "xmemory0": "cpp",
        "xstddef": "cpp",
        "xstring": "cpp",
        "xtr1common": "cpp",
        "xtree": "cpp",
        "xutility": "cpp",
        "array": "cpp",
        "bit": "cpp",
        "*.tcc": "cpp",
        "cctype": "cpp",
        "clocale": "cpp",
        "compare": "cpp",
        "concepts": "cpp",
        "ctime": "cpp",
        "cwctype": "cpp",
        "unordered_map": "cpp",
        "memory_resource": "cpp",
        "numeric": "cpp",
        "optional": "cpp",
        "string_view": "cpp",
        "iomanip": "cpp",
        "ranges": "cpp",
        "stop_token": "cpp",
        "thread": "cpp",
        "cinttypes": "cpp",
        "variant": "cpp",
        "flash.h": "c",
        "codecvt": "cpp",
        "condition_variable": "cpp",
        "regex": "cpp",
        "shared_mutex": "cpp",
        "mock_hardware_api.h": "c",
        "__node_handle": "cpp",
        "mock_hardware_api_private.h": "c",
        "__functional_03": "cpp",
        "mutex": "cpp",
        "__config": "cpp",
        "__hash_table": "cpp",
        "__split_buffer": "cpp",
        "__threading_support": "cpp",
        "__tree": "cpp",
        "__verbose_abort": "cpp",
        "cfenv": "cpp",
        "charconv": "cpp",
        "execution": "cpp",
        "stack": "cpp"
    }
}

================================================
FILE: .vscode/tasks.json
================================================
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build Rack plugin with debug info",
            "type": "shell",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "shared"
            },
            "command": "RACK_DIR=$PWD/Rack-SDK make -j4 install",
            "options": {
                "cwd": "${workspaceRoot}",
                "env": {
                    "STRIP": "echo"
                }
            },
            "windows": {
                "options": {
                    "env": {
                        "PATH": "C:\\msys64\\usr\\bin;c:\\msys64\\mingw64\\bin",
                        "MSYSTEM": "MINGW64",
                        "CC": "gcc"
                    },
                    "shell": {
                        "executable": "C:\\msys64\\usr\\bin\\bash.exe",
                        "args": [
                            "-c"
                        ]
                    }
                },
                "problemMatcher": {
                    "owner": "cpp",
                    "fileLocation": [
                        "absolute"
                    ],
                    "pattern": {
                        "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
                        "file": 1,
                        "line": 2,
                        "column": 3,
                        "severity": 4,
                        "message": 5
                    }
                }
            },
            "osx": {

            },
            "linux": {
                
            }
        },
        {
            "label": "Clean Rack plugin",
            "type": "shell",
            "group": "none",
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "shared"
            },
            "command": "make clean",
            "options": {
                "cwd": "${workspaceRoot}",
                "env": {
                    "RACK_DIR": "${workspaceFolder}/Rack-SDK",
                    "STRIP": "echo"
                }
            },
            "windows": {
                "options": {
                    "env": {
                        "PATH": "C:\\msys64\\usr\\bin;c:\\msys64\\mingw64\\bin",
                        "MSYSTEM": "MINGW64"
                    },
                    "shell": {
                        "executable": "C:\\msys64\\usr\\bin\\bash.exe",
                        "args": [
                            "-c"
                        ]
                    }
                },
                "problemMatcher": []
            },
            "osx": {

            },
            "linux": {

            },
            "problemMatcher": []
        }
    ]
}

================================================
FILE: DEVELOPING.md
================================================

## Installing prerelease builds

Download a release for your platform from the [Releases page](../../releases) and place the .vcvplugin file into the plugins subfolder inside your Rack 2 user folder. The user folder on your OS can be opened from the Rack menu bar at **Help** > **Open user folder**. The plugins subfolder will be named `plugins-<os>-<cpu>`

More detailed instructions for installing non-library plugins are available in the [Rack manual](https://vcvrack.com/manual/Installing#Installing-plugins-not-available-on-the-VCV-Library).

## Building the plugin using the Rack SDK

1. Set up a local [Rack development environment](https://vcvrack.com/manual/Building) as described in the Rack manual.
2. Clone this repo.
   ```bash
   $ git clone https://github.com/Dewb/monome-rack
   ```
3. Change into the `monome-rack` folder and clone the plugin's submodules with `git submodule update --init --recursive`
   ```bash
   $ cd monome-rack
   $ git submodule update --init --recursive
   ```
4. Download the latest Rack 2.x SDK. (The URL will depend on your OS and CPU architecture, see https://vcvrack.com/downloads).
   ```bash
   $ curl -O https://vcvrack.com/downloads/Rack-SDK-2.4.0-mac-arm64.zip
   $ unzip Rack-SDK-2.5.0-mac-arm64.zip
   $ rm Rack-SDK-2.5.0-mac-arm64.zip
   ```
5. Build dependencies with `make dep`.
   ```bash
   $ RACK_DIR=$(PWD)/Rack-SDK make dep
   ```
6. Run `make install` to build the plugin and copy it into the Rack plugins folder. (Alternately, open the `monome-rack` folder in Visual Studio Code and select `Tasks > Run Build Task`.)
   ```bash
   $ RACK_DIR=$(PWD)/Rack-SDK make -j4 install
   ```

## Building the plugin using the complete VCV Rack source

1. Read the [VCVRack](https://github.com/VCVRack/Rack) build instructions for your platform and follow them carefully. Run and test Rack to make sure it works as expected.
   ```bash
   $ git clone -b v2 https://github.com/VCVRack/Rack
   $ cd Rack
   $ git submodule update --init --recursive
   $ make dep
   $ make
   $ make run
   ``` 
2. Clone this repo into the `plugins` folder under VCVRack.
   ```bash
   $ cd plugins
   $ git clone https://github.com/Dewb/monome-rack
   ```
3. Change into the `monome-rack` folder and clone the plugin's submodules with `git submodule update --init --recursive`, then `make dep` to build dependencies.
   ```bash
   $ cd monome-rack
   $ git submodule update --init --recursive
   $ make dep
   ```
4. Build with `make`, or open the `monome-rack` folder in Visual Studio Code and select `Tasks > Run Build Task`.
   ```bash
   $ make -j4
   ```

## Updating documentation

Prerequisites:
* Recent `pip` and `python` 3.x
* `mkdocs` and `mkdocs-terminal`. Install with:
   ```bash
   $ pip install -r docs/requirements.txt
   ```

Start a hot-reload server with `mkdocs serve`, and run `mkdocs build` to produce the static site.

## Using monome-rack as a development environment for module firmware

This plugin can be used to accelerate firmware development for the hardware. The cycle of rebuilding the plugin and restarting Rack is faster than reflashing hardware, and desktop software debuggers are easier to set up than an in-circuit debugger.

First, some caveats: modifying the firmware can't change anything about the Rack "virtual hardware"; it will have the same panel, with the same inputs, outputs, and controls. If you want to making something new, pick as a starting point the module that best aligns with the I/O needs of your new idea. (The name of the firmware determines which module the firmware will be available for, and therefore which panel and I/O will be used, so when you create the new submodule, make sure your submodule folder name starts with the name of the base module.)

Similarly, if you want to change code that interacts directly with the physical hardware at a low level, like USB device detection or ADC/DAC timing, that code may not be executed in Rack. You'll have to skip to the last step and build and test directly on the hardware. 

Finally, keep in mind that a desktop computer has more resources than the AVR32 CPU inside each module. Memory is quite limited, and each module has limited time to compute its tasks inbetween event ticks. Taking too long on an operation risks delaying the next event, potentially throwing off the timing of sequences, or making input responses feel sluggish. Not everything that works on a desktop computer will easily translate to the hardware without further optimization. (It can be helpful to set these concerns aside during early development and brainstorming, of course -- first figure out if your idea works the way you want it to, and only then work on making it efficient.)

Let's walk through setting up a development environment for one of the modules. This example will use Teletype as it's the most actively developed firmware.

1. First, make sure you can build the monome-rack plugin using the instructions in either [Building the plugin using the Rack SDK](#building-the-plugin-using-the-rack-sdk) or [Building the plugin using the complete VCV Rack source](#building-the-plugin-using-the-complete-vcv-rack-source) above.
2. Find the GitHub URL and branch name for the firmware you want to modify. Right now, only Teletype is fully "Rack ready" in the upstream repository; the others need Rack-specific branches off forks.
    | module        | repository url                        | branch     |
    | ------------- | ------------------------------------- | ---------- |
    | ansible       | https://github.com/Dewb/ansible       | vcvrack    |
    | earthsea      | https://github.com/Dewb/earthsea      | vcvrack    |
    | meadowphysics | https://github.com/Dewb/meadowphysics | vcvrack    | 
    | teletype      | https://github.com/monome/teletype    | main       |
    | whitewhale    | https://github.com/Dewb/whitewhale    | vcvrack_pr |
3. Optional: Sign up for a [GitHub](https://github.com) account if you don't already have one, and use the "Fork" button on one of the repository pages above corresponding to the module you want to modify. On the subsequent page, **uncheck** the "Copy the main branch only" checkbox, so you have access to the non-main branches in your fork (necessary for any module besides teletype.)
    * Note: If you don't do this, you can run the following commands with the URL and branch listed above directly, but it will be more complicated to share your work with others later.
5. Use the `git submodule` command to create a new firmware submodule inside the `firmware` folder. Let's say we want to create a new development version of the teletype firmware and call it `teletype-dev` within the Rack environment.
    ```bash
    $ cd monome-rack
    $ cd firmware
    $ git submodule add -b main https://github.com/<your user name>/teletype teletype-dev
    ```
6. Run `git submodule update` to fetch the submodule children of the new submodule.
    ```bash
    $ git submodule update --init --recursive
    ```
7. Now we need to modify the plugin build process to include `teletype-dev` in our list of firmware binaries to build and add to the plugin. Edit `Makefile` in the monome-rack root folder and under the `firmware-build:` section, add the line:
    ```
    cd firmware && $(MAKE) -f teletype.mk TARGET_NAME=teletype-dev
    ```
   Make sure this line is indented with a single tab character, like the other lines in the section.
8. Rebuild the plugin using `make install` or the Visual Studio Code **Run Build Task...** command, as in step 1.
9. Run Rack and place a Teletype module. You should be able to see `teletype-dev` as one of the choices in the **Firmware Tools** > **Switch Firmware** right-click menu. Switch to it! You're now using the code from the new submodule folder you created in step 3.
10. Let's make some changes to the code. Close Rack and open `firmware/teletype-dev/module/live_mode.c` in your favorite editor. Go to line 771 and change the string `"TELETYPE "` to something else, like `"HELLO "`. Leave the space at the end of the string.
11. Rebuild the plugin again as in step 6.
12. Run Rack again, and now any Teletype modules in your patch running the `teletype-dev` firmware should say **HELLO** on the startup screen instead of **TELETYPE**.
13. Now you can make some more substantial changes. Fix a bug, add a new feature, or erase everything and create a completely new module. You can also repeat steps 4-7 more than once if you want to pursue multiple ideas in parallel; just make sure you give each new submodule folder a unique name.
    * Note: if your goal is to create new behavior for the module from scratch, you'll need to preserve the `initialize_module()` and `check_events()` functions, but most everything else is fair game. You'll need to use the `DECLARE_VRAM` and `DECLARE_NVRAM` macros on your key data structures to have them preserved in the Rack patch. Compare the `whitewhale` and `whitewhale-kria` submodules to see and example of two different firmware for the same module. 
14. When you have made something interesting and want to share it, you'll need to commit back to your firmware fork. It's probably a good idea to first create a branch:
    ```bash
    $ cd firmware/teletype-dev
    $ git checkout -b my_new_feature
    ```
15. Now push that branch to your fork:
    ```bash
    $ git push -u origin my_new_feature
    ```
16. Share your work! Note that this will *not* create any commits in your local copy of the monome-rack repo. This is okay, as you don't need to commit the changes to Rack to add your development firmware. You can share the firmware binaries from the `res` folder to other people and they won't have to build anything. Alternately, they can add your firmware to their build environment themselves by following steps 4-6, except instead of using the normal firmware URL and branch, they'll use your URL and branch in the `git submodule add` command:
    ```bash
    $ git submodule add -b my_new_feature https://github.com/<your user name>/teletype teletype-dev
    ```
17. Finally, once your new fix or feature is tested and working inside Rack, you can try building it for the hardware. The hardware build process uses a `Makefile` *inside* the specific firmware subfolder, instead of the Rack makefiles in the root of the `firmware/` folder. Building with these Makefiles requires [the avr32 toolchain](https://github.com/monome/avr32-toolchain) to be installed and in your path, a potentially complex process. However, if you have Docker or Rancher Desktop you can use a preconfigured image to make this easy.
    ```bash
    $ cd firmware/teletype-dev
    $ nerdctl run -v $(pwd):/target -t dewb/monome-build 
    ```
    See [the monome-build image README](https://github.com/Dewb/monome-build/blob/master/README.md) for more background on building with the image.
    * Note: The teletype Makefile runs git commands, but the Rack submodule structure moves the .git contents to the plugin root folder and puts it out of scope of the docker image. For now, to make the teletype build work, you'll need to comment out the last two lines of the Makefile, like so:
        ```make
        # Add the git commit id to a file for use when printing out the version
        #../module/gitversion.c: $(GIT_DIR)/HEAD $(GIT_DIR)/index
        #	echo "const char *git_version = \"$(shell cut -d '-' -f 1 ...


================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    {description}
    Copyright (C) {year}  {fullname}

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  {signature of Ty Coon}, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

================================================
FILE: Makefile
================================================
SHELL:=/bin/bash -O extglob
RACK_DIR ?= ../..

FLAGS += \
	-Isrc \
	-Isrc/common \
	-Isrc/common/core \
	-Isrc/common/util \
	-Isrc/common/widgets \
	-Isrc/common/core/GridConnection \
	-Isrc/virtualgrid \
	-Isrc/whitewhale \
	-Isrc/meadowphysics \
	-Isrc/earthsea \
	-Isrc/teletype \
	-Isrc/ansible \
	-Isrc/faderbank \
	-Ilib/base64 \
	-Ilib/oscpack \
	-Ilib/serialosc \
	-Ilib/simple-svg \
	-Ifirmware/mock_hardware \
	-g \

CFLAGS +=
CXXFLAGS += 
LDFLAGS +=

SOURCES += \
	lib/base64/base64.cpp \
	$(wildcard lib/oscpack/ip/*.cpp) \
	$(wildcard lib/oscpack/osc/*.cpp) \
	$(wildcard lib/serialosc/*.cpp) \
	$(wildcard src/*.cpp) \
	$(wildcard src/**/*.cpp) \
	$(wildcard src/**/**/*.cpp) \
	$(wildcard src/**/**/**/*.cpp) \

include $(RACK_DIR)/arch.mk

ifeq ($(ARCH_WIN), 1)
	SOURCES += $(wildcard lib/oscpack/ip/win32/*.cpp) 
	LDFLAGS += -lws2_32 -lwinmm -lopengl32
else
	SOURCES += $(wildcard lib/oscpack/ip/posix/*.cpp) 
endif

# Dependencies
ragel := dep/bin/ragel
DEPS += $(ragel)

$(ragel):
	$(WGET) http://www.colm.net/files/ragel/ragel-6.10.tar.gz
	cd dep && $(UNTAR) ../ragel-6.10.tar.gz
	# Temporarily override the cross-compilation build flags to build ragel on build host (since we don't want to cross-compile it).
	cd dep/ragel-6.10 && CC=gcc CXX=g++ STRIP=strip FLAGS= CFLAGS= CXXFLAGS= LDFLAGS= ./configure --prefix="$(DEP_PATH)"
	cd dep/ragel-6.10 && $(MAKE) && $(MAKE) install

firmware-build: export PATH := $(PWD)/dep/bin:$(PATH)
firmware-build: export RACK_DIR := $(realpath $(RACK_DIR))
firmware-build:
	cd firmware && $(MAKE) -f whitewhale.mk TARGET_NAME=whitewhale GIT_VERSION="v1.5 6CD668C"
	cd firmware && $(MAKE) -f whitewhale.mk TARGET_NAME=whitewhale-kria GIT_VERSION="v0.4 1E0E2FB"
	cd firmware && $(MAKE) -f meadowphysics.mk GIT_VERSION="v2.1 39A2139"
	cd firmware && $(MAKE) -f earthsea.mk GIT_VERSION="v1.9.4 4B88B2E"
	cd firmware && $(MAKE) -f ansible.mk GIT_VERSION="v1.5.0 6EEF788"
	cd firmware && $(MAKE) -f teletype.mk TARGET_NAME=teletype4 GIT_VERSION="v4.0.0 A34DA87"
	cd firmware && $(MAKE) -f teletype.mk TARGET_NAME=teletype5 GIT_VERSION="v5.0.0 00F5FD2"

firmware-clean:
	rm -fv res/firmware/*.dll
	rm -fv res/firmware/*.dylib
	rm -fv res/firmware/*.so

DISTRIBUTABLES += $(wildcard res)
DISTRIBUTABLES += $(wildcard LICENSE*)
DISTRIBUTABLES += $(wildcard presets)

include $(RACK_DIR)/plugin.mk

all: firmware-build

clean: firmware-clean


================================================
FILE: README.md
================================================
monome-rack 
---

Read the manual here:
* https://dewb.github.io/monome-rack

monome-rack is a plugin for the [VCVRack open-source virtual modular synthesizer](https://github.com/VCVRack/Rack) that emulates (some of) the open-source Eurorack modules and control hardware designed and manufactured by [monome](https://monome.org). This is an unofficial community-driven port, made with permission, but no support guarantees, warranties, or suitability for purpose are provided by anyone.

<img width="90%" alt="monome modules and virtual grid in VCVRack" src="https://user-images.githubusercontent.com/712405/211141286-85785c64-74d3-46a0-a81d-241824a77178.png">

This plugin currently includes:
* [teletype](https://monome.org/docs/teletype/), a dynamic, musical, scriptable event triggering platform.
* [ansible](https://monome.org/docs/ansible/), a multi-mode sequencing and event-triggering module
* [white whale](https://monome.org/docs/whitewhale/), a probabilistic step sequencer
* [meadowphysics](https://monome.org/docs/meadowphysics/), an event sequencer for polyrhythms and rule-based evolving patterns
* [earthsea](https://monome.org/docs/earthsea/), a live keyboard that can sequence melodies and recall CV with shape memory gestures
* Support for [monome grid](https://monome.org/docs/grid/) and [monome arc](https://monome.org/docs/arc/) hardware controllers, both current editions and older models, plus virtual versions of the grid controller within VCV Rack, in 64, 128, and 256-key flavors.
    
All of the modules can connect to either a virtual grid or a real hardware grid controller. ([Serialosc](https://monome.org/docs/setup/) is required to use real hardware, but no drivers are required for the virtual grids.) 

Through the virtual grid, all features of each module are accessible, but some features are awkward to use without multiple fingers on a real grid. [See the manual for tips on using virtual grids](https://dewb.github.io/monome-rack/modules/grids/).

## How do I use this?

To install the latest library release:

1. Visit the plugin's [page in the VCV Library](https://library.vcvrack.com/monome) and click **Add**.
2. Start VCV Rack and run **Library > Update All** to install the new modules.
3. Restart VCV Rack.
2. Optional: to use monome grid and arc hardware, make sure to [install serialosc](https://monome.org/docs/setup/).

### Connecting modules to grids

* Start VCVRack. Add a `white whale` and `grid 128` module to your patch.
* Right-click the `white whale` module and select your virtual grid from the list of devices. It should light up.
* If you have a hardware grid connected, right-click the module and select your hardware grid from the list. The virtual grid should go dark and your physical grid should light up.

### Deeper learning and getting help

See the [online manual](https://dewb.github.io/monome-rack), specifically the [Getting Help section](https://dewb.github.io/monome-rack/help/).

### Installing prerelease builds

For instructions on installing prerelease builds, see [DEVELOPING.md](DEVELOPING.md).

## How can I build the source myself?

See [DEVELOPING.md](DEVELOPING.md).

## Who did this? How is it licensed?

See the [Credits & License](https://dewb.github.io/monome-rack/general/credits/).

## What's next?

See the [release plan](https://github.com/users/Dewb/projects/1) for the current thinking, but no promises.

## Why does this exist?

In order of importance, the initial goals of this project were/are:

* Provide an easier environment for developing, debugging, and testing new and improved firmware features for the monome Eurorack modules
* Allow users of the hardware modules to practice, experiment, and/or record while away from their systems
* Expose new users to the monome hardware/software ecosystem
* Accelerate development of completely new grid applications
* "Because it was there"

## How does this work?

The firmwares for the monome modules are written in C for the AVR32 platform. ([More details here](https://github.com/monome/libavr32).) In this project, these firmware repos are built into separate C shared libraries, together with stub I/O implementations for parts of the AVR32 API. The Rack plugin will load a new copy of this firmware library into memory for each module instance you place, so statics and globals work as expected within each copy of the module.


================================================
FILE: docs/content/extra.css
================================================
.module-image-sixhp {
    margin: 0rem 2rem 1.5rem 0rem;
    width: 9.5rem;
    height: auto;
    float: left;
}

.module-image-eighteenhp {
    margin: 0rem 2rem 1.5rem 0rem;
    width: 28rem;
    height: auto;
}

.patch-image {
    margin: 0rem;
    width: 100% !important;
}

.patch-download-link:before {
    content: "\01F4BE";
    text-decoration: none;
    padding: 4px;
}

/* Adjust module image sizes on mobile screens */
@media (max-width: 32rem) {
    .module-image-sixhp {
        width: 7.8rem !important;
        margin: 0em 1.5rem 1.25rem 0em !important;
    }
    .module-image-eighteenhp {
        width: 18rem !important;
    }
}

/* hide blinking cursor in mkdocs-terminal theme */
.terminal-prompt::after { animation: none; -webkit-animation: none; display: none; }

/* hide footer horizontal rule in mkdocs-terminal theme */
hr { visibility: hidden; }

/* make side panel hr mode subtle */
#terminal-mkdocs-side-panel hr {
    visibility: visible !important;
    border: 1px solid lightgray !important;
    width: 3rem;
}


================================================
FILE: docs/content/general/connections.md
================================================
# Connecting devices

All of the modules in this plugin are designed to be used alongside with non-Eurorack control interfaces.

[Earthsea](../../modules/earthsea), [Meadowphysics](../../modules/meadowphysics), [White Whale](../../modules/whitewhale) require a [hardware grid](https://monome.org/docs/grid/) or [virtual grid](../../modules/grids) to function.

[Ansible](../../modules/ansible) requires either a grid or a [hardware arc](https://monome.org/docs/arc/) controller.

[Teletype](../../modules/teletype) uses a [computer keyboard](../../modules/teletype/#using-the-keyboard) for its primary interface, though it can also [take advantage of grids](../../modules/teletype/#teletype-and-grids). 

# Making connections

Place a grid-supporting module in your patch and right-click it. You'll see a list of hardware and virtual grids at the bottom of the menu.

![connection menu](../images/connection-menu.png){: style="width: 20em;"}

Hardware grid connections require [serialosc](https://monome.org/docs/serialosc/setup/). If serialosc is installed, the version will be shown in the menu; make sure yours is 1.4.1 or later. If the serialosc service is not detected, a link to install it will be shown instead.

If you don't see any connections, place a [virtual grid module](../../modules/grids) in your patch and open the menu again.

![connection menu](../images/connection-made.png){: style="width: 10.5em; float: left; margin: 0em 2em 1.5em 0em;"}

Once a connection has been established, the USB port on the module will be drawn with a "wireless connection nub." (The skeuomorphism of VCV Rack requires us to invent these little fictions.)

# Restoring connections

If you connect another module to the same grid, it will be "unplugged" from the original module and the USB jack will appear empty again. To reacquire the connection, click the USB jack, and the grid will be unplugged from its current module and reassigned back to this one.

If you disconnect a hardware grid and reconnect it, the patch will remember the assignment and reconnect the grid to its last connected module, no clicks required.

If you delete a virtual grid from your patch, Undo will bring it back and restore connections. But if you don't undo, you'll have to add a new virtual grid module and connect it again from the right-click menu.

# Hardware support

Any devices that are compatible with [serialosc](https://monome.org/docs/serialosc/setup/) should work, including all editions of the [monome grid](https://monome.org/docs/grid/editions/). Devices without support for variable brightness will have a slightly different experience; some modules fall back to non-varibright support better than others.

# Tips and tricks

* The USB jack is a VCV Rack switch parameter and can be mapped to a MIDI control with [VCV MIDI-MAP](https://vcvrack.com/manual/Core#MIDI-Map) or [Stoermelder MIDI-CAT](https://github.com/stoermelder/vcvrack-packone/blob/v2/docs/MidiCat.md) in order to provide hardware control over where a grid is connected. Consult the documentation for the mapping module for detailed instructions.

================================================
FILE: docs/content/general/credits.md
================================================
# Credits

The original hardware and firmware projects were initiated by [@tehn](https://github.com/tehn) at [monome](https://monome.org) and grew with contributions from members of the [lines community](https://llllllll.co), including [@csboling](https://github.com/csboling), [@ngwese](https://github.com/ngwese), [@scanner-darkly](https://github.com/scanner-darkly), [@samdoshi](https://github.com/samdoshi), [@burnsauce](https://github.com/burnsauce), and many others. See the [individual upstream submodule repositories](https://github.com/Dewb/monome-rack/tree/main/firmware) for more details. 

The VCVRack-specific code is a separate community effort; the above parties should not be expected to support or warranty these ports or take any blame for its imperfections. [@dewb](https://github.com/Dewb) wrote the virtual grid module, the hardware simulation layer, and the VCV module wrappers and software UX for white whale, meadowphysics, earthsea, and teletype. Advice and encouragement from the [lines community](https://llllllll.co) and the adjacent Teletype Study Group Discord was instrumental.

[@dndrks](https://github.com/dndrks) contributed a wealth of material to the documentation site, including the quick-start patches.

## License

The firmware code for the hardware modules are licensed under the version 2 of the GPL. Panel graphics [incorporate elements](https://github.com/monome/teletype-hardware/blob/master/teletype-panel-graphic.pdf) of hardware panel PDFs licensed CC-BY-SA 3.0. 

Full source for the plugin is available at [https://github.com/Dewb/monome-rack](https://github.com/Dewb/monome-rack). The new code in this repository is also licensed under [version 2 of the GPL](https://github.com/Dewb/monome-rack/blob/main/LICENSE).

This project benefits from the inclusion of the following source libraries:

* [base64](https://github.com/ReneNyffenegger/cpp-base64) by René Nyffenegger [License](https://github.com/Dewb/monome-rack/blob/main/lib/base64/LICENSE)
* [simple-svg](https://github.com/adishavit/simple-svg) by adishavit [License](https://github.com/Dewb/monome-rack/blob/main/lib/simple-svg/LICENSE)
* [oscpack](https://github.com/RossBencina/oscpack) by Ross Bencina [License](https://github.com/Dewb/monome-rack/blob/main/lib/oscpack/LICENSE)
* [serialosc_example](https://github.com/daniel-bytes/serialosc_example) by Daniel Battaglia

Naturally, this project wouldn't exist without the [VCV Rack SDK](https://github.com/VCVRack/Rack) and the [many open-source libraries](https://github.com/vcvrack/rack#software-libraries) that it depends on.


================================================
FILE: docs/content/general/intro.md
================================================
# monome for VCV Rack

![all modules](../images/all-modules-50.png)

This collection of modules for the [VCV Rack virtual modular synthesizer](https://vcvrack.com/rack) provides software ports of five digital hardware modules from [monome](https://monome.org).

It was made with the intention of representing the hardware versions as faithfully as possible within the constraints of the software environment.

These are deep, multi-modal sequencers and event generators. This documentation is intended as a reference and getting-started guide for using
these software ports in VCV Rack; for further study consulting the [original hardware documentation](https://monome.org/docs/) is essential.

Read the [credits](../credits).

Get the latest version of the plugin from the [VCV Rack Library](https://library.vcvrack.com/). Older versions and changelogs are available on the [GitHub Releases page](https://github.com/Dewb/monome-rack/releases).


================================================
FILE: docs/content/general/voltage.md
================================================
# Voltage Standards: Inputs

Trigger/gate inputs use [Schmitt triggers](https://vcvrack.com/manual/VoltageStandards#Triggers-and-Gates) with a low threshold of **0.8 V** and a high threshold of **2.21 V**, roughly matching observations on the hardware.

CV inputs respond to a **0-10 V** range. To mimic the hardware behavior, CV inputs are internally sampled to 12 bits of resolution.

# Outputs

TR outs produce a gate or trigger at **8 V**, with pulse length dependent on the application. 

Like inputs, CV ouputs are unipolar with a range of **0-10 V**, and are produced by simulating 12-bit DAC conversion. In order to minimize the average error introduced by the 12-bit DAC simulation, outputs will have a small and harmless offset at 0V.

# Timing

All of these modules produce control-rate modulation signals. Downsampling is enabled by default to save CPU. The amount of downsampling can be changed on a module-by-module basis by right-clicking the module and choosing **Firmware Tools > Input Rate** or **Output Rate**, ranging from **1x** (no downsampling, audio rate) to **/16** (the module ticks only every 16 samples.)

There's generally no benefit to reducing the downsampling and running at audio rate. Most modules process their internal event loops at much less than audio rate regardless of the downsampling setting. The one exception: [Teletype trigger inputs](modules/teletype/#trigger-inputs) will be responded to immediately on the sample they are triggered, so Teletype can theoretically be used for rudimentary audio synthesis if you trigger it at audio rates.

# Sequencer Reset

The [VCV Rack voltage standards for sequencer timing](https://vcvrack.com/manual/VoltageStandards#Timing) describe the challenges in implementing a reset input when the reset and clock inputs might arrive on different samples. Ansible is the only module with a reset input, and rather than the Rack suggested fix, it implements the alternate "Nord reset protocol" strategy, where only clock triggers ever advance the clock, and a low-high transition on the reset input causes the sequence to reset on the next clock step. If a patch does not produce the expected reset behavior due to different propagation times on the clock and reset input, add logic delays to make sure your reset signal arrives *before* the clock signal.

# Polyphony

All modules only carry monophonic signals on each jack, like their physical counterparts. If a polyphonic Rack cable is connected to an input, only the first channel will be used.

However, in many modes the modules can be used to create polyphonic signals and sequences across several outputs. For polyphonic downstream patching, you can use the [VCV Merge](https://vcvrack.com/Fundamental#Split) module to combine multiple CV or TR outs from a single module into a single polyphonic cable. For example, when using the [Kria](https://monome.org/docs/ansible/kria/) app on [Ansible](../../modules/ansible), patching CV 1-4 into one Merge module and TR 1-4 into another Merge module would give you polyphonic CV and gate signals to control polyphonic VCOs and VCAs.

================================================
FILE: docs/content/help.md
================================================
# Learning resources

The official documentation for the original hardware versions of the modules is the best place to get in-depth information about how they work.

   * [ansible](https://monome.org/docs/ansible/)
   * [teletype](https://monome.org/docs/teletype/) + [manual](https://monome.org/docs/teletype/manual) + [command cheatsheet](https://monome.org/docs/teletype/TT_commands_4.0.pdf) + [teletype studies](https://monome.org/docs/teletype/studies-1/)
   * [earthsea](https://monome.org/docs/earthsea/)
   * [meadowphysics](https://monome.org/docs/meadowphysics/)
   * [white whale](https://monome.org/docs/whitewhale/)

See the "Further reading" and "Tutorial videos" sections for each module for additional learning material.

# Communities of practice

[//////// aka Lines](https://llllllll.co) is a nice place to discuss music making and music making tools and making tools for music. There is a [Lines thread on this plugin](https://llllllll.co/t/monome-vcv-rack-ports-development-log/10337). Some excellent and relevant lines threads include:

   * [a user's guide to the wonderful world of teletype](https://llllllll.co/t/a-users-guide-to-the-wonderful-world-of-teletype/35971)
   * [how do you use your ansible?](https://llllllll.co/t/how-do-you-use-your-ansible/46846/)
   * [kria strategies](https://llllllll.co/t/kria-strategies/17671)

Check out the recordings of past [flash crash livecoding events](https://flashcrash.net/) for examples of teletype in live performance.

[The VCV Community Forum](https://community.vcvrack.com) is a community of VCV Rack users and module developers of all experience levels. [There is a thread for discussion of these modules there as well](https://community.vcvrack.com/t/monome-modules-beta-dev-log/3683).

# Development information

For guides to building the plugin from scratch, or using the plugin as a development environment for changes to the module firmware, [see DEVELOPING.md on GitHub](https://github.com/Dewb/monome-rack/blob/main/DEVELOPING.md).

# Reporting bugs

[Create a new issue on GitHub here](https://github.com/Dewb/monome-rack/issues/new/choose). Choose the template that matches your situation, and be sure to fill in all the requested information. Thank you! Clear and complete bug reports are a gift.

================================================
FILE: docs/content/index.md
================================================
<style type="text/css">

.module {
   display: inline-block;
   margin-right: 1.25em;
   margin-bottom: 1.5em;
}
.module a {
    text-decoration: none !important;
}
.module a:hover {
    text-decoration: none !important;
}
.module img {
    height: 18em;
    width: auto;
    margin-top: 0.4em;
}
</style>

##

<div class="module">
 <a href="modules/ansible">
  <b>Ansible</b><br>
  <img src="images/ansible-50.png">
  </a>
</div>

<div class="module">
 <a href="modules/earthsea">
  <b>Earthsea</b><br>
  <img src="images/earthsea-50.png">
 </a>
</div>

<div class="module">
 <a href="modules/meadowphysics">
  <b>Meadowphysics</b><br>
  <img src="images/meadowphysics-50.png">
 </a>
</div>

<div class="module">
 <a href="modules/teletype">
  <b>Teletype</b><br>
  <img src="images/teletype-50.png">
 </a>
</div>

<div class="module">
 <a href="modules/whitewhale">
  <b>White Whale</b><br>
  <img src="images/whitewhale-50.png">
 </a>
</div>

<div class="module">
 <a href="modules/grids">
  <b>Virtual Grids</b><br>
  <img src="images/grids-50.png">
 </a>
</div>

<div class="module">
 <a href="modules/faderbank">
  <b>Faderbank</b><br>
  <img src="images/faderbank.png">
 </a>
</div>

##

[Introduction to the collection](general/intro)

================================================
FILE: docs/content/modules/ansible.md
================================================
![ansible module screenshot](../images/ansible.png){: class="module-image-sixhp" }
## Ansible

Ansible has multiple modes that change the personality and functions of the module. To select a mode, first [connect the module](../../general/connections) to a hardware or virtual grid, or a hardware arc controller. Different modes are available depending on whether the module is connected to a grid or arc.

[Read the introduction to the hardware module](http://monome.org/docs/ansible/#basics).

Only one mode runs at a time, but you can disconnect a device and the previously active mode will continue running and responding to the panel controls and CV inputs.

The modes, each of which has its own detailed manual, are [Kria](https://monome.org/docs/ansible/kria/), [Meadowphysics](https://monome.org/docs/ansible/meadowphysics/), [Earthsea](https://monome.org/docs/ansible/earthsea/), [Cycles](https://monome.org/docs/ansible/cycles/), and [Levels](https://monome.org/docs/ansible/levels/). VCV Rack Ansible does not currently support the MIDI or Teletype Expander modes present on the hardware version.

Earthsea and Meadowphysics are similar to their standalone versions, with some key differences. Ansible Meadowphysics has the ability to produce continuous voltages instead of just gates; Ansible's version of Earthsea drops the shape memory CV feature but adds four-voice polyphony.

The bottom left key is the **MODE** key. A short press in any app will bring up the Preset view ([grid version](https://monome.org/docs/ansible/kria/#presets), [arc version](https://monome.org/docs/ansible/cycles/#presets)). A long press will rotate through the modes available with your currently connected device. The LED next to it indicates which mode is currently active:

| Mode LED color   | Grid       | Arc     |
|------------------|------------|---------|
| Yellow-orange | [Kria](https://monome.org/docs/ansible/kria/) | [Levels](https://monome.org/docs/ansible/levels/) |
| White | [Meadowphysics](https://monome.org/docs/ansible/meadowphysics/) | [Cycles](https://monome.org/docs/ansible/cycles/) |
| Yellow-white | [Earthsea](https://monome.org/docs/ansible/earthsea/) | n/a |


# Outputs

Each Ansible mode produces four trigger/gate outputs from **TR 1-4** on the left side of the module, and four CV outputs on **CV 1-4** on the right side. TR outputs are 0 V low, 8 V high, and CV outputs range from 0-10 V.

# KEY 1 & KEY 2

The two keys above the IN jacks have different functions depending on the mode and on whether you short-tap the buttons or long-hold them. To hold a button in VCV Rack using the mouse, <kbd>Ctrl-click</kbd> (<kbd>Cmd-click</kbd> on Mac) to lock them down so you can use the mouse for other things.

| mode          | KEY 1         | KEY 2                |
|---------------|--------------|---------------------|
| [Kria](https://monome.org/docs/ansible/kria/) | Time View (long) | Config View (long) |
| [Meadowphysics](https://monome.org/docs/ansible/meadowphysics/) | Time View (long) | Config View (long) |
| [Earthsea](https://monome.org/docs/ansible/earthsea/) | Previous Pattern (short) | Next Pattern (short) |
| [Cycles](https://monome.org/docs/ansible/cycles/) | Friction | Reset Pattern (short)<br>Config View (long) |
| [Levels](https://monome.org/docs/ansible/levels/) | Next Pattern (short)<br>Pattern View (long)<br>Change Parameter <br>(short tap while in Config View) | Reset Pattern (short)<br>Config View (long) |

# Inputs

Ansible **IN 1** and **IN 2** jacks accept trigger/gate inputs. Their function depends on the active mode:

| Mode          | IN 1         | IN 2                |
|---------------|--------------|---------------------|
| [Kria](https://monome.org/docs/ansible/kria/) | Clock | Reset |
| [Meadowphysics](https://monome.org/docs/ansible/meadowphysics/) | Clock | Reset |
| [Earthsea](https://monome.org/docs/ansible/earthsea/) | Clock | Start/reset pattern |
| [Cycles](https://monome.org/docs/ansible/cycles/) | Add friction | IN 1 unconnected: Reset<br>IN 1 connected: Add force |
| [Levels](https://monome.org/docs/ansible/levels/) | Clock  | Reset |

# Quickstart

All of these quickstart examples use Ansible alongside modules from VCV's [Free collection](https://vcvrack.com/Free).

**Kria**

![ansible kria quickstart screenshot](../images/ansible-kria-quickstart.png){: class="patch-image" }
*uses: Ansible, ADSR, VCA, VCO, AUDIO*

[ansible-kria-quickstart.vcv](../patches/ansible-kria-quickstart.vcv){: class="patch-download-link" }

- Connect Ansible to a grid. (See [Making Connections](../../general/connections/#making-connections).)
- The LED next to the **MODE** key should be *yellow-orange*. If it isn't, hold + release the **MODE** key to cycle through modes until Kria is active.
- Patch **TR 1** to the GATE input of ADSR.
- Patch **CV 1** to the V/OCT input of VCO.
- Patch **CV 2** to the PWM input of VCO and add modulation using the attenuator.
- Patch ADSR's ENV and VCO's SQR to a VCA, then to AUDIO's L input.
- Press some pads in Kria's top row to create a rhythm on **TR 1**.
- Switch to the NOTE page on the grid by pressing the 7th key on the bottom row, and set notes for **CV 1**.
- Switch to Track 2 on the grid by pressing the 2nd key on the bottom row, and set notes for **CV 2**'s modulation of the VCO's pulse width.
- Switch to the OCTAVE page on the grid by pressing the 8th key on the bottom row, and set different octaves for **CV 2**'s steps.

**Meadowphysics**

![ansible meadowphysics quickstart screenshot](../images/ansible-meadowphysics-quickstart.png){: class="patch-image" }
*uses: Ansible, ADSR, VCA, VCO, AUDIO*

[ansible-meadowphysics-quickstart.vcv](../patches/ansible-meadowphysics-quickstart.vcv){: class="patch-download-link" }

- Connect Ansible to a grid. (See [Making Connections](../../general/connections/#making-connections).)
- Hold + release the **MODE** key to move from Kria to Meadowphysics. The LED next to the **MODE** key should be *white*.
- <kbd>Ctrl-Shift-click</kbd> (<kbd>Cmd-Shift-click</kbd> on Mac) **KEY 2** on Ansible's faceplate to open the [config interface](https://monome.org/docs/ansible/meadowphysics/#config).
- Set the *voice mode* to *2 CV/TR voices*.
- Patch **TR 1** to the GATE input of ADSR.
- Patch **CV 1** to the V/OCT input of VCO.
- Patch **CV 2** to the PWM input of VCO and add modulation using the attenuator.
- Patch ADSR's ENV and VCO's SQR to a VCA, then to AUDIO's L input.
- Hold down any pad outside of column 1 in any row and press another pad in the same row to create a [count range](https://monome.org/docs/ansible/meadowphysics/#basic) -- if you're using a virtual grid, <kbd>Ctrl-click</kbd> (<kbd>Cmd-click</kbd> on Mac) will hold a pressed pad until you release <kbd>Ctrl</kbd> / <kbd>Cmd</kbd>.

**Earthsea**

![ansible earthsea quickstart screenshot](../images/ansible-earthsea-quickstart.png){: class="patch-image" }
*uses: Ansible, ADSR (2x), VCO (2x), VCA MIX, AUDIO*

[ansible-earthsea-quickstart.vcv](../patches/ansible-earthsea-quickstart.vcv){: class="patch-download-link" }

- Connect Ansible to a grid. (See [Making Connections](../../general/connections/#making-connections).)
- Hold + release the **MODE** key to move from Kria to Meadowphysics and then Earthsea.  The LED next to the **MODE** key should be *yellow-white*.
- Hold the bottom-left pad on the grid to enter the [voice allocation interface](https://monome.org/docs/ansible/earthsea/#voice-allocation) and set the first two outputs to active on both *pattern* and *live*.
- Instantiate two ADSR and two VCO modules.
- Set one of the VCO's FREQ to 1/2 the FREQ of the other.
- Patch **TR 1** and **TR 2** to the GATE input of each ADSR.
- Patch **CV 1** and **CV 2** to the V/OCT input of each VCO.
- Patch one output of each VCO to the first two inputs of VCA MIX.
- Patch each ADSR's ENV output to the corresponding CV inputs of VCA MIX.
- Patch the VCA MIX's MIX output to AUDIO's L input.
- [Arm a pattern recorder](https://monome.org/docs/ansible/earthsea/#pattern-recording) by pressing the key in the third row of the leftmost column.
- Record some chord shapes on the grid. Hit the pattern record arm key again to stop recording and play the pattern back.

# Grid reference

When using Kria, the bottom row of the grid controls the track/mode/view, and is consistent across modes (with a couple of exceptions.) The rest of the grid contents depend on the mode you're in. See [the hardware documentation](https://monome.org/docs/ansible/kria/) for more details.

![ansible kria grid legend screenshot](../images/ansible-kria-grid-legend.png){: class="patch-image" }

[ansible-kria-grid-legend.vcv](../patches/ansible-kria-grid-legend.vcv){: class="patch-download-link" } *(requires [Stoermelder Glue](https://library.vcvrack.com/Stoermelder-P1))*

For Meadowphysics, see the [grid legends for standalone Meadowphysics](../meadowphysics/#grid-reference).

For Earthsea, see the [grid legend for standalone Earthsea](../earthsea/#grid-reference). Ansible Earthsea is identical except the last two functions, Slew and Portamento, are replaced by the [Runes](https://monome.org/docs/ansible/earthsea/#runes) and [Voice Allocation](https://monome.org/docs/ansible/earthsea/#voice-allocation) screens.

# Further reading

* Ansible [hardware documentation](http://monome.org/docs/ansible/)
* [Kria tutorial](https://llllllll.co/t/monome-ansible-kria-in-depth-overview-and-tutorial/34821) by [Puscha](https://puscha.bandcamp.com/)
* [Kria strategies](https://llllllll.co/t/kria-strategies/17671)
* ["ansible" search on llllllll.co](https://llllllll.co/search?q=ansible)

================================================
FILE: docs/content/modules/earthsea.md
================================================
![earthsea module screenshot](../images/earthsea.png){: class="module-image-sixhp" }
## Earthsea

Earthsea, [connected to a grid controller](../../general/connections), is an isomorphic keyboard and sequencer. 

Without a grid connection it will not produce any output, but once a sequence has been played and recorded, you can disconnect the grid and the sequence will continue playing.

[Read the introduction to the hardware module](http://monome.org/docs/earthsea/#introduction).

# CV 1-3 knobs and outputs

The **CV 1-3** jacks each output a 0 V to 10 V signal that is initially controlled by the paired knob. When using a [shape memory gesture](https://monome.org/docs/earthsea/#shape-memories) on the grid, the previously stored CV values will be recalled, subject to the [slew settings](https://monome.org/docs/earthsea/#slew). These values are also displayed on the bottom three rows of a connected grid.

# EDGE and POS outputs

**EDGE** produces an 8 V gate when a note event is triggered, either by playing the keyboard or playing back a sequence.  
**POS** outputs a pitch CV from 0 V to 10 V corresponding to the scale position of the note being played.

# Inputs

Earthsea does not have any inputs.

# Grid reference

Earthsea uses the leftmost column for mode controls, leaving the entire rest of the grid as a playing surface (called the *keymap*.) Notes in the keymap are arranged by semitones on the x-axis and by fourths on the y-axis. The most recently played key is highlighted; the pitch of this key will be present on the *POS* output in V/oct format.

Various forms of information are shown on the grid as horizontal bars underneath the keymap. When the sequencer is playing, the top row will display the progress of the loop. The bottom three rows show the current value of CV 1-3.

![earthsea grid legend screenshot](../images/earthsea-grid-legend.png){: class="patch-image" }

[earthsea-grid-legend.vcv](../patches/earthsea-grid-legend.vcv){: class="patch-download-link" } *(requires [Stoermelder Glue](https://library.vcvrack.com/Stoermelder-P1))*

# Quickstart

This quickstart example uses Earthsea alongside modules from VCV's [Free collection](https://vcvrack.com/Free).

![earthsea quickstart screenshot](../images/earthsea-quickstart.png){: class="patch-image" }
*uses: Earthsea, ADSR, VCO, VCF, VCA MIX, AUDIO*

[earthsea-quickstart.vcv](../patches/earthsea-quickstart.vcv){: class="patch-download-link" }

- Connect Earthsea to a grid. (See [Making Connections](../../general/connections/#making-connections).)
- Patch Earthsea's **EDGE** output to ADSR's GATE input.
- Patch Earthsea's  **POS** output to VCO's V/OCT input.
- Patch VCO's SQR output to VCF's IN.
- Patch VCF's LPF output to IN 1 of VCA MIX.
- Patch ADSR's ENV output to CV 1 of VCA MIX.
- Patch VCA MIX's MIX output to AUDIO's L input.
- Patch Earthsea's **CV 1** output to the PWM input of VCO and add modulation using the attenuator above the input.
- Patch Earthsea's **CV 2** output to the CUT input of VCF and add modulation using the attenuator above the input.
- [Arm a pattern recorder](https://monome.org/docs/earthsea/#patterns) by pressing the key in the third row of the first column. Record a melody by pressing keys on the grid in columns 2-16. Hit the third key in the first column again to start playing the pattern back.

If you have a hardware grid and can make simultaneous multi-finger gestures, you can try the shape memory feature:

- Add voltage to Earthsea's **CV 1** and **CV 2** by turning their knobs clockwise, and perform a [shape-memory gesture](https://monome.org/docs/earthsea/#shape-memories) to store those settings and start editing the new shape.
- Repeat the previous step for additional values and **triples** *shape-memories*.
- As the pattern plays, switch between *shape-memories*.
- [Add slew to a shape memory CV channel](https://monome.org/docs/earthsea/#slew) by holding down the 7th key in the first column and turning the CV 1 knob.

# Further reading

* Earthsea [hardware documentation](http://monome.org/docs/earthsea/)
* ["earthsea" search on llllllll.co](https://llllllll.co/search?q=earthsea)

# Video tutorials

* [Earthsea introduction](https://vimeo.com/113231441)


================================================
FILE: docs/content/modules/faderbank.md
================================================
##

![faderbank module screenshot](../images/faderbank.png){: class="module-image-eighteenhp" }

## Faderbank

The faderbank module is a virtual control surface inspired by the open source [16n-faderbank hardware controller](https://16n-faderbank.github.io). The 16n was developed by Brian Crabtree, Sean Hellfritsch, Tom Armitage, and Brendon Cassidy.

At heart it's simple: sixteen faders, with 16 CV outputs. Output ranges are selectable from 0-10V, 0-5V, or +/-5V from the right-click menu.

This virtual version has two reasons for existing: to provide extra parameter inputs as an expander to Teletype, and to make it easy to use the 16n-faderbank and compatible hardware with VCV Rack.

# Using with 16n hardware

Plug in your faderbank via USB. Right-click the module and hover over the **MIDI connection** submenu. Select your driver and the 16n device. 

If your 16n is set to use the default CC and channel mappings (CCs 32-47 on channel 1) then you're all set.

If your 16n has a custom configuration, right-click the module again and select the **Autodetect 16n configuration** command. Rack will interrogate the 16n via sysex and configure the virtual faders to respond to the configured MIDI events.

This command also has the side effect of requesting a CC update from every fader, so you can use it to bring the virtual and hardware faders back in sync after the controller has been disconnected.

If you are not connected to a device that responds to 16n sysex, then **Autodetect 16n configuration** will reset the MIDI mapping to the default (CCs 32-47 on channel 1.)

# Using with non-16n hardware

You can also use the module with another MIDI controller. If you can configure your MIDI controller to use CC numbers 32-47 on channel 1, then you can connect it via the right-click menu on the module just like a 16n.

If you cannot configure your MIDI controller to use CC 32-47, then you can map the faders individually the normal way using the VCV Core [MIDI-Map](https://vcvrack.com/manual/Core#MIDI-Map) module.

# Using with Teletype

When a faderbank is placed immediately next to Teletype, it serves as a param expander. The fader values (0-16383) are available with the `FADER` op (or `FB` for short.) The voltage range option has no effect on the digital values seen by Teletype.

`FADER.SCALE` is also helpful -- see the [teletype manual](https://monome.org/docs/teletype/manual/#n) for more details on using the faderbank OPs.

Teletype 4.0 only supports a single faderbank (faders 1-16). Teletype 5.0 supports up to four separate devices (faders 1-64). 

Multiple connected faderbanks are addressed in order from left to right, on either side of Teletype. If you have more than four in a row, the fifth and subsequent faderbank modules will be ignored. If more than one Teletype module adjoins a set of adjacent faderbanks, the fader values will be available to both Teletype instances.

For example, here's a script to copy values from two faderbanks into slots 0-15 of tracker patterns 0 and 1. Put this in `M` and set `M 20` in LIVE mode.

```
L 0 15: PN 0 I FB + I 1
L 0 15: PN 1 I FB + I 17
```

# Using with Stoermelder Glue

Right click the module and change **Fader length** to 60mm in order to free up some space for resting your wrists, and/or for applying labels using [Stoermelder Glue](https://library.vcvrack.com/Stoermelder-P1/Glue), so you don't forget what the faders are connected to.

![faderbank and Glue screenshot](../images/faderbank-glue.png)

# Polyphonic mode

Right-click the module and check **Polyphonic mode** to convert the #16 output into a polyphonic output that contains all 16 fader voltages on one cable.

# Further reading

* [16n-faderbank website](https://16n-faderbank.github.io)
* [16n-faderbank GitHub repository](https://github.com/16n-faderbank/16n)
* [16n is a bank of faders](https://llllllll.co/t/16n-is-a-bank-of-faders-release-thread/18620) lines thread
* ["16n" search on llllllll.co](https://llllllll.co/search?q=16n)


================================================
FILE: docs/content/modules/grids.md
================================================
# Virtual grids

![original prototype virtual grid in VCV Rack 0.5](../images/prototype.jpg)

# Sizes

Virtual grids come in 64 (8x8), 128 (16x8), and 256 (16x16) key flavors. Most modules and modes are designed for the 128-key version, though all will work with every size; some features may not be available or might not work exactly the same way on the other sizes.

# Limitations vs. hardware

The virtual grids are something of a compromise. They're never going to be as performable or tactile as a physical controller. 

Using all features of these grid-supporting modules relies on gestures intended to be performed with two hands. Unfortunately, VCV Rack doesn't currently support multi-touch, so with a mouse alone you can only press one key at a time.

However, using the mouse and computer keyboard together, we can approximate some multi-handed gestures.

# Holding keys

To compensate for only having one pointer finger instead of ten, you can <kbd>Ctrl-click</kbd> keys (or <kbd>Cmd-click</kbd> on Mac) to hold them down momentarily. You can hold multiple grid keys while you hold down <kbd>Ctrl</kbd> (or <kbd>Cmd</kbd>) and all the held grid keys will be released when you stop holding it.

This is handy for typical gestures like [setting the loop length on White Whale](http://monome.org/docs/whitewhale/#position--clock). <kbd>Ctrl-click</kbd> a key in row 2 to set the loop start, and then while still holding <kbd>Ctrl</kbd>, click another key in row 2 to set the end point.

![ctrl-clicking keys to set white whale loop length](../images/whitewhale-ctrl-click.webp){: }

# Locking keys

Sometimes you need to hold a key down for a longer period of time. <kbd>Ctrl-Shift-click</kbd> a grid key (<kbd>Cmd-Shift-click</kbd> on Mac) to "lock" it down until you click it again. If you lock multiple keys, you can release them all at once by hitting <kbd>Esc</kbd> while hovering over the grid, or selecting **Release Locked Keys** from the right-click menu.

Locked keys are indicated by a dot in the lower left corner. 

Locking a key allows you to use mode/settings pages, where you might need to hold a key down while pressing several other keys. For example, to enter [Edge Mode](http://monome.org/docs/earthsea/#edge) on [Earthsea](../modules/earthsea), <kbd>Ctrl-Shift-click</kbd> the 6th key in the first column to enter the mode, and then click the glyphs to change the gate method and time. Click the locked key again to unlock it and return to the main mode.

![ctrl-shift-clicking keys to lock earthsea glyph mode](../images/earthsea-ctrl-shift-click.webp){: }

# Combining gestures

Locking and holding keys can work together. For example, to adjust loop length in Kria, <kbd>Ctrl-Shift-click</kbd> the [Loop Modifier key](https://monome.org/docs/ansible/kria/#modifiers) in row 8 to edit loop lengths, then <kbd>Ctrl-click</kbd> the start and end of the loop in rows 1-4.

![ctrl-shift-clicking to lock kria loop modifier mode, then ctrl-clicking to set loop length](../images/kria-combined-gestures.webp){: style="border-right: 0.2em solid #bfbfbf; border-bottom: 0.1em solid #bfbfbf;" }

# Theme and protocol options

From the right-click menu, you can change the *Theme* of a individual grid instance to differentiate it from other grids in your patch, or just for personal style preference. The four themes are *loosely* based on the various eras of grid controller hardware. They don't have identical brightness curves and some themes may be more satisfying than others for certain modules and modes.

There is also a menu option to change the protocol the grid is simulating. This might be useful if you have an older-protocol hardware grid and you want to practice with the same non-varibright behavior on a virtual grid, or if you are developing new module firmware and want to test against older, non-varibright grids. Most users should leave this set to *Mext (varibright)*.



================================================
FILE: docs/content/modules/meadowphysics.md
================================================
![meadowphysics module screenshot](../images/meadowphysics.png){: class="module-image-sixhp" }
## Meadowphysics

Meadowphysics generates eight interrelated gate sequences. Without a grid connected, it will output eight gate sequences driven by the CLOCK knob or the external clock patched to the clock input. With a [grid connected](../../general/connections), the individual timing, rules, and complex triggering conditions of the sequences can be manipulated.

[Read the introduction to the hardware module](http://monome.org/docs/meadowphysics/#introduction).

The trigger outputs from Meadowphysics are suitable for firing off ADSR envelopes, pinging LPGs or filters, clocking or resetting sequencers, triggering drum modules or samplers, or whatever complex events you have in your patch. Meadowphysics was originally designed as a script-triggering companion to [Teletype](../teletype), so try using them together once you're familiar with both.

# Main outputs

Outputs 1-8 produce gates at 8 V according to the counters on rows 1-8 of the grid. Outputs follow the pulse length of the clock; the built-in clock has a 50% duty cycle.

# CLOCK knob & jacks

The **CLOCK** knob controls the timing of clock pulses that drive the counters. The knob ranges from a period of 1 second to a period of 23ms. Patching a signal into **CLOCK IN** will override the timing and [every low/high transition](../../general/voltage/#inputs) on the input will pulse the counters. Very fast clocks approaching a 1ms period may result in skipped pulses; the module will not go into audio rate.

When an external clock is patched, the knob becomes a clock divider/multiplier, from a 1/16 division to a 16x multiplier. **CLOCK OUT** outputs the internal clock when it is active or external clock, post division/multiplication, if one is patched.

# PRESET key

VCV Rack will remember the current working memory in your patch, but the **PRESET** key can be used to store and recall 16 different states to the module's "internal memory." Press and hold to quicksave the current state to the active slot, or short-press to [enter Preset mode](http://monome.org/docs/meadowphysics/#preset).

# Quickstart

This quickstart example uses Meadowphysics alongside modules from VCV's [Free collection](https://vcvrack.com/Free). 

![meadowphysics quickstart screenshot](../images/meadowphysics-quickstart.png){: class="patch-image" }
*uses: Meadowphysics, VCO (2x), VCA MIX (2x), FADE, LFO, AUDIO*

[meadowphysics-quickstart.vcv](../patches/meadowphysics-quickstart.vcv){: class="patch-download-link" }

- Connect Meadowphysics to a grid
- Patch the four outputs of each VCO to the four inputs of each ADSR
- Patch the eight **TR** outputs of Meadowphysics to the CV inputs of each ADSR
- Patch the MIX outputs of each ADSR to the inputs of FADE
- Patch any LFO output to FADE's X FADE input and add modulation using the Crossfade CV attenuator above
- Patch the output of FADE to the L/MON input of AUDIO
- To set a different count for each row, press any pad beyond the first column in that row
- Hold down any pad outside of column 1 in any row and press another pad in the same row to create a [count range](https://monome.org/docs/ansible/meadowphysics/#basic)
- Change the [rule](https://monome.org/docs/meadowphysics/#rules--ranges) for each range

# Grid reference

![meadowphysics grid legend screenshot](../images/meadowphysics-grid-legend.png){: class="patch-image" }
![meadowphysics grid legend links screenshot](../images/meadowphysics-grid-legend-links.png){: class="patch-image" }
![meadowphysics grid legend rules screenshot](../images/meadowphysics-grid-legend-rules.png){: class="patch-image" }

[meadowphysics-grid-legends.vcv](../patches/meadowphysics-grid-legends.vcv){: class="patch-download-link" } *(requires [Stoermelder Glue](https://library.vcvrack.com/Stoermelder-P1))*

# Further reading

* Meadowphysics [hardware documentation](http://monome.org/docs/meadowphysics/)
* ["meadowphysics" search on llllllll.co](https://llllllll.co/search?q=meadowphysics)

# Video tutorials

* [meadowphysics possibilities](https://vimeo.com/107582557)
* [meadowphysics tutorial](https://vimeo.com/107586549)
* [meadowphysics two](https://vimeo.com/146731772)

================================================
FILE: docs/content/modules/teletype.md
================================================
##

![teletype module screenshot](../images/teletype.png){: class="module-image-eighteenhp" }

## Teletype

Teletype is a generative scripting system and sequencing toolkit designed for live coding and musical exploration. It can serve lots of roles in a patch including a simple tracker-style sequencer, a random gate processor, or a development platform for complex grid-enabled applications. It can be the brain of your entire patch, or it can just provide some custom utility glue.

# Modes, Scripts, and OPs

Teletype has three main modes: [LIVE](http://monome.org/docs/teletype/manual/#live-mode) mode, where commands are executed immediately, [EDIT](http://monome.org/docs/teletype/manual/#edit-mode) mode, where code is assembled into stored scripts, and [TRACKER](http://monome.org/docs/teletype/manual/#patterns) mode, where pattern data can be edited visually. Pressing the <kbd>TAB</kbd> key will cycle between these three main modes. 

Scripts can be simple or intricate, but there are just ten of them, and each one is only six lines long. Scripts `1-8` are triggered by the eight trigger inputs. The ninth script, `M` for metronome, is triggered by the internal clock, and the tenth `I` script runs when a preset is loaded. Scripts can also be triggered by <kbd>F1-F10</kbd> on the keyboard, or with a connected grid. Scripts can also trigger other scripts with the `SCRIPT n` operator.

Scripts are made up of operators or [OPs](http://monome.org/docs/teletype/manual/#ops-and-mods). *OPs* may have one or more arguments that could be  numbers or the outputs of other OPs. OPs and values are combined in [prefix notation](https://en.wikipedia.org/wiki/Polish_notation). Hit <kbd>Alt-H</kbd> (<kbd>Option-H</kbd> on Mac) on the keyboard to enter **HELP** mode, an on-device reference for OPs and their arguments.

# Using the keyboard

To send keyboard input to Teletype, click the screen with your mouse or trackpad. A highlight ring will be drawn around the screen to indicate keyboard focus. Keystrokes will go into Teletype instead of Rack until you click away to un-focus the screen. 

Note that your operating system may intercept some keyboard combinations (like <kbd>Alt-Esc</kbd> to enter **SCENE WRITE** mode). If that happens, <kbd>Alt-Esc</kbd> and other critical key combinations can also be triggered via the right-click menu.

The VCV Rack version of Teletype defers keycode processing to the firmware, so like the hardware, it operates directly on fixed USB HID scancodes. The translation of Rack keystrokes to HID keystrokes can be customized for different keyboard layouts. Right-click the module and select **Keyboard layout** to change the layout for all Teletype instances. 

These layout options are defined with JSON files in your Rack2 user folder, under `Rack2/plugin-<os>-<arch>/monome/res/keymaps`. Adding or modifying files here will allow you to customize this translation process for international keyboards or other alternate layouts. [See GitHub for details](https://github.com/Dewb/monome-rack/tree/main/res/keymaps).

# TRIGGER inputs

Each trigger input **1-8** across the top of the module corresponds to scripts `1-8`. These respond to rising edges of voltage greater than 2.21 V, as outlined in the [Voltage Standards](../../general/voltage/). 

# IN jack & PARAM knob

The **IN** jack and **PARAM** knob can be used to set and replace values. Each returns a value in the range 0-16383, representing 0 V to 10 V. See [the Teletype manual](https://monome.org/docs/teletype/manual/#hardware/) for more information.

The value at **IN** can be queried using the `IN` operator.  
The value of the **PARAM** knob can be queried using the `PARAM` operator (or `PRM` for short.)

# TR 1-4 outputs

Teletype has four trigger/gate outputs, **TR 1-4**. TR outputs are 0 V low, 10 V high. The `TR` operators in the [the Hardware section](https://monome.org/docs/teletype/manual/#hardware/) interact with the trigger outputs. 

# CV 1-4 outputs

Teletype has four CV outputs, **CV 1-4**. CV outputs are 0 V low, 10 V high. The `CV` operators in the [the Hardware section](https://monome.org/docs/teletype/manual/#hardware/) interact with the CV outputs. 

# Saving, loading, and the SCENE key

A *scene* is a complete set of scripts and patterns. The physical module can save up to 32 scenes to its flash memory, and can import and export scenes from a USB drive. The VCV Rack version will save both the current working memory of Teletype *and* up to 32 scenes in your patch. 

To write a scene, press <kbd>Alt + Esc</kbd> (<kbd>Option + Esc</kbd> on Mac) or right-click Teletype and choose "SCENE WRITE mode". Use the bracket keys (`[` and `]`) on your keyboard to select the destination save position. Title and describe your scene, then press <kbd>Alt + Esc</kbd> (<kbd>Option + Esc</kbd> on Mac) to store it. You can write up to 32 scenes in any one virtual instance of Teletype.

You can also save the entire module state -- the active scene and all saved scenes -- for future recall, using VCV Rack's general Preset system. Right-click the Teletype module and navigate to *Preset > Save as*. This will save everything about this copy of Teletype as a single preset file under `Rack 2 > presets > monome > teletype`.

To recall a preset, right-click the Teletype module and navigate to *Preset*. You'll see your saved presets under *User presets*. The **SCENE** key at the bottom of the module allows you to quickly access the scenes stored within the loaded preset.

You can also save and load scenes as text files, which can be transferred in and out of physical Teletype modules. Right-click Teletype and you'll see *Import scenes* and *Export scenes*. These will import and export standard `.txt` files, same as those seen in the [Teletype Code Exchange](https://llllllll.co/t/teletype-code-exchange/839). From this menu you can also copy and paste scenes from the clipboard (including partial scene fragments.)

See [the Teletype manual](https://monome.org/docs/teletype/manual/#scenes) for more information about scenes.


# Quickstart 1

This quickstart example uses Teletype alongside modules from VCV's [Free collection](https://vcvrack.com/Free).
We'll use Teletype's internally-clocked `M` script and as little typing as possible to start sequencing some notes.

![teletype quickstart 1 screenshot](../images/teletype-quickstart-1.png){: class="patch-image" }
*uses: Teletype, VCO, ADSR, VCA, AUDIO*

[teletype-quickstart-1.vcv](../patches/teletype-quickstart-1.vcv){: class="patch-download-link" }

- Patch Teletype's **CV 1** output to the VCO's V/8 input
- Patch Teletype's **TR 1** output to the ADSR's GATE input
- Patch the SAW output of the VCO to the audio input of the VCA
- Patch the ADSR's ENV output to the CV input of the VCA 
- Patch the VCA output to the L/MON input of the AUDIO module
- Turn down the VCO Freq knob to 32.703 Hz (or right-click the knob and type `C1`).
- Now, click on the Teletype screen. You should see a highlight ring appear around it, signaling that Teletype has keyboard focus.
- Hit <key>TAB</key> until you are in EDIT mode (there will be a script number in the lower left-hand corner) or right-click Teletype and choose `EDIT MODE`.
- Hit the <key>[</key> and <key>]</key> keys until the `M` script is visible (it will be empty.) 
- Enter the command `CV 1 N.B RRAND 1 7` and hit Enter. That line should now appear as the first line of the `M` script.
- Enter a second command `TR.PULSE 1` and hit Enter. That line should now appear as the second line of the `M` script.

At this point you should start to hear notes coming out, once per second, which is the default period of the metronome that triggers `M`. The first line is selecting a random note from the C Major scale and sending it out as a V/oct pitch value on CV 1. The second line is triggers a short pulse on the TR 1 output.

To add some variety, add a third script line: `PROB 20: CV.OFF 1 V RRAND 0 3` to randomly switch octaves.

To make the clock speed controllable with the *PARAM* knob, try adding the following lines:
```
PARAM.SCALE 60 240
M BPM PARAM
TR.TIME / M 2
```

The first line tells Teletype to interpret the *PARAM* knob as ranging from 60 to 240. The second line sets the new `M` period to a value that would result in the BPM specified by the `PARAM` value. The third line sets the TR pulse time to one-half the clock period so the notes scale with the clock rather than running together.

# Quickstart 2

This quickstart example uses Teletype alongside modules from VCV's [Free collection](https://vcvrack.com/Free). In addition to using Teletype's internal clock, we'll also trigger scripts with external input to sequence exciting changes to our patch. [Meadowphysics](../meadowphysics) was originally designed as a script-triggering companion to Teletype, so that's exactly what we'll use it to do.

![teletype quickstart 2 screenshot](../images/teletype-quickstart-2.png){: class="patch-image" }
*uses: Meadowphysics, Teletype, grid (optional), VCO (2x), ADSR (2x), VCA MIX, AUDIO*

[teletype-quickstart-2.vcv](../patches/teletype-quickstart-2.vcv){: class="patch-download-link" }

- Load the `TRIANGLE MOUNTAIN` factory preset by right-clicking Teletype and hovering over the *Preset* submenu, then clicking `TRIANGLE MOUNTAIN`.
- Patch **CV 1** to the first VCO's V/8 input, and **CV 2** to the other's
- Patch **TR 1** to the first ADSR's GATE input, and **TR 2** to the other's
- Patch the TRI output of the first VCO to the first input of VCA MIX
- Patch the SAW output of the second VCO to the second input of VCA MIX
- Patch the first ADSR's ENV to CV 1 of VCA MIX
- Patch the second ADSR's ENV to CV 2 of VCA MIX

If all went well, you'll start hearing a cycling arpeggio from the first VCO. Experiment with patching outputs from Meadowphysics into each of Teletype's eight trigger inputs. We recommend starting with trigger input `5` to get a sequence going on the second VCO, then explore from there! Be sure to play with running Meadowphysics and Teletype at different rates, with the *CLOCK* knob on Meadowphysics and the *PARAM* knob on Teletype.

Click the Teletype screen and hit <key>Tab</key> to look at the pattern values in TRACKER mode and the scripts in EDIT mode. The TRIANGLE MOUNTAIN scene demonstrates several Teletype features, including the `P` [pattern ops](https://monome.org/docs/teletype/manual/#patterns-1), the `S` [stack ops](https://monome.org/docs/teletype/manual/#stack), and the [preconditions](https://monome.org/docs/teletype/manual/#control-flow) `IF:`, `ELSE:` and `L:` (for Loop).


# Teletype and grids

Unlike the other modules in this collection, Teletype can be used close to fully without a grid controller. But it does have two optional ways to interact with a connected grid.

The first is "Grid Control Mode" which is always available, without special scripting. Connect a grid and press the `PRESET` button twice to enable grid control mode. It will only take up an 8x8 section of the grid, so on larger grids the rest of the grid will show whatever the scene has scripted (or nothing.) From the grid control mode interface, you can jump to scripts in the editor, toggle and mute them, edit patterns, mute individual lines of code, and manage scenes. See the [GRID INTEGRATION guide section on Grid Control Mode](https://github.com/scanner-darkly/teletype/wiki/GRID-CONTROL-MODE) for the details.

The second way to interact with grids is to script your own interface. The `G` series of operators allow creating scenes that can light up individual LEDs, draw shapes, and create controls (such as buttons and faders) that can be used to trigger and control scripts. 

For the basics, see [the Teletype manual](https://monome.org/docs/teletype/manual/#grid).

For advanced scripting techniques, see [@scanner-darkly](https://github.com/scanner-darkly)'s [GRID INTEGRATION studies](https://github.com/scanner-darkly/teletype/wiki/GRID-INTEGRATION).

You can use either a physical or virtual grid to take advantage of the grid operators or Grid Control Mode. Hardware versions of Teletype can't use both the grid and the keyboard at the same time, and there are [some precautions to follow](https://monome.org/docs/grid/grid-modular/#teletype) regarding power loads, but thankfully the software version has none of these restrictions, making it an excellent environment for developing complex grid scenes that you can later transfer to hardware.

# Alternate firmware

Choose **Firmware Tools > Switch Firmware** to see alternate firmware options for Teletype.

Currently there are firmware options for the Teletype 4.x and 5.x release streams. Older versions of monome-rack used Teletype 4.x by default; as of monome-rack 2.2.5, newly placed modules will default to 5.x, but modules already placed in your patch will stay on whatever they're currently using.

Switching firmware will reset the active scene VRAM and the stored scenes NVRAM for the module. Make sure to export any scenes you want to keep before switching firmware editions.

# Further reading

* Teletype [hardware documentation](http://monome.org/docs/teletype/)
* Teletype manual [on the web](https://monome.org/docs/teletype/manual) and [in PDF format](https://monome.org/docs/teletype/manual.pdf)
* Printable Teletype 5.0 [command cheat sheet](https://monome.org/docs/teletype/TT_commands_5.0.pdf)
* [Teletype Studies](https://monome.org/docs/teletype/studies-1/)
* [A user's guide to the wonderful world of teletype](https://llllllll.co/t/a-users-guide-to-the-wonderful-world-of-teletype/35971)
* [Teletype workflow, basics, and questions](https://llllllll.co/t/teletype-workflow-basics-and-questions/12392)
* [Teletype code exchange](https://llllllll.co/t/teletype-code-exchange/839)
* [Teletype grid integration](https://github.com/scanner-darkly/teletype/wiki/GRID-INTEGRATION)
* ["teletype" search on llllllll.co](https://llllllll.co/search?q=teletype)

# Video tutorials

* [VCV Rack Teletype tutorial by Jakub Ciupinski](https://www.youtube.com/watch?v=AMldf2W0mUw)
* [VCV Rack Teletype Microtutorials by Obakegaku](https://youtube.com/playlist?list=PLt9Y2vOdxouMOWfxDrgVIY0hMZvFCSBw7) and [patch files](https://patchstorage.com/author/obakegaku/)
* ["Teletype Talk" series by Joe Filbrun](https://www.youtube.com/watch?v=mMAhjRKrpZE&list=PLoxHBVkj2rip4Ce4kxdz_k7mK9Z8Wygo-)
* [Teletype videos by The Ghost Saboteur](https://www.youtube.com/playlist?list=PLMHhQKTYXU657VGx48aj-0rs_tjoz7-Eo)
* [Teletype & generative 201](https://www.youtube.com/watch?v=cVHhZkG-pck) from mcpm - [slides and code](https://docs.google.com/presentation/d/1NpNET1D4FlF4zljdo58_u29eLRYLV7yAbxGCsyR12hA/edit#slide=id.gf9647da6be_0_189)



================================================
FILE: docs/content/modules/whitewhale.md
================================================
![white whale module screenshot](../images/whitewhale.png){: class="module-image-sixhp" }

## White Whale

White Whale, [connected to a grid controller](../../general/connections), is a live probabilistic step sequencer. It is the culmination of methods and experiments based on a decade of step sequencer design for the grid.

Without a grid connection it will not produce any output besides a clock, but once a sequence has been entered, you can disconnect the grid and the sequence will continue playing.

[Read the introduction to the hardware module](http://monome.org/docs/whitewhale/#introduction).

# CV A-B & TR 1-4 outputs

White Whale produces two continuous CV outputs on **CV A** and **CV B** on the left side of the module and four trigger/gate outputs from **TR 1-4** on the right side. CV outputs range from 0 V to 10 V and TR outputs are 0 V low, 8 V high.

CV's are quantized to the nearest semitone by default, for easier melodic tuning. They can also be un-quantized in conjunction with the **PARAM** knob [as described in the hardware docs](https://monome.org/docs/whitewhale/#cv-map).

Triggers may be swapped for gates by entering [gate mode](https://monome.org/docs/whitewhale/#gate-mode).

# CLOCK knob & jacks

The **CLOCK** knob controls the timing of clock pulses that drive the four triggers and two CV values. The knob ranges from a period of 2 second to a period of 47ms. Patching a signal into **CLOCK IN** will override the timing and [every low/high transition](../../general/voltage/#inputs) on the input will pulse the counters. (Very fast clocks approaching a 1ms period may result in skipped pulses; the module will not go into audio rate.) The pulse width of the clock in sets the trigger time for individual trigger outs. The sequencer can be stopped altogether by inserting an unconnected patch cable to clock in.

The **CLOCK OUT** jack sends a gate signal out according to the current clock following the internal or external clock as appropriate. This output is ideal for linking multiple sequencers, or for a regular rhythmic pulse in your system.

# PARAM knob

A multi-purpose control which changes its mode depending on the grid interface. Generally, if there is a continuous value represented by a grid key or row, holding that key and turning *PARAM* will allow you to edit it.

# Grid reference

![white whale grid legend screenshot](../images/whitewhale-grid-legend.png){: class="patch-image" }

[whitewhale-grid-legend.vcv](../patches/whitewhale-grid-legend.vcv){: class="patch-download-link" } *(requires [Stoermelder Glue](https://library.vcvrack.com/Stoermelder-P1))*

Pressing a key in the first row will swap between three data views: the *TR 1-4* trigger outs, the *CV A* output, or the *CV B* output. In the Triggers view, pressing a key will turn the gate on or off for that step.

The *CV A & B* modes are more complex. They can either be in [Curves](http://monome.org/docs/whitewhale/#cv-curves) mode for unquantized outputs, or [CV Map](http://monome.org/docs/whitewhale/#cv-map) mode for outputs quantized to a scale. 

In the default [Curves](http://monome.org/docs/whitewhale/#cv-curves) mode, you can change CV values while in the *CV A* or *CV B* region by either:

- pressing any pad in the bottom 4 rows to set that step's CV value to the **PARAM** knob's position
- holding any one pad in the bottom 4 rows and using **PARAM** to adjust that step's CV value
- holding ALT and the bottom-right key to live-record the **PARAM** knob's value to each step in realtime
  - note: values overwrite as soon as you hold the ALT + bottom-right key combo

In [CV Map](http://monome.org/docs/whitewhale/#cv-map) mode, you can change CV values by selecting a step on the fifth row, and selecting one of the 16 values in the map on the bottom row.

# Quickstart

This quickstart example uses White Whale alongside modules from VCV's [Free collection](https://vcvrack.com/Free).

![white whale quickstart screenshot](../images/whitewhale-quickstart.png){: class="patch-image" }
*uses: White Whale, ADSR, VCO, VCF, VCA MIX, AUDIO*

[whitewhale-quickstart.vcv](../patches/whitewhale-quickstart.vcv){: class="patch-download-link" }

- Connect White Whale to a grid (See [Making Connections](../../general/connections/#making-connections).)
- Patch White Whale's **TR 1** to ADSR's GATE input.
- Patch VCO's TRI output to VCF's IN.
- Patch VCF's LPF output to IN 1 of VCA MIX.
- Patch ADSR's ENV output to CV 1 of VCA MIX.
- Patch VCA MIX's MIX output to AUDIO's L input.
- Create a sequence of triggers on White Whale's first channel to open the envelope.
- Patch White Whale's **CV A** to VCF's CUT input and add modulation using the attenuator above the input (you won't hear changes yet.)
- Enter the **CV A** region on grid by pressing the fourth key in the top row. Now enter CV values for a few steps by holding a key on the bottom row and turning the **PARAM** knob.
- Adjust VCF's CUTOFF and RES to hear **CV A**'s affect.
- Hold *ALT* on the grid and enter the **CV B** region on grid -- this will show put **CV B** into a [Scale Map](https://monome.org/docs/whitewhale/#cv-map), which quantizes **CV B**'s output to a musical note range.
- As the pattern plays, enter new notes for each step in the *Scale Map*.

# Alternate firmware

Choose **Firmware Tools > Switch Firmware** to see alternate firmware options for White Whale.

White Whale offers the standard firmware plus the Kria alternate firmware, an early form of the Kria sequencer mode in Ansible. [Read about the original version of Kria here](https://llllllll.co/t/kria-0-3-initial-release/2409).

# Further reading

* White Whale [hardware documentation](http://monome.org/docs/whitewhale/)
* ["white whale" search on llllllll.co](https://llllllll.co/search?q=white%20whale)

# Video tutorials

* [white whale possibilities](https://vimeo.com/104881064)
* [white whale tutorial part 1](https://vimeo.com/105368808)
* [white whale tutorial part 2](https://vimeo.com/105368874)
* [white whale tutorial part 3](https://vimeo.com/105408057)
* [white whale tutorial part 4](https://vimeo.com/105408747)
* [kria demo](https://vimeo.com/152756139)
* [kria lesson](https://vimeo.com/153923660)


================================================
FILE: docs/custom-theme/main.html
================================================
{% extends "base.html" %}

{% block footer %}
{% endblock %}

================================================
FILE: docs/custom-theme/partials/search/mkdocs/search-modal.html
================================================
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="alertdialog" aria-modal="true"
    aria-labelledby="searchModalLabel">
    <div class="modal-dialog modal-lg" role="search">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="searchModalLabel">{{ search_modal_ns.header }}</h5>
                <button type="button" class="close btn btn-default btn-ghost" data-dismiss="modal"><span
                        aria-hidden="true">{{ search_modal_ns.close_text }}</span><span class="sr-only">{{
                        search_modal_ns.screen_reader_close_text }}</span></button>
            </div>
            <div class="modal-body">
                <p id="searchInputLabel">{{ search_modal_ns.instructions }}</p>
                <form>
                    <div class="form-group">
                        <input type="search" class="form-control" aria-labelledby="searchInputLabel"
                            placeholder="{{ search_modal_ns.prompt }}" id="mkdocs-search-query"
                            title="{{ search_modal_ns.tooltip }}" onfocus="setup()">
                    </div>
                </form>
                <div id="mkdocs-search-results" data-no-results-text="{{ search_modal_ns.no_results }}"></div>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">

    // Replace the search event to add a trailing wildcard

    function doCustomSearch() {
        var query = `${document.getElementById('mkdocs-search-query').value}*`;
        if (query.length > min_search_length) {
            if (!window.Worker) {
                displayResults(search(query));
            } else {
                searchWorker.postMessage({ query: query });
            }
        } else {
            // Clear results for short queries
            displayResults([]);
        }
    }

    function setup() {
        const queryElem = document.querySelector("#mkdocs-search-query");

        queryElem.removeEventListener("keyup", doSearch);
        queryElem.addEventListener("keyup", doCustomSearch);
    }

</script>

================================================
FILE: docs/requirements.txt
================================================
mkdocs
mkdocs-terminal

================================================
FILE: firmware/ansible.mk
================================================
TARGET_NAME := ansible

FLAGS += \
	-D__AVR32_UC3B0256__ \
	-Imock_hardware \
	-Imock_hardware/include \
	-Iansible/libavr32/src \
	-Iansible/libavr32/src/usb/midi \
	-Iansible/libavr32/src/usb/hid \
	-Iansible/libavr32/src/usb/cdc \
	-Iansible/libavr32/src/usb/ftdi \
	-Iansible/libavr32/asf/common/services/usb \
	-Iansible/libavr32/asf/common/services/usb/uhc \
	-Iansible/libavr32/conf \
	-Iansible/libavr32/conf/trilogy \
	-Iansible/src
		
SOURCES = \
	ansible/src/main.c \
	ansible/src/ansible_grid.c    \
	ansible/src/ansible_arc.c    \
	ansible/src/ansible_midi.c    \
	ansible/src/ansible_tt.c    \
	ansible/src/ansible_preset_docdef.c    \
	ansible/src/ansible_ii_leader.c    \
	ansible/src/gitversion.c    \
	ansible/libavr32/src/arp.c     \
	ansible/libavr32/src/dac.c     \
	ansible/libavr32/src/euclidean/data.c \
	ansible/libavr32/src/euclidean/euclidean.c \
	ansible/libavr32/src/events.c \
	ansible/libavr32/src/libfixmath/fix16.c     \
	ansible/libavr32/src/timers.c \
	ansible/libavr32/src/util.c \
	ansible/libavr32/src/json/encoding.c \
	ansible/libavr32/src/json/serdes.c \
	ansible/libavr32/src/json/jsmn/jsmn.c \
	ansible/libavr32/src/random.c \
	ansible/libavr32/src/music.c \
	ansible/libavr32/src/midi_common.c \
	ansible/libavr32/src/music.c \
	ansible/libavr32/src/notes.c \
	ansible/libavr32/src/random.c \
	$(wildcard mock_hardware/*.c) \
	$(wildcard mock_hardware/common/*.c) \
	$(wildcard mock_hardware/modules/ansible/*.c) \

# Add the git commit id to a file for use when printing out the version
ansible/src/gitversion.c: $(TARGET_NAME)
	echo "const char git_version[] = \"$(GIT_VERSION)\";" > $@

include common.mk


================================================
FILE: firmware/common.mk
================================================
SHELL := /bin/bash -O extglob
RACK_DIR ?= ../../..

TARGET_DIR := ../res/firmware/
BUILD_DIR := ../build/firmware/$(TARGET_NAME)

GIT_VERSION ?= $(shell cut -d '-' -f 1 <<< $(shell cd $(TARGET_NAME); git describe --tags | cut -c 1-)) $(shell cd $(TARGET_NAME); git describe --always --dirty --exclude '*' | tr '[a-z]' '[A-Z]')

FLAGS += \
	-DDEBUG \
	-DNULL=0 \
	-DARCH_AVR32=1 \
	-fPIC \
	-fvisibility=hidden \
	-g \
	-Werror=implicit-function-declaration \
	-I../lib/cbbq \

CFLAGS += \
	-std=c99

include $(RACK_DIR)/arch.mk

ifeq ($(ARCH_LIN), 1)
	LDFLAGS += -shared
	TARGET = $(TARGET_DIR)$(TARGET_NAME).so
endif

ifeq ($(ARCH_MAC), 1)
	LDFLAGS += -shared -undefined dynamic_lookup
	TARGET = $(TARGET_DIR)$(TARGET_NAME).dylib
endif

ifeq ($(ARCH_WIN), 1)
	LDFLAGS += -shared 
	TARGET = $(TARGET_DIR)$(TARGET_NAME).dll
endif

include compile.mk

all: $(TARGET)

.DEFAULT_GOAL := all

================================================
FILE: firmware/compile.mk
================================================
# Rack SDK compile.mk modified to support configurable build products folder

ifndef RACK_DIR
$(error RACK_DIR is not defined)
endif

include $(RACK_DIR)/arch.mk

BUILD_DIR ?= build
OBJCOPY ?= objcopy
STRIP ?= strip
INSTALL_NAME_TOOL ?= install_name_tool
OTOOL ?= otool

# Generate dependency files alongside the object files
FLAGS += -MMD -MP
# Debugger symbols. These are removed with `strip`.
FLAGS += -g
# Optimization
FLAGS += -O3 -funsafe-math-optimizations -fno-omit-frame-pointer
# Warnings
FLAGS += -Wall -Wextra -Wno-unused-parameter
# C++ standard
CXXFLAGS += -std=c++11

# Define compiler/linker target if cross-compiling
ifdef CROSS_COMPILE
	FLAGS += --target=$(MACHINE)
	LDFLAGS += --target=$(MACHINE)
endif

# Architecture-independent flags
ifdef ARCH_X64
	FLAGS += -DARCH_X64
	FLAGS += -march=nehalem
endif
ifdef ARCH_ARM64
	FLAGS += -DARCH_ARM64
	FLAGS += -march=armv8-a+fp+simd
endif

ifdef ARCH_LIN
	FLAGS += -DARCH_LIN
	CXXFLAGS += -Wsuggest-override
endif
ifdef ARCH_MAC
	FLAGS += -DARCH_MAC
	CXXFLAGS += -stdlib=libc++
	LDFLAGS += -stdlib=libc++
	MAC_SDK_FLAGS := -mmacosx-version-min=10.9
	FLAGS += $(MAC_SDK_FLAGS)
	LDFLAGS += $(MAC_SDK_FLAGS)
endif
ifdef ARCH_WIN
	FLAGS += -DARCH_WIN
	FLAGS += -D_USE_MATH_DEFINES
	FLAGS += -municode
	CXXFLAGS += -Wsuggest-override
endif

# Allow *appending* rather than prepending to common flags.
# This is useful to force-redefine compiler settings instead of merely setting defaults that may be overwritten.
FLAGS += $(EXTRA_FLAGS)
CFLAGS += $(EXTRA_CFLAGS)
CXXFLAGS += $(EXTRA_CXXFLAGS)
LDFLAGS += $(EXTRA_LDFLAGS)

# Apply FLAGS to language-specific flags
CFLAGS += $(FLAGS)
CXXFLAGS += $(FLAGS)

# Derive object files from sources and place them before user-defined objects
OBJECTS := $(patsubst %, $(BUILD_DIR)/%.o, $(SOURCES)) $(OBJECTS)
OBJECTS += $(patsubst %, $(BUILD_DIR)/%.bin.o, $(BINARIES))
DEPENDENCIES := $(patsubst %, $(BUILD_DIR)/%.d, $(SOURCES))

# Final targets

$(TARGET): $(OBJECTS)
	$(CXX) -o $@ $^ $(LDFLAGS)

-include $(DEPENDENCIES)

$(BUILD_DIR)/%.c.o: %.c
	@mkdir -p $(@D)
	$(CC) $(CFLAGS) -c -o $@ $<

$(BUILD_DIR)/%.cpp.o: %.cpp
	@mkdir -p $(@D)
	$(CXX) $(CXXFLAGS) -c -o $@ $<

$(BUILD_DIR)/%.cc.o: %.cc
	@mkdir -p $(@D)
	$(CXX) $(CXXFLAGS) -c -o $@ $<

$(BUILD_DIR)/%.m.o: %.m
	@mkdir -p $(@D)
	$(CC) $(CFLAGS) -c -o $@ $<

$(BUILD_DIR)/%.bin.o: %
	@mkdir -p $(@D)
ifdef ARCH_LIN
	$(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 --rename-section .data=.rodata,alloc,load,readonly,data,contents $< $@
endif
ifdef ARCH_WIN
	$(OBJCOPY) -I binary -O pe-x86-64 -B i386:x86-64 --rename-section .data=.rodata,alloc,load,readonly,data,contents $< $@
endif
ifdef ARCH_MAC
	@# Apple makes this needlessly complicated, so just generate a C file with an array.
	xxd -i $< | $(CC) $(MAC_SDK_FLAGS) -c -o $@ -xc -
endif

$(BUILD_DIR)/%.html: %.md
	markdown $< > $@


================================================
FILE: firmware/earthsea.mk
================================================
TARGET_NAME := earthsea

FLAGS += \
	-D__AVR32_UC3B0256__ \
	-Imock_hardware \
	-Imock_hardware/include \
	-Iearthsea/libavr32/src \
	-Iearthsea/libavr32/src/usb/midi \
	-Iearthsea/libavr32/src/usb/hid \
	-Iearthsea/libavr32/src/usb/cdc \
	-Iearthsea/libavr32/asf/common/services/usb \
	-Iearthsea/libavr32/asf/common/services/usb/uhc \
	-Iearthsea/libavr32/conf \
	-Iearthsea/libavr32/conf/trilogy \
	
SOURCES = \
	earthsea/src/main.c \
	earthsea/libavr32/src/arp.c \
	earthsea/libavr32/src/euclidean/data.c \
	earthsea/libavr32/src/euclidean/euclidean.c \
	earthsea/libavr32/src/events.c \
	earthsea/libavr32/src/notes.c \
	earthsea/libavr32/src/random.c \
	earthsea/libavr32/src/timers.c \
	earthsea/libavr32/src/util.c \
	$(wildcard mock_hardware/*.c) \
	$(wildcard mock_hardware/common/*.c) \
	$(wildcard mock_hardware/modules/trilogy/*.c) \

FLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""

include common.mk


================================================
FILE: firmware/meadowphysics.mk
================================================
TARGET_NAME := meadowphysics

FLAGS += \
	-D__AVR32_UC3B0256__ \
	-Imock_hardware \
	-Imock_hardware/include \
	-Imeadowphysics/libavr32/src \
	-Imeadowphysics/libavr32/src/usb/midi \
	-Imeadowphysics/libavr32/src/usb/hid \
	-Imeadowphysics/libavr32/src/usb/cdc \
	-Imeadowphysics/libavr32/asf/common/services/usb \
	-Imeadowphysics/libavr32/asf/common/services/usb/uhc \
	-Imeadowphysics/libavr32/conf \
	-Imeadowphysics/libavr32/conf/trilogy \
		
SOURCES = \
	meadowphysics/src/main.c \
	meadowphysics/libavr32/src/events.c \
	meadowphysics/libavr32/src/timers.c \
	meadowphysics/libavr32/src/util.c \
	$(wildcard mock_hardware/*.c) \
	$(wildcard mock_hardware/common/*.c) \
	$(wildcard mock_hardware/modules/trilogy/*.c) \

FLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""


include common.mk


================================================
FILE: firmware/mock_hardware/common/adc.c
================================================
#include "mock_hardware_api.h"
#include "types.h"

void adc_convert(u16 (*adc)[4])
{
    (*adc)[0] = hardware_getADC(0);
    (*adc)[1] = hardware_getADC(1);
    (*adc)[2] = hardware_getADC(2);
    (*adc)[3] = hardware_getADC(3);
}

================================================
FILE: firmware/mock_hardware/common/cdc.c
================================================
#include "types.h"

void cdc_write(uint8_t* data, uint32_t bytes)
{
}

void cdc_read(void)
{
}

void cdc_setup(void)
{
}

u8* cdc_rx_buf(void)
{
    return 0;
}

u8 cdc_rx_bytes(void)
{
    return 0;
}

u8 cdc_rx_busy(void) { return 0; }
u8 cdc_tx_busy(void) { return 0; }

u8 cdc_connected(void)
{
    return 0;
}

================================================
FILE: firmware/mock_hardware/common/flashc.c
================================================
#include "mock_hardware_api.h"
#include "types.h"
#include <string.h>

void* flashc_memset64(void* dst, uint64_t src, size_t nbytes, bool erase)
{
    (*(uint64_t*)dst) = src;
    return dst;
}

void* flashc_memset32(void* dst, uint32_t src, size_t nbytes, bool erase)
{
    (*(uint32_t*)dst) = src;
    return dst;
}

void* flashc_memset16(void* dst, uint16_t src, size_t nbytes, bool erase)
{
    (*(uint16_t*)dst) = src;
    return dst;
}

void* flashc_memset8(void* dst, uint8_t src, size_t nbytes, bool erase)
{
    (*(uint8_t*)dst) = src;
    return dst;
}

void* flashc_memcpy(void* dst, const void* src, size_t nbytes, bool erase)
{
    memcpy(dst, src, nbytes);
    return dst;
}

================================================
FILE: firmware/mock_hardware/common/ftdi.c
================================================
#include "types.h"

void ftdi_write(uint8_t* data, uint32_t bytes)
{
}

void ftdi_read(void)
{
}

void ftdi_setup(void)
{
}

u8* ftdi_rx_buf(void)
{
    return 0;
}

volatile u8 ftdi_rx_bytes(void)
{
    return 0;
}

volatile u8 ftdi_rx_busy(void) { return 0; }
volatile u8 ftdi_tx_busy(void) { return 0; }

u8 ftdi_connected(void)
{
    return 0;
}

================================================
FILE: firmware/mock_hardware/common/gpio.c
================================================
#include "mock_hardware_api.h"
#include "types.h"

void gpio_set_gpio_pin(u32 pin)
{
    hardware_setGPIO(pin, true);
}

void gpio_clr_gpio_pin(u32 pin)
{
    hardware_setGPIO(pin, false);
}

void gpio_set_pin_high(u32 pin)
{
    hardware_setGPIO(pin, true);
}

void gpio_set_pin_low(u32 pin)
{
    hardware_setGPIO(pin, false);
}

int gpio_get_pin_value(u32 pin)
{
    return hardware_getGPIO(pin);
}


================================================
FILE: firmware/mock_hardware/common/i2c.c
================================================
#include "i2c.h"
#include "mock_hardware_api.h"
#include "types.h"

uint8_t last_port = 0;
int i2c_leader_tx(uint8_t addr, uint8_t* data, uint8_t l)
{
    hardware_iiPushMessage(addr, data, l);
    if (l >= 1)
    {
        last_port = data[0];
    }

    return 0;
}

int i2c_leader_rx(uint8_t addr, uint8_t* data, uint8_t l)
{
    if (l == 2)
    {
        uint16_t value = hardware_iiGetFollowerData(addr, last_port);
        data[0] = value >> 8;
        data[1] = value & 0xFF;
    }

    return 0;
}

void twi_follower_rx(uint8_t u8_value) { }
uint8_t twi_follower_tx(void) { return 0; }
void twi_follower_stop(void) { }

void ii_tx_queue(uint8_t u8_value) { }

volatile process_ii_t process_ii;


================================================
FILE: firmware/mock_hardware/common/init_common.c
================================================
#include "types.h"

void init_gpio() { }
void init_spi() { }
void init_adc() { }
void init_tc(void) { }
void init_usb_host(void) { }

void init_i2c_follower(uint8_t addr) { }
void init_i2c_leader(void) { }

void register_interrupts() { }
void sysclk_init() { }

void init_dbg_rs232(long pba_hz) { }





================================================
FILE: firmware/mock_hardware/common/interrupts.c
================================================
#include "types.h"

u8 irqs_pause(void) { return 0; }
void irqs_resume(u8 irq_flags) { }


================================================
FILE: firmware/mock_hardware/common/midi.c
================================================
#include "types.h"
#include <stdbool.h>
#include "uhc.h"

void midi_read(void) { }
bool midi_write(const u8* data, u32 bytes) { return true; }
void midi_change(uhc_device_t* dev, u8 plug) { }

================================================
FILE: firmware/mock_hardware/common/monome.c
================================================
#include "delay.h"
#include "print_funcs.h"
#include <string.h>

#include "events.h"
#include "ftdi.h"
#include "cdc.h"
#include "monome.h"


//------ defines

// manufacturer string length
#define MONOME_MANSTR_LEN 6
// product string lengthextern
#define MONOME_PRODSTR_LEN 8
// serial string length
#define MONOME_SERSTR_LEN 9
// tx buffer length
#define MONOME_TX_BUF_LEN 72

// level above which an LED must be set to be displayed on mono-brightness grid
#define VB_CUTOFF 7

void (*serial_read)(void) = ftdi_read;
void (*serial_write)(u8*, u32) = ftdi_write;
volatile u8 (*tx_busy)(void);
volatile u8 (*rx_busy)(void);
volatile u8 (*rx_bytes)(void);
u8* (*rx_buf)(void);
u8 (*serial_connected)(void);

//------- typedefs
//--- descriptor types

// protocol enumeration
typedef enum {
  eProtocol40h,      /// 40h and arduinome protocol (pre-2007)
  eProtocolSeries,   /// series protocol (2007-2011)
  eProtocolMext,     /// extended protocol (2011 - ? ), arcs + grids
  eProtocolNumProtocols // dummy and count
} eMonomeProtocol;


// device descriptor
typedef struct e_monomeDesc {
  eMonomeProtocol protocol;
  eMonomeDevice device;
  u8 cols;  // number of columns
  u8 rows;  // number of rows
  u8 encs; // number of encoders
  u8 tilt;  // has tilt (??)
  u8 vari; // is variable brightness, true/false
} monomeDesc;


//// dummy functions
static void read_serial_dummy(void) { return; }

//-------------------------------------
//------ extern variables

// connected flag
// u8 monomeConnect = 0;

// dirty flags for each quadrant or knob (bitwise)
u8 monomeFrameDirty = 0;
// a buffer big enough to hold all l data for 256 or arc4
// each led gets a full byte
u8 defaultLedBuffer[MONOME_MAX_LED_BYTES];
u8 *monomeLedBuffer = defaultLedBuffer;

// global pointers to send functions.
read_serial_t monome_read_serial = &read_serial_dummy;
set_intense_t monome_set_intense;
// grid_led_t monome_grid_led;
grid_map_t monome_grid_map;
grid_level_map_t monome_grid_level_map;
ring_map_t monome_ring_map;
refresh_t monome_refresh;
//-----------------------------------------
//----- static variables

// descriptor for connected device
monomeDesc mdesc = {
  .protocol = eProtocolNumProtocols, // dummy
  .device = eDeviceNumDevices, // dummy
  .cols = 16,
  .rows = 8,
  .encs = 4,
  .tilt = 0,
};

// local rx byte count
static u8 rxBytes;
// event data
static event_t ev;
// local tx buffer
static u8 txBuf[MONOME_TX_BUF_LEN];

//---------------------------------------------
//------ static function declarations

// setup for each protocol
static void setup_40h(u8 cols, u8 rows);
static void setup_series(u8 cols, u8 rows);
static u8 setup_mext(void);

// rx for each protocol
static void read_serial_40h(void);
static void read_serial_series(void);
static void read_serial_mext(void);


// set intensity
static void set_intense_series(u8 level);
static void set_intense_mext(u8 level);


// tx for each protocol
///// no real reason not to use only grid/map at the moment
/* static void grid_led_40h(u8 x, u8 y, u8 val); */
/* static void grid_led_series(u8 x, u8 y, u8 val); */
/* static void grid_led_mext(u8 x, u8 y, u8 val); */

static void grid_map_40h(u8 x, u8 y, const u8* data);
static void grid_map_series(u8 x, u8 y, const u8* data);
static void grid_map_mext(u8 x, u8 y, const u8* data);

/// TODO: varibright
//static void grid_map_level_40h(u8 x, u8 val);
//static void grid_map_level_series(u8 x, u8 y, u8* data);
// static void grid_map_level_mext(u8 x, u8 y, const u8* data);

//static void ring_set_mext(u8 n, u8 rho, u8 val);
static void ring_map_mext(u8 n, u8* data);

//static void connect_write_event(void);
static inline void monome_grid_key_write_event( u8 x, u8 y, u8 val);
static inline void monome_grid_adc_write_event( u8 n, u16 val);
static inline void monome_ring_enc_write_event( u8 n, u8 val);
static inline void monome_ring_key_write_event( u8 n, u8 val);




//---------------------------------
//----- static variables

//----  function pointer arrays

// read serial and spawn events
static const read_serial_t readSerialFuncs[eProtocolNumProtocols] = {
  &read_serial_40h,
  &read_serial_series,
  &read_serial_mext,
};

// set intensity
static const set_intense_t intenseFuncs[eProtocolNumProtocols] = {
  NULL, // unsupported
  &set_intense_series,
  &set_intense_mext,
};


// grid/led
/* static grid_led_t gridLedFuncs[eProtocolNumProtocols] = { */
/*   &grid_led_40h, */
/*   &grid_led_series, */
/*   &grid_led_mext, */
/* }; */

// grid/map
static const grid_map_t gridMapFuncs[eProtocolNumProtocols] = {
  &grid_map_40h,
  &grid_map_series,
  &grid_map_mext,
};

// grid/level/map
/* static grid_level_map_t gridMapLevelFuncs[eProtocolNumProtavr32_lib/src/ocols] = { */
/*   NULL, // unsupported */
/*   NULL, // unsupported */
/*   &grid_map_level_mext, */
/* }; */

static const ring_map_t ringMapFuncs[eProtocolNumProtocols] = {
  NULL, // unsupported
  NULL, // unsupported
  &ring_map_mext,
};

// grid vs arc refresh
static const refresh_t refreshFuncs[eProtocolNumProtocols] = {
  &monome_grid_refresh,
  &monome_arc_refresh
};

//================================================
//----- extern function definitions

// init
void init_monome(void) {
  u32 i;
  for(i=0; i<MONOME_MAX_LED_BYTES; i++) {
    monomeLedBuffer[i] = 0;
  }
  //  print_dbg("\r\n finished monome class init");
}

// determine if FTDI string descriptors match monome device pattern
u8 check_monome_device_desc(char* mstr, char* pstr, char* sstr) {
  char buf[16];
  u8 matchMan = 0;
  u8 i;
  u8 ret;

  // set rxtx funcs
  serial_read = &ftdi_read;
  serial_write = &ftdi_write;
  tx_busy = &ftdi_tx_busy;
  rx_busy = &ftdi_rx_busy;
  rx_buf = &ftdi_rx_buf;
  rx_bytes = &ftdi_rx_bytes;
  serial_connected = &ftdi_connected;

  //-- source strings are unicode so we need to look at every other byte
  // manufacturer
  for(i=0; i<MONOME_MANSTR_LEN; i++) {
    buf[i] = mstr[i*2];
  }
  buf[i] = 0;
  matchMan = ( strncmp(buf, "monome", MONOME_MANSTR_LEN) == 0 );
  /* print_dbg("\r\n manstring: "); */
  /* print_dbg(buf); */

  // serial number string
  for(i=0; i<MONOME_SERSTR_LEN; i++) {
    buf[i] = sstr[i*2];
  }
  buf[i] = 0;
  /* print_dbg("\r\n serial string: "); */
  /* print_dbg(buf); */
  mdesc.protocol = eProtocolNumProtocols;
  mdesc.device = eDeviceNumDevices;
  mdesc.cols = 16;
  mdesc.rows = 8;
  mdesc.encs = 4;
  mdesc.tilt = 0;
  if(matchMan == 0) {
    // didn't match the manufacturer string, but check the serial for DIYs
    if( strncmp(buf, "a40h", 4) == 0) {
      // this is probably an arduinome
      mdesc.protocol = eProtocol40h;
      mdesc.device = eDeviceGrid;
      mdesc.cols = 8;
      mdesc.rows = 8;
      // tilt?
      ret = 1;
    } else {
      // not a monome
      return 0;
    }
  } else { // matched manufctrr string
    if(buf[0] != 'm') {
      // not a monome, somehow. shouldn't happen
      return 0;
    }
    if(buf[3] == 'h') {
      // this is a 40h
      setup_40h(8, 8);
      return 1;
    }
    if( strncmp(buf, "m64-", 4) == 0 ) {
      // series 64
      setup_series(8, 8);
      return 1;
    }
    if( strncmp(buf, "m128-", 5) == 0 ) {
      // series 128
      setup_series(16, 8);
      return 1;
    }
    if( strncmp(buf, "m256-", 5) == 0 ) {
      // series 256
      setup_series(16, 16);
      return 1;
    }
    // if we got here, serial number didn't match series or 40h patterns.
    // so this is probably an extended-protocol device.
    // we need to query for device attributes
    return setup_mext();
  }
  return 0;
}

// check dirty flags and refresh leds
void monome_grid_refresh(void) {
  // may need to wait after each quad until tx transfer is complete
  u8 busy = tx_busy();

  // check quad 0
  if( monomeFrameDirty & 0b0001 ) {
    while( busy ) { busy = tx_busy(); }
    (*monome_grid_map)(0, 0, monomeLedBuffer);
    monomeFrameDirty &= 0b1110;
    busy = 1;
  }
  // check quad 1
  if( monomeFrameDirty & 0b0010 ) {
    if ( mdesc.cols > 7 ) {
      while( busy ) { busy = tx_busy(); }
      (*monome_grid_map)(8, 0, monomeLedBuffer + 8);
      monomeFrameDirty &= 0b1101;
      busy = 1;
    }
  }
  // check quad 2
  if( monomeFrameDirty &  0b0100 ) {
    if( mdesc.rows > 7 ) {
      while( busy ) { busy = tx_busy(); }
      (*monome_grid_map)(0, 8, monomeLedBuffer + 128);
      monomeFrameDirty &= 0b1011;
      busy = 1;
    }
  }
  // check quad 3
  if( monomeFrameDirty & 0b1000 ) {
    if( (mdesc.rows > 7) && (mdesc.cols > 7) )  {
      while( busy ) { busy = tx_busy(); }
      (*monome_grid_map)(8, 8, monomeLedBuffer + 136);
      monomeFrameDirty &= 0b0111;
      busy = 1;
    }
  }
  while( busy ) { busy = tx_busy(); }
}


// check flags and refresh arc
void monome_arc_refresh(void) {
  // may need to wait after each quad until tx transfer is complete
  u8 busy = tx_busy();
  u8 i;

  for(i=0;i<mdesc.encs;i++) {
    if(monomeFrameDirty & (1<<i)) {
      // if(i==1) print_dbg("\r\nsecond");
      while(busy) { busy = tx_busy(); }
      (*monome_ring_map)(i, monomeLedBuffer + (i<<6));
      monomeFrameDirty &= ~(1<<i);
      busy = 1;
    }
  }

  while( busy ) { busy = tx_busy(); }
}


//---- convert to/from event data
// connect
void monome_connect_write_event(void) {
  u8* data = (u8*)(&(ev.data));

  // print_dbg(" device type: ");
  // print_dbg_ulong(mdesc.device);
  // print_dbg(" cols : ");
  // print_dbg_ulong(mdesc.cols);
  // print_dbg(" rows: ");
  // print_dbg_ulong(mdesc.rows);

  ev.type = kEventMonomeConnect;
  ev.type = kEventMonomeConnect;
  *data++ = (u8)(mdesc.device); 	// device (8bits)
  *data++ = mdesc.cols;		// width / count
  *data++ = mdesc.rows;		// height / resolution
  //  *data = 0; 		// unused
  event_post(&ev);
}

void monome_connect_parse_event_data(u32 data, eMonomeDevice *dev, u8* w, u8* h) {
  u8* pdata = (u8*)(&data);
  *dev = (eMonomeDevice)(*pdata++);
  *w = *pdata++;
  *h = *pdata;
}

// grid key
inline void monome_grid_key_write_event(u8 x, u8 y, u8 val) {
  u8* data = (u8*)(&(ev.data));
  data[0] = x;
  data[1] = y;
  data[2] = val;
  ev.type = kEventMonomeGridKey;
  event_post(&ev);
}

void monome_grid_key_parse_event_data(u32 data, u8* x, u8* y, u8* val) {
  u8* bdata = (u8*)(&data);
  *x = bdata[0];
  *y = bdata[1];
  *val = bdata[2];
}

// grid tilt / adc
inline void monome_grid_adc_write_event( u8 n, u16 val) {
  // TODO
}
void monome_grid_adc_parse_event_data(u32 data, u8* n, u16* val) {
  // TODO
}

// ring encoder
inline void monome_ring_enc_write_event( u8 n, u8 val) {
  u8* data = (u8*)(&(ev.data));
  data[0] = n;
  data[1] = val;
  ev.type = kEventMonomeRingEnc;
  event_post(&ev);
}
void monome_ring_enc_parse_event_data(u32 data, u8* n, s8* val) {
  u8* bdata = (u8*)(&data);
  *n = bdata[0];
  *val = bdata[1];
}

// ring press/lift
inline void monome_ring_key_write_event( u8 n, u8 val) {
  // TODO
}
void monome_ring_key_parse_event_data(u32 data, u8* n, u8* val) {
  // TODO
}

// set quadrant refresh flag from pos
void monome_calc_quadrant_flag(u8 x, u8 y) {
  if(x > 7) {
    if (y > 7) {
      monomeFrameDirty |= 0b1000;
    }
    else {
      monomeFrameDirty |= 0b0010;
    }
  } else {
    if (y > 7) {
      monomeFrameDirty |= 0b0100;
    }
    else {
      monomeFrameDirty |= 0b0001;
    }
  }
}

// set given quadrant dirty flag
extern void monome_set_quadrant_flag(u8 q) {
  monomeFrameDirty |= (1 << q);
}


// convert flat framebuffer idx to x,y
void monome_idx_xy(u32 idx, u8* x, u8* y) {
  *x = idx & 0xf;
  *y = (idx >> 4);
}

// convert x,y to framebuffer idx
u32 monome_xy_idx(u8 x, u8 y) {
  return x | (y << 4);
}

// top-level led/set function
void monome_led_set(u8 x, u8 y, u8 z) {
  monomeLedBuffer[monome_xy_idx(x, y)] = z;
  monome_calc_quadrant_flag(x, y);
}

// top-level led/toggle function
void monome_led_toggle(u8 x, u8 y) {
  monomeLedBuffer[monome_xy_idx(x,y)] ^= 0xff;
  monome_calc_quadrant_flag(x, y);
}

// arc led/set function
void monome_arc_led_set(u8 enc, u8 ring, u8 val) {
  monomeLedBuffer[ring + (enc << 6)] = val;
  monomeFrameDirty |= (1 << enc);
}




eMonomeDevice monome_device(void) { return mdesc.device; }
u8 monome_size_x(void) { return mdesc.cols; }
u8 monome_size_y(void) {  return mdesc.rows; }
u8 monome_is_vari(void) {  return mdesc.vari; }
u8 monome_encs(void) {  return mdesc.encs; }

//=============================================
//------ static function definitions

// set function pointers
void set_funcs(void) {
  // print_dbg("\r\n setting monome functions, protocol idx: ");
  // print_dbg_ulong(mdesc.protocol);
  monome_read_serial = readSerialFuncs[mdesc.protocol];
  monome_grid_map = gridMapFuncs[mdesc.protocol];
  monome_grid_level_map = gridMapFuncs[mdesc.protocol];
  monome_ring_map = ringMapFuncs[mdesc.protocol];
  monome_set_intense = intenseFuncs[mdesc.protocol];
  monome_refresh = refreshFuncs[mdesc.device == eDeviceArc];   // toggle on grid vs arc
}

/////////////////////////////////////////////////////
/////////////////////////////////////////////////////
///// protocol - specific functions


/////////////////////////////
// setup

// setup 40h-protocol device
static void setup_40h(u8 cols, u8 rows) {
  // print_dbg("\r\n setup 40h device");
  mdesc.protocol = eProtocol40h;
  mdesc.device = eDeviceGrid;
  mdesc.cols = 8;
  mdesc.rows = 8;
  mdesc.vari = 0;
  set_funcs();
  monome_connect_write_event();
}

// setup series device
static void setup_series(u8 cols, u8 rows) {
  // print_dbg("\r\n setup series device");
  mdesc.protocol = eProtocolSeries;
  mdesc.device = eDeviceGrid;
  mdesc.cols = cols;
  mdesc.rows = rows;
  mdesc.vari = 0;
  mdesc.tilt = 1;
  set_funcs();
  monome_connect_write_event();
  //  monomeConnect = 1;
  //  test_draw();
}

// setup extended device, return success /failure of query
static u8 setup_mext(void) {
  u8* prx;
  u8 w = 0;
  u8 busy;

  print_dbg("\r\n setup mext device");
  mdesc.protocol = eProtocolMext;

  mdesc.vari = 1;


  // clear out rxbuf
  rxBytes = 1;
  while(rxBytes != 0 && serial_connected()) {
    serial_read();

    delay_us(500);
    busy = 1;

    while(busy)
      busy = rx_busy();

    rxBytes = rx_bytes();
  }

  rxBytes = 0;

  while(rxBytes != 6 && serial_connected()) {
    // FIXME: fuck these delays
    serial_write(&w, 1);	// query

    delay_us(500);
    serial_read();

    delay_us(500);
    busy = 1;

    while(busy)
      busy = rx_busy();

    rxBytes = rx_bytes();

    if(rxBytes != 6 ){
      print_dbg("e");
      /*
         print_dbg("\r\n got unexpected byte count in response to mext setup request; \r\n");
         prx = rx_buf();

         for(;rxBytes != 0; rxBytes--) {
         print_dbg_ulong(*(++prx));
         print_dbg(" ");
         }
       */

      // return 0;
    }
  }

  prx = rx_buf();
  prx++; // 1st returned byte is 0
  if(*prx == 1) {
    mdesc.device = eDeviceGrid;
    prx++;
    if(*prx == 1) {
      // print_dbg("\r\n monome 64");
      mdesc.rows = 8;
      mdesc.cols = 8;
    }
    else if(*prx == 2) {
      // print_dbg("\r\n monome 128");
      mdesc.rows = 8;
      mdesc.cols = 16;
    }
    else if(*prx == 4) {
      // print_dbg("\r\n monome 256");
      mdesc.rows = 16;
      mdesc.cols = 16;
    }
    else {
      return 0; // bail
    }
    mdesc.tilt = 1;
  }
  else if(*prx == 5) {
    mdesc.device = eDeviceArc;
    mdesc.encs = *(++prx);
    print_dbg("\r\n monome arc ");
    print_dbg_ulong(*prx);
  } else {
    print_dbg_hex(*prx);
    print_dbg_hex(*(++prx));
    print_dbg_hex(*(++prx));
    return 0; // bail
  }

  // get id
  w = 1;
  delay_ms(1);
  serial_write(&w, 1);
  delay_ms(1);
  serial_read();
  delay_ms(1);
  busy = 1;
  while(busy) {
    busy = rx_busy();
  }
  rxBytes = rx_bytes();
  prx = rx_buf();
  if(*(prx+2) == 'k')
    mdesc.vari = 0;
  // print_dbg("\r\ndone waiting. bytes read: ");
  // print_dbg_ulong(rxBytes);
  // print_dbg("\r\ndata: ");
  // print_dbg_char(*prx);
  //   for(;rxBytes != 0; rxBytes--) {
  //     print_dbg_char(*(++prx));
  //   }

  set_funcs();
  monome_connect_write_event();
  //  monomeConnect = 1;
  print_dbg("\r\n connected monome device, mext protocol");
  //  test_draw();
  return 1;
}

////////////////////////////
//--- rx
// rx for each protocol
/// parse serial input from device
/// should be called when read is complete
/// (e.g. from usb transfer callback )

static void read_serial_40h(void) {
  u8* prx = rx_buf();
  u8 i;
  rxBytes = rx_bytes();
  // print_dbg("\r\n read_serial_40h, byte count: ");
  // print_dbg_ulong(rxBytes);
  // print_dbg(" ; data : [ 0x");
  // print_dbg_hex(prx[0]);
  // print_dbg(" , 0x");
  // print_dbg_hex(prx[1]);
  // print_dbg(" ]");
  i = 0;
  while(i < rxBytes) {
    // FIXME: can we expect other event types? (besides press/lift)
    // print_dbg(" ; x : 0x");
    // print_dbg_hex((prx[1] & 0xf0) >> 4);
    // print_dbg("; y : 0x");
    // print_dbg_hex(prx[1] & 0xf);
    // print_dbg(" ; z : 0x");
    // print_dbg_hex(   ((prx[0] & 0xf) != 0) );

    // press event
    if ((prx[0] & 0xf0) == 0) {
      monome_grid_key_write_event(
          ((prx[1] & 0xf0) >> 4),
          prx[1] & 0xf,
          ((prx[0] & 0xf) != 0)
          );
    }

    i += 2;
    prx += 2;
  }
}

static void read_serial_series(void) {
  u8* prx = rx_buf();
  u8 i;
  rxBytes = rx_bytes();
  // print_dbg("\r\n read_serial_series, byte count: ");
  // print_dbg_ulong(rxBytes);
  // print_dbg(" ; data : [ 0x");
  // print_dbg_hex(prx[0]);
  // print_dbg(" , 0x");
  // print_dbg_hex(prx[1]);
  // print_dbg(" ]");
  i = 0;
  while(i < rxBytes) {
    // FIXME: can we expect other event types? (besides press/lift)
    /* print_dbg(" ; x : 0x"); */
    /* print_dbg_hex((prx[1] & 0xf0) >> 4); */
    /* print_dbg("; y : 0x"); */
    /* print_dbg_hex(prx[1] & 0xf); */
    /* print_dbg(" ; z : 0x"); */
    /* print_dbg_hex(	 ((prx[0] & 0xf0) == 0) ); */

    // process consecutive pairs of bytes
    monome_grid_key_write_event( ((prx[1] & 0xf0) >> 4) ,
        prx[1] & 0xf,
        ((prx[0] & 0xf0) == 0)
        );
    i += 2;
    prx += 2;
  }

}

static void read_serial_mext(void) {
  //  static u8 nbr; // number of bytes read
  static u8 nbp; // number of bytes processed
  static u8* prx; // pointer to rx buf
  static u8 com;

  rxBytes = rx_bytes();
  if( rxBytes ) {
    nbp = 0;
    prx = rx_buf();
    while(nbp < rxBytes) {
      com = (u8)(*(prx++));
      nbp++;
      switch(com) {
        case 0x20: // grid key up
          monome_grid_key_write_event( *prx, *(prx+1), 0);
          nbp += 2;
          prx += 2;
          break;
        case 0x21: // grid key down
          monome_grid_key_write_event( *prx, *(prx+1), 1);
          nbp += 2;
          prx += 2;
          break;
        case 0x50: // ring delta
          monome_ring_enc_write_event( *prx, *(prx+1));
          nbp += 2;
          prx += 2;
          break;
        case 0x51 : // ring key up
          monome_ring_key_write_event( *prx++, 0);
          prx++;
          break;
        case 0x52 : // ring key down
          monome_ring_key_write_event( *prx++, 1);
          nbp++;
          break;
          /// TODO: more commands...
        default:
          return;
      }
    }
  }
}

//--- tx

///// not using per-led updates.
/* static void grid_led_40h(u8 x, u8 y, u8 val) { */
/*   // TODO */
/* } */

/* static void grid_led_series(u8 x, u8 y, u8 val) { */
/*   //  static u8 tx[2]; */
/*   txBuf[0] = 0x20 & ((val > 0) << 4); */
/*   txBuf[1] = (x << 4) | y; */
/*   serial_write(txBuf, 2); */
/* } */

/* static void grid_led_mext(u8 x, u8 y, u8 val) { */
/*   //  static u8 tx[3]; */
/*   txBuf[0] = 0x10 | (val > 0); */
/*   txBuf[1] = x; */
/*   txBuf[2] = y; */
/*   serial_write(txBuf, 3); */
/* } */

// update a whole frame
// . note that our input data is one byte per led!!
// this will hopefully help optimize operator routines,
// which cannot be called less often than refresh/tx, and are therefore prioritized.
////////////////////////////////////////////////
// HACKED to always do var-bright update
////////////////////////////////////////////////
static void grid_map_mext( u8 x, u8 y, const u8* data ) {
  //  static u8 tx[11] = { 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
  static u8* ptx;
  static u8 i, j;

  txBuf[0] = 0x1A;
  txBuf[1] = x;
  txBuf[2] = y;

  ptx = txBuf + 3;

  // copy and convert
  for(i=0; i<MONOME_QUAD_LEDS; i++) {
    // *ptx = 0;
    for(j=0; j<4; j++) {
      // binary value of data byte to bitfield of tx byte
      // *ptx |= ((*data > 0) << j);
      *ptx = (*data) << 4;
      data++;
      *ptx |= *data;
      data++;
      ptx++;
    }
    data += MONOME_QUAD_LEDS; // skip the rest of the row to get back in target quad
    // ptx++;
  }
  serial_write(txBuf, 32 + 3);
}


static void grid_map_40h(u8 x, u8 y, const u8* data) {
  // print_dbg("\n\r=== grid_map_40h ===");
  static u8 i, j;
  // ignore all but first quadrant -- do any devices larger than 8x8 speak 40h?
  if (x != 0 || y != 0) {
    return;
  }
  for(i=0; i<MONOME_QUAD_LEDS; i++) {
    // led row command + row number
    txBuf[(i*2)] = 0x70 + i;
    txBuf[(i*2)+1] = 0;
    // print_dbg("\r\n * data bytes: ");
    for(j=0; j<MONOME_QUAD_LEDS; j++) {
      // set row bit if led should be on
      // print_dbg("0x");
      // print_dbg_hex(*data);
      // print_dbg(" ");
      txBuf[(i*2)+1] |= ((*data > 0) << j);
      // advance data to next bit
      ++data;
    }
    // skip next 8 bytes to get to next row
    data += MONOME_QUAD_LEDS;
    // print_dbg("\n\r 40h: send led_row command: ");
    // print_dbg_hex(txBuf[i*2]);
    // print_dbg(" row data: 0x");
    // print_dbg_hex(txBuf[(i*2) + 1]);
  }
  serial_write(txBuf, 16);
}

static void grid_map_series(u8 x, u8 y, const u8* data) {
  static u8 * ptx;
  static u8 i, j;
  // command (upper nibble)
  txBuf[0] = 0x80;
  // quadrant index (lower nibble, 0-3)
  txBuf[0] |= ( (x > 7) | ((y > 7) << 1) );

  // print_dbg("\n\r series map: ");
  // print_dbg_hex(txBuf[0]);

  // pointer to tx data
  ptx = txBuf + 1;

  // copy and convert
  for(i=0; i<MONOME_QUAD_LEDS; i++) {
    *ptx = 0;
    for(j=0; j<MONOME_QUAD_LEDS; j++) {
      // binary value of data byte to bitfield of tx byte
      *ptx |= ((*data > VB_CUTOFF) << j);
      ++data;
    }
    // print_dbg(" ");
    // print_dbg_hex(*ptx);

    data += MONOME_QUAD_LEDS; // skip the rest of the row to get back in target quad
    ++ptx;
  }
  serial_write(txBuf, MONOME_QUAD_LEDS + 1);
}

/* static void grid_map_level_mext(u8 x, u8 y, const u8* data) { */
/*   // TODO */
/* } */

static void ring_map_mext(u8 n, u8* data) {
  //  static u8 tx[11] = { 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
  static u8* ptx;
  static u8 i;

  txBuf[0] = 0x92;
  txBuf[1] = n;

  ptx = txBuf + 2;

  // smash 64 LEDs together, nibbles
  for(i=0; i<32; i++) {
    *ptx = *data << 4;
    data++;
    *ptx |= *data;
    data++;
    ptx++;
  }

  serial_write(txBuf, 32 + 2);
}

static void set_intense_series(u8 v) {
  /*
     message id:	(10) intensity
bytes:		1
format:		iiiibbbb
i (message id) = 10
b (brightness) = 0-15 (4 bits)
encode:		byte 0 = ((id) << 4) | b = 160 + b
   */
  txBuf[0] = 0xa0;
  txBuf[0] |= (v & 0x0f);
  serial_write(txBuf, 1);
}

static void set_intense_mext(u8 v) {
  // TODO
}

// setup mext direct (for cdc)
void monome_setup_mext() {
  // set rxtx funcs
  serial_read = &cdc_read;
  serial_write = &cdc_write;
  tx_busy = &cdc_tx_busy;
  rx_busy = &cdc_rx_busy;
  rx_buf = &cdc_rx_buf;
  rx_bytes = &cdc_rx_bytes;
  serial_connected = &cdc_connected;

  mdesc.device = eDeviceGrid;
  mdesc.protocol = eProtocolMext;
  mdesc.rows = 8;
  mdesc.cols = 16;
  mdesc.vari = 1;

  set_funcs();
  monome_connect_write_event();
}


================================================
FILE: firmware/mock_hardware/common/print_funcs.c
================================================
#include <stdio.h>
#include <string.h>

#ifdef FIRMWARE_DEBUG_OUTPUT
static void print_dbg(const char* str) { fprintf(stderr, "%s", str); }
static void print_dbg_char(int c) { fprintf(stderr, "%d", c); }
static void print_dbg_ulong(unsigned long n) { fprintf(stderr, "%ld", n); }
static void print_dbg_char_hex(unsigned char n) { fprintf(stderr, "%x", n); }
static void print_dbg_short_hex(unsigned short n) { fprintf(stderr, "%d", n); }
static void print_dbg_hex(unsigned long n) { fprintf(stderr, "%lx", n); }
#else
static void print_dbg(const char* str) { }
static void print_dbg_char(int c) { }
static void print_dbg_ulong(unsigned long n) { }
static void print_dbg_char_hex(unsigned char n) { }
static void print_dbg_short_hex(unsigned short n) { }
static void print_dbg_hex(unsigned long n) { }
#endif

================================================
FILE: firmware/mock_hardware/common/screen.c
================================================
#include "mock_hardware_api.h"
#include "mock_hardware_api_private.h"
#include "types.h"
#include <string.h>

u8 _is_screen_flipped = 0;

void init_oled(void) { }
void screen_startup(void) { }

void screen_draw_region(u8 x, u8 y, u8 w, u8 h, u8* data)
{
    u8* screen;
    uint16_t width = 128, height = 64;
    hardware_getScreenBuffer(&screen, &width, &height);

    if (screen == NULL || width == 0 || height == 0)
    {
        return;
    }

    if (!_is_screen_flipped)
    {
        screen += y * width + x;
        for (int j = 0; j < h; j++)
        {
            memcpy(screen, data, w);
            data += w;
            screen += width;
        }
    }
    else
    {
        screen += (height - y) * width - x - 1;
        for (int j = 0; j < h; j++)
        {
            for (int i = 0; i < w; i++)
            {
                memcpy(screen--, data++, 1);
            }
            screen -= (width - w);
        }
    }
}

void screen_draw_region_offset(u8 x, u8 y, u8 w, u8 h, u32 len, u8* data, u32 off)
{
    // this is implemented in libavr32 but not called by TT -- no need to implement at present
}

void screen_set_direction(u8 flipped)
{
    _is_screen_flipped = flipped;
}

void screen_clear(void)
{
    u8* screen;
    uint16_t width, height;
    hardware_getScreenBuffer(&screen, &width, &height);

    if (screen == NULL || width == 0 || height == 0)
    {
        return;
    }

    memset(screen, 0, sizeof(uint8_t) * width * height);
}


================================================
FILE: firmware/mock_hardware/common/spi.c
================================================
#include "mock_hardware_api.h"
#include "types.h"

typedef enum
{
    WAITING,
    WRITING_CHANNEL1_HIGH,
    WRITING_CHANNEL1_LOW,
    WRITING_CHANNEL2_HIGH,
    WRITING_CHANNEL2_LOW,
    WRITING_CHANNEL3_HIGH,
    WRITING_CHANNEL3_LOW,
    WRITING_CHANNEL4_HIGH,
    WRITING_CHANNEL4_LOW,
    WAITING_SECOND_WRITE,
    ARG1,
    ARG2
} spi_dac_state_t;

spi_dac_state_t spi_dac_state = WAITING;
u32 spi_word;
int spi_num_devices = 1;

void spi_write(u32 chip, u32 byte)
{
    switch (spi_dac_state)
    {
        case WAITING:
        {
            if (byte == 0x31)
            {
                spi_dac_state = WRITING_CHANNEL1_HIGH;
            }
            else if (byte == 0x38)
            {
                spi_dac_state = WRITING_CHANNEL2_HIGH;
            }
            else if (byte == 0x80)
            {
                spi_num_devices = 2;
                spi_dac_state = ARG1;
            }
            break;
        }
        case WAITING_SECOND_WRITE:
        {
            if (byte == 0x31)
            {
                spi_dac_state = WRITING_CHANNEL3_HIGH;
            }
            else if (byte == 0x38)
            {
                spi_dac_state = WRITING_CHANNEL4_HIGH;
            }
            else if (byte == 0x80)
            {
                spi_num_devices = 2;
                spi_dac_state = ARG1;
            }
            break;
        }
        case WRITING_CHANNEL1_HIGH:
        {
            spi_word = byte << 8;
            spi_dac_state = WRITING_CHANNEL1_LOW;
            break;
        }
        case WRITING_CHANNEL1_LOW:
        {
            spi_word |= byte;
            hardware_setDAC(0, spi_word);
            if (spi_num_devices == 1)
            {
                spi_dac_state = WAITING;
            }
            else
            {
                spi_dac_state = WAITING_SECOND_WRITE;
            }
            break;
        }
        case WRITING_CHANNEL2_HIGH:
        {
            spi_word = byte << 8;
            spi_dac_state = WRITING_CHANNEL2_LOW;
            break;
        }
        case WRITING_CHANNEL2_LOW:
        {
            spi_word |= byte;
            hardware_setDAC(1, spi_word);
            if (spi_num_devices == 1)
            {
                spi_dac_state = WAITING;
            }
            else
            {
                spi_dac_state = WAITING_SECOND_WRITE;
            }
            break;
        }
        case WRITING_CHANNEL3_HIGH:
        {
            spi_word = byte << 8;
            spi_dac_state = WRITING_CHANNEL3_LOW;
            break;
        }
        case WRITING_CHANNEL3_LOW:
        {
            spi_word |= byte;
            hardware_setDAC(2, spi_word);
            spi_dac_state = WAITING;
            break;
        }
        case WRITING_CHANNEL4_HIGH:
        {
            spi_word = byte << 8;
            spi_dac_state = WRITING_CHANNEL4_LOW;
            break;
        }
        case WRITING_CHANNEL4_LOW:
        {
            spi_word |= byte;
            hardware_setDAC(3, spi_word);
            spi_dac_state = WAITING;
            break;
        }
        case ARG1:
        {
            spi_dac_state = ARG2;
        }
        case ARG2:
        {
            spi_dac_state = WAITING;
        }
    }
}

void spi_selectChip(u32 arg1, u32 arg2) {};
void spi_unselectChip(u32 arg1, u32 arg2) {};


================================================
FILE: firmware/mock_hardware/include/adc.h
================================================
#include "types.h"

void init_adc(void);
void adc_convert(u16 (*dst)[4]);

================================================
FILE: firmware/mock_hardware/include/avr32/abi.h
================================================
/*****************************************************************************
 *
 * Copyright (C) 2008 Atmel Corporation
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * * Redistributions of source code must retain the above copyright
 *   notice, this list of conditions and the following disclaimer.
 *
 * * Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in
 *   the documentation and/or other materials provided with the
 *   distribution.
 *
 * * Neither the name of the copyright holders nor the names of
 *   contributors may be used to endorse or promote products derived
 *   from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * Revision     : $Revision: 62595 $
 * Checkin Date : $Date: 2009-10-21 13:31:31 +0200 (Wed, 21 Oct 2009) $
 *
 ****************************************************************************/
#ifndef AVR32_ABI_H_INCLUDED
#define AVR32_ABI_H_INCLUDED


/* The GNU assembler is ABI compliant*/
#ifndef __AVR32_ABI_ASSEMBLER__
# ifdef __GNUC__
#  ifdef __ASSEMBLER__
#   define __AVR32_ABI_ASSEMBLER__
#  endif
# endif
#endif

/* The GNU C/C++ compiler is ABI compliant */
#ifndef __AVR32_ABI_COMPILER__
# ifdef __GNUC__
#  ifndef __ASSEMBLER__
#   define __AVR32_ABI_COMPILER__
#  endif
# endif
#endif


/* The IAR Systems C/C++ Compiler is ABI compliant */
#ifndef __AVR32_ABI_COMPILER__
# ifdef __ICCAVR32__
#  define __AVR32_ABI_COMPILER__
# endif
#endif

/* The IAR Systems Assembler is ABI compliant */
#ifndef __AVR32_ABI_ASSEMBLER__
# ifdef __AAVR32__
#  define __AVR32_ABI_ASSEMBLER__
# endif
#endif



/*#ifndef AVR32_ABI_H_INCLUDED*/
#endif



================================================
FILE: firmware/mock_hardware/include/avr32/adc_200.h
================================================
/*****************************************************************************
 *
 * Copyright (C) 2008-2010 Atmel Corporation
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * * Redistributions of source code must retain the above copyright
 *   notice, this list of conditions and the following disclaimer.
 *
 * * Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in
 *   the documentation and/or other materials provided with the
 *   distribution.
 *
 * * Neither the name of the copyright holders nor the names of
 *   contributors may be used to endorse or promote products derived
 *   from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 * 
 * Model        : UC3A3128
 * Revision     : $Revision: 74772 $
 * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ 
 *
 ****************************************************************************/
#ifndef AVR32_ADC_200_H_INCLUDED
#define AVR32_ADC_200_H_INCLUDED

#define AVR32_ADC_H_VERSION 200

#include "avr32/abi.h"


/*
 Note to user:

 The following defines are always generated:
 - Register offset: AVR32_ADC_<register>
 - Bitfield mask:   AVR32_ADC_<register>_<bitfield>
 - Bitfield offset: AVR32_ADC_<register>_<bitfield>_OFFSET
 - Bitfield size:   AVR32_ADC_<register>_<bitfield>_SIZE
 - Bitfield values: AVR32_ADC_<register>_<bitfield>_<value name>

 The following defines are generated if they don't cause ambiguities,
 i.e. the name is unique, or all values with that name are the same.
 - Bitfield mask:   AVR32_ADC_<bitfield>
 - Bitfield offset: AVR32_ADC_<bitfield>_OFFSET
 - Bitfield size:   AVR32_ADC_<bitfield>_SIZE
 - Bitfield values: AVR32_ADC_<bitfield>_<value name>
 - Bitfield values: AVR32_ADC_<value name>

 All defines are sorted alphabetically.
*/


#define AVR32_ADC_CDR0                                     0x00000030
#define AVR32_ADC_CDR0_DATA                                         0
#define AVR32_ADC_CDR0_DATA_MASK                           0x000003ff
#define AVR32_ADC_CDR0_DATA_OFFSET                                  0
#define AVR32_ADC_CDR0_DATA_SIZE                                   10
#define AVR32_ADC_CDR1                                     0x00000034
#define AVR32_ADC_CDR1_DATA                                         0
#define AVR32_ADC_CDR1_DATA_MASK                           0x000003ff
#define AVR32_ADC_CDR1_DATA_OFFSET                                  0
#define AVR32_ADC_CDR1_DATA_SIZE                                   10
#define AVR32_ADC_CDR2                                     0x00000038
#define AVR32_ADC_CDR2_DATA                                         0
#define AVR32_ADC_CDR2_DATA_MASK                           0x000003ff
#define AVR32_ADC_CDR2_DATA_OFFSET                                  0
#define AVR32_ADC_CDR2_DATA_SIZE                                   10
#define AVR32_ADC_CDR3                                     0x0000003c
#define AVR32_ADC_CDR3_DATA                                         0
#define AVR32_ADC_CDR3_DATA_MASK                           0x000003ff
#define AVR32_ADC_CDR3_DATA_OFFSET                                  0
#define AVR32_ADC_CDR3_DATA_SIZE                                   10
#define AVR32_ADC_CDR4                                     0x00000040
#define AVR32_ADC_CDR4_DATA                                         0
#define AVR32_ADC_CDR4_DATA_MASK                           0x000003ff
#define AVR32_ADC_CDR4_DATA_OFFSET                                  0
#define AVR32_ADC_CDR4_DATA_SIZE                                   10
#define AVR32_ADC_CDR5                                     0x00000044
#define AVR32_ADC_CDR5_DATA                                         0
#define AVR32_ADC_CDR5_DATA_MASK                           0x000003ff
#define AVR32_ADC_CDR5_DATA_OFFSET                                  0
#define AVR32_ADC_CDR5_DATA_SIZE                                   10
#define AVR32_ADC_CDR6                                     0x00000048
#define AVR32_ADC_CDR6_DATA                                         0
#define AVR32_ADC_CDR6_DATA_MASK                           0x000003ff
#define AVR32_ADC_CDR6_DATA_OFFSET                                  0
#define AVR32_ADC_CDR6_DATA_SIZE                                   10
#define AVR32_ADC_CDR7                                     0x0000004c
#define AVR32_ADC_CDR7_DATA                                         0
#define AVR32_ADC_CDR7_DATA_MASK                           0x000003ff
#define AVR32_ADC_CDR7_DATA_OFFSET                                  0
#define AVR32_ADC_CDR7_DATA_SIZE                                   10
#define AVR32_ADC_CH0                                               0
#define AVR32_ADC_CH0_MASK                                 0x00000001
#define AVR32_ADC_CH0_OFFSET                                        0
#define AVR32_ADC_CH0_SIZE                                          1
#define AVR32_ADC_CH1                                               1
#define AVR32_ADC_CH1_MASK                                 0x00000002
#define AVR32_ADC_CH1_OFFSET                                        1
#define AVR32_ADC_CH1_SIZE                                          1
#define AVR32_ADC_CH2                                               2
#define AVR32_ADC_CH2_MASK                                 0x00000004
#define AVR32_ADC_CH2_OFFSET                                        2
#define AVR32_ADC_CH2_SIZE                                          1
#define AVR32_ADC_CH3                                               3
#define AVR32_ADC_CH3_MASK                                 0x00000008
#define AVR32_ADC_CH3_OFFSET                                        3
#define AVR32_ADC_CH3_SIZE                                          1
#define AVR32_ADC_CH4                                               4
#define AVR32_ADC_CH4_MASK                                 0x00000010
#define AVR32_ADC_CH4_OFFSET                                        4
#define AVR32_ADC_CH4_SIZE                                          1
#define AVR32_ADC_CH5                                               5
#define AVR32_ADC_CH5_MASK                                 0x00000020
#define AVR32_ADC_CH5_OFFSET                                        5
#define AVR32_ADC_CH5_SIZE                                          1
#define AVR32_ADC_CH6                                               6
#define AVR32_ADC_CH6_MASK                                 0x00000040
#define AVR32_ADC_CH6_OFFSET                                        6
#define AVR32_ADC_CH6_SIZE                                          1
#define AVR32_ADC_CH7                                               7
#define AVR32_ADC_CH7_MASK                                 0x00000080
#define AVR32_ADC_CH7_OFFSET                                        7
#define AVR32_ADC_CH7_SIZE                                          1
#define AVR32_ADC_CHDR                                     0x00000014
#define AVR32_ADC_CHDR_CH0                                          0
#define AVR32_ADC_CHDR_CH0_MASK                            0x00000001
#define AVR32_ADC_CHDR_CH0_OFFSET                                   0
#define AVR32_ADC_CHDR_CH0_SIZE                                     1
#define AVR32_ADC_CHDR_CH1                                          1
#define AVR32_ADC_CHDR_CH1_MASK                            0x00000002
#define AVR32_ADC_CHDR_CH1_OFFSET                                   1
#define AVR32_ADC_CHDR_CH1_SIZE                                     1
#define AVR32_ADC_CHDR_CH2                                          2
#define AVR32_ADC_CHDR_CH2_MASK                            0x00000004
#define AVR32_ADC_CHDR_CH2_OFFSET                                   2
#define AVR32_ADC_CHDR_CH2_SIZE                                     1
#define AVR32_ADC_CHDR_CH3                                          3
#define AVR32_ADC_CHDR_CH3_MASK                            0x00000008
#define AVR32_ADC_CHDR_CH3_OFFSET                                   3
#define AVR32_ADC_CHDR_CH3_SIZE                                     1
#define AVR32_ADC_CHDR_CH4                                          4
#define AVR32_ADC_CHDR_CH4_MASK                            0x00000010
#define AVR32_ADC_CHDR_CH4_OFFSET                                   4
#define AVR32_ADC_CHDR_CH4_SIZE                                     1
#define AVR32_ADC_CHDR_CH5                                          5
#define AVR32_ADC_CHDR_CH5_MASK                            0x00000020
#define AVR32_ADC_CHDR_CH5_OFFSET                                   5
#define AVR32_ADC_CHDR_CH5_SIZE                                     1
#define AVR32_ADC_CHDR_CH6                                          6
#define AVR32_ADC_CHDR_CH6_MASK                            0x00000040
#define AVR32_ADC_CHDR_CH6_OFFSET                                   6
#define AVR32_ADC_CHDR_CH6_SIZE                                     1
#define AVR32_ADC_CHDR_CH7                                          7
#define AVR32_ADC_CHDR_CH7_MASK                            0x00000080
#define AVR32_ADC_CHDR_CH7_OFFSET                                   7
#define AVR32_ADC_CHDR_CH7_SIZE                                     1
#define AVR32_ADC_CHER                                     0x00000010
#define AVR32_ADC_CHER_CH0                                          0
#define AVR32_ADC_CHER_CH0_MASK                            0x00000001
#define AVR32_ADC_CHER_CH0_OFFSET                                   0
#define AVR32_ADC_CHER_CH0_SIZE                                     1
#define AVR32_ADC_CHER_CH1                                          1
#define AVR32_ADC_CHER_CH1_MASK                            0x00000002
#define AVR32_ADC_CHER_CH1_OFFSET                                   1
#define AVR32_ADC_CHER_CH1_SIZE                                     1
#define AVR32_ADC_CHER_CH2                                          2
#define AVR32_ADC_CHER_CH2_MASK                            0x00000004
#define AVR32_ADC_CHER_CH2_OFFSET                                   2
#define AVR32_ADC_CHER_CH2_SIZE                                     1
#define AVR32_ADC_CHER_CH3                                          3
#define AVR32_ADC_CHER_CH3_MASK                            0x00000008
#define AVR32_ADC_CHER_CH3_OFFSET                                   3
#define AVR32_ADC_CHER_CH3_SIZE                                     1
#define AVR32_ADC_CHER_CH4                                          4
#define AVR32_ADC_CHER_CH4_MASK                            0x00000010
#define AVR32_ADC_CHER_CH4_OFFSET                                   4
#define AVR32_ADC_CHER_CH4_SIZE                                     1
#define AVR32_ADC_CHER_CH5                                          5
#define AVR32_ADC_CHER_CH5_MASK                            0x00000020
#define AVR32_ADC_CHER_CH5_OFFSET                                   5
#define AVR32_ADC_CHER_CH5_SIZE                                     1
#define AVR32_ADC_CHER_CH6                                          6
#define AVR32_ADC_CHER_CH6_MASK                            0x00000040
#define AVR32_ADC_CHER_CH6_OFFSET                                   6
#define AVR32_ADC_CHER_CH6_SIZE                                     1
#define AVR32_ADC_CHER_CH7                                          7
#define AVR32_ADC_CHER_CH7_MASK                            0x00000080
#define AVR32_ADC_CHER_CH7_OFFSET                                   7
#define AVR32_ADC_CHER_CH7_SIZE                                     1
#define AVR32_ADC_CHSR                                     0x00000018
#define AVR32_ADC_CHSR_CH0                                          0
#define AVR32_ADC_CHSR_CH0_MASK                            0x00000001
#define AVR32_ADC_CHSR_CH0_OFFSET                                   0
#define AVR32_ADC_CHSR_CH0_SIZE                                     1
#define AVR32_ADC_CHSR_CH1                                          1
#define AVR32_ADC_CHSR_CH1_MASK                            0x00000002
#define AVR32_ADC_CHSR_CH1_OFFSET                                   1
#define AVR32_ADC_CHSR_CH1_SIZE                                     1
#define AVR32_ADC_CHSR_CH2                                          2
#define AVR32_ADC_CHSR_CH2_MASK                            0x00000004
#define AVR32_ADC_CHSR_CH2_OFFSET                                   2
#define AVR32_ADC_CHSR_CH2_SIZE                                     1
#define AVR32_ADC_CHSR_CH3                                          3
#define AVR32_ADC_CHSR_CH3_MASK                            0x00000008
#define AVR32_ADC_CHSR_CH3_OFFSET                                   3
#define AVR32_ADC_CHSR_CH3_SIZE                                     1
#define AVR32_ADC_CHSR_CH4                                          4
#define AVR32_ADC_CHSR_CH4_MASK                            0x00000010
#define AVR32_ADC_CHSR_CH4_OFFSET                                   4
#define AVR32_ADC_CHSR_CH4_SIZE                                     1
#define AVR32_ADC_CHSR_CH5                                          5
#define AVR32_ADC_CHSR_CH5_MASK                            0x00000020
#define AVR32_ADC_CHSR_CH5_OFFSET                                   5
#define AVR32_ADC_CHSR_CH5_SIZE                                     1
#define AVR32_ADC_CHSR_CH6                                          6
#define AVR32_ADC_CHSR_CH6_MASK                            0x00000040
#define AVR32_ADC_CHSR_CH6_OFFSET                                   6
#define AVR32_ADC_CHSR_CH6_SIZE                                     1
#define AVR32_ADC_CHSR_CH7                                          7
#define AVR32_ADC_CHSR_CH7_MASK                            0x00000080
#define AVR32_ADC_CHSR_CH7_OFFSET                                   7
#define AVR32_ADC_CHSR_CH7_SIZE                                     1
#define AVR32_ADC_CR                                       0x00000000
#define AVR32_ADC_CR_START                                          1
#define AVR32_ADC_CR_START_MASK                            0x00000002
#define AVR32_ADC_CR_START_OFFSET                                   1
#define AVR32_ADC_CR_START_SIZE                                     1
#define AVR32_ADC_CR_SWRST                                          0
#define AVR32_ADC_CR_SWRST_MASK                            0x00000001
#define AVR32_ADC_CR_SWRST_OFFSET                                   0
#define AVR32_ADC_CR_SWRST_SIZE                                     1
#define AVR32_ADC_DATA                                              0
#define AVR32_ADC_DATA_MASK                                0x000003ff
#define AVR32_ADC_DATA_OFFSET                                       0
#define AVR32_ADC_DATA_SIZE                                        10
#define AVR32_ADC_DRDY                                             16
#define AVR32_ADC_DRDY_MASK                                0x00010000
#define AVR32_ADC_DRDY_OFFSET                                      16
#define AVR32_ADC_DRDY_SIZE                                         1
#define AVR32_ADC_ENDRX                                            18
#define AVR32_ADC_ENDRX_MASK                               0x00040000
#define AVR32_ADC_ENDRX_OFFSET                                     18
#define AVR32_ADC_ENDRX_SIZE                                        1
#define AVR32_ADC_EOC0                                              0
#define AVR32_ADC_EOC0_MASK                                0x00000001
#define AVR32_ADC_EOC0_OFFSET                                       0
#define AVR32_ADC_EOC0_SIZE                                         1
#define AVR32_ADC_EOC1                                              1
#define AVR32_ADC_EOC1_MASK                                0x00000002
#define AVR32_ADC_EOC1_OFFSET                                       1
#define AVR32_ADC_EOC1_SIZE                                         1
#define AVR32_ADC_EOC2                                              2
#define AVR32_ADC_EOC2_MASK                                0x00000004
#define AVR32_ADC_EOC2_OFFSET                                       2
#define AVR32_ADC_EOC2_SIZE                                         1
#define AVR32_ADC_EOC3                                              3
#define AVR32_ADC_EOC3_MASK                                0x00000008
#define AVR32_ADC_EOC3_OFFSET                                       3
#define AVR32_ADC_EOC3_SIZE                                         1
#define AVR32_ADC_EOC4                                              4
#define AVR32_ADC_EOC4_MASK                                0x00000010
#define AVR32_ADC_EOC4_OFFSET                                       4
#define AVR32_ADC_EOC4_SIZE                                         1
#define AVR32_ADC_EOC5                                              5
#define AVR32_ADC_EOC5_MASK                                0x00000020
#define AVR32_ADC_EOC5_OFFSET                                       5
#define AVR32_ADC_EOC5_SIZE                                         1
#define AVR32_ADC_EOC6                                              6
#define AVR32_ADC_EOC6_MASK                                0x00000040
#define AVR32_ADC_EOC6_OFFSET                                       6
#define AVR32_ADC_EOC6_SIZE                                         1
#define AVR32_ADC_EOC7                                              7
#define AVR32_ADC_EOC7_MASK                                0x00000080
#define AVR32_ADC_EOC7_OFFSET                                       7
#define AVR32_ADC_EOC7_SIZE                                         1
#define AVR32_ADC_GOVRE                                            17
#define AVR32_ADC_GOVRE_MASK                               0x00020000
#define AVR32_ADC_GOVRE_OFFSET                                     17
#define AVR32_ADC_GOVRE_SIZE                                        1
#define AVR32_ADC_IDR                                      0x00000028
#define AVR32_ADC_IDR_DRDY                                         16
#define AVR32_ADC_IDR_DRDY_MASK                            0x00010000
#define AVR32_ADC_IDR_DRDY_OFFSET                                  16
#define AVR32_ADC_IDR_DRDY_SIZE                                     1
#define AVR32_ADC_IDR_ENDRX                                        18
#define AVR32_ADC_IDR_ENDRX_MASK                           0x00040000
#define AVR32_ADC_IDR_ENDRX_OFFSET                                 18
#define AVR32_ADC_IDR_ENDRX_SIZE                                    1
#define AVR32_ADC_IDR_EOC0                                          0
#define AVR32_ADC_IDR_EOC0_MASK                            0x00000001
#define AVR32_ADC_IDR_EOC0_OFFSET                                   0
#define AVR32_ADC_IDR_EOC0_SIZE                                     1
#define AVR32_ADC_IDR_EOC1                                          1
#define AVR32_ADC_IDR_EOC1_MASK                            0x00000002
#define AVR32_ADC_IDR_EOC1_OFFSET                                   1
#define AVR32_ADC_IDR_EOC1_SIZE                                     1
#define AVR32_ADC_IDR_EOC2                                          2
#define AVR32_ADC_IDR_EOC2_MASK                            0x00000004
#define AVR32_ADC_IDR_EOC2_OFFSET                                   2
#define AVR32_ADC_IDR_EOC2_SIZE                                     1
#define AVR32_ADC_IDR_EOC3                                          3
#define AVR32_ADC_IDR_EOC3_MASK                            0x00000008
#define AVR32_ADC_IDR_EOC3_OFFSET                                   3
#define AVR32_ADC_IDR_EOC3_SIZE                                     1
#define AVR32_ADC_IDR_EOC4                                          4
#define AVR32_ADC_IDR_EOC4_MASK                            0x00000010
#define AVR32_ADC_IDR_EOC4_OFFSET                                   4
#define AVR32_ADC_IDR_EOC4_SIZE                                     1
#define AVR32_ADC_IDR_EOC5                                          5
#define AVR32_ADC_IDR_EOC5_MASK                            0x00000020
#define AVR32_ADC_IDR_EOC5_OFFSET                                   5
#define AVR32_ADC_IDR_EOC5_SIZE                                     1
#define AVR32_ADC_IDR_EOC6                                          6
#define AVR32_ADC_IDR_EOC6_MASK                            0x00000040
#define AVR32_ADC_IDR_EOC6_OFFSET                                   6
#define AVR32_ADC_IDR_EOC6_SIZE                                     1
#define AVR32_ADC_IDR_EOC7                                          7
#define AVR32_ADC_IDR_EOC7_MASK                            0x00000080
#define AVR32_ADC_IDR_EOC7_OFFSET                                   7
#define AVR32_ADC_IDR_EOC7_SIZE                                     1
#define AVR32_ADC_IDR_GOVRE                                        17
#define AVR32_ADC_IDR_GOVRE_MASK                           0x00020000
#define AVR32_ADC_IDR_GOVRE_OFFSET                                 17
#define AVR32_ADC_IDR_GOVRE_SIZE                                    1
#define AVR32_ADC_IDR_OVRE0                                         8
#define AVR32_ADC_IDR_OVRE0_MASK                           0x00000100
#define AVR32_ADC_IDR_OVRE0_OFFSET                                  8
#define AVR32_ADC_IDR_OVRE0_SIZE                                    1
#define AVR32_ADC_IDR_OVRE1                                         9
#define AVR32_ADC_IDR_OVRE1_MASK                           0x00000200
#define AVR32_ADC_IDR_OVRE1_OFFSET                                  9
#define AVR32_ADC_IDR_OVRE1_SIZE                                    1
#define AVR32_ADC_IDR_OVRE2                                        10
#define AVR32_ADC_IDR_OVRE2_MASK                           0x00000400
#define AVR32_ADC_IDR_OVRE2_OFFSET                                 10
#define AVR32_ADC_IDR_OVRE2_SIZE                                    1
#define AVR32_ADC_IDR_OVRE3                                        11
#define AVR32_ADC_IDR_OVRE3_MASK                           0x00000800
#define AVR32_ADC_IDR_OVRE3_OFFSET                                 11
#define AVR32_ADC_IDR_OVRE3_SIZE                                    1
#define AVR32_ADC_IDR_OVRE4                                        12
#define AVR32_ADC_IDR_OVRE4_MASK                           0x00001000
#define AVR32_ADC_IDR_OVRE4_OFFSET                                 12
#define AVR32_ADC_IDR_OVRE4_SIZE                                    1
#define AVR32_ADC_IDR_OVRE5                                        13
#define AVR32_ADC_IDR_OVRE5_MASK                           0x00002000
#define AVR32_ADC_IDR_OVRE5_OFFSET                                 13
#define AVR32_ADC_IDR_OVRE5_SIZE                                    1
#define AVR32_ADC_IDR_OVRE6                                        14
#define AVR32_ADC_IDR_OVRE6_MASK                           0x00004000
#define AVR32_ADC_IDR_OVRE6_OFFSET                                 14
#define AVR32_ADC_IDR_OVRE6_SIZE                                    1
#define AVR32_ADC_IDR_OVRE7                                        15
#define AVR32_ADC_IDR_OVRE7_MASK                           0x00008000
#define AVR32_ADC_IDR_OVRE7_OFFSET                                 15
#define AVR32_ADC_IDR_OVRE7_SIZE                                    1
#define AVR32_ADC_IDR_RXBUFF                                       19
#define AVR32_ADC_IDR_RXBUFF_MASK                          0x00080000
#define AVR32_ADC_IDR_RXBUFF_OFFSET                                19
#define AVR32_ADC_IDR_RXBUFF_SIZE                                   1
#define AVR32_ADC_IER                                      0x00000024
#define AVR32_ADC_IER_DRDY                                         16
#define AVR32_ADC_IER_DRDY_MASK                            0x00010000
#define AVR32_ADC_IER_DRDY_OFFSET                                  16
#define AVR32_ADC_IER_DRDY_SIZE                                     1
#define AVR32_ADC_IER_ENDRX                                        18
#define AVR32_ADC_IER_ENDRX_MASK                           0x00040000
#define AVR32_ADC_IER_ENDRX_OFFSET                                 18
#define AVR32_ADC_IER_ENDRX_SIZE                                    1
#define AVR32_ADC_IER_EOC0                                          0
#define AVR32_ADC_IER_EOC0_MASK                            0x00000001
#define AVR32_ADC_IER_EOC0_OFFSET                                   0
#define AVR32_ADC_IER_EOC0_SIZE                                     1
#define AVR32_ADC_IER_EOC1                                          1
#define AVR32_ADC_IER_EOC1_MASK                            0x00000002
#define AVR32_ADC_IER_EOC1_OFFSET                                   1
#define AVR32_ADC_IER_EOC1_SIZE                                     1
#define AVR32_ADC_IER_EOC2                                          2
#define AVR32_ADC_IER_EOC2_MASK                            0x00000004
#define AVR32_ADC_IER_EOC2_OFFSET                                   2
#define AVR32_ADC_IER_EOC2_SIZE                                     1
#define AVR32_ADC_IER_EOC3                                          3
#define AVR32_ADC_IER_EOC3_MASK                            0x00000008
#define AVR32_ADC_IER_EOC3_OFFSET                                   3
#define AVR32_ADC_IER_EOC3_SIZE                                     1
#define AVR32_ADC_IER_EOC4                                          4
#define AVR32_ADC_IER_EOC4_MASK                            0x00000010
#define AVR32_ADC_IER_EOC4_OFFSET                                   4
#define AVR32_ADC_IER_EOC4_SIZE                                     1
#define AVR32_ADC_IER_EOC5                                          5
#define AVR32_ADC_IER_EOC5_MASK                            0x00000020
#define AVR32_ADC_IER_EOC5_OFFSET                                   5
#define AVR32_ADC_IER_EOC5_SIZE                                     1
#define AVR32_ADC_IER_EOC6                                          6
#define AVR32_ADC_IER_EOC6_MASK                            0x00000040
#define AVR32_ADC_IER_EOC6_OFFSET                                   6
#define AVR32_ADC_IER_EOC6_SIZE                                     1
#define AVR32_ADC_IER_EOC7                                          7
#define AVR32_ADC_IER_EOC7_MASK                            0x00000080
#define AVR32_ADC_IER_EOC7_OFFSET                                   7
#define AVR32_ADC_IER_EOC7_SIZE                                     1
#define AVR32_ADC_IER_GOVRE                                        17
#define AVR32_ADC_IER_GOVRE_MASK                           0x00020000
#define AVR32_ADC_IER_GOVRE_OFFSET                                 17
#define AVR32_ADC_IER_GOVRE_SIZE                                    1
#define AVR32_ADC_IER_OVRE0                                         8
#define AVR32_ADC_IER_OVRE0_MASK                           0x00000100
#define AVR32_ADC_IER_OVRE0_OFFSET                                  8
#define AVR32_ADC_IER_OVRE0_SIZE                                    1
#define AVR32_ADC_IER_OVRE1                                         9
#define AVR32_ADC_IER_OVRE1_MASK                           0x00000200
#define AVR32_ADC_IER_OVRE1_OFFSET                                  9
#define AVR32_ADC_IER_OVRE1_SIZE                                    1
#define AVR32_ADC_IER_OVRE2                                        10
#define AVR32_ADC_IER_OVRE2_MASK                           0x00000400
#define AVR32_ADC_IER_OVRE2_OFFSET                                 10
#define AVR32_ADC_IER_OVRE2_SIZE                                    1
#define AVR32_ADC_IER_OVRE3                                        11
#define AVR32_ADC_IER_OVRE3_MASK                           0x00000800
#define AVR32_ADC_IER_OVRE3_OFFSET                                 11
#define AVR32_ADC_IER_OVRE3_SIZE                                    1
#define AVR32_ADC_IER_OVRE4                                        12
#define AVR32_ADC_IER_OVRE4_MASK                           0x00001000
#define AVR32_ADC_IER_OVRE4_OFFSET                                 12
#define AVR32_ADC_IER_OVRE4_SIZE                                    1
#define AVR32_ADC_IER_OVRE5                                        13
#define AVR32_ADC_IER_OVRE5_MASK                           0x00002000
#define AVR32_ADC_IER_OVRE5_OFFSET                                 13
#define AVR32_ADC_IER_OVRE5_SIZE                                    1
#define AVR32_ADC_IER_OVRE6                                        14
#define AVR32_ADC_IER_OVRE6_MASK                           0x00004000
#define AVR32_ADC_IER_OVRE6_OFFSET                                 14
#define AVR32_ADC_IER_OVRE6_SIZE                                    1
#define AVR32_ADC_IER_OVRE7                                        15
#define AVR32_ADC_IER_OVRE7_MASK                           0x00008000
#define AVR32_ADC_IER_OVRE7_OFFSET                                 15
#define AVR32_ADC_IER_OVRE7_SIZE                                    1
#define AVR32_ADC_IER_RXBUFF                                       19
#define AVR32_ADC_IER_RXBUFF_MASK                          0x00080000
#define AVR32_ADC_IER_RXBUFF_OFFSET                                19
#define AVR32_ADC_IER_RXBUFF_SIZE                                   1
#define AVR32_ADC_IMR                                      0x0000002c
#define AVR32_ADC_IMR_DRDY                                         16
#define AVR32_ADC_IMR_DRDY_MASK                            0x00010000
#define AVR32_ADC_IMR_DRDY_OFFSET                                  16
#define AVR32_ADC_IMR_DRDY_SIZE                                     1
#define AVR32_ADC_IMR_ENDRX                                        18
#define AVR32_ADC_IMR_ENDRX_MASK                           0x00040000
#define AVR32_ADC_IMR_ENDRX_OFFSET                                 18
#define AVR32_ADC_IMR_ENDRX_SIZE                                    1
#define AVR32_ADC_IMR_EOC0                                          0
#define AVR32_ADC_IMR_EOC0_MASK                            0x00000001
#define AVR32_ADC_IMR_EOC0_OFFSET                                   0
#define AVR32_ADC_IMR_EOC0_SIZE                                     1
#define AVR32_ADC_IMR_EOC1                                          1
#define AVR32_ADC_IMR_EOC1_MASK                            0x00000002
#define AVR32_ADC_IMR_EOC1_OFFSET                                   1
#define AVR32_ADC_IMR_EOC1_SIZE                                     1
#define AVR32_ADC_IMR_EOC2                                          2
#define AVR32_ADC_IMR_EOC2_MASK                            0x00000004
#define AVR32_ADC_IMR_EOC2_OFFSET                                   2
#define AVR32_ADC_IMR_EOC2_SIZE                                     1
#define AVR32_ADC_IMR_EOC3                      
Download .txt
gitextract_oiynfstl/

├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug-report.md
│   │   └── build-error.md
│   └── workflows/
│       ├── build-plugin.yaml
│       └── deploy-pages.yml
├── .gitignore
├── .gitmodules
├── .vscode/
│   ├── c_cpp_properties.json
│   ├── launch.json
│   ├── settings.json
│   └── tasks.json
├── DEVELOPING.md
├── LICENSE
├── Makefile
├── README.md
├── docs/
│   ├── content/
│   │   ├── extra.css
│   │   ├── general/
│   │   │   ├── connections.md
│   │   │   ├── credits.md
│   │   │   ├── intro.md
│   │   │   └── voltage.md
│   │   ├── help.md
│   │   ├── index.md
│   │   ├── modules/
│   │   │   ├── ansible.md
│   │   │   ├── earthsea.md
│   │   │   ├── faderbank.md
│   │   │   ├── grids.md
│   │   │   ├── meadowphysics.md
│   │   │   ├── teletype.md
│   │   │   └── whitewhale.md
│   │   └── patches/
│   │       ├── ansible-earthsea-quickstart.vcv
│   │       ├── ansible-kria-grid-legend.vcv
│   │       ├── ansible-kria-quickstart.vcv
│   │       ├── ansible-meadowphysics-quickstart.vcv
│   │       ├── earthsea-grid-legend.vcv
│   │       ├── earthsea-quickstart.vcv
│   │       ├── meadowphysics-grid-legends.vcv
│   │       ├── meadowphysics-quickstart.vcv
│   │       ├── teletype-quickstart-1.vcv
│   │       ├── teletype-quickstart-2.vcv
│   │       ├── whitewhale-grid-legend.vcv
│   │       └── whitewhale-quickstart.vcv
│   ├── custom-theme/
│   │   ├── main.html
│   │   └── partials/
│   │       └── search/
│   │           └── mkdocs/
│   │               └── search-modal.html
│   └── requirements.txt
├── firmware/
│   ├── ansible.mk
│   ├── common.mk
│   ├── compile.mk
│   ├── earthsea.mk
│   ├── meadowphysics.mk
│   ├── mock_hardware/
│   │   ├── common/
│   │   │   ├── adc.c
│   │   │   ├── cdc.c
│   │   │   ├── flashc.c
│   │   │   ├── ftdi.c
│   │   │   ├── gpio.c
│   │   │   ├── i2c.c
│   │   │   ├── init_common.c
│   │   │   ├── interrupts.c
│   │   │   ├── midi.c
│   │   │   ├── monome.c
│   │   │   ├── print_funcs.c
│   │   │   ├── screen.c
│   │   │   └── spi.c
│   │   ├── include/
│   │   │   ├── adc.h
│   │   │   ├── avr32/
│   │   │   │   ├── abi.h
│   │   │   │   ├── adc_200.h
│   │   │   │   ├── core_sc0_130.h
│   │   │   │   ├── eic_230.h
│   │   │   │   ├── flashc_200.h
│   │   │   │   ├── freqm_230.h
│   │   │   │   ├── gpio_110.h
│   │   │   │   ├── hmatrix_230.h
│   │   │   │   ├── intc_101.h
│   │   │   │   ├── io.h
│   │   │   │   ├── ocd_s0_130.h
│   │   │   │   ├── pdca_102.h
│   │   │   │   ├── pm_230.h
│   │   │   │   ├── pwm_130.h
│   │   │   │   ├── rtc_230.h
│   │   │   │   ├── spi_199.h
│   │   │   │   ├── ssc_310.h
│   │   │   │   ├── tc_222.h
│   │   │   │   ├── twi_211.h
│   │   │   │   ├── uc3b0256.h
│   │   │   │   ├── uc3b0512.h
│   │   │   │   ├── usart_400.h
│   │   │   │   ├── usbb_310.h
│   │   │   │   └── wdt_230.h
│   │   │   ├── board.h
│   │   │   ├── compiler.h
│   │   │   ├── conf_usb_host.h
│   │   │   ├── delay.h
│   │   │   ├── flashc.h
│   │   │   ├── fs_com.h
│   │   │   ├── ftdi.h
│   │   │   ├── gpio.h
│   │   │   ├── intc.h
│   │   │   ├── interrupt.h
│   │   │   ├── parts.h
│   │   │   ├── pm.h
│   │   │   ├── preprocessor.h
│   │   │   ├── print_funcs.h
│   │   │   ├── spi.h
│   │   │   ├── sysclk.h
│   │   │   ├── tc.h
│   │   │   ├── twi.h
│   │   │   ├── usart.h
│   │   │   └── usb_protocol.h
│   │   ├── mock_hardware_api.c
│   │   ├── mock_hardware_api.h
│   │   ├── mock_hardware_api_private.h
│   │   ├── mock_interrupt.c
│   │   ├── mock_interrupt.h
│   │   ├── mock_serial.c
│   │   ├── mock_serial.h
│   │   └── modules/
│   │       ├── ansible/
│   │       │   ├── adapter_ansible.c
│   │       │   └── ansible_usb_disk.c
│   │       ├── teletype/
│   │       │   ├── adapter_teletype.c
│   │       │   └── usb_disk_mode.c
│   │       └── trilogy/
│   │           └── adapter_trilogy.c
│   ├── teletype.mk
│   └── whitewhale.mk
├── lib/
│   ├── base64/
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── base64.cpp
│   │   └── base64.h
│   ├── cbbq/
│   │   ├── LICENSE.md
│   │   ├── README.md
│   │   ├── cbbq.h
│   │   └── test/
│   │       ├── .gitignore
│   │       ├── cbbq_test.c
│   │       ├── cbbq_utils.h
│   │       └── test.sh
│   ├── oscpack/
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── ip/
│   │   │   ├── IpEndpointName.cpp
│   │   │   ├── IpEndpointName.h
│   │   │   ├── NetworkingUtils.h
│   │   │   ├── PacketListener.h
│   │   │   ├── TimerListener.h
│   │   │   ├── UdpSocket.h
│   │   │   ├── posix/
│   │   │   │   ├── NetworkingUtils.cpp
│   │   │   │   └── UdpSocket.cpp
│   │   │   └── win32/
│   │   │       ├── NetworkingUtils.cpp
│   │   │       └── UdpSocket.cpp
│   │   └── osc/
│   │       ├── MessageMappingOscPacketListener.h
│   │       ├── OscException.h
│   │       ├── OscHostEndianness.h
│   │       ├── OscOutboundPacketStream.cpp
│   │       ├── OscOutboundPacketStream.h
│   │       ├── OscPacketListener.h
│   │       ├── OscPrintReceivedElements.cpp
│   │       ├── OscPrintReceivedElements.h
│   │       ├── OscReceivedElements.cpp
│   │       ├── OscReceivedElements.h
│   │       ├── OscTypes.cpp
│   │       └── OscTypes.h
│   ├── serialosc/
│   │   ├── MonomeDevice.h
│   │   ├── README.md
│   │   ├── SerialOsc.cpp
│   │   └── SerialOsc.h
│   └── simple-svg/
│       ├── CMakeLists.txt
│       ├── LICENSE
│       ├── README.md
│       ├── main_1.0.0.cpp
│       └── simple_svg_1.0.0.hpp
├── mkdocs.yml
├── plugin.json
├── presets/
│   └── teletype/
│       ├── 00_TRIANGLE MOUNTAIN.vcvm
│       ├── 01_RANDOMS.vcvm
│       ├── 02_HIDDEN PATH NO PATH.vcvm
│       ├── 03_4TRACK.vcvm
│       ├── 04_MOOD RING.vcvm
│       └── MINIM.vcvm
├── res/
│   └── keymaps/
│       ├── README.md
│       ├── uk.json
│       ├── us-dvorak.json
│       └── us-qwerty.json
└── src/
    ├── ansible/
    │   ├── AnsibleModule.hpp
    │   └── AnsibleWidget.hpp
    ├── common/
    │   ├── core/
    │   │   ├── ActionQueue.hpp
    │   │   ├── FirmwareManager.cpp
    │   │   ├── FirmwareManager.hpp
    │   │   ├── GridConnection/
    │   │   │   ├── GridConnection.cpp
    │   │   │   ├── GridConnection.hpp
    │   │   │   ├── GridConnectionMenu.cpp
    │   │   │   ├── GridConnectionMenu.hpp
    │   │   │   ├── GridConsumerBase.cpp
    │   │   │   ├── GridConsumerBase.hpp
    │   │   │   ├── SerialOscGrid.cpp
    │   │   │   ├── SerialOscGrid.hpp
    │   │   │   ├── SerialOscInterface.cpp
    │   │   │   └── SerialOscInterface.hpp
    │   │   ├── IIBus.cpp
    │   │   ├── IIBus.h
    │   │   ├── LibAVR32Module.cpp
    │   │   ├── LibAVR32Module.hpp
    │   │   ├── LibAVR32ModuleWidget.cpp
    │   │   └── LibAVR32ModuleWidget.hpp
    │   ├── util/
    │   │   ├── Clock12BitParam.hpp
    │   │   ├── Screenshot.cpp
    │   │   └── Screenshot.hpp
    │   └── widgets/
    │       ├── CustomMenuTemplates.hpp
    │       ├── HoldableButton.hpp
    │       ├── SifamTPM.hpp
    │       ├── USBAJack.hpp
    │       └── YellowWhiteLight.hpp
    ├── earthsea/
    │   ├── EarthseaModule.hpp
    │   └── EarthseaWidget.hpp
    ├── faderbank/
    │   ├── FaderbankModule.cpp
    │   ├── FaderbankModule.hpp
    │   ├── FaderbankWidget.cpp
    │   └── FaderbankWidget.hpp
    ├── meadowphysics/
    │   ├── MeadowphysicsModule.hpp
    │   └── MeadowphysicsWidget.hpp
    ├── plugin.cpp
    ├── teletype/
    │   ├── TeletypeKeyboard.cpp
    │   ├── TeletypeKeyboard.hpp
    │   ├── TeletypeModule.cpp
    │   ├── TeletypeModule.hpp
    │   ├── TeletypeWidget.cpp
    │   ├── TeletypeWidget.hpp
    │   ├── scene/
    │   │   ├── TeletypeSceneIO.cpp
    │   │   ├── TeletypeSceneIO.hpp
    │   │   ├── TeletypeSceneIOMenu.cpp
    │   │   └── TeletypeSceneIOMenu.hpp
    │   └── screen/
    │       ├── EngineStoppedScreen.hpp
    │       ├── ExampleScreen.hpp
    │       ├── TeletypeScreenWidget.cpp
    │       └── TeletypeScreenWidget.hpp
    ├── virtualgrid/
    │   ├── VirtualGridKey.hpp
    │   ├── VirtualGridModule.cpp
    │   ├── VirtualGridModule.hpp
    │   ├── VirtualGridTheme.cpp
    │   ├── VirtualGridTheme.hpp
    │   ├── VirtualGridWidget.cpp
    │   └── VirtualGridWidget.hpp
    └── whitewhale/
        ├── WhiteWhaleModule.hpp
        └── WhiteWhaleWidget.hpp
Download .txt
SYMBOL INDEX (1196 symbols across 124 files)

FILE: firmware/mock_hardware/common/adc.c
  function adc_convert (line 4) | void adc_convert(u16 (*adc)[4])

FILE: firmware/mock_hardware/common/cdc.c
  function cdc_write (line 3) | void cdc_write(uint8_t* data, uint32_t bytes)
  function cdc_read (line 7) | void cdc_read(void)
  function cdc_setup (line 11) | void cdc_setup(void)
  function u8 (line 15) | u8* cdc_rx_buf(void)
  function u8 (line 20) | u8 cdc_rx_bytes(void)
  function u8 (line 25) | u8 cdc_rx_busy(void) { return 0; }
  function u8 (line 26) | u8 cdc_tx_busy(void) { return 0; }
  function u8 (line 28) | u8 cdc_connected(void)

FILE: firmware/mock_hardware/common/ftdi.c
  function ftdi_write (line 3) | void ftdi_write(uint8_t* data, uint32_t bytes)
  function ftdi_read (line 7) | void ftdi_read(void)
  function ftdi_setup (line 11) | void ftdi_setup(void)
  function u8 (line 15) | u8* ftdi_rx_buf(void)
  function u8 (line 20) | volatile u8 ftdi_rx_bytes(void)
  function u8 (line 25) | volatile u8 ftdi_rx_busy(void) { return 0; }
  function u8 (line 26) | volatile u8 ftdi_tx_busy(void) { return 0; }
  function u8 (line 28) | u8 ftdi_connected(void)

FILE: firmware/mock_hardware/common/gpio.c
  function gpio_set_gpio_pin (line 4) | void gpio_set_gpio_pin(u32 pin)
  function gpio_clr_gpio_pin (line 9) | void gpio_clr_gpio_pin(u32 pin)
  function gpio_set_pin_high (line 14) | void gpio_set_pin_high(u32 pin)
  function gpio_set_pin_low (line 19) | void gpio_set_pin_low(u32 pin)
  function gpio_get_pin_value (line 24) | int gpio_get_pin_value(u32 pin)

FILE: firmware/mock_hardware/common/i2c.c
  function i2c_leader_tx (line 6) | int i2c_leader_tx(uint8_t addr, uint8_t* data, uint8_t l)
  function i2c_leader_rx (line 17) | int i2c_leader_rx(uint8_t addr, uint8_t* data, uint8_t l)
  function twi_follower_rx (line 29) | void twi_follower_rx(uint8_t u8_value) { }
  function twi_follower_tx (line 30) | uint8_t twi_follower_tx(void) { return 0; }
  function twi_follower_stop (line 31) | void twi_follower_stop(void) { }
  function ii_tx_queue (line 33) | void ii_tx_queue(uint8_t u8_value) { }

FILE: firmware/mock_hardware/common/init_common.c
  function init_gpio (line 3) | void init_gpio() { }
  function init_spi (line 4) | void init_spi() { }
  function init_adc (line 5) | void init_adc() { }
  function init_tc (line 6) | void init_tc(void) { }
  function init_usb_host (line 7) | void init_usb_host(void) { }
  function init_i2c_follower (line 9) | void init_i2c_follower(uint8_t addr) { }
  function init_i2c_leader (line 10) | void init_i2c_leader(void) { }
  function register_interrupts (line 12) | void register_interrupts() { }
  function sysclk_init (line 13) | void sysclk_init() { }
  function init_dbg_rs232 (line 15) | void init_dbg_rs232(long pba_hz) { }

FILE: firmware/mock_hardware/common/interrupts.c
  function u8 (line 3) | u8 irqs_pause(void) { return 0; }
  function irqs_resume (line 4) | void irqs_resume(u8 irq_flags) { }

FILE: firmware/mock_hardware/common/midi.c
  function midi_read (line 5) | void midi_read(void) { }
  function midi_write (line 6) | bool midi_write(const u8* data, u32 bytes) { return true; }
  function midi_change (line 7) | void midi_change(uhc_device_t* dev, u8 plug) { }

FILE: firmware/mock_hardware/common/monome.c
  type eMonomeProtocol (line 37) | typedef enum {
  type monomeDesc (line 46) | typedef struct e_monomeDesc {
  function read_serial_dummy (line 58) | static void read_serial_dummy(void) { return; }
  function init_monome (line 204) | void init_monome(void) {
  function u8 (line 213) | u8 check_monome_device_desc(char* mstr, char* pstr, char* sstr) {
  function monome_grid_refresh (line 299) | void monome_grid_refresh(void) {
  function monome_arc_refresh (line 342) | void monome_arc_refresh(void) {
  function monome_connect_write_event (line 363) | void monome_connect_write_event(void) {
  function monome_connect_parse_event_data (line 382) | void monome_connect_parse_event_data(u32 data, eMonomeDevice *dev, u8* w...
  function monome_grid_key_write_event (line 390) | inline void monome_grid_key_write_event(u8 x, u8 y, u8 val) {
  function monome_grid_key_parse_event_data (line 399) | void monome_grid_key_parse_event_data(u32 data, u8* x, u8* y, u8* val) {
  function monome_grid_adc_write_event (line 407) | inline void monome_grid_adc_write_event( u8 n, u16 val) {
  function monome_grid_adc_parse_event_data (line 410) | void monome_grid_adc_parse_event_data(u32 data, u8* n, u16* val) {
  function monome_ring_enc_write_event (line 415) | inline void monome_ring_enc_write_event( u8 n, u8 val) {
  function monome_ring_enc_parse_event_data (line 422) | void monome_ring_enc_parse_event_data(u32 data, u8* n, s8* val) {
  function monome_ring_key_write_event (line 429) | inline void monome_ring_key_write_event( u8 n, u8 val) {
  function monome_ring_key_parse_event_data (line 432) | void monome_ring_key_parse_event_data(u32 data, u8* n, u8* val) {
  function monome_calc_quadrant_flag (line 437) | void monome_calc_quadrant_flag(u8 x, u8 y) {
  function monome_set_quadrant_flag (line 456) | extern void monome_set_quadrant_flag(u8 q) {
  function monome_idx_xy (line 462) | void monome_idx_xy(u32 idx, u8* x, u8* y) {
  function u32 (line 468) | u32 monome_xy_idx(u8 x, u8 y) {
  function monome_led_set (line 473) | void monome_led_set(u8 x, u8 y, u8 z) {
  function monome_led_toggle (line 479) | void monome_led_toggle(u8 x, u8 y) {
  function monome_arc_led_set (line 485) | void monome_arc_led_set(u8 enc, u8 ring, u8 val) {
  function eMonomeDevice (line 493) | eMonomeDevice monome_device(void) { return mdesc.device; }
  function u8 (line 494) | u8 monome_size_x(void) { return mdesc.cols; }
  function u8 (line 495) | u8 monome_size_y(void) {  return mdesc.rows; }
  function u8 (line 496) | u8 monome_is_vari(void) {  return mdesc.vari; }
  function u8 (line 497) | u8 monome_encs(void) {  return mdesc.encs; }
  function set_funcs (line 503) | void set_funcs(void) {
  function setup_40h (line 523) | static void setup_40h(u8 cols, u8 rows) {
  function setup_series (line 535) | static void setup_series(u8 cols, u8 rows) {
  function u8 (line 550) | static u8 setup_mext(void) {
  function read_serial_40h (line 683) | static void read_serial_40h(void) {
  function read_serial_series (line 718) | static void read_serial_series(void) {
  function read_serial_mext (line 750) | static void read_serial_mext(void) {
  function grid_map_mext (line 824) | static void grid_map_mext( u8 x, u8 y, const u8* data ) {
  function grid_map_40h (line 854) | static void grid_map_40h(u8 x, u8 y, const u8* data) {
  function grid_map_series (line 885) | static void grid_map_series(u8 x, u8 y, const u8* data) {
  function ring_map_mext (line 920) | static void ring_map_mext(u8 n, u8* data) {
  function set_intense_series (line 942) | static void set_intense_series(u8 v) {
  function set_intense_mext (line 956) | static void set_intense_mext(u8 v) {
  function monome_setup_mext (line 961) | void monome_setup_mext() {

FILE: firmware/mock_hardware/common/print_funcs.c
  function print_dbg (line 5) | static void print_dbg(const char* str) { fprintf(stderr, "%s", str); }
  function print_dbg_char (line 6) | static void print_dbg_char(int c) { fprintf(stderr, "%d", c); }
  function print_dbg_ulong (line 7) | static void print_dbg_ulong(unsigned long n) { fprintf(stderr, "%ld", n); }
  function print_dbg_char_hex (line 8) | static void print_dbg_char_hex(unsigned char n) { fprintf(stderr, "%x", ...
  function print_dbg_short_hex (line 9) | static void print_dbg_short_hex(unsigned short n) { fprintf(stderr, "%d"...
  function print_dbg_hex (line 10) | static void print_dbg_hex(unsigned long n) { fprintf(stderr, "%lx", n); }
  function print_dbg (line 12) | static void print_dbg(const char* str) { }
  function print_dbg_char (line 13) | static void print_dbg_char(int c) { }
  function print_dbg_ulong (line 14) | static void print_dbg_ulong(unsigned long n) { }
  function print_dbg_char_hex (line 15) | static void print_dbg_char_hex(unsigned char n) { }
  function print_dbg_short_hex (line 16) | static void print_dbg_short_hex(unsigned short n) { }
  function print_dbg_hex (line 17) | static void print_dbg_hex(unsigned long n) { }

FILE: firmware/mock_hardware/common/screen.c
  function init_oled (line 8) | void init_oled(void) { }
  function screen_startup (line 9) | void screen_startup(void) { }
  function screen_draw_region (line 11) | void screen_draw_region(u8 x, u8 y, u8 w, u8 h, u8* data)
  function screen_draw_region_offset (line 46) | void screen_draw_region_offset(u8 x, u8 y, u8 w, u8 h, u32 len, u8* data...
  function screen_set_direction (line 51) | void screen_set_direction(u8 flipped)
  function screen_clear (line 56) | void screen_clear(void)

FILE: firmware/mock_hardware/common/spi.c
  type spi_dac_state_t (line 4) | typedef enum
  function spi_write (line 24) | void spi_write(u32 chip, u32 byte)
  function spi_selectChip (line 139) | void spi_selectChip(u32 arg1, u32 arg2) {}
  function spi_unselectChip (line 140) | void spi_unselectChip(u32 arg1, u32 arg2) {}

FILE: firmware/mock_hardware/include/avr32/adc_200.h
  type avr32_adc_cr_t (line 753) | typedef struct avr32_adc_cr_t {
  type avr32_adc_mr_t (line 761) | typedef struct avr32_adc_mr_t {
  type avr32_adc_cher_t (line 776) | typedef struct avr32_adc_cher_t {
  type avr32_adc_chdr_t (line 790) | typedef struct avr32_adc_chdr_t {
  type avr32_adc_chsr_t (line 804) | typedef struct avr32_adc_chsr_t {
  type avr32_adc_sr_t (line 818) | typedef struct avr32_adc_sr_t {
  type avr32_adc_lcdr_t (line 844) | typedef struct avr32_adc_lcdr_t {
  type avr32_adc_ier_t (line 851) | typedef struct avr32_adc_ier_t {
  type avr32_adc_idr_t (line 877) | typedef struct avr32_adc_idr_t {
  type avr32_adc_imr_t (line 903) | typedef struct avr32_adc_imr_t {
  type avr32_adc_cdr0_t (line 929) | typedef struct avr32_adc_cdr0_t {
  type avr32_adc_cdr1_t (line 936) | typedef struct avr32_adc_cdr1_t {
  type avr32_adc_cdr2_t (line 943) | typedef struct avr32_adc_cdr2_t {
  type avr32_adc_cdr3_t (line 950) | typedef struct avr32_adc_cdr3_t {
  type avr32_adc_cdr4_t (line 957) | typedef struct avr32_adc_cdr4_t {
  type avr32_adc_cdr5_t (line 964) | typedef struct avr32_adc_cdr5_t {
  type avr32_adc_cdr6_t (line 971) | typedef struct avr32_adc_cdr6_t {
  type avr32_adc_cdr7_t (line 978) | typedef struct avr32_adc_cdr7_t {
  type avr32_adc_version_t (line 985) | typedef struct avr32_adc_version_t {
  type avr32_adc_t (line 994) | typedef struct avr32_adc_t {

FILE: firmware/mock_hardware/include/avr32/core_sc0_130.h
  type avr32_sr_t (line 1334) | typedef struct avr32_sr_t {
  type avr32_cpucr_t (line 1361) | typedef struct avr32_cpucr_t {
  type avr32_config0_t (line 1372) | typedef struct avr32_config0_t {
  type avr32_config1_t (line 1390) | typedef struct avr32_config1_t {
  type avr32_mpuar0_t (line 1403) | typedef struct avr32_mpuar0_t {
  type avr32_mpuar1_t (line 1412) | typedef struct avr32_mpuar1_t {
  type avr32_mpuar2_t (line 1421) | typedef struct avr32_mpuar2_t {
  type avr32_mpuar3_t (line 1430) | typedef struct avr32_mpuar3_t {
  type avr32_mpuar4_t (line 1439) | typedef struct avr32_mpuar4_t {
  type avr32_mpuar5_t (line 1448) | typedef struct avr32_mpuar5_t {
  type avr32_mpuar6_t (line 1457) | typedef struct avr32_mpuar6_t {
  type avr32_mpuar7_t (line 1466) | typedef struct avr32_mpuar7_t {
  type avr32_mpupsr0_t (line 1475) | typedef struct avr32_mpupsr0_t {
  type avr32_mpupsr1_t (line 1497) | typedef struct avr32_mpupsr1_t {
  type avr32_mpupsr2_t (line 1519) | typedef struct avr32_mpupsr2_t {
  type avr32_mpupsr3_t (line 1541) | typedef struct avr32_mpupsr3_t {
  type avr32_mpupsr4_t (line 1563) | typedef struct avr32_mpupsr4_t {
  type avr32_mpupsr5_t (line 1585) | typedef struct avr32_mpupsr5_t {
  type avr32_mpupsr6_t (line 1607) | typedef struct avr32_mpupsr6_t {
  type avr32_mpupsr7_t (line 1629) | typedef struct avr32_mpupsr7_t {
  type avr32_mpucra_t (line 1651) | typedef struct avr32_mpucra_t {
  type avr32_mpucrb_t (line 1665) | typedef struct avr32_mpucrb_t {
  type avr32_mpubra_t (line 1679) | typedef struct avr32_mpubra_t {
  type avr32_mpubrb_t (line 1693) | typedef struct avr32_mpubrb_t {
  type avr32_mpuapra_t (line 1707) | typedef struct avr32_mpuapra_t {
  type avr32_mpuaprb_t (line 1720) | typedef struct avr32_mpuaprb_t {
  type avr32_mpucr_t (line 1733) | typedef struct avr32_mpucr_t {

FILE: firmware/mock_hardware/include/avr32/eic_230.h
  type avr32_eic_ier_t (line 671) | typedef struct avr32_eic_ier_t {
  type avr32_eic_idr_t (line 686) | typedef struct avr32_eic_idr_t {
  type avr32_eic_imr_t (line 701) | typedef struct avr32_eic_imr_t {
  type avr32_eic_isr_t (line 716) | typedef struct avr32_eic_isr_t {
  type avr32_eic_icr_t (line 731) | typedef struct avr32_eic_icr_t {
  type avr32_eic_mode_t (line 746) | typedef struct avr32_eic_mode_t {
  type avr32_eic_edge_t (line 761) | typedef struct avr32_eic_edge_t {
  type avr32_eic_level_t (line 776) | typedef struct avr32_eic_level_t {
  type avr32_eic_filter_t (line 791) | typedef struct avr32_eic_filter_t {
  type avr32_eic_test_t (line 806) | typedef struct avr32_eic_test_t {
  type avr32_eic_async_t (line 822) | typedef struct avr32_eic_async_t {
  type avr32_eic_scan_t (line 837) | typedef struct avr32_eic_scan_t {
  type avr32_eic_en_t (line 848) | typedef struct avr32_eic_en_t {
  type avr32_eic_dis_t (line 863) | typedef struct avr32_eic_dis_t {
  type avr32_eic_ctrl_t (line 878) | typedef struct avr32_eic_ctrl_t {
  type avr32_eic_t (line 893) | typedef struct avr32_eic_t {

FILE: firmware/mock_hardware/include/avr32/flashc_200.h
  type avr32_flashc_fcr_t (line 757) | typedef struct avr32_flashc_fcr_t {
  type avr32_flashc_fcmd_t (line 769) | typedef struct avr32_flashc_fcmd_t {
  type avr32_flashc_fsr_t (line 778) | typedef struct avr32_flashc_fsr_t {
  type avr32_flashc_fgpfrhi_t (line 807) | typedef struct avr32_flashc_fgpfrhi_t {
  type avr32_flashc_fgpfrlo_t (line 844) | typedef struct avr32_flashc_fgpfrlo_t {
  type avr32_flashc_t (line 879) | typedef struct avr32_flashc_t {

FILE: firmware/mock_hardware/include/avr32/freqm_230.h
  type avr32_freqm_ctrl_t (line 212) | typedef struct avr32_freqm_ctrl_t {
  type avr32_freqm_mode_t (line 219) | typedef struct avr32_freqm_mode_t {
  type avr32_freqm_status_t (line 229) | typedef struct avr32_freqm_status_t {
  type avr32_freqm_value_t (line 236) | typedef struct avr32_freqm_value_t {
  type avr32_freqm_ier_t (line 243) | typedef struct avr32_freqm_ier_t {
  type avr32_freqm_idr_t (line 250) | typedef struct avr32_freqm_idr_t {
  type avr32_freqm_imr_t (line 257) | typedef struct avr32_freqm_imr_t {
  type avr32_freqm_isr_t (line 264) | typedef struct avr32_freqm_isr_t {
  type avr32_freqm_icr_t (line 271) | typedef struct avr32_freqm_icr_t {
  type avr32_freqm_t (line 278) | typedef struct avr32_freqm_t {

FILE: firmware/mock_hardware/include/avr32/gpio_110.h
  type avr32_gpio_local_port_t (line 130) | typedef struct avr32_gpio_local_port_t {
  type avr32_gpio_local_t (line 198) | typedef struct avr32_gpio_local_t {
  type avr32_gpio_port_t (line 204) | typedef struct avr32_gpio_port_t {
  type avr32_gpio_t (line 272) | typedef struct avr32_gpio_t {

FILE: firmware/mock_hardware/include/avr32/hmatrix_230.h
  type avr32_hmatrix_mcfg_t (line 1976) | typedef struct avr32_hmatrix_mcfg_t {
  type avr32_hmatrix_scfg_t (line 1983) | typedef struct avr32_hmatrix_scfg_t {
  type avr32_hmatrix_pras_t (line 1995) | typedef struct avr32_hmatrix_pras_t {
  type avr32_hmatrix_prbs_t (line 2008) | typedef struct avr32_hmatrix_prbs_t {
  type avr32_hmatrix_mrcr_t (line 2021) | typedef struct avr32_hmatrix_mrcr_t {
  type avr32_hmatrix_version_t (line 2043) | typedef struct avr32_hmatrix_version_t {
  type avr32_hmatrix_prs_t (line 2051) | typedef struct avr32_hmatrix_prs_t {
  type avr32_hmatrix_t (line 2063) | typedef struct avr32_hmatrix_t {

FILE: firmware/mock_hardware/include/avr32/intc_101.h
  type avr32_intc_ipr_t (line 114) | typedef struct avr32_intc_ipr_t {
  type avr32_intc_icr_t (line 122) | typedef struct avr32_intc_icr_t {
  type avr32_intc_t (line 129) | typedef struct avr32_intc_t {

FILE: firmware/mock_hardware/include/avr32/ocd_s0_130.h
  type avr32_did_t (line 603) | typedef struct avr32_did_t {
  type avr32_dc_t (line 612) | typedef struct avr32_dc_t {
  type avr32_ds_t (line 636) | typedef struct avr32_ds_t {
  type avr32_wt_t (line 656) | typedef struct avr32_wt_t {
  type avr32_dtc_t (line 666) | typedef struct avr32_dtc_t {
  type avr32_bwc0a_t (line 676) | typedef struct avr32_bwc0a_t {
  type avr32_bwc0b_t (line 687) | typedef struct avr32_bwc0b_t {
  type avr32_bwc1a_t (line 696) | typedef struct avr32_bwc1a_t {
  type avr32_bwc1b_t (line 707) | typedef struct avr32_bwc1b_t {
  type avr32_bwc2a_t (line 716) | typedef struct avr32_bwc2a_t {
  type avr32_bwc2b_t (line 727) | typedef struct avr32_bwc2b_t {
  type avr32_bwc3a_t (line 736) | typedef struct avr32_bwc3a_t {
  type avr32_bwc3b_t (line 752) | typedef struct avr32_bwc3b_t {
  type avr32_nxcfg_t (line 768) | typedef struct avr32_nxcfg_t {
  type avr32_dcsr_t (line 786) | typedef struct avr32_dcsr_t {
  type avr32_axc_t (line 794) | typedef struct avr32_axc_t {

FILE: firmware/mock_hardware/include/avr32/pdca_102.h
  type avr32_pdca_psr_t (line 232) | typedef struct avr32_pdca_psr_t {
  type avr32_pdca_tcr_t (line 239) | typedef struct avr32_pdca_tcr_t {
  type avr32_pdca_tcrr_t (line 246) | typedef struct avr32_pdca_tcrr_t {
  type avr32_pdca_cr_t (line 253) | typedef struct avr32_pdca_cr_t {
  type avr32_pdca_mr_t (line 263) | typedef struct avr32_pdca_mr_t {
  type avr32_pdca_sr_t (line 270) | typedef struct avr32_pdca_sr_t {
  type avr32_pdca_ier_t (line 277) | typedef struct avr32_pdca_ier_t {
  type avr32_pdca_idr_t (line 286) | typedef struct avr32_pdca_idr_t {
  type avr32_pdca_imr_t (line 295) | typedef struct avr32_pdca_imr_t {
  type avr32_pdca_isr_t (line 304) | typedef struct avr32_pdca_isr_t {
  type avr32_pdca_channel_t (line 312) | typedef struct avr32_pdca_channel_t {
  type avr32_pdca_t (line 362) | typedef struct avr32_pdca_t {

FILE: firmware/mock_hardware/include/avr32/pm_230.h
  type avr32_pm_mcctrl_t (line 865) | typedef struct avr32_pm_mcctrl_t {
  type avr32_pm_cksel_t (line 874) | typedef struct avr32_pm_cksel_t {
  type avr32_pm_pll_t (line 891) | typedef struct avr32_pm_pll_t {
  type avr32_pm_oscctrl0_t (line 908) | typedef struct avr32_pm_oscctrl0_t {
  type avr32_pm_oscctrl1_t (line 917) | typedef struct avr32_pm_oscctrl1_t {
  type avr32_pm_oscctrl32_t (line 926) | typedef struct avr32_pm_oscctrl32_t {
  type avr32_pm_ier_t (line 937) | typedef struct avr32_pm_ier_t {
  type avr32_pm_idr_t (line 953) | typedef struct avr32_pm_idr_t {
  type avr32_pm_imr_t (line 969) | typedef struct avr32_pm_imr_t {
  type avr32_pm_isr_t (line 985) | typedef struct avr32_pm_isr_t {
  type avr32_pm_icr_t (line 1001) | typedef struct avr32_pm_icr_t {
  type avr32_pm_poscsr_t (line 1017) | typedef struct avr32_pm_poscsr_t {
  type avr32_pm_gcctrl_t (line 1035) | typedef struct avr32_pm_gcctrl_t {
  type avr32_pm_rccr_t (line 1048) | typedef struct avr32_pm_rccr_t {
  type avr32_pm_bgcr_t (line 1058) | typedef struct avr32_pm_bgcr_t {
  type avr32_pm_vregcr_t (line 1068) | typedef struct avr32_pm_vregcr_t {
  type avr32_pm_bod_t (line 1078) | typedef struct avr32_pm_bod_t {
  type avr32_pm_rcause_t (line 1091) | typedef struct avr32_pm_rcause_t {
  type avr32_pm_awen_t (line 1107) | typedef struct avr32_pm_awen_t {
  type avr32_pm_t (line 1114) | typedef struct avr32_pm_t {

FILE: firmware/mock_hardware/include/avr32/pwm_130.h
  type avr32_pwm_mr_t (line 514) | typedef struct avr32_pwm_mr_t {
  type avr32_pwm_ena_t (line 525) | typedef struct avr32_pwm_ena_t {
  type avr32_pwm_dis_t (line 538) | typedef struct avr32_pwm_dis_t {
  type avr32_pwm_sr_t (line 551) | typedef struct avr32_pwm_sr_t {
  type avr32_pwm_ier_t (line 564) | typedef struct avr32_pwm_ier_t {
  type avr32_pwm_idr_t (line 577) | typedef struct avr32_pwm_idr_t {
  type avr32_pwm_imr_t (line 590) | typedef struct avr32_pwm_imr_t {
  type avr32_pwm_isr_t (line 603) | typedef struct avr32_pwm_isr_t {
  type avr32_pwm_version_t (line 616) | typedef struct avr32_pwm_version_t {
  type avr32_pwm_cmr_t (line 625) | typedef struct avr32_pwm_cmr_t {
  type avr32_pwm_channel_t (line 635) | typedef struct avr32_pwm_channel_t {
  type avr32_pwm_t (line 650) | typedef struct avr32_pwm_t {

FILE: firmware/mock_hardware/include/avr32/rtc_230.h
  type avr32_rtc_ctrl_t (line 174) | typedef struct avr32_rtc_ctrl_t {
  type avr32_rtc_ier_t (line 189) | typedef struct avr32_rtc_ier_t {
  type avr32_rtc_idr_t (line 196) | typedef struct avr32_rtc_idr_t {
  type avr32_rtc_imr_t (line 203) | typedef struct avr32_rtc_imr_t {
  type avr32_rtc_isr_t (line 210) | typedef struct avr32_rtc_isr_t {
  type avr32_rtc_icr_t (line 217) | typedef struct avr32_rtc_icr_t {
  type avr32_rtc_t (line 224) | typedef struct avr32_rtc_t {

FILE: firmware/mock_hardware/include/avr32/spi_199.h
  type avr32_spi_cr_t (line 641) | typedef struct avr32_spi_cr_t {
  type avr32_spi_mr_t (line 653) | typedef struct avr32_spi_mr_t {
  type avr32_spi_rdr_t (line 669) | typedef struct avr32_spi_rdr_t {
  type avr32_spi_tdr_t (line 677) | typedef struct avr32_spi_tdr_t {
  type avr32_spi_sr_t (line 687) | typedef struct avr32_spi_sr_t {
  type avr32_spi_ier_t (line 705) | typedef struct avr32_spi_ier_t {
  type avr32_spi_idr_t (line 721) | typedef struct avr32_spi_idr_t {
  type avr32_spi_imr_t (line 737) | typedef struct avr32_spi_imr_t {
  type avr32_spi_csr0_t (line 753) | typedef struct avr32_spi_csr0_t {
  type avr32_spi_csr1_t (line 766) | typedef struct avr32_spi_csr1_t {
  type avr32_spi_csr2_t (line 779) | typedef struct avr32_spi_csr2_t {
  type avr32_spi_csr3_t (line 792) | typedef struct avr32_spi_csr3_t {
  type avr32_spi_version_t (line 805) | typedef struct avr32_spi_version_t {
  type avr32_spi_t (line 814) | typedef struct avr32_spi_t {

FILE: firmware/mock_hardware/include/avr32/ssc_310.h
  type avr32_ssc_cr_t (line 740) | typedef struct avr32_ssc_cr_t {
  type avr32_ssc_cmr_t (line 753) | typedef struct avr32_ssc_cmr_t {
  type avr32_ssc_rcmr_t (line 760) | typedef struct avr32_ssc_rcmr_t {
  type avr32_ssc_rfmr_t (line 774) | typedef struct avr32_ssc_rfmr_t {
  type avr32_ssc_tcmr_t (line 791) | typedef struct avr32_ssc_tcmr_t {
  type avr32_ssc_tfmr_t (line 804) | typedef struct avr32_ssc_tfmr_t {
  type avr32_ssc_rshr_t (line 821) | typedef struct avr32_ssc_rshr_t {
  type avr32_ssc_tshr_t (line 828) | typedef struct avr32_ssc_tshr_t {
  type avr32_ssc_rc0r_t (line 835) | typedef struct avr32_ssc_rc0r_t {
  type avr32_ssc_rc1r_t (line 842) | typedef struct avr32_ssc_rc1r_t {
  type avr32_ssc_sr_t (line 849) | typedef struct avr32_ssc_sr_t {
  type avr32_ssc_ier_t (line 870) | typedef struct avr32_ssc_ier_t {
  type avr32_ssc_idr_t (line 888) | typedef struct avr32_ssc_idr_t {
  type avr32_ssc_imr_t (line 906) | typedef struct avr32_ssc_imr_t {
  type avr32_ssc_version_t (line 924) | typedef struct avr32_ssc_version_t {
  type avr32_ssc_t (line 933) | typedef struct avr32_ssc_t {

FILE: firmware/mock_hardware/include/avr32/tc_222.h
  type avr32_tc_ccr_t (line 1464) | typedef struct avr32_tc_ccr_t {
  type avr32_tc_cmr_t (line 1473) | typedef union avr32_tc_cmr_t {
  type avr32_tc_cv_t (line 1513) | typedef struct avr32_tc_cv_t {
  type avr32_tc_ra_t (line 1520) | typedef struct avr32_tc_ra_t {
  type avr32_tc_rb_t (line 1527) | typedef struct avr32_tc_rb_t {
  type avr32_tc_rc_t (line 1534) | typedef struct avr32_tc_rc_t {
  type avr32_tc_sr_t (line 1541) | typedef struct avr32_tc_sr_t {
  type avr32_tc_ier_t (line 1559) | typedef struct avr32_tc_ier_t {
  type avr32_tc_idr_t (line 1573) | typedef struct avr32_tc_idr_t {
  type avr32_tc_imr_t (line 1587) | typedef struct avr32_tc_imr_t {
  type avr32_tc_bcr_t (line 1601) | typedef struct avr32_tc_bcr_t {
  type avr32_tc_bmr_t (line 1608) | typedef struct avr32_tc_bmr_t {
  type avr32_tc_version_t (line 1617) | typedef struct avr32_tc_version_t {
  type avr32_tc_channel_t (line 1625) | typedef struct avr32_tc_channel_t {
  type avr32_tc_t (line 1675) | typedef struct avr32_tc_t {

FILE: firmware/mock_hardware/include/avr32/twi_211.h
  type avr32_twi_cr_t (line 521) | typedef struct avr32_twi_cr_t {
  type avr32_twi_mmr_t (line 535) | typedef struct avr32_twi_mmr_t {
  type avr32_twi_smr_t (line 547) | typedef struct avr32_twi_smr_t {
  type avr32_twi_iadr_t (line 555) | typedef struct avr32_twi_iadr_t {
  type avr32_twi_cwgr_t (line 562) | typedef struct avr32_twi_cwgr_t {
  type avr32_twi_sr_t (line 571) | typedef struct avr32_twi_sr_t {
  type avr32_twi_ier_t (line 593) | typedef struct avr32_twi_ier_t {
  type avr32_twi_idr_t (line 615) | typedef struct avr32_twi_idr_t {
  type avr32_twi_imr_t (line 637) | typedef struct avr32_twi_imr_t {
  type avr32_twi_rhr_t (line 659) | typedef struct avr32_twi_rhr_t {
  type avr32_twi_thr_t (line 666) | typedef struct avr32_twi_thr_t {
  type avr32_twi_t (line 673) | typedef struct avr32_twi_t {

FILE: firmware/mock_hardware/include/avr32/usart_400.h
  type avr32_usart_cr_t (line 1354) | typedef struct avr32_usart_cr_t {
  type avr32_usart_mr_t (line 1383) | typedef struct avr32_usart_mr_t {
  type avr32_usart_ier_t (line 1409) | typedef struct avr32_usart_ier_t {
  type avr32_usart_idr_t (line 1443) | typedef struct avr32_usart_idr_t {
  type avr32_usart_imr_t (line 1477) | typedef struct avr32_usart_imr_t {
  type avr32_usart_csr_t (line 1511) | typedef struct avr32_usart_csr_t {
  type avr32_usart_rhr_t (line 1548) | typedef struct avr32_usart_rhr_t {
  type avr32_usart_thr_t (line 1557) | typedef struct avr32_usart_thr_t {
  type avr32_usart_brgr_t (line 1566) | typedef struct avr32_usart_brgr_t {
  type avr32_usart_rtor_t (line 1574) | typedef struct avr32_usart_rtor_t {
  type avr32_usart_ttgr_t (line 1581) | typedef struct avr32_usart_ttgr_t {
  type avr32_usart_fidi_t (line 1588) | typedef struct avr32_usart_fidi_t {
  type avr32_usart_ner_t (line 1595) | typedef struct avr32_usart_ner_t {
  type avr32_usart_ifr_t (line 1602) | typedef struct avr32_usart_ifr_t {
  type avr32_usart_man_t (line 1609) | typedef struct avr32_usart_man_t {
  type avr32_usart_linmr_t (line 1628) | typedef struct avr32_usart_linmr_t {
  type avr32_usart_linir_t (line 1643) | typedef struct avr32_usart_linir_t {
  type avr32_usart_t (line 1650) | typedef struct avr32_usart_t {

FILE: firmware/mock_hardware/include/avr32/usbb_310.h
  type avr32_usbb_udcon_t (line 10218) | typedef struct avr32_usbb_udcon_t {
  type avr32_usbb_udint_t (line 10236) | typedef struct avr32_usbb_udint_t {
  type avr32_usbb_udintclr_t (line 10268) | typedef struct avr32_usbb_udintclr_t {
  type avr32_usbb_udintset_t (line 10282) | typedef struct avr32_usbb_udintset_t {
  type avr32_usbb_udinte_t (line 10303) | typedef struct avr32_usbb_udinte_t {
  type avr32_usbb_udinteclr_t (line 10332) | typedef struct avr32_usbb_udinteclr_t {
  type avr32_usbb_udinteset_t (line 10361) | typedef struct avr32_usbb_udinteset_t {
  type avr32_usbb_uerst_t (line 10390) | typedef struct avr32_usbb_uerst_t {
  type avr32_usbb_udfnum_t (line 10411) | typedef struct avr32_usbb_udfnum_t {
  type avr32_usbb_udtst1_t (line 10421) | typedef struct avr32_usbb_udtst1_t {
  type avr32_usbb_udtst2_t (line 10433) | typedef struct avr32_usbb_udtst2_t {
  type avr32_usbb_udfeatures_t (line 10446) | typedef struct avr32_usbb_udfeatures_t {
  type avr32_usbb_uecfg0_t (line 10473) | typedef struct avr32_usbb_uecfg0_t {
  type avr32_usbb_uecfg1_t (line 10490) | typedef struct avr32_usbb_uecfg1_t {
  type avr32_usbb_uecfg2_t (line 10507) | typedef struct avr32_usbb_uecfg2_t {
  type avr32_usbb_uecfg3_t (line 10524) | typedef struct avr32_usbb_uecfg3_t {
  type avr32_usbb_uecfg4_t (line 10541) | typedef struct avr32_usbb_uecfg4_t {
  type avr32_usbb_uecfg5_t (line 10558) | typedef struct avr32_usbb_uecfg5_t {
  type avr32_usbb_uecfg6_t (line 10575) | typedef struct avr32_usbb_uecfg6_t {
  type avr32_usbb_uesta0_t (line 10592) | typedef struct avr32_usbb_uesta0_t {
  type avr32_usbb_uesta1_t (line 10616) | typedef struct avr32_usbb_uesta1_t {
  type avr32_usbb_uesta2_t (line 10640) | typedef struct avr32_usbb_uesta2_t {
  type avr32_usbb_uesta3_t (line 10664) | typedef struct avr32_usbb_uesta3_t {
  type avr32_usbb_uesta4_t (line 10688) | typedef struct avr32_usbb_uesta4_t {
  type avr32_usbb_uesta5_t (line 10712) | typedef struct avr32_usbb_uesta5_t {
  type avr32_usbb_uesta6_t (line 10736) | typedef struct avr32_usbb_uesta6_t {
  type avr32_usbb_uesta0clr_t (line 10760) | typedef struct avr32_usbb_uesta0clr_t {
  type avr32_usbb_uesta1clr_t (line 10774) | typedef struct avr32_usbb_uesta1clr_t {
  type avr32_usbb_uesta2clr_t (line 10788) | typedef struct avr32_usbb_uesta2clr_t {
  type avr32_usbb_uesta3clr_t (line 10802) | typedef struct avr32_usbb_uesta3clr_t {
  type avr32_usbb_uesta4clr_t (line 10816) | typedef struct avr32_usbb_uesta4clr_t {
  type avr32_usbb_uesta5clr_t (line 10830) | typedef struct avr32_usbb_uesta5clr_t {
  type avr32_usbb_uesta6clr_t (line 10844) | typedef struct avr32_usbb_uesta6clr_t {
  type avr32_usbb_uesta0set_t (line 10858) | typedef struct avr32_usbb_uesta0set_t {
  type avr32_usbb_uesta1set_t (line 10877) | typedef struct avr32_usbb_uesta1set_t {
  type avr32_usbb_uesta2set_t (line 10896) | typedef struct avr32_usbb_uesta2set_t {
  type avr32_usbb_uesta3set_t (line 10915) | typedef struct avr32_usbb_uesta3set_t {
  type avr32_usbb_uesta4set_t (line 10934) | typedef struct avr32_usbb_uesta4set_t {
  type avr32_usbb_uesta5set_t (line 10953) | typedef struct avr32_usbb_uesta5set_t {
  type avr32_usbb_uesta6set_t (line 10972) | typedef struct avr32_usbb_uesta6set_t {
  type avr32_usbb_uecon0_t (line 10991) | typedef struct avr32_usbb_uecon0_t {
  type avr32_usbb_uecon1_t (line 11017) | typedef struct avr32_usbb_uecon1_t {
  type avr32_usbb_uecon2_t (line 11043) | typedef struct avr32_usbb_uecon2_t {
  type avr32_usbb_uecon3_t (line 11069) | typedef struct avr32_usbb_uecon3_t {
  type avr32_usbb_uecon4_t (line 11095) | typedef struct avr32_usbb_uecon4_t {
  type avr32_usbb_uecon5_t (line 11121) | typedef struct avr32_usbb_uecon5_t {
  type avr32_usbb_uecon6_t (line 11147) | typedef struct avr32_usbb_uecon6_t {
  type avr32_usbb_uecon0set_t (line 11173) | typedef struct avr32_usbb_uecon0set_t {
  type avr32_usbb_uecon1set_t (line 11198) | typedef struct avr32_usbb_uecon1set_t {
  type avr32_usbb_uecon2set_t (line 11223) | typedef struct avr32_usbb_uecon2set_t {
  type avr32_usbb_uecon3set_t (line 11248) | typedef struct avr32_usbb_uecon3set_t {
  type avr32_usbb_uecon4set_t (line 11273) | typedef struct avr32_usbb_uecon4set_t {
  type avr32_usbb_uecon5set_t (line 11298) | typedef struct avr32_usbb_uecon5set_t {
  type avr32_usbb_uecon6set_t (line 11323) | typedef struct avr32_usbb_uecon6set_t {
  type avr32_usbb_uecon0clr_t (line 11348) | typedef struct avr32_usbb_uecon0clr_t {
  type avr32_usbb_uecon1clr_t (line 11374) | typedef struct avr32_usbb_uecon1clr_t {
  type avr32_usbb_uecon2clr_t (line 11400) | typedef struct avr32_usbb_uecon2clr_t {
  type avr32_usbb_uecon3clr_t (line 11426) | typedef struct avr32_usbb_uecon3clr_t {
  type avr32_usbb_uecon4clr_t (line 11452) | typedef struct avr32_usbb_uecon4clr_t {
  type avr32_usbb_uecon5clr_t (line 11478) | typedef struct avr32_usbb_uecon5clr_t {
  type avr32_usbb_uecon6clr_t (line 11504) | typedef struct avr32_usbb_uecon6clr_t {
  type avr32_usbb_uddma1_nextdesc_t (line 11530) | typedef struct avr32_usbb_uddma1_nextdesc_t {
  type avr32_usbb_uddma1_control_t (line 11537) | typedef struct avr32_usbb_uddma1_control_t {
  type avr32_usbb_uddma1_status_t (line 11552) | typedef struct avr32_usbb_uddma1_status_t {
  type avr32_usbb_uddma2_nextdesc_t (line 11565) | typedef struct avr32_usbb_uddma2_nextdesc_t {
  type avr32_usbb_uddma2_control_t (line 11572) | typedef struct avr32_usbb_uddma2_control_t {
  type avr32_usbb_uddma2_status_t (line 11587) | typedef struct avr32_usbb_uddma2_status_t {
  type avr32_usbb_uddma3_nextdesc_t (line 11600) | typedef struct avr32_usbb_uddma3_nextdesc_t {
  type avr32_usbb_uddma3_control_t (line 11607) | typedef struct avr32_usbb_uddma3_control_t {
  type avr32_usbb_uddma3_status_t (line 11622) | typedef struct avr32_usbb_uddma3_status_t {
  type avr32_usbb_uddma4_nextdesc_t (line 11635) | typedef struct avr32_usbb_uddma4_nextdesc_t {
  type avr32_usbb_uddma4_control_t (line 11642) | typedef struct avr32_usbb_uddma4_control_t {
  type avr32_usbb_uddma4_status_t (line 11657) | typedef struct avr32_usbb_uddma4_status_t {
  type avr32_usbb_uddma5_nextdesc_t (line 11670) | typedef struct avr32_usbb_uddma5_nextdesc_t {
  type avr32_usbb_uddma5_control_t (line 11677) | typedef struct avr32_usbb_uddma5_control_t {
  type avr32_usbb_uddma5_status_t (line 11692) | typedef struct avr32_usbb_uddma5_status_t {
  type avr32_usbb_uddma6_nextdesc_t (line 11705) | typedef struct avr32_usbb_uddma6_nextdesc_t {
  type avr32_usbb_uddma6_control_t (line 11712) | typedef struct avr32_usbb_uddma6_control_t {
  type avr32_usbb_uddma6_status_t (line 11727) | typedef struct avr32_usbb_uddma6_status_t {
  type avr32_usbb_uhcon_t (line 11740) | typedef struct avr32_usbb_uhcon_t {
  type avr32_usbb_uhint_t (line 11752) | typedef struct avr32_usbb_uhint_t {
  type avr32_usbb_uhintclr_t (line 11780) | typedef struct avr32_usbb_uhintclr_t {
  type avr32_usbb_uhintset_t (line 11793) | typedef struct avr32_usbb_uhintset_t {
  type avr32_usbb_uhinte_t (line 11813) | typedef struct avr32_usbb_uhinte_t {
  type avr32_usbb_uhinteclr_t (line 11841) | typedef struct avr32_usbb_uhinteclr_t {
  type avr32_usbb_uhinteset_t (line 11869) | typedef struct avr32_usbb_uhinteset_t {
  type avr32_usbb_uprst_t (line 11897) | typedef struct avr32_usbb_uprst_t {
  type avr32_usbb_uhfnum_t (line 11918) | typedef struct avr32_usbb_uhfnum_t {
  type avr32_usbb_uhaddr1_t (line 11928) | typedef struct avr32_usbb_uhaddr1_t {
  type avr32_usbb_uhaddr2_t (line 11941) | typedef struct avr32_usbb_uhaddr2_t {
  type avr32_usbb_uhaddr3_t (line 11954) | typedef struct avr32_usbb_uhaddr3_t {
  type avr32_usbb_upcfg0_t (line 11967) | typedef struct avr32_usbb_upcfg0_t {
  type avr32_usbb_upcfg1_t (line 11987) | typedef struct avr32_usbb_upcfg1_t {
  type avr32_usbb_upcfg2_t (line 12007) | typedef struct avr32_usbb_upcfg2_t {
  type avr32_usbb_upcfg3_t (line 12027) | typedef struct avr32_usbb_upcfg3_t {
  type avr32_usbb_upcfg4_t (line 12047) | typedef struct avr32_usbb_upcfg4_t {
  type avr32_usbb_upcfg5_t (line 12067) | typedef struct avr32_usbb_upcfg5_t {
  type avr32_usbb_upcfg6_t (line 12087) | typedef struct avr32_usbb_upcfg6_t {
  type avr32_usbb_upsta0_t (line 12107) | typedef struct avr32_usbb_upsta0_t {
  type avr32_usbb_upsta1_t (line 12130) | typedef struct avr32_usbb_upsta1_t {
  type avr32_usbb_upsta2_t (line 12153) | typedef struct avr32_usbb_upsta2_t {
  type avr32_usbb_upsta3_t (line 12176) | typedef struct avr32_usbb_upsta3_t {
  type avr32_usbb_upsta4_t (line 12199) | typedef struct avr32_usbb_upsta4_t {
  type avr32_usbb_upsta5_t (line 12222) | typedef struct avr32_usbb_upsta5_t {
  type avr32_usbb_upsta6_t (line 12245) | typedef struct avr32_usbb_upsta6_t {
  type avr32_usbb_upsta0clr_t (line 12268) | typedef struct avr32_usbb_upsta0clr_t {
  type avr32_usbb_upsta1clr_t (line 12282) | typedef struct avr32_usbb_upsta1clr_t {
  type avr32_usbb_upsta2clr_t (line 12296) | typedef struct avr32_usbb_upsta2clr_t {
  type avr32_usbb_upsta3clr_t (line 12310) | typedef struct avr32_usbb_upsta3clr_t {
  type avr32_usbb_upsta4clr_t (line 12324) | typedef struct avr32_usbb_upsta4clr_t {
  type avr32_usbb_upsta5clr_t (line 12338) | typedef struct avr32_usbb_upsta5clr_t {
  type avr32_usbb_upsta6clr_t (line 12352) | typedef struct avr32_usbb_upsta6clr_t {
  type avr32_usbb_upsta0set_t (line 12366) | typedef struct avr32_usbb_upsta0set_t {
  type avr32_usbb_upsta1set_t (line 12382) | typedef struct avr32_usbb_upsta1set_t {
  type avr32_usbb_upsta2set_t (line 12398) | typedef struct avr32_usbb_upsta2set_t {
  type avr32_usbb_upsta3set_t (line 12414) | typedef struct avr32_usbb_upsta3set_t {
  type avr32_usbb_upsta4set_t (line 12430) | typedef struct avr32_usbb_upsta4set_t {
  type avr32_usbb_upsta5set_t (line 12446) | typedef struct avr32_usbb_upsta5set_t {
  type avr32_usbb_upsta6set_t (line 12462) | typedef struct avr32_usbb_upsta6set_t {
  type avr32_usbb_upcon0_t (line 12478) | typedef struct avr32_usbb_upcon0_t {
  type avr32_usbb_upcon1_t (line 12500) | typedef struct avr32_usbb_upcon1_t {
  type avr32_usbb_upcon2_t (line 12522) | typedef struct avr32_usbb_upcon2_t {
  type avr32_usbb_upcon3_t (line 12544) | typedef struct avr32_usbb_upcon3_t {
  type avr32_usbb_upcon4_t (line 12566) | typedef struct avr32_usbb_upcon4_t {
  type avr32_usbb_upcon5_t (line 12588) | typedef struct avr32_usbb_upcon5_t {
  type avr32_usbb_upcon6_t (line 12610) | typedef struct avr32_usbb_upcon6_t {
  type avr32_usbb_upcon0set_t (line 12632) | typedef struct avr32_usbb_upcon0set_t {
  type avr32_usbb_upcon1set_t (line 12652) | typedef struct avr32_usbb_upcon1set_t {
  type avr32_usbb_upcon2set_t (line 12672) | typedef struct avr32_usbb_upcon2set_t {
  type avr32_usbb_upcon3set_t (line 12692) | typedef struct avr32_usbb_upcon3set_t {
  type avr32_usbb_upcon4set_t (line 12712) | typedef struct avr32_usbb_upcon4set_t {
  type avr32_usbb_upcon5set_t (line 12732) | typedef struct avr32_usbb_upcon5set_t {
  type avr32_usbb_upcon6set_t (line 12752) | typedef struct avr32_usbb_upcon6set_t {
  type avr32_usbb_upcon0clr_t (line 12772) | typedef struct avr32_usbb_upcon0clr_t {
  type avr32_usbb_upcon1clr_t (line 12793) | typedef struct avr32_usbb_upcon1clr_t {
  type avr32_usbb_upcon2clr_t (line 12814) | typedef struct avr32_usbb_upcon2clr_t {
  type avr32_usbb_upcon3clr_t (line 12835) | typedef struct avr32_usbb_upcon3clr_t {
  type avr32_usbb_upcon4clr_t (line 12856) | typedef struct avr32_usbb_upcon4clr_t {
  type avr32_usbb_upcon5clr_t (line 12877) | typedef struct avr32_usbb_upcon5clr_t {
  type avr32_usbb_upcon6clr_t (line 12898) | typedef struct avr32_usbb_upcon6clr_t {
  type avr32_usbb_upinrq0_t (line 12919) | typedef struct avr32_usbb_upinrq0_t {
  type avr32_usbb_upinrq1_t (line 12927) | typedef struct avr32_usbb_upinrq1_t {
  type avr32_usbb_upinrq2_t (line 12935) | typedef struct avr32_usbb_upinrq2_t {
  type avr32_usbb_upinrq3_t (line 12943) | typedef struct avr32_usbb_upinrq3_t {
  type avr32_usbb_upinrq4_t (line 12951) | typedef struct avr32_usbb_upinrq4_t {
  type avr32_usbb_upinrq5_t (line 12959) | typedef struct avr32_usbb_upinrq5_t {
  type avr32_usbb_upinrq6_t (line 12967) | typedef struct avr32_usbb_upinrq6_t {
  type avr32_usbb_uperr0_t (line 12975) | typedef struct avr32_usbb_uperr0_t {
  type avr32_usbb_uperr1_t (line 12987) | typedef struct avr32_usbb_uperr1_t {
  type avr32_usbb_uperr2_t (line 12999) | typedef struct avr32_usbb_uperr2_t {
  type avr32_usbb_uperr3_t (line 13011) | typedef struct avr32_usbb_uperr3_t {
  type avr32_usbb_uperr4_t (line 13023) | typedef struct avr32_usbb_uperr4_t {
  type avr32_usbb_uperr5_t (line 13035) | typedef struct avr32_usbb_uperr5_t {
  type avr32_usbb_uperr6_t (line 13047) | typedef struct avr32_usbb_uperr6_t {
  type avr32_usbb_uhdma1_nextdesc_t (line 13059) | typedef struct avr32_usbb_uhdma1_nextdesc_t {
  type avr32_usbb_uhdma1_control_t (line 13066) | typedef struct avr32_usbb_uhdma1_control_t {
  type avr32_usbb_uhdma1_status_t (line 13081) | typedef struct avr32_usbb_uhdma1_status_t {
  type avr32_usbb_uhdma2_nextdesc_t (line 13094) | typedef struct avr32_usbb_uhdma2_nextdesc_t {
  type avr32_usbb_uhdma2_control_t (line 13101) | typedef struct avr32_usbb_uhdma2_control_t {
  type avr32_usbb_uhdma2_status_t (line 13116) | typedef struct avr32_usbb_uhdma2_status_t {
  type avr32_usbb_uhdma3_nextdesc_t (line 13129) | typedef struct avr32_usbb_uhdma3_nextdesc_t {
  type avr32_usbb_uhdma3_control_t (line 13136) | typedef struct avr32_usbb_uhdma3_control_t {
  type avr32_usbb_uhdma3_status_t (line 13151) | typedef struct avr32_usbb_uhdma3_status_t {
  type avr32_usbb_uhdma4_nextdesc_t (line 13164) | typedef struct avr32_usbb_uhdma4_nextdesc_t {
  type avr32_usbb_uhdma4_control_t (line 13171) | typedef struct avr32_usbb_uhdma4_control_t {
  type avr32_usbb_uhdma4_status_t (line 13186) | typedef struct avr32_usbb_uhdma4_status_t {
  type avr32_usbb_uhdma5_nextdesc_t (line 13199) | typedef struct avr32_usbb_uhdma5_nextdesc_t {
  type avr32_usbb_uhdma5_control_t (line 13206) | typedef struct avr32_usbb_uhdma5_control_t {
  type avr32_usbb_uhdma5_status_t (line 13221) | typedef struct avr32_usbb_uhdma5_status_t {
  type avr32_usbb_uhdma6_nextdesc_t (line 13234) | typedef struct avr32_usbb_uhdma6_nextdesc_t {
  type avr32_usbb_uhdma6_control_t (line 13241) | typedef struct avr32_usbb_uhdma6_control_t {
  type avr32_usbb_uhdma6_status_t (line 13256) | typedef struct avr32_usbb_uhdma6_status_t {
  type avr32_usbb_usbcon_t (line 13269) | typedef struct avr32_usbb_usbcon_t {
  type avr32_usbb_usbsta_t (line 13298) | typedef struct avr32_usbb_usbsta_t {
  type avr32_usbb_usbstaclr_t (line 13318) | typedef struct avr32_usbb_usbstaclr_t {
  type avr32_usbb_usbstaset_t (line 13334) | typedef struct avr32_usbb_usbstaset_t {
  type avr32_usbb_uatst1_t (line 13350) | typedef struct avr32_usbb_uatst1_t {
  type avr32_usbb_uatst2_t (line 13362) | typedef struct avr32_usbb_uatst2_t {
  type avr32_usbb_uvers_t (line 13377) | typedef struct avr32_usbb_uvers_t {
  type avr32_usbb_ufeatures_t (line 13385) | typedef struct avr32_usbb_ufeatures_t {
  type avr32_usbb_usbfsm_t (line 13412) | typedef struct avr32_usbb_usbfsm_t {
  type avr32_usbb_t (line 13419) | typedef struct avr32_usbb_t {

FILE: firmware/mock_hardware/include/avr32/wdt_230.h
  type avr32_wdt_ctrl_t (line 102) | typedef struct avr32_wdt_ctrl_t {
  type avr32_wdt_t (line 112) | typedef struct avr32_wdt_t {

FILE: firmware/mock_hardware/include/compiler.h
  type S8 (line 18) | typedef int8_t S8;
  type U8 (line 19) | typedef uint8_t U8;
  type S16 (line 20) | typedef int16_t S16;
  type U16 (line 21) | typedef uint16_t U16;
  type le16_t (line 22) | typedef uint16_t le16_t;
  type be16_t (line 23) | typedef uint16_t be16_t;
  type S32 (line 24) | typedef int32_t S32;
  type U32 (line 25) | typedef uint32_t U32;
  type le32_t (line 26) | typedef uint32_t le32_t;
  type be32_t (line 27) | typedef uint32_t be32_t;
  type S64 (line 28) | typedef signed long long int S64;
  type U64 (line 29) | typedef unsigned long long int U64;
  type F32 (line 30) | typedef float F32;
  type F64 (line 31) | typedef double F64;
  type iram_size_t (line 32) | typedef uint32_t iram_size_t;
  type Status_bool_t (line 38) | typedef bool Status_bool_t;
  type U8 (line 39) | typedef U8 Status_t;
  type Union16 (line 47) | typedef union
  type Union32 (line 56) | typedef union
  type Union64 (line 67) | typedef union
  type UnionPtr (line 80) | typedef union
  type UnionVPtr (line 93) | typedef union
  type UnionCPtr (line 106) | typedef union
  type UnionCVPtr (line 119) | typedef union
  type StructPtr (line 132) | typedef struct
  type StructVPtr (line 145) | typedef struct
  type StructCPtr (line 158) | typedef struct
  type StructCVPtr (line 171) | typedef struct

FILE: firmware/mock_hardware/include/print_funcs.h
  function print_dbg (line 9) | static inline void print_dbg(const char* str) { fprintf(stderr, "%s", st...
  function print_dbg_char (line 10) | static inline void print_dbg_char(int c) { fprintf(stderr, "%d", c); }
  function print_dbg_ulong (line 11) | static inline void print_dbg_ulong(unsigned long n) { fprintf(stderr, "%...
  function print_dbg_char_hex (line 12) | static inline void print_dbg_char_hex(unsigned char n) { fprintf(stderr,...
  function print_dbg_short_hex (line 13) | static inline void print_dbg_short_hex(unsigned short n) { fprintf(stder...
  function print_dbg_hex (line 14) | static inline void print_dbg_hex(unsigned long n) { fprintf(stderr, "%lx...
  function print_dbg (line 16) | static inline void print_dbg(const char* str) { }
  function print_dbg_char (line 17) | static inline void print_dbg_char(int c) { }
  function print_dbg_ulong (line 18) | static inline void print_dbg_ulong(unsigned long n) { }
  function print_dbg_char_hex (line 19) | static inline void print_dbg_char_hex(unsigned char n) { }
  function print_dbg_short_hex (line 20) | static inline void print_dbg_short_hex(unsigned short n) { }
  function print_dbg_hex (line 21) | static inline void print_dbg_hex(unsigned long n) { }

FILE: firmware/mock_hardware/include/spi.h
  type spi_status_t (line 1) | typedef enum {

FILE: firmware/mock_hardware/include/usb_protocol.h
  type usb_reqid (line 113) | enum usb_reqid
  type usb_device_status (line 132) | enum usb_device_status
  type usb_interface_status (line 143) | enum usb_interface_status
  type usb_endpoint_status (line 152) | enum usb_endpoint_status
  type usb_device_feature (line 162) | enum usb_device_feature
  type usb_device_hs_test_mode (line 176) | enum usb_device_hs_test_mode
  type usb_endpoint_feature (line 188) | enum usb_endpoint_feature
  type usb_test_mode_selector (line 196) | enum usb_test_mode_selector
  type usb_descriptor_type (line 208) | enum usb_descriptor_type
  type usb_capability_type (line 227) | enum usb_capability_type
  type usb_capability_extension_attr (line 236) | enum usb_capability_extension_attr
  type usb_ep_type (line 270) | enum usb_ep_type
  type usb_langid (line 282) | enum usb_langid
  type usb_add_t (line 293) | typedef uint8_t usb_add_t;
  type usb_ep_t (line 306) | typedef uint8_t usb_ep_t;
  type usb_setup_req_t (line 326) | typedef struct
  type usb_dev_desc_t (line 338) | typedef struct
  type usb_dev_qual_desc_t (line 364) | typedef struct
  type usb_dev_bos_desc_t (line 389) | typedef struct
  type usb_dev_capa_ext_desc_t (line 402) | typedef struct
  type usb_dev_lpm_desc_t (line 415) | typedef struct
  type usb_association_desc_t (line 424) | typedef struct
  type usb_conf_desc_t (line 439) | typedef struct
  type usb_iad_desc_t (line 461) | typedef struct
  type usb_iface_desc_t (line 476) | typedef struct
  type usb_ep_desc_t (line 492) | typedef struct
  type usb_str_desc_t (line 505) | typedef struct
  type usb_str_lgid_desc_t (line 511) | typedef struct

FILE: firmware/mock_hardware/mock_hardware_api.c
  function hardware_hidMessage (line 46) | void hardware_hidMessage(uint8_t key, uint8_t mod, bool held, bool release)
  function hardware_hidConnect (line 51) | void hardware_hidConnect()
  function hardware_hidDisconnect (line 58) | void hardware_hidDisconnect()
  function initialize_serial (line 65) | void initialize_serial()
  function hardware_init (line 71) | void hardware_init()
  function hardware_step (line 78) | void hardware_step()
  function hardware_triggerInterrupt (line 84) | void hardware_triggerInterrupt(int interrupt)
  function hardware_getGPIO (line 89) | bool hardware_getGPIO(uint32_t pin)
  function hardware_setGPIO (line 98) | void hardware_setGPIO(uint32_t pin, bool value)
  function hardware_getADC (line 119) | uint16_t hardware_getADC(int channel)
  function hardware_setADC (line 124) | void hardware_setADC(int channel, uint16_t value)
  function hardware_getDAC (line 129) | uint16_t hardware_getDAC(int channel)
  function hardware_setDAC (line 134) | void hardware_setDAC(int channel, uint16_t value)
  function hardware_postEvent (line 139) | void hardware_postEvent(uint32_t type, uint32_t data)
  function hardware_serialConnectionChange (line 147) | void hardware_serialConnectionChange(bool connected, uint8_t type, uint8...
  function hardware_readSerial (line 152) | int hardware_readSerial(uint8_t** pbuf, uint8_t* pcount)
  function hardware_writeSerial_internal (line 160) | int hardware_writeSerial_internal(uint8_t* buf, uint8_t byteCount)
  function hardware_readSerial_internal (line 168) | int hardware_readSerial_internal(uint8_t** pbuf, uint8_t* pcount)
  function hardware_writeSerial (line 176) | int hardware_writeSerial(uint8_t* buf, uint8_t byteCount)
  function hardware_declareNVRAM (line 184) | void hardware_declareNVRAM(void* ptr, uint32_t size)
  function hardware_readNVRAM (line 190) | void hardware_readNVRAM(void** ptr, uint32_t* size)
  function hardware_writeNVRAM (line 196) | void hardware_writeNVRAM(const void* src, uint32_t size)
  function hardware_declareVRAM (line 201) | void hardware_declareVRAM(void* ptr, uint32_t size)
  function hardware_readVRAM (line 207) | void hardware_readVRAM(void** ptr, uint32_t* size)
  function hardware_writeVRAM (line 221) | void hardware_writeVRAM(const void* src, uint32_t size)
  function hardware_getScreenBuffer (line 227) | void hardware_getScreenBuffer(uint8_t** ptr, uint16_t* width, uint16_t* ...
  function hardware_setScreenBuffer (line 236) | void hardware_setScreenBuffer(uint8_t* buf)
  function hardware_iiUpdateFollowerData (line 244) | void hardware_iiUpdateFollowerData(uint8_t device, uint8_t param, uint16...
  function hardware_iiGetFollowerData (line 255) | uint16_t hardware_iiGetFollowerData(uint8_t device, uint8_t param)
  type iiMessage (line 270) | typedef struct
  function hardware_iiPushMessage (line 280) | bool hardware_iiPushMessage(uint8_t addr, uint8_t* data, uint8_t length)
  function hardware_iiPopMessage (line 292) | bool hardware_iiPopMessage(uint8_t* addr, uint8_t* data, uint8_t* length)

FILE: firmware/mock_hardware/mock_interrupt.c
  function u64 (line 21) | u64 get_ticks(void)
  function simulate_tc_interrupt (line 26) | void simulate_tc_interrupt()
  function simulate_clock_normal_interrupt (line 42) | void simulate_clock_normal_interrupt()
  function simulate_external_clock_interrupt (line 50) | void simulate_external_clock_interrupt()
  function simulate_front_button_interrupt (line 58) | void simulate_front_button_interrupt()
  function mock_gpio_interrupt (line 66) | void mock_gpio_interrupt(int pin)
  function simulate_ansible_tr_interrupt (line 74) | void simulate_ansible_tr_interrupt(int pin, int offset)
  function mock_interrupt (line 83) | void mock_interrupt(int interrupt)

FILE: firmware/mock_hardware/mock_serial.c
  type eMonomeProtocol (line 11) | typedef enum
  type monomeDesc (line 20) | typedef struct e_monomeDesc
  function u8 (line 42) | u8 mock_serial_connected()
  function mock_serial_read (line 47) | void mock_serial_read(void)
  function mock_serial_write (line 55) | void mock_serial_write(u8* data, u32 bytes)
  function u8 (line 60) | volatile u8 mock_serial_tx_busy()
  function u8 (line 65) | volatile u8 mock_serial_rx_busy()
  function u8 (line 70) | u8* mock_serial_rx_buf(void)
  function u8 (line 75) | volatile u8 mock_serial_rx_bytes(void)
  function setup_mock_serial (line 80) | void setup_mock_serial()
  function mock_monome_serial_setup (line 91) | void mock_monome_serial_setup(bool connected, uint8_t type, uint8_t prot...

FILE: firmware/mock_hardware/modules/ansible/adapter_ansible.c
  function hid_parse_frame (line 12) | void hid_parse_frame(u8* data, u8 sz)
  function process_keypress (line 16) | void process_keypress(uint8_t key, uint8_t mod_key, bool is_held_key)
  function hardware_serializePreset (line 20) | void hardware_serializePreset(tt_serializer_t* stream, uint8_t preset_num)
  function hardware_deserializePreset (line 24) | void hardware_deserializePreset(tt_deserializer_t* stream, uint8_t prese...
  function hardware_beforeReadVRAM (line 31) | void hardware_beforeReadVRAM(void* ptr, uint32_t size)
  function hardware_afterWriteVRAM (line 41) | void hardware_afterWriteVRAM(void* ptr, uint32_t size)
  function hardware_afterInit (line 51) | void hardware_afterInit()
  function hardware_afterStep (line 55) | void hardware_afterStep()
  function hardware_getVersion (line 59) | void hardware_getVersion(char* buffer)
  function hardware_getClockPeriod (line 64) | double hardware_getClockPeriod()

FILE: firmware/mock_hardware/modules/ansible/ansible_usb_disk.c
  function usb_disk_lock (line 32) | static bool usb_disk_lock(void)
  function usb_disk_unlock (line 43) | static void usb_disk_unlock(void)
  function handler_UsbDiskKey (line 52) | static void handler_UsbDiskKey(int32_t data)
  function handler_UsbDiskFront (line 56) | static void handler_UsbDiskFront(s32 data)
  function blink_read (line 60) | static void blink_read(void* o)
  function blink_write (line 64) | static void blink_write(void* o)
  function set_mode_usb_disk (line 68) | void set_mode_usb_disk(void)
  function usb_disk_enter (line 72) | bool usb_disk_enter()
  function usb_disk_exit (line 76) | void usb_disk_exit()
  function usb_disk_skip_apps (line 80) | void usb_disk_skip_apps(bool skip)
  function usb_disk_select_app (line 84) | void usb_disk_select_app(ansible_mode_t mode)
  function gets_chunks (line 88) | size_t gets_chunks(char* dst, size_t len)
  function copy_chunks (line 93) | static void copy_chunks(char* dst, const char* src, size_t len)
  function flush (line 100) | static void flush(void)
  function puts_buffered (line 104) | void puts_buffered(const char* src, size_t len)
  function usb_disk_mount_drive (line 108) | static bool usb_disk_mount_drive(void)
  function usb_disk_backup_binary (line 112) | static bool usb_disk_backup_binary(FS_STRING fname)
  function usb_disk_restore_backup (line 116) | static bool usb_disk_restore_backup(FS_STRING fname)
  function usb_disk_load_flash (line 120) | static bool usb_disk_load_flash(FS_STRING fname)
  function usb_disk_save_flash (line 124) | static bool usb_disk_save_flash(FS_STRING fname)

FILE: firmware/mock_hardware/modules/teletype/adapter_teletype.c
  function clock_null (line 25) | void clock_null(uint8_t phase) { }
  function tele_usb_disk (line 30) | void tele_usb_disk() { }
  function u8 (line 32) | extern u8 get_revision(void)
  function hardware_serializePreset (line 37) | void hardware_serializePreset(tt_serializer_t* stream, uint8_t preset_num)
  function fake_flash_read (line 59) | void fake_flash_read(scene_state_t* src_scene, scene_state_t* dest_scene,
  function fake_do_preset_read (line 104) | void fake_do_preset_read(scene_state_t* src_scene, scene_state_t* dest_s...
  function hardware_deserializePreset (line 120) | void hardware_deserializePreset(tt_deserializer_t* stream, uint8_t prese...
  function calibrate_adc (line 159) | void calibrate_adc()
  function hardware_beforeReadVRAM (line 168) | void hardware_beforeReadVRAM(void* ptr, uint32_t size)
  function hardware_afterWriteVRAM (line 173) | void hardware_afterWriteVRAM(void* ptr, uint32_t size)
  function hardware_afterInit (line 185) | void hardware_afterInit()
  function hardware_afterStep (line 193) | void hardware_afterStep()
  function hardware_getVersion (line 203) | void hardware_getVersion(char* buffer)
  function hardware_getClockPeriod (line 208) | double hardware_getClockPeriod()

FILE: firmware/mock_hardware/modules/teletype/usb_disk_mode.c
  function handler_usb_PollADC (line 3) | void handler_usb_PollADC(int32_t data) {
  function handler_usb_Front (line 6) | void handler_usb_Front(int32_t data) {
  function handler_usb_ScreenRefresh (line 9) | void handler_usb_ScreenRefresh(int32_t data) {

FILE: firmware/mock_hardware/modules/trilogy/adapter_trilogy.c
  function clock_null (line 8) | void clock_null(uint8_t phase) { }
  function hid_parse_frame (line 13) | void hid_parse_frame(u8* data, u8 sz)
  function process_keypress (line 17) | void process_keypress(uint8_t key, uint8_t mod_key, bool is_held_key)
  function hardware_serializePreset (line 21) | void hardware_serializePreset(tt_serializer_t* stream, uint8_t preset_num)
  function hardware_deserializePreset (line 25) | void hardware_deserializePreset(tt_deserializer_t* stream, uint8_t prese...
  function hardware_beforeReadVRAM (line 29) | void hardware_beforeReadVRAM(void* ptr, uint32_t size)
  function hardware_afterWriteVRAM (line 33) | void hardware_afterWriteVRAM(void* ptr, uint32_t size)
  function hardware_afterInit (line 37) | void hardware_afterInit()
  function hardware_afterStep (line 41) | void hardware_afterStep()
  function hardware_getVersion (line 49) | void hardware_getVersion(char* buffer)
  function hardware_getClockPeriod (line 54) | double hardware_getClockPeriod()

FILE: lib/base64/base64.cpp
  function is_base64 (line 41) | static inline bool is_base64(unsigned char c) {
  function base64_encode (line 45) | std::string base64_encode(unsigned char const* bytes_to_encode, unsigned...
  function base64_decode (line 87) | std::string base64_decode(std::string const& encoded_string) {

FILE: lib/cbbq/cbbq.h
  type cbbq (line 73) | typedef struct
  function queue_init (line 82) | void queue_init(cbbq* q, uint32_t size)
  function queue_free (line 96) | void queue_free(cbbq* q)
  type QueueResult (line 104) | typedef enum
  function QueueResult (line 114) | QueueResult
  function QueueResult (line 175) | QueueResult

FILE: lib/cbbq/test/cbbq_test.c
  function main (line 21) | int main(void)

FILE: lib/cbbq/test/cbbq_utils.h
  function queue_display (line 7) | void queue_display(cbbq* q)

FILE: lib/oscpack/ip/IpEndpointName.h
  function class (line 41) | class IpEndpointName{

FILE: lib/oscpack/ip/NetworkingUtils.h
  function class (line 45) | class NetworkInitializer{

FILE: lib/oscpack/ip/PacketListener.h
  function class (line 43) | class PacketListener{

FILE: lib/oscpack/ip/TimerListener.h
  function class (line 41) | class TimerListener{

FILE: lib/oscpack/ip/UdpSocket.h
  function class (line 51) | class SocketReceiveMultiplexer{
  function class (line 79) | class UdpSocket{
  function class (line 137) | class UdpTransmitSocket : public UdpSocket{
  function class (line 144) | class UdpReceiveSocket : public UdpSocket{
  function class (line 154) | class UdpListeningReceiveSocket : public UdpSocket{

FILE: lib/oscpack/ip/posix/NetworkingUtils.cpp
  function GetHostByName (line 52) | unsigned long GetHostByName( const char *name )

FILE: lib/oscpack/ip/posix/UdpSocket.cpp
  function SockaddrFromIpEndpointName (line 70) | static void SockaddrFromIpEndpointName( struct sockaddr_in& sockAddr, co...
  function IpEndpointName (line 87) | static IpEndpointName IpEndpointNameFromSockaddr( const struct sockaddr_...
  class UdpSocket::Implementation (line 100) | class UdpSocket::Implementation{
    type sockaddr_in (line 105) | struct sockaddr_in
    type sockaddr_in (line 106) | struct sockaddr_in
    method Implementation (line 110) | Implementation()
    method SetEnableBroadcast (line 128) | void SetEnableBroadcast( bool enableBroadcast )
    method SetAllowReuse (line 134) | void SetAllowReuse( bool allowReuse )
    method IpEndpointName (line 146) | IpEndpointName LocalEndpointFor( const IpEndpointName& remoteEndpoint ...
    method Connect (line 191) | void Connect( const IpEndpointName& remoteEndpoint )
    method Send (line 202) | void Send( const char *data, std::size_t size )
    method SendTo (line 209) | void SendTo( const IpEndpointName& remoteEndpoint, const char *data, s...
    method Bind (line 217) | void Bind( const IpEndpointName& localEndpoint )
    method IsBound (line 229) | bool IsBound() const { return isBound_; }
    method ReceiveFrom (line 231) | std::size_t ReceiveFrom( IpEndpointName& remoteEndpoint, char *data, s...
    method Socket (line 249) | int Socket() { return socket_; }
  function IpEndpointName (line 272) | IpEndpointName UdpSocket::LocalEndpointFor( const IpEndpointName& remote...
  type AttachedTimerListener (line 308) | struct AttachedTimerListener{
    method AttachedTimerListener (line 309) | AttachedTimerListener( int id, int p, TimerListener *tl )
  function CompareScheduledTimerCalls (line 319) | static bool CompareScheduledTimerCalls(
  function InterruptSignalHandler (line 329) | void InterruptSignalHandler( int )
  class SocketReceiveMultiplexer::Implementation (line 336) | class SocketReceiveMultiplexer::Implementation{
    method GetCurrentTimeMs (line 343) | double GetCurrentTimeMs() const
    method Implementation (line 353) | Implementation()
    method AttachSocketListener (line 365) | void AttachSocketListener( UdpSocket *socket, PacketListener *listener )
    method DetachSocketListener (line 372) | void DetachSocketListener( UdpSocket *socket, PacketListener *listener )
    method AttachPeriodicTimerListener (line 381) | void AttachPeriodicTimerListener( int periodMilliseconds, TimerListene...
    method AttachPeriodicTimerListener (line 386) | void AttachPeriodicTimerListener( int initialDelayMilliseconds, int pe...
    method DetachPeriodicTimerListener (line 391) | void DetachPeriodicTimerListener( TimerListener *listener )
    method Run (line 405) | void Run()
    method Break (line 527) | void Break()
    method AsynchronousBreak (line 532) | void AsynchronousBreak()

FILE: lib/oscpack/ip/win32/NetworkingUtils.cpp
  function GetHostByName (line 81) | unsigned long GetHostByName( const char *name )

FILE: lib/oscpack/ip/win32/UdpSocket.cpp
  function SockaddrFromIpEndpointName (line 64) | static void SockaddrFromIpEndpointName( struct sockaddr_in& sockAddr, co...
  function IpEndpointName (line 81) | static IpEndpointName IpEndpointNameFromSockaddr( const struct sockaddr_...
  class UdpSocket::Implementation (line 94) | class UdpSocket::Implementation{
    type sockaddr_in (line 101) | struct sockaddr_in
    type sockaddr_in (line 102) | struct sockaddr_in
    method Implementation (line 106) | Implementation()
    method SetEnableBroadcast (line 124) | void SetEnableBroadcast( bool enableBroadcast )
    method SetAllowReuse (line 130) | void SetAllowReuse( bool allowReuse )
    method IpEndpointName (line 140) | IpEndpointName LocalEndpointFor( const IpEndpointName& remoteEndpoint ...
    method Connect (line 184) | void Connect( const IpEndpointName& remoteEndpoint )
    method Send (line 195) | void Send( const char *data, std::size_t size )
    method SendTo (line 202) | void SendTo( const IpEndpointName& remoteEndpoint, const char *data, s...
    method Bind (line 210) | void Bind( const IpEndpointName& localEndpoint )
    method IsBound (line 222) | bool IsBound() const { return isBound_; }
    method ReceiveFrom (line 224) | std::size_t ReceiveFrom( IpEndpointName& remoteEndpoint, char *data, s...
    method SOCKET (line 242) | SOCKET& Socket() { return socket_; }
  function IpEndpointName (line 265) | IpEndpointName UdpSocket::LocalEndpointFor( const IpEndpointName& remote...
  type AttachedTimerListener (line 301) | struct AttachedTimerListener{
    method AttachedTimerListener (line 302) | AttachedTimerListener( int id, int p, TimerListener *tl )
  function CompareScheduledTimerCalls (line 312) | static bool CompareScheduledTimerCalls(
  function InterruptSignalHandler (line 322) | void InterruptSignalHandler( int )
  class SocketReceiveMultiplexer::Implementation (line 331) | class SocketReceiveMultiplexer::Implementation{
    method GetCurrentTimeMs (line 340) | double GetCurrentTimeMs() const
    method Implementation (line 350) | Implementation()
    method AttachSocketListener (line 360) | void AttachSocketListener( UdpSocket *socket, PacketListener *listener )
    method DetachSocketListener (line 367) | void DetachSocketListener( UdpSocket *socket, PacketListener *listener )
    method AttachPeriodicTimerListener (line 376) | void AttachPeriodicTimerListener( int periodMilliseconds, TimerListene...
    method AttachPeriodicTimerListener (line 381) | void AttachPeriodicTimerListener( int initialDelayMilliseconds, int pe...
    method DetachPeriodicTimerListener (line 386) | void DetachPeriodicTimerListener( TimerListener *listener )
    method Run (line 400) | void Run()
    method Break (line 494) | void Break()
    method AsynchronousBreak (line 499) | void AsynchronousBreak()

FILE: lib/oscpack/osc/MessageMappingOscPacketListener.h
  function namespace (line 47) | namespace osc{

FILE: lib/oscpack/osc/OscException.h
  function namespace (line 42) | namespace osc

FILE: lib/oscpack/osc/OscOutboundPacketStream.cpp
  type std (line 53) | namespace std {
  type osc (line 58) | namespace osc{
    function FromInt32 (line 60) | static void FromInt32( char *p, int32 x )
    function FromUInt32 (line 80) | static void FromUInt32( char *p, uint32 x )
    function FromInt64 (line 100) | static void FromInt64( char *p, int64 x )
    function FromUInt64 (line 124) | static void FromUInt64( char *p, uint64 x )
    function RoundUp4 (line 149) | static inline std::size_t RoundUp4( std::size_t x )
    function OutboundPacketStream (line 320) | OutboundPacketStream& OutboundPacketStream::operator<<( const BundleIn...
    function OutboundPacketStream (line 339) | OutboundPacketStream& OutboundPacketStream::operator<<( const BundleTe...
    function OutboundPacketStream (line 354) | OutboundPacketStream& OutboundPacketStream::operator<<( const BeginMes...
    function OutboundPacketStream (line 383) | OutboundPacketStream& OutboundPacketStream::operator<<( const MessageT...
    function OutboundPacketStream (line 436) | OutboundPacketStream& OutboundPacketStream::operator<<( bool rhs )
    function OutboundPacketStream (line 446) | OutboundPacketStream& OutboundPacketStream::operator<<( const NilType&...
    function OutboundPacketStream (line 457) | OutboundPacketStream& OutboundPacketStream::operator<<( const Infinitu...
    function OutboundPacketStream (line 468) | OutboundPacketStream& OutboundPacketStream::operator<<( int32 rhs )
    function OutboundPacketStream (line 480) | OutboundPacketStream& OutboundPacketStream::operator<<( float rhs )
    function OutboundPacketStream (line 508) | OutboundPacketStream& OutboundPacketStream::operator<<( char rhs )
    function OutboundPacketStream (line 520) | OutboundPacketStream& OutboundPacketStream::operator<<( const RgbaColo...
    function OutboundPacketStream (line 532) | OutboundPacketStream& OutboundPacketStream::operator<<( const MidiMess...
    function OutboundPacketStream (line 544) | OutboundPacketStream& OutboundPacketStream::operator<<( int64 rhs )
    function OutboundPacketStream (line 556) | OutboundPacketStream& OutboundPacketStream::operator<<( const TimeTag&...
    function OutboundPacketStream (line 568) | OutboundPacketStream& OutboundPacketStream::operator<<( double rhs )
    function OutboundPacketStream (line 600) | OutboundPacketStream& OutboundPacketStream::operator<<( const char *rhs )
    function OutboundPacketStream (line 620) | OutboundPacketStream& OutboundPacketStream::operator<<( const Symbol& ...
    function OutboundPacketStream (line 640) | OutboundPacketStream& OutboundPacketStream::operator<<( const Blob& rhs )
    function OutboundPacketStream (line 661) | OutboundPacketStream& OutboundPacketStream::operator<<( const ArrayIni...
    function OutboundPacketStream (line 671) | OutboundPacketStream& OutboundPacketStream::operator<<( const ArrayTer...

FILE: lib/oscpack/osc/OscOutboundPacketStream.h
  function namespace (line 46) | namespace osc{

FILE: lib/oscpack/osc/OscPacketListener.h
  function namespace (line 43) | namespace osc

FILE: lib/oscpack/osc/OscPrintReceivedElements.cpp
  type std (line 45) | namespace std {
  type osc (line 50) | namespace osc{

FILE: lib/oscpack/osc/OscPrintReceivedElements.h
  function namespace (line 45) | namespace osc{

FILE: lib/oscpack/osc/OscReceivedElements.cpp
  type osc (line 43) | namespace osc
    function uint32 (line 85) | static inline uint32 RoundUp4(uint32 x)
    function int32 (line 90) | static inline int32 ToInt32(const char* p)
    function uint32 (line 109) | static inline uint32 ToUInt32(const char* p)
    function int64 (line 128) | static inline int64 ToInt64(const char* p)
    function uint64 (line 151) | static inline uint64 ToUInt64(const char* p)
    function osc_bundle_element_size_t (line 188) | osc_bundle_element_size_t ReceivedBundleElement::Size() const
    function int32 (line 217) | int32 ReceivedMessageArgument::AsInt32() const
    function int32 (line 227) | int32 ReceivedMessageArgument::AsInt32Unchecked() const
    function uint32 (line 290) | uint32 ReceivedMessageArgument::AsRgbaColor() const
    function uint32 (line 300) | uint32 ReceivedMessageArgument::AsRgbaColorUnchecked() const
    function uint32 (line 305) | uint32 ReceivedMessageArgument::AsMidiMessage() const
    function uint32 (line 315) | uint32 ReceivedMessageArgument::AsMidiMessageUnchecked() const
    function int64 (line 320) | int64 ReceivedMessageArgument::AsInt64() const
    function int64 (line 330) | int64 ReceivedMessageArgument::AsInt64Unchecked() const
    function uint64 (line 335) | uint64 ReceivedMessageArgument::AsTimeTag() const
    function uint64 (line 345) | uint64 ReceivedMessageArgument::AsTimeTagUnchecked() const
    function uint32 (line 551) | uint32 ReceivedMessage::AddressPatternAsUInt32() const
    function uint64 (line 766) | uint64 ReceivedBundle::TimeTag() const

FILE: lib/oscpack/osc/OscReceivedElements.h
  function namespace (line 48) | namespace osc{
  function class (line 142) | class ReceivedBundleElement{
  function class (line 160) | class ReceivedBundleElementIterator{
  function Advance (line 188) | void Advance() { value_.sizePtr_ = value_.Contents() + value_.Size(); }
  function IsEqualTo (line 190) | bool IsEqualTo( const ReceivedBundleElementIterator& rhs ) const
  function class (line 209) | class ReceivedMessageArgument{
  function class (line 287) | class ReceivedMessageArgumentIterator{
  function IsEqualTo (line 317) | bool IsEqualTo( const ReceivedMessageArgumentIterator& rhs ) const
  function class (line 336) | class ReceivedMessageArgumentStream{
  function class (line 474) | class ReceivedMessage{
  function class (line 516) | class ReceivedBundle{

FILE: lib/oscpack/osc/OscTypes.cpp
  type osc (line 39) | namespace osc{

FILE: lib/oscpack/osc/OscTypes.h
  function namespace (line 42) | namespace osc
  type BundleTerminator (line 149) | struct BundleTerminator
  type BeginMessage (line 155) | struct BeginMessage
  type MessageTerminator (line 164) | struct MessageTerminator
  type NilType (line 173) | struct NilType
  type InfinitumType (line 183) | struct InfinitumType
  type RgbaColor (line 189) | struct RgbaColor
  type MidiMessage (line 201) | struct MidiMessage
  type TimeTag (line 213) | struct TimeTag
  type Symbol (line 225) | struct Symbol
  function operator (line 234) | operator const char*() const { return value; }
  type Blob (line 237) | struct Blob
  type ArrayInitiator (line 249) | struct ArrayInitiator
  type ArrayTerminator (line 255) | struct ArrayTerminator

FILE: lib/serialosc/MonomeDevice.h
  type MonomeProtocol (line 6) | typedef enum {
  type MonomeDevice (line 12) | struct MonomeDevice

FILE: lib/serialosc/SerialOsc.h
  function class (line 16) | class SerialOsc

FILE: lib/simple-svg/main_1.0.0.cpp
  function main (line 39) | int main()

FILE: lib/simple-svg/simple_svg_1.0.0.hpp
  type svg (line 42) | namespace svg
    function attribute (line 46) | inline std::string attribute(std::string const & attribute_name,
    function elemStart (line 53) | inline std::string elemStart(std::string const & element_name)
    function elemEnd (line 57) | inline std::string elemEnd(std::string const & element_name)
    function emptyElemEnd (line 61) | inline std::string emptyElemEnd()
    class optional (line 70) | class optional
      method T (line 76) | T * operator->()
    type Dimensions (line 91) | struct Dimensions
      method Dimensions (line 93) | Dimensions(double width, double height) : width(width), height(heigh...
      method Dimensions (line 94) | Dimensions(double combined = 0) : width(combined), height(combined) { }
    type Point (line 99) | struct Point
      method Point (line 101) | Point(double x = 0, double y = 0) : x(x), y(y) { }
    function getMinPoint (line 105) | inline optional<Point> getMinPoint(std::vector<Point> const & points)
    function getMaxPoint (line 119) | inline optional<Point> getMaxPoint(std::vector<Point> const & points)
    type Layout (line 135) | struct Layout
      type Origin (line 137) | enum Origin { TopLeft, BottomLeft, TopRight, BottomRight }
      method Layout (line 139) | Layout(Dimensions const & dimensions = Dimensions(400, 300), Origin ...
    function translateX (line 149) | inline double translateX(double x, Layout const & layout)
    function translateY (line 157) | inline double translateY(double y, Layout const & layout)
    function translateScale (line 164) | inline double translateScale(double dimension, Layout const & layout)
    class Serializeable (line 169) | class Serializeable
      method Serializeable (line 172) | Serializeable() { }
    class Color (line 177) | class Color : public Serializeable
      type Defaults (line 180) | enum Defaults { Transparent = -1, Aqua, Black, Blue, Brown, Cyan, Fu...
      method Color (line 183) | Color(int r, int g, int b) : transparent(false), red(r), green(g), b...
      method Color (line 184) | Color(Defaults color)
      method toString (line 208) | std::string toString(Layout const &) const
      method assign (line 223) | void assign(int r, int g, int b)
    class Fill (line 231) | class Fill : public Serializeable
      method Fill (line 234) | Fill(Color::Defaults color) : color(color) { }
      method Fill (line 235) | Fill(Color color = Color::Transparent)
      method toString (line 237) | std::string toString(Layout const & layout) const
    class Stroke (line 247) | class Stroke : public Serializeable
      method Stroke (line 250) | Stroke(double width = -1, Color color = Color::Transparent, bool non...
      method toString (line 252) | std::string toString(Layout const & layout) const
    class Font (line 270) | class Font : public Serializeable
      method Font (line 273) | Font(double size = 12, std::string const & family = "Verdana") : siz...
      method toString (line 274) | std::string toString(Layout const & layout) const
    class Shape (line 285) | class Shape : public Serializeable
      method Shape (line 288) | Shape(Fill const & fill = Fill(), Stroke const & stroke = Stroke())
    function vectorToString (line 298) | inline std::string vectorToString(std::vector<T> collection, Layout co...
    class Circle (line 307) | class Circle : public Shape
      method Circle (line 310) | Circle(Point const & center, double diameter, Fill const & fill,
      method toString (line 313) | std::string toString(Layout const & layout) const
      method offset (line 322) | void offset(Point const & offset)
    class Elipse (line 332) | class Elipse : public Shape
      method Elipse (line 335) | Elipse(Point const & center, double width, double height,
      method toString (line 339) | std::string toString(Layout const & layout) const
      method offset (line 349) | void offset(Point const & offset)
    class Rectangle (line 360) | class Rectangle : public Shape
      method Rectangle (line 363) | Rectangle(Point const & edge, double width, double height,
      method toString (line 367) | std::string toString(Layout const & layout) const
      method offset (line 377) | void offset(Point const & offset)
    class Line (line 388) | class Line : public Shape
      method Line (line 391) | Line(Point const & start_point, Point const & end_point,
      method toString (line 395) | std::string toString(Layout const & layout) const
      method offset (line 405) | void offset(Point const & offset)
    class Polygon (line 418) | class Polygon : public Shape
      method Polygon (line 421) | Polygon(Fill const & fill = Fill(), Stroke const & stroke = Stroke())
      method Polygon (line 423) | Polygon(Stroke const & stroke = Stroke()) : Shape(Color::Transparent...
      method Polygon (line 424) | Polygon & operator<<(Point const & point)
      method toString (line 429) | std::string toString(Layout const & layout) const
      method offset (line 442) | void offset(Point const & offset)
    class Path (line 453) | class Path : public Shape
      method Path (line 456) | Path(Fill const & fill = Fill(), Stroke const & stroke = Stroke())
      method Path (line 459) | Path(Stroke const & stroke = Stroke()) : Shape(Color::Transparent, s...
      method Path (line 461) | Path & operator<<(Point const & point)
      method startNewSubPath (line 467) | void startNewSubPath()
      method toString (line 473) | std::string toString(Layout const & layout) const
      method offset (line 496) | void offset(Point const & offset)
    class Polyline (line 509) | class Polyline : public Shape
      method Polyline (line 512) | Polyline(Fill const & fill = Fill(), Stroke const & stroke = Stroke())
      method Polyline (line 514) | Polyline(Stroke const & stroke = Stroke()) : Shape(Color::Transparen...
      method Polyline (line 515) | Polyline(std::vector<Point> const & points,
      method Polyline (line 518) | Polyline & operator<<(Point const & point)
      method toString (line 523) | std::string toString(Layout const & layout) const
      method offset (line 536) | void offset(Point const & offset)
    class Text (line 546) | class Text : public Shape
      method Text (line 549) | Text(Point const & origin, std::string const & content, Fill const &...
      method toString (line 552) | std::string toString(Layout const & layout) const
      method offset (line 561) | void offset(Point const & offset)
    class LineChart (line 573) | class LineChart : public Shape
      method LineChart (line 576) | LineChart(Dimensions margin = Dimensions(), double scale = 1,
      method LineChart (line 579) | LineChart & operator<<(Polyline const & polyline)
      method toString (line 587) | std::string toString(Layout const & layout) const
      method offset (line 598) | void offset(Point const & offset)
      method getDimensions (line 614) | optional<Dimensions> getDimensions() const
      method axisString (line 634) | std::string axisString(Layout const & layout) const
      method polylineToString (line 651) | std::string polylineToString(Polyline const & polyline, Layout const...
    class Document (line 664) | class Document
      method Document (line 667) | Document() {}
      method Document (line 668) | Document(std::string const & file_name, Layout layout = Layout())
      method Document (line 671) | Document & operator<<(Shape const & shape)
      method toString (line 676) | std::string toString() const
      method save (line 682) | bool save() const
      method writeToStream (line 693) | void writeToStream(std::ostream& str) const

FILE: src/ansible/AnsibleModule.hpp
  type AnsibleModule (line 8) | struct AnsibleModule : LibAVR32Module
    type ParamIds (line 10) | enum ParamIds
    type InputIds (line 19) | enum InputIds
    type OutputIds (line 26) | enum OutputIds
    type LightIds (line 39) | enum LightIds
    method AnsibleModule (line 56) | AnsibleModule()
    method processInputs (line 78) | void processInputs(const ProcessArgs& args) override
    method processOutputs (line 120) | void processOutputs(const ProcessArgs& args) override

FILE: src/ansible/AnsibleWidget.hpp
  type AnsibleWidget (line 11) | struct AnsibleWidget : LibAVR32ModuleWidget
    method AnsibleWidget (line 13) | AnsibleWidget(AnsibleModule* module)

FILE: src/common/core/FirmwareManager.cpp
  type FirmwareManagerImpl (line 66) | struct FirmwareManagerImpl
    method FirmwareManagerImpl (line 84) | FirmwareManagerImpl()
    method load (line 108) | bool load(std::string firmwareName)

FILE: src/common/core/FirmwareManager.hpp
  type FirmwareManager (line 14) | struct FirmwareManager
    type FirmwareManagerImpl (line 36) | struct FirmwareManagerImpl

FILE: src/common/core/GridConnection/GridConnection.cpp
  function GridConnectionManager (line 172) | GridConnectionManager& GridConnectionManager::get()

FILE: src/common/core/GridConnection/GridConnection.hpp
  type SerialOscInterface (line 8) | struct SerialOscInterface
  type Grid (line 10) | struct Grid
  type IGridConsumer (line 21) | struct IGridConsumer
  type GridConnectionManager (line 34) | struct GridConnectionManager final
    method GridConnectionManager (line 56) | GridConnectionManager() = default;
    method GridConnectionManager (line 58) | GridConnectionManager(const GridConnectionManager&) = delete;
    method GridConnectionManager (line 59) | GridConnectionManager& operator=(const GridConnectionManager&) = delete;
    method GridConnectionManager (line 60) | GridConnectionManager(GridConnectionManager&&) = delete;
    method GridConnectionManager (line 61) | GridConnectionManager&& operator=(const GridConnectionManager&&) = del...

FILE: src/common/core/GridConnection/GridConnectionMenu.cpp
  type ConnectGridItem (line 6) | struct ConnectGridItem : rack::ui::MenuItem
    method onAction (line 12) | void onAction(const rack::event::Action& e) override
  function menuUserReacquireGrid (line 26) | void menuUserReacquireGrid(IGridConsumer* consumer, std::string lastDevi...
  function appendDeviceConnectionMenu (line 43) | void appendDeviceConnectionMenu(rack::Menu* menu, IGridConsumer* consume...

FILE: src/common/core/GridConnection/GridConsumerBase.cpp
  function Grid (line 54) | Grid* GridConsumerBase::gridGetDevice()

FILE: src/common/core/GridConnection/GridConsumerBase.hpp
  type GridConsumerBase (line 6) | struct GridConsumerBase : public IGridConsumer

FILE: src/common/core/GridConnection/SerialOscGrid.cpp
  function MonomeDevice (line 9) | const MonomeDevice& SerialOscGrid::getDevice()

FILE: src/common/core/GridConnection/SerialOscGrid.hpp
  type SerialOscGrid (line 6) | struct SerialOscGrid : Grid
    method isHardware (line 16) | bool isHardware() override { return true; }

FILE: src/common/core/GridConnection/SerialOscInterface.cpp
  function SerialOscInterface (line 60) | SerialOscInterface* SerialOscInterface::get()

FILE: src/common/core/GridConnection/SerialOscInterface.hpp
  type SerialOscInterface (line 3) | struct SerialOscInterface final : public SerialOsc::Listener
    method SerialOscInterface (line 23) | SerialOscInterface(const SerialOscInterface&) = delete;
    method SerialOscInterface (line 24) | SerialOscInterface& operator=(const SerialOscInterface&) = delete;
    method SerialOscInterface (line 25) | SerialOscInterface(SerialOscInterface&&) = delete;
    method SerialOscInterface (line 26) | SerialOscInterface&& operator=(const SerialOscInterface&&) = delete;

FILE: src/common/core/IIBus.h
  type LibAVR32Module (line 9) | struct LibAVR32Module
  type IIBus (line 20) | struct IIBus

FILE: src/common/core/LibAVR32Module.cpp
  function json_t (line 308) | json_t* LibAVR32Module::dataToJson()

FILE: src/common/core/LibAVR32Module.hpp
  type GridConnection (line 32) | struct GridConnection
  type LibAVR32Module (line 34) | struct LibAVR32Module : rack::engine::Module, GridConsumerBase
    method setDeviceConnectionParam (line 80) | void setDeviceConnectionParam(int paramId) { usbParamId = paramId; }

FILE: src/common/core/LibAVR32ModuleWidget.cpp
  type ReloadFirmwareItem (line 16) | struct ReloadFirmwareItem : rack::ui::MenuItem
    method onAction (line 22) | void onAction(const rack::event::Action& e) override
  type SwitchFirmwareItem (line 30) | struct SwitchFirmwareItem : rack::ui::MenuItem
  type ioRateItem (line 78) | struct ioRateItem : rack::ui::MenuItem
  type FirmwareSubmenuItem (line 106) | struct FirmwareSubmenuItem : MenuItem
    method Menu (line 111) | Menu* createChildMenu() override

FILE: src/common/core/LibAVR32ModuleWidget.hpp
  type LibAVR32ModuleWidget (line 8) | struct LibAVR32ModuleWidget : rack::app::ModuleWidget

FILE: src/common/util/Clock12BitParam.hpp
  type Clock12BitParam (line 6) | struct Clock12BitParam : rack::engine::ParamQuantity
    method isDividerMode (line 12) | bool isDividerMode()
    method getDisplayValueString (line 20) | std::string getDisplayValueString() override
    method setDisplayValueString (line 42) | void setDisplayValueString(std::string s) override
    method setDisplayValue (line 66) | void setDisplayValue(float dv) override

FILE: src/common/util/Screenshot.cpp
  type SVGcontext (line 11) | struct SVGcontext
  function svg__renderCreate (line 18) | int svg__renderCreate(void* uptr, void* otherUptr)
  function svg__renderCreateTexture (line 23) | int svg__renderCreateTexture(void* uptr, int type, int w, int h, int ima...
  function svg__renderDeleteTexture (line 28) | int svg__renderDeleteTexture(void* uptr, int image)
  function svg__renderUpdateTexture (line 33) | int svg__renderUpdateTexture(void* uptr, int image, int x, int y, int w,...
  function svg__renderGetTextureSize (line 38) | int svg__renderGetTextureSize(void* uptr, int image, int* w, int* h)
  function svg__renderViewport (line 43) | void svg__renderViewport(void* uptr, float width, float height, float de...
  function svg__renderFlush (line 48) | void svg__renderFlush(void* uptr)
  function vertToPoint (line 53) | svg::Point vertToPoint(SVGcontext* ctx, NVGvertex v)
  function svg__renderFill (line 58) | void svg__renderFill(void* uptr, NVGpaint* paint, NVGcompositeOperationS...
  function svg__renderStroke (line 82) | void svg__renderStroke(void* uptr, NVGpaint* paint, NVGcompositeOperatio...
  function svg__renderTriangles (line 104) | void svg__renderTriangles(void* uptr, NVGpaint* paint, NVGcompositeOpera...
  function svg__renderDelete (line 109) | void svg__renderDelete(void* uptr)
  type NVGcontext (line 122) | struct NVGcontext
  type NVGparams (line 124) | struct NVGparams
  type NVGcontext (line 125) | struct NVGcontext
  type SVGcontext (line 126) | struct SVGcontext
  function nvgDestroySVGRenderer (line 160) | void nvgDestroySVGRenderer(NVGcontext* ctx)
  function screenshotModuleSVG (line 165) | void screenshotModuleSVG(rack::app::ModuleWidget* moduleWidget, std::str...
  function screenshotModulePNG (line 182) | void screenshotModulePNG(rack::app::ModuleWidget* moduleWidget, std::str...

FILE: src/common/widgets/CustomMenuTemplates.hpp
  function TMenuItem (line 7) | TMenuItem* createUnconsumingIndexSubmenuItem(std::string text, std::vect...
  function TMenuItem (line 65) | TMenuItem* createUnconsumingIndexSubmenuItemWithDynamicLabels(std::strin...
  function TMenuItem (line 125) | TMenuItem* createSubmenuItemWithDynamicRightText(std::string text, std::...

FILE: src/common/widgets/HoldableButton.hpp
  type HoldableButton (line 3) | struct HoldableButton : rack::TL1105
    method HoldableButton (line 7) | HoldableButton() : rack::TL1105()
    method onButton (line 12) | void onButton(const rack::widget::Widget::ButtonEvent& e) override
    method draw (line 35) | void draw(const DrawArgs& args) override

FILE: src/common/widgets/SifamTPM.hpp
  type Sifam (line 5) | struct Sifam : rack::app::SvgKnob
    method Sifam (line 12) | Sifam()
    method onChange (line 29) | void onChange(const ChangeEvent& e) override
  type SifamTPN111GrayBlackStripe (line 39) | struct SifamTPN111GrayBlackStripe : Sifam
    method SifamTPN111GrayBlackStripe (line 41) | SifamTPN111GrayBlackStripe()

FILE: src/common/widgets/USBAJack.hpp
  type USBAJack (line 8) | struct USBAJack : rack::Switch
    method USBAJack (line 10) | USBAJack()
    method draw (line 15) | void draw(const DrawArgs& args) override
    method appendContextMenu (line 86) | void appendContextMenu(rack::ui::Menu* menu) override

FILE: src/common/widgets/YellowWhiteLight.hpp
  type YellowWhiteLight (line 5) | struct YellowWhiteLight : rack::componentlibrary::GrayModuleLightWidget
    method YellowWhiteLight (line 7) | YellowWhiteLight() {

FILE: src/earthsea/EarthseaModule.hpp
  type EarthseaModule (line 5) | struct EarthseaModule : LibAVR32Module
    type ParamIds (line 7) | enum ParamIds
    type InputIds (line 17) | enum InputIds
    type OutputIds (line 22) | enum OutputIds
    type LightIds (line 32) | enum LightIds
    method EarthseaModule (line 42) | EarthseaModule()
    method processInputs (line 61) | void processInputs(const ProcessArgs& args) override
    method processOutputs (line 76) | void processOutputs(const ProcessArgs& args) override

FILE: src/earthsea/EarthseaWidget.hpp
  type EarthseaWidget (line 10) | struct EarthseaWidget : LibAVR32ModuleWidget
    method EarthseaWidget (line 12) | EarthseaWidget(EarthseaModule* module)

FILE: src/faderbank/FaderbankModule.cpp
  function json_t (line 310) | json_t* FaderbankModule::dataToJson()
  function json_object_foreach (line 366) | json_object_foreach(oldConfigJ, key, dataJ)
  function json_array_foreach (line 381) | json_array_foreach(configJ, key, dataJ)

FILE: src/faderbank/FaderbankModule.hpp
  type FaderbankModule (line 9) | struct FaderbankModule : rack::Module
    type ControllerRecord (line 52) | struct ControllerRecord

FILE: src/faderbank/FaderbankWidget.cpp
  type ThemedSvgSlider (line 9) | struct ThemedSvgSlider : app::SvgSlider
    method updateGraphics (line 16) | void updateGraphics()
    method step (line 26) | void step() override
  type FaderbankSlider (line 33) | struct FaderbankSlider : ThemedSvgSlider
    method FaderbankSlider (line 35) | FaderbankSlider()
    method step (line 51) | void step() override
  type WideYellowLight (line 58) | struct WideYellowLight : YellowLight
    method drawHalo (line 62) | void drawHalo(const DrawArgs& args) override
  type FaderbankSliderLight (line 94) | struct FaderbankSliderLight : RectangleLight<TSvgLight<TBase>>
    method FaderbankSliderLight (line 96) | FaderbankSliderLight()
  type FaderbankSliderYellow (line 102) | struct FaderbankSliderYellow : LightSlider<FaderbankSlider, FaderbankSli...
    method FaderbankSliderYellow (line 104) | FaderbankSliderYellow()
  function appendFaderConfigMenu (line 150) | void appendFaderConfigMenu(FaderbankModule* fb, ::Menu* menu, int faderI...

FILE: src/faderbank/FaderbankWidget.hpp
  type FaderbankModule (line 5) | struct FaderbankModule
  type FaderbankWidget (line 7) | struct FaderbankWidget : rack::app::ModuleWidget

FILE: src/meadowphysics/MeadowphysicsModule.hpp
  type MeadowphysicsModule (line 6) | struct MeadowphysicsModule : LibAVR32Module
    type ParamIds (line 8) | enum ParamIds
    type InputIds (line 16) | enum InputIds
    type OutputIds (line 22) | enum OutputIds
    type LightIds (line 36) | enum LightIds
    method MeadowphysicsModule (line 52) | MeadowphysicsModule()
    method processInputs (line 73) | void processInputs(const ProcessArgs& args) override
    method processOutputs (line 102) | void processOutputs(const ProcessArgs& args) override

FILE: src/meadowphysics/MeadowphysicsWidget.hpp
  type MeadowphysicsWidget (line 9) | struct MeadowphysicsWidget : LibAVR32ModuleWidget
    method MeadowphysicsWidget (line 11) | MeadowphysicsWidget(MeadowphysicsModule* module)

FILE: src/plugin.cpp
  function init (line 23) | void init(Plugin* p)
  function json_t (line 56) | json_t* settingsToJson()
  function settingsFromJson (line 63) | void settingsFromJson(json_t* rootJ)

FILE: src/teletype/TeletypeKeyboard.cpp
  function json_array_foreach (line 70) | json_array_foreach(mapArrayJ, i, mapEntryJ)

FILE: src/teletype/TeletypeKeyboard.hpp
  type TeletypeKeyboard (line 7) | struct TeletypeKeyboard

FILE: src/teletype/TeletypeModule.cpp
  type TTParamQuantity (line 10) | struct TTParamQuantity : rack::engine::ParamQuantity
    method getDisplayValueString (line 12) | std::string getDisplayValueString() override
    method setDisplayValue (line 24) | void setDisplayValue(float dv) override
  function json_t (line 132) | json_t* TeletypeModule::dataToJson()

FILE: src/teletype/TeletypeModule.hpp
  type TeletypeModule (line 7) | struct TeletypeModule : LibAVR32Module
    type ParamIds (line 9) | enum ParamIds
    type InputIds (line 16) | enum InputIds
    type OutputIds (line 29) | enum OutputIds
    type LightIds (line 41) | enum LightIds

FILE: src/teletype/TeletypeWidget.cpp
  type TeletypeKeyboardLayoutItem (line 72) | struct TeletypeKeyboardLayoutItem : rack::ui::MenuItem
    method TeletypeKeyboardLayoutItem (line 76) | TeletypeKeyboardLayoutItem()
  type TeletypeKeystrokeItem (line 120) | struct TeletypeKeystrokeItem : rack::ui::MenuItem
    method TeletypeKeystrokeItem (line 127) | TeletypeKeystrokeItem(TeletypeModule* module, rack::widget::Widget* sc...
    method onAction (line 137) | void onAction(const rack::event::Action& e) override

FILE: src/teletype/TeletypeWidget.hpp
  type TeletypeModule (line 5) | struct TeletypeModule
  type TeletypeWidget (line 7) | struct TeletypeWidget : LibAVR32ModuleWidget

FILE: src/teletype/scene/TeletypeSceneIO.hpp
  type LibAVR32Module (line 3) | struct LibAVR32Module
  type TeletypeSceneIO (line 11) | struct TeletypeSceneIO

FILE: src/teletype/scene/TeletypeSceneIOMenu.cpp
  type InternalPresetItem (line 13) | struct InternalPresetItem : rack::ui::MenuItem
    method InternalPresetItem (line 19) | InternalPresetItem(LibAVR32Module* module, int preset_num, SceneOperat...
    method onAction (line 32) | void onAction(const rack::event::Action& e) override
  type InternalPresetClipboardItem (line 67) | struct InternalPresetClipboardItem : rack::ui::MenuItem
    method InternalPresetClipboardItem (line 74) | InternalPresetClipboardItem(LibAVR32Module* module, int preset_num, Sc...
    method onAction (line 85) | void onAction(const rack::event::Action& e) override
  type InternalPresetBulkItem (line 91) | struct InternalPresetBulkItem : rack::ui::MenuItem
    method InternalPresetBulkItem (line 97) | InternalPresetBulkItem(LibAVR32Module* module, SceneOperation operatio...
    method onAction (line 107) | void onAction(const rack::event::Action& e) override
  type InternalPresetActiveSubmenu (line 136) | struct InternalPresetActiveSubmenu : rack::ui::MenuItem
    method InternalPresetActiveSubmenu (line 141) | InternalPresetActiveSubmenu(LibAVR32Module* module, SceneOperation ope...
  type InternalPresetGroupSubmenu (line 166) | struct InternalPresetGroupSubmenu : rack::ui::MenuItem
    method InternalPresetGroupSubmenu (line 173) | InternalPresetGroupSubmenu(LibAVR32Module* module, int first, int last...

FILE: src/teletype/scene/TeletypeSceneIOMenu.hpp
  type InternalPresetSubmenu (line 4) | struct InternalPresetSubmenu : rack::ui::MenuItem

FILE: src/teletype/screen/TeletypeScreenWidget.hpp
  type TeletypeScreenWidget (line 7) | struct TeletypeScreenWidget : OpaqueWidget

FILE: src/virtualgrid/VirtualGridKey.hpp
  type VirtualGridKey (line 4) | struct VirtualGridKey : rack::app::ParamWidget
    method VirtualGridKey (line 18) | VirtualGridKey()
    method VirtualGridWidget (line 28) | VirtualGridWidget* getGrid()
    method setKeyAddress (line 33) | void setKeyAddress(uint8_t* ledByte)
    method draw (line 38) | void draw(const DrawArgs& args) override
    method drawLayer (line 43) | void drawLayer(const DrawArgs& args, int layer) override
    method drawDot (line 140) | void drawDot(const DrawArgs& args, float cx, float cy, float r, NVGcol...
    method isPushed (line 157) | bool isPushed()
    method isLocked (line 164) | bool isLocked()
    method setLocked (line 169) | void setLocked(bool b)
    method beginPress (line 174) | void beginPress()
    method endPress (line 204) | void endPress()
    method onButton (line 218) | void onButton(const rack::event::Button& e) override
    method onDragStart (line 265) | void onDragStart(const rack::event::DragStart& e) override
    method onDragEnd (line 270) | void onDragEnd(const rack::event::DragEnd& e) override
    method onDragLeave (line 278) | void onDragLeave(const rack::event::DragLeave& e) override
    method onDragEnter (line 286) | void onDragEnter(const rack::event::DragEnter& e) override
    method onEnter (line 294) | void onEnter(const EnterEvent& e) override

FILE: src/virtualgrid/VirtualGridModule.cpp
  type MirrorModeGridConsumer (line 8) | struct MirrorModeGridConsumer : GridConsumerBase
    method MirrorModeGridConsumer (line 10) | MirrorModeGridConsumer(VirtualGridModule* module)
    method gridConnected (line 19) | void gridConnected(Grid* newConnection) override
    method gridButtonEvent (line 50) | void gridButtonEvent(int x, int y, bool state) override
    method encDeltaEvent (line 64) | void encDeltaEvent(int n, int d) override
  function formatVirtualDeviceId (line 73) | std::string formatVirtualDeviceId(int64_t id)
  function json_t (line 179) | json_t* VirtualGridModule::dataToJson()
  function json_t (line 196) | json_t* VirtualGridModule::paramsToJson()
  function MonomeDevice (line 226) | const MonomeDevice& VirtualGridModule::getDevice()

FILE: src/virtualgrid/VirtualGridModule.hpp
  type VirtualGridModule (line 10) | struct VirtualGridModule : rack::Module, Grid
    method isHardware (line 34) | bool isHardware() override { return false; }
  type VirtualGridModuleTemplate (line 41) | struct VirtualGridModuleTemplate : VirtualGridModule
    method VirtualGridModuleTemplate (line 43) | VirtualGridModuleTemplate()

FILE: src/virtualgrid/VirtualGridTheme.cpp
  function ease (line 6) | int ease(int level, int minval, int maxval, float curve)
  function NVGcolor (line 13) | NVGcolor calcColor(int level, float curve, int minR, int maxR, int minG,...
  function initThemes (line 18) | void initThemes()
  function levelToGradient (line 39) | void levelToGradient(GridTheme theme, uint8_t level, NVGcolor* color1, N...

FILE: src/virtualgrid/VirtualGridWidget.cpp
  function setProtocol (line 196) | void setProtocol(VirtualGridModule* grid, MonomeProtocol protocol)

FILE: src/virtualgrid/VirtualGridWidget.hpp
  type VirtualGridKey (line 7) | struct VirtualGridKey
  type VirtualGridModule (line 8) | struct VirtualGridModule
  type VirtualGridWidget (line 10) | struct VirtualGridWidget : rack::app::ModuleWidget
  type VirtualGridWidgetTemplate (line 33) | struct VirtualGridWidgetTemplate : VirtualGridWidget
    method VirtualGridWidgetTemplate (line 35) | VirtualGridWidgetTemplate(VirtualGridModule* module)

FILE: src/whitewhale/WhiteWhaleModule.hpp
  type WhiteWhaleModule (line 6) | struct WhiteWhaleModule : LibAVR32Module
    type ParamIds (line 8) | enum ParamIds
    type InputIds (line 17) | enum InputIds
    type OutputIds (line 23) | enum OutputIds
    type LightIds (line 35) | enum LightIds
    method WhiteWhaleModule (line 49) | WhiteWhaleModule()
    method processInputs (line 69) | void processInputs(const ProcessArgs& args) override
    method processOutputs (line 99) | void processOutputs(const ProcessArgs& args) override

FILE: src/whitewhale/WhiteWhaleWidget.hpp
  type WhiteWhaleWidget (line 10) | struct WhiteWhaleWidget : LibAVR32ModuleWidget
    method WhiteWhaleWidget (line 12) | WhiteWhaleWidget(WhiteWhaleModule* module)
Condensed preview — 238 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,873K chars).
[
  {
    "path": ".gitattributes",
    "chars": 347,
    "preview": "*.cpp     text diff=cpp\n*.hpp     text diff=cpp\n*.c       text diff=cpp\n*.h       text diff=cpp\n*.md      text \nMakefile"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug-report.md",
    "chars": 864,
    "preview": "---\nname: Bug report\nabout: Report unexpected or confusing behavior when using the modules inside VCV Rack\ntitle: \"[BUG "
  },
  {
    "path": ".github/ISSUE_TEMPLATE/build-error.md",
    "chars": 498,
    "preview": "---\nname: Build issue\nabout: Report a problem building the modules in your own environment\ntitle: \"[BUILD ISSUE]\"\nlabels"
  },
  {
    "path": ".github/workflows/build-plugin.yaml",
    "chars": 4733,
    "preview": "name: Build VCV Rack Plugin\non: \n  push:\n    paths-ignore:\n      - 'docs/**'\n      - '*.md'\n      - 'mkdocs.yml'\n      -"
  },
  {
    "path": ".github/workflows/deploy-pages.yml",
    "chars": 1126,
    "preview": "name: Update Docs Site\n\non:\n  push:\n    paths: \n      - 'docs/**'\n      - 'mkdocs.yml'\n      - '.github/workflows/deploy"
  },
  {
    "path": ".gitignore",
    "chars": 146,
    "preview": "/build\nplugin*.dylib\nplugin*.dll\nplugin*.so\n.DS_Store\n/res/firmware\n/firmware/build\n/dist\n.vscode/ipch\n/Rack-SDK\nRack-SD"
  },
  {
    "path": ".gitmodules",
    "chars": 852,
    "preview": "[submodule \"firmware/whitewhale\"]\n\tpath = firmware/whitewhale\n\turl = https://github.com/Dewb/whitewhale\n\tbranch = vcvrac"
  },
  {
    "path": ".vscode/c_cpp_properties.json",
    "chars": 2730,
    "preview": "{\n    \"configurations\": [\n        {\n            \"name\": \"Mac\",\n            \"includePath\": [\n                \"${workspace"
  },
  {
    "path": ".vscode/launch.json",
    "chars": 1636,
    "preview": "{\n    // Use IntelliSense to learn about possible attributes.\n    // Hover to view descriptions of existing attributes.\n"
  },
  {
    "path": ".vscode/settings.json",
    "chars": 3114,
    "preview": "{\n    \"editor.tabSize\": 4,\n    \"editor.insertSpaces\": true,\n    \"editor.formatOnType\": true,\n    \"editor.formatOnPaste\":"
  },
  {
    "path": ".vscode/tasks.json",
    "chars": 3093,
    "preview": "{\n    // See https://go.microsoft.com/fwlink/?LinkId=733558\n    // for the documentation about the tasks.json format\n   "
  },
  {
    "path": "DEVELOPING.md",
    "chars": 11386,
    "preview": "\n## Installing prerelease builds\n\nDownload a release for your platform from the [Releases page](../../releases) and plac"
  },
  {
    "path": "LICENSE",
    "chars": 18025,
    "preview": "GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundati"
  },
  {
    "path": "Makefile",
    "chars": 2387,
    "preview": "SHELL:=/bin/bash -O extglob\nRACK_DIR ?= ../..\n\nFLAGS += \\\n\t-Isrc \\\n\t-Isrc/common \\\n\t-Isrc/common/core \\\n\t-Isrc/common/ut"
  },
  {
    "path": "README.md",
    "chars": 4380,
    "preview": "monome-rack \n---\n\nRead the manual here:\n* https://dewb.github.io/monome-rack\n\nmonome-rack is a plugin for the [VCVRack o"
  },
  {
    "path": "docs/content/extra.css",
    "chars": 1043,
    "preview": ".module-image-sixhp {\n    margin: 0rem 2rem 1.5rem 0rem;\n    width: 9.5rem;\n    height: auto;\n    float: left;\n}\n\n.modul"
  },
  {
    "path": "docs/content/general/connections.md",
    "chars": 3108,
    "preview": "# Connecting devices\n\nAll of the modules in this plugin are designed to be used alongside with non-Eurorack control inte"
  },
  {
    "path": "docs/content/general/credits.md",
    "chars": 2594,
    "preview": "# Credits\n\nThe original hardware and firmware projects were initiated by [@tehn](https://github.com/tehn) at [monome](ht"
  },
  {
    "path": "docs/content/general/intro.md",
    "chars": 945,
    "preview": "# monome for VCV Rack\n\n![all modules](../images/all-modules-50.png)\n\nThis collection of modules for the [VCV Rack virtua"
  },
  {
    "path": "docs/content/general/voltage.md",
    "chars": 3110,
    "preview": "# Voltage Standards: Inputs\n\nTrigger/gate inputs use [Schmitt triggers](https://vcvrack.com/manual/VoltageStandards#Trig"
  },
  {
    "path": "docs/content/help.md",
    "chars": 2286,
    "preview": "# Learning resources\n\nThe official documentation for the original hardware versions of the modules is the best place to "
  },
  {
    "path": "docs/content/index.md",
    "chars": 1242,
    "preview": "<style type=\"text/css\">\n\n.module {\n   display: inline-block;\n   margin-right: 1.25em;\n   margin-bottom: 1.5em;\n}\n.module"
  },
  {
    "path": "docs/content/modules/ansible.md",
    "chars": 9635,
    "preview": "![ansible module screenshot](../images/ansible.png){: class=\"module-image-sixhp\" }\n## Ansible\n\nAnsible has multiple mode"
  },
  {
    "path": "docs/content/modules/earthsea.md",
    "chars": 4226,
    "preview": "![earthsea module screenshot](../images/earthsea.png){: class=\"module-image-sixhp\" }\n## Earthsea\n\nEarthsea, [connected t"
  },
  {
    "path": "docs/content/modules/faderbank.md",
    "chars": 4001,
    "preview": "##\n\n![faderbank module screenshot](../images/faderbank.png){: class=\"module-image-eighteenhp\" }\n\n## Faderbank\n\nThe fader"
  },
  {
    "path": "docs/content/modules/grids.md",
    "chars": 3916,
    "preview": "# Virtual grids\n\n![original prototype virtual grid in VCV Rack 0.5](../images/prototype.jpg)\n\n# Sizes\n\nVirtual grids com"
  },
  {
    "path": "docs/content/modules/meadowphysics.md",
    "chars": 4245,
    "preview": "![meadowphysics module screenshot](../images/meadowphysics.png){: class=\"module-image-sixhp\" }\n## Meadowphysics\n\nMeadowp"
  },
  {
    "path": "docs/content/modules/teletype.md",
    "chars": 14727,
    "preview": "##\n\n![teletype module screenshot](../images/teletype.png){: class=\"module-image-eighteenhp\" }\n\n## Teletype\n\nTeletype is "
  },
  {
    "path": "docs/content/modules/whitewhale.md",
    "chars": 6214,
    "preview": "![white whale module screenshot](../images/whitewhale.png){: class=\"module-image-sixhp\" }\n\n## White Whale\n\nWhite Whale, "
  },
  {
    "path": "docs/custom-theme/main.html",
    "chars": 60,
    "preview": "{% extends \"base.html\" %}\n\n{% block footer %}\n{% endblock %}"
  },
  {
    "path": "docs/custom-theme/partials/search/mkdocs/search-modal.html",
    "chars": 2190,
    "preview": "<div class=\"modal\" id=\"mkdocs_search_modal\" tabindex=\"-1\" role=\"alertdialog\" aria-modal=\"true\"\n    aria-labelledby=\"sear"
  },
  {
    "path": "docs/requirements.txt",
    "chars": 22,
    "preview": "mkdocs\nmkdocs-terminal"
  },
  {
    "path": "firmware/ansible.mk",
    "chars": 1652,
    "preview": "TARGET_NAME := ansible\n\nFLAGS += \\\n\t-D__AVR32_UC3B0256__ \\\n\t-Imock_hardware \\\n\t-Imock_hardware/include \\\n\t-Iansible/liba"
  },
  {
    "path": "firmware/common.mk",
    "chars": 886,
    "preview": "SHELL := /bin/bash -O extglob\nRACK_DIR ?= ../../..\n\nTARGET_DIR := ../res/firmware/\nBUILD_DIR := ../build/firmware/$(TARG"
  },
  {
    "path": "firmware/compile.mk",
    "chars": 2849,
    "preview": "# Rack SDK compile.mk modified to support configurable build products folder\n\nifndef RACK_DIR\n$(error RACK_DIR is not de"
  },
  {
    "path": "firmware/earthsea.mk",
    "chars": 911,
    "preview": "TARGET_NAME := earthsea\n\nFLAGS += \\\n\t-D__AVR32_UC3B0256__ \\\n\t-Imock_hardware \\\n\t-Imock_hardware/include \\\n\t-Iearthsea/li"
  },
  {
    "path": "firmware/meadowphysics.mk",
    "chars": 791,
    "preview": "TARGET_NAME := meadowphysics\n\nFLAGS += \\\n\t-D__AVR32_UC3B0256__ \\\n\t-Imock_hardware \\\n\t-Imock_hardware/include \\\n\t-Imeadow"
  },
  {
    "path": "firmware/mock_hardware/common/adc.c",
    "chars": 230,
    "preview": "#include \"mock_hardware_api.h\"\n#include \"types.h\"\n\nvoid adc_convert(u16 (*adc)[4])\n{\n    (*adc)[0] = hardware_getADC(0);"
  },
  {
    "path": "firmware/mock_hardware/common/cdc.c",
    "chars": 314,
    "preview": "#include \"types.h\"\n\nvoid cdc_write(uint8_t* data, uint32_t bytes)\n{\n}\n\nvoid cdc_read(void)\n{\n}\n\nvoid cdc_setup(void)\n{\n}"
  },
  {
    "path": "firmware/mock_hardware/common/flashc.c",
    "chars": 688,
    "preview": "#include \"mock_hardware_api.h\"\n#include \"types.h\"\n#include <string.h>\n\nvoid* flashc_memset64(void* dst, uint64_t src, si"
  },
  {
    "path": "firmware/mock_hardware/common/ftdi.c",
    "chars": 349,
    "preview": "#include \"types.h\"\n\nvoid ftdi_write(uint8_t* data, uint32_t bytes)\n{\n}\n\nvoid ftdi_read(void)\n{\n}\n\nvoid ftdi_setup(void)\n"
  },
  {
    "path": "firmware/mock_hardware/common/gpio.c",
    "chars": 402,
    "preview": "#include \"mock_hardware_api.h\"\n#include \"types.h\"\n\nvoid gpio_set_gpio_pin(u32 pin)\n{\n    hardware_setGPIO(pin, true);\n}\n"
  },
  {
    "path": "firmware/mock_hardware/common/i2c.c",
    "chars": 702,
    "preview": "#include \"i2c.h\"\n#include \"mock_hardware_api.h\"\n#include \"types.h\"\n\nuint8_t last_port = 0;\nint i2c_leader_tx(uint8_t add"
  },
  {
    "path": "firmware/mock_hardware/common/init_common.c",
    "chars": 302,
    "preview": "#include \"types.h\"\n\nvoid init_gpio() { }\nvoid init_spi() { }\nvoid init_adc() { }\nvoid init_tc(void) { }\nvoid init_usb_ho"
  },
  {
    "path": "firmware/mock_hardware/common/interrupts.c",
    "chars": 89,
    "preview": "#include \"types.h\"\n\nu8 irqs_pause(void) { return 0; }\nvoid irqs_resume(u8 irq_flags) { }\n"
  },
  {
    "path": "firmware/mock_hardware/common/midi.c",
    "chars": 191,
    "preview": "#include \"types.h\"\n#include <stdbool.h>\n#include \"uhc.h\"\n\nvoid midi_read(void) { }\nbool midi_write(const u8* data, u32 b"
  },
  {
    "path": "firmware/mock_hardware/common/monome.c",
    "chars": 23679,
    "preview": "#include \"delay.h\"\n#include \"print_funcs.h\"\n#include <string.h>\n\n#include \"events.h\"\n#include \"ftdi.h\"\n#include \"cdc.h\"\n"
  },
  {
    "path": "firmware/mock_hardware/common/print_funcs.c",
    "chars": 807,
    "preview": "#include <stdio.h>\n#include <string.h>\n\n#ifdef FIRMWARE_DEBUG_OUTPUT\nstatic void print_dbg(const char* str) { fprintf(st"
  },
  {
    "path": "firmware/mock_hardware/common/screen.c",
    "chars": 1471,
    "preview": "#include \"mock_hardware_api.h\"\n#include \"mock_hardware_api_private.h\"\n#include \"types.h\"\n#include <string.h>\n\nu8 _is_scr"
  },
  {
    "path": "firmware/mock_hardware/common/spi.c",
    "chars": 3334,
    "preview": "#include \"mock_hardware_api.h\"\n#include \"types.h\"\n\ntypedef enum\n{\n    WAITING,\n    WRITING_CHANNEL1_HIGH,\n    WRITING_CH"
  },
  {
    "path": "firmware/mock_hardware/include/adc.h",
    "chars": 73,
    "preview": "#include \"types.h\"\n\nvoid init_adc(void);\nvoid adc_convert(u16 (*dst)[4]);"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/abi.h",
    "chars": 2608,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008 Atmel Corporatio"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/adc_200.h",
    "chars": 62209,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/core_sc0_130.h",
    "chars": 102590,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/eic_230.h",
    "chars": 52980,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/flashc_200.h",
    "chars": 57422,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/freqm_230.h",
    "chars": 15332,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/gpio_110.h",
    "chars": 15038,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/hmatrix_230.h",
    "chars": 149573,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/intc_101.h",
    "chars": 8690,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/io.h",
    "chars": 109,
    "preview": "#ifdef __AVR32_UC3B0256__\n#include \"uc3b0256.h\"\n#endif\n#ifdef __AVR32_UC3B0512__\n#include \"uc3b0512.h\"\n#endif"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/ocd_s0_130.h",
    "chars": 44745,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/pdca_102.h",
    "chars": 24994,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/pm_230.h",
    "chars": 73377,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/pwm_130.h",
    "chars": 49605,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/rtc_230.h",
    "chars": 11911,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/spi_199.h",
    "chars": 52776,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/ssc_310.h",
    "chars": 60416,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/tc_222.h",
    "chars": 107734,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/twi_211.h",
    "chars": 40047,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/uc3b0256.h",
    "chars": 36485,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2006-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/uc3b0512.h",
    "chars": 28922,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2006-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/usart_400.h",
    "chars": 109147,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/usbb_310.h",
    "chars": 867535,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/avr32/wdt_230.h",
    "chars": 5255,
    "preview": "/*****************************************************************************\n *\n * Copyright (C) 2008-2010 Atmel Corpo"
  },
  {
    "path": "firmware/mock_hardware/include/board.h",
    "chars": 24,
    "preview": "#include \"conf_board.h\"\n"
  },
  {
    "path": "firmware/mock_hardware/include/compiler.h",
    "chars": 5722,
    "preview": "#include <stdbool.h>\n#include <stddef.h>\n#include <stdint.h>\n#include <stdlib.h>\n\n#include \"avr32/io.h\"\n\n#ifndef _COMPIL"
  },
  {
    "path": "firmware/mock_hardware/include/conf_usb_host.h",
    "chars": 21,
    "preview": "#include \"compiler.h\""
  },
  {
    "path": "firmware/mock_hardware/include/delay.h",
    "chars": 47,
    "preview": "#define delay_ms(delay)\n#define delay_us(delay)"
  },
  {
    "path": "firmware/mock_hardware/include/flashc.h",
    "chars": 1280,
    "preview": "#include <stdint.h>\n#include \"conf_board.h\"\n\nvoid hardware_declareNVRAM(const void* ptr, uint32_t bytes);\nvoid hardware_"
  },
  {
    "path": "firmware/mock_hardware/include/fs_com.h",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "firmware/mock_hardware/include/ftdi.h",
    "chars": 384,
    "preview": "#include \"types.h\"\n#include \"uhc.h\"\n\n#pragma once\n\n#define FTDI_RX_BUF_SIZE 64\n#define FTDI_STATUS_BYTES 2\n\nvoid ftdi_re"
  },
  {
    "path": "firmware/mock_hardware/include/gpio.h",
    "chars": 213,
    "preview": "#include \"compiler.h\"\n\nbool gpio_get_pin_value(uint32_t pin);\nvoid gpio_set_gpio_pin(uint32_t pin);\nvoid gpio_clr_gpio_p"
  },
  {
    "path": "firmware/mock_hardware/include/intc.h",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "firmware/mock_hardware/include/interrupt.h",
    "chars": 206,
    "preview": "#define cpu_irq_enable_level(level)  \n#define cpu_irq_disable_level(level) \n#define cpu_irq_enable()   \n#define irq_init"
  },
  {
    "path": "firmware/mock_hardware/include/parts.h",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "firmware/mock_hardware/include/pm.h",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "firmware/mock_hardware/include/preprocessor.h",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "firmware/mock_hardware/include/print_funcs.h",
    "chars": 959,
    "preview": "\n#include \"compiler.h\"\n#include <interrupt.h>\n#include <stdio.h>\n\nextern void init_dbg_rs232(long pba_hz);\n\n#ifdef FIRMW"
  },
  {
    "path": "firmware/mock_hardware/include/spi.h",
    "chars": 391,
    "preview": "typedef enum {\n    SPI_ERROR = -1,\n    SPI_OK = 0,\n    SPI_ERROR_TIMEOUT = 1,\n    SPI_ERROR_ARGUMENT,\n    SPI_ERROR_OVER"
  },
  {
    "path": "firmware/mock_hardware/include/sysclk.h",
    "chars": 24,
    "preview": "void sysclk_init(void);\n"
  },
  {
    "path": "firmware/mock_hardware/include/tc.h",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "firmware/mock_hardware/include/twi.h",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "firmware/mock_hardware/include/usart.h",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "firmware/mock_hardware/include/usb_protocol.h",
    "chars": 13423,
    "preview": "/**\n * \\file\n *\n * \\brief USB protocol definitions.\n *\n * This file contains the USB definitions and data structures pro"
  },
  {
    "path": "firmware/mock_hardware/mock_hardware_api.c",
    "chars": 7083,
    "preview": "#include \"mock_hardware_api.h\"\n#include \"mock_hardware_api_private.h\"\n#include \"mock_serial.h\"\n#include \"mock_interrupt."
  },
  {
    "path": "firmware/mock_hardware/mock_hardware_api.h",
    "chars": 2271,
    "preview": "#ifndef MOCK_API_SKIP_TYPES\n#include \"../teletype4/src/serializer.h\"\n#include <stdint.h>\n#include <stdbool.h>\n#endif\n\n#i"
  },
  {
    "path": "firmware/mock_hardware/mock_hardware_api_private.h",
    "chars": 495,
    "preview": "// Functions that are only intended to be called internally\n\nextern int hardware_readSerial_internal(uint8_t** pbuf, uin"
  },
  {
    "path": "firmware/mock_hardware/mock_interrupt.c",
    "chars": 2124,
    "preview": "#include \"mock_hardware_api.h\"\n\n// libavr32 headers\n#include \"types.h\"\n#include \"events.h\"\n#include \"timers.h\"\n\n\n#define"
  },
  {
    "path": "firmware/mock_hardware/mock_interrupt.h",
    "chars": 70,
    "preview": "void mock_interrupt(int interrupt);\nvoid mock_gpio_interrupt(int pin);"
  },
  {
    "path": "firmware/mock_hardware/mock_serial.c",
    "chars": 3234,
    "preview": "// libavr32 headers\n#include \"monome.h\"\n#include \"mock_hardware_api_private.h\"\n\n#include <stdint.h>\n#include <stdbool.h>"
  },
  {
    "path": "firmware/mock_hardware/mock_serial.h",
    "chars": 152,
    "preview": "#include <stdint.h>\n#include <stdbool.h>\n\nvoid mock_monome_serial_setup(bool connected, uint8_t type, uint8_t protocol, "
  },
  {
    "path": "firmware/mock_hardware/modules/ansible/adapter_ansible.c",
    "chars": 1233,
    "preview": "#include \"gitversion.h\"\n#include \"types.h\"\n\n#include \"mock_hardware_api.h\"\n#include \"mock_hardware_api_private.h\"\n\n#incl"
  },
  {
    "path": "firmware/mock_hardware/modules/ansible/ansible_usb_disk.c",
    "chars": 2224,
    "preview": "#include \"init_common.h\"\n#include \"main.h\"\n#include \"monome.h\"\n#include \"print_funcs.h\"\n\n#include \"ansible_preset_docdef"
  },
  {
    "path": "firmware/mock_hardware/modules/teletype/adapter_teletype.c",
    "chars": 5741,
    "preview": "#include \"mock_hardware_api.h\"\n#include \"mock_hardware_api_private.h\"\n#include \"flashc.h\"\n\n#include \"module/edit_mode.h\""
  },
  {
    "path": "firmware/mock_hardware/modules/teletype/usb_disk_mode.c",
    "chars": 155,
    "preview": "#include <stdint.h>\n\nvoid handler_usb_PollADC(int32_t data) {\n}\n\nvoid handler_usb_Front(int32_t data) {\n}\n\nvoid handler_"
  },
  {
    "path": "firmware/mock_hardware/modules/trilogy/adapter_trilogy.c",
    "chars": 945,
    "preview": "#include \"mock_hardware_api.h\"\n#include \"mock_hardware_api_private.h\"\n\n#include \"types.h\"\n\n#include <string.h>\n\nvoid clo"
  },
  {
    "path": "firmware/teletype.mk",
    "chars": 2119,
    "preview": "FLAGS += \\\n\t-D__AVR32_UC3B0512__ \\\n\t-Imock_hardware \\\n\t-Imock_hardware/include \\\n\t-I$(TARGET_NAME)/libavr32/src \\\n\t-I$(T"
  },
  {
    "path": "firmware/whitewhale.mk",
    "chars": 771,
    "preview": "FLAGS += \\\n\t-D__AVR32_UC3B0256__ \\\n\t-Imock_hardware \\\n\t-Imock_hardware/include \\\n\t-I$(TARGET_NAME)/libavr32/src \\\n\t-I$(T"
  },
  {
    "path": "lib/base64/LICENSE",
    "chars": 1188,
    "preview": "Copyright © 2004-2017 by René Nyffenegger\n\nThis source code is provided 'as-is', without any express or implied\nwarranty"
  },
  {
    "path": "lib/base64/README.md",
    "chars": 77,
    "preview": "cpp-base64 by René Nyffenegger\n\nhttps://github.com/ReneNyffenegger/cpp-base64"
  },
  {
    "path": "lib/base64/base64.cpp",
    "chars": 3639,
    "preview": "/* \n   base64.cpp and base64.h\n\n   base64 encoding and decoding with C++.\n\n   Version: 1.01.00\n\n   Copyright (C) 2004-20"
  },
  {
    "path": "lib/base64/base64.h",
    "chars": 376,
    "preview": "//\n//  base64 encoding and decoding with C++.\n//  Version: 1.01.00\n//\n\n#ifndef BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E"
  },
  {
    "path": "lib/cbbq/LICENSE.md",
    "chars": 1074,
    "preview": "License: MIT\n\nCopyright © 2021 Michael Dewberry\n\nPermission is hereby granted, free of charge, to any person obtaining a"
  },
  {
    "path": "lib/cbbq/README.md",
    "chars": 252,
    "preview": "cbbq\n====\n\nHeader-only C library implementing a lock-free, thread-safe, \nsingle-producer/single-consumer circular messag"
  },
  {
    "path": "lib/cbbq/cbbq.h",
    "chars": 5864,
    "preview": "/*\n\ncbbq.h\n\nC implementation of a lock-free, thread-safe, single-producer/single-consumer \ncircular message queue for sh"
  },
  {
    "path": "lib/cbbq/test/.gitignore",
    "chars": 10,
    "preview": "bin\na.out\n"
  },
  {
    "path": "lib/cbbq/test/cbbq_test.c",
    "chars": 4351,
    "preview": "#define CBBQ_DEBUG\n\n#include \"cbbq.h\"\n#include \"cbbq_utils.h\"\n#include <assert.h>\n#include <stdio.h>\n\n#define ASSERT(exp"
  },
  {
    "path": "lib/cbbq/test/cbbq_utils.h",
    "chars": 1945,
    "preview": "#pragma once\n\n#include <stdio.h>\n\n// debugging utilities for cbbq\n\nvoid queue_display(cbbq* q)\n{\n    for (int i = 0; i <"
  },
  {
    "path": "lib/cbbq/test/test.sh",
    "chars": 67,
    "preview": "mkdir -p bin\ncc cbbq_test.c -I.. -o bin/cbbq_test && bin/cbbq_test\n"
  },
  {
    "path": "lib/oscpack/LICENSE",
    "chars": 1643,
    "preview": "Oscpack is distributed under the MIT open source license:\n```\nCopyright © 2004-2013 Ross Bencina\nPermission is hereby gr"
  },
  {
    "path": "lib/oscpack/README.md",
    "chars": 71,
    "preview": "oscpack 1.1.0 by Ross Bencina\n\nhttp://www.rossbencina.com/code/oscpack\n"
  },
  {
    "path": "lib/oscpack/ip/IpEndpointName.cpp",
    "chars": 2770,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/ip/IpEndpointName.h",
    "chars": 3211,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/ip/NetworkingUtils.h",
    "chars": 2252,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/ip/PacketListener.h",
    "chars": 1999,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/ip/TimerListener.h",
    "chars": 1900,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/ip/UdpSocket.h",
    "chars": 6091,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/ip/posix/NetworkingUtils.cpp",
    "chars": 2165,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n\thttp://www.rossbencina.com/code/oscpack\n\n\tCopyright"
  },
  {
    "path": "lib/oscpack/ip/posix/UdpSocket.cpp",
    "chars": 18168,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n\thttp://www.rossbencina.com/code/oscpack\n\n\tCopyright"
  },
  {
    "path": "lib/oscpack/ip/win32/NetworkingUtils.cpp",
    "chars": 3247,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/ip/win32/UdpSocket.cpp",
    "chars": 16444,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/MessageMappingOscPacketListener.h",
    "chars": 2909,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/OscException.h",
    "chars": 2355,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/OscHostEndianness.h",
    "chars": 4196,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/OscOutboundPacketStream.cpp",
    "chars": 16352,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/OscOutboundPacketStream.h",
    "chars": 5424,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/OscPacketListener.h",
    "chars": 2910,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/OscPrintReceivedElements.cpp",
    "chars": 7583,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/OscPrintReceivedElements.h",
    "chars": 2221,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/OscReceivedElements.cpp",
    "chars": 20918,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/OscReceivedElements.h",
    "chars": 15738,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/OscTypes.cpp",
    "chars": 2035,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/oscpack/osc/OscTypes.h",
    "chars": 5861,
    "preview": "/*\n\toscpack -- Open Sound Control (OSC) packet manipulation library\n    http://www.rossbencina.com/code/oscpack\n\n    Cop"
  },
  {
    "path": "lib/serialosc/MonomeDevice.h",
    "chars": 397,
    "preview": "#ifndef __MONOMEDEVICE_H__\n#define __MONOMEDEVICE_H__\n\n#include <string>\n\ntypedef enum {\n    PROTOCOL_40H,\n    PROTOCOL_"
  },
  {
    "path": "lib/serialosc/README.md",
    "chars": 198,
    "preview": "C++ serialosc example by Daniel-Bytes\n(with modifications by @dewb for varibright grid messages)\n\nhttp://daniel-bytes.gi"
  },
  {
    "path": "lib/serialosc/SerialOsc.cpp",
    "chars": 14065,
    "preview": "#include \"SerialOsc.h\"\n#include \"osc/OscOutboundPacketStream.h\"\n#include <algorithm>\n#include <exception>\n#include <iost"
  },
  {
    "path": "lib/serialosc/SerialOsc.h",
    "chars": 2701,
    "preview": "#ifndef __SERIALOSC_H__\n#define __SERIALOSC_H__\n\n#include \"MonomeDevice.h\"\n#include \"ip/UdpSocket.h\"\n#include \"osc/OscPa"
  },
  {
    "path": "lib/simple-svg/CMakeLists.txt",
    "chars": 346,
    "preview": "project (simple-svg)\ncmake_minimum_required(VERSION 2.8)\n\nadd_executable(simple_svg main_1.0.0.cpp simple_svg_1.0.0.hpp)"
  },
  {
    "path": "lib/simple-svg/LICENSE",
    "chars": 1478,
    "preview": "Copyright (c) 2015, adishavit\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nm"
  },
  {
    "path": "lib/simple-svg/README.md",
    "chars": 580,
    "preview": "# simple-svg\nEasy to use SVG library for C++ (fork)\n\nThis library is a single file header-only C++ library for creating "
  },
  {
    "path": "lib/simple-svg/main_1.0.0.cpp",
    "chars": 3823,
    "preview": "\n/*******************************************************************************\n*  The \"New BSD License\" : http://www."
  },
  {
    "path": "lib/simple-svg/simple_svg_1.0.0.hpp",
    "chars": 24670,
    "preview": "/*******************************************************************************\n*  The \"New BSD License\" : http://www.o"
  },
  {
    "path": "mkdocs.yml",
    "chars": 1301,
    "preview": "site_name: monome for VCV Rack\nsite_url: https://dewb.github.io/monome-rack\nrepo_url: https://github.com/Dewb/monome-rac"
  },
  {
    "path": "plugin.json",
    "chars": 4121,
    "preview": "{\n  \"slug\": \"monome\",\n  \"name\": \"monome\",\n  \"version\": \"2.2.8\",\n  \"minRackVersion\": \"2.4.0\",\n  \"license\": \"GPL-2.0-only\""
  },
  {
    "path": "presets/teletype/00_TRIANGLE MOUNTAIN.vcvm",
    "chars": 2359,
    "preview": "{\n  \"plugin\": \"monome\",\n  \"model\": \"teletype\",\n  \"version\": \"2.0.0-alpha5\",\n  \"params\": [\n    {\n      \"value\": 0.0,\n    "
  },
  {
    "path": "presets/teletype/01_RANDOMS.vcvm",
    "chars": 2614,
    "preview": "{\n  \"plugin\": \"monome\",\n  \"model\": \"teletype\",\n  \"version\": \"2.0.0-alpha5\",\n  \"params\": [\n    {\n      \"value\": 0.0,\n    "
  },
  {
    "path": "presets/teletype/02_HIDDEN PATH NO PATH.vcvm",
    "chars": 2201,
    "preview": "{\n  \"plugin\": \"monome\",\n  \"model\": \"teletype\",\n  \"version\": \"2.0.0-alpha5\",\n  \"params\": [\n    {\n      \"value\": 0.0,\n    "
  },
  {
    "path": "presets/teletype/03_4TRACK.vcvm",
    "chars": 2192,
    "preview": "{\n  \"plugin\": \"monome\",\n  \"model\": \"teletype\",\n  \"version\": \"2.0.0-alpha5\",\n  \"params\": [\n    {\n      \"value\": 0.0,\n    "
  },
  {
    "path": "presets/teletype/04_MOOD RING.vcvm",
    "chars": 3246,
    "preview": "{\n  \"plugin\": \"monome\",\n  \"model\": \"teletype\",\n  \"version\": \"2.0.0-alpha5\",\n  \"params\": [\n    {\n      \"value\": 0.0,\n    "
  },
  {
    "path": "presets/teletype/MINIM.vcvm",
    "chars": 3609,
    "preview": "{\n  \"plugin\": \"monome\",\n  \"model\": \"teletype\",\n  \"version\": \"2.1.5\",\n  \"params\": [\n    {\n      \"value\": 0.0,\n      \"id\":"
  },
  {
    "path": "res/keymaps/README.md",
    "chars": 3339,
    "preview": "## Teletype Keyboard Layouts\n\nThese JSON files define keyboard layouts for Teletype, selectable from the right-click men"
  },
  {
    "path": "res/keymaps/uk.json",
    "chars": 7051,
    "preview": "{\n    \"name\": \"UK\",\n    \"keymap\": [\n        { \"input\": \"GLFW_KEY_SPACE\", \"output\": \"HID_SPACEBAR\" },\n        { \"input\": "
  },
  {
    "path": "res/keymaps/us-dvorak.json",
    "chars": 6649,
    "preview": "{\n    \"name\": \"US Dvorak\",\n    \"keymap\": [\n        { \"input\": \"GLFW_KEY_SPACE\", \"output\": \"HID_SPACEBAR\" },\n        { \"i"
  },
  {
    "path": "res/keymaps/us-qwerty.json",
    "chars": 6649,
    "preview": "{\n    \"name\": \"US Qwerty\",\n    \"keymap\": [\n        { \"input\": \"GLFW_KEY_SPACE\", \"output\": \"HID_SPACEBAR\" },\n        { \"i"
  },
  {
    "path": "src/ansible/AnsibleModule.hpp",
    "chars": 4674,
    "preview": "#pragma once\n\n#include \"LibAVR32Module.hpp\"\n#include \"AnsibleModule.hpp\"\n\nusing namespace rack;\n\nstruct AnsibleModule : "
  },
  {
    "path": "src/ansible/AnsibleWidget.hpp",
    "chars": 3214,
    "preview": "#pragma once\n\n#include \"AnsibleModule.hpp\"\n#include \"HoldableButton.hpp\"\n#include \"LibAVR32ModuleWidget.hpp\"\n#include \"U"
  },
  {
    "path": "src/common/core/ActionQueue.hpp",
    "chars": 152,
    "preview": "#pragma once\n\n#include \"rack.hpp\"\n#include <functional>\n\ntypedef std::function<void(void)> Action;\ntypedef rack::dsp::Ri"
  },
  {
    "path": "src/common/core/FirmwareManager.cpp",
    "chars": 11745,
    "preview": "#include \"FirmwareManager.hpp\"\n#include \"rack.hpp\"\n\n#include <cstdio>\n#include <fstream>\n#include <iostream>\n#include <s"
  },
  {
    "path": "src/common/core/FirmwareManager.hpp",
    "chars": 727,
    "preview": "#include <cstdint>\n#include <string>\n\n\n#pragma once\n\n#ifdef MOCK_API\n#undef MOCK_API\n#endif\n#define MOCK_API(RET, METHOD"
  },
  {
    "path": "src/common/core/GridConnection/GridConnection.cpp",
    "chars": 4640,
    "preview": "#include \"GridConnection.hpp\"\n#include \"SerialOscInterface.hpp\"\n\nvoid GridConnectionManager::registerGrid(Grid* grid)\n{\n"
  },
  {
    "path": "src/common/core/GridConnection/GridConnection.hpp",
    "chars": 2379,
    "preview": "#pragma once\n\n#include \"MonomeDevice.h\"\n#include <map>\n#include <set>\n#include <stdint.h>\n\nstruct SerialOscInterface;\n\ns"
  },
  {
    "path": "src/common/core/GridConnection/GridConnectionMenu.cpp",
    "chars": 3821,
    "preview": "#include \"GridConnectionMenu.hpp\"\n#include \"SerialOscInterface.hpp\"\n\nusing namespace rack;\n\nstruct ConnectGridItem : rac"
  },
  {
    "path": "src/common/core/GridConnection/GridConnectionMenu.hpp",
    "chars": 214,
    "preview": "#pragma once\n\n#include \"rack.hpp\"\n#include \"GridConnection.hpp\"\n#include \"ActionQueue.hpp\"\n\nvoid appendDeviceConnectionM"
  },
  {
    "path": "src/common/core/GridConnection/GridConsumerBase.cpp",
    "chars": 2225,
    "preview": "#include \"GridConsumerBase.hpp\"\n\nGridConsumerBase::GridConsumerBase()\n    : lastConnectedDeviceId(\"\")\n    , currentConne"
  },
  {
    "path": "src/common/core/GridConnection/GridConsumerBase.hpp",
    "chars": 860,
    "preview": "#pragma once\n\n#include \"GridConnection.hpp\"\n#include \"rack.hpp\"\n\nstruct GridConsumerBase : public IGridConsumer\n{\n    //"
  },
  {
    "path": "src/common/core/GridConnection/SerialOscGrid.cpp",
    "chars": 1718,
    "preview": "#include \"SerialOscGrid.hpp\"\n#include \"SerialOscInterface.hpp\"\n\nSerialOscGrid::SerialOscGrid(const MonomeDevice* const _"
  },
  {
    "path": "src/common/core/GridConnection/SerialOscGrid.hpp",
    "chars": 492,
    "preview": "#pragma once\n\n#include \"GridConnection.hpp\"\n#include \"MonomeDevice.h\"\n\nstruct SerialOscGrid : Grid\n{\n    SerialOscGrid(c"
  },
  {
    "path": "src/common/core/GridConnection/SerialOscInterface.cpp",
    "chars": 1476,
    "preview": "#include \"SerialOscInterface.hpp\"\n#include \"SerialOscGrid.hpp\"\n\nSerialOscInterface::SerialOscInterface()\n{\n    driver = "
  },
  {
    "path": "src/common/core/GridConnection/SerialOscInterface.hpp",
    "chars": 919,
    "preview": "#include \"SerialOsc.h\"\n\nstruct SerialOscInterface final : public SerialOsc::Listener\n{\n    // constructor is private\n   "
  },
  {
    "path": "src/common/core/IIBus.cpp",
    "chars": 1859,
    "preview": "#include \"IIBus.h\"\n#include \"LibAVR32Module.hpp\"\n\n#define FADERBANK_II_MAX_VALUE 16383\n\nextern rack::plugin::Model* mode"
  },
  {
    "path": "src/common/core/IIBus.h",
    "chars": 794,
    "preview": "#pragma once\n\n#include \"rack.hpp\"\n\n#include <cstdint>\n#include <unordered_map>\n#include <atomic>\n\nstruct LibAVR32Module;"
  },
  {
    "path": "src/common/core/LibAVR32Module.cpp",
    "chars": 11086,
    "preview": "#include \"LibAVR32Module.hpp\"\n#include \"SerialOscInterface.hpp\"\n#include \"base64.h\"\n#include <string.h>\n\nLibAVR32Module:"
  },
  {
    "path": "src/common/core/LibAVR32Module.hpp",
    "chars": 3052,
    "preview": "#include \"FirmwareManager.hpp\"\n#include \"GridConnection.hpp\"\n#include \"GridConsumerBase.hpp\"\n#include \"VirtualGridTheme."
  },
  {
    "path": "src/common/core/LibAVR32ModuleWidget.cpp",
    "chars": 5728,
    "preview": "#include \"LibAVR32ModuleWidget.hpp\"\n#include \"LibAVR32Module.hpp\"\n#include \"GridConnectionMenu.hpp\"\n#include \"VirtualGri"
  },
  {
    "path": "src/common/core/LibAVR32ModuleWidget.hpp",
    "chars": 257,
    "preview": "#include \"LibAVR32Module.hpp\"\n#include \"rack.hpp\"\n\n#pragma once\n\nextern rack::Plugin* pluginInstance;\n\nstruct LibAVR32Mo"
  },
  {
    "path": "src/common/util/Clock12BitParam.hpp",
    "chars": 1978,
    "preview": "#pragma once\n\n#include <rack.hpp>\n\ntemplate<int Multiplier, int DividerModeWhenInputPatched = -1>\nstruct Clock12BitParam"
  },
  {
    "path": "src/common/util/Screenshot.cpp",
    "chars": 6711,
    "preview": "#include \"Screenshot.hpp\"\n#include \"osdialog.h\"\n#include \"stb_image_write.h\"\n\n#if SCREENSHOT_SVG\n\n#include <simple_svg_1"
  },
  {
    "path": "src/common/util/Screenshot.hpp",
    "chars": 279,
    "preview": "#pragma once\n\n#include <string>\n#include \"rack.hpp\"\n\n#define SCREENSHOT_SVG 0\n\n#if SCREENSHOT_SVG\nvoid screenshotModuleS"
  },
  {
    "path": "src/common/widgets/CustomMenuTemplates.hpp",
    "chars": 4595,
    "preview": "#pragma once\n\n#include \"rack.hpp\"\nusing namespace rack;\n\ntemplate <class TMenuItem = ui::MenuItem>\nTMenuItem* createUnco"
  },
  {
    "path": "src/common/widgets/HoldableButton.hpp",
    "chars": 1276,
    "preview": "#include \"rack.hpp\"\n\nstruct HoldableButton : rack::TL1105\n{\n    bool heldThisGesture;\n\n    HoldableButton() : rack::TL11"
  },
  {
    "path": "src/common/widgets/SifamTPM.hpp",
    "chars": 1507,
    "preview": "#pragma once\n\n#include <rack.hpp>\n\nstruct Sifam : rack::app::SvgKnob\n{\n    rack::widget::SvgWidget* bg;\n    rack::widget"
  },
  {
    "path": "src/common/widgets/USBAJack.hpp",
    "chars": 3102,
    "preview": "#pragma once\n\n#include \"rack.hpp\"\n#include \"LibAVR32Module.hpp\"\n#include \"GridConnectionMenu.hpp\"\n\n\nstruct USBAJack : ra"
  },
  {
    "path": "src/common/widgets/YellowWhiteLight.hpp",
    "chars": 239,
    "preview": "#pragma once\n\n#include \"rack.hpp\"\n\nstruct YellowWhiteLight : rack::componentlibrary::GrayModuleLightWidget\n{\n    YellowW"
  },
  {
    "path": "src/earthsea/EarthseaModule.hpp",
    "chars": 2876,
    "preview": "#include \"LibAVR32Module.hpp\"\n\n#pragma once\n\nstruct EarthseaModule : LibAVR32Module\n{\n    enum ParamIds\n    {\n        CV"
  },
  {
    "path": "src/earthsea/EarthseaWidget.hpp",
    "chars": 2462,
    "preview": "#pragma once\n\n#include \"EarthseaModule.hpp\"\n#include \"LibAVR32ModuleWidget.hpp\"\n#include \"SifamTPM.hpp\"\n#include \"USBAJa"
  },
  {
    "path": "src/faderbank/FaderbankModule.cpp",
    "chars": 13095,
    "preview": "#include \"FaderbankModule.hpp\"\n\n\nFaderbankModule::FaderbankModule()\n{\n    config(NUM_FADERS, 0, NUM_FADERS, 0);\n\n    for"
  },
  {
    "path": "src/faderbank/FaderbankModule.hpp",
    "chars": 1478,
    "preview": "#pragma once\n#include \"rack.hpp\"\n\n#include <map>\n\n#define NUM_FADERS 16\n\n\nstruct FaderbankModule : rack::Module\n{\n    Fa"
  },
  {
    "path": "src/faderbank/FaderbankWidget.cpp",
    "chars": 11442,
    "preview": "#include \"FaderbankWidget.hpp\"\n#include \"FaderbankModule.hpp\"\n#include \"CustomMenuTemplates.hpp\"\n\nextern rack::Plugin* p"
  },
  {
    "path": "src/faderbank/FaderbankWidget.hpp",
    "chars": 220,
    "preview": "#include \"rack.hpp\"\n\n#pragma once\n\nstruct FaderbankModule;\n\nstruct FaderbankWidget : rack::app::ModuleWidget\n{\n    Fader"
  }
]

// ... and 38 more files (download for full content)

About this extraction

This page contains the full source code of the Dewb/monome-rack GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 238 files (2.6 MB), approximately 706.0k tokens, and a symbol index with 1196 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!