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--` 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//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//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., 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. monome modules and virtual grid in VCVRack 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 ================================================ ## ## [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, Ctrl-click (Cmd-click 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)
Config View (long) | | [Levels](https://monome.org/docs/ansible/levels/) | Next Pattern (short)
Pattern View (long)
Change Parameter
(short tap while in Config View) | Reset Pattern (short)
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
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*. - Ctrl-Shift-click (Cmd-Shift-click 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, Ctrl-click (Cmd-click on Mac) will hold a pressed pad until you release Ctrl / Cmd. **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 Ctrl-click keys (or Cmd-click on Mac) to hold them down momentarily. You can hold multiple grid keys while you hold down Ctrl (or Cmd) 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). Ctrl-click a key in row 2 to set the loop start, and then while still holding Ctrl, 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. Ctrl-Shift-click a grid key (Cmd-Shift-click 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 Esc 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), Ctrl-Shift-click 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, Ctrl-Shift-click the [Loop Modifier key](https://monome.org/docs/ansible/kria/#modifiers) in row 8 to edit loop lengths, then Ctrl-click 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 TAB 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 F1-F10 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 Alt-H (Option-H 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 Alt-Esc to enter **SCENE WRITE** mode). If that happens, Alt-Esc 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--/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 Alt + Esc (Option + Esc 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 Alt + Esc (Option + Esc 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 TAB 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 [ and ] 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 Tab 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 ================================================ ================================================ 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 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 #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 #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 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 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 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 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 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 #include #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 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_ - Bitfield mask: AVR32_ADC__ - Bitfield offset: AVR32_ADC___OFFSET - Bitfield size: AVR32_ADC___SIZE - Bitfield values: AVR32_ADC___ 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 offset: AVR32_ADC__OFFSET - Bitfield size: AVR32_ADC__SIZE - Bitfield values: AVR32_ADC__ - Bitfield values: AVR32_ADC_ 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 3 #define AVR32_ADC_IMR_EOC3_MASK 0x00000008 #define AVR32_ADC_IMR_EOC3_OFFSET 3 #define AVR32_ADC_IMR_EOC3_SIZE 1 #define AVR32_ADC_IMR_EOC4 4 #define AVR32_ADC_IMR_EOC4_MASK 0x00000010 #define AVR32_ADC_IMR_EOC4_OFFSET 4 #define AVR32_ADC_IMR_EOC4_SIZE 1 #define AVR32_ADC_IMR_EOC5 5 #define AVR32_ADC_IMR_EOC5_MASK 0x00000020 #define AVR32_ADC_IMR_EOC5_OFFSET 5 #define AVR32_ADC_IMR_EOC5_SIZE 1 #define AVR32_ADC_IMR_EOC6 6 #define AVR32_ADC_IMR_EOC6_MASK 0x00000040 #define AVR32_ADC_IMR_EOC6_OFFSET 6 #define AVR32_ADC_IMR_EOC6_SIZE 1 #define AVR32_ADC_IMR_EOC7 7 #define AVR32_ADC_IMR_EOC7_MASK 0x00000080 #define AVR32_ADC_IMR_EOC7_OFFSET 7 #define AVR32_ADC_IMR_EOC7_SIZE 1 #define AVR32_ADC_IMR_GOVRE 17 #define AVR32_ADC_IMR_GOVRE_MASK 0x00020000 #define AVR32_ADC_IMR_GOVRE_OFFSET 17 #define AVR32_ADC_IMR_GOVRE_SIZE 1 #define AVR32_ADC_IMR_OVRE0 8 #define AVR32_ADC_IMR_OVRE0_MASK 0x00000100 #define AVR32_ADC_IMR_OVRE0_OFFSET 8 #define AVR32_ADC_IMR_OVRE0_SIZE 1 #define AVR32_ADC_IMR_OVRE1 9 #define AVR32_ADC_IMR_OVRE1_MASK 0x00000200 #define AVR32_ADC_IMR_OVRE1_OFFSET 9 #define AVR32_ADC_IMR_OVRE1_SIZE 1 #define AVR32_ADC_IMR_OVRE2 10 #define AVR32_ADC_IMR_OVRE2_MASK 0x00000400 #define AVR32_ADC_IMR_OVRE2_OFFSET 10 #define AVR32_ADC_IMR_OVRE2_SIZE 1 #define AVR32_ADC_IMR_OVRE3 11 #define AVR32_ADC_IMR_OVRE3_MASK 0x00000800 #define AVR32_ADC_IMR_OVRE3_OFFSET 11 #define AVR32_ADC_IMR_OVRE3_SIZE 1 #define AVR32_ADC_IMR_OVRE4 12 #define AVR32_ADC_IMR_OVRE4_MASK 0x00001000 #define AVR32_ADC_IMR_OVRE4_OFFSET 12 #define AVR32_ADC_IMR_OVRE4_SIZE 1 #define AVR32_ADC_IMR_OVRE5 13 #define AVR32_ADC_IMR_OVRE5_MASK 0x00002000 #define AVR32_ADC_IMR_OVRE5_OFFSET 13 #define AVR32_ADC_IMR_OVRE5_SIZE 1 #define AVR32_ADC_IMR_OVRE6 14 #define AVR32_ADC_IMR_OVRE6_MASK 0x00004000 #define AVR32_ADC_IMR_OVRE6_OFFSET 14 #define AVR32_ADC_IMR_OVRE6_SIZE 1 #define AVR32_ADC_IMR_OVRE7 15 #define AVR32_ADC_IMR_OVRE7_MASK 0x00008000 #define AVR32_ADC_IMR_OVRE7_OFFSET 15 #define AVR32_ADC_IMR_OVRE7_SIZE 1 #define AVR32_ADC_IMR_RXBUFF 19 #define AVR32_ADC_IMR_RXBUFF_MASK 0x00080000 #define AVR32_ADC_IMR_RXBUFF_OFFSET 19 #define AVR32_ADC_IMR_RXBUFF_SIZE 1 #define AVR32_ADC_LCDR 0x00000020 #define AVR32_ADC_LCDR_LDATA 0 #define AVR32_ADC_LCDR_LDATA_MASK 0x000003ff #define AVR32_ADC_LCDR_LDATA_OFFSET 0 #define AVR32_ADC_LCDR_LDATA_SIZE 10 #define AVR32_ADC_LDATA 0 #define AVR32_ADC_LDATA_MASK 0x000003ff #define AVR32_ADC_LDATA_OFFSET 0 #define AVR32_ADC_LDATA_SIZE 10 #define AVR32_ADC_LOWRES 4 #define AVR32_ADC_LOWRES_MASK 0x00000010 #define AVR32_ADC_LOWRES_OFFSET 4 #define AVR32_ADC_LOWRES_SIZE 1 #define AVR32_ADC_MR 0x00000004 #define AVR32_ADC_MR_LOWRES 4 #define AVR32_ADC_MR_LOWRES_MASK 0x00000010 #define AVR32_ADC_MR_LOWRES_OFFSET 4 #define AVR32_ADC_MR_LOWRES_SIZE 1 #define AVR32_ADC_MR_PRESCAL 8 #define AVR32_ADC_MR_PRESCAL_MASK 0x0000ff00 #define AVR32_ADC_MR_PRESCAL_OFFSET 8 #define AVR32_ADC_MR_PRESCAL_SIZE 8 #define AVR32_ADC_MR_SHTIM 24 #define AVR32_ADC_MR_SHTIM_MASK 0x0f000000 #define AVR32_ADC_MR_SHTIM_OFFSET 24 #define AVR32_ADC_MR_SHTIM_SIZE 4 #define AVR32_ADC_MR_SLEEP 5 #define AVR32_ADC_MR_SLEEP_MASK 0x00000020 #define AVR32_ADC_MR_SLEEP_OFFSET 5 #define AVR32_ADC_MR_SLEEP_SIZE 1 #define AVR32_ADC_MR_STARTUP 16 #define AVR32_ADC_MR_STARTUP_MASK 0x007f0000 #define AVR32_ADC_MR_STARTUP_OFFSET 16 #define AVR32_ADC_MR_STARTUP_SIZE 7 #define AVR32_ADC_MR_TRGEN 0 #define AVR32_ADC_MR_TRGEN_MASK 0x00000001 #define AVR32_ADC_MR_TRGEN_OFFSET 0 #define AVR32_ADC_MR_TRGEN_SIZE 1 #define AVR32_ADC_MR_TRGSEL 1 #define AVR32_ADC_MR_TRGSEL_MASK 0x0000000e #define AVR32_ADC_MR_TRGSEL_OFFSET 1 #define AVR32_ADC_MR_TRGSEL_SIZE 3 #define AVR32_ADC_OVRE0 8 #define AVR32_ADC_OVRE0_MASK 0x00000100 #define AVR32_ADC_OVRE0_OFFSET 8 #define AVR32_ADC_OVRE0_SIZE 1 #define AVR32_ADC_OVRE1 9 #define AVR32_ADC_OVRE1_MASK 0x00000200 #define AVR32_ADC_OVRE1_OFFSET 9 #define AVR32_ADC_OVRE1_SIZE 1 #define AVR32_ADC_OVRE2 10 #define AVR32_ADC_OVRE2_MASK 0x00000400 #define AVR32_ADC_OVRE2_OFFSET 10 #define AVR32_ADC_OVRE2_SIZE 1 #define AVR32_ADC_OVRE3 11 #define AVR32_ADC_OVRE3_MASK 0x00000800 #define AVR32_ADC_OVRE3_OFFSET 11 #define AVR32_ADC_OVRE3_SIZE 1 #define AVR32_ADC_OVRE4 12 #define AVR32_ADC_OVRE4_MASK 0x00001000 #define AVR32_ADC_OVRE4_OFFSET 12 #define AVR32_ADC_OVRE4_SIZE 1 #define AVR32_ADC_OVRE5 13 #define AVR32_ADC_OVRE5_MASK 0x00002000 #define AVR32_ADC_OVRE5_OFFSET 13 #define AVR32_ADC_OVRE5_SIZE 1 #define AVR32_ADC_OVRE6 14 #define AVR32_ADC_OVRE6_MASK 0x00004000 #define AVR32_ADC_OVRE6_OFFSET 14 #define AVR32_ADC_OVRE6_SIZE 1 #define AVR32_ADC_OVRE7 15 #define AVR32_ADC_OVRE7_MASK 0x00008000 #define AVR32_ADC_OVRE7_OFFSET 15 #define AVR32_ADC_OVRE7_SIZE 1 #define AVR32_ADC_PRESCAL 8 #define AVR32_ADC_PRESCAL_MASK 0x0000ff00 #define AVR32_ADC_PRESCAL_OFFSET 8 #define AVR32_ADC_PRESCAL_SIZE 8 #define AVR32_ADC_RXBUFF 19 #define AVR32_ADC_RXBUFF_MASK 0x00080000 #define AVR32_ADC_RXBUFF_OFFSET 19 #define AVR32_ADC_RXBUFF_SIZE 1 #define AVR32_ADC_SHTIM 24 #define AVR32_ADC_SHTIM_MASK 0x0f000000 #define AVR32_ADC_SHTIM_OFFSET 24 #define AVR32_ADC_SHTIM_SIZE 4 #define AVR32_ADC_SLEEP 5 #define AVR32_ADC_SLEEP_MASK 0x00000020 #define AVR32_ADC_SLEEP_OFFSET 5 #define AVR32_ADC_SLEEP_SIZE 1 #define AVR32_ADC_SR 0x0000001c #define AVR32_ADC_SR_DRDY 16 #define AVR32_ADC_SR_DRDY_MASK 0x00010000 #define AVR32_ADC_SR_DRDY_OFFSET 16 #define AVR32_ADC_SR_DRDY_SIZE 1 #define AVR32_ADC_SR_ENDRX 18 #define AVR32_ADC_SR_ENDRX_MASK 0x00040000 #define AVR32_ADC_SR_ENDRX_OFFSET 18 #define AVR32_ADC_SR_ENDRX_SIZE 1 #define AVR32_ADC_SR_EOC0 0 #define AVR32_ADC_SR_EOC0_MASK 0x00000001 #define AVR32_ADC_SR_EOC0_OFFSET 0 #define AVR32_ADC_SR_EOC0_SIZE 1 #define AVR32_ADC_SR_EOC1 1 #define AVR32_ADC_SR_EOC1_MASK 0x00000002 #define AVR32_ADC_SR_EOC1_OFFSET 1 #define AVR32_ADC_SR_EOC1_SIZE 1 #define AVR32_ADC_SR_EOC2 2 #define AVR32_ADC_SR_EOC2_MASK 0x00000004 #define AVR32_ADC_SR_EOC2_OFFSET 2 #define AVR32_ADC_SR_EOC2_SIZE 1 #define AVR32_ADC_SR_EOC3 3 #define AVR32_ADC_SR_EOC3_MASK 0x00000008 #define AVR32_ADC_SR_EOC3_OFFSET 3 #define AVR32_ADC_SR_EOC3_SIZE 1 #define AVR32_ADC_SR_EOC4 4 #define AVR32_ADC_SR_EOC4_MASK 0x00000010 #define AVR32_ADC_SR_EOC4_OFFSET 4 #define AVR32_ADC_SR_EOC4_SIZE 1 #define AVR32_ADC_SR_EOC5 5 #define AVR32_ADC_SR_EOC5_MASK 0x00000020 #define AVR32_ADC_SR_EOC5_OFFSET 5 #define AVR32_ADC_SR_EOC5_SIZE 1 #define AVR32_ADC_SR_EOC6 6 #define AVR32_ADC_SR_EOC6_MASK 0x00000040 #define AVR32_ADC_SR_EOC6_OFFSET 6 #define AVR32_ADC_SR_EOC6_SIZE 1 #define AVR32_ADC_SR_EOC7 7 #define AVR32_ADC_SR_EOC7_MASK 0x00000080 #define AVR32_ADC_SR_EOC7_OFFSET 7 #define AVR32_ADC_SR_EOC7_SIZE 1 #define AVR32_ADC_SR_GOVRE 17 #define AVR32_ADC_SR_GOVRE_MASK 0x00020000 #define AVR32_ADC_SR_GOVRE_OFFSET 17 #define AVR32_ADC_SR_GOVRE_SIZE 1 #define AVR32_ADC_SR_OVRE0 8 #define AVR32_ADC_SR_OVRE0_MASK 0x00000100 #define AVR32_ADC_SR_OVRE0_OFFSET 8 #define AVR32_ADC_SR_OVRE0_SIZE 1 #define AVR32_ADC_SR_OVRE1 9 #define AVR32_ADC_SR_OVRE1_MASK 0x00000200 #define AVR32_ADC_SR_OVRE1_OFFSET 9 #define AVR32_ADC_SR_OVRE1_SIZE 1 #define AVR32_ADC_SR_OVRE2 10 #define AVR32_ADC_SR_OVRE2_MASK 0x00000400 #define AVR32_ADC_SR_OVRE2_OFFSET 10 #define AVR32_ADC_SR_OVRE2_SIZE 1 #define AVR32_ADC_SR_OVRE3 11 #define AVR32_ADC_SR_OVRE3_MASK 0x00000800 #define AVR32_ADC_SR_OVRE3_OFFSET 11 #define AVR32_ADC_SR_OVRE3_SIZE 1 #define AVR32_ADC_SR_OVRE4 12 #define AVR32_ADC_SR_OVRE4_MASK 0x00001000 #define AVR32_ADC_SR_OVRE4_OFFSET 12 #define AVR32_ADC_SR_OVRE4_SIZE 1 #define AVR32_ADC_SR_OVRE5 13 #define AVR32_ADC_SR_OVRE5_MASK 0x00002000 #define AVR32_ADC_SR_OVRE5_OFFSET 13 #define AVR32_ADC_SR_OVRE5_SIZE 1 #define AVR32_ADC_SR_OVRE6 14 #define AVR32_ADC_SR_OVRE6_MASK 0x00004000 #define AVR32_ADC_SR_OVRE6_OFFSET 14 #define AVR32_ADC_SR_OVRE6_SIZE 1 #define AVR32_ADC_SR_OVRE7 15 #define AVR32_ADC_SR_OVRE7_MASK 0x00008000 #define AVR32_ADC_SR_OVRE7_OFFSET 15 #define AVR32_ADC_SR_OVRE7_SIZE 1 #define AVR32_ADC_SR_RXBUFF 19 #define AVR32_ADC_SR_RXBUFF_MASK 0x00080000 #define AVR32_ADC_SR_RXBUFF_OFFSET 19 #define AVR32_ADC_SR_RXBUFF_SIZE 1 #define AVR32_ADC_START 1 #define AVR32_ADC_STARTUP 16 #define AVR32_ADC_STARTUP_MASK 0x007f0000 #define AVR32_ADC_STARTUP_OFFSET 16 #define AVR32_ADC_STARTUP_SIZE 7 #define AVR32_ADC_START_MASK 0x00000002 #define AVR32_ADC_START_OFFSET 1 #define AVR32_ADC_START_SIZE 1 #define AVR32_ADC_SWRST 0 #define AVR32_ADC_SWRST_MASK 0x00000001 #define AVR32_ADC_SWRST_OFFSET 0 #define AVR32_ADC_SWRST_SIZE 1 #define AVR32_ADC_TRGEN 0 #define AVR32_ADC_TRGEN_MASK 0x00000001 #define AVR32_ADC_TRGEN_OFFSET 0 #define AVR32_ADC_TRGEN_SIZE 1 #define AVR32_ADC_TRGSEL 1 #define AVR32_ADC_TRGSEL_MASK 0x0000000e #define AVR32_ADC_TRGSEL_OFFSET 1 #define AVR32_ADC_TRGSEL_SIZE 3 #define AVR32_ADC_VARIANT 16 #define AVR32_ADC_VARIANT_MASK 0x00070000 #define AVR32_ADC_VARIANT_OFFSET 16 #define AVR32_ADC_VARIANT_SIZE 3 #define AVR32_ADC_VERSION 0x000000fc #define AVR32_ADC_VERSION_MASK 0x00000fff #define AVR32_ADC_VERSION_OFFSET 0 #define AVR32_ADC_VERSION_SIZE 12 #define AVR32_ADC_VERSION_VARIANT 16 #define AVR32_ADC_VERSION_VARIANT_MASK 0x00070000 #define AVR32_ADC_VERSION_VARIANT_OFFSET 16 #define AVR32_ADC_VERSION_VARIANT_SIZE 3 #define AVR32_ADC_VERSION_VERSION 0 #define AVR32_ADC_VERSION_VERSION_MASK 0x00000fff #define AVR32_ADC_VERSION_VERSION_OFFSET 0 #define AVR32_ADC_VERSION_VERSION_SIZE 12 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_adc_cr_t { unsigned int :30; unsigned int start : 1; unsigned int swrst : 1; } avr32_adc_cr_t; typedef struct avr32_adc_mr_t { unsigned int : 4; unsigned int shtim : 4; unsigned int : 1; unsigned int startup : 7; unsigned int prescal : 8; unsigned int : 2; unsigned int sleep : 1; unsigned int lowres : 1; unsigned int trgsel : 3; unsigned int trgen : 1; } avr32_adc_mr_t; typedef struct avr32_adc_cher_t { unsigned int :24; unsigned int ch7 : 1; unsigned int ch6 : 1; unsigned int ch5 : 1; unsigned int ch4 : 1; unsigned int ch3 : 1; unsigned int ch2 : 1; unsigned int ch1 : 1; unsigned int ch0 : 1; } avr32_adc_cher_t; typedef struct avr32_adc_chdr_t { unsigned int :24; unsigned int ch7 : 1; unsigned int ch6 : 1; unsigned int ch5 : 1; unsigned int ch4 : 1; unsigned int ch3 : 1; unsigned int ch2 : 1; unsigned int ch1 : 1; unsigned int ch0 : 1; } avr32_adc_chdr_t; typedef struct avr32_adc_chsr_t { unsigned int :24; unsigned int ch7 : 1; unsigned int ch6 : 1; unsigned int ch5 : 1; unsigned int ch4 : 1; unsigned int ch3 : 1; unsigned int ch2 : 1; unsigned int ch1 : 1; unsigned int ch0 : 1; } avr32_adc_chsr_t; typedef struct avr32_adc_sr_t { unsigned int :12; unsigned int rxbuff : 1; unsigned int endrx : 1; unsigned int govre : 1; unsigned int drdy : 1; unsigned int ovre7 : 1; unsigned int ovre6 : 1; unsigned int ovre5 : 1; unsigned int ovre4 : 1; unsigned int ovre3 : 1; unsigned int ovre2 : 1; unsigned int ovre1 : 1; unsigned int ovre0 : 1; unsigned int eoc7 : 1; unsigned int eoc6 : 1; unsigned int eoc5 : 1; unsigned int eoc4 : 1; unsigned int eoc3 : 1; unsigned int eoc2 : 1; unsigned int eoc1 : 1; unsigned int eoc0 : 1; } avr32_adc_sr_t; typedef struct avr32_adc_lcdr_t { unsigned int :22; unsigned int ldata :10; } avr32_adc_lcdr_t; typedef struct avr32_adc_ier_t { unsigned int :12; unsigned int rxbuff : 1; unsigned int endrx : 1; unsigned int govre : 1; unsigned int drdy : 1; unsigned int ovre7 : 1; unsigned int ovre6 : 1; unsigned int ovre5 : 1; unsigned int ovre4 : 1; unsigned int ovre3 : 1; unsigned int ovre2 : 1; unsigned int ovre1 : 1; unsigned int ovre0 : 1; unsigned int eoc7 : 1; unsigned int eoc6 : 1; unsigned int eoc5 : 1; unsigned int eoc4 : 1; unsigned int eoc3 : 1; unsigned int eoc2 : 1; unsigned int eoc1 : 1; unsigned int eoc0 : 1; } avr32_adc_ier_t; typedef struct avr32_adc_idr_t { unsigned int :12; unsigned int rxbuff : 1; unsigned int endrx : 1; unsigned int govre : 1; unsigned int drdy : 1; unsigned int ovre7 : 1; unsigned int ovre6 : 1; unsigned int ovre5 : 1; unsigned int ovre4 : 1; unsigned int ovre3 : 1; unsigned int ovre2 : 1; unsigned int ovre1 : 1; unsigned int ovre0 : 1; unsigned int eoc7 : 1; unsigned int eoc6 : 1; unsigned int eoc5 : 1; unsigned int eoc4 : 1; unsigned int eoc3 : 1; unsigned int eoc2 : 1; unsigned int eoc1 : 1; unsigned int eoc0 : 1; } avr32_adc_idr_t; typedef struct avr32_adc_imr_t { unsigned int :12; unsigned int rxbuff : 1; unsigned int endrx : 1; unsigned int govre : 1; unsigned int drdy : 1; unsigned int ovre7 : 1; unsigned int ovre6 : 1; unsigned int ovre5 : 1; unsigned int ovre4 : 1; unsigned int ovre3 : 1; unsigned int ovre2 : 1; unsigned int ovre1 : 1; unsigned int ovre0 : 1; unsigned int eoc7 : 1; unsigned int eoc6 : 1; unsigned int eoc5 : 1; unsigned int eoc4 : 1; unsigned int eoc3 : 1; unsigned int eoc2 : 1; unsigned int eoc1 : 1; unsigned int eoc0 : 1; } avr32_adc_imr_t; typedef struct avr32_adc_cdr0_t { unsigned int :22; unsigned int data :10; } avr32_adc_cdr0_t; typedef struct avr32_adc_cdr1_t { unsigned int :22; unsigned int data :10; } avr32_adc_cdr1_t; typedef struct avr32_adc_cdr2_t { unsigned int :22; unsigned int data :10; } avr32_adc_cdr2_t; typedef struct avr32_adc_cdr3_t { unsigned int :22; unsigned int data :10; } avr32_adc_cdr3_t; typedef struct avr32_adc_cdr4_t { unsigned int :22; unsigned int data :10; } avr32_adc_cdr4_t; typedef struct avr32_adc_cdr5_t { unsigned int :22; unsigned int data :10; } avr32_adc_cdr5_t; typedef struct avr32_adc_cdr6_t { unsigned int :22; unsigned int data :10; } avr32_adc_cdr6_t; typedef struct avr32_adc_cdr7_t { unsigned int :22; unsigned int data :10; } avr32_adc_cdr7_t; typedef struct avr32_adc_version_t { unsigned int :13; unsigned int variant : 3; unsigned int : 4; unsigned int version :12; } avr32_adc_version_t; typedef struct avr32_adc_t { union { unsigned long cr ;//0x0000 avr32_adc_cr_t CR ; }; union { unsigned long mr ;//0x0004 avr32_adc_mr_t MR ; }; unsigned int :32 ;//0x0008 unsigned int :32 ;//0x000c union { unsigned long cher ;//0x0010 avr32_adc_cher_t CHER ; }; union { unsigned long chdr ;//0x0014 avr32_adc_chdr_t CHDR ; }; union { const unsigned long chsr ;//0x0018 const avr32_adc_chsr_t CHSR ; }; union { const unsigned long sr ;//0x001c const avr32_adc_sr_t SR ; }; union { const unsigned long lcdr ;//0x0020 const avr32_adc_lcdr_t LCDR ; }; union { unsigned long ier ;//0x0024 avr32_adc_ier_t IER ; }; union { unsigned long idr ;//0x0028 avr32_adc_idr_t IDR ; }; union { const unsigned long imr ;//0x002c const avr32_adc_imr_t IMR ; }; union { const unsigned long cdr0 ;//0x0030 const avr32_adc_cdr0_t CDR0 ; }; union { const unsigned long cdr1 ;//0x0034 const avr32_adc_cdr1_t CDR1 ; }; union { const unsigned long cdr2 ;//0x0038 const avr32_adc_cdr2_t CDR2 ; }; union { const unsigned long cdr3 ;//0x003c const avr32_adc_cdr3_t CDR3 ; }; union { const unsigned long cdr4 ;//0x0040 const avr32_adc_cdr4_t CDR4 ; }; union { const unsigned long cdr5 ;//0x0044 const avr32_adc_cdr5_t CDR5 ; }; union { const unsigned long cdr6 ;//0x0048 const avr32_adc_cdr6_t CDR6 ; }; union { const unsigned long cdr7 ;//0x004c const avr32_adc_cdr7_t CDR7 ; }; unsigned int :32 ;//0x0050 unsigned int :32 ;//0x0054 unsigned int :32 ;//0x0058 unsigned int :32 ;//0x005c unsigned int :32 ;//0x0060 unsigned int :32 ;//0x0064 unsigned int :32 ;//0x0068 unsigned int :32 ;//0x006c unsigned int :32 ;//0x0070 unsigned int :32 ;//0x0074 unsigned int :32 ;//0x0078 unsigned int :32 ;//0x007c unsigned int :32 ;//0x0080 unsigned int :32 ;//0x0084 unsigned int :32 ;//0x0088 unsigned int :32 ;//0x008c unsigned int :32 ;//0x0090 unsigned int :32 ;//0x0094 unsigned int :32 ;//0x0098 unsigned int :32 ;//0x009c unsigned int :32 ;//0x00a0 unsigned int :32 ;//0x00a4 unsigned int :32 ;//0x00a8 unsigned int :32 ;//0x00ac unsigned int :32 ;//0x00b0 unsigned int :32 ;//0x00b4 unsigned int :32 ;//0x00b8 unsigned int :32 ;//0x00bc unsigned int :32 ;//0x00c0 unsigned int :32 ;//0x00c4 unsigned int :32 ;//0x00c8 unsigned int :32 ;//0x00cc unsigned int :32 ;//0x00d0 unsigned int :32 ;//0x00d4 unsigned int :32 ;//0x00d8 unsigned int :32 ;//0x00dc unsigned int :32 ;//0x00e0 unsigned int :32 ;//0x00e4 unsigned int :32 ;//0x00e8 unsigned int :32 ;//0x00ec unsigned int :32 ;//0x00f0 unsigned int :32 ;//0x00f4 unsigned int :32 ;//0x00f8 union { const unsigned long version ;//0x00fc const avr32_adc_version_t VERSION ; }; } avr32_adc_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif /*#ifdef AVR32_ADC_200_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/core_sc0_130.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 : UC3000 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_CORE_SC0_130_H_INCLUDED #define AVR32_CORE_SC0_130_H_INCLUDED #define AVR32_CORE_SC0_H_VERSION 130 #include "avr32/abi.h" #define AVR32_CORE_ID "SC0" #define AVR32_ACBA 0x00000008 #define AVR32_BEAR 0x0000013c #define AVR32_COMPARE 0x0000010c #define AVR32_CONFIG0 0x00000100 #define AVR32_CONFIG0_AR 10 #define AVR32_CONFIG0_AR_MASK 0x00001c00 #define AVR32_CONFIG0_AR_OFFSET 10 #define AVR32_CONFIG0_AR_SIZE 3 #define AVR32_CONFIG0_AT 13 #define AVR32_CONFIG0_AT_AVR32A 0x00000000 #define AVR32_CONFIG0_AT_AVR32B 0x00000001 #define AVR32_CONFIG0_AT_MASK 0x0000e000 #define AVR32_CONFIG0_AT_OFFSET 13 #define AVR32_CONFIG0_AT_SIZE 3 #define AVR32_CONFIG0_D 1 #define AVR32_CONFIG0_D_MASK 0x00000002 #define AVR32_CONFIG0_D_OFFSET 1 #define AVR32_CONFIG0_D_SIZE 1 #define AVR32_CONFIG0_F 6 #define AVR32_CONFIG0_F_MASK 0x00000040 #define AVR32_CONFIG0_F_OFFSET 6 #define AVR32_CONFIG0_F_SIZE 1 #define AVR32_CONFIG0_J 5 #define AVR32_CONFIG0_J_MASK 0x00000020 #define AVR32_CONFIG0_J_OFFSET 5 #define AVR32_CONFIG0_J_SIZE 1 #define AVR32_CONFIG0_MMUT 7 #define AVR32_CONFIG0_MMUT_ITLB_DTLB 0x00000001 #define AVR32_CONFIG0_MMUT_MASK 0x00000380 #define AVR32_CONFIG0_MMUT_MPU 0x00000003 #define AVR32_CONFIG0_MMUT_NONE 0x00000000 #define AVR32_CONFIG0_MMUT_OFFSET 7 #define AVR32_CONFIG0_MMUT_SHARED_TLB 0x00000002 #define AVR32_CONFIG0_MMUT_SIZE 3 #define AVR32_CONFIG0_O 3 #define AVR32_CONFIG0_O_MASK 0x00000008 #define AVR32_CONFIG0_O_OFFSET 3 #define AVR32_CONFIG0_O_SIZE 1 #define AVR32_CONFIG0_P 4 #define AVR32_CONFIG0_PROCESSORID 24 #define AVR32_CONFIG0_PROCESSORID_AP7 0x00000001 #define AVR32_CONFIG0_PROCESSORID_MASK 0xff000000 #define AVR32_CONFIG0_PROCESSORID_OFFSET 24 #define AVR32_CONFIG0_PROCESSORID_SIZE 8 #define AVR32_CONFIG0_PROCESSORID_UC3 0x00000002 #define AVR32_CONFIG0_PROCESSORREVISION 16 #define AVR32_CONFIG0_PROCESSORREVISION_MASK 0x000f0000 #define AVR32_CONFIG0_PROCESSORREVISION_OFFSET 16 #define AVR32_CONFIG0_PROCESSORREVISION_SIZE 4 #define AVR32_CONFIG0_P_MASK 0x00000010 #define AVR32_CONFIG0_P_OFFSET 4 #define AVR32_CONFIG0_P_SIZE 1 #define AVR32_CONFIG0_R 0 #define AVR32_CONFIG0_R_MASK 0x00000001 #define AVR32_CONFIG0_R_OFFSET 0 #define AVR32_CONFIG0_R_SIZE 1 #define AVR32_CONFIG0_S 2 #define AVR32_CONFIG0_S_MASK 0x00000004 #define AVR32_CONFIG0_S_OFFSET 2 #define AVR32_CONFIG0_S_SIZE 1 #define AVR32_CONFIG1 0x00000104 #define AVR32_CONFIG1_DASS 0 #define AVR32_CONFIG1_DASS_MASK 0x00000007 #define AVR32_CONFIG1_DASS_OFFSET 0 #define AVR32_CONFIG1_DASS_SIZE 3 #define AVR32_CONFIG1_DLSZ 3 #define AVR32_CONFIG1_DLSZ_MASK 0x00000038 #define AVR32_CONFIG1_DLSZ_OFFSET 3 #define AVR32_CONFIG1_DLSZ_SIZE 3 #define AVR32_CONFIG1_DMMUSZ 20 #define AVR32_CONFIG1_DMMUSZ_MASK 0x03f00000 #define AVR32_CONFIG1_DMMUSZ_OFFSET 20 #define AVR32_CONFIG1_DMMUSZ_SIZE 6 #define AVR32_CONFIG1_DSET 6 #define AVR32_CONFIG1_DSET_MASK 0x000003c0 #define AVR32_CONFIG1_DSET_OFFSET 6 #define AVR32_CONFIG1_DSET_SIZE 4 #define AVR32_CONFIG1_IASS 10 #define AVR32_CONFIG1_IASS_MASK 0x00001c00 #define AVR32_CONFIG1_IASS_OFFSET 10 #define AVR32_CONFIG1_IASS_SIZE 3 #define AVR32_CONFIG1_ILSZ 13 #define AVR32_CONFIG1_ILSZ_MASK 0x0000e000 #define AVR32_CONFIG1_ILSZ_OFFSET 13 #define AVR32_CONFIG1_ILSZ_SIZE 3 #define AVR32_CONFIG1_IMMUSZ 26 #define AVR32_CONFIG1_IMMUSZ_MASK 0xfc000000 #define AVR32_CONFIG1_IMMUSZ_OFFSET 26 #define AVR32_CONFIG1_IMMUSZ_SIZE 6 #define AVR32_CONFIG1_ISET 16 #define AVR32_CONFIG1_ISET_MASK 0x000f0000 #define AVR32_CONFIG1_ISET_OFFSET 16 #define AVR32_CONFIG1_ISET_SIZE 4 #define AVR32_COUNT 0x00000108 #define AVR32_CPUCR 0x0000000c #define AVR32_CPUCR_COP 1 #define AVR32_CPUCR_COP_MASK 0x0000003e #define AVR32_CPUCR_COP_OFFSET 1 #define AVR32_CPUCR_COP_SIZE 5 #define AVR32_CPUCR_CPL 6 #define AVR32_CPUCR_CPL_MASK 0x000007c0 #define AVR32_CPUCR_CPL_OFFSET 6 #define AVR32_CPUCR_CPL_SIZE 5 #define AVR32_CPUCR_LOCEN 16 #define AVR32_CPUCR_LOCEN_MASK 0x00010000 #define AVR32_CPUCR_LOCEN_OFFSET 16 #define AVR32_CPUCR_LOCEN_SIZE 1 #define AVR32_CPUCR_SIE 0 #define AVR32_CPUCR_SIE_MASK 0x00000001 #define AVR32_CPUCR_SIE_OFFSET 0 #define AVR32_CPUCR_SIE_SIZE 1 #define AVR32_CPUCR_SPL 11 #define AVR32_CPUCR_SPL_MASK 0x0000f800 #define AVR32_CPUCR_SPL_OFFSET 11 #define AVR32_CPUCR_SPL_SIZE 5 #define AVR32_ECR 0x00000010 #define AVR32_ECR_ECR 0 #define AVR32_ECR_ECR_ADDR_ALIGN_R 0x0000000d #define AVR32_ECR_ECR_ADDR_ALIGN_W 0x0000000e #define AVR32_ECR_ECR_ADDR_ALIGN_X 0x00000005 #define AVR32_ECR_ECR_BUS_ERROR_READ 0x00000003 #define AVR32_ECR_ECR_BUS_ERROR_WRITE 0x00000002 #define AVR32_ECR_ECR_COPROC_ABSENT 0x0000000c #define AVR32_ECR_ECR_DEBUG 0x00000007 #define AVR32_ECR_ECR_DTLB_MODIFIED 0x00000011 #define AVR32_ECR_ECR_FPE 0x0000000b #define AVR32_ECR_ECR_ILLEGAL_OPCODE 0x00000008 #define AVR32_ECR_ECR_MASK 0xffffffff #define AVR32_ECR_ECR_NMI 0x00000004 #define AVR32_ECR_ECR_OFFSET 0 #define AVR32_ECR_ECR_PRIVILEGE_VIOLATION 0x0000000a #define AVR32_ECR_ECR_PROTECTION_R 0x0000000f #define AVR32_ECR_ECR_PROTECTION_W 0x00000010 #define AVR32_ECR_ECR_PROTECTION_X 0x00000006 #define AVR32_ECR_ECR_SIZE 32 #define AVR32_ECR_ECR_TLB_MISS_R 0x00000018 #define AVR32_ECR_ECR_TLB_MISS_W 0x0000001c #define AVR32_ECR_ECR_TLB_MISS_X 0x00000014 #define AVR32_ECR_ECR_TLB_MULTIPLE 0x00000001 #define AVR32_ECR_ECR_UNIMPL_INSTRUCTION 0x00000009 #define AVR32_ECR_ECR_UNRECOVERABLE 0x00000000 #define AVR32_EVBA 0x00000004 #define AVR32_MPUAPRA 0x00000190 #define AVR32_MPUAPRA_AP0 0 #define AVR32_MPUAPRA_AP0_MASK 0x0000000f #define AVR32_MPUAPRA_AP0_OFFSET 0 #define AVR32_MPUAPRA_AP0_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRA_AP0_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRA_AP0_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRA_AP0_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRA_AP0_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRA_AP0_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRA_AP0_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRA_AP0_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRA_AP0_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRA_AP0_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRA_AP0_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRA_AP0_SIZE 4 #define AVR32_MPUAPRA_AP1 4 #define AVR32_MPUAPRA_AP1_MASK 0x000000f0 #define AVR32_MPUAPRA_AP1_OFFSET 4 #define AVR32_MPUAPRA_AP1_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRA_AP1_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRA_AP1_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRA_AP1_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRA_AP1_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRA_AP1_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRA_AP1_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRA_AP1_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRA_AP1_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRA_AP1_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRA_AP1_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRA_AP1_SIZE 4 #define AVR32_MPUAPRA_AP2 8 #define AVR32_MPUAPRA_AP2_MASK 0x00000f00 #define AVR32_MPUAPRA_AP2_OFFSET 8 #define AVR32_MPUAPRA_AP2_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRA_AP2_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRA_AP2_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRA_AP2_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRA_AP2_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRA_AP2_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRA_AP2_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRA_AP2_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRA_AP2_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRA_AP2_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRA_AP2_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRA_AP2_SIZE 4 #define AVR32_MPUAPRA_AP3 12 #define AVR32_MPUAPRA_AP3_MASK 0x0000f000 #define AVR32_MPUAPRA_AP3_OFFSET 12 #define AVR32_MPUAPRA_AP3_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRA_AP3_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRA_AP3_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRA_AP3_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRA_AP3_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRA_AP3_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRA_AP3_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRA_AP3_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRA_AP3_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRA_AP3_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRA_AP3_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRA_AP3_SIZE 4 #define AVR32_MPUAPRA_AP4 16 #define AVR32_MPUAPRA_AP4_MASK 0x000f0000 #define AVR32_MPUAPRA_AP4_OFFSET 16 #define AVR32_MPUAPRA_AP4_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRA_AP4_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRA_AP4_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRA_AP4_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRA_AP4_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRA_AP4_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRA_AP4_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRA_AP4_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRA_AP4_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRA_AP4_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRA_AP4_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRA_AP4_SIZE 4 #define AVR32_MPUAPRA_AP5 20 #define AVR32_MPUAPRA_AP5_MASK 0x00f00000 #define AVR32_MPUAPRA_AP5_OFFSET 20 #define AVR32_MPUAPRA_AP5_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRA_AP5_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRA_AP5_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRA_AP5_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRA_AP5_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRA_AP5_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRA_AP5_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRA_AP5_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRA_AP5_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRA_AP5_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRA_AP5_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRA_AP5_SIZE 4 #define AVR32_MPUAPRA_AP6 24 #define AVR32_MPUAPRA_AP6_MASK 0x0f000000 #define AVR32_MPUAPRA_AP6_OFFSET 24 #define AVR32_MPUAPRA_AP6_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRA_AP6_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRA_AP6_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRA_AP6_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRA_AP6_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRA_AP6_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRA_AP6_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRA_AP6_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRA_AP6_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRA_AP6_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRA_AP6_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRA_AP6_SIZE 4 #define AVR32_MPUAPRA_AP7 28 #define AVR32_MPUAPRA_AP7_MASK 0xf0000000 #define AVR32_MPUAPRA_AP7_OFFSET 28 #define AVR32_MPUAPRA_AP7_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRA_AP7_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRA_AP7_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRA_AP7_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRA_AP7_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRA_AP7_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRA_AP7_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRA_AP7_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRA_AP7_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRA_AP7_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRA_AP7_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRA_AP7_SIZE 4 #define AVR32_MPUAPRB 0x00000194 #define AVR32_MPUAPRB_AP0 0 #define AVR32_MPUAPRB_AP0_MASK 0x0000000f #define AVR32_MPUAPRB_AP0_OFFSET 0 #define AVR32_MPUAPRB_AP0_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRB_AP0_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRB_AP0_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRB_AP0_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRB_AP0_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRB_AP0_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRB_AP0_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRB_AP0_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRB_AP0_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRB_AP0_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRB_AP0_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRB_AP0_SIZE 4 #define AVR32_MPUAPRB_AP1 4 #define AVR32_MPUAPRB_AP1_MASK 0x000000f0 #define AVR32_MPUAPRB_AP1_OFFSET 4 #define AVR32_MPUAPRB_AP1_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRB_AP1_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRB_AP1_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRB_AP1_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRB_AP1_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRB_AP1_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRB_AP1_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRB_AP1_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRB_AP1_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRB_AP1_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRB_AP1_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRB_AP1_SIZE 4 #define AVR32_MPUAPRB_AP2 8 #define AVR32_MPUAPRB_AP2_MASK 0x00000f00 #define AVR32_MPUAPRB_AP2_OFFSET 8 #define AVR32_MPUAPRB_AP2_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRB_AP2_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRB_AP2_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRB_AP2_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRB_AP2_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRB_AP2_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRB_AP2_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRB_AP2_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRB_AP2_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRB_AP2_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRB_AP2_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRB_AP2_SIZE 4 #define AVR32_MPUAPRB_AP3 12 #define AVR32_MPUAPRB_AP3_MASK 0x0000f000 #define AVR32_MPUAPRB_AP3_OFFSET 12 #define AVR32_MPUAPRB_AP3_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRB_AP3_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRB_AP3_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRB_AP3_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRB_AP3_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRB_AP3_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRB_AP3_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRB_AP3_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRB_AP3_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRB_AP3_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRB_AP3_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRB_AP3_SIZE 4 #define AVR32_MPUAPRB_AP4 16 #define AVR32_MPUAPRB_AP4_MASK 0x000f0000 #define AVR32_MPUAPRB_AP4_OFFSET 16 #define AVR32_MPUAPRB_AP4_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRB_AP4_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRB_AP4_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRB_AP4_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRB_AP4_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRB_AP4_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRB_AP4_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRB_AP4_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRB_AP4_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRB_AP4_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRB_AP4_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRB_AP4_SIZE 4 #define AVR32_MPUAPRB_AP5 20 #define AVR32_MPUAPRB_AP5_MASK 0x00f00000 #define AVR32_MPUAPRB_AP5_OFFSET 20 #define AVR32_MPUAPRB_AP5_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRB_AP5_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRB_AP5_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRB_AP5_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRB_AP5_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRB_AP5_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRB_AP5_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRB_AP5_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRB_AP5_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRB_AP5_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRB_AP5_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRB_AP5_SIZE 4 #define AVR32_MPUAPRB_AP6 24 #define AVR32_MPUAPRB_AP6_MASK 0x0f000000 #define AVR32_MPUAPRB_AP6_OFFSET 24 #define AVR32_MPUAPRB_AP6_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRB_AP6_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRB_AP6_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRB_AP6_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRB_AP6_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRB_AP6_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRB_AP6_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRB_AP6_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRB_AP6_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRB_AP6_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRB_AP6_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRB_AP6_SIZE 4 #define AVR32_MPUAPRB_AP7 28 #define AVR32_MPUAPRB_AP7_MASK 0xf0000000 #define AVR32_MPUAPRB_AP7_OFFSET 28 #define AVR32_MPUAPRB_AP7_PRIV_NONE_UNPRIV_NONE 0x0000000a #define AVR32_MPUAPRB_AP7_PRIV_RWX_UNPRIV_NONE 0x00000003 #define AVR32_MPUAPRB_AP7_PRIV_RWX_UNPRIV_RWX 0x00000007 #define AVR32_MPUAPRB_AP7_PRIV_RW_UNPRIV_NONE 0x00000002 #define AVR32_MPUAPRB_AP7_PRIV_RW_UNPRIV_R 0x00000008 #define AVR32_MPUAPRB_AP7_PRIV_RW_UNPRIV_RW 0x00000006 #define AVR32_MPUAPRB_AP7_PRIV_RW_UNPRIV_RX 0x00000009 #define AVR32_MPUAPRB_AP7_PRIV_RX_UNPRIV_NONE 0x00000001 #define AVR32_MPUAPRB_AP7_PRIV_RX_UNPRIV_RX 0x00000005 #define AVR32_MPUAPRB_AP7_PRIV_R_UNPRIV_NONE 0x00000000 #define AVR32_MPUAPRB_AP7_PRIV_R_UNPRIV_R 0x00000004 #define AVR32_MPUAPRB_AP7_SIZE 4 #define AVR32_MPUAR0 0x00000140 #define AVR32_MPUAR0_BASE 12 #define AVR32_MPUAR0_BASE_MASK 0xfffff000 #define AVR32_MPUAR0_BASE_OFFSET 12 #define AVR32_MPUAR0_BASE_SIZE 20 #define AVR32_MPUAR0_SIZE 1 #define AVR32_MPUAR0_SIZE_MASK 0x0000003e #define AVR32_MPUAR0_SIZE_OFFSET 1 #define AVR32_MPUAR0_SIZE_SIZE 5 #define AVR32_MPUAR0_V 0 #define AVR32_MPUAR0_V_MASK 0x00000001 #define AVR32_MPUAR0_V_OFFSET 0 #define AVR32_MPUAR0_V_SIZE 1 #define AVR32_MPUAR1 0x00000144 #define AVR32_MPUAR1_BASE 12 #define AVR32_MPUAR1_BASE_MASK 0xfffff000 #define AVR32_MPUAR1_BASE_OFFSET 12 #define AVR32_MPUAR1_BASE_SIZE 20 #define AVR32_MPUAR1_SIZE 1 #define AVR32_MPUAR1_SIZE_MASK 0x0000003e #define AVR32_MPUAR1_SIZE_OFFSET 1 #define AVR32_MPUAR1_SIZE_SIZE 5 #define AVR32_MPUAR1_V 0 #define AVR32_MPUAR1_V_MASK 0x00000001 #define AVR32_MPUAR1_V_OFFSET 0 #define AVR32_MPUAR1_V_SIZE 1 #define AVR32_MPUAR2 0x00000148 #define AVR32_MPUAR2_BASE 12 #define AVR32_MPUAR2_BASE_MASK 0xfffff000 #define AVR32_MPUAR2_BASE_OFFSET 12 #define AVR32_MPUAR2_BASE_SIZE 20 #define AVR32_MPUAR2_SIZE 1 #define AVR32_MPUAR2_SIZE_MASK 0x0000003e #define AVR32_MPUAR2_SIZE_OFFSET 1 #define AVR32_MPUAR2_SIZE_SIZE 5 #define AVR32_MPUAR2_V 0 #define AVR32_MPUAR2_V_MASK 0x00000001 #define AVR32_MPUAR2_V_OFFSET 0 #define AVR32_MPUAR2_V_SIZE 1 #define AVR32_MPUAR3 0x0000014c #define AVR32_MPUAR3_BASE 12 #define AVR32_MPUAR3_BASE_MASK 0xfffff000 #define AVR32_MPUAR3_BASE_OFFSET 12 #define AVR32_MPUAR3_BASE_SIZE 20 #define AVR32_MPUAR3_SIZE 1 #define AVR32_MPUAR3_SIZE_MASK 0x0000003e #define AVR32_MPUAR3_SIZE_OFFSET 1 #define AVR32_MPUAR3_SIZE_SIZE 5 #define AVR32_MPUAR3_V 0 #define AVR32_MPUAR3_V_MASK 0x00000001 #define AVR32_MPUAR3_V_OFFSET 0 #define AVR32_MPUAR3_V_SIZE 1 #define AVR32_MPUAR4 0x00000150 #define AVR32_MPUAR4_BASE 12 #define AVR32_MPUAR4_BASE_MASK 0xfffff000 #define AVR32_MPUAR4_BASE_OFFSET 12 #define AVR32_MPUAR4_BASE_SIZE 20 #define AVR32_MPUAR4_SIZE 1 #define AVR32_MPUAR4_SIZE_MASK 0x0000003e #define AVR32_MPUAR4_SIZE_OFFSET 1 #define AVR32_MPUAR4_SIZE_SIZE 5 #define AVR32_MPUAR4_V 0 #define AVR32_MPUAR4_V_MASK 0x00000001 #define AVR32_MPUAR4_V_OFFSET 0 #define AVR32_MPUAR4_V_SIZE 1 #define AVR32_MPUAR5 0x00000154 #define AVR32_MPUAR5_BASE 12 #define AVR32_MPUAR5_BASE_MASK 0xfffff000 #define AVR32_MPUAR5_BASE_OFFSET 12 #define AVR32_MPUAR5_BASE_SIZE 20 #define AVR32_MPUAR5_SIZE 1 #define AVR32_MPUAR5_SIZE_MASK 0x0000003e #define AVR32_MPUAR5_SIZE_OFFSET 1 #define AVR32_MPUAR5_SIZE_SIZE 5 #define AVR32_MPUAR5_V 0 #define AVR32_MPUAR5_V_MASK 0x00000001 #define AVR32_MPUAR5_V_OFFSET 0 #define AVR32_MPUAR5_V_SIZE 1 #define AVR32_MPUAR6 0x00000158 #define AVR32_MPUAR6_BASE 12 #define AVR32_MPUAR6_BASE_MASK 0xfffff000 #define AVR32_MPUAR6_BASE_OFFSET 12 #define AVR32_MPUAR6_BASE_SIZE 20 #define AVR32_MPUAR6_SIZE 1 #define AVR32_MPUAR6_SIZE_MASK 0x0000003e #define AVR32_MPUAR6_SIZE_OFFSET 1 #define AVR32_MPUAR6_SIZE_SIZE 5 #define AVR32_MPUAR6_V 0 #define AVR32_MPUAR6_V_MASK 0x00000001 #define AVR32_MPUAR6_V_OFFSET 0 #define AVR32_MPUAR6_V_SIZE 1 #define AVR32_MPUAR7 0x0000015c #define AVR32_MPUAR7_BASE 12 #define AVR32_MPUAR7_BASE_MASK 0xfffff000 #define AVR32_MPUAR7_BASE_OFFSET 12 #define AVR32_MPUAR7_BASE_SIZE 20 #define AVR32_MPUAR7_SIZE 1 #define AVR32_MPUAR7_SIZE_MASK 0x0000003e #define AVR32_MPUAR7_SIZE_OFFSET 1 #define AVR32_MPUAR7_SIZE_SIZE 5 #define AVR32_MPUAR7_V 0 #define AVR32_MPUAR7_V_MASK 0x00000001 #define AVR32_MPUAR7_V_OFFSET 0 #define AVR32_MPUAR7_V_SIZE 1 #define AVR32_MPUBRA 0x00000188 #define AVR32_MPUBRA_B0 0 #define AVR32_MPUBRA_B0_MASK 0x00000001 #define AVR32_MPUBRA_B0_OFFSET 0 #define AVR32_MPUBRA_B0_SIZE 1 #define AVR32_MPUBRA_B1 1 #define AVR32_MPUBRA_B1_MASK 0x00000002 #define AVR32_MPUBRA_B1_OFFSET 1 #define AVR32_MPUBRA_B1_SIZE 1 #define AVR32_MPUBRA_B2 2 #define AVR32_MPUBRA_B2_MASK 0x00000004 #define AVR32_MPUBRA_B2_OFFSET 2 #define AVR32_MPUBRA_B2_SIZE 1 #define AVR32_MPUBRA_B3 3 #define AVR32_MPUBRA_B3_MASK 0x00000008 #define AVR32_MPUBRA_B3_OFFSET 3 #define AVR32_MPUBRA_B3_SIZE 1 #define AVR32_MPUBRA_B4 4 #define AVR32_MPUBRA_B4_MASK 0x00000010 #define AVR32_MPUBRA_B4_OFFSET 4 #define AVR32_MPUBRA_B4_SIZE 1 #define AVR32_MPUBRA_B5 5 #define AVR32_MPUBRA_B5_MASK 0x00000020 #define AVR32_MPUBRA_B5_OFFSET 5 #define AVR32_MPUBRA_B5_SIZE 1 #define AVR32_MPUBRA_B6 6 #define AVR32_MPUBRA_B6_MASK 0x00000040 #define AVR32_MPUBRA_B6_OFFSET 6 #define AVR32_MPUBRA_B6_SIZE 1 #define AVR32_MPUBRA_B7 7 #define AVR32_MPUBRA_B7_MASK 0x00000080 #define AVR32_MPUBRA_B7_OFFSET 7 #define AVR32_MPUBRA_B7_SIZE 1 #define AVR32_MPUBRB 0x0000018c #define AVR32_MPUBRB_B0 0 #define AVR32_MPUBRB_B0_MASK 0x00000001 #define AVR32_MPUBRB_B0_OFFSET 0 #define AVR32_MPUBRB_B0_SIZE 1 #define AVR32_MPUBRB_B1 1 #define AVR32_MPUBRB_B1_MASK 0x00000002 #define AVR32_MPUBRB_B1_OFFSET 1 #define AVR32_MPUBRB_B1_SIZE 1 #define AVR32_MPUBRB_B2 2 #define AVR32_MPUBRB_B2_MASK 0x00000004 #define AVR32_MPUBRB_B2_OFFSET 2 #define AVR32_MPUBRB_B2_SIZE 1 #define AVR32_MPUBRB_B3 3 #define AVR32_MPUBRB_B3_MASK 0x00000008 #define AVR32_MPUBRB_B3_OFFSET 3 #define AVR32_MPUBRB_B3_SIZE 1 #define AVR32_MPUBRB_B4 4 #define AVR32_MPUBRB_B4_MASK 0x00000010 #define AVR32_MPUBRB_B4_OFFSET 4 #define AVR32_MPUBRB_B4_SIZE 1 #define AVR32_MPUBRB_B5 5 #define AVR32_MPUBRB_B5_MASK 0x00000020 #define AVR32_MPUBRB_B5_OFFSET 5 #define AVR32_MPUBRB_B5_SIZE 1 #define AVR32_MPUBRB_B6 6 #define AVR32_MPUBRB_B6_MASK 0x00000040 #define AVR32_MPUBRB_B6_OFFSET 6 #define AVR32_MPUBRB_B6_SIZE 1 #define AVR32_MPUBRB_B7 7 #define AVR32_MPUBRB_B7_MASK 0x00000080 #define AVR32_MPUBRB_B7_OFFSET 7 #define AVR32_MPUBRB_B7_SIZE 1 #define AVR32_MPUCR 0x00000198 #define AVR32_MPUCRA 0x00000180 #define AVR32_MPUCRA_C0 0 #define AVR32_MPUCRA_C0_MASK 0x00000001 #define AVR32_MPUCRA_C0_OFFSET 0 #define AVR32_MPUCRA_C0_SIZE 1 #define AVR32_MPUCRA_C1 1 #define AVR32_MPUCRA_C1_MASK 0x00000002 #define AVR32_MPUCRA_C1_OFFSET 1 #define AVR32_MPUCRA_C1_SIZE 1 #define AVR32_MPUCRA_C2 2 #define AVR32_MPUCRA_C2_MASK 0x00000004 #define AVR32_MPUCRA_C2_OFFSET 2 #define AVR32_MPUCRA_C2_SIZE 1 #define AVR32_MPUCRA_C3 3 #define AVR32_MPUCRA_C3_MASK 0x00000008 #define AVR32_MPUCRA_C3_OFFSET 3 #define AVR32_MPUCRA_C3_SIZE 1 #define AVR32_MPUCRA_C4 4 #define AVR32_MPUCRA_C4_MASK 0x00000010 #define AVR32_MPUCRA_C4_OFFSET 4 #define AVR32_MPUCRA_C4_SIZE 1 #define AVR32_MPUCRA_C5 5 #define AVR32_MPUCRA_C5_MASK 0x00000020 #define AVR32_MPUCRA_C5_OFFSET 5 #define AVR32_MPUCRA_C5_SIZE 1 #define AVR32_MPUCRA_C6 6 #define AVR32_MPUCRA_C6_MASK 0x00000040 #define AVR32_MPUCRA_C6_OFFSET 6 #define AVR32_MPUCRA_C6_SIZE 1 #define AVR32_MPUCRA_C7 7 #define AVR32_MPUCRA_C7_MASK 0x00000080 #define AVR32_MPUCRA_C7_OFFSET 7 #define AVR32_MPUCRA_C7_SIZE 1 #define AVR32_MPUCRB 0x00000184 #define AVR32_MPUCRB_C0 0 #define AVR32_MPUCRB_C0_MASK 0x00000001 #define AVR32_MPUCRB_C0_OFFSET 0 #define AVR32_MPUCRB_C0_SIZE 1 #define AVR32_MPUCRB_C1 1 #define AVR32_MPUCRB_C1_MASK 0x00000002 #define AVR32_MPUCRB_C1_OFFSET 1 #define AVR32_MPUCRB_C1_SIZE 1 #define AVR32_MPUCRB_C2 2 #define AVR32_MPUCRB_C2_MASK 0x00000004 #define AVR32_MPUCRB_C2_OFFSET 2 #define AVR32_MPUCRB_C2_SIZE 1 #define AVR32_MPUCRB_C3 3 #define AVR32_MPUCRB_C3_MASK 0x00000008 #define AVR32_MPUCRB_C3_OFFSET 3 #define AVR32_MPUCRB_C3_SIZE 1 #define AVR32_MPUCRB_C4 4 #define AVR32_MPUCRB_C4_MASK 0x00000010 #define AVR32_MPUCRB_C4_OFFSET 4 #define AVR32_MPUCRB_C4_SIZE 1 #define AVR32_MPUCRB_C5 5 #define AVR32_MPUCRB_C5_MASK 0x00000020 #define AVR32_MPUCRB_C5_OFFSET 5 #define AVR32_MPUCRB_C5_SIZE 1 #define AVR32_MPUCRB_C6 6 #define AVR32_MPUCRB_C6_MASK 0x00000040 #define AVR32_MPUCRB_C6_OFFSET 6 #define AVR32_MPUCRB_C6_SIZE 1 #define AVR32_MPUCRB_C7 7 #define AVR32_MPUCRB_C7_MASK 0x00000080 #define AVR32_MPUCRB_C7_OFFSET 7 #define AVR32_MPUCRB_C7_SIZE 1 #define AVR32_MPUCR_E 0 #define AVR32_MPUCR_E_MASK 0x00000001 #define AVR32_MPUCR_E_OFFSET 0 #define AVR32_MPUCR_E_SIZE 1 #define AVR32_MPUPSR0 0x00000160 #define AVR32_MPUPSR0_P0 0 #define AVR32_MPUPSR0_P0_MASK 0x00000001 #define AVR32_MPUPSR0_P0_OFFSET 0 #define AVR32_MPUPSR0_P0_SIZE 1 #define AVR32_MPUPSR0_P1 1 #define AVR32_MPUPSR0_P10 10 #define AVR32_MPUPSR0_P10_MASK 0x00000400 #define AVR32_MPUPSR0_P10_OFFSET 10 #define AVR32_MPUPSR0_P10_SIZE 1 #define AVR32_MPUPSR0_P11 11 #define AVR32_MPUPSR0_P11_MASK 0x00000800 #define AVR32_MPUPSR0_P11_OFFSET 11 #define AVR32_MPUPSR0_P11_SIZE 1 #define AVR32_MPUPSR0_P12 12 #define AVR32_MPUPSR0_P12_MASK 0x00001000 #define AVR32_MPUPSR0_P12_OFFSET 12 #define AVR32_MPUPSR0_P12_SIZE 1 #define AVR32_MPUPSR0_P13 13 #define AVR32_MPUPSR0_P13_MASK 0x00002000 #define AVR32_MPUPSR0_P13_OFFSET 13 #define AVR32_MPUPSR0_P13_SIZE 1 #define AVR32_MPUPSR0_P14 14 #define AVR32_MPUPSR0_P14_MASK 0x00004000 #define AVR32_MPUPSR0_P14_OFFSET 14 #define AVR32_MPUPSR0_P14_SIZE 1 #define AVR32_MPUPSR0_P15 15 #define AVR32_MPUPSR0_P15_MASK 0x00008000 #define AVR32_MPUPSR0_P15_OFFSET 15 #define AVR32_MPUPSR0_P15_SIZE 1 #define AVR32_MPUPSR0_P1_MASK 0x00000002 #define AVR32_MPUPSR0_P1_OFFSET 1 #define AVR32_MPUPSR0_P1_SIZE 1 #define AVR32_MPUPSR0_P2 2 #define AVR32_MPUPSR0_P2_MASK 0x00000004 #define AVR32_MPUPSR0_P2_OFFSET 2 #define AVR32_MPUPSR0_P2_SIZE 1 #define AVR32_MPUPSR0_P3 3 #define AVR32_MPUPSR0_P3_MASK 0x00000008 #define AVR32_MPUPSR0_P3_OFFSET 3 #define AVR32_MPUPSR0_P3_SIZE 1 #define AVR32_MPUPSR0_P4 4 #define AVR32_MPUPSR0_P4_MASK 0x00000010 #define AVR32_MPUPSR0_P4_OFFSET 4 #define AVR32_MPUPSR0_P4_SIZE 1 #define AVR32_MPUPSR0_P5 5 #define AVR32_MPUPSR0_P5_MASK 0x00000020 #define AVR32_MPUPSR0_P5_OFFSET 5 #define AVR32_MPUPSR0_P5_SIZE 1 #define AVR32_MPUPSR0_P6 6 #define AVR32_MPUPSR0_P6_MASK 0x00000040 #define AVR32_MPUPSR0_P6_OFFSET 6 #define AVR32_MPUPSR0_P6_SIZE 1 #define AVR32_MPUPSR0_P7 7 #define AVR32_MPUPSR0_P7_MASK 0x00000080 #define AVR32_MPUPSR0_P7_OFFSET 7 #define AVR32_MPUPSR0_P7_SIZE 1 #define AVR32_MPUPSR0_P8 8 #define AVR32_MPUPSR0_P8_MASK 0x00000100 #define AVR32_MPUPSR0_P8_OFFSET 8 #define AVR32_MPUPSR0_P8_SIZE 1 #define AVR32_MPUPSR0_P9 9 #define AVR32_MPUPSR0_P9_MASK 0x00000200 #define AVR32_MPUPSR0_P9_OFFSET 9 #define AVR32_MPUPSR0_P9_SIZE 1 #define AVR32_MPUPSR1 0x00000164 #define AVR32_MPUPSR1_P0 0 #define AVR32_MPUPSR1_P0_MASK 0x00000001 #define AVR32_MPUPSR1_P0_OFFSET 0 #define AVR32_MPUPSR1_P0_SIZE 1 #define AVR32_MPUPSR1_P1 1 #define AVR32_MPUPSR1_P10 10 #define AVR32_MPUPSR1_P10_MASK 0x00000400 #define AVR32_MPUPSR1_P10_OFFSET 10 #define AVR32_MPUPSR1_P10_SIZE 1 #define AVR32_MPUPSR1_P11 11 #define AVR32_MPUPSR1_P11_MASK 0x00000800 #define AVR32_MPUPSR1_P11_OFFSET 11 #define AVR32_MPUPSR1_P11_SIZE 1 #define AVR32_MPUPSR1_P12 12 #define AVR32_MPUPSR1_P12_MASK 0x00001000 #define AVR32_MPUPSR1_P12_OFFSET 12 #define AVR32_MPUPSR1_P12_SIZE 1 #define AVR32_MPUPSR1_P13 13 #define AVR32_MPUPSR1_P13_MASK 0x00002000 #define AVR32_MPUPSR1_P13_OFFSET 13 #define AVR32_MPUPSR1_P13_SIZE 1 #define AVR32_MPUPSR1_P14 14 #define AVR32_MPUPSR1_P14_MASK 0x00004000 #define AVR32_MPUPSR1_P14_OFFSET 14 #define AVR32_MPUPSR1_P14_SIZE 1 #define AVR32_MPUPSR1_P15 15 #define AVR32_MPUPSR1_P15_MASK 0x00008000 #define AVR32_MPUPSR1_P15_OFFSET 15 #define AVR32_MPUPSR1_P15_SIZE 1 #define AVR32_MPUPSR1_P1_MASK 0x00000002 #define AVR32_MPUPSR1_P1_OFFSET 1 #define AVR32_MPUPSR1_P1_SIZE 1 #define AVR32_MPUPSR1_P2 2 #define AVR32_MPUPSR1_P2_MASK 0x00000004 #define AVR32_MPUPSR1_P2_OFFSET 2 #define AVR32_MPUPSR1_P2_SIZE 1 #define AVR32_MPUPSR1_P3 3 #define AVR32_MPUPSR1_P3_MASK 0x00000008 #define AVR32_MPUPSR1_P3_OFFSET 3 #define AVR32_MPUPSR1_P3_SIZE 1 #define AVR32_MPUPSR1_P4 4 #define AVR32_MPUPSR1_P4_MASK 0x00000010 #define AVR32_MPUPSR1_P4_OFFSET 4 #define AVR32_MPUPSR1_P4_SIZE 1 #define AVR32_MPUPSR1_P5 5 #define AVR32_MPUPSR1_P5_MASK 0x00000020 #define AVR32_MPUPSR1_P5_OFFSET 5 #define AVR32_MPUPSR1_P5_SIZE 1 #define AVR32_MPUPSR1_P6 6 #define AVR32_MPUPSR1_P6_MASK 0x00000040 #define AVR32_MPUPSR1_P6_OFFSET 6 #define AVR32_MPUPSR1_P6_SIZE 1 #define AVR32_MPUPSR1_P7 7 #define AVR32_MPUPSR1_P7_MASK 0x00000080 #define AVR32_MPUPSR1_P7_OFFSET 7 #define AVR32_MPUPSR1_P7_SIZE 1 #define AVR32_MPUPSR1_P8 8 #define AVR32_MPUPSR1_P8_MASK 0x00000100 #define AVR32_MPUPSR1_P8_OFFSET 8 #define AVR32_MPUPSR1_P8_SIZE 1 #define AVR32_MPUPSR1_P9 9 #define AVR32_MPUPSR1_P9_MASK 0x00000200 #define AVR32_MPUPSR1_P9_OFFSET 9 #define AVR32_MPUPSR1_P9_SIZE 1 #define AVR32_MPUPSR2 0x00000168 #define AVR32_MPUPSR2_P0 0 #define AVR32_MPUPSR2_P0_MASK 0x00000001 #define AVR32_MPUPSR2_P0_OFFSET 0 #define AVR32_MPUPSR2_P0_SIZE 1 #define AVR32_MPUPSR2_P1 1 #define AVR32_MPUPSR2_P10 10 #define AVR32_MPUPSR2_P10_MASK 0x00000400 #define AVR32_MPUPSR2_P10_OFFSET 10 #define AVR32_MPUPSR2_P10_SIZE 1 #define AVR32_MPUPSR2_P11 11 #define AVR32_MPUPSR2_P11_MASK 0x00000800 #define AVR32_MPUPSR2_P11_OFFSET 11 #define AVR32_MPUPSR2_P11_SIZE 1 #define AVR32_MPUPSR2_P12 12 #define AVR32_MPUPSR2_P12_MASK 0x00001000 #define AVR32_MPUPSR2_P12_OFFSET 12 #define AVR32_MPUPSR2_P12_SIZE 1 #define AVR32_MPUPSR2_P13 13 #define AVR32_MPUPSR2_P13_MASK 0x00002000 #define AVR32_MPUPSR2_P13_OFFSET 13 #define AVR32_MPUPSR2_P13_SIZE 1 #define AVR32_MPUPSR2_P14 14 #define AVR32_MPUPSR2_P14_MASK 0x00004000 #define AVR32_MPUPSR2_P14_OFFSET 14 #define AVR32_MPUPSR2_P14_SIZE 1 #define AVR32_MPUPSR2_P15 15 #define AVR32_MPUPSR2_P15_MASK 0x00008000 #define AVR32_MPUPSR2_P15_OFFSET 15 #define AVR32_MPUPSR2_P15_SIZE 1 #define AVR32_MPUPSR2_P1_MASK 0x00000002 #define AVR32_MPUPSR2_P1_OFFSET 1 #define AVR32_MPUPSR2_P1_SIZE 1 #define AVR32_MPUPSR2_P2 2 #define AVR32_MPUPSR2_P2_MASK 0x00000004 #define AVR32_MPUPSR2_P2_OFFSET 2 #define AVR32_MPUPSR2_P2_SIZE 1 #define AVR32_MPUPSR2_P3 3 #define AVR32_MPUPSR2_P3_MASK 0x00000008 #define AVR32_MPUPSR2_P3_OFFSET 3 #define AVR32_MPUPSR2_P3_SIZE 1 #define AVR32_MPUPSR2_P4 4 #define AVR32_MPUPSR2_P4_MASK 0x00000010 #define AVR32_MPUPSR2_P4_OFFSET 4 #define AVR32_MPUPSR2_P4_SIZE 1 #define AVR32_MPUPSR2_P5 5 #define AVR32_MPUPSR2_P5_MASK 0x00000020 #define AVR32_MPUPSR2_P5_OFFSET 5 #define AVR32_MPUPSR2_P5_SIZE 1 #define AVR32_MPUPSR2_P6 6 #define AVR32_MPUPSR2_P6_MASK 0x00000040 #define AVR32_MPUPSR2_P6_OFFSET 6 #define AVR32_MPUPSR2_P6_SIZE 1 #define AVR32_MPUPSR2_P7 7 #define AVR32_MPUPSR2_P7_MASK 0x00000080 #define AVR32_MPUPSR2_P7_OFFSET 7 #define AVR32_MPUPSR2_P7_SIZE 1 #define AVR32_MPUPSR2_P8 8 #define AVR32_MPUPSR2_P8_MASK 0x00000100 #define AVR32_MPUPSR2_P8_OFFSET 8 #define AVR32_MPUPSR2_P8_SIZE 1 #define AVR32_MPUPSR2_P9 9 #define AVR32_MPUPSR2_P9_MASK 0x00000200 #define AVR32_MPUPSR2_P9_OFFSET 9 #define AVR32_MPUPSR2_P9_SIZE 1 #define AVR32_MPUPSR3 0x0000016c #define AVR32_MPUPSR3_P0 0 #define AVR32_MPUPSR3_P0_MASK 0x00000001 #define AVR32_MPUPSR3_P0_OFFSET 0 #define AVR32_MPUPSR3_P0_SIZE 1 #define AVR32_MPUPSR3_P1 1 #define AVR32_MPUPSR3_P10 10 #define AVR32_MPUPSR3_P10_MASK 0x00000400 #define AVR32_MPUPSR3_P10_OFFSET 10 #define AVR32_MPUPSR3_P10_SIZE 1 #define AVR32_MPUPSR3_P11 11 #define AVR32_MPUPSR3_P11_MASK 0x00000800 #define AVR32_MPUPSR3_P11_OFFSET 11 #define AVR32_MPUPSR3_P11_SIZE 1 #define AVR32_MPUPSR3_P12 12 #define AVR32_MPUPSR3_P12_MASK 0x00001000 #define AVR32_MPUPSR3_P12_OFFSET 12 #define AVR32_MPUPSR3_P12_SIZE 1 #define AVR32_MPUPSR3_P13 13 #define AVR32_MPUPSR3_P13_MASK 0x00002000 #define AVR32_MPUPSR3_P13_OFFSET 13 #define AVR32_MPUPSR3_P13_SIZE 1 #define AVR32_MPUPSR3_P14 14 #define AVR32_MPUPSR3_P14_MASK 0x00004000 #define AVR32_MPUPSR3_P14_OFFSET 14 #define AVR32_MPUPSR3_P14_SIZE 1 #define AVR32_MPUPSR3_P15 15 #define AVR32_MPUPSR3_P15_MASK 0x00008000 #define AVR32_MPUPSR3_P15_OFFSET 15 #define AVR32_MPUPSR3_P15_SIZE 1 #define AVR32_MPUPSR3_P1_MASK 0x00000002 #define AVR32_MPUPSR3_P1_OFFSET 1 #define AVR32_MPUPSR3_P1_SIZE 1 #define AVR32_MPUPSR3_P2 2 #define AVR32_MPUPSR3_P2_MASK 0x00000004 #define AVR32_MPUPSR3_P2_OFFSET 2 #define AVR32_MPUPSR3_P2_SIZE 1 #define AVR32_MPUPSR3_P3 3 #define AVR32_MPUPSR3_P3_MASK 0x00000008 #define AVR32_MPUPSR3_P3_OFFSET 3 #define AVR32_MPUPSR3_P3_SIZE 1 #define AVR32_MPUPSR3_P4 4 #define AVR32_MPUPSR3_P4_MASK 0x00000010 #define AVR32_MPUPSR3_P4_OFFSET 4 #define AVR32_MPUPSR3_P4_SIZE 1 #define AVR32_MPUPSR3_P5 5 #define AVR32_MPUPSR3_P5_MASK 0x00000020 #define AVR32_MPUPSR3_P5_OFFSET 5 #define AVR32_MPUPSR3_P5_SIZE 1 #define AVR32_MPUPSR3_P6 6 #define AVR32_MPUPSR3_P6_MASK 0x00000040 #define AVR32_MPUPSR3_P6_OFFSET 6 #define AVR32_MPUPSR3_P6_SIZE 1 #define AVR32_MPUPSR3_P7 7 #define AVR32_MPUPSR3_P7_MASK 0x00000080 #define AVR32_MPUPSR3_P7_OFFSET 7 #define AVR32_MPUPSR3_P7_SIZE 1 #define AVR32_MPUPSR3_P8 8 #define AVR32_MPUPSR3_P8_MASK 0x00000100 #define AVR32_MPUPSR3_P8_OFFSET 8 #define AVR32_MPUPSR3_P8_SIZE 1 #define AVR32_MPUPSR3_P9 9 #define AVR32_MPUPSR3_P9_MASK 0x00000200 #define AVR32_MPUPSR3_P9_OFFSET 9 #define AVR32_MPUPSR3_P9_SIZE 1 #define AVR32_MPUPSR4 0x00000170 #define AVR32_MPUPSR4_P0 0 #define AVR32_MPUPSR4_P0_MASK 0x00000001 #define AVR32_MPUPSR4_P0_OFFSET 0 #define AVR32_MPUPSR4_P0_SIZE 1 #define AVR32_MPUPSR4_P1 1 #define AVR32_MPUPSR4_P10 10 #define AVR32_MPUPSR4_P10_MASK 0x00000400 #define AVR32_MPUPSR4_P10_OFFSET 10 #define AVR32_MPUPSR4_P10_SIZE 1 #define AVR32_MPUPSR4_P11 11 #define AVR32_MPUPSR4_P11_MASK 0x00000800 #define AVR32_MPUPSR4_P11_OFFSET 11 #define AVR32_MPUPSR4_P11_SIZE 1 #define AVR32_MPUPSR4_P12 12 #define AVR32_MPUPSR4_P12_MASK 0x00001000 #define AVR32_MPUPSR4_P12_OFFSET 12 #define AVR32_MPUPSR4_P12_SIZE 1 #define AVR32_MPUPSR4_P13 13 #define AVR32_MPUPSR4_P13_MASK 0x00002000 #define AVR32_MPUPSR4_P13_OFFSET 13 #define AVR32_MPUPSR4_P13_SIZE 1 #define AVR32_MPUPSR4_P14 14 #define AVR32_MPUPSR4_P14_MASK 0x00004000 #define AVR32_MPUPSR4_P14_OFFSET 14 #define AVR32_MPUPSR4_P14_SIZE 1 #define AVR32_MPUPSR4_P15 15 #define AVR32_MPUPSR4_P15_MASK 0x00008000 #define AVR32_MPUPSR4_P15_OFFSET 15 #define AVR32_MPUPSR4_P15_SIZE 1 #define AVR32_MPUPSR4_P1_MASK 0x00000002 #define AVR32_MPUPSR4_P1_OFFSET 1 #define AVR32_MPUPSR4_P1_SIZE 1 #define AVR32_MPUPSR4_P2 2 #define AVR32_MPUPSR4_P2_MASK 0x00000004 #define AVR32_MPUPSR4_P2_OFFSET 2 #define AVR32_MPUPSR4_P2_SIZE 1 #define AVR32_MPUPSR4_P3 3 #define AVR32_MPUPSR4_P3_MASK 0x00000008 #define AVR32_MPUPSR4_P3_OFFSET 3 #define AVR32_MPUPSR4_P3_SIZE 1 #define AVR32_MPUPSR4_P4 4 #define AVR32_MPUPSR4_P4_MASK 0x00000010 #define AVR32_MPUPSR4_P4_OFFSET 4 #define AVR32_MPUPSR4_P4_SIZE 1 #define AVR32_MPUPSR4_P5 5 #define AVR32_MPUPSR4_P5_MASK 0x00000020 #define AVR32_MPUPSR4_P5_OFFSET 5 #define AVR32_MPUPSR4_P5_SIZE 1 #define AVR32_MPUPSR4_P6 6 #define AVR32_MPUPSR4_P6_MASK 0x00000040 #define AVR32_MPUPSR4_P6_OFFSET 6 #define AVR32_MPUPSR4_P6_SIZE 1 #define AVR32_MPUPSR4_P7 7 #define AVR32_MPUPSR4_P7_MASK 0x00000080 #define AVR32_MPUPSR4_P7_OFFSET 7 #define AVR32_MPUPSR4_P7_SIZE 1 #define AVR32_MPUPSR4_P8 8 #define AVR32_MPUPSR4_P8_MASK 0x00000100 #define AVR32_MPUPSR4_P8_OFFSET 8 #define AVR32_MPUPSR4_P8_SIZE 1 #define AVR32_MPUPSR4_P9 9 #define AVR32_MPUPSR4_P9_MASK 0x00000200 #define AVR32_MPUPSR4_P9_OFFSET 9 #define AVR32_MPUPSR4_P9_SIZE 1 #define AVR32_MPUPSR5 0x00000174 #define AVR32_MPUPSR5_P0 0 #define AVR32_MPUPSR5_P0_MASK 0x00000001 #define AVR32_MPUPSR5_P0_OFFSET 0 #define AVR32_MPUPSR5_P0_SIZE 1 #define AVR32_MPUPSR5_P1 1 #define AVR32_MPUPSR5_P10 10 #define AVR32_MPUPSR5_P10_MASK 0x00000400 #define AVR32_MPUPSR5_P10_OFFSET 10 #define AVR32_MPUPSR5_P10_SIZE 1 #define AVR32_MPUPSR5_P11 11 #define AVR32_MPUPSR5_P11_MASK 0x00000800 #define AVR32_MPUPSR5_P11_OFFSET 11 #define AVR32_MPUPSR5_P11_SIZE 1 #define AVR32_MPUPSR5_P12 12 #define AVR32_MPUPSR5_P12_MASK 0x00001000 #define AVR32_MPUPSR5_P12_OFFSET 12 #define AVR32_MPUPSR5_P12_SIZE 1 #define AVR32_MPUPSR5_P13 13 #define AVR32_MPUPSR5_P13_MASK 0x00002000 #define AVR32_MPUPSR5_P13_OFFSET 13 #define AVR32_MPUPSR5_P13_SIZE 1 #define AVR32_MPUPSR5_P14 14 #define AVR32_MPUPSR5_P14_MASK 0x00004000 #define AVR32_MPUPSR5_P14_OFFSET 14 #define AVR32_MPUPSR5_P14_SIZE 1 #define AVR32_MPUPSR5_P15 15 #define AVR32_MPUPSR5_P15_MASK 0x00008000 #define AVR32_MPUPSR5_P15_OFFSET 15 #define AVR32_MPUPSR5_P15_SIZE 1 #define AVR32_MPUPSR5_P1_MASK 0x00000002 #define AVR32_MPUPSR5_P1_OFFSET 1 #define AVR32_MPUPSR5_P1_SIZE 1 #define AVR32_MPUPSR5_P2 2 #define AVR32_MPUPSR5_P2_MASK 0x00000004 #define AVR32_MPUPSR5_P2_OFFSET 2 #define AVR32_MPUPSR5_P2_SIZE 1 #define AVR32_MPUPSR5_P3 3 #define AVR32_MPUPSR5_P3_MASK 0x00000008 #define AVR32_MPUPSR5_P3_OFFSET 3 #define AVR32_MPUPSR5_P3_SIZE 1 #define AVR32_MPUPSR5_P4 4 #define AVR32_MPUPSR5_P4_MASK 0x00000010 #define AVR32_MPUPSR5_P4_OFFSET 4 #define AVR32_MPUPSR5_P4_SIZE 1 #define AVR32_MPUPSR5_P5 5 #define AVR32_MPUPSR5_P5_MASK 0x00000020 #define AVR32_MPUPSR5_P5_OFFSET 5 #define AVR32_MPUPSR5_P5_SIZE 1 #define AVR32_MPUPSR5_P6 6 #define AVR32_MPUPSR5_P6_MASK 0x00000040 #define AVR32_MPUPSR5_P6_OFFSET 6 #define AVR32_MPUPSR5_P6_SIZE 1 #define AVR32_MPUPSR5_P7 7 #define AVR32_MPUPSR5_P7_MASK 0x00000080 #define AVR32_MPUPSR5_P7_OFFSET 7 #define AVR32_MPUPSR5_P7_SIZE 1 #define AVR32_MPUPSR5_P8 8 #define AVR32_MPUPSR5_P8_MASK 0x00000100 #define AVR32_MPUPSR5_P8_OFFSET 8 #define AVR32_MPUPSR5_P8_SIZE 1 #define AVR32_MPUPSR5_P9 9 #define AVR32_MPUPSR5_P9_MASK 0x00000200 #define AVR32_MPUPSR5_P9_OFFSET 9 #define AVR32_MPUPSR5_P9_SIZE 1 #define AVR32_MPUPSR6 0x00000178 #define AVR32_MPUPSR6_P0 0 #define AVR32_MPUPSR6_P0_MASK 0x00000001 #define AVR32_MPUPSR6_P0_OFFSET 0 #define AVR32_MPUPSR6_P0_SIZE 1 #define AVR32_MPUPSR6_P1 1 #define AVR32_MPUPSR6_P10 10 #define AVR32_MPUPSR6_P10_MASK 0x00000400 #define AVR32_MPUPSR6_P10_OFFSET 10 #define AVR32_MPUPSR6_P10_SIZE 1 #define AVR32_MPUPSR6_P11 11 #define AVR32_MPUPSR6_P11_MASK 0x00000800 #define AVR32_MPUPSR6_P11_OFFSET 11 #define AVR32_MPUPSR6_P11_SIZE 1 #define AVR32_MPUPSR6_P12 12 #define AVR32_MPUPSR6_P12_MASK 0x00001000 #define AVR32_MPUPSR6_P12_OFFSET 12 #define AVR32_MPUPSR6_P12_SIZE 1 #define AVR32_MPUPSR6_P13 13 #define AVR32_MPUPSR6_P13_MASK 0x00002000 #define AVR32_MPUPSR6_P13_OFFSET 13 #define AVR32_MPUPSR6_P13_SIZE 1 #define AVR32_MPUPSR6_P14 14 #define AVR32_MPUPSR6_P14_MASK 0x00004000 #define AVR32_MPUPSR6_P14_OFFSET 14 #define AVR32_MPUPSR6_P14_SIZE 1 #define AVR32_MPUPSR6_P15 15 #define AVR32_MPUPSR6_P15_MASK 0x00008000 #define AVR32_MPUPSR6_P15_OFFSET 15 #define AVR32_MPUPSR6_P15_SIZE 1 #define AVR32_MPUPSR6_P1_MASK 0x00000002 #define AVR32_MPUPSR6_P1_OFFSET 1 #define AVR32_MPUPSR6_P1_SIZE 1 #define AVR32_MPUPSR6_P2 2 #define AVR32_MPUPSR6_P2_MASK 0x00000004 #define AVR32_MPUPSR6_P2_OFFSET 2 #define AVR32_MPUPSR6_P2_SIZE 1 #define AVR32_MPUPSR6_P3 3 #define AVR32_MPUPSR6_P3_MASK 0x00000008 #define AVR32_MPUPSR6_P3_OFFSET 3 #define AVR32_MPUPSR6_P3_SIZE 1 #define AVR32_MPUPSR6_P4 4 #define AVR32_MPUPSR6_P4_MASK 0x00000010 #define AVR32_MPUPSR6_P4_OFFSET 4 #define AVR32_MPUPSR6_P4_SIZE 1 #define AVR32_MPUPSR6_P5 5 #define AVR32_MPUPSR6_P5_MASK 0x00000020 #define AVR32_MPUPSR6_P5_OFFSET 5 #define AVR32_MPUPSR6_P5_SIZE 1 #define AVR32_MPUPSR6_P6 6 #define AVR32_MPUPSR6_P6_MASK 0x00000040 #define AVR32_MPUPSR6_P6_OFFSET 6 #define AVR32_MPUPSR6_P6_SIZE 1 #define AVR32_MPUPSR6_P7 7 #define AVR32_MPUPSR6_P7_MASK 0x00000080 #define AVR32_MPUPSR6_P7_OFFSET 7 #define AVR32_MPUPSR6_P7_SIZE 1 #define AVR32_MPUPSR6_P8 8 #define AVR32_MPUPSR6_P8_MASK 0x00000100 #define AVR32_MPUPSR6_P8_OFFSET 8 #define AVR32_MPUPSR6_P8_SIZE 1 #define AVR32_MPUPSR6_P9 9 #define AVR32_MPUPSR6_P9_MASK 0x00000200 #define AVR32_MPUPSR6_P9_OFFSET 9 #define AVR32_MPUPSR6_P9_SIZE 1 #define AVR32_MPUPSR7 0x0000017c #define AVR32_MPUPSR7_P0 0 #define AVR32_MPUPSR7_P0_MASK 0x00000001 #define AVR32_MPUPSR7_P0_OFFSET 0 #define AVR32_MPUPSR7_P0_SIZE 1 #define AVR32_MPUPSR7_P1 1 #define AVR32_MPUPSR7_P10 10 #define AVR32_MPUPSR7_P10_MASK 0x00000400 #define AVR32_MPUPSR7_P10_OFFSET 10 #define AVR32_MPUPSR7_P10_SIZE 1 #define AVR32_MPUPSR7_P11 11 #define AVR32_MPUPSR7_P11_MASK 0x00000800 #define AVR32_MPUPSR7_P11_OFFSET 11 #define AVR32_MPUPSR7_P11_SIZE 1 #define AVR32_MPUPSR7_P12 12 #define AVR32_MPUPSR7_P12_MASK 0x00001000 #define AVR32_MPUPSR7_P12_OFFSET 12 #define AVR32_MPUPSR7_P12_SIZE 1 #define AVR32_MPUPSR7_P13 13 #define AVR32_MPUPSR7_P13_MASK 0x00002000 #define AVR32_MPUPSR7_P13_OFFSET 13 #define AVR32_MPUPSR7_P13_SIZE 1 #define AVR32_MPUPSR7_P14 14 #define AVR32_MPUPSR7_P14_MASK 0x00004000 #define AVR32_MPUPSR7_P14_OFFSET 14 #define AVR32_MPUPSR7_P14_SIZE 1 #define AVR32_MPUPSR7_P15 15 #define AVR32_MPUPSR7_P15_MASK 0x00008000 #define AVR32_MPUPSR7_P15_OFFSET 15 #define AVR32_MPUPSR7_P15_SIZE 1 #define AVR32_MPUPSR7_P1_MASK 0x00000002 #define AVR32_MPUPSR7_P1_OFFSET 1 #define AVR32_MPUPSR7_P1_SIZE 1 #define AVR32_MPUPSR7_P2 2 #define AVR32_MPUPSR7_P2_MASK 0x00000004 #define AVR32_MPUPSR7_P2_OFFSET 2 #define AVR32_MPUPSR7_P2_SIZE 1 #define AVR32_MPUPSR7_P3 3 #define AVR32_MPUPSR7_P3_MASK 0x00000008 #define AVR32_MPUPSR7_P3_OFFSET 3 #define AVR32_MPUPSR7_P3_SIZE 1 #define AVR32_MPUPSR7_P4 4 #define AVR32_MPUPSR7_P4_MASK 0x00000010 #define AVR32_MPUPSR7_P4_OFFSET 4 #define AVR32_MPUPSR7_P4_SIZE 1 #define AVR32_MPUPSR7_P5 5 #define AVR32_MPUPSR7_P5_MASK 0x00000020 #define AVR32_MPUPSR7_P5_OFFSET 5 #define AVR32_MPUPSR7_P5_SIZE 1 #define AVR32_MPUPSR7_P6 6 #define AVR32_MPUPSR7_P6_MASK 0x00000040 #define AVR32_MPUPSR7_P6_OFFSET 6 #define AVR32_MPUPSR7_P6_SIZE 1 #define AVR32_MPUPSR7_P7 7 #define AVR32_MPUPSR7_P7_MASK 0x00000080 #define AVR32_MPUPSR7_P7_OFFSET 7 #define AVR32_MPUPSR7_P7_SIZE 1 #define AVR32_MPUPSR7_P8 8 #define AVR32_MPUPSR7_P8_MASK 0x00000100 #define AVR32_MPUPSR7_P8_OFFSET 8 #define AVR32_MPUPSR7_P8_SIZE 1 #define AVR32_MPUPSR7_P9 9 #define AVR32_MPUPSR7_P9_MASK 0x00000200 #define AVR32_MPUPSR7_P9_OFFSET 9 #define AVR32_MPUPSR7_P9_SIZE 1 #define AVR32_MSU_ADDRHI 0x000003E0 #define AVR32_MSU_ADDRHI_MASK 0x0000000F #define AVR32_MSU_ADDRHI_RESETVALUE 0x00000000 #define AVR32_MSU_ADDRLO 0x000003E4 #define AVR32_MSU_ADDRLO_MASK 0xFFFFFFFC #define AVR32_MSU_ADDRLO_RESETVALUE 0x00000000 #define AVR32_MSU_LENGTH 0x000003E8 #define AVR32_MSU_LENGTH_MASK 0xFFFFFFFC #define AVR32_MSU_LENGTH_RESETVALUE 0x00000000 #define AVR32_MSU_CTRL 0x000003EC #define AVR32_MSU_CTRL_OP_MASK 0x0000000F #define AVR32_MSU_CTRL_NTBC_MASK 0x00000030 #define AVR32_MSU_CTRL_RESETVALUE 0x00000000 #define AVR32_MSU_STATUS 0x000003F0 #define AVR32_MSU_STATUS_RESULT_MASK 0x00000007 #define AVR32_MSU_STATUS_WRAP_MASK 0x00000008 #define AVR32_MSU_STATUS_RESETVALUE 0x00000000 #define AVR32_MSU_DATA 0x000003F4 #define AVR32_MSU_DATA_MASK 0xFFFFFFFF #define AVR32_MSU_DATA_RESETVALUE 0x00000000 #define AVR32_MSU_TAIL 0x000003F8 #define AVR32_MSU_TAIL_MASK 0xFFFFFFFC #define AVR32_MSU_TAIL_RESETVALUE 0x00000000 #define AVR32_RAR_DBG 0x00000050 #define AVR32_RSR_DBG 0x00000030 #define AVR32_SR 0x00000000 #define AVR32_SR_C 0 #define AVR32_SR_C_MASK 0x00000001 #define AVR32_SR_C_OFFSET 0 #define AVR32_SR_C_SIZE 1 #define AVR32_SR_D 26 #define AVR32_SR_DM 27 #define AVR32_SR_DM_MASK 0x08000000 #define AVR32_SR_DM_OFFSET 27 #define AVR32_SR_DM_SIZE 1 #define AVR32_SR_D_MASK 0x04000000 #define AVR32_SR_D_OFFSET 26 #define AVR32_SR_D_SIZE 1 #define AVR32_SR_EM 21 #define AVR32_SR_EM_MASK 0x00200000 #define AVR32_SR_EM_OFFSET 21 #define AVR32_SR_EM_SIZE 1 #define AVR32_SR_GM 16 #define AVR32_SR_GM_MASK 0x00010000 #define AVR32_SR_GM_OFFSET 16 #define AVR32_SR_GM_SIZE 1 #define AVR32_SR_I0M 17 #define AVR32_SR_I0M_MASK 0x00020000 #define AVR32_SR_I0M_OFFSET 17 #define AVR32_SR_I0M_SIZE 1 #define AVR32_SR_I1M 18 #define AVR32_SR_I1M_MASK 0x00040000 #define AVR32_SR_I1M_OFFSET 18 #define AVR32_SR_I1M_SIZE 1 #define AVR32_SR_I2M 19 #define AVR32_SR_I2M_MASK 0x00080000 #define AVR32_SR_I2M_OFFSET 19 #define AVR32_SR_I2M_SIZE 1 #define AVR32_SR_I3M 20 #define AVR32_SR_I3M_MASK 0x00100000 #define AVR32_SR_I3M_OFFSET 20 #define AVR32_SR_I3M_SIZE 1 #define AVR32_SR_L 5 #define AVR32_SR_L_MASK 0x00000020 #define AVR32_SR_L_OFFSET 5 #define AVR32_SR_L_SIZE 1 #define AVR32_SR_M0 22 #define AVR32_SR_M0_MASK 0x00400000 #define AVR32_SR_M0_OFFSET 22 #define AVR32_SR_M0_SIZE 1 #define AVR32_SR_M1 23 #define AVR32_SR_M1_MASK 0x00800000 #define AVR32_SR_M1_OFFSET 23 #define AVR32_SR_M1_SIZE 1 #define AVR32_SR_M2 24 #define AVR32_SR_M2_MASK 0x01000000 #define AVR32_SR_M2_OFFSET 24 #define AVR32_SR_M2_SIZE 1 #define AVR32_SR_M 22 #define AVR32_SR_M_APP 0x00000000 #define AVR32_SR_M_EX 0x00000006 #define AVR32_SR_M_INT0 0x00000002 #define AVR32_SR_M_INT1 0x00000003 #define AVR32_SR_M_INT2 0x00000004 #define AVR32_SR_M_INT3 0x00000005 #define AVR32_SR_M_MASK 0x01c00000 #define AVR32_SR_M_NMI 0x00000007 #define AVR32_SR_M_OFFSET 22 #define AVR32_SR_M_SIZE 3 #define AVR32_SR_M_SUP 0x00000001 #define AVR32_SR_N 2 #define AVR32_SR_N_MASK 0x00000004 #define AVR32_SR_N_OFFSET 2 #define AVR32_SR_N_SIZE 1 #define AVR32_SR_Q 4 #define AVR32_SR_Q_MASK 0x00000010 #define AVR32_SR_Q_OFFSET 4 #define AVR32_SR_Q_SIZE 1 #define AVR32_SR_T 14 #define AVR32_SR_T_MASK 0x00004000 #define AVR32_SR_T_OFFSET 14 #define AVR32_SR_T_SIZE 1 #define AVR32_SR_V 3 #define AVR32_SR_V_MASK 0x00000008 #define AVR32_SR_V_OFFSET 3 #define AVR32_SR_V_SIZE 1 #define AVR32_SR_Z 1 #define AVR32_SR_Z_MASK 0x00000002 #define AVR32_SR_Z_OFFSET 1 #define AVR32_SR_Z_SIZE 1 #define AVR32_EVBA_OFFSET_BREAKPOINT 0x0000001c #define AVR32_EVBA_OFFSET_BUS_ERROR_DATA 0x00000008 #define AVR32_EVBA_OFFSET_BUS_ERROR_INSTR 0x0000000c #define AVR32_EVBA_OFFSET_COP_ABSENT 0x00000030 #define AVR32_EVBA_OFFSET_DATA_ADDR_R 0x00000034 #define AVR32_EVBA_OFFSET_DATA_ADDR_W 0x00000038 #define AVR32_EVBA_OFFSET_DTLB_MISS_R 0x00000060 #define AVR32_EVBA_OFFSET_DTLB_MISS_W 0x00000070 #define AVR32_EVBA_OFFSET_DTLB_MODIFIED 0x00000044 #define AVR32_EVBA_OFFSET_DTLB_PROT_R 0x0000003c #define AVR32_EVBA_OFFSET_DTLB_PROT_W 0x00000040 #define AVR32_EVBA_OFFSET_FLOATING_POINT 0x0000002c #define AVR32_EVBA_OFFSET_ILLEGAL_OPCODE 0x00000020 #define AVR32_EVBA_OFFSET_INSTR_ADDR 0x00000014 #define AVR32_EVBA_OFFSET_ITLB_MISS 0x00000050 #define AVR32_EVBA_OFFSET_ITLB_PROT 0x00000018 #define AVR32_EVBA_OFFSET_NMI 0x00000010 #define AVR32_EVBA_OFFSET_PRIVILEGE_VIOL 0x00000028 #define AVR32_EVBA_OFFSET_SCALL 0x00000100 #define AVR32_EVBA_OFFSET_TLB_MULTIPLE 0x00000004 #define AVR32_EVBA_OFFSET_UNIMPLEMENTED 0x00000024 #define AVR32_EVBA_OFFSET_UNRECOVERABLE 0x00000000 #define AVR32_RESET_VECTOR 0x80000000 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_sr_t { unsigned int : 4; unsigned int dm : 1; unsigned int d : 1; unsigned int : 1; unsigned int m2 : 1; unsigned int m1 : 1; unsigned int m0 : 1; unsigned int em : 1; unsigned int i3m : 1; unsigned int i2m : 1; unsigned int i1m : 1; unsigned int i0m : 1; unsigned int gm : 1; unsigned int : 1; unsigned int t : 1; unsigned int : 8; unsigned int l : 1; unsigned int q : 1; unsigned int v : 1; unsigned int n : 1; unsigned int z : 1; unsigned int c : 1; } avr32_sr_t; typedef struct avr32_cpucr_t { unsigned int :15; unsigned int locen : 1; unsigned int spl : 5; unsigned int cpl : 5; unsigned int cop : 5; unsigned int sie : 1; } avr32_cpucr_t; typedef struct avr32_config0_t { unsigned int processorid : 8; unsigned int : 4; unsigned int processorrevision : 4; unsigned int at : 3; unsigned int ar : 3; unsigned int mmut : 3; unsigned int f : 1; unsigned int j : 1; unsigned int p : 1; unsigned int o : 1; unsigned int s : 1; unsigned int d : 1; unsigned int r : 1; } avr32_config0_t; typedef struct avr32_config1_t { unsigned int immusz : 6; unsigned int dmmusz : 6; unsigned int iset : 4; unsigned int ilsz : 3; unsigned int iass : 3; unsigned int dset : 4; unsigned int dlsz : 3; unsigned int dass : 3; } avr32_config1_t; typedef struct avr32_mpuar0_t { unsigned int base :20; unsigned int : 6; unsigned int size : 5; unsigned int v : 1; } avr32_mpuar0_t; typedef struct avr32_mpuar1_t { unsigned int base :20; unsigned int : 6; unsigned int size : 5; unsigned int v : 1; } avr32_mpuar1_t; typedef struct avr32_mpuar2_t { unsigned int base :20; unsigned int : 6; unsigned int size : 5; unsigned int v : 1; } avr32_mpuar2_t; typedef struct avr32_mpuar3_t { unsigned int base :20; unsigned int : 6; unsigned int size : 5; unsigned int v : 1; } avr32_mpuar3_t; typedef struct avr32_mpuar4_t { unsigned int base :20; unsigned int : 6; unsigned int size : 5; unsigned int v : 1; } avr32_mpuar4_t; typedef struct avr32_mpuar5_t { unsigned int base :20; unsigned int : 6; unsigned int size : 5; unsigned int v : 1; } avr32_mpuar5_t; typedef struct avr32_mpuar6_t { unsigned int base :20; unsigned int : 6; unsigned int size : 5; unsigned int v : 1; } avr32_mpuar6_t; typedef struct avr32_mpuar7_t { unsigned int base :20; unsigned int : 6; unsigned int size : 5; unsigned int v : 1; } avr32_mpuar7_t; typedef struct avr32_mpupsr0_t { unsigned int :16; unsigned int p15 : 1; unsigned int p14 : 1; unsigned int p13 : 1; unsigned int p12 : 1; unsigned int p11 : 1; unsigned int p10 : 1; unsigned int p9 : 1; unsigned int p8 : 1; unsigned int p7 : 1; unsigned int p6 : 1; unsigned int p5 : 1; unsigned int p4 : 1; unsigned int p3 : 1; unsigned int p2 : 1; unsigned int p1 : 1; unsigned int p0 : 1; } avr32_mpupsr0_t; typedef struct avr32_mpupsr1_t { unsigned int :16; unsigned int p15 : 1; unsigned int p14 : 1; unsigned int p13 : 1; unsigned int p12 : 1; unsigned int p11 : 1; unsigned int p10 : 1; unsigned int p9 : 1; unsigned int p8 : 1; unsigned int p7 : 1; unsigned int p6 : 1; unsigned int p5 : 1; unsigned int p4 : 1; unsigned int p3 : 1; unsigned int p2 : 1; unsigned int p1 : 1; unsigned int p0 : 1; } avr32_mpupsr1_t; typedef struct avr32_mpupsr2_t { unsigned int :16; unsigned int p15 : 1; unsigned int p14 : 1; unsigned int p13 : 1; unsigned int p12 : 1; unsigned int p11 : 1; unsigned int p10 : 1; unsigned int p9 : 1; unsigned int p8 : 1; unsigned int p7 : 1; unsigned int p6 : 1; unsigned int p5 : 1; unsigned int p4 : 1; unsigned int p3 : 1; unsigned int p2 : 1; unsigned int p1 : 1; unsigned int p0 : 1; } avr32_mpupsr2_t; typedef struct avr32_mpupsr3_t { unsigned int :16; unsigned int p15 : 1; unsigned int p14 : 1; unsigned int p13 : 1; unsigned int p12 : 1; unsigned int p11 : 1; unsigned int p10 : 1; unsigned int p9 : 1; unsigned int p8 : 1; unsigned int p7 : 1; unsigned int p6 : 1; unsigned int p5 : 1; unsigned int p4 : 1; unsigned int p3 : 1; unsigned int p2 : 1; unsigned int p1 : 1; unsigned int p0 : 1; } avr32_mpupsr3_t; typedef struct avr32_mpupsr4_t { unsigned int :16; unsigned int p15 : 1; unsigned int p14 : 1; unsigned int p13 : 1; unsigned int p12 : 1; unsigned int p11 : 1; unsigned int p10 : 1; unsigned int p9 : 1; unsigned int p8 : 1; unsigned int p7 : 1; unsigned int p6 : 1; unsigned int p5 : 1; unsigned int p4 : 1; unsigned int p3 : 1; unsigned int p2 : 1; unsigned int p1 : 1; unsigned int p0 : 1; } avr32_mpupsr4_t; typedef struct avr32_mpupsr5_t { unsigned int :16; unsigned int p15 : 1; unsigned int p14 : 1; unsigned int p13 : 1; unsigned int p12 : 1; unsigned int p11 : 1; unsigned int p10 : 1; unsigned int p9 : 1; unsigned int p8 : 1; unsigned int p7 : 1; unsigned int p6 : 1; unsigned int p5 : 1; unsigned int p4 : 1; unsigned int p3 : 1; unsigned int p2 : 1; unsigned int p1 : 1; unsigned int p0 : 1; } avr32_mpupsr5_t; typedef struct avr32_mpupsr6_t { unsigned int :16; unsigned int p15 : 1; unsigned int p14 : 1; unsigned int p13 : 1; unsigned int p12 : 1; unsigned int p11 : 1; unsigned int p10 : 1; unsigned int p9 : 1; unsigned int p8 : 1; unsigned int p7 : 1; unsigned int p6 : 1; unsigned int p5 : 1; unsigned int p4 : 1; unsigned int p3 : 1; unsigned int p2 : 1; unsigned int p1 : 1; unsigned int p0 : 1; } avr32_mpupsr6_t; typedef struct avr32_mpupsr7_t { unsigned int :16; unsigned int p15 : 1; unsigned int p14 : 1; unsigned int p13 : 1; unsigned int p12 : 1; unsigned int p11 : 1; unsigned int p10 : 1; unsigned int p9 : 1; unsigned int p8 : 1; unsigned int p7 : 1; unsigned int p6 : 1; unsigned int p5 : 1; unsigned int p4 : 1; unsigned int p3 : 1; unsigned int p2 : 1; unsigned int p1 : 1; unsigned int p0 : 1; } avr32_mpupsr7_t; typedef struct avr32_mpucra_t { unsigned int :24; unsigned int c7 : 1; unsigned int c6 : 1; unsigned int c5 : 1; unsigned int c4 : 1; unsigned int c3 : 1; unsigned int c2 : 1; unsigned int c1 : 1; unsigned int c0 : 1; } avr32_mpucra_t; typedef struct avr32_mpucrb_t { unsigned int :24; unsigned int c7 : 1; unsigned int c6 : 1; unsigned int c5 : 1; unsigned int c4 : 1; unsigned int c3 : 1; unsigned int c2 : 1; unsigned int c1 : 1; unsigned int c0 : 1; } avr32_mpucrb_t; typedef struct avr32_mpubra_t { unsigned int :24; unsigned int b7 : 1; unsigned int b6 : 1; unsigned int b5 : 1; unsigned int b4 : 1; unsigned int b3 : 1; unsigned int b2 : 1; unsigned int b1 : 1; unsigned int b0 : 1; } avr32_mpubra_t; typedef struct avr32_mpubrb_t { unsigned int :24; unsigned int b7 : 1; unsigned int b6 : 1; unsigned int b5 : 1; unsigned int b4 : 1; unsigned int b3 : 1; unsigned int b2 : 1; unsigned int b1 : 1; unsigned int b0 : 1; } avr32_mpubrb_t; typedef struct avr32_mpuapra_t { unsigned int ap7 : 4; unsigned int ap6 : 4; unsigned int ap5 : 4; unsigned int ap4 : 4; unsigned int ap3 : 4; unsigned int ap2 : 4; unsigned int ap1 : 4; unsigned int ap0 : 4; } avr32_mpuapra_t; typedef struct avr32_mpuaprb_t { unsigned int ap7 : 4; unsigned int ap6 : 4; unsigned int ap5 : 4; unsigned int ap4 : 4; unsigned int ap3 : 4; unsigned int ap2 : 4; unsigned int ap1 : 4; unsigned int ap0 : 4; } avr32_mpuaprb_t; typedef struct avr32_mpucr_t { unsigned int :31; unsigned int e : 1; } avr32_mpucr_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif #if !defined (DEPRECATED_DISABLE) #define AVR32_MPUAPRA_AP0_EXECUTE 0x00000001 #define AVR32_MPUAPRA_AP0_SUP_WRITE 0x00000008 #define AVR32_MPUAPRA_AP0_USER 0x00000004 #define AVR32_MPUAPRA_AP0_WRITE 0x00000002 #define AVR32_MPUAPRA_AP1_EXECUTE 0x00000001 #define AVR32_MPUAPRA_AP1_SUP_WRITE 0x00000008 #define AVR32_MPUAPRA_AP1_USER 0x00000004 #define AVR32_MPUAPRA_AP1_WRITE 0x00000002 #define AVR32_MPUAPRA_AP2_EXECUTE 0x00000001 #define AVR32_MPUAPRA_AP2_SUP_WRITE 0x00000008 #define AVR32_MPUAPRA_AP2_USER 0x00000004 #define AVR32_MPUAPRA_AP2_WRITE 0x00000002 #define AVR32_MPUAPRA_AP3_EXECUTE 0x00000001 #define AVR32_MPUAPRA_AP3_SUP_WRITE 0x00000008 #define AVR32_MPUAPRA_AP3_USER 0x00000004 #define AVR32_MPUAPRA_AP3_WRITE 0x00000002 #define AVR32_MPUAPRA_AP4_EXECUTE 0x00000001 #define AVR32_MPUAPRA_AP4_SUP_WRITE 0x00000008 #define AVR32_MPUAPRA_AP4_USER 0x00000004 #define AVR32_MPUAPRA_AP4_WRITE 0x00000002 #define AVR32_MPUAPRA_AP5_EXECUTE 0x00000001 #define AVR32_MPUAPRA_AP5_SUP_WRITE 0x00000008 #define AVR32_MPUAPRA_AP5_USER 0x00000004 #define AVR32_MPUAPRA_AP5_WRITE 0x00000002 #define AVR32_MPUAPRA_AP6_EXECUTE 0x00000001 #define AVR32_MPUAPRA_AP6_SUP_WRITE 0x00000008 #define AVR32_MPUAPRA_AP6_USER 0x00000004 #define AVR32_MPUAPRA_AP6_WRITE 0x00000002 #define AVR32_MPUAPRA_AP7_EXECUTE 0x00000001 #define AVR32_MPUAPRA_AP7_SUP_WRITE 0x00000008 #define AVR32_MPUAPRA_AP7_USER 0x00000004 #define AVR32_MPUAPRA_AP7_WRITE 0x00000002 #define AVR32_MPUAPRB_AP0_EXECUTE 0x00000001 #define AVR32_MPUAPRB_AP0_SUP_WRITE 0x00000008 #define AVR32_MPUAPRB_AP0_USER 0x00000004 #define AVR32_MPUAPRB_AP0_WRITE 0x00000002 #define AVR32_MPUAPRB_AP1_EXECUTE 0x00000001 #define AVR32_MPUAPRB_AP1_SUP_WRITE 0x00000008 #define AVR32_MPUAPRB_AP1_USER 0x00000004 #define AVR32_MPUAPRB_AP1_WRITE 0x00000002 #define AVR32_MPUAPRB_AP2_EXECUTE 0x00000001 #define AVR32_MPUAPRB_AP2_SUP_WRITE 0x00000008 #define AVR32_MPUAPRB_AP2_USER 0x00000004 #define AVR32_MPUAPRB_AP2_WRITE 0x00000002 #define AVR32_MPUAPRB_AP3_EXECUTE 0x00000001 #define AVR32_MPUAPRB_AP3_SUP_WRITE 0x00000008 #define AVR32_MPUAPRB_AP3_USER 0x00000004 #define AVR32_MPUAPRB_AP3_WRITE 0x00000002 #define AVR32_MPUAPRB_AP4_EXECUTE 0x00000001 #define AVR32_MPUAPRB_AP4_SUP_WRITE 0x00000008 #define AVR32_MPUAPRB_AP4_USER 0x00000004 #define AVR32_MPUAPRB_AP4_WRITE 0x00000002 #define AVR32_MPUAPRB_AP5_EXECUTE 0x00000001 #define AVR32_MPUAPRB_AP5_SUP_WRITE 0x00000008 #define AVR32_MPUAPRB_AP5_USER 0x00000004 #define AVR32_MPUAPRB_AP5_WRITE 0x00000002 #define AVR32_MPUAPRB_AP6_EXECUTE 0x00000001 #define AVR32_MPUAPRB_AP6_SUP_WRITE 0x00000008 #define AVR32_MPUAPRB_AP6_USER 0x00000004 #define AVR32_MPUAPRB_AP6_WRITE 0x00000002 #define AVR32_MPUAPRB_AP7_EXECUTE 0x00000001 #define AVR32_MPUAPRB_AP7_SUP_WRITE 0x00000008 #define AVR32_MPUAPRB_AP7_USER 0x00000004 #define AVR32_MPUAPRB_AP7_WRITE 0x00000002 #endif /*#ifdef AVR32_CORE_SC0_130_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/eic_230.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 : UC3000 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_EIC_230_H_INCLUDED #define AVR32_EIC_230_H_INCLUDED #define AVR32_EIC_H_VERSION 230 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_EIC_ - Bitfield mask: AVR32_EIC__ - Bitfield offset: AVR32_EIC___OFFSET - Bitfield size: AVR32_EIC___SIZE - Bitfield values: AVR32_EIC___ 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_EIC_ - Bitfield offset: AVR32_EIC__OFFSET - Bitfield size: AVR32_EIC__SIZE - Bitfield values: AVR32_EIC__ - Bitfield values: AVR32_EIC_ All defines are sorted alphabetically. */ #define AVR32_EIC_ASYNC 0x00000028 #define AVR32_EIC_ASYNC_INT0 0 #define AVR32_EIC_ASYNC_INT0_MASK 0x00000001 #define AVR32_EIC_ASYNC_INT0_OFFSET 0 #define AVR32_EIC_ASYNC_INT0_SIZE 1 #define AVR32_EIC_ASYNC_INT1 1 #define AVR32_EIC_ASYNC_INT1_MASK 0x00000002 #define AVR32_EIC_ASYNC_INT1_OFFSET 1 #define AVR32_EIC_ASYNC_INT1_SIZE 1 #define AVR32_EIC_ASYNC_INT2 2 #define AVR32_EIC_ASYNC_INT2_MASK 0x00000004 #define AVR32_EIC_ASYNC_INT2_OFFSET 2 #define AVR32_EIC_ASYNC_INT2_SIZE 1 #define AVR32_EIC_ASYNC_INT3 3 #define AVR32_EIC_ASYNC_INT3_MASK 0x00000008 #define AVR32_EIC_ASYNC_INT3_OFFSET 3 #define AVR32_EIC_ASYNC_INT3_SIZE 1 #define AVR32_EIC_ASYNC_INT4 4 #define AVR32_EIC_ASYNC_INT4_MASK 0x00000010 #define AVR32_EIC_ASYNC_INT4_OFFSET 4 #define AVR32_EIC_ASYNC_INT4_SIZE 1 #define AVR32_EIC_ASYNC_INT5 5 #define AVR32_EIC_ASYNC_INT5_MASK 0x00000020 #define AVR32_EIC_ASYNC_INT5_OFFSET 5 #define AVR32_EIC_ASYNC_INT5_SIZE 1 #define AVR32_EIC_ASYNC_INT6 6 #define AVR32_EIC_ASYNC_INT6_MASK 0x00000040 #define AVR32_EIC_ASYNC_INT6_OFFSET 6 #define AVR32_EIC_ASYNC_INT6_SIZE 1 #define AVR32_EIC_ASYNC_INT7 7 #define AVR32_EIC_ASYNC_INT7_MASK 0x00000080 #define AVR32_EIC_ASYNC_INT7_OFFSET 7 #define AVR32_EIC_ASYNC_INT7_SIZE 1 #define AVR32_EIC_ASYNC_NMI 8 #define AVR32_EIC_ASYNC_NMI_MASK 0x00000100 #define AVR32_EIC_ASYNC_NMI_OFFSET 8 #define AVR32_EIC_ASYNC_NMI_SIZE 1 #define AVR32_EIC_CTRL 0x00000038 #define AVR32_EIC_CTRL_INT0 0 #define AVR32_EIC_CTRL_INT0_MASK 0x00000001 #define AVR32_EIC_CTRL_INT0_OFFSET 0 #define AVR32_EIC_CTRL_INT0_SIZE 1 #define AVR32_EIC_CTRL_INT1 1 #define AVR32_EIC_CTRL_INT1_MASK 0x00000002 #define AVR32_EIC_CTRL_INT1_OFFSET 1 #define AVR32_EIC_CTRL_INT1_SIZE 1 #define AVR32_EIC_CTRL_INT2 2 #define AVR32_EIC_CTRL_INT2_MASK 0x00000004 #define AVR32_EIC_CTRL_INT2_OFFSET 2 #define AVR32_EIC_CTRL_INT2_SIZE 1 #define AVR32_EIC_CTRL_INT3 3 #define AVR32_EIC_CTRL_INT3_MASK 0x00000008 #define AVR32_EIC_CTRL_INT3_OFFSET 3 #define AVR32_EIC_CTRL_INT3_SIZE 1 #define AVR32_EIC_CTRL_INT4 4 #define AVR32_EIC_CTRL_INT4_MASK 0x00000010 #define AVR32_EIC_CTRL_INT4_OFFSET 4 #define AVR32_EIC_CTRL_INT4_SIZE 1 #define AVR32_EIC_CTRL_INT5 5 #define AVR32_EIC_CTRL_INT5_MASK 0x00000020 #define AVR32_EIC_CTRL_INT5_OFFSET 5 #define AVR32_EIC_CTRL_INT5_SIZE 1 #define AVR32_EIC_CTRL_INT6 6 #define AVR32_EIC_CTRL_INT6_MASK 0x00000040 #define AVR32_EIC_CTRL_INT6_OFFSET 6 #define AVR32_EIC_CTRL_INT6_SIZE 1 #define AVR32_EIC_CTRL_INT7 7 #define AVR32_EIC_CTRL_INT7_MASK 0x00000080 #define AVR32_EIC_CTRL_INT7_OFFSET 7 #define AVR32_EIC_CTRL_INT7_SIZE 1 #define AVR32_EIC_CTRL_NMI 8 #define AVR32_EIC_CTRL_NMI_MASK 0x00000100 #define AVR32_EIC_CTRL_NMI_OFFSET 8 #define AVR32_EIC_CTRL_NMI_SIZE 1 #define AVR32_EIC_DIS 0x00000034 #define AVR32_EIC_DIS_INT0 0 #define AVR32_EIC_DIS_INT0_MASK 0x00000001 #define AVR32_EIC_DIS_INT0_OFFSET 0 #define AVR32_EIC_DIS_INT0_SIZE 1 #define AVR32_EIC_DIS_INT1 1 #define AVR32_EIC_DIS_INT1_MASK 0x00000002 #define AVR32_EIC_DIS_INT1_OFFSET 1 #define AVR32_EIC_DIS_INT1_SIZE 1 #define AVR32_EIC_DIS_INT2 2 #define AVR32_EIC_DIS_INT2_MASK 0x00000004 #define AVR32_EIC_DIS_INT2_OFFSET 2 #define AVR32_EIC_DIS_INT2_SIZE 1 #define AVR32_EIC_DIS_INT3 3 #define AVR32_EIC_DIS_INT3_MASK 0x00000008 #define AVR32_EIC_DIS_INT3_OFFSET 3 #define AVR32_EIC_DIS_INT3_SIZE 1 #define AVR32_EIC_DIS_INT4 4 #define AVR32_EIC_DIS_INT4_MASK 0x00000010 #define AVR32_EIC_DIS_INT4_OFFSET 4 #define AVR32_EIC_DIS_INT4_SIZE 1 #define AVR32_EIC_DIS_INT5 5 #define AVR32_EIC_DIS_INT5_MASK 0x00000020 #define AVR32_EIC_DIS_INT5_OFFSET 5 #define AVR32_EIC_DIS_INT5_SIZE 1 #define AVR32_EIC_DIS_INT6 6 #define AVR32_EIC_DIS_INT6_MASK 0x00000040 #define AVR32_EIC_DIS_INT6_OFFSET 6 #define AVR32_EIC_DIS_INT6_SIZE 1 #define AVR32_EIC_DIS_INT7 7 #define AVR32_EIC_DIS_INT7_MASK 0x00000080 #define AVR32_EIC_DIS_INT7_OFFSET 7 #define AVR32_EIC_DIS_INT7_SIZE 1 #define AVR32_EIC_DIS_NMI 8 #define AVR32_EIC_DIS_NMI_MASK 0x00000100 #define AVR32_EIC_DIS_NMI_OFFSET 8 #define AVR32_EIC_DIS_NMI_SIZE 1 #define AVR32_EIC_EDGE 0x00000018 #define AVR32_EIC_EDGE_INT0 0 #define AVR32_EIC_EDGE_INT0_MASK 0x00000001 #define AVR32_EIC_EDGE_INT0_OFFSET 0 #define AVR32_EIC_EDGE_INT0_SIZE 1 #define AVR32_EIC_EDGE_INT1 1 #define AVR32_EIC_EDGE_INT1_MASK 0x00000002 #define AVR32_EIC_EDGE_INT1_OFFSET 1 #define AVR32_EIC_EDGE_INT1_SIZE 1 #define AVR32_EIC_EDGE_INT2 2 #define AVR32_EIC_EDGE_INT2_MASK 0x00000004 #define AVR32_EIC_EDGE_INT2_OFFSET 2 #define AVR32_EIC_EDGE_INT2_SIZE 1 #define AVR32_EIC_EDGE_INT3 3 #define AVR32_EIC_EDGE_INT3_MASK 0x00000008 #define AVR32_EIC_EDGE_INT3_OFFSET 3 #define AVR32_EIC_EDGE_INT3_SIZE 1 #define AVR32_EIC_EDGE_INT4 4 #define AVR32_EIC_EDGE_INT4_MASK 0x00000010 #define AVR32_EIC_EDGE_INT4_OFFSET 4 #define AVR32_EIC_EDGE_INT4_SIZE 1 #define AVR32_EIC_EDGE_INT5 5 #define AVR32_EIC_EDGE_INT5_MASK 0x00000020 #define AVR32_EIC_EDGE_INT5_OFFSET 5 #define AVR32_EIC_EDGE_INT5_SIZE 1 #define AVR32_EIC_EDGE_INT6 6 #define AVR32_EIC_EDGE_INT6_MASK 0x00000040 #define AVR32_EIC_EDGE_INT6_OFFSET 6 #define AVR32_EIC_EDGE_INT6_SIZE 1 #define AVR32_EIC_EDGE_INT7 7 #define AVR32_EIC_EDGE_INT7_MASK 0x00000080 #define AVR32_EIC_EDGE_INT7_OFFSET 7 #define AVR32_EIC_EDGE_INT7_SIZE 1 #define AVR32_EIC_EDGE_NMI 8 #define AVR32_EIC_EDGE_NMI_MASK 0x00000100 #define AVR32_EIC_EDGE_NMI_OFFSET 8 #define AVR32_EIC_EDGE_NMI_SIZE 1 #define AVR32_EIC_EN 0x00000030 #define AVR32_EIC_EN_INT0 0 #define AVR32_EIC_EN_INT0_MASK 0x00000001 #define AVR32_EIC_EN_INT0_OFFSET 0 #define AVR32_EIC_EN_INT0_SIZE 1 #define AVR32_EIC_EN_INT1 1 #define AVR32_EIC_EN_INT1_MASK 0x00000002 #define AVR32_EIC_EN_INT1_OFFSET 1 #define AVR32_EIC_EN_INT1_SIZE 1 #define AVR32_EIC_EN_INT2 2 #define AVR32_EIC_EN_INT2_MASK 0x00000004 #define AVR32_EIC_EN_INT2_OFFSET 2 #define AVR32_EIC_EN_INT2_SIZE 1 #define AVR32_EIC_EN_INT3 3 #define AVR32_EIC_EN_INT3_MASK 0x00000008 #define AVR32_EIC_EN_INT3_OFFSET 3 #define AVR32_EIC_EN_INT3_SIZE 1 #define AVR32_EIC_EN_INT4 4 #define AVR32_EIC_EN_INT4_MASK 0x00000010 #define AVR32_EIC_EN_INT4_OFFSET 4 #define AVR32_EIC_EN_INT4_SIZE 1 #define AVR32_EIC_EN_INT5 5 #define AVR32_EIC_EN_INT5_MASK 0x00000020 #define AVR32_EIC_EN_INT5_OFFSET 5 #define AVR32_EIC_EN_INT5_SIZE 1 #define AVR32_EIC_EN_INT6 6 #define AVR32_EIC_EN_INT6_MASK 0x00000040 #define AVR32_EIC_EN_INT6_OFFSET 6 #define AVR32_EIC_EN_INT6_SIZE 1 #define AVR32_EIC_EN_INT7 7 #define AVR32_EIC_EN_INT7_MASK 0x00000080 #define AVR32_EIC_EN_INT7_OFFSET 7 #define AVR32_EIC_EN_INT7_SIZE 1 #define AVR32_EIC_EN_MASK 0x00000001 #define AVR32_EIC_EN_NMI 8 #define AVR32_EIC_EN_NMI_MASK 0x00000100 #define AVR32_EIC_EN_NMI_OFFSET 8 #define AVR32_EIC_EN_NMI_SIZE 1 #define AVR32_EIC_EN_OFFSET 0 #define AVR32_EIC_EN_SIZE 1 #define AVR32_EIC_FILTER 0x00000020 #define AVR32_EIC_FILTER_INT0 0 #define AVR32_EIC_FILTER_INT0_MASK 0x00000001 #define AVR32_EIC_FILTER_INT0_OFFSET 0 #define AVR32_EIC_FILTER_INT0_SIZE 1 #define AVR32_EIC_FILTER_INT1 1 #define AVR32_EIC_FILTER_INT1_MASK 0x00000002 #define AVR32_EIC_FILTER_INT1_OFFSET 1 #define AVR32_EIC_FILTER_INT1_SIZE 1 #define AVR32_EIC_FILTER_INT2 2 #define AVR32_EIC_FILTER_INT2_MASK 0x00000004 #define AVR32_EIC_FILTER_INT2_OFFSET 2 #define AVR32_EIC_FILTER_INT2_SIZE 1 #define AVR32_EIC_FILTER_INT3 3 #define AVR32_EIC_FILTER_INT3_MASK 0x00000008 #define AVR32_EIC_FILTER_INT3_OFFSET 3 #define AVR32_EIC_FILTER_INT3_SIZE 1 #define AVR32_EIC_FILTER_INT4 4 #define AVR32_EIC_FILTER_INT4_MASK 0x00000010 #define AVR32_EIC_FILTER_INT4_OFFSET 4 #define AVR32_EIC_FILTER_INT4_SIZE 1 #define AVR32_EIC_FILTER_INT5 5 #define AVR32_EIC_FILTER_INT5_MASK 0x00000020 #define AVR32_EIC_FILTER_INT5_OFFSET 5 #define AVR32_EIC_FILTER_INT5_SIZE 1 #define AVR32_EIC_FILTER_INT6 6 #define AVR32_EIC_FILTER_INT6_MASK 0x00000040 #define AVR32_EIC_FILTER_INT6_OFFSET 6 #define AVR32_EIC_FILTER_INT6_SIZE 1 #define AVR32_EIC_FILTER_INT7 7 #define AVR32_EIC_FILTER_INT7_MASK 0x00000080 #define AVR32_EIC_FILTER_INT7_OFFSET 7 #define AVR32_EIC_FILTER_INT7_SIZE 1 #define AVR32_EIC_FILTER_NMI 8 #define AVR32_EIC_FILTER_NMI_MASK 0x00000100 #define AVR32_EIC_FILTER_NMI_OFFSET 8 #define AVR32_EIC_FILTER_NMI_SIZE 1 #define AVR32_EIC_ICR 0x00000010 #define AVR32_EIC_ICR_INT0 0 #define AVR32_EIC_ICR_INT0_MASK 0x00000001 #define AVR32_EIC_ICR_INT0_OFFSET 0 #define AVR32_EIC_ICR_INT0_SIZE 1 #define AVR32_EIC_ICR_INT1 1 #define AVR32_EIC_ICR_INT1_MASK 0x00000002 #define AVR32_EIC_ICR_INT1_OFFSET 1 #define AVR32_EIC_ICR_INT1_SIZE 1 #define AVR32_EIC_ICR_INT2 2 #define AVR32_EIC_ICR_INT2_MASK 0x00000004 #define AVR32_EIC_ICR_INT2_OFFSET 2 #define AVR32_EIC_ICR_INT2_SIZE 1 #define AVR32_EIC_ICR_INT3 3 #define AVR32_EIC_ICR_INT3_MASK 0x00000008 #define AVR32_EIC_ICR_INT3_OFFSET 3 #define AVR32_EIC_ICR_INT3_SIZE 1 #define AVR32_EIC_ICR_INT4 4 #define AVR32_EIC_ICR_INT4_MASK 0x00000010 #define AVR32_EIC_ICR_INT4_OFFSET 4 #define AVR32_EIC_ICR_INT4_SIZE 1 #define AVR32_EIC_ICR_INT5 5 #define AVR32_EIC_ICR_INT5_MASK 0x00000020 #define AVR32_EIC_ICR_INT5_OFFSET 5 #define AVR32_EIC_ICR_INT5_SIZE 1 #define AVR32_EIC_ICR_INT6 6 #define AVR32_EIC_ICR_INT6_MASK 0x00000040 #define AVR32_EIC_ICR_INT6_OFFSET 6 #define AVR32_EIC_ICR_INT6_SIZE 1 #define AVR32_EIC_ICR_INT7 7 #define AVR32_EIC_ICR_INT7_MASK 0x00000080 #define AVR32_EIC_ICR_INT7_OFFSET 7 #define AVR32_EIC_ICR_INT7_SIZE 1 #define AVR32_EIC_ICR_NMI 8 #define AVR32_EIC_ICR_NMI_MASK 0x00000100 #define AVR32_EIC_ICR_NMI_OFFSET 8 #define AVR32_EIC_ICR_NMI_SIZE 1 #define AVR32_EIC_IDR 0x00000004 #define AVR32_EIC_IDR_INT0 0 #define AVR32_EIC_IDR_INT0_MASK 0x00000001 #define AVR32_EIC_IDR_INT0_OFFSET 0 #define AVR32_EIC_IDR_INT0_SIZE 1 #define AVR32_EIC_IDR_INT1 1 #define AVR32_EIC_IDR_INT1_MASK 0x00000002 #define AVR32_EIC_IDR_INT1_OFFSET 1 #define AVR32_EIC_IDR_INT1_SIZE 1 #define AVR32_EIC_IDR_INT2 2 #define AVR32_EIC_IDR_INT2_MASK 0x00000004 #define AVR32_EIC_IDR_INT2_OFFSET 2 #define AVR32_EIC_IDR_INT2_SIZE 1 #define AVR32_EIC_IDR_INT3 3 #define AVR32_EIC_IDR_INT3_MASK 0x00000008 #define AVR32_EIC_IDR_INT3_OFFSET 3 #define AVR32_EIC_IDR_INT3_SIZE 1 #define AVR32_EIC_IDR_INT4 4 #define AVR32_EIC_IDR_INT4_MASK 0x00000010 #define AVR32_EIC_IDR_INT4_OFFSET 4 #define AVR32_EIC_IDR_INT4_SIZE 1 #define AVR32_EIC_IDR_INT5 5 #define AVR32_EIC_IDR_INT5_MASK 0x00000020 #define AVR32_EIC_IDR_INT5_OFFSET 5 #define AVR32_EIC_IDR_INT5_SIZE 1 #define AVR32_EIC_IDR_INT6 6 #define AVR32_EIC_IDR_INT6_MASK 0x00000040 #define AVR32_EIC_IDR_INT6_OFFSET 6 #define AVR32_EIC_IDR_INT6_SIZE 1 #define AVR32_EIC_IDR_INT7 7 #define AVR32_EIC_IDR_INT7_MASK 0x00000080 #define AVR32_EIC_IDR_INT7_OFFSET 7 #define AVR32_EIC_IDR_INT7_SIZE 1 #define AVR32_EIC_IDR_NMI 8 #define AVR32_EIC_IDR_NMI_MASK 0x00000100 #define AVR32_EIC_IDR_NMI_OFFSET 8 #define AVR32_EIC_IDR_NMI_SIZE 1 #define AVR32_EIC_IER 0x00000000 #define AVR32_EIC_IER_INT0 0 #define AVR32_EIC_IER_INT0_MASK 0x00000001 #define AVR32_EIC_IER_INT0_OFFSET 0 #define AVR32_EIC_IER_INT0_SIZE 1 #define AVR32_EIC_IER_INT1 1 #define AVR32_EIC_IER_INT1_MASK 0x00000002 #define AVR32_EIC_IER_INT1_OFFSET 1 #define AVR32_EIC_IER_INT1_SIZE 1 #define AVR32_EIC_IER_INT2 2 #define AVR32_EIC_IER_INT2_MASK 0x00000004 #define AVR32_EIC_IER_INT2_OFFSET 2 #define AVR32_EIC_IER_INT2_SIZE 1 #define AVR32_EIC_IER_INT3 3 #define AVR32_EIC_IER_INT3_MASK 0x00000008 #define AVR32_EIC_IER_INT3_OFFSET 3 #define AVR32_EIC_IER_INT3_SIZE 1 #define AVR32_EIC_IER_INT4 4 #define AVR32_EIC_IER_INT4_MASK 0x00000010 #define AVR32_EIC_IER_INT4_OFFSET 4 #define AVR32_EIC_IER_INT4_SIZE 1 #define AVR32_EIC_IER_INT5 5 #define AVR32_EIC_IER_INT5_MASK 0x00000020 #define AVR32_EIC_IER_INT5_OFFSET 5 #define AVR32_EIC_IER_INT5_SIZE 1 #define AVR32_EIC_IER_INT6 6 #define AVR32_EIC_IER_INT6_MASK 0x00000040 #define AVR32_EIC_IER_INT6_OFFSET 6 #define AVR32_EIC_IER_INT6_SIZE 1 #define AVR32_EIC_IER_INT7 7 #define AVR32_EIC_IER_INT7_MASK 0x00000080 #define AVR32_EIC_IER_INT7_OFFSET 7 #define AVR32_EIC_IER_INT7_SIZE 1 #define AVR32_EIC_IER_NMI 8 #define AVR32_EIC_IER_NMI_MASK 0x00000100 #define AVR32_EIC_IER_NMI_OFFSET 8 #define AVR32_EIC_IER_NMI_SIZE 1 #define AVR32_EIC_IMR 0x00000008 #define AVR32_EIC_IMR_INT0 0 #define AVR32_EIC_IMR_INT0_MASK 0x00000001 #define AVR32_EIC_IMR_INT0_OFFSET 0 #define AVR32_EIC_IMR_INT0_SIZE 1 #define AVR32_EIC_IMR_INT1 1 #define AVR32_EIC_IMR_INT1_MASK 0x00000002 #define AVR32_EIC_IMR_INT1_OFFSET 1 #define AVR32_EIC_IMR_INT1_SIZE 1 #define AVR32_EIC_IMR_INT2 2 #define AVR32_EIC_IMR_INT2_MASK 0x00000004 #define AVR32_EIC_IMR_INT2_OFFSET 2 #define AVR32_EIC_IMR_INT2_SIZE 1 #define AVR32_EIC_IMR_INT3 3 #define AVR32_EIC_IMR_INT3_MASK 0x00000008 #define AVR32_EIC_IMR_INT3_OFFSET 3 #define AVR32_EIC_IMR_INT3_SIZE 1 #define AVR32_EIC_IMR_INT4 4 #define AVR32_EIC_IMR_INT4_MASK 0x00000010 #define AVR32_EIC_IMR_INT4_OFFSET 4 #define AVR32_EIC_IMR_INT4_SIZE 1 #define AVR32_EIC_IMR_INT5 5 #define AVR32_EIC_IMR_INT5_MASK 0x00000020 #define AVR32_EIC_IMR_INT5_OFFSET 5 #define AVR32_EIC_IMR_INT5_SIZE 1 #define AVR32_EIC_IMR_INT6 6 #define AVR32_EIC_IMR_INT6_MASK 0x00000040 #define AVR32_EIC_IMR_INT6_OFFSET 6 #define AVR32_EIC_IMR_INT6_SIZE 1 #define AVR32_EIC_IMR_INT7 7 #define AVR32_EIC_IMR_INT7_MASK 0x00000080 #define AVR32_EIC_IMR_INT7_OFFSET 7 #define AVR32_EIC_IMR_INT7_SIZE 1 #define AVR32_EIC_IMR_NMI 8 #define AVR32_EIC_IMR_NMI_MASK 0x00000100 #define AVR32_EIC_IMR_NMI_OFFSET 8 #define AVR32_EIC_IMR_NMI_SIZE 1 #define AVR32_EIC_INT0 0 #define AVR32_EIC_INT0_MASK 0x00000001 #define AVR32_EIC_INT0_OFFSET 0 #define AVR32_EIC_INT0_SIZE 1 #define AVR32_EIC_INT1 1 #define AVR32_EIC_INT1_MASK 0x00000002 #define AVR32_EIC_INT1_OFFSET 1 #define AVR32_EIC_INT1_SIZE 1 #define AVR32_EIC_INT2 2 #define AVR32_EIC_INT2_MASK 0x00000004 #define AVR32_EIC_INT2_OFFSET 2 #define AVR32_EIC_INT2_SIZE 1 #define AVR32_EIC_INT3 3 #define AVR32_EIC_INT3_MASK 0x00000008 #define AVR32_EIC_INT3_OFFSET 3 #define AVR32_EIC_INT3_SIZE 1 #define AVR32_EIC_INT4 4 #define AVR32_EIC_INT4_MASK 0x00000010 #define AVR32_EIC_INT4_OFFSET 4 #define AVR32_EIC_INT4_SIZE 1 #define AVR32_EIC_INT5 5 #define AVR32_EIC_INT5_MASK 0x00000020 #define AVR32_EIC_INT5_OFFSET 5 #define AVR32_EIC_INT5_SIZE 1 #define AVR32_EIC_INT6 6 #define AVR32_EIC_INT6_MASK 0x00000040 #define AVR32_EIC_INT6_OFFSET 6 #define AVR32_EIC_INT6_SIZE 1 #define AVR32_EIC_INT7 7 #define AVR32_EIC_INT7_MASK 0x00000080 #define AVR32_EIC_INT7_OFFSET 7 #define AVR32_EIC_INT7_SIZE 1 #define AVR32_EIC_ISR 0x0000000c #define AVR32_EIC_ISR_INT0 0 #define AVR32_EIC_ISR_INT0_MASK 0x00000001 #define AVR32_EIC_ISR_INT0_OFFSET 0 #define AVR32_EIC_ISR_INT0_SIZE 1 #define AVR32_EIC_ISR_INT1 1 #define AVR32_EIC_ISR_INT1_MASK 0x00000002 #define AVR32_EIC_ISR_INT1_OFFSET 1 #define AVR32_EIC_ISR_INT1_SIZE 1 #define AVR32_EIC_ISR_INT2 2 #define AVR32_EIC_ISR_INT2_MASK 0x00000004 #define AVR32_EIC_ISR_INT2_OFFSET 2 #define AVR32_EIC_ISR_INT2_SIZE 1 #define AVR32_EIC_ISR_INT3 3 #define AVR32_EIC_ISR_INT3_MASK 0x00000008 #define AVR32_EIC_ISR_INT3_OFFSET 3 #define AVR32_EIC_ISR_INT3_SIZE 1 #define AVR32_EIC_ISR_INT4 4 #define AVR32_EIC_ISR_INT4_MASK 0x00000010 #define AVR32_EIC_ISR_INT4_OFFSET 4 #define AVR32_EIC_ISR_INT4_SIZE 1 #define AVR32_EIC_ISR_INT5 5 #define AVR32_EIC_ISR_INT5_MASK 0x00000020 #define AVR32_EIC_ISR_INT5_OFFSET 5 #define AVR32_EIC_ISR_INT5_SIZE 1 #define AVR32_EIC_ISR_INT6 6 #define AVR32_EIC_ISR_INT6_MASK 0x00000040 #define AVR32_EIC_ISR_INT6_OFFSET 6 #define AVR32_EIC_ISR_INT6_SIZE 1 #define AVR32_EIC_ISR_INT7 7 #define AVR32_EIC_ISR_INT7_MASK 0x00000080 #define AVR32_EIC_ISR_INT7_OFFSET 7 #define AVR32_EIC_ISR_INT7_SIZE 1 #define AVR32_EIC_ISR_NMI 8 #define AVR32_EIC_ISR_NMI_MASK 0x00000100 #define AVR32_EIC_ISR_NMI_OFFSET 8 #define AVR32_EIC_ISR_NMI_SIZE 1 #define AVR32_EIC_LEVEL 0x0000001c #define AVR32_EIC_LEVEL_INT0 0 #define AVR32_EIC_LEVEL_INT0_MASK 0x00000001 #define AVR32_EIC_LEVEL_INT0_OFFSET 0 #define AVR32_EIC_LEVEL_INT0_SIZE 1 #define AVR32_EIC_LEVEL_INT1 1 #define AVR32_EIC_LEVEL_INT1_MASK 0x00000002 #define AVR32_EIC_LEVEL_INT1_OFFSET 1 #define AVR32_EIC_LEVEL_INT1_SIZE 1 #define AVR32_EIC_LEVEL_INT2 2 #define AVR32_EIC_LEVEL_INT2_MASK 0x00000004 #define AVR32_EIC_LEVEL_INT2_OFFSET 2 #define AVR32_EIC_LEVEL_INT2_SIZE 1 #define AVR32_EIC_LEVEL_INT3 3 #define AVR32_EIC_LEVEL_INT3_MASK 0x00000008 #define AVR32_EIC_LEVEL_INT3_OFFSET 3 #define AVR32_EIC_LEVEL_INT3_SIZE 1 #define AVR32_EIC_LEVEL_INT4 4 #define AVR32_EIC_LEVEL_INT4_MASK 0x00000010 #define AVR32_EIC_LEVEL_INT4_OFFSET 4 #define AVR32_EIC_LEVEL_INT4_SIZE 1 #define AVR32_EIC_LEVEL_INT5 5 #define AVR32_EIC_LEVEL_INT5_MASK 0x00000020 #define AVR32_EIC_LEVEL_INT5_OFFSET 5 #define AVR32_EIC_LEVEL_INT5_SIZE 1 #define AVR32_EIC_LEVEL_INT6 6 #define AVR32_EIC_LEVEL_INT6_MASK 0x00000040 #define AVR32_EIC_LEVEL_INT6_OFFSET 6 #define AVR32_EIC_LEVEL_INT6_SIZE 1 #define AVR32_EIC_LEVEL_INT7 7 #define AVR32_EIC_LEVEL_INT7_MASK 0x00000080 #define AVR32_EIC_LEVEL_INT7_OFFSET 7 #define AVR32_EIC_LEVEL_INT7_SIZE 1 #define AVR32_EIC_LEVEL_NMI 8 #define AVR32_EIC_LEVEL_NMI_MASK 0x00000100 #define AVR32_EIC_LEVEL_NMI_OFFSET 8 #define AVR32_EIC_LEVEL_NMI_SIZE 1 #define AVR32_EIC_MODE 0x00000014 #define AVR32_EIC_MODE_INT0 0 #define AVR32_EIC_MODE_INT0_MASK 0x00000001 #define AVR32_EIC_MODE_INT0_OFFSET 0 #define AVR32_EIC_MODE_INT0_SIZE 1 #define AVR32_EIC_MODE_INT1 1 #define AVR32_EIC_MODE_INT1_MASK 0x00000002 #define AVR32_EIC_MODE_INT1_OFFSET 1 #define AVR32_EIC_MODE_INT1_SIZE 1 #define AVR32_EIC_MODE_INT2 2 #define AVR32_EIC_MODE_INT2_MASK 0x00000004 #define AVR32_EIC_MODE_INT2_OFFSET 2 #define AVR32_EIC_MODE_INT2_SIZE 1 #define AVR32_EIC_MODE_INT3 3 #define AVR32_EIC_MODE_INT3_MASK 0x00000008 #define AVR32_EIC_MODE_INT3_OFFSET 3 #define AVR32_EIC_MODE_INT3_SIZE 1 #define AVR32_EIC_MODE_INT4 4 #define AVR32_EIC_MODE_INT4_MASK 0x00000010 #define AVR32_EIC_MODE_INT4_OFFSET 4 #define AVR32_EIC_MODE_INT4_SIZE 1 #define AVR32_EIC_MODE_INT5 5 #define AVR32_EIC_MODE_INT5_MASK 0x00000020 #define AVR32_EIC_MODE_INT5_OFFSET 5 #define AVR32_EIC_MODE_INT5_SIZE 1 #define AVR32_EIC_MODE_INT6 6 #define AVR32_EIC_MODE_INT6_MASK 0x00000040 #define AVR32_EIC_MODE_INT6_OFFSET 6 #define AVR32_EIC_MODE_INT6_SIZE 1 #define AVR32_EIC_MODE_INT7 7 #define AVR32_EIC_MODE_INT7_MASK 0x00000080 #define AVR32_EIC_MODE_INT7_OFFSET 7 #define AVR32_EIC_MODE_INT7_SIZE 1 #define AVR32_EIC_MODE_NMI 8 #define AVR32_EIC_MODE_NMI_MASK 0x00000100 #define AVR32_EIC_MODE_NMI_OFFSET 8 #define AVR32_EIC_MODE_NMI_SIZE 1 #define AVR32_EIC_NMI 8 #define AVR32_EIC_NMI_MASK 0x00000100 #define AVR32_EIC_NMI_OFFSET 8 #define AVR32_EIC_NMI_SIZE 1 #define AVR32_EIC_PIN 24 #define AVR32_EIC_PIN_MASK 0x07000000 #define AVR32_EIC_PIN_OFFSET 24 #define AVR32_EIC_PIN_SIZE 3 #define AVR32_EIC_PRESC 8 #define AVR32_EIC_PRESC_MASK 0x00001f00 #define AVR32_EIC_PRESC_OFFSET 8 #define AVR32_EIC_PRESC_SIZE 5 #define AVR32_EIC_SCAN 0x0000002c #define AVR32_EIC_SCAN_EN 0 #define AVR32_EIC_SCAN_EN_MASK 0x00000001 #define AVR32_EIC_SCAN_EN_OFFSET 0 #define AVR32_EIC_SCAN_EN_SIZE 1 #define AVR32_EIC_SCAN_PIN 24 #define AVR32_EIC_SCAN_PIN_MASK 0x07000000 #define AVR32_EIC_SCAN_PIN_OFFSET 24 #define AVR32_EIC_SCAN_PIN_SIZE 3 #define AVR32_EIC_SCAN_PRESC 8 #define AVR32_EIC_SCAN_PRESC_MASK 0x00001f00 #define AVR32_EIC_SCAN_PRESC_OFFSET 8 #define AVR32_EIC_SCAN_PRESC_SIZE 5 #define AVR32_EIC_TEST 0x00000024 #define AVR32_EIC_TEST_EN 31 #define AVR32_EIC_TEST_EN_MASK 0x80000000 #define AVR32_EIC_TEST_EN_OFFSET 31 #define AVR32_EIC_TEST_EN_SIZE 1 #define AVR32_EIC_TEST_INT0 0 #define AVR32_EIC_TEST_INT0_MASK 0x00000001 #define AVR32_EIC_TEST_INT0_OFFSET 0 #define AVR32_EIC_TEST_INT0_SIZE 1 #define AVR32_EIC_TEST_INT1 1 #define AVR32_EIC_TEST_INT1_MASK 0x00000002 #define AVR32_EIC_TEST_INT1_OFFSET 1 #define AVR32_EIC_TEST_INT1_SIZE 1 #define AVR32_EIC_TEST_INT2 2 #define AVR32_EIC_TEST_INT2_MASK 0x00000004 #define AVR32_EIC_TEST_INT2_OFFSET 2 #define AVR32_EIC_TEST_INT2_SIZE 1 #define AVR32_EIC_TEST_INT3 3 #define AVR32_EIC_TEST_INT3_MASK 0x00000008 #define AVR32_EIC_TEST_INT3_OFFSET 3 #define AVR32_EIC_TEST_INT3_SIZE 1 #define AVR32_EIC_TEST_INT4 4 #define AVR32_EIC_TEST_INT4_MASK 0x00000010 #define AVR32_EIC_TEST_INT4_OFFSET 4 #define AVR32_EIC_TEST_INT4_SIZE 1 #define AVR32_EIC_TEST_INT5 5 #define AVR32_EIC_TEST_INT5_MASK 0x00000020 #define AVR32_EIC_TEST_INT5_OFFSET 5 #define AVR32_EIC_TEST_INT5_SIZE 1 #define AVR32_EIC_TEST_INT6 6 #define AVR32_EIC_TEST_INT6_MASK 0x00000040 #define AVR32_EIC_TEST_INT6_OFFSET 6 #define AVR32_EIC_TEST_INT6_SIZE 1 #define AVR32_EIC_TEST_INT7 7 #define AVR32_EIC_TEST_INT7_MASK 0x00000080 #define AVR32_EIC_TEST_INT7_OFFSET 7 #define AVR32_EIC_TEST_INT7_SIZE 1 #define AVR32_EIC_TEST_NMI 8 #define AVR32_EIC_TEST_NMI_MASK 0x00000100 #define AVR32_EIC_TEST_NMI_OFFSET 8 #define AVR32_EIC_TEST_NMI_SIZE 1 #define AVR32_EIC_TEST_TEST_EN 31 #define AVR32_EIC_TEST_TEST_EN_MASK 0x80000000 #define AVR32_EIC_TEST_TEST_EN_OFFSET 31 #define AVR32_EIC_TEST_TEST_EN_SIZE 1 #define AVR32_EIC_EDGE_IRQ 0x00000000 #define AVR32_EIC_FALLING_EDGE 0x00000000 #define AVR32_EIC_FILTER_OFF 0x00000000 #define AVR32_EIC_FILTER_ON 0x00000001 #define AVR32_EIC_HIGH_LEVEL 0x00000001 #define AVR32_EIC_LEVEL_IRQ 0x00000001 #define AVR32_EIC_LOW_LEVEL 0x00000000 #define AVR32_EIC_RISING_EDGE 0x00000001 #define AVR32_EIC_SYNC 0x00000000 #define AVR32_EIC_USE_ASYNC 0x00000001 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_eic_ier_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_ier_t; typedef struct avr32_eic_idr_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_idr_t; typedef struct avr32_eic_imr_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_imr_t; typedef struct avr32_eic_isr_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_isr_t; typedef struct avr32_eic_icr_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_icr_t; typedef struct avr32_eic_mode_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_mode_t; typedef struct avr32_eic_edge_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_edge_t; typedef struct avr32_eic_level_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_level_t; typedef struct avr32_eic_filter_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_filter_t; typedef struct avr32_eic_test_t { unsigned int test_en : 1; unsigned int :22; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_test_t; typedef struct avr32_eic_async_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_async_t; typedef struct avr32_eic_scan_t { unsigned int : 5; unsigned int pin : 3; unsigned int :11; unsigned int presc : 5; unsigned int : 7; unsigned int en : 1; } avr32_eic_scan_t; typedef struct avr32_eic_en_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_en_t; typedef struct avr32_eic_dis_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_dis_t; typedef struct avr32_eic_ctrl_t { unsigned int :23; unsigned int nmi : 1; unsigned int int7 : 1; unsigned int int6 : 1; unsigned int int5 : 1; unsigned int int4 : 1; unsigned int int3 : 1; unsigned int int2 : 1; unsigned int int1 : 1; unsigned int int0 : 1; } avr32_eic_ctrl_t; typedef struct avr32_eic_t { union { unsigned long ier ;//0x0000 avr32_eic_ier_t IER ; }; union { unsigned long idr ;//0x0004 avr32_eic_idr_t IDR ; }; union { const unsigned long imr ;//0x0008 const avr32_eic_imr_t IMR ; }; union { const unsigned long isr ;//0x000c const avr32_eic_isr_t ISR ; }; union { unsigned long icr ;//0x0010 avr32_eic_icr_t ICR ; }; union { unsigned long mode ;//0x0014 avr32_eic_mode_t MODE ; }; union { unsigned long edge ;//0x0018 avr32_eic_edge_t EDGE ; }; union { unsigned long level ;//0x001c avr32_eic_level_t LEVEL ; }; union { unsigned long filter ;//0x0020 avr32_eic_filter_t FILTER ; }; union { unsigned long test ;//0x0024 avr32_eic_test_t TEST ; }; union { unsigned long async ;//0x0028 avr32_eic_async_t ASYNC ; }; union { unsigned long scan ;//0x002c avr32_eic_scan_t SCAN ; }; union { unsigned long en ;//0x0030 avr32_eic_en_t EN ; }; union { unsigned long dis ;//0x0034 avr32_eic_dis_t DIS ; }; union { unsigned long ctrl ;//0x0038 avr32_eic_ctrl_t CTRL ; }; } avr32_eic_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif /*#ifdef AVR32_EIC_230_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/flashc_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 : UC3A0512 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_FLASHC_200_H_INCLUDED #define AVR32_FLASHC_200_H_INCLUDED #define AVR32_FLASHC_H_VERSION 200 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_FLASHC_ - Bitfield mask: AVR32_FLASHC__ - Bitfield offset: AVR32_FLASHC___OFFSET - Bitfield size: AVR32_FLASHC___SIZE - Bitfield values: AVR32_FLASHC___ 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_FLASHC_ - Bitfield offset: AVR32_FLASHC__OFFSET - Bitfield size: AVR32_FLASHC__SIZE - Bitfield values: AVR32_FLASHC__ - Bitfield values: AVR32_FLASHC_ All defines are sorted alphabetically. */ #define AVR32_FLASHC_1024 0x00000007 #define AVR32_FLASHC_128 0x00000002 #define AVR32_FLASHC_256 0x00000003 #define AVR32_FLASHC_32 0x00000000 #define AVR32_FLASHC_384 0x00000004 #define AVR32_FLASHC_512 0x00000005 #define AVR32_FLASHC_64 0x00000001 #define AVR32_FLASHC_768 0x00000006 #define AVR32_FLASHC_BOOTPROT 17 #define AVR32_FLASHC_BOOTPROT_MASK 0x000e0000 #define AVR32_FLASHC_BOOTPROT_OFFSET 17 #define AVR32_FLASHC_BOOTPROT_SIZE 3 #define AVR32_FLASHC_CMD 0 #define AVR32_FLASHC_CMD_CPB 0x00000003 #define AVR32_FLASHC_CMD_EA 0x00000006 #define AVR32_FLASHC_CMD_EAGPF 0x0000000b #define AVR32_FLASHC_CMD_EGPB 0x00000008 #define AVR32_FLASHC_CMD_EP 0x00000002 #define AVR32_FLASHC_CMD_EUP 0x0000000e #define AVR32_FLASHC_CMD_LP 0x00000004 #define AVR32_FLASHC_CMD_MASK 0x0000003f #define AVR32_FLASHC_CMD_NOP 0x00000000 #define AVR32_FLASHC_CMD_OFFSET 0 #define AVR32_FLASHC_CMD_PGPFB 0x0000000a #define AVR32_FLASHC_CMD_QPR 0x0000000c #define AVR32_FLASHC_CMD_QPRUP 0x0000000f #define AVR32_FLASHC_CMD_SIZE 6 #define AVR32_FLASHC_CMD_SSB 0x00000009 #define AVR32_FLASHC_CMD_UP 0x00000005 #define AVR32_FLASHC_CMD_WGPB 0x00000007 #define AVR32_FLASHC_CMD_WP 0x00000001 #define AVR32_FLASHC_CMD_WUP 0x0000000d #define AVR32_FLASHC_CPB 0x00000003 #define AVR32_FLASHC_EA 0x00000006 #define AVR32_FLASHC_EAGPF 0x0000000b #define AVR32_FLASHC_EGPB 0x00000008 #define AVR32_FLASHC_EP 0x00000002 #define AVR32_FLASHC_EPFL 16 #define AVR32_FLASHC_EPFL_MASK 0x00010000 #define AVR32_FLASHC_EPFL_OFFSET 16 #define AVR32_FLASHC_EPFL_SIZE 1 #define AVR32_FLASHC_EUP 0x0000000e #define AVR32_FLASHC_FCMD 0x00000004 #define AVR32_FLASHC_FCMD_CMD 0 #define AVR32_FLASHC_FCMD_CMD_CPB 0x00000003 #define AVR32_FLASHC_FCMD_CMD_EA 0x00000006 #define AVR32_FLASHC_FCMD_CMD_EAGPF 0x0000000b #define AVR32_FLASHC_FCMD_CMD_EGPB 0x00000008 #define AVR32_FLASHC_FCMD_CMD_EP 0x00000002 #define AVR32_FLASHC_FCMD_CMD_EUP 0x0000000e #define AVR32_FLASHC_FCMD_CMD_LP 0x00000004 #define AVR32_FLASHC_FCMD_CMD_MASK 0x0000003f #define AVR32_FLASHC_FCMD_CMD_NOP 0x00000000 #define AVR32_FLASHC_FCMD_CMD_OFFSET 0 #define AVR32_FLASHC_FCMD_CMD_PGPFB 0x0000000a #define AVR32_FLASHC_FCMD_CMD_QPR 0x0000000c #define AVR32_FLASHC_FCMD_CMD_QPRUP 0x0000000f #define AVR32_FLASHC_FCMD_CMD_SIZE 6 #define AVR32_FLASHC_FCMD_CMD_SSB 0x00000009 #define AVR32_FLASHC_FCMD_CMD_UP 0x00000005 #define AVR32_FLASHC_FCMD_CMD_WGPB 0x00000007 #define AVR32_FLASHC_FCMD_CMD_WP 0x00000001 #define AVR32_FLASHC_FCMD_CMD_WUP 0x0000000d #define AVR32_FLASHC_FCMD_KEY 24 #define AVR32_FLASHC_FCMD_KEY_KEY 0x000000a5 #define AVR32_FLASHC_FCMD_KEY_MASK 0xff000000 #define AVR32_FLASHC_FCMD_KEY_OFFSET 24 #define AVR32_FLASHC_FCMD_KEY_SIZE 8 #define AVR32_FLASHC_FCMD_PAGEN 8 #define AVR32_FLASHC_FCMD_PAGEN_MASK 0x00ffff00 #define AVR32_FLASHC_FCMD_PAGEN_OFFSET 8 #define AVR32_FLASHC_FCMD_PAGEN_SIZE 16 #define AVR32_FLASHC_FCR 0x00000000 #define AVR32_FLASHC_FCR_FRDY 0 #define AVR32_FLASHC_FCR_FRDY_MASK 0x00000001 #define AVR32_FLASHC_FCR_FRDY_OFFSET 0 #define AVR32_FLASHC_FCR_FRDY_SIZE 1 #define AVR32_FLASHC_FCR_FWS 6 #define AVR32_FLASHC_FCR_FWS_MASK 0x00000040 #define AVR32_FLASHC_FCR_FWS_OFFSET 6 #define AVR32_FLASHC_FCR_FWS_SIZE 1 #define AVR32_FLASHC_FCR_LOCKE 2 #define AVR32_FLASHC_FCR_LOCKE_MASK 0x00000004 #define AVR32_FLASHC_FCR_LOCKE_OFFSET 2 #define AVR32_FLASHC_FCR_LOCKE_SIZE 1 #define AVR32_FLASHC_FCR_PROGE 3 #define AVR32_FLASHC_FCR_PROGE_MASK 0x00000008 #define AVR32_FLASHC_FCR_PROGE_OFFSET 3 #define AVR32_FLASHC_FCR_PROGE_SIZE 1 #define AVR32_FLASHC_FGPFRHI 0x0000000c #define AVR32_FLASHC_FGPFRHI_GPF32 0 #define AVR32_FLASHC_FGPFRHI_GPF32_MASK 0x00000001 #define AVR32_FLASHC_FGPFRHI_GPF32_OFFSET 0 #define AVR32_FLASHC_FGPFRHI_GPF32_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF33 1 #define AVR32_FLASHC_FGPFRHI_GPF33_MASK 0x00000002 #define AVR32_FLASHC_FGPFRHI_GPF33_OFFSET 1 #define AVR32_FLASHC_FGPFRHI_GPF33_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF34 2 #define AVR32_FLASHC_FGPFRHI_GPF34_MASK 0x00000004 #define AVR32_FLASHC_FGPFRHI_GPF34_OFFSET 2 #define AVR32_FLASHC_FGPFRHI_GPF34_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF35 3 #define AVR32_FLASHC_FGPFRHI_GPF35_MASK 0x00000008 #define AVR32_FLASHC_FGPFRHI_GPF35_OFFSET 3 #define AVR32_FLASHC_FGPFRHI_GPF35_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF36 4 #define AVR32_FLASHC_FGPFRHI_GPF36_MASK 0x00000010 #define AVR32_FLASHC_FGPFRHI_GPF36_OFFSET 4 #define AVR32_FLASHC_FGPFRHI_GPF36_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF37 5 #define AVR32_FLASHC_FGPFRHI_GPF37_MASK 0x00000020 #define AVR32_FLASHC_FGPFRHI_GPF37_OFFSET 5 #define AVR32_FLASHC_FGPFRHI_GPF37_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF38 6 #define AVR32_FLASHC_FGPFRHI_GPF38_MASK 0x00000040 #define AVR32_FLASHC_FGPFRHI_GPF38_OFFSET 6 #define AVR32_FLASHC_FGPFRHI_GPF38_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF39 7 #define AVR32_FLASHC_FGPFRHI_GPF39_MASK 0x00000080 #define AVR32_FLASHC_FGPFRHI_GPF39_OFFSET 7 #define AVR32_FLASHC_FGPFRHI_GPF39_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF40 8 #define AVR32_FLASHC_FGPFRHI_GPF40_MASK 0x00000100 #define AVR32_FLASHC_FGPFRHI_GPF40_OFFSET 8 #define AVR32_FLASHC_FGPFRHI_GPF40_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF41 9 #define AVR32_FLASHC_FGPFRHI_GPF41_MASK 0x00000200 #define AVR32_FLASHC_FGPFRHI_GPF41_OFFSET 9 #define AVR32_FLASHC_FGPFRHI_GPF41_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF42 10 #define AVR32_FLASHC_FGPFRHI_GPF42_MASK 0x00000400 #define AVR32_FLASHC_FGPFRHI_GPF42_OFFSET 10 #define AVR32_FLASHC_FGPFRHI_GPF42_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF43 11 #define AVR32_FLASHC_FGPFRHI_GPF43_MASK 0x00000800 #define AVR32_FLASHC_FGPFRHI_GPF43_OFFSET 11 #define AVR32_FLASHC_FGPFRHI_GPF43_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF44 12 #define AVR32_FLASHC_FGPFRHI_GPF44_MASK 0x00001000 #define AVR32_FLASHC_FGPFRHI_GPF44_OFFSET 12 #define AVR32_FLASHC_FGPFRHI_GPF44_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF45 13 #define AVR32_FLASHC_FGPFRHI_GPF45_MASK 0x00002000 #define AVR32_FLASHC_FGPFRHI_GPF45_OFFSET 13 #define AVR32_FLASHC_FGPFRHI_GPF45_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF46 14 #define AVR32_FLASHC_FGPFRHI_GPF46_MASK 0x00004000 #define AVR32_FLASHC_FGPFRHI_GPF46_OFFSET 14 #define AVR32_FLASHC_FGPFRHI_GPF46_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF47 15 #define AVR32_FLASHC_FGPFRHI_GPF47_MASK 0x00008000 #define AVR32_FLASHC_FGPFRHI_GPF47_OFFSET 15 #define AVR32_FLASHC_FGPFRHI_GPF47_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF48 16 #define AVR32_FLASHC_FGPFRHI_GPF48_MASK 0x00010000 #define AVR32_FLASHC_FGPFRHI_GPF48_OFFSET 16 #define AVR32_FLASHC_FGPFRHI_GPF48_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF49 17 #define AVR32_FLASHC_FGPFRHI_GPF49_MASK 0x00020000 #define AVR32_FLASHC_FGPFRHI_GPF49_OFFSET 17 #define AVR32_FLASHC_FGPFRHI_GPF49_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF50 18 #define AVR32_FLASHC_FGPFRHI_GPF50_MASK 0x00040000 #define AVR32_FLASHC_FGPFRHI_GPF50_OFFSET 18 #define AVR32_FLASHC_FGPFRHI_GPF50_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF51 19 #define AVR32_FLASHC_FGPFRHI_GPF51_MASK 0x00080000 #define AVR32_FLASHC_FGPFRHI_GPF51_OFFSET 19 #define AVR32_FLASHC_FGPFRHI_GPF51_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF52 20 #define AVR32_FLASHC_FGPFRHI_GPF52_MASK 0x00100000 #define AVR32_FLASHC_FGPFRHI_GPF52_OFFSET 20 #define AVR32_FLASHC_FGPFRHI_GPF52_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF53 21 #define AVR32_FLASHC_FGPFRHI_GPF53_MASK 0x00200000 #define AVR32_FLASHC_FGPFRHI_GPF53_OFFSET 21 #define AVR32_FLASHC_FGPFRHI_GPF53_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF54 22 #define AVR32_FLASHC_FGPFRHI_GPF54_MASK 0x00400000 #define AVR32_FLASHC_FGPFRHI_GPF54_OFFSET 22 #define AVR32_FLASHC_FGPFRHI_GPF54_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF55 23 #define AVR32_FLASHC_FGPFRHI_GPF55_MASK 0x00800000 #define AVR32_FLASHC_FGPFRHI_GPF55_OFFSET 23 #define AVR32_FLASHC_FGPFRHI_GPF55_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF56 24 #define AVR32_FLASHC_FGPFRHI_GPF56_MASK 0x01000000 #define AVR32_FLASHC_FGPFRHI_GPF56_OFFSET 24 #define AVR32_FLASHC_FGPFRHI_GPF56_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF57 25 #define AVR32_FLASHC_FGPFRHI_GPF57_MASK 0x02000000 #define AVR32_FLASHC_FGPFRHI_GPF57_OFFSET 25 #define AVR32_FLASHC_FGPFRHI_GPF57_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF58 26 #define AVR32_FLASHC_FGPFRHI_GPF58_MASK 0x04000000 #define AVR32_FLASHC_FGPFRHI_GPF58_OFFSET 26 #define AVR32_FLASHC_FGPFRHI_GPF58_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF59 27 #define AVR32_FLASHC_FGPFRHI_GPF59_MASK 0x08000000 #define AVR32_FLASHC_FGPFRHI_GPF59_OFFSET 27 #define AVR32_FLASHC_FGPFRHI_GPF59_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF60 28 #define AVR32_FLASHC_FGPFRHI_GPF60_MASK 0x10000000 #define AVR32_FLASHC_FGPFRHI_GPF60_OFFSET 28 #define AVR32_FLASHC_FGPFRHI_GPF60_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF61 29 #define AVR32_FLASHC_FGPFRHI_GPF61_MASK 0x20000000 #define AVR32_FLASHC_FGPFRHI_GPF61_OFFSET 29 #define AVR32_FLASHC_FGPFRHI_GPF61_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF62 30 #define AVR32_FLASHC_FGPFRHI_GPF62_MASK 0x40000000 #define AVR32_FLASHC_FGPFRHI_GPF62_OFFSET 30 #define AVR32_FLASHC_FGPFRHI_GPF62_SIZE 1 #define AVR32_FLASHC_FGPFRHI_GPF63 31 #define AVR32_FLASHC_FGPFRHI_GPF63_MASK 0x80000000 #define AVR32_FLASHC_FGPFRHI_GPF63_OFFSET 31 #define AVR32_FLASHC_FGPFRHI_GPF63_SIZE 1 #define AVR32_FLASHC_FGPFRLO 0x00000010 #define AVR32_FLASHC_FGPFRLO_BOOTPROT 17 #define AVR32_FLASHC_FGPFRLO_BOOTPROT_MASK 0x000e0000 #define AVR32_FLASHC_FGPFRLO_BOOTPROT_OFFSET 17 #define AVR32_FLASHC_FGPFRLO_BOOTPROT_SIZE 3 #define AVR32_FLASHC_FGPFRLO_EPFL 16 #define AVR32_FLASHC_FGPFRLO_EPFL_MASK 0x00010000 #define AVR32_FLASHC_FGPFRLO_EPFL_OFFSET 16 #define AVR32_FLASHC_FGPFRLO_EPFL_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF20 20 #define AVR32_FLASHC_FGPFRLO_GPF20_MASK 0x00100000 #define AVR32_FLASHC_FGPFRLO_GPF20_OFFSET 20 #define AVR32_FLASHC_FGPFRLO_GPF20_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF21 21 #define AVR32_FLASHC_FGPFRLO_GPF21_MASK 0x00200000 #define AVR32_FLASHC_FGPFRLO_GPF21_OFFSET 21 #define AVR32_FLASHC_FGPFRLO_GPF21_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF22 22 #define AVR32_FLASHC_FGPFRLO_GPF22_MASK 0x00400000 #define AVR32_FLASHC_FGPFRLO_GPF22_OFFSET 22 #define AVR32_FLASHC_FGPFRLO_GPF22_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF23 23 #define AVR32_FLASHC_FGPFRLO_GPF23_MASK 0x00800000 #define AVR32_FLASHC_FGPFRLO_GPF23_OFFSET 23 #define AVR32_FLASHC_FGPFRLO_GPF23_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF24 24 #define AVR32_FLASHC_FGPFRLO_GPF24_MASK 0x01000000 #define AVR32_FLASHC_FGPFRLO_GPF24_OFFSET 24 #define AVR32_FLASHC_FGPFRLO_GPF24_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF25 25 #define AVR32_FLASHC_FGPFRLO_GPF25_MASK 0x02000000 #define AVR32_FLASHC_FGPFRLO_GPF25_OFFSET 25 #define AVR32_FLASHC_FGPFRLO_GPF25_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF26 26 #define AVR32_FLASHC_FGPFRLO_GPF26_MASK 0x04000000 #define AVR32_FLASHC_FGPFRLO_GPF26_OFFSET 26 #define AVR32_FLASHC_FGPFRLO_GPF26_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF27 27 #define AVR32_FLASHC_FGPFRLO_GPF27_MASK 0x08000000 #define AVR32_FLASHC_FGPFRLO_GPF27_OFFSET 27 #define AVR32_FLASHC_FGPFRLO_GPF27_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF28 28 #define AVR32_FLASHC_FGPFRLO_GPF28_MASK 0x10000000 #define AVR32_FLASHC_FGPFRLO_GPF28_OFFSET 28 #define AVR32_FLASHC_FGPFRLO_GPF28_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF29 29 #define AVR32_FLASHC_FGPFRLO_GPF29_MASK 0x20000000 #define AVR32_FLASHC_FGPFRLO_GPF29_OFFSET 29 #define AVR32_FLASHC_FGPFRLO_GPF29_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF30 30 #define AVR32_FLASHC_FGPFRLO_GPF30_MASK 0x40000000 #define AVR32_FLASHC_FGPFRLO_GPF30_OFFSET 30 #define AVR32_FLASHC_FGPFRLO_GPF30_SIZE 1 #define AVR32_FLASHC_FGPFRLO_GPF31 31 #define AVR32_FLASHC_FGPFRLO_GPF31_MASK 0x80000000 #define AVR32_FLASHC_FGPFRLO_GPF31_OFFSET 31 #define AVR32_FLASHC_FGPFRLO_GPF31_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK0 0 #define AVR32_FLASHC_FGPFRLO_LOCK0_MASK 0x00000001 #define AVR32_FLASHC_FGPFRLO_LOCK0_OFFSET 0 #define AVR32_FLASHC_FGPFRLO_LOCK0_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK1 1 #define AVR32_FLASHC_FGPFRLO_LOCK10 10 #define AVR32_FLASHC_FGPFRLO_LOCK10_MASK 0x00000400 #define AVR32_FLASHC_FGPFRLO_LOCK10_OFFSET 10 #define AVR32_FLASHC_FGPFRLO_LOCK10_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK11 11 #define AVR32_FLASHC_FGPFRLO_LOCK11_MASK 0x00000800 #define AVR32_FLASHC_FGPFRLO_LOCK11_OFFSET 11 #define AVR32_FLASHC_FGPFRLO_LOCK11_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK12 12 #define AVR32_FLASHC_FGPFRLO_LOCK12_MASK 0x00001000 #define AVR32_FLASHC_FGPFRLO_LOCK12_OFFSET 12 #define AVR32_FLASHC_FGPFRLO_LOCK12_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK13 13 #define AVR32_FLASHC_FGPFRLO_LOCK13_MASK 0x00002000 #define AVR32_FLASHC_FGPFRLO_LOCK13_OFFSET 13 #define AVR32_FLASHC_FGPFRLO_LOCK13_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK14 14 #define AVR32_FLASHC_FGPFRLO_LOCK14_MASK 0x00004000 #define AVR32_FLASHC_FGPFRLO_LOCK14_OFFSET 14 #define AVR32_FLASHC_FGPFRLO_LOCK14_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK15 15 #define AVR32_FLASHC_FGPFRLO_LOCK15_MASK 0x00008000 #define AVR32_FLASHC_FGPFRLO_LOCK15_OFFSET 15 #define AVR32_FLASHC_FGPFRLO_LOCK15_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK1_MASK 0x00000002 #define AVR32_FLASHC_FGPFRLO_LOCK1_OFFSET 1 #define AVR32_FLASHC_FGPFRLO_LOCK1_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK2 2 #define AVR32_FLASHC_FGPFRLO_LOCK2_MASK 0x00000004 #define AVR32_FLASHC_FGPFRLO_LOCK2_OFFSET 2 #define AVR32_FLASHC_FGPFRLO_LOCK2_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK3 3 #define AVR32_FLASHC_FGPFRLO_LOCK3_MASK 0x00000008 #define AVR32_FLASHC_FGPFRLO_LOCK3_OFFSET 3 #define AVR32_FLASHC_FGPFRLO_LOCK3_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK4 4 #define AVR32_FLASHC_FGPFRLO_LOCK4_MASK 0x00000010 #define AVR32_FLASHC_FGPFRLO_LOCK4_OFFSET 4 #define AVR32_FLASHC_FGPFRLO_LOCK4_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK5 5 #define AVR32_FLASHC_FGPFRLO_LOCK5_MASK 0x00000020 #define AVR32_FLASHC_FGPFRLO_LOCK5_OFFSET 5 #define AVR32_FLASHC_FGPFRLO_LOCK5_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK6 6 #define AVR32_FLASHC_FGPFRLO_LOCK6_MASK 0x00000040 #define AVR32_FLASHC_FGPFRLO_LOCK6_OFFSET 6 #define AVR32_FLASHC_FGPFRLO_LOCK6_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK7 7 #define AVR32_FLASHC_FGPFRLO_LOCK7_MASK 0x00000080 #define AVR32_FLASHC_FGPFRLO_LOCK7_OFFSET 7 #define AVR32_FLASHC_FGPFRLO_LOCK7_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK8 8 #define AVR32_FLASHC_FGPFRLO_LOCK8_MASK 0x00000100 #define AVR32_FLASHC_FGPFRLO_LOCK8_OFFSET 8 #define AVR32_FLASHC_FGPFRLO_LOCK8_SIZE 1 #define AVR32_FLASHC_FGPFRLO_LOCK9 9 #define AVR32_FLASHC_FGPFRLO_LOCK9_MASK 0x00000200 #define AVR32_FLASHC_FGPFRLO_LOCK9_OFFSET 9 #define AVR32_FLASHC_FGPFRLO_LOCK9_SIZE 1 #define AVR32_FLASHC_FRDY 0 #define AVR32_FLASHC_FRDY_MASK 0x00000001 #define AVR32_FLASHC_FRDY_OFFSET 0 #define AVR32_FLASHC_FRDY_SIZE 1 #define AVR32_FLASHC_FSR 0x00000008 #define AVR32_FLASHC_FSR_FRDY 0 #define AVR32_FLASHC_FSR_FRDY_MASK 0x00000001 #define AVR32_FLASHC_FSR_FRDY_OFFSET 0 #define AVR32_FLASHC_FSR_FRDY_SIZE 1 #define AVR32_FLASHC_FSR_FSZ 13 #define AVR32_FLASHC_FSR_FSZ_1024 0x00000007 #define AVR32_FLASHC_FSR_FSZ_128 0x00000002 #define AVR32_FLASHC_FSR_FSZ_256 0x00000003 #define AVR32_FLASHC_FSR_FSZ_32 0x00000000 #define AVR32_FLASHC_FSR_FSZ_384 0x00000004 #define AVR32_FLASHC_FSR_FSZ_512 0x00000005 #define AVR32_FLASHC_FSR_FSZ_64 0x00000001 #define AVR32_FLASHC_FSR_FSZ_768 0x00000006 #define AVR32_FLASHC_FSR_FSZ_MASK 0x0000e000 #define AVR32_FLASHC_FSR_FSZ_OFFSET 13 #define AVR32_FLASHC_FSR_FSZ_SIZE 3 #define AVR32_FLASHC_FSR_LOCK0 16 #define AVR32_FLASHC_FSR_LOCK0_MASK 0x00010000 #define AVR32_FLASHC_FSR_LOCK0_OFFSET 16 #define AVR32_FLASHC_FSR_LOCK0_SIZE 1 #define AVR32_FLASHC_FSR_LOCK1 17 #define AVR32_FLASHC_FSR_LOCK10 26 #define AVR32_FLASHC_FSR_LOCK10_MASK 0x04000000 #define AVR32_FLASHC_FSR_LOCK10_OFFSET 26 #define AVR32_FLASHC_FSR_LOCK10_SIZE 1 #define AVR32_FLASHC_FSR_LOCK11 27 #define AVR32_FLASHC_FSR_LOCK11_MASK 0x08000000 #define AVR32_FLASHC_FSR_LOCK11_OFFSET 27 #define AVR32_FLASHC_FSR_LOCK11_SIZE 1 #define AVR32_FLASHC_FSR_LOCK12 28 #define AVR32_FLASHC_FSR_LOCK12_MASK 0x10000000 #define AVR32_FLASHC_FSR_LOCK12_OFFSET 28 #define AVR32_FLASHC_FSR_LOCK12_SIZE 1 #define AVR32_FLASHC_FSR_LOCK13 29 #define AVR32_FLASHC_FSR_LOCK13_MASK 0x20000000 #define AVR32_FLASHC_FSR_LOCK13_OFFSET 29 #define AVR32_FLASHC_FSR_LOCK13_SIZE 1 #define AVR32_FLASHC_FSR_LOCK14 30 #define AVR32_FLASHC_FSR_LOCK14_MASK 0x40000000 #define AVR32_FLASHC_FSR_LOCK14_OFFSET 30 #define AVR32_FLASHC_FSR_LOCK14_SIZE 1 #define AVR32_FLASHC_FSR_LOCK15 31 #define AVR32_FLASHC_FSR_LOCK15_MASK 0x80000000 #define AVR32_FLASHC_FSR_LOCK15_OFFSET 31 #define AVR32_FLASHC_FSR_LOCK15_SIZE 1 #define AVR32_FLASHC_FSR_LOCK1_MASK 0x00020000 #define AVR32_FLASHC_FSR_LOCK1_OFFSET 17 #define AVR32_FLASHC_FSR_LOCK1_SIZE 1 #define AVR32_FLASHC_FSR_LOCK2 18 #define AVR32_FLASHC_FSR_LOCK2_MASK 0x00040000 #define AVR32_FLASHC_FSR_LOCK2_OFFSET 18 #define AVR32_FLASHC_FSR_LOCK2_SIZE 1 #define AVR32_FLASHC_FSR_LOCK3 19 #define AVR32_FLASHC_FSR_LOCK3_MASK 0x00080000 #define AVR32_FLASHC_FSR_LOCK3_OFFSET 19 #define AVR32_FLASHC_FSR_LOCK3_SIZE 1 #define AVR32_FLASHC_FSR_LOCK4 20 #define AVR32_FLASHC_FSR_LOCK4_MASK 0x00100000 #define AVR32_FLASHC_FSR_LOCK4_OFFSET 20 #define AVR32_FLASHC_FSR_LOCK4_SIZE 1 #define AVR32_FLASHC_FSR_LOCK5 21 #define AVR32_FLASHC_FSR_LOCK5_MASK 0x00200000 #define AVR32_FLASHC_FSR_LOCK5_OFFSET 21 #define AVR32_FLASHC_FSR_LOCK5_SIZE 1 #define AVR32_FLASHC_FSR_LOCK6 22 #define AVR32_FLASHC_FSR_LOCK6_MASK 0x00400000 #define AVR32_FLASHC_FSR_LOCK6_OFFSET 22 #define AVR32_FLASHC_FSR_LOCK6_SIZE 1 #define AVR32_FLASHC_FSR_LOCK7 23 #define AVR32_FLASHC_FSR_LOCK7_MASK 0x00800000 #define AVR32_FLASHC_FSR_LOCK7_OFFSET 23 #define AVR32_FLASHC_FSR_LOCK7_SIZE 1 #define AVR32_FLASHC_FSR_LOCK8 24 #define AVR32_FLASHC_FSR_LOCK8_MASK 0x01000000 #define AVR32_FLASHC_FSR_LOCK8_OFFSET 24 #define AVR32_FLASHC_FSR_LOCK8_SIZE 1 #define AVR32_FLASHC_FSR_LOCK9 25 #define AVR32_FLASHC_FSR_LOCK9_MASK 0x02000000 #define AVR32_FLASHC_FSR_LOCK9_OFFSET 25 #define AVR32_FLASHC_FSR_LOCK9_SIZE 1 #define AVR32_FLASHC_FSR_LOCKE 2 #define AVR32_FLASHC_FSR_LOCKE_MASK 0x00000004 #define AVR32_FLASHC_FSR_LOCKE_OFFSET 2 #define AVR32_FLASHC_FSR_LOCKE_SIZE 1 #define AVR32_FLASHC_FSR_PROGE 3 #define AVR32_FLASHC_FSR_PROGE_MASK 0x00000008 #define AVR32_FLASHC_FSR_PROGE_OFFSET 3 #define AVR32_FLASHC_FSR_PROGE_SIZE 1 #define AVR32_FLASHC_FSR_QPRR 5 #define AVR32_FLASHC_FSR_QPRR_MASK 0x00000020 #define AVR32_FLASHC_FSR_QPRR_OFFSET 5 #define AVR32_FLASHC_FSR_QPRR_SIZE 1 #define AVR32_FLASHC_FSR_SECURITY 4 #define AVR32_FLASHC_FSR_SECURITY_MASK 0x00000010 #define AVR32_FLASHC_FSR_SECURITY_OFFSET 4 #define AVR32_FLASHC_FSR_SECURITY_SIZE 1 #define AVR32_FLASHC_FSZ 13 #define AVR32_FLASHC_FSZ_1024 0x00000007 #define AVR32_FLASHC_FSZ_128 0x00000002 #define AVR32_FLASHC_FSZ_256 0x00000003 #define AVR32_FLASHC_FSZ_32 0x00000000 #define AVR32_FLASHC_FSZ_384 0x00000004 #define AVR32_FLASHC_FSZ_512 0x00000005 #define AVR32_FLASHC_FSZ_64 0x00000001 #define AVR32_FLASHC_FSZ_768 0x00000006 #define AVR32_FLASHC_FSZ_MASK 0x0000e000 #define AVR32_FLASHC_FSZ_OFFSET 13 #define AVR32_FLASHC_FSZ_SIZE 3 #define AVR32_FLASHC_FWS 6 #define AVR32_FLASHC_FWS_MASK 0x00000040 #define AVR32_FLASHC_FWS_OFFSET 6 #define AVR32_FLASHC_FWS_SIZE 1 #define AVR32_FLASHC_GPF20 20 #define AVR32_FLASHC_GPF20_MASK 0x00100000 #define AVR32_FLASHC_GPF20_OFFSET 20 #define AVR32_FLASHC_GPF20_SIZE 1 #define AVR32_FLASHC_GPF21 21 #define AVR32_FLASHC_GPF21_MASK 0x00200000 #define AVR32_FLASHC_GPF21_OFFSET 21 #define AVR32_FLASHC_GPF21_SIZE 1 #define AVR32_FLASHC_GPF22 22 #define AVR32_FLASHC_GPF22_MASK 0x00400000 #define AVR32_FLASHC_GPF22_OFFSET 22 #define AVR32_FLASHC_GPF22_SIZE 1 #define AVR32_FLASHC_GPF23 23 #define AVR32_FLASHC_GPF23_MASK 0x00800000 #define AVR32_FLASHC_GPF23_OFFSET 23 #define AVR32_FLASHC_GPF23_SIZE 1 #define AVR32_FLASHC_GPF24 24 #define AVR32_FLASHC_GPF24_MASK 0x01000000 #define AVR32_FLASHC_GPF24_OFFSET 24 #define AVR32_FLASHC_GPF24_SIZE 1 #define AVR32_FLASHC_GPF25 25 #define AVR32_FLASHC_GPF25_MASK 0x02000000 #define AVR32_FLASHC_GPF25_OFFSET 25 #define AVR32_FLASHC_GPF25_SIZE 1 #define AVR32_FLASHC_GPF26 26 #define AVR32_FLASHC_GPF26_MASK 0x04000000 #define AVR32_FLASHC_GPF26_OFFSET 26 #define AVR32_FLASHC_GPF26_SIZE 1 #define AVR32_FLASHC_GPF27 27 #define AVR32_FLASHC_GPF27_MASK 0x08000000 #define AVR32_FLASHC_GPF27_OFFSET 27 #define AVR32_FLASHC_GPF27_SIZE 1 #define AVR32_FLASHC_GPF28 28 #define AVR32_FLASHC_GPF28_MASK 0x10000000 #define AVR32_FLASHC_GPF28_OFFSET 28 #define AVR32_FLASHC_GPF28_SIZE 1 #define AVR32_FLASHC_GPF29 29 #define AVR32_FLASHC_GPF29_MASK 0x20000000 #define AVR32_FLASHC_GPF29_OFFSET 29 #define AVR32_FLASHC_GPF29_SIZE 1 #define AVR32_FLASHC_GPF30 30 #define AVR32_FLASHC_GPF30_MASK 0x40000000 #define AVR32_FLASHC_GPF30_OFFSET 30 #define AVR32_FLASHC_GPF30_SIZE 1 #define AVR32_FLASHC_GPF31 31 #define AVR32_FLASHC_GPF31_MASK 0x80000000 #define AVR32_FLASHC_GPF31_OFFSET 31 #define AVR32_FLASHC_GPF31_SIZE 1 #define AVR32_FLASHC_GPF32 0 #define AVR32_FLASHC_GPF32_MASK 0x00000001 #define AVR32_FLASHC_GPF32_OFFSET 0 #define AVR32_FLASHC_GPF32_SIZE 1 #define AVR32_FLASHC_GPF33 1 #define AVR32_FLASHC_GPF33_MASK 0x00000002 #define AVR32_FLASHC_GPF33_OFFSET 1 #define AVR32_FLASHC_GPF33_SIZE 1 #define AVR32_FLASHC_GPF34 2 #define AVR32_FLASHC_GPF34_MASK 0x00000004 #define AVR32_FLASHC_GPF34_OFFSET 2 #define AVR32_FLASHC_GPF34_SIZE 1 #define AVR32_FLASHC_GPF35 3 #define AVR32_FLASHC_GPF35_MASK 0x00000008 #define AVR32_FLASHC_GPF35_OFFSET 3 #define AVR32_FLASHC_GPF35_SIZE 1 #define AVR32_FLASHC_GPF36 4 #define AVR32_FLASHC_GPF36_MASK 0x00000010 #define AVR32_FLASHC_GPF36_OFFSET 4 #define AVR32_FLASHC_GPF36_SIZE 1 #define AVR32_FLASHC_GPF37 5 #define AVR32_FLASHC_GPF37_MASK 0x00000020 #define AVR32_FLASHC_GPF37_OFFSET 5 #define AVR32_FLASHC_GPF37_SIZE 1 #define AVR32_FLASHC_GPF38 6 #define AVR32_FLASHC_GPF38_MASK 0x00000040 #define AVR32_FLASHC_GPF38_OFFSET 6 #define AVR32_FLASHC_GPF38_SIZE 1 #define AVR32_FLASHC_GPF39 7 #define AVR32_FLASHC_GPF39_MASK 0x00000080 #define AVR32_FLASHC_GPF39_OFFSET 7 #define AVR32_FLASHC_GPF39_SIZE 1 #define AVR32_FLASHC_GPF40 8 #define AVR32_FLASHC_GPF40_MASK 0x00000100 #define AVR32_FLASHC_GPF40_OFFSET 8 #define AVR32_FLASHC_GPF40_SIZE 1 #define AVR32_FLASHC_GPF41 9 #define AVR32_FLASHC_GPF41_MASK 0x00000200 #define AVR32_FLASHC_GPF41_OFFSET 9 #define AVR32_FLASHC_GPF41_SIZE 1 #define AVR32_FLASHC_GPF42 10 #define AVR32_FLASHC_GPF42_MASK 0x00000400 #define AVR32_FLASHC_GPF42_OFFSET 10 #define AVR32_FLASHC_GPF42_SIZE 1 #define AVR32_FLASHC_GPF43 11 #define AVR32_FLASHC_GPF43_MASK 0x00000800 #define AVR32_FLASHC_GPF43_OFFSET 11 #define AVR32_FLASHC_GPF43_SIZE 1 #define AVR32_FLASHC_GPF44 12 #define AVR32_FLASHC_GPF44_MASK 0x00001000 #define AVR32_FLASHC_GPF44_OFFSET 12 #define AVR32_FLASHC_GPF44_SIZE 1 #define AVR32_FLASHC_GPF45 13 #define AVR32_FLASHC_GPF45_MASK 0x00002000 #define AVR32_FLASHC_GPF45_OFFSET 13 #define AVR32_FLASHC_GPF45_SIZE 1 #define AVR32_FLASHC_GPF46 14 #define AVR32_FLASHC_GPF46_MASK 0x00004000 #define AVR32_FLASHC_GPF46_OFFSET 14 #define AVR32_FLASHC_GPF46_SIZE 1 #define AVR32_FLASHC_GPF47 15 #define AVR32_FLASHC_GPF47_MASK 0x00008000 #define AVR32_FLASHC_GPF47_OFFSET 15 #define AVR32_FLASHC_GPF47_SIZE 1 #define AVR32_FLASHC_GPF48 16 #define AVR32_FLASHC_GPF48_MASK 0x00010000 #define AVR32_FLASHC_GPF48_OFFSET 16 #define AVR32_FLASHC_GPF48_SIZE 1 #define AVR32_FLASHC_GPF49 17 #define AVR32_FLASHC_GPF49_MASK 0x00020000 #define AVR32_FLASHC_GPF49_OFFSET 17 #define AVR32_FLASHC_GPF49_SIZE 1 #define AVR32_FLASHC_GPF50 18 #define AVR32_FLASHC_GPF50_MASK 0x00040000 #define AVR32_FLASHC_GPF50_OFFSET 18 #define AVR32_FLASHC_GPF50_SIZE 1 #define AVR32_FLASHC_GPF51 19 #define AVR32_FLASHC_GPF51_MASK 0x00080000 #define AVR32_FLASHC_GPF51_OFFSET 19 #define AVR32_FLASHC_GPF51_SIZE 1 #define AVR32_FLASHC_GPF52 20 #define AVR32_FLASHC_GPF52_MASK 0x00100000 #define AVR32_FLASHC_GPF52_OFFSET 20 #define AVR32_FLASHC_GPF52_SIZE 1 #define AVR32_FLASHC_GPF53 21 #define AVR32_FLASHC_GPF53_MASK 0x00200000 #define AVR32_FLASHC_GPF53_OFFSET 21 #define AVR32_FLASHC_GPF53_SIZE 1 #define AVR32_FLASHC_GPF54 22 #define AVR32_FLASHC_GPF54_MASK 0x00400000 #define AVR32_FLASHC_GPF54_OFFSET 22 #define AVR32_FLASHC_GPF54_SIZE 1 #define AVR32_FLASHC_GPF55 23 #define AVR32_FLASHC_GPF55_MASK 0x00800000 #define AVR32_FLASHC_GPF55_OFFSET 23 #define AVR32_FLASHC_GPF55_SIZE 1 #define AVR32_FLASHC_GPF56 24 #define AVR32_FLASHC_GPF56_MASK 0x01000000 #define AVR32_FLASHC_GPF56_OFFSET 24 #define AVR32_FLASHC_GPF56_SIZE 1 #define AVR32_FLASHC_GPF57 25 #define AVR32_FLASHC_GPF57_MASK 0x02000000 #define AVR32_FLASHC_GPF57_OFFSET 25 #define AVR32_FLASHC_GPF57_SIZE 1 #define AVR32_FLASHC_GPF58 26 #define AVR32_FLASHC_GPF58_MASK 0x04000000 #define AVR32_FLASHC_GPF58_OFFSET 26 #define AVR32_FLASHC_GPF58_SIZE 1 #define AVR32_FLASHC_GPF59 27 #define AVR32_FLASHC_GPF59_MASK 0x08000000 #define AVR32_FLASHC_GPF59_OFFSET 27 #define AVR32_FLASHC_GPF59_SIZE 1 #define AVR32_FLASHC_GPF60 28 #define AVR32_FLASHC_GPF60_MASK 0x10000000 #define AVR32_FLASHC_GPF60_OFFSET 28 #define AVR32_FLASHC_GPF60_SIZE 1 #define AVR32_FLASHC_GPF61 29 #define AVR32_FLASHC_GPF61_MASK 0x20000000 #define AVR32_FLASHC_GPF61_OFFSET 29 #define AVR32_FLASHC_GPF61_SIZE 1 #define AVR32_FLASHC_GPF62 30 #define AVR32_FLASHC_GPF62_MASK 0x40000000 #define AVR32_FLASHC_GPF62_OFFSET 30 #define AVR32_FLASHC_GPF62_SIZE 1 #define AVR32_FLASHC_GPF63 31 #define AVR32_FLASHC_GPF63_MASK 0x80000000 #define AVR32_FLASHC_GPF63_OFFSET 31 #define AVR32_FLASHC_GPF63_SIZE 1 #define AVR32_FLASHC_KEY_KEY 0x000000a5 #define AVR32_FLASHC_KEY_MASK 0xff000000 #define AVR32_FLASHC_KEY_OFFSET 24 #define AVR32_FLASHC_KEY_SIZE 8 #define AVR32_FLASHC_LOCK0_SIZE 1 #define AVR32_FLASHC_LOCK10_SIZE 1 #define AVR32_FLASHC_LOCK11_SIZE 1 #define AVR32_FLASHC_LOCK12_SIZE 1 #define AVR32_FLASHC_LOCK13_SIZE 1 #define AVR32_FLASHC_LOCK14_SIZE 1 #define AVR32_FLASHC_LOCK15_SIZE 1 #define AVR32_FLASHC_LOCK1_SIZE 1 #define AVR32_FLASHC_LOCK2_SIZE 1 #define AVR32_FLASHC_LOCK3_SIZE 1 #define AVR32_FLASHC_LOCK4_SIZE 1 #define AVR32_FLASHC_LOCK5_SIZE 1 #define AVR32_FLASHC_LOCK6_SIZE 1 #define AVR32_FLASHC_LOCK7_SIZE 1 #define AVR32_FLASHC_LOCK8_SIZE 1 #define AVR32_FLASHC_LOCK9_SIZE 1 #define AVR32_FLASHC_LOCKE 2 #define AVR32_FLASHC_LOCKE_MASK 0x00000004 #define AVR32_FLASHC_LOCKE_OFFSET 2 #define AVR32_FLASHC_LOCKE_SIZE 1 #define AVR32_FLASHC_LP 0x00000004 #define AVR32_FLASHC_NOP 0x00000000 #define AVR32_FLASHC_PAGEN 8 #define AVR32_FLASHC_PAGEN_MASK 0x00ffff00 #define AVR32_FLASHC_PAGEN_OFFSET 8 #define AVR32_FLASHC_PAGEN_SIZE 16 #define AVR32_FLASHC_PGPFB 0x0000000a #define AVR32_FLASHC_PROGE 3 #define AVR32_FLASHC_PROGE_MASK 0x00000008 #define AVR32_FLASHC_PROGE_OFFSET 3 #define AVR32_FLASHC_PROGE_SIZE 1 #define AVR32_FLASHC_QPR 0x0000000c #define AVR32_FLASHC_QPRR 5 #define AVR32_FLASHC_QPRR_MASK 0x00000020 #define AVR32_FLASHC_QPRR_OFFSET 5 #define AVR32_FLASHC_QPRR_SIZE 1 #define AVR32_FLASHC_QPRUP 0x0000000f #define AVR32_FLASHC_SECURITY 4 #define AVR32_FLASHC_SECURITY_MASK 0x00000010 #define AVR32_FLASHC_SECURITY_OFFSET 4 #define AVR32_FLASHC_SECURITY_SIZE 1 #define AVR32_FLASHC_SSB 0x00000009 #define AVR32_FLASHC_UP 0x00000005 #define AVR32_FLASHC_WGPB 0x00000007 #define AVR32_FLASHC_WP 0x00000001 #define AVR32_FLASHC_WUP 0x0000000d #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_flashc_fcr_t { unsigned int :25; unsigned int fws : 1; unsigned int : 2; unsigned int proge : 1; unsigned int locke : 1; unsigned int : 1; unsigned int frdy : 1; } avr32_flashc_fcr_t; typedef struct avr32_flashc_fcmd_t { unsigned int key : 8; unsigned int pagen :16; unsigned int : 2; unsigned int cmd : 6; } avr32_flashc_fcmd_t; typedef struct avr32_flashc_fsr_t { unsigned int lock15 : 1; unsigned int lock14 : 1; unsigned int lock13 : 1; unsigned int lock12 : 1; unsigned int lock11 : 1; unsigned int lock10 : 1; unsigned int lock9 : 1; unsigned int lock8 : 1; unsigned int lock7 : 1; unsigned int lock6 : 1; unsigned int lock5 : 1; unsigned int lock4 : 1; unsigned int lock3 : 1; unsigned int lock2 : 1; unsigned int lock1 : 1; unsigned int lock0 : 1; unsigned int fsz : 3; unsigned int : 7; unsigned int qprr : 1; unsigned int security : 1; unsigned int proge : 1; unsigned int locke : 1; unsigned int : 1; unsigned int frdy : 1; } avr32_flashc_fsr_t; typedef struct avr32_flashc_fgpfrhi_t { unsigned int gpf63 : 1; unsigned int gpf62 : 1; unsigned int gpf61 : 1; unsigned int gpf60 : 1; unsigned int gpf59 : 1; unsigned int gpf58 : 1; unsigned int gpf57 : 1; unsigned int gpf56 : 1; unsigned int gpf55 : 1; unsigned int gpf54 : 1; unsigned int gpf53 : 1; unsigned int gpf52 : 1; unsigned int gpf51 : 1; unsigned int gpf50 : 1; unsigned int gpf49 : 1; unsigned int gpf48 : 1; unsigned int gpf47 : 1; unsigned int gpf46 : 1; unsigned int gpf45 : 1; unsigned int gpf44 : 1; unsigned int gpf43 : 1; unsigned int gpf42 : 1; unsigned int gpf41 : 1; unsigned int gpf40 : 1; unsigned int gpf39 : 1; unsigned int gpf38 : 1; unsigned int gpf37 : 1; unsigned int gpf36 : 1; unsigned int gpf35 : 1; unsigned int gpf34 : 1; unsigned int gpf33 : 1; unsigned int gpf32 : 1; } avr32_flashc_fgpfrhi_t; typedef struct avr32_flashc_fgpfrlo_t { unsigned int gpf31 : 1; unsigned int gpf30 : 1; unsigned int gpf29 : 1; unsigned int gpf28 : 1; unsigned int gpf27 : 1; unsigned int gpf26 : 1; unsigned int gpf25 : 1; unsigned int gpf24 : 1; unsigned int gpf23 : 1; unsigned int gpf22 : 1; unsigned int gpf21 : 1; unsigned int gpf20 : 1; unsigned int bootprot : 3; unsigned int epfl : 1; unsigned int lock15 : 1; unsigned int lock14 : 1; unsigned int lock13 : 1; unsigned int lock12 : 1; unsigned int lock11 : 1; unsigned int lock10 : 1; unsigned int lock9 : 1; unsigned int lock8 : 1; unsigned int lock7 : 1; unsigned int lock6 : 1; unsigned int lock5 : 1; unsigned int lock4 : 1; unsigned int lock3 : 1; unsigned int lock2 : 1; unsigned int lock1 : 1; unsigned int lock0 : 1; } avr32_flashc_fgpfrlo_t; typedef struct avr32_flashc_t { union { unsigned long fcr ;//0x0000 avr32_flashc_fcr_t FCR ; }; union { unsigned long fcmd ;//0x0004 avr32_flashc_fcmd_t FCMD ; }; union { unsigned long fsr ;//0x0008 avr32_flashc_fsr_t FSR ; }; union { const unsigned long fgpfrhi ;//0x000c const avr32_flashc_fgpfrhi_t FGPFRHI ; }; union { const unsigned long fgpfrlo ;//0x0010 const avr32_flashc_fgpfrlo_t FGPFRLO ; }; } avr32_flashc_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif /*#ifdef AVR32_FLASHC_200_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/freqm_230.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 : UC3000 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_FREQM_230_H_INCLUDED #define AVR32_FREQM_230_H_INCLUDED #define AVR32_FREQM_H_VERSION 230 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_FREQM_ - Bitfield mask: AVR32_FREQM__ - Bitfield offset: AVR32_FREQM___OFFSET - Bitfield size: AVR32_FREQM___SIZE - Bitfield values: AVR32_FREQM___ 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_FREQM_ - Bitfield offset: AVR32_FREQM__OFFSET - Bitfield size: AVR32_FREQM__SIZE - Bitfield values: AVR32_FREQM__ - Bitfield values: AVR32_FREQM_ All defines are sorted alphabetically. */ #define AVR32_FREQM_BUSY 0 #define AVR32_FREQM_BUSY_MASK 0x00000001 #define AVR32_FREQM_BUSY_OFFSET 0 #define AVR32_FREQM_BUSY_SIZE 1 #define AVR32_FREQM_CLKSEL 16 #define AVR32_FREQM_CLKSEL_CPU 0x00000000 #define AVR32_FREQM_CLKSEL_CRIPLEL 0x0000000a #define AVR32_FREQM_CLKSEL_GENCLK0 0x0000000b #define AVR32_FREQM_CLKSEL_GENCLK1 0x0000000c #define AVR32_FREQM_CLKSEL_GENCLK2 0x0000000d #define AVR32_FREQM_CLKSEL_GENCLK3 0x0000000e #define AVR32_FREQM_CLKSEL_GENCLK4 0x0000000f #define AVR32_FREQM_CLKSEL_GENCLK5 0x00000010 #define AVR32_FREQM_CLKSEL_HSB 0x00000001 #define AVR32_FREQM_CLKSEL_MASK 0x001f0000 #define AVR32_FREQM_CLKSEL_OFFSET 16 #define AVR32_FREQM_CLKSEL_OSC0 0x00000004 #define AVR32_FREQM_CLKSEL_OSC1 0x00000005 #define AVR32_FREQM_CLKSEL_OSC32 0x00000006 #define AVR32_FREQM_CLKSEL_PBA 0x00000002 #define AVR32_FREQM_CLKSEL_PBB 0x00000003 #define AVR32_FREQM_CLKSEL_PLL0 0x00000008 #define AVR32_FREQM_CLKSEL_PLL1 0x00000009 #define AVR32_FREQM_CLKSEL_RCOSC 0x00000007 #define AVR32_FREQM_CLKSEL_SIZE 5 #define AVR32_FREQM_CPU 0x00000000 #define AVR32_FREQM_CRIPLEL 0x0000000a #define AVR32_FREQM_CTRL 0x00000000 #define AVR32_FREQM_CTRL_START 0 #define AVR32_FREQM_CTRL_START_MASK 0x00000001 #define AVR32_FREQM_CTRL_START_OFFSET 0 #define AVR32_FREQM_CTRL_START_SIZE 1 #define AVR32_FREQM_DONE 0 #define AVR32_FREQM_DONE_MASK 0x00000001 #define AVR32_FREQM_DONE_OFFSET 0 #define AVR32_FREQM_DONE_SIZE 1 #define AVR32_FREQM_GENCLK0 0x0000000b #define AVR32_FREQM_GENCLK1 0x0000000c #define AVR32_FREQM_GENCLK2 0x0000000d #define AVR32_FREQM_GENCLK3 0x0000000e #define AVR32_FREQM_GENCLK4 0x0000000f #define AVR32_FREQM_GENCLK5 0x00000010 #define AVR32_FREQM_HSB 0x00000001 #define AVR32_FREQM_ICR 0x00000020 #define AVR32_FREQM_ICR_DONE 0 #define AVR32_FREQM_ICR_DONE_MASK 0x00000001 #define AVR32_FREQM_ICR_DONE_OFFSET 0 #define AVR32_FREQM_ICR_DONE_SIZE 1 #define AVR32_FREQM_IDR 0x00000014 #define AVR32_FREQM_IDR_DONE 0 #define AVR32_FREQM_IDR_DONE_MASK 0x00000001 #define AVR32_FREQM_IDR_DONE_OFFSET 0 #define AVR32_FREQM_IDR_DONE_SIZE 1 #define AVR32_FREQM_IER 0x00000010 #define AVR32_FREQM_IER_DONE 0 #define AVR32_FREQM_IER_DONE_MASK 0x00000001 #define AVR32_FREQM_IER_DONE_OFFSET 0 #define AVR32_FREQM_IER_DONE_SIZE 1 #define AVR32_FREQM_IMR 0x00000018 #define AVR32_FREQM_IMR_DONE 0 #define AVR32_FREQM_IMR_DONE_MASK 0x00000001 #define AVR32_FREQM_IMR_DONE_OFFSET 0 #define AVR32_FREQM_IMR_DONE_SIZE 1 #define AVR32_FREQM_ISR 0x0000001c #define AVR32_FREQM_ISR_DONE 0 #define AVR32_FREQM_ISR_DONE_MASK 0x00000001 #define AVR32_FREQM_ISR_DONE_OFFSET 0 #define AVR32_FREQM_ISR_DONE_SIZE 1 #define AVR32_FREQM_MODE 0x00000004 #define AVR32_FREQM_MODE_CLKSEL 16 #define AVR32_FREQM_MODE_CLKSEL_CPU 0x00000000 #define AVR32_FREQM_MODE_CLKSEL_CRIPLEL 0x0000000a #define AVR32_FREQM_MODE_CLKSEL_GENCLK0 0x0000000b #define AVR32_FREQM_MODE_CLKSEL_GENCLK1 0x0000000c #define AVR32_FREQM_MODE_CLKSEL_GENCLK2 0x0000000d #define AVR32_FREQM_MODE_CLKSEL_GENCLK3 0x0000000e #define AVR32_FREQM_MODE_CLKSEL_GENCLK4 0x0000000f #define AVR32_FREQM_MODE_CLKSEL_GENCLK5 0x00000010 #define AVR32_FREQM_MODE_CLKSEL_HSB 0x00000001 #define AVR32_FREQM_MODE_CLKSEL_MASK 0x001f0000 #define AVR32_FREQM_MODE_CLKSEL_OFFSET 16 #define AVR32_FREQM_MODE_CLKSEL_OSC0 0x00000004 #define AVR32_FREQM_MODE_CLKSEL_OSC1 0x00000005 #define AVR32_FREQM_MODE_CLKSEL_OSC32 0x00000006 #define AVR32_FREQM_MODE_CLKSEL_PBA 0x00000002 #define AVR32_FREQM_MODE_CLKSEL_PBB 0x00000003 #define AVR32_FREQM_MODE_CLKSEL_PLL0 0x00000008 #define AVR32_FREQM_MODE_CLKSEL_PLL1 0x00000009 #define AVR32_FREQM_MODE_CLKSEL_RCOSC 0x00000007 #define AVR32_FREQM_MODE_CLKSEL_SIZE 5 #define AVR32_FREQM_MODE_REFNUM 8 #define AVR32_FREQM_MODE_REFNUM_MASK 0x0000ff00 #define AVR32_FREQM_MODE_REFNUM_OFFSET 8 #define AVR32_FREQM_MODE_REFNUM_SIZE 8 #define AVR32_FREQM_MODE_REFSEL 0 #define AVR32_FREQM_MODE_REFSEL_MASK 0x00000001 #define AVR32_FREQM_MODE_REFSEL_OFFSET 0 #define AVR32_FREQM_MODE_REFSEL_REF_OSC32 0x00000001 #define AVR32_FREQM_MODE_REFSEL_REF_RCOSC 0x00000000 #define AVR32_FREQM_MODE_REFSEL_SIZE 1 #define AVR32_FREQM_OSC0 0x00000004 #define AVR32_FREQM_OSC1 0x00000005 #define AVR32_FREQM_OSC32 0x00000006 #define AVR32_FREQM_PBA 0x00000002 #define AVR32_FREQM_PBB 0x00000003 #define AVR32_FREQM_PLL0 0x00000008 #define AVR32_FREQM_PLL1 0x00000009 #define AVR32_FREQM_RCOSC 0x00000007 #define AVR32_FREQM_REFNUM 8 #define AVR32_FREQM_REFNUM_MASK 0x0000ff00 #define AVR32_FREQM_REFNUM_OFFSET 8 #define AVR32_FREQM_REFNUM_SIZE 8 #define AVR32_FREQM_REFSEL 0 #define AVR32_FREQM_REFSEL_MASK 0x00000001 #define AVR32_FREQM_REFSEL_OFFSET 0 #define AVR32_FREQM_REFSEL_REF_OSC32 0x00000001 #define AVR32_FREQM_REFSEL_REF_RCOSC 0x00000000 #define AVR32_FREQM_REFSEL_SIZE 1 #define AVR32_FREQM_REF_OSC32 0x00000001 #define AVR32_FREQM_REF_RCOSC 0x00000000 #define AVR32_FREQM_START 0 #define AVR32_FREQM_START_MASK 0x00000001 #define AVR32_FREQM_START_OFFSET 0 #define AVR32_FREQM_START_SIZE 1 #define AVR32_FREQM_STATUS 0x00000008 #define AVR32_FREQM_STATUS_BUSY 0 #define AVR32_FREQM_STATUS_BUSY_MASK 0x00000001 #define AVR32_FREQM_STATUS_BUSY_OFFSET 0 #define AVR32_FREQM_STATUS_BUSY_SIZE 1 #define AVR32_FREQM_VALUE 0x0000000c #define AVR32_FREQM_VALUE_MASK 0x00ffffff #define AVR32_FREQM_VALUE_OFFSET 0 #define AVR32_FREQM_VALUE_SIZE 24 #define AVR32_FREQM_VALUE_VALUE 0 #define AVR32_FREQM_VALUE_VALUE_MASK 0x00ffffff #define AVR32_FREQM_VALUE_VALUE_OFFSET 0 #define AVR32_FREQM_VALUE_VALUE_SIZE 24 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_freqm_ctrl_t { unsigned int :31; unsigned int start : 1; } avr32_freqm_ctrl_t; typedef struct avr32_freqm_mode_t { unsigned int :11; unsigned int clksel : 5; unsigned int refnum : 8; unsigned int : 7; unsigned int refsel : 1; } avr32_freqm_mode_t; typedef struct avr32_freqm_status_t { unsigned int :31; unsigned int busy : 1; } avr32_freqm_status_t; typedef struct avr32_freqm_value_t { unsigned int : 8; unsigned int value :24; } avr32_freqm_value_t; typedef struct avr32_freqm_ier_t { unsigned int :31; unsigned int done : 1; } avr32_freqm_ier_t; typedef struct avr32_freqm_idr_t { unsigned int :31; unsigned int done : 1; } avr32_freqm_idr_t; typedef struct avr32_freqm_imr_t { unsigned int :31; unsigned int done : 1; } avr32_freqm_imr_t; typedef struct avr32_freqm_isr_t { unsigned int :31; unsigned int done : 1; } avr32_freqm_isr_t; typedef struct avr32_freqm_icr_t { unsigned int :31; unsigned int done : 1; } avr32_freqm_icr_t; typedef struct avr32_freqm_t { union { unsigned long ctrl ;//0x0000 avr32_freqm_ctrl_t CTRL ; }; union { unsigned long mode ;//0x0004 avr32_freqm_mode_t MODE ; }; union { const unsigned long status ;//0x0008 const avr32_freqm_status_t STATUS ; }; union { unsigned long value ;//0x000c avr32_freqm_value_t VALUE ; }; union { unsigned long ier ;//0x0010 avr32_freqm_ier_t IER ; }; union { unsigned long idr ;//0x0014 avr32_freqm_idr_t IDR ; }; union { const unsigned long imr ;//0x0018 const avr32_freqm_imr_t IMR ; }; union { const unsigned long isr ;//0x001c const avr32_freqm_isr_t ISR ; }; union { unsigned long icr ;//0x0020 avr32_freqm_icr_t ICR ; }; } avr32_freqm_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif /*#ifdef AVR32_FREQM_230_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/gpio_110.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_GPIO_110_H_INCLUDED #define AVR32_GPIO_110_H_INCLUDED #define AVR32_GPIO_H_VERSION 110 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_GPIO_ - Bitfield mask: AVR32_GPIO__ - Bitfield offset: AVR32_GPIO___OFFSET - Bitfield size: AVR32_GPIO___SIZE - Bitfield values: AVR32_GPIO___ 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_GPIO_ - Bitfield offset: AVR32_GPIO__OFFSET - Bitfield size: AVR32_GPIO__SIZE - Bitfield values: AVR32_GPIO__ - Bitfield values: AVR32_GPIO_ All defines are sorted alphabetically. */ #define AVR32_GPIO_GFER 0x000000c0 #define AVR32_GPIO_GFERC 0x000000c8 #define AVR32_GPIO_GFERS 0x000000c4 #define AVR32_GPIO_GFERT 0x000000cc #define AVR32_GPIO_GPER 0x00000000 #define AVR32_GPIO_GPERC 0x00000008 #define AVR32_GPIO_GPERS 0x00000004 #define AVR32_GPIO_GPERT 0x0000000c #define AVR32_GPIO_IER 0x00000090 #define AVR32_GPIO_IERC 0x00000098 #define AVR32_GPIO_IERS 0x00000094 #define AVR32_GPIO_IERT 0x0000009c #define AVR32_GPIO_IFR 0x000000d0 #define AVR32_GPIO_IFRC 0x000000d8 #define AVR32_GPIO_IMR0 0x000000a0 #define AVR32_GPIO_IMR0C 0x000000a8 #define AVR32_GPIO_IMR0S 0x000000a4 #define AVR32_GPIO_IMR0T 0x000000ac #define AVR32_GPIO_IMR1 0x000000b0 #define AVR32_GPIO_IMR1C 0x000000b8 #define AVR32_GPIO_IMR1S 0x000000b4 #define AVR32_GPIO_IMR1T 0x000000bc #define AVR32_GPIO_LOCAL_ODER 0x00000040 #define AVR32_GPIO_LOCAL_ODERC 0x00000048 #define AVR32_GPIO_LOCAL_ODERS 0x00000044 #define AVR32_GPIO_LOCAL_ODERT 0x0000004c #define AVR32_GPIO_LOCAL_OVR 0x00000050 #define AVR32_GPIO_LOCAL_OVRC 0x00000058 #define AVR32_GPIO_LOCAL_OVRS 0x00000054 #define AVR32_GPIO_LOCAL_OVRT 0x0000005c #define AVR32_GPIO_LOCAL_PVR 0x00000060 #define AVR32_GPIO_ODER 0x00000040 #define AVR32_GPIO_ODERC 0x00000048 #define AVR32_GPIO_ODERS 0x00000044 #define AVR32_GPIO_ODERT 0x0000004c #define AVR32_GPIO_ODMER 0x00000080 #define AVR32_GPIO_ODMERC 0x00000088 #define AVR32_GPIO_ODMERS 0x00000084 #define AVR32_GPIO_ODMERT 0x0000008c #define AVR32_GPIO_OVR 0x00000050 #define AVR32_GPIO_OVRC 0x00000058 #define AVR32_GPIO_OVRS 0x00000054 #define AVR32_GPIO_OVRT 0x0000005c #define AVR32_GPIO_PMR0 0x00000010 #define AVR32_GPIO_PMR0C 0x00000018 #define AVR32_GPIO_PMR0S 0x00000014 #define AVR32_GPIO_PMR0T 0x0000001c #define AVR32_GPIO_PMR1 0x00000020 #define AVR32_GPIO_PMR1C 0x00000028 #define AVR32_GPIO_PMR1S 0x00000024 #define AVR32_GPIO_PMR1T 0x0000002c #define AVR32_GPIO_PUER 0x00000070 #define AVR32_GPIO_PUERC 0x00000078 #define AVR32_GPIO_PUERS 0x00000074 #define AVR32_GPIO_PUERT 0x0000007c #define AVR32_GPIO_PVR 0x00000060 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_gpio_local_port_t { unsigned int :32 ;//0x0000 unsigned int :32 ;//0x0004 unsigned int :32 ;//0x0008 unsigned int :32 ;//0x000c unsigned int :32 ;//0x0010 unsigned int :32 ;//0x0014 unsigned int :32 ;//0x0018 unsigned int :32 ;//0x001c unsigned int :32 ;//0x0020 unsigned int :32 ;//0x0024 unsigned int :32 ;//0x0028 unsigned int :32 ;//0x002c unsigned int :32 ;//0x0030 unsigned int :32 ;//0x0034 unsigned int :32 ;//0x0038 unsigned int :32 ;//0x003c unsigned long oder ;//0x0040 unsigned long oders ;//0x0044 unsigned long oderc ;//0x0048 unsigned long odert ;//0x004c unsigned long ovr ;//0x0050 unsigned long ovrs ;//0x0054 unsigned long ovrc ;//0x0058 unsigned long ovrt ;//0x005c const unsigned long pvr ;//0x0060 unsigned int :32 ;//0x0064 unsigned int :32 ;//0x0068 unsigned int :32 ;//0x006c unsigned int :32 ;//0x0070 unsigned int :32 ;//0x0074 unsigned int :32 ;//0x0078 unsigned int :32 ;//0x007c unsigned int :32 ;//0x0080 unsigned int :32 ;//0x0084 unsigned int :32 ;//0x0088 unsigned int :32 ;//0x008c unsigned int :32 ;//0x0090 unsigned int :32 ;//0x0094 unsigned int :32 ;//0x0098 unsigned int :32 ;//0x009c unsigned int :32 ;//0x00a0 unsigned int :32 ;//0x00a4 unsigned int :32 ;//0x00a8 unsigned int :32 ;//0x00ac unsigned int :32 ;//0x00b0 unsigned int :32 ;//0x00b4 unsigned int :32 ;//0x00b8 unsigned int :32 ;//0x00bc unsigned int :32 ;//0x00c0 unsigned int :32 ;//0x00c4 unsigned int :32 ;//0x00c8 unsigned int :32 ;//0x00cc unsigned int :32 ;//0x00d0 unsigned int :32 ;//0x00d4 unsigned int :32 ;//0x00d8 unsigned int :32 ;//0x00dc unsigned int :32 ;//0x00e0 unsigned int :32 ;//0x00e4 unsigned int :32 ;//0x00e8 unsigned int :32 ;//0x00ec unsigned int :32 ;//0x00f0 unsigned int :32 ;//0x00f4 unsigned int :32 ;//0x00f8 unsigned int :32 ;//0x00fc } avr32_gpio_local_port_t; typedef struct avr32_gpio_local_t { avr32_gpio_local_port_t port[AVR32_GPIO_PORT_LENGTH];//0x0 } avr32_gpio_local_t; typedef struct avr32_gpio_port_t { unsigned long gper ;//0x0000 unsigned long gpers ;//0x0004 unsigned long gperc ;//0x0008 unsigned long gpert ;//0x000c unsigned long pmr0 ;//0x0010 unsigned long pmr0s ;//0x0014 unsigned long pmr0c ;//0x0018 unsigned long pmr0t ;//0x001c unsigned long pmr1 ;//0x0020 unsigned long pmr1s ;//0x0024 unsigned long pmr1c ;//0x0028 unsigned long pmr1t ;//0x002c unsigned int :32 ;//0x0030 unsigned int :32 ;//0x0034 unsigned int :32 ;//0x0038 unsigned int :32 ;//0x003c unsigned long oder ;//0x0040 unsigned long oders ;//0x0044 unsigned long oderc ;//0x0048 unsigned long odert ;//0x004c unsigned long ovr ;//0x0050 unsigned long ovrs ;//0x0054 unsigned long ovrc ;//0x0058 unsigned long ovrt ;//0x005c const unsigned long pvr ;//0x0060 unsigned int :32 ;//0x0064 unsigned int :32 ;//0x0068 unsigned int :32 ;//0x006c unsigned long puer ;//0x0070 unsigned long puers ;//0x0074 unsigned long puerc ;//0x0078 unsigned long puert ;//0x007c unsigned long odmer ;//0x0080 unsigned long odmers ;//0x0084 unsigned long odmerc ;//0x0088 unsigned long odmert ;//0x008c unsigned long ier ;//0x0090 unsigned long iers ;//0x0094 unsigned long ierc ;//0x0098 unsigned long iert ;//0x009c unsigned long imr0 ;//0x00a0 unsigned long imr0s ;//0x00a4 unsigned long imr0c ;//0x00a8 unsigned long imr0t ;//0x00ac unsigned long imr1 ;//0x00b0 unsigned long imr1s ;//0x00b4 unsigned long imr1c ;//0x00b8 unsigned long imr1t ;//0x00bc unsigned long gfer ;//0x00c0 unsigned long gfers ;//0x00c4 unsigned long gferc ;//0x00c8 unsigned long gfert ;//0x00cc const unsigned long ifr ;//0x00d0 unsigned int :32 ;//0x00d4 unsigned long ifrc ;//0x00d8 unsigned int :32 ;//0x00dc unsigned int :32 ;//0x00e0 unsigned int :32 ;//0x00e4 unsigned int :32 ;//0x00e8 unsigned int :32 ;//0x00ec unsigned int :32 ;//0x00f0 unsigned int :32 ;//0x00f4 unsigned int :32 ;//0x00f8 unsigned int :32 ;//0x00fc } avr32_gpio_port_t; typedef struct avr32_gpio_t { avr32_gpio_port_t port[AVR32_GPIO_PORT_LENGTH];//0x0 } avr32_gpio_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif /*#ifdef AVR32_GPIO_110_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/hmatrix_230.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 : AP7200 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_HMATRIX_230_H_INCLUDED #define AVR32_HMATRIX_230_H_INCLUDED #define AVR32_HMATRIX_H_VERSION 230 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_HMATRIX_ - Bitfield mask: AVR32_HMATRIX__ - Bitfield offset: AVR32_HMATRIX___OFFSET - Bitfield size: AVR32_HMATRIX___SIZE - Bitfield values: AVR32_HMATRIX___ 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_HMATRIX_ - Bitfield offset: AVR32_HMATRIX__OFFSET - Bitfield size: AVR32_HMATRIX__SIZE - Bitfield values: AVR32_HMATRIX__ - Bitfield values: AVR32_HMATRIX_ All defines are sorted alphabetically. */ #define AVR32_HMATRIX_ARBT 24 #define AVR32_HMATRIX_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_ARBT_OFFSET 24 #define AVR32_HMATRIX_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_ARBT_SIZE 1 #define AVR32_HMATRIX_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_INFINITE 0x00000000 #define AVR32_HMATRIX_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_M0PR 0 #define AVR32_HMATRIX_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_M0PR_OFFSET 0 #define AVR32_HMATRIX_M0PR_SIZE 4 #define AVR32_HMATRIX_M10PR 8 #define AVR32_HMATRIX_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_M10PR_OFFSET 8 #define AVR32_HMATRIX_M10PR_SIZE 4 #define AVR32_HMATRIX_M11PR 12 #define AVR32_HMATRIX_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_M11PR_OFFSET 12 #define AVR32_HMATRIX_M11PR_SIZE 4 #define AVR32_HMATRIX_M12PR 16 #define AVR32_HMATRIX_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_M12PR_OFFSET 16 #define AVR32_HMATRIX_M12PR_SIZE 4 #define AVR32_HMATRIX_M13PR 20 #define AVR32_HMATRIX_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_M13PR_OFFSET 20 #define AVR32_HMATRIX_M13PR_SIZE 4 #define AVR32_HMATRIX_M14PR 24 #define AVR32_HMATRIX_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_M14PR_OFFSET 24 #define AVR32_HMATRIX_M14PR_SIZE 4 #define AVR32_HMATRIX_M15PR 28 #define AVR32_HMATRIX_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_M15PR_OFFSET 28 #define AVR32_HMATRIX_M15PR_SIZE 4 #define AVR32_HMATRIX_M1PR 4 #define AVR32_HMATRIX_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_M1PR_OFFSET 4 #define AVR32_HMATRIX_M1PR_SIZE 4 #define AVR32_HMATRIX_M2PR 8 #define AVR32_HMATRIX_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_M2PR_OFFSET 8 #define AVR32_HMATRIX_M2PR_SIZE 4 #define AVR32_HMATRIX_M3PR 12 #define AVR32_HMATRIX_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_M3PR_OFFSET 12 #define AVR32_HMATRIX_M3PR_SIZE 4 #define AVR32_HMATRIX_M4PR 16 #define AVR32_HMATRIX_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_M4PR_OFFSET 16 #define AVR32_HMATRIX_M4PR_SIZE 4 #define AVR32_HMATRIX_M5PR 20 #define AVR32_HMATRIX_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_M5PR_OFFSET 20 #define AVR32_HMATRIX_M5PR_SIZE 4 #define AVR32_HMATRIX_M6PR 24 #define AVR32_HMATRIX_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_M6PR_OFFSET 24 #define AVR32_HMATRIX_M6PR_SIZE 4 #define AVR32_HMATRIX_M7PR 28 #define AVR32_HMATRIX_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_M7PR_OFFSET 28 #define AVR32_HMATRIX_M7PR_SIZE 4 #define AVR32_HMATRIX_M8PR 0 #define AVR32_HMATRIX_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_M8PR_OFFSET 0 #define AVR32_HMATRIX_M8PR_SIZE 4 #define AVR32_HMATRIX_M9PR 4 #define AVR32_HMATRIX_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_M9PR_OFFSET 4 #define AVR32_HMATRIX_M9PR_SIZE 4 #define AVR32_HMATRIX_MCFG0 0x00000000 #define AVR32_HMATRIX_MCFG0_ULBT 0 #define AVR32_HMATRIX_MCFG0_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG0_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG0_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG0_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG0_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG0_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG0_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG0_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG1 0x00000004 #define AVR32_HMATRIX_MCFG10 0x00000028 #define AVR32_HMATRIX_MCFG10_ULBT 0 #define AVR32_HMATRIX_MCFG10_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG10_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG10_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG10_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG10_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG10_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG10_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG10_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG11 0x0000002c #define AVR32_HMATRIX_MCFG11_ULBT 0 #define AVR32_HMATRIX_MCFG11_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG11_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG11_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG11_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG11_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG11_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG11_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG11_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG12 0x00000030 #define AVR32_HMATRIX_MCFG12_ULBT 0 #define AVR32_HMATRIX_MCFG12_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG12_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG12_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG12_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG12_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG12_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG12_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG12_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG13 0x00000034 #define AVR32_HMATRIX_MCFG13_ULBT 0 #define AVR32_HMATRIX_MCFG13_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG13_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG13_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG13_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG13_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG13_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG13_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG13_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG14 0x00000038 #define AVR32_HMATRIX_MCFG14_ULBT 0 #define AVR32_HMATRIX_MCFG14_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG14_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG14_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG14_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG14_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG14_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG14_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG14_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG15 0x0000003c #define AVR32_HMATRIX_MCFG15_ULBT 0 #define AVR32_HMATRIX_MCFG15_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG15_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG15_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG15_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG15_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG15_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG15_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG15_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG1_ULBT 0 #define AVR32_HMATRIX_MCFG1_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG1_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG1_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG1_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG1_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG1_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG1_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG1_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG2 0x00000008 #define AVR32_HMATRIX_MCFG2_ULBT 0 #define AVR32_HMATRIX_MCFG2_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG2_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG2_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG2_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG2_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG2_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG2_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG2_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG3 0x0000000c #define AVR32_HMATRIX_MCFG3_ULBT 0 #define AVR32_HMATRIX_MCFG3_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG3_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG3_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG3_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG3_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG3_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG3_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG3_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG4 0x00000010 #define AVR32_HMATRIX_MCFG4_ULBT 0 #define AVR32_HMATRIX_MCFG4_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG4_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG4_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG4_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG4_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG4_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG4_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG4_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG5 0x00000014 #define AVR32_HMATRIX_MCFG5_ULBT 0 #define AVR32_HMATRIX_MCFG5_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG5_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG5_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG5_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG5_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG5_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG5_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG5_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG6 0x00000018 #define AVR32_HMATRIX_MCFG6_ULBT 0 #define AVR32_HMATRIX_MCFG6_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG6_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG6_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG6_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG6_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG6_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG6_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG6_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG7 0x0000001c #define AVR32_HMATRIX_MCFG7_ULBT 0 #define AVR32_HMATRIX_MCFG7_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG7_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG7_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG7_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG7_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG7_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG7_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG7_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG8 0x00000020 #define AVR32_HMATRIX_MCFG8_ULBT 0 #define AVR32_HMATRIX_MCFG8_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG8_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG8_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG8_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG8_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG8_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG8_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG8_ULBT_SIZE 3 #define AVR32_HMATRIX_MCFG9 0x00000024 #define AVR32_HMATRIX_MCFG9_ULBT 0 #define AVR32_HMATRIX_MCFG9_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_MCFG9_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_MCFG9_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_MCFG9_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_MCFG9_ULBT_OFFSET 0 #define AVR32_HMATRIX_MCFG9_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_MCFG9_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_MCFG9_ULBT_SIZE 3 #define AVR32_HMATRIX_MRCR 0x00000100 #define AVR32_HMATRIX_MRCR_RCB0 0 #define AVR32_HMATRIX_MRCR_RCB0_MASK 0x00000001 #define AVR32_HMATRIX_MRCR_RCB0_OFFSET 0 #define AVR32_HMATRIX_MRCR_RCB0_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB1 1 #define AVR32_HMATRIX_MRCR_RCB10 10 #define AVR32_HMATRIX_MRCR_RCB10_MASK 0x00000400 #define AVR32_HMATRIX_MRCR_RCB10_OFFSET 10 #define AVR32_HMATRIX_MRCR_RCB10_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB11 11 #define AVR32_HMATRIX_MRCR_RCB11_MASK 0x00000800 #define AVR32_HMATRIX_MRCR_RCB11_OFFSET 11 #define AVR32_HMATRIX_MRCR_RCB11_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB12 12 #define AVR32_HMATRIX_MRCR_RCB12_MASK 0x00001000 #define AVR32_HMATRIX_MRCR_RCB12_OFFSET 12 #define AVR32_HMATRIX_MRCR_RCB12_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB13 13 #define AVR32_HMATRIX_MRCR_RCB13_MASK 0x00002000 #define AVR32_HMATRIX_MRCR_RCB13_OFFSET 13 #define AVR32_HMATRIX_MRCR_RCB13_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB14 14 #define AVR32_HMATRIX_MRCR_RCB14_MASK 0x00004000 #define AVR32_HMATRIX_MRCR_RCB14_OFFSET 14 #define AVR32_HMATRIX_MRCR_RCB14_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB15 15 #define AVR32_HMATRIX_MRCR_RCB15_MASK 0x00008000 #define AVR32_HMATRIX_MRCR_RCB15_OFFSET 15 #define AVR32_HMATRIX_MRCR_RCB15_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB1_MASK 0x00000002 #define AVR32_HMATRIX_MRCR_RCB1_OFFSET 1 #define AVR32_HMATRIX_MRCR_RCB1_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB2 2 #define AVR32_HMATRIX_MRCR_RCB2_MASK 0x00000004 #define AVR32_HMATRIX_MRCR_RCB2_OFFSET 2 #define AVR32_HMATRIX_MRCR_RCB2_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB3 3 #define AVR32_HMATRIX_MRCR_RCB3_MASK 0x00000008 #define AVR32_HMATRIX_MRCR_RCB3_OFFSET 3 #define AVR32_HMATRIX_MRCR_RCB3_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB4 4 #define AVR32_HMATRIX_MRCR_RCB4_MASK 0x00000010 #define AVR32_HMATRIX_MRCR_RCB4_OFFSET 4 #define AVR32_HMATRIX_MRCR_RCB4_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB5 5 #define AVR32_HMATRIX_MRCR_RCB5_MASK 0x00000020 #define AVR32_HMATRIX_MRCR_RCB5_OFFSET 5 #define AVR32_HMATRIX_MRCR_RCB5_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB6 6 #define AVR32_HMATRIX_MRCR_RCB6_MASK 0x00000040 #define AVR32_HMATRIX_MRCR_RCB6_OFFSET 6 #define AVR32_HMATRIX_MRCR_RCB6_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB7 7 #define AVR32_HMATRIX_MRCR_RCB7_MASK 0x00000080 #define AVR32_HMATRIX_MRCR_RCB7_OFFSET 7 #define AVR32_HMATRIX_MRCR_RCB7_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB8 8 #define AVR32_HMATRIX_MRCR_RCB8_MASK 0x00000100 #define AVR32_HMATRIX_MRCR_RCB8_OFFSET 8 #define AVR32_HMATRIX_MRCR_RCB8_SIZE 1 #define AVR32_HMATRIX_MRCR_RCB9 9 #define AVR32_HMATRIX_MRCR_RCB9_MASK 0x00000200 #define AVR32_HMATRIX_MRCR_RCB9_OFFSET 9 #define AVR32_HMATRIX_MRCR_RCB9_SIZE 1 #define AVR32_HMATRIX_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_PRAS0 0x00000080 #define AVR32_HMATRIX_PRAS0_M0PR 0 #define AVR32_HMATRIX_PRAS0_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS0_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS0_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS0_M1PR 4 #define AVR32_HMATRIX_PRAS0_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS0_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS0_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS0_M2PR 8 #define AVR32_HMATRIX_PRAS0_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS0_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS0_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS0_M3PR 12 #define AVR32_HMATRIX_PRAS0_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS0_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS0_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS0_M4PR 16 #define AVR32_HMATRIX_PRAS0_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS0_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS0_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS0_M5PR 20 #define AVR32_HMATRIX_PRAS0_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS0_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS0_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS0_M6PR 24 #define AVR32_HMATRIX_PRAS0_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS0_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS0_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS0_M7PR 28 #define AVR32_HMATRIX_PRAS0_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS0_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS0_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS1 0x00000088 #define AVR32_HMATRIX_PRAS10 0x000000d0 #define AVR32_HMATRIX_PRAS10_M0PR 0 #define AVR32_HMATRIX_PRAS10_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS10_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS10_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS10_M1PR 4 #define AVR32_HMATRIX_PRAS10_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS10_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS10_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS10_M2PR 8 #define AVR32_HMATRIX_PRAS10_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS10_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS10_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS10_M3PR 12 #define AVR32_HMATRIX_PRAS10_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS10_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS10_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS10_M4PR 16 #define AVR32_HMATRIX_PRAS10_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS10_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS10_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS10_M5PR 20 #define AVR32_HMATRIX_PRAS10_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS10_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS10_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS10_M6PR 24 #define AVR32_HMATRIX_PRAS10_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS10_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS10_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS10_M7PR 28 #define AVR32_HMATRIX_PRAS10_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS10_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS10_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS11 0x000000d8 #define AVR32_HMATRIX_PRAS11_M0PR 0 #define AVR32_HMATRIX_PRAS11_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS11_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS11_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS11_M1PR 4 #define AVR32_HMATRIX_PRAS11_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS11_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS11_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS11_M2PR 8 #define AVR32_HMATRIX_PRAS11_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS11_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS11_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS11_M3PR 12 #define AVR32_HMATRIX_PRAS11_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS11_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS11_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS11_M4PR 16 #define AVR32_HMATRIX_PRAS11_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS11_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS11_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS11_M5PR 20 #define AVR32_HMATRIX_PRAS11_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS11_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS11_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS11_M6PR 24 #define AVR32_HMATRIX_PRAS11_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS11_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS11_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS11_M7PR 28 #define AVR32_HMATRIX_PRAS11_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS11_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS11_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS12 0x000000e0 #define AVR32_HMATRIX_PRAS12_M0PR 0 #define AVR32_HMATRIX_PRAS12_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS12_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS12_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS12_M1PR 4 #define AVR32_HMATRIX_PRAS12_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS12_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS12_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS12_M2PR 8 #define AVR32_HMATRIX_PRAS12_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS12_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS12_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS12_M3PR 12 #define AVR32_HMATRIX_PRAS12_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS12_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS12_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS12_M4PR 16 #define AVR32_HMATRIX_PRAS12_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS12_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS12_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS12_M5PR 20 #define AVR32_HMATRIX_PRAS12_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS12_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS12_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS12_M6PR 24 #define AVR32_HMATRIX_PRAS12_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS12_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS12_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS12_M7PR 28 #define AVR32_HMATRIX_PRAS12_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS12_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS12_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS13 0x000000e8 #define AVR32_HMATRIX_PRAS13_M0PR 0 #define AVR32_HMATRIX_PRAS13_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS13_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS13_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS13_M1PR 4 #define AVR32_HMATRIX_PRAS13_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS13_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS13_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS13_M2PR 8 #define AVR32_HMATRIX_PRAS13_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS13_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS13_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS13_M3PR 12 #define AVR32_HMATRIX_PRAS13_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS13_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS13_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS13_M4PR 16 #define AVR32_HMATRIX_PRAS13_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS13_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS13_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS13_M5PR 20 #define AVR32_HMATRIX_PRAS13_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS13_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS13_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS13_M6PR 24 #define AVR32_HMATRIX_PRAS13_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS13_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS13_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS13_M7PR 28 #define AVR32_HMATRIX_PRAS13_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS13_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS13_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS14 0x000000f0 #define AVR32_HMATRIX_PRAS14_M0PR 0 #define AVR32_HMATRIX_PRAS14_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS14_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS14_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS14_M1PR 4 #define AVR32_HMATRIX_PRAS14_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS14_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS14_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS14_M2PR 8 #define AVR32_HMATRIX_PRAS14_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS14_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS14_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS14_M3PR 12 #define AVR32_HMATRIX_PRAS14_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS14_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS14_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS14_M4PR 16 #define AVR32_HMATRIX_PRAS14_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS14_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS14_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS14_M5PR 20 #define AVR32_HMATRIX_PRAS14_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS14_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS14_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS14_M6PR 24 #define AVR32_HMATRIX_PRAS14_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS14_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS14_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS14_M7PR 28 #define AVR32_HMATRIX_PRAS14_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS14_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS14_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS15 0x000000f8 #define AVR32_HMATRIX_PRAS15_M0PR 0 #define AVR32_HMATRIX_PRAS15_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS15_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS15_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS15_M1PR 4 #define AVR32_HMATRIX_PRAS15_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS15_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS15_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS15_M2PR 8 #define AVR32_HMATRIX_PRAS15_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS15_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS15_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS15_M3PR 12 #define AVR32_HMATRIX_PRAS15_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS15_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS15_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS15_M4PR 16 #define AVR32_HMATRIX_PRAS15_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS15_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS15_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS15_M5PR 20 #define AVR32_HMATRIX_PRAS15_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS15_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS15_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS15_M6PR 24 #define AVR32_HMATRIX_PRAS15_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS15_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS15_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS15_M7PR 28 #define AVR32_HMATRIX_PRAS15_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS15_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS15_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS1_M0PR 0 #define AVR32_HMATRIX_PRAS1_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS1_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS1_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS1_M1PR 4 #define AVR32_HMATRIX_PRAS1_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS1_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS1_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS1_M2PR 8 #define AVR32_HMATRIX_PRAS1_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS1_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS1_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS1_M3PR 12 #define AVR32_HMATRIX_PRAS1_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS1_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS1_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS1_M4PR 16 #define AVR32_HMATRIX_PRAS1_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS1_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS1_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS1_M5PR 20 #define AVR32_HMATRIX_PRAS1_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS1_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS1_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS1_M6PR 24 #define AVR32_HMATRIX_PRAS1_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS1_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS1_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS1_M7PR 28 #define AVR32_HMATRIX_PRAS1_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS1_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS1_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS2 0x00000090 #define AVR32_HMATRIX_PRAS2_M0PR 0 #define AVR32_HMATRIX_PRAS2_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS2_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS2_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS2_M1PR 4 #define AVR32_HMATRIX_PRAS2_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS2_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS2_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS2_M2PR 8 #define AVR32_HMATRIX_PRAS2_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS2_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS2_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS2_M3PR 12 #define AVR32_HMATRIX_PRAS2_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS2_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS2_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS2_M4PR 16 #define AVR32_HMATRIX_PRAS2_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS2_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS2_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS2_M5PR 20 #define AVR32_HMATRIX_PRAS2_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS2_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS2_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS2_M6PR 24 #define AVR32_HMATRIX_PRAS2_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS2_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS2_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS2_M7PR 28 #define AVR32_HMATRIX_PRAS2_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS2_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS2_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS3 0x00000098 #define AVR32_HMATRIX_PRAS3_M0PR 0 #define AVR32_HMATRIX_PRAS3_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS3_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS3_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS3_M1PR 4 #define AVR32_HMATRIX_PRAS3_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS3_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS3_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS3_M2PR 8 #define AVR32_HMATRIX_PRAS3_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS3_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS3_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS3_M3PR 12 #define AVR32_HMATRIX_PRAS3_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS3_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS3_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS3_M4PR 16 #define AVR32_HMATRIX_PRAS3_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS3_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS3_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS3_M5PR 20 #define AVR32_HMATRIX_PRAS3_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS3_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS3_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS3_M6PR 24 #define AVR32_HMATRIX_PRAS3_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS3_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS3_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS3_M7PR 28 #define AVR32_HMATRIX_PRAS3_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS3_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS3_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS4 0x000000a0 #define AVR32_HMATRIX_PRAS4_M0PR 0 #define AVR32_HMATRIX_PRAS4_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS4_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS4_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS4_M1PR 4 #define AVR32_HMATRIX_PRAS4_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS4_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS4_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS4_M2PR 8 #define AVR32_HMATRIX_PRAS4_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS4_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS4_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS4_M3PR 12 #define AVR32_HMATRIX_PRAS4_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS4_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS4_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS4_M4PR 16 #define AVR32_HMATRIX_PRAS4_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS4_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS4_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS4_M5PR 20 #define AVR32_HMATRIX_PRAS4_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS4_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS4_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS4_M6PR 24 #define AVR32_HMATRIX_PRAS4_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS4_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS4_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS4_M7PR 28 #define AVR32_HMATRIX_PRAS4_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS4_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS4_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS5 0x000000a8 #define AVR32_HMATRIX_PRAS5_M0PR 0 #define AVR32_HMATRIX_PRAS5_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS5_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS5_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS5_M1PR 4 #define AVR32_HMATRIX_PRAS5_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS5_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS5_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS5_M2PR 8 #define AVR32_HMATRIX_PRAS5_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS5_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS5_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS5_M3PR 12 #define AVR32_HMATRIX_PRAS5_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS5_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS5_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS5_M4PR 16 #define AVR32_HMATRIX_PRAS5_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS5_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS5_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS5_M5PR 20 #define AVR32_HMATRIX_PRAS5_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS5_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS5_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS5_M6PR 24 #define AVR32_HMATRIX_PRAS5_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS5_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS5_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS5_M7PR 28 #define AVR32_HMATRIX_PRAS5_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS5_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS5_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS6 0x000000b0 #define AVR32_HMATRIX_PRAS6_M0PR 0 #define AVR32_HMATRIX_PRAS6_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS6_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS6_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS6_M1PR 4 #define AVR32_HMATRIX_PRAS6_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS6_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS6_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS6_M2PR 8 #define AVR32_HMATRIX_PRAS6_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS6_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS6_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS6_M3PR 12 #define AVR32_HMATRIX_PRAS6_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS6_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS6_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS6_M4PR 16 #define AVR32_HMATRIX_PRAS6_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS6_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS6_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS6_M5PR 20 #define AVR32_HMATRIX_PRAS6_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS6_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS6_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS6_M6PR 24 #define AVR32_HMATRIX_PRAS6_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS6_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS6_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS6_M7PR 28 #define AVR32_HMATRIX_PRAS6_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS6_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS6_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS7 0x000000b8 #define AVR32_HMATRIX_PRAS7_M0PR 0 #define AVR32_HMATRIX_PRAS7_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS7_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS7_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS7_M1PR 4 #define AVR32_HMATRIX_PRAS7_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS7_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS7_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS7_M2PR 8 #define AVR32_HMATRIX_PRAS7_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS7_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS7_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS7_M3PR 12 #define AVR32_HMATRIX_PRAS7_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS7_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS7_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS7_M4PR 16 #define AVR32_HMATRIX_PRAS7_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS7_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS7_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS7_M5PR 20 #define AVR32_HMATRIX_PRAS7_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS7_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS7_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS7_M6PR 24 #define AVR32_HMATRIX_PRAS7_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS7_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS7_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS7_M7PR 28 #define AVR32_HMATRIX_PRAS7_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS7_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS7_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS8 0x000000c0 #define AVR32_HMATRIX_PRAS8_M0PR 0 #define AVR32_HMATRIX_PRAS8_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS8_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS8_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS8_M1PR 4 #define AVR32_HMATRIX_PRAS8_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS8_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS8_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS8_M2PR 8 #define AVR32_HMATRIX_PRAS8_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS8_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS8_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS8_M3PR 12 #define AVR32_HMATRIX_PRAS8_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS8_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS8_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS8_M4PR 16 #define AVR32_HMATRIX_PRAS8_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS8_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS8_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS8_M5PR 20 #define AVR32_HMATRIX_PRAS8_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS8_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS8_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS8_M6PR 24 #define AVR32_HMATRIX_PRAS8_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS8_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS8_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS8_M7PR 28 #define AVR32_HMATRIX_PRAS8_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS8_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS8_M7PR_SIZE 4 #define AVR32_HMATRIX_PRAS9 0x000000c8 #define AVR32_HMATRIX_PRAS9_M0PR 0 #define AVR32_HMATRIX_PRAS9_M0PR_MASK 0x0000000f #define AVR32_HMATRIX_PRAS9_M0PR_OFFSET 0 #define AVR32_HMATRIX_PRAS9_M0PR_SIZE 4 #define AVR32_HMATRIX_PRAS9_M1PR 4 #define AVR32_HMATRIX_PRAS9_M1PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRAS9_M1PR_OFFSET 4 #define AVR32_HMATRIX_PRAS9_M1PR_SIZE 4 #define AVR32_HMATRIX_PRAS9_M2PR 8 #define AVR32_HMATRIX_PRAS9_M2PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRAS9_M2PR_OFFSET 8 #define AVR32_HMATRIX_PRAS9_M2PR_SIZE 4 #define AVR32_HMATRIX_PRAS9_M3PR 12 #define AVR32_HMATRIX_PRAS9_M3PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRAS9_M3PR_OFFSET 12 #define AVR32_HMATRIX_PRAS9_M3PR_SIZE 4 #define AVR32_HMATRIX_PRAS9_M4PR 16 #define AVR32_HMATRIX_PRAS9_M4PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRAS9_M4PR_OFFSET 16 #define AVR32_HMATRIX_PRAS9_M4PR_SIZE 4 #define AVR32_HMATRIX_PRAS9_M5PR 20 #define AVR32_HMATRIX_PRAS9_M5PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRAS9_M5PR_OFFSET 20 #define AVR32_HMATRIX_PRAS9_M5PR_SIZE 4 #define AVR32_HMATRIX_PRAS9_M6PR 24 #define AVR32_HMATRIX_PRAS9_M6PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRAS9_M6PR_OFFSET 24 #define AVR32_HMATRIX_PRAS9_M6PR_SIZE 4 #define AVR32_HMATRIX_PRAS9_M7PR 28 #define AVR32_HMATRIX_PRAS9_M7PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRAS9_M7PR_OFFSET 28 #define AVR32_HMATRIX_PRAS9_M7PR_SIZE 4 #define AVR32_HMATRIX_PRBS0 0x00000084 #define AVR32_HMATRIX_PRBS0_M10PR 8 #define AVR32_HMATRIX_PRBS0_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS0_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS0_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS0_M11PR 12 #define AVR32_HMATRIX_PRBS0_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS0_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS0_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS0_M12PR 16 #define AVR32_HMATRIX_PRBS0_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS0_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS0_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS0_M13PR 20 #define AVR32_HMATRIX_PRBS0_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS0_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS0_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS0_M14PR 24 #define AVR32_HMATRIX_PRBS0_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS0_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS0_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS0_M15PR 28 #define AVR32_HMATRIX_PRBS0_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS0_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS0_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS0_M8PR 0 #define AVR32_HMATRIX_PRBS0_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS0_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS0_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS0_M9PR 4 #define AVR32_HMATRIX_PRBS0_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS0_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS0_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS1 0x0000008c #define AVR32_HMATRIX_PRBS10 0x000000d4 #define AVR32_HMATRIX_PRBS10_M10PR 8 #define AVR32_HMATRIX_PRBS10_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS10_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS10_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS10_M11PR 12 #define AVR32_HMATRIX_PRBS10_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS10_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS10_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS10_M12PR 16 #define AVR32_HMATRIX_PRBS10_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS10_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS10_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS10_M13PR 20 #define AVR32_HMATRIX_PRBS10_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS10_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS10_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS10_M14PR 24 #define AVR32_HMATRIX_PRBS10_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS10_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS10_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS10_M15PR 28 #define AVR32_HMATRIX_PRBS10_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS10_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS10_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS10_M8PR 0 #define AVR32_HMATRIX_PRBS10_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS10_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS10_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS10_M9PR 4 #define AVR32_HMATRIX_PRBS10_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS10_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS10_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS11 0x000000dc #define AVR32_HMATRIX_PRBS11_M10PR 8 #define AVR32_HMATRIX_PRBS11_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS11_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS11_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS11_M11PR 12 #define AVR32_HMATRIX_PRBS11_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS11_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS11_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS11_M12PR 16 #define AVR32_HMATRIX_PRBS11_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS11_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS11_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS11_M13PR 20 #define AVR32_HMATRIX_PRBS11_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS11_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS11_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS11_M14PR 24 #define AVR32_HMATRIX_PRBS11_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS11_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS11_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS11_M15PR 28 #define AVR32_HMATRIX_PRBS11_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS11_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS11_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS11_M8PR 0 #define AVR32_HMATRIX_PRBS11_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS11_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS11_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS11_M9PR 4 #define AVR32_HMATRIX_PRBS11_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS11_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS11_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS12 0x000000e4 #define AVR32_HMATRIX_PRBS12_M10PR 8 #define AVR32_HMATRIX_PRBS12_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS12_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS12_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS12_M11PR 12 #define AVR32_HMATRIX_PRBS12_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS12_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS12_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS12_M12PR 16 #define AVR32_HMATRIX_PRBS12_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS12_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS12_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS12_M13PR 20 #define AVR32_HMATRIX_PRBS12_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS12_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS12_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS12_M14PR 24 #define AVR32_HMATRIX_PRBS12_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS12_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS12_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS12_M15PR 28 #define AVR32_HMATRIX_PRBS12_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS12_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS12_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS12_M8PR 0 #define AVR32_HMATRIX_PRBS12_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS12_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS12_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS12_M9PR 4 #define AVR32_HMATRIX_PRBS12_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS12_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS12_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS13 0x000000ec #define AVR32_HMATRIX_PRBS13_M10PR 8 #define AVR32_HMATRIX_PRBS13_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS13_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS13_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS13_M11PR 12 #define AVR32_HMATRIX_PRBS13_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS13_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS13_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS13_M12PR 16 #define AVR32_HMATRIX_PRBS13_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS13_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS13_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS13_M13PR 20 #define AVR32_HMATRIX_PRBS13_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS13_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS13_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS13_M14PR 24 #define AVR32_HMATRIX_PRBS13_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS13_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS13_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS13_M15PR 28 #define AVR32_HMATRIX_PRBS13_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS13_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS13_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS13_M8PR 0 #define AVR32_HMATRIX_PRBS13_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS13_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS13_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS13_M9PR 4 #define AVR32_HMATRIX_PRBS13_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS13_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS13_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS14 0x000000f4 #define AVR32_HMATRIX_PRBS14_M10PR 8 #define AVR32_HMATRIX_PRBS14_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS14_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS14_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS14_M11PR 12 #define AVR32_HMATRIX_PRBS14_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS14_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS14_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS14_M12PR 16 #define AVR32_HMATRIX_PRBS14_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS14_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS14_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS14_M13PR 20 #define AVR32_HMATRIX_PRBS14_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS14_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS14_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS14_M14PR 24 #define AVR32_HMATRIX_PRBS14_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS14_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS14_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS14_M15PR 28 #define AVR32_HMATRIX_PRBS14_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS14_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS14_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS14_M8PR 0 #define AVR32_HMATRIX_PRBS14_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS14_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS14_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS14_M9PR 4 #define AVR32_HMATRIX_PRBS14_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS14_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS14_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS15 0x000000fc #define AVR32_HMATRIX_PRBS15_M10PR 8 #define AVR32_HMATRIX_PRBS15_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS15_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS15_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS15_M11PR 12 #define AVR32_HMATRIX_PRBS15_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS15_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS15_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS15_M12PR 16 #define AVR32_HMATRIX_PRBS15_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS15_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS15_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS15_M13PR 20 #define AVR32_HMATRIX_PRBS15_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS15_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS15_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS15_M14PR 24 #define AVR32_HMATRIX_PRBS15_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS15_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS15_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS15_M15PR 28 #define AVR32_HMATRIX_PRBS15_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS15_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS15_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS15_M8PR 0 #define AVR32_HMATRIX_PRBS15_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS15_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS15_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS15_M9PR 4 #define AVR32_HMATRIX_PRBS15_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS15_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS15_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS1_M10PR 8 #define AVR32_HMATRIX_PRBS1_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS1_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS1_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS1_M11PR 12 #define AVR32_HMATRIX_PRBS1_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS1_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS1_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS1_M12PR 16 #define AVR32_HMATRIX_PRBS1_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS1_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS1_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS1_M13PR 20 #define AVR32_HMATRIX_PRBS1_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS1_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS1_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS1_M14PR 24 #define AVR32_HMATRIX_PRBS1_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS1_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS1_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS1_M15PR 28 #define AVR32_HMATRIX_PRBS1_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS1_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS1_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS1_M8PR 0 #define AVR32_HMATRIX_PRBS1_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS1_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS1_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS1_M9PR 4 #define AVR32_HMATRIX_PRBS1_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS1_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS1_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS2 0x00000094 #define AVR32_HMATRIX_PRBS2_M10PR 8 #define AVR32_HMATRIX_PRBS2_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS2_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS2_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS2_M11PR 12 #define AVR32_HMATRIX_PRBS2_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS2_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS2_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS2_M12PR 16 #define AVR32_HMATRIX_PRBS2_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS2_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS2_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS2_M13PR 20 #define AVR32_HMATRIX_PRBS2_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS2_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS2_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS2_M14PR 24 #define AVR32_HMATRIX_PRBS2_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS2_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS2_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS2_M15PR 28 #define AVR32_HMATRIX_PRBS2_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS2_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS2_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS2_M8PR 0 #define AVR32_HMATRIX_PRBS2_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS2_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS2_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS2_M9PR 4 #define AVR32_HMATRIX_PRBS2_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS2_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS2_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS3 0x0000009c #define AVR32_HMATRIX_PRBS3_M10PR 8 #define AVR32_HMATRIX_PRBS3_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS3_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS3_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS3_M11PR 12 #define AVR32_HMATRIX_PRBS3_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS3_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS3_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS3_M12PR 16 #define AVR32_HMATRIX_PRBS3_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS3_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS3_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS3_M13PR 20 #define AVR32_HMATRIX_PRBS3_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS3_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS3_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS3_M14PR 24 #define AVR32_HMATRIX_PRBS3_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS3_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS3_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS3_M15PR 28 #define AVR32_HMATRIX_PRBS3_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS3_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS3_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS3_M8PR 0 #define AVR32_HMATRIX_PRBS3_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS3_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS3_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS3_M9PR 4 #define AVR32_HMATRIX_PRBS3_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS3_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS3_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS4 0x000000a4 #define AVR32_HMATRIX_PRBS4_M10PR 8 #define AVR32_HMATRIX_PRBS4_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS4_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS4_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS4_M11PR 12 #define AVR32_HMATRIX_PRBS4_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS4_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS4_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS4_M12PR 16 #define AVR32_HMATRIX_PRBS4_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS4_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS4_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS4_M13PR 20 #define AVR32_HMATRIX_PRBS4_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS4_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS4_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS4_M14PR 24 #define AVR32_HMATRIX_PRBS4_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS4_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS4_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS4_M15PR 28 #define AVR32_HMATRIX_PRBS4_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS4_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS4_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS4_M8PR 0 #define AVR32_HMATRIX_PRBS4_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS4_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS4_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS4_M9PR 4 #define AVR32_HMATRIX_PRBS4_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS4_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS4_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS5 0x000000ac #define AVR32_HMATRIX_PRBS5_M10PR 8 #define AVR32_HMATRIX_PRBS5_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS5_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS5_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS5_M11PR 12 #define AVR32_HMATRIX_PRBS5_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS5_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS5_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS5_M12PR 16 #define AVR32_HMATRIX_PRBS5_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS5_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS5_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS5_M13PR 20 #define AVR32_HMATRIX_PRBS5_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS5_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS5_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS5_M14PR 24 #define AVR32_HMATRIX_PRBS5_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS5_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS5_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS5_M15PR 28 #define AVR32_HMATRIX_PRBS5_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS5_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS5_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS5_M8PR 0 #define AVR32_HMATRIX_PRBS5_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS5_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS5_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS5_M9PR 4 #define AVR32_HMATRIX_PRBS5_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS5_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS5_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS6 0x000000b4 #define AVR32_HMATRIX_PRBS6_M10PR 8 #define AVR32_HMATRIX_PRBS6_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS6_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS6_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS6_M11PR 12 #define AVR32_HMATRIX_PRBS6_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS6_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS6_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS6_M12PR 16 #define AVR32_HMATRIX_PRBS6_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS6_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS6_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS6_M13PR 20 #define AVR32_HMATRIX_PRBS6_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS6_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS6_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS6_M14PR 24 #define AVR32_HMATRIX_PRBS6_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS6_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS6_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS6_M15PR 28 #define AVR32_HMATRIX_PRBS6_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS6_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS6_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS6_M8PR 0 #define AVR32_HMATRIX_PRBS6_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS6_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS6_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS6_M9PR 4 #define AVR32_HMATRIX_PRBS6_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS6_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS6_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS7 0x000000bc #define AVR32_HMATRIX_PRBS7_M10PR 8 #define AVR32_HMATRIX_PRBS7_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS7_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS7_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS7_M11PR 12 #define AVR32_HMATRIX_PRBS7_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS7_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS7_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS7_M12PR 16 #define AVR32_HMATRIX_PRBS7_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS7_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS7_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS7_M13PR 20 #define AVR32_HMATRIX_PRBS7_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS7_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS7_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS7_M14PR 24 #define AVR32_HMATRIX_PRBS7_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS7_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS7_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS7_M15PR 28 #define AVR32_HMATRIX_PRBS7_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS7_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS7_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS7_M8PR 0 #define AVR32_HMATRIX_PRBS7_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS7_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS7_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS7_M9PR 4 #define AVR32_HMATRIX_PRBS7_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS7_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS7_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS8 0x000000c4 #define AVR32_HMATRIX_PRBS8_M10PR 8 #define AVR32_HMATRIX_PRBS8_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS8_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS8_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS8_M11PR 12 #define AVR32_HMATRIX_PRBS8_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS8_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS8_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS8_M12PR 16 #define AVR32_HMATRIX_PRBS8_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS8_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS8_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS8_M13PR 20 #define AVR32_HMATRIX_PRBS8_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS8_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS8_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS8_M14PR 24 #define AVR32_HMATRIX_PRBS8_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS8_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS8_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS8_M15PR 28 #define AVR32_HMATRIX_PRBS8_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS8_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS8_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS8_M8PR 0 #define AVR32_HMATRIX_PRBS8_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS8_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS8_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS8_M9PR 4 #define AVR32_HMATRIX_PRBS8_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS8_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS8_M9PR_SIZE 4 #define AVR32_HMATRIX_PRBS9 0x000000cc #define AVR32_HMATRIX_PRBS9_M10PR 8 #define AVR32_HMATRIX_PRBS9_M10PR_MASK 0x00000f00 #define AVR32_HMATRIX_PRBS9_M10PR_OFFSET 8 #define AVR32_HMATRIX_PRBS9_M10PR_SIZE 4 #define AVR32_HMATRIX_PRBS9_M11PR 12 #define AVR32_HMATRIX_PRBS9_M11PR_MASK 0x0000f000 #define AVR32_HMATRIX_PRBS9_M11PR_OFFSET 12 #define AVR32_HMATRIX_PRBS9_M11PR_SIZE 4 #define AVR32_HMATRIX_PRBS9_M12PR 16 #define AVR32_HMATRIX_PRBS9_M12PR_MASK 0x000f0000 #define AVR32_HMATRIX_PRBS9_M12PR_OFFSET 16 #define AVR32_HMATRIX_PRBS9_M12PR_SIZE 4 #define AVR32_HMATRIX_PRBS9_M13PR 20 #define AVR32_HMATRIX_PRBS9_M13PR_MASK 0x00f00000 #define AVR32_HMATRIX_PRBS9_M13PR_OFFSET 20 #define AVR32_HMATRIX_PRBS9_M13PR_SIZE 4 #define AVR32_HMATRIX_PRBS9_M14PR 24 #define AVR32_HMATRIX_PRBS9_M14PR_MASK 0x0f000000 #define AVR32_HMATRIX_PRBS9_M14PR_OFFSET 24 #define AVR32_HMATRIX_PRBS9_M14PR_SIZE 4 #define AVR32_HMATRIX_PRBS9_M15PR 28 #define AVR32_HMATRIX_PRBS9_M15PR_MASK 0xf0000000 #define AVR32_HMATRIX_PRBS9_M15PR_OFFSET 28 #define AVR32_HMATRIX_PRBS9_M15PR_SIZE 4 #define AVR32_HMATRIX_PRBS9_M8PR 0 #define AVR32_HMATRIX_PRBS9_M8PR_MASK 0x0000000f #define AVR32_HMATRIX_PRBS9_M8PR_OFFSET 0 #define AVR32_HMATRIX_PRBS9_M8PR_SIZE 4 #define AVR32_HMATRIX_PRBS9_M9PR 4 #define AVR32_HMATRIX_PRBS9_M9PR_MASK 0x000000f0 #define AVR32_HMATRIX_PRBS9_M9PR_OFFSET 4 #define AVR32_HMATRIX_PRBS9_M9PR_SIZE 4 #define AVR32_HMATRIX_RCB0 0 #define AVR32_HMATRIX_RCB0_MASK 0x00000001 #define AVR32_HMATRIX_RCB0_OFFSET 0 #define AVR32_HMATRIX_RCB0_SIZE 1 #define AVR32_HMATRIX_RCB1 1 #define AVR32_HMATRIX_RCB10 10 #define AVR32_HMATRIX_RCB10_MASK 0x00000400 #define AVR32_HMATRIX_RCB10_OFFSET 10 #define AVR32_HMATRIX_RCB10_SIZE 1 #define AVR32_HMATRIX_RCB11 11 #define AVR32_HMATRIX_RCB11_MASK 0x00000800 #define AVR32_HMATRIX_RCB11_OFFSET 11 #define AVR32_HMATRIX_RCB11_SIZE 1 #define AVR32_HMATRIX_RCB12 12 #define AVR32_HMATRIX_RCB12_MASK 0x00001000 #define AVR32_HMATRIX_RCB12_OFFSET 12 #define AVR32_HMATRIX_RCB12_SIZE 1 #define AVR32_HMATRIX_RCB13 13 #define AVR32_HMATRIX_RCB13_MASK 0x00002000 #define AVR32_HMATRIX_RCB13_OFFSET 13 #define AVR32_HMATRIX_RCB13_SIZE 1 #define AVR32_HMATRIX_RCB14 14 #define AVR32_HMATRIX_RCB14_MASK 0x00004000 #define AVR32_HMATRIX_RCB14_OFFSET 14 #define AVR32_HMATRIX_RCB14_SIZE 1 #define AVR32_HMATRIX_RCB15 15 #define AVR32_HMATRIX_RCB15_MASK 0x00008000 #define AVR32_HMATRIX_RCB15_OFFSET 15 #define AVR32_HMATRIX_RCB15_SIZE 1 #define AVR32_HMATRIX_RCB1_MASK 0x00000002 #define AVR32_HMATRIX_RCB1_OFFSET 1 #define AVR32_HMATRIX_RCB1_SIZE 1 #define AVR32_HMATRIX_RCB2 2 #define AVR32_HMATRIX_RCB2_MASK 0x00000004 #define AVR32_HMATRIX_RCB2_OFFSET 2 #define AVR32_HMATRIX_RCB2_SIZE 1 #define AVR32_HMATRIX_RCB3 3 #define AVR32_HMATRIX_RCB3_MASK 0x00000008 #define AVR32_HMATRIX_RCB3_OFFSET 3 #define AVR32_HMATRIX_RCB3_SIZE 1 #define AVR32_HMATRIX_RCB4 4 #define AVR32_HMATRIX_RCB4_MASK 0x00000010 #define AVR32_HMATRIX_RCB4_OFFSET 4 #define AVR32_HMATRIX_RCB4_SIZE 1 #define AVR32_HMATRIX_RCB5 5 #define AVR32_HMATRIX_RCB5_MASK 0x00000020 #define AVR32_HMATRIX_RCB5_OFFSET 5 #define AVR32_HMATRIX_RCB5_SIZE 1 #define AVR32_HMATRIX_RCB6 6 #define AVR32_HMATRIX_RCB6_MASK 0x00000040 #define AVR32_HMATRIX_RCB6_OFFSET 6 #define AVR32_HMATRIX_RCB6_SIZE 1 #define AVR32_HMATRIX_RCB7 7 #define AVR32_HMATRIX_RCB7_MASK 0x00000080 #define AVR32_HMATRIX_RCB7_OFFSET 7 #define AVR32_HMATRIX_RCB7_SIZE 1 #define AVR32_HMATRIX_RCB8 8 #define AVR32_HMATRIX_RCB8_MASK 0x00000100 #define AVR32_HMATRIX_RCB8_OFFSET 8 #define AVR32_HMATRIX_RCB8_SIZE 1 #define AVR32_HMATRIX_RCB9 9 #define AVR32_HMATRIX_RCB9_MASK 0x00000200 #define AVR32_HMATRIX_RCB9_OFFSET 9 #define AVR32_HMATRIX_RCB9_SIZE 1 #define AVR32_HMATRIX_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG0 0x00000040 #define AVR32_HMATRIX_SCFG0_ARBT 24 #define AVR32_HMATRIX_SCFG0_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG0_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG0_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG0_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG0_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG0_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG0_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG0_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG0_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG0_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG0_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG0_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG0_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG0_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG0_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG0_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG0_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG0_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG0_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG0_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG1 0x00000044 #define AVR32_HMATRIX_SCFG10 0x00000068 #define AVR32_HMATRIX_SCFG10_ARBT 24 #define AVR32_HMATRIX_SCFG10_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG10_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG10_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG10_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG10_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG10_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG10_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG10_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG10_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG10_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG10_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG10_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG10_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG10_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG10_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG10_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG10_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG10_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG10_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG10_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG11 0x0000006c #define AVR32_HMATRIX_SCFG11_ARBT 24 #define AVR32_HMATRIX_SCFG11_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG11_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG11_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG11_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG11_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG11_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG11_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG11_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG11_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG11_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG11_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG11_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG11_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG11_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG11_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG11_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG11_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG11_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG11_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG11_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG12 0x00000070 #define AVR32_HMATRIX_SCFG12_ARBT 24 #define AVR32_HMATRIX_SCFG12_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG12_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG12_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG12_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG12_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG12_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG12_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG12_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG12_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG12_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG12_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG12_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG12_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG12_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG12_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG12_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG12_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG12_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG12_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG12_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG13 0x00000074 #define AVR32_HMATRIX_SCFG13_ARBT 24 #define AVR32_HMATRIX_SCFG13_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG13_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG13_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG13_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG13_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG13_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG13_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG13_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG13_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG13_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG13_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG13_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG13_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG13_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG13_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG13_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG13_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG13_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG13_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG13_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG14 0x00000078 #define AVR32_HMATRIX_SCFG14_ARBT 24 #define AVR32_HMATRIX_SCFG14_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG14_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG14_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG14_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG14_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG14_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG14_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG14_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG14_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG14_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG14_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG14_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG14_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG14_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG14_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG14_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG14_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG14_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG14_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG14_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG15 0x0000007c #define AVR32_HMATRIX_SCFG15_ARBT 24 #define AVR32_HMATRIX_SCFG15_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG15_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG15_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG15_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG15_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG15_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG15_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG15_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG15_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG15_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG15_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG15_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG15_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG15_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG15_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG15_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG15_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG15_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG15_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG15_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG1_ARBT 24 #define AVR32_HMATRIX_SCFG1_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG1_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG1_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG1_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG1_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG1_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG1_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG1_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG1_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG1_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG1_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG1_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG1_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG1_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG1_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG1_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG1_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG1_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG1_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG1_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG2 0x00000048 #define AVR32_HMATRIX_SCFG2_ARBT 24 #define AVR32_HMATRIX_SCFG2_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG2_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG2_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG2_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG2_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG2_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG2_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG2_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG2_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG2_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG2_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG2_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG2_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG2_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG2_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG2_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG2_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG2_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG2_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG2_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG3 0x0000004c #define AVR32_HMATRIX_SCFG3_ARBT 24 #define AVR32_HMATRIX_SCFG3_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG3_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG3_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG3_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG3_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG3_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG3_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG3_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG3_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG3_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG3_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG3_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG3_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG3_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG3_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG3_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG3_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG3_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG3_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG3_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG4 0x00000050 #define AVR32_HMATRIX_SCFG4_ARBT 24 #define AVR32_HMATRIX_SCFG4_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG4_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG4_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG4_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG4_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG4_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG4_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG4_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG4_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG4_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG4_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG4_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG4_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG4_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG4_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG4_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG4_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG4_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG4_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG4_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG5 0x00000054 #define AVR32_HMATRIX_SCFG5_ARBT 24 #define AVR32_HMATRIX_SCFG5_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG5_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG5_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG5_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG5_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG5_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG5_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG5_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG5_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG5_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG5_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG5_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG5_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG5_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG5_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG5_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG5_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG5_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG5_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG5_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG6 0x00000058 #define AVR32_HMATRIX_SCFG6_ARBT 24 #define AVR32_HMATRIX_SCFG6_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG6_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG6_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG6_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG6_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG6_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG6_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG6_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG6_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG6_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG6_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG6_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG6_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG6_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG6_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG6_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG6_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG6_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG6_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG6_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG7 0x0000005c #define AVR32_HMATRIX_SCFG7_ARBT 24 #define AVR32_HMATRIX_SCFG7_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG7_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG7_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG7_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG7_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG7_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG7_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG7_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG7_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG7_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG7_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG7_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG7_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG7_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG7_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG7_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG7_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG7_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG7_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG7_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG8 0x00000060 #define AVR32_HMATRIX_SCFG8_ARBT 24 #define AVR32_HMATRIX_SCFG8_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG8_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG8_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG8_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG8_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG8_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG8_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG8_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG8_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG8_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG8_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG8_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG8_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG8_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG8_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG8_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG8_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG8_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG8_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG8_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SCFG9 0x00000064 #define AVR32_HMATRIX_SCFG9_ARBT 24 #define AVR32_HMATRIX_SCFG9_ARBT_FIXED_PRIORITY 0x00000001 #define AVR32_HMATRIX_SCFG9_ARBT_MASK 0x01000000 #define AVR32_HMATRIX_SCFG9_ARBT_OFFSET 24 #define AVR32_HMATRIX_SCFG9_ARBT_ROUND_ROBIN 0x00000000 #define AVR32_HMATRIX_SCFG9_ARBT_SIZE 1 #define AVR32_HMATRIX_SCFG9_DEFMSTR_TYPE 16 #define AVR32_HMATRIX_SCFG9_DEFMSTR_TYPE_FIXED_DEFAULT 0x00000002 #define AVR32_HMATRIX_SCFG9_DEFMSTR_TYPE_LAST_DEFAULT 0x00000001 #define AVR32_HMATRIX_SCFG9_DEFMSTR_TYPE_MASK 0x00030000 #define AVR32_HMATRIX_SCFG9_DEFMSTR_TYPE_NO_DEFAULT 0x00000000 #define AVR32_HMATRIX_SCFG9_DEFMSTR_TYPE_OFFSET 16 #define AVR32_HMATRIX_SCFG9_DEFMSTR_TYPE_SIZE 2 #define AVR32_HMATRIX_SCFG9_FIXED_DEFMSTR 18 #define AVR32_HMATRIX_SCFG9_FIXED_DEFMSTR_MASK 0x003c0000 #define AVR32_HMATRIX_SCFG9_FIXED_DEFMSTR_OFFSET 18 #define AVR32_HMATRIX_SCFG9_FIXED_DEFMSTR_SIZE 4 #define AVR32_HMATRIX_SCFG9_SLOT_CYCLE 0 #define AVR32_HMATRIX_SCFG9_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SCFG9_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SCFG9_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_SFR 0 #define AVR32_HMATRIX_SFR0 0x00000110 #define AVR32_HMATRIX_SFR0_SFR 0 #define AVR32_HMATRIX_SFR0_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR0_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR0_SFR_SIZE 32 #define AVR32_HMATRIX_SFR1 0x00000114 #define AVR32_HMATRIX_SFR10 0x00000138 #define AVR32_HMATRIX_SFR10_SFR 0 #define AVR32_HMATRIX_SFR10_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR10_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR10_SFR_SIZE 32 #define AVR32_HMATRIX_SFR11 0x0000013c #define AVR32_HMATRIX_SFR11_SFR 0 #define AVR32_HMATRIX_SFR11_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR11_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR11_SFR_SIZE 32 #define AVR32_HMATRIX_SFR12 0x00000140 #define AVR32_HMATRIX_SFR12_SFR 0 #define AVR32_HMATRIX_SFR12_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR12_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR12_SFR_SIZE 32 #define AVR32_HMATRIX_SFR13 0x00000144 #define AVR32_HMATRIX_SFR13_SFR 0 #define AVR32_HMATRIX_SFR13_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR13_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR13_SFR_SIZE 32 #define AVR32_HMATRIX_SFR14 0x00000148 #define AVR32_HMATRIX_SFR14_SFR 0 #define AVR32_HMATRIX_SFR14_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR14_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR14_SFR_SIZE 32 #define AVR32_HMATRIX_SFR15 0x0000014c #define AVR32_HMATRIX_SFR15_SFR 0 #define AVR32_HMATRIX_SFR15_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR15_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR15_SFR_SIZE 32 #define AVR32_HMATRIX_SFR1_SFR 0 #define AVR32_HMATRIX_SFR1_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR1_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR1_SFR_SIZE 32 #define AVR32_HMATRIX_SFR2 0x00000118 #define AVR32_HMATRIX_SFR2_SFR 0 #define AVR32_HMATRIX_SFR2_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR2_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR2_SFR_SIZE 32 #define AVR32_HMATRIX_SFR3 0x0000011c #define AVR32_HMATRIX_SFR3_SFR 0 #define AVR32_HMATRIX_SFR3_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR3_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR3_SFR_SIZE 32 #define AVR32_HMATRIX_SFR4 0x00000120 #define AVR32_HMATRIX_SFR4_SFR 0 #define AVR32_HMATRIX_SFR4_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR4_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR4_SFR_SIZE 32 #define AVR32_HMATRIX_SFR5 0x00000124 #define AVR32_HMATRIX_SFR5_SFR 0 #define AVR32_HMATRIX_SFR5_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR5_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR5_SFR_SIZE 32 #define AVR32_HMATRIX_SFR6 0x00000128 #define AVR32_HMATRIX_SFR6_SFR 0 #define AVR32_HMATRIX_SFR6_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR6_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR6_SFR_SIZE 32 #define AVR32_HMATRIX_SFR7 0x0000012c #define AVR32_HMATRIX_SFR7_SFR 0 #define AVR32_HMATRIX_SFR7_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR7_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR7_SFR_SIZE 32 #define AVR32_HMATRIX_SFR8 0x00000130 #define AVR32_HMATRIX_SFR8_SFR 0 #define AVR32_HMATRIX_SFR8_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR8_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR8_SFR_SIZE 32 #define AVR32_HMATRIX_SFR9 0x00000134 #define AVR32_HMATRIX_SFR9_SFR 0 #define AVR32_HMATRIX_SFR9_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR9_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR9_SFR_SIZE 32 #define AVR32_HMATRIX_SFR_MASK 0xffffffff #define AVR32_HMATRIX_SFR_OFFSET 0 #define AVR32_HMATRIX_SFR_SIZE 32 #define AVR32_HMATRIX_SINGLE 0x00000001 #define AVR32_HMATRIX_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_SLOT_CYCLE 0 #define AVR32_HMATRIX_SLOT_CYCLE_MASK 0x000000ff #define AVR32_HMATRIX_SLOT_CYCLE_OFFSET 0 #define AVR32_HMATRIX_SLOT_CYCLE_SIZE 8 #define AVR32_HMATRIX_ULBT 0 #define AVR32_HMATRIX_ULBT_EIGHT_BEAT 0x00000003 #define AVR32_HMATRIX_ULBT_FOUR_BEAT 0x00000002 #define AVR32_HMATRIX_ULBT_INFINITE 0x00000000 #define AVR32_HMATRIX_ULBT_MASK 0x00000007 #define AVR32_HMATRIX_ULBT_OFFSET 0 #define AVR32_HMATRIX_ULBT_SINGLE 0x00000001 #define AVR32_HMATRIX_ULBT_SIXTEEN_BEAT 0x00000004 #define AVR32_HMATRIX_ULBT_SIZE 3 #define AVR32_HMATRIX_VARIANT 16 #define AVR32_HMATRIX_VARIANT_MASK 0x00070000 #define AVR32_HMATRIX_VARIANT_OFFSET 16 #define AVR32_HMATRIX_VARIANT_SIZE 3 #define AVR32_HMATRIX_VERSION 0x000001fc #define AVR32_HMATRIX_VERSION_MASK 0x00000fff #define AVR32_HMATRIX_VERSION_OFFSET 0 #define AVR32_HMATRIX_VERSION_SIZE 12 #define AVR32_HMATRIX_VERSION_VARIANT 16 #define AVR32_HMATRIX_VERSION_VARIANT_MASK 0x00070000 #define AVR32_HMATRIX_VERSION_VARIANT_OFFSET 16 #define AVR32_HMATRIX_VERSION_VARIANT_SIZE 3 #define AVR32_HMATRIX_VERSION_VERSION 0 #define AVR32_HMATRIX_VERSION_VERSION_MASK 0x00000fff #define AVR32_HMATRIX_VERSION_VERSION_OFFSET 0 #define AVR32_HMATRIX_VERSION_VERSION_SIZE 12 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_hmatrix_mcfg_t { unsigned int :29; unsigned int ulbt : 3; } avr32_hmatrix_mcfg_t; typedef struct avr32_hmatrix_scfg_t { unsigned int : 7; unsigned int arbt : 1; unsigned int : 2; unsigned int fixed_defmstr : 4; unsigned int defmstr_type : 2; unsigned int : 8; unsigned int slot_cycle : 8; } avr32_hmatrix_scfg_t; typedef struct avr32_hmatrix_pras_t { unsigned int m7pr : 4; unsigned int m6pr : 4; unsigned int m5pr : 4; unsigned int m4pr : 4; unsigned int m3pr : 4; unsigned int m2pr : 4; unsigned int m1pr : 4; unsigned int m0pr : 4; } avr32_hmatrix_pras_t; typedef struct avr32_hmatrix_prbs_t { unsigned int m15pr : 4; unsigned int m14pr : 4; unsigned int m13pr : 4; unsigned int m12pr : 4; unsigned int m11pr : 4; unsigned int m10pr : 4; unsigned int m9pr : 4; unsigned int m8pr : 4; } avr32_hmatrix_prbs_t; typedef struct avr32_hmatrix_mrcr_t { unsigned int :16; unsigned int rcb15 : 1; unsigned int rcb14 : 1; unsigned int rcb13 : 1; unsigned int rcb12 : 1; unsigned int rcb11 : 1; unsigned int rcb10 : 1; unsigned int rcb9 : 1; unsigned int rcb8 : 1; unsigned int rcb7 : 1; unsigned int rcb6 : 1; unsigned int rcb5 : 1; unsigned int rcb4 : 1; unsigned int rcb3 : 1; unsigned int rcb2 : 1; unsigned int rcb1 : 1; unsigned int rcb0 : 1; } avr32_hmatrix_mrcr_t; typedef struct avr32_hmatrix_version_t { unsigned int :13; unsigned int variant : 3; unsigned int : 4; unsigned int version :12; } avr32_hmatrix_version_t; typedef struct avr32_hmatrix_prs_t { union { unsigned long pras ;//0x0000 avr32_hmatrix_pras_t PRAS ; }; union { unsigned long prbs ;//0x0004 avr32_hmatrix_prbs_t PRBS ; }; } avr32_hmatrix_prs_t; typedef struct avr32_hmatrix_t { union { unsigned long mcfg [16];//0x0000 avr32_hmatrix_mcfg_t MCFG [16]; }; union { unsigned long scfg [16];//0x0040 avr32_hmatrix_scfg_t SCFG [16]; }; avr32_hmatrix_prs_t prs[16];//0x80 union { unsigned long mrcr ;//0x0100 avr32_hmatrix_mrcr_t MRCR ; }; unsigned int :32 ;//0x0104 unsigned int :32 ;//0x0108 unsigned int :32 ;//0x010c unsigned long sfr [16];//0x0110 unsigned int :32 ;//0x0150 unsigned int :32 ;//0x0154 unsigned int :32 ;//0x0158 unsigned int :32 ;//0x015c unsigned int :32 ;//0x0160 unsigned int :32 ;//0x0164 unsigned int :32 ;//0x0168 unsigned int :32 ;//0x016c unsigned int :32 ;//0x0170 unsigned int :32 ;//0x0174 unsigned int :32 ;//0x0178 unsigned int :32 ;//0x017c unsigned int :32 ;//0x0180 unsigned int :32 ;//0x0184 unsigned int :32 ;//0x0188 unsigned int :32 ;//0x018c unsigned int :32 ;//0x0190 unsigned int :32 ;//0x0194 unsigned int :32 ;//0x0198 unsigned int :32 ;//0x019c unsigned int :32 ;//0x01a0 unsigned int :32 ;//0x01a4 unsigned int :32 ;//0x01a8 unsigned int :32 ;//0x01ac unsigned int :32 ;//0x01b0 unsigned int :32 ;//0x01b4 unsigned int :32 ;//0x01b8 unsigned int :32 ;//0x01bc unsigned int :32 ;//0x01c0 unsigned int :32 ;//0x01c4 unsigned int :32 ;//0x01c8 unsigned int :32 ;//0x01cc unsigned int :32 ;//0x01d0 unsigned int :32 ;//0x01d4 unsigned int :32 ;//0x01d8 unsigned int :32 ;//0x01dc unsigned int :32 ;//0x01e0 unsigned int :32 ;//0x01e4 unsigned int :32 ;//0x01e8 unsigned int :32 ;//0x01ec unsigned int :32 ;//0x01f0 unsigned int :32 ;//0x01f4 unsigned int :32 ;//0x01f8 union { const unsigned long version ;//0x01fc const avr32_hmatrix_version_t VERSION ; }; } avr32_hmatrix_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif /*#ifdef AVR32_HMATRIX_230_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/intc_101.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 : AP7200 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_INTC_101_H_INCLUDED #define AVR32_INTC_101_H_INCLUDED #define AVR32_INTC_H_VERSION 101 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_INTC_ - Bitfield mask: AVR32_INTC__ - Bitfield offset: AVR32_INTC___OFFSET - Bitfield size: AVR32_INTC___SIZE - Bitfield values: AVR32_INTC___ 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_INTC_ - Bitfield offset: AVR32_INTC__OFFSET - Bitfield size: AVR32_INTC__SIZE - Bitfield values: AVR32_INTC__ - Bitfield values: AVR32_INTC_ All defines are sorted alphabetically. */ #define AVR32_INTC_AUTOVECTOR 0 #define AVR32_INTC_AUTOVECTOR_MASK 0x00003fff #define AVR32_INTC_AUTOVECTOR_OFFSET 0 #define AVR32_INTC_AUTOVECTOR_SIZE 14 #define AVR32_INTC_CAUSE 0 #define AVR32_INTC_CAUSE_MASK 0x0000003f #define AVR32_INTC_CAUSE_OFFSET 0 #define AVR32_INTC_CAUSE_SIZE 6 #define AVR32_INTC_ICR 0x00000200 #define AVR32_INTC_ICR_CAUSE 0 #define AVR32_INTC_ICR_CAUSE_MASK 0x0000003f #define AVR32_INTC_ICR_CAUSE_OFFSET 0 #define AVR32_INTC_ICR_CAUSE_SIZE 6 #define AVR32_INTC_INT0 0x00000000 #define AVR32_INTC_INT1 0x00000001 #define AVR32_INTC_INT2 0x00000002 #define AVR32_INTC_INT3 0x00000003 #define AVR32_INTC_INTLEVEL 30 #define AVR32_INTC_INTLEVEL_INT0 0x00000000 #define AVR32_INTC_INTLEVEL_INT1 0x00000001 #define AVR32_INTC_INTLEVEL_INT2 0x00000002 #define AVR32_INTC_INTLEVEL_INT3 0x00000003 #define AVR32_INTC_INTLEVEL_MASK 0xc0000000 #define AVR32_INTC_INTLEVEL_OFFSET 30 #define AVR32_INTC_INTLEVEL_SIZE 2 #define AVR32_INTC_IPR 0x00000000 #define AVR32_INTC_IPR_AUTOVECTOR 0 #define AVR32_INTC_IPR_AUTOVECTOR_MASK 0x00003fff #define AVR32_INTC_IPR_AUTOVECTOR_OFFSET 0 #define AVR32_INTC_IPR_AUTOVECTOR_SIZE 14 #define AVR32_INTC_IPR_INTLEVEL 30 #define AVR32_INTC_IPR_INTLEVEL_INT0 0x00000000 #define AVR32_INTC_IPR_INTLEVEL_INT1 0x00000001 #define AVR32_INTC_IPR_INTLEVEL_INT2 0x00000002 #define AVR32_INTC_IPR_INTLEVEL_INT3 0x00000003 #define AVR32_INTC_IPR_INTLEVEL_MASK 0xc0000000 #define AVR32_INTC_IPR_INTLEVEL_OFFSET 30 #define AVR32_INTC_IPR_INTLEVEL_SIZE 2 #define AVR32_INTC_IRR 0x00000100 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_intc_ipr_t { unsigned int intlevel : 2; unsigned int :16; unsigned int autovector :14; } avr32_intc_ipr_t; typedef struct avr32_intc_icr_t { unsigned int :26; unsigned int cause : 6; } avr32_intc_icr_t; typedef struct avr32_intc_t { union { unsigned long ipr [AVR32_INTC_NUM_INT_GRPS];//0x0000 avr32_intc_ipr_t IPR [AVR32_INTC_NUM_INT_GRPS]; }; union { unsigned long ipr_reserved[64 - AVR32_INTC_NUM_INT_GRPS];//Padding avr32_intc_ipr_t IPR_RESERVED[64 - AVR32_INTC_NUM_INT_GRPS]; }; const unsigned long irr [AVR32_INTC_NUM_INT_GRPS];//0x0100 const unsigned long irr_reserved[64 - AVR32_INTC_NUM_INT_GRPS];//Padding union { const unsigned long icr [4];//0x0200 const avr32_intc_icr_t ICR [4]; }; } avr32_intc_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif #if !defined (DEPRECATED_DISABLE) #define AVR32_INTC_ICR_CAUSEGRP 0 #define AVR32_INTC_ICR_CAUSEGRP_MASK 0x0000003f #define AVR32_INTC_ICR_CAUSEGRP_OFFSET 0 #define AVR32_INTC_ICR_CAUSEGRP_SIZE 6 #define AVR32_INTC_INTLEV 30 #define AVR32_INTC_INTLEV_INT0 0x00000000 #define AVR32_INTC_INTLEV_INT1 0x00000001 #define AVR32_INTC_INTLEV_INT2 0x00000002 #define AVR32_INTC_INTLEV_INT3 0x00000003 #define AVR32_INTC_INTLEV_MASK 0xc0000000 #define AVR32_INTC_INTLEV_OFFSET 30 #define AVR32_INTC_INTLEV_SIZE 2 #define AVR32_INTC_IPR_INTLEV 30 #define AVR32_INTC_IPR_INTLEV_INT0 0x00000000 #define AVR32_INTC_IPR_INTLEV_INT1 0x00000001 #define AVR32_INTC_IPR_INTLEV_INT2 0x00000002 #define AVR32_INTC_IPR_INTLEV_INT3 0x00000003 #define AVR32_INTC_IPR_INTLEV_MASK 0xc0000000 #define AVR32_INTC_IPR_INTLEV_OFFSET 30 #define AVR32_INTC_IPR_INTLEV_SIZE 2 #define AVR32_INTC_IPR_OFFSET 0 #define AVR32_INTC_IPR_OFFSET_MASK 0x00003fff #define AVR32_INTC_IPR_OFFSET_OFFSET 0 #define AVR32_INTC_IPR_OFFSET_SIZE 14 #define AVR32_INTC_OFFSET 0 #define AVR32_INTC_OFFSET_MASK 0x00003fff #define AVR32_INTC_OFFSET_OFFSET 0 #define AVR32_INTC_OFFSET_SIZE 14 #endif /*#ifdef AVR32_INTC_101_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/io.h ================================================ #ifdef __AVR32_UC3B0256__ #include "uc3b0256.h" #endif #ifdef __AVR32_UC3B0512__ #include "uc3b0512.h" #endif ================================================ FILE: firmware/mock_hardware/include/avr32/ocd_s0_130.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 : UC3000 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_OCD_S0_130_H_INCLUDED #define AVR32_OCD_S0_130_H_INCLUDED #define AVR32_OCD_S0_H_VERSION 130 #include "avr32/abi.h" #define AVR32_OCD_ID "S0" #define AVR32_AXC 0x00000130 #define AVR32_AXC_AXE 8 #define AVR32_AXC_AXE_MASK 0x00000100 #define AVR32_AXC_AXE_OFFSET 8 #define AVR32_AXC_AXE_SIZE 1 #define AVR32_AXC_AXO 9 #define AVR32_AXC_AXO_MASK 0x00000200 #define AVR32_AXC_AXO_OFFSET 9 #define AVR32_AXC_AXO_SIZE 1 #define AVR32_AXC_AXS 14 #define AVR32_AXC_AXS_MASK 0x0000c000 #define AVR32_AXC_AXS_OFFSET 14 #define AVR32_AXC_AXS_SIZE 2 #define AVR32_AXC_DDR 10 #define AVR32_AXC_DDR_MASK 0x00000400 #define AVR32_AXC_DDR_OFFSET 10 #define AVR32_AXC_DDR_SIZE 1 #define AVR32_AXC_DIV 0 #define AVR32_AXC_DIV_MASK 0x0000000f #define AVR32_AXC_DIV_OFFSET 0 #define AVR32_AXC_DIV_SIZE 4 #define AVR32_AXC_LS 11 #define AVR32_AXC_LS_MASK 0x00000800 #define AVR32_AXC_LS_OFFSET 11 #define AVR32_AXC_LS_SIZE 1 #define AVR32_BWA0A 0x00000078 #define AVR32_BWA0A_BWA 0 #define AVR32_BWA0A_BWA_MASK 0xffffffff #define AVR32_BWA0A_BWA_OFFSET 0 #define AVR32_BWA0A_BWA_SIZE 32 #define AVR32_BWA0B 0x0000007c #define AVR32_BWA0B_BWA 0 #define AVR32_BWA0B_BWA_MASK 0xffffffff #define AVR32_BWA0B_BWA_OFFSET 0 #define AVR32_BWA0B_BWA_SIZE 32 #define AVR32_BWA1A 0x00000080 #define AVR32_BWA1A_BWA 0 #define AVR32_BWA1A_BWA_MASK 0xffffffff #define AVR32_BWA1A_BWA_OFFSET 0 #define AVR32_BWA1A_BWA_SIZE 32 #define AVR32_BWA1B 0x00000084 #define AVR32_BWA1B_BWA 0 #define AVR32_BWA1B_BWA_MASK 0xffffffff #define AVR32_BWA1B_BWA_OFFSET 0 #define AVR32_BWA1B_BWA_SIZE 32 #define AVR32_BWA2A 0x00000088 #define AVR32_BWA2A_BWA 0 #define AVR32_BWA2A_BWA_MASK 0xffffffff #define AVR32_BWA2A_BWA_OFFSET 0 #define AVR32_BWA2A_BWA_SIZE 32 #define AVR32_BWA2B 0x0000008c #define AVR32_BWA2B_BWA 0 #define AVR32_BWA2B_BWA_MASK 0xffffffff #define AVR32_BWA2B_BWA_OFFSET 0 #define AVR32_BWA2B_BWA_SIZE 32 #define AVR32_BWA3A 0x00000090 #define AVR32_BWA3A_BWA 0 #define AVR32_BWA3A_BWA_MASK 0xffffffff #define AVR32_BWA3A_BWA_OFFSET 0 #define AVR32_BWA3A_BWA_SIZE 32 #define AVR32_BWA3B 0x00000094 #define AVR32_BWA3B_BWA 0 #define AVR32_BWA3B_BWA_MASK 0xffffffff #define AVR32_BWA3B_BWA_OFFSET 0 #define AVR32_BWA3B_BWA_SIZE 32 #define AVR32_BWC0A 0x00000058 #define AVR32_BWC0A_AME 25 #define AVR32_BWC0A_AME_MASK 0x02000000 #define AVR32_BWC0A_AME_OFFSET 25 #define AVR32_BWC0A_AME_SIZE 1 #define AVR32_BWC0A_BWE 30 #define AVR32_BWC0A_BWE_BREAKPOINT_ENABLED 0x00000001 #define AVR32_BWC0A_BWE_DISABLED 0x00000000 #define AVR32_BWC0A_BWE_MASK 0xc0000000 #define AVR32_BWC0A_BWE_OFFSET 30 #define AVR32_BWC0A_BWE_SIZE 2 #define AVR32_BWC0A_BWE_WATCHPOINT_ENABLED 0x00000003 #define AVR32_BWC0A_EOC 14 #define AVR32_BWC0A_EOC_MASK 0x00004000 #define AVR32_BWC0A_EOC_OFFSET 14 #define AVR32_BWC0A_EOC_SIZE 1 #define AVR32_BWC0B 0x0000005c #define AVR32_BWC0B_BWE 30 #define AVR32_BWC0B_BWE_BREAKPOINT_ENABLED 0x00000001 #define AVR32_BWC0B_BWE_DISABLED 0x00000000 #define AVR32_BWC0B_BWE_MASK 0xc0000000 #define AVR32_BWC0B_BWE_OFFSET 30 #define AVR32_BWC0B_BWE_SIZE 2 #define AVR32_BWC0B_BWE_WATCHPOINT_ENABLED 0x00000003 #define AVR32_BWC0B_EOC 14 #define AVR32_BWC0B_EOC_MASK 0x00004000 #define AVR32_BWC0B_EOC_OFFSET 14 #define AVR32_BWC0B_EOC_SIZE 1 #define AVR32_BWC1A 0x00000060 #define AVR32_BWC1A_AME 25 #define AVR32_BWC1A_AME_MASK 0x02000000 #define AVR32_BWC1A_AME_OFFSET 25 #define AVR32_BWC1A_AME_SIZE 1 #define AVR32_BWC1A_BWE 30 #define AVR32_BWC1A_BWE_BREAKPOINT_ENABLED 0x00000001 #define AVR32_BWC1A_BWE_DISABLED 0x00000000 #define AVR32_BWC1A_BWE_MASK 0xc0000000 #define AVR32_BWC1A_BWE_OFFSET 30 #define AVR32_BWC1A_BWE_SIZE 2 #define AVR32_BWC1A_BWE_WATCHPOINT_ENABLED 0x00000003 #define AVR32_BWC1A_EOC 14 #define AVR32_BWC1A_EOC_MASK 0x00004000 #define AVR32_BWC1A_EOC_OFFSET 14 #define AVR32_BWC1A_EOC_SIZE 1 #define AVR32_BWC1B 0x00000064 #define AVR32_BWC1B_BWE 30 #define AVR32_BWC1B_BWE_BREAKPOINT_ENABLED 0x00000001 #define AVR32_BWC1B_BWE_DISABLED 0x00000000 #define AVR32_BWC1B_BWE_MASK 0xc0000000 #define AVR32_BWC1B_BWE_OFFSET 30 #define AVR32_BWC1B_BWE_SIZE 2 #define AVR32_BWC1B_BWE_WATCHPOINT_ENABLED 0x00000003 #define AVR32_BWC1B_EOC 14 #define AVR32_BWC1B_EOC_MASK 0x00004000 #define AVR32_BWC1B_EOC_OFFSET 14 #define AVR32_BWC1B_EOC_SIZE 1 #define AVR32_BWC2A 0x00000068 #define AVR32_BWC2A_AME 25 #define AVR32_BWC2A_AME_MASK 0x02000000 #define AVR32_BWC2A_AME_OFFSET 25 #define AVR32_BWC2A_AME_SIZE 1 #define AVR32_BWC2A_BWE 30 #define AVR32_BWC2A_BWE_BREAKPOINT_ENABLED 0x00000001 #define AVR32_BWC2A_BWE_DISABLED 0x00000000 #define AVR32_BWC2A_BWE_MASK 0xc0000000 #define AVR32_BWC2A_BWE_OFFSET 30 #define AVR32_BWC2A_BWE_SIZE 2 #define AVR32_BWC2A_BWE_WATCHPOINT_ENABLED 0x00000003 #define AVR32_BWC2A_EOC 14 #define AVR32_BWC2A_EOC_MASK 0x00004000 #define AVR32_BWC2A_EOC_OFFSET 14 #define AVR32_BWC2A_EOC_SIZE 1 #define AVR32_BWC2B 0x0000006c #define AVR32_BWC2B_BWE 30 #define AVR32_BWC2B_BWE_BREAKPOINT_ENABLED 0x00000001 #define AVR32_BWC2B_BWE_DISABLED 0x00000000 #define AVR32_BWC2B_BWE_MASK 0xc0000000 #define AVR32_BWC2B_BWE_OFFSET 30 #define AVR32_BWC2B_BWE_SIZE 2 #define AVR32_BWC2B_BWE_WATCHPOINT_ENABLED 0x00000003 #define AVR32_BWC2B_EOC 14 #define AVR32_BWC2B_EOC_MASK 0x00004000 #define AVR32_BWC2B_EOC_OFFSET 14 #define AVR32_BWC2B_EOC_SIZE 1 #define AVR32_BWC3A 0x00000070 #define AVR32_BWC3A_BME 20 #define AVR32_BWC3A_BME_MASK 0x00f00000 #define AVR32_BWC3A_BME_OFFSET 20 #define AVR32_BWC3A_BME_SIZE 4 #define AVR32_BWC3A_BRW 28 #define AVR32_BWC3A_BRW_ANY_ACCESS_BREAK 0x00000002 #define AVR32_BWC3A_BRW_MASK 0x30000000 #define AVR32_BWC3A_BRW_OFFSET 28 #define AVR32_BWC3A_BRW_READ_BREAK 0x00000000 #define AVR32_BWC3A_BRW_SIZE 2 #define AVR32_BWC3A_BRW_WRITE_BREAK 0x00000001 #define AVR32_BWC3A_BWE 30 #define AVR32_BWC3A_BWE_BREAKPOINT_ENABLED 0x00000001 #define AVR32_BWC3A_BWE_DISABLED 0x00000000 #define AVR32_BWC3A_BWE_MASK 0xc0000000 #define AVR32_BWC3A_BWE_OFFSET 30 #define AVR32_BWC3A_BWE_SIZE 2 #define AVR32_BWC3A_BWE_WATCHPOINT_ENABLED 0x00000003 #define AVR32_BWC3A_BWO 16 #define AVR32_BWC3A_BWO_BWA 0x00000002 #define AVR32_BWC3A_BWO_BWD 0x00000001 #define AVR32_BWC3A_BWO_MASK 0x00030000 #define AVR32_BWC3A_BWO_OFFSET 16 #define AVR32_BWC3A_BWO_SIZE 2 #define AVR32_BWC3A_EOC 14 #define AVR32_BWC3A_EOC_MASK 0x00004000 #define AVR32_BWC3A_EOC_OFFSET 14 #define AVR32_BWC3A_EOC_SIZE 1 #define AVR32_BWC3A_SIZE 9 #define AVR32_BWC3A_SIZE_BYTE_ACCESS 0x00000004 #define AVR32_BWC3A_SIZE_DISREGARD 0x00000000 #define AVR32_BWC3A_SIZE_HALFWORD_ACCESS 0x00000005 #define AVR32_BWC3A_SIZE_MASK 0x00000e00 #define AVR32_BWC3A_SIZE_OFFSET 9 #define AVR32_BWC3A_SIZE_SIZE 3 #define AVR32_BWC3A_SIZE_WORD_ACCESS 0x00000006 #define AVR32_BWC3B 0x00000074 #define AVR32_BWC3B_BME 20 #define AVR32_BWC3B_BME_MASK 0x00f00000 #define AVR32_BWC3B_BME_OFFSET 20 #define AVR32_BWC3B_BME_SIZE 4 #define AVR32_BWC3B_BRW 28 #define AVR32_BWC3B_BRW_ANY_ACCESS_BREAK 0x00000002 #define AVR32_BWC3B_BRW_MASK 0x30000000 #define AVR32_BWC3B_BRW_OFFSET 28 #define AVR32_BWC3B_BRW_READ_BREAK 0x00000000 #define AVR32_BWC3B_BRW_SIZE 2 #define AVR32_BWC3B_BRW_WRITE_BREAK 0x00000001 #define AVR32_BWC3B_BWE 30 #define AVR32_BWC3B_BWE_BREAKPOINT_ENABLED 0x00000001 #define AVR32_BWC3B_BWE_DISABLED 0x00000000 #define AVR32_BWC3B_BWE_MASK 0xc0000000 #define AVR32_BWC3B_BWE_OFFSET 30 #define AVR32_BWC3B_BWE_SIZE 2 #define AVR32_BWC3B_BWE_WATCHPOINT_ENABLED 0x00000003 #define AVR32_BWC3B_BWO 16 #define AVR32_BWC3B_BWO_BWA 0x00000002 #define AVR32_BWC3B_BWO_BWD 0x00000001 #define AVR32_BWC3B_BWO_MASK 0x00030000 #define AVR32_BWC3B_BWO_OFFSET 16 #define AVR32_BWC3B_BWO_SIZE 2 #define AVR32_BWC3B_EOC 14 #define AVR32_BWC3B_EOC_MASK 0x00004000 #define AVR32_BWC3B_EOC_OFFSET 14 #define AVR32_BWC3B_EOC_SIZE 1 #define AVR32_BWC3B_SIZE 9 #define AVR32_BWC3B_SIZE_BYTE_ACCESS 0x00000004 #define AVR32_BWC3B_SIZE_DISREGARD 0x00000000 #define AVR32_BWC3B_SIZE_HALFWORD_ACCESS 0x00000005 #define AVR32_BWC3B_SIZE_MASK 0x00000e00 #define AVR32_BWC3B_SIZE_OFFSET 9 #define AVR32_BWC3B_SIZE_SIZE 3 #define AVR32_BWC3B_SIZE_WORD_ACCESS 0x00000006 #define AVR32_BWD3A 0x00000098 #define AVR32_BWD3A_BWD 0 #define AVR32_BWD3A_BWD_MASK 0xffffffff #define AVR32_BWD3A_BWD_OFFSET 0 #define AVR32_BWD3A_BWD_SIZE 32 #define AVR32_BWD3B 0x0000009c #define AVR32_BWD3B_BWD 0 #define AVR32_BWD3B_BWD_MASK 0xffffffff #define AVR32_BWD3B_BWD_OFFSET 0 #define AVR32_BWD3B_BWD_SIZE 32 #define AVR32_DC 0x00000008 #define AVR32_DCCPU 0x00000110 #define AVR32_DCCPU_DATA 0 #define AVR32_DCCPU_DATA_MASK 0xffffffff #define AVR32_DCCPU_DATA_OFFSET 0 #define AVR32_DCCPU_DATA_SIZE 32 #define AVR32_DCEMU 0x00000114 #define AVR32_DCEMU_DATA 0 #define AVR32_DCEMU_DATA_MASK 0xffffffff #define AVR32_DCEMU_DATA_OFFSET 0 #define AVR32_DCEMU_DATA_SIZE 32 #define AVR32_DCSR 0x00000118 #define AVR32_DCSR_CPUD 0 #define AVR32_DCSR_CPUD_MASK 0x00000001 #define AVR32_DCSR_CPUD_OFFSET 0 #define AVR32_DCSR_CPUD_SIZE 1 #define AVR32_DCSR_EMUD 1 #define AVR32_DCSR_EMUD_MASK 0x00000002 #define AVR32_DCSR_EMUD_OFFSET 1 #define AVR32_DCSR_EMUD_SIZE 1 #define AVR32_DC_ABORT 31 #define AVR32_DC_ABORT_MASK 0x80000000 #define AVR32_DC_ABORT_OFFSET 31 #define AVR32_DC_ABORT_SIZE 1 #define AVR32_DC_DBE 13 #define AVR32_DC_DBE_MASK 0x00002000 #define AVR32_DC_DBE_OFFSET 13 #define AVR32_DC_DBE_SIZE 1 #define AVR32_DC_DBR 12 #define AVR32_DC_DBR_MASK 0x00001000 #define AVR32_DC_DBR_OFFSET 12 #define AVR32_DC_DBR_SIZE 1 #define AVR32_DC_EIC 3 #define AVR32_DC_EIC_BREAKPOINT 0x00000001 #define AVR32_DC_EIC_MASK 0x00000018 #define AVR32_DC_EIC_NOP 0x00000002 #define AVR32_DC_EIC_OFFSET 3 #define AVR32_DC_EIC_PROGRAM_AND_DATA_TRACE 0x00000000 #define AVR32_DC_EIC_SIZE 2 #define AVR32_DC_EOS 20 #define AVR32_DC_EOS_BREAKPOINT_WATCHPOINT 0x00000002 #define AVR32_DC_EOS_DEBUG_MODE 0x00000001 #define AVR32_DC_EOS_MASK 0x00300000 #define AVR32_DC_EOS_NOP 0x00000000 #define AVR32_DC_EOS_OFFSET 20 #define AVR32_DC_EOS_SIZE 2 #define AVR32_DC_EOS_TXQ 0x00000003 #define AVR32_DC_IFM 24 #define AVR32_DC_IFM_MASK 0x01000000 #define AVR32_DC_IFM_OFFSET 24 #define AVR32_DC_IFM_SIZE 1 #define AVR32_DC_IRP 23 #define AVR32_DC_IRP_MASK 0x00800000 #define AVR32_DC_IRP_OFFSET 23 #define AVR32_DC_IRP_SIZE 1 #define AVR32_DC_MM 29 #define AVR32_DC_MM_MASK 0x20000000 #define AVR32_DC_MM_OFFSET 29 #define AVR32_DC_MM_SIZE 1 #define AVR32_DC_ORP 28 #define AVR32_DC_ORP_MASK 0x10000000 #define AVR32_DC_ORP_OFFSET 28 #define AVR32_DC_ORP_SIZE 1 #define AVR32_DC_OVC 5 #define AVR32_DC_OVC_DELAY_CPU_BTM 0x00000001 #define AVR32_DC_OVC_DELAY_CPU_BTM_DTM 0x00000003 #define AVR32_DC_OVC_DELAY_CPU_DTM 0x00000002 #define AVR32_DC_OVC_MASK 0x000000e0 #define AVR32_DC_OVC_OFFSET 5 #define AVR32_DC_OVC_OVERRUN 0x00000000 #define AVR32_DC_OVC_SIZE 3 #define AVR32_DC_RES 30 #define AVR32_DC_RES_MASK 0x40000000 #define AVR32_DC_RES_OFFSET 30 #define AVR32_DC_RES_SIZE 1 #define AVR32_DC_RID 27 #define AVR32_DC_RID_MASK 0x08000000 #define AVR32_DC_RID_OFFSET 27 #define AVR32_DC_RID_SIZE 1 #define AVR32_DC_SQA 22 #define AVR32_DC_SQA_MASK 0x00400000 #define AVR32_DC_SQA_OFFSET 22 #define AVR32_DC_SQA_SIZE 1 #define AVR32_DC_SS 8 #define AVR32_DC_SS_MASK 0x00000100 #define AVR32_DC_SS_OFFSET 8 #define AVR32_DC_SS_SIZE 1 #define AVR32_DC_TM 0 #define AVR32_DC_TM_BTM 0x00000004 #define AVR32_DC_TM_DTM 0x00000002 #define AVR32_DC_TM_MASK 0x00000007 #define AVR32_DC_TM_NO_TRACE 0x00000000 #define AVR32_DC_TM_OFFSET 0 #define AVR32_DC_TM_OTM 0x00000001 #define AVR32_DC_TM_SIZE 3 #define AVR32_DC_TOZ 25 #define AVR32_DC_TOZ_MASK 0x02000000 #define AVR32_DC_TOZ_OFFSET 25 #define AVR32_DC_TOZ_SIZE 1 #define AVR32_DID 0x00000000 #define AVR32_DID_MID 1 #define AVR32_DID_MID_ATMEL 0x0000001f #define AVR32_DID_MID_MASK 0x00000ffe #define AVR32_DID_MID_OFFSET 1 #define AVR32_DID_MID_SIZE 11 #define AVR32_DID_PN 12 #define AVR32_DID_PN_MASK 0x0ffff000 #define AVR32_DID_PN_OFFSET 12 #define AVR32_DID_PN_SIZE 16 #define AVR32_DID_RN 28 #define AVR32_DID_RN_MASK 0xf0000000 #define AVR32_DID_RN_OFFSET 28 #define AVR32_DID_RN_SIZE 4 #define AVR32_DINST 0x00000104 #define AVR32_DINST_DINST 0 #define AVR32_DINST_DINST_MASK 0xffffffff #define AVR32_DINST_DINST_OFFSET 0 #define AVR32_DINST_DINST_SIZE 32 #define AVR32_DPC 0x00000108 #define AVR32_DS 0x00000010 #define AVR32_DS_BOZ 25 #define AVR32_DS_BOZ_MASK 0x02000000 #define AVR32_DS_BOZ_OFFSET 25 #define AVR32_DS_BOZ_SIZE 1 #define AVR32_DS_BP 8 #define AVR32_DS_BP_MASK 0x0000ff00 #define AVR32_DS_BP_OFFSET 8 #define AVR32_DS_BP_SIZE 8 #define AVR32_DS_DBA 26 #define AVR32_DS_DBA_MASK 0x04000000 #define AVR32_DS_DBA_OFFSET 26 #define AVR32_DS_DBA_SIZE 1 #define AVR32_DS_DBS 5 #define AVR32_DS_DBS_MASK 0x00000020 #define AVR32_DS_DBS_OFFSET 5 #define AVR32_DS_DBS_SIZE 1 #define AVR32_DS_EXB 27 #define AVR32_DS_EXB_MASK 0x08000000 #define AVR32_DS_EXB_OFFSET 27 #define AVR32_DS_EXB_SIZE 1 #define AVR32_DS_HWB 2 #define AVR32_DS_HWB_MASK 0x00000004 #define AVR32_DS_HWB_OFFSET 2 #define AVR32_DS_HWB_SIZE 1 #define AVR32_DS_INC 24 #define AVR32_DS_INC_MASK 0x01000000 #define AVR32_DS_INC_OFFSET 24 #define AVR32_DS_INC_SIZE 1 #define AVR32_DS_NTBF 28 #define AVR32_DS_NTBF_MASK 0x10000000 #define AVR32_DS_NTBF_OFFSET 28 #define AVR32_DS_NTBF_SIZE 1 #define AVR32_DS_SSS 0 #define AVR32_DS_SSS_MASK 0x00000001 #define AVR32_DS_SSS_OFFSET 0 #define AVR32_DS_SSS_SIZE 1 #define AVR32_DS_STP 4 #define AVR32_DS_STP_MASK 0x00000010 #define AVR32_DS_STP_OFFSET 4 #define AVR32_DS_STP_SIZE 1 #define AVR32_DS_SWB 1 #define AVR32_DS_SWB_MASK 0x00000002 #define AVR32_DS_SWB_OFFSET 1 #define AVR32_DS_SWB_SIZE 1 #define AVR32_DTC 0x00000034 #define AVR32_DTC_RWT0 30 #define AVR32_DTC_RWT0_DATA_READ 0x00000001 #define AVR32_DTC_RWT0_DATA_READ_WRITE 0x00000003 #define AVR32_DTC_RWT0_DATA_WRITE 0x00000002 #define AVR32_DTC_RWT0_MASK 0xc0000000 #define AVR32_DTC_RWT0_NO_TRACE 0x00000000 #define AVR32_DTC_RWT0_OFFSET 30 #define AVR32_DTC_RWT0_SIZE 2 #define AVR32_DTC_RWT1 28 #define AVR32_DTC_RWT1_DATA_READ 0x00000001 #define AVR32_DTC_RWT1_DATA_READ_WRITE 0x00000003 #define AVR32_DTC_RWT1_DATA_WRITE 0x00000002 #define AVR32_DTC_RWT1_MASK 0x30000000 #define AVR32_DTC_RWT1_NO_TRACE 0x00000000 #define AVR32_DTC_RWT1_OFFSET 28 #define AVR32_DTC_RWT1_SIZE 2 #define AVR32_DTC_T0WP 0 #define AVR32_DTC_T0WP_MASK 0x00000001 #define AVR32_DTC_T0WP_OFFSET 0 #define AVR32_DTC_T0WP_SIZE 1 #define AVR32_DTC_T1WP 1 #define AVR32_DTC_T1WP_MASK 0x00000002 #define AVR32_DTC_T1WP_OFFSET 1 #define AVR32_DTC_T1WP_SIZE 1 #define AVR32_DTEA0 0x00000048 #define AVR32_DTEA0_DTEA 0 #define AVR32_DTEA0_DTEA_MASK 0xffffffff #define AVR32_DTEA0_DTEA_OFFSET 0 #define AVR32_DTEA0_DTEA_SIZE 32 #define AVR32_DTEA1 0x0000004c #define AVR32_DTEA1_DTEA 0 #define AVR32_DTEA1_DTEA_MASK 0xffffffff #define AVR32_DTEA1_DTEA_OFFSET 0 #define AVR32_DTEA1_DTEA_SIZE 32 #define AVR32_DTSA0 0x00000038 #define AVR32_DTSA0_DTSA 0 #define AVR32_DTSA0_DTSA_MASK 0xffffffff #define AVR32_DTSA0_DTSA_OFFSET 0 #define AVR32_DTSA0_DTSA_SIZE 32 #define AVR32_DTSA1 0x0000003c #define AVR32_DTSA1_DTSA 0 #define AVR32_DTSA1_DTSA_MASK 0xffffffff #define AVR32_DTSA1_DTSA_OFFSET 0 #define AVR32_DTSA1_DTSA_SIZE 32 #define AVR32_NXCFG 0x00000100 #define AVR32_NXCFG_NXARCH 0 #define AVR32_NXCFG_NXARCH_AVR32A 0x00000001 #define AVR32_NXCFG_NXARCH_AVR32B 0x00000000 #define AVR32_NXCFG_NXARCH_MASK 0x0000000f #define AVR32_NXCFG_NXARCH_OFFSET 0 #define AVR32_NXCFG_NXARCH_SIZE 4 #define AVR32_NXCFG_NXDB 12 #define AVR32_NXCFG_NXDB_MASK 0x0000f000 #define AVR32_NXCFG_NXDB_OFFSET 12 #define AVR32_NXCFG_NXDB_SIZE 4 #define AVR32_NXCFG_NXDMA 28 #define AVR32_NXCFG_NXDMA_MASK 0x10000000 #define AVR32_NXCFG_NXDMA_OFFSET 28 #define AVR32_NXCFG_NXDMA_SIZE 1 #define AVR32_NXCFG_NXDRT 24 #define AVR32_NXCFG_NXDRT_MASK 0x01000000 #define AVR32_NXCFG_NXDRT_OFFSET 24 #define AVR32_NXCFG_NXDRT_SIZE 1 #define AVR32_NXCFG_NXDTC 25 #define AVR32_NXCFG_NXDTC_MASK 0x0e000000 #define AVR32_NXCFG_NXDTC_OFFSET 25 #define AVR32_NXCFG_NXDTC_SIZE 3 #define AVR32_NXCFG_NXDWT 23 #define AVR32_NXCFG_NXDWT_MASK 0x00800000 #define AVR32_NXCFG_NXDWT_OFFSET 23 #define AVR32_NXCFG_NXDWT_SIZE 1 #define AVR32_NXCFG_NXMDO 17 #define AVR32_NXCFG_NXMDO_MASK 0x001e0000 #define AVR32_NXCFG_NXMDO_OFFSET 17 #define AVR32_NXCFG_NXMDO_SIZE 4 #define AVR32_NXCFG_NXMSEO 16 #define AVR32_NXCFG_NXMSEO_MASK 0x00010000 #define AVR32_NXCFG_NXMSEO_OFFSET 16 #define AVR32_NXCFG_NXMSEO_SIZE 1 #define AVR32_NXCFG_NXOCD 4 #define AVR32_NXCFG_NXOCD_AVR32AP 0x00000000 #define AVR32_NXCFG_NXOCD_AVR32UC 0x00000001 #define AVR32_NXCFG_NXOCD_MASK 0x000000f0 #define AVR32_NXCFG_NXOCD_OFFSET 4 #define AVR32_NXCFG_NXOCD_SIZE 4 #define AVR32_NXCFG_NXOT 22 #define AVR32_NXCFG_NXOT_MASK 0x00400000 #define AVR32_NXCFG_NXOT_OFFSET 22 #define AVR32_NXCFG_NXOT_SIZE 1 #define AVR32_NXCFG_NXPCB 8 #define AVR32_NXCFG_NXPCB_MASK 0x00000f00 #define AVR32_NXCFG_NXPCB_OFFSET 8 #define AVR32_NXCFG_NXPCB_SIZE 4 #define AVR32_NXCFG_NXPT 21 #define AVR32_NXCFG_NXPT_MASK 0x00200000 #define AVR32_NXCFG_NXPT_OFFSET 21 #define AVR32_NXCFG_NXPT_SIZE 1 #define AVR32_PID 0x0000011c #define AVR32_PID_PROCESS 0 #define AVR32_PID_PROCESS_MASK 0xffffffff #define AVR32_PID_PROCESS_OFFSET 0 #define AVR32_PID_PROCESS_SIZE 32 #define AVR32_WT 0x0000002c #define AVR32_WT_DTE 20 #define AVR32_WT_DTE_DATA_3A 0x00000006 #define AVR32_WT_DTE_DATA_3B 0x00000007 #define AVR32_WT_DTE_DISABLED 0x00000000 #define AVR32_WT_DTE_MASK 0x00700000 #define AVR32_WT_DTE_OFFSET 20 #define AVR32_WT_DTE_PROGRAM_0B 0x00000001 #define AVR32_WT_DTE_PROGRAM_1A 0x00000002 #define AVR32_WT_DTE_PROGRAM_1B 0x00000003 #define AVR32_WT_DTE_PROGRAM_2A 0x00000004 #define AVR32_WT_DTE_PROGRAM_2B 0x00000005 #define AVR32_WT_DTE_SIZE 3 #define AVR32_WT_DTS 23 #define AVR32_WT_DTS_DATA_3A 0x00000006 #define AVR32_WT_DTS_DATA_3B 0x00000007 #define AVR32_WT_DTS_DISABLED 0x00000000 #define AVR32_WT_DTS_MASK 0x03800000 #define AVR32_WT_DTS_OFFSET 23 #define AVR32_WT_DTS_PROGRAM_0B 0x00000001 #define AVR32_WT_DTS_PROGRAM_1A 0x00000002 #define AVR32_WT_DTS_PROGRAM_1B 0x00000003 #define AVR32_WT_DTS_PROGRAM_2A 0x00000004 #define AVR32_WT_DTS_PROGRAM_2B 0x00000005 #define AVR32_WT_DTS_SIZE 3 #define AVR32_WT_PTE 26 #define AVR32_WT_PTE_DATA_3A 0x00000006 #define AVR32_WT_PTE_DATA_3B 0x00000007 #define AVR32_WT_PTE_DISABLED 0x00000000 #define AVR32_WT_PTE_MASK 0x1c000000 #define AVR32_WT_PTE_OFFSET 26 #define AVR32_WT_PTE_PROGRAM_0B 0x00000001 #define AVR32_WT_PTE_PROGRAM_1A 0x00000002 #define AVR32_WT_PTE_PROGRAM_1B 0x00000003 #define AVR32_WT_PTE_PROGRAM_2A 0x00000004 #define AVR32_WT_PTE_PROGRAM_2B 0x00000005 #define AVR32_WT_PTE_SIZE 3 #define AVR32_WT_PTS 29 #define AVR32_WT_PTS_DATA_3A 0x00000006 #define AVR32_WT_PTS_DATA_3B 0x00000007 #define AVR32_WT_PTS_DISABLED 0x00000000 #define AVR32_WT_PTS_MASK 0xe0000000 #define AVR32_WT_PTS_OFFSET 29 #define AVR32_WT_PTS_PROGRAM_0B 0x00000001 #define AVR32_WT_PTS_PROGRAM_1A 0x00000002 #define AVR32_WT_PTS_PROGRAM_1B 0x00000003 #define AVR32_WT_PTS_PROGRAM_2A 0x00000004 #define AVR32_WT_PTS_PROGRAM_2B 0x00000005 #define AVR32_WT_PTS_SIZE 3 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_did_t { unsigned int rn : 4; unsigned int pn :16; unsigned int mid :11; unsigned int : 1; } avr32_did_t; typedef struct avr32_dc_t { unsigned int abort : 1; unsigned int res : 1; unsigned int mm : 1; unsigned int orp : 1; unsigned int rid : 1; unsigned int : 1; unsigned int toz : 1; unsigned int ifm : 1; unsigned int irp : 1; unsigned int sqa : 1; unsigned int eos : 2; unsigned int : 6; unsigned int dbe : 1; unsigned int dbr : 1; unsigned int : 3; unsigned int ss : 1; unsigned int ovc : 3; unsigned int eic : 2; unsigned int tm : 3; } avr32_dc_t; typedef struct avr32_ds_t { unsigned int : 3; unsigned int ntbf : 1; unsigned int exb : 1; unsigned int dba : 1; unsigned int boz : 1; unsigned int inc : 1; unsigned int : 8; unsigned int bp : 8; unsigned int : 2; unsigned int dbs : 1; unsigned int stp : 1; unsigned int : 1; unsigned int hwb : 1; unsigned int swb : 1; unsigned int sss : 1; } avr32_ds_t; typedef struct avr32_wt_t { unsigned int pts : 3; unsigned int pte : 3; unsigned int dts : 3; unsigned int dte : 3; unsigned int :20; } avr32_wt_t; typedef struct avr32_dtc_t { unsigned int rwt0 : 2; unsigned int rwt1 : 2; unsigned int :26; unsigned int t1wp : 1; unsigned int t0wp : 1; } avr32_dtc_t; typedef struct avr32_bwc0a_t { unsigned int bwe : 2; unsigned int : 4; unsigned int ame : 1; unsigned int :10; unsigned int eoc : 1; unsigned int :14; } avr32_bwc0a_t; typedef struct avr32_bwc0b_t { unsigned int bwe : 2; unsigned int :15; unsigned int eoc : 1; unsigned int :14; } avr32_bwc0b_t; typedef struct avr32_bwc1a_t { unsigned int bwe : 2; unsigned int : 4; unsigned int ame : 1; unsigned int :10; unsigned int eoc : 1; unsigned int :14; } avr32_bwc1a_t; typedef struct avr32_bwc1b_t { unsigned int bwe : 2; unsigned int :15; unsigned int eoc : 1; unsigned int :14; } avr32_bwc1b_t; typedef struct avr32_bwc2a_t { unsigned int bwe : 2; unsigned int : 4; unsigned int ame : 1; unsigned int :10; unsigned int eoc : 1; unsigned int :14; } avr32_bwc2a_t; typedef struct avr32_bwc2b_t { unsigned int bwe : 2; unsigned int :15; unsigned int eoc : 1; unsigned int :14; } avr32_bwc2b_t; typedef struct avr32_bwc3a_t { unsigned int bwe : 2; unsigned int brw : 2; unsigned int : 4; unsigned int bme : 4; unsigned int : 2; unsigned int bwo : 2; unsigned int : 1; unsigned int eoc : 1; unsigned int : 2; unsigned int size : 3; unsigned int : 9; } avr32_bwc3a_t; typedef struct avr32_bwc3b_t { unsigned int bwe : 2; unsigned int brw : 2; unsigned int : 4; unsigned int bme : 4; unsigned int : 2; unsigned int bwo : 2; unsigned int : 1; unsigned int eoc : 1; unsigned int : 2; unsigned int size : 3; unsigned int : 9; } avr32_bwc3b_t; typedef struct avr32_nxcfg_t { unsigned int : 3; unsigned int nxdma : 1; unsigned int nxdtc : 3; unsigned int nxdrt : 1; unsigned int nxdwt : 1; unsigned int nxot : 1; unsigned int nxpt : 1; unsigned int nxmdo : 4; unsigned int nxmseo : 1; unsigned int nxdb : 4; unsigned int nxpcb : 4; unsigned int nxocd : 4; unsigned int nxarch : 4; } avr32_nxcfg_t; typedef struct avr32_dcsr_t { unsigned int :30; unsigned int emud : 1; unsigned int cpud : 1; } avr32_dcsr_t; typedef struct avr32_axc_t { unsigned int :16; unsigned int axs : 2; unsigned int : 2; unsigned int ls : 1; unsigned int ddr : 1; unsigned int axo : 1; unsigned int axe : 1; unsigned int : 4; unsigned int div : 4; } avr32_axc_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif #if !defined (DEPRECATED_DISABLE) #define AVR32_BWC3A_BRW_ANY_ACCES_BREAK 0x00000002 #define AVR32_BWC3B_BRW_ANY_ACCES_BREAK 0x00000002 #define AVR32_BWD3A_BITFIELD_0 0 #define AVR32_BWD3A_BITFIELD_0_MASK 0xffffffff #define AVR32_BWD3A_BITFIELD_0_OFFSET 0 #define AVR32_BWD3A_BITFIELD_0_SIZE 32 #define AVR32_DC_EOS_THQ 0x00000003 #define AVR32_NXCFG_MXMSEO 16 #define AVR32_NXCFG_MXMSEO_MASK 0x00010000 #define AVR32_NXCFG_MXMSEO_OFFSET 16 #define AVR32_NXCFG_MXMSEO_SIZE 1 #endif /*#ifdef AVR32_OCD_S0_130_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/pdca_102.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 : UC3A0512 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_PDCA_102_H_INCLUDED #define AVR32_PDCA_102_H_INCLUDED #define AVR32_PDCA_H_VERSION 102 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_PDCA_ - Bitfield mask: AVR32_PDCA__ - Bitfield offset: AVR32_PDCA___OFFSET - Bitfield size: AVR32_PDCA___SIZE - Bitfield values: AVR32_PDCA___ 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_PDCA_ - Bitfield offset: AVR32_PDCA__OFFSET - Bitfield size: AVR32_PDCA__SIZE - Bitfield values: AVR32_PDCA__ - Bitfield values: AVR32_PDCA_ All defines are sorted alphabetically. */ #define AVR32_PDCA_BYTE 0x00000000 #define AVR32_PDCA_CR 0x00000014 #define AVR32_PDCA_CR_ECLR 8 #define AVR32_PDCA_CR_ECLR_MASK 0x00000100 #define AVR32_PDCA_CR_ECLR_OFFSET 8 #define AVR32_PDCA_CR_ECLR_SIZE 1 #define AVR32_PDCA_CR_TDIS 1 #define AVR32_PDCA_CR_TDIS_MASK 0x00000002 #define AVR32_PDCA_CR_TDIS_OFFSET 1 #define AVR32_PDCA_CR_TDIS_SIZE 1 #define AVR32_PDCA_CR_TEN 0 #define AVR32_PDCA_CR_TEN_MASK 0x00000001 #define AVR32_PDCA_CR_TEN_OFFSET 0 #define AVR32_PDCA_CR_TEN_SIZE 1 #define AVR32_PDCA_ECLR 8 #define AVR32_PDCA_ECLR_MASK 0x00000100 #define AVR32_PDCA_ECLR_OFFSET 8 #define AVR32_PDCA_ECLR_SIZE 1 #define AVR32_PDCA_HALF_WORD 0x00000001 #define AVR32_PDCA_IDR 0x00000024 #define AVR32_PDCA_IDR_RCZ 0 #define AVR32_PDCA_IDR_RCZ_MASK 0x00000001 #define AVR32_PDCA_IDR_RCZ_OFFSET 0 #define AVR32_PDCA_IDR_RCZ_SIZE 1 #define AVR32_PDCA_IDR_TERR 2 #define AVR32_PDCA_IDR_TERR_MASK 0x00000004 #define AVR32_PDCA_IDR_TERR_OFFSET 2 #define AVR32_PDCA_IDR_TERR_SIZE 1 #define AVR32_PDCA_IDR_TRC 1 #define AVR32_PDCA_IDR_TRC_MASK 0x00000002 #define AVR32_PDCA_IDR_TRC_OFFSET 1 #define AVR32_PDCA_IDR_TRC_SIZE 1 #define AVR32_PDCA_IER 0x00000020 #define AVR32_PDCA_IER_RCZ 0 #define AVR32_PDCA_IER_RCZ_MASK 0x00000001 #define AVR32_PDCA_IER_RCZ_OFFSET 0 #define AVR32_PDCA_IER_RCZ_SIZE 1 #define AVR32_PDCA_IER_TERR 2 #define AVR32_PDCA_IER_TERR_MASK 0x00000004 #define AVR32_PDCA_IER_TERR_OFFSET 2 #define AVR32_PDCA_IER_TERR_SIZE 1 #define AVR32_PDCA_IER_TRC 1 #define AVR32_PDCA_IER_TRC_MASK 0x00000002 #define AVR32_PDCA_IER_TRC_OFFSET 1 #define AVR32_PDCA_IER_TRC_SIZE 1 #define AVR32_PDCA_IMR 0x00000028 #define AVR32_PDCA_IMR_RCZ 0 #define AVR32_PDCA_IMR_RCZ_MASK 0x00000001 #define AVR32_PDCA_IMR_RCZ_OFFSET 0 #define AVR32_PDCA_IMR_RCZ_SIZE 1 #define AVR32_PDCA_IMR_TERR 2 #define AVR32_PDCA_IMR_TERR_MASK 0x00000004 #define AVR32_PDCA_IMR_TERR_OFFSET 2 #define AVR32_PDCA_IMR_TERR_SIZE 1 #define AVR32_PDCA_IMR_TRC 1 #define AVR32_PDCA_IMR_TRC_MASK 0x00000002 #define AVR32_PDCA_IMR_TRC_OFFSET 1 #define AVR32_PDCA_IMR_TRC_SIZE 1 #define AVR32_PDCA_ISR 0x0000002c #define AVR32_PDCA_ISR_RCZ 0 #define AVR32_PDCA_ISR_RCZ_MASK 0x00000001 #define AVR32_PDCA_ISR_RCZ_OFFSET 0 #define AVR32_PDCA_ISR_RCZ_SIZE 1 #define AVR32_PDCA_ISR_TERR 2 #define AVR32_PDCA_ISR_TERR_MASK 0x00000004 #define AVR32_PDCA_ISR_TERR_OFFSET 2 #define AVR32_PDCA_ISR_TERR_SIZE 1 #define AVR32_PDCA_ISR_TRC 1 #define AVR32_PDCA_ISR_TRC_MASK 0x00000002 #define AVR32_PDCA_ISR_TRC_OFFSET 1 #define AVR32_PDCA_ISR_TRC_SIZE 1 #define AVR32_PDCA_MADDR 0 #define AVR32_PDCA_MADDR_MASK 0xffffffff #define AVR32_PDCA_MADDR_OFFSET 0 #define AVR32_PDCA_MADDR_SIZE 32 #define AVR32_PDCA_MAR 0x00000000 #define AVR32_PDCA_MAR_MADDR 0 #define AVR32_PDCA_MAR_MADDR_MASK 0xffffffff #define AVR32_PDCA_MAR_MADDR_OFFSET 0 #define AVR32_PDCA_MAR_MADDR_SIZE 32 #define AVR32_PDCA_MARR 0x0000000c #define AVR32_PDCA_MARR_MARV 0 #define AVR32_PDCA_MARR_MARV_MASK 0xffffffff #define AVR32_PDCA_MARR_MARV_OFFSET 0 #define AVR32_PDCA_MARR_MARV_SIZE 32 #define AVR32_PDCA_MARV 0 #define AVR32_PDCA_MARV_MASK 0xffffffff #define AVR32_PDCA_MARV_OFFSET 0 #define AVR32_PDCA_MARV_SIZE 32 #define AVR32_PDCA_MR 0x00000018 #define AVR32_PDCA_MR_SIZE 0 #define AVR32_PDCA_MR_SIZE_BYTE 0x00000000 #define AVR32_PDCA_MR_SIZE_HALF_WORD 0x00000001 #define AVR32_PDCA_MR_SIZE_MASK 0x00000003 #define AVR32_PDCA_MR_SIZE_OFFSET 0 #define AVR32_PDCA_MR_SIZE_SIZE 2 #define AVR32_PDCA_MR_SIZE_WORD 0x00000002 #define AVR32_PDCA_PID 0 #define AVR32_PDCA_PID_MASK 0x000000ff #define AVR32_PDCA_PID_OFFSET 0 #define AVR32_PDCA_PID_SIZE 8 #define AVR32_PDCA_PSR 0x00000004 #define AVR32_PDCA_PSR_PID 0 #define AVR32_PDCA_PSR_PID_MASK 0x000000ff #define AVR32_PDCA_PSR_PID_OFFSET 0 #define AVR32_PDCA_PSR_PID_SIZE 8 #define AVR32_PDCA_RCZ 0 #define AVR32_PDCA_RCZ_MASK 0x00000001 #define AVR32_PDCA_RCZ_OFFSET 0 #define AVR32_PDCA_RCZ_SIZE 1 #define AVR32_PDCA_SIZE 0 #define AVR32_PDCA_SIZE_BYTE 0x00000000 #define AVR32_PDCA_SIZE_HALF_WORD 0x00000001 #define AVR32_PDCA_SIZE_MASK 0x00000003 #define AVR32_PDCA_SIZE_OFFSET 0 #define AVR32_PDCA_SIZE_SIZE 2 #define AVR32_PDCA_SIZE_WORD 0x00000002 #define AVR32_PDCA_SR 0x0000001c #define AVR32_PDCA_SR_TEN 0 #define AVR32_PDCA_SR_TEN_MASK 0x00000001 #define AVR32_PDCA_SR_TEN_OFFSET 0 #define AVR32_PDCA_SR_TEN_SIZE 1 #define AVR32_PDCA_TCR 0x00000008 #define AVR32_PDCA_TCR_TCV 0 #define AVR32_PDCA_TCR_TCV_MASK 0x0000ffff #define AVR32_PDCA_TCR_TCV_OFFSET 0 #define AVR32_PDCA_TCR_TCV_SIZE 16 #define AVR32_PDCA_TCRR 0x00000010 #define AVR32_PDCA_TCRR_TCRV 0 #define AVR32_PDCA_TCRR_TCRV_MASK 0x0000ffff #define AVR32_PDCA_TCRR_TCRV_OFFSET 0 #define AVR32_PDCA_TCRR_TCRV_SIZE 16 #define AVR32_PDCA_TCRV 0 #define AVR32_PDCA_TCRV_MASK 0x0000ffff #define AVR32_PDCA_TCRV_OFFSET 0 #define AVR32_PDCA_TCRV_SIZE 16 #define AVR32_PDCA_TCV 0 #define AVR32_PDCA_TCV_MASK 0x0000ffff #define AVR32_PDCA_TCV_OFFSET 0 #define AVR32_PDCA_TCV_SIZE 16 #define AVR32_PDCA_TDIS 1 #define AVR32_PDCA_TDIS_MASK 0x00000002 #define AVR32_PDCA_TDIS_OFFSET 1 #define AVR32_PDCA_TDIS_SIZE 1 #define AVR32_PDCA_TEN 0 #define AVR32_PDCA_TEN_MASK 0x00000001 #define AVR32_PDCA_TEN_OFFSET 0 #define AVR32_PDCA_TEN_SIZE 1 #define AVR32_PDCA_TERR 2 #define AVR32_PDCA_TERR_MASK 0x00000004 #define AVR32_PDCA_TERR_OFFSET 2 #define AVR32_PDCA_TERR_SIZE 1 #define AVR32_PDCA_TRC 1 #define AVR32_PDCA_TRC_MASK 0x00000002 #define AVR32_PDCA_TRC_OFFSET 1 #define AVR32_PDCA_TRC_SIZE 1 #define AVR32_PDCA_WORD 0x00000002 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_pdca_psr_t { unsigned int :24; unsigned int pid : 8; } avr32_pdca_psr_t; typedef struct avr32_pdca_tcr_t { unsigned int :16; unsigned int tcv :16; } avr32_pdca_tcr_t; typedef struct avr32_pdca_tcrr_t { unsigned int :16; unsigned int tcrv :16; } avr32_pdca_tcrr_t; typedef struct avr32_pdca_cr_t { unsigned int :23; unsigned int eclr : 1; unsigned int : 6; unsigned int tdis : 1; unsigned int ten : 1; } avr32_pdca_cr_t; typedef struct avr32_pdca_mr_t { unsigned int :30; unsigned int size : 2; } avr32_pdca_mr_t; typedef struct avr32_pdca_sr_t { unsigned int :31; unsigned int ten : 1; } avr32_pdca_sr_t; typedef struct avr32_pdca_ier_t { unsigned int :29; unsigned int terr : 1; unsigned int trc : 1; unsigned int rcz : 1; } avr32_pdca_ier_t; typedef struct avr32_pdca_idr_t { unsigned int :29; unsigned int terr : 1; unsigned int trc : 1; unsigned int rcz : 1; } avr32_pdca_idr_t; typedef struct avr32_pdca_imr_t { unsigned int :29; unsigned int terr : 1; unsigned int trc : 1; unsigned int rcz : 1; } avr32_pdca_imr_t; typedef struct avr32_pdca_isr_t { unsigned int :29; unsigned int terr : 1; unsigned int trc : 1; unsigned int rcz : 1; } avr32_pdca_isr_t; typedef struct avr32_pdca_channel_t { unsigned long mar ;//0x0000 union { unsigned long psr ;//0x0004 avr32_pdca_psr_t PSR ; }; union { unsigned long tcr ;//0x0008 avr32_pdca_tcr_t TCR ; }; unsigned long marr ;//0x000c union { unsigned long tcrr ;//0x0010 avr32_pdca_tcrr_t TCRR ; }; union { unsigned long cr ;//0x0014 avr32_pdca_cr_t CR ; }; union { unsigned long mr ;//0x0018 avr32_pdca_mr_t MR ; }; union { const unsigned long sr ;//0x001c const avr32_pdca_sr_t SR ; }; union { unsigned long ier ;//0x0020 avr32_pdca_ier_t IER ; }; union { unsigned long idr ;//0x0024 avr32_pdca_idr_t IDR ; }; union { const unsigned long imr ;//0x0028 const avr32_pdca_imr_t IMR ; }; union { const unsigned long isr ;//0x002c const avr32_pdca_isr_t ISR ; }; unsigned int :32 ;//0x0030 unsigned int :32 ;//0x0034 unsigned int :32 ;//0x0038 unsigned int :32 ;//0x003c } avr32_pdca_channel_t; typedef struct avr32_pdca_t { avr32_pdca_channel_t channel[AVR32_PDCA_CHANNEL_LENGTH];//0x0 } avr32_pdca_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif #if !defined (DEPRECATED_DISABLE) #define AVR32_PDCA_CR0 0x00000014 #define AVR32_PDCA_CR0_ECLR 8 #define AVR32_PDCA_CR0_ECLR_MASK 0x00000100 #define AVR32_PDCA_CR0_ECLR_OFFSET 8 #define AVR32_PDCA_CR0_ECLR_SIZE 1 #define AVR32_PDCA_CR0_TDIS 1 #define AVR32_PDCA_CR0_TDIS_MASK 0x00000002 #define AVR32_PDCA_CR0_TDIS_OFFSET 1 #define AVR32_PDCA_CR0_TDIS_SIZE 1 #define AVR32_PDCA_CR0_TEN 0 #define AVR32_PDCA_CR0_TEN_MASK 0x00000001 #define AVR32_PDCA_CR0_TEN_OFFSET 0 #define AVR32_PDCA_CR0_TEN_SIZE 1 #define AVR32_PDCA_IDR0 0x00000024 #define AVR32_PDCA_IDR0_RCZ 0 #define AVR32_PDCA_IDR0_RCZ_MASK 0x00000001 #define AVR32_PDCA_IDR0_RCZ_OFFSET 0 #define AVR32_PDCA_IDR0_RCZ_SIZE 1 #define AVR32_PDCA_IDR0_TERR 2 #define AVR32_PDCA_IDR0_TERR_MASK 0x00000004 #define AVR32_PDCA_IDR0_TERR_OFFSET 2 #define AVR32_PDCA_IDR0_TERR_SIZE 1 #define AVR32_PDCA_IDR0_TRC 1 #define AVR32_PDCA_IDR0_TRC_MASK 0x00000002 #define AVR32_PDCA_IDR0_TRC_OFFSET 1 #define AVR32_PDCA_IDR0_TRC_SIZE 1 #define AVR32_PDCA_IER0 0x00000020 #define AVR32_PDCA_IER0_RCZ 0 #define AVR32_PDCA_IER0_RCZ_MASK 0x00000001 #define AVR32_PDCA_IER0_RCZ_OFFSET 0 #define AVR32_PDCA_IER0_RCZ_SIZE 1 #define AVR32_PDCA_IER0_TERR 2 #define AVR32_PDCA_IER0_TERR_MASK 0x00000004 #define AVR32_PDCA_IER0_TERR_OFFSET 2 #define AVR32_PDCA_IER0_TERR_SIZE 1 #define AVR32_PDCA_IER0_TRC 1 #define AVR32_PDCA_IER0_TRC_MASK 0x00000002 #define AVR32_PDCA_IER0_TRC_OFFSET 1 #define AVR32_PDCA_IER0_TRC_SIZE 1 #define AVR32_PDCA_IMR0 0x00000028 #define AVR32_PDCA_IMR0_RCZ 0 #define AVR32_PDCA_IMR0_RCZ_MASK 0x00000001 #define AVR32_PDCA_IMR0_RCZ_OFFSET 0 #define AVR32_PDCA_IMR0_RCZ_SIZE 1 #define AVR32_PDCA_IMR0_TERR 2 #define AVR32_PDCA_IMR0_TERR_MASK 0x00000004 #define AVR32_PDCA_IMR0_TERR_OFFSET 2 #define AVR32_PDCA_IMR0_TERR_SIZE 1 #define AVR32_PDCA_IMR0_TRC 1 #define AVR32_PDCA_IMR0_TRC_MASK 0x00000002 #define AVR32_PDCA_IMR0_TRC_OFFSET 1 #define AVR32_PDCA_IMR0_TRC_SIZE 1 #define AVR32_PDCA_ISR0 0x0000002c #define AVR32_PDCA_ISR0_RCZ 0 #define AVR32_PDCA_ISR0_RCZ_MASK 0x00000001 #define AVR32_PDCA_ISR0_RCZ_OFFSET 0 #define AVR32_PDCA_ISR0_RCZ_SIZE 1 #define AVR32_PDCA_ISR0_TERR 2 #define AVR32_PDCA_ISR0_TERR_MASK 0x00000004 #define AVR32_PDCA_ISR0_TERR_OFFSET 2 #define AVR32_PDCA_ISR0_TERR_SIZE 1 #define AVR32_PDCA_ISR0_TRC 1 #define AVR32_PDCA_ISR0_TRC_MASK 0x00000002 #define AVR32_PDCA_ISR0_TRC_OFFSET 1 #define AVR32_PDCA_ISR0_TRC_SIZE 1 #define AVR32_PDCA_MAR0 0x00000000 #define AVR32_PDCA_MAR0_MADDR 0 #define AVR32_PDCA_MAR0_MADDR_MASK 0xffffffff #define AVR32_PDCA_MAR0_MADDR_OFFSET 0 #define AVR32_PDCA_MAR0_MADDR_SIZE 32 #define AVR32_PDCA_MARR0 0x0000000c #define AVR32_PDCA_MARR0_MARV 0 #define AVR32_PDCA_MARR0_MARV_MASK 0xffffffff #define AVR32_PDCA_MARR0_MARV_OFFSET 0 #define AVR32_PDCA_MARR0_MARV_SIZE 32 #define AVR32_PDCA_MR0 0x00000018 #define AVR32_PDCA_MR0_SIZE 0 #define AVR32_PDCA_MR0_SIZE_BYTE 0x00000000 #define AVR32_PDCA_MR0_SIZE_HALF_WORD 0x00000001 #define AVR32_PDCA_MR0_SIZE_MASK 0x00000003 #define AVR32_PDCA_MR0_SIZE_OFFSET 0 #define AVR32_PDCA_MR0_SIZE_SIZE 2 #define AVR32_PDCA_MR0_SIZE_WORD 0x00000002 #define AVR32_PDCA_PSR0 0x00000004 #define AVR32_PDCA_PSR0_PID 0 #define AVR32_PDCA_PSR0_PID_MASK 0x000000ff #define AVR32_PDCA_PSR0_PID_OFFSET 0 #define AVR32_PDCA_PSR0_PID_SIZE 8 #define AVR32_PDCA_SR0 0x0000001c #define AVR32_PDCA_SR0_TEN 0 #define AVR32_PDCA_SR0_TEN_MASK 0x00000001 #define AVR32_PDCA_SR0_TEN_OFFSET 0 #define AVR32_PDCA_SR0_TEN_SIZE 1 #define AVR32_PDCA_TCR0 0x00000008 #define AVR32_PDCA_TCR0_TCV 0 #define AVR32_PDCA_TCR0_TCV_MASK 0x0000ffff #define AVR32_PDCA_TCR0_TCV_OFFSET 0 #define AVR32_PDCA_TCR0_TCV_SIZE 16 #define AVR32_PDCA_TCRR0 0x00000010 #define AVR32_PDCA_TCRR0_TCRV 0 #define AVR32_PDCA_TCRR0_TCRV_MASK 0x0000ffff #define AVR32_PDCA_TCRR0_TCRV_OFFSET 0 #define AVR32_PDCA_TCRR0_TCRV_SIZE 16 #endif /*#ifdef AVR32_PDCA_102_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/pm_230.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 : UC3A0512 * Revision : $Revision: 74808 $ * Checkin Date : $Date: 2010-05-16 22:06:32 +0200 (Sun, 16 May 2010) $ * ****************************************************************************/ #ifndef AVR32_PM_230_H_INCLUDED #define AVR32_PM_230_H_INCLUDED #define AVR32_PM_H_VERSION 230 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_PM_ - Bitfield mask: AVR32_PM__ - Bitfield offset: AVR32_PM___OFFSET - Bitfield size: AVR32_PM___SIZE - Bitfield values: AVR32_PM___ 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_PM_ - Bitfield offset: AVR32_PM__OFFSET - Bitfield size: AVR32_PM__SIZE - Bitfield values: AVR32_PM__ - Bitfield values: AVR32_PM_ All defines are sorted alphabetically. */ #define AVR32_PM_AWEN 0x00000144 #define AVR32_PM_AWEN_USB_WAKEN 0 #define AVR32_PM_AWEN_USB_WAKEN_MASK 0x00000001 #define AVR32_PM_AWEN_USB_WAKEN_OFFSET 0 #define AVR32_PM_AWEN_USB_WAKEN_SIZE 1 #define AVR32_PM_BGCR 0x000000c4 #define AVR32_PM_BGCR_CALIB 0 #define AVR32_PM_BGCR_CALIB_MASK 0x00000007 #define AVR32_PM_BGCR_CALIB_OFFSET 0 #define AVR32_PM_BGCR_CALIB_SIZE 3 #define AVR32_PM_BGCR_FCD 16 #define AVR32_PM_BGCR_FCD_MASK 0x00010000 #define AVR32_PM_BGCR_FCD_OFFSET 16 #define AVR32_PM_BGCR_FCD_SIZE 1 #define AVR32_PM_BGCR_KEY 24 #define AVR32_PM_BGCR_KEY_MASK 0xff000000 #define AVR32_PM_BGCR_KEY_OFFSET 24 #define AVR32_PM_BGCR_KEY_SIZE 8 #define AVR32_PM_BOD 0x000000d0 #define AVR32_PM_BODDET 16 #define AVR32_PM_BODDET_MASK 0x00010000 #define AVR32_PM_BODDET_OFFSET 16 #define AVR32_PM_BODDET_SIZE 1 #define AVR32_PM_BOD_CTRL 8 #define AVR32_PM_BOD_CTRL_ENABLED 0x00000001 #define AVR32_PM_BOD_CTRL_ENABLED_NORESET 0x00000002 #define AVR32_PM_BOD_CTRL_MASK 0x00000300 #define AVR32_PM_BOD_CTRL_OFF1 0x00000000 #define AVR32_PM_BOD_CTRL_OFF2 0x00000003 #define AVR32_PM_BOD_CTRL_OFFSET 8 #define AVR32_PM_BOD_CTRL_SIZE 2 #define AVR32_PM_BOD_FCD 16 #define AVR32_PM_BOD_FCD_MASK 0x00010000 #define AVR32_PM_BOD_FCD_OFFSET 16 #define AVR32_PM_BOD_FCD_SIZE 1 #define AVR32_PM_BOD_HYST 6 #define AVR32_PM_BOD_HYST_MASK 0x00000040 #define AVR32_PM_BOD_HYST_OFFSET 6 #define AVR32_PM_BOD_HYST_SIZE 1 #define AVR32_PM_BOD_KEY 24 #define AVR32_PM_BOD_KEY_MASK 0xff000000 #define AVR32_PM_BOD_KEY_OFFSET 24 #define AVR32_PM_BOD_KEY_SIZE 8 #define AVR32_PM_BOD_LEVEL 0 #define AVR32_PM_BOD_LEVEL_MASK 0x0000003f #define AVR32_PM_BOD_LEVEL_OFFSET 0 #define AVR32_PM_BOD_LEVEL_SIZE 6 #define AVR32_PM_BOD_MASK 0x00000002 #define AVR32_PM_BOD_OFFSET 1 #define AVR32_PM_BOD_SIZE 1 #define AVR32_PM_CALIB 0 #define AVR32_PM_CALIB_OFFSET 0 #define AVR32_PM_CEN 2 #define AVR32_PM_CEN_MASK 0x00000004 #define AVR32_PM_CEN_OFFSET 2 #define AVR32_PM_CEN_SIZE 1 #define AVR32_PM_CKRDY 5 #define AVR32_PM_CKRDY_MASK 0x00000020 #define AVR32_PM_CKRDY_OFFSET 5 #define AVR32_PM_CKRDY_SIZE 1 #define AVR32_PM_CKSEL 0x00000004 #define AVR32_PM_CKSEL_CPUDIV 7 #define AVR32_PM_CKSEL_CPUDIV_MASK 0x00000080 #define AVR32_PM_CKSEL_CPUDIV_OFFSET 7 #define AVR32_PM_CKSEL_CPUDIV_SIZE 1 #define AVR32_PM_CKSEL_CPUSEL 0 #define AVR32_PM_CKSEL_CPUSEL_MASK 0x00000007 #define AVR32_PM_CKSEL_CPUSEL_OFFSET 0 #define AVR32_PM_CKSEL_CPUSEL_SIZE 3 #define AVR32_PM_CKSEL_HSBDIV 15 #define AVR32_PM_CKSEL_HSBDIV_MASK 0x00008000 #define AVR32_PM_CKSEL_HSBDIV_OFFSET 15 #define AVR32_PM_CKSEL_HSBDIV_SIZE 1 #define AVR32_PM_CKSEL_HSBSEL 8 #define AVR32_PM_CKSEL_HSBSEL_MASK 0x00000700 #define AVR32_PM_CKSEL_HSBSEL_OFFSET 8 #define AVR32_PM_CKSEL_HSBSEL_SIZE 3 #define AVR32_PM_CKSEL_PBADIV 23 #define AVR32_PM_CKSEL_PBADIV_MASK 0x00800000 #define AVR32_PM_CKSEL_PBADIV_OFFSET 23 #define AVR32_PM_CKSEL_PBADIV_SIZE 1 #define AVR32_PM_CKSEL_PBASEL 16 #define AVR32_PM_CKSEL_PBASEL_MASK 0x00070000 #define AVR32_PM_CKSEL_PBASEL_OFFSET 16 #define AVR32_PM_CKSEL_PBASEL_SIZE 3 #define AVR32_PM_CKSEL_PBBDIV 31 #define AVR32_PM_CKSEL_PBBDIV_MASK 0x80000000 #define AVR32_PM_CKSEL_PBBDIV_OFFSET 31 #define AVR32_PM_CKSEL_PBBDIV_SIZE 1 #define AVR32_PM_CKSEL_PBBSEL 24 #define AVR32_PM_CKSEL_PBBSEL_MASK 0x07000000 #define AVR32_PM_CKSEL_PBBSEL_OFFSET 24 #define AVR32_PM_CKSEL_PBBSEL_SIZE 3 #define AVR32_PM_CLKMASK 0x00000008 #define AVR32_PM_CPUDIV 7 #define AVR32_PM_CPUDIV_MASK 0x00000080 #define AVR32_PM_CPUDIV_OFFSET 7 #define AVR32_PM_CPUDIV_SIZE 1 #define AVR32_PM_CPUERR 7 #define AVR32_PM_CPUERR_MASK 0x00000080 #define AVR32_PM_CPUERR_OFFSET 7 #define AVR32_PM_CPUERR_SIZE 1 #define AVR32_PM_CPUMASK 0x00000008 #define AVR32_PM_CPUSEL 0 #define AVR32_PM_CPUSEL_MASK 0x00000007 #define AVR32_PM_CPUSEL_OFFSET 0 #define AVR32_PM_CPUSEL_SIZE 3 #define AVR32_PM_CRYSTAL 0x00000001 #define AVR32_PM_CRYSTAL_G0 0x00000004 #define AVR32_PM_CRYSTAL_G1 0x00000005 #define AVR32_PM_CRYSTAL_G2 0x00000006 #define AVR32_PM_CRYSTAL_G3 0x00000007 #define AVR32_PM_CTRL 8 #define AVR32_PM_CTRL_ENABLED 0x00000001 #define AVR32_PM_CTRL_ENABLED_NORESET 0x00000002 #define AVR32_PM_CTRL_MASK 0x00000300 #define AVR32_PM_CTRL_OFF1 0x00000000 #define AVR32_PM_CTRL_OFF2 0x00000003 #define AVR32_PM_CTRL_OFFSET 8 #define AVR32_PM_CTRL_SIZE 2 #define AVR32_PM_DIV 8 #define AVR32_PM_DIVEN 4 #define AVR32_PM_DIVEN_MASK 0x00000010 #define AVR32_PM_DIVEN_OFFSET 4 #define AVR32_PM_DIVEN_SIZE 1 #define AVR32_PM_DIV_MASK 0x0000ff00 #define AVR32_PM_DIV_OFFSET 8 #define AVR32_PM_DIV_SIZE 8 #define AVR32_PM_ENABLED 0x00000001 #define AVR32_PM_ENABLED_NORESET 0x00000002 #define AVR32_PM_EXT 2 #define AVR32_PM_EXT_CLOCK 0x00000000 #define AVR32_PM_EXT_MASK 0x00000004 #define AVR32_PM_EXT_OFFSET 2 #define AVR32_PM_EXT_SIZE 1 #define AVR32_PM_FCD 16 #define AVR32_PM_FCD_MASK 0x00010000 #define AVR32_PM_FCD_OFFSET 16 #define AVR32_PM_FCD_SIZE 1 #define AVR32_PM_GCCTRL 0x00000060 #define AVR32_PM_GCCTRL_CEN 2 #define AVR32_PM_GCCTRL_CEN_MASK 0x00000004 #define AVR32_PM_GCCTRL_CEN_OFFSET 2 #define AVR32_PM_GCCTRL_CEN_SIZE 1 #define AVR32_PM_GCCTRL_DIV 8 #define AVR32_PM_GCCTRL_DIVEN 4 #define AVR32_PM_GCCTRL_DIVEN_MASK 0x00000010 #define AVR32_PM_GCCTRL_DIVEN_OFFSET 4 #define AVR32_PM_GCCTRL_DIVEN_SIZE 1 #define AVR32_PM_GCCTRL_DIV_MASK 0x0000ff00 #define AVR32_PM_GCCTRL_DIV_OFFSET 8 #define AVR32_PM_GCCTRL_DIV_SIZE 8 #define AVR32_PM_GCCTRL_OSCSEL 0 #define AVR32_PM_GCCTRL_OSCSEL_MASK 0x00000001 #define AVR32_PM_GCCTRL_OSCSEL_OFFSET 0 #define AVR32_PM_GCCTRL_OSCSEL_SIZE 1 #define AVR32_PM_GCCTRL_PLLSEL 1 #define AVR32_PM_GCCTRL_PLLSEL_MASK 0x00000002 #define AVR32_PM_GCCTRL_PLLSEL_OFFSET 1 #define AVR32_PM_GCCTRL_PLLSEL_SIZE 1 #define AVR32_PM_GPLP 0x00000200 #define AVR32_PM_HSBDIV 15 #define AVR32_PM_HSBDIV_MASK 0x00008000 #define AVR32_PM_HSBDIV_OFFSET 15 #define AVR32_PM_HSBDIV_SIZE 1 #define AVR32_PM_HSBMASK 0x0000000c #define AVR32_PM_HSBSEL 8 #define AVR32_PM_HSBSEL_MASK 0x00000700 #define AVR32_PM_HSBSEL_OFFSET 8 #define AVR32_PM_HSBSEL_SIZE 3 #define AVR32_PM_HYST 6 #define AVR32_PM_HYST_MASK 0x00000040 #define AVR32_PM_HYST_OFFSET 6 #define AVR32_PM_HYST_SIZE 1 #define AVR32_PM_ICR 0x00000050 #define AVR32_PM_ICR_BODDET 16 #define AVR32_PM_ICR_BODDET_MASK 0x00010000 #define AVR32_PM_ICR_BODDET_OFFSET 16 #define AVR32_PM_ICR_BODDET_SIZE 1 #define AVR32_PM_ICR_CKRDY 5 #define AVR32_PM_ICR_CKRDY_MASK 0x00000020 #define AVR32_PM_ICR_CKRDY_OFFSET 5 #define AVR32_PM_ICR_CKRDY_SIZE 1 #define AVR32_PM_ICR_LOCK0 0 #define AVR32_PM_ICR_LOCK0_MASK 0x00000001 #define AVR32_PM_ICR_LOCK0_OFFSET 0 #define AVR32_PM_ICR_LOCK0_SIZE 1 #define AVR32_PM_ICR_LOCK1 1 #define AVR32_PM_ICR_LOCK1_MASK 0x00000002 #define AVR32_PM_ICR_LOCK1_OFFSET 1 #define AVR32_PM_ICR_LOCK1_SIZE 1 #define AVR32_PM_ICR_MSKRDY 6 #define AVR32_PM_ICR_MSKRDY_MASK 0x00000040 #define AVR32_PM_ICR_MSKRDY_OFFSET 6 #define AVR32_PM_ICR_MSKRDY_SIZE 1 #define AVR32_PM_ICR_OSC0RDY 7 #define AVR32_PM_ICR_OSC0RDY_MASK 0x00000080 #define AVR32_PM_ICR_OSC0RDY_OFFSET 7 #define AVR32_PM_ICR_OSC0RDY_SIZE 1 #define AVR32_PM_ICR_OSC1RDY 8 #define AVR32_PM_ICR_OSC1RDY_MASK 0x00000100 #define AVR32_PM_ICR_OSC1RDY_OFFSET 8 #define AVR32_PM_ICR_OSC1RDY_SIZE 1 #define AVR32_PM_ICR_OSC32RDY 9 #define AVR32_PM_ICR_OSC32RDY_MASK 0x00000200 #define AVR32_PM_ICR_OSC32RDY_OFFSET 9 #define AVR32_PM_ICR_OSC32RDY_SIZE 1 #define AVR32_PM_IDR 0x00000044 #define AVR32_PM_IDR_BODDET 16 #define AVR32_PM_IDR_BODDET_MASK 0x00010000 #define AVR32_PM_IDR_BODDET_OFFSET 16 #define AVR32_PM_IDR_BODDET_SIZE 1 #define AVR32_PM_IDR_CKRDY 5 #define AVR32_PM_IDR_CKRDY_MASK 0x00000020 #define AVR32_PM_IDR_CKRDY_OFFSET 5 #define AVR32_PM_IDR_CKRDY_SIZE 1 #define AVR32_PM_IDR_LOCK0 0 #define AVR32_PM_IDR_LOCK0_MASK 0x00000001 #define AVR32_PM_IDR_LOCK0_OFFSET 0 #define AVR32_PM_IDR_LOCK0_SIZE 1 #define AVR32_PM_IDR_LOCK1 1 #define AVR32_PM_IDR_LOCK1_MASK 0x00000002 #define AVR32_PM_IDR_LOCK1_OFFSET 1 #define AVR32_PM_IDR_LOCK1_SIZE 1 #define AVR32_PM_IDR_MSKRDY 6 #define AVR32_PM_IDR_MSKRDY_MASK 0x00000040 #define AVR32_PM_IDR_MSKRDY_OFFSET 6 #define AVR32_PM_IDR_MSKRDY_SIZE 1 #define AVR32_PM_IDR_OSC0RDY 7 #define AVR32_PM_IDR_OSC0RDY_MASK 0x00000080 #define AVR32_PM_IDR_OSC0RDY_OFFSET 7 #define AVR32_PM_IDR_OSC0RDY_SIZE 1 #define AVR32_PM_IDR_OSC1RDY 8 #define AVR32_PM_IDR_OSC1RDY_MASK 0x00000100 #define AVR32_PM_IDR_OSC1RDY_OFFSET 8 #define AVR32_PM_IDR_OSC1RDY_SIZE 1 #define AVR32_PM_IDR_OSC32RDY 9 #define AVR32_PM_IDR_OSC32RDY_MASK 0x00000200 #define AVR32_PM_IDR_OSC32RDY_OFFSET 9 #define AVR32_PM_IDR_OSC32RDY_SIZE 1 #define AVR32_PM_IER 0x00000040 #define AVR32_PM_IER_BODDET 16 #define AVR32_PM_IER_BODDET_MASK 0x00010000 #define AVR32_PM_IER_BODDET_OFFSET 16 #define AVR32_PM_IER_BODDET_SIZE 1 #define AVR32_PM_IER_CKRDY 5 #define AVR32_PM_IER_CKRDY_MASK 0x00000020 #define AVR32_PM_IER_CKRDY_OFFSET 5 #define AVR32_PM_IER_CKRDY_SIZE 1 #define AVR32_PM_IER_LOCK0 0 #define AVR32_PM_IER_LOCK0_MASK 0x00000001 #define AVR32_PM_IER_LOCK0_OFFSET 0 #define AVR32_PM_IER_LOCK0_SIZE 1 #define AVR32_PM_IER_LOCK1 1 #define AVR32_PM_IER_LOCK1_MASK 0x00000002 #define AVR32_PM_IER_LOCK1_OFFSET 1 #define AVR32_PM_IER_LOCK1_SIZE 1 #define AVR32_PM_IER_MSKRDY 6 #define AVR32_PM_IER_MSKRDY_MASK 0x00000040 #define AVR32_PM_IER_MSKRDY_OFFSET 6 #define AVR32_PM_IER_MSKRDY_SIZE 1 #define AVR32_PM_IER_OSC0RDY 7 #define AVR32_PM_IER_OSC0RDY_MASK 0x00000080 #define AVR32_PM_IER_OSC0RDY_OFFSET 7 #define AVR32_PM_IER_OSC0RDY_SIZE 1 #define AVR32_PM_IER_OSC1RDY 8 #define AVR32_PM_IER_OSC1RDY_MASK 0x00000100 #define AVR32_PM_IER_OSC1RDY_OFFSET 8 #define AVR32_PM_IER_OSC1RDY_SIZE 1 #define AVR32_PM_IER_OSC32RDY 9 #define AVR32_PM_IER_OSC32RDY_MASK 0x00000200 #define AVR32_PM_IER_OSC32RDY_OFFSET 9 #define AVR32_PM_IER_OSC32RDY_SIZE 1 #define AVR32_PM_IMR 0x00000048 #define AVR32_PM_IMR_BODDET 16 #define AVR32_PM_IMR_BODDET_MASK 0x00010000 #define AVR32_PM_IMR_BODDET_OFFSET 16 #define AVR32_PM_IMR_BODDET_SIZE 1 #define AVR32_PM_IMR_CKRDY 5 #define AVR32_PM_IMR_CKRDY_MASK 0x00000020 #define AVR32_PM_IMR_CKRDY_OFFSET 5 #define AVR32_PM_IMR_CKRDY_SIZE 1 #define AVR32_PM_IMR_LOCK0 0 #define AVR32_PM_IMR_LOCK0_MASK 0x00000001 #define AVR32_PM_IMR_LOCK0_OFFSET 0 #define AVR32_PM_IMR_LOCK0_SIZE 1 #define AVR32_PM_IMR_LOCK1 1 #define AVR32_PM_IMR_LOCK1_MASK 0x00000002 #define AVR32_PM_IMR_LOCK1_OFFSET 1 #define AVR32_PM_IMR_LOCK1_SIZE 1 #define AVR32_PM_IMR_MSKRDY 6 #define AVR32_PM_IMR_MSKRDY_MASK 0x00000040 #define AVR32_PM_IMR_MSKRDY_OFFSET 6 #define AVR32_PM_IMR_MSKRDY_SIZE 1 #define AVR32_PM_IMR_OSC0RDY 7 #define AVR32_PM_IMR_OSC0RDY_MASK 0x00000080 #define AVR32_PM_IMR_OSC0RDY_OFFSET 7 #define AVR32_PM_IMR_OSC0RDY_SIZE 1 #define AVR32_PM_IMR_OSC1RDY 8 #define AVR32_PM_IMR_OSC1RDY_MASK 0x00000100 #define AVR32_PM_IMR_OSC1RDY_OFFSET 8 #define AVR32_PM_IMR_OSC1RDY_SIZE 1 #define AVR32_PM_IMR_OSC32RDY 9 #define AVR32_PM_IMR_OSC32RDY_MASK 0x00000200 #define AVR32_PM_IMR_OSC32RDY_OFFSET 9 #define AVR32_PM_IMR_OSC32RDY_SIZE 1 #define AVR32_PM_ISR 0x0000004c #define AVR32_PM_ISR_BODDET 16 #define AVR32_PM_ISR_BODDET_MASK 0x00010000 #define AVR32_PM_ISR_BODDET_OFFSET 16 #define AVR32_PM_ISR_BODDET_SIZE 1 #define AVR32_PM_ISR_CKRDY 5 #define AVR32_PM_ISR_CKRDY_MASK 0x00000020 #define AVR32_PM_ISR_CKRDY_OFFSET 5 #define AVR32_PM_ISR_CKRDY_SIZE 1 #define AVR32_PM_ISR_LOCK0 0 #define AVR32_PM_ISR_LOCK0_MASK 0x00000001 #define AVR32_PM_ISR_LOCK0_OFFSET 0 #define AVR32_PM_ISR_LOCK0_SIZE 1 #define AVR32_PM_ISR_LOCK1 1 #define AVR32_PM_ISR_LOCK1_MASK 0x00000002 #define AVR32_PM_ISR_LOCK1_OFFSET 1 #define AVR32_PM_ISR_LOCK1_SIZE 1 #define AVR32_PM_ISR_MSKRDY 6 #define AVR32_PM_ISR_MSKRDY_MASK 0x00000040 #define AVR32_PM_ISR_MSKRDY_OFFSET 6 #define AVR32_PM_ISR_MSKRDY_SIZE 1 #define AVR32_PM_ISR_OSC0RDY 7 #define AVR32_PM_ISR_OSC0RDY_MASK 0x00000080 #define AVR32_PM_ISR_OSC0RDY_OFFSET 7 #define AVR32_PM_ISR_OSC0RDY_SIZE 1 #define AVR32_PM_ISR_OSC1RDY 8 #define AVR32_PM_ISR_OSC1RDY_MASK 0x00000100 #define AVR32_PM_ISR_OSC1RDY_OFFSET 8 #define AVR32_PM_ISR_OSC1RDY_SIZE 1 #define AVR32_PM_ISR_OSC32RDY 9 #define AVR32_PM_ISR_OSC32RDY_MASK 0x00000200 #define AVR32_PM_ISR_OSC32RDY_OFFSET 9 #define AVR32_PM_ISR_OSC32RDY_SIZE 1 #define AVR32_PM_JTAG 4 #define AVR32_PM_JTAGHARD 9 #define AVR32_PM_JTAGHARD_MASK 0x00000200 #define AVR32_PM_JTAGHARD_OFFSET 9 #define AVR32_PM_JTAGHARD_SIZE 1 #define AVR32_PM_JTAG_MASK 0x00000010 #define AVR32_PM_JTAG_OFFSET 4 #define AVR32_PM_JTAG_SIZE 1 #define AVR32_PM_KEY 24 #define AVR32_PM_KEY_MASK 0xff000000 #define AVR32_PM_KEY_OFFSET 24 #define AVR32_PM_KEY_SIZE 8 #define AVR32_PM_LEVEL 0 #define AVR32_PM_LEVEL_MASK 0x0000003f #define AVR32_PM_LEVEL_OFFSET 0 #define AVR32_PM_LEVEL_SIZE 6 #define AVR32_PM_LOCK0 0 #define AVR32_PM_LOCK0_MASK 0x00000001 #define AVR32_PM_LOCK0_OFFSET 0 #define AVR32_PM_LOCK0_SIZE 1 #define AVR32_PM_LOCK1 1 #define AVR32_PM_LOCK1_MASK 0x00000002 #define AVR32_PM_LOCK1_OFFSET 1 #define AVR32_PM_LOCK1_SIZE 1 #define AVR32_PM_MCCTRL 0x00000000 #define AVR32_PM_MCCTRL_MCSEL 0 #define AVR32_PM_MCCTRL_MCSEL_MASK 0x00000003 #define AVR32_PM_MCCTRL_MCSEL_OFFSET 0 #define AVR32_PM_MCCTRL_MCSEL_OSC0 0x00000001 #define AVR32_PM_MCCTRL_MCSEL_PLL0 0x00000002 #define AVR32_PM_MCCTRL_MCSEL_SIZE 2 #define AVR32_PM_MCCTRL_MCSEL_SLOW 0x00000000 #define AVR32_PM_MCCTRL_OSC0EN 2 #define AVR32_PM_MCCTRL_OSC0EN_MASK 0x00000004 #define AVR32_PM_MCCTRL_OSC0EN_OFFSET 2 #define AVR32_PM_MCCTRL_OSC0EN_SIZE 1 #define AVR32_PM_MCCTRL_OSC1EN 3 #define AVR32_PM_MCCTRL_OSC1EN_MASK 0x00000008 #define AVR32_PM_MCCTRL_OSC1EN_OFFSET 3 #define AVR32_PM_MCCTRL_OSC1EN_SIZE 1 #define AVR32_PM_MCSEL 0 #define AVR32_PM_MCSEL_MASK 0x00000003 #define AVR32_PM_MCSEL_OFFSET 0 #define AVR32_PM_MCSEL_OSC0 0x00000001 #define AVR32_PM_MCSEL_PLL0 0x00000002 #define AVR32_PM_MCSEL_SIZE 2 #define AVR32_PM_MCSEL_SLOW 0x00000000 #define AVR32_PM_MODE_CRYSTAL 0x00000001 #define AVR32_PM_MODE_CRYSTAL_G0 0x00000004 #define AVR32_PM_MODE_CRYSTAL_G1 0x00000005 #define AVR32_PM_MODE_CRYSTAL_G2 0x00000006 #define AVR32_PM_MODE_CRYSTAL_G3 0x00000007 #define AVR32_PM_MODE_EXT_CLOCK 0x00000000 #define AVR32_PM_MODE_SIZE 3 #define AVR32_PM_MSKRDY 6 #define AVR32_PM_MSKRDY_MASK 0x00000040 #define AVR32_PM_MSKRDY_OFFSET 6 #define AVR32_PM_MSKRDY_SIZE 1 #define AVR32_PM_OCDRST 8 #define AVR32_PM_OCDRST_MASK 0x00000100 #define AVR32_PM_OCDRST_OFFSET 8 #define AVR32_PM_OCDRST_SIZE 1 #define AVR32_PM_OFF1 0x00000000 #define AVR32_PM_OFF2 0x00000003 #define AVR32_PM_OSC0 0x00000001 #define AVR32_PM_OSC0EN 2 #define AVR32_PM_OSC0EN_MASK 0x00000004 #define AVR32_PM_OSC0EN_OFFSET 2 #define AVR32_PM_OSC0EN_SIZE 1 #define AVR32_PM_OSC0RDY 7 #define AVR32_PM_OSC0RDY_MASK 0x00000080 #define AVR32_PM_OSC0RDY_OFFSET 7 #define AVR32_PM_OSC0RDY_SIZE 1 #define AVR32_PM_OSC1EN 3 #define AVR32_PM_OSC1EN_MASK 0x00000008 #define AVR32_PM_OSC1EN_OFFSET 3 #define AVR32_PM_OSC1EN_SIZE 1 #define AVR32_PM_OSC1RDY 8 #define AVR32_PM_OSC1RDY_MASK 0x00000100 #define AVR32_PM_OSC1RDY_OFFSET 8 #define AVR32_PM_OSC1RDY_SIZE 1 #define AVR32_PM_OSC32EN 0 #define AVR32_PM_OSC32EN_MASK 0x00000001 #define AVR32_PM_OSC32EN_OFFSET 0 #define AVR32_PM_OSC32EN_SIZE 1 #define AVR32_PM_OSC32RDY 9 #define AVR32_PM_OSC32RDY_MASK 0x00000200 #define AVR32_PM_OSC32RDY_OFFSET 9 #define AVR32_PM_OSC32RDY_SIZE 1 #define AVR32_PM_OSCCTRL0 0x00000028 #define AVR32_PM_OSCCTRL0_MODE 0 #define AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G0 0x00000004 #define AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G1 0x00000005 #define AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G2 0x00000006 #define AVR32_PM_OSCCTRL0_MODE_CRYSTAL_G3 0x00000007 #define AVR32_PM_OSCCTRL0_MODE_EXT_CLOCK 0x00000000 #define AVR32_PM_OSCCTRL0_MODE_MASK 0x00000007 #define AVR32_PM_OSCCTRL0_MODE_OFFSET 0 #define AVR32_PM_OSCCTRL0_MODE_SIZE 3 #define AVR32_PM_OSCCTRL0_STARTUP 8 #define AVR32_PM_OSCCTRL0_STARTUP_0_RCOSC 0x00000000 #define AVR32_PM_OSCCTRL0_STARTUP_128_RCOSC 0x00000002 #define AVR32_PM_OSCCTRL0_STARTUP_16384_RCOSC 0x00000006 #define AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC 0x00000003 #define AVR32_PM_OSCCTRL0_STARTUP_4096_RCOSC 0x00000004 #define AVR32_PM_OSCCTRL0_STARTUP_64_RCOSC 0x00000001 #define AVR32_PM_OSCCTRL0_STARTUP_8192_RCOSC 0x00000005 #define AVR32_PM_OSCCTRL0_STARTUP_MASK 0x00000700 #define AVR32_PM_OSCCTRL0_STARTUP_OFFSET 8 #define AVR32_PM_OSCCTRL0_STARTUP_SIZE 3 #define AVR32_PM_OSCCTRL1 0x0000002c #define AVR32_PM_OSCCTRL1_MODE 0 #define AVR32_PM_OSCCTRL1_MODE_CRYSTAL_G0 0x00000004 #define AVR32_PM_OSCCTRL1_MODE_CRYSTAL_G1 0x00000005 #define AVR32_PM_OSCCTRL1_MODE_CRYSTAL_G2 0x00000006 #define AVR32_PM_OSCCTRL1_MODE_CRYSTAL_G3 0x00000007 #define AVR32_PM_OSCCTRL1_MODE_EXT_CLOCK 0x00000000 #define AVR32_PM_OSCCTRL1_MODE_MASK 0x00000007 #define AVR32_PM_OSCCTRL1_MODE_OFFSET 0 #define AVR32_PM_OSCCTRL1_MODE_SIZE 3 #define AVR32_PM_OSCCTRL1_STARTUP 8 #define AVR32_PM_OSCCTRL1_STARTUP_0_RCOSC 0x00000000 #define AVR32_PM_OSCCTRL1_STARTUP_128_RCOSC 0x00000002 #define AVR32_PM_OSCCTRL1_STARTUP_16384_RCOSC 0x00000006 #define AVR32_PM_OSCCTRL1_STARTUP_2048_RCOSC 0x00000003 #define AVR32_PM_OSCCTRL1_STARTUP_4096_RCOSC 0x00000004 #define AVR32_PM_OSCCTRL1_STARTUP_64_RCOSC 0x00000001 #define AVR32_PM_OSCCTRL1_STARTUP_8192_RCOSC 0x00000005 #define AVR32_PM_OSCCTRL1_STARTUP_MASK 0x00000700 #define AVR32_PM_OSCCTRL1_STARTUP_OFFSET 8 #define AVR32_PM_OSCCTRL1_STARTUP_SIZE 3 #define AVR32_PM_OSCCTRL32 0x00000030 #define AVR32_PM_OSCCTRL32_MODE 8 #define AVR32_PM_OSCCTRL32_MODE_CRYSTAL 0x00000001 #define AVR32_PM_OSCCTRL32_MODE_EXT_CLOCK 0x00000000 #define AVR32_PM_OSCCTRL32_MODE_MASK 0x00000700 #define AVR32_PM_OSCCTRL32_MODE_OFFSET 8 #define AVR32_PM_OSCCTRL32_MODE_SIZE 3 #define AVR32_PM_OSCCTRL32_OSC32EN 0 #define AVR32_PM_OSCCTRL32_OSC32EN_MASK 0x00000001 #define AVR32_PM_OSCCTRL32_OSC32EN_OFFSET 0 #define AVR32_PM_OSCCTRL32_OSC32EN_SIZE 1 #define AVR32_PM_OSCCTRL32_STARTUP 16 #define AVR32_PM_OSCCTRL32_STARTUP_0_RCOSC 0x00000000 #define AVR32_PM_OSCCTRL32_STARTUP_128_RCOSC 0x00000001 #define AVR32_PM_OSCCTRL32_STARTUP_131072_RCOSC 0x00000005 #define AVR32_PM_OSCCTRL32_STARTUP_16384_RCOSC 0x00000003 #define AVR32_PM_OSCCTRL32_STARTUP_262144_RCOSC 0x00000006 #define AVR32_PM_OSCCTRL32_STARTUP_524288_RCOSC 0x00000007 #define AVR32_PM_OSCCTRL32_STARTUP_65536_RCOSC 0x00000004 #define AVR32_PM_OSCCTRL32_STARTUP_8192_RCOSC 0x00000002 #define AVR32_PM_OSCCTRL32_STARTUP_MASK 0x00070000 #define AVR32_PM_OSCCTRL32_STARTUP_OFFSET 16 #define AVR32_PM_OSCCTRL32_STARTUP_SIZE 3 #define AVR32_PM_OSCSEL 0 #define AVR32_PM_OSCSEL_MASK 0x00000001 #define AVR32_PM_OSCSEL_OFFSET 0 #define AVR32_PM_OSCSEL_SIZE 1 #define AVR32_PM_PBADIV 23 #define AVR32_PM_PBADIV_MASK 0x00800000 #define AVR32_PM_PBADIV_OFFSET 23 #define AVR32_PM_PBADIV_SIZE 1 #define AVR32_PM_PBAMASK 0x00000010 #define AVR32_PM_PBASEL 16 #define AVR32_PM_PBASEL_MASK 0x00070000 #define AVR32_PM_PBASEL_OFFSET 16 #define AVR32_PM_PBASEL_SIZE 3 #define AVR32_PM_PBBDIV 31 #define AVR32_PM_PBBDIV_MASK 0x80000000 #define AVR32_PM_PBBDIV_OFFSET 31 #define AVR32_PM_PBBDIV_SIZE 1 #define AVR32_PM_PBBMASK 0x00000014 #define AVR32_PM_PBBSEL 24 #define AVR32_PM_PBBSEL_MASK 0x07000000 #define AVR32_PM_PBBSEL_OFFSET 24 #define AVR32_PM_PBBSEL_SIZE 3 #define AVR32_PM_PLL0 0x00000020 #define AVR32_PM_PLL0_PLLBPL 7 #define AVR32_PM_PLL0_PLLBPL_MASK 0x00000080 #define AVR32_PM_PLL0_PLLBPL_OFFSET 7 #define AVR32_PM_PLL0_PLLBPL_SIZE 1 #define AVR32_PM_PLL0_PLLCOUNT 24 #define AVR32_PM_PLL0_PLLCOUNT_MASK 0x3f000000 #define AVR32_PM_PLL0_PLLCOUNT_OFFSET 24 #define AVR32_PM_PLL0_PLLCOUNT_SIZE 6 #define AVR32_PM_PLL0_PLLDIV 8 #define AVR32_PM_PLL0_PLLDIV_MASK 0x00000f00 #define AVR32_PM_PLL0_PLLDIV_OFFSET 8 #define AVR32_PM_PLL0_PLLDIV_SIZE 4 #define AVR32_PM_PLL0_PLLEN 0 #define AVR32_PM_PLL0_PLLEN_MASK 0x00000001 #define AVR32_PM_PLL0_PLLEN_OFFSET 0 #define AVR32_PM_PLL0_PLLEN_SIZE 1 #define AVR32_PM_PLL0_PLLIOTESTEN 30 #define AVR32_PM_PLL0_PLLIOTESTEN_MASK 0x40000000 #define AVR32_PM_PLL0_PLLIOTESTEN_OFFSET 30 #define AVR32_PM_PLL0_PLLIOTESTEN_SIZE 1 #define AVR32_PM_PLL0_PLLMUL 16 #define AVR32_PM_PLL0_PLLMUL_MASK 0x000f0000 #define AVR32_PM_PLL0_PLLMUL_OFFSET 16 #define AVR32_PM_PLL0_PLLMUL_SIZE 4 #define AVR32_PM_PLL0_PLLOPT 2 #define AVR32_PM_PLL0_PLLOPT_MASK 0x0000001c #define AVR32_PM_PLL0_PLLOPT_OFFSET 2 #define AVR32_PM_PLL0_PLLOPT_SIZE 3 #define AVR32_PM_PLL0_PLLOSC 1 #define AVR32_PM_PLL0_PLLOSC_MASK 0x00000002 #define AVR32_PM_PLL0_PLLOSC_OFFSET 1 #define AVR32_PM_PLL0_PLLOSC_SIZE 1 #define AVR32_PM_PLL0_PLLTEST 31 #define AVR32_PM_PLL0_PLLTEST_MASK 0x80000000 #define AVR32_PM_PLL0_PLLTEST_OFFSET 31 #define AVR32_PM_PLL0_PLLTEST_SIZE 1 #define AVR32_PM_PLL1 0x00000024 #define AVR32_PM_PLL1_PLLBPL 7 #define AVR32_PM_PLL1_PLLBPL_MASK 0x00000080 #define AVR32_PM_PLL1_PLLBPL_OFFSET 7 #define AVR32_PM_PLL1_PLLBPL_SIZE 1 #define AVR32_PM_PLL1_PLLCOUNT 24 #define AVR32_PM_PLL1_PLLCOUNT_MASK 0x3f000000 #define AVR32_PM_PLL1_PLLCOUNT_OFFSET 24 #define AVR32_PM_PLL1_PLLCOUNT_SIZE 6 #define AVR32_PM_PLL1_PLLDIV 8 #define AVR32_PM_PLL1_PLLDIV_MASK 0x00000f00 #define AVR32_PM_PLL1_PLLDIV_OFFSET 8 #define AVR32_PM_PLL1_PLLDIV_SIZE 4 #define AVR32_PM_PLL1_PLLEN 0 #define AVR32_PM_PLL1_PLLEN_MASK 0x00000001 #define AVR32_PM_PLL1_PLLEN_OFFSET 0 #define AVR32_PM_PLL1_PLLEN_SIZE 1 #define AVR32_PM_PLL1_PLLIOTESTEN 30 #define AVR32_PM_PLL1_PLLIOTESTEN_MASK 0x40000000 #define AVR32_PM_PLL1_PLLIOTESTEN_OFFSET 30 #define AVR32_PM_PLL1_PLLIOTESTEN_SIZE 1 #define AVR32_PM_PLL1_PLLMUL 16 #define AVR32_PM_PLL1_PLLMUL_MASK 0x000f0000 #define AVR32_PM_PLL1_PLLMUL_OFFSET 16 #define AVR32_PM_PLL1_PLLMUL_SIZE 4 #define AVR32_PM_PLL1_PLLOPT 2 #define AVR32_PM_PLL1_PLLOPT_MASK 0x0000001c #define AVR32_PM_PLL1_PLLOPT_OFFSET 2 #define AVR32_PM_PLL1_PLLOPT_SIZE 3 #define AVR32_PM_PLL1_PLLOSC 1 #define AVR32_PM_PLL1_PLLOSC_MASK 0x00000002 #define AVR32_PM_PLL1_PLLOSC_OFFSET 1 #define AVR32_PM_PLL1_PLLOSC_SIZE 1 #define AVR32_PM_PLL1_PLLTEST 31 #define AVR32_PM_PLL1_PLLTEST_MASK 0x80000000 #define AVR32_PM_PLL1_PLLTEST_OFFSET 31 #define AVR32_PM_PLL1_PLLTEST_SIZE 1 #define AVR32_PM_PLLBPL 7 #define AVR32_PM_PLLBPL_MASK 0x00000080 #define AVR32_PM_PLLBPL_OFFSET 7 #define AVR32_PM_PLLBPL_SIZE 1 #define AVR32_PM_PLLCOUNT 24 #define AVR32_PM_PLLCOUNT_MASK 0x3f000000 #define AVR32_PM_PLLCOUNT_OFFSET 24 #define AVR32_PM_PLLCOUNT_SIZE 6 #define AVR32_PM_PLLDIV 8 #define AVR32_PM_PLLDIV_MASK 0x00000f00 #define AVR32_PM_PLLDIV_OFFSET 8 #define AVR32_PM_PLLDIV_SIZE 4 #define AVR32_PM_PLLEN 0 #define AVR32_PM_PLLEN_MASK 0x00000001 #define AVR32_PM_PLLEN_OFFSET 0 #define AVR32_PM_PLLEN_SIZE 1 #define AVR32_PM_PLLIOTESTEN 30 #define AVR32_PM_PLLIOTESTEN_MASK 0x40000000 #define AVR32_PM_PLLIOTESTEN_OFFSET 30 #define AVR32_PM_PLLIOTESTEN_SIZE 1 #define AVR32_PM_PLLMUL 16 #define AVR32_PM_PLLMUL_MASK 0x000f0000 #define AVR32_PM_PLLMUL_OFFSET 16 #define AVR32_PM_PLLMUL_SIZE 4 #define AVR32_PM_PLLOPT 2 #define AVR32_PM_PLLOPT_MASK 0x0000001c #define AVR32_PM_PLLOPT_OFFSET 2 #define AVR32_PM_PLLOPT_SIZE 3 #define AVR32_PM_PLLOSC 1 #define AVR32_PM_PLLOSC_MASK 0x00000002 #define AVR32_PM_PLLOSC_OFFSET 1 #define AVR32_PM_PLLOSC_SIZE 1 #define AVR32_PM_PLLSEL 1 #define AVR32_PM_PLLSEL_MASK 0x00000002 #define AVR32_PM_PLLSEL_OFFSET 1 #define AVR32_PM_PLLSEL_SIZE 1 #define AVR32_PM_PLLTEST 31 #define AVR32_PM_PLLTEST_MASK 0x80000000 #define AVR32_PM_PLLTEST_OFFSET 31 #define AVR32_PM_PLLTEST_SIZE 1 #define AVR32_PM_POR 0 #define AVR32_PM_POR_MASK 0x00000001 #define AVR32_PM_POR_OFFSET 0 #define AVR32_PM_POR_SIZE 1 #define AVR32_PM_POSCSR 0x00000054 #define AVR32_PM_POSCSR_BODDET 16 #define AVR32_PM_POSCSR_BODDET_MASK 0x00010000 #define AVR32_PM_POSCSR_BODDET_OFFSET 16 #define AVR32_PM_POSCSR_BODDET_SIZE 1 #define AVR32_PM_POSCSR_CKRDY 5 #define AVR32_PM_POSCSR_CKRDY_MASK 0x00000020 #define AVR32_PM_POSCSR_CKRDY_OFFSET 5 #define AVR32_PM_POSCSR_CKRDY_SIZE 1 #define AVR32_PM_POSCSR_LOCK0 0 #define AVR32_PM_POSCSR_LOCK0_MASK 0x00000001 #define AVR32_PM_POSCSR_LOCK0_OFFSET 0 #define AVR32_PM_POSCSR_LOCK0_SIZE 1 #define AVR32_PM_POSCSR_LOCK1 1 #define AVR32_PM_POSCSR_LOCK1_MASK 0x00000002 #define AVR32_PM_POSCSR_LOCK1_OFFSET 1 #define AVR32_PM_POSCSR_LOCK1_SIZE 1 #define AVR32_PM_POSCSR_MSKRDY 6 #define AVR32_PM_POSCSR_MSKRDY_MASK 0x00000040 #define AVR32_PM_POSCSR_MSKRDY_OFFSET 6 #define AVR32_PM_POSCSR_MSKRDY_SIZE 1 #define AVR32_PM_POSCSR_OSC0RDY 7 #define AVR32_PM_POSCSR_OSC0RDY_MASK 0x00000080 #define AVR32_PM_POSCSR_OSC0RDY_OFFSET 7 #define AVR32_PM_POSCSR_OSC0RDY_SIZE 1 #define AVR32_PM_POSCSR_OSC1RDY 8 #define AVR32_PM_POSCSR_OSC1RDY_MASK 0x00000100 #define AVR32_PM_POSCSR_OSC1RDY_OFFSET 8 #define AVR32_PM_POSCSR_OSC1RDY_SIZE 1 #define AVR32_PM_POSCSR_OSC32RDY 9 #define AVR32_PM_POSCSR_OSC32RDY_MASK 0x00000200 #define AVR32_PM_POSCSR_OSC32RDY_OFFSET 9 #define AVR32_PM_POSCSR_OSC32RDY_SIZE 1 #define AVR32_PM_POSCSR_VMRDY 4 #define AVR32_PM_POSCSR_VMRDY_MASK 0x00000010 #define AVR32_PM_POSCSR_VMRDY_OFFSET 4 #define AVR32_PM_POSCSR_VMRDY_SIZE 1 #define AVR32_PM_POSCSR_VOK 3 #define AVR32_PM_POSCSR_VOK_MASK 0x00000008 #define AVR32_PM_POSCSR_VOK_OFFSET 3 #define AVR32_PM_POSCSR_VOK_SIZE 1 #define AVR32_PM_POSCSR_WAKE 2 #define AVR32_PM_POSCSR_WAKE_MASK 0x00000004 #define AVR32_PM_POSCSR_WAKE_OFFSET 2 #define AVR32_PM_POSCSR_WAKE_SIZE 1 #define AVR32_PM_RCAUSE 0x00000140 #define AVR32_PM_RCAUSE_BOD 1 #define AVR32_PM_RCAUSE_BOD_MASK 0x00000002 #define AVR32_PM_RCAUSE_BOD_OFFSET 1 #define AVR32_PM_RCAUSE_BOD_SIZE 1 #define AVR32_PM_RCAUSE_CPUERR 7 #define AVR32_PM_RCAUSE_CPUERR_MASK 0x00000080 #define AVR32_PM_RCAUSE_CPUERR_OFFSET 7 #define AVR32_PM_RCAUSE_CPUERR_SIZE 1 #define AVR32_PM_RCAUSE_EXT 2 #define AVR32_PM_RCAUSE_EXT_MASK 0x00000004 #define AVR32_PM_RCAUSE_EXT_OFFSET 2 #define AVR32_PM_RCAUSE_EXT_SIZE 1 #define AVR32_PM_RCAUSE_JTAG 4 #define AVR32_PM_RCAUSE_JTAGHARD 9 #define AVR32_PM_RCAUSE_JTAGHARD_MASK 0x00000200 #define AVR32_PM_RCAUSE_JTAGHARD_OFFSET 9 #define AVR32_PM_RCAUSE_JTAGHARD_SIZE 1 #define AVR32_PM_RCAUSE_JTAG_MASK 0x00000010 #define AVR32_PM_RCAUSE_JTAG_OFFSET 4 #define AVR32_PM_RCAUSE_JTAG_SIZE 1 #define AVR32_PM_RCAUSE_OCDRST 8 #define AVR32_PM_RCAUSE_OCDRST_MASK 0x00000100 #define AVR32_PM_RCAUSE_OCDRST_OFFSET 8 #define AVR32_PM_RCAUSE_OCDRST_SIZE 1 #define AVR32_PM_RCAUSE_POR 0 #define AVR32_PM_RCAUSE_POR_MASK 0x00000001 #define AVR32_PM_RCAUSE_POR_OFFSET 0 #define AVR32_PM_RCAUSE_POR_SIZE 1 #define AVR32_PM_RCAUSE_SLEEP 6 #define AVR32_PM_RCAUSE_SLEEP_MASK 0x00000040 #define AVR32_PM_RCAUSE_SLEEP_OFFSET 6 #define AVR32_PM_RCAUSE_SLEEP_SIZE 1 #define AVR32_PM_RCAUSE_WDT 3 #define AVR32_PM_RCAUSE_WDT_MASK 0x00000008 #define AVR32_PM_RCAUSE_WDT_OFFSET 3 #define AVR32_PM_RCAUSE_WDT_SIZE 1 #define AVR32_PM_RCCR 0x000000c0 #define AVR32_PM_RCCR_CALIB 0 #define AVR32_PM_RCCR_CALIB_MASK 0x000003ff #define AVR32_PM_RCCR_CALIB_OFFSET 0 #define AVR32_PM_RCCR_CALIB_SIZE 10 #define AVR32_PM_RCCR_FCD 16 #define AVR32_PM_RCCR_FCD_MASK 0x00010000 #define AVR32_PM_RCCR_FCD_OFFSET 16 #define AVR32_PM_RCCR_FCD_SIZE 1 #define AVR32_PM_RCCR_KEY 24 #define AVR32_PM_RCCR_KEY_MASK 0xff000000 #define AVR32_PM_RCCR_KEY_OFFSET 24 #define AVR32_PM_RCCR_KEY_SIZE 8 #define AVR32_PM_SLEEP 6 #define AVR32_PM_SLEEP_MASK 0x00000040 #define AVR32_PM_SLEEP_OFFSET 6 #define AVR32_PM_SLEEP_SIZE 1 #define AVR32_PM_SLOW 0x00000000 #define AVR32_PM_STARTUP_SIZE 3 #define AVR32_PM_USB_WAKEN 0 #define AVR32_PM_USB_WAKEN_MASK 0x00000001 #define AVR32_PM_USB_WAKEN_OFFSET 0 #define AVR32_PM_USB_WAKEN_SIZE 1 #define AVR32_PM_VMRDY 4 #define AVR32_PM_VMRDY_MASK 0x00000010 #define AVR32_PM_VMRDY_OFFSET 4 #define AVR32_PM_VMRDY_SIZE 1 #define AVR32_PM_VOK 3 #define AVR32_PM_VOK_MASK 0x00000008 #define AVR32_PM_VOK_OFFSET 3 #define AVR32_PM_VOK_SIZE 1 #define AVR32_PM_VREGCR 0x000000c8 #define AVR32_PM_VREGCR_CALIB 0 #define AVR32_PM_VREGCR_CALIB_MASK 0x00000007 #define AVR32_PM_VREGCR_CALIB_OFFSET 0 #define AVR32_PM_VREGCR_CALIB_SIZE 3 #define AVR32_PM_VREGCR_FCD 16 #define AVR32_PM_VREGCR_FCD_MASK 0x00010000 #define AVR32_PM_VREGCR_FCD_OFFSET 16 #define AVR32_PM_VREGCR_FCD_SIZE 1 #define AVR32_PM_VREGCR_KEY 24 #define AVR32_PM_VREGCR_KEY_MASK 0xff000000 #define AVR32_PM_VREGCR_KEY_OFFSET 24 #define AVR32_PM_VREGCR_KEY_SIZE 8 #define AVR32_PM_WAKE 2 #define AVR32_PM_WAKE_MASK 0x00000004 #define AVR32_PM_WAKE_OFFSET 2 #define AVR32_PM_WAKE_SIZE 1 #define AVR32_PM_WDT 3 #define AVR32_PM_WDT_MASK 0x00000008 #define AVR32_PM_WDT_OFFSET 3 #define AVR32_PM_WDT_SIZE 1 #define AVR32_BGCR_KEY 0x00000055 #define AVR32_BOD_KEY 0x00000055 #define AVR32_BOD_OFF 0x00000000 #define AVR32_BOD_ON 0x00000001 #define AVR32_BOD_ON_NORESET 0x00000002 #define AVR32_GC_DIV_CLOCK 0x00000001 #define AVR32_GC_NO_DIV_CLOCK 0x00000000 #define AVR32_GC_USES_OSC 0x00000000 #define AVR32_GC_USES_OSC0 0x00000000 #define AVR32_GC_USES_OSC1 0x00000001 #define AVR32_GC_USES_PLL 0x00000001 #define AVR32_GC_USES_PLL0 0x00000000 #define AVR32_GC_USES_PLL1 0x00000001 #define AVR32_PLL_USES_OSC0 0x00000000 #define AVR32_PLL_USES_OSC1 0x00000001 #define AVR32_PM_SMODE_DEEPSTOP 0x00000004 #define AVR32_PM_SMODE_FROZEN 0x00000001 #define AVR32_PM_SMODE_IDLE 0x00000000 #define AVR32_PM_SMODE_STANDBY 0x00000002 #define AVR32_PM_SMODE_STATIC 0x00000005 #define AVR32_PM_SMODE_STOP 0x00000003 #define AVR32_RCCR_KEY 0x00000055 #define AVR32_VREGCR_KEY 0x00000055 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_pm_mcctrl_t { unsigned int :28; unsigned int osc1en : 1; unsigned int osc0en : 1; unsigned int mcsel : 2; } avr32_pm_mcctrl_t; typedef struct avr32_pm_cksel_t { unsigned int pbbdiv : 1; unsigned int : 4; unsigned int pbbsel : 3; unsigned int pbadiv : 1; unsigned int : 4; unsigned int pbasel : 3; unsigned int hsbdiv : 1; unsigned int : 4; unsigned int hsbsel : 3; unsigned int cpudiv : 1; unsigned int : 4; unsigned int cpusel : 3; } avr32_pm_cksel_t; typedef struct avr32_pm_pll_t { unsigned int plltest : 1; unsigned int plliotesten : 1; unsigned int pllcount : 6; unsigned int : 4; unsigned int pllmul : 4; unsigned int : 4; unsigned int plldiv : 4; unsigned int pllbpl : 1; unsigned int : 2; unsigned int pllopt : 3; unsigned int pllosc : 1; unsigned int pllen : 1; } avr32_pm_pll_t; typedef struct avr32_pm_oscctrl0_t { unsigned int :21; unsigned int startup : 3; unsigned int : 5; unsigned int mode : 3; } avr32_pm_oscctrl0_t; typedef struct avr32_pm_oscctrl1_t { unsigned int :21; unsigned int startup : 3; unsigned int : 5; unsigned int mode : 3; } avr32_pm_oscctrl1_t; typedef struct avr32_pm_oscctrl32_t { unsigned int :13; unsigned int startup : 3; unsigned int : 5; unsigned int mode : 3; unsigned int : 7; unsigned int osc32en : 1; } avr32_pm_oscctrl32_t; typedef struct avr32_pm_ier_t { unsigned int :15; unsigned int boddet : 1; unsigned int : 6; unsigned int osc32rdy : 1; unsigned int osc1rdy : 1; unsigned int osc0rdy : 1; unsigned int mskrdy : 1; unsigned int ckrdy : 1; unsigned int : 3; unsigned int lock1 : 1; unsigned int lock0 : 1; } avr32_pm_ier_t; typedef struct avr32_pm_idr_t { unsigned int :15; unsigned int boddet : 1; unsigned int : 6; unsigned int osc32rdy : 1; unsigned int osc1rdy : 1; unsigned int osc0rdy : 1; unsigned int mskrdy : 1; unsigned int ckrdy : 1; unsigned int : 3; unsigned int lock1 : 1; unsigned int lock0 : 1; } avr32_pm_idr_t; typedef struct avr32_pm_imr_t { unsigned int :15; unsigned int boddet : 1; unsigned int : 6; unsigned int osc32rdy : 1; unsigned int osc1rdy : 1; unsigned int osc0rdy : 1; unsigned int mskrdy : 1; unsigned int ckrdy : 1; unsigned int : 3; unsigned int lock1 : 1; unsigned int lock0 : 1; } avr32_pm_imr_t; typedef struct avr32_pm_isr_t { unsigned int :15; unsigned int boddet : 1; unsigned int : 6; unsigned int osc32rdy : 1; unsigned int osc1rdy : 1; unsigned int osc0rdy : 1; unsigned int mskrdy : 1; unsigned int ckrdy : 1; unsigned int : 3; unsigned int lock1 : 1; unsigned int lock0 : 1; } avr32_pm_isr_t; typedef struct avr32_pm_icr_t { unsigned int :15; unsigned int boddet : 1; unsigned int : 6; unsigned int osc32rdy : 1; unsigned int osc1rdy : 1; unsigned int osc0rdy : 1; unsigned int mskrdy : 1; unsigned int ckrdy : 1; unsigned int : 3; unsigned int lock1 : 1; unsigned int lock0 : 1; } avr32_pm_icr_t; typedef struct avr32_pm_poscsr_t { unsigned int :15; unsigned int boddet : 1; unsigned int : 6; unsigned int osc32rdy : 1; unsigned int osc1rdy : 1; unsigned int osc0rdy : 1; unsigned int mskrdy : 1; unsigned int ckrdy : 1; unsigned int vmrdy : 1; unsigned int vok : 1; unsigned int wake : 1; unsigned int lock1 : 1; unsigned int lock0 : 1; } avr32_pm_poscsr_t; typedef struct avr32_pm_gcctrl_t { unsigned int :16; unsigned int div : 8; unsigned int : 3; unsigned int diven : 1; unsigned int : 1; unsigned int cen : 1; unsigned int pllsel : 1; unsigned int oscsel : 1; } avr32_pm_gcctrl_t; typedef struct avr32_pm_rccr_t { unsigned int key : 8; unsigned int : 7; unsigned int fcd : 1; unsigned int : 6; unsigned int calib :10; } avr32_pm_rccr_t; typedef struct avr32_pm_bgcr_t { unsigned int key : 8; unsigned int : 7; unsigned int fcd : 1; unsigned int :13; unsigned int calib : 3; } avr32_pm_bgcr_t; typedef struct avr32_pm_vregcr_t { unsigned int key : 8; unsigned int : 7; unsigned int fcd : 1; unsigned int :13; unsigned int calib : 3; } avr32_pm_vregcr_t; typedef struct avr32_pm_bod_t { unsigned int key : 8; unsigned int : 7; unsigned int fcd : 1; unsigned int : 6; unsigned int ctrl : 2; unsigned int : 1; unsigned int hyst : 1; unsigned int level : 6; } avr32_pm_bod_t; typedef struct avr32_pm_rcause_t { unsigned int :22; unsigned int jtaghard : 1; unsigned int ocdrst : 1; unsigned int cpuerr : 1; unsigned int sleep : 1; unsigned int : 1; unsigned int jtag : 1; unsigned int wdt : 1; unsigned int ext : 1; unsigned int bod : 1; unsigned int por : 1; } avr32_pm_rcause_t; typedef struct avr32_pm_awen_t { unsigned int :31; unsigned int usb_waken : 1; } avr32_pm_awen_t; typedef struct avr32_pm_t { union { unsigned long mcctrl ;//0x0000 avr32_pm_mcctrl_t MCCTRL ; }; union { unsigned long cksel ;//0x0004 avr32_pm_cksel_t CKSEL ; }; union { unsigned long clkmask [4];//0x0008 struct { unsigned long cpumask ;//0x0008 unsigned long hsbmask ;//0x000c unsigned long pbamask ;//0x0010 unsigned long pbbmask ;//0x0014 }; }; unsigned int :32 ;//0x0018 unsigned int :32 ;//0x001c union { unsigned long pll [2];//0x0020 avr32_pm_pll_t PLL [2]; }; union { unsigned long oscctrl0 ;//0x0028 avr32_pm_oscctrl0_t OSCCTRL0 ; }; union { unsigned long oscctrl1 ;//0x002c avr32_pm_oscctrl1_t OSCCTRL1 ; }; union { unsigned long oscctrl32 ;//0x0030 avr32_pm_oscctrl32_t OSCCTRL32 ; }; unsigned int :32 ;//0x0034 unsigned int :32 ;//0x0038 unsigned int :32 ;//0x003c union { unsigned long ier ;//0x0040 avr32_pm_ier_t IER ; }; union { unsigned long idr ;//0x0044 avr32_pm_idr_t IDR ; }; union { const unsigned long imr ;//0x0048 const avr32_pm_imr_t IMR ; }; union { const unsigned long isr ;//0x004c const avr32_pm_isr_t ISR ; }; union { unsigned long icr ;//0x0050 avr32_pm_icr_t ICR ; }; union { unsigned long poscsr ;//0x0054 avr32_pm_poscsr_t POSCSR ; }; unsigned int :32 ;//0x0058 unsigned int :32 ;//0x005c union { unsigned long gcctrl [6];//0x0060 avr32_pm_gcctrl_t GCCTRL [6]; }; unsigned int :32 ;//0x0078 unsigned int :32 ;//0x007c unsigned int :32 ;//0x0080 unsigned int :32 ;//0x0084 unsigned int :32 ;//0x0088 unsigned int :32 ;//0x008c unsigned int :32 ;//0x0090 unsigned int :32 ;//0x0094 unsigned int :32 ;//0x0098 unsigned int :32 ;//0x009c unsigned int :32 ;//0x00a0 unsigned int :32 ;//0x00a4 unsigned int :32 ;//0x00a8 unsigned int :32 ;//0x00ac unsigned int :32 ;//0x00b0 unsigned int :32 ;//0x00b4 unsigned int :32 ;//0x00b8 unsigned int :32 ;//0x00bc union { unsigned long rccr ;//0x00c0 avr32_pm_rccr_t RCCR ; }; union { unsigned long bgcr ;//0x00c4 avr32_pm_bgcr_t BGCR ; }; union { unsigned long vregcr ;//0x00c8 avr32_pm_vregcr_t VREGCR ; }; unsigned int :32 ;//0x00cc union { unsigned long bod ;//0x00d0 avr32_pm_bod_t BOD ; }; unsigned int :32 ;//0x00d4 unsigned int :32 ;//0x00d8 unsigned int :32 ;//0x00dc unsigned int :32 ;//0x00e0 unsigned int :32 ;//0x00e4 unsigned int :32 ;//0x00e8 unsigned int :32 ;//0x00ec unsigned int :32 ;//0x00f0 unsigned int :32 ;//0x00f4 unsigned int :32 ;//0x00f8 unsigned int :32 ;//0x00fc unsigned int :32 ;//0x0100 unsigned int :32 ;//0x0104 unsigned int :32 ;//0x0108 unsigned int :32 ;//0x010c unsigned int :32 ;//0x0110 unsigned int :32 ;//0x0114 unsigned int :32 ;//0x0118 unsigned int :32 ;//0x011c unsigned int :32 ;//0x0120 unsigned int :32 ;//0x0124 unsigned int :32 ;//0x0128 unsigned int :32 ;//0x012c unsigned int :32 ;//0x0130 unsigned int :32 ;//0x0134 unsigned int :32 ;//0x0138 unsigned int :32 ;//0x013c union { const unsigned long rcause ;//0x0140 const avr32_pm_rcause_t RCAUSE ; }; union { unsigned long awen ;//0x0144 avr32_pm_awen_t AWEN ; }; unsigned int :32 ;//0x0148 unsigned int :32 ;//0x014c unsigned int :32 ;//0x0150 unsigned int :32 ;//0x0154 unsigned int :32 ;//0x0158 unsigned int :32 ;//0x015c unsigned int :32 ;//0x0160 unsigned int :32 ;//0x0164 unsigned int :32 ;//0x0168 unsigned int :32 ;//0x016c unsigned int :32 ;//0x0170 unsigned int :32 ;//0x0174 unsigned int :32 ;//0x0178 unsigned int :32 ;//0x017c unsigned int :32 ;//0x0180 unsigned int :32 ;//0x0184 unsigned int :32 ;//0x0188 unsigned int :32 ;//0x018c unsigned int :32 ;//0x0190 unsigned int :32 ;//0x0194 unsigned int :32 ;//0x0198 unsigned int :32 ;//0x019c unsigned int :32 ;//0x01a0 unsigned int :32 ;//0x01a4 unsigned int :32 ;//0x01a8 unsigned int :32 ;//0x01ac unsigned int :32 ;//0x01b0 unsigned int :32 ;//0x01b4 unsigned int :32 ;//0x01b8 unsigned int :32 ;//0x01bc unsigned int :32 ;//0x01c0 unsigned int :32 ;//0x01c4 unsigned int :32 ;//0x01c8 unsigned int :32 ;//0x01cc unsigned int :32 ;//0x01d0 unsigned int :32 ;//0x01d4 unsigned int :32 ;//0x01d8 unsigned int :32 ;//0x01dc unsigned int :32 ;//0x01e0 unsigned int :32 ;//0x01e4 unsigned int :32 ;//0x01e8 unsigned int :32 ;//0x01ec unsigned int :32 ;//0x01f0 unsigned int :32 ;//0x01f4 unsigned int :32 ;//0x01f8 unsigned int :32 ;//0x01fc unsigned long gplp [2];//0x0200 } avr32_pm_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif #if !defined (DEPRECATED_DISABLE) #define AVR32_PM_SMODE_DEEP_STOP 0x00000004 #define AVR32_PM_SMODE_SHUTDOWN 0x00000004 #endif /*#ifdef AVR32_PM_230_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/pwm_130.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 : UC3A0512 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_PWM_130_H_INCLUDED #define AVR32_PWM_130_H_INCLUDED #define AVR32_PWM_H_VERSION 130 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_PWM_ - Bitfield mask: AVR32_PWM__ - Bitfield offset: AVR32_PWM___OFFSET - Bitfield size: AVR32_PWM___SIZE - Bitfield values: AVR32_PWM___ 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_PWM_ - Bitfield offset: AVR32_PWM__OFFSET - Bitfield size: AVR32_PWM__SIZE - Bitfield values: AVR32_PWM__ - Bitfield values: AVR32_PWM_ All defines are sorted alphabetically. */ #define AVR32_PWM_CALG 8 #define AVR32_PWM_CALG_MASK 0x00000100 #define AVR32_PWM_CALG_OFFSET 8 #define AVR32_PWM_CALG_SIZE 1 #define AVR32_PWM_CCNT 0x0000020c #define AVR32_PWM_CCNT_CNT 0 #define AVR32_PWM_CCNT_CNT_MASK 0xffffffff #define AVR32_PWM_CCNT_CNT_OFFSET 0 #define AVR32_PWM_CCNT_CNT_SIZE 32 #define AVR32_PWM_CDTY 0x00000204 #define AVR32_PWM_CDTY_CDTY 0 #define AVR32_PWM_CDTY_CDTY_MASK 0xffffffff #define AVR32_PWM_CDTY_CDTY_OFFSET 0 #define AVR32_PWM_CDTY_CDTY_SIZE 32 #define AVR32_PWM_CDTY_MASK 0xffffffff #define AVR32_PWM_CDTY_OFFSET 0 #define AVR32_PWM_CDTY_SIZE 32 #define AVR32_PWM_CHID0 0 #define AVR32_PWM_CHID0_MASK 0x00000001 #define AVR32_PWM_CHID0_OFFSET 0 #define AVR32_PWM_CHID0_SIZE 1 #define AVR32_PWM_CHID1 1 #define AVR32_PWM_CHID1_MASK 0x00000002 #define AVR32_PWM_CHID1_OFFSET 1 #define AVR32_PWM_CHID1_SIZE 1 #define AVR32_PWM_CHID2 2 #define AVR32_PWM_CHID2_MASK 0x00000004 #define AVR32_PWM_CHID2_OFFSET 2 #define AVR32_PWM_CHID2_SIZE 1 #define AVR32_PWM_CHID3 3 #define AVR32_PWM_CHID3_MASK 0x00000008 #define AVR32_PWM_CHID3_OFFSET 3 #define AVR32_PWM_CHID3_SIZE 1 #define AVR32_PWM_CHID4 4 #define AVR32_PWM_CHID4_MASK 0x00000010 #define AVR32_PWM_CHID4_OFFSET 4 #define AVR32_PWM_CHID4_SIZE 1 #define AVR32_PWM_CHID5 5 #define AVR32_PWM_CHID5_MASK 0x00000020 #define AVR32_PWM_CHID5_OFFSET 5 #define AVR32_PWM_CHID5_SIZE 1 #define AVR32_PWM_CHID6 6 #define AVR32_PWM_CHID6_MASK 0x00000040 #define AVR32_PWM_CHID6_OFFSET 6 #define AVR32_PWM_CHID6_SIZE 1 #define AVR32_PWM_CLKA 0x0000000b #define AVR32_PWM_CLKB 0x0000000c #define AVR32_PWM_CLK_OFF 0x00000000 #define AVR32_PWM_CLK_SEL_PREAB 0x00000001 #define AVR32_PWM_CMR 0x00000200 #define AVR32_PWM_CMR_CALG 8 #define AVR32_PWM_CMR_CALG_MASK 0x00000100 #define AVR32_PWM_CMR_CALG_OFFSET 8 #define AVR32_PWM_CMR_CALG_SIZE 1 #define AVR32_PWM_CMR_CPD 10 #define AVR32_PWM_CMR_CPD_MASK 0x00000400 #define AVR32_PWM_CMR_CPD_OFFSET 10 #define AVR32_PWM_CMR_CPD_SIZE 1 #define AVR32_PWM_CMR_CPOL 9 #define AVR32_PWM_CMR_CPOL_MASK 0x00000200 #define AVR32_PWM_CMR_CPOL_OFFSET 9 #define AVR32_PWM_CMR_CPOL_SIZE 1 #define AVR32_PWM_CMR_CPRE 0 #define AVR32_PWM_CMR_CPRE_CLKA 0x0000000b #define AVR32_PWM_CMR_CPRE_CLKB 0x0000000c #define AVR32_PWM_CMR_CPRE_MASK 0x0000000f #define AVR32_PWM_CMR_CPRE_MCK 0x00000000 #define AVR32_PWM_CMR_CPRE_MCK_DIV_1024 0x0000000a #define AVR32_PWM_CMR_CPRE_MCK_DIV_128 0x00000007 #define AVR32_PWM_CMR_CPRE_MCK_DIV_16 0x00000004 #define AVR32_PWM_CMR_CPRE_MCK_DIV_2 0x00000001 #define AVR32_PWM_CMR_CPRE_MCK_DIV_256 0x00000008 #define AVR32_PWM_CMR_CPRE_MCK_DIV_32 0x00000005 #define AVR32_PWM_CMR_CPRE_MCK_DIV_4 0x00000002 #define AVR32_PWM_CMR_CPRE_MCK_DIV_512 0x00000009 #define AVR32_PWM_CMR_CPRE_MCK_DIV_64 0x00000006 #define AVR32_PWM_CMR_CPRE_MCK_DIV_8 0x00000003 #define AVR32_PWM_CMR_CPRE_OFFSET 0 #define AVR32_PWM_CMR_CPRE_SIZE 4 #define AVR32_PWM_CNT 0 #define AVR32_PWM_CNT_MASK 0xffffffff #define AVR32_PWM_CNT_OFFSET 0 #define AVR32_PWM_CNT_SIZE 32 #define AVR32_PWM_CPD 10 #define AVR32_PWM_CPD_MASK 0x00000400 #define AVR32_PWM_CPD_OFFSET 10 #define AVR32_PWM_CPD_SIZE 1 #define AVR32_PWM_CPOL 9 #define AVR32_PWM_CPOL_MASK 0x00000200 #define AVR32_PWM_CPOL_OFFSET 9 #define AVR32_PWM_CPOL_SIZE 1 #define AVR32_PWM_CPRD 0x00000208 #define AVR32_PWM_CPRD_CPRD 0 #define AVR32_PWM_CPRD_CPRD_MASK 0xffffffff #define AVR32_PWM_CPRD_CPRD_OFFSET 0 #define AVR32_PWM_CPRD_CPRD_SIZE 32 #define AVR32_PWM_CPRD_MASK 0xffffffff #define AVR32_PWM_CPRD_OFFSET 0 #define AVR32_PWM_CPRD_SIZE 32 #define AVR32_PWM_CPRE 0 #define AVR32_PWM_CPRE_CLKA 0x0000000b #define AVR32_PWM_CPRE_CLKB 0x0000000c #define AVR32_PWM_CPRE_MASK 0x0000000f #define AVR32_PWM_CPRE_MCK 0x00000000 #define AVR32_PWM_CPRE_MCK_DIV_1024 0x0000000a #define AVR32_PWM_CPRE_MCK_DIV_128 0x00000007 #define AVR32_PWM_CPRE_MCK_DIV_16 0x00000004 #define AVR32_PWM_CPRE_MCK_DIV_2 0x00000001 #define AVR32_PWM_CPRE_MCK_DIV_256 0x00000008 #define AVR32_PWM_CPRE_MCK_DIV_32 0x00000005 #define AVR32_PWM_CPRE_MCK_DIV_4 0x00000002 #define AVR32_PWM_CPRE_MCK_DIV_512 0x00000009 #define AVR32_PWM_CPRE_MCK_DIV_64 0x00000006 #define AVR32_PWM_CPRE_MCK_DIV_8 0x00000003 #define AVR32_PWM_CPRE_OFFSET 0 #define AVR32_PWM_CPRE_SIZE 4 #define AVR32_PWM_CUPD 0x00000210 #define AVR32_PWM_CUPD_CUPD 0 #define AVR32_PWM_CUPD_CUPD_MASK 0xffffffff #define AVR32_PWM_CUPD_CUPD_OFFSET 0 #define AVR32_PWM_CUPD_CUPD_SIZE 32 #define AVR32_PWM_CUPD_MASK 0xffffffff #define AVR32_PWM_CUPD_OFFSET 0 #define AVR32_PWM_CUPD_SIZE 32 #define AVR32_PWM_DIS 0x00000008 #define AVR32_PWM_DIS_CHID0 0 #define AVR32_PWM_DIS_CHID0_MASK 0x00000001 #define AVR32_PWM_DIS_CHID0_OFFSET 0 #define AVR32_PWM_DIS_CHID0_SIZE 1 #define AVR32_PWM_DIS_CHID1 1 #define AVR32_PWM_DIS_CHID1_MASK 0x00000002 #define AVR32_PWM_DIS_CHID1_OFFSET 1 #define AVR32_PWM_DIS_CHID1_SIZE 1 #define AVR32_PWM_DIS_CHID2 2 #define AVR32_PWM_DIS_CHID2_MASK 0x00000004 #define AVR32_PWM_DIS_CHID2_OFFSET 2 #define AVR32_PWM_DIS_CHID2_SIZE 1 #define AVR32_PWM_DIS_CHID3 3 #define AVR32_PWM_DIS_CHID3_MASK 0x00000008 #define AVR32_PWM_DIS_CHID3_OFFSET 3 #define AVR32_PWM_DIS_CHID3_SIZE 1 #define AVR32_PWM_DIS_CHID4 4 #define AVR32_PWM_DIS_CHID4_MASK 0x00000010 #define AVR32_PWM_DIS_CHID4_OFFSET 4 #define AVR32_PWM_DIS_CHID4_SIZE 1 #define AVR32_PWM_DIS_CHID5 5 #define AVR32_PWM_DIS_CHID5_MASK 0x00000020 #define AVR32_PWM_DIS_CHID5_OFFSET 5 #define AVR32_PWM_DIS_CHID5_SIZE 1 #define AVR32_PWM_DIS_CHID6 6 #define AVR32_PWM_DIS_CHID6_MASK 0x00000040 #define AVR32_PWM_DIS_CHID6_OFFSET 6 #define AVR32_PWM_DIS_CHID6_SIZE 1 #define AVR32_PWM_DIVA 0 #define AVR32_PWM_DIVA_CLK_OFF 0x00000000 #define AVR32_PWM_DIVA_CLK_SEL_PREAB 0x00000001 #define AVR32_PWM_DIVA_MASK 0x000000ff #define AVR32_PWM_DIVA_OFFSET 0 #define AVR32_PWM_DIVA_SIZE 8 #define AVR32_PWM_DIVB 16 #define AVR32_PWM_DIVB_CLK_OFF 0x00000000 #define AVR32_PWM_DIVB_CLK_SEL_PREAB 0x00000001 #define AVR32_PWM_DIVB_MASK 0x00ff0000 #define AVR32_PWM_DIVB_OFFSET 16 #define AVR32_PWM_DIVB_SIZE 8 #define AVR32_PWM_ENA 0x00000004 #define AVR32_PWM_ENA_CHID0 0 #define AVR32_PWM_ENA_CHID0_MASK 0x00000001 #define AVR32_PWM_ENA_CHID0_OFFSET 0 #define AVR32_PWM_ENA_CHID0_SIZE 1 #define AVR32_PWM_ENA_CHID1 1 #define AVR32_PWM_ENA_CHID1_MASK 0x00000002 #define AVR32_PWM_ENA_CHID1_OFFSET 1 #define AVR32_PWM_ENA_CHID1_SIZE 1 #define AVR32_PWM_ENA_CHID2 2 #define AVR32_PWM_ENA_CHID2_MASK 0x00000004 #define AVR32_PWM_ENA_CHID2_OFFSET 2 #define AVR32_PWM_ENA_CHID2_SIZE 1 #define AVR32_PWM_ENA_CHID3 3 #define AVR32_PWM_ENA_CHID3_MASK 0x00000008 #define AVR32_PWM_ENA_CHID3_OFFSET 3 #define AVR32_PWM_ENA_CHID3_SIZE 1 #define AVR32_PWM_ENA_CHID4 4 #define AVR32_PWM_ENA_CHID4_MASK 0x00000010 #define AVR32_PWM_ENA_CHID4_OFFSET 4 #define AVR32_PWM_ENA_CHID4_SIZE 1 #define AVR32_PWM_ENA_CHID5 5 #define AVR32_PWM_ENA_CHID5_MASK 0x00000020 #define AVR32_PWM_ENA_CHID5_OFFSET 5 #define AVR32_PWM_ENA_CHID5_SIZE 1 #define AVR32_PWM_ENA_CHID6 6 #define AVR32_PWM_ENA_CHID6_MASK 0x00000040 #define AVR32_PWM_ENA_CHID6_OFFSET 6 #define AVR32_PWM_ENA_CHID6_SIZE 1 #define AVR32_PWM_IDR 0x00000014 #define AVR32_PWM_IDR_CHID0 0 #define AVR32_PWM_IDR_CHID0_MASK 0x00000001 #define AVR32_PWM_IDR_CHID0_OFFSET 0 #define AVR32_PWM_IDR_CHID0_SIZE 1 #define AVR32_PWM_IDR_CHID1 1 #define AVR32_PWM_IDR_CHID1_MASK 0x00000002 #define AVR32_PWM_IDR_CHID1_OFFSET 1 #define AVR32_PWM_IDR_CHID1_SIZE 1 #define AVR32_PWM_IDR_CHID2 2 #define AVR32_PWM_IDR_CHID2_MASK 0x00000004 #define AVR32_PWM_IDR_CHID2_OFFSET 2 #define AVR32_PWM_IDR_CHID2_SIZE 1 #define AVR32_PWM_IDR_CHID3 3 #define AVR32_PWM_IDR_CHID3_MASK 0x00000008 #define AVR32_PWM_IDR_CHID3_OFFSET 3 #define AVR32_PWM_IDR_CHID3_SIZE 1 #define AVR32_PWM_IDR_CHID4 4 #define AVR32_PWM_IDR_CHID4_MASK 0x00000010 #define AVR32_PWM_IDR_CHID4_OFFSET 4 #define AVR32_PWM_IDR_CHID4_SIZE 1 #define AVR32_PWM_IDR_CHID5 5 #define AVR32_PWM_IDR_CHID5_MASK 0x00000020 #define AVR32_PWM_IDR_CHID5_OFFSET 5 #define AVR32_PWM_IDR_CHID5_SIZE 1 #define AVR32_PWM_IDR_CHID6 6 #define AVR32_PWM_IDR_CHID6_MASK 0x00000040 #define AVR32_PWM_IDR_CHID6_OFFSET 6 #define AVR32_PWM_IDR_CHID6_SIZE 1 #define AVR32_PWM_IER 0x00000010 #define AVR32_PWM_IER_CHID0 0 #define AVR32_PWM_IER_CHID0_MASK 0x00000001 #define AVR32_PWM_IER_CHID0_OFFSET 0 #define AVR32_PWM_IER_CHID0_SIZE 1 #define AVR32_PWM_IER_CHID1 1 #define AVR32_PWM_IER_CHID1_MASK 0x00000002 #define AVR32_PWM_IER_CHID1_OFFSET 1 #define AVR32_PWM_IER_CHID1_SIZE 1 #define AVR32_PWM_IER_CHID2 2 #define AVR32_PWM_IER_CHID2_MASK 0x00000004 #define AVR32_PWM_IER_CHID2_OFFSET 2 #define AVR32_PWM_IER_CHID2_SIZE 1 #define AVR32_PWM_IER_CHID3 3 #define AVR32_PWM_IER_CHID3_MASK 0x00000008 #define AVR32_PWM_IER_CHID3_OFFSET 3 #define AVR32_PWM_IER_CHID3_SIZE 1 #define AVR32_PWM_IER_CHID4 4 #define AVR32_PWM_IER_CHID4_MASK 0x00000010 #define AVR32_PWM_IER_CHID4_OFFSET 4 #define AVR32_PWM_IER_CHID4_SIZE 1 #define AVR32_PWM_IER_CHID5 5 #define AVR32_PWM_IER_CHID5_MASK 0x00000020 #define AVR32_PWM_IER_CHID5_OFFSET 5 #define AVR32_PWM_IER_CHID5_SIZE 1 #define AVR32_PWM_IER_CHID6 6 #define AVR32_PWM_IER_CHID6_MASK 0x00000040 #define AVR32_PWM_IER_CHID6_OFFSET 6 #define AVR32_PWM_IER_CHID6_SIZE 1 #define AVR32_PWM_IMR 0x00000018 #define AVR32_PWM_IMR_CHID0 0 #define AVR32_PWM_IMR_CHID0_MASK 0x00000001 #define AVR32_PWM_IMR_CHID0_OFFSET 0 #define AVR32_PWM_IMR_CHID0_SIZE 1 #define AVR32_PWM_IMR_CHID1 1 #define AVR32_PWM_IMR_CHID1_MASK 0x00000002 #define AVR32_PWM_IMR_CHID1_OFFSET 1 #define AVR32_PWM_IMR_CHID1_SIZE 1 #define AVR32_PWM_IMR_CHID2 2 #define AVR32_PWM_IMR_CHID2_MASK 0x00000004 #define AVR32_PWM_IMR_CHID2_OFFSET 2 #define AVR32_PWM_IMR_CHID2_SIZE 1 #define AVR32_PWM_IMR_CHID3 3 #define AVR32_PWM_IMR_CHID3_MASK 0x00000008 #define AVR32_PWM_IMR_CHID3_OFFSET 3 #define AVR32_PWM_IMR_CHID3_SIZE 1 #define AVR32_PWM_IMR_CHID4 4 #define AVR32_PWM_IMR_CHID4_MASK 0x00000010 #define AVR32_PWM_IMR_CHID4_OFFSET 4 #define AVR32_PWM_IMR_CHID4_SIZE 1 #define AVR32_PWM_IMR_CHID5 5 #define AVR32_PWM_IMR_CHID5_MASK 0x00000020 #define AVR32_PWM_IMR_CHID5_OFFSET 5 #define AVR32_PWM_IMR_CHID5_SIZE 1 #define AVR32_PWM_IMR_CHID6 6 #define AVR32_PWM_IMR_CHID6_MASK 0x00000040 #define AVR32_PWM_IMR_CHID6_OFFSET 6 #define AVR32_PWM_IMR_CHID6_SIZE 1 #define AVR32_PWM_ISR 0x0000001c #define AVR32_PWM_ISR_CHID0 0 #define AVR32_PWM_ISR_CHID0_MASK 0x00000001 #define AVR32_PWM_ISR_CHID0_OFFSET 0 #define AVR32_PWM_ISR_CHID0_SIZE 1 #define AVR32_PWM_ISR_CHID1 1 #define AVR32_PWM_ISR_CHID1_MASK 0x00000002 #define AVR32_PWM_ISR_CHID1_OFFSET 1 #define AVR32_PWM_ISR_CHID1_SIZE 1 #define AVR32_PWM_ISR_CHID2 2 #define AVR32_PWM_ISR_CHID2_MASK 0x00000004 #define AVR32_PWM_ISR_CHID2_OFFSET 2 #define AVR32_PWM_ISR_CHID2_SIZE 1 #define AVR32_PWM_ISR_CHID3 3 #define AVR32_PWM_ISR_CHID3_MASK 0x00000008 #define AVR32_PWM_ISR_CHID3_OFFSET 3 #define AVR32_PWM_ISR_CHID3_SIZE 1 #define AVR32_PWM_ISR_CHID4 4 #define AVR32_PWM_ISR_CHID4_MASK 0x00000010 #define AVR32_PWM_ISR_CHID4_OFFSET 4 #define AVR32_PWM_ISR_CHID4_SIZE 1 #define AVR32_PWM_ISR_CHID5 5 #define AVR32_PWM_ISR_CHID5_MASK 0x00000020 #define AVR32_PWM_ISR_CHID5_OFFSET 5 #define AVR32_PWM_ISR_CHID5_SIZE 1 #define AVR32_PWM_ISR_CHID6 6 #define AVR32_PWM_ISR_CHID6_MASK 0x00000040 #define AVR32_PWM_ISR_CHID6_OFFSET 6 #define AVR32_PWM_ISR_CHID6_SIZE 1 #define AVR32_PWM_MCK 0x00000000 #define AVR32_PWM_MCK_DIV_1024 0x0000000a #define AVR32_PWM_MCK_DIV_128 0x00000007 #define AVR32_PWM_MCK_DIV_16 0x00000004 #define AVR32_PWM_MCK_DIV_2 0x00000001 #define AVR32_PWM_MCK_DIV_256 0x00000008 #define AVR32_PWM_MCK_DIV_32 0x00000005 #define AVR32_PWM_MCK_DIV_4 0x00000002 #define AVR32_PWM_MCK_DIV_512 0x00000009 #define AVR32_PWM_MCK_DIV_64 0x00000006 #define AVR32_PWM_MCK_DIV_8 0x00000003 #define AVR32_PWM_MR 0x00000000 #define AVR32_PWM_MR_DIVA 0 #define AVR32_PWM_MR_DIVA_CLK_OFF 0x00000000 #define AVR32_PWM_MR_DIVA_CLK_SEL_PREAB 0x00000001 #define AVR32_PWM_MR_DIVA_MASK 0x000000ff #define AVR32_PWM_MR_DIVA_OFFSET 0 #define AVR32_PWM_MR_DIVA_SIZE 8 #define AVR32_PWM_MR_DIVB 16 #define AVR32_PWM_MR_DIVB_CLK_OFF 0x00000000 #define AVR32_PWM_MR_DIVB_CLK_SEL_PREAB 0x00000001 #define AVR32_PWM_MR_DIVB_MASK 0x00ff0000 #define AVR32_PWM_MR_DIVB_OFFSET 16 #define AVR32_PWM_MR_DIVB_SIZE 8 #define AVR32_PWM_MR_PREA 8 #define AVR32_PWM_MR_PREA_MASK 0x00000f00 #define AVR32_PWM_MR_PREA_MCK 0x00000000 #define AVR32_PWM_MR_PREA_MCK_DIV_1024 0x0000000a #define AVR32_PWM_MR_PREA_MCK_DIV_128 0x00000007 #define AVR32_PWM_MR_PREA_MCK_DIV_16 0x00000004 #define AVR32_PWM_MR_PREA_MCK_DIV_2 0x00000001 #define AVR32_PWM_MR_PREA_MCK_DIV_256 0x00000008 #define AVR32_PWM_MR_PREA_MCK_DIV_32 0x00000005 #define AVR32_PWM_MR_PREA_MCK_DIV_4 0x00000002 #define AVR32_PWM_MR_PREA_MCK_DIV_512 0x00000009 #define AVR32_PWM_MR_PREA_MCK_DIV_64 0x00000006 #define AVR32_PWM_MR_PREA_MCK_DIV_8 0x00000003 #define AVR32_PWM_MR_PREA_OFFSET 8 #define AVR32_PWM_MR_PREA_SIZE 4 #define AVR32_PWM_MR_PREB 24 #define AVR32_PWM_MR_PREB_MASK 0x0f000000 #define AVR32_PWM_MR_PREB_MCK 0x00000000 #define AVR32_PWM_MR_PREB_MCK_DIV_1024 0x0000000a #define AVR32_PWM_MR_PREB_MCK_DIV_128 0x00000007 #define AVR32_PWM_MR_PREB_MCK_DIV_16 0x00000004 #define AVR32_PWM_MR_PREB_MCK_DIV_2 0x00000001 #define AVR32_PWM_MR_PREB_MCK_DIV_256 0x00000008 #define AVR32_PWM_MR_PREB_MCK_DIV_32 0x00000005 #define AVR32_PWM_MR_PREB_MCK_DIV_4 0x00000002 #define AVR32_PWM_MR_PREB_MCK_DIV_512 0x00000009 #define AVR32_PWM_MR_PREB_MCK_DIV_64 0x00000006 #define AVR32_PWM_MR_PREB_MCK_DIV_8 0x00000003 #define AVR32_PWM_MR_PREB_OFFSET 24 #define AVR32_PWM_MR_PREB_SIZE 4 #define AVR32_PWM_PREA 8 #define AVR32_PWM_PREA_MASK 0x00000f00 #define AVR32_PWM_PREA_MCK 0x00000000 #define AVR32_PWM_PREA_MCK_DIV_1024 0x0000000a #define AVR32_PWM_PREA_MCK_DIV_128 0x00000007 #define AVR32_PWM_PREA_MCK_DIV_16 0x00000004 #define AVR32_PWM_PREA_MCK_DIV_2 0x00000001 #define AVR32_PWM_PREA_MCK_DIV_256 0x00000008 #define AVR32_PWM_PREA_MCK_DIV_32 0x00000005 #define AVR32_PWM_PREA_MCK_DIV_4 0x00000002 #define AVR32_PWM_PREA_MCK_DIV_512 0x00000009 #define AVR32_PWM_PREA_MCK_DIV_64 0x00000006 #define AVR32_PWM_PREA_MCK_DIV_8 0x00000003 #define AVR32_PWM_PREA_OFFSET 8 #define AVR32_PWM_PREA_SIZE 4 #define AVR32_PWM_PREB 24 #define AVR32_PWM_PREB_MASK 0x0f000000 #define AVR32_PWM_PREB_MCK 0x00000000 #define AVR32_PWM_PREB_MCK_DIV_1024 0x0000000a #define AVR32_PWM_PREB_MCK_DIV_128 0x00000007 #define AVR32_PWM_PREB_MCK_DIV_16 0x00000004 #define AVR32_PWM_PREB_MCK_DIV_2 0x00000001 #define AVR32_PWM_PREB_MCK_DIV_256 0x00000008 #define AVR32_PWM_PREB_MCK_DIV_32 0x00000005 #define AVR32_PWM_PREB_MCK_DIV_4 0x00000002 #define AVR32_PWM_PREB_MCK_DIV_512 0x00000009 #define AVR32_PWM_PREB_MCK_DIV_64 0x00000006 #define AVR32_PWM_PREB_MCK_DIV_8 0x00000003 #define AVR32_PWM_PREB_OFFSET 24 #define AVR32_PWM_PREB_SIZE 4 #define AVR32_PWM_SR 0x0000000c #define AVR32_PWM_SR_CHID0 0 #define AVR32_PWM_SR_CHID0_MASK 0x00000001 #define AVR32_PWM_SR_CHID0_OFFSET 0 #define AVR32_PWM_SR_CHID0_SIZE 1 #define AVR32_PWM_SR_CHID1 1 #define AVR32_PWM_SR_CHID1_MASK 0x00000002 #define AVR32_PWM_SR_CHID1_OFFSET 1 #define AVR32_PWM_SR_CHID1_SIZE 1 #define AVR32_PWM_SR_CHID2 2 #define AVR32_PWM_SR_CHID2_MASK 0x00000004 #define AVR32_PWM_SR_CHID2_OFFSET 2 #define AVR32_PWM_SR_CHID2_SIZE 1 #define AVR32_PWM_SR_CHID3 3 #define AVR32_PWM_SR_CHID3_MASK 0x00000008 #define AVR32_PWM_SR_CHID3_OFFSET 3 #define AVR32_PWM_SR_CHID3_SIZE 1 #define AVR32_PWM_SR_CHID4 4 #define AVR32_PWM_SR_CHID4_MASK 0x00000010 #define AVR32_PWM_SR_CHID4_OFFSET 4 #define AVR32_PWM_SR_CHID4_SIZE 1 #define AVR32_PWM_SR_CHID5 5 #define AVR32_PWM_SR_CHID5_MASK 0x00000020 #define AVR32_PWM_SR_CHID5_OFFSET 5 #define AVR32_PWM_SR_CHID5_SIZE 1 #define AVR32_PWM_SR_CHID6 6 #define AVR32_PWM_SR_CHID6_MASK 0x00000040 #define AVR32_PWM_SR_CHID6_OFFSET 6 #define AVR32_PWM_SR_CHID6_SIZE 1 #define AVR32_PWM_VARIANT 16 #define AVR32_PWM_VARIANT_MASK 0x00070000 #define AVR32_PWM_VARIANT_OFFSET 16 #define AVR32_PWM_VARIANT_SIZE 3 #define AVR32_PWM_VERSION 0x000000fc #define AVR32_PWM_VERSION_MASK 0x00000fff #define AVR32_PWM_VERSION_OFFSET 0 #define AVR32_PWM_VERSION_SIZE 12 #define AVR32_PWM_VERSION_VARIANT 16 #define AVR32_PWM_VERSION_VARIANT_MASK 0x00070000 #define AVR32_PWM_VERSION_VARIANT_OFFSET 16 #define AVR32_PWM_VERSION_VARIANT_SIZE 3 #define AVR32_PWM_VERSION_VERSION 0 #define AVR32_PWM_VERSION_VERSION_MASK 0x00000fff #define AVR32_PWM_VERSION_VERSION_OFFSET 0 #define AVR32_PWM_VERSION_VERSION_SIZE 12 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_pwm_mr_t { unsigned int : 4; unsigned int preb : 4; unsigned int divb : 8; unsigned int : 4; unsigned int prea : 4; unsigned int diva : 8; } avr32_pwm_mr_t; typedef struct avr32_pwm_ena_t { unsigned int :25; unsigned int chid6 : 1; unsigned int chid5 : 1; unsigned int chid4 : 1; unsigned int chid3 : 1; unsigned int chid2 : 1; unsigned int chid1 : 1; unsigned int chid0 : 1; } avr32_pwm_ena_t; typedef struct avr32_pwm_dis_t { unsigned int :25; unsigned int chid6 : 1; unsigned int chid5 : 1; unsigned int chid4 : 1; unsigned int chid3 : 1; unsigned int chid2 : 1; unsigned int chid1 : 1; unsigned int chid0 : 1; } avr32_pwm_dis_t; typedef struct avr32_pwm_sr_t { unsigned int :25; unsigned int chid6 : 1; unsigned int chid5 : 1; unsigned int chid4 : 1; unsigned int chid3 : 1; unsigned int chid2 : 1; unsigned int chid1 : 1; unsigned int chid0 : 1; } avr32_pwm_sr_t; typedef struct avr32_pwm_ier_t { unsigned int :25; unsigned int chid6 : 1; unsigned int chid5 : 1; unsigned int chid4 : 1; unsigned int chid3 : 1; unsigned int chid2 : 1; unsigned int chid1 : 1; unsigned int chid0 : 1; } avr32_pwm_ier_t; typedef struct avr32_pwm_idr_t { unsigned int :25; unsigned int chid6 : 1; unsigned int chid5 : 1; unsigned int chid4 : 1; unsigned int chid3 : 1; unsigned int chid2 : 1; unsigned int chid1 : 1; unsigned int chid0 : 1; } avr32_pwm_idr_t; typedef struct avr32_pwm_imr_t { unsigned int :25; unsigned int chid6 : 1; unsigned int chid5 : 1; unsigned int chid4 : 1; unsigned int chid3 : 1; unsigned int chid2 : 1; unsigned int chid1 : 1; unsigned int chid0 : 1; } avr32_pwm_imr_t; typedef struct avr32_pwm_isr_t { unsigned int :25; unsigned int chid6 : 1; unsigned int chid5 : 1; unsigned int chid4 : 1; unsigned int chid3 : 1; unsigned int chid2 : 1; unsigned int chid1 : 1; unsigned int chid0 : 1; } avr32_pwm_isr_t; typedef struct avr32_pwm_version_t { unsigned int :13; unsigned int variant : 3; unsigned int : 4; unsigned int version :12; } avr32_pwm_version_t; typedef struct avr32_pwm_cmr_t { unsigned int :21; unsigned int cpd : 1; unsigned int cpol : 1; unsigned int calg : 1; unsigned int : 4; unsigned int cpre : 4; } avr32_pwm_cmr_t; typedef struct avr32_pwm_channel_t { union { unsigned long cmr ;//0x0000 avr32_pwm_cmr_t CMR ; }; unsigned long cdty ;//0x0004 unsigned long cprd ;//0x0008 const unsigned long ccnt ;//0x000c unsigned long cupd ;//0x0010 unsigned int :32 ;//0x0014 unsigned int :32 ;//0x0018 unsigned int :32 ;//0x001c } avr32_pwm_channel_t; typedef struct avr32_pwm_t { union { unsigned long mr ;//0x0000 avr32_pwm_mr_t MR ; }; union { unsigned long ena ;//0x0004 avr32_pwm_ena_t ENA ; }; union { unsigned long dis ;//0x0008 avr32_pwm_dis_t DIS ; }; union { const unsigned long sr ;//0x000c const avr32_pwm_sr_t SR ; }; union { unsigned long ier ;//0x0010 avr32_pwm_ier_t IER ; }; union { unsigned long idr ;//0x0014 avr32_pwm_idr_t IDR ; }; union { const unsigned long imr ;//0x0018 const avr32_pwm_imr_t IMR ; }; union { const unsigned long isr ;//0x001c const avr32_pwm_isr_t ISR ; }; unsigned int :32 ;//0x0020 unsigned int :32 ;//0x0024 unsigned int :32 ;//0x0028 unsigned int :32 ;//0x002c unsigned int :32 ;//0x0030 unsigned int :32 ;//0x0034 unsigned int :32 ;//0x0038 unsigned int :32 ;//0x003c unsigned int :32 ;//0x0040 unsigned int :32 ;//0x0044 unsigned int :32 ;//0x0048 unsigned int :32 ;//0x004c unsigned int :32 ;//0x0050 unsigned int :32 ;//0x0054 unsigned int :32 ;//0x0058 unsigned int :32 ;//0x005c unsigned int :32 ;//0x0060 unsigned int :32 ;//0x0064 unsigned int :32 ;//0x0068 unsigned int :32 ;//0x006c unsigned int :32 ;//0x0070 unsigned int :32 ;//0x0074 unsigned int :32 ;//0x0078 unsigned int :32 ;//0x007c unsigned int :32 ;//0x0080 unsigned int :32 ;//0x0084 unsigned int :32 ;//0x0088 unsigned int :32 ;//0x008c unsigned int :32 ;//0x0090 unsigned int :32 ;//0x0094 unsigned int :32 ;//0x0098 unsigned int :32 ;//0x009c unsigned int :32 ;//0x00a0 unsigned int :32 ;//0x00a4 unsigned int :32 ;//0x00a8 unsigned int :32 ;//0x00ac unsigned int :32 ;//0x00b0 unsigned int :32 ;//0x00b4 unsigned int :32 ;//0x00b8 unsigned int :32 ;//0x00bc unsigned int :32 ;//0x00c0 unsigned int :32 ;//0x00c4 unsigned int :32 ;//0x00c8 unsigned int :32 ;//0x00cc unsigned int :32 ;//0x00d0 unsigned int :32 ;//0x00d4 unsigned int :32 ;//0x00d8 unsigned int :32 ;//0x00dc unsigned int :32 ;//0x00e0 unsigned int :32 ;//0x00e4 unsigned int :32 ;//0x00e8 unsigned int :32 ;//0x00ec unsigned int :32 ;//0x00f0 unsigned int :32 ;//0x00f4 unsigned int :32 ;//0x00f8 union { const unsigned long version ;//0x00fc const avr32_pwm_version_t VERSION ; }; unsigned int :32 ;//0x0100 unsigned int :32 ;//0x0104 unsigned int :32 ;//0x0108 unsigned int :32 ;//0x010c unsigned int :32 ;//0x0110 unsigned int :32 ;//0x0114 unsigned int :32 ;//0x0118 unsigned int :32 ;//0x011c unsigned int :32 ;//0x0120 unsigned int :32 ;//0x0124 unsigned int :32 ;//0x0128 unsigned int :32 ;//0x012c unsigned int :32 ;//0x0130 unsigned int :32 ;//0x0134 unsigned int :32 ;//0x0138 unsigned int :32 ;//0x013c unsigned int :32 ;//0x0140 unsigned int :32 ;//0x0144 unsigned int :32 ;//0x0148 unsigned int :32 ;//0x014c unsigned int :32 ;//0x0150 unsigned int :32 ;//0x0154 unsigned int :32 ;//0x0158 unsigned int :32 ;//0x015c unsigned int :32 ;//0x0160 unsigned int :32 ;//0x0164 unsigned int :32 ;//0x0168 unsigned int :32 ;//0x016c unsigned int :32 ;//0x0170 unsigned int :32 ;//0x0174 unsigned int :32 ;//0x0178 unsigned int :32 ;//0x017c unsigned int :32 ;//0x0180 unsigned int :32 ;//0x0184 unsigned int :32 ;//0x0188 unsigned int :32 ;//0x018c unsigned int :32 ;//0x0190 unsigned int :32 ;//0x0194 unsigned int :32 ;//0x0198 unsigned int :32 ;//0x019c unsigned int :32 ;//0x01a0 unsigned int :32 ;//0x01a4 unsigned int :32 ;//0x01a8 unsigned int :32 ;//0x01ac unsigned int :32 ;//0x01b0 unsigned int :32 ;//0x01b4 unsigned int :32 ;//0x01b8 unsigned int :32 ;//0x01bc unsigned int :32 ;//0x01c0 unsigned int :32 ;//0x01c4 unsigned int :32 ;//0x01c8 unsigned int :32 ;//0x01cc unsigned int :32 ;//0x01d0 unsigned int :32 ;//0x01d4 unsigned int :32 ;//0x01d8 unsigned int :32 ;//0x01dc unsigned int :32 ;//0x01e0 unsigned int :32 ;//0x01e4 unsigned int :32 ;//0x01e8 unsigned int :32 ;//0x01ec unsigned int :32 ;//0x01f0 unsigned int :32 ;//0x01f4 unsigned int :32 ;//0x01f8 unsigned int :32 ;//0x01fc avr32_pwm_channel_t channel[AVR32_PWM_CHANNEL_LENGTH];//0x200 } avr32_pwm_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif #if !defined (DEPRECATED_DISABLE) #define AVR32_PWM_CCNT0 0x0000020c #define AVR32_PWM_CCNT0_CNT 0 #define AVR32_PWM_CCNT0_CNT_MASK 0xffffffff #define AVR32_PWM_CCNT0_CNT_OFFSET 0 #define AVR32_PWM_CCNT0_CNT_SIZE 32 #define AVR32_PWM_CDTY0 0x00000204 #define AVR32_PWM_CDTY0_CDTY 0 #define AVR32_PWM_CDTY0_CDTY_MASK 0xffffffff #define AVR32_PWM_CDTY0_CDTY_OFFSET 0 #define AVR32_PWM_CDTY0_CDTY_SIZE 32 #define AVR32_PWM_CMR0 0x00000200 #define AVR32_PWM_CMR0_CALG 8 #define AVR32_PWM_CMR0_CALG_MASK 0x00000100 #define AVR32_PWM_CMR0_CALG_OFFSET 8 #define AVR32_PWM_CMR0_CALG_SIZE 1 #define AVR32_PWM_CMR0_CPD 10 #define AVR32_PWM_CMR0_CPD_MASK 0x00000400 #define AVR32_PWM_CMR0_CPD_OFFSET 10 #define AVR32_PWM_CMR0_CPD_SIZE 1 #define AVR32_PWM_CMR0_CPOL 9 #define AVR32_PWM_CMR0_CPOL_MASK 0x00000200 #define AVR32_PWM_CMR0_CPOL_OFFSET 9 #define AVR32_PWM_CMR0_CPOL_SIZE 1 #define AVR32_PWM_CMR0_CPRE 0 #define AVR32_PWM_CMR0_CPRE_CLKA 0x0000000b #define AVR32_PWM_CMR0_CPRE_CLKB 0x0000000c #define AVR32_PWM_CMR0_CPRE_MASK 0x0000000f #define AVR32_PWM_CMR0_CPRE_MCK 0x00000000 #define AVR32_PWM_CMR0_CPRE_MCK_DIV_1024 0x0000000a #define AVR32_PWM_CMR0_CPRE_MCK_DIV_128 0x00000007 #define AVR32_PWM_CMR0_CPRE_MCK_DIV_16 0x00000004 #define AVR32_PWM_CMR0_CPRE_MCK_DIV_2 0x00000001 #define AVR32_PWM_CMR0_CPRE_MCK_DIV_256 0x00000008 #define AVR32_PWM_CMR0_CPRE_MCK_DIV_32 0x00000005 #define AVR32_PWM_CMR0_CPRE_MCK_DIV_4 0x00000002 #define AVR32_PWM_CMR0_CPRE_MCK_DIV_512 0x00000009 #define AVR32_PWM_CMR0_CPRE_MCK_DIV_64 0x00000006 #define AVR32_PWM_CMR0_CPRE_MCK_DIV_8 0x00000003 #define AVR32_PWM_CMR0_CPRE_OFFSET 0 #define AVR32_PWM_CMR0_CPRE_SIZE 4 #define AVR32_PWM_CPRD0 0x00000208 #define AVR32_PWM_CPRD0_CPRD 0 #define AVR32_PWM_CPRD0_CPRD_MASK 0xffffffff #define AVR32_PWM_CPRD0_CPRD_OFFSET 0 #define AVR32_PWM_CPRD0_CPRD_SIZE 32 #define AVR32_PWM_CUPD0 0x00000210 #define AVR32_PWM_CUPD0_CUPD 0 #define AVR32_PWM_CUPD0_CUPD_MASK 0xffffffff #define AVR32_PWM_CUPD0_CUPD_OFFSET 0 #define AVR32_PWM_CUPD0_CUPD_SIZE 32 #endif /*#ifdef AVR32_PWM_130_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/rtc_230.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 : UC3000 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_RTC_230_H_INCLUDED #define AVR32_RTC_230_H_INCLUDED #define AVR32_RTC_H_VERSION 230 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_RTC_ - Bitfield mask: AVR32_RTC__ - Bitfield offset: AVR32_RTC___OFFSET - Bitfield size: AVR32_RTC___SIZE - Bitfield values: AVR32_RTC___ 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_RTC_ - Bitfield offset: AVR32_RTC__OFFSET - Bitfield size: AVR32_RTC__SIZE - Bitfield values: AVR32_RTC__ - Bitfield values: AVR32_RTC_ All defines are sorted alphabetically. */ #define AVR32_RTC_BUSY 4 #define AVR32_RTC_BUSY_MASK 0x00000010 #define AVR32_RTC_BUSY_OFFSET 4 #define AVR32_RTC_BUSY_SIZE 1 #define AVR32_RTC_CLK32 3 #define AVR32_RTC_CLK32_MASK 0x00000008 #define AVR32_RTC_CLK32_OFFSET 3 #define AVR32_RTC_CLK32_SIZE 1 #define AVR32_RTC_CLKEN 16 #define AVR32_RTC_CLKEN_MASK 0x00010000 #define AVR32_RTC_CLKEN_OFFSET 16 #define AVR32_RTC_CLKEN_SIZE 1 #define AVR32_RTC_CTRL 0x00000000 #define AVR32_RTC_CTRL_BUSY 4 #define AVR32_RTC_CTRL_BUSY_MASK 0x00000010 #define AVR32_RTC_CTRL_BUSY_OFFSET 4 #define AVR32_RTC_CTRL_BUSY_SIZE 1 #define AVR32_RTC_CTRL_CLK32 3 #define AVR32_RTC_CTRL_CLK32_MASK 0x00000008 #define AVR32_RTC_CTRL_CLK32_OFFSET 3 #define AVR32_RTC_CTRL_CLK32_SIZE 1 #define AVR32_RTC_CTRL_CLKEN 16 #define AVR32_RTC_CTRL_CLKEN_MASK 0x00010000 #define AVR32_RTC_CTRL_CLKEN_OFFSET 16 #define AVR32_RTC_CTRL_CLKEN_SIZE 1 #define AVR32_RTC_CTRL_EN 0 #define AVR32_RTC_CTRL_EN_MASK 0x00000001 #define AVR32_RTC_CTRL_EN_OFFSET 0 #define AVR32_RTC_CTRL_EN_SIZE 1 #define AVR32_RTC_CTRL_PCLR 1 #define AVR32_RTC_CTRL_PCLR_MASK 0x00000002 #define AVR32_RTC_CTRL_PCLR_OFFSET 1 #define AVR32_RTC_CTRL_PCLR_SIZE 1 #define AVR32_RTC_CTRL_PSEL 8 #define AVR32_RTC_CTRL_PSEL_MASK 0x00000f00 #define AVR32_RTC_CTRL_PSEL_OFFSET 8 #define AVR32_RTC_CTRL_PSEL_SIZE 4 #define AVR32_RTC_CTRL_WAKE_EN 2 #define AVR32_RTC_CTRL_WAKE_EN_MASK 0x00000004 #define AVR32_RTC_CTRL_WAKE_EN_OFFSET 2 #define AVR32_RTC_CTRL_WAKE_EN_SIZE 1 #define AVR32_RTC_EN 0 #define AVR32_RTC_EN_MASK 0x00000001 #define AVR32_RTC_EN_OFFSET 0 #define AVR32_RTC_EN_SIZE 1 #define AVR32_RTC_ICR 0x00000020 #define AVR32_RTC_ICR_TOPI 0 #define AVR32_RTC_ICR_TOPI_MASK 0x00000001 #define AVR32_RTC_ICR_TOPI_OFFSET 0 #define AVR32_RTC_ICR_TOPI_SIZE 1 #define AVR32_RTC_IDR 0x00000014 #define AVR32_RTC_IDR_TOPI 0 #define AVR32_RTC_IDR_TOPI_MASK 0x00000001 #define AVR32_RTC_IDR_TOPI_OFFSET 0 #define AVR32_RTC_IDR_TOPI_SIZE 1 #define AVR32_RTC_IER 0x00000010 #define AVR32_RTC_IER_TOPI 0 #define AVR32_RTC_IER_TOPI_MASK 0x00000001 #define AVR32_RTC_IER_TOPI_OFFSET 0 #define AVR32_RTC_IER_TOPI_SIZE 1 #define AVR32_RTC_IMR 0x00000018 #define AVR32_RTC_IMR_TOPI 0 #define AVR32_RTC_IMR_TOPI_MASK 0x00000001 #define AVR32_RTC_IMR_TOPI_OFFSET 0 #define AVR32_RTC_IMR_TOPI_SIZE 1 #define AVR32_RTC_ISR 0x0000001c #define AVR32_RTC_ISR_TOPI 0 #define AVR32_RTC_ISR_TOPI_MASK 0x00000001 #define AVR32_RTC_ISR_TOPI_OFFSET 0 #define AVR32_RTC_ISR_TOPI_SIZE 1 #define AVR32_RTC_PCLR 1 #define AVR32_RTC_PCLR_MASK 0x00000002 #define AVR32_RTC_PCLR_OFFSET 1 #define AVR32_RTC_PCLR_SIZE 1 #define AVR32_RTC_PSEL 8 #define AVR32_RTC_PSEL_MASK 0x00000f00 #define AVR32_RTC_PSEL_OFFSET 8 #define AVR32_RTC_PSEL_SIZE 4 #define AVR32_RTC_TOP 0x00000008 #define AVR32_RTC_TOPI 0 #define AVR32_RTC_TOPI_MASK 0x00000001 #define AVR32_RTC_TOPI_OFFSET 0 #define AVR32_RTC_TOPI_SIZE 1 #define AVR32_RTC_TOP_VAL 0 #define AVR32_RTC_TOP_VAL_MASK 0xffffffff #define AVR32_RTC_TOP_VAL_OFFSET 0 #define AVR32_RTC_TOP_VAL_SIZE 32 #define AVR32_RTC_VAL 0x00000004 #define AVR32_RTC_VAL_MASK 0xffffffff #define AVR32_RTC_VAL_OFFSET 0 #define AVR32_RTC_VAL_SIZE 32 #define AVR32_RTC_VAL_VAL 0 #define AVR32_RTC_VAL_VAL_MASK 0xffffffff #define AVR32_RTC_VAL_VAL_OFFSET 0 #define AVR32_RTC_VAL_VAL_SIZE 32 #define AVR32_RTC_WAKE_EN 2 #define AVR32_RTC_WAKE_EN_MASK 0x00000004 #define AVR32_RTC_WAKE_EN_OFFSET 2 #define AVR32_RTC_WAKE_EN_SIZE 1 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_rtc_ctrl_t { unsigned int :15; unsigned int clken : 1; unsigned int : 4; unsigned int psel : 4; unsigned int : 3; unsigned int busy : 1; unsigned int clk32 : 1; unsigned int wake_en : 1; unsigned int pclr : 1; unsigned int en : 1; } avr32_rtc_ctrl_t; typedef struct avr32_rtc_ier_t { unsigned int :31; unsigned int topi : 1; } avr32_rtc_ier_t; typedef struct avr32_rtc_idr_t { unsigned int :31; unsigned int topi : 1; } avr32_rtc_idr_t; typedef struct avr32_rtc_imr_t { unsigned int :31; unsigned int topi : 1; } avr32_rtc_imr_t; typedef struct avr32_rtc_isr_t { unsigned int :31; unsigned int topi : 1; } avr32_rtc_isr_t; typedef struct avr32_rtc_icr_t { unsigned int :31; unsigned int topi : 1; } avr32_rtc_icr_t; typedef struct avr32_rtc_t { union { unsigned long ctrl ;//0x0000 avr32_rtc_ctrl_t CTRL ; }; unsigned long val ;//0x0004 unsigned long top ;//0x0008 unsigned int :32 ;//0x000c union { unsigned long ier ;//0x0010 avr32_rtc_ier_t IER ; }; union { unsigned long idr ;//0x0014 avr32_rtc_idr_t IDR ; }; union { const unsigned long imr ;//0x0018 const avr32_rtc_imr_t IMR ; }; union { const unsigned long isr ;//0x001c const avr32_rtc_isr_t ISR ; }; union { unsigned long icr ;//0x0020 avr32_rtc_icr_t ICR ; }; } avr32_rtc_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif /*#ifdef AVR32_RTC_230_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/spi_199.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 : UC3000 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_SPI_199_H_INCLUDED #define AVR32_SPI_199_H_INCLUDED #define AVR32_SPI_H_VERSION 199 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_SPI_ - Bitfield mask: AVR32_SPI__ - Bitfield offset: AVR32_SPI___OFFSET - Bitfield size: AVR32_SPI___SIZE - Bitfield values: AVR32_SPI___ 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_SPI_ - Bitfield offset: AVR32_SPI__OFFSET - Bitfield size: AVR32_SPI__SIZE - Bitfield values: AVR32_SPI__ - Bitfield values: AVR32_SPI_ All defines are sorted alphabetically. */ #define AVR32_SPI_10_BPT 0x00000002 #define AVR32_SPI_11_BPT 0x00000003 #define AVR32_SPI_12_BPT 0x00000004 #define AVR32_SPI_13_BPT 0x00000005 #define AVR32_SPI_14_BPT 0x00000006 #define AVR32_SPI_15_BPT 0x00000007 #define AVR32_SPI_16_BPT 0x00000008 #define AVR32_SPI_8_BPT 0x00000000 #define AVR32_SPI_9_BPT 0x00000001 #define AVR32_SPI_BITS 4 #define AVR32_SPI_BITS_10_BPT 0x00000002 #define AVR32_SPI_BITS_11_BPT 0x00000003 #define AVR32_SPI_BITS_12_BPT 0x00000004 #define AVR32_SPI_BITS_13_BPT 0x00000005 #define AVR32_SPI_BITS_14_BPT 0x00000006 #define AVR32_SPI_BITS_15_BPT 0x00000007 #define AVR32_SPI_BITS_16_BPT 0x00000008 #define AVR32_SPI_BITS_8_BPT 0x00000000 #define AVR32_SPI_BITS_9_BPT 0x00000001 #define AVR32_SPI_BITS_MASK 0x000000f0 #define AVR32_SPI_BITS_OFFSET 4 #define AVR32_SPI_BITS_SIZE 4 #define AVR32_SPI_CPOL 0 #define AVR32_SPI_CPOL_MASK 0x00000001 #define AVR32_SPI_CPOL_OFFSET 0 #define AVR32_SPI_CPOL_SIZE 1 #define AVR32_SPI_CR 0x00000000 #define AVR32_SPI_CR_LASTXFER 24 #define AVR32_SPI_CR_LASTXFER_MASK 0x01000000 #define AVR32_SPI_CR_LASTXFER_OFFSET 24 #define AVR32_SPI_CR_LASTXFER_SIZE 1 #define AVR32_SPI_CR_SPIDIS 1 #define AVR32_SPI_CR_SPIDIS_MASK 0x00000002 #define AVR32_SPI_CR_SPIDIS_OFFSET 1 #define AVR32_SPI_CR_SPIDIS_SIZE 1 #define AVR32_SPI_CR_SPIEN 0 #define AVR32_SPI_CR_SPIEN_MASK 0x00000001 #define AVR32_SPI_CR_SPIEN_OFFSET 0 #define AVR32_SPI_CR_SPIEN_SIZE 1 #define AVR32_SPI_CR_SWRST 7 #define AVR32_SPI_CR_SWRST_MASK 0x00000080 #define AVR32_SPI_CR_SWRST_OFFSET 7 #define AVR32_SPI_CR_SWRST_SIZE 1 #define AVR32_SPI_CSAAT 3 #define AVR32_SPI_CSAAT_MASK 0x00000008 #define AVR32_SPI_CSAAT_OFFSET 3 #define AVR32_SPI_CSAAT_SIZE 1 #define AVR32_SPI_CSNAAT 2 #define AVR32_SPI_CSNAAT_MASK 0x00000004 #define AVR32_SPI_CSNAAT_OFFSET 2 #define AVR32_SPI_CSNAAT_SIZE 1 #define AVR32_SPI_CSR0 0x00000030 #define AVR32_SPI_CSR0_BITS 4 #define AVR32_SPI_CSR0_BITS_10_BPT 0x00000002 #define AVR32_SPI_CSR0_BITS_11_BPT 0x00000003 #define AVR32_SPI_CSR0_BITS_12_BPT 0x00000004 #define AVR32_SPI_CSR0_BITS_13_BPT 0x00000005 #define AVR32_SPI_CSR0_BITS_14_BPT 0x00000006 #define AVR32_SPI_CSR0_BITS_15_BPT 0x00000007 #define AVR32_SPI_CSR0_BITS_16_BPT 0x00000008 #define AVR32_SPI_CSR0_BITS_8_BPT 0x00000000 #define AVR32_SPI_CSR0_BITS_9_BPT 0x00000001 #define AVR32_SPI_CSR0_BITS_MASK 0x000000f0 #define AVR32_SPI_CSR0_BITS_OFFSET 4 #define AVR32_SPI_CSR0_BITS_SIZE 4 #define AVR32_SPI_CSR0_CPOL 0 #define AVR32_SPI_CSR0_CPOL_MASK 0x00000001 #define AVR32_SPI_CSR0_CPOL_OFFSET 0 #define AVR32_SPI_CSR0_CPOL_SIZE 1 #define AVR32_SPI_CSR0_CSAAT 3 #define AVR32_SPI_CSR0_CSAAT_MASK 0x00000008 #define AVR32_SPI_CSR0_CSAAT_OFFSET 3 #define AVR32_SPI_CSR0_CSAAT_SIZE 1 #define AVR32_SPI_CSR0_CSNAAT 2 #define AVR32_SPI_CSR0_CSNAAT_MASK 0x00000004 #define AVR32_SPI_CSR0_CSNAAT_OFFSET 2 #define AVR32_SPI_CSR0_CSNAAT_SIZE 1 #define AVR32_SPI_CSR0_DLYBCT 24 #define AVR32_SPI_CSR0_DLYBCT_MASK 0xff000000 #define AVR32_SPI_CSR0_DLYBCT_OFFSET 24 #define AVR32_SPI_CSR0_DLYBCT_SIZE 8 #define AVR32_SPI_CSR0_DLYBS 16 #define AVR32_SPI_CSR0_DLYBS_MASK 0x00ff0000 #define AVR32_SPI_CSR0_DLYBS_OFFSET 16 #define AVR32_SPI_CSR0_DLYBS_SIZE 8 #define AVR32_SPI_CSR0_NCPHA 1 #define AVR32_SPI_CSR0_NCPHA_MASK 0x00000002 #define AVR32_SPI_CSR0_NCPHA_OFFSET 1 #define AVR32_SPI_CSR0_NCPHA_SIZE 1 #define AVR32_SPI_CSR0_SCBR 8 #define AVR32_SPI_CSR0_SCBR_MASK 0x0000ff00 #define AVR32_SPI_CSR0_SCBR_OFFSET 8 #define AVR32_SPI_CSR0_SCBR_SIZE 8 #define AVR32_SPI_CSR1 0x00000034 #define AVR32_SPI_CSR1_BITS 4 #define AVR32_SPI_CSR1_BITS_10_BPT 0x00000002 #define AVR32_SPI_CSR1_BITS_11_BPT 0x00000003 #define AVR32_SPI_CSR1_BITS_12_BPT 0x00000004 #define AVR32_SPI_CSR1_BITS_13_BPT 0x00000005 #define AVR32_SPI_CSR1_BITS_14_BPT 0x00000006 #define AVR32_SPI_CSR1_BITS_15_BPT 0x00000007 #define AVR32_SPI_CSR1_BITS_16_BPT 0x00000008 #define AVR32_SPI_CSR1_BITS_8_BPT 0x00000000 #define AVR32_SPI_CSR1_BITS_9_BPT 0x00000001 #define AVR32_SPI_CSR1_BITS_MASK 0x000000f0 #define AVR32_SPI_CSR1_BITS_OFFSET 4 #define AVR32_SPI_CSR1_BITS_SIZE 4 #define AVR32_SPI_CSR1_CPOL 0 #define AVR32_SPI_CSR1_CPOL_MASK 0x00000001 #define AVR32_SPI_CSR1_CPOL_OFFSET 0 #define AVR32_SPI_CSR1_CPOL_SIZE 1 #define AVR32_SPI_CSR1_CSAAT 3 #define AVR32_SPI_CSR1_CSAAT_MASK 0x00000008 #define AVR32_SPI_CSR1_CSAAT_OFFSET 3 #define AVR32_SPI_CSR1_CSAAT_SIZE 1 #define AVR32_SPI_CSR1_CSNAAT 2 #define AVR32_SPI_CSR1_CSNAAT_MASK 0x00000004 #define AVR32_SPI_CSR1_CSNAAT_OFFSET 2 #define AVR32_SPI_CSR1_CSNAAT_SIZE 1 #define AVR32_SPI_CSR1_DLYBCT 24 #define AVR32_SPI_CSR1_DLYBCT_MASK 0xff000000 #define AVR32_SPI_CSR1_DLYBCT_OFFSET 24 #define AVR32_SPI_CSR1_DLYBCT_SIZE 8 #define AVR32_SPI_CSR1_DLYBS 16 #define AVR32_SPI_CSR1_DLYBS_MASK 0x00ff0000 #define AVR32_SPI_CSR1_DLYBS_OFFSET 16 #define AVR32_SPI_CSR1_DLYBS_SIZE 8 #define AVR32_SPI_CSR1_NCPHA 1 #define AVR32_SPI_CSR1_NCPHA_MASK 0x00000002 #define AVR32_SPI_CSR1_NCPHA_OFFSET 1 #define AVR32_SPI_CSR1_NCPHA_SIZE 1 #define AVR32_SPI_CSR1_SCBR 8 #define AVR32_SPI_CSR1_SCBR_MASK 0x0000ff00 #define AVR32_SPI_CSR1_SCBR_OFFSET 8 #define AVR32_SPI_CSR1_SCBR_SIZE 8 #define AVR32_SPI_CSR2 0x00000038 #define AVR32_SPI_CSR2_BITS 4 #define AVR32_SPI_CSR2_BITS_10_BPT 0x00000002 #define AVR32_SPI_CSR2_BITS_11_BPT 0x00000003 #define AVR32_SPI_CSR2_BITS_12_BPT 0x00000004 #define AVR32_SPI_CSR2_BITS_13_BPT 0x00000005 #define AVR32_SPI_CSR2_BITS_14_BPT 0x00000006 #define AVR32_SPI_CSR2_BITS_15_BPT 0x00000007 #define AVR32_SPI_CSR2_BITS_16_BPT 0x00000008 #define AVR32_SPI_CSR2_BITS_8_BPT 0x00000000 #define AVR32_SPI_CSR2_BITS_9_BPT 0x00000001 #define AVR32_SPI_CSR2_BITS_MASK 0x000000f0 #define AVR32_SPI_CSR2_BITS_OFFSET 4 #define AVR32_SPI_CSR2_BITS_SIZE 4 #define AVR32_SPI_CSR2_CPOL 0 #define AVR32_SPI_CSR2_CPOL_MASK 0x00000001 #define AVR32_SPI_CSR2_CPOL_OFFSET 0 #define AVR32_SPI_CSR2_CPOL_SIZE 1 #define AVR32_SPI_CSR2_CSAAT 3 #define AVR32_SPI_CSR2_CSAAT_MASK 0x00000008 #define AVR32_SPI_CSR2_CSAAT_OFFSET 3 #define AVR32_SPI_CSR2_CSAAT_SIZE 1 #define AVR32_SPI_CSR2_CSNAAT 2 #define AVR32_SPI_CSR2_CSNAAT_MASK 0x00000004 #define AVR32_SPI_CSR2_CSNAAT_OFFSET 2 #define AVR32_SPI_CSR2_CSNAAT_SIZE 1 #define AVR32_SPI_CSR2_DLYBCT 24 #define AVR32_SPI_CSR2_DLYBCT_MASK 0xff000000 #define AVR32_SPI_CSR2_DLYBCT_OFFSET 24 #define AVR32_SPI_CSR2_DLYBCT_SIZE 8 #define AVR32_SPI_CSR2_DLYBS 16 #define AVR32_SPI_CSR2_DLYBS_MASK 0x00ff0000 #define AVR32_SPI_CSR2_DLYBS_OFFSET 16 #define AVR32_SPI_CSR2_DLYBS_SIZE 8 #define AVR32_SPI_CSR2_NCPHA 1 #define AVR32_SPI_CSR2_NCPHA_MASK 0x00000002 #define AVR32_SPI_CSR2_NCPHA_OFFSET 1 #define AVR32_SPI_CSR2_NCPHA_SIZE 1 #define AVR32_SPI_CSR2_SCBR 8 #define AVR32_SPI_CSR2_SCBR_MASK 0x0000ff00 #define AVR32_SPI_CSR2_SCBR_OFFSET 8 #define AVR32_SPI_CSR2_SCBR_SIZE 8 #define AVR32_SPI_CSR3 0x0000003c #define AVR32_SPI_CSR3_BITS 4 #define AVR32_SPI_CSR3_BITS_10_BPT 0x00000002 #define AVR32_SPI_CSR3_BITS_11_BPT 0x00000003 #define AVR32_SPI_CSR3_BITS_12_BPT 0x00000004 #define AVR32_SPI_CSR3_BITS_13_BPT 0x00000005 #define AVR32_SPI_CSR3_BITS_14_BPT 0x00000006 #define AVR32_SPI_CSR3_BITS_15_BPT 0x00000007 #define AVR32_SPI_CSR3_BITS_16_BPT 0x00000008 #define AVR32_SPI_CSR3_BITS_8_BPT 0x00000000 #define AVR32_SPI_CSR3_BITS_9_BPT 0x00000001 #define AVR32_SPI_CSR3_BITS_MASK 0x000000f0 #define AVR32_SPI_CSR3_BITS_OFFSET 4 #define AVR32_SPI_CSR3_BITS_SIZE 4 #define AVR32_SPI_CSR3_CPOL 0 #define AVR32_SPI_CSR3_CPOL_MASK 0x00000001 #define AVR32_SPI_CSR3_CPOL_OFFSET 0 #define AVR32_SPI_CSR3_CPOL_SIZE 1 #define AVR32_SPI_CSR3_CSAAT 3 #define AVR32_SPI_CSR3_CSAAT_MASK 0x00000008 #define AVR32_SPI_CSR3_CSAAT_OFFSET 3 #define AVR32_SPI_CSR3_CSAAT_SIZE 1 #define AVR32_SPI_CSR3_CSNAAT 2 #define AVR32_SPI_CSR3_CSNAAT_MASK 0x00000004 #define AVR32_SPI_CSR3_CSNAAT_OFFSET 2 #define AVR32_SPI_CSR3_CSNAAT_SIZE 1 #define AVR32_SPI_CSR3_DLYBCT 24 #define AVR32_SPI_CSR3_DLYBCT_MASK 0xff000000 #define AVR32_SPI_CSR3_DLYBCT_OFFSET 24 #define AVR32_SPI_CSR3_DLYBCT_SIZE 8 #define AVR32_SPI_CSR3_DLYBS 16 #define AVR32_SPI_CSR3_DLYBS_MASK 0x00ff0000 #define AVR32_SPI_CSR3_DLYBS_OFFSET 16 #define AVR32_SPI_CSR3_DLYBS_SIZE 8 #define AVR32_SPI_CSR3_NCPHA 1 #define AVR32_SPI_CSR3_NCPHA_MASK 0x00000002 #define AVR32_SPI_CSR3_NCPHA_OFFSET 1 #define AVR32_SPI_CSR3_NCPHA_SIZE 1 #define AVR32_SPI_CSR3_SCBR 8 #define AVR32_SPI_CSR3_SCBR_MASK 0x0000ff00 #define AVR32_SPI_CSR3_SCBR_OFFSET 8 #define AVR32_SPI_CSR3_SCBR_SIZE 8 #define AVR32_SPI_DLYBCS 24 #define AVR32_SPI_DLYBCS_MASK 0xff000000 #define AVR32_SPI_DLYBCS_OFFSET 24 #define AVR32_SPI_DLYBCS_SIZE 8 #define AVR32_SPI_DLYBCT 24 #define AVR32_SPI_DLYBCT_MASK 0xff000000 #define AVR32_SPI_DLYBCT_OFFSET 24 #define AVR32_SPI_DLYBCT_SIZE 8 #define AVR32_SPI_DLYBS 16 #define AVR32_SPI_DLYBS_MASK 0x00ff0000 #define AVR32_SPI_DLYBS_OFFSET 16 #define AVR32_SPI_DLYBS_SIZE 8 #define AVR32_SPI_ENDRX 4 #define AVR32_SPI_ENDRX_MASK 0x00000010 #define AVR32_SPI_ENDRX_OFFSET 4 #define AVR32_SPI_ENDRX_SIZE 1 #define AVR32_SPI_ENDTX 5 #define AVR32_SPI_ENDTX_MASK 0x00000020 #define AVR32_SPI_ENDTX_OFFSET 5 #define AVR32_SPI_ENDTX_SIZE 1 #define AVR32_SPI_IDR 0x00000018 #define AVR32_SPI_IDR_ENDRX 4 #define AVR32_SPI_IDR_ENDRX_MASK 0x00000010 #define AVR32_SPI_IDR_ENDRX_OFFSET 4 #define AVR32_SPI_IDR_ENDRX_SIZE 1 #define AVR32_SPI_IDR_ENDTX 5 #define AVR32_SPI_IDR_ENDTX_MASK 0x00000020 #define AVR32_SPI_IDR_ENDTX_OFFSET 5 #define AVR32_SPI_IDR_ENDTX_SIZE 1 #define AVR32_SPI_IDR_MODF 2 #define AVR32_SPI_IDR_MODF_MASK 0x00000004 #define AVR32_SPI_IDR_MODF_OFFSET 2 #define AVR32_SPI_IDR_MODF_SIZE 1 #define AVR32_SPI_IDR_NSSR 8 #define AVR32_SPI_IDR_NSSR_MASK 0x00000100 #define AVR32_SPI_IDR_NSSR_OFFSET 8 #define AVR32_SPI_IDR_NSSR_SIZE 1 #define AVR32_SPI_IDR_OVRES 3 #define AVR32_SPI_IDR_OVRES_MASK 0x00000008 #define AVR32_SPI_IDR_OVRES_OFFSET 3 #define AVR32_SPI_IDR_OVRES_SIZE 1 #define AVR32_SPI_IDR_RDRF 0 #define AVR32_SPI_IDR_RDRF_MASK 0x00000001 #define AVR32_SPI_IDR_RDRF_OFFSET 0 #define AVR32_SPI_IDR_RDRF_SIZE 1 #define AVR32_SPI_IDR_RXBUFF 6 #define AVR32_SPI_IDR_RXBUFF_MASK 0x00000040 #define AVR32_SPI_IDR_RXBUFF_OFFSET 6 #define AVR32_SPI_IDR_RXBUFF_SIZE 1 #define AVR32_SPI_IDR_TDRE 1 #define AVR32_SPI_IDR_TDRE_MASK 0x00000002 #define AVR32_SPI_IDR_TDRE_OFFSET 1 #define AVR32_SPI_IDR_TDRE_SIZE 1 #define AVR32_SPI_IDR_TXBUFE 7 #define AVR32_SPI_IDR_TXBUFE_MASK 0x00000080 #define AVR32_SPI_IDR_TXBUFE_OFFSET 7 #define AVR32_SPI_IDR_TXBUFE_SIZE 1 #define AVR32_SPI_IDR_TXEMPTY 9 #define AVR32_SPI_IDR_TXEMPTY_MASK 0x00000200 #define AVR32_SPI_IDR_TXEMPTY_OFFSET 9 #define AVR32_SPI_IDR_TXEMPTY_SIZE 1 #define AVR32_SPI_IER 0x00000014 #define AVR32_SPI_IER_ENDRX 4 #define AVR32_SPI_IER_ENDRX_MASK 0x00000010 #define AVR32_SPI_IER_ENDRX_OFFSET 4 #define AVR32_SPI_IER_ENDRX_SIZE 1 #define AVR32_SPI_IER_ENDTX 5 #define AVR32_SPI_IER_ENDTX_MASK 0x00000020 #define AVR32_SPI_IER_ENDTX_OFFSET 5 #define AVR32_SPI_IER_ENDTX_SIZE 1 #define AVR32_SPI_IER_MODF 2 #define AVR32_SPI_IER_MODF_MASK 0x00000004 #define AVR32_SPI_IER_MODF_OFFSET 2 #define AVR32_SPI_IER_MODF_SIZE 1 #define AVR32_SPI_IER_NSSR 8 #define AVR32_SPI_IER_NSSR_MASK 0x00000100 #define AVR32_SPI_IER_NSSR_OFFSET 8 #define AVR32_SPI_IER_NSSR_SIZE 1 #define AVR32_SPI_IER_OVRES 3 #define AVR32_SPI_IER_OVRES_MASK 0x00000008 #define AVR32_SPI_IER_OVRES_OFFSET 3 #define AVR32_SPI_IER_OVRES_SIZE 1 #define AVR32_SPI_IER_RDRF 0 #define AVR32_SPI_IER_RDRF_MASK 0x00000001 #define AVR32_SPI_IER_RDRF_OFFSET 0 #define AVR32_SPI_IER_RDRF_SIZE 1 #define AVR32_SPI_IER_RXBUFF 6 #define AVR32_SPI_IER_RXBUFF_MASK 0x00000040 #define AVR32_SPI_IER_RXBUFF_OFFSET 6 #define AVR32_SPI_IER_RXBUFF_SIZE 1 #define AVR32_SPI_IER_TDRE 1 #define AVR32_SPI_IER_TDRE_MASK 0x00000002 #define AVR32_SPI_IER_TDRE_OFFSET 1 #define AVR32_SPI_IER_TDRE_SIZE 1 #define AVR32_SPI_IER_TXBUFE 7 #define AVR32_SPI_IER_TXBUFE_MASK 0x00000080 #define AVR32_SPI_IER_TXBUFE_OFFSET 7 #define AVR32_SPI_IER_TXBUFE_SIZE 1 #define AVR32_SPI_IER_TXEMPTY 9 #define AVR32_SPI_IER_TXEMPTY_MASK 0x00000200 #define AVR32_SPI_IER_TXEMPTY_OFFSET 9 #define AVR32_SPI_IER_TXEMPTY_SIZE 1 #define AVR32_SPI_IMR 0x0000001c #define AVR32_SPI_IMR_ENDRX 4 #define AVR32_SPI_IMR_ENDRX_MASK 0x00000010 #define AVR32_SPI_IMR_ENDRX_OFFSET 4 #define AVR32_SPI_IMR_ENDRX_SIZE 1 #define AVR32_SPI_IMR_ENDTX 5 #define AVR32_SPI_IMR_ENDTX_MASK 0x00000020 #define AVR32_SPI_IMR_ENDTX_OFFSET 5 #define AVR32_SPI_IMR_ENDTX_SIZE 1 #define AVR32_SPI_IMR_MODF 2 #define AVR32_SPI_IMR_MODF_MASK 0x00000004 #define AVR32_SPI_IMR_MODF_OFFSET 2 #define AVR32_SPI_IMR_MODF_SIZE 1 #define AVR32_SPI_IMR_NSSR 8 #define AVR32_SPI_IMR_NSSR_MASK 0x00000100 #define AVR32_SPI_IMR_NSSR_OFFSET 8 #define AVR32_SPI_IMR_NSSR_SIZE 1 #define AVR32_SPI_IMR_OVRES 3 #define AVR32_SPI_IMR_OVRES_MASK 0x00000008 #define AVR32_SPI_IMR_OVRES_OFFSET 3 #define AVR32_SPI_IMR_OVRES_SIZE 1 #define AVR32_SPI_IMR_RDRF 0 #define AVR32_SPI_IMR_RDRF_MASK 0x00000001 #define AVR32_SPI_IMR_RDRF_OFFSET 0 #define AVR32_SPI_IMR_RDRF_SIZE 1 #define AVR32_SPI_IMR_RXBUFF 6 #define AVR32_SPI_IMR_RXBUFF_MASK 0x00000040 #define AVR32_SPI_IMR_RXBUFF_OFFSET 6 #define AVR32_SPI_IMR_RXBUFF_SIZE 1 #define AVR32_SPI_IMR_TDRE 1 #define AVR32_SPI_IMR_TDRE_MASK 0x00000002 #define AVR32_SPI_IMR_TDRE_OFFSET 1 #define AVR32_SPI_IMR_TDRE_SIZE 1 #define AVR32_SPI_IMR_TXBUFE 7 #define AVR32_SPI_IMR_TXBUFE_MASK 0x00000080 #define AVR32_SPI_IMR_TXBUFE_OFFSET 7 #define AVR32_SPI_IMR_TXBUFE_SIZE 1 #define AVR32_SPI_IMR_TXEMPTY 9 #define AVR32_SPI_IMR_TXEMPTY_MASK 0x00000200 #define AVR32_SPI_IMR_TXEMPTY_OFFSET 9 #define AVR32_SPI_IMR_TXEMPTY_SIZE 1 #define AVR32_SPI_LASTXFER 24 #define AVR32_SPI_LASTXFER_MASK 0x01000000 #define AVR32_SPI_LASTXFER_OFFSET 24 #define AVR32_SPI_LASTXFER_SIZE 1 #define AVR32_SPI_LLB 7 #define AVR32_SPI_LLB_MASK 0x00000080 #define AVR32_SPI_LLB_OFFSET 7 #define AVR32_SPI_LLB_SIZE 1 #define AVR32_SPI_MODF 2 #define AVR32_SPI_MODFDIS 4 #define AVR32_SPI_MODFDIS_MASK 0x00000010 #define AVR32_SPI_MODFDIS_OFFSET 4 #define AVR32_SPI_MODFDIS_SIZE 1 #define AVR32_SPI_MODF_MASK 0x00000004 #define AVR32_SPI_MODF_OFFSET 2 #define AVR32_SPI_MODF_SIZE 1 #define AVR32_SPI_MR 0x00000004 #define AVR32_SPI_MR_DLYBCS 24 #define AVR32_SPI_MR_DLYBCS_MASK 0xff000000 #define AVR32_SPI_MR_DLYBCS_OFFSET 24 #define AVR32_SPI_MR_DLYBCS_SIZE 8 #define AVR32_SPI_MR_LLB 7 #define AVR32_SPI_MR_LLB_MASK 0x00000080 #define AVR32_SPI_MR_LLB_OFFSET 7 #define AVR32_SPI_MR_LLB_SIZE 1 #define AVR32_SPI_MR_MODFDIS 4 #define AVR32_SPI_MR_MODFDIS_MASK 0x00000010 #define AVR32_SPI_MR_MODFDIS_OFFSET 4 #define AVR32_SPI_MR_MODFDIS_SIZE 1 #define AVR32_SPI_MR_MSTR 0 #define AVR32_SPI_MR_MSTR_MASK 0x00000001 #define AVR32_SPI_MR_MSTR_OFFSET 0 #define AVR32_SPI_MR_MSTR_SIZE 1 #define AVR32_SPI_MR_PCS 16 #define AVR32_SPI_MR_PCSDEC 2 #define AVR32_SPI_MR_PCSDEC_MASK 0x00000004 #define AVR32_SPI_MR_PCSDEC_OFFSET 2 #define AVR32_SPI_MR_PCSDEC_SIZE 1 #define AVR32_SPI_MR_PCS_MASK 0x000f0000 #define AVR32_SPI_MR_PCS_OFFSET 16 #define AVR32_SPI_MR_PCS_SIZE 4 #define AVR32_SPI_MR_PS 1 #define AVR32_SPI_MR_PS_MASK 0x00000002 #define AVR32_SPI_MR_PS_OFFSET 1 #define AVR32_SPI_MR_PS_SIZE 1 #define AVR32_SPI_MSTR 0 #define AVR32_SPI_MSTR_MASK 0x00000001 #define AVR32_SPI_MSTR_OFFSET 0 #define AVR32_SPI_MSTR_SIZE 1 #define AVR32_SPI_NCPHA 1 #define AVR32_SPI_NCPHA_MASK 0x00000002 #define AVR32_SPI_NCPHA_OFFSET 1 #define AVR32_SPI_NCPHA_SIZE 1 #define AVR32_SPI_NSSR 8 #define AVR32_SPI_NSSR_MASK 0x00000100 #define AVR32_SPI_NSSR_OFFSET 8 #define AVR32_SPI_NSSR_SIZE 1 #define AVR32_SPI_OVRES 3 #define AVR32_SPI_OVRES_MASK 0x00000008 #define AVR32_SPI_OVRES_OFFSET 3 #define AVR32_SPI_OVRES_SIZE 1 #define AVR32_SPI_PCS 16 #define AVR32_SPI_PCSDEC 2 #define AVR32_SPI_PCSDEC_MASK 0x00000004 #define AVR32_SPI_PCSDEC_OFFSET 2 #define AVR32_SPI_PCSDEC_SIZE 1 #define AVR32_SPI_PCS_MASK 0x000f0000 #define AVR32_SPI_PCS_OFFSET 16 #define AVR32_SPI_PCS_SIZE 4 #define AVR32_SPI_PS 1 #define AVR32_SPI_PS_MASK 0x00000002 #define AVR32_SPI_PS_OFFSET 1 #define AVR32_SPI_PS_SIZE 1 #define AVR32_SPI_RD 0 #define AVR32_SPI_RDR 0x00000008 #define AVR32_SPI_RDRF 0 #define AVR32_SPI_RDRF_MASK 0x00000001 #define AVR32_SPI_RDRF_OFFSET 0 #define AVR32_SPI_RDRF_SIZE 1 #define AVR32_SPI_RDR_PCS 16 #define AVR32_SPI_RDR_PCS_MASK 0x000f0000 #define AVR32_SPI_RDR_PCS_OFFSET 16 #define AVR32_SPI_RDR_PCS_SIZE 4 #define AVR32_SPI_RDR_RD 0 #define AVR32_SPI_RDR_RD_MASK 0x0000ffff #define AVR32_SPI_RDR_RD_OFFSET 0 #define AVR32_SPI_RDR_RD_SIZE 16 #define AVR32_SPI_RD_MASK 0x0000ffff #define AVR32_SPI_RD_OFFSET 0 #define AVR32_SPI_RD_SIZE 16 #define AVR32_SPI_RXBUFF 6 #define AVR32_SPI_RXBUFF_MASK 0x00000040 #define AVR32_SPI_RXBUFF_OFFSET 6 #define AVR32_SPI_RXBUFF_SIZE 1 #define AVR32_SPI_SCBR 8 #define AVR32_SPI_SCBR_MASK 0x0000ff00 #define AVR32_SPI_SCBR_OFFSET 8 #define AVR32_SPI_SCBR_SIZE 8 #define AVR32_SPI_SPIDIS 1 #define AVR32_SPI_SPIDIS_MASK 0x00000002 #define AVR32_SPI_SPIDIS_OFFSET 1 #define AVR32_SPI_SPIDIS_SIZE 1 #define AVR32_SPI_SPIEN 0 #define AVR32_SPI_SPIENS 16 #define AVR32_SPI_SPIENS_MASK 0x00010000 #define AVR32_SPI_SPIENS_OFFSET 16 #define AVR32_SPI_SPIENS_SIZE 1 #define AVR32_SPI_SPIEN_MASK 0x00000001 #define AVR32_SPI_SPIEN_OFFSET 0 #define AVR32_SPI_SPIEN_SIZE 1 #define AVR32_SPI_SR 0x00000010 #define AVR32_SPI_SR_ENDRX 4 #define AVR32_SPI_SR_ENDRX_MASK 0x00000010 #define AVR32_SPI_SR_ENDRX_OFFSET 4 #define AVR32_SPI_SR_ENDRX_SIZE 1 #define AVR32_SPI_SR_ENDTX 5 #define AVR32_SPI_SR_ENDTX_MASK 0x00000020 #define AVR32_SPI_SR_ENDTX_OFFSET 5 #define AVR32_SPI_SR_ENDTX_SIZE 1 #define AVR32_SPI_SR_MODF 2 #define AVR32_SPI_SR_MODF_MASK 0x00000004 #define AVR32_SPI_SR_MODF_OFFSET 2 #define AVR32_SPI_SR_MODF_SIZE 1 #define AVR32_SPI_SR_NSSR 8 #define AVR32_SPI_SR_NSSR_MASK 0x00000100 #define AVR32_SPI_SR_NSSR_OFFSET 8 #define AVR32_SPI_SR_NSSR_SIZE 1 #define AVR32_SPI_SR_OVRES 3 #define AVR32_SPI_SR_OVRES_MASK 0x00000008 #define AVR32_SPI_SR_OVRES_OFFSET 3 #define AVR32_SPI_SR_OVRES_SIZE 1 #define AVR32_SPI_SR_RDRF 0 #define AVR32_SPI_SR_RDRF_MASK 0x00000001 #define AVR32_SPI_SR_RDRF_OFFSET 0 #define AVR32_SPI_SR_RDRF_SIZE 1 #define AVR32_SPI_SR_RXBUFF 6 #define AVR32_SPI_SR_RXBUFF_MASK 0x00000040 #define AVR32_SPI_SR_RXBUFF_OFFSET 6 #define AVR32_SPI_SR_RXBUFF_SIZE 1 #define AVR32_SPI_SR_SPIENS 16 #define AVR32_SPI_SR_SPIENS_MASK 0x00010000 #define AVR32_SPI_SR_SPIENS_OFFSET 16 #define AVR32_SPI_SR_SPIENS_SIZE 1 #define AVR32_SPI_SR_TDRE 1 #define AVR32_SPI_SR_TDRE_MASK 0x00000002 #define AVR32_SPI_SR_TDRE_OFFSET 1 #define AVR32_SPI_SR_TDRE_SIZE 1 #define AVR32_SPI_SR_TXBUFE 7 #define AVR32_SPI_SR_TXBUFE_MASK 0x00000080 #define AVR32_SPI_SR_TXBUFE_OFFSET 7 #define AVR32_SPI_SR_TXBUFE_SIZE 1 #define AVR32_SPI_SR_TXEMPTY 9 #define AVR32_SPI_SR_TXEMPTY_MASK 0x00000200 #define AVR32_SPI_SR_TXEMPTY_OFFSET 9 #define AVR32_SPI_SR_TXEMPTY_SIZE 1 #define AVR32_SPI_SWRST 7 #define AVR32_SPI_SWRST_MASK 0x00000080 #define AVR32_SPI_SWRST_OFFSET 7 #define AVR32_SPI_SWRST_SIZE 1 #define AVR32_SPI_TD 0 #define AVR32_SPI_TDR 0x0000000c #define AVR32_SPI_TDRE 1 #define AVR32_SPI_TDRE_MASK 0x00000002 #define AVR32_SPI_TDRE_OFFSET 1 #define AVR32_SPI_TDRE_SIZE 1 #define AVR32_SPI_TDR_LASTXFER 24 #define AVR32_SPI_TDR_LASTXFER_MASK 0x01000000 #define AVR32_SPI_TDR_LASTXFER_OFFSET 24 #define AVR32_SPI_TDR_LASTXFER_SIZE 1 #define AVR32_SPI_TDR_PCS 16 #define AVR32_SPI_TDR_PCS_MASK 0x000f0000 #define AVR32_SPI_TDR_PCS_OFFSET 16 #define AVR32_SPI_TDR_PCS_SIZE 4 #define AVR32_SPI_TDR_TD 0 #define AVR32_SPI_TDR_TD_MASK 0x0000ffff #define AVR32_SPI_TDR_TD_OFFSET 0 #define AVR32_SPI_TDR_TD_SIZE 16 #define AVR32_SPI_TD_MASK 0x0000ffff #define AVR32_SPI_TD_OFFSET 0 #define AVR32_SPI_TD_SIZE 16 #define AVR32_SPI_TXBUFE 7 #define AVR32_SPI_TXBUFE_MASK 0x00000080 #define AVR32_SPI_TXBUFE_OFFSET 7 #define AVR32_SPI_TXBUFE_SIZE 1 #define AVR32_SPI_TXEMPTY 9 #define AVR32_SPI_TXEMPTY_MASK 0x00000200 #define AVR32_SPI_TXEMPTY_OFFSET 9 #define AVR32_SPI_TXEMPTY_SIZE 1 #define AVR32_SPI_VARIANT 16 #define AVR32_SPI_VARIANT_MASK 0x00070000 #define AVR32_SPI_VARIANT_OFFSET 16 #define AVR32_SPI_VARIANT_SIZE 3 #define AVR32_SPI_VERSION 0x000000fc #define AVR32_SPI_VERSION_MASK 0x00000fff #define AVR32_SPI_VERSION_OFFSET 0 #define AVR32_SPI_VERSION_SIZE 12 #define AVR32_SPI_VERSION_VARIANT 16 #define AVR32_SPI_VERSION_VARIANT_MASK 0x00070000 #define AVR32_SPI_VERSION_VARIANT_OFFSET 16 #define AVR32_SPI_VERSION_VARIANT_SIZE 3 #define AVR32_SPI_VERSION_VERSION 0 #define AVR32_SPI_VERSION_VERSION_MASK 0x00000fff #define AVR32_SPI_VERSION_VERSION_OFFSET 0 #define AVR32_SPI_VERSION_VERSION_SIZE 12 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_spi_cr_t { unsigned int : 7; unsigned int lastxfer : 1; unsigned int :16; unsigned int swrst : 1; unsigned int : 5; unsigned int spidis : 1; unsigned int spien : 1; } avr32_spi_cr_t; typedef struct avr32_spi_mr_t { unsigned int dlybcs : 8; unsigned int : 4; unsigned int pcs : 4; unsigned int : 8; unsigned int llb : 1; unsigned int : 2; unsigned int modfdis : 1; unsigned int : 1; unsigned int pcsdec : 1; unsigned int ps : 1; unsigned int mstr : 1; } avr32_spi_mr_t; typedef struct avr32_spi_rdr_t { unsigned int :12; unsigned int pcs : 4; unsigned int rd :16; } avr32_spi_rdr_t; typedef struct avr32_spi_tdr_t { unsigned int : 7; unsigned int lastxfer : 1; unsigned int : 4; unsigned int pcs : 4; unsigned int td :16; } avr32_spi_tdr_t; typedef struct avr32_spi_sr_t { unsigned int :15; unsigned int spiens : 1; unsigned int : 6; unsigned int txempty : 1; unsigned int nssr : 1; unsigned int txbufe : 1; unsigned int rxbuff : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int ovres : 1; unsigned int modf : 1; unsigned int tdre : 1; unsigned int rdrf : 1; } avr32_spi_sr_t; typedef struct avr32_spi_ier_t { unsigned int :22; unsigned int txempty : 1; unsigned int nssr : 1; unsigned int txbufe : 1; unsigned int rxbuff : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int ovres : 1; unsigned int modf : 1; unsigned int tdre : 1; unsigned int rdrf : 1; } avr32_spi_ier_t; typedef struct avr32_spi_idr_t { unsigned int :22; unsigned int txempty : 1; unsigned int nssr : 1; unsigned int txbufe : 1; unsigned int rxbuff : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int ovres : 1; unsigned int modf : 1; unsigned int tdre : 1; unsigned int rdrf : 1; } avr32_spi_idr_t; typedef struct avr32_spi_imr_t { unsigned int :22; unsigned int txempty : 1; unsigned int nssr : 1; unsigned int txbufe : 1; unsigned int rxbuff : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int ovres : 1; unsigned int modf : 1; unsigned int tdre : 1; unsigned int rdrf : 1; } avr32_spi_imr_t; typedef struct avr32_spi_csr0_t { unsigned int dlybct : 8; unsigned int dlybs : 8; unsigned int scbr : 8; unsigned int bits : 4; unsigned int csaat : 1; unsigned int csnaat : 1; unsigned int ncpha : 1; unsigned int cpol : 1; } avr32_spi_csr0_t; typedef struct avr32_spi_csr1_t { unsigned int dlybct : 8; unsigned int dlybs : 8; unsigned int scbr : 8; unsigned int bits : 4; unsigned int csaat : 1; unsigned int csnaat : 1; unsigned int ncpha : 1; unsigned int cpol : 1; } avr32_spi_csr1_t; typedef struct avr32_spi_csr2_t { unsigned int dlybct : 8; unsigned int dlybs : 8; unsigned int scbr : 8; unsigned int bits : 4; unsigned int csaat : 1; unsigned int csnaat : 1; unsigned int ncpha : 1; unsigned int cpol : 1; } avr32_spi_csr2_t; typedef struct avr32_spi_csr3_t { unsigned int dlybct : 8; unsigned int dlybs : 8; unsigned int scbr : 8; unsigned int bits : 4; unsigned int csaat : 1; unsigned int csnaat : 1; unsigned int ncpha : 1; unsigned int cpol : 1; } avr32_spi_csr3_t; typedef struct avr32_spi_version_t { unsigned int :13; unsigned int variant : 3; unsigned int : 4; unsigned int version :12; } avr32_spi_version_t; typedef struct avr32_spi_t { union { unsigned long cr ;//0x0000 avr32_spi_cr_t CR ; }; union { unsigned long mr ;//0x0004 avr32_spi_mr_t MR ; }; union { const unsigned long rdr ;//0x0008 const avr32_spi_rdr_t RDR ; }; union { unsigned long tdr ;//0x000c avr32_spi_tdr_t TDR ; }; union { const unsigned long sr ;//0x0010 const avr32_spi_sr_t SR ; }; union { unsigned long ier ;//0x0014 avr32_spi_ier_t IER ; }; union { unsigned long idr ;//0x0018 avr32_spi_idr_t IDR ; }; union { const unsigned long imr ;//0x001c const avr32_spi_imr_t IMR ; }; unsigned int :32 ;//0x0020 unsigned int :32 ;//0x0024 unsigned int :32 ;//0x0028 unsigned int :32 ;//0x002c union { unsigned long csr0 ;//0x0030 avr32_spi_csr0_t CSR0 ; }; union { unsigned long csr1 ;//0x0034 avr32_spi_csr1_t CSR1 ; }; union { unsigned long csr2 ;//0x0038 avr32_spi_csr2_t CSR2 ; }; union { unsigned long csr3 ;//0x003c avr32_spi_csr3_t CSR3 ; }; unsigned int :32 ;//0x0040 unsigned int :32 ;//0x0044 unsigned int :32 ;//0x0048 unsigned int :32 ;//0x004c unsigned int :32 ;//0x0050 unsigned int :32 ;//0x0054 unsigned int :32 ;//0x0058 unsigned int :32 ;//0x005c unsigned int :32 ;//0x0060 unsigned int :32 ;//0x0064 unsigned int :32 ;//0x0068 unsigned int :32 ;//0x006c unsigned int :32 ;//0x0070 unsigned int :32 ;//0x0074 unsigned int :32 ;//0x0078 unsigned int :32 ;//0x007c unsigned int :32 ;//0x0080 unsigned int :32 ;//0x0084 unsigned int :32 ;//0x0088 unsigned int :32 ;//0x008c unsigned int :32 ;//0x0090 unsigned int :32 ;//0x0094 unsigned int :32 ;//0x0098 unsigned int :32 ;//0x009c unsigned int :32 ;//0x00a0 unsigned int :32 ;//0x00a4 unsigned int :32 ;//0x00a8 unsigned int :32 ;//0x00ac unsigned int :32 ;//0x00b0 unsigned int :32 ;//0x00b4 unsigned int :32 ;//0x00b8 unsigned int :32 ;//0x00bc unsigned int :32 ;//0x00c0 unsigned int :32 ;//0x00c4 unsigned int :32 ;//0x00c8 unsigned int :32 ;//0x00cc unsigned int :32 ;//0x00d0 unsigned int :32 ;//0x00d4 unsigned int :32 ;//0x00d8 unsigned int :32 ;//0x00dc unsigned int :32 ;//0x00e0 unsigned int :32 ;//0x00e4 unsigned int :32 ;//0x00e8 unsigned int :32 ;//0x00ec unsigned int :32 ;//0x00f0 unsigned int :32 ;//0x00f4 unsigned int :32 ;//0x00f8 union { const unsigned long version ;//0x00fc const avr32_spi_version_t VERSION ; }; } avr32_spi_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif #if !defined (DEPRECATED_DISABLE) #define AVR32_SPI_MFN 16 #define AVR32_SPI_MFN_MASK 0x00070000 #define AVR32_SPI_MFN_OFFSET 16 #define AVR32_SPI_MFN_SIZE 3 #define AVR32_SPI_VERSION_MFN 16 #define AVR32_SPI_VERSION_MFN_MASK 0x00070000 #define AVR32_SPI_VERSION_MFN_OFFSET 16 #define AVR32_SPI_VERSION_MFN_SIZE 3 #endif /*#ifdef AVR32_SPI_199_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/ssc_310.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 : UC3A0512 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_SSC_310_H_INCLUDED #define AVR32_SSC_310_H_INCLUDED #define AVR32_SSC_H_VERSION 310 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_SSC_ - Bitfield mask: AVR32_SSC__ - Bitfield offset: AVR32_SSC___OFFSET - Bitfield size: AVR32_SSC___SIZE - Bitfield values: AVR32_SSC___ 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_SSC_ - Bitfield offset: AVR32_SSC__OFFSET - Bitfield size: AVR32_SSC__SIZE - Bitfield values: AVR32_SSC__ - Bitfield values: AVR32_SSC_ All defines are sorted alphabetically. */ #define AVR32_SSC_CKG 6 #define AVR32_SSC_CKG_HIGH 0x00000002 #define AVR32_SSC_CKG_LOW 0x00000001 #define AVR32_SSC_CKG_MASK 0x000000c0 #define AVR32_SSC_CKG_NONE 0x00000000 #define AVR32_SSC_CKG_OFFSET 6 #define AVR32_SSC_CKG_SIZE 2 #define AVR32_SSC_CKI 5 #define AVR32_SSC_CKI_MASK 0x00000020 #define AVR32_SSC_CKI_OFFSET 5 #define AVR32_SSC_CKI_SIZE 1 #define AVR32_SSC_CKO 2 #define AVR32_SSC_CKO_CONTINOUS_CLOCK_OUTPUT 0x00000001 #define AVR32_SSC_CKO_INPUT_ONLY 0x00000000 #define AVR32_SSC_CKO_MASK 0x0000001c #define AVR32_SSC_CKO_OFFSET 2 #define AVR32_SSC_CKO_SIZE 3 #define AVR32_SSC_CKS 0 #define AVR32_SSC_CKS_DIV_CLOCK 0x00000000 #define AVR32_SSC_CKS_MASK 0x00000003 #define AVR32_SSC_CKS_OFFSET 0 #define AVR32_SSC_CKS_RK_CLOCK 0x00000001 #define AVR32_SSC_CKS_RK_PIN 0x00000002 #define AVR32_SSC_CKS_SIZE 2 #define AVR32_SSC_CKS_TK_CLOCK 0x00000001 #define AVR32_SSC_CKS_TK_PIN 0x00000002 #define AVR32_SSC_CMR 0x00000004 #define AVR32_SSC_CMR_DIV 0 #define AVR32_SSC_CMR_DIV_MASK 0x00000fff #define AVR32_SSC_CMR_DIV_NOT_ACTIVE 0x00000000 #define AVR32_SSC_CMR_DIV_OFFSET 0 #define AVR32_SSC_CMR_DIV_SIZE 12 #define AVR32_SSC_COMPARE_0 0x00000008 #define AVR32_SSC_CONTINOUS 0x00000000 #define AVR32_SSC_CONTINOUS_CLOCK_OUTPUT 0x00000001 #define AVR32_SSC_CR 0x00000000 #define AVR32_SSC_CR_RXDIS 1 #define AVR32_SSC_CR_RXDIS_MASK 0x00000002 #define AVR32_SSC_CR_RXDIS_OFFSET 1 #define AVR32_SSC_CR_RXDIS_SIZE 1 #define AVR32_SSC_CR_RXEN 0 #define AVR32_SSC_CR_RXEN_MASK 0x00000001 #define AVR32_SSC_CR_RXEN_OFFSET 0 #define AVR32_SSC_CR_RXEN_SIZE 1 #define AVR32_SSC_CR_SWRST 15 #define AVR32_SSC_CR_SWRST_MASK 0x00008000 #define AVR32_SSC_CR_SWRST_OFFSET 15 #define AVR32_SSC_CR_SWRST_SIZE 1 #define AVR32_SSC_CR_TXDIS 9 #define AVR32_SSC_CR_TXDIS_MASK 0x00000200 #define AVR32_SSC_CR_TXDIS_OFFSET 9 #define AVR32_SSC_CR_TXDIS_SIZE 1 #define AVR32_SSC_CR_TXEN 8 #define AVR32_SSC_CR_TXEN_MASK 0x00000100 #define AVR32_SSC_CR_TXEN_OFFSET 8 #define AVR32_SSC_CR_TXEN_SIZE 1 #define AVR32_SSC_DATDEF 5 #define AVR32_SSC_DATDEF_MASK 0x00000020 #define AVR32_SSC_DATDEF_OFFSET 5 #define AVR32_SSC_DATDEF_SIZE 1 #define AVR32_SSC_DATLEN 0 #define AVR32_SSC_DATLEN_MASK 0x0000001f #define AVR32_SSC_DATLEN_OFFSET 0 #define AVR32_SSC_DATLEN_SIZE 5 #define AVR32_SSC_DATNB 8 #define AVR32_SSC_DATNB_MASK 0x00000f00 #define AVR32_SSC_DATNB_OFFSET 8 #define AVR32_SSC_DATNB_SIZE 4 #define AVR32_SSC_DETECT_ANY_EDGE_RF 0x00000007 #define AVR32_SSC_DETECT_ANY_EDGE_TF 0x00000007 #define AVR32_SSC_DETECT_FALLING_RF 0x00000004 #define AVR32_SSC_DETECT_FALLING_TF 0x00000004 #define AVR32_SSC_DETECT_HIGH_RF 0x00000003 #define AVR32_SSC_DETECT_HIGH_TF 0x00000003 #define AVR32_SSC_DETECT_LEVEL_CHANGE_RF 0x00000006 #define AVR32_SSC_DETECT_LEVEL_CHANGE_TF 0x00000006 #define AVR32_SSC_DETECT_LOW_RF 0x00000002 #define AVR32_SSC_DETECT_LOW_TF 0x00000002 #define AVR32_SSC_DETECT_RISING_RF 0x00000005 #define AVR32_SSC_DETECT_RISING_TF 0x00000005 #define AVR32_SSC_DIV 0 #define AVR32_SSC_DIV_CLOCK 0x00000000 #define AVR32_SSC_DIV_MASK 0x00000fff #define AVR32_SSC_DIV_NOT_ACTIVE 0x00000000 #define AVR32_SSC_DIV_OFFSET 0 #define AVR32_SSC_DIV_SIZE 12 #define AVR32_SSC_ENDRX 6 #define AVR32_SSC_ENDRX_MASK 0x00000040 #define AVR32_SSC_ENDRX_OFFSET 6 #define AVR32_SSC_ENDRX_SIZE 1 #define AVR32_SSC_ENDTX 2 #define AVR32_SSC_ENDTX_MASK 0x00000004 #define AVR32_SSC_ENDTX_OFFSET 2 #define AVR32_SSC_ENDTX_SIZE 1 #define AVR32_SSC_FSDEN 23 #define AVR32_SSC_FSDEN_MASK 0x00800000 #define AVR32_SSC_FSDEN_OFFSET 23 #define AVR32_SSC_FSDEN_SIZE 1 #define AVR32_SSC_FSEDGE 24 #define AVR32_SSC_FSEDGE_MASK 0x01000000 #define AVR32_SSC_FSEDGE_OFFSET 24 #define AVR32_SSC_FSEDGE_SIZE 1 #define AVR32_SSC_FSLEN 16 #define AVR32_SSC_FSLENHI 28 #define AVR32_SSC_FSLENHI_MASK 0xf0000000 #define AVR32_SSC_FSLENHI_OFFSET 28 #define AVR32_SSC_FSLENHI_SIZE 4 #define AVR32_SSC_FSLEN_MASK 0x000f0000 #define AVR32_SSC_FSLEN_OFFSET 16 #define AVR32_SSC_FSLEN_SIZE 4 #define AVR32_SSC_FSOS 20 #define AVR32_SSC_FSOS_HIGH_DURING_DATA 0x00000004 #define AVR32_SSC_FSOS_INPUT_ONLY 0x00000000 #define AVR32_SSC_FSOS_LOW_DURING_DATA 0x00000003 #define AVR32_SSC_FSOS_MASK 0x00700000 #define AVR32_SSC_FSOS_NEG_PULSE 0x00000001 #define AVR32_SSC_FSOS_OFFSET 20 #define AVR32_SSC_FSOS_POS_PULSE 0x00000002 #define AVR32_SSC_FSOS_SIZE 3 #define AVR32_SSC_FSOS_TOGGLE_DATA_START 0x00000005 #define AVR32_SSC_HIGH 0x00000002 #define AVR32_SSC_HIGH_DURING_DATA 0x00000004 #define AVR32_SSC_IDR 0x00000048 #define AVR32_SSC_IDR_CP0 8 #define AVR32_SSC_IDR_CP0_MASK 0x00000100 #define AVR32_SSC_IDR_CP0_OFFSET 8 #define AVR32_SSC_IDR_CP0_SIZE 1 #define AVR32_SSC_IDR_CP1 9 #define AVR32_SSC_IDR_CP1_MASK 0x00000200 #define AVR32_SSC_IDR_CP1_OFFSET 9 #define AVR32_SSC_IDR_CP1_SIZE 1 #define AVR32_SSC_IDR_ENDRX 6 #define AVR32_SSC_IDR_ENDRX_MASK 0x00000040 #define AVR32_SSC_IDR_ENDRX_OFFSET 6 #define AVR32_SSC_IDR_ENDRX_SIZE 1 #define AVR32_SSC_IDR_ENDTX 2 #define AVR32_SSC_IDR_ENDTX_MASK 0x00000004 #define AVR32_SSC_IDR_ENDTX_OFFSET 2 #define AVR32_SSC_IDR_ENDTX_SIZE 1 #define AVR32_SSC_IDR_OVRUN 5 #define AVR32_SSC_IDR_OVRUN_MASK 0x00000020 #define AVR32_SSC_IDR_OVRUN_OFFSET 5 #define AVR32_SSC_IDR_OVRUN_SIZE 1 #define AVR32_SSC_IDR_RXBUFF 7 #define AVR32_SSC_IDR_RXBUFF_MASK 0x00000080 #define AVR32_SSC_IDR_RXBUFF_OFFSET 7 #define AVR32_SSC_IDR_RXBUFF_SIZE 1 #define AVR32_SSC_IDR_RXRDY 4 #define AVR32_SSC_IDR_RXRDY_MASK 0x00000010 #define AVR32_SSC_IDR_RXRDY_OFFSET 4 #define AVR32_SSC_IDR_RXRDY_SIZE 1 #define AVR32_SSC_IDR_RXSYN 11 #define AVR32_SSC_IDR_RXSYN_MASK 0x00000800 #define AVR32_SSC_IDR_RXSYN_OFFSET 11 #define AVR32_SSC_IDR_RXSYN_SIZE 1 #define AVR32_SSC_IDR_TXBUFE 3 #define AVR32_SSC_IDR_TXBUFE_MASK 0x00000008 #define AVR32_SSC_IDR_TXBUFE_OFFSET 3 #define AVR32_SSC_IDR_TXBUFE_SIZE 1 #define AVR32_SSC_IDR_TXEMPTY 1 #define AVR32_SSC_IDR_TXEMPTY_MASK 0x00000002 #define AVR32_SSC_IDR_TXEMPTY_OFFSET 1 #define AVR32_SSC_IDR_TXEMPTY_SIZE 1 #define AVR32_SSC_IDR_TXRDY 0 #define AVR32_SSC_IDR_TXRDY_MASK 0x00000001 #define AVR32_SSC_IDR_TXRDY_OFFSET 0 #define AVR32_SSC_IDR_TXRDY_SIZE 1 #define AVR32_SSC_IDR_TXSYN 10 #define AVR32_SSC_IDR_TXSYN_MASK 0x00000400 #define AVR32_SSC_IDR_TXSYN_OFFSET 10 #define AVR32_SSC_IDR_TXSYN_SIZE 1 #define AVR32_SSC_IER 0x00000044 #define AVR32_SSC_IER_CP0 8 #define AVR32_SSC_IER_CP0_MASK 0x00000100 #define AVR32_SSC_IER_CP0_OFFSET 8 #define AVR32_SSC_IER_CP0_SIZE 1 #define AVR32_SSC_IER_CP1 9 #define AVR32_SSC_IER_CP1_MASK 0x00000200 #define AVR32_SSC_IER_CP1_OFFSET 9 #define AVR32_SSC_IER_CP1_SIZE 1 #define AVR32_SSC_IER_ENDRX 6 #define AVR32_SSC_IER_ENDRX_MASK 0x00000040 #define AVR32_SSC_IER_ENDRX_OFFSET 6 #define AVR32_SSC_IER_ENDRX_SIZE 1 #define AVR32_SSC_IER_ENDTX 2 #define AVR32_SSC_IER_ENDTX_MASK 0x00000004 #define AVR32_SSC_IER_ENDTX_OFFSET 2 #define AVR32_SSC_IER_ENDTX_SIZE 1 #define AVR32_SSC_IER_OVRUN 5 #define AVR32_SSC_IER_OVRUN_MASK 0x00000020 #define AVR32_SSC_IER_OVRUN_OFFSET 5 #define AVR32_SSC_IER_OVRUN_SIZE 1 #define AVR32_SSC_IER_RXBUFF 7 #define AVR32_SSC_IER_RXBUFF_MASK 0x00000080 #define AVR32_SSC_IER_RXBUFF_OFFSET 7 #define AVR32_SSC_IER_RXBUFF_SIZE 1 #define AVR32_SSC_IER_RXRDY 4 #define AVR32_SSC_IER_RXRDY_MASK 0x00000010 #define AVR32_SSC_IER_RXRDY_OFFSET 4 #define AVR32_SSC_IER_RXRDY_SIZE 1 #define AVR32_SSC_IER_RXSYN 11 #define AVR32_SSC_IER_RXSYN_MASK 0x00000800 #define AVR32_SSC_IER_RXSYN_OFFSET 11 #define AVR32_SSC_IER_RXSYN_SIZE 1 #define AVR32_SSC_IER_TXBUFE 3 #define AVR32_SSC_IER_TXBUFE_MASK 0x00000008 #define AVR32_SSC_IER_TXBUFE_OFFSET 3 #define AVR32_SSC_IER_TXBUFE_SIZE 1 #define AVR32_SSC_IER_TXEMPTY 1 #define AVR32_SSC_IER_TXEMPTY_MASK 0x00000002 #define AVR32_SSC_IER_TXEMPTY_OFFSET 1 #define AVR32_SSC_IER_TXEMPTY_SIZE 1 #define AVR32_SSC_IER_TXRDY 0 #define AVR32_SSC_IER_TXRDY_MASK 0x00000001 #define AVR32_SSC_IER_TXRDY_OFFSET 0 #define AVR32_SSC_IER_TXRDY_SIZE 1 #define AVR32_SSC_IER_TXSYN 10 #define AVR32_SSC_IER_TXSYN_MASK 0x00000400 #define AVR32_SSC_IER_TXSYN_OFFSET 10 #define AVR32_SSC_IER_TXSYN_SIZE 1 #define AVR32_SSC_IMR 0x0000004c #define AVR32_SSC_IMR_CP0 8 #define AVR32_SSC_IMR_CP0_MASK 0x00000100 #define AVR32_SSC_IMR_CP0_OFFSET 8 #define AVR32_SSC_IMR_CP0_SIZE 1 #define AVR32_SSC_IMR_CP1 9 #define AVR32_SSC_IMR_CP1_MASK 0x00000200 #define AVR32_SSC_IMR_CP1_OFFSET 9 #define AVR32_SSC_IMR_CP1_SIZE 1 #define AVR32_SSC_IMR_ENDRX 6 #define AVR32_SSC_IMR_ENDRX_MASK 0x00000040 #define AVR32_SSC_IMR_ENDRX_OFFSET 6 #define AVR32_SSC_IMR_ENDRX_SIZE 1 #define AVR32_SSC_IMR_ENDTX 2 #define AVR32_SSC_IMR_ENDTX_MASK 0x00000004 #define AVR32_SSC_IMR_ENDTX_OFFSET 2 #define AVR32_SSC_IMR_ENDTX_SIZE 1 #define AVR32_SSC_IMR_OVRUN 5 #define AVR32_SSC_IMR_OVRUN_MASK 0x00000020 #define AVR32_SSC_IMR_OVRUN_OFFSET 5 #define AVR32_SSC_IMR_OVRUN_SIZE 1 #define AVR32_SSC_IMR_RXBUFF 7 #define AVR32_SSC_IMR_RXBUFF_MASK 0x00000080 #define AVR32_SSC_IMR_RXBUFF_OFFSET 7 #define AVR32_SSC_IMR_RXBUFF_SIZE 1 #define AVR32_SSC_IMR_RXRDY 4 #define AVR32_SSC_IMR_RXRDY_MASK 0x00000010 #define AVR32_SSC_IMR_RXRDY_OFFSET 4 #define AVR32_SSC_IMR_RXRDY_SIZE 1 #define AVR32_SSC_IMR_RXSYN 11 #define AVR32_SSC_IMR_RXSYN_MASK 0x00000800 #define AVR32_SSC_IMR_RXSYN_OFFSET 11 #define AVR32_SSC_IMR_RXSYN_SIZE 1 #define AVR32_SSC_IMR_TXBUFE 3 #define AVR32_SSC_IMR_TXBUFE_MASK 0x00000008 #define AVR32_SSC_IMR_TXBUFE_OFFSET 3 #define AVR32_SSC_IMR_TXBUFE_SIZE 1 #define AVR32_SSC_IMR_TXEMPTY 1 #define AVR32_SSC_IMR_TXEMPTY_MASK 0x00000002 #define AVR32_SSC_IMR_TXEMPTY_OFFSET 1 #define AVR32_SSC_IMR_TXEMPTY_SIZE 1 #define AVR32_SSC_IMR_TXRDY 0 #define AVR32_SSC_IMR_TXRDY_MASK 0x00000001 #define AVR32_SSC_IMR_TXRDY_OFFSET 0 #define AVR32_SSC_IMR_TXRDY_SIZE 1 #define AVR32_SSC_IMR_TXSYN 10 #define AVR32_SSC_IMR_TXSYN_MASK 0x00000400 #define AVR32_SSC_IMR_TXSYN_OFFSET 10 #define AVR32_SSC_IMR_TXSYN_SIZE 1 #define AVR32_SSC_INPUT_ONLY 0x00000000 #define AVR32_SSC_LOOP 5 #define AVR32_SSC_LOOP_MASK 0x00000020 #define AVR32_SSC_LOOP_OFFSET 5 #define AVR32_SSC_LOOP_SIZE 1 #define AVR32_SSC_LOW 0x00000001 #define AVR32_SSC_LOW_DURING_DATA 0x00000003 #define AVR32_SSC_MSBF 7 #define AVR32_SSC_MSBF_MASK 0x00000080 #define AVR32_SSC_MSBF_OFFSET 7 #define AVR32_SSC_MSBF_SIZE 1 #define AVR32_SSC_NEG_PULSE 0x00000001 #define AVR32_SSC_NONE 0x00000000 #define AVR32_SSC_NOT_ACTIVE 0x00000000 #define AVR32_SSC_OVRUN 5 #define AVR32_SSC_OVRUN_MASK 0x00000020 #define AVR32_SSC_OVRUN_OFFSET 5 #define AVR32_SSC_OVRUN_SIZE 1 #define AVR32_SSC_PERIOD 24 #define AVR32_SSC_PERIOD_MASK 0xff000000 #define AVR32_SSC_PERIOD_OFFSET 24 #define AVR32_SSC_PERIOD_SIZE 8 #define AVR32_SSC_POS_PULSE 0x00000002 #define AVR32_SSC_RC0R 0x00000038 #define AVR32_SSC_RC0R_CP0 0 #define AVR32_SSC_RC0R_CP0_MASK 0x0000ffff #define AVR32_SSC_RC0R_CP0_OFFSET 0 #define AVR32_SSC_RC0R_CP0_SIZE 16 #define AVR32_SSC_RC1R 0x0000003c #define AVR32_SSC_RC1R_CP1 0 #define AVR32_SSC_RC1R_CP1_MASK 0x0000ffff #define AVR32_SSC_RC1R_CP1_OFFSET 0 #define AVR32_SSC_RC1R_CP1_SIZE 16 #define AVR32_SSC_RCMR 0x00000010 #define AVR32_SSC_RCMR_CKG 6 #define AVR32_SSC_RCMR_CKG_HIGH 0x00000002 #define AVR32_SSC_RCMR_CKG_LOW 0x00000001 #define AVR32_SSC_RCMR_CKG_MASK 0x000000c0 #define AVR32_SSC_RCMR_CKG_NONE 0x00000000 #define AVR32_SSC_RCMR_CKG_OFFSET 6 #define AVR32_SSC_RCMR_CKG_SIZE 2 #define AVR32_SSC_RCMR_CKI 5 #define AVR32_SSC_RCMR_CKI_MASK 0x00000020 #define AVR32_SSC_RCMR_CKI_OFFSET 5 #define AVR32_SSC_RCMR_CKI_SIZE 1 #define AVR32_SSC_RCMR_CKO 2 #define AVR32_SSC_RCMR_CKO_CONTINOUS_CLOCK_OUTPUT 0x00000001 #define AVR32_SSC_RCMR_CKO_INPUT_ONLY 0x00000000 #define AVR32_SSC_RCMR_CKO_MASK 0x0000001c #define AVR32_SSC_RCMR_CKO_OFFSET 2 #define AVR32_SSC_RCMR_CKO_SIZE 3 #define AVR32_SSC_RCMR_CKS 0 #define AVR32_SSC_RCMR_CKS_DIV_CLOCK 0x00000000 #define AVR32_SSC_RCMR_CKS_MASK 0x00000003 #define AVR32_SSC_RCMR_CKS_OFFSET 0 #define AVR32_SSC_RCMR_CKS_RK_PIN 0x00000002 #define AVR32_SSC_RCMR_CKS_SIZE 2 #define AVR32_SSC_RCMR_CKS_TK_CLOCK 0x00000001 #define AVR32_SSC_RCMR_PERIOD 24 #define AVR32_SSC_RCMR_PERIOD_MASK 0xff000000 #define AVR32_SSC_RCMR_PERIOD_OFFSET 24 #define AVR32_SSC_RCMR_PERIOD_SIZE 8 #define AVR32_SSC_RCMR_START 8 #define AVR32_SSC_RCMR_START_COMPARE_0 0x00000008 #define AVR32_SSC_RCMR_START_CONTINOUS 0x00000000 #define AVR32_SSC_RCMR_START_DETECT_ANY_EDGE_RF 0x00000007 #define AVR32_SSC_RCMR_START_DETECT_FALLING_RF 0x00000004 #define AVR32_SSC_RCMR_START_DETECT_HIGH_RF 0x00000003 #define AVR32_SSC_RCMR_START_DETECT_LEVEL_CHANGE_RF 0x00000006 #define AVR32_SSC_RCMR_START_DETECT_LOW_RF 0x00000002 #define AVR32_SSC_RCMR_START_DETECT_RISING_RF 0x00000005 #define AVR32_SSC_RCMR_START_MASK 0x00000f00 #define AVR32_SSC_RCMR_START_OFFSET 8 #define AVR32_SSC_RCMR_START_SIZE 4 #define AVR32_SSC_RCMR_START_TRANSMIT_START 0x00000001 #define AVR32_SSC_RCMR_STOP 12 #define AVR32_SSC_RCMR_STOP_MASK 0x00001000 #define AVR32_SSC_RCMR_STOP_OFFSET 12 #define AVR32_SSC_RCMR_STOP_SIZE 1 #define AVR32_SSC_RCMR_STTDLY 16 #define AVR32_SSC_RCMR_STTDLY_MASK 0x00ff0000 #define AVR32_SSC_RCMR_STTDLY_OFFSET 16 #define AVR32_SSC_RCMR_STTDLY_SIZE 8 #define AVR32_SSC_RDAT 0 #define AVR32_SSC_RDAT_MASK 0xffffffff #define AVR32_SSC_RDAT_OFFSET 0 #define AVR32_SSC_RDAT_SIZE 32 #define AVR32_SSC_RECEIVE_START 0x00000001 #define AVR32_SSC_RFMR 0x00000014 #define AVR32_SSC_RFMR_DATLEN 0 #define AVR32_SSC_RFMR_DATLEN_MASK 0x0000001f #define AVR32_SSC_RFMR_DATLEN_OFFSET 0 #define AVR32_SSC_RFMR_DATLEN_SIZE 5 #define AVR32_SSC_RFMR_DATNB 8 #define AVR32_SSC_RFMR_DATNB_MASK 0x00000f00 #define AVR32_SSC_RFMR_DATNB_OFFSET 8 #define AVR32_SSC_RFMR_DATNB_SIZE 4 #define AVR32_SSC_RFMR_FSEDGE 24 #define AVR32_SSC_RFMR_FSEDGE_MASK 0x01000000 #define AVR32_SSC_RFMR_FSEDGE_OFFSET 24 #define AVR32_SSC_RFMR_FSEDGE_SIZE 1 #define AVR32_SSC_RFMR_FSLEN 16 #define AVR32_SSC_RFMR_FSLENHI 28 #define AVR32_SSC_RFMR_FSLENHI_MASK 0xf0000000 #define AVR32_SSC_RFMR_FSLENHI_OFFSET 28 #define AVR32_SSC_RFMR_FSLENHI_SIZE 4 #define AVR32_SSC_RFMR_FSLEN_MASK 0x000f0000 #define AVR32_SSC_RFMR_FSLEN_OFFSET 16 #define AVR32_SSC_RFMR_FSLEN_SIZE 4 #define AVR32_SSC_RFMR_FSOS 20 #define AVR32_SSC_RFMR_FSOS_HIGH_DURING_DATA 0x00000004 #define AVR32_SSC_RFMR_FSOS_INPUT_ONLY 0x00000000 #define AVR32_SSC_RFMR_FSOS_LOW_DURING_DATA 0x00000003 #define AVR32_SSC_RFMR_FSOS_MASK 0x00700000 #define AVR32_SSC_RFMR_FSOS_NEG_PULSE 0x00000001 #define AVR32_SSC_RFMR_FSOS_OFFSET 20 #define AVR32_SSC_RFMR_FSOS_POS_PULSE 0x00000002 #define AVR32_SSC_RFMR_FSOS_SIZE 3 #define AVR32_SSC_RFMR_FSOS_TOGGLE_DATA_START 0x00000005 #define AVR32_SSC_RFMR_LOOP 5 #define AVR32_SSC_RFMR_LOOP_MASK 0x00000020 #define AVR32_SSC_RFMR_LOOP_OFFSET 5 #define AVR32_SSC_RFMR_LOOP_SIZE 1 #define AVR32_SSC_RFMR_MSBF 7 #define AVR32_SSC_RFMR_MSBF_MASK 0x00000080 #define AVR32_SSC_RFMR_MSBF_OFFSET 7 #define AVR32_SSC_RFMR_MSBF_SIZE 1 #define AVR32_SSC_RHR 0x00000020 #define AVR32_SSC_RHR_RDAT 0 #define AVR32_SSC_RHR_RDAT_MASK 0xffffffff #define AVR32_SSC_RHR_RDAT_OFFSET 0 #define AVR32_SSC_RHR_RDAT_SIZE 32 #define AVR32_SSC_RK_CLOCK 0x00000001 #define AVR32_SSC_RK_PIN 0x00000002 #define AVR32_SSC_RSDAT 0 #define AVR32_SSC_RSDAT_MASK 0x0000ffff #define AVR32_SSC_RSDAT_OFFSET 0 #define AVR32_SSC_RSDAT_SIZE 16 #define AVR32_SSC_RSHR 0x00000030 #define AVR32_SSC_RSHR_RSDAT 0 #define AVR32_SSC_RSHR_RSDAT_MASK 0x0000ffff #define AVR32_SSC_RSHR_RSDAT_OFFSET 0 #define AVR32_SSC_RSHR_RSDAT_SIZE 16 #define AVR32_SSC_RXBUFF 7 #define AVR32_SSC_RXBUFF_MASK 0x00000080 #define AVR32_SSC_RXBUFF_OFFSET 7 #define AVR32_SSC_RXBUFF_SIZE 1 #define AVR32_SSC_RXDIS 1 #define AVR32_SSC_RXDIS_MASK 0x00000002 #define AVR32_SSC_RXDIS_OFFSET 1 #define AVR32_SSC_RXDIS_SIZE 1 #define AVR32_SSC_RXEN_SIZE 1 #define AVR32_SSC_RXRDY 4 #define AVR32_SSC_RXRDY_MASK 0x00000010 #define AVR32_SSC_RXRDY_OFFSET 4 #define AVR32_SSC_RXRDY_SIZE 1 #define AVR32_SSC_RXSYN 11 #define AVR32_SSC_RXSYN_MASK 0x00000800 #define AVR32_SSC_RXSYN_OFFSET 11 #define AVR32_SSC_RXSYN_SIZE 1 #define AVR32_SSC_SR 0x00000040 #define AVR32_SSC_SR_CP0 8 #define AVR32_SSC_SR_CP0_MASK 0x00000100 #define AVR32_SSC_SR_CP0_OFFSET 8 #define AVR32_SSC_SR_CP0_SIZE 1 #define AVR32_SSC_SR_CP1 9 #define AVR32_SSC_SR_CP1_MASK 0x00000200 #define AVR32_SSC_SR_CP1_OFFSET 9 #define AVR32_SSC_SR_CP1_SIZE 1 #define AVR32_SSC_SR_ENDRX 6 #define AVR32_SSC_SR_ENDRX_MASK 0x00000040 #define AVR32_SSC_SR_ENDRX_OFFSET 6 #define AVR32_SSC_SR_ENDRX_SIZE 1 #define AVR32_SSC_SR_ENDTX 2 #define AVR32_SSC_SR_ENDTX_MASK 0x00000004 #define AVR32_SSC_SR_ENDTX_OFFSET 2 #define AVR32_SSC_SR_ENDTX_SIZE 1 #define AVR32_SSC_SR_OVRUN 5 #define AVR32_SSC_SR_OVRUN_MASK 0x00000020 #define AVR32_SSC_SR_OVRUN_OFFSET 5 #define AVR32_SSC_SR_OVRUN_SIZE 1 #define AVR32_SSC_SR_RXBUFF 7 #define AVR32_SSC_SR_RXBUFF_MASK 0x00000080 #define AVR32_SSC_SR_RXBUFF_OFFSET 7 #define AVR32_SSC_SR_RXBUFF_SIZE 1 #define AVR32_SSC_SR_RXEN 17 #define AVR32_SSC_SR_RXEN_MASK 0x00020000 #define AVR32_SSC_SR_RXEN_OFFSET 17 #define AVR32_SSC_SR_RXEN_SIZE 1 #define AVR32_SSC_SR_RXRDY 4 #define AVR32_SSC_SR_RXRDY_MASK 0x00000010 #define AVR32_SSC_SR_RXRDY_OFFSET 4 #define AVR32_SSC_SR_RXRDY_SIZE 1 #define AVR32_SSC_SR_RXSYN 11 #define AVR32_SSC_SR_RXSYN_MASK 0x00000800 #define AVR32_SSC_SR_RXSYN_OFFSET 11 #define AVR32_SSC_SR_RXSYN_SIZE 1 #define AVR32_SSC_SR_TXBUFE 3 #define AVR32_SSC_SR_TXBUFE_MASK 0x00000008 #define AVR32_SSC_SR_TXBUFE_OFFSET 3 #define AVR32_SSC_SR_TXBUFE_SIZE 1 #define AVR32_SSC_SR_TXEMPTY 1 #define AVR32_SSC_SR_TXEMPTY_MASK 0x00000002 #define AVR32_SSC_SR_TXEMPTY_OFFSET 1 #define AVR32_SSC_SR_TXEMPTY_SIZE 1 #define AVR32_SSC_SR_TXEN 16 #define AVR32_SSC_SR_TXEN_MASK 0x00010000 #define AVR32_SSC_SR_TXEN_OFFSET 16 #define AVR32_SSC_SR_TXEN_SIZE 1 #define AVR32_SSC_SR_TXRDY 0 #define AVR32_SSC_SR_TXRDY_MASK 0x00000001 #define AVR32_SSC_SR_TXRDY_OFFSET 0 #define AVR32_SSC_SR_TXRDY_SIZE 1 #define AVR32_SSC_SR_TXSYN 10 #define AVR32_SSC_SR_TXSYN_MASK 0x00000400 #define AVR32_SSC_SR_TXSYN_OFFSET 10 #define AVR32_SSC_SR_TXSYN_SIZE 1 #define AVR32_SSC_START 8 #define AVR32_SSC_START_COMPARE_0 0x00000008 #define AVR32_SSC_START_CONTINOUS 0x00000000 #define AVR32_SSC_START_DETECT_ANY_EDGE_RF 0x00000007 #define AVR32_SSC_START_DETECT_ANY_EDGE_TF 0x00000007 #define AVR32_SSC_START_DETECT_FALLING_RF 0x00000004 #define AVR32_SSC_START_DETECT_FALLING_TF 0x00000004 #define AVR32_SSC_START_DETECT_HIGH_RF 0x00000003 #define AVR32_SSC_START_DETECT_HIGH_TF 0x00000003 #define AVR32_SSC_START_DETECT_LEVEL_CHANGE_RF 0x00000006 #define AVR32_SSC_START_DETECT_LEVEL_CHANGE_TF 0x00000006 #define AVR32_SSC_START_DETECT_LOW_RF 0x00000002 #define AVR32_SSC_START_DETECT_LOW_TF 0x00000002 #define AVR32_SSC_START_DETECT_RISING_RF 0x00000005 #define AVR32_SSC_START_DETECT_RISING_TF 0x00000005 #define AVR32_SSC_START_MASK 0x00000f00 #define AVR32_SSC_START_OFFSET 8 #define AVR32_SSC_START_RECEIVE_START 0x00000001 #define AVR32_SSC_START_SIZE 4 #define AVR32_SSC_START_TRANSMIT_START 0x00000001 #define AVR32_SSC_STOP 12 #define AVR32_SSC_STOP_MASK 0x00001000 #define AVR32_SSC_STOP_OFFSET 12 #define AVR32_SSC_STOP_SIZE 1 #define AVR32_SSC_STTDLY 16 #define AVR32_SSC_STTDLY_MASK 0x00ff0000 #define AVR32_SSC_STTDLY_OFFSET 16 #define AVR32_SSC_STTDLY_SIZE 8 #define AVR32_SSC_SWRST 15 #define AVR32_SSC_SWRST_MASK 0x00008000 #define AVR32_SSC_SWRST_OFFSET 15 #define AVR32_SSC_SWRST_SIZE 1 #define AVR32_SSC_TCMR 0x00000018 #define AVR32_SSC_TCMR_CKG 6 #define AVR32_SSC_TCMR_CKG_HIGH 0x00000002 #define AVR32_SSC_TCMR_CKG_LOW 0x00000001 #define AVR32_SSC_TCMR_CKG_MASK 0x000000c0 #define AVR32_SSC_TCMR_CKG_NONE 0x00000000 #define AVR32_SSC_TCMR_CKG_OFFSET 6 #define AVR32_SSC_TCMR_CKG_SIZE 2 #define AVR32_SSC_TCMR_CKI 5 #define AVR32_SSC_TCMR_CKI_MASK 0x00000020 #define AVR32_SSC_TCMR_CKI_OFFSET 5 #define AVR32_SSC_TCMR_CKI_SIZE 1 #define AVR32_SSC_TCMR_CKO 2 #define AVR32_SSC_TCMR_CKO_CONTINOUS_CLOCK_OUTPUT 0x00000001 #define AVR32_SSC_TCMR_CKO_INPUT_ONLY 0x00000000 #define AVR32_SSC_TCMR_CKO_MASK 0x0000001c #define AVR32_SSC_TCMR_CKO_OFFSET 2 #define AVR32_SSC_TCMR_CKO_SIZE 3 #define AVR32_SSC_TCMR_CKS 0 #define AVR32_SSC_TCMR_CKS_DIV_CLOCK 0x00000000 #define AVR32_SSC_TCMR_CKS_MASK 0x00000003 #define AVR32_SSC_TCMR_CKS_OFFSET 0 #define AVR32_SSC_TCMR_CKS_RK_CLOCK 0x00000001 #define AVR32_SSC_TCMR_CKS_SIZE 2 #define AVR32_SSC_TCMR_CKS_TK_PIN 0x00000002 #define AVR32_SSC_TCMR_PERIOD 24 #define AVR32_SSC_TCMR_PERIOD_MASK 0xff000000 #define AVR32_SSC_TCMR_PERIOD_OFFSET 24 #define AVR32_SSC_TCMR_PERIOD_SIZE 8 #define AVR32_SSC_TCMR_START 8 #define AVR32_SSC_TCMR_START_CONTINOUS 0x00000000 #define AVR32_SSC_TCMR_START_DETECT_ANY_EDGE_TF 0x00000007 #define AVR32_SSC_TCMR_START_DETECT_FALLING_TF 0x00000004 #define AVR32_SSC_TCMR_START_DETECT_HIGH_TF 0x00000003 #define AVR32_SSC_TCMR_START_DETECT_LEVEL_CHANGE_TF 0x00000006 #define AVR32_SSC_TCMR_START_DETECT_LOW_TF 0x00000002 #define AVR32_SSC_TCMR_START_DETECT_RISING_TF 0x00000005 #define AVR32_SSC_TCMR_START_MASK 0x00000f00 #define AVR32_SSC_TCMR_START_OFFSET 8 #define AVR32_SSC_TCMR_START_RECEIVE_START 0x00000001 #define AVR32_SSC_TCMR_START_SIZE 4 #define AVR32_SSC_TCMR_STTDLY 16 #define AVR32_SSC_TCMR_STTDLY_MASK 0x00ff0000 #define AVR32_SSC_TCMR_STTDLY_OFFSET 16 #define AVR32_SSC_TCMR_STTDLY_SIZE 8 #define AVR32_SSC_TDAT 0 #define AVR32_SSC_TDAT_MASK 0xffffffff #define AVR32_SSC_TDAT_OFFSET 0 #define AVR32_SSC_TDAT_SIZE 32 #define AVR32_SSC_TFMR 0x0000001c #define AVR32_SSC_TFMR_DATDEF 5 #define AVR32_SSC_TFMR_DATDEF_MASK 0x00000020 #define AVR32_SSC_TFMR_DATDEF_OFFSET 5 #define AVR32_SSC_TFMR_DATDEF_SIZE 1 #define AVR32_SSC_TFMR_DATLEN 0 #define AVR32_SSC_TFMR_DATLEN_MASK 0x0000001f #define AVR32_SSC_TFMR_DATLEN_OFFSET 0 #define AVR32_SSC_TFMR_DATLEN_SIZE 5 #define AVR32_SSC_TFMR_DATNB 8 #define AVR32_SSC_TFMR_DATNB_MASK 0x00000f00 #define AVR32_SSC_TFMR_DATNB_OFFSET 8 #define AVR32_SSC_TFMR_DATNB_SIZE 4 #define AVR32_SSC_TFMR_FSDEN 23 #define AVR32_SSC_TFMR_FSDEN_MASK 0x00800000 #define AVR32_SSC_TFMR_FSDEN_OFFSET 23 #define AVR32_SSC_TFMR_FSDEN_SIZE 1 #define AVR32_SSC_TFMR_FSEDGE 24 #define AVR32_SSC_TFMR_FSEDGE_MASK 0x01000000 #define AVR32_SSC_TFMR_FSEDGE_OFFSET 24 #define AVR32_SSC_TFMR_FSEDGE_SIZE 1 #define AVR32_SSC_TFMR_FSLEN 16 #define AVR32_SSC_TFMR_FSLENHI 28 #define AVR32_SSC_TFMR_FSLENHI_MASK 0xf0000000 #define AVR32_SSC_TFMR_FSLENHI_OFFSET 28 #define AVR32_SSC_TFMR_FSLENHI_SIZE 4 #define AVR32_SSC_TFMR_FSLEN_MASK 0x000f0000 #define AVR32_SSC_TFMR_FSLEN_OFFSET 16 #define AVR32_SSC_TFMR_FSLEN_SIZE 4 #define AVR32_SSC_TFMR_FSOS 20 #define AVR32_SSC_TFMR_FSOS_HIGH_DURING_DATA 0x00000004 #define AVR32_SSC_TFMR_FSOS_INPUT_ONLY 0x00000000 #define AVR32_SSC_TFMR_FSOS_LOW_DURING_DATA 0x00000003 #define AVR32_SSC_TFMR_FSOS_MASK 0x00700000 #define AVR32_SSC_TFMR_FSOS_NEG_PULSE 0x00000001 #define AVR32_SSC_TFMR_FSOS_OFFSET 20 #define AVR32_SSC_TFMR_FSOS_POS_PULSE 0x00000002 #define AVR32_SSC_TFMR_FSOS_SIZE 3 #define AVR32_SSC_TFMR_FSOS_TOGGLE_DATA_START 0x00000005 #define AVR32_SSC_TFMR_MSBF 7 #define AVR32_SSC_TFMR_MSBF_MASK 0x00000080 #define AVR32_SSC_TFMR_MSBF_OFFSET 7 #define AVR32_SSC_TFMR_MSBF_SIZE 1 #define AVR32_SSC_THR 0x00000024 #define AVR32_SSC_THR_TDAT 0 #define AVR32_SSC_THR_TDAT_MASK 0xffffffff #define AVR32_SSC_THR_TDAT_OFFSET 0 #define AVR32_SSC_THR_TDAT_SIZE 32 #define AVR32_SSC_TK_CLOCK 0x00000001 #define AVR32_SSC_TK_PIN 0x00000002 #define AVR32_SSC_TOGGLE_DATA_START 0x00000005 #define AVR32_SSC_TRANSMIT_START 0x00000001 #define AVR32_SSC_TSDAT 0 #define AVR32_SSC_TSDAT_MASK 0x0000ffff #define AVR32_SSC_TSDAT_OFFSET 0 #define AVR32_SSC_TSDAT_SIZE 16 #define AVR32_SSC_TSHR 0x00000034 #define AVR32_SSC_TSHR_TSDAT 0 #define AVR32_SSC_TSHR_TSDAT_MASK 0x0000ffff #define AVR32_SSC_TSHR_TSDAT_OFFSET 0 #define AVR32_SSC_TSHR_TSDAT_SIZE 16 #define AVR32_SSC_TXBUFE 3 #define AVR32_SSC_TXBUFE_MASK 0x00000008 #define AVR32_SSC_TXBUFE_OFFSET 3 #define AVR32_SSC_TXBUFE_SIZE 1 #define AVR32_SSC_TXDIS 9 #define AVR32_SSC_TXDIS_MASK 0x00000200 #define AVR32_SSC_TXDIS_OFFSET 9 #define AVR32_SSC_TXDIS_SIZE 1 #define AVR32_SSC_TXEMPTY 1 #define AVR32_SSC_TXEMPTY_MASK 0x00000002 #define AVR32_SSC_TXEMPTY_OFFSET 1 #define AVR32_SSC_TXEMPTY_SIZE 1 #define AVR32_SSC_TXEN_SIZE 1 #define AVR32_SSC_TXRDY 0 #define AVR32_SSC_TXRDY_MASK 0x00000001 #define AVR32_SSC_TXRDY_OFFSET 0 #define AVR32_SSC_TXRDY_SIZE 1 #define AVR32_SSC_TXSYN 10 #define AVR32_SSC_TXSYN_MASK 0x00000400 #define AVR32_SSC_TXSYN_OFFSET 10 #define AVR32_SSC_TXSYN_SIZE 1 #define AVR32_SSC_VARIANT 16 #define AVR32_SSC_VARIANT_MASK 0x00070000 #define AVR32_SSC_VARIANT_OFFSET 16 #define AVR32_SSC_VARIANT_SIZE 3 #define AVR32_SSC_VERSION 0x000000fc #define AVR32_SSC_VERSION_MASK 0x00000fff #define AVR32_SSC_VERSION_OFFSET 0 #define AVR32_SSC_VERSION_SIZE 12 #define AVR32_SSC_VERSION_VARIANT 16 #define AVR32_SSC_VERSION_VARIANT_MASK 0x00070000 #define AVR32_SSC_VERSION_VARIANT_OFFSET 16 #define AVR32_SSC_VERSION_VARIANT_SIZE 3 #define AVR32_SSC_VERSION_VERSION 0 #define AVR32_SSC_VERSION_VERSION_MASK 0x00000fff #define AVR32_SSC_VERSION_VERSION_OFFSET 0 #define AVR32_SSC_VERSION_VERSION_SIZE 12 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_ssc_cr_t { unsigned int :16; unsigned int swrst : 1; unsigned int : 5; unsigned int txdis : 1; unsigned int txen : 1; unsigned int : 6; unsigned int rxdis : 1; unsigned int rxen : 1; } avr32_ssc_cr_t; typedef struct avr32_ssc_cmr_t { unsigned int :20; unsigned int div :12; } avr32_ssc_cmr_t; typedef struct avr32_ssc_rcmr_t { unsigned int period : 8; unsigned int sttdly : 8; unsigned int : 3; unsigned int stop : 1; unsigned int start : 4; unsigned int ckg : 2; unsigned int cki : 1; unsigned int cko : 3; unsigned int cks : 2; } avr32_ssc_rcmr_t; typedef struct avr32_ssc_rfmr_t { unsigned int fslenhi : 4; unsigned int : 3; unsigned int fsedge : 1; unsigned int : 1; unsigned int fsos : 3; unsigned int fslen : 4; unsigned int : 4; unsigned int datnb : 4; unsigned int msbf : 1; unsigned int : 1; unsigned int loop : 1; unsigned int datlen : 5; } avr32_ssc_rfmr_t; typedef struct avr32_ssc_tcmr_t { unsigned int period : 8; unsigned int sttdly : 8; unsigned int : 4; unsigned int start : 4; unsigned int ckg : 2; unsigned int cki : 1; unsigned int cko : 3; unsigned int cks : 2; } avr32_ssc_tcmr_t; typedef struct avr32_ssc_tfmr_t { unsigned int fslenhi : 4; unsigned int : 3; unsigned int fsedge : 1; unsigned int fsden : 1; unsigned int fsos : 3; unsigned int fslen : 4; unsigned int : 4; unsigned int datnb : 4; unsigned int msbf : 1; unsigned int : 1; unsigned int datdef : 1; unsigned int datlen : 5; } avr32_ssc_tfmr_t; typedef struct avr32_ssc_rshr_t { unsigned int :16; unsigned int rsdat :16; } avr32_ssc_rshr_t; typedef struct avr32_ssc_tshr_t { unsigned int :16; unsigned int tsdat :16; } avr32_ssc_tshr_t; typedef struct avr32_ssc_rc0r_t { unsigned int :16; unsigned int cp0 :16; } avr32_ssc_rc0r_t; typedef struct avr32_ssc_rc1r_t { unsigned int :16; unsigned int cp1 :16; } avr32_ssc_rc1r_t; typedef struct avr32_ssc_sr_t { unsigned int :14; unsigned int rxen : 1; unsigned int txen : 1; unsigned int : 4; unsigned int rxsyn : 1; unsigned int txsyn : 1; unsigned int cp1 : 1; unsigned int cp0 : 1; unsigned int rxbuff : 1; unsigned int endrx : 1; unsigned int ovrun : 1; unsigned int rxrdy : 1; unsigned int txbufe : 1; unsigned int endtx : 1; unsigned int txempty : 1; unsigned int txrdy : 1; } avr32_ssc_sr_t; typedef struct avr32_ssc_ier_t { unsigned int :20; unsigned int rxsyn : 1; unsigned int txsyn : 1; unsigned int cp1 : 1; unsigned int cp0 : 1; unsigned int rxbuff : 1; unsigned int endrx : 1; unsigned int ovrun : 1; unsigned int rxrdy : 1; unsigned int txbufe : 1; unsigned int endtx : 1; unsigned int txempty : 1; unsigned int txrdy : 1; } avr32_ssc_ier_t; typedef struct avr32_ssc_idr_t { unsigned int :20; unsigned int rxsyn : 1; unsigned int txsyn : 1; unsigned int cp1 : 1; unsigned int cp0 : 1; unsigned int rxbuff : 1; unsigned int endrx : 1; unsigned int ovrun : 1; unsigned int rxrdy : 1; unsigned int txbufe : 1; unsigned int endtx : 1; unsigned int txempty : 1; unsigned int txrdy : 1; } avr32_ssc_idr_t; typedef struct avr32_ssc_imr_t { unsigned int :20; unsigned int rxsyn : 1; unsigned int txsyn : 1; unsigned int cp1 : 1; unsigned int cp0 : 1; unsigned int rxbuff : 1; unsigned int endrx : 1; unsigned int ovrun : 1; unsigned int rxrdy : 1; unsigned int txbufe : 1; unsigned int endtx : 1; unsigned int txempty : 1; unsigned int txrdy : 1; } avr32_ssc_imr_t; typedef struct avr32_ssc_version_t { unsigned int :13; unsigned int variant : 3; unsigned int : 4; unsigned int version :12; } avr32_ssc_version_t; typedef struct avr32_ssc_t { union { unsigned long cr ;//0x0000 avr32_ssc_cr_t CR ; }; union { unsigned long cmr ;//0x0004 avr32_ssc_cmr_t CMR ; }; unsigned int :32 ;//0x0008 unsigned int :32 ;//0x000c union { unsigned long rcmr ;//0x0010 avr32_ssc_rcmr_t RCMR ; }; union { unsigned long rfmr ;//0x0014 avr32_ssc_rfmr_t RFMR ; }; union { unsigned long tcmr ;//0x0018 avr32_ssc_tcmr_t TCMR ; }; union { unsigned long tfmr ;//0x001c avr32_ssc_tfmr_t TFMR ; }; const unsigned long rhr ;//0x0020 unsigned long thr ;//0x0024 unsigned int :32 ;//0x0028 unsigned int :32 ;//0x002c union { const unsigned long rshr ;//0x0030 const avr32_ssc_rshr_t RSHR ; }; union { unsigned long tshr ;//0x0034 avr32_ssc_tshr_t TSHR ; }; union { unsigned long rc0r ;//0x0038 avr32_ssc_rc0r_t RC0R ; }; union { unsigned long rc1r ;//0x003c avr32_ssc_rc1r_t RC1R ; }; union { const unsigned long sr ;//0x0040 const avr32_ssc_sr_t SR ; }; union { unsigned long ier ;//0x0044 avr32_ssc_ier_t IER ; }; union { unsigned long idr ;//0x0048 avr32_ssc_idr_t IDR ; }; union { const unsigned long imr ;//0x004c const avr32_ssc_imr_t IMR ; }; unsigned int :32 ;//0x0050 unsigned int :32 ;//0x0054 unsigned int :32 ;//0x0058 unsigned int :32 ;//0x005c unsigned int :32 ;//0x0060 unsigned int :32 ;//0x0064 unsigned int :32 ;//0x0068 unsigned int :32 ;//0x006c unsigned int :32 ;//0x0070 unsigned int :32 ;//0x0074 unsigned int :32 ;//0x0078 unsigned int :32 ;//0x007c unsigned int :32 ;//0x0080 unsigned int :32 ;//0x0084 unsigned int :32 ;//0x0088 unsigned int :32 ;//0x008c unsigned int :32 ;//0x0090 unsigned int :32 ;//0x0094 unsigned int :32 ;//0x0098 unsigned int :32 ;//0x009c unsigned int :32 ;//0x00a0 unsigned int :32 ;//0x00a4 unsigned int :32 ;//0x00a8 unsigned int :32 ;//0x00ac unsigned int :32 ;//0x00b0 unsigned int :32 ;//0x00b4 unsigned int :32 ;//0x00b8 unsigned int :32 ;//0x00bc unsigned int :32 ;//0x00c0 unsigned int :32 ;//0x00c4 unsigned int :32 ;//0x00c8 unsigned int :32 ;//0x00cc unsigned int :32 ;//0x00d0 unsigned int :32 ;//0x00d4 unsigned int :32 ;//0x00d8 unsigned int :32 ;//0x00dc unsigned int :32 ;//0x00e0 unsigned int :32 ;//0x00e4 unsigned int :32 ;//0x00e8 unsigned int :32 ;//0x00ec unsigned int :32 ;//0x00f0 unsigned int :32 ;//0x00f4 unsigned int :32 ;//0x00f8 union { const unsigned long version ;//0x00fc const avr32_ssc_version_t VERSION ; }; } avr32_ssc_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif #if !defined (DEPRECATED_DISABLE) #define AVR32_SSC_DETECT_ANY_EGDE_RF 0x00000007 #define AVR32_SSC_RCMR_START_DETECT_ANY_EGDE_RF 0x00000007 #define AVR32_SSC_START_DETECT_ANY_EGDE_RF 0x00000007 #define AVR32_SSC_TCMR_START_DETECT_ANY_EGDE_RF 0x00000007 #define AVR32_SSC_TCMR_START_DETECT_FALLING_RF 0x00000004 #define AVR32_SSC_TCMR_START_DETECT_HIGH_RF 0x00000003 #define AVR32_SSC_TCMR_START_DETECT_LEVEL_CHANGE_RF 0x00000006 #define AVR32_SSC_TCMR_START_DETECT_LOW_RF 0x00000002 #define AVR32_SSC_TCMR_START_DETECT_RISING_RF 0x00000005 #endif /*#ifdef AVR32_SSC_310_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/tc_222.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 : AP7200 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_TC_222_H_INCLUDED #define AVR32_TC_222_H_INCLUDED #define AVR32_TC_H_VERSION 222 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_TC_ - Bitfield mask: AVR32_TC__ - Bitfield offset: AVR32_TC___OFFSET - Bitfield size: AVR32_TC___SIZE - Bitfield values: AVR32_TC___ 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_TC_ - Bitfield offset: AVR32_TC__OFFSET - Bitfield size: AVR32_TC__SIZE - Bitfield values: AVR32_TC__ - Bitfield values: AVR32_TC_ All defines are sorted alphabetically. */ #define AVR32_TC_ABETRG 10 #define AVR32_TC_ABETRG_MASK 0x00000400 #define AVR32_TC_ABETRG_OFFSET 10 #define AVR32_TC_ABETRG_SIZE 1 #define AVR32_TC_ACPA 16 #define AVR32_TC_ACPA_CLEAR 0x00000002 #define AVR32_TC_ACPA_MASK 0x00030000 #define AVR32_TC_ACPA_NONE 0x00000000 #define AVR32_TC_ACPA_OFFSET 16 #define AVR32_TC_ACPA_SET 0x00000001 #define AVR32_TC_ACPA_SIZE 2 #define AVR32_TC_ACPA_TOGGLE 0x00000003 #define AVR32_TC_ACPC 18 #define AVR32_TC_ACPC_CLEAR 0x00000002 #define AVR32_TC_ACPC_MASK 0x000c0000 #define AVR32_TC_ACPC_NONE 0x00000000 #define AVR32_TC_ACPC_OFFSET 18 #define AVR32_TC_ACPC_SET 0x00000001 #define AVR32_TC_ACPC_SIZE 2 #define AVR32_TC_ACPC_TOGGLE 0x00000003 #define AVR32_TC_AEEVT 20 #define AVR32_TC_AEEVT_CLEAR 0x00000002 #define AVR32_TC_AEEVT_MASK 0x00300000 #define AVR32_TC_AEEVT_NONE 0x00000000 #define AVR32_TC_AEEVT_OFFSET 20 #define AVR32_TC_AEEVT_SET 0x00000001 #define AVR32_TC_AEEVT_SIZE 2 #define AVR32_TC_AEEVT_TOGGLE 0x00000003 #define AVR32_TC_ASWTRG 22 #define AVR32_TC_ASWTRG_CLEAR 0x00000002 #define AVR32_TC_ASWTRG_MASK 0x00c00000 #define AVR32_TC_ASWTRG_NONE 0x00000000 #define AVR32_TC_ASWTRG_OFFSET 22 #define AVR32_TC_ASWTRG_SET 0x00000001 #define AVR32_TC_ASWTRG_SIZE 2 #define AVR32_TC_ASWTRG_TOGGLE 0x00000003 #define AVR32_TC_BCPB 24 #define AVR32_TC_BCPB_CLEAR 0x00000002 #define AVR32_TC_BCPB_MASK 0x03000000 #define AVR32_TC_BCPB_NONE 0x00000000 #define AVR32_TC_BCPB_OFFSET 24 #define AVR32_TC_BCPB_SET 0x00000001 #define AVR32_TC_BCPB_SIZE 2 #define AVR32_TC_BCPB_TOGGLE 0x00000003 #define AVR32_TC_BCPC 26 #define AVR32_TC_BCPC_CLEAR 0x00000002 #define AVR32_TC_BCPC_MASK 0x0c000000 #define AVR32_TC_BCPC_NONE 0x00000000 #define AVR32_TC_BCPC_OFFSET 26 #define AVR32_TC_BCPC_SET 0x00000001 #define AVR32_TC_BCPC_SIZE 2 #define AVR32_TC_BCPC_TOGGLE 0x00000003 #define AVR32_TC_BCR 0x000000c0 #define AVR32_TC_BCR_SYNC 0 #define AVR32_TC_BCR_SYNC_MASK 0x00000001 #define AVR32_TC_BCR_SYNC_OFFSET 0 #define AVR32_TC_BCR_SYNC_SIZE 1 #define AVR32_TC_BEEVT 28 #define AVR32_TC_BEEVT_CLEAR 0x00000002 #define AVR32_TC_BEEVT_MASK 0x30000000 #define AVR32_TC_BEEVT_NONE 0x00000000 #define AVR32_TC_BEEVT_OFFSET 28 #define AVR32_TC_BEEVT_SET 0x00000001 #define AVR32_TC_BEEVT_SIZE 2 #define AVR32_TC_BEEVT_TOGGLE 0x00000003 #define AVR32_TC_BIOTH_EDGES_TIOA 0x00000003 #define AVR32_TC_BMR 0x000000c4 #define AVR32_TC_BMR_TC0XC0S 0 #define AVR32_TC_BMR_TC0XC0S_MASK 0x00000003 #define AVR32_TC_BMR_TC0XC0S_NO_CLK 0x00000001 #define AVR32_TC_BMR_TC0XC0S_OFFSET 0 #define AVR32_TC_BMR_TC0XC0S_SIZE 2 #define AVR32_TC_BMR_TC0XC0S_TCLK0 0x00000000 #define AVR32_TC_BMR_TC0XC0S_TIOA1 0x00000002 #define AVR32_TC_BMR_TC0XC0S_TIOA2 0x00000003 #define AVR32_TC_BMR_TC1XC1S 2 #define AVR32_TC_BMR_TC1XC1S_MASK 0x0000000c #define AVR32_TC_BMR_TC1XC1S_NO_CLK 0x00000001 #define AVR32_TC_BMR_TC1XC1S_OFFSET 2 #define AVR32_TC_BMR_TC1XC1S_SIZE 2 #define AVR32_TC_BMR_TC1XC1S_TCLK1 0x00000000 #define AVR32_TC_BMR_TC1XC1S_TIOA0 0x00000002 #define AVR32_TC_BMR_TC1XC1S_TIOA2 0x00000003 #define AVR32_TC_BMR_TC2XC2S 4 #define AVR32_TC_BMR_TC2XC2S_MASK 0x00000030 #define AVR32_TC_BMR_TC2XC2S_NO_CLK 0x00000001 #define AVR32_TC_BMR_TC2XC2S_OFFSET 4 #define AVR32_TC_BMR_TC2XC2S_SIZE 2 #define AVR32_TC_BMR_TC2XC2S_TCLK2 0x00000000 #define AVR32_TC_BMR_TC2XC2S_TIOA0 0x00000002 #define AVR32_TC_BMR_TC2XC2S_TIOA1 0x00000003 #define AVR32_TC_BOTH_EDGES 0x00000003 #define AVR32_TC_BSWTRG 30 #define AVR32_TC_BSWTRG_CLEAR 0x00000002 #define AVR32_TC_BSWTRG_MASK 0xc0000000 #define AVR32_TC_BSWTRG_NONE 0x00000000 #define AVR32_TC_BSWTRG_OFFSET 30 #define AVR32_TC_BSWTRG_SET 0x00000001 #define AVR32_TC_BSWTRG_SIZE 2 #define AVR32_TC_BSWTRG_TOGGLE 0x00000003 #define AVR32_TC_BURST 4 #define AVR32_TC_BURST_CLK_AND_XC0 0x00000001 #define AVR32_TC_BURST_CLK_AND_XC1 0x00000002 #define AVR32_TC_BURST_CLK_AND_XC2 0x00000003 #define AVR32_TC_BURST_MASK 0x00000030 #define AVR32_TC_BURST_NOT_GATED 0x00000000 #define AVR32_TC_BURST_OFFSET 4 #define AVR32_TC_BURST_SIZE 2 #define AVR32_TC_CCR0 0x00000000 #define AVR32_TC_CCR0_CLKDIS 1 #define AVR32_TC_CCR0_CLKDIS_MASK 0x00000002 #define AVR32_TC_CCR0_CLKDIS_OFFSET 1 #define AVR32_TC_CCR0_CLKDIS_SIZE 1 #define AVR32_TC_CCR0_CLKEN 0 #define AVR32_TC_CCR0_CLKEN_MASK 0x00000001 #define AVR32_TC_CCR0_CLKEN_OFFSET 0 #define AVR32_TC_CCR0_CLKEN_SIZE 1 #define AVR32_TC_CCR0_SWTRG 2 #define AVR32_TC_CCR0_SWTRG_MASK 0x00000004 #define AVR32_TC_CCR0_SWTRG_OFFSET 2 #define AVR32_TC_CCR0_SWTRG_SIZE 1 #define AVR32_TC_CCR1 0x00000040 #define AVR32_TC_CCR1_CLKDIS 1 #define AVR32_TC_CCR1_CLKDIS_MASK 0x00000002 #define AVR32_TC_CCR1_CLKDIS_OFFSET 1 #define AVR32_TC_CCR1_CLKDIS_SIZE 1 #define AVR32_TC_CCR1_CLKEN 0 #define AVR32_TC_CCR1_CLKEN_MASK 0x00000001 #define AVR32_TC_CCR1_CLKEN_OFFSET 0 #define AVR32_TC_CCR1_CLKEN_SIZE 1 #define AVR32_TC_CCR1_SWTRG 2 #define AVR32_TC_CCR1_SWTRG_MASK 0x00000004 #define AVR32_TC_CCR1_SWTRG_OFFSET 2 #define AVR32_TC_CCR1_SWTRG_SIZE 1 #define AVR32_TC_CCR2 0x00000080 #define AVR32_TC_CCR2_CLKDIS 1 #define AVR32_TC_CCR2_CLKDIS_MASK 0x00000002 #define AVR32_TC_CCR2_CLKDIS_OFFSET 1 #define AVR32_TC_CCR2_CLKDIS_SIZE 1 #define AVR32_TC_CCR2_CLKEN 0 #define AVR32_TC_CCR2_CLKEN_MASK 0x00000001 #define AVR32_TC_CCR2_CLKEN_OFFSET 0 #define AVR32_TC_CCR2_CLKEN_SIZE 1 #define AVR32_TC_CCR2_SWTRG 2 #define AVR32_TC_CCR2_SWTRG_MASK 0x00000004 #define AVR32_TC_CCR2_SWTRG_OFFSET 2 #define AVR32_TC_CCR2_SWTRG_SIZE 1 #define AVR32_TC_CLEAR 0x00000002 #define AVR32_TC_CLKDIS 1 #define AVR32_TC_CLKDIS_MASK 0x00000002 #define AVR32_TC_CLKDIS_OFFSET 1 #define AVR32_TC_CLKDIS_SIZE 1 #define AVR32_TC_CLKEN 0 #define AVR32_TC_CLKEN_MASK 0x00000001 #define AVR32_TC_CLKEN_OFFSET 0 #define AVR32_TC_CLKEN_SIZE 1 #define AVR32_TC_CLKI 3 #define AVR32_TC_CLKI_MASK 0x00000008 #define AVR32_TC_CLKI_OFFSET 3 #define AVR32_TC_CLKI_SIZE 1 #define AVR32_TC_CLKSTA 16 #define AVR32_TC_CLKSTA_MASK 0x00010000 #define AVR32_TC_CLKSTA_OFFSET 16 #define AVR32_TC_CLKSTA_SIZE 1 #define AVR32_TC_CLK_AND_XC0 0x00000001 #define AVR32_TC_CLK_AND_XC1 0x00000002 #define AVR32_TC_CLK_AND_XC2 0x00000003 #define AVR32_TC_CMR0 0x00000004 #define AVR32_TC_CMR0_ABETRG 10 #define AVR32_TC_CMR0_ABETRG_MASK 0x00000400 #define AVR32_TC_CMR0_ABETRG_OFFSET 10 #define AVR32_TC_CMR0_ABETRG_SIZE 1 #define AVR32_TC_CMR0_ACPA 16 #define AVR32_TC_CMR0_ACPA_CLEAR 0x00000002 #define AVR32_TC_CMR0_ACPA_MASK 0x00030000 #define AVR32_TC_CMR0_ACPA_NONE 0x00000000 #define AVR32_TC_CMR0_ACPA_OFFSET 16 #define AVR32_TC_CMR0_ACPA_SET 0x00000001 #define AVR32_TC_CMR0_ACPA_SIZE 2 #define AVR32_TC_CMR0_ACPA_TOGGLE 0x00000003 #define AVR32_TC_CMR0_ACPC 18 #define AVR32_TC_CMR0_ACPC_CLEAR 0x00000002 #define AVR32_TC_CMR0_ACPC_MASK 0x000c0000 #define AVR32_TC_CMR0_ACPC_NONE 0x00000000 #define AVR32_TC_CMR0_ACPC_OFFSET 18 #define AVR32_TC_CMR0_ACPC_SET 0x00000001 #define AVR32_TC_CMR0_ACPC_SIZE 2 #define AVR32_TC_CMR0_ACPC_TOGGLE 0x00000003 #define AVR32_TC_CMR0_AEEVT 20 #define AVR32_TC_CMR0_AEEVT_CLEAR 0x00000002 #define AVR32_TC_CMR0_AEEVT_MASK 0x00300000 #define AVR32_TC_CMR0_AEEVT_NONE 0x00000000 #define AVR32_TC_CMR0_AEEVT_OFFSET 20 #define AVR32_TC_CMR0_AEEVT_SET 0x00000001 #define AVR32_TC_CMR0_AEEVT_SIZE 2 #define AVR32_TC_CMR0_AEEVT_TOGGLE 0x00000003 #define AVR32_TC_CMR0_ASWTRG 22 #define AVR32_TC_CMR0_ASWTRG_CLEAR 0x00000002 #define AVR32_TC_CMR0_ASWTRG_MASK 0x00c00000 #define AVR32_TC_CMR0_ASWTRG_NONE 0x00000000 #define AVR32_TC_CMR0_ASWTRG_OFFSET 22 #define AVR32_TC_CMR0_ASWTRG_SET 0x00000001 #define AVR32_TC_CMR0_ASWTRG_SIZE 2 #define AVR32_TC_CMR0_ASWTRG_TOGGLE 0x00000003 #define AVR32_TC_CMR0_BCPB 24 #define AVR32_TC_CMR0_BCPB_CLEAR 0x00000002 #define AVR32_TC_CMR0_BCPB_MASK 0x03000000 #define AVR32_TC_CMR0_BCPB_NONE 0x00000000 #define AVR32_TC_CMR0_BCPB_OFFSET 24 #define AVR32_TC_CMR0_BCPB_SET 0x00000001 #define AVR32_TC_CMR0_BCPB_SIZE 2 #define AVR32_TC_CMR0_BCPB_TOGGLE 0x00000003 #define AVR32_TC_CMR0_BCPC 26 #define AVR32_TC_CMR0_BCPC_CLEAR 0x00000002 #define AVR32_TC_CMR0_BCPC_MASK 0x0c000000 #define AVR32_TC_CMR0_BCPC_NONE 0x00000000 #define AVR32_TC_CMR0_BCPC_OFFSET 26 #define AVR32_TC_CMR0_BCPC_SET 0x00000001 #define AVR32_TC_CMR0_BCPC_SIZE 2 #define AVR32_TC_CMR0_BCPC_TOGGLE 0x00000003 #define AVR32_TC_CMR0_BEEVT 28 #define AVR32_TC_CMR0_BEEVT_CLEAR 0x00000002 #define AVR32_TC_CMR0_BEEVT_MASK 0x30000000 #define AVR32_TC_CMR0_BEEVT_NONE 0x00000000 #define AVR32_TC_CMR0_BEEVT_OFFSET 28 #define AVR32_TC_CMR0_BEEVT_SET 0x00000001 #define AVR32_TC_CMR0_BEEVT_SIZE 2 #define AVR32_TC_CMR0_BEEVT_TOGGLE 0x00000003 #define AVR32_TC_CMR0_BSWTRG 30 #define AVR32_TC_CMR0_BSWTRG_CLEAR 0x00000002 #define AVR32_TC_CMR0_BSWTRG_MASK 0xc0000000 #define AVR32_TC_CMR0_BSWTRG_NONE 0x00000000 #define AVR32_TC_CMR0_BSWTRG_OFFSET 30 #define AVR32_TC_CMR0_BSWTRG_SET 0x00000001 #define AVR32_TC_CMR0_BSWTRG_SIZE 2 #define AVR32_TC_CMR0_BSWTRG_TOGGLE 0x00000003 #define AVR32_TC_CMR0_BURST 4 #define AVR32_TC_CMR0_BURST_CLK_AND_XC0 0x00000001 #define AVR32_TC_CMR0_BURST_CLK_AND_XC1 0x00000002 #define AVR32_TC_CMR0_BURST_CLK_AND_XC2 0x00000003 #define AVR32_TC_CMR0_BURST_MASK 0x00000030 #define AVR32_TC_CMR0_BURST_NOT_GATED 0x00000000 #define AVR32_TC_CMR0_BURST_OFFSET 4 #define AVR32_TC_CMR0_BURST_SIZE 2 #define AVR32_TC_CMR0_CLKI 3 #define AVR32_TC_CMR0_CLKI_MASK 0x00000008 #define AVR32_TC_CMR0_CLKI_OFFSET 3 #define AVR32_TC_CMR0_CLKI_SIZE 1 #define AVR32_TC_CMR0_CPCDIS 7 #define AVR32_TC_CMR0_CPCDIS_MASK 0x00000080 #define AVR32_TC_CMR0_CPCDIS_OFFSET 7 #define AVR32_TC_CMR0_CPCDIS_SIZE 1 #define AVR32_TC_CMR0_CPCSTOP 6 #define AVR32_TC_CMR0_CPCSTOP_MASK 0x00000040 #define AVR32_TC_CMR0_CPCSTOP_OFFSET 6 #define AVR32_TC_CMR0_CPCSTOP_SIZE 1 #define AVR32_TC_CMR0_CPCTRG 14 #define AVR32_TC_CMR0_CPCTRG_MASK 0x00004000 #define AVR32_TC_CMR0_CPCTRG_OFFSET 14 #define AVR32_TC_CMR0_CPCTRG_SIZE 1 #define AVR32_TC_CMR0_EEVT 10 #define AVR32_TC_CMR0_EEVTEDG 8 #define AVR32_TC_CMR0_EEVTEDG_BOTH_EDGES 0x00000003 #define AVR32_TC_CMR0_EEVTEDG_MASK 0x00000300 #define AVR32_TC_CMR0_EEVTEDG_NEG_EDGE 0x00000002 #define AVR32_TC_CMR0_EEVTEDG_NO_EDGE 0x00000000 #define AVR32_TC_CMR0_EEVTEDG_OFFSET 8 #define AVR32_TC_CMR0_EEVTEDG_POS_EDGE 0x00000001 #define AVR32_TC_CMR0_EEVTEDG_SIZE 2 #define AVR32_TC_CMR0_EEVT_MASK 0x00000c00 #define AVR32_TC_CMR0_EEVT_OFFSET 10 #define AVR32_TC_CMR0_EEVT_SIZE 2 #define AVR32_TC_CMR0_EEVT_TIOB_INPUT 0x00000000 #define AVR32_TC_CMR0_EEVT_XC0_OUTPUT 0x00000001 #define AVR32_TC_CMR0_EEVT_XC1_OUTPUT 0x00000002 #define AVR32_TC_CMR0_EEVT_XC2_OUTPUT 0x00000003 #define AVR32_TC_CMR0_ENETRG 12 #define AVR32_TC_CMR0_ENETRG_MASK 0x00001000 #define AVR32_TC_CMR0_ENETRG_OFFSET 12 #define AVR32_TC_CMR0_ENETRG_SIZE 1 #define AVR32_TC_CMR0_ETRGEDG 8 #define AVR32_TC_CMR0_ETRGEDG_BOTH_EDGES 0x00000003 #define AVR32_TC_CMR0_ETRGEDG_MASK 0x00000300 #define AVR32_TC_CMR0_ETRGEDG_NEG_EDGE 0x00000002 #define AVR32_TC_CMR0_ETRGEDG_NO_EDGE 0x00000000 #define AVR32_TC_CMR0_ETRGEDG_OFFSET 8 #define AVR32_TC_CMR0_ETRGEDG_POS_EDGE 0x00000001 #define AVR32_TC_CMR0_ETRGEDG_SIZE 2 #define AVR32_TC_CMR0_LDBDIS 7 #define AVR32_TC_CMR0_LDBDIS_MASK 0x00000080 #define AVR32_TC_CMR0_LDBDIS_OFFSET 7 #define AVR32_TC_CMR0_LDBDIS_SIZE 1 #define AVR32_TC_CMR0_LDBSTOP 6 #define AVR32_TC_CMR0_LDBSTOP_MASK 0x00000040 #define AVR32_TC_CMR0_LDBSTOP_OFFSET 6 #define AVR32_TC_CMR0_LDBSTOP_SIZE 1 #define AVR32_TC_CMR0_LDRA 16 #define AVR32_TC_CMR0_LDRA_BIOTH_EDGES_TIOA 0x00000003 #define AVR32_TC_CMR0_LDRA_MASK 0x00030000 #define AVR32_TC_CMR0_LDRA_NEG_EDGE_TIOA 0x00000002 #define AVR32_TC_CMR0_LDRA_NO_EDGE 0x00000000 #define AVR32_TC_CMR0_LDRA_OFFSET 16 #define AVR32_TC_CMR0_LDRA_POS_EDGE_TIOA 0x00000001 #define AVR32_TC_CMR0_LDRA_SIZE 2 #define AVR32_TC_CMR0_LDRB 18 #define AVR32_TC_CMR0_LDRB_BIOTH_EDGES_TIOA 0x00000003 #define AVR32_TC_CMR0_LDRB_MASK 0x000c0000 #define AVR32_TC_CMR0_LDRB_NEG_EDGE_TIOA 0x00000002 #define AVR32_TC_CMR0_LDRB_NO_EDGE 0x00000000 #define AVR32_TC_CMR0_LDRB_OFFSET 18 #define AVR32_TC_CMR0_LDRB_POS_EDGE_TIOA 0x00000001 #define AVR32_TC_CMR0_LDRB_SIZE 2 #define AVR32_TC_CMR0_TCCLKS 0 #define AVR32_TC_CMR0_TCCLKS_MASK 0x00000007 #define AVR32_TC_CMR0_TCCLKS_OFFSET 0 #define AVR32_TC_CMR0_TCCLKS_SIZE 3 #define AVR32_TC_CMR0_TCCLKS_TIMER_CLOCK1 0x00000000 #define AVR32_TC_CMR0_TCCLKS_TIMER_CLOCK2 0x00000001 #define AVR32_TC_CMR0_TCCLKS_TIMER_CLOCK3 0x00000002 #define AVR32_TC_CMR0_TCCLKS_TIMER_CLOCK4 0x00000003 #define AVR32_TC_CMR0_TCCLKS_TIMER_CLOCK5 0x00000004 #define AVR32_TC_CMR0_TCCLKS_XC0 0x00000005 #define AVR32_TC_CMR0_TCCLKS_XC1 0x00000006 #define AVR32_TC_CMR0_TCCLKS_XC2 0x00000007 #define AVR32_TC_CMR0_WAVE 15 #define AVR32_TC_CMR0_WAVE_MASK 0x00008000 #define AVR32_TC_CMR0_WAVE_OFFSET 15 #define AVR32_TC_CMR0_WAVE_SIZE 1 #define AVR32_TC_CMR0_WAVSEL 13 #define AVR32_TC_CMR0_WAVSEL_MASK 0x00006000 #define AVR32_TC_CMR0_WAVSEL_OFFSET 13 #define AVR32_TC_CMR0_WAVSEL_SIZE 2 #define AVR32_TC_CMR0_WAVSEL_UPDOWN_AUTO 0x00000003 #define AVR32_TC_CMR0_WAVSEL_UPDOWN_NO_AUTO 0x00000001 #define AVR32_TC_CMR0_WAVSEL_UP_AUTO 0x00000002 #define AVR32_TC_CMR0_WAVSEL_UP_NO_AUTO 0x00000000 #define AVR32_TC_CMR1 0x00000044 #define AVR32_TC_CMR1_ABETRG 10 #define AVR32_TC_CMR1_ABETRG_MASK 0x00000400 #define AVR32_TC_CMR1_ABETRG_OFFSET 10 #define AVR32_TC_CMR1_ABETRG_SIZE 1 #define AVR32_TC_CMR1_ACPA 16 #define AVR32_TC_CMR1_ACPA_CLEAR 0x00000002 #define AVR32_TC_CMR1_ACPA_MASK 0x00030000 #define AVR32_TC_CMR1_ACPA_NONE 0x00000000 #define AVR32_TC_CMR1_ACPA_OFFSET 16 #define AVR32_TC_CMR1_ACPA_SET 0x00000001 #define AVR32_TC_CMR1_ACPA_SIZE 2 #define AVR32_TC_CMR1_ACPA_TOGGLE 0x00000003 #define AVR32_TC_CMR1_ACPC 18 #define AVR32_TC_CMR1_ACPC_CLEAR 0x00000002 #define AVR32_TC_CMR1_ACPC_MASK 0x000c0000 #define AVR32_TC_CMR1_ACPC_NONE 0x00000000 #define AVR32_TC_CMR1_ACPC_OFFSET 18 #define AVR32_TC_CMR1_ACPC_SET 0x00000001 #define AVR32_TC_CMR1_ACPC_SIZE 2 #define AVR32_TC_CMR1_ACPC_TOGGLE 0x00000003 #define AVR32_TC_CMR1_AEEVT 20 #define AVR32_TC_CMR1_AEEVT_CLEAR 0x00000002 #define AVR32_TC_CMR1_AEEVT_MASK 0x00300000 #define AVR32_TC_CMR1_AEEVT_NONE 0x00000000 #define AVR32_TC_CMR1_AEEVT_OFFSET 20 #define AVR32_TC_CMR1_AEEVT_SET 0x00000001 #define AVR32_TC_CMR1_AEEVT_SIZE 2 #define AVR32_TC_CMR1_AEEVT_TOGGLE 0x00000003 #define AVR32_TC_CMR1_ASWTRG 22 #define AVR32_TC_CMR1_ASWTRG_CLEAR 0x00000002 #define AVR32_TC_CMR1_ASWTRG_MASK 0x00c00000 #define AVR32_TC_CMR1_ASWTRG_NONE 0x00000000 #define AVR32_TC_CMR1_ASWTRG_OFFSET 22 #define AVR32_TC_CMR1_ASWTRG_SET 0x00000001 #define AVR32_TC_CMR1_ASWTRG_SIZE 2 #define AVR32_TC_CMR1_ASWTRG_TOGGLE 0x00000003 #define AVR32_TC_CMR1_BCPB 24 #define AVR32_TC_CMR1_BCPB_CLEAR 0x00000002 #define AVR32_TC_CMR1_BCPB_MASK 0x03000000 #define AVR32_TC_CMR1_BCPB_NONE 0x00000000 #define AVR32_TC_CMR1_BCPB_OFFSET 24 #define AVR32_TC_CMR1_BCPB_SET 0x00000001 #define AVR32_TC_CMR1_BCPB_SIZE 2 #define AVR32_TC_CMR1_BCPB_TOGGLE 0x00000003 #define AVR32_TC_CMR1_BCPC 26 #define AVR32_TC_CMR1_BCPC_CLEAR 0x00000002 #define AVR32_TC_CMR1_BCPC_MASK 0x0c000000 #define AVR32_TC_CMR1_BCPC_NONE 0x00000000 #define AVR32_TC_CMR1_BCPC_OFFSET 26 #define AVR32_TC_CMR1_BCPC_SET 0x00000001 #define AVR32_TC_CMR1_BCPC_SIZE 2 #define AVR32_TC_CMR1_BCPC_TOGGLE 0x00000003 #define AVR32_TC_CMR1_BEEVT 28 #define AVR32_TC_CMR1_BEEVT_CLEAR 0x00000002 #define AVR32_TC_CMR1_BEEVT_MASK 0x30000000 #define AVR32_TC_CMR1_BEEVT_NONE 0x00000000 #define AVR32_TC_CMR1_BEEVT_OFFSET 28 #define AVR32_TC_CMR1_BEEVT_SET 0x00000001 #define AVR32_TC_CMR1_BEEVT_SIZE 2 #define AVR32_TC_CMR1_BEEVT_TOGGLE 0x00000003 #define AVR32_TC_CMR1_BSWTRG 30 #define AVR32_TC_CMR1_BSWTRG_CLEAR 0x00000002 #define AVR32_TC_CMR1_BSWTRG_MASK 0xc0000000 #define AVR32_TC_CMR1_BSWTRG_NONE 0x00000000 #define AVR32_TC_CMR1_BSWTRG_OFFSET 30 #define AVR32_TC_CMR1_BSWTRG_SET 0x00000001 #define AVR32_TC_CMR1_BSWTRG_SIZE 2 #define AVR32_TC_CMR1_BSWTRG_TOGGLE 0x00000003 #define AVR32_TC_CMR1_BURST 4 #define AVR32_TC_CMR1_BURST_CLK_AND_XC0 0x00000001 #define AVR32_TC_CMR1_BURST_CLK_AND_XC1 0x00000002 #define AVR32_TC_CMR1_BURST_CLK_AND_XC2 0x00000003 #define AVR32_TC_CMR1_BURST_MASK 0x00000030 #define AVR32_TC_CMR1_BURST_NOT_GATED 0x00000000 #define AVR32_TC_CMR1_BURST_OFFSET 4 #define AVR32_TC_CMR1_BURST_SIZE 2 #define AVR32_TC_CMR1_CLKI 3 #define AVR32_TC_CMR1_CLKI_MASK 0x00000008 #define AVR32_TC_CMR1_CLKI_OFFSET 3 #define AVR32_TC_CMR1_CLKI_SIZE 1 #define AVR32_TC_CMR1_CPCDIS 7 #define AVR32_TC_CMR1_CPCDIS_MASK 0x00000080 #define AVR32_TC_CMR1_CPCDIS_OFFSET 7 #define AVR32_TC_CMR1_CPCDIS_SIZE 1 #define AVR32_TC_CMR1_CPCSTOP 6 #define AVR32_TC_CMR1_CPCSTOP_MASK 0x00000040 #define AVR32_TC_CMR1_CPCSTOP_OFFSET 6 #define AVR32_TC_CMR1_CPCSTOP_SIZE 1 #define AVR32_TC_CMR1_CPCTRG 14 #define AVR32_TC_CMR1_CPCTRG_MASK 0x00004000 #define AVR32_TC_CMR1_CPCTRG_OFFSET 14 #define AVR32_TC_CMR1_CPCTRG_SIZE 1 #define AVR32_TC_CMR1_EEVT 10 #define AVR32_TC_CMR1_EEVTEDG 8 #define AVR32_TC_CMR1_EEVTEDG_BOTH_EDGES 0x00000003 #define AVR32_TC_CMR1_EEVTEDG_MASK 0x00000300 #define AVR32_TC_CMR1_EEVTEDG_NEG_EDGE 0x00000002 #define AVR32_TC_CMR1_EEVTEDG_NO_EDGE 0x00000000 #define AVR32_TC_CMR1_EEVTEDG_OFFSET 8 #define AVR32_TC_CMR1_EEVTEDG_POS_EDGE 0x00000001 #define AVR32_TC_CMR1_EEVTEDG_SIZE 2 #define AVR32_TC_CMR1_EEVT_MASK 0x00000c00 #define AVR32_TC_CMR1_EEVT_OFFSET 10 #define AVR32_TC_CMR1_EEVT_SIZE 2 #define AVR32_TC_CMR1_EEVT_TIOB_INPUT 0x00000000 #define AVR32_TC_CMR1_EEVT_XC0_OUTPUT 0x00000001 #define AVR32_TC_CMR1_EEVT_XC1_OUTPUT 0x00000002 #define AVR32_TC_CMR1_EEVT_XC2_OUTPUT 0x00000003 #define AVR32_TC_CMR1_ENETRG 12 #define AVR32_TC_CMR1_ENETRG_MASK 0x00001000 #define AVR32_TC_CMR1_ENETRG_OFFSET 12 #define AVR32_TC_CMR1_ENETRG_SIZE 1 #define AVR32_TC_CMR1_ETRGEDG 8 #define AVR32_TC_CMR1_ETRGEDG_BOTH_EDGES 0x00000003 #define AVR32_TC_CMR1_ETRGEDG_MASK 0x00000300 #define AVR32_TC_CMR1_ETRGEDG_NEG_EDGE 0x00000002 #define AVR32_TC_CMR1_ETRGEDG_NO_EDGE 0x00000000 #define AVR32_TC_CMR1_ETRGEDG_OFFSET 8 #define AVR32_TC_CMR1_ETRGEDG_POS_EDGE 0x00000001 #define AVR32_TC_CMR1_ETRGEDG_SIZE 2 #define AVR32_TC_CMR1_LDBDIS 7 #define AVR32_TC_CMR1_LDBDIS_MASK 0x00000080 #define AVR32_TC_CMR1_LDBDIS_OFFSET 7 #define AVR32_TC_CMR1_LDBDIS_SIZE 1 #define AVR32_TC_CMR1_LDBSTOP 6 #define AVR32_TC_CMR1_LDBSTOP_MASK 0x00000040 #define AVR32_TC_CMR1_LDBSTOP_OFFSET 6 #define AVR32_TC_CMR1_LDBSTOP_SIZE 1 #define AVR32_TC_CMR1_LDRA 16 #define AVR32_TC_CMR1_LDRA_BIOTH_EDGES_TIOA 0x00000003 #define AVR32_TC_CMR1_LDRA_MASK 0x00030000 #define AVR32_TC_CMR1_LDRA_NEG_EDGE_TIOA 0x00000002 #define AVR32_TC_CMR1_LDRA_NO_EDGE 0x00000000 #define AVR32_TC_CMR1_LDRA_OFFSET 16 #define AVR32_TC_CMR1_LDRA_POS_EDGE_TIOA 0x00000001 #define AVR32_TC_CMR1_LDRA_SIZE 2 #define AVR32_TC_CMR1_LDRB 18 #define AVR32_TC_CMR1_LDRB_BIOTH_EDGES_TIOA 0x00000003 #define AVR32_TC_CMR1_LDRB_MASK 0x000c0000 #define AVR32_TC_CMR1_LDRB_NEG_EDGE_TIOA 0x00000002 #define AVR32_TC_CMR1_LDRB_NO_EDGE 0x00000000 #define AVR32_TC_CMR1_LDRB_OFFSET 18 #define AVR32_TC_CMR1_LDRB_POS_EDGE_TIOA 0x00000001 #define AVR32_TC_CMR1_LDRB_SIZE 2 #define AVR32_TC_CMR1_TCCLKS 0 #define AVR32_TC_CMR1_TCCLKS_MASK 0x00000007 #define AVR32_TC_CMR1_TCCLKS_OFFSET 0 #define AVR32_TC_CMR1_TCCLKS_SIZE 3 #define AVR32_TC_CMR1_TCCLKS_TIMER_CLOCK1 0x00000000 #define AVR32_TC_CMR1_TCCLKS_TIMER_CLOCK2 0x00000001 #define AVR32_TC_CMR1_TCCLKS_TIMER_CLOCK3 0x00000002 #define AVR32_TC_CMR1_TCCLKS_TIMER_CLOCK4 0x00000003 #define AVR32_TC_CMR1_TCCLKS_TIMER_CLOCK5 0x00000004 #define AVR32_TC_CMR1_TCCLKS_XC0 0x00000005 #define AVR32_TC_CMR1_TCCLKS_XC1 0x00000006 #define AVR32_TC_CMR1_TCCLKS_XC2 0x00000007 #define AVR32_TC_CMR1_WAVE 15 #define AVR32_TC_CMR1_WAVE_MASK 0x00008000 #define AVR32_TC_CMR1_WAVE_OFFSET 15 #define AVR32_TC_CMR1_WAVE_SIZE 1 #define AVR32_TC_CMR1_WAVSEL 13 #define AVR32_TC_CMR1_WAVSEL_MASK 0x00006000 #define AVR32_TC_CMR1_WAVSEL_OFFSET 13 #define AVR32_TC_CMR1_WAVSEL_SIZE 2 #define AVR32_TC_CMR1_WAVSEL_UPDOWN_AUTO 0x00000003 #define AVR32_TC_CMR1_WAVSEL_UPDOWN_NO_AUTO 0x00000001 #define AVR32_TC_CMR1_WAVSEL_UP_AUTO 0x00000002 #define AVR32_TC_CMR1_WAVSEL_UP_NO_AUTO 0x00000000 #define AVR32_TC_CMR2 0x00000084 #define AVR32_TC_CMR2_ABETRG 10 #define AVR32_TC_CMR2_ABETRG_MASK 0x00000400 #define AVR32_TC_CMR2_ABETRG_OFFSET 10 #define AVR32_TC_CMR2_ABETRG_SIZE 1 #define AVR32_TC_CMR2_ACPA 16 #define AVR32_TC_CMR2_ACPA_CLEAR 0x00000002 #define AVR32_TC_CMR2_ACPA_MASK 0x00030000 #define AVR32_TC_CMR2_ACPA_NONE 0x00000000 #define AVR32_TC_CMR2_ACPA_OFFSET 16 #define AVR32_TC_CMR2_ACPA_SET 0x00000001 #define AVR32_TC_CMR2_ACPA_SIZE 2 #define AVR32_TC_CMR2_ACPA_TOGGLE 0x00000003 #define AVR32_TC_CMR2_ACPC 18 #define AVR32_TC_CMR2_ACPC_CLEAR 0x00000002 #define AVR32_TC_CMR2_ACPC_MASK 0x000c0000 #define AVR32_TC_CMR2_ACPC_NONE 0x00000000 #define AVR32_TC_CMR2_ACPC_OFFSET 18 #define AVR32_TC_CMR2_ACPC_SET 0x00000001 #define AVR32_TC_CMR2_ACPC_SIZE 2 #define AVR32_TC_CMR2_ACPC_TOGGLE 0x00000003 #define AVR32_TC_CMR2_AEEVT 20 #define AVR32_TC_CMR2_AEEVT_CLEAR 0x00000002 #define AVR32_TC_CMR2_AEEVT_MASK 0x00300000 #define AVR32_TC_CMR2_AEEVT_NONE 0x00000000 #define AVR32_TC_CMR2_AEEVT_OFFSET 20 #define AVR32_TC_CMR2_AEEVT_SET 0x00000001 #define AVR32_TC_CMR2_AEEVT_SIZE 2 #define AVR32_TC_CMR2_AEEVT_TOGGLE 0x00000003 #define AVR32_TC_CMR2_ASWTRG 22 #define AVR32_TC_CMR2_ASWTRG_CLEAR 0x00000002 #define AVR32_TC_CMR2_ASWTRG_MASK 0x00c00000 #define AVR32_TC_CMR2_ASWTRG_NONE 0x00000000 #define AVR32_TC_CMR2_ASWTRG_OFFSET 22 #define AVR32_TC_CMR2_ASWTRG_SET 0x00000001 #define AVR32_TC_CMR2_ASWTRG_SIZE 2 #define AVR32_TC_CMR2_ASWTRG_TOGGLE 0x00000003 #define AVR32_TC_CMR2_BCPB 24 #define AVR32_TC_CMR2_BCPB_CLEAR 0x00000002 #define AVR32_TC_CMR2_BCPB_MASK 0x03000000 #define AVR32_TC_CMR2_BCPB_NONE 0x00000000 #define AVR32_TC_CMR2_BCPB_OFFSET 24 #define AVR32_TC_CMR2_BCPB_SET 0x00000001 #define AVR32_TC_CMR2_BCPB_SIZE 2 #define AVR32_TC_CMR2_BCPB_TOGGLE 0x00000003 #define AVR32_TC_CMR2_BCPC 26 #define AVR32_TC_CMR2_BCPC_CLEAR 0x00000002 #define AVR32_TC_CMR2_BCPC_MASK 0x0c000000 #define AVR32_TC_CMR2_BCPC_NONE 0x00000000 #define AVR32_TC_CMR2_BCPC_OFFSET 26 #define AVR32_TC_CMR2_BCPC_SET 0x00000001 #define AVR32_TC_CMR2_BCPC_SIZE 2 #define AVR32_TC_CMR2_BCPC_TOGGLE 0x00000003 #define AVR32_TC_CMR2_BEEVT 28 #define AVR32_TC_CMR2_BEEVT_CLEAR 0x00000002 #define AVR32_TC_CMR2_BEEVT_MASK 0x30000000 #define AVR32_TC_CMR2_BEEVT_NONE 0x00000000 #define AVR32_TC_CMR2_BEEVT_OFFSET 28 #define AVR32_TC_CMR2_BEEVT_SET 0x00000001 #define AVR32_TC_CMR2_BEEVT_SIZE 2 #define AVR32_TC_CMR2_BEEVT_TOGGLE 0x00000003 #define AVR32_TC_CMR2_BSWTRG 30 #define AVR32_TC_CMR2_BSWTRG_CLEAR 0x00000002 #define AVR32_TC_CMR2_BSWTRG_MASK 0xc0000000 #define AVR32_TC_CMR2_BSWTRG_NONE 0x00000000 #define AVR32_TC_CMR2_BSWTRG_OFFSET 30 #define AVR32_TC_CMR2_BSWTRG_SET 0x00000001 #define AVR32_TC_CMR2_BSWTRG_SIZE 2 #define AVR32_TC_CMR2_BSWTRG_TOGGLE 0x00000003 #define AVR32_TC_CMR2_BURST 4 #define AVR32_TC_CMR2_BURST_CLK_AND_XC0 0x00000001 #define AVR32_TC_CMR2_BURST_CLK_AND_XC1 0x00000002 #define AVR32_TC_CMR2_BURST_CLK_AND_XC2 0x00000003 #define AVR32_TC_CMR2_BURST_MASK 0x00000030 #define AVR32_TC_CMR2_BURST_NOT_GATED 0x00000000 #define AVR32_TC_CMR2_BURST_OFFSET 4 #define AVR32_TC_CMR2_BURST_SIZE 2 #define AVR32_TC_CMR2_CLKI 3 #define AVR32_TC_CMR2_CLKI_MASK 0x00000008 #define AVR32_TC_CMR2_CLKI_OFFSET 3 #define AVR32_TC_CMR2_CLKI_SIZE 1 #define AVR32_TC_CMR2_CPCDIS 7 #define AVR32_TC_CMR2_CPCDIS_MASK 0x00000080 #define AVR32_TC_CMR2_CPCDIS_OFFSET 7 #define AVR32_TC_CMR2_CPCDIS_SIZE 1 #define AVR32_TC_CMR2_CPCSTOP 6 #define AVR32_TC_CMR2_CPCSTOP_MASK 0x00000040 #define AVR32_TC_CMR2_CPCSTOP_OFFSET 6 #define AVR32_TC_CMR2_CPCSTOP_SIZE 1 #define AVR32_TC_CMR2_CPCTRG 14 #define AVR32_TC_CMR2_CPCTRG_MASK 0x00004000 #define AVR32_TC_CMR2_CPCTRG_OFFSET 14 #define AVR32_TC_CMR2_CPCTRG_SIZE 1 #define AVR32_TC_CMR2_EEVT 10 #define AVR32_TC_CMR2_EEVTEDG 8 #define AVR32_TC_CMR2_EEVTEDG_BOTH_EDGES 0x00000003 #define AVR32_TC_CMR2_EEVTEDG_MASK 0x00000300 #define AVR32_TC_CMR2_EEVTEDG_NEG_EDGE 0x00000002 #define AVR32_TC_CMR2_EEVTEDG_NO_EDGE 0x00000000 #define AVR32_TC_CMR2_EEVTEDG_OFFSET 8 #define AVR32_TC_CMR2_EEVTEDG_POS_EDGE 0x00000001 #define AVR32_TC_CMR2_EEVTEDG_SIZE 2 #define AVR32_TC_CMR2_EEVT_MASK 0x00000c00 #define AVR32_TC_CMR2_EEVT_OFFSET 10 #define AVR32_TC_CMR2_EEVT_SIZE 2 #define AVR32_TC_CMR2_EEVT_TIOB_INPUT 0x00000000 #define AVR32_TC_CMR2_EEVT_XC0_OUTPUT 0x00000001 #define AVR32_TC_CMR2_EEVT_XC1_OUTPUT 0x00000002 #define AVR32_TC_CMR2_EEVT_XC2_OUTPUT 0x00000003 #define AVR32_TC_CMR2_ENETRG 12 #define AVR32_TC_CMR2_ENETRG_MASK 0x00001000 #define AVR32_TC_CMR2_ENETRG_OFFSET 12 #define AVR32_TC_CMR2_ENETRG_SIZE 1 #define AVR32_TC_CMR2_ETRGEDG 8 #define AVR32_TC_CMR2_ETRGEDG_BOTH_EDGES 0x00000003 #define AVR32_TC_CMR2_ETRGEDG_MASK 0x00000300 #define AVR32_TC_CMR2_ETRGEDG_NEG_EDGE 0x00000002 #define AVR32_TC_CMR2_ETRGEDG_NO_EDGE 0x00000000 #define AVR32_TC_CMR2_ETRGEDG_OFFSET 8 #define AVR32_TC_CMR2_ETRGEDG_POS_EDGE 0x00000001 #define AVR32_TC_CMR2_ETRGEDG_SIZE 2 #define AVR32_TC_CMR2_LDBDIS 7 #define AVR32_TC_CMR2_LDBDIS_MASK 0x00000080 #define AVR32_TC_CMR2_LDBDIS_OFFSET 7 #define AVR32_TC_CMR2_LDBDIS_SIZE 1 #define AVR32_TC_CMR2_LDBSTOP 6 #define AVR32_TC_CMR2_LDBSTOP_MASK 0x00000040 #define AVR32_TC_CMR2_LDBSTOP_OFFSET 6 #define AVR32_TC_CMR2_LDBSTOP_SIZE 1 #define AVR32_TC_CMR2_LDRA 16 #define AVR32_TC_CMR2_LDRA_BIOTH_EDGES_TIOA 0x00000003 #define AVR32_TC_CMR2_LDRA_MASK 0x00030000 #define AVR32_TC_CMR2_LDRA_NEG_EDGE_TIOA 0x00000002 #define AVR32_TC_CMR2_LDRA_NO_EDGE 0x00000000 #define AVR32_TC_CMR2_LDRA_OFFSET 16 #define AVR32_TC_CMR2_LDRA_POS_EDGE_TIOA 0x00000001 #define AVR32_TC_CMR2_LDRA_SIZE 2 #define AVR32_TC_CMR2_LDRB 18 #define AVR32_TC_CMR2_LDRB_BIOTH_EDGES_TIOA 0x00000003 #define AVR32_TC_CMR2_LDRB_MASK 0x000c0000 #define AVR32_TC_CMR2_LDRB_NEG_EDGE_TIOA 0x00000002 #define AVR32_TC_CMR2_LDRB_NO_EDGE 0x00000000 #define AVR32_TC_CMR2_LDRB_OFFSET 18 #define AVR32_TC_CMR2_LDRB_POS_EDGE_TIOA 0x00000001 #define AVR32_TC_CMR2_LDRB_SIZE 2 #define AVR32_TC_CMR2_TCCLKS 0 #define AVR32_TC_CMR2_TCCLKS_MASK 0x00000007 #define AVR32_TC_CMR2_TCCLKS_OFFSET 0 #define AVR32_TC_CMR2_TCCLKS_SIZE 3 #define AVR32_TC_CMR2_TCCLKS_TIMER_CLOCK1 0x00000000 #define AVR32_TC_CMR2_TCCLKS_TIMER_CLOCK2 0x00000001 #define AVR32_TC_CMR2_TCCLKS_TIMER_CLOCK3 0x00000002 #define AVR32_TC_CMR2_TCCLKS_TIMER_CLOCK4 0x00000003 #define AVR32_TC_CMR2_TCCLKS_TIMER_CLOCK5 0x00000004 #define AVR32_TC_CMR2_TCCLKS_XC0 0x00000005 #define AVR32_TC_CMR2_TCCLKS_XC1 0x00000006 #define AVR32_TC_CMR2_TCCLKS_XC2 0x00000007 #define AVR32_TC_CMR2_WAVE 15 #define AVR32_TC_CMR2_WAVE_MASK 0x00008000 #define AVR32_TC_CMR2_WAVE_OFFSET 15 #define AVR32_TC_CMR2_WAVE_SIZE 1 #define AVR32_TC_CMR2_WAVSEL 13 #define AVR32_TC_CMR2_WAVSEL_MASK 0x00006000 #define AVR32_TC_CMR2_WAVSEL_OFFSET 13 #define AVR32_TC_CMR2_WAVSEL_SIZE 2 #define AVR32_TC_CMR2_WAVSEL_UPDOWN_AUTO 0x00000003 #define AVR32_TC_CMR2_WAVSEL_UPDOWN_NO_AUTO 0x00000001 #define AVR32_TC_CMR2_WAVSEL_UP_AUTO 0x00000002 #define AVR32_TC_CMR2_WAVSEL_UP_NO_AUTO 0x00000000 #define AVR32_TC_COVFS 0 #define AVR32_TC_COVFS_MASK 0x00000001 #define AVR32_TC_COVFS_OFFSET 0 #define AVR32_TC_COVFS_SIZE 1 #define AVR32_TC_CPAS 2 #define AVR32_TC_CPAS_MASK 0x00000004 #define AVR32_TC_CPAS_OFFSET 2 #define AVR32_TC_CPAS_SIZE 1 #define AVR32_TC_CPBS 3 #define AVR32_TC_CPBS_MASK 0x00000008 #define AVR32_TC_CPBS_OFFSET 3 #define AVR32_TC_CPBS_SIZE 1 #define AVR32_TC_CPCDIS 7 #define AVR32_TC_CPCDIS_MASK 0x00000080 #define AVR32_TC_CPCDIS_OFFSET 7 #define AVR32_TC_CPCDIS_SIZE 1 #define AVR32_TC_CPCS 4 #define AVR32_TC_CPCSTOP 6 #define AVR32_TC_CPCSTOP_MASK 0x00000040 #define AVR32_TC_CPCSTOP_OFFSET 6 #define AVR32_TC_CPCSTOP_SIZE 1 #define AVR32_TC_CPCS_MASK 0x00000010 #define AVR32_TC_CPCS_OFFSET 4 #define AVR32_TC_CPCS_SIZE 1 #define AVR32_TC_CPCTRG 14 #define AVR32_TC_CPCTRG_MASK 0x00004000 #define AVR32_TC_CPCTRG_OFFSET 14 #define AVR32_TC_CPCTRG_SIZE 1 #define AVR32_TC_CV 0 #define AVR32_TC_CV0 0x00000010 #define AVR32_TC_CV0_CV 0 #define AVR32_TC_CV0_CV_MASK 0x0000ffff #define AVR32_TC_CV0_CV_OFFSET 0 #define AVR32_TC_CV0_CV_SIZE 16 #define AVR32_TC_CV1 0x00000050 #define AVR32_TC_CV1_CV 0 #define AVR32_TC_CV1_CV_MASK 0x0000ffff #define AVR32_TC_CV1_CV_OFFSET 0 #define AVR32_TC_CV1_CV_SIZE 16 #define AVR32_TC_CV2 0x00000090 #define AVR32_TC_CV2_CV 0 #define AVR32_TC_CV2_CV_MASK 0x0000ffff #define AVR32_TC_CV2_CV_OFFSET 0 #define AVR32_TC_CV2_CV_SIZE 16 #define AVR32_TC_CV_MASK 0x0000ffff #define AVR32_TC_CV_OFFSET 0 #define AVR32_TC_CV_SIZE 16 #define AVR32_TC_EEVT 10 #define AVR32_TC_EEVTEDG 8 #define AVR32_TC_EEVTEDG_BOTH_EDGES 0x00000003 #define AVR32_TC_EEVTEDG_MASK 0x00000300 #define AVR32_TC_EEVTEDG_NEG_EDGE 0x00000002 #define AVR32_TC_EEVTEDG_NO_EDGE 0x00000000 #define AVR32_TC_EEVTEDG_OFFSET 8 #define AVR32_TC_EEVTEDG_POS_EDGE 0x00000001 #define AVR32_TC_EEVTEDG_SIZE 2 #define AVR32_TC_EEVT_MASK 0x00000c00 #define AVR32_TC_EEVT_OFFSET 10 #define AVR32_TC_EEVT_SIZE 2 #define AVR32_TC_EEVT_TIOB_INPUT 0x00000000 #define AVR32_TC_EEVT_XC0_OUTPUT 0x00000001 #define AVR32_TC_EEVT_XC1_OUTPUT 0x00000002 #define AVR32_TC_EEVT_XC2_OUTPUT 0x00000003 #define AVR32_TC_ENETRG 12 #define AVR32_TC_ENETRG_MASK 0x00001000 #define AVR32_TC_ENETRG_OFFSET 12 #define AVR32_TC_ENETRG_SIZE 1 #define AVR32_TC_ETRGEDG 8 #define AVR32_TC_ETRGEDG_BOTH_EDGES 0x00000003 #define AVR32_TC_ETRGEDG_MASK 0x00000300 #define AVR32_TC_ETRGEDG_NEG_EDGE 0x00000002 #define AVR32_TC_ETRGEDG_NO_EDGE 0x00000000 #define AVR32_TC_ETRGEDG_OFFSET 8 #define AVR32_TC_ETRGEDG_POS_EDGE 0x00000001 #define AVR32_TC_ETRGEDG_SIZE 2 #define AVR32_TC_ETRGS 7 #define AVR32_TC_ETRGS_MASK 0x00000080 #define AVR32_TC_ETRGS_OFFSET 7 #define AVR32_TC_ETRGS_SIZE 1 #define AVR32_TC_IDR0 0x00000028 #define AVR32_TC_IDR0_COVFS 0 #define AVR32_TC_IDR0_COVFS_MASK 0x00000001 #define AVR32_TC_IDR0_COVFS_OFFSET 0 #define AVR32_TC_IDR0_COVFS_SIZE 1 #define AVR32_TC_IDR0_CPAS 2 #define AVR32_TC_IDR0_CPAS_MASK 0x00000004 #define AVR32_TC_IDR0_CPAS_OFFSET 2 #define AVR32_TC_IDR0_CPAS_SIZE 1 #define AVR32_TC_IDR0_CPBS 3 #define AVR32_TC_IDR0_CPBS_MASK 0x00000008 #define AVR32_TC_IDR0_CPBS_OFFSET 3 #define AVR32_TC_IDR0_CPBS_SIZE 1 #define AVR32_TC_IDR0_CPCS 4 #define AVR32_TC_IDR0_CPCS_MASK 0x00000010 #define AVR32_TC_IDR0_CPCS_OFFSET 4 #define AVR32_TC_IDR0_CPCS_SIZE 1 #define AVR32_TC_IDR0_ETRGS 7 #define AVR32_TC_IDR0_ETRGS_MASK 0x00000080 #define AVR32_TC_IDR0_ETRGS_OFFSET 7 #define AVR32_TC_IDR0_ETRGS_SIZE 1 #define AVR32_TC_IDR0_LDRAS 5 #define AVR32_TC_IDR0_LDRAS_MASK 0x00000020 #define AVR32_TC_IDR0_LDRAS_OFFSET 5 #define AVR32_TC_IDR0_LDRAS_SIZE 1 #define AVR32_TC_IDR0_LDRBS 6 #define AVR32_TC_IDR0_LDRBS_MASK 0x00000040 #define AVR32_TC_IDR0_LDRBS_OFFSET 6 #define AVR32_TC_IDR0_LDRBS_SIZE 1 #define AVR32_TC_IDR0_LOVRS 1 #define AVR32_TC_IDR0_LOVRS_MASK 0x00000002 #define AVR32_TC_IDR0_LOVRS_OFFSET 1 #define AVR32_TC_IDR0_LOVRS_SIZE 1 #define AVR32_TC_IDR1 0x00000068 #define AVR32_TC_IDR1_COVFS 0 #define AVR32_TC_IDR1_COVFS_MASK 0x00000001 #define AVR32_TC_IDR1_COVFS_OFFSET 0 #define AVR32_TC_IDR1_COVFS_SIZE 1 #define AVR32_TC_IDR1_CPAS 2 #define AVR32_TC_IDR1_CPAS_MASK 0x00000004 #define AVR32_TC_IDR1_CPAS_OFFSET 2 #define AVR32_TC_IDR1_CPAS_SIZE 1 #define AVR32_TC_IDR1_CPBS 3 #define AVR32_TC_IDR1_CPBS_MASK 0x00000008 #define AVR32_TC_IDR1_CPBS_OFFSET 3 #define AVR32_TC_IDR1_CPBS_SIZE 1 #define AVR32_TC_IDR1_CPCS 4 #define AVR32_TC_IDR1_CPCS_MASK 0x00000010 #define AVR32_TC_IDR1_CPCS_OFFSET 4 #define AVR32_TC_IDR1_CPCS_SIZE 1 #define AVR32_TC_IDR1_ETRGS 7 #define AVR32_TC_IDR1_ETRGS_MASK 0x00000080 #define AVR32_TC_IDR1_ETRGS_OFFSET 7 #define AVR32_TC_IDR1_ETRGS_SIZE 1 #define AVR32_TC_IDR1_LDRAS 5 #define AVR32_TC_IDR1_LDRAS_MASK 0x00000020 #define AVR32_TC_IDR1_LDRAS_OFFSET 5 #define AVR32_TC_IDR1_LDRAS_SIZE 1 #define AVR32_TC_IDR1_LDRBS 6 #define AVR32_TC_IDR1_LDRBS_MASK 0x00000040 #define AVR32_TC_IDR1_LDRBS_OFFSET 6 #define AVR32_TC_IDR1_LDRBS_SIZE 1 #define AVR32_TC_IDR1_LOVRS 1 #define AVR32_TC_IDR1_LOVRS_MASK 0x00000002 #define AVR32_TC_IDR1_LOVRS_OFFSET 1 #define AVR32_TC_IDR1_LOVRS_SIZE 1 #define AVR32_TC_IDR2 0x000000a8 #define AVR32_TC_IDR2_COVFS 0 #define AVR32_TC_IDR2_COVFS_MASK 0x00000001 #define AVR32_TC_IDR2_COVFS_OFFSET 0 #define AVR32_TC_IDR2_COVFS_SIZE 1 #define AVR32_TC_IDR2_CPAS 2 #define AVR32_TC_IDR2_CPAS_MASK 0x00000004 #define AVR32_TC_IDR2_CPAS_OFFSET 2 #define AVR32_TC_IDR2_CPAS_SIZE 1 #define AVR32_TC_IDR2_CPBS 3 #define AVR32_TC_IDR2_CPBS_MASK 0x00000008 #define AVR32_TC_IDR2_CPBS_OFFSET 3 #define AVR32_TC_IDR2_CPBS_SIZE 1 #define AVR32_TC_IDR2_CPCS 4 #define AVR32_TC_IDR2_CPCS_MASK 0x00000010 #define AVR32_TC_IDR2_CPCS_OFFSET 4 #define AVR32_TC_IDR2_CPCS_SIZE 1 #define AVR32_TC_IDR2_ETRGS 7 #define AVR32_TC_IDR2_ETRGS_MASK 0x00000080 #define AVR32_TC_IDR2_ETRGS_OFFSET 7 #define AVR32_TC_IDR2_ETRGS_SIZE 1 #define AVR32_TC_IDR2_LDRAS 5 #define AVR32_TC_IDR2_LDRAS_MASK 0x00000020 #define AVR32_TC_IDR2_LDRAS_OFFSET 5 #define AVR32_TC_IDR2_LDRAS_SIZE 1 #define AVR32_TC_IDR2_LDRBS 6 #define AVR32_TC_IDR2_LDRBS_MASK 0x00000040 #define AVR32_TC_IDR2_LDRBS_OFFSET 6 #define AVR32_TC_IDR2_LDRBS_SIZE 1 #define AVR32_TC_IDR2_LOVRS 1 #define AVR32_TC_IDR2_LOVRS_MASK 0x00000002 #define AVR32_TC_IDR2_LOVRS_OFFSET 1 #define AVR32_TC_IDR2_LOVRS_SIZE 1 #define AVR32_TC_IER0 0x00000024 #define AVR32_TC_IER0_COVFS 0 #define AVR32_TC_IER0_COVFS_MASK 0x00000001 #define AVR32_TC_IER0_COVFS_OFFSET 0 #define AVR32_TC_IER0_COVFS_SIZE 1 #define AVR32_TC_IER0_CPAS 2 #define AVR32_TC_IER0_CPAS_MASK 0x00000004 #define AVR32_TC_IER0_CPAS_OFFSET 2 #define AVR32_TC_IER0_CPAS_SIZE 1 #define AVR32_TC_IER0_CPBS 3 #define AVR32_TC_IER0_CPBS_MASK 0x00000008 #define AVR32_TC_IER0_CPBS_OFFSET 3 #define AVR32_TC_IER0_CPBS_SIZE 1 #define AVR32_TC_IER0_CPCS 4 #define AVR32_TC_IER0_CPCS_MASK 0x00000010 #define AVR32_TC_IER0_CPCS_OFFSET 4 #define AVR32_TC_IER0_CPCS_SIZE 1 #define AVR32_TC_IER0_ETRGS 7 #define AVR32_TC_IER0_ETRGS_MASK 0x00000080 #define AVR32_TC_IER0_ETRGS_OFFSET 7 #define AVR32_TC_IER0_ETRGS_SIZE 1 #define AVR32_TC_IER0_LDRAS 5 #define AVR32_TC_IER0_LDRAS_MASK 0x00000020 #define AVR32_TC_IER0_LDRAS_OFFSET 5 #define AVR32_TC_IER0_LDRAS_SIZE 1 #define AVR32_TC_IER0_LDRBS 6 #define AVR32_TC_IER0_LDRBS_MASK 0x00000040 #define AVR32_TC_IER0_LDRBS_OFFSET 6 #define AVR32_TC_IER0_LDRBS_SIZE 1 #define AVR32_TC_IER0_LOVRS 1 #define AVR32_TC_IER0_LOVRS_MASK 0x00000002 #define AVR32_TC_IER0_LOVRS_OFFSET 1 #define AVR32_TC_IER0_LOVRS_SIZE 1 #define AVR32_TC_IER1 0x00000064 #define AVR32_TC_IER1_COVFS 0 #define AVR32_TC_IER1_COVFS_MASK 0x00000001 #define AVR32_TC_IER1_COVFS_OFFSET 0 #define AVR32_TC_IER1_COVFS_SIZE 1 #define AVR32_TC_IER1_CPAS 2 #define AVR32_TC_IER1_CPAS_MASK 0x00000004 #define AVR32_TC_IER1_CPAS_OFFSET 2 #define AVR32_TC_IER1_CPAS_SIZE 1 #define AVR32_TC_IER1_CPBS 3 #define AVR32_TC_IER1_CPBS_MASK 0x00000008 #define AVR32_TC_IER1_CPBS_OFFSET 3 #define AVR32_TC_IER1_CPBS_SIZE 1 #define AVR32_TC_IER1_CPCS 4 #define AVR32_TC_IER1_CPCS_MASK 0x00000010 #define AVR32_TC_IER1_CPCS_OFFSET 4 #define AVR32_TC_IER1_CPCS_SIZE 1 #define AVR32_TC_IER1_ETRGS 7 #define AVR32_TC_IER1_ETRGS_MASK 0x00000080 #define AVR32_TC_IER1_ETRGS_OFFSET 7 #define AVR32_TC_IER1_ETRGS_SIZE 1 #define AVR32_TC_IER1_LDRAS 5 #define AVR32_TC_IER1_LDRAS_MASK 0x00000020 #define AVR32_TC_IER1_LDRAS_OFFSET 5 #define AVR32_TC_IER1_LDRAS_SIZE 1 #define AVR32_TC_IER1_LDRBS 6 #define AVR32_TC_IER1_LDRBS_MASK 0x00000040 #define AVR32_TC_IER1_LDRBS_OFFSET 6 #define AVR32_TC_IER1_LDRBS_SIZE 1 #define AVR32_TC_IER1_LOVRS 1 #define AVR32_TC_IER1_LOVRS_MASK 0x00000002 #define AVR32_TC_IER1_LOVRS_OFFSET 1 #define AVR32_TC_IER1_LOVRS_SIZE 1 #define AVR32_TC_IER2 0x000000a4 #define AVR32_TC_IER2_COVFS 0 #define AVR32_TC_IER2_COVFS_MASK 0x00000001 #define AVR32_TC_IER2_COVFS_OFFSET 0 #define AVR32_TC_IER2_COVFS_SIZE 1 #define AVR32_TC_IER2_CPAS 2 #define AVR32_TC_IER2_CPAS_MASK 0x00000004 #define AVR32_TC_IER2_CPAS_OFFSET 2 #define AVR32_TC_IER2_CPAS_SIZE 1 #define AVR32_TC_IER2_CPBS 3 #define AVR32_TC_IER2_CPBS_MASK 0x00000008 #define AVR32_TC_IER2_CPBS_OFFSET 3 #define AVR32_TC_IER2_CPBS_SIZE 1 #define AVR32_TC_IER2_CPCS 4 #define AVR32_TC_IER2_CPCS_MASK 0x00000010 #define AVR32_TC_IER2_CPCS_OFFSET 4 #define AVR32_TC_IER2_CPCS_SIZE 1 #define AVR32_TC_IER2_ETRGS 7 #define AVR32_TC_IER2_ETRGS_MASK 0x00000080 #define AVR32_TC_IER2_ETRGS_OFFSET 7 #define AVR32_TC_IER2_ETRGS_SIZE 1 #define AVR32_TC_IER2_LDRAS 5 #define AVR32_TC_IER2_LDRAS_MASK 0x00000020 #define AVR32_TC_IER2_LDRAS_OFFSET 5 #define AVR32_TC_IER2_LDRAS_SIZE 1 #define AVR32_TC_IER2_LDRBS 6 #define AVR32_TC_IER2_LDRBS_MASK 0x00000040 #define AVR32_TC_IER2_LDRBS_OFFSET 6 #define AVR32_TC_IER2_LDRBS_SIZE 1 #define AVR32_TC_IER2_LOVRS 1 #define AVR32_TC_IER2_LOVRS_MASK 0x00000002 #define AVR32_TC_IER2_LOVRS_OFFSET 1 #define AVR32_TC_IER2_LOVRS_SIZE 1 #define AVR32_TC_IMR0 0x0000002c #define AVR32_TC_IMR0_COVFS 0 #define AVR32_TC_IMR0_COVFS_MASK 0x00000001 #define AVR32_TC_IMR0_COVFS_OFFSET 0 #define AVR32_TC_IMR0_COVFS_SIZE 1 #define AVR32_TC_IMR0_CPAS 2 #define AVR32_TC_IMR0_CPAS_MASK 0x00000004 #define AVR32_TC_IMR0_CPAS_OFFSET 2 #define AVR32_TC_IMR0_CPAS_SIZE 1 #define AVR32_TC_IMR0_CPBS 3 #define AVR32_TC_IMR0_CPBS_MASK 0x00000008 #define AVR32_TC_IMR0_CPBS_OFFSET 3 #define AVR32_TC_IMR0_CPBS_SIZE 1 #define AVR32_TC_IMR0_CPCS 4 #define AVR32_TC_IMR0_CPCS_MASK 0x00000010 #define AVR32_TC_IMR0_CPCS_OFFSET 4 #define AVR32_TC_IMR0_CPCS_SIZE 1 #define AVR32_TC_IMR0_ETRGS 7 #define AVR32_TC_IMR0_ETRGS_MASK 0x00000080 #define AVR32_TC_IMR0_ETRGS_OFFSET 7 #define AVR32_TC_IMR0_ETRGS_SIZE 1 #define AVR32_TC_IMR0_LDRAS 5 #define AVR32_TC_IMR0_LDRAS_MASK 0x00000020 #define AVR32_TC_IMR0_LDRAS_OFFSET 5 #define AVR32_TC_IMR0_LDRAS_SIZE 1 #define AVR32_TC_IMR0_LDRBS 6 #define AVR32_TC_IMR0_LDRBS_MASK 0x00000040 #define AVR32_TC_IMR0_LDRBS_OFFSET 6 #define AVR32_TC_IMR0_LDRBS_SIZE 1 #define AVR32_TC_IMR0_LOVRS 1 #define AVR32_TC_IMR0_LOVRS_MASK 0x00000002 #define AVR32_TC_IMR0_LOVRS_OFFSET 1 #define AVR32_TC_IMR0_LOVRS_SIZE 1 #define AVR32_TC_IMR1 0x0000006c #define AVR32_TC_IMR1_COVFS 0 #define AVR32_TC_IMR1_COVFS_MASK 0x00000001 #define AVR32_TC_IMR1_COVFS_OFFSET 0 #define AVR32_TC_IMR1_COVFS_SIZE 1 #define AVR32_TC_IMR1_CPAS 2 #define AVR32_TC_IMR1_CPAS_MASK 0x00000004 #define AVR32_TC_IMR1_CPAS_OFFSET 2 #define AVR32_TC_IMR1_CPAS_SIZE 1 #define AVR32_TC_IMR1_CPBS 3 #define AVR32_TC_IMR1_CPBS_MASK 0x00000008 #define AVR32_TC_IMR1_CPBS_OFFSET 3 #define AVR32_TC_IMR1_CPBS_SIZE 1 #define AVR32_TC_IMR1_CPCS 4 #define AVR32_TC_IMR1_CPCS_MASK 0x00000010 #define AVR32_TC_IMR1_CPCS_OFFSET 4 #define AVR32_TC_IMR1_CPCS_SIZE 1 #define AVR32_TC_IMR1_ETRGS 7 #define AVR32_TC_IMR1_ETRGS_MASK 0x00000080 #define AVR32_TC_IMR1_ETRGS_OFFSET 7 #define AVR32_TC_IMR1_ETRGS_SIZE 1 #define AVR32_TC_IMR1_LDRAS 5 #define AVR32_TC_IMR1_LDRAS_MASK 0x00000020 #define AVR32_TC_IMR1_LDRAS_OFFSET 5 #define AVR32_TC_IMR1_LDRAS_SIZE 1 #define AVR32_TC_IMR1_LDRBS 6 #define AVR32_TC_IMR1_LDRBS_MASK 0x00000040 #define AVR32_TC_IMR1_LDRBS_OFFSET 6 #define AVR32_TC_IMR1_LDRBS_SIZE 1 #define AVR32_TC_IMR1_LOVRS 1 #define AVR32_TC_IMR1_LOVRS_MASK 0x00000002 #define AVR32_TC_IMR1_LOVRS_OFFSET 1 #define AVR32_TC_IMR1_LOVRS_SIZE 1 #define AVR32_TC_IMR2 0x000000ac #define AVR32_TC_IMR2_COVFS 0 #define AVR32_TC_IMR2_COVFS_MASK 0x00000001 #define AVR32_TC_IMR2_COVFS_OFFSET 0 #define AVR32_TC_IMR2_COVFS_SIZE 1 #define AVR32_TC_IMR2_CPAS 2 #define AVR32_TC_IMR2_CPAS_MASK 0x00000004 #define AVR32_TC_IMR2_CPAS_OFFSET 2 #define AVR32_TC_IMR2_CPAS_SIZE 1 #define AVR32_TC_IMR2_CPBS 3 #define AVR32_TC_IMR2_CPBS_MASK 0x00000008 #define AVR32_TC_IMR2_CPBS_OFFSET 3 #define AVR32_TC_IMR2_CPBS_SIZE 1 #define AVR32_TC_IMR2_CPCS 4 #define AVR32_TC_IMR2_CPCS_MASK 0x00000010 #define AVR32_TC_IMR2_CPCS_OFFSET 4 #define AVR32_TC_IMR2_CPCS_SIZE 1 #define AVR32_TC_IMR2_ETRGS 7 #define AVR32_TC_IMR2_ETRGS_MASK 0x00000080 #define AVR32_TC_IMR2_ETRGS_OFFSET 7 #define AVR32_TC_IMR2_ETRGS_SIZE 1 #define AVR32_TC_IMR2_LDRAS 5 #define AVR32_TC_IMR2_LDRAS_MASK 0x00000020 #define AVR32_TC_IMR2_LDRAS_OFFSET 5 #define AVR32_TC_IMR2_LDRAS_SIZE 1 #define AVR32_TC_IMR2_LDRBS 6 #define AVR32_TC_IMR2_LDRBS_MASK 0x00000040 #define AVR32_TC_IMR2_LDRBS_OFFSET 6 #define AVR32_TC_IMR2_LDRBS_SIZE 1 #define AVR32_TC_IMR2_LOVRS 1 #define AVR32_TC_IMR2_LOVRS_MASK 0x00000002 #define AVR32_TC_IMR2_LOVRS_OFFSET 1 #define AVR32_TC_IMR2_LOVRS_SIZE 1 #define AVR32_TC_LDBDIS 7 #define AVR32_TC_LDBDIS_MASK 0x00000080 #define AVR32_TC_LDBDIS_OFFSET 7 #define AVR32_TC_LDBDIS_SIZE 1 #define AVR32_TC_LDBSTOP 6 #define AVR32_TC_LDBSTOP_MASK 0x00000040 #define AVR32_TC_LDBSTOP_OFFSET 6 #define AVR32_TC_LDBSTOP_SIZE 1 #define AVR32_TC_LDRA 16 #define AVR32_TC_LDRAS 5 #define AVR32_TC_LDRAS_MASK 0x00000020 #define AVR32_TC_LDRAS_OFFSET 5 #define AVR32_TC_LDRAS_SIZE 1 #define AVR32_TC_LDRA_BIOTH_EDGES_TIOA 0x00000003 #define AVR32_TC_LDRA_MASK 0x00030000 #define AVR32_TC_LDRA_NEG_EDGE_TIOA 0x00000002 #define AVR32_TC_LDRA_NO_EDGE 0x00000000 #define AVR32_TC_LDRA_OFFSET 16 #define AVR32_TC_LDRA_POS_EDGE_TIOA 0x00000001 #define AVR32_TC_LDRA_SIZE 2 #define AVR32_TC_LDRB 18 #define AVR32_TC_LDRBS 6 #define AVR32_TC_LDRBS_MASK 0x00000040 #define AVR32_TC_LDRBS_OFFSET 6 #define AVR32_TC_LDRBS_SIZE 1 #define AVR32_TC_LDRB_BIOTH_EDGES_TIOA 0x00000003 #define AVR32_TC_LDRB_MASK 0x000c0000 #define AVR32_TC_LDRB_NEG_EDGE_TIOA 0x00000002 #define AVR32_TC_LDRB_NO_EDGE 0x00000000 #define AVR32_TC_LDRB_OFFSET 18 #define AVR32_TC_LDRB_POS_EDGE_TIOA 0x00000001 #define AVR32_TC_LDRB_SIZE 2 #define AVR32_TC_LOVRS 1 #define AVR32_TC_LOVRS_MASK 0x00000002 #define AVR32_TC_LOVRS_OFFSET 1 #define AVR32_TC_LOVRS_SIZE 1 #define AVR32_TC_MTIOA 17 #define AVR32_TC_MTIOA_MASK 0x00020000 #define AVR32_TC_MTIOA_OFFSET 17 #define AVR32_TC_MTIOA_SIZE 1 #define AVR32_TC_MTIOB 18 #define AVR32_TC_MTIOB_MASK 0x00040000 #define AVR32_TC_MTIOB_OFFSET 18 #define AVR32_TC_MTIOB_SIZE 1 #define AVR32_TC_NEG_EDGE 0x00000002 #define AVR32_TC_NEG_EDGE_TIOA 0x00000002 #define AVR32_TC_NONE 0x00000000 #define AVR32_TC_NOT_GATED 0x00000000 #define AVR32_TC_NO_CLK 0x00000001 #define AVR32_TC_NO_EDGE 0x00000000 #define AVR32_TC_POS_EDGE 0x00000001 #define AVR32_TC_POS_EDGE_TIOA 0x00000001 #define AVR32_TC_RA 0 #define AVR32_TC_RA0 0x00000014 #define AVR32_TC_RA0_RA 0 #define AVR32_TC_RA0_RA_MASK 0x0000ffff #define AVR32_TC_RA0_RA_OFFSET 0 #define AVR32_TC_RA0_RA_SIZE 16 #define AVR32_TC_RA1 0x00000054 #define AVR32_TC_RA1_RA 0 #define AVR32_TC_RA1_RA_MASK 0x0000ffff #define AVR32_TC_RA1_RA_OFFSET 0 #define AVR32_TC_RA1_RA_SIZE 16 #define AVR32_TC_RA2 0x00000094 #define AVR32_TC_RA2_RA 0 #define AVR32_TC_RA2_RA_MASK 0x0000ffff #define AVR32_TC_RA2_RA_OFFSET 0 #define AVR32_TC_RA2_RA_SIZE 16 #define AVR32_TC_RA_MASK 0x0000ffff #define AVR32_TC_RA_OFFSET 0 #define AVR32_TC_RA_SIZE 16 #define AVR32_TC_RB 0 #define AVR32_TC_RB0 0x00000018 #define AVR32_TC_RB0_RB 0 #define AVR32_TC_RB0_RB_MASK 0x0000ffff #define AVR32_TC_RB0_RB_OFFSET 0 #define AVR32_TC_RB0_RB_SIZE 16 #define AVR32_TC_RB1 0x00000058 #define AVR32_TC_RB1_RB 0 #define AVR32_TC_RB1_RB_MASK 0x0000ffff #define AVR32_TC_RB1_RB_OFFSET 0 #define AVR32_TC_RB1_RB_SIZE 16 #define AVR32_TC_RB2 0x00000098 #define AVR32_TC_RB2_RB 0 #define AVR32_TC_RB2_RB_MASK 0x0000ffff #define AVR32_TC_RB2_RB_OFFSET 0 #define AVR32_TC_RB2_RB_SIZE 16 #define AVR32_TC_RB_MASK 0x0000ffff #define AVR32_TC_RB_OFFSET 0 #define AVR32_TC_RB_SIZE 16 #define AVR32_TC_RC 0 #define AVR32_TC_RC0 0x0000001c #define AVR32_TC_RC0_RC 0 #define AVR32_TC_RC0_RC_MASK 0x0000ffff #define AVR32_TC_RC0_RC_OFFSET 0 #define AVR32_TC_RC0_RC_SIZE 16 #define AVR32_TC_RC1 0x0000005c #define AVR32_TC_RC1_RC 0 #define AVR32_TC_RC1_RC_MASK 0x0000ffff #define AVR32_TC_RC1_RC_OFFSET 0 #define AVR32_TC_RC1_RC_SIZE 16 #define AVR32_TC_RC2 0x0000009c #define AVR32_TC_RC2_RC 0 #define AVR32_TC_RC2_RC_MASK 0x0000ffff #define AVR32_TC_RC2_RC_OFFSET 0 #define AVR32_TC_RC2_RC_SIZE 16 #define AVR32_TC_RC_MASK 0x0000ffff #define AVR32_TC_RC_OFFSET 0 #define AVR32_TC_RC_SIZE 16 #define AVR32_TC_SET 0x00000001 #define AVR32_TC_SR0 0x00000020 #define AVR32_TC_SR0_CLKSTA 16 #define AVR32_TC_SR0_CLKSTA_MASK 0x00010000 #define AVR32_TC_SR0_CLKSTA_OFFSET 16 #define AVR32_TC_SR0_CLKSTA_SIZE 1 #define AVR32_TC_SR0_COVFS 0 #define AVR32_TC_SR0_COVFS_MASK 0x00000001 #define AVR32_TC_SR0_COVFS_OFFSET 0 #define AVR32_TC_SR0_COVFS_SIZE 1 #define AVR32_TC_SR0_CPAS 2 #define AVR32_TC_SR0_CPAS_MASK 0x00000004 #define AVR32_TC_SR0_CPAS_OFFSET 2 #define AVR32_TC_SR0_CPAS_SIZE 1 #define AVR32_TC_SR0_CPBS 3 #define AVR32_TC_SR0_CPBS_MASK 0x00000008 #define AVR32_TC_SR0_CPBS_OFFSET 3 #define AVR32_TC_SR0_CPBS_SIZE 1 #define AVR32_TC_SR0_CPCS 4 #define AVR32_TC_SR0_CPCS_MASK 0x00000010 #define AVR32_TC_SR0_CPCS_OFFSET 4 #define AVR32_TC_SR0_CPCS_SIZE 1 #define AVR32_TC_SR0_ETRGS 7 #define AVR32_TC_SR0_ETRGS_MASK 0x00000080 #define AVR32_TC_SR0_ETRGS_OFFSET 7 #define AVR32_TC_SR0_ETRGS_SIZE 1 #define AVR32_TC_SR0_LDRAS 5 #define AVR32_TC_SR0_LDRAS_MASK 0x00000020 #define AVR32_TC_SR0_LDRAS_OFFSET 5 #define AVR32_TC_SR0_LDRAS_SIZE 1 #define AVR32_TC_SR0_LDRBS 6 #define AVR32_TC_SR0_LDRBS_MASK 0x00000040 #define AVR32_TC_SR0_LDRBS_OFFSET 6 #define AVR32_TC_SR0_LDRBS_SIZE 1 #define AVR32_TC_SR0_LOVRS 1 #define AVR32_TC_SR0_LOVRS_MASK 0x00000002 #define AVR32_TC_SR0_LOVRS_OFFSET 1 #define AVR32_TC_SR0_LOVRS_SIZE 1 #define AVR32_TC_SR0_MTIOA 17 #define AVR32_TC_SR0_MTIOA_MASK 0x00020000 #define AVR32_TC_SR0_MTIOA_OFFSET 17 #define AVR32_TC_SR0_MTIOA_SIZE 1 #define AVR32_TC_SR0_MTIOB 18 #define AVR32_TC_SR0_MTIOB_MASK 0x00040000 #define AVR32_TC_SR0_MTIOB_OFFSET 18 #define AVR32_TC_SR0_MTIOB_SIZE 1 #define AVR32_TC_SR1 0x00000060 #define AVR32_TC_SR1_CLKSTA 16 #define AVR32_TC_SR1_CLKSTA_MASK 0x00010000 #define AVR32_TC_SR1_CLKSTA_OFFSET 16 #define AVR32_TC_SR1_CLKSTA_SIZE 1 #define AVR32_TC_SR1_COVFS 0 #define AVR32_TC_SR1_COVFS_MASK 0x00000001 #define AVR32_TC_SR1_COVFS_OFFSET 0 #define AVR32_TC_SR1_COVFS_SIZE 1 #define AVR32_TC_SR1_CPAS 2 #define AVR32_TC_SR1_CPAS_MASK 0x00000004 #define AVR32_TC_SR1_CPAS_OFFSET 2 #define AVR32_TC_SR1_CPAS_SIZE 1 #define AVR32_TC_SR1_CPBS 3 #define AVR32_TC_SR1_CPBS_MASK 0x00000008 #define AVR32_TC_SR1_CPBS_OFFSET 3 #define AVR32_TC_SR1_CPBS_SIZE 1 #define AVR32_TC_SR1_CPCS 4 #define AVR32_TC_SR1_CPCS_MASK 0x00000010 #define AVR32_TC_SR1_CPCS_OFFSET 4 #define AVR32_TC_SR1_CPCS_SIZE 1 #define AVR32_TC_SR1_ETRGS 7 #define AVR32_TC_SR1_ETRGS_MASK 0x00000080 #define AVR32_TC_SR1_ETRGS_OFFSET 7 #define AVR32_TC_SR1_ETRGS_SIZE 1 #define AVR32_TC_SR1_LDRAS 5 #define AVR32_TC_SR1_LDRAS_MASK 0x00000020 #define AVR32_TC_SR1_LDRAS_OFFSET 5 #define AVR32_TC_SR1_LDRAS_SIZE 1 #define AVR32_TC_SR1_LDRBS 6 #define AVR32_TC_SR1_LDRBS_MASK 0x00000040 #define AVR32_TC_SR1_LDRBS_OFFSET 6 #define AVR32_TC_SR1_LDRBS_SIZE 1 #define AVR32_TC_SR1_LOVRS 1 #define AVR32_TC_SR1_LOVRS_MASK 0x00000002 #define AVR32_TC_SR1_LOVRS_OFFSET 1 #define AVR32_TC_SR1_LOVRS_SIZE 1 #define AVR32_TC_SR1_MTIOA 17 #define AVR32_TC_SR1_MTIOA_MASK 0x00020000 #define AVR32_TC_SR1_MTIOA_OFFSET 17 #define AVR32_TC_SR1_MTIOA_SIZE 1 #define AVR32_TC_SR1_MTIOB 18 #define AVR32_TC_SR1_MTIOB_MASK 0x00040000 #define AVR32_TC_SR1_MTIOB_OFFSET 18 #define AVR32_TC_SR1_MTIOB_SIZE 1 #define AVR32_TC_SR2 0x000000a0 #define AVR32_TC_SR2_CLKSTA 16 #define AVR32_TC_SR2_CLKSTA_MASK 0x00010000 #define AVR32_TC_SR2_CLKSTA_OFFSET 16 #define AVR32_TC_SR2_CLKSTA_SIZE 1 #define AVR32_TC_SR2_COVFS 0 #define AVR32_TC_SR2_COVFS_MASK 0x00000001 #define AVR32_TC_SR2_COVFS_OFFSET 0 #define AVR32_TC_SR2_COVFS_SIZE 1 #define AVR32_TC_SR2_CPAS 2 #define AVR32_TC_SR2_CPAS_MASK 0x00000004 #define AVR32_TC_SR2_CPAS_OFFSET 2 #define AVR32_TC_SR2_CPAS_SIZE 1 #define AVR32_TC_SR2_CPBS 3 #define AVR32_TC_SR2_CPBS_MASK 0x00000008 #define AVR32_TC_SR2_CPBS_OFFSET 3 #define AVR32_TC_SR2_CPBS_SIZE 1 #define AVR32_TC_SR2_CPCS 4 #define AVR32_TC_SR2_CPCS_MASK 0x00000010 #define AVR32_TC_SR2_CPCS_OFFSET 4 #define AVR32_TC_SR2_CPCS_SIZE 1 #define AVR32_TC_SR2_ETRGS 7 #define AVR32_TC_SR2_ETRGS_MASK 0x00000080 #define AVR32_TC_SR2_ETRGS_OFFSET 7 #define AVR32_TC_SR2_ETRGS_SIZE 1 #define AVR32_TC_SR2_LDRAS 5 #define AVR32_TC_SR2_LDRAS_MASK 0x00000020 #define AVR32_TC_SR2_LDRAS_OFFSET 5 #define AVR32_TC_SR2_LDRAS_SIZE 1 #define AVR32_TC_SR2_LDRBS 6 #define AVR32_TC_SR2_LDRBS_MASK 0x00000040 #define AVR32_TC_SR2_LDRBS_OFFSET 6 #define AVR32_TC_SR2_LDRBS_SIZE 1 #define AVR32_TC_SR2_LOVRS 1 #define AVR32_TC_SR2_LOVRS_MASK 0x00000002 #define AVR32_TC_SR2_LOVRS_OFFSET 1 #define AVR32_TC_SR2_LOVRS_SIZE 1 #define AVR32_TC_SR2_MTIOA 17 #define AVR32_TC_SR2_MTIOA_MASK 0x00020000 #define AVR32_TC_SR2_MTIOA_OFFSET 17 #define AVR32_TC_SR2_MTIOA_SIZE 1 #define AVR32_TC_SR2_MTIOB 18 #define AVR32_TC_SR2_MTIOB_MASK 0x00040000 #define AVR32_TC_SR2_MTIOB_OFFSET 18 #define AVR32_TC_SR2_MTIOB_SIZE 1 #define AVR32_TC_SWTRG 2 #define AVR32_TC_SWTRG_MASK 0x00000004 #define AVR32_TC_SWTRG_OFFSET 2 #define AVR32_TC_SWTRG_SIZE 1 #define AVR32_TC_SYNC 0 #define AVR32_TC_SYNC_MASK 0x00000001 #define AVR32_TC_SYNC_OFFSET 0 #define AVR32_TC_SYNC_SIZE 1 #define AVR32_TC_TC0XC0S 0 #define AVR32_TC_TC0XC0S_MASK 0x00000003 #define AVR32_TC_TC0XC0S_NO_CLK 0x00000001 #define AVR32_TC_TC0XC0S_OFFSET 0 #define AVR32_TC_TC0XC0S_SIZE 2 #define AVR32_TC_TC0XC0S_TCLK0 0x00000000 #define AVR32_TC_TC0XC0S_TIOA1 0x00000002 #define AVR32_TC_TC0XC0S_TIOA2 0x00000003 #define AVR32_TC_TC1XC1S 2 #define AVR32_TC_TC1XC1S_MASK 0x0000000c #define AVR32_TC_TC1XC1S_NO_CLK 0x00000001 #define AVR32_TC_TC1XC1S_OFFSET 2 #define AVR32_TC_TC1XC1S_SIZE 2 #define AVR32_TC_TC1XC1S_TCLK1 0x00000000 #define AVR32_TC_TC1XC1S_TIOA0 0x00000002 #define AVR32_TC_TC1XC1S_TIOA2 0x00000003 #define AVR32_TC_TC2XC2S 4 #define AVR32_TC_TC2XC2S_MASK 0x00000030 #define AVR32_TC_TC2XC2S_NO_CLK 0x00000001 #define AVR32_TC_TC2XC2S_OFFSET 4 #define AVR32_TC_TC2XC2S_SIZE 2 #define AVR32_TC_TC2XC2S_TCLK2 0x00000000 #define AVR32_TC_TC2XC2S_TIOA0 0x00000002 #define AVR32_TC_TC2XC2S_TIOA1 0x00000003 #define AVR32_TC_TCCLKS 0 #define AVR32_TC_TCCLKS_MASK 0x00000007 #define AVR32_TC_TCCLKS_OFFSET 0 #define AVR32_TC_TCCLKS_SIZE 3 #define AVR32_TC_TCCLKS_TIMER_CLOCK1 0x00000000 #define AVR32_TC_TCCLKS_TIMER_CLOCK2 0x00000001 #define AVR32_TC_TCCLKS_TIMER_CLOCK3 0x00000002 #define AVR32_TC_TCCLKS_TIMER_CLOCK4 0x00000003 #define AVR32_TC_TCCLKS_TIMER_CLOCK5 0x00000004 #define AVR32_TC_TCCLKS_XC0 0x00000005 #define AVR32_TC_TCCLKS_XC1 0x00000006 #define AVR32_TC_TCCLKS_XC2 0x00000007 #define AVR32_TC_TCLK0 0x00000000 #define AVR32_TC_TCLK1 0x00000000 #define AVR32_TC_TCLK2 0x00000000 #define AVR32_TC_TIMER_CLOCK1 0x00000000 #define AVR32_TC_TIMER_CLOCK2 0x00000001 #define AVR32_TC_TIMER_CLOCK3 0x00000002 #define AVR32_TC_TIMER_CLOCK4 0x00000003 #define AVR32_TC_TIMER_CLOCK5 0x00000004 #define AVR32_TC_TIOA0 0x00000002 #define AVR32_TC_TIOA2 0x00000003 #define AVR32_TC_TIOB_INPUT 0x00000000 #define AVR32_TC_TOGGLE 0x00000003 #define AVR32_TC_UPDOWN_AUTO 0x00000003 #define AVR32_TC_UPDOWN_NO_AUTO 0x00000001 #define AVR32_TC_UP_AUTO 0x00000002 #define AVR32_TC_UP_NO_AUTO 0x00000000 #define AVR32_TC_WAVE 15 #define AVR32_TC_WAVE_MASK 0x00008000 #define AVR32_TC_WAVE_OFFSET 15 #define AVR32_TC_WAVE_SIZE 1 #define AVR32_TC_WAVSEL 13 #define AVR32_TC_WAVSEL_MASK 0x00006000 #define AVR32_TC_WAVSEL_OFFSET 13 #define AVR32_TC_WAVSEL_SIZE 2 #define AVR32_TC_WAVSEL_UPDOWN_AUTO 0x00000003 #define AVR32_TC_WAVSEL_UPDOWN_NO_AUTO 0x00000001 #define AVR32_TC_WAVSEL_UP_AUTO 0x00000002 #define AVR32_TC_WAVSEL_UP_NO_AUTO 0x00000000 #define AVR32_TC_XC0 0x00000005 #define AVR32_TC_XC0_OUTPUT 0x00000001 #define AVR32_TC_XC1 0x00000006 #define AVR32_TC_XC1_OUTPUT 0x00000002 #define AVR32_TC_XC2 0x00000007 #define AVR32_TC_XC2_OUTPUT 0x00000003 #define AVR32_TC_VARIANT 16 #define AVR32_TC_VARIANT_MASK 0x00070000 #define AVR32_TC_VARIANT_OFFSET 16 #define AVR32_TC_VARIANT_SIZE 3 #define AVR32_TC_VERSION 0x000000fc #define AVR32_TC_VERSION_MASK 0x00000fff #define AVR32_TC_VERSION_OFFSET 0 #define AVR32_TC_VERSION_SIZE 12 #define AVR32_TC_VERSION_VARIANT 16 #define AVR32_TC_VERSION_VARIANT_MASK 0x00070000 #define AVR32_TC_VERSION_VARIANT_OFFSET 16 #define AVR32_TC_VERSION_VARIANT_SIZE 3 #define AVR32_TC_VERSION_VERSION 0 #define AVR32_TC_VERSION_VERSION_MASK 0x00000fff #define AVR32_TC_VERSION_VERSION_OFFSET 0 #define AVR32_TC_VERSION_VERSION_SIZE 12 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_tc_ccr_t { unsigned int :29; unsigned int swtrg : 1; unsigned int clkdis : 1; unsigned int clken : 1; } avr32_tc_ccr_t; typedef union avr32_tc_cmr_t { struct { unsigned int :12; unsigned int ldrb : 2; unsigned int ldra : 2; unsigned int wave : 1; unsigned int cpctrg : 1; unsigned int : 3; unsigned int abetrg : 1; unsigned int etrgedg : 2; unsigned int ldbdis : 1; unsigned int ldbstop : 1; unsigned int burst : 2; unsigned int clki : 1; unsigned int tcclks : 3; } capture; struct { unsigned int bswtrg : 2; unsigned int beevt : 2; unsigned int bcpc : 2; unsigned int bcpb : 2; unsigned int aswtrg : 2; unsigned int aeevt : 2; unsigned int acpc : 2; unsigned int acpa : 2; unsigned int wave : 1; unsigned int wavsel : 2; unsigned int enetrg : 1; unsigned int eevt : 2; unsigned int eevtedg : 2; unsigned int cpcdis : 1; unsigned int cpcstop : 1; unsigned int burst : 2; unsigned int clki : 1; unsigned int tcclks : 3; } waveform; } avr32_tc_cmr_t; typedef struct avr32_tc_cv_t { unsigned int :16; unsigned int cv :16; } avr32_tc_cv_t; typedef struct avr32_tc_ra_t { unsigned int :16; unsigned int ra :16; } avr32_tc_ra_t; typedef struct avr32_tc_rb_t { unsigned int :16; unsigned int rb :16; } avr32_tc_rb_t; typedef struct avr32_tc_rc_t { unsigned int :16; unsigned int rc :16; } avr32_tc_rc_t; typedef struct avr32_tc_sr_t { unsigned int :13; unsigned int mtiob : 1; unsigned int mtioa : 1; unsigned int clksta : 1; unsigned int : 8; unsigned int etrgs : 1; unsigned int ldrbs : 1; unsigned int ldras : 1; unsigned int cpcs : 1; unsigned int cpbs : 1; unsigned int cpas : 1; unsigned int lovrs : 1; unsigned int covfs : 1; } avr32_tc_sr_t; typedef struct avr32_tc_ier_t { unsigned int :24; unsigned int etrgs : 1; unsigned int ldrbs : 1; unsigned int ldras : 1; unsigned int cpcs : 1; unsigned int cpbs : 1; unsigned int cpas : 1; unsigned int lovrs : 1; unsigned int covfs : 1; } avr32_tc_ier_t; typedef struct avr32_tc_idr_t { unsigned int :24; unsigned int etrgs : 1; unsigned int ldrbs : 1; unsigned int ldras : 1; unsigned int cpcs : 1; unsigned int cpbs : 1; unsigned int cpas : 1; unsigned int lovrs : 1; unsigned int covfs : 1; } avr32_tc_idr_t; typedef struct avr32_tc_imr_t { unsigned int :24; unsigned int etrgs : 1; unsigned int ldrbs : 1; unsigned int ldras : 1; unsigned int cpcs : 1; unsigned int cpbs : 1; unsigned int cpas : 1; unsigned int lovrs : 1; unsigned int covfs : 1; } avr32_tc_imr_t; typedef struct avr32_tc_bcr_t { unsigned int :31; unsigned int sync : 1; } avr32_tc_bcr_t; typedef struct avr32_tc_bmr_t { unsigned int :26; unsigned int tc2xc2s : 2; unsigned int tc1xc1s : 2; unsigned int tc0xc0s : 2; } avr32_tc_bmr_t; typedef struct avr32_tc_version_t { unsigned int :13; unsigned int variant : 3; unsigned int : 4; unsigned int version :12; } avr32_tc_version_t; typedef struct avr32_tc_channel_t { union { unsigned long ccr ;//0x0000 avr32_tc_ccr_t CCR ; }; union { unsigned long cmr ;//0x0004 avr32_tc_cmr_t CMR ; }; unsigned int :32 ;//0x0008 unsigned int :32 ;//0x000c union { const unsigned long cv ;//0x0010 const avr32_tc_cv_t CV ; }; union { unsigned long ra ;//0x0014 avr32_tc_ra_t RA ; }; union { unsigned long rb ;//0x0018 avr32_tc_rb_t RB ; }; union { unsigned long rc ;//0x001c avr32_tc_rc_t RC ; }; union { const unsigned long sr ;//0x0020 const avr32_tc_sr_t SR ; }; union { unsigned long ier ;//0x0024 avr32_tc_ier_t IER ; }; union { unsigned long idr ;//0x0028 avr32_tc_idr_t IDR ; }; union { const unsigned long imr ;//0x002c const avr32_tc_imr_t IMR ; }; unsigned int :32 ;//0x0030 unsigned int :32 ;//0x0034 unsigned int :32 ;//0x0038 unsigned int :32 ;//0x003c } avr32_tc_channel_t; typedef struct avr32_tc_t { avr32_tc_channel_t channel[3];//0x0 union { unsigned long bcr ;//0x00c0 avr32_tc_bcr_t BCR ; }; union { unsigned long bmr ;//0x00c4 avr32_tc_bmr_t BMR ; }; unsigned int :32 ;//0x00c8 unsigned int :32 ;//0x00cc unsigned int :32 ;//0x00d0 unsigned int :32 ;//0x00d4 unsigned int :32 ;//0x00d8 unsigned int :32 ;//0x00dc unsigned int :32 ;//0x00e0 unsigned int :32 ;//0x00e4 unsigned int :32 ;//0x00e8 unsigned int :32 ;//0x00ec unsigned int :32 ;//0x00f0 unsigned int :32 ;//0x00f4 unsigned int :32 ;//0x00f8 union { const unsigned long version ;//0x00fc const avr32_tc_version_t VERSION ; }; } avr32_tc_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif #if !defined (DEPRECATED_DISABLE) #define AVR32_TC_CMR0_TCCLKS_TIMER_DIV1_CLOCK 0x00000000 #define AVR32_TC_CMR0_TCCLKS_TIMER_DIV2_CLOCK 0x00000001 #define AVR32_TC_CMR0_TCCLKS_TIMER_DIV3_CLOCK 0x00000002 #define AVR32_TC_CMR0_TCCLKS_TIMER_DIV4_CLOCK 0x00000003 #define AVR32_TC_CMR0_TCCLKS_TIMER_DIV5_CLOCK 0x00000004 #define AVR32_TC_CMR1_TCCLKS_TIMER_DIV1_CLOCK 0x00000000 #define AVR32_TC_CMR1_TCCLKS_TIMER_DIV2_CLOCK 0x00000001 #define AVR32_TC_CMR1_TCCLKS_TIMER_DIV3_CLOCK 0x00000002 #define AVR32_TC_CMR1_TCCLKS_TIMER_DIV4_CLOCK 0x00000003 #define AVR32_TC_CMR1_TCCLKS_TIMER_DIV5_CLOCK 0x00000004 #define AVR32_TC_CMR2_TCCLKS_TIMER_DIV1_CLOCK 0x00000000 #define AVR32_TC_CMR2_TCCLKS_TIMER_DIV2_CLOCK 0x00000001 #define AVR32_TC_CMR2_TCCLKS_TIMER_DIV3_CLOCK 0x00000002 #define AVR32_TC_CMR2_TCCLKS_TIMER_DIV4_CLOCK 0x00000003 #define AVR32_TC_CMR2_TCCLKS_TIMER_DIV5_CLOCK 0x00000004 #define AVR32_TC_TCCLKS_TIMER_DIV1_CLOCK 0x00000000 #define AVR32_TC_TCCLKS_TIMER_DIV2_CLOCK 0x00000001 #define AVR32_TC_TCCLKS_TIMER_DIV3_CLOCK 0x00000002 #define AVR32_TC_TCCLKS_TIMER_DIV4_CLOCK 0x00000003 #define AVR32_TC_TCCLKS_TIMER_DIV5_CLOCK 0x00000004 #define AVR32_TC_TIMER_DIV1_CLOCK 0x00000000 #define AVR32_TC_TIMER_DIV2_CLOCK 0x00000001 #define AVR32_TC_TIMER_DIV3_CLOCK 0x00000002 #define AVR32_TC_TIMER_DIV4_CLOCK 0x00000003 #define AVR32_TC_TIMER_DIV5_CLOCK 0x00000004 #endif /*#ifdef AVR32_TC_222_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/twi_211.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 : UC3A0512 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_TWI_211_H_INCLUDED #define AVR32_TWI_211_H_INCLUDED #define AVR32_TWI_H_VERSION 211 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_TWI_ - Bitfield mask: AVR32_TWI__ - Bitfield offset: AVR32_TWI___OFFSET - Bitfield size: AVR32_TWI___SIZE - Bitfield values: AVR32_TWI___ 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_TWI_ - Bitfield offset: AVR32_TWI__OFFSET - Bitfield size: AVR32_TWI__SIZE - Bitfield values: AVR32_TWI__ - Bitfield values: AVR32_TWI_ All defines are sorted alphabetically. */ #define AVR32_TWI_ARBLST 9 #define AVR32_TWI_ARBLST_MASK 0x00000200 #define AVR32_TWI_ARBLST_OFFSET 9 #define AVR32_TWI_ARBLST_SIZE 1 #define AVR32_TWI_CHDIV 8 #define AVR32_TWI_CHDIV_MASK 0x0000ff00 #define AVR32_TWI_CHDIV_OFFSET 8 #define AVR32_TWI_CHDIV_SIZE 8 #define AVR32_TWI_CKDIV 16 #define AVR32_TWI_CKDIV_MASK 0x00070000 #define AVR32_TWI_CKDIV_OFFSET 16 #define AVR32_TWI_CKDIV_SIZE 3 #define AVR32_TWI_CLDIV 0 #define AVR32_TWI_CLDIV_MASK 0x000000ff #define AVR32_TWI_CLDIV_OFFSET 0 #define AVR32_TWI_CLDIV_SIZE 8 #define AVR32_TWI_CR 0x00000000 #define AVR32_TWI_CR_MSDIS 3 #define AVR32_TWI_CR_MSDIS_MASK 0x00000008 #define AVR32_TWI_CR_MSDIS_OFFSET 3 #define AVR32_TWI_CR_MSDIS_SIZE 1 #define AVR32_TWI_CR_MSEN 2 #define AVR32_TWI_CR_MSEN_MASK 0x00000004 #define AVR32_TWI_CR_MSEN_OFFSET 2 #define AVR32_TWI_CR_MSEN_SIZE 1 #define AVR32_TWI_CR_START 0 #define AVR32_TWI_CR_START_MASK 0x00000001 #define AVR32_TWI_CR_START_OFFSET 0 #define AVR32_TWI_CR_START_SIZE 1 #define AVR32_TWI_CR_STOP 1 #define AVR32_TWI_CR_STOP_MASK 0x00000002 #define AVR32_TWI_CR_STOP_OFFSET 1 #define AVR32_TWI_CR_STOP_SIZE 1 #define AVR32_TWI_CR_SVDIS 5 #define AVR32_TWI_CR_SVDIS_MASK 0x00000020 #define AVR32_TWI_CR_SVDIS_OFFSET 5 #define AVR32_TWI_CR_SVDIS_SIZE 1 #define AVR32_TWI_CR_SVEN 4 #define AVR32_TWI_CR_SVEN_MASK 0x00000010 #define AVR32_TWI_CR_SVEN_OFFSET 4 #define AVR32_TWI_CR_SVEN_SIZE 1 #define AVR32_TWI_CR_SWRST 7 #define AVR32_TWI_CR_SWRST_MASK 0x00000080 #define AVR32_TWI_CR_SWRST_OFFSET 7 #define AVR32_TWI_CR_SWRST_SIZE 1 #define AVR32_TWI_CWGR 0x00000010 #define AVR32_TWI_CWGR_CHDIV 8 #define AVR32_TWI_CWGR_CHDIV_MASK 0x0000ff00 #define AVR32_TWI_CWGR_CHDIV_OFFSET 8 #define AVR32_TWI_CWGR_CHDIV_SIZE 8 #define AVR32_TWI_CWGR_CKDIV 16 #define AVR32_TWI_CWGR_CKDIV_MASK 0x00070000 #define AVR32_TWI_CWGR_CKDIV_OFFSET 16 #define AVR32_TWI_CWGR_CKDIV_SIZE 3 #define AVR32_TWI_CWGR_CLDIV 0 #define AVR32_TWI_CWGR_CLDIV_MASK 0x000000ff #define AVR32_TWI_CWGR_CLDIV_OFFSET 0 #define AVR32_TWI_CWGR_CLDIV_SIZE 8 #define AVR32_TWI_DADR 16 #define AVR32_TWI_DADR_MASK 0x007f0000 #define AVR32_TWI_DADR_OFFSET 16 #define AVR32_TWI_DADR_SIZE 7 #define AVR32_TWI_ENDRX 12 #define AVR32_TWI_ENDRX_MASK 0x00001000 #define AVR32_TWI_ENDRX_OFFSET 12 #define AVR32_TWI_ENDRX_SIZE 1 #define AVR32_TWI_ENDTX 13 #define AVR32_TWI_ENDTX_MASK 0x00002000 #define AVR32_TWI_ENDTX_OFFSET 13 #define AVR32_TWI_ENDTX_SIZE 1 #define AVR32_TWI_EOSACC 11 #define AVR32_TWI_EOSACC_MASK 0x00000800 #define AVR32_TWI_EOSACC_OFFSET 11 #define AVR32_TWI_EOSACC_SIZE 1 #define AVR32_TWI_GACC 5 #define AVR32_TWI_GACC_MASK 0x00000020 #define AVR32_TWI_GACC_OFFSET 5 #define AVR32_TWI_GACC_SIZE 1 #define AVR32_TWI_IADR 0x0000000c #define AVR32_TWI_IADRSZ 8 #define AVR32_TWI_IADRSZ_MASK 0x00000300 #define AVR32_TWI_IADRSZ_NO_ADDR 0x00000000 #define AVR32_TWI_IADRSZ_OFFSET 8 #define AVR32_TWI_IADRSZ_ONE_BYTE 0x00000001 #define AVR32_TWI_IADRSZ_SIZE 2 #define AVR32_TWI_IADRSZ_THREE_BYTES 0x00000003 #define AVR32_TWI_IADRSZ_TWO_BYTES 0x00000002 #define AVR32_TWI_IADR_IADR 0 #define AVR32_TWI_IADR_IADR_MASK 0x00ffffff #define AVR32_TWI_IADR_IADR_OFFSET 0 #define AVR32_TWI_IADR_IADR_SIZE 24 #define AVR32_TWI_IADR_MASK 0x00ffffff #define AVR32_TWI_IADR_OFFSET 0 #define AVR32_TWI_IADR_SIZE 24 #define AVR32_TWI_IDR 0x00000028 #define AVR32_TWI_IDR_ARBLST 9 #define AVR32_TWI_IDR_ARBLST_MASK 0x00000200 #define AVR32_TWI_IDR_ARBLST_OFFSET 9 #define AVR32_TWI_IDR_ARBLST_SIZE 1 #define AVR32_TWI_IDR_ENDRX 12 #define AVR32_TWI_IDR_ENDRX_MASK 0x00001000 #define AVR32_TWI_IDR_ENDRX_OFFSET 12 #define AVR32_TWI_IDR_ENDRX_SIZE 1 #define AVR32_TWI_IDR_ENDTX 13 #define AVR32_TWI_IDR_ENDTX_MASK 0x00002000 #define AVR32_TWI_IDR_ENDTX_OFFSET 13 #define AVR32_TWI_IDR_ENDTX_SIZE 1 #define AVR32_TWI_IDR_EOSACC 11 #define AVR32_TWI_IDR_EOSACC_MASK 0x00000800 #define AVR32_TWI_IDR_EOSACC_OFFSET 11 #define AVR32_TWI_IDR_EOSACC_SIZE 1 #define AVR32_TWI_IDR_GACC 5 #define AVR32_TWI_IDR_GACC_MASK 0x00000020 #define AVR32_TWI_IDR_GACC_OFFSET 5 #define AVR32_TWI_IDR_GACC_SIZE 1 #define AVR32_TWI_IDR_NACK 8 #define AVR32_TWI_IDR_NACK_MASK 0x00000100 #define AVR32_TWI_IDR_NACK_OFFSET 8 #define AVR32_TWI_IDR_NACK_SIZE 1 #define AVR32_TWI_IDR_OVRE 6 #define AVR32_TWI_IDR_OVRE_MASK 0x00000040 #define AVR32_TWI_IDR_OVRE_OFFSET 6 #define AVR32_TWI_IDR_OVRE_SIZE 1 #define AVR32_TWI_IDR_RXBUFF 14 #define AVR32_TWI_IDR_RXBUFF_MASK 0x00004000 #define AVR32_TWI_IDR_RXBUFF_OFFSET 14 #define AVR32_TWI_IDR_RXBUFF_SIZE 1 #define AVR32_TWI_IDR_RXRDY 1 #define AVR32_TWI_IDR_RXRDY_MASK 0x00000002 #define AVR32_TWI_IDR_RXRDY_OFFSET 1 #define AVR32_TWI_IDR_RXRDY_SIZE 1 #define AVR32_TWI_IDR_SCLWS 10 #define AVR32_TWI_IDR_SCLWS_MASK 0x00000400 #define AVR32_TWI_IDR_SCLWS_OFFSET 10 #define AVR32_TWI_IDR_SCLWS_SIZE 1 #define AVR32_TWI_IDR_SVACC 4 #define AVR32_TWI_IDR_SVACC_MASK 0x00000010 #define AVR32_TWI_IDR_SVACC_OFFSET 4 #define AVR32_TWI_IDR_SVACC_SIZE 1 #define AVR32_TWI_IDR_TXBUFE 15 #define AVR32_TWI_IDR_TXBUFE_MASK 0x00008000 #define AVR32_TWI_IDR_TXBUFE_OFFSET 15 #define AVR32_TWI_IDR_TXBUFE_SIZE 1 #define AVR32_TWI_IDR_TXCOMP 0 #define AVR32_TWI_IDR_TXCOMP_MASK 0x00000001 #define AVR32_TWI_IDR_TXCOMP_OFFSET 0 #define AVR32_TWI_IDR_TXCOMP_SIZE 1 #define AVR32_TWI_IDR_TXRDY 2 #define AVR32_TWI_IDR_TXRDY_MASK 0x00000004 #define AVR32_TWI_IDR_TXRDY_OFFSET 2 #define AVR32_TWI_IDR_TXRDY_SIZE 1 #define AVR32_TWI_IER 0x00000024 #define AVR32_TWI_IER_ARBLST 9 #define AVR32_TWI_IER_ARBLST_MASK 0x00000200 #define AVR32_TWI_IER_ARBLST_OFFSET 9 #define AVR32_TWI_IER_ARBLST_SIZE 1 #define AVR32_TWI_IER_ENDRX 12 #define AVR32_TWI_IER_ENDRX_MASK 0x00001000 #define AVR32_TWI_IER_ENDRX_OFFSET 12 #define AVR32_TWI_IER_ENDRX_SIZE 1 #define AVR32_TWI_IER_ENDTX 13 #define AVR32_TWI_IER_ENDTX_MASK 0x00002000 #define AVR32_TWI_IER_ENDTX_OFFSET 13 #define AVR32_TWI_IER_ENDTX_SIZE 1 #define AVR32_TWI_IER_EOSACC 11 #define AVR32_TWI_IER_EOSACC_MASK 0x00000800 #define AVR32_TWI_IER_EOSACC_OFFSET 11 #define AVR32_TWI_IER_EOSACC_SIZE 1 #define AVR32_TWI_IER_GACC 5 #define AVR32_TWI_IER_GACC_MASK 0x00000020 #define AVR32_TWI_IER_GACC_OFFSET 5 #define AVR32_TWI_IER_GACC_SIZE 1 #define AVR32_TWI_IER_NACK 8 #define AVR32_TWI_IER_NACK_MASK 0x00000100 #define AVR32_TWI_IER_NACK_OFFSET 8 #define AVR32_TWI_IER_NACK_SIZE 1 #define AVR32_TWI_IER_OVRE 6 #define AVR32_TWI_IER_OVRE_MASK 0x00000040 #define AVR32_TWI_IER_OVRE_OFFSET 6 #define AVR32_TWI_IER_OVRE_SIZE 1 #define AVR32_TWI_IER_RXBUFF 14 #define AVR32_TWI_IER_RXBUFF_MASK 0x00004000 #define AVR32_TWI_IER_RXBUFF_OFFSET 14 #define AVR32_TWI_IER_RXBUFF_SIZE 1 #define AVR32_TWI_IER_RXRDY 1 #define AVR32_TWI_IER_RXRDY_MASK 0x00000002 #define AVR32_TWI_IER_RXRDY_OFFSET 1 #define AVR32_TWI_IER_RXRDY_SIZE 1 #define AVR32_TWI_IER_SCLWS 10 #define AVR32_TWI_IER_SCLWS_MASK 0x00000400 #define AVR32_TWI_IER_SCLWS_OFFSET 10 #define AVR32_TWI_IER_SCLWS_SIZE 1 #define AVR32_TWI_IER_SVACC 4 #define AVR32_TWI_IER_SVACC_MASK 0x00000010 #define AVR32_TWI_IER_SVACC_OFFSET 4 #define AVR32_TWI_IER_SVACC_SIZE 1 #define AVR32_TWI_IER_TXBUFE 15 #define AVR32_TWI_IER_TXBUFE_MASK 0x00008000 #define AVR32_TWI_IER_TXBUFE_OFFSET 15 #define AVR32_TWI_IER_TXBUFE_SIZE 1 #define AVR32_TWI_IER_TXCOMP 0 #define AVR32_TWI_IER_TXCOMP_MASK 0x00000001 #define AVR32_TWI_IER_TXCOMP_OFFSET 0 #define AVR32_TWI_IER_TXCOMP_SIZE 1 #define AVR32_TWI_IER_TXRDY 2 #define AVR32_TWI_IER_TXRDY_MASK 0x00000004 #define AVR32_TWI_IER_TXRDY_OFFSET 2 #define AVR32_TWI_IER_TXRDY_SIZE 1 #define AVR32_TWI_IMR 0x0000002c #define AVR32_TWI_IMR_ARBLST 9 #define AVR32_TWI_IMR_ARBLST_MASK 0x00000200 #define AVR32_TWI_IMR_ARBLST_OFFSET 9 #define AVR32_TWI_IMR_ARBLST_SIZE 1 #define AVR32_TWI_IMR_ENDRX 12 #define AVR32_TWI_IMR_ENDRX_MASK 0x00001000 #define AVR32_TWI_IMR_ENDRX_OFFSET 12 #define AVR32_TWI_IMR_ENDRX_SIZE 1 #define AVR32_TWI_IMR_ENDTX 13 #define AVR32_TWI_IMR_ENDTX_MASK 0x00002000 #define AVR32_TWI_IMR_ENDTX_OFFSET 13 #define AVR32_TWI_IMR_ENDTX_SIZE 1 #define AVR32_TWI_IMR_EOSACC 11 #define AVR32_TWI_IMR_EOSACC_MASK 0x00000800 #define AVR32_TWI_IMR_EOSACC_OFFSET 11 #define AVR32_TWI_IMR_EOSACC_SIZE 1 #define AVR32_TWI_IMR_GACC 5 #define AVR32_TWI_IMR_GACC_MASK 0x00000020 #define AVR32_TWI_IMR_GACC_OFFSET 5 #define AVR32_TWI_IMR_GACC_SIZE 1 #define AVR32_TWI_IMR_NACK 8 #define AVR32_TWI_IMR_NACK_MASK 0x00000100 #define AVR32_TWI_IMR_NACK_OFFSET 8 #define AVR32_TWI_IMR_NACK_SIZE 1 #define AVR32_TWI_IMR_OVRE 6 #define AVR32_TWI_IMR_OVRE_MASK 0x00000040 #define AVR32_TWI_IMR_OVRE_OFFSET 6 #define AVR32_TWI_IMR_OVRE_SIZE 1 #define AVR32_TWI_IMR_RXBUFF 14 #define AVR32_TWI_IMR_RXBUFF_MASK 0x00004000 #define AVR32_TWI_IMR_RXBUFF_OFFSET 14 #define AVR32_TWI_IMR_RXBUFF_SIZE 1 #define AVR32_TWI_IMR_RXRDY 1 #define AVR32_TWI_IMR_RXRDY_MASK 0x00000002 #define AVR32_TWI_IMR_RXRDY_OFFSET 1 #define AVR32_TWI_IMR_RXRDY_SIZE 1 #define AVR32_TWI_IMR_SCLWS 10 #define AVR32_TWI_IMR_SCLWS_MASK 0x00000400 #define AVR32_TWI_IMR_SCLWS_OFFSET 10 #define AVR32_TWI_IMR_SCLWS_SIZE 1 #define AVR32_TWI_IMR_SVACC 4 #define AVR32_TWI_IMR_SVACC_MASK 0x00000010 #define AVR32_TWI_IMR_SVACC_OFFSET 4 #define AVR32_TWI_IMR_SVACC_SIZE 1 #define AVR32_TWI_IMR_TXBUFE 15 #define AVR32_TWI_IMR_TXBUFE_MASK 0x00008000 #define AVR32_TWI_IMR_TXBUFE_OFFSET 15 #define AVR32_TWI_IMR_TXBUFE_SIZE 1 #define AVR32_TWI_IMR_TXCOMP 0 #define AVR32_TWI_IMR_TXCOMP_MASK 0x00000001 #define AVR32_TWI_IMR_TXCOMP_OFFSET 0 #define AVR32_TWI_IMR_TXCOMP_SIZE 1 #define AVR32_TWI_IMR_TXRDY 2 #define AVR32_TWI_IMR_TXRDY_MASK 0x00000004 #define AVR32_TWI_IMR_TXRDY_OFFSET 2 #define AVR32_TWI_IMR_TXRDY_SIZE 1 #define AVR32_TWI_MMR 0x00000004 #define AVR32_TWI_MMR_DADR 16 #define AVR32_TWI_MMR_DADR_MASK 0x007f0000 #define AVR32_TWI_MMR_DADR_OFFSET 16 #define AVR32_TWI_MMR_DADR_SIZE 7 #define AVR32_TWI_MMR_IADRSZ 8 #define AVR32_TWI_MMR_IADRSZ_MASK 0x00000300 #define AVR32_TWI_MMR_IADRSZ_NO_ADDR 0x00000000 #define AVR32_TWI_MMR_IADRSZ_OFFSET 8 #define AVR32_TWI_MMR_IADRSZ_ONE_BYTE 0x00000001 #define AVR32_TWI_MMR_IADRSZ_SIZE 2 #define AVR32_TWI_MMR_IADRSZ_THREE_BYTES 0x00000003 #define AVR32_TWI_MMR_IADRSZ_TWO_BYTES 0x00000002 #define AVR32_TWI_MMR_MREAD 12 #define AVR32_TWI_MMR_MREAD_MASK 0x00001000 #define AVR32_TWI_MMR_MREAD_OFFSET 12 #define AVR32_TWI_MMR_MREAD_SIZE 1 #define AVR32_TWI_MREAD 12 #define AVR32_TWI_MREAD_MASK 0x00001000 #define AVR32_TWI_MREAD_OFFSET 12 #define AVR32_TWI_MREAD_SIZE 1 #define AVR32_TWI_MSDIS 3 #define AVR32_TWI_MSDIS_MASK 0x00000008 #define AVR32_TWI_MSDIS_OFFSET 3 #define AVR32_TWI_MSDIS_SIZE 1 #define AVR32_TWI_MSEN 2 #define AVR32_TWI_MSEN_MASK 0x00000004 #define AVR32_TWI_MSEN_OFFSET 2 #define AVR32_TWI_MSEN_SIZE 1 #define AVR32_TWI_NACK 8 #define AVR32_TWI_NACK_MASK 0x00000100 #define AVR32_TWI_NACK_OFFSET 8 #define AVR32_TWI_NACK_SIZE 1 #define AVR32_TWI_NO_ADDR 0x00000000 #define AVR32_TWI_ONE_BYTE 0x00000001 #define AVR32_TWI_OVRE 6 #define AVR32_TWI_OVRE_MASK 0x00000040 #define AVR32_TWI_OVRE_OFFSET 6 #define AVR32_TWI_OVRE_SIZE 1 #define AVR32_TWI_RHR 0x00000030 #define AVR32_TWI_RHR_RXDATA 0 #define AVR32_TWI_RHR_RXDATA_MASK 0x000000ff #define AVR32_TWI_RHR_RXDATA_OFFSET 0 #define AVR32_TWI_RHR_RXDATA_SIZE 8 #define AVR32_TWI_RXBUFF 14 #define AVR32_TWI_RXBUFF_MASK 0x00004000 #define AVR32_TWI_RXBUFF_OFFSET 14 #define AVR32_TWI_RXBUFF_SIZE 1 #define AVR32_TWI_RXDATA 0 #define AVR32_TWI_RXDATA_MASK 0x000000ff #define AVR32_TWI_RXDATA_OFFSET 0 #define AVR32_TWI_RXDATA_SIZE 8 #define AVR32_TWI_RXRDY 1 #define AVR32_TWI_RXRDY_MASK 0x00000002 #define AVR32_TWI_RXRDY_OFFSET 1 #define AVR32_TWI_RXRDY_SIZE 1 #define AVR32_TWI_SADR 16 #define AVR32_TWI_SADR_MASK 0x007f0000 #define AVR32_TWI_SADR_OFFSET 16 #define AVR32_TWI_SADR_SIZE 7 #define AVR32_TWI_SCLWS 10 #define AVR32_TWI_SCLWS_MASK 0x00000400 #define AVR32_TWI_SCLWS_OFFSET 10 #define AVR32_TWI_SCLWS_SIZE 1 #define AVR32_TWI_SMR 0x00000008 #define AVR32_TWI_SMR_SADR 16 #define AVR32_TWI_SMR_SADR_MASK 0x007f0000 #define AVR32_TWI_SMR_SADR_OFFSET 16 #define AVR32_TWI_SMR_SADR_SIZE 7 #define AVR32_TWI_SR 0x00000020 #define AVR32_TWI_SR_ARBLST 9 #define AVR32_TWI_SR_ARBLST_MASK 0x00000200 #define AVR32_TWI_SR_ARBLST_OFFSET 9 #define AVR32_TWI_SR_ARBLST_SIZE 1 #define AVR32_TWI_SR_ENDRX 12 #define AVR32_TWI_SR_ENDRX_MASK 0x00001000 #define AVR32_TWI_SR_ENDRX_OFFSET 12 #define AVR32_TWI_SR_ENDRX_SIZE 1 #define AVR32_TWI_SR_ENDTX 13 #define AVR32_TWI_SR_ENDTX_MASK 0x00002000 #define AVR32_TWI_SR_ENDTX_OFFSET 13 #define AVR32_TWI_SR_ENDTX_SIZE 1 #define AVR32_TWI_SR_EOSACC 11 #define AVR32_TWI_SR_EOSACC_MASK 0x00000800 #define AVR32_TWI_SR_EOSACC_OFFSET 11 #define AVR32_TWI_SR_EOSACC_SIZE 1 #define AVR32_TWI_SR_GACC 5 #define AVR32_TWI_SR_GACC_MASK 0x00000020 #define AVR32_TWI_SR_GACC_OFFSET 5 #define AVR32_TWI_SR_GACC_SIZE 1 #define AVR32_TWI_SR_NACK 8 #define AVR32_TWI_SR_NACK_MASK 0x00000100 #define AVR32_TWI_SR_NACK_OFFSET 8 #define AVR32_TWI_SR_NACK_SIZE 1 #define AVR32_TWI_SR_OVRE 6 #define AVR32_TWI_SR_OVRE_MASK 0x00000040 #define AVR32_TWI_SR_OVRE_OFFSET 6 #define AVR32_TWI_SR_OVRE_SIZE 1 #define AVR32_TWI_SR_RXBUFF 14 #define AVR32_TWI_SR_RXBUFF_MASK 0x00004000 #define AVR32_TWI_SR_RXBUFF_OFFSET 14 #define AVR32_TWI_SR_RXBUFF_SIZE 1 #define AVR32_TWI_SR_RXRDY 1 #define AVR32_TWI_SR_RXRDY_MASK 0x00000002 #define AVR32_TWI_SR_RXRDY_OFFSET 1 #define AVR32_TWI_SR_RXRDY_SIZE 1 #define AVR32_TWI_SR_SCLWS 10 #define AVR32_TWI_SR_SCLWS_MASK 0x00000400 #define AVR32_TWI_SR_SCLWS_OFFSET 10 #define AVR32_TWI_SR_SCLWS_SIZE 1 #define AVR32_TWI_SR_SVACC 4 #define AVR32_TWI_SR_SVACC_MASK 0x00000010 #define AVR32_TWI_SR_SVACC_OFFSET 4 #define AVR32_TWI_SR_SVACC_SIZE 1 #define AVR32_TWI_SR_SVREAD 3 #define AVR32_TWI_SR_SVREAD_MASK 0x00000008 #define AVR32_TWI_SR_SVREAD_OFFSET 3 #define AVR32_TWI_SR_SVREAD_SIZE 1 #define AVR32_TWI_SR_TXBUFE 15 #define AVR32_TWI_SR_TXBUFE_MASK 0x00008000 #define AVR32_TWI_SR_TXBUFE_OFFSET 15 #define AVR32_TWI_SR_TXBUFE_SIZE 1 #define AVR32_TWI_SR_TXCOMP 0 #define AVR32_TWI_SR_TXCOMP_MASK 0x00000001 #define AVR32_TWI_SR_TXCOMP_OFFSET 0 #define AVR32_TWI_SR_TXCOMP_SIZE 1 #define AVR32_TWI_SR_TXRDY 2 #define AVR32_TWI_SR_TXRDY_MASK 0x00000004 #define AVR32_TWI_SR_TXRDY_OFFSET 2 #define AVR32_TWI_SR_TXRDY_SIZE 1 #define AVR32_TWI_START 0 #define AVR32_TWI_START_MASK 0x00000001 #define AVR32_TWI_START_OFFSET 0 #define AVR32_TWI_START_SIZE 1 #define AVR32_TWI_STOP 1 #define AVR32_TWI_STOP_MASK 0x00000002 #define AVR32_TWI_STOP_OFFSET 1 #define AVR32_TWI_STOP_SIZE 1 #define AVR32_TWI_SVACC 4 #define AVR32_TWI_SVACC_MASK 0x00000010 #define AVR32_TWI_SVACC_OFFSET 4 #define AVR32_TWI_SVACC_SIZE 1 #define AVR32_TWI_SVDIS 5 #define AVR32_TWI_SVDIS_MASK 0x00000020 #define AVR32_TWI_SVDIS_OFFSET 5 #define AVR32_TWI_SVDIS_SIZE 1 #define AVR32_TWI_SVEN 4 #define AVR32_TWI_SVEN_MASK 0x00000010 #define AVR32_TWI_SVEN_OFFSET 4 #define AVR32_TWI_SVEN_SIZE 1 #define AVR32_TWI_SVREAD 3 #define AVR32_TWI_SVREAD_MASK 0x00000008 #define AVR32_TWI_SVREAD_OFFSET 3 #define AVR32_TWI_SVREAD_SIZE 1 #define AVR32_TWI_SWRST 7 #define AVR32_TWI_SWRST_MASK 0x00000080 #define AVR32_TWI_SWRST_OFFSET 7 #define AVR32_TWI_SWRST_SIZE 1 #define AVR32_TWI_THR 0x00000034 #define AVR32_TWI_THREE_BYTES 0x00000003 #define AVR32_TWI_THR_TXDATA 0 #define AVR32_TWI_THR_TXDATA_MASK 0x000000ff #define AVR32_TWI_THR_TXDATA_OFFSET 0 #define AVR32_TWI_THR_TXDATA_SIZE 8 #define AVR32_TWI_TWO_BYTES 0x00000002 #define AVR32_TWI_TXBUFE 15 #define AVR32_TWI_TXBUFE_MASK 0x00008000 #define AVR32_TWI_TXBUFE_OFFSET 15 #define AVR32_TWI_TXBUFE_SIZE 1 #define AVR32_TWI_TXCOMP 0 #define AVR32_TWI_TXCOMP_MASK 0x00000001 #define AVR32_TWI_TXCOMP_OFFSET 0 #define AVR32_TWI_TXCOMP_SIZE 1 #define AVR32_TWI_TXDATA 0 #define AVR32_TWI_TXDATA_MASK 0x000000ff #define AVR32_TWI_TXDATA_OFFSET 0 #define AVR32_TWI_TXDATA_SIZE 8 #define AVR32_TWI_TXRDY 2 #define AVR32_TWI_TXRDY_MASK 0x00000004 #define AVR32_TWI_TXRDY_OFFSET 2 #define AVR32_TWI_TXRDY_SIZE 1 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_twi_cr_t { unsigned int :24; unsigned int swrst : 1; unsigned int : 1; unsigned int svdis : 1; unsigned int sven : 1; unsigned int msdis : 1; unsigned int msen : 1; unsigned int stop : 1; unsigned int start : 1; } avr32_twi_cr_t; typedef struct avr32_twi_mmr_t { unsigned int : 9; unsigned int dadr : 7; unsigned int : 3; unsigned int mread : 1; unsigned int : 2; unsigned int iadrsz : 2; unsigned int : 8; } avr32_twi_mmr_t; typedef struct avr32_twi_smr_t { unsigned int : 9; unsigned int sadr : 7; unsigned int :16; } avr32_twi_smr_t; typedef struct avr32_twi_iadr_t { unsigned int : 8; unsigned int iadr :24; } avr32_twi_iadr_t; typedef struct avr32_twi_cwgr_t { unsigned int :13; unsigned int ckdiv : 3; unsigned int chdiv : 8; unsigned int cldiv : 8; } avr32_twi_cwgr_t; typedef struct avr32_twi_sr_t { unsigned int :16; unsigned int txbufe : 1; unsigned int rxbuff : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int eosacc : 1; unsigned int sclws : 1; unsigned int arblst : 1; unsigned int nack : 1; unsigned int : 1; unsigned int ovre : 1; unsigned int gacc : 1; unsigned int svacc : 1; unsigned int svread : 1; unsigned int txrdy : 1; unsigned int rxrdy : 1; unsigned int txcomp : 1; } avr32_twi_sr_t; typedef struct avr32_twi_ier_t { unsigned int :16; unsigned int txbufe : 1; unsigned int rxbuff : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int eosacc : 1; unsigned int sclws : 1; unsigned int arblst : 1; unsigned int nack : 1; unsigned int : 1; unsigned int ovre : 1; unsigned int gacc : 1; unsigned int svacc : 1; unsigned int : 1; unsigned int txrdy : 1; unsigned int rxrdy : 1; unsigned int txcomp : 1; } avr32_twi_ier_t; typedef struct avr32_twi_idr_t { unsigned int :16; unsigned int txbufe : 1; unsigned int rxbuff : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int eosacc : 1; unsigned int sclws : 1; unsigned int arblst : 1; unsigned int nack : 1; unsigned int : 1; unsigned int ovre : 1; unsigned int gacc : 1; unsigned int svacc : 1; unsigned int : 1; unsigned int txrdy : 1; unsigned int rxrdy : 1; unsigned int txcomp : 1; } avr32_twi_idr_t; typedef struct avr32_twi_imr_t { unsigned int :16; unsigned int txbufe : 1; unsigned int rxbuff : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int eosacc : 1; unsigned int sclws : 1; unsigned int arblst : 1; unsigned int nack : 1; unsigned int : 1; unsigned int ovre : 1; unsigned int gacc : 1; unsigned int svacc : 1; unsigned int : 1; unsigned int txrdy : 1; unsigned int rxrdy : 1; unsigned int txcomp : 1; } avr32_twi_imr_t; typedef struct avr32_twi_rhr_t { unsigned int :24; unsigned int rxdata : 8; } avr32_twi_rhr_t; typedef struct avr32_twi_thr_t { unsigned int :24; unsigned int txdata : 8; } avr32_twi_thr_t; typedef struct avr32_twi_t { union { unsigned long cr ;//0x0000 avr32_twi_cr_t CR ; }; union { unsigned long mmr ;//0x0004 avr32_twi_mmr_t MMR ; }; union { unsigned long smr ;//0x0008 avr32_twi_smr_t SMR ; }; union { unsigned long iadr ;//0x000c avr32_twi_iadr_t IADR ; }; union { unsigned long cwgr ;//0x0010 avr32_twi_cwgr_t CWGR ; }; unsigned int :32 ;//0x0014 unsigned int :32 ;//0x0018 unsigned int :32 ;//0x001c union { const unsigned long sr ;//0x0020 const avr32_twi_sr_t SR ; }; union { unsigned long ier ;//0x0024 avr32_twi_ier_t IER ; }; union { unsigned long idr ;//0x0028 avr32_twi_idr_t IDR ; }; union { const unsigned long imr ;//0x002c const avr32_twi_imr_t IMR ; }; union { const unsigned long rhr ;//0x0030 const avr32_twi_rhr_t RHR ; }; union { unsigned long thr ;//0x0034 avr32_twi_thr_t THR ; }; } avr32_twi_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif /*#ifdef AVR32_TWI_211_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/uc3b0256.h ================================================ /***************************************************************************** * * Copyright (C) 2006-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 : UC3B0256 * Revision : $Revision: 74373 $ * Checkin Date : $Date: 2010-05-06 07:18:58 +0200 (Thu, 06 May 2010) $ * ****************************************************************************/ #ifndef AVR32_UC3B0256_H_INCLUDED #define AVR32_UC3B0256_H_INCLUDED /* Core */ //#include "avr32/core_sc0_130.h" /* OCD */ //#include "avr32/ocd_s0_130.h" /* CORE */ #define AVR32_CORE_CLK_CPU_COUNT 16 #define AVR32_CORE_COMPARE_IRQ 0 #define AVR32_CORE_SCAN_CHAIN_MSB 9 #define AVR32_CORE_SCAN_CLOCK_MSB 1 /* OCD */ #define AVR32_OCD_CLK_CPU 1 /* Memories */ #define AVR32_FLASH_ADDRESS 0x80000000 #define AVR32_FLASH_SIZE 0x00040000 #define AVR32_FLASH ((unsigned char *)AVR32_FLASH_ADDRESS) #define AVR32_SRAM_ADDRESS 0x00000000 #define AVR32_SRAM_SIZE 0x00008000 #define AVR32_SRAM ((unsigned char *)AVR32_SRAM_ADDRESS) #define AVR32_USBB_SLAVE_ADDRESS 0xD0000000 #define AVR32_USBB_SLAVE_SIZE 0x00800000 #define AVR32_USBB_SLAVE ((unsigned char *)AVR32_USBB_SLAVE_ADDRESS) /* Interrupt Controller */ #define AVR32_INTC_NUM 1 #define AVR32_INTC_ADDRESS 0xFFFF0800 #define AVR32_INTC (*((volatile avr32_intc_t*)AVR32_INTC_ADDRESS)) #define AVR32_INTC_CLK_PBA 64 #define AVR32_INTC_NUM_INT_GRPS 18 #define AVR32_INTC_NUM_IRQS_PER_GRP0 1 #define AVR32_INTC_NUM_IRQS_PER_GRP1 11 #define AVR32_INTC_NUM_IRQS_PER_GRP10 0 #define AVR32_INTC_NUM_IRQS_PER_GRP11 1 #define AVR32_INTC_NUM_IRQS_PER_GRP12 1 #define AVR32_INTC_NUM_IRQS_PER_GRP13 1 #define AVR32_INTC_NUM_IRQS_PER_GRP14 3 #define AVR32_INTC_NUM_IRQS_PER_GRP15 1 #define AVR32_INTC_NUM_IRQS_PER_GRP16 0 #define AVR32_INTC_NUM_IRQS_PER_GRP17 1 #define AVR32_INTC_NUM_IRQS_PER_GRP2 6 #define AVR32_INTC_NUM_IRQS_PER_GRP3 7 #define AVR32_INTC_NUM_IRQS_PER_GRP4 1 #define AVR32_INTC_NUM_IRQS_PER_GRP5 1 #define AVR32_INTC_NUM_IRQS_PER_GRP6 1 #define AVR32_INTC_NUM_IRQS_PER_GRP7 1 #define AVR32_INTC_NUM_IRQS_PER_GRP8 0 #define AVR32_INTC_NUM_IRQS_PER_GRP9 1 #define AVR32_INTC_NUM_NMI 1 //#include "avr32/intc_101.h" /* ADC */ #define AVR32_ADC_NUM 1 /* ADC */ #define AVR32_ADC_ADDRESS 0xFFFF3C00 #define AVR32_ADC (*((volatile avr32_adc_t*)AVR32_ADC_ADDRESS)) #define AVR32_ADC_CLK_PBA 68 #define AVR32_ADC_IRQ 480 #define AVR32_ADC_CHANNELS_MSB 7 #define AVR32_ADC_DATA_MSB 9 #define AVR32_ADC_AD_0_PIN 3 #define AVR32_ADC_AD_0_FUNCTION 0 #define AVR32_ADC_AD_1_PIN 4 #define AVR32_ADC_AD_1_FUNCTION 0 #define AVR32_ADC_AD_6_PIN 30 #define AVR32_ADC_AD_6_FUNCTION 0 #define AVR32_ADC_AD_7_PIN 31 #define AVR32_ADC_AD_7_FUNCTION 0 #define AVR32_ADC_AD_2_PIN 5 #define AVR32_ADC_AD_2_FUNCTION 1 #define AVR32_ADC_AD_3_PIN 6 #define AVR32_ADC_AD_3_FUNCTION 1 #define AVR32_ADC_AD_4_PIN 7 #define AVR32_ADC_AD_4_FUNCTION 1 #define AVR32_ADC_AD_5_PIN 8 #define AVR32_ADC_AD_5_FUNCTION 1 #define AVR32_ADC_TEST_CLK_0_PIN 13 #define AVR32_ADC_TEST_DATA_0_PIN 17 #define AVR32_ADC_TEST_DATA_1_PIN 19 #define AVR32_ADC_TEST_DATA_2_PIN 20 #define AVR32_ADC_TEST_DATA_3_PIN 21 #define AVR32_ADC_TEST_DATA_4_PIN 22 #define AVR32_ADC_TEST_DATA_5_PIN 23 #define AVR32_ADC_TEST_DATA_6_PIN 24 #define AVR32_ADC_TEST_DATA_7_PIN 25 #define AVR32_ADC_TEST_DATA_8_PIN 26 #define AVR32_ADC_TEST_DATA_9_PIN 27 #define AVR32_ADC_TEST_EOC_0_PIN 12 #define AVR32_ADC_TEST_ONAD_0_PIN 11 #define AVR32_ADC_TEST_ONSAR_0_PIN 10 #define AVR32_ADC_TEST_SEL_0_PIN 14 #define AVR32_ADC_TEST_SEL_1_PIN 15 #define AVR32_ADC_TEST_SEL_2_PIN 16 #define AVR32_ADC_TEST_START_0_PIN 9 #define AVR32_ADC_TRIGGER_0_PIN 22 #define AVR32_ADC_TRIGGER_0_FUNCTION 2 #include "avr32/adc_200.h" /* EIC */ #define AVR32_EIC_NUM 1 /* EIC */ #define AVR32_EIC_ADDRESS 0xFFFF0D80 #define AVR32_EIC (*((volatile avr32_eic_t*)AVR32_EIC_ADDRESS)) #define AVR32_EIC_CLK_PBA 67 #define AVR32_EIC_IRQ_0 32 #define AVR32_EIC_IRQ_1 33 #define AVR32_EIC_IRQ_2 34 #define AVR32_EIC_IRQ_3 35 #define AVR32_EIC_IRQ_4 36 #define AVR32_EIC_IRQ_5 37 #define AVR32_EIC_IRQ_6 38 #define AVR32_EIC_IRQ_7 39 #define AVR32_EIC_INT_MSB 8 #define AVR32_EIC_SCAN_MSB 7 #define AVR32_EIC_STD_NUM 8 #define AVR32_EIC_EXTINT_0_PIN 5 #define AVR32_EIC_EXTINT_0_FUNCTION 0 #define AVR32_EIC_EXTINT_1_PIN 6 #define AVR32_EIC_EXTINT_1_FUNCTION 0 #define AVR32_EIC_EXTINT_8_PIN 13 #define AVR32_EIC_EXTINT_8_FUNCTION 0 #define AVR32_EIC_EXTINT_6_PIN 34 #define AVR32_EIC_EXTINT_6_FUNCTION 0 #define AVR32_EIC_EXTINT_7_PIN 35 #define AVR32_EIC_EXTINT_7_FUNCTION 0 #define AVR32_EIC_EXTINT_2_PIN 14 #define AVR32_EIC_EXTINT_2_FUNCTION 2 #define AVR32_EIC_EXTINT_3_PIN 23 #define AVR32_EIC_EXTINT_3_FUNCTION 2 #define AVR32_EIC_EXTINT_4_PIN 24 #define AVR32_EIC_EXTINT_4_FUNCTION 2 #define AVR32_EIC_EXTINT_5_PIN 25 #define AVR32_EIC_EXTINT_5_FUNCTION 2 #define AVR32_EIC_SCAN_0_PIN 30 #define AVR32_EIC_SCAN_0_FUNCTION 1 #define AVR32_EIC_SCAN_1_PIN 31 #define AVR32_EIC_SCAN_1_FUNCTION 1 #define AVR32_EIC_SCAN_2_PIN 32 #define AVR32_EIC_SCAN_2_FUNCTION 1 #define AVR32_EIC_SCAN_3_PIN 33 #define AVR32_EIC_SCAN_3_FUNCTION 1 #define AVR32_EIC_SCAN_4_PIN 38 #define AVR32_EIC_SCAN_4_FUNCTION 2 #define AVR32_EIC_SCAN_5_PIN 39 #define AVR32_EIC_SCAN_5_FUNCTION 2 #define AVR32_EIC_SCAN_6_PIN 40 #define AVR32_EIC_SCAN_6_FUNCTION 2 #define AVR32_EIC_SCAN_7_PIN 41 #define AVR32_EIC_SCAN_7_FUNCTION 2 //#include "avr32/eic_230.h" /* FLASHC */ #define AVR32_FLASHC_NUM 1 /* FLASHC */ #define AVR32_FLASHC_ADDRESS 0xFFFE1400 #define AVR32_FLASHC (*((volatile avr32_flashc_t*)AVR32_FLASHC_ADDRESS)) #define AVR32_FLASHC_CLK_HSB 32 #define AVR32_FLASHC_CLK_PBB 98 #define AVR32_FLASHC_IRQ 128 #define AVR32_FLASHC_FLASH_SIZE 262144 #define AVR32_FLASHC_FWS_0_MAX_FREQ 33000000 #define AVR32_FLASHC_FWS_1_MAX_FREQ 60000000 #define AVR32_FLASHC_GPF_NUM 32 #define AVR32_FLASHC_PAGES_PR_REGION 32 #define AVR32_FLASHC_PAGE_SIZE 512 #define AVR32_FLASHC_USER_PAGE ((volatile unsigned char *)AVR32_FLASHC_USER_PAGE_ADDRESS) #define AVR32_FLASHC_USER_PAGE_ADDRESS 0x80800000 #define AVR32_FLASHC_USER_PAGE_SIZE 512 #define AVR32_FLASHC_BODEN 27 #define AVR32_FLASHC_BODEN_MASK 0x18000000 #define AVR32_FLASHC_BODEN_OFFSET 27 #define AVR32_FLASHC_BODEN_SIZE 2 #define AVR32_FLASHC_BODHYST 26 #define AVR32_FLASHC_BODHYST_MASK 0x04000000 #define AVR32_FLASHC_BODHYST_OFFSET 26 #define AVR32_FLASHC_BODHYST_SIZE 1 #define AVR32_FLASHC_BODLEVEL 20 #define AVR32_FLASHC_BODLEVEL_MASK 0x03F00000 #define AVR32_FLASHC_BODLEVEL_OFFSET 20 #define AVR32_FLASHC_BODLEVEL_SIZE 6 #define AVR32_FLASHC_FGPFRLO_BODEN 27 #define AVR32_FLASHC_FGPFRLO_BODEN_MASK 0x18000000 #define AVR32_FLASHC_FGPFRLO_BODEN_OFFSET 27 #define AVR32_FLASHC_FGPFRLO_BODEN_SIZE 2 #define AVR32_FLASHC_FGPFRLO_BODHYST 26 #define AVR32_FLASHC_FGPFRLO_BODHYST_MASK 0x04000000 #define AVR32_FLASHC_FGPFRLO_BODHYST_OFFSET 26 #define AVR32_FLASHC_FGPFRLO_BODHYST_SIZE 1 #define AVR32_FLASHC_FGPFRLO_BODLEVEL 20 #define AVR32_FLASHC_FGPFRLO_BODLEVEL_MASK 0x03F00000 #define AVR32_FLASHC_FGPFRLO_BODLEVEL_OFFSET 20 #define AVR32_FLASHC_FGPFRLO_BODLEVEL_SIZE 6 #define AVR32_FLASHC_EXTCLK_0_PIN 3 #define AVR32_FLASHC_FLASH_OBS_0_PIN 3 #define AVR32_FLASHC_FLASH_OBS_1_PIN 4 #define AVR32_FLASHC_FLASH_OBS_2_PIN 5 #define AVR32_FLASHC_FLASH_OBS_3_PIN 6 #define AVR32_FLASHC_FLASH_OBS_4_PIN 9 #define AVR32_FLASHC_FLASH_OBS_5_PIN 10 #define AVR32_FLASHC_FLASH_OBS_6_PIN 11 #define AVR32_FLASHC_FLASH_OBS_7_PIN 12 #define AVR32_FLASHC_FLASH_OBS_8_PIN 13 #define AVR32_FLASHC_FLASH_OBS_9_PIN 14 #define AVR32_FLASHC_FLASH_OBS_10_PIN 15 #define AVR32_FLASHC_FLASH_OBS_11_PIN 16 #define AVR32_FLASHC_FLASH_OBS_12_PIN 17 #define AVR32_FLASHC_FLASH_OBS_13_PIN 20 #define AVR32_FLASHC_FLASH_OBS_14_PIN 21 #define AVR32_FLASHC_FLASH_OBS_15_PIN 22 #define AVR32_FLASHC_FLASH_OBS_16_PIN 23 #define AVR32_FLASHC_FLASH_OBS_17_PIN 24 #define AVR32_FLASHC_FLASH_OBS_18_PIN 25 #define AVR32_FLASHC_FLASH_OBS_19_PIN 26 #define AVR32_FLASHC_FLASH_OBS_20_PIN 27 #define AVR32_FLASHC_LATDEL_0_PIN 7 #define AVR32_FLASHC_LATDELCLK_0_PIN 8 //#include "avr32/flashc_200.h" /* FREQM */ #define AVR32_FREQM_NUM 1 /* FREQM */ #define AVR32_FREQM_ADDRESS 0xFFFF0D50 #define AVR32_FREQM (*((volatile avr32_freqm_t*)AVR32_FREQM_ADDRESS)) #define AVR32_FREQM_IRQ 42 #define AVR32_FREQM_REFSEL_BITS 1 //#include "avr32/freqm_230.h" /* GPIO */ #define AVR32_GPIO_NUM 1 /* GPIO */ #define AVR32_GPIO_ADDRESS 0xFFFF1000 #define AVR32_GPIO (*((volatile avr32_gpio_t*)AVR32_GPIO_ADDRESS)) #define AVR32_GPIO_LOCAL_ADDRESS 0x40000000 #define AVR32_GPIO_LOCAL (*((volatile avr32_gpio_local_t*)AVR32_GPIO_LOCAL_ADDRESS)) #define AVR32_GPIO_CLK_PBA 65 #define AVR32_GPIO_IRQ_0 64 #define AVR32_GPIO_IRQ_1 65 #define AVR32_GPIO_IRQ_2 66 #define AVR32_GPIO_IRQ_3 67 #define AVR32_GPIO_IRQ_4 68 #define AVR32_GPIO_IRQ_5 69 #define AVR32_GPIO_GFER_DEFAULT_VAL "44'b11111111111111111111111111111111111111111111" #define AVR32_GPIO_GFER_IMPLEMENTED "44'b11111111111111111111111111111111111111111111" #define AVR32_GPIO_GFILTER_IMPLEMENTED "44'b11111111111111111111111111111111111111111111" #define AVR32_GPIO_GPER_DEFAULT_VAL "44'b11111111111111111111111111111111111111111111" #define AVR32_GPIO_GPER_IMPLEMENTED "44'b11111111111111111111111111111111111111111000" #define AVR32_GPIO_IRQ_MSB 5 #define AVR32_GPIO_PADDR_BITS 9 #define AVR32_GPIO_PINS_MSB 43 #define AVR32_GPIO_IER_DEFAULT_VAL "44'b00000000000000000000000000000000000000000000" #define AVR32_GPIO_IER_IMPLEMENTED "44'b11111111111111111111111111111111111111111111" #define AVR32_GPIO_IFR_IMPLEMENTED "44'b11111111111111111111111111111111111111111111" #define AVR32_GPIO_IMR0_DEFAULT_VAL "44'b00000000000000000000000000000000000000000000" #define AVR32_GPIO_IMR0_IMPLEMENTED "44'b11111111111111111111111111111111111111111111" #define AVR32_GPIO_IMR1_DEFAULT_VAL "44'b00000000000000000000000000000000000000000000" #define AVR32_GPIO_IMR1_IMPLEMENTED "44'b11111111111111111111111111111111111111111111" #define AVR32_GPIO_INPUT_SYNC_IMPLEMENTED "44'b11111111111111111111111111111111111111111111" #define AVR32_GPIO_IRQS_PER_GROUP 8 #define AVR32_GPIO_NUMBER_OF_PINS 44 #define AVR32_GPIO_ODER_DEFAULT_VAL "44'b00000000000000000000000000000000000000000000" #define AVR32_GPIO_ODER_IMPLEMENTED "44'b11111111111111111111111111111111111111111111" #define AVR32_GPIO_ODMER_DEFAULT_VAL "44'b00000000000000000000000000000000000000000000" #define AVR32_GPIO_ODMER_IMPLEMENTED "44'b00000000000000000000000000000000000000000000" #define AVR32_GPIO_OVR_DEFAULT_VAL "44'b00000000000000000000000000000000000000000000" #define AVR32_GPIO_OVR_IMPLEMENTED "44'b11111111111111111111111111111111111111111111" #define AVR32_GPIO_PADDR_MSB 8 #define AVR32_GPIO_PDATA_MSB 31 #define AVR32_GPIO_PMR0_DEFAULT_VAL "44'b00000000000000000000000000000000000000000000" #define AVR32_GPIO_PMR0_IMPLEMENTED "44'b11111111111111111111111111111111111111111000" #define AVR32_GPIO_PMR1_DEFAULT_VAL "44'b00000000000000000000000000000000000000000000" #define AVR32_GPIO_PMR1_IMPLEMENTED "44'b11111111111111111111111111111111111111111000" #define AVR32_GPIO_PORT_LENGTH 2 #define AVR32_GPIO_PUER_DEFAULT_VAL "44'b00000000000000000000000000000000000000000000" #define AVR32_GPIO_PUER_IMPLEMENTED "44'b11111111111111111111111111111111111111111111" #include "avr32/gpio_110.h" /* HMATRIX */ #define AVR32_HMATRIX_NUM 1 /* HMATRIX */ #define AVR32_HMATRIX_ADDRESS 0xFFFE1000 #define AVR32_HMATRIX (*((volatile avr32_hmatrix_t*)AVR32_HMATRIX_ADDRESS)) #define AVR32_HMATRIX_CLK_HSB_PBA_BRIDGE 33 #define AVR32_HMATRIX_CLK_HSB_PBB_BRIDGE 34 #define AVR32_HMATRIX_CLK_PBB 96 #define AVR32_HMATRIX_MASTER_CPU_DATA 0 #define AVR32_HMATRIX_MASTER_CPU_INSN 1 #define AVR32_HMATRIX_MASTER_CPU_SAB 2 #define AVR32_HMATRIX_MASTER_NUM 5 #define AVR32_HMATRIX_MASTER_PDCA 3 #define AVR32_HMATRIX_MASTER_USBB_DMA 4 #define AVR32_HMATRIX_SLAVE_FLASH 0 #define AVR32_HMATRIX_SLAVE_NUM 5 #define AVR32_HMATRIX_SLAVE_PBA 1 #define AVR32_HMATRIX_SLAVE_PBB 2 #define AVR32_HMATRIX_SLAVE_SRAM 3 #define AVR32_HMATRIX_SLAVE_USBB_DPRAM 4 //#include "avr32/hmatrix_230.h" /* JTAG */ /* JTAG */ #define AVR32_JTAG_TDI_0_PIN 0 #define AVR32_JTAG_TDO_0_PIN 1 #define AVR32_JTAG_TMS_0_PIN 2 /* PDCA */ #define AVR32_PDCA_NUM 1 /* PDCA */ #define AVR32_PDCA_ADDRESS 0xFFFF0000 #define AVR32_PDCA (*((volatile avr32_pdca_t*)AVR32_PDCA_ADDRESS)) #define AVR32_PDCA_CLK_HSB 36 #define AVR32_PDCA_CLK_PBA 66 #define AVR32_PDCA_IRQ_0 96 #define AVR32_PDCA_IRQ_1 97 #define AVR32_PDCA_IRQ_2 98 #define AVR32_PDCA_IRQ_3 99 #define AVR32_PDCA_IRQ_4 100 #define AVR32_PDCA_IRQ_5 101 #define AVR32_PDCA_IRQ_6 102 #define AVR32_PDCA_CHANNEL_LENGTH 7 #define AVR32_PDCA_PID_ADC_RX 0 #define AVR32_PDCA_PID_SPI_RX 6 #define AVR32_PDCA_PID_SPI_TX 12 #define AVR32_PDCA_PID_SSC_RX 1 #define AVR32_PDCA_PID_SSC_TX 7 #define AVR32_PDCA_PID_TWI_RX 5 #define AVR32_PDCA_PID_TWI_TX 11 #define AVR32_PDCA_PID_USART0_RX 2 #define AVR32_PDCA_PID_USART0_TX 8 #define AVR32_PDCA_PID_USART1_RX 3 #define AVR32_PDCA_PID_USART1_TX 9 #define AVR32_PDCA_PID_USART2_RX 4 #define AVR32_PDCA_PID_USART2_TX 10 //#include "avr32/pdca_102.h" /* PLL */ /* PLL0 */ #define AVR32_PLL0_DN_0_0_PIN 13 #define AVR32_PLL0_DN_0_1_PIN 14 #define AVR32_PLL0_FDIV_0_0_PIN 15 #define AVR32_PLL0_FDIV_0_1_PIN 16 #define AVR32_PLL0_FDIV_TEST_0_PIN 16 #define AVR32_PLL0_LOCK_0_PIN 10 #define AVR32_PLL0_PLLCLK_0_PIN 9 #define AVR32_PLL0_UP_0_PIN 14 /* PLL1 */ #define AVR32_PLL1_DN_0_PIN 5 #define AVR32_PLL1_FDIV_0_PIN 7 #define AVR32_PLL1_FDIV_TEST_0_PIN 8 #define AVR32_PLL1_LOCK_0_PIN 4 #define AVR32_PLL1_PLLCLK_0_PIN 3 #define AVR32_PLL1_UP_0_PIN 6 /* PM */ #define AVR32_PM_NUM 1 /* PM */ #define AVR32_PM_ADDRESS 0xFFFF0C00 #define AVR32_PM (*((volatile avr32_pm_t*)AVR32_PM_ADDRESS)) #define AVR32_PM_CLK_PBA 67 #define AVR32_PM_IRQ 41 #define AVR32_PM_GCLK_MSB 2 #define AVR32_PM_GCLK_NUM 4 #define AVR32_PM_GCLK_USBB 3 #define AVR32_PM_GPLP_NUM 2 #define AVR32_PM_CPU_MAX_FREQ 60000000 #define AVR32_PM_HSB_MAX_FREQ 60000000 #define AVR32_PM_PBA_MAX_FREQ 60000000 #define AVR32_PM_PBB_MAX_FREQ 60000000 #define AVR32_PM_PLL_VCO_RANGE0_MAX_FREQ 240000000 #define AVR32_PM_PLL_VCO_RANGE0_MIN_FREQ 160000000 #define AVR32_PM_PLL_VCO_RANGE1_MAX_FREQ 180000000 #define AVR32_PM_PLL_VCO_RANGE1_MIN_FREQ 80000000 #define AVR32_PM_RCOSC_CALIBRATION_BITS 10 #define AVR32_PM_RCOSC_FREQUENCY 115200 #define AVR32_PM_GCLK_GCLK0 0 #define AVR32_PM_GCLK_GCLK1 1 #define AVR32_PM_GCLK_GCLK2 2 #define AVR32_PM_GCLK_0_PIN 3 #define AVR32_PM_GCLK_0_FUNCTION 1 #define AVR32_PM_GCLK_1_PIN 4 #define AVR32_PM_GCLK_1_FUNCTION 1 #define AVR32_PM_GCLK_2_PIN 30 #define AVR32_PM_GCLK_2_FUNCTION 2 #define AVR32_PM_RSTM_N_0_PIN 27 #define AVR32_PM_XIN0_0_PIN 18 #define AVR32_PM_XIN1_0_PIN 28 #define AVR32_PM_XIN32_0_PIN 11 #define AVR32_PM_XOUT0_0_PIN 19 #define AVR32_PM_XOUT1_0_PIN 29 #define AVR32_PM_XOUT32_0_PIN 12 #define AVR32_PM_CLK_GRP_CPU 0 #define AVR32_PM_CLK_GRP_HSB 1 #define AVR32_PM_CLK_GRP_PBA 2 #define AVR32_PM_CLK_GRP_PBB 3 #define AVR32_PM_NUM_CLK_GRPS 4 #define AVR32_PM_NUM_CLKS_PER_GRP0 17 #define AVR32_PM_NUM_CLKS_PER_GRP1 5 #define AVR32_PM_NUM_CLKS_PER_GRP2 13 #define AVR32_PM_NUM_CLKS_PER_GRP3 3 //#include "avr32/pm_230.h" /* PULLUP */ /* PULLUP */ #define AVR32_PULLUP_LPC_PULLUP_0_0_PIN 28 #define AVR32_PULLUP_LPC_PULLUP_0_1_PIN 29 #define AVR32_PULLUP_LPC_PULLUP_0_2_PIN 30 #define AVR32_PULLUP_LPC_PULLUP_0_3_PIN 31 #define AVR32_PULLUP_LPC_PULLUP_0_4_PIN 32 #define AVR32_PULLUP_LPC_PULLUP_0_5_PIN 33 #define AVR32_PULLUP_LPC_PULLUP_0_6_PIN 34 #define AVR32_PULLUP_LPC_PULLUP_0_7_PIN 35 #define AVR32_PULLUP_LPC_PULLUP_0_8_PIN 36 #define AVR32_PULLUP_LPC_PULLUP_0_9_PIN 37 #define AVR32_PULLUP_LPC_PULLUP_0_10_PIN 38 #define AVR32_PULLUP_LPC_PULLUP_0_11_PIN 39 #define AVR32_PULLUP_LPC_PULLUP_0_12_PIN 40 #define AVR32_PULLUP_LPC_PULLUP_0_13_PIN 41 #define AVR32_PULLUP_LPC_PULLUP_0_14_PIN 42 #define AVR32_PULLUP_LPC_PULLUP_0_15_PIN 43 /* PWM */ #define AVR32_PWM_NUM 1 /* PWM */ #define AVR32_PWM_ADDRESS 0xFFFF3000 #define AVR32_PWM (*((volatile avr32_pwm_t*)AVR32_PWM_ADDRESS)) #define AVR32_PWM_CLK_PBA 74 #define AVR32_PWM_IRQ 384 #define AVR32_PWM_CHANNEL_LENGTH 0x7 #define AVR32_PWM_LINES_MSB 6 #define AVR32_PWM_0_0_PIN 7 #define AVR32_PWM_0_0_FUNCTION 0 #define AVR32_PWM_1_0_PIN 8 #define AVR32_PWM_1_0_FUNCTION 0 #define AVR32_PWM_2_0_PIN 21 #define AVR32_PWM_2_0_FUNCTION 0 #define AVR32_PWM_6_0_PIN 22 #define AVR32_PWM_6_0_FUNCTION 0 #define AVR32_PWM_2_1_PIN 13 #define AVR32_PWM_2_1_FUNCTION 1 #define AVR32_PWM_3_0_PIN 14 #define AVR32_PWM_3_0_FUNCTION 1 #define AVR32_PWM_4_0_PIN 15 #define AVR32_PWM_4_0_FUNCTION 1 #define AVR32_PWM_5_0_PIN 18 #define AVR32_PWM_5_0_FUNCTION 1 #define AVR32_PWM_6_1_PIN 19 #define AVR32_PWM_6_1_FUNCTION 1 #define AVR32_PWM_3_1_PIN 25 #define AVR32_PWM_3_1_FUNCTION 1 #define AVR32_PWM_4_1_PIN 28 #define AVR32_PWM_4_1_FUNCTION 1 #define AVR32_PWM_0_1_PIN 11 #define AVR32_PWM_0_1_FUNCTION 2 #define AVR32_PWM_1_1_PIN 12 #define AVR32_PWM_1_1_FUNCTION 2 #define AVR32_PWM_4_2_PIN 16 #define AVR32_PWM_4_2_FUNCTION 2 #define AVR32_PWM_6_2_PIN 31 #define AVR32_PWM_6_2_FUNCTION 2 #define AVR32_PWM_5_1_PIN 37 #define AVR32_PWM_5_1_FUNCTION 2 #include "avr32/pwm_130.h" /* RTC */ #define AVR32_RTC_NUM 1 /* RTC */ #define AVR32_RTC_ADDRESS 0xFFFF0D00 #define AVR32_RTC (*((volatile avr32_rtc_t*)AVR32_RTC_ADDRESS)) #define AVR32_RTC_CLK_PBA 67 #define AVR32_RTC_IRQ 40 //#include "avr32/rtc_230.h" /* SPI */ #define AVR32_SPI_NUM 1 /* SPI */ #define AVR32_SPI_ADDRESS 0xFFFF2400 #define AVR32_SPI (*((volatile avr32_spi_t*)AVR32_SPI_ADDRESS)) #define AVR32_SPI_CLK_PBA 69 #define AVR32_SPI_IRQ 288 #define AVR32_SPI_SPI_CS_MSB 3 #define AVR32_SPI_MISO_0_0_PIN 25 #define AVR32_SPI_MISO_0_0_FUNCTION 0 #define AVR32_SPI_MISO_0_1_PIN 18 #define AVR32_SPI_MISO_0_1_FUNCTION 2 #define AVR32_SPI_MISO_0_2_PIN 28 #define AVR32_SPI_MISO_0_2_FUNCTION 2 #define AVR32_SPI_MOSI_0_0_PIN 14 #define AVR32_SPI_MOSI_0_0_FUNCTION 0 #define AVR32_SPI_MOSI_0_1_PIN 19 #define AVR32_SPI_MOSI_0_1_FUNCTION 2 #define AVR32_SPI_MOSI_0_2_PIN 29 #define AVR32_SPI_MOSI_0_2_FUNCTION 2 #define AVR32_SPI_NPCS_0_0_PIN 16 #define AVR32_SPI_NPCS_0_0_FUNCTION 0 #define AVR32_SPI_NPCS_1_0_PIN 17 #define AVR32_SPI_NPCS_1_0_FUNCTION 0 #define AVR32_SPI_NPCS_2_0_PIN 9 #define AVR32_SPI_NPCS_2_0_FUNCTION 1 #define AVR32_SPI_NPCS_3_0_PIN 10 #define AVR32_SPI_NPCS_3_0_FUNCTION 1 #define AVR32_SPI_NPCS_1_1_PIN 23 #define AVR32_SPI_NPCS_1_1_FUNCTION 1 #define AVR32_SPI_NPCS_0_1_PIN 24 #define AVR32_SPI_NPCS_0_1_FUNCTION 1 #define AVR32_SPI_NPCS_3_1_PIN 36 #define AVR32_SPI_NPCS_3_1_FUNCTION 1 #define AVR32_SPI_NPCS_2_1_PIN 37 #define AVR32_SPI_NPCS_2_1_FUNCTION 1 #define AVR32_SPI_SCK_0_0_PIN 15 #define AVR32_SPI_SCK_0_0_FUNCTION 0 #define AVR32_SPI_SCK_0_1_PIN 17 #define AVR32_SPI_SCK_0_1_FUNCTION 2 #include "avr32/spi_199.h" /* SSC */ #define AVR32_SSC_NUM 1 /* SSC */ #define AVR32_SSC_ADDRESS 0xFFFF3400 #define AVR32_SSC (*((volatile avr32_ssc_t*)AVR32_SSC_ADDRESS)) #define AVR32_SSC_CLK_PBA 75 #define AVR32_SSC_IRQ 416 #define AVR32_SSC_RX_CLOCK_0_PIN 38 #define AVR32_SSC_RX_CLOCK_0_FUNCTION 0 #define AVR32_SSC_RX_DATA_0_PIN 39 #define AVR32_SSC_RX_DATA_0_FUNCTION 0 #define AVR32_SSC_RX_FRAME_SYNC_0_PIN 40 #define AVR32_SSC_RX_FRAME_SYNC_0_FUNCTION 0 #define AVR32_SSC_TX_CLOCK_0_PIN 41 #define AVR32_SSC_TX_CLOCK_0_FUNCTION 0 #define AVR32_SSC_TX_DATA_0_PIN 42 #define AVR32_SSC_TX_DATA_0_FUNCTION 0 #define AVR32_SSC_TX_FRAME_SYNC_0_PIN 43 #define AVR32_SSC_TX_FRAME_SYNC_0_FUNCTION 0 //#include "avr32/ssc_310.h" /* TC */ #define AVR32_TC_NUM 1 /* TC */ #define AVR32_TC_ADDRESS 0xFFFF3800 #define AVR32_TC (*((volatile avr32_tc_t*)AVR32_TC_ADDRESS)) #define AVR32_TC_CLK_PBA 76 #define AVR32_TC_IRQ0 448 #define AVR32_TC_IRQ1 449 #define AVR32_TC_IRQ2 450 #define AVR32_TC_A0_0_0_PIN 32 #define AVR32_TC_A0_0_0_FUNCTION 0 #define AVR32_TC_A0_0_1_PIN 26 #define AVR32_TC_A0_0_1_FUNCTION 2 #define AVR32_TC_A1_0_0_PIN 21 #define AVR32_TC_A1_0_0_FUNCTION 1 #define AVR32_TC_A1_0_1_PIN 34 #define AVR32_TC_A1_0_1_FUNCTION 1 #define AVR32_TC_A2_0_0_PIN 11 #define AVR32_TC_A2_0_0_FUNCTION 1 #define AVR32_TC_A2_0_1_PIN 42 #define AVR32_TC_A2_0_1_FUNCTION 1 #define AVR32_TC_B0_0_0_PIN 33 #define AVR32_TC_B0_0_0_FUNCTION 0 #define AVR32_TC_B0_0_1_PIN 27 #define AVR32_TC_B0_0_1_FUNCTION 2 #define AVR32_TC_B1_0_0_PIN 22 #define AVR32_TC_B1_0_0_FUNCTION 1 #define AVR32_TC_B1_0_1_PIN 35 #define AVR32_TC_B1_0_1_FUNCTION 1 #define AVR32_TC_B2_0_0_PIN 12 #define AVR32_TC_B2_0_0_FUNCTION 1 #define AVR32_TC_B2_0_1_PIN 43 #define AVR32_TC_B2_0_1_FUNCTION 1 #define AVR32_TC_CLK0_0_0_PIN 29 #define AVR32_TC_CLK0_0_0_FUNCTION 0 #define AVR32_TC_CLK0_0_1_PIN 20 #define AVR32_TC_CLK0_0_1_FUNCTION 1 #define AVR32_TC_CLK1_0_0_PIN 16 #define AVR32_TC_CLK1_0_0_FUNCTION 1 #define AVR32_TC_CLK1_0_1_PIN 29 #define AVR32_TC_CLK1_0_1_FUNCTION 1 #define AVR32_TC_CLK2_0_0_PIN 17 #define AVR32_TC_CLK2_0_0_FUNCTION 1 #define AVR32_TC_CLK2_0_1_PIN 36 #define AVR32_TC_CLK2_0_1_FUNCTION 2 //#include "avr32/tc_222.h" /* TWI */ #define AVR32_TWI_NUM 1 /* TWI */ #define AVR32_TWI_ADDRESS 0xFFFF2C00 #define AVR32_TWI (*((volatile avr32_twi_t*)AVR32_TWI_ADDRESS)) #define AVR32_TWI_CLK_PBA 70 #define AVR32_TWI_IRQ 352 #define AVR32_TWI_SCL_0_0_PIN 9 #define AVR32_TWI_SCL_0_0_FUNCTION 0 #define AVR32_TWI_SCL_0_1_PIN 9 #define AVR32_TWI_SCL_INPUT_TEST_0_PIN 5 #define AVR32_TWI_SCL_OUTPUT_TEST_0_PIN 6 #define AVR32_TWI_SDA_0_0_PIN 10 #define AVR32_TWI_SDA_0_0_FUNCTION 0 #define AVR32_TWI_SDA_0_1_PIN 10 #define AVR32_TWI_SDA_INPUT_TEST_0_PIN 3 #define AVR32_TWI_SDA_OUTPUT_TEST_0_PIN 4 //#include "avr32/twi_211.h" /* USART */ #define AVR32_USART_NUM 3 /* USART0 */ #define AVR32_USART0_ADDRESS 0xFFFF1400 #define AVR32_USART0 (*((volatile avr32_usart_t*)AVR32_USART0_ADDRESS)) #define AVR32_USART0_CLK_PBA 71 #define AVR32_USART0_IRQ 160 #define AVR32_USART0_CLK_0_0_PIN 28 #define AVR32_USART0_CLK_0_0_FUNCTION 0 #define AVR32_USART0_CLK_0_1_PIN 13 #define AVR32_USART0_CLK_0_1_FUNCTION 2 #define AVR32_USART0_CTS_0_PIN 12 #define AVR32_USART0_CTS_0_FUNCTION 0 #define AVR32_USART0_RTS_0_PIN 11 #define AVR32_USART0_RTS_0_FUNCTION 0 #define AVR32_USART0_RXD_0_0_PIN 18 #define AVR32_USART0_RXD_0_0_FUNCTION 0 #define AVR32_USART0_RXD_0_1_PIN 42 #define AVR32_USART0_RXD_0_1_FUNCTION 2 #define AVR32_USART0_TXD_0_0_PIN 19 #define AVR32_USART0_TXD_0_0_FUNCTION 0 #define AVR32_USART0_TXD_0_1_PIN 43 #define AVR32_USART0_TXD_0_1_FUNCTION 2 /* USART1 */ #define AVR32_USART1_ADDRESS 0xFFFF1800 #define AVR32_USART1 (*((volatile avr32_usart_t*)AVR32_USART1_ADDRESS)) #define AVR32_USART1_CLK_PBA 72 #define AVR32_USART1_IRQ 192 #define AVR32_USART1_CLK_0_PIN 20 #define AVR32_USART1_CLK_0_FUNCTION 0 #define AVR32_USART1_CTS_0_0_PIN 36 #define AVR32_USART1_CTS_0_0_FUNCTION 0 #define AVR32_USART1_CTS_0_1_PIN 9 #define AVR32_USART1_CTS_0_1_FUNCTION 2 #define AVR32_USART1_DCD_0_0_PIN 38 #define AVR32_USART1_DCD_0_0_FUNCTION 1 #define AVR32_USART1_DCD_0_1_PIN 5 #define AVR32_USART1_DCD_0_1_FUNCTION 2 #define AVR32_USART1_DSR_0_0_PIN 39 #define AVR32_USART1_DSR_0_0_FUNCTION 1 #define AVR32_USART1_DSR_0_1_PIN 6 #define AVR32_USART1_DSR_0_1_FUNCTION 2 #define AVR32_USART1_DTR_0_0_PIN 40 #define AVR32_USART1_DTR_0_0_FUNCTION 1 #define AVR32_USART1_DTR_0_1_PIN 7 #define AVR32_USART1_DTR_0_1_FUNCTION 2 #define AVR32_USART1_RI_0_0_PIN 41 #define AVR32_USART1_RI_0_0_FUNCTION 1 #define AVR32_USART1_RI_0_1_PIN 8 #define AVR32_USART1_RI_0_1_FUNCTION 2 #define AVR32_USART1_RTS_0_0_PIN 37 #define AVR32_USART1_RTS_0_0_FUNCTION 0 #define AVR32_USART1_RTS_0_1_PIN 10 #define AVR32_USART1_RTS_0_1_FUNCTION 2 #define AVR32_USART1_RXD_0_0_PIN 24 #define AVR32_USART1_RXD_0_0_FUNCTION 0 #define AVR32_USART1_RXD_0_1_PIN 35 #define AVR32_USART1_RXD_0_1_FUNCTION 2 #define AVR32_USART1_TXD_0_0_PIN 23 #define AVR32_USART1_TXD_0_0_FUNCTION 0 #define AVR32_USART1_TXD_0_1_PIN 34 #define AVR32_USART1_TXD_0_1_FUNCTION 2 /* USART2 */ #define AVR32_USART2_ADDRESS 0xFFFF1C00 #define AVR32_USART2 (*((volatile avr32_usart_t*)AVR32_USART2_ADDRESS)) #define AVR32_USART2_CLK_PBA 73 #define AVR32_USART2_IRQ 224 #define AVR32_USART2_CLK_0_PIN 15 #define AVR32_USART2_CLK_0_FUNCTION 2 #define AVR32_USART2_CTS_0_PIN 32 #define AVR32_USART2_CTS_0_FUNCTION 2 #define AVR32_USART2_RTS_0_PIN 33 #define AVR32_USART2_RTS_0_FUNCTION 2 #define AVR32_USART2_RXD_0_0_PIN 27 #define AVR32_USART2_RXD_0_0_FUNCTION 1 #define AVR32_USART2_RXD_0_1_PIN 20 #define AVR32_USART2_RXD_0_1_FUNCTION 2 #define AVR32_USART2_TXD_0_0_PIN 26 #define AVR32_USART2_TXD_0_0_FUNCTION 1 #define AVR32_USART2_TXD_0_1_PIN 21 #define AVR32_USART2_TXD_0_1_FUNCTION 2 //#include "avr32/usart_400.h" /* USBB */ #define AVR32_USBB_NUM 1 /* USBB */ #define AVR32_USBB_ADDRESS 0xFFFE0000 #define AVR32_USBB (*((volatile avr32_usbb_t*)AVR32_USBB_ADDRESS)) #define AVR32_USBB_CLK_HSB 35 #define AVR32_USBB_CLK_PBB 97 #define AVR32_USBB_IRQ 544 #define AVR32_USBB_EPT_NUM 7 #define AVR32_USBB_ENABLE_TEST_0_PIN 22 #define AVR32_USBB_EOPN_TEST_0_PIN 23 #define AVR32_USBB_FS_TEST_0_PIN 5 #define AVR32_USBB_OEN_TEST_0_PIN 6 #define AVR32_USBB_ONN_TEST_0_PIN 7 #define AVR32_USBB_PDONDM_TEST_0_PIN 8 #define AVR32_USBB_PDONDP_TEST_0_PIN 9 #define AVR32_USBB_PUIDLE_TEST_0_PIN 10 #define AVR32_USBB_PUON_TEST_0_PIN 13 #define AVR32_USBB_RXDM_TEST_0_PIN 14 #define AVR32_USBB_RXDP_TEST_0_PIN 15 #define AVR32_USBB_RXD_TEST_0_PIN 16 #define AVR32_USBB_SESSVLD_TEST_0_PIN 17 #define AVR32_USBB_TXD_TEST_0_PIN 24 #define AVR32_USBB_USB_ID_0_0_PIN 26 #define AVR32_USBB_USB_ID_0_0_FUNCTION 0 #define AVR32_USBB_USB_ID_0_1_PIN 3 #define AVR32_USBB_USB_ID_0_1_FUNCTION 2 #define AVR32_USBB_USB_VBOF_0_0_PIN 27 #define AVR32_USBB_USB_VBOF_0_0_FUNCTION 0 #define AVR32_USBB_USB_VBOF_0_1_PIN 4 #define AVR32_USBB_USB_VBOF_0_1_FUNCTION 2 #define AVR32_USBB_VAVBUSVLD_TEST_0_PIN 19 #define AVR32_USBB_VBUSDISCHARGE_TEST_0_PIN 20 #define AVR32_USBB_VBUSPULSING_TEST_0_PIN 21 //#include "avr32/usbb_310.h" /* WDT */ #define AVR32_WDT_NUM 1 /* WDT */ #define AVR32_WDT_ADDRESS 0xFFFF0D30 #define AVR32_WDT (*((volatile avr32_wdt_t*)AVR32_WDT_ADDRESS)) #define AVR32_WDT_WDTEXTRST_MSB 1 //#include "avr32/wdt_230.h" /* PAD->GPIO bits mapping */ #define AVR32_PIN_PA03 3 #define AVR32_PIN_PA04 4 #define AVR32_PIN_PA05 5 #define AVR32_PIN_PA06 6 #define AVR32_PIN_PA07 7 #define AVR32_PIN_PA08 8 #define AVR32_PIN_PA09 9 #define AVR32_PIN_PA10 10 #define AVR32_PIN_PA11 11 #define AVR32_PIN_PA12 12 #define AVR32_PIN_PA13 13 #define AVR32_PIN_PA14 14 #define AVR32_PIN_PA15 15 #define AVR32_PIN_PA16 16 #define AVR32_PIN_PA17 17 #define AVR32_PIN_PA18 18 #define AVR32_PIN_PA19 19 #define AVR32_PIN_PA20 20 #define AVR32_PIN_PA21 21 #define AVR32_PIN_PA22 22 #define AVR32_PIN_PA23 23 #define AVR32_PIN_PA24 24 #define AVR32_PIN_PA25 25 #define AVR32_PIN_PA26 26 #define AVR32_PIN_PA27 27 #define AVR32_PIN_PA28 28 #define AVR32_PIN_PA29 29 #define AVR32_PIN_PA30 30 #define AVR32_PIN_PA31 31 #define AVR32_PIN_PB00 32 #define AVR32_PIN_PB01 33 #define AVR32_PIN_PB02 34 #define AVR32_PIN_PB03 35 #define AVR32_PIN_PB04 36 #define AVR32_PIN_PB05 37 #define AVR32_PIN_PB06 38 #define AVR32_PIN_PB07 39 #define AVR32_PIN_PB08 40 #define AVR32_PIN_PB09 41 #define AVR32_PIN_PB10 42 #define AVR32_PIN_PB11 43 #define AVR32_PIN_TDI 0 #define AVR32_PIN_TDO 1 #define AVR32_PIN_TMS 2 #if !defined (DEPRECATED_DISABLE) #define AVR32_ADC_ADC_CHANNELS_MSB 7 #define AVR32_ADC_ADC_DATA_MSB 9 #define AVR32_FREQM_FREQM_IRQ 42 #define AVR32_FREQM_FREQM_REFSEL_BITS 1 #define AVR32_GPIO_GPIO_IRQ_MSB 5 #define AVR32_GPIO_GPIO_PADDR_BITS 9 #define AVR32_GPIO_GPIO_PINS_MSB 43 #endif /* #ifndef AVR32_UC3B0256_H_INCLUDED */ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/uc3b0512.h ================================================ /***************************************************************************** * * Copyright (C) 2006-2010 Atmel Corporation * * * 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 : UC3B0512 * Revision : $Revision: 115080 $ * Checkin Date : $Date: 2012-05-04 12:40:09 +0200 (Fri, 04 May 2012) $ * ****************************************************************************/ #ifndef AVR32_UC3B0512_H_INCLUDED #define AVR32_UC3B0512_H_INCLUDED /* Instance count */ #define AVR32_ABDAC_NUM 1 #define AVR32_ADC_NUM 1 #define AVR32_EIC_NUM 1 #define AVR32_FLASHC_NUM 1 #define AVR32_FREQM_NUM 1 #define AVR32_GPIO_NUM 1 #define AVR32_HMATRIX_NUM 1 #define AVR32_JTAG_NUM 1 #define AVR32_PDCA_NUM 1 #define AVR32_PLL_NUM 2 #define AVR32_PM_NUM 1 #define AVR32_PULLUP_NUM 1 #define AVR32_PWM_NUM 1 #define AVR32_RTC_NUM 1 #define AVR32_SPI_NUM 1 #define AVR32_SSC_NUM 1 #define AVR32_TC_NUM 1 #define AVR32_TWI_NUM 1 #define AVR32_USART_NUM 3 #define AVR32_USBB_NUM 1 #define AVR32_WDT_NUM 1 /* Maskable module clocks */ #define AVR32_PM_CLK_GRP_CPU 0 #define AVR32_PM_CLK_GRP_HSB 1 #define AVR32_PM_CLK_GRP_PBA 2 #define AVR32_PM_CLK_GRP_PBB 3 #define AVR32_PM_NUM_CLK_GRPS 4 #define AVR32_PM_NUM_CLKS_PER_GRP0 17 #define AVR32_PM_NUM_CLKS_PER_GRP1 5 #define AVR32_PM_NUM_CLKS_PER_GRP2 13 #define AVR32_PM_NUM_CLKS_PER_GRP3 3 /* CPU clocks */ #define AVR32_OCD_CLK_CPU 1 #define AVR32_CORE_CLK_CPU_COUNT 16 /* HSB clocks */ #define AVR32_FLASHC_CLK_HSB 32 #define AVR32_HMATRIX_CLK_HSB_PBA_BRIDGE 33 #define AVR32_HMATRIX_CLK_HSB_PBB_BRIDGE 34 #define AVR32_USBB_CLK_HSB 35 #define AVR32_PDCA_CLK_HSB 36 /* PBA clocks */ #define AVR32_INTC_CLK_PBA 64 #define AVR32_GPIO_CLK_PBA 65 #define AVR32_PDCA_CLK_PBA 66 #define AVR32_PM_CLK_PBA 67 #define AVR32_RTC_CLK_PBA 67 #define AVR32_EIC_CLK_PBA 67 #define AVR32_ADC_CLK_PBA 68 #define AVR32_SPI_CLK_PBA 69 #define AVR32_TWI_CLK_PBA 70 #define AVR32_USART0_CLK_PBA 71 #define AVR32_USART1_CLK_PBA 72 #define AVR32_USART2_CLK_PBA 73 #define AVR32_PWM_CLK_PBA 74 #define AVR32_SSC_CLK_PBA 75 #define AVR32_TC_CLK_PBA 76 #define AVR32_ABDAC_CLK_PBA 77 /* PBB clocks */ #define AVR32_HMATRIX_CLK_PBB 96 #define AVR32_USBB_CLK_PBB 97 #define AVR32_FLASHC_CLK_PBB 98 /* Generic clocks */ #define AVR32_PM_GCLK_GCLK0 0 #define AVR32_PM_GCLK_GCLK1 1 #define AVR32_PM_GCLK_GCLK2 2 #define AVR32_PM_GCLK_USBB 3 /* Core */ //#include "avr32/core_sc0_143.h" /* OCD */ //#include "avr32/ocd_s0_143.h" /* CORE */ #define AVR32_CORE_COMPARE_IRQ 0 #define AVR32_CORE_SCAN_CHAIN_MSB 9 #define AVR32_CORE_SCAN_CLOCK_MSB 1 /* OCD */ /* Memories */ #define AVR32_FLASH_ADDRESS 0x80000000 #define AVR32_FLASH_SIZE 0x00080000 #define AVR32_FLASH ((unsigned char*)AVR32_FLASH_ADDRESS) #define AVR32_SRAM_ADDRESS 0x00000000 #define AVR32_SRAM_SIZE 0x00018000 #define AVR32_SRAM ((unsigned char*)AVR32_SRAM_ADDRESS) #define AVR32_USBB_SLAVE_ADDRESS 0xD0000000 #define AVR32_USBB_SLAVE_SIZE 0x00800000 #define AVR32_USBB_SLAVE ((unsigned char*)AVR32_USBB_SLAVE_ADDRESS) /* Interrupt Controller */ #define AVR32_INTC_ADDRESS 0xFFFF0800 #define AVR32_INTC (*((volatile avr32_intc_t*)AVR32_INTC_ADDRESS)) #define AVR32_INTC_NUM_INT_GRPS 19 #define AVR32_INTC_NUM_IRQS_PER_GRP0 1 #define AVR32_INTC_NUM_IRQS_PER_GRP1 11 #define AVR32_INTC_NUM_IRQS_PER_GRP10 0 #define AVR32_INTC_NUM_IRQS_PER_GRP11 1 #define AVR32_INTC_NUM_IRQS_PER_GRP12 1 #define AVR32_INTC_NUM_IRQS_PER_GRP13 1 #define AVR32_INTC_NUM_IRQS_PER_GRP14 3 #define AVR32_INTC_NUM_IRQS_PER_GRP15 1 #define AVR32_INTC_NUM_IRQS_PER_GRP16 0 #define AVR32_INTC_NUM_IRQS_PER_GRP17 1 #define AVR32_INTC_NUM_IRQS_PER_GRP18 1 #define AVR32_INTC_NUM_IRQS_PER_GRP2 6 #define AVR32_INTC_NUM_IRQS_PER_GRP3 7 #define AVR32_INTC_NUM_IRQS_PER_GRP4 1 #define AVR32_INTC_NUM_IRQS_PER_GRP5 1 #define AVR32_INTC_NUM_IRQS_PER_GRP6 1 #define AVR32_INTC_NUM_IRQS_PER_GRP7 1 #define AVR32_INTC_NUM_IRQS_PER_GRP8 0 #define AVR32_INTC_NUM_IRQS_PER_GRP9 1 #define AVR32_INTC_NUM_NMI 1 //#include "avr32/intc_101.h" /* ABDAC */ /* ABDAC */ #define AVR32_ABDAC_ADDRESS 0xFFFF4000 #define AVR32_ABDAC (*((volatile avr32_abdac_t*)AVR32_ABDAC_ADDRESS)) #define AVR32_ABDAC_IRQ 576 #define AVR32_ABDAC_DATA_0_0_PIN 3 #define AVR32_ABDAC_DATA_0_0_FUNCTION 3 #define AVR32_ABDAC_DATA_1_0_PIN 5 #define AVR32_ABDAC_DATA_1_0_FUNCTION 3 #define AVR32_ABDAC_DATA_0_1_PIN 22 #define AVR32_ABDAC_DATA_0_1_FUNCTION 3 #define AVR32_ABDAC_DATA_1_1_PIN 26 #define AVR32_ABDAC_DATA_1_1_FUNCTION 3 #define AVR32_ABDAC_DATA_0_2_PIN 38 #define AVR32_ABDAC_DATA_0_2_FUNCTION 3 #define AVR32_ABDAC_DATA_1_2_PIN 40 #define AVR32_ABDAC_DATA_1_2_FUNCTION 3 #define AVR32_ABDAC_DATAN_0_0_PIN 4 #define AVR32_ABDAC_DATAN_0_0_FUNCTION 3 #define AVR32_ABDAC_DATAN_1_0_PIN 6 #define AVR32_ABDAC_DATAN_1_0_FUNCTION 3 #define AVR32_ABDAC_DATAN_1_1_PIN 27 #define AVR32_ABDAC_DATAN_1_1_FUNCTION 3 #define AVR32_ABDAC_DATAN_0_1_PIN 28 #define AVR32_ABDAC_DATAN_0_1_FUNCTION 3 #define AVR32_ABDAC_DATAN_0_2_PIN 39 #define AVR32_ABDAC_DATAN_0_2_FUNCTION 3 #define AVR32_ABDAC_DATAN_1_2_PIN 41 #define AVR32_ABDAC_DATAN_1_2_FUNCTION 3 //#include "avr32/abdac_101.h" /* ADC */ /* ADC */ #define AVR32_ADC_ADDRESS 0xFFFF3C00 #define AVR32_ADC (*((volatile avr32_adc_t*)AVR32_ADC_ADDRESS)) #define AVR32_ADC_IRQ 480 #define AVR32_ADC_CHANNELS_MSB 7 #define AVR32_ADC_DATA_MSB 9 #define AVR32_ADC_AD_0_PIN 3 #define AVR32_ADC_AD_0_FUNCTION 0 #define AVR32_ADC_AD_1_PIN 4 #define AVR32_ADC_AD_1_FUNCTION 0 #define AVR32_ADC_AD_6_PIN 30 #define AVR32_ADC_AD_6_FUNCTION 0 #define AVR32_ADC_AD_7_PIN 31 #define AVR32_ADC_AD_7_FUNCTION 0 #define AVR32_ADC_AD_2_PIN 5 #define AVR32_ADC_AD_2_FUNCTION 1 #define AVR32_ADC_AD_3_PIN 6 #define AVR32_ADC_AD_3_FUNCTION 1 #define AVR32_ADC_AD_4_PIN 7 #define AVR32_ADC_AD_4_FUNCTION 1 #define AVR32_ADC_AD_5_PIN 8 #define AVR32_ADC_AD_5_FUNCTION 1 #define AVR32_ADC_TEST_CLK_0_PIN 13 #define AVR32_ADC_TEST_DATA_0_PIN 17 #define AVR32_ADC_TEST_DATA_1_PIN 19 #define AVR32_ADC_TEST_DATA_2_PIN 20 #define AVR32_ADC_TEST_DATA_3_PIN 21 #define AVR32_ADC_TEST_DATA_4_PIN 22 #define AVR32_ADC_TEST_DATA_5_PIN 23 #define AVR32_ADC_TEST_DATA_6_PIN 24 #define AVR32_ADC_TEST_DATA_7_PIN 25 #define AVR32_ADC_TEST_DATA_8_PIN 26 #define AVR32_ADC_TEST_DATA_9_PIN 27 #define AVR32_ADC_TEST_EOC_0_PIN 12 #define AVR32_ADC_TEST_ONAD_0_PIN 11 #define AVR32_ADC_TEST_ONSAR_0_PIN 10 #define AVR32_ADC_TEST_SEL_0_PIN 14 #define AVR32_ADC_TEST_SEL_1_PIN 15 #define AVR32_ADC_TEST_SEL_2_PIN 16 #define AVR32_ADC_TEST_START_0_PIN 9 #define AVR32_ADC_TRIGGER_0_PIN 22 #define AVR32_ADC_TRIGGER_0_FUNCTION 2 #include "avr32/adc_200.h" /* EIC */ /* EIC */ #define AVR32_EIC_ADDRESS 0xFFFF0D80 #define AVR32_EIC (*((volatile avr32_eic_t*)AVR32_EIC_ADDRESS)) #define AVR32_EIC_IRQ_0 32 #define AVR32_EIC_IRQ_1 33 #define AVR32_EIC_IRQ_2 34 #define AVR32_EIC_IRQ_3 35 #define AVR32_EIC_IRQ_4 36 #define AVR32_EIC_IRQ_5 37 #define AVR32_EIC_IRQ_6 38 #define AVR32_EIC_IRQ_7 39 #define AVR32_EIC_INT_MSB 8 #define AVR32_EIC_SCAN_MSB 7 #define AVR32_EIC_STD_NUM 8 #define AVR32_EIC_EXTINT_0_PIN 5 #define AVR32_EIC_EXTINT_0_FUNCTION 0 #define AVR32_EIC_EXTINT_1_PIN 6 #define AVR32_EIC_EXTINT_1_FUNCTION 0 #define AVR32_EIC_EXTINT_8_PIN 13 #define AVR32_EIC_EXTINT_8_FUNCTION 0 #define AVR32_EIC_EXTINT_6_PIN 34 #define AVR32_EIC_EXTINT_6_FUNCTION 0 #define AVR32_EIC_EXTINT_7_PIN 35 #define AVR32_EIC_EXTINT_7_FUNCTION 0 #define AVR32_EIC_EXTINT_2_PIN 14 #define AVR32_EIC_EXTINT_2_FUNCTION 2 #define AVR32_EIC_EXTINT_3_PIN 23 #define AVR32_EIC_EXTINT_3_FUNCTION 2 #define AVR32_EIC_EXTINT_4_PIN 24 #define AVR32_EIC_EXTINT_4_FUNCTION 2 #define AVR32_EIC_EXTINT_5_PIN 25 #define AVR32_EIC_EXTINT_5_FUNCTION 2 #define AVR32_EIC_SCAN_0_PIN 30 #define AVR32_EIC_SCAN_0_FUNCTION 1 #define AVR32_EIC_SCAN_1_PIN 31 #define AVR32_EIC_SCAN_1_FUNCTION 1 #define AVR32_EIC_SCAN_2_PIN 32 #define AVR32_EIC_SCAN_2_FUNCTION 1 #define AVR32_EIC_SCAN_3_PIN 33 #define AVR32_EIC_SCAN_3_FUNCTION 1 #define AVR32_EIC_SCAN_4_PIN 38 #define AVR32_EIC_SCAN_4_FUNCTION 2 #define AVR32_EIC_SCAN_5_PIN 39 #define AVR32_EIC_SCAN_5_FUNCTION 2 #define AVR32_EIC_SCAN_6_PIN 40 #define AVR32_EIC_SCAN_6_FUNCTION 2 #define AVR32_EIC_SCAN_7_PIN 41 #define AVR32_EIC_SCAN_7_FUNCTION 2 //#include "avr32/eic_2311.h" /* FLASHC */ /* FLASHC */ #define AVR32_FLASHC_ADDRESS 0xFFFE1400 #define AVR32_FLASHC (*((volatile avr32_flashc_t*)AVR32_FLASHC_ADDRESS)) #define AVR32_FLASHC_IRQ 128 #define AVR32_FLASHC_FLASH_SIZE 524288 #define AVR32_FLASHC_FWS_0_MAX_FREQ 33000000 #define AVR32_FLASHC_FWS_1_MAX_FREQ 60000000 #define AVR32_FLASHC_PAGES_PR_REGION 64 #define AVR32_FLASHC_PAGE_SIZE 512 #define AVR32_FLASHC_USER_PAGE ((volatile unsigned char*)AVR32_FLASHC_USER_PAGE_ADDRESS) #define AVR32_FLASHC_USER_PAGE_ADDRESS 0x80800000 #define AVR32_FLASHC_USER_PAGE_SIZE 512 #define AVR32_FLASHC_BODEN 27 #define AVR32_FLASHC_BODEN_MASK 0x18000000 #define AVR32_FLASHC_BODEN_OFFSET 27 #define AVR32_FLASHC_BODEN_SIZE 2 #define AVR32_FLASHC_BODHYST 26 #define AVR32_FLASHC_BODHYST_MASK 0x04000000 #define AVR32_FLASHC_BODHYST_OFFSET 26 #define AVR32_FLASHC_BODHYST_SIZE 1 #define AVR32_FLASHC_BODLEVEL 20 #define AVR32_FLASHC_BODLEVEL_MASK 0x03F00000 #define AVR32_FLASHC_BODLEVEL_OFFSET 20 #define AVR32_FLASHC_BODLEVEL_SIZE 6 #define AVR32_FLASHC_FGPFRLO_BODEN 27 #define AVR32_FLASHC_FGPFRLO_BODEN_MASK 0x18000000 #define AVR32_FLASHC_FGPFRLO_BODEN_OFFSET 27 #define AVR32_FLASHC_FGPFRLO_BODEN_SIZE 2 #define AVR32_FLASHC_FGPFRLO_BODHYST 26 #define AVR32_FLASHC_FGPFRLO_BODHYST_MASK 0x04000000 #define AVR32_FLASHC_FGPFRLO_BODHYST_OFFSET 26 #define AVR32_FLASHC_FGPFRLO_BODHYST_SIZE 1 #define AVR32_FLASHC_FGPFRLO_BODLEVEL 20 #define AVR32_FLASHC_FGPFRLO_BODLEVEL_MASK 0x03F00000 #define AVR32_FLASHC_FGPFRLO_BODLEVEL_OFFSET 20 #define AVR32_FLASHC_FGPFRLO_BODLEVEL_SIZE 6 #define AVR32_FLASHC_EXTCLK_0_PIN 3 #define AVR32_FLASHC_FLASH_OBS_0_PIN 3 #define AVR32_FLASHC_FLASH_OBS_1_PIN 4 #define AVR32_FLASHC_FLASH_OBS_2_PIN 5 #define AVR32_FLASHC_FLASH_OBS_3_PIN 6 #define AVR32_FLASHC_FLASH_OBS_4_PIN 9 #define AVR32_FLASHC_FLASH_OBS_5_PIN 10 #define AVR32_FLASHC_FLASH_OBS_6_PIN 11 #define AVR32_FLASHC_FLASH_OBS_7_PIN 12 #define AVR32_FLASHC_FLASH_OBS_8_PIN 13 #define AVR32_FLASHC_FLASH_OBS_9_PIN 14 #define AVR32_FLASHC_FLASH_OBS_10_PIN 15 #define AVR32_FLASHC_FLASH_OBS_11_PIN 16 #define AVR32_FLASHC_FLASH_OBS_12_PIN 17 #define AVR32_FLASHC_FLASH_OBS_13_PIN 20 #define AVR32_FLASHC_FLASH_OBS_14_PIN 21 #define AVR32_FLASHC_FLASH_OBS_15_PIN 22 #define AVR32_FLASHC_FLASH_OBS_16_PIN 23 #define AVR32_FLASHC_FLASH_OBS_17_PIN 24 #define AVR32_FLASHC_FLASH_OBS_18_PIN 25 #define AVR32_FLASHC_FLASH_OBS_19_PIN 26 #define AVR32_FLASHC_FLASH_OBS_20_PIN 27 #define AVR32_FLASHC_LATDEL_0_PIN 7 #define AVR32_FLASHC_LATDELCLK_0_PIN 8 #define AVR32_FLASHC_LATDELMATCH_0_PIN 4 //#include "avr32/flashc_212.h" /* FREQM */ /* FREQM */ #define AVR32_FREQM_ADDRESS 0xFFFF0D50 #define AVR32_FREQM (*((volatile avr32_freqm_t*)AVR32_FREQM_ADDRESS)) #define AVR32_FREQM_IRQ 42 #define AVR32_FREQM_REFSEL_BITS 1 //#include "avr32/freqm_2311.h" /* GPIO */ /* GPIO */ #define AVR32_GPIO_ADDRESS 0xFFFF1000 #define AVR32_GPIO (*((volatile avr32_gpio_t*)AVR32_GPIO_ADDRESS)) #define AVR32_GPIO_IRQ_0 64 #define AVR32_GPIO_IRQ_1 65 #define AVR32_GPIO_IRQ_2 66 #define AVR32_GPIO_IRQ_3 67 #define AVR32_GPIO_IRQ_4 68 #define AVR32_GPIO_IRQ_5 69 #define AVR32_GPIO_IRQ_MSB 5 #define AVR32_GPIO_MAX_IRQ_MSB 5 #define AVR32_GPIO_PADDR_BITS 9 #define AVR32_GPIO_PINS_MSB 44 #define AVR32_GPIO_IRQS_PER_GROUP 8 #define AVR32_GPIO_NUMBER_OF_PINS 45 #define AVR32_GPIO_PADDR_MSB 8 #define AVR32_GPIO_PDATA_MSB 31 #define AVR32_GPIO_PORT_LENGTH 2 /* GPIO_LOCAL */ #define AVR32_GPIO_LOCAL_ADDRESS 0x40000000 #define AVR32_GPIO_LOCAL (*((volatile avr32_gpio_local_t*)AVR32_GPIO_LOCAL_ADDRESS)) #include "avr32/gpio_110.h" /* HMATRIX */ /* HMATRIX */ #define AVR32_HMATRIX_ADDRESS 0xFFFE1000 #define AVR32_HMATRIX (*((volatile avr32_hmatrix_t*)AVR32_HMATRIX_ADDRESS)) #define AVR32_HMATRIX_MASTER_CPU_DATA 0 #define AVR32_HMATRIX_MASTER_CPU_INSTRUCTION 1 #define AVR32_HMATRIX_MASTER_CPU_SAB 2 #define AVR32_HMATRIX_MASTER_MACB_DMA 4 #define AVR32_HMATRIX_MASTER_NUM 5 #define AVR32_HMATRIX_MASTER_PDCA 3 #define AVR32_HMATRIX_MASTER_USBB_DMA 5 #define AVR32_HMATRIX_SLAVE_EBI 5 #define AVR32_HMATRIX_SLAVE_FLASH 0 #define AVR32_HMATRIX_SLAVE_NUM 5 #define AVR32_HMATRIX_SLAVE_PBA 1 #define AVR32_HMATRIX_SLAVE_PBB 2 #define AVR32_HMATRIX_SLAVE_SRAM 3 #define AVR32_HMATRIX_SLAVE_USBB_DPRAM 4 //#include "avr32/hmatrix_230.h" /* JTAG */ /* JTAG */ #define AVR32_JTAG_TDI_0_PIN 0 #define AVR32_JTAG_TDO_0_PIN 1 #define AVR32_JTAG_TMS_0_PIN 2 /* PDCA */ /* PDCA */ #define AVR32_PDCA_ADDRESS 0xFFFF0000 #define AVR32_PDCA (*((volatile avr32_pdca_t*)AVR32_PDCA_ADDRESS)) #define AVR32_PDCA_IRQ_0 96 #define AVR32_PDCA_IRQ_1 97 #define AVR32_PDCA_IRQ_2 98 #define AVR32_PDCA_IRQ_3 99 #define AVR32_PDCA_IRQ_4 100 #define AVR32_PDCA_IRQ_5 101 #define AVR32_PDCA_IRQ_6 102 #define AVR32_PDCA_CHANNEL_LENGTH 0x7 #define AVR32_PDCA_PID_ADC_RX 0 #define AVR32_PDCA_PID_SPI_RX 6 #define AVR32_PDCA_PID_SPI_TX 12 #define AVR32_PDCA_PID_SSC_RX 1 #define AVR32_PDCA_PID_SSC_TX 7 #define AVR32_PDCA_PID_TWI_RX 5 #define AVR32_PDCA_PID_TWI_TX 11 #define AVR32_PDCA_PID_USART0_RX 2 #define AVR32_PDCA_PID_USART0_TX 8 #define AVR32_PDCA_PID_USART1_RX 3 #define AVR32_PDCA_PID_USART1_TX 9 #define AVR32_PDCA_PID_USART2_RX 4 #define AVR32_PDCA_PID_USART2_TX 10 //#include "avr32/pdca_102.h" /* PLL */ /* PLL0 */ #define AVR32_PLL0_DN_0_PIN 13 #define AVR32_PLL0_FDIV_0_PIN 15 #define AVR32_PLL0_FDIV_TEST_0_PIN 16 #define AVR32_PLL0_LOCK_0_PIN 10 #define AVR32_PLL0_PLLCLK_0_PIN 9 #define AVR32_PLL0_UP_0_PIN 14 /* PLL1 */ #define AVR32_PLL1_DN_0_PIN 5 #define AVR32_PLL1_FDIV_0_PIN 7 #define AVR32_PLL1_FDIV_TEST_0_PIN 8 #define AVR32_PLL1_LOCK_0_PIN 4 #define AVR32_PLL1_PLLCLK_0_PIN 3 #define AVR32_PLL1_UP_0_PIN 6 /* PM */ /* PM */ #define AVR32_PM_ADDRESS 0xFFFF0C00 #define AVR32_PM (*((volatile avr32_pm_t*)AVR32_PM_ADDRESS)) #define AVR32_PM_IRQ 41 #define AVR32_PM_CPU_MAX_FREQ 60000000 #define AVR32_PM_GCLK_ABDAC 4 #define AVR32_PM_GCLK_MSB 3 #define AVR32_PM_GCLK_NUM 5 #define AVR32_PM_GCLK_USBB 3 #define AVR32_PM_GPLP_NUM 2 #define AVR32_PM_HSB_MAX_FREQ 60000000 #define AVR32_PM_PBA_MAX_FREQ 60000000 #define AVR32_PM_PBB_MAX_FREQ 60000000 #define AVR32_PM_PLL_VCO_RANGE0_MAX_FREQ 240000000 #define AVR32_PM_PLL_VCO_RANGE0_MIN_FREQ 160000000 #define AVR32_PM_PLL_VCO_RANGE1_MAX_FREQ 180000000 #define AVR32_PM_PLL_VCO_RANGE1_MIN_FREQ 80000000 #define AVR32_PM_RCOSC_CALIBRATION_BITS 10 #define AVR32_PM_RCOSC_FREQUENCY 115200 #define AVR32_PM_GCLK_0_PIN 3 #define AVR32_PM_GCLK_0_FUNCTION 1 #define AVR32_PM_GCLK_1_PIN 4 #define AVR32_PM_GCLK_1_FUNCTION 1 #define AVR32_PM_GCLK_2_0_PIN 30 #define AVR32_PM_GCLK_2_0_FUNCTION 2 #define AVR32_PM_GCLK_2_1_PIN 14 #define AVR32_PM_GCLK_2_1_FUNCTION 3 #define AVR32_PM_RSTM_N_0_PIN 27 #define AVR32_PM_XIN0_0_PIN 18 #define AVR32_PM_XIN1_0_PIN 28 #define AVR32_PM_XIN32_0_PIN 11 #define AVR32_PM_XOUT0_0_PIN 19 #define AVR32_PM_XOUT1_0_PIN 29 #define AVR32_PM_XOUT32_0_PIN 12 //#include "avr32/pm_231.h" /* PULLUP */ /* PULLUP */ #define AVR32_PULLUP_LPC_PULLUP_0_0_PIN 28 #define AVR32_PULLUP_LPC_PULLUP_0_1_PIN 29 #define AVR32_PULLUP_LPC_PULLUP_0_2_PIN 30 #define AVR32_PULLUP_LPC_PULLUP_0_3_PIN 31 #define AVR32_PULLUP_LPC_PULLUP_0_4_PIN 32 #define AVR32_PULLUP_LPC_PULLUP_0_5_PIN 33 #define AVR32_PULLUP_LPC_PULLUP_0_6_PIN 34 #define AVR32_PULLUP_LPC_PULLUP_0_7_PIN 35 #define AVR32_PULLUP_LPC_PULLUP_0_8_PIN 36 #define AVR32_PULLUP_LPC_PULLUP_0_9_PIN 37 #define AVR32_PULLUP_LPC_PULLUP_0_10_PIN 38 #define AVR32_PULLUP_LPC_PULLUP_0_11_PIN 39 #define AVR32_PULLUP_LPC_PULLUP_0_12_PIN 40 #define AVR32_PULLUP_LPC_PULLUP_0_13_PIN 41 #define AVR32_PULLUP_LPC_PULLUP_0_14_PIN 42 #define AVR32_PULLUP_LPC_PULLUP_0_15_PIN 43 /* PWM */ /* PWM */ #define AVR32_PWM_ADDRESS 0xFFFF3000 #define AVR32_PWM (*((volatile avr32_pwm_t*)AVR32_PWM_ADDRESS)) #define AVR32_PWM_IRQ 384 #define AVR32_PWM_CHANNEL_LENGTH 0x7 #define AVR32_PWM_LINES_MSB 6 #define AVR32_PWM_0_0_PIN 7 #define AVR32_PWM_0_0_FUNCTION 0 #define AVR32_PWM_1_0_PIN 8 #define AVR32_PWM_1_0_FUNCTION 0 #define AVR32_PWM_2_0_PIN 21 #define AVR32_PWM_2_0_FUNCTION 0 #define AVR32_PWM_6_0_PIN 22 #define AVR32_PWM_6_0_FUNCTION 0 #define AVR32_PWM_2_1_PIN 13 #define AVR32_PWM_2_1_FUNCTION 1 #define AVR32_PWM_3_0_PIN 14 #define AVR32_PWM_3_0_FUNCTION 1 #define AVR32_PWM_4_0_PIN 15 #define AVR32_PWM_4_0_FUNCTION 1 #define AVR32_PWM_5_0_PIN 18 #define AVR32_PWM_5_0_FUNCTION 1 #define AVR32_PWM_6_1_PIN 19 #define AVR32_PWM_6_1_FUNCTION 1 #define AVR32_PWM_3_1_PIN 25 #define AVR32_PWM_3_1_FUNCTION 1 #define AVR32_PWM_4_1_PIN 28 #define AVR32_PWM_4_1_FUNCTION 1 #define AVR32_PWM_0_1_PIN 11 #define AVR32_PWM_0_1_FUNCTION 2 #define AVR32_PWM_1_1_PIN 12 #define AVR32_PWM_1_1_FUNCTION 2 #define AVR32_PWM_4_2_PIN 16 #define AVR32_PWM_4_2_FUNCTION 2 #define AVR32_PWM_6_2_PIN 31 #define AVR32_PWM_6_2_FUNCTION 2 #define AVR32_PWM_5_1_PIN 37 #define AVR32_PWM_5_1_FUNCTION 2 #define AVR32_PWM_0_2_PIN 23 #define AVR32_PWM_0_2_FUNCTION 3 #define AVR32_PWM_1_2_PIN 24 #define AVR32_PWM_1_2_FUNCTION 3 #include "avr32/pwm_130.h" /* RTC */ /* RTC */ #define AVR32_RTC_ADDRESS 0xFFFF0D00 #define AVR32_RTC (*((volatile avr32_rtc_t*)AVR32_RTC_ADDRESS)) #define AVR32_RTC_IRQ 40 //#include "avr32/rtc_2311.h" /* SPI */ /* SPI */ #define AVR32_SPI_ADDRESS 0xFFFF2400 #define AVR32_SPI (*((volatile avr32_spi_t*)AVR32_SPI_ADDRESS)) #define AVR32_SPI_IRQ 288 #define AVR32_SPI_CS_MSB 3 #define AVR32_SPI_MISO_0_0_PIN 25 #define AVR32_SPI_MISO_0_0_FUNCTION 0 #define AVR32_SPI_MISO_0_1_PIN 18 #define AVR32_SPI_MISO_0_1_FUNCTION 2 #define AVR32_SPI_MISO_0_2_PIN 28 #define AVR32_SPI_MISO_0_2_FUNCTION 2 #define AVR32_SPI_MOSI_0_0_PIN 14 #define AVR32_SPI_MOSI_0_0_FUNCTION 0 #define AVR32_SPI_MOSI_0_1_PIN 19 #define AVR32_SPI_MOSI_0_1_FUNCTION 2 #define AVR32_SPI_MOSI_0_2_PIN 29 #define AVR32_SPI_MOSI_0_2_FUNCTION 2 #define AVR32_SPI_NPCS_0_0_PIN 16 #define AVR32_SPI_NPCS_0_0_FUNCTION 0 #define AVR32_SPI_NPCS_1_0_PIN 17 #define AVR32_SPI_NPCS_1_0_FUNCTION 0 #define AVR32_SPI_NPCS_2_0_PIN 9 #define AVR32_SPI_NPCS_2_0_FUNCTION 1 #define AVR32_SPI_NPCS_3_0_PIN 10 #define AVR32_SPI_NPCS_3_0_FUNCTION 1 #define AVR32_SPI_NPCS_1_1_PIN 23 #define AVR32_SPI_NPCS_1_1_FUNCTION 1 #define AVR32_SPI_NPCS_0_1_PIN 24 #define AVR32_SPI_NPCS_0_1_FUNCTION 1 #define AVR32_SPI_NPCS_3_1_PIN 36 #define AVR32_SPI_NPCS_3_1_FUNCTION 1 #define AVR32_SPI_NPCS_2_1_PIN 37 #define AVR32_SPI_NPCS_2_1_FUNCTION 1 #define AVR32_SPI_SCK_0_0_PIN 15 #define AVR32_SPI_SCK_0_0_FUNCTION 0 #define AVR32_SPI_SCK_0_1_PIN 17 #define AVR32_SPI_SCK_0_1_FUNCTION 2 #include "avr32/spi_199.h" /* SSC */ /* SSC */ #define AVR32_SSC_ADDRESS 0xFFFF3400 #define AVR32_SSC (*((volatile avr32_ssc_t*)AVR32_SSC_ADDRESS)) #define AVR32_SSC_IRQ 416 #define AVR32_SSC_RX_CLOCK_0_0_PIN 38 #define AVR32_SSC_RX_CLOCK_0_0_FUNCTION 0 #define AVR32_SSC_RX_CLOCK_0_1_PIN 8 #define AVR32_SSC_RX_CLOCK_0_1_FUNCTION 3 #define AVR32_SSC_RX_CLOCK_0_2_PIN 13 #define AVR32_SSC_RX_CLOCK_0_2_FUNCTION 3 #define AVR32_SSC_RX_DATA_0_0_PIN 39 #define AVR32_SSC_RX_DATA_0_0_FUNCTION 0 #define AVR32_SSC_RX_DATA_0_1_PIN 11 #define AVR32_SSC_RX_DATA_0_1_FUNCTION 3 #define AVR32_SSC_RX_FRAME_SYNC_0_0_PIN 40 #define AVR32_SSC_RX_FRAME_SYNC_0_0_FUNCTION 0 #define AVR32_SSC_RX_FRAME_SYNC_0_1_PIN 7 #define AVR32_SSC_RX_FRAME_SYNC_0_1_FUNCTION 3 #define AVR32_SSC_RX_FRAME_SYNC_0_2_PIN 18 #define AVR32_SSC_RX_FRAME_SYNC_0_2_FUNCTION 3 #define AVR32_SSC_TX_CLOCK_0_0_PIN 41 #define AVR32_SSC_TX_CLOCK_0_0_FUNCTION 0 #define AVR32_SSC_TX_CLOCK_0_1_PIN 19 #define AVR32_SSC_TX_CLOCK_0_1_FUNCTION 3 #define AVR32_SSC_TX_DATA_0_0_PIN 42 #define AVR32_SSC_TX_DATA_0_0_FUNCTION 0 #define AVR32_SSC_TX_DATA_0_1_PIN 20 #define AVR32_SSC_TX_DATA_0_1_FUNCTION 3 #define AVR32_SSC_TX_FRAME_SYNC_0_0_PIN 43 #define AVR32_SSC_TX_FRAME_SYNC_0_0_FUNCTION 0 #define AVR32_SSC_TX_FRAME_SYNC_0_1_PIN 21 #define AVR32_SSC_TX_FRAME_SYNC_0_1_FUNCTION 3 //#include "avr32/ssc_310.h" /* TC */ /* TC */ #define AVR32_TC_ADDRESS 0xFFFF3800 #define AVR32_TC (*((volatile avr32_tc_t*)AVR32_TC_ADDRESS)) #define AVR32_TC_IRQ0 448 #define AVR32_TC_IRQ1 449 #define AVR32_TC_IRQ2 450 #define AVR32_TC_A0_0_0_PIN 32 #define AVR32_TC_A0_0_0_FUNCTION 0 #define AVR32_TC_A0_0_1_PIN 26 #define AVR32_TC_A0_0_1_FUNCTION 2 #define AVR32_TC_A1_0_0_PIN 21 #define AVR32_TC_A1_0_0_FUNCTION 1 #define AVR32_TC_A1_0_1_PIN 34 #define AVR32_TC_A1_0_1_FUNCTION 1 #define AVR32_TC_A2_0_0_PIN 11 #define AVR32_TC_A2_0_0_FUNCTION 1 #define AVR32_TC_A2_0_1_PIN 42 #define AVR32_TC_A2_0_1_FUNCTION 1 #define AVR32_TC_B0_0_0_PIN 33 #define AVR32_TC_B0_0_0_FUNCTION 0 #define AVR32_TC_B0_0_1_PIN 27 #define AVR32_TC_B0_0_1_FUNCTION 2 #define AVR32_TC_B1_0_0_PIN 22 #define AVR32_TC_B1_0_0_FUNCTION 1 #define AVR32_TC_B1_0_1_PIN 35 #define AVR32_TC_B1_0_1_FUNCTION 1 #define AVR32_TC_B2_0_0_PIN 12 #define AVR32_TC_B2_0_0_FUNCTION 1 #define AVR32_TC_B2_0_1_PIN 43 #define AVR32_TC_B2_0_1_FUNCTION 1 #define AVR32_TC_CLK0_0_0_PIN 29 #define AVR32_TC_CLK0_0_0_FUNCTION 0 #define AVR32_TC_CLK0_0_1_PIN 20 #define AVR32_TC_CLK0_0_1_FUNCTION 1 #define AVR32_TC_CLK1_0_0_PIN 16 #define AVR32_TC_CLK1_0_0_FUNCTION 1 #define AVR32_TC_CLK1_0_1_PIN 29 #define AVR32_TC_CLK1_0_1_FUNCTION 1 #define AVR32_TC_CLK2_0_0_PIN 17 #define AVR32_TC_CLK2_0_0_FUNCTION 1 #define AVR32_TC_CLK2_0_1_PIN 36 #define AVR32_TC_CLK2_0_1_FUNCTION 2 //#include "avr32/tc_222.h" /* TWI */ /* TWI */ #define AVR32_TWI_ADDRESS 0xFFFF2C00 #define AVR32_TWI (*((volatile avr32_twi_t*)AVR32_TWI_ADDRESS)) #define AVR32_TWI_IRQ 352 #define AVR32_TWI_SCL_0_0_PIN 9 #define AVR32_TWI_SCL_0_0_FUNCTION 0 #define AVR32_TWI_SCL_0_1_PIN 9 #define AVR32_TWI_SCL_INPUT_TEST_0_PIN 5 #define AVR32_TWI_SCL_OUTPUT_TEST_0_PIN 6 #define AVR32_TWI_SDA_0_0_PIN 10 #define AVR32_TWI_SDA_0_0_FUNCTION 0 #define AVR32_TWI_SDA_0_1_PIN 10 #define AVR32_TWI_SDA_INPUT_TEST_0_PIN 3 #define AVR32_TWI_SDA_OUTPUT_TEST_0_PIN 4 //#include "avr32/twi_211.h" /* USART */ /* USART0 */ #define AVR32_USART0_ADDRESS 0xFFFF1400 #define AVR32_USART0 (*((volatile avr32_usart_t*)AVR32_USART0_ADDRESS)) #define AVR32_USART0_IRQ 160 #define AVR32_USART0_CLK_0_0_PIN 28 #define AVR32_USART0_CLK_0_0_FUNCTION 0 #define AVR32_USART0_CLK_0_1_PIN 13 #define AVR32_USART0_CLK_0_1_FUNCTION 2 #define AVR32_USART0_CTS_0_PIN 12 #define AVR32_USART0_CTS_0_FUNCTION 0 #define AVR32_USART0_RTS_0_PIN 11 #define AVR32_USART0_RTS_0_FUNCTION 0 #define AVR32_USART0_RXD_0_0_PIN 18 #define AVR32_USART0_RXD_0_0_FUNCTION 0 #define AVR32_USART0_RXD_0_1_PIN 42 #define AVR32_USART0_RXD_0_1_FUNCTION 2 #define AVR32_USART0_TXD_0_0_PIN 19 #define AVR32_USART0_TXD_0_0_FUNCTION 0 #define AVR32_USART0_TXD_0_1_PIN 43 #define AVR32_USART0_TXD_0_1_FUNCTION 2 /* USART1 */ #define AVR32_USART1_ADDRESS 0xFFFF1800 #define AVR32_USART1 (*((volatile avr32_usart_t*)AVR32_USART1_ADDRESS)) #define AVR32_USART1_IRQ 192 #define AVR32_USART1_CLK_0_PIN 20 #define AVR32_USART1_CLK_0_FUNCTION 0 #define AVR32_USART1_CTS_0_0_PIN 36 #define AVR32_USART1_CTS_0_0_FUNCTION 0 #define AVR32_USART1_CTS_0_1_PIN 9 #define AVR32_USART1_CTS_0_1_FUNCTION 2 #define AVR32_USART1_DCD_0_0_PIN 38 #define AVR32_USART1_DCD_0_0_FUNCTION 1 #define AVR32_USART1_DCD_0_1_PIN 5 #define AVR32_USART1_DCD_0_1_FUNCTION 2 #define AVR32_USART1_DSR_0_0_PIN 39 #define AVR32_USART1_DSR_0_0_FUNCTION 1 #define AVR32_USART1_DSR_0_1_PIN 6 #define AVR32_USART1_DSR_0_1_FUNCTION 2 #define AVR32_USART1_DTR_0_0_PIN 40 #define AVR32_USART1_DTR_0_0_FUNCTION 1 #define AVR32_USART1_DTR_0_1_PIN 7 #define AVR32_USART1_DTR_0_1_FUNCTION 2 #define AVR32_USART1_RI_0_0_PIN 41 #define AVR32_USART1_RI_0_0_FUNCTION 1 #define AVR32_USART1_RI_0_1_PIN 8 #define AVR32_USART1_RI_0_1_FUNCTION 2 #define AVR32_USART1_RTS_0_0_PIN 37 #define AVR32_USART1_RTS_0_0_FUNCTION 0 #define AVR32_USART1_RTS_0_1_PIN 10 #define AVR32_USART1_RTS_0_1_FUNCTION 2 #define AVR32_USART1_RXD_0_0_PIN 24 #define AVR32_USART1_RXD_0_0_FUNCTION 0 #define AVR32_USART1_RXD_0_1_PIN 35 #define AVR32_USART1_RXD_0_1_FUNCTION 2 #define AVR32_USART1_RXD_0_2_PIN 17 #define AVR32_USART1_RXD_0_2_FUNCTION 3 #define AVR32_USART1_TXD_0_0_PIN 23 #define AVR32_USART1_TXD_0_0_FUNCTION 0 #define AVR32_USART1_TXD_0_1_PIN 34 #define AVR32_USART1_TXD_0_1_FUNCTION 2 #define AVR32_USART1_TXD_0_2_PIN 12 #define AVR32_USART1_TXD_0_2_FUNCTION 3 /* USART2 */ #define AVR32_USART2_ADDRESS 0xFFFF1C00 #define AVR32_USART2 (*((volatile avr32_usart_t*)AVR32_USART2_ADDRESS)) #define AVR32_USART2_IRQ 224 #define AVR32_USART2_CLK_0_PIN 15 #define AVR32_USART2_CLK_0_FUNCTION 2 #define AVR32_USART2_CTS_0_PIN 32 #define AVR32_USART2_CTS_0_FUNCTION 2 #define AVR32_USART2_RTS_0_PIN 33 #define AVR32_USART2_RTS_0_FUNCTION 2 #define AVR32_USART2_RXD_0_0_PIN 27 #define AVR32_USART2_RXD_0_0_FUNCTION 1 #define AVR32_USART2_RXD_0_1_PIN 20 #define AVR32_USART2_RXD_0_1_FUNCTION 2 #define AVR32_USART2_TXD_0_0_PIN 26 #define AVR32_USART2_TXD_0_0_FUNCTION 1 #define AVR32_USART2_TXD_0_1_PIN 21 #define AVR32_USART2_TXD_0_1_FUNCTION 2 //#include "avr32/usart_400.h" /* USBB */ /* USBB */ #define AVR32_USBB_ADDRESS 0xFFFE0000 #define AVR32_USBB (*((volatile avr32_usbb_t*)AVR32_USBB_ADDRESS)) #define AVR32_USBB_IRQ 544 #define AVR32_USBB_EPT_NUM 7 #define AVR32_USBB_ENABLE_TEST_0_PIN 22 #define AVR32_USBB_EOPN_TEST_0_PIN 23 #define AVR32_USBB_FS_TEST_0_PIN 5 #define AVR32_USBB_OEN_TEST_0_PIN 6 #define AVR32_USBB_ONN_TEST_0_PIN 7 #define AVR32_USBB_PDONDM_TEST_0_PIN 8 #define AVR32_USBB_PDONDP_TEST_0_PIN 9 #define AVR32_USBB_PUIDLE_TEST_0_PIN 10 #define AVR32_USBB_PUON_TEST_0_PIN 13 #define AVR32_USBB_RXDM_TEST_0_PIN 14 #define AVR32_USBB_RXDP_TEST_0_PIN 15 #define AVR32_USBB_RXD_TEST_0_PIN 16 #define AVR32_USBB_SESSVLD_TEST_0_PIN 17 #define AVR32_USBB_TXD_TEST_0_PIN 24 #define AVR32_USBB_USB_ID_0_0_PIN 26 #define AVR32_USBB_USB_ID_0_0_FUNCTION 0 #define AVR32_USBB_USB_ID_0_1_PIN 3 #define AVR32_USBB_USB_ID_0_1_FUNCTION 2 #define AVR32_USBB_USB_VBOF_0_0_PIN 27 #define AVR32_USBB_USB_VBOF_0_0_FUNCTION 0 #define AVR32_USBB_USB_VBOF_0_1_PIN 4 #define AVR32_USBB_USB_VBOF_0_1_FUNCTION 2 #define AVR32_USBB_VAVBUSVLD_TEST_0_PIN 19 #define AVR32_USBB_VBUSDISCHARGE_TEST_0_PIN 20 #define AVR32_USBB_VBUSPULSING_TEST_0_PIN 21 //#include "avr32/usbb_3101.h" /* WDT */ /* WDT */ #define AVR32_WDT_ADDRESS 0xFFFF0D30 #define AVR32_WDT (*((volatile avr32_wdt_t*)AVR32_WDT_ADDRESS)) #define AVR32_WDT_WDTEXTRST_MSB 1 //#include "avr32/wdt_2311.h" /* PAD->GPIO bits mapping */ #define AVR32_PIN_PA03 3 #define AVR32_PIN_PA04 4 #define AVR32_PIN_PA05 5 #define AVR32_PIN_PA06 6 #define AVR32_PIN_PA07 7 #define AVR32_PIN_PA08 8 #define AVR32_PIN_PA09 9 #define AVR32_PIN_PA10 10 #define AVR32_PIN_PA11 11 #define AVR32_PIN_PA12 12 #define AVR32_PIN_PA13 13 #define AVR32_PIN_PA14 14 #define AVR32_PIN_PA15 15 #define AVR32_PIN_PA16 16 #define AVR32_PIN_PA17 17 #define AVR32_PIN_PA18 18 #define AVR32_PIN_PA19 19 #define AVR32_PIN_PA20 20 #define AVR32_PIN_PA21 21 #define AVR32_PIN_PA22 22 #define AVR32_PIN_PA23 23 #define AVR32_PIN_PA24 24 #define AVR32_PIN_PA25 25 #define AVR32_PIN_PA26 26 #define AVR32_PIN_PA27 27 #define AVR32_PIN_PA28 28 #define AVR32_PIN_PA29 29 #define AVR32_PIN_PA30 30 #define AVR32_PIN_PA31 31 #define AVR32_PIN_PB00 32 #define AVR32_PIN_PB01 33 #define AVR32_PIN_PB02 34 #define AVR32_PIN_PB03 35 #define AVR32_PIN_PB04 36 #define AVR32_PIN_PB05 37 #define AVR32_PIN_PB06 38 #define AVR32_PIN_PB07 39 #define AVR32_PIN_PB08 40 #define AVR32_PIN_PB09 41 #define AVR32_PIN_PB10 42 #define AVR32_PIN_PB11 43 #define AVR32_PIN_TDI 0 #define AVR32_PIN_TDO 1 #define AVR32_PIN_TMS 2 /* #ifndef AVR32_UC3B0512_H_INCLUDED */ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/usart_400.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 : UC3A0512 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_USART_400_H_INCLUDED #define AVR32_USART_400_H_INCLUDED #define AVR32_USART_H_VERSION 400 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_USART_ - Bitfield mask: AVR32_USART__ - Bitfield offset: AVR32_USART___OFFSET - Bitfield size: AVR32_USART___SIZE - Bitfield values: AVR32_USART___ 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_USART_ - Bitfield offset: AVR32_USART__OFFSET - Bitfield size: AVR32_USART__SIZE - Bitfield values: AVR32_USART__ - Bitfield values: AVR32_USART_ All defines are sorted alphabetically. */ #define AVR32_USART_1 0x00000000 #define AVR32_USART_1_5 0x00000001 #define AVR32_USART_2 0x00000002 #define AVR32_USART_5 0x00000000 #define AVR32_USART_6 0x00000001 #define AVR32_USART_7 0x00000002 #define AVR32_USART_8 0x00000003 #define AVR32_USART_BRGR 0x00000020 #define AVR32_USART_BRGR_CD 0 #define AVR32_USART_BRGR_CD_BYPASS 0x00000001 #define AVR32_USART_BRGR_CD_DISABLE 0x00000000 #define AVR32_USART_BRGR_CD_MASK 0x0000ffff #define AVR32_USART_BRGR_CD_OFFSET 0 #define AVR32_USART_BRGR_CD_SIZE 16 #define AVR32_USART_BRGR_FP 16 #define AVR32_USART_BRGR_FP_MASK 0x00070000 #define AVR32_USART_BRGR_FP_OFFSET 16 #define AVR32_USART_BRGR_FP_SIZE 3 #define AVR32_USART_BYPASS 0x00000001 #define AVR32_USART_CD 0 #define AVR32_USART_CD_BYPASS 0x00000001 #define AVR32_USART_CD_DISABLE 0x00000000 #define AVR32_USART_CD_MASK 0x0000ffff #define AVR32_USART_CD_OFFSET 0 #define AVR32_USART_CD_SIZE 16 #define AVR32_USART_CHKDIS 3 #define AVR32_USART_CHKDIS_MASK 0x00000008 #define AVR32_USART_CHKDIS_OFFSET 3 #define AVR32_USART_CHKDIS_SIZE 1 #define AVR32_USART_CHKTYP 4 #define AVR32_USART_CHKTYP_MASK 0x00000010 #define AVR32_USART_CHKTYP_OFFSET 4 #define AVR32_USART_CHKTYP_SIZE 1 #define AVR32_USART_CHMODE 14 #define AVR32_USART_CHMODE_ECHO 0x00000001 #define AVR32_USART_CHMODE_LOCAL_LOOP 0x00000002 #define AVR32_USART_CHMODE_MASK 0x0000c000 #define AVR32_USART_CHMODE_NORMAL 0x00000000 #define AVR32_USART_CHMODE_OFFSET 14 #define AVR32_USART_CHMODE_REMOTE_LOOP 0x00000003 #define AVR32_USART_CHMODE_SIZE 2 #define AVR32_USART_CHRL 6 #define AVR32_USART_CHRL_5 0x00000000 #define AVR32_USART_CHRL_6 0x00000001 #define AVR32_USART_CHRL_7 0x00000002 #define AVR32_USART_CHRL_8 0x00000003 #define AVR32_USART_CHRL_MASK 0x000000c0 #define AVR32_USART_CHRL_OFFSET 6 #define AVR32_USART_CHRL_SIZE 2 #define AVR32_USART_CLKO 18 #define AVR32_USART_CLKO_MASK 0x00040000 #define AVR32_USART_CLKO_OFFSET 18 #define AVR32_USART_CLKO_SIZE 1 #define AVR32_USART_COMM_RX 31 #define AVR32_USART_COMM_RX_MASK 0x80000000 #define AVR32_USART_COMM_RX_OFFSET 31 #define AVR32_USART_COMM_RX_SIZE 1 #define AVR32_USART_COMM_TX 30 #define AVR32_USART_COMM_TX_MASK 0x40000000 #define AVR32_USART_COMM_TX_OFFSET 30 #define AVR32_USART_COMM_TX_SIZE 1 #define AVR32_USART_CR 0x00000000 #define AVR32_USART_CR_COMM_RX 31 #define AVR32_USART_CR_COMM_RX_MASK 0x80000000 #define AVR32_USART_CR_COMM_RX_OFFSET 31 #define AVR32_USART_CR_COMM_RX_SIZE 1 #define AVR32_USART_CR_COMM_TX 30 #define AVR32_USART_CR_COMM_TX_MASK 0x40000000 #define AVR32_USART_CR_COMM_TX_OFFSET 30 #define AVR32_USART_CR_COMM_TX_SIZE 1 #define AVR32_USART_CR_DTRDIS 17 #define AVR32_USART_CR_DTRDIS_MASK 0x00020000 #define AVR32_USART_CR_DTRDIS_OFFSET 17 #define AVR32_USART_CR_DTRDIS_SIZE 1 #define AVR32_USART_CR_DTREN 16 #define AVR32_USART_CR_DTREN_MASK 0x00010000 #define AVR32_USART_CR_DTREN_OFFSET 16 #define AVR32_USART_CR_DTREN_SIZE 1 #define AVR32_USART_CR_LINABT 20 #define AVR32_USART_CR_LINABT_MASK 0x00100000 #define AVR32_USART_CR_LINABT_OFFSET 20 #define AVR32_USART_CR_LINABT_SIZE 1 #define AVR32_USART_CR_LINWKUP 21 #define AVR32_USART_CR_LINWKUP_MASK 0x00200000 #define AVR32_USART_CR_LINWKUP_OFFSET 21 #define AVR32_USART_CR_LINWKUP_SIZE 1 #define AVR32_USART_CR_RETTO 15 #define AVR32_USART_CR_RETTO_MASK 0x00008000 #define AVR32_USART_CR_RETTO_OFFSET 15 #define AVR32_USART_CR_RETTO_SIZE 1 #define AVR32_USART_CR_RSTIT 13 #define AVR32_USART_CR_RSTIT_MASK 0x00002000 #define AVR32_USART_CR_RSTIT_OFFSET 13 #define AVR32_USART_CR_RSTIT_SIZE 1 #define AVR32_USART_CR_RSTNACK 14 #define AVR32_USART_CR_RSTNACK_MASK 0x00004000 #define AVR32_USART_CR_RSTNACK_OFFSET 14 #define AVR32_USART_CR_RSTNACK_SIZE 1 #define AVR32_USART_CR_RSTRX 2 #define AVR32_USART_CR_RSTRX_MASK 0x00000004 #define AVR32_USART_CR_RSTRX_OFFSET 2 #define AVR32_USART_CR_RSTRX_SIZE 1 #define AVR32_USART_CR_RSTSTA 8 #define AVR32_USART_CR_RSTSTA_MASK 0x00000100 #define AVR32_USART_CR_RSTSTA_OFFSET 8 #define AVR32_USART_CR_RSTSTA_SIZE 1 #define AVR32_USART_CR_RSTTX 3 #define AVR32_USART_CR_RSTTX_MASK 0x00000008 #define AVR32_USART_CR_RSTTX_OFFSET 3 #define AVR32_USART_CR_RSTTX_SIZE 1 #define AVR32_USART_CR_RTSDIS 19 #define AVR32_USART_CR_RTSDIS_MASK 0x00080000 #define AVR32_USART_CR_RTSDIS_OFFSET 19 #define AVR32_USART_CR_RTSDIS_SIZE 1 #define AVR32_USART_CR_RTSEN 18 #define AVR32_USART_CR_RTSEN_MASK 0x00040000 #define AVR32_USART_CR_RTSEN_OFFSET 18 #define AVR32_USART_CR_RTSEN_SIZE 1 #define AVR32_USART_CR_RXDIS 5 #define AVR32_USART_CR_RXDIS_MASK 0x00000020 #define AVR32_USART_CR_RXDIS_OFFSET 5 #define AVR32_USART_CR_RXDIS_SIZE 1 #define AVR32_USART_CR_RXEN 4 #define AVR32_USART_CR_RXEN_MASK 0x00000010 #define AVR32_USART_CR_RXEN_OFFSET 4 #define AVR32_USART_CR_RXEN_SIZE 1 #define AVR32_USART_CR_SENDA 12 #define AVR32_USART_CR_SENDA_MASK 0x00001000 #define AVR32_USART_CR_SENDA_OFFSET 12 #define AVR32_USART_CR_SENDA_SIZE 1 #define AVR32_USART_CR_STPBRK 10 #define AVR32_USART_CR_STPBRK_MASK 0x00000400 #define AVR32_USART_CR_STPBRK_OFFSET 10 #define AVR32_USART_CR_STPBRK_SIZE 1 #define AVR32_USART_CR_STTBRK 9 #define AVR32_USART_CR_STTBRK_MASK 0x00000200 #define AVR32_USART_CR_STTBRK_OFFSET 9 #define AVR32_USART_CR_STTBRK_SIZE 1 #define AVR32_USART_CR_STTTO 11 #define AVR32_USART_CR_STTTO_MASK 0x00000800 #define AVR32_USART_CR_STTTO_OFFSET 11 #define AVR32_USART_CR_STTTO_SIZE 1 #define AVR32_USART_CR_TXDIS 7 #define AVR32_USART_CR_TXDIS_MASK 0x00000080 #define AVR32_USART_CR_TXDIS_OFFSET 7 #define AVR32_USART_CR_TXDIS_SIZE 1 #define AVR32_USART_CR_TXEN 6 #define AVR32_USART_CR_TXEN_MASK 0x00000040 #define AVR32_USART_CR_TXEN_OFFSET 6 #define AVR32_USART_CR_TXEN_SIZE 1 #define AVR32_USART_CSR 0x00000014 #define AVR32_USART_CSR_COMM_RX 31 #define AVR32_USART_CSR_COMM_RX_MASK 0x80000000 #define AVR32_USART_CSR_COMM_RX_OFFSET 31 #define AVR32_USART_CSR_COMM_RX_SIZE 1 #define AVR32_USART_CSR_COMM_TX 30 #define AVR32_USART_CSR_COMM_TX_MASK 0x40000000 #define AVR32_USART_CSR_COMM_TX_OFFSET 30 #define AVR32_USART_CSR_COMM_TX_SIZE 1 #define AVR32_USART_CSR_CTS 23 #define AVR32_USART_CSR_CTSIC 19 #define AVR32_USART_CSR_CTSIC_MASK 0x00080000 #define AVR32_USART_CSR_CTSIC_OFFSET 19 #define AVR32_USART_CSR_CTSIC_SIZE 1 #define AVR32_USART_CSR_CTS_MASK 0x00800000 #define AVR32_USART_CSR_CTS_OFFSET 23 #define AVR32_USART_CSR_CTS_SIZE 1 #define AVR32_USART_CSR_DCD 22 #define AVR32_USART_CSR_DCDIC 18 #define AVR32_USART_CSR_DCDIC_MASK 0x00040000 #define AVR32_USART_CSR_DCDIC_OFFSET 18 #define AVR32_USART_CSR_DCDIC_SIZE 1 #define AVR32_USART_CSR_DCD_MASK 0x00400000 #define AVR32_USART_CSR_DCD_OFFSET 22 #define AVR32_USART_CSR_DCD_SIZE 1 #define AVR32_USART_CSR_DSR 21 #define AVR32_USART_CSR_DSRIC 17 #define AVR32_USART_CSR_DSRIC_MASK 0x00020000 #define AVR32_USART_CSR_DSRIC_OFFSET 17 #define AVR32_USART_CSR_DSRIC_SIZE 1 #define AVR32_USART_CSR_DSR_MASK 0x00200000 #define AVR32_USART_CSR_DSR_OFFSET 21 #define AVR32_USART_CSR_DSR_SIZE 1 #define AVR32_USART_CSR_ENDRX 3 #define AVR32_USART_CSR_ENDRX_MASK 0x00000008 #define AVR32_USART_CSR_ENDRX_OFFSET 3 #define AVR32_USART_CSR_ENDRX_SIZE 1 #define AVR32_USART_CSR_ENDTX 4 #define AVR32_USART_CSR_ENDTX_MASK 0x00000010 #define AVR32_USART_CSR_ENDTX_OFFSET 4 #define AVR32_USART_CSR_ENDTX_SIZE 1 #define AVR32_USART_CSR_FRAME 6 #define AVR32_USART_CSR_FRAME_MASK 0x00000040 #define AVR32_USART_CSR_FRAME_OFFSET 6 #define AVR32_USART_CSR_FRAME_SIZE 1 #define AVR32_USART_CSR_ITERATION 10 #define AVR32_USART_CSR_ITERATION_MASK 0x00000400 #define AVR32_USART_CSR_ITERATION_OFFSET 10 #define AVR32_USART_CSR_ITERATION_SIZE 1 #define AVR32_USART_CSR_LINBE 25 #define AVR32_USART_CSR_LINBE_MASK 0x02000000 #define AVR32_USART_CSR_LINBE_OFFSET 25 #define AVR32_USART_CSR_LINBE_SIZE 1 #define AVR32_USART_CSR_LINCE 28 #define AVR32_USART_CSR_LINCE_MASK 0x10000000 #define AVR32_USART_CSR_LINCE_OFFSET 28 #define AVR32_USART_CSR_LINCE_SIZE 1 #define AVR32_USART_CSR_LINIPE 27 #define AVR32_USART_CSR_LINIPE_MASK 0x08000000 #define AVR32_USART_CSR_LINIPE_OFFSET 27 #define AVR32_USART_CSR_LINIPE_SIZE 1 #define AVR32_USART_CSR_LINIR 14 #define AVR32_USART_CSR_LINIR_MASK 0x00004000 #define AVR32_USART_CSR_LINIR_OFFSET 14 #define AVR32_USART_CSR_LINIR_SIZE 1 #define AVR32_USART_CSR_LINISFE 26 #define AVR32_USART_CSR_LINISFE_MASK 0x04000000 #define AVR32_USART_CSR_LINISFE_OFFSET 26 #define AVR32_USART_CSR_LINISFE_SIZE 1 #define AVR32_USART_CSR_LINSNRE 29 #define AVR32_USART_CSR_LINSNRE_MASK 0x20000000 #define AVR32_USART_CSR_LINSNRE_OFFSET 29 #define AVR32_USART_CSR_LINSNRE_SIZE 1 #define AVR32_USART_CSR_LINTC 15 #define AVR32_USART_CSR_LINTC_MASK 0x00008000 #define AVR32_USART_CSR_LINTC_OFFSET 15 #define AVR32_USART_CSR_LINTC_SIZE 1 #define AVR32_USART_CSR_MANERR 24 #define AVR32_USART_CSR_MANERR_MASK 0x01000000 #define AVR32_USART_CSR_MANERR_OFFSET 24 #define AVR32_USART_CSR_MANERR_SIZE 1 #define AVR32_USART_CSR_NACK 13 #define AVR32_USART_CSR_NACK_MASK 0x00002000 #define AVR32_USART_CSR_NACK_OFFSET 13 #define AVR32_USART_CSR_NACK_SIZE 1 #define AVR32_USART_CSR_OVRE 5 #define AVR32_USART_CSR_OVRE_MASK 0x00000020 #define AVR32_USART_CSR_OVRE_OFFSET 5 #define AVR32_USART_CSR_OVRE_SIZE 1 #define AVR32_USART_CSR_PARE 7 #define AVR32_USART_CSR_PARE_MASK 0x00000080 #define AVR32_USART_CSR_PARE_OFFSET 7 #define AVR32_USART_CSR_PARE_SIZE 1 #define AVR32_USART_CSR_RI 20 #define AVR32_USART_CSR_RIIC 16 #define AVR32_USART_CSR_RIIC_MASK 0x00010000 #define AVR32_USART_CSR_RIIC_OFFSET 16 #define AVR32_USART_CSR_RIIC_SIZE 1 #define AVR32_USART_CSR_RI_MASK 0x00100000 #define AVR32_USART_CSR_RI_OFFSET 20 #define AVR32_USART_CSR_RI_SIZE 1 #define AVR32_USART_CSR_RXBRK 2 #define AVR32_USART_CSR_RXBRK_MASK 0x00000004 #define AVR32_USART_CSR_RXBRK_OFFSET 2 #define AVR32_USART_CSR_RXBRK_SIZE 1 #define AVR32_USART_CSR_RXBUFF 12 #define AVR32_USART_CSR_RXBUFF_MASK 0x00001000 #define AVR32_USART_CSR_RXBUFF_OFFSET 12 #define AVR32_USART_CSR_RXBUFF_SIZE 1 #define AVR32_USART_CSR_RXRDY 0 #define AVR32_USART_CSR_RXRDY_MASK 0x00000001 #define AVR32_USART_CSR_RXRDY_OFFSET 0 #define AVR32_USART_CSR_RXRDY_SIZE 1 #define AVR32_USART_CSR_TIMEOUT 8 #define AVR32_USART_CSR_TIMEOUT_MASK 0x00000100 #define AVR32_USART_CSR_TIMEOUT_OFFSET 8 #define AVR32_USART_CSR_TIMEOUT_SIZE 1 #define AVR32_USART_CSR_TXBUFE 11 #define AVR32_USART_CSR_TXBUFE_MASK 0x00000800 #define AVR32_USART_CSR_TXBUFE_OFFSET 11 #define AVR32_USART_CSR_TXBUFE_SIZE 1 #define AVR32_USART_CSR_TXEMPTY 9 #define AVR32_USART_CSR_TXEMPTY_MASK 0x00000200 #define AVR32_USART_CSR_TXEMPTY_OFFSET 9 #define AVR32_USART_CSR_TXEMPTY_SIZE 1 #define AVR32_USART_CSR_TXRDY 1 #define AVR32_USART_CSR_TXRDY_MASK 0x00000002 #define AVR32_USART_CSR_TXRDY_OFFSET 1 #define AVR32_USART_CSR_TXRDY_SIZE 1 #define AVR32_USART_CTS 23 #define AVR32_USART_CTSIC 19 #define AVR32_USART_CTSIC_MASK 0x00080000 #define AVR32_USART_CTSIC_OFFSET 19 #define AVR32_USART_CTSIC_SIZE 1 #define AVR32_USART_CTS_MASK 0x00800000 #define AVR32_USART_CTS_OFFSET 23 #define AVR32_USART_CTS_SIZE 1 #define AVR32_USART_DCD 22 #define AVR32_USART_DCDIC 18 #define AVR32_USART_DCDIC_MASK 0x00040000 #define AVR32_USART_DCDIC_OFFSET 18 #define AVR32_USART_DCDIC_SIZE 1 #define AVR32_USART_DCD_MASK 0x00400000 #define AVR32_USART_DCD_OFFSET 22 #define AVR32_USART_DCD_SIZE 1 #define AVR32_USART_DISABLE 0x00000000 #define AVR32_USART_DLC 8 #define AVR32_USART_DLC_MASK 0x0000ff00 #define AVR32_USART_DLC_OFFSET 8 #define AVR32_USART_DLC_SIZE 8 #define AVR32_USART_DLM 5 #define AVR32_USART_DLM_MASK 0x00000020 #define AVR32_USART_DLM_OFFSET 5 #define AVR32_USART_DLM_SIZE 1 #define AVR32_USART_DRIFT 30 #define AVR32_USART_DRIFT_MASK 0x40000000 #define AVR32_USART_DRIFT_OFFSET 30 #define AVR32_USART_DRIFT_SIZE 1 #define AVR32_USART_DSNACK 21 #define AVR32_USART_DSNACK_MASK 0x00200000 #define AVR32_USART_DSNACK_OFFSET 21 #define AVR32_USART_DSNACK_SIZE 1 #define AVR32_USART_DSR 21 #define AVR32_USART_DSRIC 17 #define AVR32_USART_DSRIC_MASK 0x00020000 #define AVR32_USART_DSRIC_OFFSET 17 #define AVR32_USART_DSRIC_SIZE 1 #define AVR32_USART_DSR_MASK 0x00200000 #define AVR32_USART_DSR_OFFSET 21 #define AVR32_USART_DSR_SIZE 1 #define AVR32_USART_DTRDIS 17 #define AVR32_USART_DTRDIS_MASK 0x00020000 #define AVR32_USART_DTRDIS_OFFSET 17 #define AVR32_USART_DTRDIS_SIZE 1 #define AVR32_USART_DTREN 16 #define AVR32_USART_DTREN_MASK 0x00010000 #define AVR32_USART_DTREN_OFFSET 16 #define AVR32_USART_DTREN_SIZE 1 #define AVR32_USART_ECHO 0x00000001 #define AVR32_USART_ENDRX 3 #define AVR32_USART_ENDRX_MASK 0x00000008 #define AVR32_USART_ENDRX_OFFSET 3 #define AVR32_USART_ENDRX_SIZE 1 #define AVR32_USART_ENDTX 4 #define AVR32_USART_ENDTX_MASK 0x00000010 #define AVR32_USART_ENDTX_OFFSET 4 #define AVR32_USART_ENDTX_SIZE 1 #define AVR32_USART_EVEN 0x00000000 #define AVR32_USART_FIDI 0x00000040 #define AVR32_USART_FIDI_FI_DI_RATIO 0 #define AVR32_USART_FIDI_FI_DI_RATIO_DISABLE 0x00000000 #define AVR32_USART_FIDI_FI_DI_RATIO_MASK 0x000007ff #define AVR32_USART_FIDI_FI_DI_RATIO_OFFSET 0 #define AVR32_USART_FIDI_FI_DI_RATIO_SIZE 11 #define AVR32_USART_FILTER 28 #define AVR32_USART_FILTER_MASK 0x10000000 #define AVR32_USART_FILTER_OFFSET 28 #define AVR32_USART_FILTER_SIZE 1 #define AVR32_USART_FI_DI_RATIO 0 #define AVR32_USART_FI_DI_RATIO_DISABLE 0x00000000 #define AVR32_USART_FI_DI_RATIO_MASK 0x000007ff #define AVR32_USART_FI_DI_RATIO_OFFSET 0 #define AVR32_USART_FI_DI_RATIO_SIZE 11 #define AVR32_USART_FP 16 #define AVR32_USART_FP_MASK 0x00070000 #define AVR32_USART_FP_OFFSET 16 #define AVR32_USART_FP_SIZE 3 #define AVR32_USART_FRAME 6 #define AVR32_USART_FRAME_MASK 0x00000040 #define AVR32_USART_FRAME_OFFSET 6 #define AVR32_USART_FRAME_SIZE 1 #define AVR32_USART_FSDIS 6 #define AVR32_USART_FSDIS_MASK 0x00000040 #define AVR32_USART_FSDIS_OFFSET 6 #define AVR32_USART_FSDIS_SIZE 1 #define AVR32_USART_HARDWARE 0x00000002 #define AVR32_USART_IDCHR 0 #define AVR32_USART_IDCHR_MASK 0x000000ff #define AVR32_USART_IDCHR_OFFSET 0 #define AVR32_USART_IDCHR_SIZE 8 #define AVR32_USART_IDR 0x0000000c #define AVR32_USART_IDR_COMM_RX 31 #define AVR32_USART_IDR_COMM_RX_MASK 0x80000000 #define AVR32_USART_IDR_COMM_RX_OFFSET 31 #define AVR32_USART_IDR_COMM_RX_SIZE 1 #define AVR32_USART_IDR_COMM_TX 30 #define AVR32_USART_IDR_COMM_TX_MASK 0x40000000 #define AVR32_USART_IDR_COMM_TX_OFFSET 30 #define AVR32_USART_IDR_COMM_TX_SIZE 1 #define AVR32_USART_IDR_CTSIC 19 #define AVR32_USART_IDR_CTSIC_MASK 0x00080000 #define AVR32_USART_IDR_CTSIC_OFFSET 19 #define AVR32_USART_IDR_CTSIC_SIZE 1 #define AVR32_USART_IDR_DCDIC 18 #define AVR32_USART_IDR_DCDIC_MASK 0x00040000 #define AVR32_USART_IDR_DCDIC_OFFSET 18 #define AVR32_USART_IDR_DCDIC_SIZE 1 #define AVR32_USART_IDR_DSRIC 17 #define AVR32_USART_IDR_DSRIC_MASK 0x00020000 #define AVR32_USART_IDR_DSRIC_OFFSET 17 #define AVR32_USART_IDR_DSRIC_SIZE 1 #define AVR32_USART_IDR_ENDRX 3 #define AVR32_USART_IDR_ENDRX_MASK 0x00000008 #define AVR32_USART_IDR_ENDRX_OFFSET 3 #define AVR32_USART_IDR_ENDRX_SIZE 1 #define AVR32_USART_IDR_ENDTX 4 #define AVR32_USART_IDR_ENDTX_MASK 0x00000010 #define AVR32_USART_IDR_ENDTX_OFFSET 4 #define AVR32_USART_IDR_ENDTX_SIZE 1 #define AVR32_USART_IDR_FRAME 6 #define AVR32_USART_IDR_FRAME_MASK 0x00000040 #define AVR32_USART_IDR_FRAME_OFFSET 6 #define AVR32_USART_IDR_FRAME_SIZE 1 #define AVR32_USART_IDR_ITERATION 10 #define AVR32_USART_IDR_ITERATION_MASK 0x00000400 #define AVR32_USART_IDR_ITERATION_OFFSET 10 #define AVR32_USART_IDR_ITERATION_SIZE 1 #define AVR32_USART_IDR_LINBE 25 #define AVR32_USART_IDR_LINBE_MASK 0x02000000 #define AVR32_USART_IDR_LINBE_OFFSET 25 #define AVR32_USART_IDR_LINBE_SIZE 1 #define AVR32_USART_IDR_LINCE 28 #define AVR32_USART_IDR_LINCE_MASK 0x10000000 #define AVR32_USART_IDR_LINCE_OFFSET 28 #define AVR32_USART_IDR_LINCE_SIZE 1 #define AVR32_USART_IDR_LINIPE 27 #define AVR32_USART_IDR_LINIPE_MASK 0x08000000 #define AVR32_USART_IDR_LINIPE_OFFSET 27 #define AVR32_USART_IDR_LINIPE_SIZE 1 #define AVR32_USART_IDR_LINIR 14 #define AVR32_USART_IDR_LINIR_MASK 0x00004000 #define AVR32_USART_IDR_LINIR_OFFSET 14 #define AVR32_USART_IDR_LINIR_SIZE 1 #define AVR32_USART_IDR_LINISFE 26 #define AVR32_USART_IDR_LINISFE_MASK 0x04000000 #define AVR32_USART_IDR_LINISFE_OFFSET 26 #define AVR32_USART_IDR_LINISFE_SIZE 1 #define AVR32_USART_IDR_LINSNRE 29 #define AVR32_USART_IDR_LINSNRE_MASK 0x20000000 #define AVR32_USART_IDR_LINSNRE_OFFSET 29 #define AVR32_USART_IDR_LINSNRE_SIZE 1 #define AVR32_USART_IDR_LINTC 15 #define AVR32_USART_IDR_LINTC_MASK 0x00008000 #define AVR32_USART_IDR_LINTC_OFFSET 15 #define AVR32_USART_IDR_LINTC_SIZE 1 #define AVR32_USART_IDR_MANE 24 #define AVR32_USART_IDR_MANE_MASK 0x01000000 #define AVR32_USART_IDR_MANE_OFFSET 24 #define AVR32_USART_IDR_MANE_SIZE 1 #define AVR32_USART_IDR_NACK 13 #define AVR32_USART_IDR_NACK_MASK 0x00002000 #define AVR32_USART_IDR_NACK_OFFSET 13 #define AVR32_USART_IDR_NACK_SIZE 1 #define AVR32_USART_IDR_OVRE 5 #define AVR32_USART_IDR_OVRE_MASK 0x00000020 #define AVR32_USART_IDR_OVRE_OFFSET 5 #define AVR32_USART_IDR_OVRE_SIZE 1 #define AVR32_USART_IDR_PARE 7 #define AVR32_USART_IDR_PARE_MASK 0x00000080 #define AVR32_USART_IDR_PARE_OFFSET 7 #define AVR32_USART_IDR_PARE_SIZE 1 #define AVR32_USART_IDR_RIIC 16 #define AVR32_USART_IDR_RIIC_MASK 0x00010000 #define AVR32_USART_IDR_RIIC_OFFSET 16 #define AVR32_USART_IDR_RIIC_SIZE 1 #define AVR32_USART_IDR_RXBRK 2 #define AVR32_USART_IDR_RXBRK_MASK 0x00000004 #define AVR32_USART_IDR_RXBRK_OFFSET 2 #define AVR32_USART_IDR_RXBRK_SIZE 1 #define AVR32_USART_IDR_RXBUFF 12 #define AVR32_USART_IDR_RXBUFF_MASK 0x00001000 #define AVR32_USART_IDR_RXBUFF_OFFSET 12 #define AVR32_USART_IDR_RXBUFF_SIZE 1 #define AVR32_USART_IDR_RXRDY 0 #define AVR32_USART_IDR_RXRDY_MASK 0x00000001 #define AVR32_USART_IDR_RXRDY_OFFSET 0 #define AVR32_USART_IDR_RXRDY_SIZE 1 #define AVR32_USART_IDR_TIMEOUT 8 #define AVR32_USART_IDR_TIMEOUT_MASK 0x00000100 #define AVR32_USART_IDR_TIMEOUT_OFFSET 8 #define AVR32_USART_IDR_TIMEOUT_SIZE 1 #define AVR32_USART_IDR_TXBUFE 11 #define AVR32_USART_IDR_TXBUFE_MASK 0x00000800 #define AVR32_USART_IDR_TXBUFE_OFFSET 11 #define AVR32_USART_IDR_TXBUFE_SIZE 1 #define AVR32_USART_IDR_TXEMPTY 9 #define AVR32_USART_IDR_TXEMPTY_MASK 0x00000200 #define AVR32_USART_IDR_TXEMPTY_OFFSET 9 #define AVR32_USART_IDR_TXEMPTY_SIZE 1 #define AVR32_USART_IDR_TXRDY 1 #define AVR32_USART_IDR_TXRDY_MASK 0x00000002 #define AVR32_USART_IDR_TXRDY_OFFSET 1 #define AVR32_USART_IDR_TXRDY_SIZE 1 #define AVR32_USART_IER 0x00000008 #define AVR32_USART_IER_COMM_RX 31 #define AVR32_USART_IER_COMM_RX_MASK 0x80000000 #define AVR32_USART_IER_COMM_RX_OFFSET 31 #define AVR32_USART_IER_COMM_RX_SIZE 1 #define AVR32_USART_IER_COMM_TX 30 #define AVR32_USART_IER_COMM_TX_MASK 0x40000000 #define AVR32_USART_IER_COMM_TX_OFFSET 30 #define AVR32_USART_IER_COMM_TX_SIZE 1 #define AVR32_USART_IER_CTSIC 19 #define AVR32_USART_IER_CTSIC_MASK 0x00080000 #define AVR32_USART_IER_CTSIC_OFFSET 19 #define AVR32_USART_IER_CTSIC_SIZE 1 #define AVR32_USART_IER_DCDIC 18 #define AVR32_USART_IER_DCDIC_MASK 0x00040000 #define AVR32_USART_IER_DCDIC_OFFSET 18 #define AVR32_USART_IER_DCDIC_SIZE 1 #define AVR32_USART_IER_DSRIC 17 #define AVR32_USART_IER_DSRIC_MASK 0x00020000 #define AVR32_USART_IER_DSRIC_OFFSET 17 #define AVR32_USART_IER_DSRIC_SIZE 1 #define AVR32_USART_IER_ENDRX 3 #define AVR32_USART_IER_ENDRX_MASK 0x00000008 #define AVR32_USART_IER_ENDRX_OFFSET 3 #define AVR32_USART_IER_ENDRX_SIZE 1 #define AVR32_USART_IER_ENDTX 4 #define AVR32_USART_IER_ENDTX_MASK 0x00000010 #define AVR32_USART_IER_ENDTX_OFFSET 4 #define AVR32_USART_IER_ENDTX_SIZE 1 #define AVR32_USART_IER_FRAME 6 #define AVR32_USART_IER_FRAME_MASK 0x00000040 #define AVR32_USART_IER_FRAME_OFFSET 6 #define AVR32_USART_IER_FRAME_SIZE 1 #define AVR32_USART_IER_ITERATION 10 #define AVR32_USART_IER_ITERATION_MASK 0x00000400 #define AVR32_USART_IER_ITERATION_OFFSET 10 #define AVR32_USART_IER_ITERATION_SIZE 1 #define AVR32_USART_IER_LINBE 25 #define AVR32_USART_IER_LINBE_MASK 0x02000000 #define AVR32_USART_IER_LINBE_OFFSET 25 #define AVR32_USART_IER_LINBE_SIZE 1 #define AVR32_USART_IER_LINCE 28 #define AVR32_USART_IER_LINCE_MASK 0x10000000 #define AVR32_USART_IER_LINCE_OFFSET 28 #define AVR32_USART_IER_LINCE_SIZE 1 #define AVR32_USART_IER_LINIPE 27 #define AVR32_USART_IER_LINIPE_MASK 0x08000000 #define AVR32_USART_IER_LINIPE_OFFSET 27 #define AVR32_USART_IER_LINIPE_SIZE 1 #define AVR32_USART_IER_LINIR 14 #define AVR32_USART_IER_LINIR_MASK 0x00004000 #define AVR32_USART_IER_LINIR_OFFSET 14 #define AVR32_USART_IER_LINIR_SIZE 1 #define AVR32_USART_IER_LINISFE 26 #define AVR32_USART_IER_LINISFE_MASK 0x04000000 #define AVR32_USART_IER_LINISFE_OFFSET 26 #define AVR32_USART_IER_LINISFE_SIZE 1 #define AVR32_USART_IER_LINSNRE 29 #define AVR32_USART_IER_LINSNRE_MASK 0x20000000 #define AVR32_USART_IER_LINSNRE_OFFSET 29 #define AVR32_USART_IER_LINSNRE_SIZE 1 #define AVR32_USART_IER_LINTC 15 #define AVR32_USART_IER_LINTC_MASK 0x00008000 #define AVR32_USART_IER_LINTC_OFFSET 15 #define AVR32_USART_IER_LINTC_SIZE 1 #define AVR32_USART_IER_MANE 24 #define AVR32_USART_IER_MANE_MASK 0x01000000 #define AVR32_USART_IER_MANE_OFFSET 24 #define AVR32_USART_IER_MANE_SIZE 1 #define AVR32_USART_IER_NACK 13 #define AVR32_USART_IER_NACK_MASK 0x00002000 #define AVR32_USART_IER_NACK_OFFSET 13 #define AVR32_USART_IER_NACK_SIZE 1 #define AVR32_USART_IER_OVRE 5 #define AVR32_USART_IER_OVRE_MASK 0x00000020 #define AVR32_USART_IER_OVRE_OFFSET 5 #define AVR32_USART_IER_OVRE_SIZE 1 #define AVR32_USART_IER_PARE 7 #define AVR32_USART_IER_PARE_MASK 0x00000080 #define AVR32_USART_IER_PARE_OFFSET 7 #define AVR32_USART_IER_PARE_SIZE 1 #define AVR32_USART_IER_RIIC 16 #define AVR32_USART_IER_RIIC_MASK 0x00010000 #define AVR32_USART_IER_RIIC_OFFSET 16 #define AVR32_USART_IER_RIIC_SIZE 1 #define AVR32_USART_IER_RXBRK 2 #define AVR32_USART_IER_RXBRK_MASK 0x00000004 #define AVR32_USART_IER_RXBRK_OFFSET 2 #define AVR32_USART_IER_RXBRK_SIZE 1 #define AVR32_USART_IER_RXBUFF 12 #define AVR32_USART_IER_RXBUFF_MASK 0x00001000 #define AVR32_USART_IER_RXBUFF_OFFSET 12 #define AVR32_USART_IER_RXBUFF_SIZE 1 #define AVR32_USART_IER_RXRDY 0 #define AVR32_USART_IER_RXRDY_MASK 0x00000001 #define AVR32_USART_IER_RXRDY_OFFSET 0 #define AVR32_USART_IER_RXRDY_SIZE 1 #define AVR32_USART_IER_TIMEOUT 8 #define AVR32_USART_IER_TIMEOUT_MASK 0x00000100 #define AVR32_USART_IER_TIMEOUT_OFFSET 8 #define AVR32_USART_IER_TIMEOUT_SIZE 1 #define AVR32_USART_IER_TXBUFE 11 #define AVR32_USART_IER_TXBUFE_MASK 0x00000800 #define AVR32_USART_IER_TXBUFE_OFFSET 11 #define AVR32_USART_IER_TXBUFE_SIZE 1 #define AVR32_USART_IER_TXEMPTY 9 #define AVR32_USART_IER_TXEMPTY_MASK 0x00000200 #define AVR32_USART_IER_TXEMPTY_OFFSET 9 #define AVR32_USART_IER_TXEMPTY_SIZE 1 #define AVR32_USART_IER_TXRDY 1 #define AVR32_USART_IER_TXRDY_MASK 0x00000002 #define AVR32_USART_IER_TXRDY_OFFSET 1 #define AVR32_USART_IER_TXRDY_SIZE 1 #define AVR32_USART_IFR 0x0000004c #define AVR32_USART_IFR_IRDA_FILTER 0 #define AVR32_USART_IFR_IRDA_FILTER_MASK 0x000000ff #define AVR32_USART_IFR_IRDA_FILTER_OFFSET 0 #define AVR32_USART_IFR_IRDA_FILTER_SIZE 8 #define AVR32_USART_IGNORE 0x00000002 #define AVR32_USART_IMR 0x00000010 #define AVR32_USART_IMR_COMM_RX 31 #define AVR32_USART_IMR_COMM_RX_MASK 0x80000000 #define AVR32_USART_IMR_COMM_RX_OFFSET 31 #define AVR32_USART_IMR_COMM_RX_SIZE 1 #define AVR32_USART_IMR_COMM_TX 30 #define AVR32_USART_IMR_COMM_TX_MASK 0x40000000 #define AVR32_USART_IMR_COMM_TX_OFFSET 30 #define AVR32_USART_IMR_COMM_TX_SIZE 1 #define AVR32_USART_IMR_CTSIC 19 #define AVR32_USART_IMR_CTSIC_MASK 0x00080000 #define AVR32_USART_IMR_CTSIC_OFFSET 19 #define AVR32_USART_IMR_CTSIC_SIZE 1 #define AVR32_USART_IMR_DCDIC 18 #define AVR32_USART_IMR_DCDIC_MASK 0x00040000 #define AVR32_USART_IMR_DCDIC_OFFSET 18 #define AVR32_USART_IMR_DCDIC_SIZE 1 #define AVR32_USART_IMR_DSRIC 17 #define AVR32_USART_IMR_DSRIC_MASK 0x00020000 #define AVR32_USART_IMR_DSRIC_OFFSET 17 #define AVR32_USART_IMR_DSRIC_SIZE 1 #define AVR32_USART_IMR_ENDRX 3 #define AVR32_USART_IMR_ENDRX_MASK 0x00000008 #define AVR32_USART_IMR_ENDRX_OFFSET 3 #define AVR32_USART_IMR_ENDRX_SIZE 1 #define AVR32_USART_IMR_ENDTX 4 #define AVR32_USART_IMR_ENDTX_MASK 0x00000010 #define AVR32_USART_IMR_ENDTX_OFFSET 4 #define AVR32_USART_IMR_ENDTX_SIZE 1 #define AVR32_USART_IMR_FRAME 6 #define AVR32_USART_IMR_FRAME_MASK 0x00000040 #define AVR32_USART_IMR_FRAME_OFFSET 6 #define AVR32_USART_IMR_FRAME_SIZE 1 #define AVR32_USART_IMR_ITERATION 10 #define AVR32_USART_IMR_ITERATION_MASK 0x00000400 #define AVR32_USART_IMR_ITERATION_OFFSET 10 #define AVR32_USART_IMR_ITERATION_SIZE 1 #define AVR32_USART_IMR_LINBE 25 #define AVR32_USART_IMR_LINBE_MASK 0x02000000 #define AVR32_USART_IMR_LINBE_OFFSET 25 #define AVR32_USART_IMR_LINBE_SIZE 1 #define AVR32_USART_IMR_LINCE 28 #define AVR32_USART_IMR_LINCE_MASK 0x10000000 #define AVR32_USART_IMR_LINCE_OFFSET 28 #define AVR32_USART_IMR_LINCE_SIZE 1 #define AVR32_USART_IMR_LINIPE 27 #define AVR32_USART_IMR_LINIPE_MASK 0x08000000 #define AVR32_USART_IMR_LINIPE_OFFSET 27 #define AVR32_USART_IMR_LINIPE_SIZE 1 #define AVR32_USART_IMR_LINIR 14 #define AVR32_USART_IMR_LINIR_MASK 0x00004000 #define AVR32_USART_IMR_LINIR_OFFSET 14 #define AVR32_USART_IMR_LINIR_SIZE 1 #define AVR32_USART_IMR_LINISFE 26 #define AVR32_USART_IMR_LINISFE_MASK 0x04000000 #define AVR32_USART_IMR_LINISFE_OFFSET 26 #define AVR32_USART_IMR_LINISFE_SIZE 1 #define AVR32_USART_IMR_LINSNRE 29 #define AVR32_USART_IMR_LINSNRE_MASK 0x20000000 #define AVR32_USART_IMR_LINSNRE_OFFSET 29 #define AVR32_USART_IMR_LINSNRE_SIZE 1 #define AVR32_USART_IMR_LINTC 15 #define AVR32_USART_IMR_LINTC_MASK 0x00008000 #define AVR32_USART_IMR_LINTC_OFFSET 15 #define AVR32_USART_IMR_LINTC_SIZE 1 #define AVR32_USART_IMR_MANE 24 #define AVR32_USART_IMR_MANE_MASK 0x01000000 #define AVR32_USART_IMR_MANE_OFFSET 24 #define AVR32_USART_IMR_MANE_SIZE 1 #define AVR32_USART_IMR_NACK 13 #define AVR32_USART_IMR_NACK_MASK 0x00002000 #define AVR32_USART_IMR_NACK_OFFSET 13 #define AVR32_USART_IMR_NACK_SIZE 1 #define AVR32_USART_IMR_OVRE 5 #define AVR32_USART_IMR_OVRE_MASK 0x00000020 #define AVR32_USART_IMR_OVRE_OFFSET 5 #define AVR32_USART_IMR_OVRE_SIZE 1 #define AVR32_USART_IMR_PARE 7 #define AVR32_USART_IMR_PARE_MASK 0x00000080 #define AVR32_USART_IMR_PARE_OFFSET 7 #define AVR32_USART_IMR_PARE_SIZE 1 #define AVR32_USART_IMR_RIIC 16 #define AVR32_USART_IMR_RIIC_MASK 0x00010000 #define AVR32_USART_IMR_RIIC_OFFSET 16 #define AVR32_USART_IMR_RIIC_SIZE 1 #define AVR32_USART_IMR_RXBRK 2 #define AVR32_USART_IMR_RXBRK_MASK 0x00000004 #define AVR32_USART_IMR_RXBRK_OFFSET 2 #define AVR32_USART_IMR_RXBRK_SIZE 1 #define AVR32_USART_IMR_RXBUFF 12 #define AVR32_USART_IMR_RXBUFF_MASK 0x00001000 #define AVR32_USART_IMR_RXBUFF_OFFSET 12 #define AVR32_USART_IMR_RXBUFF_SIZE 1 #define AVR32_USART_IMR_RXRDY 0 #define AVR32_USART_IMR_RXRDY_MASK 0x00000001 #define AVR32_USART_IMR_RXRDY_OFFSET 0 #define AVR32_USART_IMR_RXRDY_SIZE 1 #define AVR32_USART_IMR_TIMEOUT 8 #define AVR32_USART_IMR_TIMEOUT_MASK 0x00000100 #define AVR32_USART_IMR_TIMEOUT_OFFSET 8 #define AVR32_USART_IMR_TIMEOUT_SIZE 1 #define AVR32_USART_IMR_TXBUFE 11 #define AVR32_USART_IMR_TXBUFE_MASK 0x00000800 #define AVR32_USART_IMR_TXBUFE_OFFSET 11 #define AVR32_USART_IMR_TXBUFE_SIZE 1 #define AVR32_USART_IMR_TXEMPTY 9 #define AVR32_USART_IMR_TXEMPTY_MASK 0x00000200 #define AVR32_USART_IMR_TXEMPTY_OFFSET 9 #define AVR32_USART_IMR_TXEMPTY_SIZE 1 #define AVR32_USART_IMR_TXRDY 1 #define AVR32_USART_IMR_TXRDY_MASK 0x00000002 #define AVR32_USART_IMR_TXRDY_OFFSET 1 #define AVR32_USART_IMR_TXRDY_SIZE 1 #define AVR32_USART_INACK 20 #define AVR32_USART_INACK_MASK 0x00100000 #define AVR32_USART_INACK_OFFSET 20 #define AVR32_USART_INACK_SIZE 1 #define AVR32_USART_IRDA 0x00000008 #define AVR32_USART_IRDA_FILTER 0 #define AVR32_USART_IRDA_FILTER_MASK 0x000000ff #define AVR32_USART_IRDA_FILTER_OFFSET 0 #define AVR32_USART_IRDA_FILTER_SIZE 8 #define AVR32_USART_ISO7816_T0 0x00000004 #define AVR32_USART_ISO7816_T1 0x00000006 #define AVR32_USART_ITERATION 10 #define AVR32_USART_ITERATION_MASK 0x00000400 #define AVR32_USART_ITERATION_OFFSET 10 #define AVR32_USART_ITERATION_SIZE 1 #define AVR32_USART_LINABT 20 #define AVR32_USART_LINABT_MASK 0x00100000 #define AVR32_USART_LINABT_OFFSET 20 #define AVR32_USART_LINABT_SIZE 1 #define AVR32_USART_LINBE 25 #define AVR32_USART_LINBE_MASK 0x02000000 #define AVR32_USART_LINBE_OFFSET 25 #define AVR32_USART_LINBE_SIZE 1 #define AVR32_USART_LINCE 28 #define AVR32_USART_LINCE_MASK 0x10000000 #define AVR32_USART_LINCE_OFFSET 28 #define AVR32_USART_LINCE_SIZE 1 #define AVR32_USART_LINIPE 27 #define AVR32_USART_LINIPE_MASK 0x08000000 #define AVR32_USART_LINIPE_OFFSET 27 #define AVR32_USART_LINIPE_SIZE 1 #define AVR32_USART_LINIR 0x00000058 #define AVR32_USART_LINIR_IDCHR 0 #define AVR32_USART_LINIR_IDCHR_MASK 0x000000ff #define AVR32_USART_LINIR_IDCHR_OFFSET 0 #define AVR32_USART_LINIR_IDCHR_SIZE 8 #define AVR32_USART_LINIR_MASK 0x00004000 #define AVR32_USART_LINIR_OFFSET 14 #define AVR32_USART_LINIR_SIZE 1 #define AVR32_USART_LINISFE 26 #define AVR32_USART_LINISFE_MASK 0x04000000 #define AVR32_USART_LINISFE_OFFSET 26 #define AVR32_USART_LINISFE_SIZE 1 #define AVR32_USART_LINMR 0x00000054 #define AVR32_USART_LINMR_CHKDIS 3 #define AVR32_USART_LINMR_CHKDIS_MASK 0x00000008 #define AVR32_USART_LINMR_CHKDIS_OFFSET 3 #define AVR32_USART_LINMR_CHKDIS_SIZE 1 #define AVR32_USART_LINMR_CHKTYP 4 #define AVR32_USART_LINMR_CHKTYP_MASK 0x00000010 #define AVR32_USART_LINMR_CHKTYP_OFFSET 4 #define AVR32_USART_LINMR_CHKTYP_SIZE 1 #define AVR32_USART_LINMR_DLC 8 #define AVR32_USART_LINMR_DLC_MASK 0x0000ff00 #define AVR32_USART_LINMR_DLC_OFFSET 8 #define AVR32_USART_LINMR_DLC_SIZE 8 #define AVR32_USART_LINMR_DLM 5 #define AVR32_USART_LINMR_DLM_MASK 0x00000020 #define AVR32_USART_LINMR_DLM_OFFSET 5 #define AVR32_USART_LINMR_DLM_SIZE 1 #define AVR32_USART_LINMR_FSDIS 6 #define AVR32_USART_LINMR_FSDIS_MASK 0x00000040 #define AVR32_USART_LINMR_FSDIS_OFFSET 6 #define AVR32_USART_LINMR_FSDIS_SIZE 1 #define AVR32_USART_LINMR_NACT 0 #define AVR32_USART_LINMR_NACT_IGNORE 0x00000002 #define AVR32_USART_LINMR_NACT_MASK 0x00000003 #define AVR32_USART_LINMR_NACT_OFFSET 0 #define AVR32_USART_LINMR_NACT_PUBLISH 0x00000000 #define AVR32_USART_LINMR_NACT_SIZE 2 #define AVR32_USART_LINMR_NACT_SUBSCRIBE 0x00000001 #define AVR32_USART_LINMR_PARDIS 2 #define AVR32_USART_LINMR_PARDIS_MASK 0x00000004 #define AVR32_USART_LINMR_PARDIS_OFFSET 2 #define AVR32_USART_LINMR_PARDIS_SIZE 1 #define AVR32_USART_LINMR_PDCM 16 #define AVR32_USART_LINMR_PDCM_MASK 0x00010000 #define AVR32_USART_LINMR_PDCM_OFFSET 16 #define AVR32_USART_LINMR_PDCM_SIZE 1 #define AVR32_USART_LINMR_WKUPTYP 7 #define AVR32_USART_LINMR_WKUPTYP_MASK 0x00000080 #define AVR32_USART_LINMR_WKUPTYP_OFFSET 7 #define AVR32_USART_LINMR_WKUPTYP_SIZE 1 #define AVR32_USART_LINSNRE 29 #define AVR32_USART_LINSNRE_MASK 0x20000000 #define AVR32_USART_LINSNRE_OFFSET 29 #define AVR32_USART_LINSNRE_SIZE 1 #define AVR32_USART_LINTC 15 #define AVR32_USART_LINTC_MASK 0x00008000 #define AVR32_USART_LINTC_OFFSET 15 #define AVR32_USART_LINTC_SIZE 1 #define AVR32_USART_LINWKUP 21 #define AVR32_USART_LINWKUP_MASK 0x00200000 #define AVR32_USART_LINWKUP_OFFSET 21 #define AVR32_USART_LINWKUP_SIZE 1 #define AVR32_USART_LIN_MASTER 0x0000000a #define AVR32_USART_LIN_SLAVE 0x0000000b #define AVR32_USART_LOCAL_LOOP 0x00000002 #define AVR32_USART_LSBF 0x00000000 #define AVR32_USART_MAN 0x00000050 #define AVR32_USART_MANE 24 #define AVR32_USART_MANERR 24 #define AVR32_USART_MANERR_MASK 0x01000000 #define AVR32_USART_MANERR_OFFSET 24 #define AVR32_USART_MANERR_SIZE 1 #define AVR32_USART_MANE_MASK 0x01000000 #define AVR32_USART_MANE_OFFSET 24 #define AVR32_USART_MANE_SIZE 1 #define AVR32_USART_MAN_DRIFT 30 #define AVR32_USART_MAN_DRIFT_MASK 0x40000000 #define AVR32_USART_MAN_DRIFT_OFFSET 30 #define AVR32_USART_MAN_DRIFT_SIZE 1 #define AVR32_USART_MAN_MASK 0x20000000 #define AVR32_USART_MAN_OFFSET 29 #define AVR32_USART_MAN_RX_MPOL 28 #define AVR32_USART_MAN_RX_MPOL_MASK 0x10000000 #define AVR32_USART_MAN_RX_MPOL_OFFSET 28 #define AVR32_USART_MAN_RX_MPOL_SIZE 1 #define AVR32_USART_MAN_RX_PL 16 #define AVR32_USART_MAN_RX_PL_MASK 0x000f0000 #define AVR32_USART_MAN_RX_PL_OFFSET 16 #define AVR32_USART_MAN_RX_PL_SIZE 4 #define AVR32_USART_MAN_RX_PP 24 #define AVR32_USART_MAN_RX_PP_MASK 0x03000000 #define AVR32_USART_MAN_RX_PP_OFFSET 24 #define AVR32_USART_MAN_RX_PP_SIZE 2 #define AVR32_USART_MAN_SIZE 1 #define AVR32_USART_MAN_TX_MPOL 12 #define AVR32_USART_MAN_TX_MPOL_MASK 0x00001000 #define AVR32_USART_MAN_TX_MPOL_OFFSET 12 #define AVR32_USART_MAN_TX_MPOL_SIZE 1 #define AVR32_USART_MAN_TX_PL 0 #define AVR32_USART_MAN_TX_PL_MASK 0x0000000f #define AVR32_USART_MAN_TX_PL_OFFSET 0 #define AVR32_USART_MAN_TX_PL_SIZE 4 #define AVR32_USART_MAN_TX_PP 8 #define AVR32_USART_MAN_TX_PP_MASK 0x00000300 #define AVR32_USART_MAN_TX_PP_OFFSET 8 #define AVR32_USART_MAN_TX_PP_SIZE 2 #define AVR32_USART_MARK 0x00000003 #define AVR32_USART_MAX_ITERATION 24 #define AVR32_USART_MAX_ITERATION_MASK 0x07000000 #define AVR32_USART_MAX_ITERATION_OFFSET 24 #define AVR32_USART_MAX_ITERATION_SIZE 3 #define AVR32_USART_MCK 0x00000000 #define AVR32_USART_MCK_DIV 0x00000001 #define AVR32_USART_MODE 0 #define AVR32_USART_MODE9 17 #define AVR32_USART_MODE9_MASK 0x00020000 #define AVR32_USART_MODE9_OFFSET 17 #define AVR32_USART_MODE9_SIZE 1 #define AVR32_USART_MODEM 0x00000003 #define AVR32_USART_MODE_HARDWARE 0x00000002 #define AVR32_USART_MODE_IRDA 0x00000008 #define AVR32_USART_MODE_ISO7816_T0 0x00000004 #define AVR32_USART_MODE_ISO7816_T1 0x00000006 #define AVR32_USART_MODE_LIN_MASTER 0x0000000a #define AVR32_USART_MODE_LIN_SLAVE 0x0000000b #define AVR32_USART_MODE_MASK 0x0000000f #define AVR32_USART_MODE_MODEM 0x00000003 #define AVR32_USART_MODE_NORMAL 0x00000000 #define AVR32_USART_MODE_OFFSET 0 #define AVR32_USART_MODE_RS485 0x00000001 #define AVR32_USART_MODE_SIZE 4 #define AVR32_USART_MODE_SPI_MASTER 0x0000000e #define AVR32_USART_MODE_SPI_SLAVE 0x0000000f #define AVR32_USART_MODSYNC 30 #define AVR32_USART_MODSYNC_MASK 0x40000000 #define AVR32_USART_MODSYNC_OFFSET 30 #define AVR32_USART_MODSYNC_SIZE 1 #define AVR32_USART_MR 0x00000004 #define AVR32_USART_MR_CHMODE 14 #define AVR32_USART_MR_CHMODE_ECHO 0x00000001 #define AVR32_USART_MR_CHMODE_LOCAL_LOOP 0x00000002 #define AVR32_USART_MR_CHMODE_MASK 0x0000c000 #define AVR32_USART_MR_CHMODE_NORMAL 0x00000000 #define AVR32_USART_MR_CHMODE_OFFSET 14 #define AVR32_USART_MR_CHMODE_REMOTE_LOOP 0x00000003 #define AVR32_USART_MR_CHMODE_SIZE 2 #define AVR32_USART_MR_CHRL 6 #define AVR32_USART_MR_CHRL_5 0x00000000 #define AVR32_USART_MR_CHRL_6 0x00000001 #define AVR32_USART_MR_CHRL_7 0x00000002 #define AVR32_USART_MR_CHRL_8 0x00000003 #define AVR32_USART_MR_CHRL_MASK 0x000000c0 #define AVR32_USART_MR_CHRL_OFFSET 6 #define AVR32_USART_MR_CHRL_SIZE 2 #define AVR32_USART_MR_CLKO 18 #define AVR32_USART_MR_CLKO_MASK 0x00040000 #define AVR32_USART_MR_CLKO_OFFSET 18 #define AVR32_USART_MR_CLKO_SIZE 1 #define AVR32_USART_MR_DSNACK 21 #define AVR32_USART_MR_DSNACK_MASK 0x00200000 #define AVR32_USART_MR_DSNACK_OFFSET 21 #define AVR32_USART_MR_DSNACK_SIZE 1 #define AVR32_USART_MR_FILTER 28 #define AVR32_USART_MR_FILTER_MASK 0x10000000 #define AVR32_USART_MR_FILTER_OFFSET 28 #define AVR32_USART_MR_FILTER_SIZE 1 #define AVR32_USART_MR_INACK 20 #define AVR32_USART_MR_INACK_MASK 0x00100000 #define AVR32_USART_MR_INACK_OFFSET 20 #define AVR32_USART_MR_INACK_SIZE 1 #define AVR32_USART_MR_MAN 29 #define AVR32_USART_MR_MAN_MASK 0x20000000 #define AVR32_USART_MR_MAN_OFFSET 29 #define AVR32_USART_MR_MAN_SIZE 1 #define AVR32_USART_MR_MAX_ITERATION 24 #define AVR32_USART_MR_MAX_ITERATION_MASK 0x07000000 #define AVR32_USART_MR_MAX_ITERATION_OFFSET 24 #define AVR32_USART_MR_MAX_ITERATION_SIZE 3 #define AVR32_USART_MR_MODE 0 #define AVR32_USART_MR_MODE9 17 #define AVR32_USART_MR_MODE9_MASK 0x00020000 #define AVR32_USART_MR_MODE9_OFFSET 17 #define AVR32_USART_MR_MODE9_SIZE 1 #define AVR32_USART_MR_MODE_HARDWARE 0x00000002 #define AVR32_USART_MR_MODE_IRDA 0x00000008 #define AVR32_USART_MR_MODE_ISO7816_T0 0x00000004 #define AVR32_USART_MR_MODE_ISO7816_T1 0x00000006 #define AVR32_USART_MR_MODE_LIN_MASTER 0x0000000a #define AVR32_USART_MR_MODE_LIN_SLAVE 0x0000000b #define AVR32_USART_MR_MODE_MASK 0x0000000f #define AVR32_USART_MR_MODE_MODEM 0x00000003 #define AVR32_USART_MR_MODE_NORMAL 0x00000000 #define AVR32_USART_MR_MODE_OFFSET 0 #define AVR32_USART_MR_MODE_RS485 0x00000001 #define AVR32_USART_MR_MODE_SIZE 4 #define AVR32_USART_MR_MODE_SPI_MASTER 0x0000000e #define AVR32_USART_MR_MODE_SPI_SLAVE 0x0000000f #define AVR32_USART_MR_MODSYNC 30 #define AVR32_USART_MR_MODSYNC_MASK 0x40000000 #define AVR32_USART_MR_MODSYNC_OFFSET 30 #define AVR32_USART_MR_MODSYNC_SIZE 1 #define AVR32_USART_MR_MSBF 16 #define AVR32_USART_MR_MSBF_LSBF 0x00000000 #define AVR32_USART_MR_MSBF_MASK 0x00010000 #define AVR32_USART_MR_MSBF_MSBF 0x00000001 #define AVR32_USART_MR_MSBF_OFFSET 16 #define AVR32_USART_MR_MSBF_SIZE 1 #define AVR32_USART_MR_NBSTOP 12 #define AVR32_USART_MR_NBSTOP_1 0x00000000 #define AVR32_USART_MR_NBSTOP_1_5 0x00000001 #define AVR32_USART_MR_NBSTOP_2 0x00000002 #define AVR32_USART_MR_NBSTOP_MASK 0x00003000 #define AVR32_USART_MR_NBSTOP_OFFSET 12 #define AVR32_USART_MR_NBSTOP_SIZE 2 #define AVR32_USART_MR_ONEBIT 31 #define AVR32_USART_MR_ONEBIT_MASK 0x80000000 #define AVR32_USART_MR_ONEBIT_OFFSET 31 #define AVR32_USART_MR_ONEBIT_SIZE 1 #define AVR32_USART_MR_OVER 19 #define AVR32_USART_MR_OVER_MASK 0x00080000 #define AVR32_USART_MR_OVER_OFFSET 19 #define AVR32_USART_MR_OVER_SIZE 1 #define AVR32_USART_MR_OVER_X16 0x00000000 #define AVR32_USART_MR_OVER_X8 0x00000001 #define AVR32_USART_MR_PAR 9 #define AVR32_USART_MR_PAR_EVEN 0x00000000 #define AVR32_USART_MR_PAR_MARK 0x00000003 #define AVR32_USART_MR_PAR_MASK 0x00000e00 #define AVR32_USART_MR_PAR_MULTI 0x00000006 #define AVR32_USART_MR_PAR_NONE 0x00000004 #define AVR32_USART_MR_PAR_ODD 0x00000001 #define AVR32_USART_MR_PAR_OFFSET 9 #define AVR32_USART_MR_PAR_SIZE 3 #define AVR32_USART_MR_PAR_SPACE 0x00000002 #define AVR32_USART_MR_SYNC 8 #define AVR32_USART_MR_SYNC_MASK 0x00000100 #define AVR32_USART_MR_SYNC_OFFSET 8 #define AVR32_USART_MR_SYNC_SIZE 1 #define AVR32_USART_MR_USCLKS 4 #define AVR32_USART_MR_USCLKS_MASK 0x00000030 #define AVR32_USART_MR_USCLKS_MCK 0x00000000 #define AVR32_USART_MR_USCLKS_MCK_DIV 0x00000001 #define AVR32_USART_MR_USCLKS_OFFSET 4 #define AVR32_USART_MR_USCLKS_SCK 0x00000003 #define AVR32_USART_MR_USCLKS_SIZE 2 #define AVR32_USART_MR_VAR_SYNC 22 #define AVR32_USART_MR_VAR_SYNC_MASK 0x00400000 #define AVR32_USART_MR_VAR_SYNC_OFFSET 22 #define AVR32_USART_MR_VAR_SYNC_SIZE 1 #define AVR32_USART_MSBF_LSBF 0x00000000 #define AVR32_USART_MSBF_MASK 0x00010000 #define AVR32_USART_MSBF_MSBF 0x00000001 #define AVR32_USART_MSBF_OFFSET 16 #define AVR32_USART_MSBF_SIZE 1 #define AVR32_USART_MULTI 0x00000006 #define AVR32_USART_NACK 13 #define AVR32_USART_NACK_MASK 0x00002000 #define AVR32_USART_NACK_OFFSET 13 #define AVR32_USART_NACK_SIZE 1 #define AVR32_USART_NACT 0 #define AVR32_USART_NACT_IGNORE 0x00000002 #define AVR32_USART_NACT_MASK 0x00000003 #define AVR32_USART_NACT_OFFSET 0 #define AVR32_USART_NACT_PUBLISH 0x00000000 #define AVR32_USART_NACT_SIZE 2 #define AVR32_USART_NACT_SUBSCRIBE 0x00000001 #define AVR32_USART_NBSTOP 12 #define AVR32_USART_NBSTOP_1 0x00000000 #define AVR32_USART_NBSTOP_1_5 0x00000001 #define AVR32_USART_NBSTOP_2 0x00000002 #define AVR32_USART_NBSTOP_MASK 0x00003000 #define AVR32_USART_NBSTOP_OFFSET 12 #define AVR32_USART_NBSTOP_SIZE 2 #define AVR32_USART_NB_ERRORS 0 #define AVR32_USART_NB_ERRORS_MASK 0x000000ff #define AVR32_USART_NB_ERRORS_OFFSET 0 #define AVR32_USART_NB_ERRORS_SIZE 8 #define AVR32_USART_NER 0x00000044 #define AVR32_USART_NER_NB_ERRORS 0 #define AVR32_USART_NER_NB_ERRORS_MASK 0x000000ff #define AVR32_USART_NER_NB_ERRORS_OFFSET 0 #define AVR32_USART_NER_NB_ERRORS_SIZE 8 #define AVR32_USART_NONE 0x00000004 #define AVR32_USART_NORMAL 0x00000000 #define AVR32_USART_ODD 0x00000001 #define AVR32_USART_ONEBIT 31 #define AVR32_USART_ONEBIT_MASK 0x80000000 #define AVR32_USART_ONEBIT_OFFSET 31 #define AVR32_USART_ONEBIT_SIZE 1 #define AVR32_USART_OVER 19 #define AVR32_USART_OVER_MASK 0x00080000 #define AVR32_USART_OVER_OFFSET 19 #define AVR32_USART_OVER_SIZE 1 #define AVR32_USART_OVER_X16 0x00000000 #define AVR32_USART_OVER_X8 0x00000001 #define AVR32_USART_OVRE 5 #define AVR32_USART_OVRE_MASK 0x00000020 #define AVR32_USART_OVRE_OFFSET 5 #define AVR32_USART_OVRE_SIZE 1 #define AVR32_USART_PAR 9 #define AVR32_USART_PARDIS 2 #define AVR32_USART_PARDIS_MASK 0x00000004 #define AVR32_USART_PARDIS_OFFSET 2 #define AVR32_USART_PARDIS_SIZE 1 #define AVR32_USART_PARE 7 #define AVR32_USART_PARE_MASK 0x00000080 #define AVR32_USART_PARE_OFFSET 7 #define AVR32_USART_PARE_SIZE 1 #define AVR32_USART_PAR_EVEN 0x00000000 #define AVR32_USART_PAR_MARK 0x00000003 #define AVR32_USART_PAR_MASK 0x00000e00 #define AVR32_USART_PAR_MULTI 0x00000006 #define AVR32_USART_PAR_NONE 0x00000004 #define AVR32_USART_PAR_ODD 0x00000001 #define AVR32_USART_PAR_OFFSET 9 #define AVR32_USART_PAR_SIZE 3 #define AVR32_USART_PAR_SPACE 0x00000002 #define AVR32_USART_PDCM 16 #define AVR32_USART_PDCM_MASK 0x00010000 #define AVR32_USART_PDCM_OFFSET 16 #define AVR32_USART_PDCM_SIZE 1 #define AVR32_USART_PUBLISH 0x00000000 #define AVR32_USART_REMOTE_LOOP 0x00000003 #define AVR32_USART_RETTO 15 #define AVR32_USART_RETTO_MASK 0x00008000 #define AVR32_USART_RETTO_OFFSET 15 #define AVR32_USART_RETTO_SIZE 1 #define AVR32_USART_RHR 0x00000018 #define AVR32_USART_RHR_RXCHR 0 #define AVR32_USART_RHR_RXCHR_MASK 0x000001ff #define AVR32_USART_RHR_RXCHR_OFFSET 0 #define AVR32_USART_RHR_RXCHR_SIZE 9 #define AVR32_USART_RHR_RXSYNH 15 #define AVR32_USART_RHR_RXSYNH_MASK 0x00008000 #define AVR32_USART_RHR_RXSYNH_OFFSET 15 #define AVR32_USART_RHR_RXSYNH_SIZE 1 #define AVR32_USART_RI 20 #define AVR32_USART_RIIC 16 #define AVR32_USART_RIIC_MASK 0x00010000 #define AVR32_USART_RIIC_OFFSET 16 #define AVR32_USART_RIIC_SIZE 1 #define AVR32_USART_RI_MASK 0x00100000 #define AVR32_USART_RI_OFFSET 20 #define AVR32_USART_RI_SIZE 1 #define AVR32_USART_RS485 0x00000001 #define AVR32_USART_RSTIT 13 #define AVR32_USART_RSTIT_MASK 0x00002000 #define AVR32_USART_RSTIT_OFFSET 13 #define AVR32_USART_RSTIT_SIZE 1 #define AVR32_USART_RSTNACK 14 #define AVR32_USART_RSTNACK_MASK 0x00004000 #define AVR32_USART_RSTNACK_OFFSET 14 #define AVR32_USART_RSTNACK_SIZE 1 #define AVR32_USART_RSTRX 2 #define AVR32_USART_RSTRX_MASK 0x00000004 #define AVR32_USART_RSTRX_OFFSET 2 #define AVR32_USART_RSTRX_SIZE 1 #define AVR32_USART_RSTSTA 8 #define AVR32_USART_RSTSTA_MASK 0x00000100 #define AVR32_USART_RSTSTA_OFFSET 8 #define AVR32_USART_RSTSTA_SIZE 1 #define AVR32_USART_RSTTX 3 #define AVR32_USART_RSTTX_MASK 0x00000008 #define AVR32_USART_RSTTX_OFFSET 3 #define AVR32_USART_RSTTX_SIZE 1 #define AVR32_USART_RTOR 0x00000024 #define AVR32_USART_RTOR_TO 0 #define AVR32_USART_RTOR_TO_DISABLE 0x00000000 #define AVR32_USART_RTOR_TO_MASK 0x0000ffff #define AVR32_USART_RTOR_TO_OFFSET 0 #define AVR32_USART_RTOR_TO_SIZE 16 #define AVR32_USART_RTSDIS 19 #define AVR32_USART_RTSDIS_MASK 0x00080000 #define AVR32_USART_RTSDIS_OFFSET 19 #define AVR32_USART_RTSDIS_SIZE 1 #define AVR32_USART_RTSEN 18 #define AVR32_USART_RTSEN_MASK 0x00040000 #define AVR32_USART_RTSEN_OFFSET 18 #define AVR32_USART_RTSEN_SIZE 1 #define AVR32_USART_RXBRK 2 #define AVR32_USART_RXBRK_MASK 0x00000004 #define AVR32_USART_RXBRK_OFFSET 2 #define AVR32_USART_RXBRK_SIZE 1 #define AVR32_USART_RXBUFF 12 #define AVR32_USART_RXBUFF_MASK 0x00001000 #define AVR32_USART_RXBUFF_OFFSET 12 #define AVR32_USART_RXBUFF_SIZE 1 #define AVR32_USART_RXCHR 0 #define AVR32_USART_RXCHR_MASK 0x000001ff #define AVR32_USART_RXCHR_OFFSET 0 #define AVR32_USART_RXCHR_SIZE 9 #define AVR32_USART_RXDIS 5 #define AVR32_USART_RXDIS_MASK 0x00000020 #define AVR32_USART_RXDIS_OFFSET 5 #define AVR32_USART_RXDIS_SIZE 1 #define AVR32_USART_RXEN 4 #define AVR32_USART_RXEN_MASK 0x00000010 #define AVR32_USART_RXEN_OFFSET 4 #define AVR32_USART_RXEN_SIZE 1 #define AVR32_USART_RXRDY 0 #define AVR32_USART_RXRDY_MASK 0x00000001 #define AVR32_USART_RXRDY_OFFSET 0 #define AVR32_USART_RXRDY_SIZE 1 #define AVR32_USART_RXSYNH 15 #define AVR32_USART_RXSYNH_MASK 0x00008000 #define AVR32_USART_RXSYNH_OFFSET 15 #define AVR32_USART_RXSYNH_SIZE 1 #define AVR32_USART_RX_MPOL 28 #define AVR32_USART_RX_MPOL_MASK 0x10000000 #define AVR32_USART_RX_MPOL_OFFSET 28 #define AVR32_USART_RX_MPOL_SIZE 1 #define AVR32_USART_RX_PL 16 #define AVR32_USART_RX_PL_MASK 0x000f0000 #define AVR32_USART_RX_PL_OFFSET 16 #define AVR32_USART_RX_PL_SIZE 4 #define AVR32_USART_RX_PP 24 #define AVR32_USART_RX_PP_MASK 0x03000000 #define AVR32_USART_RX_PP_OFFSET 24 #define AVR32_USART_RX_PP_SIZE 2 #define AVR32_USART_SCK 0x00000003 #define AVR32_USART_SENDA 12 #define AVR32_USART_SENDA_MASK 0x00001000 #define AVR32_USART_SENDA_OFFSET 12 #define AVR32_USART_SENDA_SIZE 1 #define AVR32_USART_SPACE 0x00000002 #define AVR32_USART_SPI_MASTER 0x0000000e #define AVR32_USART_SPI_SLAVE 0x0000000f #define AVR32_USART_STPBRK 10 #define AVR32_USART_STPBRK_MASK 0x00000400 #define AVR32_USART_STPBRK_OFFSET 10 #define AVR32_USART_STPBRK_SIZE 1 #define AVR32_USART_STTBRK 9 #define AVR32_USART_STTBRK_MASK 0x00000200 #define AVR32_USART_STTBRK_OFFSET 9 #define AVR32_USART_STTBRK_SIZE 1 #define AVR32_USART_STTTO 11 #define AVR32_USART_STTTO_MASK 0x00000800 #define AVR32_USART_STTTO_OFFSET 11 #define AVR32_USART_STTTO_SIZE 1 #define AVR32_USART_SUBSCRIBE 0x00000001 #define AVR32_USART_SYNC 8 #define AVR32_USART_SYNC_MASK 0x00000100 #define AVR32_USART_SYNC_OFFSET 8 #define AVR32_USART_SYNC_SIZE 1 #define AVR32_USART_TG 0 #define AVR32_USART_TG_DISABLE 0x00000000 #define AVR32_USART_TG_MASK 0x000000ff #define AVR32_USART_TG_OFFSET 0 #define AVR32_USART_TG_SIZE 8 #define AVR32_USART_THR 0x0000001c #define AVR32_USART_THR_TXCHR 0 #define AVR32_USART_THR_TXCHR_MASK 0x000001ff #define AVR32_USART_THR_TXCHR_OFFSET 0 #define AVR32_USART_THR_TXCHR_SIZE 9 #define AVR32_USART_THR_TXSYNH 15 #define AVR32_USART_THR_TXSYNH_MASK 0x00008000 #define AVR32_USART_THR_TXSYNH_OFFSET 15 #define AVR32_USART_THR_TXSYNH_SIZE 1 #define AVR32_USART_TIMEOUT 8 #define AVR32_USART_TIMEOUT_MASK 0x00000100 #define AVR32_USART_TIMEOUT_OFFSET 8 #define AVR32_USART_TIMEOUT_SIZE 1 #define AVR32_USART_TO 0 #define AVR32_USART_TO_DISABLE 0x00000000 #define AVR32_USART_TO_MASK 0x0000ffff #define AVR32_USART_TO_OFFSET 0 #define AVR32_USART_TO_SIZE 16 #define AVR32_USART_TTGR 0x00000028 #define AVR32_USART_TTGR_TG 0 #define AVR32_USART_TTGR_TG_DISABLE 0x00000000 #define AVR32_USART_TTGR_TG_MASK 0x000000ff #define AVR32_USART_TTGR_TG_OFFSET 0 #define AVR32_USART_TTGR_TG_SIZE 8 #define AVR32_USART_TXBUFE 11 #define AVR32_USART_TXBUFE_MASK 0x00000800 #define AVR32_USART_TXBUFE_OFFSET 11 #define AVR32_USART_TXBUFE_SIZE 1 #define AVR32_USART_TXCHR 0 #define AVR32_USART_TXCHR_MASK 0x000001ff #define AVR32_USART_TXCHR_OFFSET 0 #define AVR32_USART_TXCHR_SIZE 9 #define AVR32_USART_TXDIS 7 #define AVR32_USART_TXDIS_MASK 0x00000080 #define AVR32_USART_TXDIS_OFFSET 7 #define AVR32_USART_TXDIS_SIZE 1 #define AVR32_USART_TXEMPTY 9 #define AVR32_USART_TXEMPTY_MASK 0x00000200 #define AVR32_USART_TXEMPTY_OFFSET 9 #define AVR32_USART_TXEMPTY_SIZE 1 #define AVR32_USART_TXEN 6 #define AVR32_USART_TXEN_MASK 0x00000040 #define AVR32_USART_TXEN_OFFSET 6 #define AVR32_USART_TXEN_SIZE 1 #define AVR32_USART_TXRDY 1 #define AVR32_USART_TXRDY_MASK 0x00000002 #define AVR32_USART_TXRDY_OFFSET 1 #define AVR32_USART_TXRDY_SIZE 1 #define AVR32_USART_TXSYNH 15 #define AVR32_USART_TXSYNH_MASK 0x00008000 #define AVR32_USART_TXSYNH_OFFSET 15 #define AVR32_USART_TXSYNH_SIZE 1 #define AVR32_USART_TX_MPOL 12 #define AVR32_USART_TX_MPOL_MASK 0x00001000 #define AVR32_USART_TX_MPOL_OFFSET 12 #define AVR32_USART_TX_MPOL_SIZE 1 #define AVR32_USART_TX_PL 0 #define AVR32_USART_TX_PL_MASK 0x0000000f #define AVR32_USART_TX_PL_OFFSET 0 #define AVR32_USART_TX_PL_SIZE 4 #define AVR32_USART_TX_PP 8 #define AVR32_USART_TX_PP_MASK 0x00000300 #define AVR32_USART_TX_PP_OFFSET 8 #define AVR32_USART_TX_PP_SIZE 2 #define AVR32_USART_USCLKS 4 #define AVR32_USART_USCLKS_MASK 0x00000030 #define AVR32_USART_USCLKS_MCK 0x00000000 #define AVR32_USART_USCLKS_MCK_DIV 0x00000001 #define AVR32_USART_USCLKS_OFFSET 4 #define AVR32_USART_USCLKS_SCK 0x00000003 #define AVR32_USART_USCLKS_SIZE 2 #define AVR32_USART_VAR_SYNC 22 #define AVR32_USART_VAR_SYNC_MASK 0x00400000 #define AVR32_USART_VAR_SYNC_OFFSET 22 #define AVR32_USART_VAR_SYNC_SIZE 1 #define AVR32_USART_VERSION 0x000000fc #define AVR32_USART_WKUPTYP 7 #define AVR32_USART_WKUPTYP_MASK 0x00000080 #define AVR32_USART_WKUPTYP_OFFSET 7 #define AVR32_USART_WKUPTYP_SIZE 1 #define AVR32_USART_X16 0x00000000 #define AVR32_USART_X8 0x00000001 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_usart_cr_t { unsigned int comm_rx : 1; unsigned int comm_tx : 1; unsigned int : 8; unsigned int linwkup : 1; unsigned int linabt : 1; unsigned int rtsdis : 1; unsigned int rtsen : 1; unsigned int dtrdis : 1; unsigned int dtren : 1; unsigned int retto : 1; unsigned int rstnack : 1; unsigned int rstit : 1; unsigned int senda : 1; unsigned int sttto : 1; unsigned int stpbrk : 1; unsigned int sttbrk : 1; unsigned int rststa : 1; unsigned int txdis : 1; unsigned int txen : 1; unsigned int rxdis : 1; unsigned int rxen : 1; unsigned int rsttx : 1; unsigned int rstrx : 1; unsigned int : 2; } avr32_usart_cr_t; typedef struct avr32_usart_mr_t { unsigned int onebit : 1; unsigned int modsync : 1; unsigned int man : 1; unsigned int filter : 1; unsigned int : 1; unsigned int max_iteration : 3; unsigned int : 1; unsigned int var_sync : 1; unsigned int dsnack : 1; unsigned int inack : 1; unsigned int over : 1; unsigned int clko : 1; unsigned int mode9 : 1; unsigned int msbf : 1; unsigned int chmode : 2; unsigned int nbstop : 2; unsigned int par : 3; unsigned int sync : 1; unsigned int chrl : 2; unsigned int usclks : 2; unsigned int mode : 4; } avr32_usart_mr_t; typedef struct avr32_usart_ier_t { unsigned int comm_rx : 1; unsigned int comm_tx : 1; unsigned int linsnre : 1; unsigned int lince : 1; unsigned int linipe : 1; unsigned int linisfe : 1; unsigned int linbe : 1; unsigned int mane : 1; unsigned int : 4; unsigned int ctsic : 1; unsigned int dcdic : 1; unsigned int dsric : 1; unsigned int riic : 1; unsigned int lintc : 1; unsigned int linir : 1; unsigned int nack : 1; unsigned int rxbuff : 1; unsigned int txbufe : 1; unsigned int iteration : 1; unsigned int txempty : 1; unsigned int timeout : 1; unsigned int pare : 1; unsigned int frame : 1; unsigned int ovre : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int rxbrk : 1; unsigned int txrdy : 1; unsigned int rxrdy : 1; } avr32_usart_ier_t; typedef struct avr32_usart_idr_t { unsigned int comm_rx : 1; unsigned int comm_tx : 1; unsigned int linsnre : 1; unsigned int lince : 1; unsigned int linipe : 1; unsigned int linisfe : 1; unsigned int linbe : 1; unsigned int mane : 1; unsigned int : 4; unsigned int ctsic : 1; unsigned int dcdic : 1; unsigned int dsric : 1; unsigned int riic : 1; unsigned int lintc : 1; unsigned int linir : 1; unsigned int nack : 1; unsigned int rxbuff : 1; unsigned int txbufe : 1; unsigned int iteration : 1; unsigned int txempty : 1; unsigned int timeout : 1; unsigned int pare : 1; unsigned int frame : 1; unsigned int ovre : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int rxbrk : 1; unsigned int txrdy : 1; unsigned int rxrdy : 1; } avr32_usart_idr_t; typedef struct avr32_usart_imr_t { unsigned int comm_rx : 1; unsigned int comm_tx : 1; unsigned int linsnre : 1; unsigned int lince : 1; unsigned int linipe : 1; unsigned int linisfe : 1; unsigned int linbe : 1; unsigned int mane : 1; unsigned int : 4; unsigned int ctsic : 1; unsigned int dcdic : 1; unsigned int dsric : 1; unsigned int riic : 1; unsigned int lintc : 1; unsigned int linir : 1; unsigned int nack : 1; unsigned int rxbuff : 1; unsigned int txbufe : 1; unsigned int iteration : 1; unsigned int txempty : 1; unsigned int timeout : 1; unsigned int pare : 1; unsigned int frame : 1; unsigned int ovre : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int rxbrk : 1; unsigned int txrdy : 1; unsigned int rxrdy : 1; } avr32_usart_imr_t; typedef struct avr32_usart_csr_t { unsigned int comm_rx : 1; unsigned int comm_tx : 1; unsigned int linsnre : 1; unsigned int lince : 1; unsigned int linipe : 1; unsigned int linisfe : 1; unsigned int linbe : 1; unsigned int manerr : 1; unsigned int cts : 1; unsigned int dcd : 1; unsigned int dsr : 1; unsigned int ri : 1; unsigned int ctsic : 1; unsigned int dcdic : 1; unsigned int dsric : 1; unsigned int riic : 1; unsigned int lintc : 1; unsigned int linir : 1; unsigned int nack : 1; unsigned int rxbuff : 1; unsigned int txbufe : 1; unsigned int iteration : 1; unsigned int txempty : 1; unsigned int timeout : 1; unsigned int pare : 1; unsigned int frame : 1; unsigned int ovre : 1; unsigned int endtx : 1; unsigned int endrx : 1; unsigned int rxbrk : 1; unsigned int txrdy : 1; unsigned int rxrdy : 1; } avr32_usart_csr_t; typedef struct avr32_usart_rhr_t { unsigned int :16; unsigned int rxsynh : 1; unsigned int : 6; unsigned int rxchr : 9; } avr32_usart_rhr_t; typedef struct avr32_usart_thr_t { unsigned int :16; unsigned int txsynh : 1; unsigned int : 6; unsigned int txchr : 9; } avr32_usart_thr_t; typedef struct avr32_usart_brgr_t { unsigned int :13; unsigned int fp : 3; unsigned int cd :16; } avr32_usart_brgr_t; typedef struct avr32_usart_rtor_t { unsigned int :16; unsigned int to :16; } avr32_usart_rtor_t; typedef struct avr32_usart_ttgr_t { unsigned int :24; unsigned int tg : 8; } avr32_usart_ttgr_t; typedef struct avr32_usart_fidi_t { unsigned int :21; unsigned int fi_di_ratio :11; } avr32_usart_fidi_t; typedef struct avr32_usart_ner_t { unsigned int :24; unsigned int nb_errors : 8; } avr32_usart_ner_t; typedef struct avr32_usart_ifr_t { unsigned int :24; unsigned int irda_filter : 8; } avr32_usart_ifr_t; typedef struct avr32_usart_man_t { unsigned int : 1; unsigned int drift : 1; unsigned int : 1; unsigned int rx_mpol : 1; unsigned int : 2; unsigned int rx_pp : 2; unsigned int : 4; unsigned int rx_pl : 4; unsigned int : 3; unsigned int tx_mpol : 1; unsigned int : 2; unsigned int tx_pp : 2; unsigned int : 4; unsigned int tx_pl : 4; } avr32_usart_man_t; typedef struct avr32_usart_linmr_t { unsigned int :15; unsigned int pdcm : 1; unsigned int dlc : 8; unsigned int wkuptyp : 1; unsigned int fsdis : 1; unsigned int dlm : 1; unsigned int chktyp : 1; unsigned int chkdis : 1; unsigned int pardis : 1; unsigned int nact : 2; } avr32_usart_linmr_t; typedef struct avr32_usart_linir_t { unsigned int :24; unsigned int idchr : 8; } avr32_usart_linir_t; typedef struct avr32_usart_t { union { unsigned long cr ;//0x0000 avr32_usart_cr_t CR ; }; union { unsigned long mr ;//0x0004 avr32_usart_mr_t MR ; }; union { unsigned long ier ;//0x0008 avr32_usart_ier_t IER ; }; union { unsigned long idr ;//0x000c avr32_usart_idr_t IDR ; }; union { const unsigned long imr ;//0x0010 const avr32_usart_imr_t IMR ; }; union { const unsigned long csr ;//0x0014 const avr32_usart_csr_t CSR ; }; union { const unsigned long rhr ;//0x0018 const avr32_usart_rhr_t RHR ; }; union { unsigned long thr ;//0x001c avr32_usart_thr_t THR ; }; union { unsigned long brgr ;//0x0020 avr32_usart_brgr_t BRGR ; }; union { unsigned long rtor ;//0x0024 avr32_usart_rtor_t RTOR ; }; union { unsigned long ttgr ;//0x0028 avr32_usart_ttgr_t TTGR ; }; unsigned int :32 ;//0x002c unsigned int :32 ;//0x0030 unsigned int :32 ;//0x0034 unsigned int :32 ;//0x0038 unsigned int :32 ;//0x003c union { unsigned long fidi ;//0x0040 avr32_usart_fidi_t FIDI ; }; union { const unsigned long ner ;//0x0044 const avr32_usart_ner_t NER ; }; unsigned int :32 ;//0x0048 union { unsigned long ifr ;//0x004c avr32_usart_ifr_t IFR ; }; union { unsigned long man ;//0x0050 avr32_usart_man_t MAN ; }; union { unsigned long linmr ;//0x0054 avr32_usart_linmr_t LINMR ; }; union { unsigned long linir ;//0x0058 avr32_usart_linir_t LINIR ; }; unsigned int :32 ;//0x005c unsigned int :32 ;//0x0060 unsigned int :32 ;//0x0064 unsigned int :32 ;//0x0068 unsigned int :32 ;//0x006c unsigned int :32 ;//0x0070 unsigned int :32 ;//0x0074 unsigned int :32 ;//0x0078 unsigned int :32 ;//0x007c unsigned int :32 ;//0x0080 unsigned int :32 ;//0x0084 unsigned int :32 ;//0x0088 unsigned int :32 ;//0x008c unsigned int :32 ;//0x0090 unsigned int :32 ;//0x0094 unsigned int :32 ;//0x0098 unsigned int :32 ;//0x009c unsigned int :32 ;//0x00a0 unsigned int :32 ;//0x00a4 unsigned int :32 ;//0x00a8 unsigned int :32 ;//0x00ac unsigned int :32 ;//0x00b0 unsigned int :32 ;//0x00b4 unsigned int :32 ;//0x00b8 unsigned int :32 ;//0x00bc unsigned int :32 ;//0x00c0 unsigned int :32 ;//0x00c4 unsigned int :32 ;//0x00c8 unsigned int :32 ;//0x00cc unsigned int :32 ;//0x00d0 unsigned int :32 ;//0x00d4 unsigned int :32 ;//0x00d8 unsigned int :32 ;//0x00dc unsigned int :32 ;//0x00e0 unsigned int :32 ;//0x00e4 unsigned int :32 ;//0x00e8 unsigned int :32 ;//0x00ec unsigned int :32 ;//0x00f0 unsigned int :32 ;//0x00f4 unsigned int :32 ;//0x00f8 const unsigned long version ;//0x00fc } avr32_usart_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif /*#ifdef AVR32_USART_400_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/usbb_310.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 : UC3000 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_USBB_310_H_INCLUDED #define AVR32_USBB_310_H_INCLUDED #define AVR32_USBB_H_VERSION 310 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_USBB_ - Bitfield mask: AVR32_USBB__ - Bitfield offset: AVR32_USBB___OFFSET - Bitfield size: AVR32_USBB___SIZE - Bitfield values: AVR32_USBB___ 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_USBB_ - Bitfield offset: AVR32_USBB__OFFSET - Bitfield size: AVR32_USBB__SIZE - Bitfield values: AVR32_USBB__ - Bitfield values: AVR32_USBB_ All defines are sorted alphabetically. */ #define AVR32_USBB_1024 0x00000007 #define AVR32_USBB_128 0x00000004 #define AVR32_USBB_16 0x00000001 #define AVR32_USBB_16_BITS 0x00000000 #define AVR32_USBB_24_BITS 0x00000001 #define AVR32_USBB_256 0x00000005 #define AVR32_USBB_32 0x00000002 #define AVR32_USBB_512 0x00000006 #define AVR32_USBB_64 0x00000003 #define AVR32_USBB_8 0x00000000 #define AVR32_USBB_ADDEN 7 #define AVR32_USBB_ADDEN_MASK 0x00000080 #define AVR32_USBB_ADDEN_OFFSET 7 #define AVR32_USBB_ADDEN_SIZE 1 #define AVR32_USBB_ALLOC 1 #define AVR32_USBB_ALLOC_MASK 0x00000002 #define AVR32_USBB_ALLOC_OFFSET 1 #define AVR32_USBB_ALLOC_SIZE 1 #define AVR32_USBB_AUTOSW_SIZE 1 #define AVR32_USBB_A_HOST 0x00000003 #define AVR32_USBB_A_IDLE 0x00000000 #define AVR32_USBB_A_PERIPHERAL 0x00000005 #define AVR32_USBB_A_SUSPEND 0x00000004 #define AVR32_USBB_A_VBUS_ERR 0x00000007 #define AVR32_USBB_A_WAIT_BCON 0x00000002 #define AVR32_USBB_A_WAIT_DISCHARGE 0x00000008 #define AVR32_USBB_A_WAIT_VFALL 0x00000006 #define AVR32_USBB_A_WAIT_VRISE_100_MS 0x00000003 #define AVR32_USBB_A_WAIT_VRISE_20_MS 0x00000000 #define AVR32_USBB_A_WAIT_VRISE_50_MS 0x00000001 #define AVR32_USBB_A_WAIT_VRISE_70_MS 0x00000002 #define AVR32_USBB_BCERRE 4 #define AVR32_USBB_BCERRE_MASK 0x00000010 #define AVR32_USBB_BCERRE_OFFSET 4 #define AVR32_USBB_BCERRE_SIZE 1 #define AVR32_USBB_BCERRI 4 #define AVR32_USBB_BCERRIC 4 #define AVR32_USBB_BCERRIC_MASK 0x00000010 #define AVR32_USBB_BCERRIC_OFFSET 4 #define AVR32_USBB_BCERRIC_SIZE 1 #define AVR32_USBB_BCERRIS 4 #define AVR32_USBB_BCERRIS_MASK 0x00000010 #define AVR32_USBB_BCERRIS_OFFSET 4 #define AVR32_USBB_BCERRIS_SIZE 1 #define AVR32_USBB_BCERRI_MASK 0x00000010 #define AVR32_USBB_BCERRI_OFFSET 4 #define AVR32_USBB_BCERRI_SIZE 1 #define AVR32_USBB_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_BULK 0x00000002 #define AVR32_USBB_BURST_LOCK_EN 7 #define AVR32_USBB_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_BYCT 20 #define AVR32_USBB_BYCT_MASK 0x7ff00000 #define AVR32_USBB_BYCT_OFFSET 20 #define AVR32_USBB_BYCT_SIZE 11 #define AVR32_USBB_BYPASSDPLL 5 #define AVR32_USBB_BYPASSDPLL_MASK 0x00000020 #define AVR32_USBB_BYPASSDPLL_OFFSET 5 #define AVR32_USBB_BYPASSDPLL_SIZE 1 #define AVR32_USBB_BYTE_WRITE_DPRAM 15 #define AVR32_USBB_BYTE_WRITE_DPRAM_MASK 0x00008000 #define AVR32_USBB_BYTE_WRITE_DPRAM_OFFSET 15 #define AVR32_USBB_BYTE_WRITE_DPRAM_SIZE 1 #define AVR32_USBB_B_HOST 0x0000000e #define AVR32_USBB_B_IDLE 0x00000009 #define AVR32_USBB_B_PERIPHERAL 0x0000000a #define AVR32_USBB_B_SRP_INIT 0x0000000f #define AVR32_USBB_B_WAIT_ACON 0x0000000d #define AVR32_USBB_B_WAIT_BEGIN_HNP 0x0000000b #define AVR32_USBB_B_WAIT_DISCHARGE 0x0000000c #define AVR32_USBB_CFGOK 18 #define AVR32_USBB_CFGOK_MASK 0x00040000 #define AVR32_USBB_CFGOK_OFFSET 18 #define AVR32_USBB_CFGOK_SIZE 1 #define AVR32_USBB_CH_ACTIVE 1 #define AVR32_USBB_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_CH_ACTIVE_SIZE 1 #define AVR32_USBB_CH_BYTE_CNT 16 #define AVR32_USBB_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_CH_BYTE_LENGTH 16 #define AVR32_USBB_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_CH_EN 0 #define AVR32_USBB_CH_EN_MASK 0x00000001 #define AVR32_USBB_CH_EN_OFFSET 0 #define AVR32_USBB_CH_EN_SIZE 1 #define AVR32_USBB_CLKUSABLE_SIZE 1 #define AVR32_USBB_CONTROL 0x00000000 #define AVR32_USBB_COUNTER 5 #define AVR32_USBB_COUNTERA 0 #define AVR32_USBB_COUNTERA_MASK 0x00007fff #define AVR32_USBB_COUNTERA_OFFSET 0 #define AVR32_USBB_COUNTERA_SIZE 15 #define AVR32_USBB_COUNTERB 16 #define AVR32_USBB_COUNTERB_MASK 0x003f0000 #define AVR32_USBB_COUNTERB_OFFSET 16 #define AVR32_USBB_COUNTERB_SIZE 6 #define AVR32_USBB_COUNTER_MASK 0x00000060 #define AVR32_USBB_COUNTER_OFFSET 5 #define AVR32_USBB_COUNTER_SIZE 2 #define AVR32_USBB_CRC16 4 #define AVR32_USBB_CRC16_MASK 0x00000010 #define AVR32_USBB_CRC16_OFFSET 4 #define AVR32_USBB_CRC16_SIZE 1 #define AVR32_USBB_CTRLDIR 17 #define AVR32_USBB_CTRLDIR_IN 0x00000001 #define AVR32_USBB_CTRLDIR_MASK 0x00020000 #define AVR32_USBB_CTRLDIR_OFFSET 17 #define AVR32_USBB_CTRLDIR_OUT 0x00000000 #define AVR32_USBB_CTRLDIR_SIZE 1 #define AVR32_USBB_CURRBK 14 #define AVR32_USBB_CURRBK_MASK 0x0000c000 #define AVR32_USBB_CURRBK_OFFSET 14 #define AVR32_USBB_CURRBK_SIZE 2 #define AVR32_USBB_DAM6INTEC 30 #define AVR32_USBB_DAM6INTEC_MASK 0x40000000 #define AVR32_USBB_DAM6INTEC_OFFSET 30 #define AVR32_USBB_DAM6INTEC_SIZE 1 #define AVR32_USBB_DATAPID 1 #define AVR32_USBB_DATAPID_MASK 0x00000002 #define AVR32_USBB_DATAPID_OFFSET 1 #define AVR32_USBB_DATAPID_SIZE 1 #define AVR32_USBB_DATASIZERDWR_SIZE 2 #define AVR32_USBB_DATATGL 0 #define AVR32_USBB_DATATGL_MASK 0x00000001 #define AVR32_USBB_DATATGL_OFFSET 0 #define AVR32_USBB_DATATGL_SIZE 1 #define AVR32_USBB_DATAXE 9 #define AVR32_USBB_DATAXEC 9 #define AVR32_USBB_DATAXEC_MASK 0x00000200 #define AVR32_USBB_DATAXEC_OFFSET 9 #define AVR32_USBB_DATAXEC_SIZE 1 #define AVR32_USBB_DATAXES 9 #define AVR32_USBB_DATAXES_MASK 0x00000200 #define AVR32_USBB_DATAXES_OFFSET 9 #define AVR32_USBB_DATAXES_SIZE 1 #define AVR32_USBB_DATAXE_MASK 0x00000200 #define AVR32_USBB_DATAXE_OFFSET 9 #define AVR32_USBB_DATAXE_SIZE 1 #define AVR32_USBB_DATA_BUS_8_16 16 #define AVR32_USBB_DATA_BUS_8_16_MASK 0x00010000 #define AVR32_USBB_DATA_BUS_8_16_OFFSET 16 #define AVR32_USBB_DATA_BUS_8_16_SIZE 1 #define AVR32_USBB_DCONNI 0 #define AVR32_USBB_DCONNIC 0 #define AVR32_USBB_DCONNIC_MASK 0x00000001 #define AVR32_USBB_DCONNIC_OFFSET 0 #define AVR32_USBB_DCONNIC_SIZE 1 #define AVR32_USBB_DCONNIE 0 #define AVR32_USBB_DCONNIEC 0 #define AVR32_USBB_DCONNIEC_MASK 0x00000001 #define AVR32_USBB_DCONNIEC_OFFSET 0 #define AVR32_USBB_DCONNIEC_SIZE 1 #define AVR32_USBB_DCONNIES 0 #define AVR32_USBB_DCONNIES_MASK 0x00000001 #define AVR32_USBB_DCONNIES_OFFSET 0 #define AVR32_USBB_DCONNIES_SIZE 1 #define AVR32_USBB_DCONNIE_MASK 0x00000001 #define AVR32_USBB_DCONNIE_OFFSET 0 #define AVR32_USBB_DCONNIE_SIZE 1 #define AVR32_USBB_DCONNIS 0 #define AVR32_USBB_DCONNIS_MASK 0x00000001 #define AVR32_USBB_DCONNIS_OFFSET 0 #define AVR32_USBB_DCONNIS_SIZE 1 #define AVR32_USBB_DCONNI_MASK 0x00000001 #define AVR32_USBB_DCONNI_OFFSET 0 #define AVR32_USBB_DCONNI_SIZE 1 #define AVR32_USBB_DDISCI 1 #define AVR32_USBB_DDISCIC 1 #define AVR32_USBB_DDISCIC_MASK 0x00000002 #define AVR32_USBB_DDISCIC_OFFSET 1 #define AVR32_USBB_DDISCIC_SIZE 1 #define AVR32_USBB_DDISCIE 1 #define AVR32_USBB_DDISCIEC 1 #define AVR32_USBB_DDISCIEC_MASK 0x00000002 #define AVR32_USBB_DDISCIEC_OFFSET 1 #define AVR32_USBB_DDISCIEC_SIZE 1 #define AVR32_USBB_DDISCIES 1 #define AVR32_USBB_DDISCIES_MASK 0x00000002 #define AVR32_USBB_DDISCIES_OFFSET 1 #define AVR32_USBB_DDISCIES_SIZE 1 #define AVR32_USBB_DDISCIE_MASK 0x00000002 #define AVR32_USBB_DDISCIE_OFFSET 1 #define AVR32_USBB_DDISCIE_SIZE 1 #define AVR32_USBB_DDISCIS 1 #define AVR32_USBB_DDISCIS_MASK 0x00000002 #define AVR32_USBB_DDISCIS_OFFSET 1 #define AVR32_USBB_DDISCIS_SIZE 1 #define AVR32_USBB_DDISCI_MASK 0x00000002 #define AVR32_USBB_DDISCI_OFFSET 1 #define AVR32_USBB_DDISCI_SIZE 1 #define AVR32_USBB_DESC_LD_IRQ_EN 6 #define AVR32_USBB_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_DESC_LD_STA 6 #define AVR32_USBB_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_DESC_LD_STA_SIZE 1 #define AVR32_USBB_DETACH 8 #define AVR32_USBB_DETACH_MASK 0x00000100 #define AVR32_USBB_DETACH_OFFSET 8 #define AVR32_USBB_DETACH_SIZE 1 #define AVR32_USBB_DISBALEGATEDCLOCK 3 #define AVR32_USBB_DISBALEGATEDCLOCK_MASK 0x00000008 #define AVR32_USBB_DISBALEGATEDCLOCK_OFFSET 3 #define AVR32_USBB_DISBALEGATEDCLOCK_SIZE 1 #define AVR32_USBB_DMA1INT 25 #define AVR32_USBB_DMA1INTE 25 #define AVR32_USBB_DMA1INTEC 25 #define AVR32_USBB_DMA1INTEC_MASK 0x02000000 #define AVR32_USBB_DMA1INTEC_OFFSET 25 #define AVR32_USBB_DMA1INTEC_SIZE 1 #define AVR32_USBB_DMA1INTES 25 #define AVR32_USBB_DMA1INTES_MASK 0x02000000 #define AVR32_USBB_DMA1INTES_OFFSET 25 #define AVR32_USBB_DMA1INTES_SIZE 1 #define AVR32_USBB_DMA1INTE_MASK 0x02000000 #define AVR32_USBB_DMA1INTE_OFFSET 25 #define AVR32_USBB_DMA1INTE_SIZE 1 #define AVR32_USBB_DMA1INTS 25 #define AVR32_USBB_DMA1INTS_MASK 0x02000000 #define AVR32_USBB_DMA1INTS_OFFSET 25 #define AVR32_USBB_DMA1INTS_SIZE 1 #define AVR32_USBB_DMA1INT_MASK 0x02000000 #define AVR32_USBB_DMA1INT_OFFSET 25 #define AVR32_USBB_DMA1INT_SIZE 1 #define AVR32_USBB_DMA2INT 26 #define AVR32_USBB_DMA2INTE 26 #define AVR32_USBB_DMA2INTEC 26 #define AVR32_USBB_DMA2INTEC_MASK 0x04000000 #define AVR32_USBB_DMA2INTEC_OFFSET 26 #define AVR32_USBB_DMA2INTEC_SIZE 1 #define AVR32_USBB_DMA2INTES 26 #define AVR32_USBB_DMA2INTES_MASK 0x04000000 #define AVR32_USBB_DMA2INTES_OFFSET 26 #define AVR32_USBB_DMA2INTES_SIZE 1 #define AVR32_USBB_DMA2INTE_MASK 0x04000000 #define AVR32_USBB_DMA2INTE_OFFSET 26 #define AVR32_USBB_DMA2INTE_SIZE 1 #define AVR32_USBB_DMA2INTS 26 #define AVR32_USBB_DMA2INTS_MASK 0x04000000 #define AVR32_USBB_DMA2INTS_OFFSET 26 #define AVR32_USBB_DMA2INTS_SIZE 1 #define AVR32_USBB_DMA2INT_MASK 0x04000000 #define AVR32_USBB_DMA2INT_OFFSET 26 #define AVR32_USBB_DMA2INT_SIZE 1 #define AVR32_USBB_DMA3INT 27 #define AVR32_USBB_DMA3INTE 27 #define AVR32_USBB_DMA3INTEC 27 #define AVR32_USBB_DMA3INTEC_MASK 0x08000000 #define AVR32_USBB_DMA3INTEC_OFFSET 27 #define AVR32_USBB_DMA3INTEC_SIZE 1 #define AVR32_USBB_DMA3INTES 27 #define AVR32_USBB_DMA3INTES_MASK 0x08000000 #define AVR32_USBB_DMA3INTES_OFFSET 27 #define AVR32_USBB_DMA3INTES_SIZE 1 #define AVR32_USBB_DMA3INTE_MASK 0x08000000 #define AVR32_USBB_DMA3INTE_OFFSET 27 #define AVR32_USBB_DMA3INTE_SIZE 1 #define AVR32_USBB_DMA3INTS 27 #define AVR32_USBB_DMA3INTS_MASK 0x08000000 #define AVR32_USBB_DMA3INTS_OFFSET 27 #define AVR32_USBB_DMA3INTS_SIZE 1 #define AVR32_USBB_DMA3INT_MASK 0x08000000 #define AVR32_USBB_DMA3INT_OFFSET 27 #define AVR32_USBB_DMA3INT_SIZE 1 #define AVR32_USBB_DMA4INT 28 #define AVR32_USBB_DMA4INTE 28 #define AVR32_USBB_DMA4INTEC 28 #define AVR32_USBB_DMA4INTEC_MASK 0x10000000 #define AVR32_USBB_DMA4INTEC_OFFSET 28 #define AVR32_USBB_DMA4INTEC_SIZE 1 #define AVR32_USBB_DMA4INTES 28 #define AVR32_USBB_DMA4INTES_MASK 0x10000000 #define AVR32_USBB_DMA4INTES_OFFSET 28 #define AVR32_USBB_DMA4INTES_SIZE 1 #define AVR32_USBB_DMA4INTE_MASK 0x10000000 #define AVR32_USBB_DMA4INTE_OFFSET 28 #define AVR32_USBB_DMA4INTE_SIZE 1 #define AVR32_USBB_DMA4INTS 28 #define AVR32_USBB_DMA4INTS_MASK 0x10000000 #define AVR32_USBB_DMA4INTS_OFFSET 28 #define AVR32_USBB_DMA4INTS_SIZE 1 #define AVR32_USBB_DMA4INT_MASK 0x10000000 #define AVR32_USBB_DMA4INT_OFFSET 28 #define AVR32_USBB_DMA4INT_SIZE 1 #define AVR32_USBB_DMA5INT 29 #define AVR32_USBB_DMA5INTE 29 #define AVR32_USBB_DMA5INTEC 29 #define AVR32_USBB_DMA5INTEC_MASK 0x20000000 #define AVR32_USBB_DMA5INTEC_OFFSET 29 #define AVR32_USBB_DMA5INTEC_SIZE 1 #define AVR32_USBB_DMA5INTES 29 #define AVR32_USBB_DMA5INTES_MASK 0x20000000 #define AVR32_USBB_DMA5INTES_OFFSET 29 #define AVR32_USBB_DMA5INTES_SIZE 1 #define AVR32_USBB_DMA5INTE_MASK 0x20000000 #define AVR32_USBB_DMA5INTE_OFFSET 29 #define AVR32_USBB_DMA5INTE_SIZE 1 #define AVR32_USBB_DMA5INTS 29 #define AVR32_USBB_DMA5INTS_MASK 0x20000000 #define AVR32_USBB_DMA5INTS_OFFSET 29 #define AVR32_USBB_DMA5INTS_SIZE 1 #define AVR32_USBB_DMA5INT_MASK 0x20000000 #define AVR32_USBB_DMA5INT_OFFSET 29 #define AVR32_USBB_DMA5INT_SIZE 1 #define AVR32_USBB_DMA6INT 30 #define AVR32_USBB_DMA6INTE 30 #define AVR32_USBB_DMA6INTEC 30 #define AVR32_USBB_DMA6INTEC_MASK 0x40000000 #define AVR32_USBB_DMA6INTEC_OFFSET 30 #define AVR32_USBB_DMA6INTEC_SIZE 1 #define AVR32_USBB_DMA6INTES 30 #define AVR32_USBB_DMA6INTES_MASK 0x40000000 #define AVR32_USBB_DMA6INTES_OFFSET 30 #define AVR32_USBB_DMA6INTES_SIZE 1 #define AVR32_USBB_DMA6INTE_MASK 0x40000000 #define AVR32_USBB_DMA6INTE_OFFSET 30 #define AVR32_USBB_DMA6INTE_SIZE 1 #define AVR32_USBB_DMA6INTS 30 #define AVR32_USBB_DMA6INTS_MASK 0x40000000 #define AVR32_USBB_DMA6INTS_OFFSET 30 #define AVR32_USBB_DMA6INTS_SIZE 1 #define AVR32_USBB_DMA6INT_MASK 0x40000000 #define AVR32_USBB_DMA6INT_OFFSET 30 #define AVR32_USBB_DMA6INT_SIZE 1 #define AVR32_USBB_DMAEND_EN 3 #define AVR32_USBB_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_DMAEND_EN_OFFSET 3 #define AVR32_USBB_DMAEND_EN_SIZE 1 #define AVR32_USBB_DMA_BUFFER_SIZE 7 #define AVR32_USBB_DMA_BUFFER_SIZE_16_BITS 0x00000000 #define AVR32_USBB_DMA_BUFFER_SIZE_24_BITS 0x00000001 #define AVR32_USBB_DMA_BUFFER_SIZE_MASK 0x00000080 #define AVR32_USBB_DMA_BUFFER_SIZE_OFFSET 7 #define AVR32_USBB_DMA_BUFFER_SIZE_SIZE 1 #define AVR32_USBB_DMA_CHANNEL_NBR 4 #define AVR32_USBB_DMA_CHANNEL_NBR_MASK 0x00000070 #define AVR32_USBB_DMA_CHANNEL_NBR_OFFSET 4 #define AVR32_USBB_DMA_CHANNEL_NBR_SIZE 3 #define AVR32_USBB_DMA_FIFO_WORD_DEPTH 8 #define AVR32_USBB_DMA_FIFO_WORD_DEPTH_MASK 0x00000f00 #define AVR32_USBB_DMA_FIFO_WORD_DEPTH_OFFSET 8 #define AVR32_USBB_DMA_FIFO_WORD_DEPTH_SIZE 4 #define AVR32_USBB_DOUBLE 0x00000001 #define AVR32_USBB_DRDSTATE 0 #define AVR32_USBB_DRDSTATE_A_HOST 0x00000003 #define AVR32_USBB_DRDSTATE_A_IDLE 0x00000000 #define AVR32_USBB_DRDSTATE_A_PERIPHERAL 0x00000005 #define AVR32_USBB_DRDSTATE_A_SUSPEND 0x00000004 #define AVR32_USBB_DRDSTATE_A_VBUS_ERR 0x00000007 #define AVR32_USBB_DRDSTATE_A_WAIT_BCON 0x00000002 #define AVR32_USBB_DRDSTATE_A_WAIT_DISCHARGE 0x00000008 #define AVR32_USBB_DRDSTATE_A_WAIT_VFALL 0x00000006 #define AVR32_USBB_DRDSTATE_A_WAIT_VRISE 0x00000001 #define AVR32_USBB_DRDSTATE_B_HOST 0x0000000e #define AVR32_USBB_DRDSTATE_B_IDLE 0x00000009 #define AVR32_USBB_DRDSTATE_B_PERIPHERAL 0x0000000a #define AVR32_USBB_DRDSTATE_B_SRP_INIT 0x0000000f #define AVR32_USBB_DRDSTATE_B_WAIT_ACON 0x0000000d #define AVR32_USBB_DRDSTATE_B_WAIT_BEGIN_HNP 0x0000000b #define AVR32_USBB_DRDSTATE_B_WAIT_DISCHARGE 0x0000000c #define AVR32_USBB_DRDSTATE_MASK 0x0000000f #define AVR32_USBB_DRDSTATE_OFFSET 0 #define AVR32_USBB_DRDSTATE_SIZE 4 #define AVR32_USBB_DTSEQ 8 #define AVR32_USBB_DTSEQ_MASK 0x00000300 #define AVR32_USBB_DTSEQ_OFFSET 8 #define AVR32_USBB_DTSEQ_SIZE 2 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_1 17 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_10 26 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_10_MASK 0x04000000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_10_OFFSET 26 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_10_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_11 27 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_11_MASK 0x08000000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_11_OFFSET 27 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_11_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_12 28 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_12_MASK 0x10000000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_12_OFFSET 28 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_12_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_13 29 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_13_MASK 0x20000000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_13_OFFSET 29 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_13_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_14 30 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_14_MASK 0x40000000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_14_OFFSET 30 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_14_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_15 31 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_15_MASK 0x80000000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_15_OFFSET 31 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_15_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_1_MASK 0x00020000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_1_OFFSET 17 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_1_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_2 18 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_2_MASK 0x00040000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_2_OFFSET 18 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_2_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_3 19 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_3_MASK 0x00080000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_3_OFFSET 19 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_3_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_4 20 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_4_MASK 0x00100000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_4_OFFSET 20 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_4_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_5 21 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_5_MASK 0x00200000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_5_OFFSET 21 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_5_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_6 22 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_6_MASK 0x00400000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_6_OFFSET 22 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_6_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_7 23 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_7_MASK 0x00800000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_7_OFFSET 23 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_7_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_8 24 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_8_MASK 0x01000000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_8_OFFSET 24 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_8_SIZE 1 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_9 25 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_9_MASK 0x02000000 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_9_OFFSET 25 #define AVR32_USBB_EN_HIGH_BD_ISO_EPT_9_SIZE 1 #define AVR32_USBB_EOBUFF_IRQ_EN 5 #define AVR32_USBB_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_EOCH_BUFF_STA 5 #define AVR32_USBB_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_EORSM 5 #define AVR32_USBB_EORSMC 5 #define AVR32_USBB_EORSMC_MASK 0x00000020 #define AVR32_USBB_EORSMC_OFFSET 5 #define AVR32_USBB_EORSMC_SIZE 1 #define AVR32_USBB_EORSME 5 #define AVR32_USBB_EORSMEC 5 #define AVR32_USBB_EORSMEC_MASK 0x00000020 #define AVR32_USBB_EORSMEC_OFFSET 5 #define AVR32_USBB_EORSMEC_SIZE 1 #define AVR32_USBB_EORSMES 5 #define AVR32_USBB_EORSMES_MASK 0x00000020 #define AVR32_USBB_EORSMES_OFFSET 5 #define AVR32_USBB_EORSMES_SIZE 1 #define AVR32_USBB_EORSME_MASK 0x00000020 #define AVR32_USBB_EORSME_OFFSET 5 #define AVR32_USBB_EORSME_SIZE 1 #define AVR32_USBB_EORSMS 5 #define AVR32_USBB_EORSMS_MASK 0x00000020 #define AVR32_USBB_EORSMS_OFFSET 5 #define AVR32_USBB_EORSMS_SIZE 1 #define AVR32_USBB_EORSM_MASK 0x00000020 #define AVR32_USBB_EORSM_OFFSET 5 #define AVR32_USBB_EORSM_SIZE 1 #define AVR32_USBB_EORST 3 #define AVR32_USBB_EORSTC 3 #define AVR32_USBB_EORSTC_MASK 0x00000008 #define AVR32_USBB_EORSTC_OFFSET 3 #define AVR32_USBB_EORSTC_SIZE 1 #define AVR32_USBB_EORSTE 3 #define AVR32_USBB_EORSTEC 3 #define AVR32_USBB_EORSTEC_MASK 0x00000008 #define AVR32_USBB_EORSTEC_OFFSET 3 #define AVR32_USBB_EORSTEC_SIZE 1 #define AVR32_USBB_EORSTES 3 #define AVR32_USBB_EORSTES_MASK 0x00000008 #define AVR32_USBB_EORSTES_OFFSET 3 #define AVR32_USBB_EORSTES_SIZE 1 #define AVR32_USBB_EORSTE_MASK 0x00000008 #define AVR32_USBB_EORSTE_OFFSET 3 #define AVR32_USBB_EORSTE_SIZE 1 #define AVR32_USBB_EORSTS 3 #define AVR32_USBB_EORSTS_MASK 0x00000008 #define AVR32_USBB_EORSTS_OFFSET 3 #define AVR32_USBB_EORSTS_SIZE 1 #define AVR32_USBB_EORST_MASK 0x00000008 #define AVR32_USBB_EORST_OFFSET 3 #define AVR32_USBB_EORST_SIZE 1 #define AVR32_USBB_EOT_IRQ_EN 4 #define AVR32_USBB_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_EOT_STA 4 #define AVR32_USBB_EOT_STA_MASK 0x00000010 #define AVR32_USBB_EOT_STA_OFFSET 4 #define AVR32_USBB_EOT_STA_SIZE 1 #define AVR32_USBB_EP0INT 12 #define AVR32_USBB_EP0INTE 12 #define AVR32_USBB_EP0INTEC 12 #define AVR32_USBB_EP0INTEC_MASK 0x00001000 #define AVR32_USBB_EP0INTEC_OFFSET 12 #define AVR32_USBB_EP0INTEC_SIZE 1 #define AVR32_USBB_EP0INTES 12 #define AVR32_USBB_EP0INTES_MASK 0x00001000 #define AVR32_USBB_EP0INTES_OFFSET 12 #define AVR32_USBB_EP0INTES_SIZE 1 #define AVR32_USBB_EP0INTE_MASK 0x00001000 #define AVR32_USBB_EP0INTE_OFFSET 12 #define AVR32_USBB_EP0INTE_SIZE 1 #define AVR32_USBB_EP0INT_MASK 0x00001000 #define AVR32_USBB_EP0INT_OFFSET 12 #define AVR32_USBB_EP0INT_SIZE 1 #define AVR32_USBB_EP1INT 13 #define AVR32_USBB_EP1INTE 13 #define AVR32_USBB_EP1INTEC 13 #define AVR32_USBB_EP1INTEC_MASK 0x00002000 #define AVR32_USBB_EP1INTEC_OFFSET 13 #define AVR32_USBB_EP1INTEC_SIZE 1 #define AVR32_USBB_EP1INTES 13 #define AVR32_USBB_EP1INTES_MASK 0x00002000 #define AVR32_USBB_EP1INTES_OFFSET 13 #define AVR32_USBB_EP1INTES_SIZE 1 #define AVR32_USBB_EP1INTE_MASK 0x00002000 #define AVR32_USBB_EP1INTE_OFFSET 13 #define AVR32_USBB_EP1INTE_SIZE 1 #define AVR32_USBB_EP1INT_MASK 0x00002000 #define AVR32_USBB_EP1INT_OFFSET 13 #define AVR32_USBB_EP1INT_SIZE 1 #define AVR32_USBB_EP2INT 14 #define AVR32_USBB_EP2INTE 14 #define AVR32_USBB_EP2INTEC 14 #define AVR32_USBB_EP2INTEC_MASK 0x00004000 #define AVR32_USBB_EP2INTEC_OFFSET 14 #define AVR32_USBB_EP2INTEC_SIZE 1 #define AVR32_USBB_EP2INTES 14 #define AVR32_USBB_EP2INTES_MASK 0x00004000 #define AVR32_USBB_EP2INTES_OFFSET 14 #define AVR32_USBB_EP2INTES_SIZE 1 #define AVR32_USBB_EP2INTE_MASK 0x00004000 #define AVR32_USBB_EP2INTE_OFFSET 14 #define AVR32_USBB_EP2INTE_SIZE 1 #define AVR32_USBB_EP2INT_MASK 0x00004000 #define AVR32_USBB_EP2INT_OFFSET 14 #define AVR32_USBB_EP2INT_SIZE 1 #define AVR32_USBB_EP3INT 15 #define AVR32_USBB_EP3INTE 15 #define AVR32_USBB_EP3INTEC 15 #define AVR32_USBB_EP3INTEC_MASK 0x00008000 #define AVR32_USBB_EP3INTEC_OFFSET 15 #define AVR32_USBB_EP3INTEC_SIZE 1 #define AVR32_USBB_EP3INTES 15 #define AVR32_USBB_EP3INTES_MASK 0x00008000 #define AVR32_USBB_EP3INTES_OFFSET 15 #define AVR32_USBB_EP3INTES_SIZE 1 #define AVR32_USBB_EP3INTE_MASK 0x00008000 #define AVR32_USBB_EP3INTE_OFFSET 15 #define AVR32_USBB_EP3INTE_SIZE 1 #define AVR32_USBB_EP3INT_MASK 0x00008000 #define AVR32_USBB_EP3INT_OFFSET 15 #define AVR32_USBB_EP3INT_SIZE 1 #define AVR32_USBB_EP4INT 16 #define AVR32_USBB_EP4INTE 16 #define AVR32_USBB_EP4INTEC 16 #define AVR32_USBB_EP4INTEC_MASK 0x00010000 #define AVR32_USBB_EP4INTEC_OFFSET 16 #define AVR32_USBB_EP4INTEC_SIZE 1 #define AVR32_USBB_EP4INTES 16 #define AVR32_USBB_EP4INTES_MASK 0x00010000 #define AVR32_USBB_EP4INTES_OFFSET 16 #define AVR32_USBB_EP4INTES_SIZE 1 #define AVR32_USBB_EP4INTE_MASK 0x00010000 #define AVR32_USBB_EP4INTE_OFFSET 16 #define AVR32_USBB_EP4INTE_SIZE 1 #define AVR32_USBB_EP4INT_MASK 0x00010000 #define AVR32_USBB_EP4INT_OFFSET 16 #define AVR32_USBB_EP4INT_SIZE 1 #define AVR32_USBB_EP5INT 17 #define AVR32_USBB_EP5INTE 17 #define AVR32_USBB_EP5INTEC 17 #define AVR32_USBB_EP5INTEC_MASK 0x00020000 #define AVR32_USBB_EP5INTEC_OFFSET 17 #define AVR32_USBB_EP5INTEC_SIZE 1 #define AVR32_USBB_EP5INTES 17 #define AVR32_USBB_EP5INTES_MASK 0x00020000 #define AVR32_USBB_EP5INTES_OFFSET 17 #define AVR32_USBB_EP5INTES_SIZE 1 #define AVR32_USBB_EP5INTE_MASK 0x00020000 #define AVR32_USBB_EP5INTE_OFFSET 17 #define AVR32_USBB_EP5INTE_SIZE 1 #define AVR32_USBB_EP5INT_MASK 0x00020000 #define AVR32_USBB_EP5INT_OFFSET 17 #define AVR32_USBB_EP5INT_SIZE 1 #define AVR32_USBB_EP6INT 18 #define AVR32_USBB_EP6INTE 18 #define AVR32_USBB_EP6INTEC 18 #define AVR32_USBB_EP6INTEC_MASK 0x00040000 #define AVR32_USBB_EP6INTEC_OFFSET 18 #define AVR32_USBB_EP6INTEC_SIZE 1 #define AVR32_USBB_EP6INTES 18 #define AVR32_USBB_EP6INTES_MASK 0x00040000 #define AVR32_USBB_EP6INTES_OFFSET 18 #define AVR32_USBB_EP6INTES_SIZE 1 #define AVR32_USBB_EP6INTE_MASK 0x00040000 #define AVR32_USBB_EP6INTE_OFFSET 18 #define AVR32_USBB_EP6INTE_SIZE 1 #define AVR32_USBB_EP6INT_MASK 0x00040000 #define AVR32_USBB_EP6INT_OFFSET 18 #define AVR32_USBB_EP6INT_SIZE 1 #define AVR32_USBB_EPBK 2 #define AVR32_USBB_EPBK_DOUBLE 0x00000001 #define AVR32_USBB_EPBK_MASK 0x0000000c #define AVR32_USBB_EPBK_OFFSET 2 #define AVR32_USBB_EPBK_SINGLE 0x00000000 #define AVR32_USBB_EPBK_SIZE 2 #define AVR32_USBB_EPBK_TRIPLE 0x00000002 #define AVR32_USBB_EPDIR 8 #define AVR32_USBB_EPDIR_IN 0x00000001 #define AVR32_USBB_EPDIR_MASK 0x00000100 #define AVR32_USBB_EPDIR_OFFSET 8 #define AVR32_USBB_EPDIR_OUT 0x00000000 #define AVR32_USBB_EPDIR_SIZE 1 #define AVR32_USBB_EPDISHDMA 16 #define AVR32_USBB_EPDISHDMAC 16 #define AVR32_USBB_EPDISHDMAC_MASK 0x00010000 #define AVR32_USBB_EPDISHDMAC_OFFSET 16 #define AVR32_USBB_EPDISHDMAC_SIZE 1 #define AVR32_USBB_EPDISHDMAS 16 #define AVR32_USBB_EPDISHDMAS_MASK 0x00010000 #define AVR32_USBB_EPDISHDMAS_OFFSET 16 #define AVR32_USBB_EPDISHDMAS_SIZE 1 #define AVR32_USBB_EPDISHDMA_MASK 0x00010000 #define AVR32_USBB_EPDISHDMA_OFFSET 16 #define AVR32_USBB_EPDISHDMA_SIZE 1 #define AVR32_USBB_EPEN0 0 #define AVR32_USBB_EPEN0_MASK 0x00000001 #define AVR32_USBB_EPEN0_OFFSET 0 #define AVR32_USBB_EPEN0_SIZE 1 #define AVR32_USBB_EPEN1 1 #define AVR32_USBB_EPEN1_MASK 0x00000002 #define AVR32_USBB_EPEN1_OFFSET 1 #define AVR32_USBB_EPEN1_SIZE 1 #define AVR32_USBB_EPEN2 2 #define AVR32_USBB_EPEN2_MASK 0x00000004 #define AVR32_USBB_EPEN2_OFFSET 2 #define AVR32_USBB_EPEN2_SIZE 1 #define AVR32_USBB_EPEN3 3 #define AVR32_USBB_EPEN3_MASK 0x00000008 #define AVR32_USBB_EPEN3_OFFSET 3 #define AVR32_USBB_EPEN3_SIZE 1 #define AVR32_USBB_EPEN4 4 #define AVR32_USBB_EPEN4_MASK 0x00000010 #define AVR32_USBB_EPEN4_OFFSET 4 #define AVR32_USBB_EPEN4_SIZE 1 #define AVR32_USBB_EPEN5 5 #define AVR32_USBB_EPEN5_MASK 0x00000020 #define AVR32_USBB_EPEN5_OFFSET 5 #define AVR32_USBB_EPEN5_SIZE 1 #define AVR32_USBB_EPEN6 6 #define AVR32_USBB_EPEN6_MASK 0x00000040 #define AVR32_USBB_EPEN6_OFFSET 6 #define AVR32_USBB_EPEN6_SIZE 1 #define AVR32_USBB_EPRST0 16 #define AVR32_USBB_EPRST0_MASK 0x00010000 #define AVR32_USBB_EPRST0_OFFSET 16 #define AVR32_USBB_EPRST0_SIZE 1 #define AVR32_USBB_EPRST1 17 #define AVR32_USBB_EPRST1_MASK 0x00020000 #define AVR32_USBB_EPRST1_OFFSET 17 #define AVR32_USBB_EPRST1_SIZE 1 #define AVR32_USBB_EPRST2 18 #define AVR32_USBB_EPRST2_MASK 0x00040000 #define AVR32_USBB_EPRST2_OFFSET 18 #define AVR32_USBB_EPRST2_SIZE 1 #define AVR32_USBB_EPRST3 19 #define AVR32_USBB_EPRST3_MASK 0x00080000 #define AVR32_USBB_EPRST3_OFFSET 19 #define AVR32_USBB_EPRST3_SIZE 1 #define AVR32_USBB_EPRST4 20 #define AVR32_USBB_EPRST4_MASK 0x00100000 #define AVR32_USBB_EPRST4_OFFSET 20 #define AVR32_USBB_EPRST4_SIZE 1 #define AVR32_USBB_EPRST5 21 #define AVR32_USBB_EPRST5_MASK 0x00200000 #define AVR32_USBB_EPRST5_OFFSET 21 #define AVR32_USBB_EPRST5_SIZE 1 #define AVR32_USBB_EPRST6 22 #define AVR32_USBB_EPRST6_MASK 0x00400000 #define AVR32_USBB_EPRST6_OFFSET 22 #define AVR32_USBB_EPRST6_SIZE 1 #define AVR32_USBB_EPSIZE 4 #define AVR32_USBB_EPSIZE_1024 0x00000007 #define AVR32_USBB_EPSIZE_128 0x00000004 #define AVR32_USBB_EPSIZE_16 0x00000001 #define AVR32_USBB_EPSIZE_256 0x00000005 #define AVR32_USBB_EPSIZE_32 0x00000002 #define AVR32_USBB_EPSIZE_512 0x00000006 #define AVR32_USBB_EPSIZE_64 0x00000003 #define AVR32_USBB_EPSIZE_8 0x00000000 #define AVR32_USBB_EPSIZE_MASK 0x00000070 #define AVR32_USBB_EPSIZE_OFFSET 4 #define AVR32_USBB_EPSIZE_SIZE 3 #define AVR32_USBB_EPTYPE 11 #define AVR32_USBB_EPTYPE_BULK 0x00000002 #define AVR32_USBB_EPTYPE_CONTROL 0x00000000 #define AVR32_USBB_EPTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_EPTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_EPTYPE_MASK 0x00001800 #define AVR32_USBB_EPTYPE_OFFSET 11 #define AVR32_USBB_EPTYPE_SIZE 2 #define AVR32_USBB_EPT_NBR_MAX 0 #define AVR32_USBB_EPT_NBR_MAX_MASK 0x0000000f #define AVR32_USBB_EPT_NBR_MAX_OFFSET 0 #define AVR32_USBB_EPT_NBR_MAX_SIZE 4 #define AVR32_USBB_EP_DATA 0 #define AVR32_USBB_EP_DATA_MASK 0xffffffff #define AVR32_USBB_EP_DATA_OFFSET 0 #define AVR32_USBB_EP_DATA_SIZE 32 #define AVR32_USBB_ERRORTRANS 10 #define AVR32_USBB_ERRORTRANSE 10 #define AVR32_USBB_ERRORTRANSEC 10 #define AVR32_USBB_ERRORTRANSEC_MASK 0x00000400 #define AVR32_USBB_ERRORTRANSEC_OFFSET 10 #define AVR32_USBB_ERRORTRANSEC_SIZE 1 #define AVR32_USBB_ERRORTRANSES 10 #define AVR32_USBB_ERRORTRANSES_MASK 0x00000400 #define AVR32_USBB_ERRORTRANSES_OFFSET 10 #define AVR32_USBB_ERRORTRANSES_SIZE 1 #define AVR32_USBB_ERRORTRANSE_MASK 0x00000400 #define AVR32_USBB_ERRORTRANSE_OFFSET 10 #define AVR32_USBB_ERRORTRANSE_SIZE 1 #define AVR32_USBB_ERRORTRANSS 10 #define AVR32_USBB_ERRORTRANSS_MASK 0x00000400 #define AVR32_USBB_ERRORTRANSS_OFFSET 10 #define AVR32_USBB_ERRORTRANSS_SIZE 1 #define AVR32_USBB_ERRORTRANS_MASK 0x00000400 #define AVR32_USBB_ERRORTRANS_OFFSET 10 #define AVR32_USBB_ERRORTRANS_SIZE 1 #define AVR32_USBB_FIFOCON 14 #define AVR32_USBB_FIFOCONC 14 #define AVR32_USBB_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_FIFOCONC_OFFSET 14 #define AVR32_USBB_FIFOCONC_SIZE 1 #define AVR32_USBB_FIFOCON_MASK 0x00004000 #define AVR32_USBB_FIFOCON_OFFSET 14 #define AVR32_USBB_FIFOCON_SIZE 1 #define AVR32_USBB_FIFO_MAX_SIZE 12 #define AVR32_USBB_FIFO_MAX_SIZE_GE_16384 0x00000007 #define AVR32_USBB_FIFO_MAX_SIZE_LT_1024 0x00000002 #define AVR32_USBB_FIFO_MAX_SIZE_LT_16384 0x00000006 #define AVR32_USBB_FIFO_MAX_SIZE_LT_2048 0x00000003 #define AVR32_USBB_FIFO_MAX_SIZE_LT_256 0x00000000 #define AVR32_USBB_FIFO_MAX_SIZE_LT_4096 0x00000004 #define AVR32_USBB_FIFO_MAX_SIZE_LT_512 0x00000001 #define AVR32_USBB_FIFO_MAX_SIZE_LT_8192 0x00000005 #define AVR32_USBB_FIFO_MAX_SIZE_MASK 0x00007000 #define AVR32_USBB_FIFO_MAX_SIZE_OFFSET 12 #define AVR32_USBB_FIFO_MAX_SIZE_SIZE 3 #define AVR32_USBB_FLENHIGH 16 #define AVR32_USBB_FLENHIGH_MASK 0x00ff0000 #define AVR32_USBB_FLENHIGH_OFFSET 16 #define AVR32_USBB_FLENHIGH_SIZE 8 #define AVR32_USBB_FNCERR 15 #define AVR32_USBB_FNCERR_MASK 0x00008000 #define AVR32_USBB_FNCERR_OFFSET 15 #define AVR32_USBB_FNCERR_SIZE 1 #define AVR32_USBB_FNUM 3 #define AVR32_USBB_FNUM_MASK 0x00003ff8 #define AVR32_USBB_FNUM_OFFSET 3 #define AVR32_USBB_FNUM_SIZE 11 #define AVR32_USBB_FORCEHSRESETTO50MS 7 #define AVR32_USBB_FORCEHSRESETTO50MS_MASK 0x00000080 #define AVR32_USBB_FORCEHSRESETTO50MS_OFFSET 7 #define AVR32_USBB_FORCEHSRESETTO50MS_SIZE 1 #define AVR32_USBB_FORCESUSPENDMTO1 4 #define AVR32_USBB_FORCESUSPENDMTO1_MASK 0x00000010 #define AVR32_USBB_FORCESUSPENDMTO1_OFFSET 4 #define AVR32_USBB_FORCESUSPENDMTO1_SIZE 1 #define AVR32_USBB_FRZCLK_SIZE 1 #define AVR32_USBB_FULL 0x00000000 #define AVR32_USBB_FULLDETACHEN 0 #define AVR32_USBB_FULLDETACHEN_MASK 0x00000001 #define AVR32_USBB_FULLDETACHEN_OFFSET 0 #define AVR32_USBB_FULLDETACHEN_SIZE 1 #define AVR32_USBB_GE_16384 0x00000007 #define AVR32_USBB_HNPERRE 6 #define AVR32_USBB_HNPERRE_MASK 0x00000040 #define AVR32_USBB_HNPERRE_OFFSET 6 #define AVR32_USBB_HNPERRE_SIZE 1 #define AVR32_USBB_HNPERRI 6 #define AVR32_USBB_HNPERRIC 6 #define AVR32_USBB_HNPERRIC_MASK 0x00000040 #define AVR32_USBB_HNPERRIC_OFFSET 6 #define AVR32_USBB_HNPERRIC_SIZE 1 #define AVR32_USBB_HNPERRIS 6 #define AVR32_USBB_HNPERRIS_MASK 0x00000040 #define AVR32_USBB_HNPERRIS_OFFSET 6 #define AVR32_USBB_HNPERRIS_SIZE 1 #define AVR32_USBB_HNPERRI_MASK 0x00000040 #define AVR32_USBB_HNPERRI_OFFSET 6 #define AVR32_USBB_HNPERRI_SIZE 1 #define AVR32_USBB_HNPREQ 11 #define AVR32_USBB_HNPREQ_MASK 0x00000800 #define AVR32_USBB_HNPREQ_OFFSET 11 #define AVR32_USBB_HNPREQ_SIZE 1 #define AVR32_USBB_HOSTHSDISCONNECTDISABLE 6 #define AVR32_USBB_HOSTHSDISCONNECTDISABLE_MASK 0x00000040 #define AVR32_USBB_HOSTHSDISCONNECTDISABLE_OFFSET 6 #define AVR32_USBB_HOSTHSDISCONNECTDISABLE_SIZE 1 #define AVR32_USBB_HSB_ADDR 0 #define AVR32_USBB_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_HSB_ADDR_OFFSET 0 #define AVR32_USBB_HSB_ADDR_SIZE 32 #define AVR32_USBB_HSOFI 5 #define AVR32_USBB_HSOFIC 5 #define AVR32_USBB_HSOFIC_MASK 0x00000020 #define AVR32_USBB_HSOFIC_OFFSET 5 #define AVR32_USBB_HSOFIC_SIZE 1 #define AVR32_USBB_HSOFIE 5 #define AVR32_USBB_HSOFIEC 5 #define AVR32_USBB_HSOFIEC_MASK 0x00000020 #define AVR32_USBB_HSOFIEC_OFFSET 5 #define AVR32_USBB_HSOFIEC_SIZE 1 #define AVR32_USBB_HSOFIES 5 #define AVR32_USBB_HSOFIES_MASK 0x00000020 #define AVR32_USBB_HSOFIES_OFFSET 5 #define AVR32_USBB_HSOFIES_SIZE 1 #define AVR32_USBB_HSOFIE_MASK 0x00000020 #define AVR32_USBB_HSOFIE_OFFSET 5 #define AVR32_USBB_HSOFIE_SIZE 1 #define AVR32_USBB_HSOFIS 5 #define AVR32_USBB_HSOFIS_MASK 0x00000020 #define AVR32_USBB_HSOFIS_OFFSET 5 #define AVR32_USBB_HSOFIS_SIZE 1 #define AVR32_USBB_HSOFI_MASK 0x00000020 #define AVR32_USBB_HSOFI_OFFSET 5 #define AVR32_USBB_HSOFI_SIZE 1 #define AVR32_USBB_HSSERIALMODE 1 #define AVR32_USBB_HSSERIALMODE_MASK 0x00000002 #define AVR32_USBB_HSSERIALMODE_OFFSET 1 #define AVR32_USBB_HSSERIALMODE_SIZE 1 #define AVR32_USBB_HWUPI 6 #define AVR32_USBB_HWUPIC 6 #define AVR32_USBB_HWUPIC_MASK 0x00000040 #define AVR32_USBB_HWUPIC_OFFSET 6 #define AVR32_USBB_HWUPIC_SIZE 1 #define AVR32_USBB_HWUPIE 6 #define AVR32_USBB_HWUPIEC 6 #define AVR32_USBB_HWUPIEC_MASK 0x00000040 #define AVR32_USBB_HWUPIEC_OFFSET 6 #define AVR32_USBB_HWUPIEC_SIZE 1 #define AVR32_USBB_HWUPIES 6 #define AVR32_USBB_HWUPIES_MASK 0x00000040 #define AVR32_USBB_HWUPIES_OFFSET 6 #define AVR32_USBB_HWUPIES_SIZE 1 #define AVR32_USBB_HWUPIE_MASK 0x00000040 #define AVR32_USBB_HWUPIE_OFFSET 6 #define AVR32_USBB_HWUPIE_SIZE 1 #define AVR32_USBB_HWUPIS 6 #define AVR32_USBB_HWUPIS_MASK 0x00000040 #define AVR32_USBB_HWUPIS_OFFSET 6 #define AVR32_USBB_HWUPIS_SIZE 1 #define AVR32_USBB_HWUPI_MASK 0x00000040 #define AVR32_USBB_HWUPI_OFFSET 6 #define AVR32_USBB_HWUPI_SIZE 1 #define AVR32_USBB_ID 10 #define AVR32_USBB_IDTE 0 #define AVR32_USBB_IDTE_MASK 0x00000001 #define AVR32_USBB_IDTE_OFFSET 0 #define AVR32_USBB_IDTE_SIZE 1 #define AVR32_USBB_IDTI 0 #define AVR32_USBB_IDTIC 0 #define AVR32_USBB_IDTIC_MASK 0x00000001 #define AVR32_USBB_IDTIC_OFFSET 0 #define AVR32_USBB_IDTIC_SIZE 1 #define AVR32_USBB_IDTIS 0 #define AVR32_USBB_IDTIS_MASK 0x00000001 #define AVR32_USBB_IDTIS_OFFSET 0 #define AVR32_USBB_IDTIS_SIZE 1 #define AVR32_USBB_IDTI_MASK 0x00000001 #define AVR32_USBB_IDTI_OFFSET 0 #define AVR32_USBB_IDTI_SIZE 1 #define AVR32_USBB_ID_MASK 0x00000400 #define AVR32_USBB_ID_OFFSET 10 #define AVR32_USBB_ID_SIZE 1 #define AVR32_USBB_IN 0x00000001 #define AVR32_USBB_INMODE 8 #define AVR32_USBB_INMODE_MASK 0x00000100 #define AVR32_USBB_INMODE_OFFSET 8 #define AVR32_USBB_INMODE_SIZE 1 #define AVR32_USBB_INRQ 0 #define AVR32_USBB_INRQ_MASK 0x000000ff #define AVR32_USBB_INRQ_OFFSET 0 #define AVR32_USBB_INRQ_SIZE 8 #define AVR32_USBB_INTERRUPT 0x00000003 #define AVR32_USBB_INTFRQ 24 #define AVR32_USBB_INTFRQ_MASK 0xff000000 #define AVR32_USBB_INTFRQ_OFFSET 24 #define AVR32_USBB_INTFRQ_SIZE 8 #define AVR32_USBB_ISOCHRONOUS 0x00000001 #define AVR32_USBB_KILLBK 13 #define AVR32_USBB_KILLBKS 13 #define AVR32_USBB_KILLBKS_MASK 0x00002000 #define AVR32_USBB_KILLBKS_OFFSET 13 #define AVR32_USBB_KILLBKS_SIZE 1 #define AVR32_USBB_KILLBK_MASK 0x00002000 #define AVR32_USBB_KILLBK_OFFSET 13 #define AVR32_USBB_KILLBK_SIZE 1 #define AVR32_USBB_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_LOADCNTA 15 #define AVR32_USBB_LOADCNTA_MASK 0x00008000 #define AVR32_USBB_LOADCNTA_OFFSET 15 #define AVR32_USBB_LOADCNTA_SIZE 1 #define AVR32_USBB_LOADCNTB 23 #define AVR32_USBB_LOADCNTB_MASK 0x00800000 #define AVR32_USBB_LOADCNTB_OFFSET 23 #define AVR32_USBB_LOADCNTB_SIZE 1 #define AVR32_USBB_LOADSOFCNT 31 #define AVR32_USBB_LOADSOFCNT_MASK 0x80000000 #define AVR32_USBB_LOADSOFCNT_OFFSET 31 #define AVR32_USBB_LOADSOFCNT_SIZE 1 #define AVR32_USBB_LOOPBACKMODE 2 #define AVR32_USBB_LOOPBACKMODE_MASK 0x00000004 #define AVR32_USBB_LOOPBACKMODE_OFFSET 2 #define AVR32_USBB_LOOPBACKMODE_SIZE 1 #define AVR32_USBB_LOW 0x00000002 #define AVR32_USBB_LS 12 #define AVR32_USBB_LS_MASK 0x00001000 #define AVR32_USBB_LS_OFFSET 12 #define AVR32_USBB_LS_SIZE 1 #define AVR32_USBB_LT_1024 0x00000002 #define AVR32_USBB_LT_16384 0x00000006 #define AVR32_USBB_LT_2048 0x00000003 #define AVR32_USBB_LT_256 0x00000000 #define AVR32_USBB_LT_4096 0x00000004 #define AVR32_USBB_LT_512 0x00000001 #define AVR32_USBB_LT_8192 0x00000005 #define AVR32_USBB_MDATAE 8 #define AVR32_USBB_MDATAEC 8 #define AVR32_USBB_MDATAEC_MASK 0x00000100 #define AVR32_USBB_MDATAEC_OFFSET 8 #define AVR32_USBB_MDATAEC_SIZE 1 #define AVR32_USBB_MDATAES 8 #define AVR32_USBB_MDATAES_MASK 0x00000100 #define AVR32_USBB_MDATAES_OFFSET 8 #define AVR32_USBB_MDATAES_SIZE 1 #define AVR32_USBB_MDATAE_MASK 0x00000100 #define AVR32_USBB_MDATAE_OFFSET 8 #define AVR32_USBB_MDATAE_SIZE 1 #define AVR32_USBB_METAL_FIX_NUM 16 #define AVR32_USBB_METAL_FIX_NUM_MASK 0x00070000 #define AVR32_USBB_METAL_FIX_NUM_OFFSET 16 #define AVR32_USBB_METAL_FIX_NUM_SIZE 3 #define AVR32_USBB_MFNUM 0 #define AVR32_USBB_MFNUM_MASK 0x00000007 #define AVR32_USBB_MFNUM_OFFSET 0 #define AVR32_USBB_MFNUM_SIZE 3 #define AVR32_USBB_MSOF 1 #define AVR32_USBB_MSOFC 1 #define AVR32_USBB_MSOFC_MASK 0x00000002 #define AVR32_USBB_MSOFC_OFFSET 1 #define AVR32_USBB_MSOFC_SIZE 1 #define AVR32_USBB_MSOFE 1 #define AVR32_USBB_MSOFEC 1 #define AVR32_USBB_MSOFEC_MASK 0x00000002 #define AVR32_USBB_MSOFEC_OFFSET 1 #define AVR32_USBB_MSOFEC_SIZE 1 #define AVR32_USBB_MSOFES 1 #define AVR32_USBB_MSOFES_MASK 0x00000002 #define AVR32_USBB_MSOFES_OFFSET 1 #define AVR32_USBB_MSOFES_SIZE 1 #define AVR32_USBB_MSOFE_MASK 0x00000002 #define AVR32_USBB_MSOFE_OFFSET 1 #define AVR32_USBB_MSOFE_SIZE 1 #define AVR32_USBB_MSOFS 1 #define AVR32_USBB_MSOFS_MASK 0x00000002 #define AVR32_USBB_MSOFS_OFFSET 1 #define AVR32_USBB_MSOFS_SIZE 1 #define AVR32_USBB_MSOF_MASK 0x00000002 #define AVR32_USBB_MSOF_OFFSET 1 #define AVR32_USBB_MSOF_SIZE 1 #define AVR32_USBB_NAKEDE 4 #define AVR32_USBB_NAKEDEC 4 #define AVR32_USBB_NAKEDEC_MASK 0x00000010 #define AVR32_USBB_NAKEDEC_OFFSET 4 #define AVR32_USBB_NAKEDEC_SIZE 1 #define AVR32_USBB_NAKEDES 4 #define AVR32_USBB_NAKEDES_MASK 0x00000010 #define AVR32_USBB_NAKEDES_OFFSET 4 #define AVR32_USBB_NAKEDES_SIZE 1 #define AVR32_USBB_NAKEDE_MASK 0x00000010 #define AVR32_USBB_NAKEDE_OFFSET 4 #define AVR32_USBB_NAKEDE_SIZE 1 #define AVR32_USBB_NAKEDI 4 #define AVR32_USBB_NAKEDIC 4 #define AVR32_USBB_NAKEDIC_MASK 0x00000010 #define AVR32_USBB_NAKEDIC_OFFSET 4 #define AVR32_USBB_NAKEDIC_SIZE 1 #define AVR32_USBB_NAKEDIS 4 #define AVR32_USBB_NAKEDIS_MASK 0x00000010 #define AVR32_USBB_NAKEDIS_OFFSET 4 #define AVR32_USBB_NAKEDIS_SIZE 1 #define AVR32_USBB_NAKEDI_MASK 0x00000010 #define AVR32_USBB_NAKEDI_OFFSET 4 #define AVR32_USBB_NAKEDI_SIZE 1 #define AVR32_USBB_NAKINE 4 #define AVR32_USBB_NAKINEC 4 #define AVR32_USBB_NAKINEC_MASK 0x00000010 #define AVR32_USBB_NAKINEC_OFFSET 4 #define AVR32_USBB_NAKINEC_SIZE 1 #define AVR32_USBB_NAKINES 4 #define AVR32_USBB_NAKINES_MASK 0x00000010 #define AVR32_USBB_NAKINES_OFFSET 4 #define AVR32_USBB_NAKINES_SIZE 1 #define AVR32_USBB_NAKINE_MASK 0x00000010 #define AVR32_USBB_NAKINE_OFFSET 4 #define AVR32_USBB_NAKINE_SIZE 1 #define AVR32_USBB_NAKINI 4 #define AVR32_USBB_NAKINIC 4 #define AVR32_USBB_NAKINIC_MASK 0x00000010 #define AVR32_USBB_NAKINIC_OFFSET 4 #define AVR32_USBB_NAKINIC_SIZE 1 #define AVR32_USBB_NAKINIS 4 #define AVR32_USBB_NAKINIS_MASK 0x00000010 #define AVR32_USBB_NAKINIS_OFFSET 4 #define AVR32_USBB_NAKINIS_SIZE 1 #define AVR32_USBB_NAKINI_MASK 0x00000010 #define AVR32_USBB_NAKINI_OFFSET 4 #define AVR32_USBB_NAKINI_SIZE 1 #define AVR32_USBB_NAKOUTE 3 #define AVR32_USBB_NAKOUTEC 3 #define AVR32_USBB_NAKOUTEC_MASK 0x00000008 #define AVR32_USBB_NAKOUTEC_OFFSET 3 #define AVR32_USBB_NAKOUTEC_SIZE 1 #define AVR32_USBB_NAKOUTES 3 #define AVR32_USBB_NAKOUTES_MASK 0x00000008 #define AVR32_USBB_NAKOUTES_OFFSET 3 #define AVR32_USBB_NAKOUTES_SIZE 1 #define AVR32_USBB_NAKOUTE_MASK 0x00000008 #define AVR32_USBB_NAKOUTE_OFFSET 3 #define AVR32_USBB_NAKOUTE_SIZE 1 #define AVR32_USBB_NAKOUTI 3 #define AVR32_USBB_NAKOUTIC 3 #define AVR32_USBB_NAKOUTIC_MASK 0x00000008 #define AVR32_USBB_NAKOUTIC_OFFSET 3 #define AVR32_USBB_NAKOUTIC_SIZE 1 #define AVR32_USBB_NAKOUTIS 3 #define AVR32_USBB_NAKOUTIS_MASK 0x00000008 #define AVR32_USBB_NAKOUTIS_OFFSET 3 #define AVR32_USBB_NAKOUTIS_SIZE 1 #define AVR32_USBB_NAKOUTI_MASK 0x00000008 #define AVR32_USBB_NAKOUTI_OFFSET 3 #define AVR32_USBB_NAKOUTI_SIZE 1 #define AVR32_USBB_NBTRANS 13 #define AVR32_USBB_NBTRANS_MASK 0x00006000 #define AVR32_USBB_NBTRANS_OFFSET 13 #define AVR32_USBB_NBTRANS_SIZE 2 #define AVR32_USBB_NBUSYBK 12 #define AVR32_USBB_NBUSYBKE 12 #define AVR32_USBB_NBUSYBKEC 12 #define AVR32_USBB_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_NBUSYBKEC_SIZE 1 #define AVR32_USBB_NBUSYBKES 12 #define AVR32_USBB_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_NBUSYBKES_OFFSET 12 #define AVR32_USBB_NBUSYBKES_SIZE 1 #define AVR32_USBB_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_NBUSYBKE_OFFSET 12 #define AVR32_USBB_NBUSYBKE_SIZE 1 #define AVR32_USBB_NBUSYBKS 12 #define AVR32_USBB_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_NBUSYBKS_OFFSET 12 #define AVR32_USBB_NBUSYBKS_SIZE 1 #define AVR32_USBB_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_NBUSYBK_OFFSET 12 #define AVR32_USBB_NBUSYBK_SIZE 2 #define AVR32_USBB_NOTHOSTDISCONNECT 6 #define AVR32_USBB_NOTHOSTDISCONNECT_MASK 0x00000040 #define AVR32_USBB_NOTHOSTDISCONNECT_OFFSET 6 #define AVR32_USBB_NOTHOSTDISCONNECT_SIZE 1 #define AVR32_USBB_NXT_DESC_ADDR 4 #define AVR32_USBB_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_NYETDIS 17 #define AVR32_USBB_NYETDISC 17 #define AVR32_USBB_NYETDISC_MASK 0x00020000 #define AVR32_USBB_NYETDISC_OFFSET 17 #define AVR32_USBB_NYETDISC_SIZE 1 #define AVR32_USBB_NYETDISS 17 #define AVR32_USBB_NYETDISS_MASK 0x00020000 #define AVR32_USBB_NYETDISS_OFFSET 17 #define AVR32_USBB_NYETDISS_SIZE 1 #define AVR32_USBB_NYETDIS_MASK 0x00020000 #define AVR32_USBB_NYETDIS_OFFSET 17 #define AVR32_USBB_NYETDIS_SIZE 1 #define AVR32_USBB_OPMODE2 16 #define AVR32_USBB_OPMODE2_MASK 0x00010000 #define AVR32_USBB_OPMODE2_OFFSET 16 #define AVR32_USBB_OPMODE2_SIZE 1 #define AVR32_USBB_OTGPADE 12 #define AVR32_USBB_OTGPADE_MASK 0x00001000 #define AVR32_USBB_OTGPADE_OFFSET 12 #define AVR32_USBB_OTGPADE_SIZE 1 #define AVR32_USBB_OVERFE 5 #define AVR32_USBB_OVERFEC 5 #define AVR32_USBB_OVERFEC_MASK 0x00000020 #define AVR32_USBB_OVERFEC_OFFSET 5 #define AVR32_USBB_OVERFEC_SIZE 1 #define AVR32_USBB_OVERFES 5 #define AVR32_USBB_OVERFES_MASK 0x00000020 #define AVR32_USBB_OVERFES_OFFSET 5 #define AVR32_USBB_OVERFES_SIZE 1 #define AVR32_USBB_OVERFE_MASK 0x00000020 #define AVR32_USBB_OVERFE_OFFSET 5 #define AVR32_USBB_OVERFE_SIZE 1 #define AVR32_USBB_OVERFI 5 #define AVR32_USBB_OVERFIC 5 #define AVR32_USBB_OVERFIC_MASK 0x00000020 #define AVR32_USBB_OVERFIC_OFFSET 5 #define AVR32_USBB_OVERFIC_SIZE 1 #define AVR32_USBB_OVERFIE 5 #define AVR32_USBB_OVERFIEC 5 #define AVR32_USBB_OVERFIEC_MASK 0x00000020 #define AVR32_USBB_OVERFIEC_OFFSET 5 #define AVR32_USBB_OVERFIEC_SIZE 1 #define AVR32_USBB_OVERFIES 5 #define AVR32_USBB_OVERFIES_MASK 0x00000020 #define AVR32_USBB_OVERFIES_OFFSET 5 #define AVR32_USBB_OVERFIES_SIZE 1 #define AVR32_USBB_OVERFIE_MASK 0x00000020 #define AVR32_USBB_OVERFIE_OFFSET 5 #define AVR32_USBB_OVERFIE_SIZE 1 #define AVR32_USBB_OVERFIS 5 #define AVR32_USBB_OVERFIS_MASK 0x00000020 #define AVR32_USBB_OVERFIS_OFFSET 5 #define AVR32_USBB_OVERFIS_SIZE 1 #define AVR32_USBB_OVERFI_MASK 0x00000020 #define AVR32_USBB_OVERFI_OFFSET 5 #define AVR32_USBB_OVERFI_SIZE 1 #define AVR32_USBB_P0INT 8 #define AVR32_USBB_P0INTE 8 #define AVR32_USBB_P0INTEC 8 #define AVR32_USBB_P0INTEC_MASK 0x00000100 #define AVR32_USBB_P0INTEC_OFFSET 8 #define AVR32_USBB_P0INTEC_SIZE 1 #define AVR32_USBB_P0INTES 8 #define AVR32_USBB_P0INTES_MASK 0x00000100 #define AVR32_USBB_P0INTES_OFFSET 8 #define AVR32_USBB_P0INTES_SIZE 1 #define AVR32_USBB_P0INTE_MASK 0x00000100 #define AVR32_USBB_P0INTE_OFFSET 8 #define AVR32_USBB_P0INTE_SIZE 1 #define AVR32_USBB_P0INT_MASK 0x00000100 #define AVR32_USBB_P0INT_OFFSET 8 #define AVR32_USBB_P0INT_SIZE 1 #define AVR32_USBB_P1INT 9 #define AVR32_USBB_P1INTE 9 #define AVR32_USBB_P1INTEC 9 #define AVR32_USBB_P1INTEC_MASK 0x00000200 #define AVR32_USBB_P1INTEC_OFFSET 9 #define AVR32_USBB_P1INTEC_SIZE 1 #define AVR32_USBB_P1INTES 9 #define AVR32_USBB_P1INTES_MASK 0x00000200 #define AVR32_USBB_P1INTES_OFFSET 9 #define AVR32_USBB_P1INTES_SIZE 1 #define AVR32_USBB_P1INTE_MASK 0x00000200 #define AVR32_USBB_P1INTE_OFFSET 9 #define AVR32_USBB_P1INTE_SIZE 1 #define AVR32_USBB_P1INT_MASK 0x00000200 #define AVR32_USBB_P1INT_OFFSET 9 #define AVR32_USBB_P1INT_SIZE 1 #define AVR32_USBB_P2INT 10 #define AVR32_USBB_P2INTE 10 #define AVR32_USBB_P2INTEC 10 #define AVR32_USBB_P2INTEC_MASK 0x00000400 #define AVR32_USBB_P2INTEC_OFFSET 10 #define AVR32_USBB_P2INTEC_SIZE 1 #define AVR32_USBB_P2INTES 10 #define AVR32_USBB_P2INTES_MASK 0x00000400 #define AVR32_USBB_P2INTES_OFFSET 10 #define AVR32_USBB_P2INTES_SIZE 1 #define AVR32_USBB_P2INTE_MASK 0x00000400 #define AVR32_USBB_P2INTE_OFFSET 10 #define AVR32_USBB_P2INTE_SIZE 1 #define AVR32_USBB_P2INT_MASK 0x00000400 #define AVR32_USBB_P2INT_OFFSET 10 #define AVR32_USBB_P2INT_SIZE 1 #define AVR32_USBB_P3INT 11 #define AVR32_USBB_P3INTE 11 #define AVR32_USBB_P3INTEC 11 #define AVR32_USBB_P3INTEC_MASK 0x00000800 #define AVR32_USBB_P3INTEC_OFFSET 11 #define AVR32_USBB_P3INTEC_SIZE 1 #define AVR32_USBB_P3INTES 11 #define AVR32_USBB_P3INTES_MASK 0x00000800 #define AVR32_USBB_P3INTES_OFFSET 11 #define AVR32_USBB_P3INTES_SIZE 1 #define AVR32_USBB_P3INTE_MASK 0x00000800 #define AVR32_USBB_P3INTE_OFFSET 11 #define AVR32_USBB_P3INTE_SIZE 1 #define AVR32_USBB_P3INT_MASK 0x00000800 #define AVR32_USBB_P3INT_OFFSET 11 #define AVR32_USBB_P3INT_SIZE 1 #define AVR32_USBB_P4INT 12 #define AVR32_USBB_P4INTE 12 #define AVR32_USBB_P4INTEC 12 #define AVR32_USBB_P4INTEC_MASK 0x00001000 #define AVR32_USBB_P4INTEC_OFFSET 12 #define AVR32_USBB_P4INTEC_SIZE 1 #define AVR32_USBB_P4INTES 12 #define AVR32_USBB_P4INTES_MASK 0x00001000 #define AVR32_USBB_P4INTES_OFFSET 12 #define AVR32_USBB_P4INTES_SIZE 1 #define AVR32_USBB_P4INTE_MASK 0x00001000 #define AVR32_USBB_P4INTE_OFFSET 12 #define AVR32_USBB_P4INTE_SIZE 1 #define AVR32_USBB_P4INT_MASK 0x00001000 #define AVR32_USBB_P4INT_OFFSET 12 #define AVR32_USBB_P4INT_SIZE 1 #define AVR32_USBB_P5INT 13 #define AVR32_USBB_P5INTE 13 #define AVR32_USBB_P5INTEC 13 #define AVR32_USBB_P5INTEC_MASK 0x00002000 #define AVR32_USBB_P5INTEC_OFFSET 13 #define AVR32_USBB_P5INTEC_SIZE 1 #define AVR32_USBB_P5INTES 13 #define AVR32_USBB_P5INTES_MASK 0x00002000 #define AVR32_USBB_P5INTES_OFFSET 13 #define AVR32_USBB_P5INTES_SIZE 1 #define AVR32_USBB_P5INTE_MASK 0x00002000 #define AVR32_USBB_P5INTE_OFFSET 13 #define AVR32_USBB_P5INTE_SIZE 1 #define AVR32_USBB_P5INT_MASK 0x00002000 #define AVR32_USBB_P5INT_OFFSET 13 #define AVR32_USBB_P5INT_SIZE 1 #define AVR32_USBB_P6INT 14 #define AVR32_USBB_P6INTE 14 #define AVR32_USBB_P6INTEC 14 #define AVR32_USBB_P6INTEC_MASK 0x00004000 #define AVR32_USBB_P6INTEC_OFFSET 14 #define AVR32_USBB_P6INTEC_SIZE 1 #define AVR32_USBB_P6INTES 14 #define AVR32_USBB_P6INTES_MASK 0x00004000 #define AVR32_USBB_P6INTES_OFFSET 14 #define AVR32_USBB_P6INTES_SIZE 1 #define AVR32_USBB_P6INTE_MASK 0x00004000 #define AVR32_USBB_P6INTE_OFFSET 14 #define AVR32_USBB_P6INTE_SIZE 1 #define AVR32_USBB_P6INT_MASK 0x00004000 #define AVR32_USBB_P6INT_OFFSET 14 #define AVR32_USBB_P6INT_SIZE 1 #define AVR32_USBB_PBK 2 #define AVR32_USBB_PBK_DOUBLE 0x00000001 #define AVR32_USBB_PBK_MASK 0x0000000c #define AVR32_USBB_PBK_OFFSET 2 #define AVR32_USBB_PBK_SINGLE 0x00000000 #define AVR32_USBB_PBK_SIZE 2 #define AVR32_USBB_PBK_TRIPLE 0x00000002 #define AVR32_USBB_PBYCT 20 #define AVR32_USBB_PBYCT_MASK 0x7ff00000 #define AVR32_USBB_PBYCT_OFFSET 20 #define AVR32_USBB_PBYCT_SIZE 11 #define AVR32_USBB_PDISHDMA 16 #define AVR32_USBB_PDISHDMAC 16 #define AVR32_USBB_PDISHDMAC_MASK 0x00010000 #define AVR32_USBB_PDISHDMAC_OFFSET 16 #define AVR32_USBB_PDISHDMAC_SIZE 1 #define AVR32_USBB_PDISHDMAS 16 #define AVR32_USBB_PDISHDMAS_MASK 0x00010000 #define AVR32_USBB_PDISHDMAS_OFFSET 16 #define AVR32_USBB_PDISHDMAS_SIZE 1 #define AVR32_USBB_PDISHDMA_MASK 0x00010000 #define AVR32_USBB_PDISHDMA_OFFSET 16 #define AVR32_USBB_PDISHDMA_SIZE 1 #define AVR32_USBB_PD_TMOUT_CNT 0x00000002 #define AVR32_USBB_PD_TMOUT_CNT_105_MS 0x00000001 #define AVR32_USBB_PD_TMOUT_CNT_118_MS 0x00000002 #define AVR32_USBB_PD_TMOUT_CNT_131_MS 0x00000003 #define AVR32_USBB_PD_TMOUT_CNT_93_MS 0x00000000 #define AVR32_USBB_PEN0 0 #define AVR32_USBB_PEN0_MASK 0x00000001 #define AVR32_USBB_PEN0_OFFSET 0 #define AVR32_USBB_PEN0_SIZE 1 #define AVR32_USBB_PEN1 1 #define AVR32_USBB_PEN1_MASK 0x00000002 #define AVR32_USBB_PEN1_OFFSET 1 #define AVR32_USBB_PEN1_SIZE 1 #define AVR32_USBB_PEN2 2 #define AVR32_USBB_PEN2_MASK 0x00000004 #define AVR32_USBB_PEN2_OFFSET 2 #define AVR32_USBB_PEN2_SIZE 1 #define AVR32_USBB_PEN3 3 #define AVR32_USBB_PEN3_MASK 0x00000008 #define AVR32_USBB_PEN3_OFFSET 3 #define AVR32_USBB_PEN3_SIZE 1 #define AVR32_USBB_PEN4 4 #define AVR32_USBB_PEN4_MASK 0x00000010 #define AVR32_USBB_PEN4_OFFSET 4 #define AVR32_USBB_PEN4_SIZE 1 #define AVR32_USBB_PEN5 5 #define AVR32_USBB_PEN5_MASK 0x00000020 #define AVR32_USBB_PEN5_OFFSET 5 #define AVR32_USBB_PEN5_SIZE 1 #define AVR32_USBB_PEN6 6 #define AVR32_USBB_PEN6_MASK 0x00000040 #define AVR32_USBB_PEN6_OFFSET 6 #define AVR32_USBB_PEN6_SIZE 1 #define AVR32_USBB_PEPNUM 16 #define AVR32_USBB_PEPNUM_MASK 0x000f0000 #define AVR32_USBB_PEPNUM_OFFSET 16 #define AVR32_USBB_PEPNUM_SIZE 4 #define AVR32_USBB_PERRE 3 #define AVR32_USBB_PERREC 3 #define AVR32_USBB_PERREC_MASK 0x00000008 #define AVR32_USBB_PERREC_OFFSET 3 #define AVR32_USBB_PERREC_SIZE 1 #define AVR32_USBB_PERRES 3 #define AVR32_USBB_PERRES_MASK 0x00000008 #define AVR32_USBB_PERRES_OFFSET 3 #define AVR32_USBB_PERRES_SIZE 1 #define AVR32_USBB_PERRE_MASK 0x00000008 #define AVR32_USBB_PERRE_OFFSET 3 #define AVR32_USBB_PERRE_SIZE 1 #define AVR32_USBB_PERRI 3 #define AVR32_USBB_PERRIS 3 #define AVR32_USBB_PERRIS_MASK 0x00000008 #define AVR32_USBB_PERRIS_OFFSET 3 #define AVR32_USBB_PERRIS_SIZE 1 #define AVR32_USBB_PERRI_MASK 0x00000008 #define AVR32_USBB_PERRI_OFFSET 3 #define AVR32_USBB_PERRI_SIZE 1 #define AVR32_USBB_PFREEZE 17 #define AVR32_USBB_PFREEZEC 17 #define AVR32_USBB_PFREEZEC_MASK 0x00020000 #define AVR32_USBB_PFREEZEC_OFFSET 17 #define AVR32_USBB_PFREEZEC_SIZE 1 #define AVR32_USBB_PFREEZES 17 #define AVR32_USBB_PFREEZES_MASK 0x00020000 #define AVR32_USBB_PFREEZES_OFFSET 17 #define AVR32_USBB_PFREEZES_SIZE 1 #define AVR32_USBB_PFREEZE_MASK 0x00020000 #define AVR32_USBB_PFREEZE_OFFSET 17 #define AVR32_USBB_PFREEZE_SIZE 1 #define AVR32_USBB_PID 2 #define AVR32_USBB_PID_MASK 0x00000004 #define AVR32_USBB_PID_OFFSET 2 #define AVR32_USBB_PID_SIZE 1 #define AVR32_USBB_PINGEN 20 #define AVR32_USBB_PINGEN_MASK 0x00100000 #define AVR32_USBB_PINGEN_OFFSET 20 #define AVR32_USBB_PINGEN_SIZE 1 #define AVR32_USBB_PRST0 16 #define AVR32_USBB_PRST0_MASK 0x00010000 #define AVR32_USBB_PRST0_OFFSET 16 #define AVR32_USBB_PRST0_SIZE 1 #define AVR32_USBB_PRST1 17 #define AVR32_USBB_PRST1_MASK 0x00020000 #define AVR32_USBB_PRST1_OFFSET 17 #define AVR32_USBB_PRST1_SIZE 1 #define AVR32_USBB_PRST2 18 #define AVR32_USBB_PRST2_MASK 0x00040000 #define AVR32_USBB_PRST2_OFFSET 18 #define AVR32_USBB_PRST2_SIZE 1 #define AVR32_USBB_PRST3 19 #define AVR32_USBB_PRST3_MASK 0x00080000 #define AVR32_USBB_PRST3_OFFSET 19 #define AVR32_USBB_PRST3_SIZE 1 #define AVR32_USBB_PRST4 20 #define AVR32_USBB_PRST4_MASK 0x00100000 #define AVR32_USBB_PRST4_OFFSET 20 #define AVR32_USBB_PRST4_SIZE 1 #define AVR32_USBB_PRST5 21 #define AVR32_USBB_PRST5_MASK 0x00200000 #define AVR32_USBB_PRST5_OFFSET 21 #define AVR32_USBB_PRST5_SIZE 1 #define AVR32_USBB_PRST6 22 #define AVR32_USBB_PRST6_MASK 0x00400000 #define AVR32_USBB_PRST6_OFFSET 22 #define AVR32_USBB_PRST6_SIZE 1 #define AVR32_USBB_PSIZE 4 #define AVR32_USBB_PSIZE_1024 0x00000007 #define AVR32_USBB_PSIZE_128 0x00000004 #define AVR32_USBB_PSIZE_16 0x00000001 #define AVR32_USBB_PSIZE_256 0x00000005 #define AVR32_USBB_PSIZE_32 0x00000002 #define AVR32_USBB_PSIZE_512 0x00000006 #define AVR32_USBB_PSIZE_64 0x00000003 #define AVR32_USBB_PSIZE_8 0x00000000 #define AVR32_USBB_PSIZE_MASK 0x00000070 #define AVR32_USBB_PSIZE_OFFSET 4 #define AVR32_USBB_PSIZE_SIZE 3 #define AVR32_USBB_PTOKEN 8 #define AVR32_USBB_PTOKEN_IN 0x00000001 #define AVR32_USBB_PTOKEN_MASK 0x00000300 #define AVR32_USBB_PTOKEN_OFFSET 8 #define AVR32_USBB_PTOKEN_OUT 0x00000002 #define AVR32_USBB_PTOKEN_SETUP 0x00000000 #define AVR32_USBB_PTOKEN_SIZE 2 #define AVR32_USBB_PTYPE 12 #define AVR32_USBB_PTYPE_BULK 0x00000002 #define AVR32_USBB_PTYPE_CONTROL 0x00000000 #define AVR32_USBB_PTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_PTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_PTYPE_MASK 0x00003000 #define AVR32_USBB_PTYPE_OFFSET 12 #define AVR32_USBB_PTYPE_SIZE 2 #define AVR32_USBB_P_DATA 0 #define AVR32_USBB_P_DATA_MASK 0xffffffff #define AVR32_USBB_P_DATA_OFFSET 0 #define AVR32_USBB_P_DATA_SIZE 32 #define AVR32_USBB_RESET 9 #define AVR32_USBB_RESET_MASK 0x00000200 #define AVR32_USBB_RESET_OFFSET 9 #define AVR32_USBB_RESET_SIZE 1 #define AVR32_USBB_RESUME 10 #define AVR32_USBB_RESUME_MASK 0x00000400 #define AVR32_USBB_RESUME_OFFSET 10 #define AVR32_USBB_RESUME_SIZE 1 #define AVR32_USBB_RMWKUP 9 #define AVR32_USBB_RMWKUP_MASK 0x00000200 #define AVR32_USBB_RMWKUP_OFFSET 9 #define AVR32_USBB_RMWKUP_SIZE 1 #define AVR32_USBB_ROLEEXE 5 #define AVR32_USBB_ROLEEXE_MASK 0x00000020 #define AVR32_USBB_ROLEEXE_OFFSET 5 #define AVR32_USBB_ROLEEXE_SIZE 1 #define AVR32_USBB_ROLEEXI 5 #define AVR32_USBB_ROLEEXIC 5 #define AVR32_USBB_ROLEEXIC_MASK 0x00000020 #define AVR32_USBB_ROLEEXIC_OFFSET 5 #define AVR32_USBB_ROLEEXIC_SIZE 1 #define AVR32_USBB_ROLEEXIS 5 #define AVR32_USBB_ROLEEXIS_MASK 0x00000020 #define AVR32_USBB_ROLEEXIS_OFFSET 5 #define AVR32_USBB_ROLEEXIS_SIZE 1 #define AVR32_USBB_ROLEEXI_MASK 0x00000020 #define AVR32_USBB_ROLEEXI_OFFSET 5 #define AVR32_USBB_ROLEEXI_SIZE 1 #define AVR32_USBB_RSMEDI 3 #define AVR32_USBB_RSMEDIC 3 #define AVR32_USBB_RSMEDIC_MASK 0x00000008 #define AVR32_USBB_RSMEDIC_OFFSET 3 #define AVR32_USBB_RSMEDIC_SIZE 1 #define AVR32_USBB_RSMEDIE 3 #define AVR32_USBB_RSMEDIEC 3 #define AVR32_USBB_RSMEDIEC_MASK 0x00000008 #define AVR32_USBB_RSMEDIEC_OFFSET 3 #define AVR32_USBB_RSMEDIEC_SIZE 1 #define AVR32_USBB_RSMEDIES 3 #define AVR32_USBB_RSMEDIES_MASK 0x00000008 #define AVR32_USBB_RSMEDIES_OFFSET 3 #define AVR32_USBB_RSMEDIES_SIZE 1 #define AVR32_USBB_RSMEDIE_MASK 0x00000008 #define AVR32_USBB_RSMEDIE_OFFSET 3 #define AVR32_USBB_RSMEDIE_SIZE 1 #define AVR32_USBB_RSMEDIS 3 #define AVR32_USBB_RSMEDIS_MASK 0x00000008 #define AVR32_USBB_RSMEDIS_OFFSET 3 #define AVR32_USBB_RSMEDIS_SIZE 1 #define AVR32_USBB_RSMEDI_MASK 0x00000008 #define AVR32_USBB_RSMEDI_OFFSET 3 #define AVR32_USBB_RSMEDI_SIZE 1 #define AVR32_USBB_RSTDT 18 #define AVR32_USBB_RSTDTS 18 #define AVR32_USBB_RSTDTS_MASK 0x00040000 #define AVR32_USBB_RSTDTS_OFFSET 18 #define AVR32_USBB_RSTDTS_SIZE 1 #define AVR32_USBB_RSTDT_MASK 0x00040000 #define AVR32_USBB_RSTDT_OFFSET 18 #define AVR32_USBB_RSTDT_SIZE 1 #define AVR32_USBB_RSTI 2 #define AVR32_USBB_RSTIC 2 #define AVR32_USBB_RSTIC_MASK 0x00000004 #define AVR32_USBB_RSTIC_OFFSET 2 #define AVR32_USBB_RSTIC_SIZE 1 #define AVR32_USBB_RSTIE 2 #define AVR32_USBB_RSTIEC 2 #define AVR32_USBB_RSTIEC_MASK 0x00000004 #define AVR32_USBB_RSTIEC_OFFSET 2 #define AVR32_USBB_RSTIEC_SIZE 1 #define AVR32_USBB_RSTIES 2 #define AVR32_USBB_RSTIES_MASK 0x00000004 #define AVR32_USBB_RSTIES_OFFSET 2 #define AVR32_USBB_RSTIES_SIZE 1 #define AVR32_USBB_RSTIE_MASK 0x00000004 #define AVR32_USBB_RSTIE_OFFSET 2 #define AVR32_USBB_RSTIE_SIZE 1 #define AVR32_USBB_RSTIS 2 #define AVR32_USBB_RSTIS_MASK 0x00000004 #define AVR32_USBB_RSTIS_OFFSET 2 #define AVR32_USBB_RSTIS_SIZE 1 #define AVR32_USBB_RSTI_MASK 0x00000004 #define AVR32_USBB_RSTI_OFFSET 2 #define AVR32_USBB_RSTI_SIZE 1 #define AVR32_USBB_RWALL 16 #define AVR32_USBB_RWALL_MASK 0x00010000 #define AVR32_USBB_RWALL_OFFSET 16 #define AVR32_USBB_RWALL_SIZE 1 #define AVR32_USBB_RXINE 0 #define AVR32_USBB_RXINEC 0 #define AVR32_USBB_RXINEC_MASK 0x00000001 #define AVR32_USBB_RXINEC_OFFSET 0 #define AVR32_USBB_RXINEC_SIZE 1 #define AVR32_USBB_RXINES 0 #define AVR32_USBB_RXINES_MASK 0x00000001 #define AVR32_USBB_RXINES_OFFSET 0 #define AVR32_USBB_RXINES_SIZE 1 #define AVR32_USBB_RXINE_MASK 0x00000001 #define AVR32_USBB_RXINE_OFFSET 0 #define AVR32_USBB_RXINE_SIZE 1 #define AVR32_USBB_RXINI 0 #define AVR32_USBB_RXINIC 0 #define AVR32_USBB_RXINIC_MASK 0x00000001 #define AVR32_USBB_RXINIC_OFFSET 0 #define AVR32_USBB_RXINIC_SIZE 1 #define AVR32_USBB_RXINIS 0 #define AVR32_USBB_RXINIS_MASK 0x00000001 #define AVR32_USBB_RXINIS_OFFSET 0 #define AVR32_USBB_RXINIS_SIZE 1 #define AVR32_USBB_RXINI_MASK 0x00000001 #define AVR32_USBB_RXINI_OFFSET 0 #define AVR32_USBB_RXINI_SIZE 1 #define AVR32_USBB_RXOUTE 1 #define AVR32_USBB_RXOUTEC 1 #define AVR32_USBB_RXOUTEC_MASK 0x00000002 #define AVR32_USBB_RXOUTEC_OFFSET 1 #define AVR32_USBB_RXOUTEC_SIZE 1 #define AVR32_USBB_RXOUTES 1 #define AVR32_USBB_RXOUTES_MASK 0x00000002 #define AVR32_USBB_RXOUTES_OFFSET 1 #define AVR32_USBB_RXOUTES_SIZE 1 #define AVR32_USBB_RXOUTE_MASK 0x00000002 #define AVR32_USBB_RXOUTE_OFFSET 1 #define AVR32_USBB_RXOUTE_SIZE 1 #define AVR32_USBB_RXOUTI 1 #define AVR32_USBB_RXOUTIC 1 #define AVR32_USBB_RXOUTIC_MASK 0x00000002 #define AVR32_USBB_RXOUTIC_OFFSET 1 #define AVR32_USBB_RXOUTIC_SIZE 1 #define AVR32_USBB_RXOUTIS 1 #define AVR32_USBB_RXOUTIS_MASK 0x00000002 #define AVR32_USBB_RXOUTIS_OFFSET 1 #define AVR32_USBB_RXOUTIS_SIZE 1 #define AVR32_USBB_RXOUTI_MASK 0x00000002 #define AVR32_USBB_RXOUTI_OFFSET 1 #define AVR32_USBB_RXOUTI_SIZE 1 #define AVR32_USBB_RXRSMI 4 #define AVR32_USBB_RXRSMIC 4 #define AVR32_USBB_RXRSMIC_MASK 0x00000010 #define AVR32_USBB_RXRSMIC_OFFSET 4 #define AVR32_USBB_RXRSMIC_SIZE 1 #define AVR32_USBB_RXRSMIE 4 #define AVR32_USBB_RXRSMIEC 4 #define AVR32_USBB_RXRSMIEC_MASK 0x00000010 #define AVR32_USBB_RXRSMIEC_OFFSET 4 #define AVR32_USBB_RXRSMIEC_SIZE 1 #define AVR32_USBB_RXRSMIES 4 #define AVR32_USBB_RXRSMIES_MASK 0x00000010 #define AVR32_USBB_RXRSMIES_OFFSET 4 #define AVR32_USBB_RXRSMIES_SIZE 1 #define AVR32_USBB_RXRSMIE_MASK 0x00000010 #define AVR32_USBB_RXRSMIE_OFFSET 4 #define AVR32_USBB_RXRSMIE_SIZE 1 #define AVR32_USBB_RXRSMIS 4 #define AVR32_USBB_RXRSMIS_MASK 0x00000010 #define AVR32_USBB_RXRSMIS_OFFSET 4 #define AVR32_USBB_RXRSMIS_SIZE 1 #define AVR32_USBB_RXRSMI_MASK 0x00000010 #define AVR32_USBB_RXRSMI_OFFSET 4 #define AVR32_USBB_RXRSMI_SIZE 1 #define AVR32_USBB_RXSTALLDE 6 #define AVR32_USBB_RXSTALLDEC 6 #define AVR32_USBB_RXSTALLDEC_MASK 0x00000040 #define AVR32_USBB_RXSTALLDEC_OFFSET 6 #define AVR32_USBB_RXSTALLDEC_SIZE 1 #define AVR32_USBB_RXSTALLDES 6 #define AVR32_USBB_RXSTALLDES_MASK 0x00000040 #define AVR32_USBB_RXSTALLDES_OFFSET 6 #define AVR32_USBB_RXSTALLDES_SIZE 1 #define AVR32_USBB_RXSTALLDE_MASK 0x00000040 #define AVR32_USBB_RXSTALLDE_OFFSET 6 #define AVR32_USBB_RXSTALLDE_SIZE 1 #define AVR32_USBB_RXSTALLDI 6 #define AVR32_USBB_RXSTALLDIC 6 #define AVR32_USBB_RXSTALLDIC_MASK 0x00000040 #define AVR32_USBB_RXSTALLDIC_OFFSET 6 #define AVR32_USBB_RXSTALLDIC_SIZE 1 #define AVR32_USBB_RXSTALLDIS 6 #define AVR32_USBB_RXSTALLDIS_MASK 0x00000040 #define AVR32_USBB_RXSTALLDIS_OFFSET 6 #define AVR32_USBB_RXSTALLDIS_SIZE 1 #define AVR32_USBB_RXSTALLDI_MASK 0x00000040 #define AVR32_USBB_RXSTALLDI_OFFSET 6 #define AVR32_USBB_RXSTALLDI_SIZE 1 #define AVR32_USBB_RXSTPE 2 #define AVR32_USBB_RXSTPEC 2 #define AVR32_USBB_RXSTPEC_MASK 0x00000004 #define AVR32_USBB_RXSTPEC_OFFSET 2 #define AVR32_USBB_RXSTPEC_SIZE 1 #define AVR32_USBB_RXSTPES 2 #define AVR32_USBB_RXSTPES_MASK 0x00000004 #define AVR32_USBB_RXSTPES_OFFSET 2 #define AVR32_USBB_RXSTPES_SIZE 1 #define AVR32_USBB_RXSTPE_MASK 0x00000004 #define AVR32_USBB_RXSTPE_OFFSET 2 #define AVR32_USBB_RXSTPE_SIZE 1 #define AVR32_USBB_RXSTPI 2 #define AVR32_USBB_RXSTPIC 2 #define AVR32_USBB_RXSTPIC_MASK 0x00000004 #define AVR32_USBB_RXSTPIC_OFFSET 2 #define AVR32_USBB_RXSTPIC_SIZE 1 #define AVR32_USBB_RXSTPIS 2 #define AVR32_USBB_RXSTPIS_MASK 0x00000004 #define AVR32_USBB_RXSTPIS_OFFSET 2 #define AVR32_USBB_RXSTPIS_SIZE 1 #define AVR32_USBB_RXSTPI_MASK 0x00000004 #define AVR32_USBB_RXSTPI_OFFSET 2 #define AVR32_USBB_RXSTPI_SIZE 1 #define AVR32_USBB_SETMDATA 8 #define AVR32_USBB_SETMDATA_MASK 0x00000100 #define AVR32_USBB_SETMDATA_OFFSET 8 #define AVR32_USBB_SETMDATA_SIZE 1 #define AVR32_USBB_SETUP 0x00000000 #define AVR32_USBB_SHORTPACKET 7 #define AVR32_USBB_SHORTPACKETC 7 #define AVR32_USBB_SHORTPACKETC_MASK 0x00000080 #define AVR32_USBB_SHORTPACKETC_OFFSET 7 #define AVR32_USBB_SHORTPACKETC_SIZE 1 #define AVR32_USBB_SHORTPACKETE 7 #define AVR32_USBB_SHORTPACKETEC 7 #define AVR32_USBB_SHORTPACKETEC_MASK 0x00000080 #define AVR32_USBB_SHORTPACKETEC_OFFSET 7 #define AVR32_USBB_SHORTPACKETEC_SIZE 1 #define AVR32_USBB_SHORTPACKETES 7 #define AVR32_USBB_SHORTPACKETES_MASK 0x00000080 #define AVR32_USBB_SHORTPACKETES_OFFSET 7 #define AVR32_USBB_SHORTPACKETES_SIZE 1 #define AVR32_USBB_SHORTPACKETE_MASK 0x00000080 #define AVR32_USBB_SHORTPACKETE_OFFSET 7 #define AVR32_USBB_SHORTPACKETE_SIZE 1 #define AVR32_USBB_SHORTPACKETI 7 #define AVR32_USBB_SHORTPACKETIC 7 #define AVR32_USBB_SHORTPACKETIC_MASK 0x00000080 #define AVR32_USBB_SHORTPACKETIC_OFFSET 7 #define AVR32_USBB_SHORTPACKETIC_SIZE 1 #define AVR32_USBB_SHORTPACKETIE 7 #define AVR32_USBB_SHORTPACKETIEC 7 #define AVR32_USBB_SHORTPACKETIEC_MASK 0x00000080 #define AVR32_USBB_SHORTPACKETIEC_OFFSET 7 #define AVR32_USBB_SHORTPACKETIEC_SIZE 1 #define AVR32_USBB_SHORTPACKETIES 7 #define AVR32_USBB_SHORTPACKETIES_MASK 0x00000080 #define AVR32_USBB_SHORTPACKETIES_OFFSET 7 #define AVR32_USBB_SHORTPACKETIES_SIZE 1 #define AVR32_USBB_SHORTPACKETIE_MASK 0x00000080 #define AVR32_USBB_SHORTPACKETIE_OFFSET 7 #define AVR32_USBB_SHORTPACKETIE_SIZE 1 #define AVR32_USBB_SHORTPACKETIS 7 #define AVR32_USBB_SHORTPACKETIS_MASK 0x00000080 #define AVR32_USBB_SHORTPACKETIS_OFFSET 7 #define AVR32_USBB_SHORTPACKETIS_SIZE 1 #define AVR32_USBB_SHORTPACKETI_MASK 0x00000080 #define AVR32_USBB_SHORTPACKETI_OFFSET 7 #define AVR32_USBB_SHORTPACKETI_SIZE 1 #define AVR32_USBB_SHORTPACKETS 7 #define AVR32_USBB_SHORTPACKETS_MASK 0x00000080 #define AVR32_USBB_SHORTPACKETS_OFFSET 7 #define AVR32_USBB_SHORTPACKETS_SIZE 1 #define AVR32_USBB_SHORTPACKET_MASK 0x00000080 #define AVR32_USBB_SHORTPACKET_OFFSET 7 #define AVR32_USBB_SHORTPACKET_SIZE 1 #define AVR32_USBB_SINGLE 0x00000000 #define AVR32_USBB_SOF 2 #define AVR32_USBB_SOFC 2 #define AVR32_USBB_SOFCNTMAX 24 #define AVR32_USBB_SOFCNTMAX_MASK 0x7f000000 #define AVR32_USBB_SOFCNTMAX_OFFSET 24 #define AVR32_USBB_SOFCNTMAX_SIZE 7 #define AVR32_USBB_SOFC_MASK 0x00000004 #define AVR32_USBB_SOFC_OFFSET 2 #define AVR32_USBB_SOFC_SIZE 1 #define AVR32_USBB_SOFEC 2 #define AVR32_USBB_SOFEC_MASK 0x00000004 #define AVR32_USBB_SOFEC_OFFSET 2 #define AVR32_USBB_SOFEC_SIZE 1 #define AVR32_USBB_SOFES 2 #define AVR32_USBB_SOFES_MASK 0x00000004 #define AVR32_USBB_SOFES_OFFSET 2 #define AVR32_USBB_SOFES_SIZE 1 #define AVR32_USBB_SOFE_SIZE 1 #define AVR32_USBB_SOFS 2 #define AVR32_USBB_SOFS_MASK 0x00000004 #define AVR32_USBB_SOFS_OFFSET 2 #define AVR32_USBB_SOFS_SIZE 1 #define AVR32_USBB_SOF_MASK 0x00000004 #define AVR32_USBB_SOF_OFFSET 2 #define AVR32_USBB_SOF_SIZE 1 #define AVR32_USBB_SPDCONF_SIZE 2 #define AVR32_USBB_SPEED_FULL 0x00000000 #define AVR32_USBB_SPEED_LOW 0x00000002 #define AVR32_USBB_SRPE 2 #define AVR32_USBB_SRPE_MASK 0x00000004 #define AVR32_USBB_SRPE_OFFSET 2 #define AVR32_USBB_SRPE_SIZE 1 #define AVR32_USBB_SRPI 2 #define AVR32_USBB_SRPIC 2 #define AVR32_USBB_SRPIC_MASK 0x00000004 #define AVR32_USBB_SRPIC_OFFSET 2 #define AVR32_USBB_SRPIC_SIZE 1 #define AVR32_USBB_SRPIS 2 #define AVR32_USBB_SRPIS_MASK 0x00000004 #define AVR32_USBB_SRPIS_OFFSET 2 #define AVR32_USBB_SRPIS_SIZE 1 #define AVR32_USBB_SRPI_MASK 0x00000004 #define AVR32_USBB_SRPI_OFFSET 2 #define AVR32_USBB_SRPI_SIZE 1 #define AVR32_USBB_SRPREQ 10 #define AVR32_USBB_SRPREQ_MASK 0x00000400 #define AVR32_USBB_SRPREQ_OFFSET 10 #define AVR32_USBB_SRPREQ_SIZE 1 #define AVR32_USBB_SRPSEL 9 #define AVR32_USBB_SRPSEL_MASK 0x00000200 #define AVR32_USBB_SRPSEL_OFFSET 9 #define AVR32_USBB_SRPSEL_SIZE 1 #define AVR32_USBB_SRP_DET_TMOUT 0x00000003 #define AVR32_USBB_SRP_DET_TMOUT_100_US 0x00000001 #define AVR32_USBB_SRP_DET_TMOUT_10_US 0x00000000 #define AVR32_USBB_SRP_DET_TMOUT_11_MS 0x00000003 #define AVR32_USBB_SRP_DET_TMOUT_1_MS 0x00000002 #define AVR32_USBB_STALLEDE 6 #define AVR32_USBB_STALLEDEC 6 #define AVR32_USBB_STALLEDEC_MASK 0x00000040 #define AVR32_USBB_STALLEDEC_OFFSET 6 #define AVR32_USBB_STALLEDEC_SIZE 1 #define AVR32_USBB_STALLEDES 6 #define AVR32_USBB_STALLEDES_MASK 0x00000040 #define AVR32_USBB_STALLEDES_OFFSET 6 #define AVR32_USBB_STALLEDES_SIZE 1 #define AVR32_USBB_STALLEDE_MASK 0x00000040 #define AVR32_USBB_STALLEDE_OFFSET 6 #define AVR32_USBB_STALLEDE_SIZE 1 #define AVR32_USBB_STALLEDI 6 #define AVR32_USBB_STALLEDIC 6 #define AVR32_USBB_STALLEDIC_MASK 0x00000040 #define AVR32_USBB_STALLEDIC_OFFSET 6 #define AVR32_USBB_STALLEDIC_SIZE 1 #define AVR32_USBB_STALLEDIS 6 #define AVR32_USBB_STALLEDIS_MASK 0x00000040 #define AVR32_USBB_STALLEDIS_OFFSET 6 #define AVR32_USBB_STALLEDIS_SIZE 1 #define AVR32_USBB_STALLEDI_MASK 0x00000040 #define AVR32_USBB_STALLEDI_OFFSET 6 #define AVR32_USBB_STALLEDI_SIZE 1 #define AVR32_USBB_STALLRQ 19 #define AVR32_USBB_STALLRQC 19 #define AVR32_USBB_STALLRQC_MASK 0x00080000 #define AVR32_USBB_STALLRQC_OFFSET 19 #define AVR32_USBB_STALLRQC_SIZE 1 #define AVR32_USBB_STALLRQS 19 #define AVR32_USBB_STALLRQS_MASK 0x00080000 #define AVR32_USBB_STALLRQS_OFFSET 19 #define AVR32_USBB_STALLRQS_SIZE 1 #define AVR32_USBB_STALLRQ_MASK 0x00080000 #define AVR32_USBB_STALLRQ_OFFSET 19 #define AVR32_USBB_STALLRQ_SIZE 1 #define AVR32_USBB_STOE 7 #define AVR32_USBB_STOE_MASK 0x00000080 #define AVR32_USBB_STOE_OFFSET 7 #define AVR32_USBB_STOE_SIZE 1 #define AVR32_USBB_STOI 7 #define AVR32_USBB_STOIC 7 #define AVR32_USBB_STOIC_MASK 0x00000080 #define AVR32_USBB_STOIC_OFFSET 7 #define AVR32_USBB_STOIC_SIZE 1 #define AVR32_USBB_STOIS 7 #define AVR32_USBB_STOIS_MASK 0x00000080 #define AVR32_USBB_STOIS_OFFSET 7 #define AVR32_USBB_STOIS_SIZE 1 #define AVR32_USBB_STOI_MASK 0x00000080 #define AVR32_USBB_STOI_OFFSET 7 #define AVR32_USBB_STOI_SIZE 1 #define AVR32_USBB_SUSP 0 #define AVR32_USBB_SUSPC 0 #define AVR32_USBB_SUSPC_MASK 0x00000001 #define AVR32_USBB_SUSPC_OFFSET 0 #define AVR32_USBB_SUSPC_SIZE 1 #define AVR32_USBB_SUSPE 0 #define AVR32_USBB_SUSPEC 0 #define AVR32_USBB_SUSPEC_MASK 0x00000001 #define AVR32_USBB_SUSPEC_OFFSET 0 #define AVR32_USBB_SUSPEC_SIZE 1 #define AVR32_USBB_SUSPES 0 #define AVR32_USBB_SUSPES_MASK 0x00000001 #define AVR32_USBB_SUSPES_OFFSET 0 #define AVR32_USBB_SUSPES_SIZE 1 #define AVR32_USBB_SUSPE_MASK 0x00000001 #define AVR32_USBB_SUSPE_OFFSET 0 #define AVR32_USBB_SUSPE_SIZE 1 #define AVR32_USBB_SUSPS 0 #define AVR32_USBB_SUSPS_MASK 0x00000001 #define AVR32_USBB_SUSPS_OFFSET 0 #define AVR32_USBB_SUSPS_SIZE 1 #define AVR32_USBB_SUSP_MASK 0x00000001 #define AVR32_USBB_SUSP_OFFSET 0 #define AVR32_USBB_SUSP_SIZE 1 #define AVR32_USBB_TIMEOUT 3 #define AVR32_USBB_TIMEOUT_MASK 0x00000008 #define AVR32_USBB_TIMEOUT_OFFSET 3 #define AVR32_USBB_TIMEOUT_SIZE 1 #define AVR32_USBB_TIMPAGE 20 #define AVR32_USBB_TIMPAGE_A_WAIT_VRISE 0x00000000 #define AVR32_USBB_TIMPAGE_MASK 0x00300000 #define AVR32_USBB_TIMPAGE_OFFSET 20 #define AVR32_USBB_TIMPAGE_PD_TMOUT_CNT 0x00000002 #define AVR32_USBB_TIMPAGE_SIZE 2 #define AVR32_USBB_TIMPAGE_SRP_DET_TMOUT 0x00000003 #define AVR32_USBB_TIMPAGE_VB_BUS_PULSING 0x00000001 #define AVR32_USBB_TIMVALUE 16 #define AVR32_USBB_TIMVALUE_A_WAIT_VRISE_100_MS 0x00000003 #define AVR32_USBB_TIMVALUE_A_WAIT_VRISE_20_MS 0x00000000 #define AVR32_USBB_TIMVALUE_A_WAIT_VRISE_50_MS 0x00000001 #define AVR32_USBB_TIMVALUE_A_WAIT_VRISE_70_MS 0x00000002 #define AVR32_USBB_TIMVALUE_MASK 0x00030000 #define AVR32_USBB_TIMVALUE_OFFSET 16 #define AVR32_USBB_TIMVALUE_PD_TMOUT_CNT_105_MS 0x00000001 #define AVR32_USBB_TIMVALUE_PD_TMOUT_CNT_118_MS 0x00000002 #define AVR32_USBB_TIMVALUE_PD_TMOUT_CNT_131_MS 0x00000003 #define AVR32_USBB_TIMVALUE_PD_TMOUT_CNT_93_MS 0x00000000 #define AVR32_USBB_TIMVALUE_SIZE 2 #define AVR32_USBB_TIMVALUE_SRP_DET_TMOUT_100_US 0x00000001 #define AVR32_USBB_TIMVALUE_SRP_DET_TMOUT_10_US 0x00000000 #define AVR32_USBB_TIMVALUE_SRP_DET_TMOUT_11_MS 0x00000003 #define AVR32_USBB_TIMVALUE_SRP_DET_TMOUT_1_MS 0x00000002 #define AVR32_USBB_TIMVALUE_VB_BUS_PULSING_15_MS 0x00000000 #define AVR32_USBB_TIMVALUE_VB_BUS_PULSING_23_MS 0x00000001 #define AVR32_USBB_TIMVALUE_VB_BUS_PULSING_31_MS 0x00000002 #define AVR32_USBB_TIMVALUE_VB_BUS_PULSING_40_MS 0x00000003 #define AVR32_USBB_TRIPLE 0x00000002 #define AVR32_USBB_TSTJ 13 #define AVR32_USBB_TSTJ_MASK 0x00002000 #define AVR32_USBB_TSTJ_OFFSET 13 #define AVR32_USBB_TSTJ_SIZE 1 #define AVR32_USBB_TSTK 14 #define AVR32_USBB_TSTK_MASK 0x00004000 #define AVR32_USBB_TSTK_OFFSET 14 #define AVR32_USBB_TSTK_SIZE 1 #define AVR32_USBB_TSTPCKT 15 #define AVR32_USBB_TSTPCKT_MASK 0x00008000 #define AVR32_USBB_TSTPCKT_OFFSET 15 #define AVR32_USBB_TSTPCKT_SIZE 1 #define AVR32_USBB_TXINE 0 #define AVR32_USBB_TXINEC 0 #define AVR32_USBB_TXINEC_MASK 0x00000001 #define AVR32_USBB_TXINEC_OFFSET 0 #define AVR32_USBB_TXINEC_SIZE 1 #define AVR32_USBB_TXINES 0 #define AVR32_USBB_TXINES_MASK 0x00000001 #define AVR32_USBB_TXINES_OFFSET 0 #define AVR32_USBB_TXINES_SIZE 1 #define AVR32_USBB_TXINE_MASK 0x00000001 #define AVR32_USBB_TXINE_OFFSET 0 #define AVR32_USBB_TXINE_SIZE 1 #define AVR32_USBB_TXINI 0 #define AVR32_USBB_TXINIC 0 #define AVR32_USBB_TXINIC_MASK 0x00000001 #define AVR32_USBB_TXINIC_OFFSET 0 #define AVR32_USBB_TXINIC_SIZE 1 #define AVR32_USBB_TXINIS 0 #define AVR32_USBB_TXINIS_MASK 0x00000001 #define AVR32_USBB_TXINIS_OFFSET 0 #define AVR32_USBB_TXINIS_SIZE 1 #define AVR32_USBB_TXINI_MASK 0x00000001 #define AVR32_USBB_TXINI_OFFSET 0 #define AVR32_USBB_TXINI_SIZE 1 #define AVR32_USBB_TXOUTE 1 #define AVR32_USBB_TXOUTEC 1 #define AVR32_USBB_TXOUTEC_MASK 0x00000002 #define AVR32_USBB_TXOUTEC_OFFSET 1 #define AVR32_USBB_TXOUTEC_SIZE 1 #define AVR32_USBB_TXOUTES 1 #define AVR32_USBB_TXOUTES_MASK 0x00000002 #define AVR32_USBB_TXOUTES_OFFSET 1 #define AVR32_USBB_TXOUTES_SIZE 1 #define AVR32_USBB_TXOUTE_MASK 0x00000002 #define AVR32_USBB_TXOUTE_OFFSET 1 #define AVR32_USBB_TXOUTE_SIZE 1 #define AVR32_USBB_TXOUTI 1 #define AVR32_USBB_TXOUTIC 1 #define AVR32_USBB_TXOUTIC_MASK 0x00000002 #define AVR32_USBB_TXOUTIC_OFFSET 1 #define AVR32_USBB_TXOUTIC_SIZE 1 #define AVR32_USBB_TXOUTIS 1 #define AVR32_USBB_TXOUTIS_MASK 0x00000002 #define AVR32_USBB_TXOUTIS_OFFSET 1 #define AVR32_USBB_TXOUTIS_SIZE 1 #define AVR32_USBB_TXOUTI_MASK 0x00000002 #define AVR32_USBB_TXOUTI_OFFSET 1 #define AVR32_USBB_TXOUTI_SIZE 1 #define AVR32_USBB_TXSTPE 2 #define AVR32_USBB_TXSTPEC 2 #define AVR32_USBB_TXSTPEC_MASK 0x00000004 #define AVR32_USBB_TXSTPEC_OFFSET 2 #define AVR32_USBB_TXSTPEC_SIZE 1 #define AVR32_USBB_TXSTPES 2 #define AVR32_USBB_TXSTPES_MASK 0x00000004 #define AVR32_USBB_TXSTPES_OFFSET 2 #define AVR32_USBB_TXSTPES_SIZE 1 #define AVR32_USBB_TXSTPE_MASK 0x00000004 #define AVR32_USBB_TXSTPE_OFFSET 2 #define AVR32_USBB_TXSTPE_SIZE 1 #define AVR32_USBB_TXSTPI 2 #define AVR32_USBB_TXSTPIC 2 #define AVR32_USBB_TXSTPIC_MASK 0x00000004 #define AVR32_USBB_TXSTPIC_OFFSET 2 #define AVR32_USBB_TXSTPIC_SIZE 1 #define AVR32_USBB_TXSTPIS 2 #define AVR32_USBB_TXSTPIS_MASK 0x00000004 #define AVR32_USBB_TXSTPIS_OFFSET 2 #define AVR32_USBB_TXSTPIS_SIZE 1 #define AVR32_USBB_TXSTPI_MASK 0x00000004 #define AVR32_USBB_TXSTPI_OFFSET 2 #define AVR32_USBB_TXSTPI_SIZE 1 #define AVR32_USBB_UADD 0 #define AVR32_USBB_UADDRSIZE 0x00000820 #define AVR32_USBB_UADDRSIZE_MASK 0xffffffff #define AVR32_USBB_UADDRSIZE_OFFSET 0 #define AVR32_USBB_UADDRSIZE_SIZE 32 #define AVR32_USBB_UADDRSIZE_UADDRSIZE 0 #define AVR32_USBB_UADDRSIZE_UADDRSIZE_MASK 0xffffffff #define AVR32_USBB_UADDRSIZE_UADDRSIZE_OFFSET 0 #define AVR32_USBB_UADDRSIZE_UADDRSIZE_SIZE 32 #define AVR32_USBB_UADD_MASK 0x0000007f #define AVR32_USBB_UADD_OFFSET 0 #define AVR32_USBB_UADD_SIZE 7 #define AVR32_USBB_UATST1 0x00000810 #define AVR32_USBB_UATST1_COUNTERA 0 #define AVR32_USBB_UATST1_COUNTERA_MASK 0x00007fff #define AVR32_USBB_UATST1_COUNTERA_OFFSET 0 #define AVR32_USBB_UATST1_COUNTERA_SIZE 15 #define AVR32_USBB_UATST1_COUNTERB 16 #define AVR32_USBB_UATST1_COUNTERB_MASK 0x003f0000 #define AVR32_USBB_UATST1_COUNTERB_OFFSET 16 #define AVR32_USBB_UATST1_COUNTERB_SIZE 6 #define AVR32_USBB_UATST1_LOADCNTA 15 #define AVR32_USBB_UATST1_LOADCNTA_MASK 0x00008000 #define AVR32_USBB_UATST1_LOADCNTA_OFFSET 15 #define AVR32_USBB_UATST1_LOADCNTA_SIZE 1 #define AVR32_USBB_UATST1_LOADCNTB 23 #define AVR32_USBB_UATST1_LOADCNTB_MASK 0x00800000 #define AVR32_USBB_UATST1_LOADCNTB_OFFSET 23 #define AVR32_USBB_UATST1_LOADCNTB_SIZE 1 #define AVR32_USBB_UATST1_LOADSOFCNT 31 #define AVR32_USBB_UATST1_LOADSOFCNT_MASK 0x80000000 #define AVR32_USBB_UATST1_LOADSOFCNT_OFFSET 31 #define AVR32_USBB_UATST1_LOADSOFCNT_SIZE 1 #define AVR32_USBB_UATST1_SOFCNTMAX 24 #define AVR32_USBB_UATST1_SOFCNTMAX_MASK 0x7f000000 #define AVR32_USBB_UATST1_SOFCNTMAX_OFFSET 24 #define AVR32_USBB_UATST1_SOFCNTMAX_SIZE 7 #define AVR32_USBB_UATST2 0x00000814 #define AVR32_USBB_UATST2_BYPASSDPLL 5 #define AVR32_USBB_UATST2_BYPASSDPLL_MASK 0x00000020 #define AVR32_USBB_UATST2_BYPASSDPLL_OFFSET 5 #define AVR32_USBB_UATST2_BYPASSDPLL_SIZE 1 #define AVR32_USBB_UATST2_DISBALEGATEDCLOCK 3 #define AVR32_USBB_UATST2_DISBALEGATEDCLOCK_MASK 0x00000008 #define AVR32_USBB_UATST2_DISBALEGATEDCLOCK_OFFSET 3 #define AVR32_USBB_UATST2_DISBALEGATEDCLOCK_SIZE 1 #define AVR32_USBB_UATST2_FORCEHSRESETTO50MS 7 #define AVR32_USBB_UATST2_FORCEHSRESETTO50MS_MASK 0x00000080 #define AVR32_USBB_UATST2_FORCEHSRESETTO50MS_OFFSET 7 #define AVR32_USBB_UATST2_FORCEHSRESETTO50MS_SIZE 1 #define AVR32_USBB_UATST2_FORCESUSPENDMTO1 4 #define AVR32_USBB_UATST2_FORCESUSPENDMTO1_MASK 0x00000010 #define AVR32_USBB_UATST2_FORCESUSPENDMTO1_OFFSET 4 #define AVR32_USBB_UATST2_FORCESUSPENDMTO1_SIZE 1 #define AVR32_USBB_UATST2_FULLDETACHEN 0 #define AVR32_USBB_UATST2_FULLDETACHEN_MASK 0x00000001 #define AVR32_USBB_UATST2_FULLDETACHEN_OFFSET 0 #define AVR32_USBB_UATST2_FULLDETACHEN_SIZE 1 #define AVR32_USBB_UATST2_HOSTHSDISCONNECTDISABLE 6 #define AVR32_USBB_UATST2_HOSTHSDISCONNECTDISABLE_MASK 0x00000040 #define AVR32_USBB_UATST2_HOSTHSDISCONNECTDISABLE_OFFSET 6 #define AVR32_USBB_UATST2_HOSTHSDISCONNECTDISABLE_SIZE 1 #define AVR32_USBB_UATST2_HSSERIALMODE 1 #define AVR32_USBB_UATST2_HSSERIALMODE_MASK 0x00000002 #define AVR32_USBB_UATST2_HSSERIALMODE_OFFSET 1 #define AVR32_USBB_UATST2_HSSERIALMODE_SIZE 1 #define AVR32_USBB_UATST2_LOOPBACKMODE 2 #define AVR32_USBB_UATST2_LOOPBACKMODE_MASK 0x00000004 #define AVR32_USBB_UATST2_LOOPBACKMODE_OFFSET 2 #define AVR32_USBB_UATST2_LOOPBACKMODE_SIZE 1 #define AVR32_USBB_UATST2_UTMIRESET 8 #define AVR32_USBB_UATST2_UTMIRESET_MASK 0x00000100 #define AVR32_USBB_UATST2_UTMIRESET_OFFSET 8 #define AVR32_USBB_UATST2_UTMIRESET_SIZE 1 #define AVR32_USBB_UDADDRSIZE 0x00000034 #define AVR32_USBB_UDCON 0x00000000 #define AVR32_USBB_UDCON_ADDEN 7 #define AVR32_USBB_UDCON_ADDEN_MASK 0x00000080 #define AVR32_USBB_UDCON_ADDEN_OFFSET 7 #define AVR32_USBB_UDCON_ADDEN_SIZE 1 #define AVR32_USBB_UDCON_DETACH 8 #define AVR32_USBB_UDCON_DETACH_MASK 0x00000100 #define AVR32_USBB_UDCON_DETACH_OFFSET 8 #define AVR32_USBB_UDCON_DETACH_SIZE 1 #define AVR32_USBB_UDCON_FRZCLK 18 #define AVR32_USBB_UDCON_FRZCLK_MASK 0x00040000 #define AVR32_USBB_UDCON_FRZCLK_OFFSET 18 #define AVR32_USBB_UDCON_FRZCLK_SIZE 1 #define AVR32_USBB_UDCON_LS 12 #define AVR32_USBB_UDCON_LS_MASK 0x00001000 #define AVR32_USBB_UDCON_LS_OFFSET 12 #define AVR32_USBB_UDCON_LS_SIZE 1 #define AVR32_USBB_UDCON_OPMODE2 16 #define AVR32_USBB_UDCON_OPMODE2_MASK 0x00010000 #define AVR32_USBB_UDCON_OPMODE2_OFFSET 16 #define AVR32_USBB_UDCON_OPMODE2_SIZE 1 #define AVR32_USBB_UDCON_RMWKUP 9 #define AVR32_USBB_UDCON_RMWKUP_MASK 0x00000200 #define AVR32_USBB_UDCON_RMWKUP_OFFSET 9 #define AVR32_USBB_UDCON_RMWKUP_SIZE 1 #define AVR32_USBB_UDCON_SPDCONF 10 #define AVR32_USBB_UDCON_SPDCONF_MASK 0x00000c00 #define AVR32_USBB_UDCON_SPDCONF_OFFSET 10 #define AVR32_USBB_UDCON_SPDCONF_SIZE 2 #define AVR32_USBB_UDCON_TSTJ 13 #define AVR32_USBB_UDCON_TSTJ_MASK 0x00002000 #define AVR32_USBB_UDCON_TSTJ_OFFSET 13 #define AVR32_USBB_UDCON_TSTJ_SIZE 1 #define AVR32_USBB_UDCON_TSTK 14 #define AVR32_USBB_UDCON_TSTK_MASK 0x00004000 #define AVR32_USBB_UDCON_TSTK_OFFSET 14 #define AVR32_USBB_UDCON_TSTK_SIZE 1 #define AVR32_USBB_UDCON_TSTPCKT 15 #define AVR32_USBB_UDCON_TSTPCKT_MASK 0x00008000 #define AVR32_USBB_UDCON_TSTPCKT_OFFSET 15 #define AVR32_USBB_UDCON_TSTPCKT_SIZE 1 #define AVR32_USBB_UDCON_UADD 0 #define AVR32_USBB_UDCON_UADD_MASK 0x0000007f #define AVR32_USBB_UDCON_UADD_OFFSET 0 #define AVR32_USBB_UDCON_UADD_SIZE 7 #define AVR32_USBB_UDCON_USBE 17 #define AVR32_USBB_UDCON_USBE_MASK 0x00020000 #define AVR32_USBB_UDCON_USBE_OFFSET 17 #define AVR32_USBB_UDCON_USBE_SIZE 1 #define AVR32_USBB_UDDMA1_ADDR 0x00000314 #define AVR32_USBB_UDDMA1_ADDR_HSB_ADDR 0 #define AVR32_USBB_UDDMA1_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UDDMA1_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UDDMA1_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UDDMA1_CONTROL 0x00000318 #define AVR32_USBB_UDDMA1_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UDDMA1_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UDDMA1_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UDDMA1_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UDDMA1_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UDDMA1_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UDDMA1_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UDDMA1_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UDDMA1_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UDDMA1_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UDDMA1_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UDDMA1_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UDDMA1_CONTROL_CH_EN 0 #define AVR32_USBB_UDDMA1_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA1_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA1_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA1_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UDDMA1_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UDDMA1_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UDDMA1_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA1_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UDDMA1_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UDDMA1_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UDDMA1_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UDDMA1_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UDDMA1_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UDDMA1_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UDDMA1_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA1_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UDDMA1_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UDDMA1_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UDDMA1_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA1_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UDDMA1_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UDDMA1_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UDDMA1_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UDDMA1_NEXTDESC 0x00000310 #define AVR32_USBB_UDDMA1_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UDDMA1_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UDDMA1_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UDDMA1_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UDDMA1_STATUS 0x0000031c #define AVR32_USBB_UDDMA1_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UDDMA1_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UDDMA1_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UDDMA1_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UDDMA1_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UDDMA1_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UDDMA1_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UDDMA1_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UDDMA1_STATUS_CH_EN 0 #define AVR32_USBB_UDDMA1_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA1_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA1_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA1_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UDDMA1_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UDDMA1_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UDDMA1_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UDDMA1_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UDDMA1_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UDDMA1_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UDDMA1_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UDDMA1_STATUS_EOT_STA 4 #define AVR32_USBB_UDDMA1_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UDDMA1_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UDDMA1_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UDDMA2_ADDR 0x00000324 #define AVR32_USBB_UDDMA2_ADDR_HSB_ADDR 0 #define AVR32_USBB_UDDMA2_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UDDMA2_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UDDMA2_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UDDMA2_CONTROL 0x00000328 #define AVR32_USBB_UDDMA2_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UDDMA2_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UDDMA2_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UDDMA2_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UDDMA2_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UDDMA2_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UDDMA2_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UDDMA2_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UDDMA2_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UDDMA2_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UDDMA2_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UDDMA2_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UDDMA2_CONTROL_CH_EN 0 #define AVR32_USBB_UDDMA2_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA2_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA2_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA2_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UDDMA2_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UDDMA2_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UDDMA2_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA2_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UDDMA2_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UDDMA2_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UDDMA2_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UDDMA2_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UDDMA2_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UDDMA2_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UDDMA2_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA2_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UDDMA2_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UDDMA2_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UDDMA2_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA2_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UDDMA2_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UDDMA2_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UDDMA2_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UDDMA2_NEXTDESC 0x00000320 #define AVR32_USBB_UDDMA2_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UDDMA2_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UDDMA2_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UDDMA2_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UDDMA2_STATUS 0x0000032c #define AVR32_USBB_UDDMA2_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UDDMA2_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UDDMA2_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UDDMA2_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UDDMA2_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UDDMA2_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UDDMA2_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UDDMA2_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UDDMA2_STATUS_CH_EN 0 #define AVR32_USBB_UDDMA2_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA2_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA2_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA2_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UDDMA2_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UDDMA2_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UDDMA2_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UDDMA2_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UDDMA2_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UDDMA2_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UDDMA2_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UDDMA2_STATUS_EOT_STA 4 #define AVR32_USBB_UDDMA2_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UDDMA2_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UDDMA2_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UDDMA3_ADDR 0x00000334 #define AVR32_USBB_UDDMA3_ADDR_HSB_ADDR 0 #define AVR32_USBB_UDDMA3_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UDDMA3_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UDDMA3_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UDDMA3_CONTROL 0x00000338 #define AVR32_USBB_UDDMA3_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UDDMA3_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UDDMA3_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UDDMA3_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UDDMA3_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UDDMA3_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UDDMA3_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UDDMA3_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UDDMA3_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UDDMA3_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UDDMA3_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UDDMA3_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UDDMA3_CONTROL_CH_EN 0 #define AVR32_USBB_UDDMA3_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA3_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA3_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA3_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UDDMA3_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UDDMA3_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UDDMA3_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA3_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UDDMA3_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UDDMA3_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UDDMA3_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UDDMA3_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UDDMA3_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UDDMA3_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UDDMA3_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA3_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UDDMA3_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UDDMA3_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UDDMA3_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA3_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UDDMA3_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UDDMA3_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UDDMA3_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UDDMA3_NEXTDESC 0x00000330 #define AVR32_USBB_UDDMA3_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UDDMA3_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UDDMA3_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UDDMA3_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UDDMA3_STATUS 0x0000033c #define AVR32_USBB_UDDMA3_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UDDMA3_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UDDMA3_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UDDMA3_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UDDMA3_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UDDMA3_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UDDMA3_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UDDMA3_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UDDMA3_STATUS_CH_EN 0 #define AVR32_USBB_UDDMA3_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA3_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA3_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA3_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UDDMA3_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UDDMA3_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UDDMA3_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UDDMA3_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UDDMA3_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UDDMA3_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UDDMA3_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UDDMA3_STATUS_EOT_STA 4 #define AVR32_USBB_UDDMA3_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UDDMA3_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UDDMA3_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UDDMA4_ADDR 0x00000344 #define AVR32_USBB_UDDMA4_ADDR_HSB_ADDR 0 #define AVR32_USBB_UDDMA4_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UDDMA4_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UDDMA4_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UDDMA4_CONTROL 0x00000348 #define AVR32_USBB_UDDMA4_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UDDMA4_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UDDMA4_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UDDMA4_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UDDMA4_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UDDMA4_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UDDMA4_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UDDMA4_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UDDMA4_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UDDMA4_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UDDMA4_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UDDMA4_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UDDMA4_CONTROL_CH_EN 0 #define AVR32_USBB_UDDMA4_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA4_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA4_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA4_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UDDMA4_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UDDMA4_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UDDMA4_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA4_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UDDMA4_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UDDMA4_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UDDMA4_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UDDMA4_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UDDMA4_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UDDMA4_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UDDMA4_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA4_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UDDMA4_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UDDMA4_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UDDMA4_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA4_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UDDMA4_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UDDMA4_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UDDMA4_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UDDMA4_NEXTDESC 0x00000340 #define AVR32_USBB_UDDMA4_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UDDMA4_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UDDMA4_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UDDMA4_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UDDMA4_STATUS 0x0000034c #define AVR32_USBB_UDDMA4_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UDDMA4_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UDDMA4_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UDDMA4_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UDDMA4_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UDDMA4_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UDDMA4_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UDDMA4_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UDDMA4_STATUS_CH_EN 0 #define AVR32_USBB_UDDMA4_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA4_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA4_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA4_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UDDMA4_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UDDMA4_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UDDMA4_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UDDMA4_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UDDMA4_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UDDMA4_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UDDMA4_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UDDMA4_STATUS_EOT_STA 4 #define AVR32_USBB_UDDMA4_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UDDMA4_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UDDMA4_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UDDMA5_ADDR 0x00000354 #define AVR32_USBB_UDDMA5_ADDR_HSB_ADDR 0 #define AVR32_USBB_UDDMA5_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UDDMA5_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UDDMA5_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UDDMA5_CONTROL 0x00000358 #define AVR32_USBB_UDDMA5_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UDDMA5_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UDDMA5_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UDDMA5_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UDDMA5_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UDDMA5_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UDDMA5_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UDDMA5_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UDDMA5_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UDDMA5_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UDDMA5_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UDDMA5_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UDDMA5_CONTROL_CH_EN 0 #define AVR32_USBB_UDDMA5_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA5_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA5_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA5_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UDDMA5_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UDDMA5_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UDDMA5_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA5_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UDDMA5_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UDDMA5_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UDDMA5_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UDDMA5_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UDDMA5_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UDDMA5_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UDDMA5_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA5_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UDDMA5_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UDDMA5_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UDDMA5_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA5_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UDDMA5_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UDDMA5_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UDDMA5_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UDDMA5_NEXTDESC 0x00000350 #define AVR32_USBB_UDDMA5_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UDDMA5_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UDDMA5_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UDDMA5_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UDDMA5_STATUS 0x0000035c #define AVR32_USBB_UDDMA5_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UDDMA5_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UDDMA5_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UDDMA5_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UDDMA5_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UDDMA5_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UDDMA5_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UDDMA5_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UDDMA5_STATUS_CH_EN 0 #define AVR32_USBB_UDDMA5_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA5_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA5_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA5_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UDDMA5_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UDDMA5_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UDDMA5_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UDDMA5_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UDDMA5_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UDDMA5_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UDDMA5_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UDDMA5_STATUS_EOT_STA 4 #define AVR32_USBB_UDDMA5_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UDDMA5_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UDDMA5_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UDDMA6_ADDR 0x00000364 #define AVR32_USBB_UDDMA6_ADDR_HSB_ADDR 0 #define AVR32_USBB_UDDMA6_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UDDMA6_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UDDMA6_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UDDMA6_CONTROL 0x00000368 #define AVR32_USBB_UDDMA6_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UDDMA6_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UDDMA6_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UDDMA6_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UDDMA6_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UDDMA6_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UDDMA6_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UDDMA6_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UDDMA6_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UDDMA6_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UDDMA6_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UDDMA6_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UDDMA6_CONTROL_CH_EN 0 #define AVR32_USBB_UDDMA6_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA6_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA6_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA6_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UDDMA6_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UDDMA6_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UDDMA6_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA6_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UDDMA6_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UDDMA6_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UDDMA6_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UDDMA6_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UDDMA6_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UDDMA6_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UDDMA6_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA6_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UDDMA6_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UDDMA6_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UDDMA6_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UDDMA6_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UDDMA6_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UDDMA6_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UDDMA6_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UDDMA6_NEXTDESC 0x00000360 #define AVR32_USBB_UDDMA6_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UDDMA6_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UDDMA6_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UDDMA6_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UDDMA6_STATUS 0x0000036c #define AVR32_USBB_UDDMA6_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UDDMA6_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UDDMA6_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UDDMA6_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UDDMA6_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UDDMA6_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UDDMA6_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UDDMA6_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UDDMA6_STATUS_CH_EN 0 #define AVR32_USBB_UDDMA6_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UDDMA6_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UDDMA6_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UDDMA6_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UDDMA6_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UDDMA6_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UDDMA6_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UDDMA6_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UDDMA6_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UDDMA6_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UDDMA6_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UDDMA6_STATUS_EOT_STA 4 #define AVR32_USBB_UDDMA6_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UDDMA6_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UDDMA6_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UDFEATURES 0x00000030 #define AVR32_USBB_UDFEATURES_BYTE_WRITE_DPRAM 15 #define AVR32_USBB_UDFEATURES_BYTE_WRITE_DPRAM_MASK 0x00008000 #define AVR32_USBB_UDFEATURES_BYTE_WRITE_DPRAM_OFFSET 15 #define AVR32_USBB_UDFEATURES_BYTE_WRITE_DPRAM_SIZE 1 #define AVR32_USBB_UDFEATURES_DATA_BUS_8_16 16 #define AVR32_USBB_UDFEATURES_DATA_BUS_8_16_MASK 0x00010000 #define AVR32_USBB_UDFEATURES_DATA_BUS_8_16_OFFSET 16 #define AVR32_USBB_UDFEATURES_DATA_BUS_8_16_SIZE 1 #define AVR32_USBB_UDFEATURES_DMA_BUFFER_SIZE 7 #define AVR32_USBB_UDFEATURES_DMA_BUFFER_SIZE_16_BITS 0x00000000 #define AVR32_USBB_UDFEATURES_DMA_BUFFER_SIZE_24_BITS 0x00000001 #define AVR32_USBB_UDFEATURES_DMA_BUFFER_SIZE_MASK 0x00000080 #define AVR32_USBB_UDFEATURES_DMA_BUFFER_SIZE_OFFSET 7 #define AVR32_USBB_UDFEATURES_DMA_BUFFER_SIZE_SIZE 1 #define AVR32_USBB_UDFEATURES_DMA_CHANNEL_NBR 4 #define AVR32_USBB_UDFEATURES_DMA_CHANNEL_NBR_MASK 0x00000070 #define AVR32_USBB_UDFEATURES_DMA_CHANNEL_NBR_OFFSET 4 #define AVR32_USBB_UDFEATURES_DMA_CHANNEL_NBR_SIZE 3 #define AVR32_USBB_UDFEATURES_DMA_FIFO_WORD_DEPTH 8 #define AVR32_USBB_UDFEATURES_DMA_FIFO_WORD_DEPTH_MASK 0x00000f00 #define AVR32_USBB_UDFEATURES_DMA_FIFO_WORD_DEPTH_OFFSET 8 #define AVR32_USBB_UDFEATURES_DMA_FIFO_WORD_DEPTH_SIZE 4 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_1 17 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_10 26 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_10_MASK 0x04000000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_10_OFFSET 26 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_10_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_11 27 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_11_MASK 0x08000000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_11_OFFSET 27 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_11_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_12 28 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_12_MASK 0x10000000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_12_OFFSET 28 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_12_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_13 29 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_13_MASK 0x20000000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_13_OFFSET 29 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_13_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_14 30 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_14_MASK 0x40000000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_14_OFFSET 30 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_14_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_15 31 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_15_MASK 0x80000000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_15_OFFSET 31 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_15_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_1_MASK 0x00020000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_1_OFFSET 17 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_1_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_2 18 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_2_MASK 0x00040000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_2_OFFSET 18 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_2_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_3 19 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_3_MASK 0x00080000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_3_OFFSET 19 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_3_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_4 20 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_4_MASK 0x00100000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_4_OFFSET 20 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_4_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_5 21 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_5_MASK 0x00200000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_5_OFFSET 21 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_5_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_6 22 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_6_MASK 0x00400000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_6_OFFSET 22 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_6_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_7 23 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_7_MASK 0x00800000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_7_OFFSET 23 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_7_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_8 24 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_8_MASK 0x01000000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_8_OFFSET 24 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_8_SIZE 1 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_9 25 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_9_MASK 0x02000000 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_9_OFFSET 25 #define AVR32_USBB_UDFEATURES_EN_HIGH_BD_ISO_EPT_9_SIZE 1 #define AVR32_USBB_UDFEATURES_EPT_NBR_MAX 0 #define AVR32_USBB_UDFEATURES_EPT_NBR_MAX_MASK 0x0000000f #define AVR32_USBB_UDFEATURES_EPT_NBR_MAX_OFFSET 0 #define AVR32_USBB_UDFEATURES_EPT_NBR_MAX_SIZE 4 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE 12 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE_GE_16384 0x00000007 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE_LT_1024 0x00000002 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE_LT_16384 0x00000006 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE_LT_2048 0x00000003 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE_LT_256 0x00000000 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE_LT_4096 0x00000004 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE_LT_512 0x00000001 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE_LT_8192 0x00000005 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE_MASK 0x00007000 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE_OFFSET 12 #define AVR32_USBB_UDFEATURES_FIFO_MAX_SIZE_SIZE 3 #define AVR32_USBB_UDFNUM 0x00000020 #define AVR32_USBB_UDFNUM_FNCERR 15 #define AVR32_USBB_UDFNUM_FNCERR_MASK 0x00008000 #define AVR32_USBB_UDFNUM_FNCERR_OFFSET 15 #define AVR32_USBB_UDFNUM_FNCERR_SIZE 1 #define AVR32_USBB_UDFNUM_FNUM 3 #define AVR32_USBB_UDFNUM_FNUM_MASK 0x00003ff8 #define AVR32_USBB_UDFNUM_FNUM_OFFSET 3 #define AVR32_USBB_UDFNUM_FNUM_SIZE 11 #define AVR32_USBB_UDFNUM_MFNUM 0 #define AVR32_USBB_UDFNUM_MFNUM_MASK 0x00000007 #define AVR32_USBB_UDFNUM_MFNUM_OFFSET 0 #define AVR32_USBB_UDFNUM_MFNUM_SIZE 3 #define AVR32_USBB_UDINT 0x00000004 #define AVR32_USBB_UDINTCLR 0x00000008 #define AVR32_USBB_UDINTCLR_EORSMC 5 #define AVR32_USBB_UDINTCLR_EORSMC_MASK 0x00000020 #define AVR32_USBB_UDINTCLR_EORSMC_OFFSET 5 #define AVR32_USBB_UDINTCLR_EORSMC_SIZE 1 #define AVR32_USBB_UDINTCLR_EORSTC 3 #define AVR32_USBB_UDINTCLR_EORSTC_MASK 0x00000008 #define AVR32_USBB_UDINTCLR_EORSTC_OFFSET 3 #define AVR32_USBB_UDINTCLR_EORSTC_SIZE 1 #define AVR32_USBB_UDINTCLR_MSOFC 1 #define AVR32_USBB_UDINTCLR_MSOFC_MASK 0x00000002 #define AVR32_USBB_UDINTCLR_MSOFC_OFFSET 1 #define AVR32_USBB_UDINTCLR_MSOFC_SIZE 1 #define AVR32_USBB_UDINTCLR_SOFC 2 #define AVR32_USBB_UDINTCLR_SOFC_MASK 0x00000004 #define AVR32_USBB_UDINTCLR_SOFC_OFFSET 2 #define AVR32_USBB_UDINTCLR_SOFC_SIZE 1 #define AVR32_USBB_UDINTCLR_SUSPC 0 #define AVR32_USBB_UDINTCLR_SUSPC_MASK 0x00000001 #define AVR32_USBB_UDINTCLR_SUSPC_OFFSET 0 #define AVR32_USBB_UDINTCLR_SUSPC_SIZE 1 #define AVR32_USBB_UDINTCLR_UPRSMC 6 #define AVR32_USBB_UDINTCLR_UPRSMC_MASK 0x00000040 #define AVR32_USBB_UDINTCLR_UPRSMC_OFFSET 6 #define AVR32_USBB_UDINTCLR_UPRSMC_SIZE 1 #define AVR32_USBB_UDINTCLR_VBUSTIC 7 #define AVR32_USBB_UDINTCLR_VBUSTIC_MASK 0x00000080 #define AVR32_USBB_UDINTCLR_VBUSTIC_OFFSET 7 #define AVR32_USBB_UDINTCLR_VBUSTIC_SIZE 1 #define AVR32_USBB_UDINTCLR_WAKEUPC 4 #define AVR32_USBB_UDINTCLR_WAKEUPC_MASK 0x00000010 #define AVR32_USBB_UDINTCLR_WAKEUPC_OFFSET 4 #define AVR32_USBB_UDINTCLR_WAKEUPC_SIZE 1 #define AVR32_USBB_UDINTE 0x00000010 #define AVR32_USBB_UDINTECLR 0x00000014 #define AVR32_USBB_UDINTECLR_DAM6INTEC 30 #define AVR32_USBB_UDINTECLR_DAM6INTEC_MASK 0x40000000 #define AVR32_USBB_UDINTECLR_DAM6INTEC_OFFSET 30 #define AVR32_USBB_UDINTECLR_DAM6INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_DMA1INTEC 25 #define AVR32_USBB_UDINTECLR_DMA1INTEC_MASK 0x02000000 #define AVR32_USBB_UDINTECLR_DMA1INTEC_OFFSET 25 #define AVR32_USBB_UDINTECLR_DMA1INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_DMA2INTEC 26 #define AVR32_USBB_UDINTECLR_DMA2INTEC_MASK 0x04000000 #define AVR32_USBB_UDINTECLR_DMA2INTEC_OFFSET 26 #define AVR32_USBB_UDINTECLR_DMA2INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_DMA3INTEC 27 #define AVR32_USBB_UDINTECLR_DMA3INTEC_MASK 0x08000000 #define AVR32_USBB_UDINTECLR_DMA3INTEC_OFFSET 27 #define AVR32_USBB_UDINTECLR_DMA3INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_DMA4INTEC 28 #define AVR32_USBB_UDINTECLR_DMA4INTEC_MASK 0x10000000 #define AVR32_USBB_UDINTECLR_DMA4INTEC_OFFSET 28 #define AVR32_USBB_UDINTECLR_DMA4INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_DMA5INTEC 29 #define AVR32_USBB_UDINTECLR_DMA5INTEC_MASK 0x20000000 #define AVR32_USBB_UDINTECLR_DMA5INTEC_OFFSET 29 #define AVR32_USBB_UDINTECLR_DMA5INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_EORSMEC 5 #define AVR32_USBB_UDINTECLR_EORSMEC_MASK 0x00000020 #define AVR32_USBB_UDINTECLR_EORSMEC_OFFSET 5 #define AVR32_USBB_UDINTECLR_EORSMEC_SIZE 1 #define AVR32_USBB_UDINTECLR_EORSTEC 3 #define AVR32_USBB_UDINTECLR_EORSTEC_MASK 0x00000008 #define AVR32_USBB_UDINTECLR_EORSTEC_OFFSET 3 #define AVR32_USBB_UDINTECLR_EORSTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_EP0INTEC 12 #define AVR32_USBB_UDINTECLR_EP0INTEC_MASK 0x00001000 #define AVR32_USBB_UDINTECLR_EP0INTEC_OFFSET 12 #define AVR32_USBB_UDINTECLR_EP0INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_EP1INTEC 13 #define AVR32_USBB_UDINTECLR_EP1INTEC_MASK 0x00002000 #define AVR32_USBB_UDINTECLR_EP1INTEC_OFFSET 13 #define AVR32_USBB_UDINTECLR_EP1INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_EP2INTEC 14 #define AVR32_USBB_UDINTECLR_EP2INTEC_MASK 0x00004000 #define AVR32_USBB_UDINTECLR_EP2INTEC_OFFSET 14 #define AVR32_USBB_UDINTECLR_EP2INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_EP3INTEC 15 #define AVR32_USBB_UDINTECLR_EP3INTEC_MASK 0x00008000 #define AVR32_USBB_UDINTECLR_EP3INTEC_OFFSET 15 #define AVR32_USBB_UDINTECLR_EP3INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_EP4INTEC 16 #define AVR32_USBB_UDINTECLR_EP4INTEC_MASK 0x00010000 #define AVR32_USBB_UDINTECLR_EP4INTEC_OFFSET 16 #define AVR32_USBB_UDINTECLR_EP4INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_EP5INTEC 17 #define AVR32_USBB_UDINTECLR_EP5INTEC_MASK 0x00020000 #define AVR32_USBB_UDINTECLR_EP5INTEC_OFFSET 17 #define AVR32_USBB_UDINTECLR_EP5INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_EP6INTEC 18 #define AVR32_USBB_UDINTECLR_EP6INTEC_MASK 0x00040000 #define AVR32_USBB_UDINTECLR_EP6INTEC_OFFSET 18 #define AVR32_USBB_UDINTECLR_EP6INTEC_SIZE 1 #define AVR32_USBB_UDINTECLR_MSOFEC 1 #define AVR32_USBB_UDINTECLR_MSOFEC_MASK 0x00000002 #define AVR32_USBB_UDINTECLR_MSOFEC_OFFSET 1 #define AVR32_USBB_UDINTECLR_MSOFEC_SIZE 1 #define AVR32_USBB_UDINTECLR_SOFEC 2 #define AVR32_USBB_UDINTECLR_SOFEC_MASK 0x00000004 #define AVR32_USBB_UDINTECLR_SOFEC_OFFSET 2 #define AVR32_USBB_UDINTECLR_SOFEC_SIZE 1 #define AVR32_USBB_UDINTECLR_SUSPEC 0 #define AVR32_USBB_UDINTECLR_SUSPEC_MASK 0x00000001 #define AVR32_USBB_UDINTECLR_SUSPEC_OFFSET 0 #define AVR32_USBB_UDINTECLR_SUSPEC_SIZE 1 #define AVR32_USBB_UDINTECLR_UPRSMEC 6 #define AVR32_USBB_UDINTECLR_UPRSMEC_MASK 0x00000040 #define AVR32_USBB_UDINTECLR_UPRSMEC_OFFSET 6 #define AVR32_USBB_UDINTECLR_UPRSMEC_SIZE 1 #define AVR32_USBB_UDINTECLR_VBUSEC 7 #define AVR32_USBB_UDINTECLR_VBUSEC_MASK 0x00000080 #define AVR32_USBB_UDINTECLR_VBUSEC_OFFSET 7 #define AVR32_USBB_UDINTECLR_VBUSEC_SIZE 1 #define AVR32_USBB_UDINTECLR_WAKEUPEC 4 #define AVR32_USBB_UDINTECLR_WAKEUPEC_MASK 0x00000010 #define AVR32_USBB_UDINTECLR_WAKEUPEC_OFFSET 4 #define AVR32_USBB_UDINTECLR_WAKEUPEC_SIZE 1 #define AVR32_USBB_UDINTESET 0x00000018 #define AVR32_USBB_UDINTESET_DMA1INTES 25 #define AVR32_USBB_UDINTESET_DMA1INTES_MASK 0x02000000 #define AVR32_USBB_UDINTESET_DMA1INTES_OFFSET 25 #define AVR32_USBB_UDINTESET_DMA1INTES_SIZE 1 #define AVR32_USBB_UDINTESET_DMA2INTES 26 #define AVR32_USBB_UDINTESET_DMA2INTES_MASK 0x04000000 #define AVR32_USBB_UDINTESET_DMA2INTES_OFFSET 26 #define AVR32_USBB_UDINTESET_DMA2INTES_SIZE 1 #define AVR32_USBB_UDINTESET_DMA3INTES 27 #define AVR32_USBB_UDINTESET_DMA3INTES_MASK 0x08000000 #define AVR32_USBB_UDINTESET_DMA3INTES_OFFSET 27 #define AVR32_USBB_UDINTESET_DMA3INTES_SIZE 1 #define AVR32_USBB_UDINTESET_DMA4INTES 28 #define AVR32_USBB_UDINTESET_DMA4INTES_MASK 0x10000000 #define AVR32_USBB_UDINTESET_DMA4INTES_OFFSET 28 #define AVR32_USBB_UDINTESET_DMA4INTES_SIZE 1 #define AVR32_USBB_UDINTESET_DMA5INTES 29 #define AVR32_USBB_UDINTESET_DMA5INTES_MASK 0x20000000 #define AVR32_USBB_UDINTESET_DMA5INTES_OFFSET 29 #define AVR32_USBB_UDINTESET_DMA5INTES_SIZE 1 #define AVR32_USBB_UDINTESET_DMA6INTES 30 #define AVR32_USBB_UDINTESET_DMA6INTES_MASK 0x40000000 #define AVR32_USBB_UDINTESET_DMA6INTES_OFFSET 30 #define AVR32_USBB_UDINTESET_DMA6INTES_SIZE 1 #define AVR32_USBB_UDINTESET_EORSMES 5 #define AVR32_USBB_UDINTESET_EORSMES_MASK 0x00000020 #define AVR32_USBB_UDINTESET_EORSMES_OFFSET 5 #define AVR32_USBB_UDINTESET_EORSMES_SIZE 1 #define AVR32_USBB_UDINTESET_EORSTES 3 #define AVR32_USBB_UDINTESET_EORSTES_MASK 0x00000008 #define AVR32_USBB_UDINTESET_EORSTES_OFFSET 3 #define AVR32_USBB_UDINTESET_EORSTES_SIZE 1 #define AVR32_USBB_UDINTESET_EP0INTES 12 #define AVR32_USBB_UDINTESET_EP0INTES_MASK 0x00001000 #define AVR32_USBB_UDINTESET_EP0INTES_OFFSET 12 #define AVR32_USBB_UDINTESET_EP0INTES_SIZE 1 #define AVR32_USBB_UDINTESET_EP1INTES 13 #define AVR32_USBB_UDINTESET_EP1INTES_MASK 0x00002000 #define AVR32_USBB_UDINTESET_EP1INTES_OFFSET 13 #define AVR32_USBB_UDINTESET_EP1INTES_SIZE 1 #define AVR32_USBB_UDINTESET_EP2INTES 14 #define AVR32_USBB_UDINTESET_EP2INTES_MASK 0x00004000 #define AVR32_USBB_UDINTESET_EP2INTES_OFFSET 14 #define AVR32_USBB_UDINTESET_EP2INTES_SIZE 1 #define AVR32_USBB_UDINTESET_EP3INTES 15 #define AVR32_USBB_UDINTESET_EP3INTES_MASK 0x00008000 #define AVR32_USBB_UDINTESET_EP3INTES_OFFSET 15 #define AVR32_USBB_UDINTESET_EP3INTES_SIZE 1 #define AVR32_USBB_UDINTESET_EP4INTES 16 #define AVR32_USBB_UDINTESET_EP4INTES_MASK 0x00010000 #define AVR32_USBB_UDINTESET_EP4INTES_OFFSET 16 #define AVR32_USBB_UDINTESET_EP4INTES_SIZE 1 #define AVR32_USBB_UDINTESET_EP5INTES 17 #define AVR32_USBB_UDINTESET_EP5INTES_MASK 0x00020000 #define AVR32_USBB_UDINTESET_EP5INTES_OFFSET 17 #define AVR32_USBB_UDINTESET_EP5INTES_SIZE 1 #define AVR32_USBB_UDINTESET_EP6INTES 18 #define AVR32_USBB_UDINTESET_EP6INTES_MASK 0x00040000 #define AVR32_USBB_UDINTESET_EP6INTES_OFFSET 18 #define AVR32_USBB_UDINTESET_EP6INTES_SIZE 1 #define AVR32_USBB_UDINTESET_MSOFES 1 #define AVR32_USBB_UDINTESET_MSOFES_MASK 0x00000002 #define AVR32_USBB_UDINTESET_MSOFES_OFFSET 1 #define AVR32_USBB_UDINTESET_MSOFES_SIZE 1 #define AVR32_USBB_UDINTESET_SOFES 2 #define AVR32_USBB_UDINTESET_SOFES_MASK 0x00000004 #define AVR32_USBB_UDINTESET_SOFES_OFFSET 2 #define AVR32_USBB_UDINTESET_SOFES_SIZE 1 #define AVR32_USBB_UDINTESET_SUSPES 0 #define AVR32_USBB_UDINTESET_SUSPES_MASK 0x00000001 #define AVR32_USBB_UDINTESET_SUSPES_OFFSET 0 #define AVR32_USBB_UDINTESET_SUSPES_SIZE 1 #define AVR32_USBB_UDINTESET_UPRSMES 6 #define AVR32_USBB_UDINTESET_UPRSMES_MASK 0x00000040 #define AVR32_USBB_UDINTESET_UPRSMES_OFFSET 6 #define AVR32_USBB_UDINTESET_UPRSMES_SIZE 1 #define AVR32_USBB_UDINTESET_VBUSES 7 #define AVR32_USBB_UDINTESET_VBUSES_MASK 0x00000080 #define AVR32_USBB_UDINTESET_VBUSES_OFFSET 7 #define AVR32_USBB_UDINTESET_VBUSES_SIZE 1 #define AVR32_USBB_UDINTESET_WAKEUPES 4 #define AVR32_USBB_UDINTESET_WAKEUPES_MASK 0x00000010 #define AVR32_USBB_UDINTESET_WAKEUPES_OFFSET 4 #define AVR32_USBB_UDINTESET_WAKEUPES_SIZE 1 #define AVR32_USBB_UDINTE_DMA1INTE 25 #define AVR32_USBB_UDINTE_DMA1INTE_MASK 0x02000000 #define AVR32_USBB_UDINTE_DMA1INTE_OFFSET 25 #define AVR32_USBB_UDINTE_DMA1INTE_SIZE 1 #define AVR32_USBB_UDINTE_DMA2INTE 26 #define AVR32_USBB_UDINTE_DMA2INTE_MASK 0x04000000 #define AVR32_USBB_UDINTE_DMA2INTE_OFFSET 26 #define AVR32_USBB_UDINTE_DMA2INTE_SIZE 1 #define AVR32_USBB_UDINTE_DMA3INTE 27 #define AVR32_USBB_UDINTE_DMA3INTE_MASK 0x08000000 #define AVR32_USBB_UDINTE_DMA3INTE_OFFSET 27 #define AVR32_USBB_UDINTE_DMA3INTE_SIZE 1 #define AVR32_USBB_UDINTE_DMA4INTE 28 #define AVR32_USBB_UDINTE_DMA4INTE_MASK 0x10000000 #define AVR32_USBB_UDINTE_DMA4INTE_OFFSET 28 #define AVR32_USBB_UDINTE_DMA4INTE_SIZE 1 #define AVR32_USBB_UDINTE_DMA5INTE 29 #define AVR32_USBB_UDINTE_DMA5INTE_MASK 0x20000000 #define AVR32_USBB_UDINTE_DMA5INTE_OFFSET 29 #define AVR32_USBB_UDINTE_DMA5INTE_SIZE 1 #define AVR32_USBB_UDINTE_DMA6INTE 30 #define AVR32_USBB_UDINTE_DMA6INTE_MASK 0x40000000 #define AVR32_USBB_UDINTE_DMA6INTE_OFFSET 30 #define AVR32_USBB_UDINTE_DMA6INTE_SIZE 1 #define AVR32_USBB_UDINTE_EORSME 5 #define AVR32_USBB_UDINTE_EORSME_MASK 0x00000020 #define AVR32_USBB_UDINTE_EORSME_OFFSET 5 #define AVR32_USBB_UDINTE_EORSME_SIZE 1 #define AVR32_USBB_UDINTE_EORSTE 3 #define AVR32_USBB_UDINTE_EORSTE_MASK 0x00000008 #define AVR32_USBB_UDINTE_EORSTE_OFFSET 3 #define AVR32_USBB_UDINTE_EORSTE_SIZE 1 #define AVR32_USBB_UDINTE_EP0INTE 12 #define AVR32_USBB_UDINTE_EP0INTE_MASK 0x00001000 #define AVR32_USBB_UDINTE_EP0INTE_OFFSET 12 #define AVR32_USBB_UDINTE_EP0INTE_SIZE 1 #define AVR32_USBB_UDINTE_EP1INTE 13 #define AVR32_USBB_UDINTE_EP1INTE_MASK 0x00002000 #define AVR32_USBB_UDINTE_EP1INTE_OFFSET 13 #define AVR32_USBB_UDINTE_EP1INTE_SIZE 1 #define AVR32_USBB_UDINTE_EP2INTE 14 #define AVR32_USBB_UDINTE_EP2INTE_MASK 0x00004000 #define AVR32_USBB_UDINTE_EP2INTE_OFFSET 14 #define AVR32_USBB_UDINTE_EP2INTE_SIZE 1 #define AVR32_USBB_UDINTE_EP3INTE 15 #define AVR32_USBB_UDINTE_EP3INTE_MASK 0x00008000 #define AVR32_USBB_UDINTE_EP3INTE_OFFSET 15 #define AVR32_USBB_UDINTE_EP3INTE_SIZE 1 #define AVR32_USBB_UDINTE_EP4INTE 16 #define AVR32_USBB_UDINTE_EP4INTE_MASK 0x00010000 #define AVR32_USBB_UDINTE_EP4INTE_OFFSET 16 #define AVR32_USBB_UDINTE_EP4INTE_SIZE 1 #define AVR32_USBB_UDINTE_EP5INTE 17 #define AVR32_USBB_UDINTE_EP5INTE_MASK 0x00020000 #define AVR32_USBB_UDINTE_EP5INTE_OFFSET 17 #define AVR32_USBB_UDINTE_EP5INTE_SIZE 1 #define AVR32_USBB_UDINTE_EP6INTE 18 #define AVR32_USBB_UDINTE_EP6INTE_MASK 0x00040000 #define AVR32_USBB_UDINTE_EP6INTE_OFFSET 18 #define AVR32_USBB_UDINTE_EP6INTE_SIZE 1 #define AVR32_USBB_UDINTE_MSOFE 1 #define AVR32_USBB_UDINTE_MSOFE_MASK 0x00000002 #define AVR32_USBB_UDINTE_MSOFE_OFFSET 1 #define AVR32_USBB_UDINTE_MSOFE_SIZE 1 #define AVR32_USBB_UDINTE_SOFE 2 #define AVR32_USBB_UDINTE_SOFE_MASK 0x00000004 #define AVR32_USBB_UDINTE_SOFE_OFFSET 2 #define AVR32_USBB_UDINTE_SOFE_SIZE 1 #define AVR32_USBB_UDINTE_SUSPE 0 #define AVR32_USBB_UDINTE_SUSPE_MASK 0x00000001 #define AVR32_USBB_UDINTE_SUSPE_OFFSET 0 #define AVR32_USBB_UDINTE_SUSPE_SIZE 1 #define AVR32_USBB_UDINTE_UPRSME 6 #define AVR32_USBB_UDINTE_UPRSME_MASK 0x00000040 #define AVR32_USBB_UDINTE_UPRSME_OFFSET 6 #define AVR32_USBB_UDINTE_UPRSME_SIZE 1 #define AVR32_USBB_UDINTE_VBUSE 7 #define AVR32_USBB_UDINTE_VBUSE_MASK 0x00000080 #define AVR32_USBB_UDINTE_VBUSE_OFFSET 7 #define AVR32_USBB_UDINTE_VBUSE_SIZE 1 #define AVR32_USBB_UDINTE_WAKEUPE 4 #define AVR32_USBB_UDINTE_WAKEUPE_MASK 0x00000010 #define AVR32_USBB_UDINTE_WAKEUPE_OFFSET 4 #define AVR32_USBB_UDINTE_WAKEUPE_SIZE 1 #define AVR32_USBB_UDINTSET 0x0000000c #define AVR32_USBB_UDINTSET_DMA1INTS 25 #define AVR32_USBB_UDINTSET_DMA1INTS_MASK 0x02000000 #define AVR32_USBB_UDINTSET_DMA1INTS_OFFSET 25 #define AVR32_USBB_UDINTSET_DMA1INTS_SIZE 1 #define AVR32_USBB_UDINTSET_DMA2INTS 26 #define AVR32_USBB_UDINTSET_DMA2INTS_MASK 0x04000000 #define AVR32_USBB_UDINTSET_DMA2INTS_OFFSET 26 #define AVR32_USBB_UDINTSET_DMA2INTS_SIZE 1 #define AVR32_USBB_UDINTSET_DMA3INTS 27 #define AVR32_USBB_UDINTSET_DMA3INTS_MASK 0x08000000 #define AVR32_USBB_UDINTSET_DMA3INTS_OFFSET 27 #define AVR32_USBB_UDINTSET_DMA3INTS_SIZE 1 #define AVR32_USBB_UDINTSET_DMA4INTS 28 #define AVR32_USBB_UDINTSET_DMA4INTS_MASK 0x10000000 #define AVR32_USBB_UDINTSET_DMA4INTS_OFFSET 28 #define AVR32_USBB_UDINTSET_DMA4INTS_SIZE 1 #define AVR32_USBB_UDINTSET_DMA5INTS 29 #define AVR32_USBB_UDINTSET_DMA5INTS_MASK 0x20000000 #define AVR32_USBB_UDINTSET_DMA5INTS_OFFSET 29 #define AVR32_USBB_UDINTSET_DMA5INTS_SIZE 1 #define AVR32_USBB_UDINTSET_DMA6INTS 30 #define AVR32_USBB_UDINTSET_DMA6INTS_MASK 0x40000000 #define AVR32_USBB_UDINTSET_DMA6INTS_OFFSET 30 #define AVR32_USBB_UDINTSET_DMA6INTS_SIZE 1 #define AVR32_USBB_UDINTSET_EORSMS 5 #define AVR32_USBB_UDINTSET_EORSMS_MASK 0x00000020 #define AVR32_USBB_UDINTSET_EORSMS_OFFSET 5 #define AVR32_USBB_UDINTSET_EORSMS_SIZE 1 #define AVR32_USBB_UDINTSET_EORSTS 3 #define AVR32_USBB_UDINTSET_EORSTS_MASK 0x00000008 #define AVR32_USBB_UDINTSET_EORSTS_OFFSET 3 #define AVR32_USBB_UDINTSET_EORSTS_SIZE 1 #define AVR32_USBB_UDINTSET_MSOFS 1 #define AVR32_USBB_UDINTSET_MSOFS_MASK 0x00000002 #define AVR32_USBB_UDINTSET_MSOFS_OFFSET 1 #define AVR32_USBB_UDINTSET_MSOFS_SIZE 1 #define AVR32_USBB_UDINTSET_SOFS 2 #define AVR32_USBB_UDINTSET_SOFS_MASK 0x00000004 #define AVR32_USBB_UDINTSET_SOFS_OFFSET 2 #define AVR32_USBB_UDINTSET_SOFS_SIZE 1 #define AVR32_USBB_UDINTSET_SUSPS 0 #define AVR32_USBB_UDINTSET_SUSPS_MASK 0x00000001 #define AVR32_USBB_UDINTSET_SUSPS_OFFSET 0 #define AVR32_USBB_UDINTSET_SUSPS_SIZE 1 #define AVR32_USBB_UDINTSET_UPRSMS 6 #define AVR32_USBB_UDINTSET_UPRSMS_MASK 0x00000040 #define AVR32_USBB_UDINTSET_UPRSMS_OFFSET 6 #define AVR32_USBB_UDINTSET_UPRSMS_SIZE 1 #define AVR32_USBB_UDINTSET_VBUSTIS 7 #define AVR32_USBB_UDINTSET_VBUSTIS_MASK 0x00000080 #define AVR32_USBB_UDINTSET_VBUSTIS_OFFSET 7 #define AVR32_USBB_UDINTSET_VBUSTIS_SIZE 1 #define AVR32_USBB_UDINTSET_WAKEUPS 4 #define AVR32_USBB_UDINTSET_WAKEUPS_MASK 0x00000010 #define AVR32_USBB_UDINTSET_WAKEUPS_OFFSET 4 #define AVR32_USBB_UDINTSET_WAKEUPS_SIZE 1 #define AVR32_USBB_UDINT_CLKUSABLE 10 #define AVR32_USBB_UDINT_CLKUSABLE_MASK 0x00000400 #define AVR32_USBB_UDINT_CLKUSABLE_OFFSET 10 #define AVR32_USBB_UDINT_CLKUSABLE_SIZE 1 #define AVR32_USBB_UDINT_DMA1INT 25 #define AVR32_USBB_UDINT_DMA1INT_MASK 0x02000000 #define AVR32_USBB_UDINT_DMA1INT_OFFSET 25 #define AVR32_USBB_UDINT_DMA1INT_SIZE 1 #define AVR32_USBB_UDINT_DMA2INT 26 #define AVR32_USBB_UDINT_DMA2INT_MASK 0x04000000 #define AVR32_USBB_UDINT_DMA2INT_OFFSET 26 #define AVR32_USBB_UDINT_DMA2INT_SIZE 1 #define AVR32_USBB_UDINT_DMA3INT 27 #define AVR32_USBB_UDINT_DMA3INT_MASK 0x08000000 #define AVR32_USBB_UDINT_DMA3INT_OFFSET 27 #define AVR32_USBB_UDINT_DMA3INT_SIZE 1 #define AVR32_USBB_UDINT_DMA4INT 28 #define AVR32_USBB_UDINT_DMA4INT_MASK 0x10000000 #define AVR32_USBB_UDINT_DMA4INT_OFFSET 28 #define AVR32_USBB_UDINT_DMA4INT_SIZE 1 #define AVR32_USBB_UDINT_DMA5INT 29 #define AVR32_USBB_UDINT_DMA5INT_MASK 0x20000000 #define AVR32_USBB_UDINT_DMA5INT_OFFSET 29 #define AVR32_USBB_UDINT_DMA5INT_SIZE 1 #define AVR32_USBB_UDINT_DMA6INT 30 #define AVR32_USBB_UDINT_DMA6INT_MASK 0x40000000 #define AVR32_USBB_UDINT_DMA6INT_OFFSET 30 #define AVR32_USBB_UDINT_DMA6INT_SIZE 1 #define AVR32_USBB_UDINT_EORSM 5 #define AVR32_USBB_UDINT_EORSM_MASK 0x00000020 #define AVR32_USBB_UDINT_EORSM_OFFSET 5 #define AVR32_USBB_UDINT_EORSM_SIZE 1 #define AVR32_USBB_UDINT_EORST 3 #define AVR32_USBB_UDINT_EORST_MASK 0x00000008 #define AVR32_USBB_UDINT_EORST_OFFSET 3 #define AVR32_USBB_UDINT_EORST_SIZE 1 #define AVR32_USBB_UDINT_EP0INT 12 #define AVR32_USBB_UDINT_EP0INT_MASK 0x00001000 #define AVR32_USBB_UDINT_EP0INT_OFFSET 12 #define AVR32_USBB_UDINT_EP0INT_SIZE 1 #define AVR32_USBB_UDINT_EP1INT 13 #define AVR32_USBB_UDINT_EP1INT_MASK 0x00002000 #define AVR32_USBB_UDINT_EP1INT_OFFSET 13 #define AVR32_USBB_UDINT_EP1INT_SIZE 1 #define AVR32_USBB_UDINT_EP2INT 14 #define AVR32_USBB_UDINT_EP2INT_MASK 0x00004000 #define AVR32_USBB_UDINT_EP2INT_OFFSET 14 #define AVR32_USBB_UDINT_EP2INT_SIZE 1 #define AVR32_USBB_UDINT_EP3INT 15 #define AVR32_USBB_UDINT_EP3INT_MASK 0x00008000 #define AVR32_USBB_UDINT_EP3INT_OFFSET 15 #define AVR32_USBB_UDINT_EP3INT_SIZE 1 #define AVR32_USBB_UDINT_EP4INT 16 #define AVR32_USBB_UDINT_EP4INT_MASK 0x00010000 #define AVR32_USBB_UDINT_EP4INT_OFFSET 16 #define AVR32_USBB_UDINT_EP4INT_SIZE 1 #define AVR32_USBB_UDINT_EP5INT 17 #define AVR32_USBB_UDINT_EP5INT_MASK 0x00020000 #define AVR32_USBB_UDINT_EP5INT_OFFSET 17 #define AVR32_USBB_UDINT_EP5INT_SIZE 1 #define AVR32_USBB_UDINT_EP6INT 18 #define AVR32_USBB_UDINT_EP6INT_MASK 0x00040000 #define AVR32_USBB_UDINT_EP6INT_OFFSET 18 #define AVR32_USBB_UDINT_EP6INT_SIZE 1 #define AVR32_USBB_UDINT_MSOF 1 #define AVR32_USBB_UDINT_MSOF_MASK 0x00000002 #define AVR32_USBB_UDINT_MSOF_OFFSET 1 #define AVR32_USBB_UDINT_MSOF_SIZE 1 #define AVR32_USBB_UDINT_SOF 2 #define AVR32_USBB_UDINT_SOF_MASK 0x00000004 #define AVR32_USBB_UDINT_SOF_OFFSET 2 #define AVR32_USBB_UDINT_SOF_SIZE 1 #define AVR32_USBB_UDINT_SPEED 9 #define AVR32_USBB_UDINT_SPEED_MASK 0x00000200 #define AVR32_USBB_UDINT_SPEED_OFFSET 9 #define AVR32_USBB_UDINT_SPEED_SIZE 1 #define AVR32_USBB_UDINT_SUSP 0 #define AVR32_USBB_UDINT_SUSP_MASK 0x00000001 #define AVR32_USBB_UDINT_SUSP_OFFSET 0 #define AVR32_USBB_UDINT_SUSP_SIZE 1 #define AVR32_USBB_UDINT_UPRSM 6 #define AVR32_USBB_UDINT_UPRSM_MASK 0x00000040 #define AVR32_USBB_UDINT_UPRSM_OFFSET 6 #define AVR32_USBB_UDINT_UPRSM_SIZE 1 #define AVR32_USBB_UDINT_VBUS 8 #define AVR32_USBB_UDINT_VBUSTI 7 #define AVR32_USBB_UDINT_VBUSTI_MASK 0x00000080 #define AVR32_USBB_UDINT_VBUSTI_OFFSET 7 #define AVR32_USBB_UDINT_VBUSTI_SIZE 1 #define AVR32_USBB_UDINT_VBUS_MASK 0x00000100 #define AVR32_USBB_UDINT_VBUS_OFFSET 8 #define AVR32_USBB_UDINT_VBUS_SIZE 1 #define AVR32_USBB_UDINT_WAKEUP 4 #define AVR32_USBB_UDINT_WAKEUP_MASK 0x00000010 #define AVR32_USBB_UDINT_WAKEUP_OFFSET 4 #define AVR32_USBB_UDINT_WAKEUP_SIZE 1 #define AVR32_USBB_UDNAME1 0x00000038 #define AVR32_USBB_UDNAME2 0x0000003c #define AVR32_USBB_UDTST1 0x00000024 #define AVR32_USBB_UDTST1_COUNTERA 0 #define AVR32_USBB_UDTST1_COUNTERA_MASK 0x00007fff #define AVR32_USBB_UDTST1_COUNTERA_OFFSET 0 #define AVR32_USBB_UDTST1_COUNTERA_SIZE 15 #define AVR32_USBB_UDTST1_COUNTERB 16 #define AVR32_USBB_UDTST1_COUNTERB_MASK 0x003f0000 #define AVR32_USBB_UDTST1_COUNTERB_OFFSET 16 #define AVR32_USBB_UDTST1_COUNTERB_SIZE 6 #define AVR32_USBB_UDTST1_LOADCNTA 15 #define AVR32_USBB_UDTST1_LOADCNTA_MASK 0x00008000 #define AVR32_USBB_UDTST1_LOADCNTA_OFFSET 15 #define AVR32_USBB_UDTST1_LOADCNTA_SIZE 1 #define AVR32_USBB_UDTST1_LOADCNTB 23 #define AVR32_USBB_UDTST1_LOADCNTB_MASK 0x00800000 #define AVR32_USBB_UDTST1_LOADCNTB_OFFSET 23 #define AVR32_USBB_UDTST1_LOADCNTB_SIZE 1 #define AVR32_USBB_UDTST1_LOADSOFCNT 31 #define AVR32_USBB_UDTST1_LOADSOFCNT_MASK 0x80000000 #define AVR32_USBB_UDTST1_LOADSOFCNT_OFFSET 31 #define AVR32_USBB_UDTST1_LOADSOFCNT_SIZE 1 #define AVR32_USBB_UDTST1_SOFCNTMAX 24 #define AVR32_USBB_UDTST1_SOFCNTMAX_MASK 0x7f000000 #define AVR32_USBB_UDTST1_SOFCNTMAX_OFFSET 24 #define AVR32_USBB_UDTST1_SOFCNTMAX_SIZE 7 #define AVR32_USBB_UDTST2 0x00000028 #define AVR32_USBB_UDTST2_BYPASSDPLL 5 #define AVR32_USBB_UDTST2_BYPASSDPLL_MASK 0x00000020 #define AVR32_USBB_UDTST2_BYPASSDPLL_OFFSET 5 #define AVR32_USBB_UDTST2_BYPASSDPLL_SIZE 1 #define AVR32_USBB_UDTST2_DISBALEGATEDCLOCK 3 #define AVR32_USBB_UDTST2_DISBALEGATEDCLOCK_MASK 0x00000008 #define AVR32_USBB_UDTST2_DISBALEGATEDCLOCK_OFFSET 3 #define AVR32_USBB_UDTST2_DISBALEGATEDCLOCK_SIZE 1 #define AVR32_USBB_UDTST2_FORCESUSPENDMTO1 4 #define AVR32_USBB_UDTST2_FORCESUSPENDMTO1_MASK 0x00000010 #define AVR32_USBB_UDTST2_FORCESUSPENDMTO1_OFFSET 4 #define AVR32_USBB_UDTST2_FORCESUSPENDMTO1_SIZE 1 #define AVR32_USBB_UDTST2_FULLDETACHEN 0 #define AVR32_USBB_UDTST2_FULLDETACHEN_MASK 0x00000001 #define AVR32_USBB_UDTST2_FULLDETACHEN_OFFSET 0 #define AVR32_USBB_UDTST2_FULLDETACHEN_SIZE 1 #define AVR32_USBB_UDTST2_HSSERIALMODE 1 #define AVR32_USBB_UDTST2_HSSERIALMODE_MASK 0x00000002 #define AVR32_USBB_UDTST2_HSSERIALMODE_OFFSET 1 #define AVR32_USBB_UDTST2_HSSERIALMODE_SIZE 1 #define AVR32_USBB_UDTST2_LOOPBACKMODE 2 #define AVR32_USBB_UDTST2_LOOPBACKMODE_MASK 0x00000004 #define AVR32_USBB_UDTST2_LOOPBACKMODE_OFFSET 2 #define AVR32_USBB_UDTST2_LOOPBACKMODE_SIZE 1 #define AVR32_USBB_UDTST2_NOTHOSTDISCONNECT 6 #define AVR32_USBB_UDTST2_NOTHOSTDISCONNECT_MASK 0x00000040 #define AVR32_USBB_UDTST2_NOTHOSTDISCONNECT_OFFSET 6 #define AVR32_USBB_UDTST2_NOTHOSTDISCONNECT_SIZE 1 #define AVR32_USBB_UDVERS 0x0000002c #define AVR32_USBB_UECFG0 0x00000100 #define AVR32_USBB_UECFG0_ALLOC 1 #define AVR32_USBB_UECFG0_ALLOC_MASK 0x00000002 #define AVR32_USBB_UECFG0_ALLOC_OFFSET 1 #define AVR32_USBB_UECFG0_ALLOC_SIZE 1 #define AVR32_USBB_UECFG0_AUTOSW 9 #define AVR32_USBB_UECFG0_AUTOSW_MASK 0x00000200 #define AVR32_USBB_UECFG0_AUTOSW_OFFSET 9 #define AVR32_USBB_UECFG0_AUTOSW_SIZE 1 #define AVR32_USBB_UECFG0_DATASIZERDWR 30 #define AVR32_USBB_UECFG0_DATASIZERDWR_MASK 0xc0000000 #define AVR32_USBB_UECFG0_DATASIZERDWR_OFFSET 30 #define AVR32_USBB_UECFG0_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UECFG0_EPBK 2 #define AVR32_USBB_UECFG0_EPBK_DOUBLE 0x00000001 #define AVR32_USBB_UECFG0_EPBK_MASK 0x0000000c #define AVR32_USBB_UECFG0_EPBK_OFFSET 2 #define AVR32_USBB_UECFG0_EPBK_SINGLE 0x00000000 #define AVR32_USBB_UECFG0_EPBK_SIZE 2 #define AVR32_USBB_UECFG0_EPBK_TRIPLE 0x00000002 #define AVR32_USBB_UECFG0_EPDIR 8 #define AVR32_USBB_UECFG0_EPDIR_IN 0x00000001 #define AVR32_USBB_UECFG0_EPDIR_MASK 0x00000100 #define AVR32_USBB_UECFG0_EPDIR_OFFSET 8 #define AVR32_USBB_UECFG0_EPDIR_OUT 0x00000000 #define AVR32_USBB_UECFG0_EPDIR_SIZE 1 #define AVR32_USBB_UECFG0_EPSIZE 4 #define AVR32_USBB_UECFG0_EPSIZE_1024 0x00000007 #define AVR32_USBB_UECFG0_EPSIZE_128 0x00000004 #define AVR32_USBB_UECFG0_EPSIZE_16 0x00000001 #define AVR32_USBB_UECFG0_EPSIZE_256 0x00000005 #define AVR32_USBB_UECFG0_EPSIZE_32 0x00000002 #define AVR32_USBB_UECFG0_EPSIZE_512 0x00000006 #define AVR32_USBB_UECFG0_EPSIZE_64 0x00000003 #define AVR32_USBB_UECFG0_EPSIZE_8 0x00000000 #define AVR32_USBB_UECFG0_EPSIZE_MASK 0x00000070 #define AVR32_USBB_UECFG0_EPSIZE_OFFSET 4 #define AVR32_USBB_UECFG0_EPSIZE_SIZE 3 #define AVR32_USBB_UECFG0_EPTYPE 11 #define AVR32_USBB_UECFG0_EPTYPE_BULK 0x00000002 #define AVR32_USBB_UECFG0_EPTYPE_CONTROL 0x00000000 #define AVR32_USBB_UECFG0_EPTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UECFG0_EPTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UECFG0_EPTYPE_MASK 0x00001800 #define AVR32_USBB_UECFG0_EPTYPE_OFFSET 11 #define AVR32_USBB_UECFG0_EPTYPE_SIZE 2 #define AVR32_USBB_UECFG0_NBTRANS 13 #define AVR32_USBB_UECFG0_NBTRANS_MASK 0x00006000 #define AVR32_USBB_UECFG0_NBTRANS_OFFSET 13 #define AVR32_USBB_UECFG0_NBTRANS_SIZE 2 #define AVR32_USBB_UECFG1 0x00000104 #define AVR32_USBB_UECFG1_ALLOC 1 #define AVR32_USBB_UECFG1_ALLOC_MASK 0x00000002 #define AVR32_USBB_UECFG1_ALLOC_OFFSET 1 #define AVR32_USBB_UECFG1_ALLOC_SIZE 1 #define AVR32_USBB_UECFG1_AUTOSW 9 #define AVR32_USBB_UECFG1_AUTOSW_MASK 0x00000200 #define AVR32_USBB_UECFG1_AUTOSW_OFFSET 9 #define AVR32_USBB_UECFG1_AUTOSW_SIZE 1 #define AVR32_USBB_UECFG1_DATASIZERDWR 30 #define AVR32_USBB_UECFG1_DATASIZERDWR_MASK 0xc0000000 #define AVR32_USBB_UECFG1_DATASIZERDWR_OFFSET 30 #define AVR32_USBB_UECFG1_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UECFG1_EPBK 2 #define AVR32_USBB_UECFG1_EPBK_DOUBLE 0x00000001 #define AVR32_USBB_UECFG1_EPBK_MASK 0x0000000c #define AVR32_USBB_UECFG1_EPBK_OFFSET 2 #define AVR32_USBB_UECFG1_EPBK_SINGLE 0x00000000 #define AVR32_USBB_UECFG1_EPBK_SIZE 2 #define AVR32_USBB_UECFG1_EPBK_TRIPLE 0x00000002 #define AVR32_USBB_UECFG1_EPDIR 8 #define AVR32_USBB_UECFG1_EPDIR_IN 0x00000001 #define AVR32_USBB_UECFG1_EPDIR_MASK 0x00000100 #define AVR32_USBB_UECFG1_EPDIR_OFFSET 8 #define AVR32_USBB_UECFG1_EPDIR_OUT 0x00000000 #define AVR32_USBB_UECFG1_EPDIR_SIZE 1 #define AVR32_USBB_UECFG1_EPSIZE 4 #define AVR32_USBB_UECFG1_EPSIZE_1024 0x00000007 #define AVR32_USBB_UECFG1_EPSIZE_128 0x00000004 #define AVR32_USBB_UECFG1_EPSIZE_16 0x00000001 #define AVR32_USBB_UECFG1_EPSIZE_256 0x00000005 #define AVR32_USBB_UECFG1_EPSIZE_32 0x00000002 #define AVR32_USBB_UECFG1_EPSIZE_512 0x00000006 #define AVR32_USBB_UECFG1_EPSIZE_64 0x00000003 #define AVR32_USBB_UECFG1_EPSIZE_8 0x00000000 #define AVR32_USBB_UECFG1_EPSIZE_MASK 0x00000070 #define AVR32_USBB_UECFG1_EPSIZE_OFFSET 4 #define AVR32_USBB_UECFG1_EPSIZE_SIZE 3 #define AVR32_USBB_UECFG1_EPTYPE 11 #define AVR32_USBB_UECFG1_EPTYPE_BULK 0x00000002 #define AVR32_USBB_UECFG1_EPTYPE_CONTROL 0x00000000 #define AVR32_USBB_UECFG1_EPTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UECFG1_EPTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UECFG1_EPTYPE_MASK 0x00001800 #define AVR32_USBB_UECFG1_EPTYPE_OFFSET 11 #define AVR32_USBB_UECFG1_EPTYPE_SIZE 2 #define AVR32_USBB_UECFG1_NBTRANS 13 #define AVR32_USBB_UECFG1_NBTRANS_MASK 0x00006000 #define AVR32_USBB_UECFG1_NBTRANS_OFFSET 13 #define AVR32_USBB_UECFG1_NBTRANS_SIZE 2 #define AVR32_USBB_UECFG2 0x00000108 #define AVR32_USBB_UECFG2_ALLOC 1 #define AVR32_USBB_UECFG2_ALLOC_MASK 0x00000002 #define AVR32_USBB_UECFG2_ALLOC_OFFSET 1 #define AVR32_USBB_UECFG2_ALLOC_SIZE 1 #define AVR32_USBB_UECFG2_AUTOSW 9 #define AVR32_USBB_UECFG2_AUTOSW_MASK 0x00000200 #define AVR32_USBB_UECFG2_AUTOSW_OFFSET 9 #define AVR32_USBB_UECFG2_AUTOSW_SIZE 1 #define AVR32_USBB_UECFG2_DATASIZERDWR 30 #define AVR32_USBB_UECFG2_DATASIZERDWR_MASK 0xc0000000 #define AVR32_USBB_UECFG2_DATASIZERDWR_OFFSET 30 #define AVR32_USBB_UECFG2_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UECFG2_EPBK 2 #define AVR32_USBB_UECFG2_EPBK_DOUBLE 0x00000001 #define AVR32_USBB_UECFG2_EPBK_MASK 0x0000000c #define AVR32_USBB_UECFG2_EPBK_OFFSET 2 #define AVR32_USBB_UECFG2_EPBK_SINGLE 0x00000000 #define AVR32_USBB_UECFG2_EPBK_SIZE 2 #define AVR32_USBB_UECFG2_EPBK_TRIPLE 0x00000002 #define AVR32_USBB_UECFG2_EPDIR 8 #define AVR32_USBB_UECFG2_EPDIR_IN 0x00000001 #define AVR32_USBB_UECFG2_EPDIR_MASK 0x00000100 #define AVR32_USBB_UECFG2_EPDIR_OFFSET 8 #define AVR32_USBB_UECFG2_EPDIR_OUT 0x00000000 #define AVR32_USBB_UECFG2_EPDIR_SIZE 1 #define AVR32_USBB_UECFG2_EPSIZE 4 #define AVR32_USBB_UECFG2_EPSIZE_1024 0x00000007 #define AVR32_USBB_UECFG2_EPSIZE_128 0x00000004 #define AVR32_USBB_UECFG2_EPSIZE_16 0x00000001 #define AVR32_USBB_UECFG2_EPSIZE_256 0x00000005 #define AVR32_USBB_UECFG2_EPSIZE_32 0x00000002 #define AVR32_USBB_UECFG2_EPSIZE_512 0x00000006 #define AVR32_USBB_UECFG2_EPSIZE_64 0x00000003 #define AVR32_USBB_UECFG2_EPSIZE_8 0x00000000 #define AVR32_USBB_UECFG2_EPSIZE_MASK 0x00000070 #define AVR32_USBB_UECFG2_EPSIZE_OFFSET 4 #define AVR32_USBB_UECFG2_EPSIZE_SIZE 3 #define AVR32_USBB_UECFG2_EPTYPE 11 #define AVR32_USBB_UECFG2_EPTYPE_BULK 0x00000002 #define AVR32_USBB_UECFG2_EPTYPE_CONTROL 0x00000000 #define AVR32_USBB_UECFG2_EPTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UECFG2_EPTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UECFG2_EPTYPE_MASK 0x00001800 #define AVR32_USBB_UECFG2_EPTYPE_OFFSET 11 #define AVR32_USBB_UECFG2_EPTYPE_SIZE 2 #define AVR32_USBB_UECFG2_NBTRANS 13 #define AVR32_USBB_UECFG2_NBTRANS_MASK 0x00006000 #define AVR32_USBB_UECFG2_NBTRANS_OFFSET 13 #define AVR32_USBB_UECFG2_NBTRANS_SIZE 2 #define AVR32_USBB_UECFG3 0x0000010c #define AVR32_USBB_UECFG3_ALLOC 1 #define AVR32_USBB_UECFG3_ALLOC_MASK 0x00000002 #define AVR32_USBB_UECFG3_ALLOC_OFFSET 1 #define AVR32_USBB_UECFG3_ALLOC_SIZE 1 #define AVR32_USBB_UECFG3_AUTOSW 9 #define AVR32_USBB_UECFG3_AUTOSW_MASK 0x00000200 #define AVR32_USBB_UECFG3_AUTOSW_OFFSET 9 #define AVR32_USBB_UECFG3_AUTOSW_SIZE 1 #define AVR32_USBB_UECFG3_DATASIZERDWR 30 #define AVR32_USBB_UECFG3_DATASIZERDWR_MASK 0xc0000000 #define AVR32_USBB_UECFG3_DATASIZERDWR_OFFSET 30 #define AVR32_USBB_UECFG3_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UECFG3_EPBK 2 #define AVR32_USBB_UECFG3_EPBK_DOUBLE 0x00000001 #define AVR32_USBB_UECFG3_EPBK_MASK 0x0000000c #define AVR32_USBB_UECFG3_EPBK_OFFSET 2 #define AVR32_USBB_UECFG3_EPBK_SINGLE 0x00000000 #define AVR32_USBB_UECFG3_EPBK_SIZE 2 #define AVR32_USBB_UECFG3_EPBK_TRIPLE 0x00000002 #define AVR32_USBB_UECFG3_EPDIR 8 #define AVR32_USBB_UECFG3_EPDIR_IN 0x00000001 #define AVR32_USBB_UECFG3_EPDIR_MASK 0x00000100 #define AVR32_USBB_UECFG3_EPDIR_OFFSET 8 #define AVR32_USBB_UECFG3_EPDIR_OUT 0x00000000 #define AVR32_USBB_UECFG3_EPDIR_SIZE 1 #define AVR32_USBB_UECFG3_EPSIZE 4 #define AVR32_USBB_UECFG3_EPSIZE_1024 0x00000007 #define AVR32_USBB_UECFG3_EPSIZE_128 0x00000004 #define AVR32_USBB_UECFG3_EPSIZE_16 0x00000001 #define AVR32_USBB_UECFG3_EPSIZE_256 0x00000005 #define AVR32_USBB_UECFG3_EPSIZE_32 0x00000002 #define AVR32_USBB_UECFG3_EPSIZE_512 0x00000006 #define AVR32_USBB_UECFG3_EPSIZE_64 0x00000003 #define AVR32_USBB_UECFG3_EPSIZE_8 0x00000000 #define AVR32_USBB_UECFG3_EPSIZE_MASK 0x00000070 #define AVR32_USBB_UECFG3_EPSIZE_OFFSET 4 #define AVR32_USBB_UECFG3_EPSIZE_SIZE 3 #define AVR32_USBB_UECFG3_EPTYPE 11 #define AVR32_USBB_UECFG3_EPTYPE_BULK 0x00000002 #define AVR32_USBB_UECFG3_EPTYPE_CONTROL 0x00000000 #define AVR32_USBB_UECFG3_EPTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UECFG3_EPTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UECFG3_EPTYPE_MASK 0x00001800 #define AVR32_USBB_UECFG3_EPTYPE_OFFSET 11 #define AVR32_USBB_UECFG3_EPTYPE_SIZE 2 #define AVR32_USBB_UECFG3_NBTRANS 13 #define AVR32_USBB_UECFG3_NBTRANS_MASK 0x00006000 #define AVR32_USBB_UECFG3_NBTRANS_OFFSET 13 #define AVR32_USBB_UECFG3_NBTRANS_SIZE 2 #define AVR32_USBB_UECFG4 0x00000110 #define AVR32_USBB_UECFG4_ALLOC 1 #define AVR32_USBB_UECFG4_ALLOC_MASK 0x00000002 #define AVR32_USBB_UECFG4_ALLOC_OFFSET 1 #define AVR32_USBB_UECFG4_ALLOC_SIZE 1 #define AVR32_USBB_UECFG4_AUTOSW 9 #define AVR32_USBB_UECFG4_AUTOSW_MASK 0x00000200 #define AVR32_USBB_UECFG4_AUTOSW_OFFSET 9 #define AVR32_USBB_UECFG4_AUTOSW_SIZE 1 #define AVR32_USBB_UECFG4_DATASIZERDWR 30 #define AVR32_USBB_UECFG4_DATASIZERDWR_MASK 0xc0000000 #define AVR32_USBB_UECFG4_DATASIZERDWR_OFFSET 30 #define AVR32_USBB_UECFG4_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UECFG4_EPBK 2 #define AVR32_USBB_UECFG4_EPBK_DOUBLE 0x00000001 #define AVR32_USBB_UECFG4_EPBK_MASK 0x0000000c #define AVR32_USBB_UECFG4_EPBK_OFFSET 2 #define AVR32_USBB_UECFG4_EPBK_SINGLE 0x00000000 #define AVR32_USBB_UECFG4_EPBK_SIZE 2 #define AVR32_USBB_UECFG4_EPBK_TRIPLE 0x00000002 #define AVR32_USBB_UECFG4_EPDIR 8 #define AVR32_USBB_UECFG4_EPDIR_IN 0x00000001 #define AVR32_USBB_UECFG4_EPDIR_MASK 0x00000100 #define AVR32_USBB_UECFG4_EPDIR_OFFSET 8 #define AVR32_USBB_UECFG4_EPDIR_OUT 0x00000000 #define AVR32_USBB_UECFG4_EPDIR_SIZE 1 #define AVR32_USBB_UECFG4_EPSIZE 4 #define AVR32_USBB_UECFG4_EPSIZE_1024 0x00000007 #define AVR32_USBB_UECFG4_EPSIZE_128 0x00000004 #define AVR32_USBB_UECFG4_EPSIZE_16 0x00000001 #define AVR32_USBB_UECFG4_EPSIZE_256 0x00000005 #define AVR32_USBB_UECFG4_EPSIZE_32 0x00000002 #define AVR32_USBB_UECFG4_EPSIZE_512 0x00000006 #define AVR32_USBB_UECFG4_EPSIZE_64 0x00000003 #define AVR32_USBB_UECFG4_EPSIZE_8 0x00000000 #define AVR32_USBB_UECFG4_EPSIZE_MASK 0x00000070 #define AVR32_USBB_UECFG4_EPSIZE_OFFSET 4 #define AVR32_USBB_UECFG4_EPSIZE_SIZE 3 #define AVR32_USBB_UECFG4_EPTYPE 11 #define AVR32_USBB_UECFG4_EPTYPE_BULK 0x00000002 #define AVR32_USBB_UECFG4_EPTYPE_CONTROL 0x00000000 #define AVR32_USBB_UECFG4_EPTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UECFG4_EPTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UECFG4_EPTYPE_MASK 0x00001800 #define AVR32_USBB_UECFG4_EPTYPE_OFFSET 11 #define AVR32_USBB_UECFG4_EPTYPE_SIZE 2 #define AVR32_USBB_UECFG4_NBTRANS 13 #define AVR32_USBB_UECFG4_NBTRANS_MASK 0x00006000 #define AVR32_USBB_UECFG4_NBTRANS_OFFSET 13 #define AVR32_USBB_UECFG4_NBTRANS_SIZE 2 #define AVR32_USBB_UECFG5 0x00000114 #define AVR32_USBB_UECFG5_ALLOC 1 #define AVR32_USBB_UECFG5_ALLOC_MASK 0x00000002 #define AVR32_USBB_UECFG5_ALLOC_OFFSET 1 #define AVR32_USBB_UECFG5_ALLOC_SIZE 1 #define AVR32_USBB_UECFG5_AUTOSW 9 #define AVR32_USBB_UECFG5_AUTOSW_MASK 0x00000200 #define AVR32_USBB_UECFG5_AUTOSW_OFFSET 9 #define AVR32_USBB_UECFG5_AUTOSW_SIZE 1 #define AVR32_USBB_UECFG5_DATASIZERDWR 30 #define AVR32_USBB_UECFG5_DATASIZERDWR_MASK 0xc0000000 #define AVR32_USBB_UECFG5_DATASIZERDWR_OFFSET 30 #define AVR32_USBB_UECFG5_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UECFG5_EPBK 2 #define AVR32_USBB_UECFG5_EPBK_DOUBLE 0x00000001 #define AVR32_USBB_UECFG5_EPBK_MASK 0x0000000c #define AVR32_USBB_UECFG5_EPBK_OFFSET 2 #define AVR32_USBB_UECFG5_EPBK_SINGLE 0x00000000 #define AVR32_USBB_UECFG5_EPBK_SIZE 2 #define AVR32_USBB_UECFG5_EPBK_TRIPLE 0x00000002 #define AVR32_USBB_UECFG5_EPDIR 8 #define AVR32_USBB_UECFG5_EPDIR_IN 0x00000001 #define AVR32_USBB_UECFG5_EPDIR_MASK 0x00000100 #define AVR32_USBB_UECFG5_EPDIR_OFFSET 8 #define AVR32_USBB_UECFG5_EPDIR_OUT 0x00000000 #define AVR32_USBB_UECFG5_EPDIR_SIZE 1 #define AVR32_USBB_UECFG5_EPSIZE 4 #define AVR32_USBB_UECFG5_EPSIZE_1024 0x00000007 #define AVR32_USBB_UECFG5_EPSIZE_128 0x00000004 #define AVR32_USBB_UECFG5_EPSIZE_16 0x00000001 #define AVR32_USBB_UECFG5_EPSIZE_256 0x00000005 #define AVR32_USBB_UECFG5_EPSIZE_32 0x00000002 #define AVR32_USBB_UECFG5_EPSIZE_512 0x00000006 #define AVR32_USBB_UECFG5_EPSIZE_64 0x00000003 #define AVR32_USBB_UECFG5_EPSIZE_8 0x00000000 #define AVR32_USBB_UECFG5_EPSIZE_MASK 0x00000070 #define AVR32_USBB_UECFG5_EPSIZE_OFFSET 4 #define AVR32_USBB_UECFG5_EPSIZE_SIZE 3 #define AVR32_USBB_UECFG5_EPTYPE 11 #define AVR32_USBB_UECFG5_EPTYPE_BULK 0x00000002 #define AVR32_USBB_UECFG5_EPTYPE_CONTROL 0x00000000 #define AVR32_USBB_UECFG5_EPTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UECFG5_EPTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UECFG5_EPTYPE_MASK 0x00001800 #define AVR32_USBB_UECFG5_EPTYPE_OFFSET 11 #define AVR32_USBB_UECFG5_EPTYPE_SIZE 2 #define AVR32_USBB_UECFG5_NBTRANS 13 #define AVR32_USBB_UECFG5_NBTRANS_MASK 0x00006000 #define AVR32_USBB_UECFG5_NBTRANS_OFFSET 13 #define AVR32_USBB_UECFG5_NBTRANS_SIZE 2 #define AVR32_USBB_UECFG6 0x00000118 #define AVR32_USBB_UECFG6_ALLOC 1 #define AVR32_USBB_UECFG6_ALLOC_MASK 0x00000002 #define AVR32_USBB_UECFG6_ALLOC_OFFSET 1 #define AVR32_USBB_UECFG6_ALLOC_SIZE 1 #define AVR32_USBB_UECFG6_AUTOSW 9 #define AVR32_USBB_UECFG6_AUTOSW_MASK 0x00000200 #define AVR32_USBB_UECFG6_AUTOSW_OFFSET 9 #define AVR32_USBB_UECFG6_AUTOSW_SIZE 1 #define AVR32_USBB_UECFG6_DATASIZERDWR 30 #define AVR32_USBB_UECFG6_DATASIZERDWR_MASK 0xc0000000 #define AVR32_USBB_UECFG6_DATASIZERDWR_OFFSET 30 #define AVR32_USBB_UECFG6_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UECFG6_EPBK 2 #define AVR32_USBB_UECFG6_EPBK_DOUBLE 0x00000001 #define AVR32_USBB_UECFG6_EPBK_MASK 0x0000000c #define AVR32_USBB_UECFG6_EPBK_OFFSET 2 #define AVR32_USBB_UECFG6_EPBK_SINGLE 0x00000000 #define AVR32_USBB_UECFG6_EPBK_SIZE 2 #define AVR32_USBB_UECFG6_EPBK_TRIPLE 0x00000002 #define AVR32_USBB_UECFG6_EPDIR 8 #define AVR32_USBB_UECFG6_EPDIR_IN 0x00000001 #define AVR32_USBB_UECFG6_EPDIR_MASK 0x00000100 #define AVR32_USBB_UECFG6_EPDIR_OFFSET 8 #define AVR32_USBB_UECFG6_EPDIR_OUT 0x00000000 #define AVR32_USBB_UECFG6_EPDIR_SIZE 1 #define AVR32_USBB_UECFG6_EPSIZE 4 #define AVR32_USBB_UECFG6_EPSIZE_1024 0x00000007 #define AVR32_USBB_UECFG6_EPSIZE_128 0x00000004 #define AVR32_USBB_UECFG6_EPSIZE_16 0x00000001 #define AVR32_USBB_UECFG6_EPSIZE_256 0x00000005 #define AVR32_USBB_UECFG6_EPSIZE_32 0x00000002 #define AVR32_USBB_UECFG6_EPSIZE_512 0x00000006 #define AVR32_USBB_UECFG6_EPSIZE_64 0x00000003 #define AVR32_USBB_UECFG6_EPSIZE_8 0x00000000 #define AVR32_USBB_UECFG6_EPSIZE_MASK 0x00000070 #define AVR32_USBB_UECFG6_EPSIZE_OFFSET 4 #define AVR32_USBB_UECFG6_EPSIZE_SIZE 3 #define AVR32_USBB_UECFG6_EPTYPE 11 #define AVR32_USBB_UECFG6_EPTYPE_BULK 0x00000002 #define AVR32_USBB_UECFG6_EPTYPE_CONTROL 0x00000000 #define AVR32_USBB_UECFG6_EPTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UECFG6_EPTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UECFG6_EPTYPE_MASK 0x00001800 #define AVR32_USBB_UECFG6_EPTYPE_OFFSET 11 #define AVR32_USBB_UECFG6_EPTYPE_SIZE 2 #define AVR32_USBB_UECFG6_NBTRANS 13 #define AVR32_USBB_UECFG6_NBTRANS_MASK 0x00006000 #define AVR32_USBB_UECFG6_NBTRANS_OFFSET 13 #define AVR32_USBB_UECFG6_NBTRANS_SIZE 2 #define AVR32_USBB_UECON0 0x000001c0 #define AVR32_USBB_UECON0CLR 0x00000220 #define AVR32_USBB_UECON0CLR_DATAXEC 9 #define AVR32_USBB_UECON0CLR_DATAXEC_MASK 0x00000200 #define AVR32_USBB_UECON0CLR_DATAXEC_OFFSET 9 #define AVR32_USBB_UECON0CLR_DATAXEC_SIZE 1 #define AVR32_USBB_UECON0CLR_EPDISHDMAC 16 #define AVR32_USBB_UECON0CLR_EPDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UECON0CLR_EPDISHDMAC_OFFSET 16 #define AVR32_USBB_UECON0CLR_EPDISHDMAC_SIZE 1 #define AVR32_USBB_UECON0CLR_ERRORTRANSEC 10 #define AVR32_USBB_UECON0CLR_ERRORTRANSEC_MASK 0x00000400 #define AVR32_USBB_UECON0CLR_ERRORTRANSEC_OFFSET 10 #define AVR32_USBB_UECON0CLR_ERRORTRANSEC_SIZE 1 #define AVR32_USBB_UECON0CLR_FIFOCONC 14 #define AVR32_USBB_UECON0CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UECON0CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UECON0CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UECON0CLR_MDATAEC 8 #define AVR32_USBB_UECON0CLR_MDATAEC_MASK 0x00000100 #define AVR32_USBB_UECON0CLR_MDATAEC_OFFSET 8 #define AVR32_USBB_UECON0CLR_MDATAEC_SIZE 1 #define AVR32_USBB_UECON0CLR_NAKINEC 4 #define AVR32_USBB_UECON0CLR_NAKINEC_MASK 0x00000010 #define AVR32_USBB_UECON0CLR_NAKINEC_OFFSET 4 #define AVR32_USBB_UECON0CLR_NAKINEC_SIZE 1 #define AVR32_USBB_UECON0CLR_NAKOUTEC 3 #define AVR32_USBB_UECON0CLR_NAKOUTEC_MASK 0x00000008 #define AVR32_USBB_UECON0CLR_NAKOUTEC_OFFSET 3 #define AVR32_USBB_UECON0CLR_NAKOUTEC_SIZE 1 #define AVR32_USBB_UECON0CLR_NBUSYBKEC 12 #define AVR32_USBB_UECON0CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UECON0CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UECON0CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UECON0CLR_NYETDISC 17 #define AVR32_USBB_UECON0CLR_NYETDISC_MASK 0x00020000 #define AVR32_USBB_UECON0CLR_NYETDISC_OFFSET 17 #define AVR32_USBB_UECON0CLR_NYETDISC_SIZE 1 #define AVR32_USBB_UECON0CLR_OVERFEC 5 #define AVR32_USBB_UECON0CLR_OVERFEC_MASK 0x00000020 #define AVR32_USBB_UECON0CLR_OVERFEC_OFFSET 5 #define AVR32_USBB_UECON0CLR_OVERFEC_SIZE 1 #define AVR32_USBB_UECON0CLR_RXOUTEC 1 #define AVR32_USBB_UECON0CLR_RXOUTEC_MASK 0x00000002 #define AVR32_USBB_UECON0CLR_RXOUTEC_OFFSET 1 #define AVR32_USBB_UECON0CLR_RXOUTEC_SIZE 1 #define AVR32_USBB_UECON0CLR_RXSTPEC 2 #define AVR32_USBB_UECON0CLR_RXSTPEC_MASK 0x00000004 #define AVR32_USBB_UECON0CLR_RXSTPEC_OFFSET 2 #define AVR32_USBB_UECON0CLR_RXSTPEC_SIZE 1 #define AVR32_USBB_UECON0CLR_SHORTPACKETEC 7 #define AVR32_USBB_UECON0CLR_SHORTPACKETEC_MASK 0x00000080 #define AVR32_USBB_UECON0CLR_SHORTPACKETEC_OFFSET 7 #define AVR32_USBB_UECON0CLR_SHORTPACKETEC_SIZE 1 #define AVR32_USBB_UECON0CLR_STALLEDEC 6 #define AVR32_USBB_UECON0CLR_STALLEDEC_MASK 0x00000040 #define AVR32_USBB_UECON0CLR_STALLEDEC_OFFSET 6 #define AVR32_USBB_UECON0CLR_STALLEDEC_SIZE 1 #define AVR32_USBB_UECON0CLR_STALLRQC 19 #define AVR32_USBB_UECON0CLR_STALLRQC_MASK 0x00080000 #define AVR32_USBB_UECON0CLR_STALLRQC_OFFSET 19 #define AVR32_USBB_UECON0CLR_STALLRQC_SIZE 1 #define AVR32_USBB_UECON0CLR_TXINEC 0 #define AVR32_USBB_UECON0CLR_TXINEC_MASK 0x00000001 #define AVR32_USBB_UECON0CLR_TXINEC_OFFSET 0 #define AVR32_USBB_UECON0CLR_TXINEC_SIZE 1 #define AVR32_USBB_UECON0SET 0x000001f0 #define AVR32_USBB_UECON0SET_DATAXES 9 #define AVR32_USBB_UECON0SET_DATAXES_MASK 0x00000200 #define AVR32_USBB_UECON0SET_DATAXES_OFFSET 9 #define AVR32_USBB_UECON0SET_DATAXES_SIZE 1 #define AVR32_USBB_UECON0SET_EPDISHDMAS 16 #define AVR32_USBB_UECON0SET_EPDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UECON0SET_EPDISHDMAS_OFFSET 16 #define AVR32_USBB_UECON0SET_EPDISHDMAS_SIZE 1 #define AVR32_USBB_UECON0SET_ERRORTRANSES 10 #define AVR32_USBB_UECON0SET_ERRORTRANSES_MASK 0x00000400 #define AVR32_USBB_UECON0SET_ERRORTRANSES_OFFSET 10 #define AVR32_USBB_UECON0SET_ERRORTRANSES_SIZE 1 #define AVR32_USBB_UECON0SET_KILLBKS 13 #define AVR32_USBB_UECON0SET_KILLBKS_MASK 0x00002000 #define AVR32_USBB_UECON0SET_KILLBKS_OFFSET 13 #define AVR32_USBB_UECON0SET_KILLBKS_SIZE 1 #define AVR32_USBB_UECON0SET_MDATAES 8 #define AVR32_USBB_UECON0SET_MDATAES_MASK 0x00000100 #define AVR32_USBB_UECON0SET_MDATAES_OFFSET 8 #define AVR32_USBB_UECON0SET_MDATAES_SIZE 1 #define AVR32_USBB_UECON0SET_NAKINES 4 #define AVR32_USBB_UECON0SET_NAKINES_MASK 0x00000010 #define AVR32_USBB_UECON0SET_NAKINES_OFFSET 4 #define AVR32_USBB_UECON0SET_NAKINES_SIZE 1 #define AVR32_USBB_UECON0SET_NAKOUTES 3 #define AVR32_USBB_UECON0SET_NAKOUTES_MASK 0x00000008 #define AVR32_USBB_UECON0SET_NAKOUTES_OFFSET 3 #define AVR32_USBB_UECON0SET_NAKOUTES_SIZE 1 #define AVR32_USBB_UECON0SET_NBUSYBKES 12 #define AVR32_USBB_UECON0SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UECON0SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UECON0SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UECON0SET_NYETDISS 17 #define AVR32_USBB_UECON0SET_NYETDISS_MASK 0x00020000 #define AVR32_USBB_UECON0SET_NYETDISS_OFFSET 17 #define AVR32_USBB_UECON0SET_NYETDISS_SIZE 1 #define AVR32_USBB_UECON0SET_OVERFES 5 #define AVR32_USBB_UECON0SET_OVERFES_MASK 0x00000020 #define AVR32_USBB_UECON0SET_OVERFES_OFFSET 5 #define AVR32_USBB_UECON0SET_OVERFES_SIZE 1 #define AVR32_USBB_UECON0SET_RSTDTS 18 #define AVR32_USBB_UECON0SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UECON0SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UECON0SET_RSTDTS_SIZE 1 #define AVR32_USBB_UECON0SET_RXOUTES 1 #define AVR32_USBB_UECON0SET_RXOUTES_MASK 0x00000002 #define AVR32_USBB_UECON0SET_RXOUTES_OFFSET 1 #define AVR32_USBB_UECON0SET_RXOUTES_SIZE 1 #define AVR32_USBB_UECON0SET_RXSTPES 2 #define AVR32_USBB_UECON0SET_RXSTPES_MASK 0x00000004 #define AVR32_USBB_UECON0SET_RXSTPES_OFFSET 2 #define AVR32_USBB_UECON0SET_RXSTPES_SIZE 1 #define AVR32_USBB_UECON0SET_SHORTPACKETES 7 #define AVR32_USBB_UECON0SET_SHORTPACKETES_MASK 0x00000080 #define AVR32_USBB_UECON0SET_SHORTPACKETES_OFFSET 7 #define AVR32_USBB_UECON0SET_SHORTPACKETES_SIZE 1 #define AVR32_USBB_UECON0SET_STALLEDES 6 #define AVR32_USBB_UECON0SET_STALLEDES_MASK 0x00000040 #define AVR32_USBB_UECON0SET_STALLEDES_OFFSET 6 #define AVR32_USBB_UECON0SET_STALLEDES_SIZE 1 #define AVR32_USBB_UECON0SET_STALLRQS 19 #define AVR32_USBB_UECON0SET_STALLRQS_MASK 0x00080000 #define AVR32_USBB_UECON0SET_STALLRQS_OFFSET 19 #define AVR32_USBB_UECON0SET_STALLRQS_SIZE 1 #define AVR32_USBB_UECON0SET_TXINES 0 #define AVR32_USBB_UECON0SET_TXINES_MASK 0x00000001 #define AVR32_USBB_UECON0SET_TXINES_OFFSET 0 #define AVR32_USBB_UECON0SET_TXINES_SIZE 1 #define AVR32_USBB_UECON0_DATAXE 9 #define AVR32_USBB_UECON0_DATAXE_MASK 0x00000200 #define AVR32_USBB_UECON0_DATAXE_OFFSET 9 #define AVR32_USBB_UECON0_DATAXE_SIZE 1 #define AVR32_USBB_UECON0_EPDISHDMA 16 #define AVR32_USBB_UECON0_EPDISHDMA_MASK 0x00010000 #define AVR32_USBB_UECON0_EPDISHDMA_OFFSET 16 #define AVR32_USBB_UECON0_EPDISHDMA_SIZE 1 #define AVR32_USBB_UECON0_ERRORTRANSE 10 #define AVR32_USBB_UECON0_ERRORTRANSE_MASK 0x00000400 #define AVR32_USBB_UECON0_ERRORTRANSE_OFFSET 10 #define AVR32_USBB_UECON0_ERRORTRANSE_SIZE 1 #define AVR32_USBB_UECON0_FIFOCON 14 #define AVR32_USBB_UECON0_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UECON0_FIFOCON_OFFSET 14 #define AVR32_USBB_UECON0_FIFOCON_SIZE 1 #define AVR32_USBB_UECON0_KILLBK 13 #define AVR32_USBB_UECON0_KILLBK_MASK 0x00002000 #define AVR32_USBB_UECON0_KILLBK_OFFSET 13 #define AVR32_USBB_UECON0_KILLBK_SIZE 1 #define AVR32_USBB_UECON0_MDATAE 8 #define AVR32_USBB_UECON0_MDATAE_MASK 0x00000100 #define AVR32_USBB_UECON0_MDATAE_OFFSET 8 #define AVR32_USBB_UECON0_MDATAE_SIZE 1 #define AVR32_USBB_UECON0_NAKINE 4 #define AVR32_USBB_UECON0_NAKINE_MASK 0x00000010 #define AVR32_USBB_UECON0_NAKINE_OFFSET 4 #define AVR32_USBB_UECON0_NAKINE_SIZE 1 #define AVR32_USBB_UECON0_NAKOUTE 3 #define AVR32_USBB_UECON0_NAKOUTE_MASK 0x00000008 #define AVR32_USBB_UECON0_NAKOUTE_OFFSET 3 #define AVR32_USBB_UECON0_NAKOUTE_SIZE 1 #define AVR32_USBB_UECON0_NBUSYBKE 12 #define AVR32_USBB_UECON0_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UECON0_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UECON0_NBUSYBKE_SIZE 1 #define AVR32_USBB_UECON0_NYETDIS 17 #define AVR32_USBB_UECON0_NYETDIS_MASK 0x00020000 #define AVR32_USBB_UECON0_NYETDIS_OFFSET 17 #define AVR32_USBB_UECON0_NYETDIS_SIZE 1 #define AVR32_USBB_UECON0_OVERFE 5 #define AVR32_USBB_UECON0_OVERFE_MASK 0x00000020 #define AVR32_USBB_UECON0_OVERFE_OFFSET 5 #define AVR32_USBB_UECON0_OVERFE_SIZE 1 #define AVR32_USBB_UECON0_RSTDT 18 #define AVR32_USBB_UECON0_RSTDT_MASK 0x00040000 #define AVR32_USBB_UECON0_RSTDT_OFFSET 18 #define AVR32_USBB_UECON0_RSTDT_SIZE 1 #define AVR32_USBB_UECON0_RXOUTE 1 #define AVR32_USBB_UECON0_RXOUTE_MASK 0x00000002 #define AVR32_USBB_UECON0_RXOUTE_OFFSET 1 #define AVR32_USBB_UECON0_RXOUTE_SIZE 1 #define AVR32_USBB_UECON0_RXSTPE 2 #define AVR32_USBB_UECON0_RXSTPE_MASK 0x00000004 #define AVR32_USBB_UECON0_RXSTPE_OFFSET 2 #define AVR32_USBB_UECON0_RXSTPE_SIZE 1 #define AVR32_USBB_UECON0_SHORTPACKETE 7 #define AVR32_USBB_UECON0_SHORTPACKETE_MASK 0x00000080 #define AVR32_USBB_UECON0_SHORTPACKETE_OFFSET 7 #define AVR32_USBB_UECON0_SHORTPACKETE_SIZE 1 #define AVR32_USBB_UECON0_STALLEDE 6 #define AVR32_USBB_UECON0_STALLEDE_MASK 0x00000040 #define AVR32_USBB_UECON0_STALLEDE_OFFSET 6 #define AVR32_USBB_UECON0_STALLEDE_SIZE 1 #define AVR32_USBB_UECON0_STALLRQ 19 #define AVR32_USBB_UECON0_STALLRQ_MASK 0x00080000 #define AVR32_USBB_UECON0_STALLRQ_OFFSET 19 #define AVR32_USBB_UECON0_STALLRQ_SIZE 1 #define AVR32_USBB_UECON0_TXINE 0 #define AVR32_USBB_UECON0_TXINE_MASK 0x00000001 #define AVR32_USBB_UECON0_TXINE_OFFSET 0 #define AVR32_USBB_UECON0_TXINE_SIZE 1 #define AVR32_USBB_UECON1 0x000001c4 #define AVR32_USBB_UECON1CLR 0x00000224 #define AVR32_USBB_UECON1CLR_DATAXEC 9 #define AVR32_USBB_UECON1CLR_DATAXEC_MASK 0x00000200 #define AVR32_USBB_UECON1CLR_DATAXEC_OFFSET 9 #define AVR32_USBB_UECON1CLR_DATAXEC_SIZE 1 #define AVR32_USBB_UECON1CLR_EPDISHDMAC 16 #define AVR32_USBB_UECON1CLR_EPDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UECON1CLR_EPDISHDMAC_OFFSET 16 #define AVR32_USBB_UECON1CLR_EPDISHDMAC_SIZE 1 #define AVR32_USBB_UECON1CLR_ERRORTRANSEC 10 #define AVR32_USBB_UECON1CLR_ERRORTRANSEC_MASK 0x00000400 #define AVR32_USBB_UECON1CLR_ERRORTRANSEC_OFFSET 10 #define AVR32_USBB_UECON1CLR_ERRORTRANSEC_SIZE 1 #define AVR32_USBB_UECON1CLR_FIFOCONC 14 #define AVR32_USBB_UECON1CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UECON1CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UECON1CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UECON1CLR_MDATAEC 8 #define AVR32_USBB_UECON1CLR_MDATAEC_MASK 0x00000100 #define AVR32_USBB_UECON1CLR_MDATAEC_OFFSET 8 #define AVR32_USBB_UECON1CLR_MDATAEC_SIZE 1 #define AVR32_USBB_UECON1CLR_NAKINEC 4 #define AVR32_USBB_UECON1CLR_NAKINEC_MASK 0x00000010 #define AVR32_USBB_UECON1CLR_NAKINEC_OFFSET 4 #define AVR32_USBB_UECON1CLR_NAKINEC_SIZE 1 #define AVR32_USBB_UECON1CLR_NAKOUTEC 3 #define AVR32_USBB_UECON1CLR_NAKOUTEC_MASK 0x00000008 #define AVR32_USBB_UECON1CLR_NAKOUTEC_OFFSET 3 #define AVR32_USBB_UECON1CLR_NAKOUTEC_SIZE 1 #define AVR32_USBB_UECON1CLR_NBUSYBKEC 12 #define AVR32_USBB_UECON1CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UECON1CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UECON1CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UECON1CLR_NYETDISC 17 #define AVR32_USBB_UECON1CLR_NYETDISC_MASK 0x00020000 #define AVR32_USBB_UECON1CLR_NYETDISC_OFFSET 17 #define AVR32_USBB_UECON1CLR_NYETDISC_SIZE 1 #define AVR32_USBB_UECON1CLR_OVERFEC 5 #define AVR32_USBB_UECON1CLR_OVERFEC_MASK 0x00000020 #define AVR32_USBB_UECON1CLR_OVERFEC_OFFSET 5 #define AVR32_USBB_UECON1CLR_OVERFEC_SIZE 1 #define AVR32_USBB_UECON1CLR_RXOUTEC 1 #define AVR32_USBB_UECON1CLR_RXOUTEC_MASK 0x00000002 #define AVR32_USBB_UECON1CLR_RXOUTEC_OFFSET 1 #define AVR32_USBB_UECON1CLR_RXOUTEC_SIZE 1 #define AVR32_USBB_UECON1CLR_RXSTPEC 2 #define AVR32_USBB_UECON1CLR_RXSTPEC_MASK 0x00000004 #define AVR32_USBB_UECON1CLR_RXSTPEC_OFFSET 2 #define AVR32_USBB_UECON1CLR_RXSTPEC_SIZE 1 #define AVR32_USBB_UECON1CLR_SHORTPACKETEC 7 #define AVR32_USBB_UECON1CLR_SHORTPACKETEC_MASK 0x00000080 #define AVR32_USBB_UECON1CLR_SHORTPACKETEC_OFFSET 7 #define AVR32_USBB_UECON1CLR_SHORTPACKETEC_SIZE 1 #define AVR32_USBB_UECON1CLR_STALLEDEC 6 #define AVR32_USBB_UECON1CLR_STALLEDEC_MASK 0x00000040 #define AVR32_USBB_UECON1CLR_STALLEDEC_OFFSET 6 #define AVR32_USBB_UECON1CLR_STALLEDEC_SIZE 1 #define AVR32_USBB_UECON1CLR_STALLRQC 19 #define AVR32_USBB_UECON1CLR_STALLRQC_MASK 0x00080000 #define AVR32_USBB_UECON1CLR_STALLRQC_OFFSET 19 #define AVR32_USBB_UECON1CLR_STALLRQC_SIZE 1 #define AVR32_USBB_UECON1CLR_TXINEC 0 #define AVR32_USBB_UECON1CLR_TXINEC_MASK 0x00000001 #define AVR32_USBB_UECON1CLR_TXINEC_OFFSET 0 #define AVR32_USBB_UECON1CLR_TXINEC_SIZE 1 #define AVR32_USBB_UECON1SET 0x000001f4 #define AVR32_USBB_UECON1SET_DATAXES 9 #define AVR32_USBB_UECON1SET_DATAXES_MASK 0x00000200 #define AVR32_USBB_UECON1SET_DATAXES_OFFSET 9 #define AVR32_USBB_UECON1SET_DATAXES_SIZE 1 #define AVR32_USBB_UECON1SET_EPDISHDMAS 16 #define AVR32_USBB_UECON1SET_EPDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UECON1SET_EPDISHDMAS_OFFSET 16 #define AVR32_USBB_UECON1SET_EPDISHDMAS_SIZE 1 #define AVR32_USBB_UECON1SET_ERRORTRANSES 10 #define AVR32_USBB_UECON1SET_ERRORTRANSES_MASK 0x00000400 #define AVR32_USBB_UECON1SET_ERRORTRANSES_OFFSET 10 #define AVR32_USBB_UECON1SET_ERRORTRANSES_SIZE 1 #define AVR32_USBB_UECON1SET_KILLBKS 13 #define AVR32_USBB_UECON1SET_KILLBKS_MASK 0x00002000 #define AVR32_USBB_UECON1SET_KILLBKS_OFFSET 13 #define AVR32_USBB_UECON1SET_KILLBKS_SIZE 1 #define AVR32_USBB_UECON1SET_MDATAES 8 #define AVR32_USBB_UECON1SET_MDATAES_MASK 0x00000100 #define AVR32_USBB_UECON1SET_MDATAES_OFFSET 8 #define AVR32_USBB_UECON1SET_MDATAES_SIZE 1 #define AVR32_USBB_UECON1SET_NAKINES 4 #define AVR32_USBB_UECON1SET_NAKINES_MASK 0x00000010 #define AVR32_USBB_UECON1SET_NAKINES_OFFSET 4 #define AVR32_USBB_UECON1SET_NAKINES_SIZE 1 #define AVR32_USBB_UECON1SET_NAKOUTES 3 #define AVR32_USBB_UECON1SET_NAKOUTES_MASK 0x00000008 #define AVR32_USBB_UECON1SET_NAKOUTES_OFFSET 3 #define AVR32_USBB_UECON1SET_NAKOUTES_SIZE 1 #define AVR32_USBB_UECON1SET_NBUSYBKES 12 #define AVR32_USBB_UECON1SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UECON1SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UECON1SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UECON1SET_NYETDISS 17 #define AVR32_USBB_UECON1SET_NYETDISS_MASK 0x00020000 #define AVR32_USBB_UECON1SET_NYETDISS_OFFSET 17 #define AVR32_USBB_UECON1SET_NYETDISS_SIZE 1 #define AVR32_USBB_UECON1SET_OVERFES 5 #define AVR32_USBB_UECON1SET_OVERFES_MASK 0x00000020 #define AVR32_USBB_UECON1SET_OVERFES_OFFSET 5 #define AVR32_USBB_UECON1SET_OVERFES_SIZE 1 #define AVR32_USBB_UECON1SET_RSTDTS 18 #define AVR32_USBB_UECON1SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UECON1SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UECON1SET_RSTDTS_SIZE 1 #define AVR32_USBB_UECON1SET_RXOUTES 1 #define AVR32_USBB_UECON1SET_RXOUTES_MASK 0x00000002 #define AVR32_USBB_UECON1SET_RXOUTES_OFFSET 1 #define AVR32_USBB_UECON1SET_RXOUTES_SIZE 1 #define AVR32_USBB_UECON1SET_RXSTPES 2 #define AVR32_USBB_UECON1SET_RXSTPES_MASK 0x00000004 #define AVR32_USBB_UECON1SET_RXSTPES_OFFSET 2 #define AVR32_USBB_UECON1SET_RXSTPES_SIZE 1 #define AVR32_USBB_UECON1SET_SHORTPACKETES 7 #define AVR32_USBB_UECON1SET_SHORTPACKETES_MASK 0x00000080 #define AVR32_USBB_UECON1SET_SHORTPACKETES_OFFSET 7 #define AVR32_USBB_UECON1SET_SHORTPACKETES_SIZE 1 #define AVR32_USBB_UECON1SET_STALLEDES 6 #define AVR32_USBB_UECON1SET_STALLEDES_MASK 0x00000040 #define AVR32_USBB_UECON1SET_STALLEDES_OFFSET 6 #define AVR32_USBB_UECON1SET_STALLEDES_SIZE 1 #define AVR32_USBB_UECON1SET_STALLRQS 19 #define AVR32_USBB_UECON1SET_STALLRQS_MASK 0x00080000 #define AVR32_USBB_UECON1SET_STALLRQS_OFFSET 19 #define AVR32_USBB_UECON1SET_STALLRQS_SIZE 1 #define AVR32_USBB_UECON1SET_TXINES 0 #define AVR32_USBB_UECON1SET_TXINES_MASK 0x00000001 #define AVR32_USBB_UECON1SET_TXINES_OFFSET 0 #define AVR32_USBB_UECON1SET_TXINES_SIZE 1 #define AVR32_USBB_UECON1_DATAXE 9 #define AVR32_USBB_UECON1_DATAXE_MASK 0x00000200 #define AVR32_USBB_UECON1_DATAXE_OFFSET 9 #define AVR32_USBB_UECON1_DATAXE_SIZE 1 #define AVR32_USBB_UECON1_EPDISHDMA 16 #define AVR32_USBB_UECON1_EPDISHDMA_MASK 0x00010000 #define AVR32_USBB_UECON1_EPDISHDMA_OFFSET 16 #define AVR32_USBB_UECON1_EPDISHDMA_SIZE 1 #define AVR32_USBB_UECON1_ERRORTRANSE 10 #define AVR32_USBB_UECON1_ERRORTRANSE_MASK 0x00000400 #define AVR32_USBB_UECON1_ERRORTRANSE_OFFSET 10 #define AVR32_USBB_UECON1_ERRORTRANSE_SIZE 1 #define AVR32_USBB_UECON1_FIFOCON 14 #define AVR32_USBB_UECON1_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UECON1_FIFOCON_OFFSET 14 #define AVR32_USBB_UECON1_FIFOCON_SIZE 1 #define AVR32_USBB_UECON1_KILLBK 13 #define AVR32_USBB_UECON1_KILLBK_MASK 0x00002000 #define AVR32_USBB_UECON1_KILLBK_OFFSET 13 #define AVR32_USBB_UECON1_KILLBK_SIZE 1 #define AVR32_USBB_UECON1_MDATAE 8 #define AVR32_USBB_UECON1_MDATAE_MASK 0x00000100 #define AVR32_USBB_UECON1_MDATAE_OFFSET 8 #define AVR32_USBB_UECON1_MDATAE_SIZE 1 #define AVR32_USBB_UECON1_NAKINE 4 #define AVR32_USBB_UECON1_NAKINE_MASK 0x00000010 #define AVR32_USBB_UECON1_NAKINE_OFFSET 4 #define AVR32_USBB_UECON1_NAKINE_SIZE 1 #define AVR32_USBB_UECON1_NAKOUTE 3 #define AVR32_USBB_UECON1_NAKOUTE_MASK 0x00000008 #define AVR32_USBB_UECON1_NAKOUTE_OFFSET 3 #define AVR32_USBB_UECON1_NAKOUTE_SIZE 1 #define AVR32_USBB_UECON1_NBUSYBKE 12 #define AVR32_USBB_UECON1_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UECON1_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UECON1_NBUSYBKE_SIZE 1 #define AVR32_USBB_UECON1_NYETDIS 17 #define AVR32_USBB_UECON1_NYETDIS_MASK 0x00020000 #define AVR32_USBB_UECON1_NYETDIS_OFFSET 17 #define AVR32_USBB_UECON1_NYETDIS_SIZE 1 #define AVR32_USBB_UECON1_OVERFE 5 #define AVR32_USBB_UECON1_OVERFE_MASK 0x00000020 #define AVR32_USBB_UECON1_OVERFE_OFFSET 5 #define AVR32_USBB_UECON1_OVERFE_SIZE 1 #define AVR32_USBB_UECON1_RSTDT 18 #define AVR32_USBB_UECON1_RSTDT_MASK 0x00040000 #define AVR32_USBB_UECON1_RSTDT_OFFSET 18 #define AVR32_USBB_UECON1_RSTDT_SIZE 1 #define AVR32_USBB_UECON1_RXOUTE 1 #define AVR32_USBB_UECON1_RXOUTE_MASK 0x00000002 #define AVR32_USBB_UECON1_RXOUTE_OFFSET 1 #define AVR32_USBB_UECON1_RXOUTE_SIZE 1 #define AVR32_USBB_UECON1_RXSTPE 2 #define AVR32_USBB_UECON1_RXSTPE_MASK 0x00000004 #define AVR32_USBB_UECON1_RXSTPE_OFFSET 2 #define AVR32_USBB_UECON1_RXSTPE_SIZE 1 #define AVR32_USBB_UECON1_SHORTPACKETE 7 #define AVR32_USBB_UECON1_SHORTPACKETE_MASK 0x00000080 #define AVR32_USBB_UECON1_SHORTPACKETE_OFFSET 7 #define AVR32_USBB_UECON1_SHORTPACKETE_SIZE 1 #define AVR32_USBB_UECON1_STALLEDE 6 #define AVR32_USBB_UECON1_STALLEDE_MASK 0x00000040 #define AVR32_USBB_UECON1_STALLEDE_OFFSET 6 #define AVR32_USBB_UECON1_STALLEDE_SIZE 1 #define AVR32_USBB_UECON1_STALLRQ 19 #define AVR32_USBB_UECON1_STALLRQ_MASK 0x00080000 #define AVR32_USBB_UECON1_STALLRQ_OFFSET 19 #define AVR32_USBB_UECON1_STALLRQ_SIZE 1 #define AVR32_USBB_UECON1_TXINE 0 #define AVR32_USBB_UECON1_TXINE_MASK 0x00000001 #define AVR32_USBB_UECON1_TXINE_OFFSET 0 #define AVR32_USBB_UECON1_TXINE_SIZE 1 #define AVR32_USBB_UECON2 0x000001c8 #define AVR32_USBB_UECON2CLR 0x00000228 #define AVR32_USBB_UECON2CLR_DATAXEC 9 #define AVR32_USBB_UECON2CLR_DATAXEC_MASK 0x00000200 #define AVR32_USBB_UECON2CLR_DATAXEC_OFFSET 9 #define AVR32_USBB_UECON2CLR_DATAXEC_SIZE 1 #define AVR32_USBB_UECON2CLR_EPDISHDMAC 16 #define AVR32_USBB_UECON2CLR_EPDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UECON2CLR_EPDISHDMAC_OFFSET 16 #define AVR32_USBB_UECON2CLR_EPDISHDMAC_SIZE 1 #define AVR32_USBB_UECON2CLR_ERRORTRANSEC 10 #define AVR32_USBB_UECON2CLR_ERRORTRANSEC_MASK 0x00000400 #define AVR32_USBB_UECON2CLR_ERRORTRANSEC_OFFSET 10 #define AVR32_USBB_UECON2CLR_ERRORTRANSEC_SIZE 1 #define AVR32_USBB_UECON2CLR_FIFOCONC 14 #define AVR32_USBB_UECON2CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UECON2CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UECON2CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UECON2CLR_MDATAEC 8 #define AVR32_USBB_UECON2CLR_MDATAEC_MASK 0x00000100 #define AVR32_USBB_UECON2CLR_MDATAEC_OFFSET 8 #define AVR32_USBB_UECON2CLR_MDATAEC_SIZE 1 #define AVR32_USBB_UECON2CLR_NAKINEC 4 #define AVR32_USBB_UECON2CLR_NAKINEC_MASK 0x00000010 #define AVR32_USBB_UECON2CLR_NAKINEC_OFFSET 4 #define AVR32_USBB_UECON2CLR_NAKINEC_SIZE 1 #define AVR32_USBB_UECON2CLR_NAKOUTEC 3 #define AVR32_USBB_UECON2CLR_NAKOUTEC_MASK 0x00000008 #define AVR32_USBB_UECON2CLR_NAKOUTEC_OFFSET 3 #define AVR32_USBB_UECON2CLR_NAKOUTEC_SIZE 1 #define AVR32_USBB_UECON2CLR_NBUSYBKEC 12 #define AVR32_USBB_UECON2CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UECON2CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UECON2CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UECON2CLR_NYETDISC 17 #define AVR32_USBB_UECON2CLR_NYETDISC_MASK 0x00020000 #define AVR32_USBB_UECON2CLR_NYETDISC_OFFSET 17 #define AVR32_USBB_UECON2CLR_NYETDISC_SIZE 1 #define AVR32_USBB_UECON2CLR_OVERFEC 5 #define AVR32_USBB_UECON2CLR_OVERFEC_MASK 0x00000020 #define AVR32_USBB_UECON2CLR_OVERFEC_OFFSET 5 #define AVR32_USBB_UECON2CLR_OVERFEC_SIZE 1 #define AVR32_USBB_UECON2CLR_RXOUTEC 1 #define AVR32_USBB_UECON2CLR_RXOUTEC_MASK 0x00000002 #define AVR32_USBB_UECON2CLR_RXOUTEC_OFFSET 1 #define AVR32_USBB_UECON2CLR_RXOUTEC_SIZE 1 #define AVR32_USBB_UECON2CLR_RXSTPEC 2 #define AVR32_USBB_UECON2CLR_RXSTPEC_MASK 0x00000004 #define AVR32_USBB_UECON2CLR_RXSTPEC_OFFSET 2 #define AVR32_USBB_UECON2CLR_RXSTPEC_SIZE 1 #define AVR32_USBB_UECON2CLR_SHORTPACKETEC 7 #define AVR32_USBB_UECON2CLR_SHORTPACKETEC_MASK 0x00000080 #define AVR32_USBB_UECON2CLR_SHORTPACKETEC_OFFSET 7 #define AVR32_USBB_UECON2CLR_SHORTPACKETEC_SIZE 1 #define AVR32_USBB_UECON2CLR_STALLEDEC 6 #define AVR32_USBB_UECON2CLR_STALLEDEC_MASK 0x00000040 #define AVR32_USBB_UECON2CLR_STALLEDEC_OFFSET 6 #define AVR32_USBB_UECON2CLR_STALLEDEC_SIZE 1 #define AVR32_USBB_UECON2CLR_STALLRQC 19 #define AVR32_USBB_UECON2CLR_STALLRQC_MASK 0x00080000 #define AVR32_USBB_UECON2CLR_STALLRQC_OFFSET 19 #define AVR32_USBB_UECON2CLR_STALLRQC_SIZE 1 #define AVR32_USBB_UECON2CLR_TXINEC 0 #define AVR32_USBB_UECON2CLR_TXINEC_MASK 0x00000001 #define AVR32_USBB_UECON2CLR_TXINEC_OFFSET 0 #define AVR32_USBB_UECON2CLR_TXINEC_SIZE 1 #define AVR32_USBB_UECON2SET 0x000001f8 #define AVR32_USBB_UECON2SET_DATAXES 9 #define AVR32_USBB_UECON2SET_DATAXES_MASK 0x00000200 #define AVR32_USBB_UECON2SET_DATAXES_OFFSET 9 #define AVR32_USBB_UECON2SET_DATAXES_SIZE 1 #define AVR32_USBB_UECON2SET_EPDISHDMAS 16 #define AVR32_USBB_UECON2SET_EPDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UECON2SET_EPDISHDMAS_OFFSET 16 #define AVR32_USBB_UECON2SET_EPDISHDMAS_SIZE 1 #define AVR32_USBB_UECON2SET_ERRORTRANSES 10 #define AVR32_USBB_UECON2SET_ERRORTRANSES_MASK 0x00000400 #define AVR32_USBB_UECON2SET_ERRORTRANSES_OFFSET 10 #define AVR32_USBB_UECON2SET_ERRORTRANSES_SIZE 1 #define AVR32_USBB_UECON2SET_KILLBKS 13 #define AVR32_USBB_UECON2SET_KILLBKS_MASK 0x00002000 #define AVR32_USBB_UECON2SET_KILLBKS_OFFSET 13 #define AVR32_USBB_UECON2SET_KILLBKS_SIZE 1 #define AVR32_USBB_UECON2SET_MDATAES 8 #define AVR32_USBB_UECON2SET_MDATAES_MASK 0x00000100 #define AVR32_USBB_UECON2SET_MDATAES_OFFSET 8 #define AVR32_USBB_UECON2SET_MDATAES_SIZE 1 #define AVR32_USBB_UECON2SET_NAKINES 4 #define AVR32_USBB_UECON2SET_NAKINES_MASK 0x00000010 #define AVR32_USBB_UECON2SET_NAKINES_OFFSET 4 #define AVR32_USBB_UECON2SET_NAKINES_SIZE 1 #define AVR32_USBB_UECON2SET_NAKOUTES 3 #define AVR32_USBB_UECON2SET_NAKOUTES_MASK 0x00000008 #define AVR32_USBB_UECON2SET_NAKOUTES_OFFSET 3 #define AVR32_USBB_UECON2SET_NAKOUTES_SIZE 1 #define AVR32_USBB_UECON2SET_NBUSYBKES 12 #define AVR32_USBB_UECON2SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UECON2SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UECON2SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UECON2SET_NYETDISS 17 #define AVR32_USBB_UECON2SET_NYETDISS_MASK 0x00020000 #define AVR32_USBB_UECON2SET_NYETDISS_OFFSET 17 #define AVR32_USBB_UECON2SET_NYETDISS_SIZE 1 #define AVR32_USBB_UECON2SET_OVERFES 5 #define AVR32_USBB_UECON2SET_OVERFES_MASK 0x00000020 #define AVR32_USBB_UECON2SET_OVERFES_OFFSET 5 #define AVR32_USBB_UECON2SET_OVERFES_SIZE 1 #define AVR32_USBB_UECON2SET_RSTDTS 18 #define AVR32_USBB_UECON2SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UECON2SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UECON2SET_RSTDTS_SIZE 1 #define AVR32_USBB_UECON2SET_RXOUTES 1 #define AVR32_USBB_UECON2SET_RXOUTES_MASK 0x00000002 #define AVR32_USBB_UECON2SET_RXOUTES_OFFSET 1 #define AVR32_USBB_UECON2SET_RXOUTES_SIZE 1 #define AVR32_USBB_UECON2SET_RXSTPES 2 #define AVR32_USBB_UECON2SET_RXSTPES_MASK 0x00000004 #define AVR32_USBB_UECON2SET_RXSTPES_OFFSET 2 #define AVR32_USBB_UECON2SET_RXSTPES_SIZE 1 #define AVR32_USBB_UECON2SET_SHORTPACKETES 7 #define AVR32_USBB_UECON2SET_SHORTPACKETES_MASK 0x00000080 #define AVR32_USBB_UECON2SET_SHORTPACKETES_OFFSET 7 #define AVR32_USBB_UECON2SET_SHORTPACKETES_SIZE 1 #define AVR32_USBB_UECON2SET_STALLEDES 6 #define AVR32_USBB_UECON2SET_STALLEDES_MASK 0x00000040 #define AVR32_USBB_UECON2SET_STALLEDES_OFFSET 6 #define AVR32_USBB_UECON2SET_STALLEDES_SIZE 1 #define AVR32_USBB_UECON2SET_STALLRQS 19 #define AVR32_USBB_UECON2SET_STALLRQS_MASK 0x00080000 #define AVR32_USBB_UECON2SET_STALLRQS_OFFSET 19 #define AVR32_USBB_UECON2SET_STALLRQS_SIZE 1 #define AVR32_USBB_UECON2SET_TXINES 0 #define AVR32_USBB_UECON2SET_TXINES_MASK 0x00000001 #define AVR32_USBB_UECON2SET_TXINES_OFFSET 0 #define AVR32_USBB_UECON2SET_TXINES_SIZE 1 #define AVR32_USBB_UECON2_DATAXE 9 #define AVR32_USBB_UECON2_DATAXE_MASK 0x00000200 #define AVR32_USBB_UECON2_DATAXE_OFFSET 9 #define AVR32_USBB_UECON2_DATAXE_SIZE 1 #define AVR32_USBB_UECON2_EPDISHDMA 16 #define AVR32_USBB_UECON2_EPDISHDMA_MASK 0x00010000 #define AVR32_USBB_UECON2_EPDISHDMA_OFFSET 16 #define AVR32_USBB_UECON2_EPDISHDMA_SIZE 1 #define AVR32_USBB_UECON2_ERRORTRANSE 10 #define AVR32_USBB_UECON2_ERRORTRANSE_MASK 0x00000400 #define AVR32_USBB_UECON2_ERRORTRANSE_OFFSET 10 #define AVR32_USBB_UECON2_ERRORTRANSE_SIZE 1 #define AVR32_USBB_UECON2_FIFOCON 14 #define AVR32_USBB_UECON2_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UECON2_FIFOCON_OFFSET 14 #define AVR32_USBB_UECON2_FIFOCON_SIZE 1 #define AVR32_USBB_UECON2_KILLBK 13 #define AVR32_USBB_UECON2_KILLBK_MASK 0x00002000 #define AVR32_USBB_UECON2_KILLBK_OFFSET 13 #define AVR32_USBB_UECON2_KILLBK_SIZE 1 #define AVR32_USBB_UECON2_MDATAE 8 #define AVR32_USBB_UECON2_MDATAE_MASK 0x00000100 #define AVR32_USBB_UECON2_MDATAE_OFFSET 8 #define AVR32_USBB_UECON2_MDATAE_SIZE 1 #define AVR32_USBB_UECON2_NAKINE 4 #define AVR32_USBB_UECON2_NAKINE_MASK 0x00000010 #define AVR32_USBB_UECON2_NAKINE_OFFSET 4 #define AVR32_USBB_UECON2_NAKINE_SIZE 1 #define AVR32_USBB_UECON2_NAKOUTE 3 #define AVR32_USBB_UECON2_NAKOUTE_MASK 0x00000008 #define AVR32_USBB_UECON2_NAKOUTE_OFFSET 3 #define AVR32_USBB_UECON2_NAKOUTE_SIZE 1 #define AVR32_USBB_UECON2_NBUSYBKE 12 #define AVR32_USBB_UECON2_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UECON2_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UECON2_NBUSYBKE_SIZE 1 #define AVR32_USBB_UECON2_NYETDIS 17 #define AVR32_USBB_UECON2_NYETDIS_MASK 0x00020000 #define AVR32_USBB_UECON2_NYETDIS_OFFSET 17 #define AVR32_USBB_UECON2_NYETDIS_SIZE 1 #define AVR32_USBB_UECON2_OVERFE 5 #define AVR32_USBB_UECON2_OVERFE_MASK 0x00000020 #define AVR32_USBB_UECON2_OVERFE_OFFSET 5 #define AVR32_USBB_UECON2_OVERFE_SIZE 1 #define AVR32_USBB_UECON2_RSTDT 18 #define AVR32_USBB_UECON2_RSTDT_MASK 0x00040000 #define AVR32_USBB_UECON2_RSTDT_OFFSET 18 #define AVR32_USBB_UECON2_RSTDT_SIZE 1 #define AVR32_USBB_UECON2_RXOUTE 1 #define AVR32_USBB_UECON2_RXOUTE_MASK 0x00000002 #define AVR32_USBB_UECON2_RXOUTE_OFFSET 1 #define AVR32_USBB_UECON2_RXOUTE_SIZE 1 #define AVR32_USBB_UECON2_RXSTPE 2 #define AVR32_USBB_UECON2_RXSTPE_MASK 0x00000004 #define AVR32_USBB_UECON2_RXSTPE_OFFSET 2 #define AVR32_USBB_UECON2_RXSTPE_SIZE 1 #define AVR32_USBB_UECON2_SHORTPACKETE 7 #define AVR32_USBB_UECON2_SHORTPACKETE_MASK 0x00000080 #define AVR32_USBB_UECON2_SHORTPACKETE_OFFSET 7 #define AVR32_USBB_UECON2_SHORTPACKETE_SIZE 1 #define AVR32_USBB_UECON2_STALLEDE 6 #define AVR32_USBB_UECON2_STALLEDE_MASK 0x00000040 #define AVR32_USBB_UECON2_STALLEDE_OFFSET 6 #define AVR32_USBB_UECON2_STALLEDE_SIZE 1 #define AVR32_USBB_UECON2_STALLRQ 19 #define AVR32_USBB_UECON2_STALLRQ_MASK 0x00080000 #define AVR32_USBB_UECON2_STALLRQ_OFFSET 19 #define AVR32_USBB_UECON2_STALLRQ_SIZE 1 #define AVR32_USBB_UECON2_TXINE 0 #define AVR32_USBB_UECON2_TXINE_MASK 0x00000001 #define AVR32_USBB_UECON2_TXINE_OFFSET 0 #define AVR32_USBB_UECON2_TXINE_SIZE 1 #define AVR32_USBB_UECON3 0x000001cc #define AVR32_USBB_UECON3CLR 0x0000022c #define AVR32_USBB_UECON3CLR_DATAXEC 9 #define AVR32_USBB_UECON3CLR_DATAXEC_MASK 0x00000200 #define AVR32_USBB_UECON3CLR_DATAXEC_OFFSET 9 #define AVR32_USBB_UECON3CLR_DATAXEC_SIZE 1 #define AVR32_USBB_UECON3CLR_EPDISHDMAC 16 #define AVR32_USBB_UECON3CLR_EPDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UECON3CLR_EPDISHDMAC_OFFSET 16 #define AVR32_USBB_UECON3CLR_EPDISHDMAC_SIZE 1 #define AVR32_USBB_UECON3CLR_ERRORTRANSEC 10 #define AVR32_USBB_UECON3CLR_ERRORTRANSEC_MASK 0x00000400 #define AVR32_USBB_UECON3CLR_ERRORTRANSEC_OFFSET 10 #define AVR32_USBB_UECON3CLR_ERRORTRANSEC_SIZE 1 #define AVR32_USBB_UECON3CLR_FIFOCONC 14 #define AVR32_USBB_UECON3CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UECON3CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UECON3CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UECON3CLR_MDATAEC 8 #define AVR32_USBB_UECON3CLR_MDATAEC_MASK 0x00000100 #define AVR32_USBB_UECON3CLR_MDATAEC_OFFSET 8 #define AVR32_USBB_UECON3CLR_MDATAEC_SIZE 1 #define AVR32_USBB_UECON3CLR_NAKINEC 4 #define AVR32_USBB_UECON3CLR_NAKINEC_MASK 0x00000010 #define AVR32_USBB_UECON3CLR_NAKINEC_OFFSET 4 #define AVR32_USBB_UECON3CLR_NAKINEC_SIZE 1 #define AVR32_USBB_UECON3CLR_NAKOUTEC 3 #define AVR32_USBB_UECON3CLR_NAKOUTEC_MASK 0x00000008 #define AVR32_USBB_UECON3CLR_NAKOUTEC_OFFSET 3 #define AVR32_USBB_UECON3CLR_NAKOUTEC_SIZE 1 #define AVR32_USBB_UECON3CLR_NBUSYBKEC 12 #define AVR32_USBB_UECON3CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UECON3CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UECON3CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UECON3CLR_NYETDISC 17 #define AVR32_USBB_UECON3CLR_NYETDISC_MASK 0x00020000 #define AVR32_USBB_UECON3CLR_NYETDISC_OFFSET 17 #define AVR32_USBB_UECON3CLR_NYETDISC_SIZE 1 #define AVR32_USBB_UECON3CLR_OVERFEC 5 #define AVR32_USBB_UECON3CLR_OVERFEC_MASK 0x00000020 #define AVR32_USBB_UECON3CLR_OVERFEC_OFFSET 5 #define AVR32_USBB_UECON3CLR_OVERFEC_SIZE 1 #define AVR32_USBB_UECON3CLR_RXOUTEC 1 #define AVR32_USBB_UECON3CLR_RXOUTEC_MASK 0x00000002 #define AVR32_USBB_UECON3CLR_RXOUTEC_OFFSET 1 #define AVR32_USBB_UECON3CLR_RXOUTEC_SIZE 1 #define AVR32_USBB_UECON3CLR_RXSTPEC 2 #define AVR32_USBB_UECON3CLR_RXSTPEC_MASK 0x00000004 #define AVR32_USBB_UECON3CLR_RXSTPEC_OFFSET 2 #define AVR32_USBB_UECON3CLR_RXSTPEC_SIZE 1 #define AVR32_USBB_UECON3CLR_SHORTPACKETEC 7 #define AVR32_USBB_UECON3CLR_SHORTPACKETEC_MASK 0x00000080 #define AVR32_USBB_UECON3CLR_SHORTPACKETEC_OFFSET 7 #define AVR32_USBB_UECON3CLR_SHORTPACKETEC_SIZE 1 #define AVR32_USBB_UECON3CLR_STALLEDEC 6 #define AVR32_USBB_UECON3CLR_STALLEDEC_MASK 0x00000040 #define AVR32_USBB_UECON3CLR_STALLEDEC_OFFSET 6 #define AVR32_USBB_UECON3CLR_STALLEDEC_SIZE 1 #define AVR32_USBB_UECON3CLR_STALLRQC 19 #define AVR32_USBB_UECON3CLR_STALLRQC_MASK 0x00080000 #define AVR32_USBB_UECON3CLR_STALLRQC_OFFSET 19 #define AVR32_USBB_UECON3CLR_STALLRQC_SIZE 1 #define AVR32_USBB_UECON3CLR_TXINEC 0 #define AVR32_USBB_UECON3CLR_TXINEC_MASK 0x00000001 #define AVR32_USBB_UECON3CLR_TXINEC_OFFSET 0 #define AVR32_USBB_UECON3CLR_TXINEC_SIZE 1 #define AVR32_USBB_UECON3SET 0x000001fc #define AVR32_USBB_UECON3SET_DATAXES 9 #define AVR32_USBB_UECON3SET_DATAXES_MASK 0x00000200 #define AVR32_USBB_UECON3SET_DATAXES_OFFSET 9 #define AVR32_USBB_UECON3SET_DATAXES_SIZE 1 #define AVR32_USBB_UECON3SET_EPDISHDMAS 16 #define AVR32_USBB_UECON3SET_EPDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UECON3SET_EPDISHDMAS_OFFSET 16 #define AVR32_USBB_UECON3SET_EPDISHDMAS_SIZE 1 #define AVR32_USBB_UECON3SET_ERRORTRANSES 10 #define AVR32_USBB_UECON3SET_ERRORTRANSES_MASK 0x00000400 #define AVR32_USBB_UECON3SET_ERRORTRANSES_OFFSET 10 #define AVR32_USBB_UECON3SET_ERRORTRANSES_SIZE 1 #define AVR32_USBB_UECON3SET_KILLBKS 13 #define AVR32_USBB_UECON3SET_KILLBKS_MASK 0x00002000 #define AVR32_USBB_UECON3SET_KILLBKS_OFFSET 13 #define AVR32_USBB_UECON3SET_KILLBKS_SIZE 1 #define AVR32_USBB_UECON3SET_MDATAES 8 #define AVR32_USBB_UECON3SET_MDATAES_MASK 0x00000100 #define AVR32_USBB_UECON3SET_MDATAES_OFFSET 8 #define AVR32_USBB_UECON3SET_MDATAES_SIZE 1 #define AVR32_USBB_UECON3SET_NAKINES 4 #define AVR32_USBB_UECON3SET_NAKINES_MASK 0x00000010 #define AVR32_USBB_UECON3SET_NAKINES_OFFSET 4 #define AVR32_USBB_UECON3SET_NAKINES_SIZE 1 #define AVR32_USBB_UECON3SET_NAKOUTES 3 #define AVR32_USBB_UECON3SET_NAKOUTES_MASK 0x00000008 #define AVR32_USBB_UECON3SET_NAKOUTES_OFFSET 3 #define AVR32_USBB_UECON3SET_NAKOUTES_SIZE 1 #define AVR32_USBB_UECON3SET_NBUSYBKES 12 #define AVR32_USBB_UECON3SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UECON3SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UECON3SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UECON3SET_NYETDISS 17 #define AVR32_USBB_UECON3SET_NYETDISS_MASK 0x00020000 #define AVR32_USBB_UECON3SET_NYETDISS_OFFSET 17 #define AVR32_USBB_UECON3SET_NYETDISS_SIZE 1 #define AVR32_USBB_UECON3SET_OVERFES 5 #define AVR32_USBB_UECON3SET_OVERFES_MASK 0x00000020 #define AVR32_USBB_UECON3SET_OVERFES_OFFSET 5 #define AVR32_USBB_UECON3SET_OVERFES_SIZE 1 #define AVR32_USBB_UECON3SET_RSTDTS 18 #define AVR32_USBB_UECON3SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UECON3SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UECON3SET_RSTDTS_SIZE 1 #define AVR32_USBB_UECON3SET_RXOUTES 1 #define AVR32_USBB_UECON3SET_RXOUTES_MASK 0x00000002 #define AVR32_USBB_UECON3SET_RXOUTES_OFFSET 1 #define AVR32_USBB_UECON3SET_RXOUTES_SIZE 1 #define AVR32_USBB_UECON3SET_RXSTPES 2 #define AVR32_USBB_UECON3SET_RXSTPES_MASK 0x00000004 #define AVR32_USBB_UECON3SET_RXSTPES_OFFSET 2 #define AVR32_USBB_UECON3SET_RXSTPES_SIZE 1 #define AVR32_USBB_UECON3SET_SHORTPACKETES 7 #define AVR32_USBB_UECON3SET_SHORTPACKETES_MASK 0x00000080 #define AVR32_USBB_UECON3SET_SHORTPACKETES_OFFSET 7 #define AVR32_USBB_UECON3SET_SHORTPACKETES_SIZE 1 #define AVR32_USBB_UECON3SET_STALLEDES 6 #define AVR32_USBB_UECON3SET_STALLEDES_MASK 0x00000040 #define AVR32_USBB_UECON3SET_STALLEDES_OFFSET 6 #define AVR32_USBB_UECON3SET_STALLEDES_SIZE 1 #define AVR32_USBB_UECON3SET_STALLRQS 19 #define AVR32_USBB_UECON3SET_STALLRQS_MASK 0x00080000 #define AVR32_USBB_UECON3SET_STALLRQS_OFFSET 19 #define AVR32_USBB_UECON3SET_STALLRQS_SIZE 1 #define AVR32_USBB_UECON3SET_TXINES 0 #define AVR32_USBB_UECON3SET_TXINES_MASK 0x00000001 #define AVR32_USBB_UECON3SET_TXINES_OFFSET 0 #define AVR32_USBB_UECON3SET_TXINES_SIZE 1 #define AVR32_USBB_UECON3_DATAXE 9 #define AVR32_USBB_UECON3_DATAXE_MASK 0x00000200 #define AVR32_USBB_UECON3_DATAXE_OFFSET 9 #define AVR32_USBB_UECON3_DATAXE_SIZE 1 #define AVR32_USBB_UECON3_EPDISHDMA 16 #define AVR32_USBB_UECON3_EPDISHDMA_MASK 0x00010000 #define AVR32_USBB_UECON3_EPDISHDMA_OFFSET 16 #define AVR32_USBB_UECON3_EPDISHDMA_SIZE 1 #define AVR32_USBB_UECON3_ERRORTRANSE 10 #define AVR32_USBB_UECON3_ERRORTRANSE_MASK 0x00000400 #define AVR32_USBB_UECON3_ERRORTRANSE_OFFSET 10 #define AVR32_USBB_UECON3_ERRORTRANSE_SIZE 1 #define AVR32_USBB_UECON3_FIFOCON 14 #define AVR32_USBB_UECON3_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UECON3_FIFOCON_OFFSET 14 #define AVR32_USBB_UECON3_FIFOCON_SIZE 1 #define AVR32_USBB_UECON3_KILLBK 13 #define AVR32_USBB_UECON3_KILLBK_MASK 0x00002000 #define AVR32_USBB_UECON3_KILLBK_OFFSET 13 #define AVR32_USBB_UECON3_KILLBK_SIZE 1 #define AVR32_USBB_UECON3_MDATAE 8 #define AVR32_USBB_UECON3_MDATAE_MASK 0x00000100 #define AVR32_USBB_UECON3_MDATAE_OFFSET 8 #define AVR32_USBB_UECON3_MDATAE_SIZE 1 #define AVR32_USBB_UECON3_NAKINE 4 #define AVR32_USBB_UECON3_NAKINE_MASK 0x00000010 #define AVR32_USBB_UECON3_NAKINE_OFFSET 4 #define AVR32_USBB_UECON3_NAKINE_SIZE 1 #define AVR32_USBB_UECON3_NAKOUTE 3 #define AVR32_USBB_UECON3_NAKOUTE_MASK 0x00000008 #define AVR32_USBB_UECON3_NAKOUTE_OFFSET 3 #define AVR32_USBB_UECON3_NAKOUTE_SIZE 1 #define AVR32_USBB_UECON3_NBUSYBKE 12 #define AVR32_USBB_UECON3_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UECON3_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UECON3_NBUSYBKE_SIZE 1 #define AVR32_USBB_UECON3_NYETDIS 17 #define AVR32_USBB_UECON3_NYETDIS_MASK 0x00020000 #define AVR32_USBB_UECON3_NYETDIS_OFFSET 17 #define AVR32_USBB_UECON3_NYETDIS_SIZE 1 #define AVR32_USBB_UECON3_OVERFE 5 #define AVR32_USBB_UECON3_OVERFE_MASK 0x00000020 #define AVR32_USBB_UECON3_OVERFE_OFFSET 5 #define AVR32_USBB_UECON3_OVERFE_SIZE 1 #define AVR32_USBB_UECON3_RSTDT 18 #define AVR32_USBB_UECON3_RSTDT_MASK 0x00040000 #define AVR32_USBB_UECON3_RSTDT_OFFSET 18 #define AVR32_USBB_UECON3_RSTDT_SIZE 1 #define AVR32_USBB_UECON3_RXOUTE 1 #define AVR32_USBB_UECON3_RXOUTE_MASK 0x00000002 #define AVR32_USBB_UECON3_RXOUTE_OFFSET 1 #define AVR32_USBB_UECON3_RXOUTE_SIZE 1 #define AVR32_USBB_UECON3_RXSTPE 2 #define AVR32_USBB_UECON3_RXSTPE_MASK 0x00000004 #define AVR32_USBB_UECON3_RXSTPE_OFFSET 2 #define AVR32_USBB_UECON3_RXSTPE_SIZE 1 #define AVR32_USBB_UECON3_SHORTPACKETE 7 #define AVR32_USBB_UECON3_SHORTPACKETE_MASK 0x00000080 #define AVR32_USBB_UECON3_SHORTPACKETE_OFFSET 7 #define AVR32_USBB_UECON3_SHORTPACKETE_SIZE 1 #define AVR32_USBB_UECON3_STALLEDE 6 #define AVR32_USBB_UECON3_STALLEDE_MASK 0x00000040 #define AVR32_USBB_UECON3_STALLEDE_OFFSET 6 #define AVR32_USBB_UECON3_STALLEDE_SIZE 1 #define AVR32_USBB_UECON3_STALLRQ 19 #define AVR32_USBB_UECON3_STALLRQ_MASK 0x00080000 #define AVR32_USBB_UECON3_STALLRQ_OFFSET 19 #define AVR32_USBB_UECON3_STALLRQ_SIZE 1 #define AVR32_USBB_UECON3_TXINE 0 #define AVR32_USBB_UECON3_TXINE_MASK 0x00000001 #define AVR32_USBB_UECON3_TXINE_OFFSET 0 #define AVR32_USBB_UECON3_TXINE_SIZE 1 #define AVR32_USBB_UECON4 0x000001d0 #define AVR32_USBB_UECON4CLR 0x00000230 #define AVR32_USBB_UECON4CLR_DATAXEC 9 #define AVR32_USBB_UECON4CLR_DATAXEC_MASK 0x00000200 #define AVR32_USBB_UECON4CLR_DATAXEC_OFFSET 9 #define AVR32_USBB_UECON4CLR_DATAXEC_SIZE 1 #define AVR32_USBB_UECON4CLR_EPDISHDMAC 16 #define AVR32_USBB_UECON4CLR_EPDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UECON4CLR_EPDISHDMAC_OFFSET 16 #define AVR32_USBB_UECON4CLR_EPDISHDMAC_SIZE 1 #define AVR32_USBB_UECON4CLR_ERRORTRANSEC 10 #define AVR32_USBB_UECON4CLR_ERRORTRANSEC_MASK 0x00000400 #define AVR32_USBB_UECON4CLR_ERRORTRANSEC_OFFSET 10 #define AVR32_USBB_UECON4CLR_ERRORTRANSEC_SIZE 1 #define AVR32_USBB_UECON4CLR_FIFOCONC 14 #define AVR32_USBB_UECON4CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UECON4CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UECON4CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UECON4CLR_MDATAEC 8 #define AVR32_USBB_UECON4CLR_MDATAEC_MASK 0x00000100 #define AVR32_USBB_UECON4CLR_MDATAEC_OFFSET 8 #define AVR32_USBB_UECON4CLR_MDATAEC_SIZE 1 #define AVR32_USBB_UECON4CLR_NAKINEC 4 #define AVR32_USBB_UECON4CLR_NAKINEC_MASK 0x00000010 #define AVR32_USBB_UECON4CLR_NAKINEC_OFFSET 4 #define AVR32_USBB_UECON4CLR_NAKINEC_SIZE 1 #define AVR32_USBB_UECON4CLR_NAKOUTEC 3 #define AVR32_USBB_UECON4CLR_NAKOUTEC_MASK 0x00000008 #define AVR32_USBB_UECON4CLR_NAKOUTEC_OFFSET 3 #define AVR32_USBB_UECON4CLR_NAKOUTEC_SIZE 1 #define AVR32_USBB_UECON4CLR_NBUSYBKEC 12 #define AVR32_USBB_UECON4CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UECON4CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UECON4CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UECON4CLR_NYETDISC 17 #define AVR32_USBB_UECON4CLR_NYETDISC_MASK 0x00020000 #define AVR32_USBB_UECON4CLR_NYETDISC_OFFSET 17 #define AVR32_USBB_UECON4CLR_NYETDISC_SIZE 1 #define AVR32_USBB_UECON4CLR_OVERFEC 5 #define AVR32_USBB_UECON4CLR_OVERFEC_MASK 0x00000020 #define AVR32_USBB_UECON4CLR_OVERFEC_OFFSET 5 #define AVR32_USBB_UECON4CLR_OVERFEC_SIZE 1 #define AVR32_USBB_UECON4CLR_RXOUTEC 1 #define AVR32_USBB_UECON4CLR_RXOUTEC_MASK 0x00000002 #define AVR32_USBB_UECON4CLR_RXOUTEC_OFFSET 1 #define AVR32_USBB_UECON4CLR_RXOUTEC_SIZE 1 #define AVR32_USBB_UECON4CLR_RXSTPEC 2 #define AVR32_USBB_UECON4CLR_RXSTPEC_MASK 0x00000004 #define AVR32_USBB_UECON4CLR_RXSTPEC_OFFSET 2 #define AVR32_USBB_UECON4CLR_RXSTPEC_SIZE 1 #define AVR32_USBB_UECON4CLR_SHORTPACKETEC 7 #define AVR32_USBB_UECON4CLR_SHORTPACKETEC_MASK 0x00000080 #define AVR32_USBB_UECON4CLR_SHORTPACKETEC_OFFSET 7 #define AVR32_USBB_UECON4CLR_SHORTPACKETEC_SIZE 1 #define AVR32_USBB_UECON4CLR_STALLEDEC 6 #define AVR32_USBB_UECON4CLR_STALLEDEC_MASK 0x00000040 #define AVR32_USBB_UECON4CLR_STALLEDEC_OFFSET 6 #define AVR32_USBB_UECON4CLR_STALLEDEC_SIZE 1 #define AVR32_USBB_UECON4CLR_STALLRQC 19 #define AVR32_USBB_UECON4CLR_STALLRQC_MASK 0x00080000 #define AVR32_USBB_UECON4CLR_STALLRQC_OFFSET 19 #define AVR32_USBB_UECON4CLR_STALLRQC_SIZE 1 #define AVR32_USBB_UECON4CLR_TXINEC 0 #define AVR32_USBB_UECON4CLR_TXINEC_MASK 0x00000001 #define AVR32_USBB_UECON4CLR_TXINEC_OFFSET 0 #define AVR32_USBB_UECON4CLR_TXINEC_SIZE 1 #define AVR32_USBB_UECON4SET 0x00000200 #define AVR32_USBB_UECON4SET_DATAXES 9 #define AVR32_USBB_UECON4SET_DATAXES_MASK 0x00000200 #define AVR32_USBB_UECON4SET_DATAXES_OFFSET 9 #define AVR32_USBB_UECON4SET_DATAXES_SIZE 1 #define AVR32_USBB_UECON4SET_EPDISHDMAS 16 #define AVR32_USBB_UECON4SET_EPDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UECON4SET_EPDISHDMAS_OFFSET 16 #define AVR32_USBB_UECON4SET_EPDISHDMAS_SIZE 1 #define AVR32_USBB_UECON4SET_ERRORTRANSES 10 #define AVR32_USBB_UECON4SET_ERRORTRANSES_MASK 0x00000400 #define AVR32_USBB_UECON4SET_ERRORTRANSES_OFFSET 10 #define AVR32_USBB_UECON4SET_ERRORTRANSES_SIZE 1 #define AVR32_USBB_UECON4SET_KILLBKS 13 #define AVR32_USBB_UECON4SET_KILLBKS_MASK 0x00002000 #define AVR32_USBB_UECON4SET_KILLBKS_OFFSET 13 #define AVR32_USBB_UECON4SET_KILLBKS_SIZE 1 #define AVR32_USBB_UECON4SET_MDATAES 8 #define AVR32_USBB_UECON4SET_MDATAES_MASK 0x00000100 #define AVR32_USBB_UECON4SET_MDATAES_OFFSET 8 #define AVR32_USBB_UECON4SET_MDATAES_SIZE 1 #define AVR32_USBB_UECON4SET_NAKINES 4 #define AVR32_USBB_UECON4SET_NAKINES_MASK 0x00000010 #define AVR32_USBB_UECON4SET_NAKINES_OFFSET 4 #define AVR32_USBB_UECON4SET_NAKINES_SIZE 1 #define AVR32_USBB_UECON4SET_NAKOUTES 3 #define AVR32_USBB_UECON4SET_NAKOUTES_MASK 0x00000008 #define AVR32_USBB_UECON4SET_NAKOUTES_OFFSET 3 #define AVR32_USBB_UECON4SET_NAKOUTES_SIZE 1 #define AVR32_USBB_UECON4SET_NBUSYBKES 12 #define AVR32_USBB_UECON4SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UECON4SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UECON4SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UECON4SET_NYETDISS 17 #define AVR32_USBB_UECON4SET_NYETDISS_MASK 0x00020000 #define AVR32_USBB_UECON4SET_NYETDISS_OFFSET 17 #define AVR32_USBB_UECON4SET_NYETDISS_SIZE 1 #define AVR32_USBB_UECON4SET_OVERFES 5 #define AVR32_USBB_UECON4SET_OVERFES_MASK 0x00000020 #define AVR32_USBB_UECON4SET_OVERFES_OFFSET 5 #define AVR32_USBB_UECON4SET_OVERFES_SIZE 1 #define AVR32_USBB_UECON4SET_RSTDTS 18 #define AVR32_USBB_UECON4SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UECON4SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UECON4SET_RSTDTS_SIZE 1 #define AVR32_USBB_UECON4SET_RXOUTES 1 #define AVR32_USBB_UECON4SET_RXOUTES_MASK 0x00000002 #define AVR32_USBB_UECON4SET_RXOUTES_OFFSET 1 #define AVR32_USBB_UECON4SET_RXOUTES_SIZE 1 #define AVR32_USBB_UECON4SET_RXSTPES 2 #define AVR32_USBB_UECON4SET_RXSTPES_MASK 0x00000004 #define AVR32_USBB_UECON4SET_RXSTPES_OFFSET 2 #define AVR32_USBB_UECON4SET_RXSTPES_SIZE 1 #define AVR32_USBB_UECON4SET_SHORTPACKETES 7 #define AVR32_USBB_UECON4SET_SHORTPACKETES_MASK 0x00000080 #define AVR32_USBB_UECON4SET_SHORTPACKETES_OFFSET 7 #define AVR32_USBB_UECON4SET_SHORTPACKETES_SIZE 1 #define AVR32_USBB_UECON4SET_STALLEDES 6 #define AVR32_USBB_UECON4SET_STALLEDES_MASK 0x00000040 #define AVR32_USBB_UECON4SET_STALLEDES_OFFSET 6 #define AVR32_USBB_UECON4SET_STALLEDES_SIZE 1 #define AVR32_USBB_UECON4SET_STALLRQS 19 #define AVR32_USBB_UECON4SET_STALLRQS_MASK 0x00080000 #define AVR32_USBB_UECON4SET_STALLRQS_OFFSET 19 #define AVR32_USBB_UECON4SET_STALLRQS_SIZE 1 #define AVR32_USBB_UECON4SET_TXINES 0 #define AVR32_USBB_UECON4SET_TXINES_MASK 0x00000001 #define AVR32_USBB_UECON4SET_TXINES_OFFSET 0 #define AVR32_USBB_UECON4SET_TXINES_SIZE 1 #define AVR32_USBB_UECON4_DATAXE 9 #define AVR32_USBB_UECON4_DATAXE_MASK 0x00000200 #define AVR32_USBB_UECON4_DATAXE_OFFSET 9 #define AVR32_USBB_UECON4_DATAXE_SIZE 1 #define AVR32_USBB_UECON4_EPDISHDMA 16 #define AVR32_USBB_UECON4_EPDISHDMA_MASK 0x00010000 #define AVR32_USBB_UECON4_EPDISHDMA_OFFSET 16 #define AVR32_USBB_UECON4_EPDISHDMA_SIZE 1 #define AVR32_USBB_UECON4_ERRORTRANSE 10 #define AVR32_USBB_UECON4_ERRORTRANSE_MASK 0x00000400 #define AVR32_USBB_UECON4_ERRORTRANSE_OFFSET 10 #define AVR32_USBB_UECON4_ERRORTRANSE_SIZE 1 #define AVR32_USBB_UECON4_FIFOCON 14 #define AVR32_USBB_UECON4_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UECON4_FIFOCON_OFFSET 14 #define AVR32_USBB_UECON4_FIFOCON_SIZE 1 #define AVR32_USBB_UECON4_KILLBK 13 #define AVR32_USBB_UECON4_KILLBK_MASK 0x00002000 #define AVR32_USBB_UECON4_KILLBK_OFFSET 13 #define AVR32_USBB_UECON4_KILLBK_SIZE 1 #define AVR32_USBB_UECON4_MDATAE 8 #define AVR32_USBB_UECON4_MDATAE_MASK 0x00000100 #define AVR32_USBB_UECON4_MDATAE_OFFSET 8 #define AVR32_USBB_UECON4_MDATAE_SIZE 1 #define AVR32_USBB_UECON4_NAKINE 4 #define AVR32_USBB_UECON4_NAKINE_MASK 0x00000010 #define AVR32_USBB_UECON4_NAKINE_OFFSET 4 #define AVR32_USBB_UECON4_NAKINE_SIZE 1 #define AVR32_USBB_UECON4_NAKOUTE 3 #define AVR32_USBB_UECON4_NAKOUTE_MASK 0x00000008 #define AVR32_USBB_UECON4_NAKOUTE_OFFSET 3 #define AVR32_USBB_UECON4_NAKOUTE_SIZE 1 #define AVR32_USBB_UECON4_NBUSYBKE 12 #define AVR32_USBB_UECON4_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UECON4_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UECON4_NBUSYBKE_SIZE 1 #define AVR32_USBB_UECON4_NYETDIS 17 #define AVR32_USBB_UECON4_NYETDIS_MASK 0x00020000 #define AVR32_USBB_UECON4_NYETDIS_OFFSET 17 #define AVR32_USBB_UECON4_NYETDIS_SIZE 1 #define AVR32_USBB_UECON4_OVERFE 5 #define AVR32_USBB_UECON4_OVERFE_MASK 0x00000020 #define AVR32_USBB_UECON4_OVERFE_OFFSET 5 #define AVR32_USBB_UECON4_OVERFE_SIZE 1 #define AVR32_USBB_UECON4_RSTDT 18 #define AVR32_USBB_UECON4_RSTDT_MASK 0x00040000 #define AVR32_USBB_UECON4_RSTDT_OFFSET 18 #define AVR32_USBB_UECON4_RSTDT_SIZE 1 #define AVR32_USBB_UECON4_RXOUTE 1 #define AVR32_USBB_UECON4_RXOUTE_MASK 0x00000002 #define AVR32_USBB_UECON4_RXOUTE_OFFSET 1 #define AVR32_USBB_UECON4_RXOUTE_SIZE 1 #define AVR32_USBB_UECON4_RXSTPE 2 #define AVR32_USBB_UECON4_RXSTPE_MASK 0x00000004 #define AVR32_USBB_UECON4_RXSTPE_OFFSET 2 #define AVR32_USBB_UECON4_RXSTPE_SIZE 1 #define AVR32_USBB_UECON4_SHORTPACKETE 7 #define AVR32_USBB_UECON4_SHORTPACKETE_MASK 0x00000080 #define AVR32_USBB_UECON4_SHORTPACKETE_OFFSET 7 #define AVR32_USBB_UECON4_SHORTPACKETE_SIZE 1 #define AVR32_USBB_UECON4_STALLEDE 6 #define AVR32_USBB_UECON4_STALLEDE_MASK 0x00000040 #define AVR32_USBB_UECON4_STALLEDE_OFFSET 6 #define AVR32_USBB_UECON4_STALLEDE_SIZE 1 #define AVR32_USBB_UECON4_STALLRQ 19 #define AVR32_USBB_UECON4_STALLRQ_MASK 0x00080000 #define AVR32_USBB_UECON4_STALLRQ_OFFSET 19 #define AVR32_USBB_UECON4_STALLRQ_SIZE 1 #define AVR32_USBB_UECON4_TXINE 0 #define AVR32_USBB_UECON4_TXINE_MASK 0x00000001 #define AVR32_USBB_UECON4_TXINE_OFFSET 0 #define AVR32_USBB_UECON4_TXINE_SIZE 1 #define AVR32_USBB_UECON5 0x000001d4 #define AVR32_USBB_UECON5CLR 0x00000234 #define AVR32_USBB_UECON5CLR_DATAXEC 9 #define AVR32_USBB_UECON5CLR_DATAXEC_MASK 0x00000200 #define AVR32_USBB_UECON5CLR_DATAXEC_OFFSET 9 #define AVR32_USBB_UECON5CLR_DATAXEC_SIZE 1 #define AVR32_USBB_UECON5CLR_EPDISHDMAC 16 #define AVR32_USBB_UECON5CLR_EPDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UECON5CLR_EPDISHDMAC_OFFSET 16 #define AVR32_USBB_UECON5CLR_EPDISHDMAC_SIZE 1 #define AVR32_USBB_UECON5CLR_ERRORTRANSEC 10 #define AVR32_USBB_UECON5CLR_ERRORTRANSEC_MASK 0x00000400 #define AVR32_USBB_UECON5CLR_ERRORTRANSEC_OFFSET 10 #define AVR32_USBB_UECON5CLR_ERRORTRANSEC_SIZE 1 #define AVR32_USBB_UECON5CLR_FIFOCONC 14 #define AVR32_USBB_UECON5CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UECON5CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UECON5CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UECON5CLR_MDATAEC 8 #define AVR32_USBB_UECON5CLR_MDATAEC_MASK 0x00000100 #define AVR32_USBB_UECON5CLR_MDATAEC_OFFSET 8 #define AVR32_USBB_UECON5CLR_MDATAEC_SIZE 1 #define AVR32_USBB_UECON5CLR_NAKINEC 4 #define AVR32_USBB_UECON5CLR_NAKINEC_MASK 0x00000010 #define AVR32_USBB_UECON5CLR_NAKINEC_OFFSET 4 #define AVR32_USBB_UECON5CLR_NAKINEC_SIZE 1 #define AVR32_USBB_UECON5CLR_NAKOUTEC 3 #define AVR32_USBB_UECON5CLR_NAKOUTEC_MASK 0x00000008 #define AVR32_USBB_UECON5CLR_NAKOUTEC_OFFSET 3 #define AVR32_USBB_UECON5CLR_NAKOUTEC_SIZE 1 #define AVR32_USBB_UECON5CLR_NBUSYBKEC 12 #define AVR32_USBB_UECON5CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UECON5CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UECON5CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UECON5CLR_NYETDISC 17 #define AVR32_USBB_UECON5CLR_NYETDISC_MASK 0x00020000 #define AVR32_USBB_UECON5CLR_NYETDISC_OFFSET 17 #define AVR32_USBB_UECON5CLR_NYETDISC_SIZE 1 #define AVR32_USBB_UECON5CLR_OVERFEC 5 #define AVR32_USBB_UECON5CLR_OVERFEC_MASK 0x00000020 #define AVR32_USBB_UECON5CLR_OVERFEC_OFFSET 5 #define AVR32_USBB_UECON5CLR_OVERFEC_SIZE 1 #define AVR32_USBB_UECON5CLR_RXOUTEC 1 #define AVR32_USBB_UECON5CLR_RXOUTEC_MASK 0x00000002 #define AVR32_USBB_UECON5CLR_RXOUTEC_OFFSET 1 #define AVR32_USBB_UECON5CLR_RXOUTEC_SIZE 1 #define AVR32_USBB_UECON5CLR_RXSTPEC 2 #define AVR32_USBB_UECON5CLR_RXSTPEC_MASK 0x00000004 #define AVR32_USBB_UECON5CLR_RXSTPEC_OFFSET 2 #define AVR32_USBB_UECON5CLR_RXSTPEC_SIZE 1 #define AVR32_USBB_UECON5CLR_SHORTPACKETEC 7 #define AVR32_USBB_UECON5CLR_SHORTPACKETEC_MASK 0x00000080 #define AVR32_USBB_UECON5CLR_SHORTPACKETEC_OFFSET 7 #define AVR32_USBB_UECON5CLR_SHORTPACKETEC_SIZE 1 #define AVR32_USBB_UECON5CLR_STALLEDEC 6 #define AVR32_USBB_UECON5CLR_STALLEDEC_MASK 0x00000040 #define AVR32_USBB_UECON5CLR_STALLEDEC_OFFSET 6 #define AVR32_USBB_UECON5CLR_STALLEDEC_SIZE 1 #define AVR32_USBB_UECON5CLR_STALLRQC 19 #define AVR32_USBB_UECON5CLR_STALLRQC_MASK 0x00080000 #define AVR32_USBB_UECON5CLR_STALLRQC_OFFSET 19 #define AVR32_USBB_UECON5CLR_STALLRQC_SIZE 1 #define AVR32_USBB_UECON5CLR_TXINEC 0 #define AVR32_USBB_UECON5CLR_TXINEC_MASK 0x00000001 #define AVR32_USBB_UECON5CLR_TXINEC_OFFSET 0 #define AVR32_USBB_UECON5CLR_TXINEC_SIZE 1 #define AVR32_USBB_UECON5SET 0x00000204 #define AVR32_USBB_UECON5SET_DATAXES 9 #define AVR32_USBB_UECON5SET_DATAXES_MASK 0x00000200 #define AVR32_USBB_UECON5SET_DATAXES_OFFSET 9 #define AVR32_USBB_UECON5SET_DATAXES_SIZE 1 #define AVR32_USBB_UECON5SET_EPDISHDMAS 16 #define AVR32_USBB_UECON5SET_EPDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UECON5SET_EPDISHDMAS_OFFSET 16 #define AVR32_USBB_UECON5SET_EPDISHDMAS_SIZE 1 #define AVR32_USBB_UECON5SET_ERRORTRANSES 10 #define AVR32_USBB_UECON5SET_ERRORTRANSES_MASK 0x00000400 #define AVR32_USBB_UECON5SET_ERRORTRANSES_OFFSET 10 #define AVR32_USBB_UECON5SET_ERRORTRANSES_SIZE 1 #define AVR32_USBB_UECON5SET_KILLBKS 13 #define AVR32_USBB_UECON5SET_KILLBKS_MASK 0x00002000 #define AVR32_USBB_UECON5SET_KILLBKS_OFFSET 13 #define AVR32_USBB_UECON5SET_KILLBKS_SIZE 1 #define AVR32_USBB_UECON5SET_MDATAES 8 #define AVR32_USBB_UECON5SET_MDATAES_MASK 0x00000100 #define AVR32_USBB_UECON5SET_MDATAES_OFFSET 8 #define AVR32_USBB_UECON5SET_MDATAES_SIZE 1 #define AVR32_USBB_UECON5SET_NAKINES 4 #define AVR32_USBB_UECON5SET_NAKINES_MASK 0x00000010 #define AVR32_USBB_UECON5SET_NAKINES_OFFSET 4 #define AVR32_USBB_UECON5SET_NAKINES_SIZE 1 #define AVR32_USBB_UECON5SET_NAKOUTES 3 #define AVR32_USBB_UECON5SET_NAKOUTES_MASK 0x00000008 #define AVR32_USBB_UECON5SET_NAKOUTES_OFFSET 3 #define AVR32_USBB_UECON5SET_NAKOUTES_SIZE 1 #define AVR32_USBB_UECON5SET_NBUSYBKES 12 #define AVR32_USBB_UECON5SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UECON5SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UECON5SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UECON5SET_NYETDISS 17 #define AVR32_USBB_UECON5SET_NYETDISS_MASK 0x00020000 #define AVR32_USBB_UECON5SET_NYETDISS_OFFSET 17 #define AVR32_USBB_UECON5SET_NYETDISS_SIZE 1 #define AVR32_USBB_UECON5SET_OVERFES 5 #define AVR32_USBB_UECON5SET_OVERFES_MASK 0x00000020 #define AVR32_USBB_UECON5SET_OVERFES_OFFSET 5 #define AVR32_USBB_UECON5SET_OVERFES_SIZE 1 #define AVR32_USBB_UECON5SET_RSTDTS 18 #define AVR32_USBB_UECON5SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UECON5SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UECON5SET_RSTDTS_SIZE 1 #define AVR32_USBB_UECON5SET_RXOUTES 1 #define AVR32_USBB_UECON5SET_RXOUTES_MASK 0x00000002 #define AVR32_USBB_UECON5SET_RXOUTES_OFFSET 1 #define AVR32_USBB_UECON5SET_RXOUTES_SIZE 1 #define AVR32_USBB_UECON5SET_RXSTPES 2 #define AVR32_USBB_UECON5SET_RXSTPES_MASK 0x00000004 #define AVR32_USBB_UECON5SET_RXSTPES_OFFSET 2 #define AVR32_USBB_UECON5SET_RXSTPES_SIZE 1 #define AVR32_USBB_UECON5SET_SHORTPACKETES 7 #define AVR32_USBB_UECON5SET_SHORTPACKETES_MASK 0x00000080 #define AVR32_USBB_UECON5SET_SHORTPACKETES_OFFSET 7 #define AVR32_USBB_UECON5SET_SHORTPACKETES_SIZE 1 #define AVR32_USBB_UECON5SET_STALLEDES 6 #define AVR32_USBB_UECON5SET_STALLEDES_MASK 0x00000040 #define AVR32_USBB_UECON5SET_STALLEDES_OFFSET 6 #define AVR32_USBB_UECON5SET_STALLEDES_SIZE 1 #define AVR32_USBB_UECON5SET_STALLRQS 19 #define AVR32_USBB_UECON5SET_STALLRQS_MASK 0x00080000 #define AVR32_USBB_UECON5SET_STALLRQS_OFFSET 19 #define AVR32_USBB_UECON5SET_STALLRQS_SIZE 1 #define AVR32_USBB_UECON5SET_TXINES 0 #define AVR32_USBB_UECON5SET_TXINES_MASK 0x00000001 #define AVR32_USBB_UECON5SET_TXINES_OFFSET 0 #define AVR32_USBB_UECON5SET_TXINES_SIZE 1 #define AVR32_USBB_UECON5_DATAXE 9 #define AVR32_USBB_UECON5_DATAXE_MASK 0x00000200 #define AVR32_USBB_UECON5_DATAXE_OFFSET 9 #define AVR32_USBB_UECON5_DATAXE_SIZE 1 #define AVR32_USBB_UECON5_EPDISHDMA 16 #define AVR32_USBB_UECON5_EPDISHDMA_MASK 0x00010000 #define AVR32_USBB_UECON5_EPDISHDMA_OFFSET 16 #define AVR32_USBB_UECON5_EPDISHDMA_SIZE 1 #define AVR32_USBB_UECON5_ERRORTRANSE 10 #define AVR32_USBB_UECON5_ERRORTRANSE_MASK 0x00000400 #define AVR32_USBB_UECON5_ERRORTRANSE_OFFSET 10 #define AVR32_USBB_UECON5_ERRORTRANSE_SIZE 1 #define AVR32_USBB_UECON5_FIFOCON 14 #define AVR32_USBB_UECON5_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UECON5_FIFOCON_OFFSET 14 #define AVR32_USBB_UECON5_FIFOCON_SIZE 1 #define AVR32_USBB_UECON5_KILLBK 13 #define AVR32_USBB_UECON5_KILLBK_MASK 0x00002000 #define AVR32_USBB_UECON5_KILLBK_OFFSET 13 #define AVR32_USBB_UECON5_KILLBK_SIZE 1 #define AVR32_USBB_UECON5_MDATAE 8 #define AVR32_USBB_UECON5_MDATAE_MASK 0x00000100 #define AVR32_USBB_UECON5_MDATAE_OFFSET 8 #define AVR32_USBB_UECON5_MDATAE_SIZE 1 #define AVR32_USBB_UECON5_NAKINE 4 #define AVR32_USBB_UECON5_NAKINE_MASK 0x00000010 #define AVR32_USBB_UECON5_NAKINE_OFFSET 4 #define AVR32_USBB_UECON5_NAKINE_SIZE 1 #define AVR32_USBB_UECON5_NAKOUTE 3 #define AVR32_USBB_UECON5_NAKOUTE_MASK 0x00000008 #define AVR32_USBB_UECON5_NAKOUTE_OFFSET 3 #define AVR32_USBB_UECON5_NAKOUTE_SIZE 1 #define AVR32_USBB_UECON5_NBUSYBKE 12 #define AVR32_USBB_UECON5_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UECON5_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UECON5_NBUSYBKE_SIZE 1 #define AVR32_USBB_UECON5_NYETDIS 17 #define AVR32_USBB_UECON5_NYETDIS_MASK 0x00020000 #define AVR32_USBB_UECON5_NYETDIS_OFFSET 17 #define AVR32_USBB_UECON5_NYETDIS_SIZE 1 #define AVR32_USBB_UECON5_OVERFE 5 #define AVR32_USBB_UECON5_OVERFE_MASK 0x00000020 #define AVR32_USBB_UECON5_OVERFE_OFFSET 5 #define AVR32_USBB_UECON5_OVERFE_SIZE 1 #define AVR32_USBB_UECON5_RSTDT 18 #define AVR32_USBB_UECON5_RSTDT_MASK 0x00040000 #define AVR32_USBB_UECON5_RSTDT_OFFSET 18 #define AVR32_USBB_UECON5_RSTDT_SIZE 1 #define AVR32_USBB_UECON5_RXOUTE 1 #define AVR32_USBB_UECON5_RXOUTE_MASK 0x00000002 #define AVR32_USBB_UECON5_RXOUTE_OFFSET 1 #define AVR32_USBB_UECON5_RXOUTE_SIZE 1 #define AVR32_USBB_UECON5_RXSTPE 2 #define AVR32_USBB_UECON5_RXSTPE_MASK 0x00000004 #define AVR32_USBB_UECON5_RXSTPE_OFFSET 2 #define AVR32_USBB_UECON5_RXSTPE_SIZE 1 #define AVR32_USBB_UECON5_SHORTPACKETE 7 #define AVR32_USBB_UECON5_SHORTPACKETE_MASK 0x00000080 #define AVR32_USBB_UECON5_SHORTPACKETE_OFFSET 7 #define AVR32_USBB_UECON5_SHORTPACKETE_SIZE 1 #define AVR32_USBB_UECON5_STALLEDE 6 #define AVR32_USBB_UECON5_STALLEDE_MASK 0x00000040 #define AVR32_USBB_UECON5_STALLEDE_OFFSET 6 #define AVR32_USBB_UECON5_STALLEDE_SIZE 1 #define AVR32_USBB_UECON5_STALLRQ 19 #define AVR32_USBB_UECON5_STALLRQ_MASK 0x00080000 #define AVR32_USBB_UECON5_STALLRQ_OFFSET 19 #define AVR32_USBB_UECON5_STALLRQ_SIZE 1 #define AVR32_USBB_UECON5_TXINE 0 #define AVR32_USBB_UECON5_TXINE_MASK 0x00000001 #define AVR32_USBB_UECON5_TXINE_OFFSET 0 #define AVR32_USBB_UECON5_TXINE_SIZE 1 #define AVR32_USBB_UECON6 0x000001d8 #define AVR32_USBB_UECON6CLR 0x00000238 #define AVR32_USBB_UECON6CLR_DATAXEC 9 #define AVR32_USBB_UECON6CLR_DATAXEC_MASK 0x00000200 #define AVR32_USBB_UECON6CLR_DATAXEC_OFFSET 9 #define AVR32_USBB_UECON6CLR_DATAXEC_SIZE 1 #define AVR32_USBB_UECON6CLR_EPDISHDMAC 16 #define AVR32_USBB_UECON6CLR_EPDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UECON6CLR_EPDISHDMAC_OFFSET 16 #define AVR32_USBB_UECON6CLR_EPDISHDMAC_SIZE 1 #define AVR32_USBB_UECON6CLR_ERRORTRANSEC 10 #define AVR32_USBB_UECON6CLR_ERRORTRANSEC_MASK 0x00000400 #define AVR32_USBB_UECON6CLR_ERRORTRANSEC_OFFSET 10 #define AVR32_USBB_UECON6CLR_ERRORTRANSEC_SIZE 1 #define AVR32_USBB_UECON6CLR_FIFOCONC 14 #define AVR32_USBB_UECON6CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UECON6CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UECON6CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UECON6CLR_MDATAEC 8 #define AVR32_USBB_UECON6CLR_MDATAEC_MASK 0x00000100 #define AVR32_USBB_UECON6CLR_MDATAEC_OFFSET 8 #define AVR32_USBB_UECON6CLR_MDATAEC_SIZE 1 #define AVR32_USBB_UECON6CLR_NAKINEC 4 #define AVR32_USBB_UECON6CLR_NAKINEC_MASK 0x00000010 #define AVR32_USBB_UECON6CLR_NAKINEC_OFFSET 4 #define AVR32_USBB_UECON6CLR_NAKINEC_SIZE 1 #define AVR32_USBB_UECON6CLR_NAKOUTEC 3 #define AVR32_USBB_UECON6CLR_NAKOUTEC_MASK 0x00000008 #define AVR32_USBB_UECON6CLR_NAKOUTEC_OFFSET 3 #define AVR32_USBB_UECON6CLR_NAKOUTEC_SIZE 1 #define AVR32_USBB_UECON6CLR_NBUSYBKEC 12 #define AVR32_USBB_UECON6CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UECON6CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UECON6CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UECON6CLR_NYETDISC 17 #define AVR32_USBB_UECON6CLR_NYETDISC_MASK 0x00020000 #define AVR32_USBB_UECON6CLR_NYETDISC_OFFSET 17 #define AVR32_USBB_UECON6CLR_NYETDISC_SIZE 1 #define AVR32_USBB_UECON6CLR_OVERFEC 5 #define AVR32_USBB_UECON6CLR_OVERFEC_MASK 0x00000020 #define AVR32_USBB_UECON6CLR_OVERFEC_OFFSET 5 #define AVR32_USBB_UECON6CLR_OVERFEC_SIZE 1 #define AVR32_USBB_UECON6CLR_RXOUTEC 1 #define AVR32_USBB_UECON6CLR_RXOUTEC_MASK 0x00000002 #define AVR32_USBB_UECON6CLR_RXOUTEC_OFFSET 1 #define AVR32_USBB_UECON6CLR_RXOUTEC_SIZE 1 #define AVR32_USBB_UECON6CLR_RXSTPEC 2 #define AVR32_USBB_UECON6CLR_RXSTPEC_MASK 0x00000004 #define AVR32_USBB_UECON6CLR_RXSTPEC_OFFSET 2 #define AVR32_USBB_UECON6CLR_RXSTPEC_SIZE 1 #define AVR32_USBB_UECON6CLR_SHORTPACKETEC 7 #define AVR32_USBB_UECON6CLR_SHORTPACKETEC_MASK 0x00000080 #define AVR32_USBB_UECON6CLR_SHORTPACKETEC_OFFSET 7 #define AVR32_USBB_UECON6CLR_SHORTPACKETEC_SIZE 1 #define AVR32_USBB_UECON6CLR_STALLEDEC 6 #define AVR32_USBB_UECON6CLR_STALLEDEC_MASK 0x00000040 #define AVR32_USBB_UECON6CLR_STALLEDEC_OFFSET 6 #define AVR32_USBB_UECON6CLR_STALLEDEC_SIZE 1 #define AVR32_USBB_UECON6CLR_STALLRQC 19 #define AVR32_USBB_UECON6CLR_STALLRQC_MASK 0x00080000 #define AVR32_USBB_UECON6CLR_STALLRQC_OFFSET 19 #define AVR32_USBB_UECON6CLR_STALLRQC_SIZE 1 #define AVR32_USBB_UECON6CLR_TXINEC 0 #define AVR32_USBB_UECON6CLR_TXINEC_MASK 0x00000001 #define AVR32_USBB_UECON6CLR_TXINEC_OFFSET 0 #define AVR32_USBB_UECON6CLR_TXINEC_SIZE 1 #define AVR32_USBB_UECON6SET 0x00000208 #define AVR32_USBB_UECON6SET_DATAXES 9 #define AVR32_USBB_UECON6SET_DATAXES_MASK 0x00000200 #define AVR32_USBB_UECON6SET_DATAXES_OFFSET 9 #define AVR32_USBB_UECON6SET_DATAXES_SIZE 1 #define AVR32_USBB_UECON6SET_EPDISHDMAS 16 #define AVR32_USBB_UECON6SET_EPDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UECON6SET_EPDISHDMAS_OFFSET 16 #define AVR32_USBB_UECON6SET_EPDISHDMAS_SIZE 1 #define AVR32_USBB_UECON6SET_ERRORTRANSES 10 #define AVR32_USBB_UECON6SET_ERRORTRANSES_MASK 0x00000400 #define AVR32_USBB_UECON6SET_ERRORTRANSES_OFFSET 10 #define AVR32_USBB_UECON6SET_ERRORTRANSES_SIZE 1 #define AVR32_USBB_UECON6SET_KILLBKS 13 #define AVR32_USBB_UECON6SET_KILLBKS_MASK 0x00002000 #define AVR32_USBB_UECON6SET_KILLBKS_OFFSET 13 #define AVR32_USBB_UECON6SET_KILLBKS_SIZE 1 #define AVR32_USBB_UECON6SET_MDATAES 8 #define AVR32_USBB_UECON6SET_MDATAES_MASK 0x00000100 #define AVR32_USBB_UECON6SET_MDATAES_OFFSET 8 #define AVR32_USBB_UECON6SET_MDATAES_SIZE 1 #define AVR32_USBB_UECON6SET_NAKINES 4 #define AVR32_USBB_UECON6SET_NAKINES_MASK 0x00000010 #define AVR32_USBB_UECON6SET_NAKINES_OFFSET 4 #define AVR32_USBB_UECON6SET_NAKINES_SIZE 1 #define AVR32_USBB_UECON6SET_NAKOUTES 3 #define AVR32_USBB_UECON6SET_NAKOUTES_MASK 0x00000008 #define AVR32_USBB_UECON6SET_NAKOUTES_OFFSET 3 #define AVR32_USBB_UECON6SET_NAKOUTES_SIZE 1 #define AVR32_USBB_UECON6SET_NBUSYBKES 12 #define AVR32_USBB_UECON6SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UECON6SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UECON6SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UECON6SET_NYETDISS 17 #define AVR32_USBB_UECON6SET_NYETDISS_MASK 0x00020000 #define AVR32_USBB_UECON6SET_NYETDISS_OFFSET 17 #define AVR32_USBB_UECON6SET_NYETDISS_SIZE 1 #define AVR32_USBB_UECON6SET_OVERFES 5 #define AVR32_USBB_UECON6SET_OVERFES_MASK 0x00000020 #define AVR32_USBB_UECON6SET_OVERFES_OFFSET 5 #define AVR32_USBB_UECON6SET_OVERFES_SIZE 1 #define AVR32_USBB_UECON6SET_RSTDTS 18 #define AVR32_USBB_UECON6SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UECON6SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UECON6SET_RSTDTS_SIZE 1 #define AVR32_USBB_UECON6SET_RXOUTES 1 #define AVR32_USBB_UECON6SET_RXOUTES_MASK 0x00000002 #define AVR32_USBB_UECON6SET_RXOUTES_OFFSET 1 #define AVR32_USBB_UECON6SET_RXOUTES_SIZE 1 #define AVR32_USBB_UECON6SET_RXSTPES 2 #define AVR32_USBB_UECON6SET_RXSTPES_MASK 0x00000004 #define AVR32_USBB_UECON6SET_RXSTPES_OFFSET 2 #define AVR32_USBB_UECON6SET_RXSTPES_SIZE 1 #define AVR32_USBB_UECON6SET_SHORTPACKETES 7 #define AVR32_USBB_UECON6SET_SHORTPACKETES_MASK 0x00000080 #define AVR32_USBB_UECON6SET_SHORTPACKETES_OFFSET 7 #define AVR32_USBB_UECON6SET_SHORTPACKETES_SIZE 1 #define AVR32_USBB_UECON6SET_STALLEDES 6 #define AVR32_USBB_UECON6SET_STALLEDES_MASK 0x00000040 #define AVR32_USBB_UECON6SET_STALLEDES_OFFSET 6 #define AVR32_USBB_UECON6SET_STALLEDES_SIZE 1 #define AVR32_USBB_UECON6SET_STALLRQS 19 #define AVR32_USBB_UECON6SET_STALLRQS_MASK 0x00080000 #define AVR32_USBB_UECON6SET_STALLRQS_OFFSET 19 #define AVR32_USBB_UECON6SET_STALLRQS_SIZE 1 #define AVR32_USBB_UECON6SET_TXINES 0 #define AVR32_USBB_UECON6SET_TXINES_MASK 0x00000001 #define AVR32_USBB_UECON6SET_TXINES_OFFSET 0 #define AVR32_USBB_UECON6SET_TXINES_SIZE 1 #define AVR32_USBB_UECON6_DATAXE 9 #define AVR32_USBB_UECON6_DATAXE_MASK 0x00000200 #define AVR32_USBB_UECON6_DATAXE_OFFSET 9 #define AVR32_USBB_UECON6_DATAXE_SIZE 1 #define AVR32_USBB_UECON6_EPDISHDMA 16 #define AVR32_USBB_UECON6_EPDISHDMA_MASK 0x00010000 #define AVR32_USBB_UECON6_EPDISHDMA_OFFSET 16 #define AVR32_USBB_UECON6_EPDISHDMA_SIZE 1 #define AVR32_USBB_UECON6_ERRORTRANSE 10 #define AVR32_USBB_UECON6_ERRORTRANSE_MASK 0x00000400 #define AVR32_USBB_UECON6_ERRORTRANSE_OFFSET 10 #define AVR32_USBB_UECON6_ERRORTRANSE_SIZE 1 #define AVR32_USBB_UECON6_FIFOCON 14 #define AVR32_USBB_UECON6_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UECON6_FIFOCON_OFFSET 14 #define AVR32_USBB_UECON6_FIFOCON_SIZE 1 #define AVR32_USBB_UECON6_KILLBK 13 #define AVR32_USBB_UECON6_KILLBK_MASK 0x00002000 #define AVR32_USBB_UECON6_KILLBK_OFFSET 13 #define AVR32_USBB_UECON6_KILLBK_SIZE 1 #define AVR32_USBB_UECON6_MDATAE 8 #define AVR32_USBB_UECON6_MDATAE_MASK 0x00000100 #define AVR32_USBB_UECON6_MDATAE_OFFSET 8 #define AVR32_USBB_UECON6_MDATAE_SIZE 1 #define AVR32_USBB_UECON6_NAKINE 4 #define AVR32_USBB_UECON6_NAKINE_MASK 0x00000010 #define AVR32_USBB_UECON6_NAKINE_OFFSET 4 #define AVR32_USBB_UECON6_NAKINE_SIZE 1 #define AVR32_USBB_UECON6_NAKOUTE 3 #define AVR32_USBB_UECON6_NAKOUTE_MASK 0x00000008 #define AVR32_USBB_UECON6_NAKOUTE_OFFSET 3 #define AVR32_USBB_UECON6_NAKOUTE_SIZE 1 #define AVR32_USBB_UECON6_NBUSYBKE 12 #define AVR32_USBB_UECON6_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UECON6_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UECON6_NBUSYBKE_SIZE 1 #define AVR32_USBB_UECON6_NYETDIS 17 #define AVR32_USBB_UECON6_NYETDIS_MASK 0x00020000 #define AVR32_USBB_UECON6_NYETDIS_OFFSET 17 #define AVR32_USBB_UECON6_NYETDIS_SIZE 1 #define AVR32_USBB_UECON6_OVERFE 5 #define AVR32_USBB_UECON6_OVERFE_MASK 0x00000020 #define AVR32_USBB_UECON6_OVERFE_OFFSET 5 #define AVR32_USBB_UECON6_OVERFE_SIZE 1 #define AVR32_USBB_UECON6_RSTDT 18 #define AVR32_USBB_UECON6_RSTDT_MASK 0x00040000 #define AVR32_USBB_UECON6_RSTDT_OFFSET 18 #define AVR32_USBB_UECON6_RSTDT_SIZE 1 #define AVR32_USBB_UECON6_RXOUTE 1 #define AVR32_USBB_UECON6_RXOUTE_MASK 0x00000002 #define AVR32_USBB_UECON6_RXOUTE_OFFSET 1 #define AVR32_USBB_UECON6_RXOUTE_SIZE 1 #define AVR32_USBB_UECON6_RXSTPE 2 #define AVR32_USBB_UECON6_RXSTPE_MASK 0x00000004 #define AVR32_USBB_UECON6_RXSTPE_OFFSET 2 #define AVR32_USBB_UECON6_RXSTPE_SIZE 1 #define AVR32_USBB_UECON6_SHORTPACKETE 7 #define AVR32_USBB_UECON6_SHORTPACKETE_MASK 0x00000080 #define AVR32_USBB_UECON6_SHORTPACKETE_OFFSET 7 #define AVR32_USBB_UECON6_SHORTPACKETE_SIZE 1 #define AVR32_USBB_UECON6_STALLEDE 6 #define AVR32_USBB_UECON6_STALLEDE_MASK 0x00000040 #define AVR32_USBB_UECON6_STALLEDE_OFFSET 6 #define AVR32_USBB_UECON6_STALLEDE_SIZE 1 #define AVR32_USBB_UECON6_STALLRQ 19 #define AVR32_USBB_UECON6_STALLRQ_MASK 0x00080000 #define AVR32_USBB_UECON6_STALLRQ_OFFSET 19 #define AVR32_USBB_UECON6_STALLRQ_SIZE 1 #define AVR32_USBB_UECON6_TXINE 0 #define AVR32_USBB_UECON6_TXINE_MASK 0x00000001 #define AVR32_USBB_UECON6_TXINE_OFFSET 0 #define AVR32_USBB_UECON6_TXINE_SIZE 1 #define AVR32_USBB_UEDAT0 0x00000250 #define AVR32_USBB_UEDAT0_EP_DATA 0 #define AVR32_USBB_UEDAT0_EP_DATA_MASK 0xffffffff #define AVR32_USBB_UEDAT0_EP_DATA_OFFSET 0 #define AVR32_USBB_UEDAT0_EP_DATA_SIZE 32 #define AVR32_USBB_UEDAT1 0x00000254 #define AVR32_USBB_UEDAT1_EP_DATA 0 #define AVR32_USBB_UEDAT1_EP_DATA_MASK 0xffffffff #define AVR32_USBB_UEDAT1_EP_DATA_OFFSET 0 #define AVR32_USBB_UEDAT1_EP_DATA_SIZE 32 #define AVR32_USBB_UEDAT2 0x00000258 #define AVR32_USBB_UEDAT2_EP_DATA 0 #define AVR32_USBB_UEDAT2_EP_DATA_MASK 0xffffffff #define AVR32_USBB_UEDAT2_EP_DATA_OFFSET 0 #define AVR32_USBB_UEDAT2_EP_DATA_SIZE 32 #define AVR32_USBB_UEDAT3 0x0000025c #define AVR32_USBB_UEDAT3_EP_DATA 0 #define AVR32_USBB_UEDAT3_EP_DATA_MASK 0xffffffff #define AVR32_USBB_UEDAT3_EP_DATA_OFFSET 0 #define AVR32_USBB_UEDAT3_EP_DATA_SIZE 32 #define AVR32_USBB_UEDAT4 0x00000260 #define AVR32_USBB_UEDAT4_EP_DATA 0 #define AVR32_USBB_UEDAT4_EP_DATA_MASK 0xffffffff #define AVR32_USBB_UEDAT4_EP_DATA_OFFSET 0 #define AVR32_USBB_UEDAT4_EP_DATA_SIZE 32 #define AVR32_USBB_UEDAT5 0x00000264 #define AVR32_USBB_UEDAT5_EP_DATA 0 #define AVR32_USBB_UEDAT5_EP_DATA_MASK 0xffffffff #define AVR32_USBB_UEDAT5_EP_DATA_OFFSET 0 #define AVR32_USBB_UEDAT5_EP_DATA_SIZE 32 #define AVR32_USBB_UEDAT6 0x00000268 #define AVR32_USBB_UEDAT6_EP_DATA 0 #define AVR32_USBB_UEDAT6_EP_DATA_MASK 0xffffffff #define AVR32_USBB_UEDAT6_EP_DATA_OFFSET 0 #define AVR32_USBB_UEDAT6_EP_DATA_SIZE 32 #define AVR32_USBB_UERST 0x0000001c #define AVR32_USBB_UERST_EPEN0 0 #define AVR32_USBB_UERST_EPEN0_MASK 0x00000001 #define AVR32_USBB_UERST_EPEN0_OFFSET 0 #define AVR32_USBB_UERST_EPEN0_SIZE 1 #define AVR32_USBB_UERST_EPEN1 1 #define AVR32_USBB_UERST_EPEN1_MASK 0x00000002 #define AVR32_USBB_UERST_EPEN1_OFFSET 1 #define AVR32_USBB_UERST_EPEN1_SIZE 1 #define AVR32_USBB_UERST_EPEN2 2 #define AVR32_USBB_UERST_EPEN2_MASK 0x00000004 #define AVR32_USBB_UERST_EPEN2_OFFSET 2 #define AVR32_USBB_UERST_EPEN2_SIZE 1 #define AVR32_USBB_UERST_EPEN3 3 #define AVR32_USBB_UERST_EPEN3_MASK 0x00000008 #define AVR32_USBB_UERST_EPEN3_OFFSET 3 #define AVR32_USBB_UERST_EPEN3_SIZE 1 #define AVR32_USBB_UERST_EPEN4 4 #define AVR32_USBB_UERST_EPEN4_MASK 0x00000010 #define AVR32_USBB_UERST_EPEN4_OFFSET 4 #define AVR32_USBB_UERST_EPEN4_SIZE 1 #define AVR32_USBB_UERST_EPEN5 5 #define AVR32_USBB_UERST_EPEN5_MASK 0x00000020 #define AVR32_USBB_UERST_EPEN5_OFFSET 5 #define AVR32_USBB_UERST_EPEN5_SIZE 1 #define AVR32_USBB_UERST_EPEN6 6 #define AVR32_USBB_UERST_EPEN6_MASK 0x00000040 #define AVR32_USBB_UERST_EPEN6_OFFSET 6 #define AVR32_USBB_UERST_EPEN6_SIZE 1 #define AVR32_USBB_UERST_EPRST0 16 #define AVR32_USBB_UERST_EPRST0_MASK 0x00010000 #define AVR32_USBB_UERST_EPRST0_OFFSET 16 #define AVR32_USBB_UERST_EPRST0_SIZE 1 #define AVR32_USBB_UERST_EPRST1 17 #define AVR32_USBB_UERST_EPRST1_MASK 0x00020000 #define AVR32_USBB_UERST_EPRST1_OFFSET 17 #define AVR32_USBB_UERST_EPRST1_SIZE 1 #define AVR32_USBB_UERST_EPRST2 18 #define AVR32_USBB_UERST_EPRST2_MASK 0x00040000 #define AVR32_USBB_UERST_EPRST2_OFFSET 18 #define AVR32_USBB_UERST_EPRST2_SIZE 1 #define AVR32_USBB_UERST_EPRST3 19 #define AVR32_USBB_UERST_EPRST3_MASK 0x00080000 #define AVR32_USBB_UERST_EPRST3_OFFSET 19 #define AVR32_USBB_UERST_EPRST3_SIZE 1 #define AVR32_USBB_UERST_EPRST4 20 #define AVR32_USBB_UERST_EPRST4_MASK 0x00100000 #define AVR32_USBB_UERST_EPRST4_OFFSET 20 #define AVR32_USBB_UERST_EPRST4_SIZE 1 #define AVR32_USBB_UERST_EPRST5 21 #define AVR32_USBB_UERST_EPRST5_MASK 0x00200000 #define AVR32_USBB_UERST_EPRST5_OFFSET 21 #define AVR32_USBB_UERST_EPRST5_SIZE 1 #define AVR32_USBB_UERST_EPRST6 22 #define AVR32_USBB_UERST_EPRST6_MASK 0x00400000 #define AVR32_USBB_UERST_EPRST6_OFFSET 22 #define AVR32_USBB_UERST_EPRST6_SIZE 1 #define AVR32_USBB_UESTA0 0x00000130 #define AVR32_USBB_UESTA0CLR 0x00000160 #define AVR32_USBB_UESTA0CLR_NAKINIC 4 #define AVR32_USBB_UESTA0CLR_NAKINIC_MASK 0x00000010 #define AVR32_USBB_UESTA0CLR_NAKINIC_OFFSET 4 #define AVR32_USBB_UESTA0CLR_NAKINIC_SIZE 1 #define AVR32_USBB_UESTA0CLR_NAKOUTIC 3 #define AVR32_USBB_UESTA0CLR_NAKOUTIC_MASK 0x00000008 #define AVR32_USBB_UESTA0CLR_NAKOUTIC_OFFSET 3 #define AVR32_USBB_UESTA0CLR_NAKOUTIC_SIZE 1 #define AVR32_USBB_UESTA0CLR_OVERFIC 5 #define AVR32_USBB_UESTA0CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UESTA0CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UESTA0CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UESTA0CLR_RXOUTIC 1 #define AVR32_USBB_UESTA0CLR_RXOUTIC_MASK 0x00000002 #define AVR32_USBB_UESTA0CLR_RXOUTIC_OFFSET 1 #define AVR32_USBB_UESTA0CLR_RXOUTIC_SIZE 1 #define AVR32_USBB_UESTA0CLR_RXSTPIC 2 #define AVR32_USBB_UESTA0CLR_RXSTPIC_MASK 0x00000004 #define AVR32_USBB_UESTA0CLR_RXSTPIC_OFFSET 2 #define AVR32_USBB_UESTA0CLR_RXSTPIC_SIZE 1 #define AVR32_USBB_UESTA0CLR_SHORTPACKETC 7 #define AVR32_USBB_UESTA0CLR_SHORTPACKETC_MASK 0x00000080 #define AVR32_USBB_UESTA0CLR_SHORTPACKETC_OFFSET 7 #define AVR32_USBB_UESTA0CLR_SHORTPACKETC_SIZE 1 #define AVR32_USBB_UESTA0CLR_STALLEDIC 6 #define AVR32_USBB_UESTA0CLR_STALLEDIC_MASK 0x00000040 #define AVR32_USBB_UESTA0CLR_STALLEDIC_OFFSET 6 #define AVR32_USBB_UESTA0CLR_STALLEDIC_SIZE 1 #define AVR32_USBB_UESTA0CLR_TXINIC 0 #define AVR32_USBB_UESTA0CLR_TXINIC_MASK 0x00000001 #define AVR32_USBB_UESTA0CLR_TXINIC_OFFSET 0 #define AVR32_USBB_UESTA0CLR_TXINIC_SIZE 1 #define AVR32_USBB_UESTA0SET 0x00000190 #define AVR32_USBB_UESTA0SET_ERRORTRANSS 10 #define AVR32_USBB_UESTA0SET_ERRORTRANSS_MASK 0x00000400 #define AVR32_USBB_UESTA0SET_ERRORTRANSS_OFFSET 10 #define AVR32_USBB_UESTA0SET_ERRORTRANSS_SIZE 1 #define AVR32_USBB_UESTA0SET_NAKINIS 4 #define AVR32_USBB_UESTA0SET_NAKINIS_MASK 0x00000010 #define AVR32_USBB_UESTA0SET_NAKINIS_OFFSET 4 #define AVR32_USBB_UESTA0SET_NAKINIS_SIZE 1 #define AVR32_USBB_UESTA0SET_NAKOUTIS 3 #define AVR32_USBB_UESTA0SET_NAKOUTIS_MASK 0x00000008 #define AVR32_USBB_UESTA0SET_NAKOUTIS_OFFSET 3 #define AVR32_USBB_UESTA0SET_NAKOUTIS_SIZE 1 #define AVR32_USBB_UESTA0SET_NBUSYBKS 12 #define AVR32_USBB_UESTA0SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UESTA0SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UESTA0SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UESTA0SET_OVERFIS 5 #define AVR32_USBB_UESTA0SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UESTA0SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UESTA0SET_OVERFIS_SIZE 1 #define AVR32_USBB_UESTA0SET_RXOUTIS 1 #define AVR32_USBB_UESTA0SET_RXOUTIS_MASK 0x00000002 #define AVR32_USBB_UESTA0SET_RXOUTIS_OFFSET 1 #define AVR32_USBB_UESTA0SET_RXOUTIS_SIZE 1 #define AVR32_USBB_UESTA0SET_RXSTPIS 2 #define AVR32_USBB_UESTA0SET_RXSTPIS_MASK 0x00000004 #define AVR32_USBB_UESTA0SET_RXSTPIS_OFFSET 2 #define AVR32_USBB_UESTA0SET_RXSTPIS_SIZE 1 #define AVR32_USBB_UESTA0SET_SETMDATA 8 #define AVR32_USBB_UESTA0SET_SETMDATA_MASK 0x00000100 #define AVR32_USBB_UESTA0SET_SETMDATA_OFFSET 8 #define AVR32_USBB_UESTA0SET_SETMDATA_SIZE 1 #define AVR32_USBB_UESTA0SET_SHORTPACKETS 7 #define AVR32_USBB_UESTA0SET_SHORTPACKETS_MASK 0x00000080 #define AVR32_USBB_UESTA0SET_SHORTPACKETS_OFFSET 7 #define AVR32_USBB_UESTA0SET_SHORTPACKETS_SIZE 1 #define AVR32_USBB_UESTA0SET_STALLEDIS 6 #define AVR32_USBB_UESTA0SET_STALLEDIS_MASK 0x00000040 #define AVR32_USBB_UESTA0SET_STALLEDIS_OFFSET 6 #define AVR32_USBB_UESTA0SET_STALLEDIS_SIZE 1 #define AVR32_USBB_UESTA0SET_TXINIS 0 #define AVR32_USBB_UESTA0SET_TXINIS_MASK 0x00000001 #define AVR32_USBB_UESTA0SET_TXINIS_OFFSET 0 #define AVR32_USBB_UESTA0SET_TXINIS_SIZE 1 #define AVR32_USBB_UESTA0_BYCT 20 #define AVR32_USBB_UESTA0_BYCT_MASK 0x7ff00000 #define AVR32_USBB_UESTA0_BYCT_OFFSET 20 #define AVR32_USBB_UESTA0_BYCT_SIZE 11 #define AVR32_USBB_UESTA0_CFGOK 18 #define AVR32_USBB_UESTA0_CFGOK_MASK 0x00040000 #define AVR32_USBB_UESTA0_CFGOK_OFFSET 18 #define AVR32_USBB_UESTA0_CFGOK_SIZE 1 #define AVR32_USBB_UESTA0_CTRLDIR 17 #define AVR32_USBB_UESTA0_CTRLDIR_IN 0x00000001 #define AVR32_USBB_UESTA0_CTRLDIR_MASK 0x00020000 #define AVR32_USBB_UESTA0_CTRLDIR_OFFSET 17 #define AVR32_USBB_UESTA0_CTRLDIR_OUT 0x00000000 #define AVR32_USBB_UESTA0_CTRLDIR_SIZE 1 #define AVR32_USBB_UESTA0_CURRBK 14 #define AVR32_USBB_UESTA0_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UESTA0_CURRBK_OFFSET 14 #define AVR32_USBB_UESTA0_CURRBK_SIZE 2 #define AVR32_USBB_UESTA0_DTSEQ 8 #define AVR32_USBB_UESTA0_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UESTA0_DTSEQ_OFFSET 8 #define AVR32_USBB_UESTA0_DTSEQ_SIZE 2 #define AVR32_USBB_UESTA0_ERRORTRANS 10 #define AVR32_USBB_UESTA0_ERRORTRANS_MASK 0x00000400 #define AVR32_USBB_UESTA0_ERRORTRANS_OFFSET 10 #define AVR32_USBB_UESTA0_ERRORTRANS_SIZE 1 #define AVR32_USBB_UESTA0_NAKINI 4 #define AVR32_USBB_UESTA0_NAKINI_MASK 0x00000010 #define AVR32_USBB_UESTA0_NAKINI_OFFSET 4 #define AVR32_USBB_UESTA0_NAKINI_SIZE 1 #define AVR32_USBB_UESTA0_NAKOUTI 3 #define AVR32_USBB_UESTA0_NAKOUTI_MASK 0x00000008 #define AVR32_USBB_UESTA0_NAKOUTI_OFFSET 3 #define AVR32_USBB_UESTA0_NAKOUTI_SIZE 1 #define AVR32_USBB_UESTA0_NBUSYBK 12 #define AVR32_USBB_UESTA0_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UESTA0_NBUSYBK_OFFSET 12 #define AVR32_USBB_UESTA0_NBUSYBK_SIZE 2 #define AVR32_USBB_UESTA0_OVERFI 5 #define AVR32_USBB_UESTA0_OVERFI_MASK 0x00000020 #define AVR32_USBB_UESTA0_OVERFI_OFFSET 5 #define AVR32_USBB_UESTA0_OVERFI_SIZE 1 #define AVR32_USBB_UESTA0_RWALL 16 #define AVR32_USBB_UESTA0_RWALL_MASK 0x00010000 #define AVR32_USBB_UESTA0_RWALL_OFFSET 16 #define AVR32_USBB_UESTA0_RWALL_SIZE 1 #define AVR32_USBB_UESTA0_RXOUTI 1 #define AVR32_USBB_UESTA0_RXOUTI_MASK 0x00000002 #define AVR32_USBB_UESTA0_RXOUTI_OFFSET 1 #define AVR32_USBB_UESTA0_RXOUTI_SIZE 1 #define AVR32_USBB_UESTA0_RXSTPI 2 #define AVR32_USBB_UESTA0_RXSTPI_MASK 0x00000004 #define AVR32_USBB_UESTA0_RXSTPI_OFFSET 2 #define AVR32_USBB_UESTA0_RXSTPI_SIZE 1 #define AVR32_USBB_UESTA0_SHORTPACKET 7 #define AVR32_USBB_UESTA0_SHORTPACKET_MASK 0x00000080 #define AVR32_USBB_UESTA0_SHORTPACKET_OFFSET 7 #define AVR32_USBB_UESTA0_SHORTPACKET_SIZE 1 #define AVR32_USBB_UESTA0_STALLEDI 6 #define AVR32_USBB_UESTA0_STALLEDI_MASK 0x00000040 #define AVR32_USBB_UESTA0_STALLEDI_OFFSET 6 #define AVR32_USBB_UESTA0_STALLEDI_SIZE 1 #define AVR32_USBB_UESTA0_TXINI 0 #define AVR32_USBB_UESTA0_TXINI_MASK 0x00000001 #define AVR32_USBB_UESTA0_TXINI_OFFSET 0 #define AVR32_USBB_UESTA0_TXINI_SIZE 1 #define AVR32_USBB_UESTA1 0x00000134 #define AVR32_USBB_UESTA1CLR 0x00000164 #define AVR32_USBB_UESTA1CLR_NAKINIC 4 #define AVR32_USBB_UESTA1CLR_NAKINIC_MASK 0x00000010 #define AVR32_USBB_UESTA1CLR_NAKINIC_OFFSET 4 #define AVR32_USBB_UESTA1CLR_NAKINIC_SIZE 1 #define AVR32_USBB_UESTA1CLR_NAKOUTIC 3 #define AVR32_USBB_UESTA1CLR_NAKOUTIC_MASK 0x00000008 #define AVR32_USBB_UESTA1CLR_NAKOUTIC_OFFSET 3 #define AVR32_USBB_UESTA1CLR_NAKOUTIC_SIZE 1 #define AVR32_USBB_UESTA1CLR_OVERFIC 5 #define AVR32_USBB_UESTA1CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UESTA1CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UESTA1CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UESTA1CLR_RXOUTIC 1 #define AVR32_USBB_UESTA1CLR_RXOUTIC_MASK 0x00000002 #define AVR32_USBB_UESTA1CLR_RXOUTIC_OFFSET 1 #define AVR32_USBB_UESTA1CLR_RXOUTIC_SIZE 1 #define AVR32_USBB_UESTA1CLR_RXSTPIC 2 #define AVR32_USBB_UESTA1CLR_RXSTPIC_MASK 0x00000004 #define AVR32_USBB_UESTA1CLR_RXSTPIC_OFFSET 2 #define AVR32_USBB_UESTA1CLR_RXSTPIC_SIZE 1 #define AVR32_USBB_UESTA1CLR_SHORTPACKETC 7 #define AVR32_USBB_UESTA1CLR_SHORTPACKETC_MASK 0x00000080 #define AVR32_USBB_UESTA1CLR_SHORTPACKETC_OFFSET 7 #define AVR32_USBB_UESTA1CLR_SHORTPACKETC_SIZE 1 #define AVR32_USBB_UESTA1CLR_STALLEDIC 6 #define AVR32_USBB_UESTA1CLR_STALLEDIC_MASK 0x00000040 #define AVR32_USBB_UESTA1CLR_STALLEDIC_OFFSET 6 #define AVR32_USBB_UESTA1CLR_STALLEDIC_SIZE 1 #define AVR32_USBB_UESTA1CLR_TXINIC 0 #define AVR32_USBB_UESTA1CLR_TXINIC_MASK 0x00000001 #define AVR32_USBB_UESTA1CLR_TXINIC_OFFSET 0 #define AVR32_USBB_UESTA1CLR_TXINIC_SIZE 1 #define AVR32_USBB_UESTA1SET 0x00000194 #define AVR32_USBB_UESTA1SET_ERRORTRANSS 10 #define AVR32_USBB_UESTA1SET_ERRORTRANSS_MASK 0x00000400 #define AVR32_USBB_UESTA1SET_ERRORTRANSS_OFFSET 10 #define AVR32_USBB_UESTA1SET_ERRORTRANSS_SIZE 1 #define AVR32_USBB_UESTA1SET_NAKINIS 4 #define AVR32_USBB_UESTA1SET_NAKINIS_MASK 0x00000010 #define AVR32_USBB_UESTA1SET_NAKINIS_OFFSET 4 #define AVR32_USBB_UESTA1SET_NAKINIS_SIZE 1 #define AVR32_USBB_UESTA1SET_NAKOUTIS 3 #define AVR32_USBB_UESTA1SET_NAKOUTIS_MASK 0x00000008 #define AVR32_USBB_UESTA1SET_NAKOUTIS_OFFSET 3 #define AVR32_USBB_UESTA1SET_NAKOUTIS_SIZE 1 #define AVR32_USBB_UESTA1SET_NBUSYBKS 12 #define AVR32_USBB_UESTA1SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UESTA1SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UESTA1SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UESTA1SET_OVERFIS 5 #define AVR32_USBB_UESTA1SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UESTA1SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UESTA1SET_OVERFIS_SIZE 1 #define AVR32_USBB_UESTA1SET_RXOUTIS 1 #define AVR32_USBB_UESTA1SET_RXOUTIS_MASK 0x00000002 #define AVR32_USBB_UESTA1SET_RXOUTIS_OFFSET 1 #define AVR32_USBB_UESTA1SET_RXOUTIS_SIZE 1 #define AVR32_USBB_UESTA1SET_RXSTPIS 2 #define AVR32_USBB_UESTA1SET_RXSTPIS_MASK 0x00000004 #define AVR32_USBB_UESTA1SET_RXSTPIS_OFFSET 2 #define AVR32_USBB_UESTA1SET_RXSTPIS_SIZE 1 #define AVR32_USBB_UESTA1SET_SETMDATA 8 #define AVR32_USBB_UESTA1SET_SETMDATA_MASK 0x00000100 #define AVR32_USBB_UESTA1SET_SETMDATA_OFFSET 8 #define AVR32_USBB_UESTA1SET_SETMDATA_SIZE 1 #define AVR32_USBB_UESTA1SET_SHORTPACKETS 7 #define AVR32_USBB_UESTA1SET_SHORTPACKETS_MASK 0x00000080 #define AVR32_USBB_UESTA1SET_SHORTPACKETS_OFFSET 7 #define AVR32_USBB_UESTA1SET_SHORTPACKETS_SIZE 1 #define AVR32_USBB_UESTA1SET_STALLEDIS 6 #define AVR32_USBB_UESTA1SET_STALLEDIS_MASK 0x00000040 #define AVR32_USBB_UESTA1SET_STALLEDIS_OFFSET 6 #define AVR32_USBB_UESTA1SET_STALLEDIS_SIZE 1 #define AVR32_USBB_UESTA1SET_TXINIS 0 #define AVR32_USBB_UESTA1SET_TXINIS_MASK 0x00000001 #define AVR32_USBB_UESTA1SET_TXINIS_OFFSET 0 #define AVR32_USBB_UESTA1SET_TXINIS_SIZE 1 #define AVR32_USBB_UESTA1_BYCT 20 #define AVR32_USBB_UESTA1_BYCT_MASK 0x7ff00000 #define AVR32_USBB_UESTA1_BYCT_OFFSET 20 #define AVR32_USBB_UESTA1_BYCT_SIZE 11 #define AVR32_USBB_UESTA1_CFGOK 18 #define AVR32_USBB_UESTA1_CFGOK_MASK 0x00040000 #define AVR32_USBB_UESTA1_CFGOK_OFFSET 18 #define AVR32_USBB_UESTA1_CFGOK_SIZE 1 #define AVR32_USBB_UESTA1_CTRLDIR 17 #define AVR32_USBB_UESTA1_CTRLDIR_IN 0x00000001 #define AVR32_USBB_UESTA1_CTRLDIR_MASK 0x00020000 #define AVR32_USBB_UESTA1_CTRLDIR_OFFSET 17 #define AVR32_USBB_UESTA1_CTRLDIR_OUT 0x00000000 #define AVR32_USBB_UESTA1_CTRLDIR_SIZE 1 #define AVR32_USBB_UESTA1_CURRBK 14 #define AVR32_USBB_UESTA1_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UESTA1_CURRBK_OFFSET 14 #define AVR32_USBB_UESTA1_CURRBK_SIZE 2 #define AVR32_USBB_UESTA1_DTSEQ 8 #define AVR32_USBB_UESTA1_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UESTA1_DTSEQ_OFFSET 8 #define AVR32_USBB_UESTA1_DTSEQ_SIZE 2 #define AVR32_USBB_UESTA1_ERRORTRANS 10 #define AVR32_USBB_UESTA1_ERRORTRANS_MASK 0x00000400 #define AVR32_USBB_UESTA1_ERRORTRANS_OFFSET 10 #define AVR32_USBB_UESTA1_ERRORTRANS_SIZE 1 #define AVR32_USBB_UESTA1_NAKINI 4 #define AVR32_USBB_UESTA1_NAKINI_MASK 0x00000010 #define AVR32_USBB_UESTA1_NAKINI_OFFSET 4 #define AVR32_USBB_UESTA1_NAKINI_SIZE 1 #define AVR32_USBB_UESTA1_NAKOUTI 3 #define AVR32_USBB_UESTA1_NAKOUTI_MASK 0x00000008 #define AVR32_USBB_UESTA1_NAKOUTI_OFFSET 3 #define AVR32_USBB_UESTA1_NAKOUTI_SIZE 1 #define AVR32_USBB_UESTA1_NBUSYBK 12 #define AVR32_USBB_UESTA1_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UESTA1_NBUSYBK_OFFSET 12 #define AVR32_USBB_UESTA1_NBUSYBK_SIZE 2 #define AVR32_USBB_UESTA1_OVERFI 5 #define AVR32_USBB_UESTA1_OVERFI_MASK 0x00000020 #define AVR32_USBB_UESTA1_OVERFI_OFFSET 5 #define AVR32_USBB_UESTA1_OVERFI_SIZE 1 #define AVR32_USBB_UESTA1_RWALL 16 #define AVR32_USBB_UESTA1_RWALL_MASK 0x00010000 #define AVR32_USBB_UESTA1_RWALL_OFFSET 16 #define AVR32_USBB_UESTA1_RWALL_SIZE 1 #define AVR32_USBB_UESTA1_RXOUTI 1 #define AVR32_USBB_UESTA1_RXOUTI_MASK 0x00000002 #define AVR32_USBB_UESTA1_RXOUTI_OFFSET 1 #define AVR32_USBB_UESTA1_RXOUTI_SIZE 1 #define AVR32_USBB_UESTA1_RXSTPI 2 #define AVR32_USBB_UESTA1_RXSTPI_MASK 0x00000004 #define AVR32_USBB_UESTA1_RXSTPI_OFFSET 2 #define AVR32_USBB_UESTA1_RXSTPI_SIZE 1 #define AVR32_USBB_UESTA1_SHORTPACKET 7 #define AVR32_USBB_UESTA1_SHORTPACKET_MASK 0x00000080 #define AVR32_USBB_UESTA1_SHORTPACKET_OFFSET 7 #define AVR32_USBB_UESTA1_SHORTPACKET_SIZE 1 #define AVR32_USBB_UESTA1_STALLEDI 6 #define AVR32_USBB_UESTA1_STALLEDI_MASK 0x00000040 #define AVR32_USBB_UESTA1_STALLEDI_OFFSET 6 #define AVR32_USBB_UESTA1_STALLEDI_SIZE 1 #define AVR32_USBB_UESTA1_TXINI 0 #define AVR32_USBB_UESTA1_TXINI_MASK 0x00000001 #define AVR32_USBB_UESTA1_TXINI_OFFSET 0 #define AVR32_USBB_UESTA1_TXINI_SIZE 1 #define AVR32_USBB_UESTA2 0x00000138 #define AVR32_USBB_UESTA2CLR 0x00000168 #define AVR32_USBB_UESTA2CLR_NAKINIC 4 #define AVR32_USBB_UESTA2CLR_NAKINIC_MASK 0x00000010 #define AVR32_USBB_UESTA2CLR_NAKINIC_OFFSET 4 #define AVR32_USBB_UESTA2CLR_NAKINIC_SIZE 1 #define AVR32_USBB_UESTA2CLR_NAKOUTIC 3 #define AVR32_USBB_UESTA2CLR_NAKOUTIC_MASK 0x00000008 #define AVR32_USBB_UESTA2CLR_NAKOUTIC_OFFSET 3 #define AVR32_USBB_UESTA2CLR_NAKOUTIC_SIZE 1 #define AVR32_USBB_UESTA2CLR_OVERFIC 5 #define AVR32_USBB_UESTA2CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UESTA2CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UESTA2CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UESTA2CLR_RXOUTIC 1 #define AVR32_USBB_UESTA2CLR_RXOUTIC_MASK 0x00000002 #define AVR32_USBB_UESTA2CLR_RXOUTIC_OFFSET 1 #define AVR32_USBB_UESTA2CLR_RXOUTIC_SIZE 1 #define AVR32_USBB_UESTA2CLR_RXSTPIC 2 #define AVR32_USBB_UESTA2CLR_RXSTPIC_MASK 0x00000004 #define AVR32_USBB_UESTA2CLR_RXSTPIC_OFFSET 2 #define AVR32_USBB_UESTA2CLR_RXSTPIC_SIZE 1 #define AVR32_USBB_UESTA2CLR_SHORTPACKETC 7 #define AVR32_USBB_UESTA2CLR_SHORTPACKETC_MASK 0x00000080 #define AVR32_USBB_UESTA2CLR_SHORTPACKETC_OFFSET 7 #define AVR32_USBB_UESTA2CLR_SHORTPACKETC_SIZE 1 #define AVR32_USBB_UESTA2CLR_STALLEDIC 6 #define AVR32_USBB_UESTA2CLR_STALLEDIC_MASK 0x00000040 #define AVR32_USBB_UESTA2CLR_STALLEDIC_OFFSET 6 #define AVR32_USBB_UESTA2CLR_STALLEDIC_SIZE 1 #define AVR32_USBB_UESTA2CLR_TXINIC 0 #define AVR32_USBB_UESTA2CLR_TXINIC_MASK 0x00000001 #define AVR32_USBB_UESTA2CLR_TXINIC_OFFSET 0 #define AVR32_USBB_UESTA2CLR_TXINIC_SIZE 1 #define AVR32_USBB_UESTA2SET 0x00000198 #define AVR32_USBB_UESTA2SET_ERRORTRANSS 10 #define AVR32_USBB_UESTA2SET_ERRORTRANSS_MASK 0x00000400 #define AVR32_USBB_UESTA2SET_ERRORTRANSS_OFFSET 10 #define AVR32_USBB_UESTA2SET_ERRORTRANSS_SIZE 1 #define AVR32_USBB_UESTA2SET_NAKINIS 4 #define AVR32_USBB_UESTA2SET_NAKINIS_MASK 0x00000010 #define AVR32_USBB_UESTA2SET_NAKINIS_OFFSET 4 #define AVR32_USBB_UESTA2SET_NAKINIS_SIZE 1 #define AVR32_USBB_UESTA2SET_NAKOUTIS 3 #define AVR32_USBB_UESTA2SET_NAKOUTIS_MASK 0x00000008 #define AVR32_USBB_UESTA2SET_NAKOUTIS_OFFSET 3 #define AVR32_USBB_UESTA2SET_NAKOUTIS_SIZE 1 #define AVR32_USBB_UESTA2SET_NBUSYBKS 12 #define AVR32_USBB_UESTA2SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UESTA2SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UESTA2SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UESTA2SET_OVERFIS 5 #define AVR32_USBB_UESTA2SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UESTA2SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UESTA2SET_OVERFIS_SIZE 1 #define AVR32_USBB_UESTA2SET_RXOUTIS 1 #define AVR32_USBB_UESTA2SET_RXOUTIS_MASK 0x00000002 #define AVR32_USBB_UESTA2SET_RXOUTIS_OFFSET 1 #define AVR32_USBB_UESTA2SET_RXOUTIS_SIZE 1 #define AVR32_USBB_UESTA2SET_RXSTPIS 2 #define AVR32_USBB_UESTA2SET_RXSTPIS_MASK 0x00000004 #define AVR32_USBB_UESTA2SET_RXSTPIS_OFFSET 2 #define AVR32_USBB_UESTA2SET_RXSTPIS_SIZE 1 #define AVR32_USBB_UESTA2SET_SETMDATA 8 #define AVR32_USBB_UESTA2SET_SETMDATA_MASK 0x00000100 #define AVR32_USBB_UESTA2SET_SETMDATA_OFFSET 8 #define AVR32_USBB_UESTA2SET_SETMDATA_SIZE 1 #define AVR32_USBB_UESTA2SET_SHORTPACKETS 7 #define AVR32_USBB_UESTA2SET_SHORTPACKETS_MASK 0x00000080 #define AVR32_USBB_UESTA2SET_SHORTPACKETS_OFFSET 7 #define AVR32_USBB_UESTA2SET_SHORTPACKETS_SIZE 1 #define AVR32_USBB_UESTA2SET_STALLEDIS 6 #define AVR32_USBB_UESTA2SET_STALLEDIS_MASK 0x00000040 #define AVR32_USBB_UESTA2SET_STALLEDIS_OFFSET 6 #define AVR32_USBB_UESTA2SET_STALLEDIS_SIZE 1 #define AVR32_USBB_UESTA2SET_TXINIS 0 #define AVR32_USBB_UESTA2SET_TXINIS_MASK 0x00000001 #define AVR32_USBB_UESTA2SET_TXINIS_OFFSET 0 #define AVR32_USBB_UESTA2SET_TXINIS_SIZE 1 #define AVR32_USBB_UESTA2_BYCT 20 #define AVR32_USBB_UESTA2_BYCT_MASK 0x7ff00000 #define AVR32_USBB_UESTA2_BYCT_OFFSET 20 #define AVR32_USBB_UESTA2_BYCT_SIZE 11 #define AVR32_USBB_UESTA2_CFGOK 18 #define AVR32_USBB_UESTA2_CFGOK_MASK 0x00040000 #define AVR32_USBB_UESTA2_CFGOK_OFFSET 18 #define AVR32_USBB_UESTA2_CFGOK_SIZE 1 #define AVR32_USBB_UESTA2_CTRLDIR 17 #define AVR32_USBB_UESTA2_CTRLDIR_IN 0x00000001 #define AVR32_USBB_UESTA2_CTRLDIR_MASK 0x00020000 #define AVR32_USBB_UESTA2_CTRLDIR_OFFSET 17 #define AVR32_USBB_UESTA2_CTRLDIR_OUT 0x00000000 #define AVR32_USBB_UESTA2_CTRLDIR_SIZE 1 #define AVR32_USBB_UESTA2_CURRBK 14 #define AVR32_USBB_UESTA2_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UESTA2_CURRBK_OFFSET 14 #define AVR32_USBB_UESTA2_CURRBK_SIZE 2 #define AVR32_USBB_UESTA2_DTSEQ 8 #define AVR32_USBB_UESTA2_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UESTA2_DTSEQ_OFFSET 8 #define AVR32_USBB_UESTA2_DTSEQ_SIZE 2 #define AVR32_USBB_UESTA2_ERRORTRANS 10 #define AVR32_USBB_UESTA2_ERRORTRANS_MASK 0x00000400 #define AVR32_USBB_UESTA2_ERRORTRANS_OFFSET 10 #define AVR32_USBB_UESTA2_ERRORTRANS_SIZE 1 #define AVR32_USBB_UESTA2_NAKINI 4 #define AVR32_USBB_UESTA2_NAKINI_MASK 0x00000010 #define AVR32_USBB_UESTA2_NAKINI_OFFSET 4 #define AVR32_USBB_UESTA2_NAKINI_SIZE 1 #define AVR32_USBB_UESTA2_NAKOUTI 3 #define AVR32_USBB_UESTA2_NAKOUTI_MASK 0x00000008 #define AVR32_USBB_UESTA2_NAKOUTI_OFFSET 3 #define AVR32_USBB_UESTA2_NAKOUTI_SIZE 1 #define AVR32_USBB_UESTA2_NBUSYBK 12 #define AVR32_USBB_UESTA2_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UESTA2_NBUSYBK_OFFSET 12 #define AVR32_USBB_UESTA2_NBUSYBK_SIZE 2 #define AVR32_USBB_UESTA2_OVERFI 5 #define AVR32_USBB_UESTA2_OVERFI_MASK 0x00000020 #define AVR32_USBB_UESTA2_OVERFI_OFFSET 5 #define AVR32_USBB_UESTA2_OVERFI_SIZE 1 #define AVR32_USBB_UESTA2_RWALL 16 #define AVR32_USBB_UESTA2_RWALL_MASK 0x00010000 #define AVR32_USBB_UESTA2_RWALL_OFFSET 16 #define AVR32_USBB_UESTA2_RWALL_SIZE 1 #define AVR32_USBB_UESTA2_RXOUTI 1 #define AVR32_USBB_UESTA2_RXOUTI_MASK 0x00000002 #define AVR32_USBB_UESTA2_RXOUTI_OFFSET 1 #define AVR32_USBB_UESTA2_RXOUTI_SIZE 1 #define AVR32_USBB_UESTA2_RXSTPI 2 #define AVR32_USBB_UESTA2_RXSTPI_MASK 0x00000004 #define AVR32_USBB_UESTA2_RXSTPI_OFFSET 2 #define AVR32_USBB_UESTA2_RXSTPI_SIZE 1 #define AVR32_USBB_UESTA2_SHORTPACKET 7 #define AVR32_USBB_UESTA2_SHORTPACKET_MASK 0x00000080 #define AVR32_USBB_UESTA2_SHORTPACKET_OFFSET 7 #define AVR32_USBB_UESTA2_SHORTPACKET_SIZE 1 #define AVR32_USBB_UESTA2_STALLEDI 6 #define AVR32_USBB_UESTA2_STALLEDI_MASK 0x00000040 #define AVR32_USBB_UESTA2_STALLEDI_OFFSET 6 #define AVR32_USBB_UESTA2_STALLEDI_SIZE 1 #define AVR32_USBB_UESTA2_TXINI 0 #define AVR32_USBB_UESTA2_TXINI_MASK 0x00000001 #define AVR32_USBB_UESTA2_TXINI_OFFSET 0 #define AVR32_USBB_UESTA2_TXINI_SIZE 1 #define AVR32_USBB_UESTA3 0x0000013c #define AVR32_USBB_UESTA3CLR 0x0000016c #define AVR32_USBB_UESTA3CLR_NAKINIC 4 #define AVR32_USBB_UESTA3CLR_NAKINIC_MASK 0x00000010 #define AVR32_USBB_UESTA3CLR_NAKINIC_OFFSET 4 #define AVR32_USBB_UESTA3CLR_NAKINIC_SIZE 1 #define AVR32_USBB_UESTA3CLR_NAKOUTIC 3 #define AVR32_USBB_UESTA3CLR_NAKOUTIC_MASK 0x00000008 #define AVR32_USBB_UESTA3CLR_NAKOUTIC_OFFSET 3 #define AVR32_USBB_UESTA3CLR_NAKOUTIC_SIZE 1 #define AVR32_USBB_UESTA3CLR_OVERFIC 5 #define AVR32_USBB_UESTA3CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UESTA3CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UESTA3CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UESTA3CLR_RXOUTIC 1 #define AVR32_USBB_UESTA3CLR_RXOUTIC_MASK 0x00000002 #define AVR32_USBB_UESTA3CLR_RXOUTIC_OFFSET 1 #define AVR32_USBB_UESTA3CLR_RXOUTIC_SIZE 1 #define AVR32_USBB_UESTA3CLR_RXSTPIC 2 #define AVR32_USBB_UESTA3CLR_RXSTPIC_MASK 0x00000004 #define AVR32_USBB_UESTA3CLR_RXSTPIC_OFFSET 2 #define AVR32_USBB_UESTA3CLR_RXSTPIC_SIZE 1 #define AVR32_USBB_UESTA3CLR_SHORTPACKETC 7 #define AVR32_USBB_UESTA3CLR_SHORTPACKETC_MASK 0x00000080 #define AVR32_USBB_UESTA3CLR_SHORTPACKETC_OFFSET 7 #define AVR32_USBB_UESTA3CLR_SHORTPACKETC_SIZE 1 #define AVR32_USBB_UESTA3CLR_STALLEDIC 6 #define AVR32_USBB_UESTA3CLR_STALLEDIC_MASK 0x00000040 #define AVR32_USBB_UESTA3CLR_STALLEDIC_OFFSET 6 #define AVR32_USBB_UESTA3CLR_STALLEDIC_SIZE 1 #define AVR32_USBB_UESTA3CLR_TXINIC 0 #define AVR32_USBB_UESTA3CLR_TXINIC_MASK 0x00000001 #define AVR32_USBB_UESTA3CLR_TXINIC_OFFSET 0 #define AVR32_USBB_UESTA3CLR_TXINIC_SIZE 1 #define AVR32_USBB_UESTA3SET 0x0000019c #define AVR32_USBB_UESTA3SET_ERRORTRANSS 10 #define AVR32_USBB_UESTA3SET_ERRORTRANSS_MASK 0x00000400 #define AVR32_USBB_UESTA3SET_ERRORTRANSS_OFFSET 10 #define AVR32_USBB_UESTA3SET_ERRORTRANSS_SIZE 1 #define AVR32_USBB_UESTA3SET_NAKINIS 4 #define AVR32_USBB_UESTA3SET_NAKINIS_MASK 0x00000010 #define AVR32_USBB_UESTA3SET_NAKINIS_OFFSET 4 #define AVR32_USBB_UESTA3SET_NAKINIS_SIZE 1 #define AVR32_USBB_UESTA3SET_NAKOUTIS 3 #define AVR32_USBB_UESTA3SET_NAKOUTIS_MASK 0x00000008 #define AVR32_USBB_UESTA3SET_NAKOUTIS_OFFSET 3 #define AVR32_USBB_UESTA3SET_NAKOUTIS_SIZE 1 #define AVR32_USBB_UESTA3SET_NBUSYBKS 12 #define AVR32_USBB_UESTA3SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UESTA3SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UESTA3SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UESTA3SET_OVERFIS 5 #define AVR32_USBB_UESTA3SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UESTA3SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UESTA3SET_OVERFIS_SIZE 1 #define AVR32_USBB_UESTA3SET_RXOUTIS 1 #define AVR32_USBB_UESTA3SET_RXOUTIS_MASK 0x00000002 #define AVR32_USBB_UESTA3SET_RXOUTIS_OFFSET 1 #define AVR32_USBB_UESTA3SET_RXOUTIS_SIZE 1 #define AVR32_USBB_UESTA3SET_RXSTPIS 2 #define AVR32_USBB_UESTA3SET_RXSTPIS_MASK 0x00000004 #define AVR32_USBB_UESTA3SET_RXSTPIS_OFFSET 2 #define AVR32_USBB_UESTA3SET_RXSTPIS_SIZE 1 #define AVR32_USBB_UESTA3SET_SETMDATA 8 #define AVR32_USBB_UESTA3SET_SETMDATA_MASK 0x00000100 #define AVR32_USBB_UESTA3SET_SETMDATA_OFFSET 8 #define AVR32_USBB_UESTA3SET_SETMDATA_SIZE 1 #define AVR32_USBB_UESTA3SET_SHORTPACKETS 7 #define AVR32_USBB_UESTA3SET_SHORTPACKETS_MASK 0x00000080 #define AVR32_USBB_UESTA3SET_SHORTPACKETS_OFFSET 7 #define AVR32_USBB_UESTA3SET_SHORTPACKETS_SIZE 1 #define AVR32_USBB_UESTA3SET_STALLEDIS 6 #define AVR32_USBB_UESTA3SET_STALLEDIS_MASK 0x00000040 #define AVR32_USBB_UESTA3SET_STALLEDIS_OFFSET 6 #define AVR32_USBB_UESTA3SET_STALLEDIS_SIZE 1 #define AVR32_USBB_UESTA3SET_TXINIS 0 #define AVR32_USBB_UESTA3SET_TXINIS_MASK 0x00000001 #define AVR32_USBB_UESTA3SET_TXINIS_OFFSET 0 #define AVR32_USBB_UESTA3SET_TXINIS_SIZE 1 #define AVR32_USBB_UESTA3_BYCT 20 #define AVR32_USBB_UESTA3_BYCT_MASK 0x7ff00000 #define AVR32_USBB_UESTA3_BYCT_OFFSET 20 #define AVR32_USBB_UESTA3_BYCT_SIZE 11 #define AVR32_USBB_UESTA3_CFGOK 18 #define AVR32_USBB_UESTA3_CFGOK_MASK 0x00040000 #define AVR32_USBB_UESTA3_CFGOK_OFFSET 18 #define AVR32_USBB_UESTA3_CFGOK_SIZE 1 #define AVR32_USBB_UESTA3_CTRLDIR 17 #define AVR32_USBB_UESTA3_CTRLDIR_IN 0x00000001 #define AVR32_USBB_UESTA3_CTRLDIR_MASK 0x00020000 #define AVR32_USBB_UESTA3_CTRLDIR_OFFSET 17 #define AVR32_USBB_UESTA3_CTRLDIR_OUT 0x00000000 #define AVR32_USBB_UESTA3_CTRLDIR_SIZE 1 #define AVR32_USBB_UESTA3_CURRBK 14 #define AVR32_USBB_UESTA3_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UESTA3_CURRBK_OFFSET 14 #define AVR32_USBB_UESTA3_CURRBK_SIZE 2 #define AVR32_USBB_UESTA3_DTSEQ 8 #define AVR32_USBB_UESTA3_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UESTA3_DTSEQ_OFFSET 8 #define AVR32_USBB_UESTA3_DTSEQ_SIZE 2 #define AVR32_USBB_UESTA3_ERRORTRANS 10 #define AVR32_USBB_UESTA3_ERRORTRANS_MASK 0x00000400 #define AVR32_USBB_UESTA3_ERRORTRANS_OFFSET 10 #define AVR32_USBB_UESTA3_ERRORTRANS_SIZE 1 #define AVR32_USBB_UESTA3_NAKINI 4 #define AVR32_USBB_UESTA3_NAKINI_MASK 0x00000010 #define AVR32_USBB_UESTA3_NAKINI_OFFSET 4 #define AVR32_USBB_UESTA3_NAKINI_SIZE 1 #define AVR32_USBB_UESTA3_NAKOUTI 3 #define AVR32_USBB_UESTA3_NAKOUTI_MASK 0x00000008 #define AVR32_USBB_UESTA3_NAKOUTI_OFFSET 3 #define AVR32_USBB_UESTA3_NAKOUTI_SIZE 1 #define AVR32_USBB_UESTA3_NBUSYBK 12 #define AVR32_USBB_UESTA3_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UESTA3_NBUSYBK_OFFSET 12 #define AVR32_USBB_UESTA3_NBUSYBK_SIZE 2 #define AVR32_USBB_UESTA3_OVERFI 5 #define AVR32_USBB_UESTA3_OVERFI_MASK 0x00000020 #define AVR32_USBB_UESTA3_OVERFI_OFFSET 5 #define AVR32_USBB_UESTA3_OVERFI_SIZE 1 #define AVR32_USBB_UESTA3_RWALL 16 #define AVR32_USBB_UESTA3_RWALL_MASK 0x00010000 #define AVR32_USBB_UESTA3_RWALL_OFFSET 16 #define AVR32_USBB_UESTA3_RWALL_SIZE 1 #define AVR32_USBB_UESTA3_RXOUTI 1 #define AVR32_USBB_UESTA3_RXOUTI_MASK 0x00000002 #define AVR32_USBB_UESTA3_RXOUTI_OFFSET 1 #define AVR32_USBB_UESTA3_RXOUTI_SIZE 1 #define AVR32_USBB_UESTA3_RXSTPI 2 #define AVR32_USBB_UESTA3_RXSTPI_MASK 0x00000004 #define AVR32_USBB_UESTA3_RXSTPI_OFFSET 2 #define AVR32_USBB_UESTA3_RXSTPI_SIZE 1 #define AVR32_USBB_UESTA3_SHORTPACKET 7 #define AVR32_USBB_UESTA3_SHORTPACKET_MASK 0x00000080 #define AVR32_USBB_UESTA3_SHORTPACKET_OFFSET 7 #define AVR32_USBB_UESTA3_SHORTPACKET_SIZE 1 #define AVR32_USBB_UESTA3_STALLEDI 6 #define AVR32_USBB_UESTA3_STALLEDI_MASK 0x00000040 #define AVR32_USBB_UESTA3_STALLEDI_OFFSET 6 #define AVR32_USBB_UESTA3_STALLEDI_SIZE 1 #define AVR32_USBB_UESTA3_TXINI 0 #define AVR32_USBB_UESTA3_TXINI_MASK 0x00000001 #define AVR32_USBB_UESTA3_TXINI_OFFSET 0 #define AVR32_USBB_UESTA3_TXINI_SIZE 1 #define AVR32_USBB_UESTA4 0x00000140 #define AVR32_USBB_UESTA4CLR 0x00000170 #define AVR32_USBB_UESTA4CLR_NAKINIC 4 #define AVR32_USBB_UESTA4CLR_NAKINIC_MASK 0x00000010 #define AVR32_USBB_UESTA4CLR_NAKINIC_OFFSET 4 #define AVR32_USBB_UESTA4CLR_NAKINIC_SIZE 1 #define AVR32_USBB_UESTA4CLR_NAKOUTIC 3 #define AVR32_USBB_UESTA4CLR_NAKOUTIC_MASK 0x00000008 #define AVR32_USBB_UESTA4CLR_NAKOUTIC_OFFSET 3 #define AVR32_USBB_UESTA4CLR_NAKOUTIC_SIZE 1 #define AVR32_USBB_UESTA4CLR_OVERFIC 5 #define AVR32_USBB_UESTA4CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UESTA4CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UESTA4CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UESTA4CLR_RXOUTIC 1 #define AVR32_USBB_UESTA4CLR_RXOUTIC_MASK 0x00000002 #define AVR32_USBB_UESTA4CLR_RXOUTIC_OFFSET 1 #define AVR32_USBB_UESTA4CLR_RXOUTIC_SIZE 1 #define AVR32_USBB_UESTA4CLR_RXSTPIC 2 #define AVR32_USBB_UESTA4CLR_RXSTPIC_MASK 0x00000004 #define AVR32_USBB_UESTA4CLR_RXSTPIC_OFFSET 2 #define AVR32_USBB_UESTA4CLR_RXSTPIC_SIZE 1 #define AVR32_USBB_UESTA4CLR_SHORTPACKETC 7 #define AVR32_USBB_UESTA4CLR_SHORTPACKETC_MASK 0x00000080 #define AVR32_USBB_UESTA4CLR_SHORTPACKETC_OFFSET 7 #define AVR32_USBB_UESTA4CLR_SHORTPACKETC_SIZE 1 #define AVR32_USBB_UESTA4CLR_STALLEDIC 6 #define AVR32_USBB_UESTA4CLR_STALLEDIC_MASK 0x00000040 #define AVR32_USBB_UESTA4CLR_STALLEDIC_OFFSET 6 #define AVR32_USBB_UESTA4CLR_STALLEDIC_SIZE 1 #define AVR32_USBB_UESTA4CLR_TXINIC 0 #define AVR32_USBB_UESTA4CLR_TXINIC_MASK 0x00000001 #define AVR32_USBB_UESTA4CLR_TXINIC_OFFSET 0 #define AVR32_USBB_UESTA4CLR_TXINIC_SIZE 1 #define AVR32_USBB_UESTA4SET 0x000001a0 #define AVR32_USBB_UESTA4SET_ERRORTRANSS 10 #define AVR32_USBB_UESTA4SET_ERRORTRANSS_MASK 0x00000400 #define AVR32_USBB_UESTA4SET_ERRORTRANSS_OFFSET 10 #define AVR32_USBB_UESTA4SET_ERRORTRANSS_SIZE 1 #define AVR32_USBB_UESTA4SET_NAKINIS 4 #define AVR32_USBB_UESTA4SET_NAKINIS_MASK 0x00000010 #define AVR32_USBB_UESTA4SET_NAKINIS_OFFSET 4 #define AVR32_USBB_UESTA4SET_NAKINIS_SIZE 1 #define AVR32_USBB_UESTA4SET_NAKOUTIS 3 #define AVR32_USBB_UESTA4SET_NAKOUTIS_MASK 0x00000008 #define AVR32_USBB_UESTA4SET_NAKOUTIS_OFFSET 3 #define AVR32_USBB_UESTA4SET_NAKOUTIS_SIZE 1 #define AVR32_USBB_UESTA4SET_NBUSYBKS 12 #define AVR32_USBB_UESTA4SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UESTA4SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UESTA4SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UESTA4SET_OVERFIS 5 #define AVR32_USBB_UESTA4SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UESTA4SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UESTA4SET_OVERFIS_SIZE 1 #define AVR32_USBB_UESTA4SET_RXOUTIS 1 #define AVR32_USBB_UESTA4SET_RXOUTIS_MASK 0x00000002 #define AVR32_USBB_UESTA4SET_RXOUTIS_OFFSET 1 #define AVR32_USBB_UESTA4SET_RXOUTIS_SIZE 1 #define AVR32_USBB_UESTA4SET_RXSTPIS 2 #define AVR32_USBB_UESTA4SET_RXSTPIS_MASK 0x00000004 #define AVR32_USBB_UESTA4SET_RXSTPIS_OFFSET 2 #define AVR32_USBB_UESTA4SET_RXSTPIS_SIZE 1 #define AVR32_USBB_UESTA4SET_SETMDATA 8 #define AVR32_USBB_UESTA4SET_SETMDATA_MASK 0x00000100 #define AVR32_USBB_UESTA4SET_SETMDATA_OFFSET 8 #define AVR32_USBB_UESTA4SET_SETMDATA_SIZE 1 #define AVR32_USBB_UESTA4SET_SHORTPACKETS 7 #define AVR32_USBB_UESTA4SET_SHORTPACKETS_MASK 0x00000080 #define AVR32_USBB_UESTA4SET_SHORTPACKETS_OFFSET 7 #define AVR32_USBB_UESTA4SET_SHORTPACKETS_SIZE 1 #define AVR32_USBB_UESTA4SET_STALLEDIS 6 #define AVR32_USBB_UESTA4SET_STALLEDIS_MASK 0x00000040 #define AVR32_USBB_UESTA4SET_STALLEDIS_OFFSET 6 #define AVR32_USBB_UESTA4SET_STALLEDIS_SIZE 1 #define AVR32_USBB_UESTA4SET_TXINIS 0 #define AVR32_USBB_UESTA4SET_TXINIS_MASK 0x00000001 #define AVR32_USBB_UESTA4SET_TXINIS_OFFSET 0 #define AVR32_USBB_UESTA4SET_TXINIS_SIZE 1 #define AVR32_USBB_UESTA4_BYCT 20 #define AVR32_USBB_UESTA4_BYCT_MASK 0x7ff00000 #define AVR32_USBB_UESTA4_BYCT_OFFSET 20 #define AVR32_USBB_UESTA4_BYCT_SIZE 11 #define AVR32_USBB_UESTA4_CFGOK 18 #define AVR32_USBB_UESTA4_CFGOK_MASK 0x00040000 #define AVR32_USBB_UESTA4_CFGOK_OFFSET 18 #define AVR32_USBB_UESTA4_CFGOK_SIZE 1 #define AVR32_USBB_UESTA4_CTRLDIR 17 #define AVR32_USBB_UESTA4_CTRLDIR_IN 0x00000001 #define AVR32_USBB_UESTA4_CTRLDIR_MASK 0x00020000 #define AVR32_USBB_UESTA4_CTRLDIR_OFFSET 17 #define AVR32_USBB_UESTA4_CTRLDIR_OUT 0x00000000 #define AVR32_USBB_UESTA4_CTRLDIR_SIZE 1 #define AVR32_USBB_UESTA4_CURRBK 14 #define AVR32_USBB_UESTA4_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UESTA4_CURRBK_OFFSET 14 #define AVR32_USBB_UESTA4_CURRBK_SIZE 2 #define AVR32_USBB_UESTA4_DTSEQ 8 #define AVR32_USBB_UESTA4_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UESTA4_DTSEQ_OFFSET 8 #define AVR32_USBB_UESTA4_DTSEQ_SIZE 2 #define AVR32_USBB_UESTA4_ERRORTRANS 10 #define AVR32_USBB_UESTA4_ERRORTRANS_MASK 0x00000400 #define AVR32_USBB_UESTA4_ERRORTRANS_OFFSET 10 #define AVR32_USBB_UESTA4_ERRORTRANS_SIZE 1 #define AVR32_USBB_UESTA4_NAKINI 4 #define AVR32_USBB_UESTA4_NAKINI_MASK 0x00000010 #define AVR32_USBB_UESTA4_NAKINI_OFFSET 4 #define AVR32_USBB_UESTA4_NAKINI_SIZE 1 #define AVR32_USBB_UESTA4_NAKOUTI 3 #define AVR32_USBB_UESTA4_NAKOUTI_MASK 0x00000008 #define AVR32_USBB_UESTA4_NAKOUTI_OFFSET 3 #define AVR32_USBB_UESTA4_NAKOUTI_SIZE 1 #define AVR32_USBB_UESTA4_NBUSYBK 12 #define AVR32_USBB_UESTA4_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UESTA4_NBUSYBK_OFFSET 12 #define AVR32_USBB_UESTA4_NBUSYBK_SIZE 2 #define AVR32_USBB_UESTA4_OVERFI 5 #define AVR32_USBB_UESTA4_OVERFI_MASK 0x00000020 #define AVR32_USBB_UESTA4_OVERFI_OFFSET 5 #define AVR32_USBB_UESTA4_OVERFI_SIZE 1 #define AVR32_USBB_UESTA4_RWALL 16 #define AVR32_USBB_UESTA4_RWALL_MASK 0x00010000 #define AVR32_USBB_UESTA4_RWALL_OFFSET 16 #define AVR32_USBB_UESTA4_RWALL_SIZE 1 #define AVR32_USBB_UESTA4_RXOUTI 1 #define AVR32_USBB_UESTA4_RXOUTI_MASK 0x00000002 #define AVR32_USBB_UESTA4_RXOUTI_OFFSET 1 #define AVR32_USBB_UESTA4_RXOUTI_SIZE 1 #define AVR32_USBB_UESTA4_RXSTPI 2 #define AVR32_USBB_UESTA4_RXSTPI_MASK 0x00000004 #define AVR32_USBB_UESTA4_RXSTPI_OFFSET 2 #define AVR32_USBB_UESTA4_RXSTPI_SIZE 1 #define AVR32_USBB_UESTA4_SHORTPACKET 7 #define AVR32_USBB_UESTA4_SHORTPACKET_MASK 0x00000080 #define AVR32_USBB_UESTA4_SHORTPACKET_OFFSET 7 #define AVR32_USBB_UESTA4_SHORTPACKET_SIZE 1 #define AVR32_USBB_UESTA4_STALLEDI 6 #define AVR32_USBB_UESTA4_STALLEDI_MASK 0x00000040 #define AVR32_USBB_UESTA4_STALLEDI_OFFSET 6 #define AVR32_USBB_UESTA4_STALLEDI_SIZE 1 #define AVR32_USBB_UESTA4_TXINI 0 #define AVR32_USBB_UESTA4_TXINI_MASK 0x00000001 #define AVR32_USBB_UESTA4_TXINI_OFFSET 0 #define AVR32_USBB_UESTA4_TXINI_SIZE 1 #define AVR32_USBB_UESTA5 0x00000144 #define AVR32_USBB_UESTA5CLR 0x00000174 #define AVR32_USBB_UESTA5CLR_NAKINIC 4 #define AVR32_USBB_UESTA5CLR_NAKINIC_MASK 0x00000010 #define AVR32_USBB_UESTA5CLR_NAKINIC_OFFSET 4 #define AVR32_USBB_UESTA5CLR_NAKINIC_SIZE 1 #define AVR32_USBB_UESTA5CLR_NAKOUTIC 3 #define AVR32_USBB_UESTA5CLR_NAKOUTIC_MASK 0x00000008 #define AVR32_USBB_UESTA5CLR_NAKOUTIC_OFFSET 3 #define AVR32_USBB_UESTA5CLR_NAKOUTIC_SIZE 1 #define AVR32_USBB_UESTA5CLR_OVERFIC 5 #define AVR32_USBB_UESTA5CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UESTA5CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UESTA5CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UESTA5CLR_RXOUTIC 1 #define AVR32_USBB_UESTA5CLR_RXOUTIC_MASK 0x00000002 #define AVR32_USBB_UESTA5CLR_RXOUTIC_OFFSET 1 #define AVR32_USBB_UESTA5CLR_RXOUTIC_SIZE 1 #define AVR32_USBB_UESTA5CLR_RXSTPIC 2 #define AVR32_USBB_UESTA5CLR_RXSTPIC_MASK 0x00000004 #define AVR32_USBB_UESTA5CLR_RXSTPIC_OFFSET 2 #define AVR32_USBB_UESTA5CLR_RXSTPIC_SIZE 1 #define AVR32_USBB_UESTA5CLR_SHORTPACKETC 7 #define AVR32_USBB_UESTA5CLR_SHORTPACKETC_MASK 0x00000080 #define AVR32_USBB_UESTA5CLR_SHORTPACKETC_OFFSET 7 #define AVR32_USBB_UESTA5CLR_SHORTPACKETC_SIZE 1 #define AVR32_USBB_UESTA5CLR_STALLEDIC 6 #define AVR32_USBB_UESTA5CLR_STALLEDIC_MASK 0x00000040 #define AVR32_USBB_UESTA5CLR_STALLEDIC_OFFSET 6 #define AVR32_USBB_UESTA5CLR_STALLEDIC_SIZE 1 #define AVR32_USBB_UESTA5CLR_TXINIC 0 #define AVR32_USBB_UESTA5CLR_TXINIC_MASK 0x00000001 #define AVR32_USBB_UESTA5CLR_TXINIC_OFFSET 0 #define AVR32_USBB_UESTA5CLR_TXINIC_SIZE 1 #define AVR32_USBB_UESTA5SET 0x000001a4 #define AVR32_USBB_UESTA5SET_ERRORTRANSS 10 #define AVR32_USBB_UESTA5SET_ERRORTRANSS_MASK 0x00000400 #define AVR32_USBB_UESTA5SET_ERRORTRANSS_OFFSET 10 #define AVR32_USBB_UESTA5SET_ERRORTRANSS_SIZE 1 #define AVR32_USBB_UESTA5SET_NAKINIS 4 #define AVR32_USBB_UESTA5SET_NAKINIS_MASK 0x00000010 #define AVR32_USBB_UESTA5SET_NAKINIS_OFFSET 4 #define AVR32_USBB_UESTA5SET_NAKINIS_SIZE 1 #define AVR32_USBB_UESTA5SET_NAKOUTIS 3 #define AVR32_USBB_UESTA5SET_NAKOUTIS_MASK 0x00000008 #define AVR32_USBB_UESTA5SET_NAKOUTIS_OFFSET 3 #define AVR32_USBB_UESTA5SET_NAKOUTIS_SIZE 1 #define AVR32_USBB_UESTA5SET_NBUSYBKS 12 #define AVR32_USBB_UESTA5SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UESTA5SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UESTA5SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UESTA5SET_OVERFIS 5 #define AVR32_USBB_UESTA5SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UESTA5SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UESTA5SET_OVERFIS_SIZE 1 #define AVR32_USBB_UESTA5SET_RXOUTIS 1 #define AVR32_USBB_UESTA5SET_RXOUTIS_MASK 0x00000002 #define AVR32_USBB_UESTA5SET_RXOUTIS_OFFSET 1 #define AVR32_USBB_UESTA5SET_RXOUTIS_SIZE 1 #define AVR32_USBB_UESTA5SET_RXSTPIS 2 #define AVR32_USBB_UESTA5SET_RXSTPIS_MASK 0x00000004 #define AVR32_USBB_UESTA5SET_RXSTPIS_OFFSET 2 #define AVR32_USBB_UESTA5SET_RXSTPIS_SIZE 1 #define AVR32_USBB_UESTA5SET_SETMDATA 8 #define AVR32_USBB_UESTA5SET_SETMDATA_MASK 0x00000100 #define AVR32_USBB_UESTA5SET_SETMDATA_OFFSET 8 #define AVR32_USBB_UESTA5SET_SETMDATA_SIZE 1 #define AVR32_USBB_UESTA5SET_SHORTPACKETS 7 #define AVR32_USBB_UESTA5SET_SHORTPACKETS_MASK 0x00000080 #define AVR32_USBB_UESTA5SET_SHORTPACKETS_OFFSET 7 #define AVR32_USBB_UESTA5SET_SHORTPACKETS_SIZE 1 #define AVR32_USBB_UESTA5SET_STALLEDIS 6 #define AVR32_USBB_UESTA5SET_STALLEDIS_MASK 0x00000040 #define AVR32_USBB_UESTA5SET_STALLEDIS_OFFSET 6 #define AVR32_USBB_UESTA5SET_STALLEDIS_SIZE 1 #define AVR32_USBB_UESTA5SET_TXINIS 0 #define AVR32_USBB_UESTA5SET_TXINIS_MASK 0x00000001 #define AVR32_USBB_UESTA5SET_TXINIS_OFFSET 0 #define AVR32_USBB_UESTA5SET_TXINIS_SIZE 1 #define AVR32_USBB_UESTA5_BYCT 20 #define AVR32_USBB_UESTA5_BYCT_MASK 0x7ff00000 #define AVR32_USBB_UESTA5_BYCT_OFFSET 20 #define AVR32_USBB_UESTA5_BYCT_SIZE 11 #define AVR32_USBB_UESTA5_CFGOK 18 #define AVR32_USBB_UESTA5_CFGOK_MASK 0x00040000 #define AVR32_USBB_UESTA5_CFGOK_OFFSET 18 #define AVR32_USBB_UESTA5_CFGOK_SIZE 1 #define AVR32_USBB_UESTA5_CTRLDIR 17 #define AVR32_USBB_UESTA5_CTRLDIR_IN 0x00000001 #define AVR32_USBB_UESTA5_CTRLDIR_MASK 0x00020000 #define AVR32_USBB_UESTA5_CTRLDIR_OFFSET 17 #define AVR32_USBB_UESTA5_CTRLDIR_OUT 0x00000000 #define AVR32_USBB_UESTA5_CTRLDIR_SIZE 1 #define AVR32_USBB_UESTA5_CURRBK 14 #define AVR32_USBB_UESTA5_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UESTA5_CURRBK_OFFSET 14 #define AVR32_USBB_UESTA5_CURRBK_SIZE 2 #define AVR32_USBB_UESTA5_DTSEQ 8 #define AVR32_USBB_UESTA5_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UESTA5_DTSEQ_OFFSET 8 #define AVR32_USBB_UESTA5_DTSEQ_SIZE 2 #define AVR32_USBB_UESTA5_ERRORTRANS 10 #define AVR32_USBB_UESTA5_ERRORTRANS_MASK 0x00000400 #define AVR32_USBB_UESTA5_ERRORTRANS_OFFSET 10 #define AVR32_USBB_UESTA5_ERRORTRANS_SIZE 1 #define AVR32_USBB_UESTA5_NAKINI 4 #define AVR32_USBB_UESTA5_NAKINI_MASK 0x00000010 #define AVR32_USBB_UESTA5_NAKINI_OFFSET 4 #define AVR32_USBB_UESTA5_NAKINI_SIZE 1 #define AVR32_USBB_UESTA5_NAKOUTI 3 #define AVR32_USBB_UESTA5_NAKOUTI_MASK 0x00000008 #define AVR32_USBB_UESTA5_NAKOUTI_OFFSET 3 #define AVR32_USBB_UESTA5_NAKOUTI_SIZE 1 #define AVR32_USBB_UESTA5_NBUSYBK 12 #define AVR32_USBB_UESTA5_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UESTA5_NBUSYBK_OFFSET 12 #define AVR32_USBB_UESTA5_NBUSYBK_SIZE 2 #define AVR32_USBB_UESTA5_OVERFI 5 #define AVR32_USBB_UESTA5_OVERFI_MASK 0x00000020 #define AVR32_USBB_UESTA5_OVERFI_OFFSET 5 #define AVR32_USBB_UESTA5_OVERFI_SIZE 1 #define AVR32_USBB_UESTA5_RWALL 16 #define AVR32_USBB_UESTA5_RWALL_MASK 0x00010000 #define AVR32_USBB_UESTA5_RWALL_OFFSET 16 #define AVR32_USBB_UESTA5_RWALL_SIZE 1 #define AVR32_USBB_UESTA5_RXOUTI 1 #define AVR32_USBB_UESTA5_RXOUTI_MASK 0x00000002 #define AVR32_USBB_UESTA5_RXOUTI_OFFSET 1 #define AVR32_USBB_UESTA5_RXOUTI_SIZE 1 #define AVR32_USBB_UESTA5_RXSTPI 2 #define AVR32_USBB_UESTA5_RXSTPI_MASK 0x00000004 #define AVR32_USBB_UESTA5_RXSTPI_OFFSET 2 #define AVR32_USBB_UESTA5_RXSTPI_SIZE 1 #define AVR32_USBB_UESTA5_SHORTPACKET 7 #define AVR32_USBB_UESTA5_SHORTPACKET_MASK 0x00000080 #define AVR32_USBB_UESTA5_SHORTPACKET_OFFSET 7 #define AVR32_USBB_UESTA5_SHORTPACKET_SIZE 1 #define AVR32_USBB_UESTA5_STALLEDI 6 #define AVR32_USBB_UESTA5_STALLEDI_MASK 0x00000040 #define AVR32_USBB_UESTA5_STALLEDI_OFFSET 6 #define AVR32_USBB_UESTA5_STALLEDI_SIZE 1 #define AVR32_USBB_UESTA5_TXINI 0 #define AVR32_USBB_UESTA5_TXINI_MASK 0x00000001 #define AVR32_USBB_UESTA5_TXINI_OFFSET 0 #define AVR32_USBB_UESTA5_TXINI_SIZE 1 #define AVR32_USBB_UESTA6 0x00000148 #define AVR32_USBB_UESTA6CLR 0x00000178 #define AVR32_USBB_UESTA6CLR_NAKINIC 4 #define AVR32_USBB_UESTA6CLR_NAKINIC_MASK 0x00000010 #define AVR32_USBB_UESTA6CLR_NAKINIC_OFFSET 4 #define AVR32_USBB_UESTA6CLR_NAKINIC_SIZE 1 #define AVR32_USBB_UESTA6CLR_NAKOUTIC 3 #define AVR32_USBB_UESTA6CLR_NAKOUTIC_MASK 0x00000008 #define AVR32_USBB_UESTA6CLR_NAKOUTIC_OFFSET 3 #define AVR32_USBB_UESTA6CLR_NAKOUTIC_SIZE 1 #define AVR32_USBB_UESTA6CLR_OVERFIC 5 #define AVR32_USBB_UESTA6CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UESTA6CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UESTA6CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UESTA6CLR_RXOUTIC 1 #define AVR32_USBB_UESTA6CLR_RXOUTIC_MASK 0x00000002 #define AVR32_USBB_UESTA6CLR_RXOUTIC_OFFSET 1 #define AVR32_USBB_UESTA6CLR_RXOUTIC_SIZE 1 #define AVR32_USBB_UESTA6CLR_RXSTPIC 2 #define AVR32_USBB_UESTA6CLR_RXSTPIC_MASK 0x00000004 #define AVR32_USBB_UESTA6CLR_RXSTPIC_OFFSET 2 #define AVR32_USBB_UESTA6CLR_RXSTPIC_SIZE 1 #define AVR32_USBB_UESTA6CLR_SHORTPACKETC 7 #define AVR32_USBB_UESTA6CLR_SHORTPACKETC_MASK 0x00000080 #define AVR32_USBB_UESTA6CLR_SHORTPACKETC_OFFSET 7 #define AVR32_USBB_UESTA6CLR_SHORTPACKETC_SIZE 1 #define AVR32_USBB_UESTA6CLR_STALLEDIC 6 #define AVR32_USBB_UESTA6CLR_STALLEDIC_MASK 0x00000040 #define AVR32_USBB_UESTA6CLR_STALLEDIC_OFFSET 6 #define AVR32_USBB_UESTA6CLR_STALLEDIC_SIZE 1 #define AVR32_USBB_UESTA6CLR_TXINIC 0 #define AVR32_USBB_UESTA6CLR_TXINIC_MASK 0x00000001 #define AVR32_USBB_UESTA6CLR_TXINIC_OFFSET 0 #define AVR32_USBB_UESTA6CLR_TXINIC_SIZE 1 #define AVR32_USBB_UESTA6SET 0x000001a8 #define AVR32_USBB_UESTA6SET_ERRORTRANSS 10 #define AVR32_USBB_UESTA6SET_ERRORTRANSS_MASK 0x00000400 #define AVR32_USBB_UESTA6SET_ERRORTRANSS_OFFSET 10 #define AVR32_USBB_UESTA6SET_ERRORTRANSS_SIZE 1 #define AVR32_USBB_UESTA6SET_NAKINIS 4 #define AVR32_USBB_UESTA6SET_NAKINIS_MASK 0x00000010 #define AVR32_USBB_UESTA6SET_NAKINIS_OFFSET 4 #define AVR32_USBB_UESTA6SET_NAKINIS_SIZE 1 #define AVR32_USBB_UESTA6SET_NAKOUTIS 3 #define AVR32_USBB_UESTA6SET_NAKOUTIS_MASK 0x00000008 #define AVR32_USBB_UESTA6SET_NAKOUTIS_OFFSET 3 #define AVR32_USBB_UESTA6SET_NAKOUTIS_SIZE 1 #define AVR32_USBB_UESTA6SET_NBUSYBKS 12 #define AVR32_USBB_UESTA6SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UESTA6SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UESTA6SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UESTA6SET_OVERFIS 5 #define AVR32_USBB_UESTA6SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UESTA6SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UESTA6SET_OVERFIS_SIZE 1 #define AVR32_USBB_UESTA6SET_RXOUTIS 1 #define AVR32_USBB_UESTA6SET_RXOUTIS_MASK 0x00000002 #define AVR32_USBB_UESTA6SET_RXOUTIS_OFFSET 1 #define AVR32_USBB_UESTA6SET_RXOUTIS_SIZE 1 #define AVR32_USBB_UESTA6SET_RXSTPIS 2 #define AVR32_USBB_UESTA6SET_RXSTPIS_MASK 0x00000004 #define AVR32_USBB_UESTA6SET_RXSTPIS_OFFSET 2 #define AVR32_USBB_UESTA6SET_RXSTPIS_SIZE 1 #define AVR32_USBB_UESTA6SET_SETMDATA 8 #define AVR32_USBB_UESTA6SET_SETMDATA_MASK 0x00000100 #define AVR32_USBB_UESTA6SET_SETMDATA_OFFSET 8 #define AVR32_USBB_UESTA6SET_SETMDATA_SIZE 1 #define AVR32_USBB_UESTA6SET_SHORTPACKETS 7 #define AVR32_USBB_UESTA6SET_SHORTPACKETS_MASK 0x00000080 #define AVR32_USBB_UESTA6SET_SHORTPACKETS_OFFSET 7 #define AVR32_USBB_UESTA6SET_SHORTPACKETS_SIZE 1 #define AVR32_USBB_UESTA6SET_STALLEDIS 6 #define AVR32_USBB_UESTA6SET_STALLEDIS_MASK 0x00000040 #define AVR32_USBB_UESTA6SET_STALLEDIS_OFFSET 6 #define AVR32_USBB_UESTA6SET_STALLEDIS_SIZE 1 #define AVR32_USBB_UESTA6SET_TXINIS 0 #define AVR32_USBB_UESTA6SET_TXINIS_MASK 0x00000001 #define AVR32_USBB_UESTA6SET_TXINIS_OFFSET 0 #define AVR32_USBB_UESTA6SET_TXINIS_SIZE 1 #define AVR32_USBB_UESTA6_BYCT 20 #define AVR32_USBB_UESTA6_BYCT_MASK 0x7ff00000 #define AVR32_USBB_UESTA6_BYCT_OFFSET 20 #define AVR32_USBB_UESTA6_BYCT_SIZE 11 #define AVR32_USBB_UESTA6_CFGOK 18 #define AVR32_USBB_UESTA6_CFGOK_MASK 0x00040000 #define AVR32_USBB_UESTA6_CFGOK_OFFSET 18 #define AVR32_USBB_UESTA6_CFGOK_SIZE 1 #define AVR32_USBB_UESTA6_CTRLDIR 17 #define AVR32_USBB_UESTA6_CTRLDIR_IN 0x00000001 #define AVR32_USBB_UESTA6_CTRLDIR_MASK 0x00020000 #define AVR32_USBB_UESTA6_CTRLDIR_OFFSET 17 #define AVR32_USBB_UESTA6_CTRLDIR_OUT 0x00000000 #define AVR32_USBB_UESTA6_CTRLDIR_SIZE 1 #define AVR32_USBB_UESTA6_CURRBK 14 #define AVR32_USBB_UESTA6_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UESTA6_CURRBK_OFFSET 14 #define AVR32_USBB_UESTA6_CURRBK_SIZE 2 #define AVR32_USBB_UESTA6_DTSEQ 8 #define AVR32_USBB_UESTA6_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UESTA6_DTSEQ_OFFSET 8 #define AVR32_USBB_UESTA6_DTSEQ_SIZE 2 #define AVR32_USBB_UESTA6_ERRORTRANS 10 #define AVR32_USBB_UESTA6_ERRORTRANS_MASK 0x00000400 #define AVR32_USBB_UESTA6_ERRORTRANS_OFFSET 10 #define AVR32_USBB_UESTA6_ERRORTRANS_SIZE 1 #define AVR32_USBB_UESTA6_NAKINI 4 #define AVR32_USBB_UESTA6_NAKINI_MASK 0x00000010 #define AVR32_USBB_UESTA6_NAKINI_OFFSET 4 #define AVR32_USBB_UESTA6_NAKINI_SIZE 1 #define AVR32_USBB_UESTA6_NAKOUTI 3 #define AVR32_USBB_UESTA6_NAKOUTI_MASK 0x00000008 #define AVR32_USBB_UESTA6_NAKOUTI_OFFSET 3 #define AVR32_USBB_UESTA6_NAKOUTI_SIZE 1 #define AVR32_USBB_UESTA6_NBUSYBK 12 #define AVR32_USBB_UESTA6_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UESTA6_NBUSYBK_OFFSET 12 #define AVR32_USBB_UESTA6_NBUSYBK_SIZE 2 #define AVR32_USBB_UESTA6_OVERFI 5 #define AVR32_USBB_UESTA6_OVERFI_MASK 0x00000020 #define AVR32_USBB_UESTA6_OVERFI_OFFSET 5 #define AVR32_USBB_UESTA6_OVERFI_SIZE 1 #define AVR32_USBB_UESTA6_RWALL 16 #define AVR32_USBB_UESTA6_RWALL_MASK 0x00010000 #define AVR32_USBB_UESTA6_RWALL_OFFSET 16 #define AVR32_USBB_UESTA6_RWALL_SIZE 1 #define AVR32_USBB_UESTA6_RXOUTI 1 #define AVR32_USBB_UESTA6_RXOUTI_MASK 0x00000002 #define AVR32_USBB_UESTA6_RXOUTI_OFFSET 1 #define AVR32_USBB_UESTA6_RXOUTI_SIZE 1 #define AVR32_USBB_UESTA6_RXSTPI 2 #define AVR32_USBB_UESTA6_RXSTPI_MASK 0x00000004 #define AVR32_USBB_UESTA6_RXSTPI_OFFSET 2 #define AVR32_USBB_UESTA6_RXSTPI_SIZE 1 #define AVR32_USBB_UESTA6_SHORTPACKET 7 #define AVR32_USBB_UESTA6_SHORTPACKET_MASK 0x00000080 #define AVR32_USBB_UESTA6_SHORTPACKET_OFFSET 7 #define AVR32_USBB_UESTA6_SHORTPACKET_SIZE 1 #define AVR32_USBB_UESTA6_STALLEDI 6 #define AVR32_USBB_UESTA6_STALLEDI_MASK 0x00000040 #define AVR32_USBB_UESTA6_STALLEDI_OFFSET 6 #define AVR32_USBB_UESTA6_STALLEDI_SIZE 1 #define AVR32_USBB_UESTA6_TXINI 0 #define AVR32_USBB_UESTA6_TXINI_MASK 0x00000001 #define AVR32_USBB_UESTA6_TXINI_OFFSET 0 #define AVR32_USBB_UESTA6_TXINI_SIZE 1 #define AVR32_USBB_UFEATURES 0x0000081c #define AVR32_USBB_UFEATURES_BYTE_WRITE_DPRAM 15 #define AVR32_USBB_UFEATURES_BYTE_WRITE_DPRAM_MASK 0x00008000 #define AVR32_USBB_UFEATURES_BYTE_WRITE_DPRAM_OFFSET 15 #define AVR32_USBB_UFEATURES_BYTE_WRITE_DPRAM_SIZE 1 #define AVR32_USBB_UFEATURES_DATA_BUS_8_16 16 #define AVR32_USBB_UFEATURES_DATA_BUS_8_16_MASK 0x00010000 #define AVR32_USBB_UFEATURES_DATA_BUS_8_16_OFFSET 16 #define AVR32_USBB_UFEATURES_DATA_BUS_8_16_SIZE 1 #define AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE 7 #define AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_16_BITS 0x00000000 #define AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_24_BITS 0x00000001 #define AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_MASK 0x00000080 #define AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_OFFSET 7 #define AVR32_USBB_UFEATURES_DMA_BUFFER_SIZE_SIZE 1 #define AVR32_USBB_UFEATURES_DMA_CHANNEL_NBR 4 #define AVR32_USBB_UFEATURES_DMA_CHANNEL_NBR_MASK 0x00000070 #define AVR32_USBB_UFEATURES_DMA_CHANNEL_NBR_OFFSET 4 #define AVR32_USBB_UFEATURES_DMA_CHANNEL_NBR_SIZE 3 #define AVR32_USBB_UFEATURES_DMA_FIFO_WORD_DEPTH 8 #define AVR32_USBB_UFEATURES_DMA_FIFO_WORD_DEPTH_MASK 0x00000f00 #define AVR32_USBB_UFEATURES_DMA_FIFO_WORD_DEPTH_OFFSET 8 #define AVR32_USBB_UFEATURES_DMA_FIFO_WORD_DEPTH_SIZE 4 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_1 17 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_10 26 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_10_MASK 0x04000000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_10_OFFSET 26 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_10_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_11 27 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_11_MASK 0x08000000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_11_OFFSET 27 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_11_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_12 28 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_12_MASK 0x10000000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_12_OFFSET 28 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_12_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_13 29 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_13_MASK 0x20000000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_13_OFFSET 29 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_13_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_14 30 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_14_MASK 0x40000000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_14_OFFSET 30 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_14_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_15 31 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_15_MASK 0x80000000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_15_OFFSET 31 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_15_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_1_MASK 0x00020000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_1_OFFSET 17 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_1_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_2 18 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_2_MASK 0x00040000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_2_OFFSET 18 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_2_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_3 19 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_3_MASK 0x00080000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_3_OFFSET 19 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_3_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_4 20 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_4_MASK 0x00100000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_4_OFFSET 20 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_4_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_5 21 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_5_MASK 0x00200000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_5_OFFSET 21 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_5_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_6 22 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_6_MASK 0x00400000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_6_OFFSET 22 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_6_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_7 23 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_7_MASK 0x00800000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_7_OFFSET 23 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_7_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_8 24 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_8_MASK 0x01000000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_8_OFFSET 24 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_8_SIZE 1 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_9 25 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_9_MASK 0x02000000 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_9_OFFSET 25 #define AVR32_USBB_UFEATURES_EN_HIGH_BD_ISO_EPT_9_SIZE 1 #define AVR32_USBB_UFEATURES_EPT_NBR_MAX 0 #define AVR32_USBB_UFEATURES_EPT_NBR_MAX_MASK 0x0000000f #define AVR32_USBB_UFEATURES_EPT_NBR_MAX_OFFSET 0 #define AVR32_USBB_UFEATURES_EPT_NBR_MAX_SIZE 4 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE 12 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_GE_16384 0x00000007 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_LT_1024 0x00000002 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_LT_16384 0x00000006 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_LT_2048 0x00000003 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_LT_256 0x00000000 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_LT_4096 0x00000004 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_LT_512 0x00000001 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_LT_8192 0x00000005 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_MASK 0x00007000 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_OFFSET 12 #define AVR32_USBB_UFEATURES_FIFO_MAX_SIZE_SIZE 3 #define AVR32_USBB_UHADDR1 0x00000424 #define AVR32_USBB_UHADDR1_UHADDR_P0 0 #define AVR32_USBB_UHADDR1_UHADDR_P0_MASK 0x0000007f #define AVR32_USBB_UHADDR1_UHADDR_P0_OFFSET 0 #define AVR32_USBB_UHADDR1_UHADDR_P0_SIZE 7 #define AVR32_USBB_UHADDR1_UHADDR_P1 8 #define AVR32_USBB_UHADDR1_UHADDR_P1_MASK 0x00007f00 #define AVR32_USBB_UHADDR1_UHADDR_P1_OFFSET 8 #define AVR32_USBB_UHADDR1_UHADDR_P1_SIZE 7 #define AVR32_USBB_UHADDR1_UHADDR_P2 16 #define AVR32_USBB_UHADDR1_UHADDR_P2_MASK 0x007f0000 #define AVR32_USBB_UHADDR1_UHADDR_P2_OFFSET 16 #define AVR32_USBB_UHADDR1_UHADDR_P2_SIZE 7 #define AVR32_USBB_UHADDR1_UHADDR_P3 24 #define AVR32_USBB_UHADDR1_UHADDR_P3_MASK 0x7f000000 #define AVR32_USBB_UHADDR1_UHADDR_P3_OFFSET 24 #define AVR32_USBB_UHADDR1_UHADDR_P3_SIZE 7 #define AVR32_USBB_UHADDR2 0x00000428 #define AVR32_USBB_UHADDR2_UHADDR_P4 0 #define AVR32_USBB_UHADDR2_UHADDR_P4_MASK 0x0000007f #define AVR32_USBB_UHADDR2_UHADDR_P4_OFFSET 0 #define AVR32_USBB_UHADDR2_UHADDR_P4_SIZE 7 #define AVR32_USBB_UHADDR2_UHADDR_P5 8 #define AVR32_USBB_UHADDR2_UHADDR_P5_MASK 0x00007f00 #define AVR32_USBB_UHADDR2_UHADDR_P5_OFFSET 8 #define AVR32_USBB_UHADDR2_UHADDR_P5_SIZE 7 #define AVR32_USBB_UHADDR2_UHADDR_P6 16 #define AVR32_USBB_UHADDR2_UHADDR_P6_MASK 0x007f0000 #define AVR32_USBB_UHADDR2_UHADDR_P6_OFFSET 16 #define AVR32_USBB_UHADDR2_UHADDR_P6_SIZE 7 #define AVR32_USBB_UHADDR2_UHADDR_P7 24 #define AVR32_USBB_UHADDR2_UHADDR_P7_MASK 0x7f000000 #define AVR32_USBB_UHADDR2_UHADDR_P7_OFFSET 24 #define AVR32_USBB_UHADDR2_UHADDR_P7_SIZE 7 #define AVR32_USBB_UHADDR3 0x0000042c #define AVR32_USBB_UHADDR3_UHADDR_P10 16 #define AVR32_USBB_UHADDR3_UHADDR_P10_MASK 0x007f0000 #define AVR32_USBB_UHADDR3_UHADDR_P10_OFFSET 16 #define AVR32_USBB_UHADDR3_UHADDR_P10_SIZE 7 #define AVR32_USBB_UHADDR3_UHADDR_P11 24 #define AVR32_USBB_UHADDR3_UHADDR_P11_MASK 0x7f000000 #define AVR32_USBB_UHADDR3_UHADDR_P11_OFFSET 24 #define AVR32_USBB_UHADDR3_UHADDR_P11_SIZE 7 #define AVR32_USBB_UHADDR3_UHADDR_P8 0 #define AVR32_USBB_UHADDR3_UHADDR_P8_MASK 0x0000007f #define AVR32_USBB_UHADDR3_UHADDR_P8_OFFSET 0 #define AVR32_USBB_UHADDR3_UHADDR_P8_SIZE 7 #define AVR32_USBB_UHADDR3_UHADDR_P9 8 #define AVR32_USBB_UHADDR3_UHADDR_P9_MASK 0x00007f00 #define AVR32_USBB_UHADDR3_UHADDR_P9_OFFSET 8 #define AVR32_USBB_UHADDR3_UHADDR_P9_SIZE 7 #define AVR32_USBB_UHADDR_P0 0 #define AVR32_USBB_UHADDR_P0_MASK 0x0000007f #define AVR32_USBB_UHADDR_P0_OFFSET 0 #define AVR32_USBB_UHADDR_P0_SIZE 7 #define AVR32_USBB_UHADDR_P1 8 #define AVR32_USBB_UHADDR_P10 16 #define AVR32_USBB_UHADDR_P10_MASK 0x007f0000 #define AVR32_USBB_UHADDR_P10_OFFSET 16 #define AVR32_USBB_UHADDR_P10_SIZE 7 #define AVR32_USBB_UHADDR_P11 24 #define AVR32_USBB_UHADDR_P11_MASK 0x7f000000 #define AVR32_USBB_UHADDR_P11_OFFSET 24 #define AVR32_USBB_UHADDR_P11_SIZE 7 #define AVR32_USBB_UHADDR_P1_MASK 0x00007f00 #define AVR32_USBB_UHADDR_P1_OFFSET 8 #define AVR32_USBB_UHADDR_P1_SIZE 7 #define AVR32_USBB_UHADDR_P2 16 #define AVR32_USBB_UHADDR_P2_MASK 0x007f0000 #define AVR32_USBB_UHADDR_P2_OFFSET 16 #define AVR32_USBB_UHADDR_P2_SIZE 7 #define AVR32_USBB_UHADDR_P3 24 #define AVR32_USBB_UHADDR_P3_MASK 0x7f000000 #define AVR32_USBB_UHADDR_P3_OFFSET 24 #define AVR32_USBB_UHADDR_P3_SIZE 7 #define AVR32_USBB_UHADDR_P4 0 #define AVR32_USBB_UHADDR_P4_MASK 0x0000007f #define AVR32_USBB_UHADDR_P4_OFFSET 0 #define AVR32_USBB_UHADDR_P4_SIZE 7 #define AVR32_USBB_UHADDR_P5 8 #define AVR32_USBB_UHADDR_P5_MASK 0x00007f00 #define AVR32_USBB_UHADDR_P5_OFFSET 8 #define AVR32_USBB_UHADDR_P5_SIZE 7 #define AVR32_USBB_UHADDR_P6 16 #define AVR32_USBB_UHADDR_P6_MASK 0x007f0000 #define AVR32_USBB_UHADDR_P6_OFFSET 16 #define AVR32_USBB_UHADDR_P6_SIZE 7 #define AVR32_USBB_UHADDR_P7 24 #define AVR32_USBB_UHADDR_P7_MASK 0x7f000000 #define AVR32_USBB_UHADDR_P7_OFFSET 24 #define AVR32_USBB_UHADDR_P7_SIZE 7 #define AVR32_USBB_UHADDR_P8 0 #define AVR32_USBB_UHADDR_P8_MASK 0x0000007f #define AVR32_USBB_UHADDR_P8_OFFSET 0 #define AVR32_USBB_UHADDR_P8_SIZE 7 #define AVR32_USBB_UHADDR_P9 8 #define AVR32_USBB_UHADDR_P9_MASK 0x00007f00 #define AVR32_USBB_UHADDR_P9_OFFSET 8 #define AVR32_USBB_UHADDR_P9_SIZE 7 #define AVR32_USBB_UHCON 0x00000400 #define AVR32_USBB_UHCON_RESET 9 #define AVR32_USBB_UHCON_RESET_MASK 0x00000200 #define AVR32_USBB_UHCON_RESET_OFFSET 9 #define AVR32_USBB_UHCON_RESET_SIZE 1 #define AVR32_USBB_UHCON_RESUME 10 #define AVR32_USBB_UHCON_RESUME_MASK 0x00000400 #define AVR32_USBB_UHCON_RESUME_OFFSET 10 #define AVR32_USBB_UHCON_RESUME_SIZE 1 #define AVR32_USBB_UHCON_SOFE 8 #define AVR32_USBB_UHCON_SOFE_MASK 0x00000100 #define AVR32_USBB_UHCON_SOFE_OFFSET 8 #define AVR32_USBB_UHCON_SOFE_SIZE 1 #define AVR32_USBB_UHCON_SPDCONF 12 #define AVR32_USBB_UHCON_SPDCONF_MASK 0x00003000 #define AVR32_USBB_UHCON_SPDCONF_OFFSET 12 #define AVR32_USBB_UHCON_SPDCONF_SIZE 2 #define AVR32_USBB_UHDMA1_ADDR 0x00000714 #define AVR32_USBB_UHDMA1_ADDR_HSB_ADDR 0 #define AVR32_USBB_UHDMA1_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UHDMA1_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UHDMA1_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UHDMA1_CONTROL 0x00000718 #define AVR32_USBB_UHDMA1_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UHDMA1_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UHDMA1_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UHDMA1_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UHDMA1_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UHDMA1_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UHDMA1_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UHDMA1_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UHDMA1_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UHDMA1_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UHDMA1_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UHDMA1_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UHDMA1_CONTROL_CH_EN 0 #define AVR32_USBB_UHDMA1_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA1_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA1_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA1_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UHDMA1_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UHDMA1_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UHDMA1_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA1_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UHDMA1_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UHDMA1_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UHDMA1_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UHDMA1_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UHDMA1_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UHDMA1_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UHDMA1_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA1_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UHDMA1_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UHDMA1_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UHDMA1_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA1_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UHDMA1_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UHDMA1_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UHDMA1_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UHDMA1_NEXTDESC 0x00000710 #define AVR32_USBB_UHDMA1_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UHDMA1_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UHDMA1_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UHDMA1_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UHDMA1_STATUS 0x0000071c #define AVR32_USBB_UHDMA1_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UHDMA1_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UHDMA1_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UHDMA1_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UHDMA1_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UHDMA1_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UHDMA1_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UHDMA1_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UHDMA1_STATUS_CH_EN 0 #define AVR32_USBB_UHDMA1_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA1_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA1_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA1_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UHDMA1_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UHDMA1_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UHDMA1_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UHDMA1_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UHDMA1_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UHDMA1_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UHDMA1_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UHDMA1_STATUS_EOT_STA 4 #define AVR32_USBB_UHDMA1_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UHDMA1_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UHDMA1_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UHDMA2_ADDR 0x00000724 #define AVR32_USBB_UHDMA2_ADDR_HSB_ADDR 0 #define AVR32_USBB_UHDMA2_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UHDMA2_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UHDMA2_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UHDMA2_CONTROL 0x00000728 #define AVR32_USBB_UHDMA2_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UHDMA2_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UHDMA2_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UHDMA2_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UHDMA2_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UHDMA2_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UHDMA2_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UHDMA2_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UHDMA2_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UHDMA2_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UHDMA2_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UHDMA2_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UHDMA2_CONTROL_CH_EN 0 #define AVR32_USBB_UHDMA2_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA2_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA2_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA2_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UHDMA2_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UHDMA2_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UHDMA2_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA2_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UHDMA2_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UHDMA2_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UHDMA2_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UHDMA2_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UHDMA2_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UHDMA2_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UHDMA2_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA2_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UHDMA2_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UHDMA2_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UHDMA2_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA2_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UHDMA2_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UHDMA2_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UHDMA2_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UHDMA2_NEXTDESC 0x00000720 #define AVR32_USBB_UHDMA2_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UHDMA2_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UHDMA2_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UHDMA2_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UHDMA2_STATUS 0x0000072c #define AVR32_USBB_UHDMA2_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UHDMA2_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UHDMA2_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UHDMA2_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UHDMA2_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UHDMA2_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UHDMA2_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UHDMA2_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UHDMA2_STATUS_CH_EN 0 #define AVR32_USBB_UHDMA2_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA2_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA2_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA2_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UHDMA2_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UHDMA2_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UHDMA2_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UHDMA2_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UHDMA2_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UHDMA2_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UHDMA2_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UHDMA2_STATUS_EOT_STA 4 #define AVR32_USBB_UHDMA2_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UHDMA2_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UHDMA2_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UHDMA3_ADDR 0x00000734 #define AVR32_USBB_UHDMA3_ADDR_HSB_ADDR 0 #define AVR32_USBB_UHDMA3_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UHDMA3_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UHDMA3_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UHDMA3_CONTROL 0x00000738 #define AVR32_USBB_UHDMA3_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UHDMA3_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UHDMA3_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UHDMA3_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UHDMA3_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UHDMA3_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UHDMA3_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UHDMA3_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UHDMA3_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UHDMA3_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UHDMA3_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UHDMA3_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UHDMA3_CONTROL_CH_EN 0 #define AVR32_USBB_UHDMA3_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA3_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA3_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA3_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UHDMA3_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UHDMA3_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UHDMA3_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA3_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UHDMA3_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UHDMA3_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UHDMA3_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UHDMA3_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UHDMA3_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UHDMA3_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UHDMA3_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA3_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UHDMA3_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UHDMA3_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UHDMA3_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA3_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UHDMA3_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UHDMA3_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UHDMA3_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UHDMA3_NEXTDESC 0x00000730 #define AVR32_USBB_UHDMA3_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UHDMA3_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UHDMA3_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UHDMA3_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UHDMA3_STATUS 0x0000073c #define AVR32_USBB_UHDMA3_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UHDMA3_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UHDMA3_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UHDMA3_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UHDMA3_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UHDMA3_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UHDMA3_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UHDMA3_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UHDMA3_STATUS_CH_EN 0 #define AVR32_USBB_UHDMA3_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA3_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA3_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA3_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UHDMA3_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UHDMA3_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UHDMA3_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UHDMA3_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UHDMA3_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UHDMA3_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UHDMA3_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UHDMA3_STATUS_EOT_STA 4 #define AVR32_USBB_UHDMA3_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UHDMA3_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UHDMA3_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UHDMA4_ADDR 0x00000744 #define AVR32_USBB_UHDMA4_ADDR_HSB_ADDR 0 #define AVR32_USBB_UHDMA4_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UHDMA4_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UHDMA4_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UHDMA4_CONTROL 0x00000748 #define AVR32_USBB_UHDMA4_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UHDMA4_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UHDMA4_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UHDMA4_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UHDMA4_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UHDMA4_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UHDMA4_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UHDMA4_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UHDMA4_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UHDMA4_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UHDMA4_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UHDMA4_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UHDMA4_CONTROL_CH_EN 0 #define AVR32_USBB_UHDMA4_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA4_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA4_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA4_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UHDMA4_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UHDMA4_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UHDMA4_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA4_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UHDMA4_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UHDMA4_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UHDMA4_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UHDMA4_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UHDMA4_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UHDMA4_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UHDMA4_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA4_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UHDMA4_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UHDMA4_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UHDMA4_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA4_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UHDMA4_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UHDMA4_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UHDMA4_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UHDMA4_NEXTDESC 0x00000740 #define AVR32_USBB_UHDMA4_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UHDMA4_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UHDMA4_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UHDMA4_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UHDMA4_STATUS 0x0000074c #define AVR32_USBB_UHDMA4_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UHDMA4_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UHDMA4_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UHDMA4_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UHDMA4_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UHDMA4_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UHDMA4_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UHDMA4_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UHDMA4_STATUS_CH_EN 0 #define AVR32_USBB_UHDMA4_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA4_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA4_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA4_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UHDMA4_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UHDMA4_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UHDMA4_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UHDMA4_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UHDMA4_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UHDMA4_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UHDMA4_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UHDMA4_STATUS_EOT_STA 4 #define AVR32_USBB_UHDMA4_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UHDMA4_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UHDMA4_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UHDMA5_ADDR 0x00000754 #define AVR32_USBB_UHDMA5_ADDR_HSB_ADDR 0 #define AVR32_USBB_UHDMA5_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UHDMA5_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UHDMA5_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UHDMA5_CONTROL 0x00000758 #define AVR32_USBB_UHDMA5_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UHDMA5_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UHDMA5_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UHDMA5_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UHDMA5_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UHDMA5_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UHDMA5_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UHDMA5_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UHDMA5_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UHDMA5_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UHDMA5_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UHDMA5_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UHDMA5_CONTROL_CH_EN 0 #define AVR32_USBB_UHDMA5_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA5_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA5_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA5_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UHDMA5_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UHDMA5_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UHDMA5_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA5_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UHDMA5_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UHDMA5_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UHDMA5_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UHDMA5_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UHDMA5_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UHDMA5_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UHDMA5_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA5_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UHDMA5_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UHDMA5_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UHDMA5_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA5_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UHDMA5_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UHDMA5_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UHDMA5_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UHDMA5_NEXTDESC 0x00000750 #define AVR32_USBB_UHDMA5_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UHDMA5_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UHDMA5_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UHDMA5_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UHDMA5_STATUS 0x0000075c #define AVR32_USBB_UHDMA5_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UHDMA5_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UHDMA5_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UHDMA5_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UHDMA5_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UHDMA5_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UHDMA5_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UHDMA5_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UHDMA5_STATUS_CH_EN 0 #define AVR32_USBB_UHDMA5_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA5_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA5_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA5_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UHDMA5_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UHDMA5_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UHDMA5_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UHDMA5_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UHDMA5_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UHDMA5_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UHDMA5_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UHDMA5_STATUS_EOT_STA 4 #define AVR32_USBB_UHDMA5_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UHDMA5_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UHDMA5_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UHDMA6_ADDR 0x00000764 #define AVR32_USBB_UHDMA6_ADDR_HSB_ADDR 0 #define AVR32_USBB_UHDMA6_ADDR_HSB_ADDR_MASK 0xffffffff #define AVR32_USBB_UHDMA6_ADDR_HSB_ADDR_OFFSET 0 #define AVR32_USBB_UHDMA6_ADDR_HSB_ADDR_SIZE 32 #define AVR32_USBB_UHDMA6_CONTROL 0x00000768 #define AVR32_USBB_UHDMA6_CONTROL_BUFF_CLOSE_IN_EN 2 #define AVR32_USBB_UHDMA6_CONTROL_BUFF_CLOSE_IN_EN_MASK 0x00000004 #define AVR32_USBB_UHDMA6_CONTROL_BUFF_CLOSE_IN_EN_OFFSET 2 #define AVR32_USBB_UHDMA6_CONTROL_BUFF_CLOSE_IN_EN_SIZE 1 #define AVR32_USBB_UHDMA6_CONTROL_BURST_LOCK_EN 7 #define AVR32_USBB_UHDMA6_CONTROL_BURST_LOCK_EN_MASK 0x00000080 #define AVR32_USBB_UHDMA6_CONTROL_BURST_LOCK_EN_OFFSET 7 #define AVR32_USBB_UHDMA6_CONTROL_BURST_LOCK_EN_SIZE 1 #define AVR32_USBB_UHDMA6_CONTROL_CH_BYTE_LENGTH 16 #define AVR32_USBB_UHDMA6_CONTROL_CH_BYTE_LENGTH_MASK 0xffff0000 #define AVR32_USBB_UHDMA6_CONTROL_CH_BYTE_LENGTH_OFFSET 16 #define AVR32_USBB_UHDMA6_CONTROL_CH_BYTE_LENGTH_SIZE 16 #define AVR32_USBB_UHDMA6_CONTROL_CH_EN 0 #define AVR32_USBB_UHDMA6_CONTROL_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA6_CONTROL_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA6_CONTROL_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA6_CONTROL_DESC_LD_IRQ_EN 6 #define AVR32_USBB_UHDMA6_CONTROL_DESC_LD_IRQ_EN_MASK 0x00000040 #define AVR32_USBB_UHDMA6_CONTROL_DESC_LD_IRQ_EN_OFFSET 6 #define AVR32_USBB_UHDMA6_CONTROL_DESC_LD_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA6_CONTROL_DMAEND_EN 3 #define AVR32_USBB_UHDMA6_CONTROL_DMAEND_EN_MASK 0x00000008 #define AVR32_USBB_UHDMA6_CONTROL_DMAEND_EN_OFFSET 3 #define AVR32_USBB_UHDMA6_CONTROL_DMAEND_EN_SIZE 1 #define AVR32_USBB_UHDMA6_CONTROL_EOBUFF_IRQ_EN 5 #define AVR32_USBB_UHDMA6_CONTROL_EOBUFF_IRQ_EN_MASK 0x00000020 #define AVR32_USBB_UHDMA6_CONTROL_EOBUFF_IRQ_EN_OFFSET 5 #define AVR32_USBB_UHDMA6_CONTROL_EOBUFF_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA6_CONTROL_EOT_IRQ_EN 4 #define AVR32_USBB_UHDMA6_CONTROL_EOT_IRQ_EN_MASK 0x00000010 #define AVR32_USBB_UHDMA6_CONTROL_EOT_IRQ_EN_OFFSET 4 #define AVR32_USBB_UHDMA6_CONTROL_EOT_IRQ_EN_SIZE 1 #define AVR32_USBB_UHDMA6_CONTROL_LD_NXT_CH_DESC_EN 1 #define AVR32_USBB_UHDMA6_CONTROL_LD_NXT_CH_DESC_EN_MASK 0x00000002 #define AVR32_USBB_UHDMA6_CONTROL_LD_NXT_CH_DESC_EN_OFFSET 1 #define AVR32_USBB_UHDMA6_CONTROL_LD_NXT_CH_DESC_EN_SIZE 1 #define AVR32_USBB_UHDMA6_NEXTDESC 0x00000760 #define AVR32_USBB_UHDMA6_NEXTDESC_NXT_DESC_ADDR 4 #define AVR32_USBB_UHDMA6_NEXTDESC_NXT_DESC_ADDR_MASK 0xfffffff0 #define AVR32_USBB_UHDMA6_NEXTDESC_NXT_DESC_ADDR_OFFSET 4 #define AVR32_USBB_UHDMA6_NEXTDESC_NXT_DESC_ADDR_SIZE 28 #define AVR32_USBB_UHDMA6_STATUS 0x0000076c #define AVR32_USBB_UHDMA6_STATUS_CH_ACTIVE 1 #define AVR32_USBB_UHDMA6_STATUS_CH_ACTIVE_MASK 0x00000002 #define AVR32_USBB_UHDMA6_STATUS_CH_ACTIVE_OFFSET 1 #define AVR32_USBB_UHDMA6_STATUS_CH_ACTIVE_SIZE 1 #define AVR32_USBB_UHDMA6_STATUS_CH_BYTE_CNT 16 #define AVR32_USBB_UHDMA6_STATUS_CH_BYTE_CNT_MASK 0xffff0000 #define AVR32_USBB_UHDMA6_STATUS_CH_BYTE_CNT_OFFSET 16 #define AVR32_USBB_UHDMA6_STATUS_CH_BYTE_CNT_SIZE 16 #define AVR32_USBB_UHDMA6_STATUS_CH_EN 0 #define AVR32_USBB_UHDMA6_STATUS_CH_EN_MASK 0x00000001 #define AVR32_USBB_UHDMA6_STATUS_CH_EN_OFFSET 0 #define AVR32_USBB_UHDMA6_STATUS_CH_EN_SIZE 1 #define AVR32_USBB_UHDMA6_STATUS_DESC_LD_STA 6 #define AVR32_USBB_UHDMA6_STATUS_DESC_LD_STA_MASK 0x00000040 #define AVR32_USBB_UHDMA6_STATUS_DESC_LD_STA_OFFSET 6 #define AVR32_USBB_UHDMA6_STATUS_DESC_LD_STA_SIZE 1 #define AVR32_USBB_UHDMA6_STATUS_EOCH_BUFF_STA 5 #define AVR32_USBB_UHDMA6_STATUS_EOCH_BUFF_STA_MASK 0x00000020 #define AVR32_USBB_UHDMA6_STATUS_EOCH_BUFF_STA_OFFSET 5 #define AVR32_USBB_UHDMA6_STATUS_EOCH_BUFF_STA_SIZE 1 #define AVR32_USBB_UHDMA6_STATUS_EOT_STA 4 #define AVR32_USBB_UHDMA6_STATUS_EOT_STA_MASK 0x00000010 #define AVR32_USBB_UHDMA6_STATUS_EOT_STA_OFFSET 4 #define AVR32_USBB_UHDMA6_STATUS_EOT_STA_SIZE 1 #define AVR32_USBB_UHFNUM 0x00000420 #define AVR32_USBB_UHFNUM_FLENHIGH 16 #define AVR32_USBB_UHFNUM_FLENHIGH_MASK 0x00ff0000 #define AVR32_USBB_UHFNUM_FLENHIGH_OFFSET 16 #define AVR32_USBB_UHFNUM_FLENHIGH_SIZE 8 #define AVR32_USBB_UHFNUM_FNUM 3 #define AVR32_USBB_UHFNUM_FNUM_MASK 0x00003ff8 #define AVR32_USBB_UHFNUM_FNUM_OFFSET 3 #define AVR32_USBB_UHFNUM_FNUM_SIZE 11 #define AVR32_USBB_UHFNUM_MFNUM 0 #define AVR32_USBB_UHFNUM_MFNUM_MASK 0x00000007 #define AVR32_USBB_UHFNUM_MFNUM_OFFSET 0 #define AVR32_USBB_UHFNUM_MFNUM_SIZE 3 #define AVR32_USBB_UHINT 0x00000404 #define AVR32_USBB_UHINTCLR 0x00000408 #define AVR32_USBB_UHINTCLR_DCONNIC 0 #define AVR32_USBB_UHINTCLR_DCONNIC_MASK 0x00000001 #define AVR32_USBB_UHINTCLR_DCONNIC_OFFSET 0 #define AVR32_USBB_UHINTCLR_DCONNIC_SIZE 1 #define AVR32_USBB_UHINTCLR_DDISCIC 1 #define AVR32_USBB_UHINTCLR_DDISCIC_MASK 0x00000002 #define AVR32_USBB_UHINTCLR_DDISCIC_OFFSET 1 #define AVR32_USBB_UHINTCLR_DDISCIC_SIZE 1 #define AVR32_USBB_UHINTCLR_HSOFIC 5 #define AVR32_USBB_UHINTCLR_HSOFIC_MASK 0x00000020 #define AVR32_USBB_UHINTCLR_HSOFIC_OFFSET 5 #define AVR32_USBB_UHINTCLR_HSOFIC_SIZE 1 #define AVR32_USBB_UHINTCLR_HWUPIC 6 #define AVR32_USBB_UHINTCLR_HWUPIC_MASK 0x00000040 #define AVR32_USBB_UHINTCLR_HWUPIC_OFFSET 6 #define AVR32_USBB_UHINTCLR_HWUPIC_SIZE 1 #define AVR32_USBB_UHINTCLR_RSMEDIC 3 #define AVR32_USBB_UHINTCLR_RSMEDIC_MASK 0x00000008 #define AVR32_USBB_UHINTCLR_RSMEDIC_OFFSET 3 #define AVR32_USBB_UHINTCLR_RSMEDIC_SIZE 1 #define AVR32_USBB_UHINTCLR_RSTIC 2 #define AVR32_USBB_UHINTCLR_RSTIC_MASK 0x00000004 #define AVR32_USBB_UHINTCLR_RSTIC_OFFSET 2 #define AVR32_USBB_UHINTCLR_RSTIC_SIZE 1 #define AVR32_USBB_UHINTCLR_RXRSMIC 4 #define AVR32_USBB_UHINTCLR_RXRSMIC_MASK 0x00000010 #define AVR32_USBB_UHINTCLR_RXRSMIC_OFFSET 4 #define AVR32_USBB_UHINTCLR_RXRSMIC_SIZE 1 #define AVR32_USBB_UHINTE 0x00000410 #define AVR32_USBB_UHINTECLR 0x00000414 #define AVR32_USBB_UHINTECLR_DCONNIEC 0 #define AVR32_USBB_UHINTECLR_DCONNIEC_MASK 0x00000001 #define AVR32_USBB_UHINTECLR_DCONNIEC_OFFSET 0 #define AVR32_USBB_UHINTECLR_DCONNIEC_SIZE 1 #define AVR32_USBB_UHINTECLR_DDISCIEC 1 #define AVR32_USBB_UHINTECLR_DDISCIEC_MASK 0x00000002 #define AVR32_USBB_UHINTECLR_DDISCIEC_OFFSET 1 #define AVR32_USBB_UHINTECLR_DDISCIEC_SIZE 1 #define AVR32_USBB_UHINTECLR_DMA1INTEC 25 #define AVR32_USBB_UHINTECLR_DMA1INTEC_MASK 0x02000000 #define AVR32_USBB_UHINTECLR_DMA1INTEC_OFFSET 25 #define AVR32_USBB_UHINTECLR_DMA1INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_DMA2INTEC 26 #define AVR32_USBB_UHINTECLR_DMA2INTEC_MASK 0x04000000 #define AVR32_USBB_UHINTECLR_DMA2INTEC_OFFSET 26 #define AVR32_USBB_UHINTECLR_DMA2INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_DMA3INTEC 27 #define AVR32_USBB_UHINTECLR_DMA3INTEC_MASK 0x08000000 #define AVR32_USBB_UHINTECLR_DMA3INTEC_OFFSET 27 #define AVR32_USBB_UHINTECLR_DMA3INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_DMA4INTEC 28 #define AVR32_USBB_UHINTECLR_DMA4INTEC_MASK 0x10000000 #define AVR32_USBB_UHINTECLR_DMA4INTEC_OFFSET 28 #define AVR32_USBB_UHINTECLR_DMA4INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_DMA5INTEC 29 #define AVR32_USBB_UHINTECLR_DMA5INTEC_MASK 0x20000000 #define AVR32_USBB_UHINTECLR_DMA5INTEC_OFFSET 29 #define AVR32_USBB_UHINTECLR_DMA5INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_DMA6INTEC 30 #define AVR32_USBB_UHINTECLR_DMA6INTEC_MASK 0x40000000 #define AVR32_USBB_UHINTECLR_DMA6INTEC_OFFSET 30 #define AVR32_USBB_UHINTECLR_DMA6INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_HSOFIEC 5 #define AVR32_USBB_UHINTECLR_HSOFIEC_MASK 0x00000020 #define AVR32_USBB_UHINTECLR_HSOFIEC_OFFSET 5 #define AVR32_USBB_UHINTECLR_HSOFIEC_SIZE 1 #define AVR32_USBB_UHINTECLR_HWUPIEC 6 #define AVR32_USBB_UHINTECLR_HWUPIEC_MASK 0x00000040 #define AVR32_USBB_UHINTECLR_HWUPIEC_OFFSET 6 #define AVR32_USBB_UHINTECLR_HWUPIEC_SIZE 1 #define AVR32_USBB_UHINTECLR_P0INTEC 8 #define AVR32_USBB_UHINTECLR_P0INTEC_MASK 0x00000100 #define AVR32_USBB_UHINTECLR_P0INTEC_OFFSET 8 #define AVR32_USBB_UHINTECLR_P0INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_P1INTEC 9 #define AVR32_USBB_UHINTECLR_P1INTEC_MASK 0x00000200 #define AVR32_USBB_UHINTECLR_P1INTEC_OFFSET 9 #define AVR32_USBB_UHINTECLR_P1INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_P2INTEC 10 #define AVR32_USBB_UHINTECLR_P2INTEC_MASK 0x00000400 #define AVR32_USBB_UHINTECLR_P2INTEC_OFFSET 10 #define AVR32_USBB_UHINTECLR_P2INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_P3INTEC 11 #define AVR32_USBB_UHINTECLR_P3INTEC_MASK 0x00000800 #define AVR32_USBB_UHINTECLR_P3INTEC_OFFSET 11 #define AVR32_USBB_UHINTECLR_P3INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_P4INTEC 12 #define AVR32_USBB_UHINTECLR_P4INTEC_MASK 0x00001000 #define AVR32_USBB_UHINTECLR_P4INTEC_OFFSET 12 #define AVR32_USBB_UHINTECLR_P4INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_P5INTEC 13 #define AVR32_USBB_UHINTECLR_P5INTEC_MASK 0x00002000 #define AVR32_USBB_UHINTECLR_P5INTEC_OFFSET 13 #define AVR32_USBB_UHINTECLR_P5INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_P6INTEC 14 #define AVR32_USBB_UHINTECLR_P6INTEC_MASK 0x00004000 #define AVR32_USBB_UHINTECLR_P6INTEC_OFFSET 14 #define AVR32_USBB_UHINTECLR_P6INTEC_SIZE 1 #define AVR32_USBB_UHINTECLR_RSMEDIEC 3 #define AVR32_USBB_UHINTECLR_RSMEDIEC_MASK 0x00000008 #define AVR32_USBB_UHINTECLR_RSMEDIEC_OFFSET 3 #define AVR32_USBB_UHINTECLR_RSMEDIEC_SIZE 1 #define AVR32_USBB_UHINTECLR_RSTIEC 2 #define AVR32_USBB_UHINTECLR_RSTIEC_MASK 0x00000004 #define AVR32_USBB_UHINTECLR_RSTIEC_OFFSET 2 #define AVR32_USBB_UHINTECLR_RSTIEC_SIZE 1 #define AVR32_USBB_UHINTECLR_RXRSMIEC 4 #define AVR32_USBB_UHINTECLR_RXRSMIEC_MASK 0x00000010 #define AVR32_USBB_UHINTECLR_RXRSMIEC_OFFSET 4 #define AVR32_USBB_UHINTECLR_RXRSMIEC_SIZE 1 #define AVR32_USBB_UHINTESET 0x00000418 #define AVR32_USBB_UHINTESET_DCONNIES 0 #define AVR32_USBB_UHINTESET_DCONNIES_MASK 0x00000001 #define AVR32_USBB_UHINTESET_DCONNIES_OFFSET 0 #define AVR32_USBB_UHINTESET_DCONNIES_SIZE 1 #define AVR32_USBB_UHINTESET_DDISCIES 1 #define AVR32_USBB_UHINTESET_DDISCIES_MASK 0x00000002 #define AVR32_USBB_UHINTESET_DDISCIES_OFFSET 1 #define AVR32_USBB_UHINTESET_DDISCIES_SIZE 1 #define AVR32_USBB_UHINTESET_DMA1INTES 25 #define AVR32_USBB_UHINTESET_DMA1INTES_MASK 0x02000000 #define AVR32_USBB_UHINTESET_DMA1INTES_OFFSET 25 #define AVR32_USBB_UHINTESET_DMA1INTES_SIZE 1 #define AVR32_USBB_UHINTESET_DMA2INTES 26 #define AVR32_USBB_UHINTESET_DMA2INTES_MASK 0x04000000 #define AVR32_USBB_UHINTESET_DMA2INTES_OFFSET 26 #define AVR32_USBB_UHINTESET_DMA2INTES_SIZE 1 #define AVR32_USBB_UHINTESET_DMA3INTES 27 #define AVR32_USBB_UHINTESET_DMA3INTES_MASK 0x08000000 #define AVR32_USBB_UHINTESET_DMA3INTES_OFFSET 27 #define AVR32_USBB_UHINTESET_DMA3INTES_SIZE 1 #define AVR32_USBB_UHINTESET_DMA4INTES 28 #define AVR32_USBB_UHINTESET_DMA4INTES_MASK 0x10000000 #define AVR32_USBB_UHINTESET_DMA4INTES_OFFSET 28 #define AVR32_USBB_UHINTESET_DMA4INTES_SIZE 1 #define AVR32_USBB_UHINTESET_DMA5INTES 29 #define AVR32_USBB_UHINTESET_DMA5INTES_MASK 0x20000000 #define AVR32_USBB_UHINTESET_DMA5INTES_OFFSET 29 #define AVR32_USBB_UHINTESET_DMA5INTES_SIZE 1 #define AVR32_USBB_UHINTESET_DMA6INTES 30 #define AVR32_USBB_UHINTESET_DMA6INTES_MASK 0x40000000 #define AVR32_USBB_UHINTESET_DMA6INTES_OFFSET 30 #define AVR32_USBB_UHINTESET_DMA6INTES_SIZE 1 #define AVR32_USBB_UHINTESET_HSOFIES 5 #define AVR32_USBB_UHINTESET_HSOFIES_MASK 0x00000020 #define AVR32_USBB_UHINTESET_HSOFIES_OFFSET 5 #define AVR32_USBB_UHINTESET_HSOFIES_SIZE 1 #define AVR32_USBB_UHINTESET_HWUPIES 6 #define AVR32_USBB_UHINTESET_HWUPIES_MASK 0x00000040 #define AVR32_USBB_UHINTESET_HWUPIES_OFFSET 6 #define AVR32_USBB_UHINTESET_HWUPIES_SIZE 1 #define AVR32_USBB_UHINTESET_P0INTES 8 #define AVR32_USBB_UHINTESET_P0INTES_MASK 0x00000100 #define AVR32_USBB_UHINTESET_P0INTES_OFFSET 8 #define AVR32_USBB_UHINTESET_P0INTES_SIZE 1 #define AVR32_USBB_UHINTESET_P1INTES 9 #define AVR32_USBB_UHINTESET_P1INTES_MASK 0x00000200 #define AVR32_USBB_UHINTESET_P1INTES_OFFSET 9 #define AVR32_USBB_UHINTESET_P1INTES_SIZE 1 #define AVR32_USBB_UHINTESET_P2INTES 10 #define AVR32_USBB_UHINTESET_P2INTES_MASK 0x00000400 #define AVR32_USBB_UHINTESET_P2INTES_OFFSET 10 #define AVR32_USBB_UHINTESET_P2INTES_SIZE 1 #define AVR32_USBB_UHINTESET_P3INTES 11 #define AVR32_USBB_UHINTESET_P3INTES_MASK 0x00000800 #define AVR32_USBB_UHINTESET_P3INTES_OFFSET 11 #define AVR32_USBB_UHINTESET_P3INTES_SIZE 1 #define AVR32_USBB_UHINTESET_P4INTES 12 #define AVR32_USBB_UHINTESET_P4INTES_MASK 0x00001000 #define AVR32_USBB_UHINTESET_P4INTES_OFFSET 12 #define AVR32_USBB_UHINTESET_P4INTES_SIZE 1 #define AVR32_USBB_UHINTESET_P5INTES 13 #define AVR32_USBB_UHINTESET_P5INTES_MASK 0x00002000 #define AVR32_USBB_UHINTESET_P5INTES_OFFSET 13 #define AVR32_USBB_UHINTESET_P5INTES_SIZE 1 #define AVR32_USBB_UHINTESET_P6INTES 14 #define AVR32_USBB_UHINTESET_P6INTES_MASK 0x00004000 #define AVR32_USBB_UHINTESET_P6INTES_OFFSET 14 #define AVR32_USBB_UHINTESET_P6INTES_SIZE 1 #define AVR32_USBB_UHINTESET_RSMEDIES 3 #define AVR32_USBB_UHINTESET_RSMEDIES_MASK 0x00000008 #define AVR32_USBB_UHINTESET_RSMEDIES_OFFSET 3 #define AVR32_USBB_UHINTESET_RSMEDIES_SIZE 1 #define AVR32_USBB_UHINTESET_RSTIES 2 #define AVR32_USBB_UHINTESET_RSTIES_MASK 0x00000004 #define AVR32_USBB_UHINTESET_RSTIES_OFFSET 2 #define AVR32_USBB_UHINTESET_RSTIES_SIZE 1 #define AVR32_USBB_UHINTESET_RXRSMIES 4 #define AVR32_USBB_UHINTESET_RXRSMIES_MASK 0x00000010 #define AVR32_USBB_UHINTESET_RXRSMIES_OFFSET 4 #define AVR32_USBB_UHINTESET_RXRSMIES_SIZE 1 #define AVR32_USBB_UHINTE_DCONNIE 0 #define AVR32_USBB_UHINTE_DCONNIE_MASK 0x00000001 #define AVR32_USBB_UHINTE_DCONNIE_OFFSET 0 #define AVR32_USBB_UHINTE_DCONNIE_SIZE 1 #define AVR32_USBB_UHINTE_DDISCIE 1 #define AVR32_USBB_UHINTE_DDISCIE_MASK 0x00000002 #define AVR32_USBB_UHINTE_DDISCIE_OFFSET 1 #define AVR32_USBB_UHINTE_DDISCIE_SIZE 1 #define AVR32_USBB_UHINTE_DMA1INTE 25 #define AVR32_USBB_UHINTE_DMA1INTE_MASK 0x02000000 #define AVR32_USBB_UHINTE_DMA1INTE_OFFSET 25 #define AVR32_USBB_UHINTE_DMA1INTE_SIZE 1 #define AVR32_USBB_UHINTE_DMA2INTE 26 #define AVR32_USBB_UHINTE_DMA2INTE_MASK 0x04000000 #define AVR32_USBB_UHINTE_DMA2INTE_OFFSET 26 #define AVR32_USBB_UHINTE_DMA2INTE_SIZE 1 #define AVR32_USBB_UHINTE_DMA3INTE 27 #define AVR32_USBB_UHINTE_DMA3INTE_MASK 0x08000000 #define AVR32_USBB_UHINTE_DMA3INTE_OFFSET 27 #define AVR32_USBB_UHINTE_DMA3INTE_SIZE 1 #define AVR32_USBB_UHINTE_DMA4INTE 28 #define AVR32_USBB_UHINTE_DMA4INTE_MASK 0x10000000 #define AVR32_USBB_UHINTE_DMA4INTE_OFFSET 28 #define AVR32_USBB_UHINTE_DMA4INTE_SIZE 1 #define AVR32_USBB_UHINTE_DMA5INTE 29 #define AVR32_USBB_UHINTE_DMA5INTE_MASK 0x20000000 #define AVR32_USBB_UHINTE_DMA5INTE_OFFSET 29 #define AVR32_USBB_UHINTE_DMA5INTE_SIZE 1 #define AVR32_USBB_UHINTE_DMA6INTE 30 #define AVR32_USBB_UHINTE_DMA6INTE_MASK 0x40000000 #define AVR32_USBB_UHINTE_DMA6INTE_OFFSET 30 #define AVR32_USBB_UHINTE_DMA6INTE_SIZE 1 #define AVR32_USBB_UHINTE_HSOFIE 5 #define AVR32_USBB_UHINTE_HSOFIE_MASK 0x00000020 #define AVR32_USBB_UHINTE_HSOFIE_OFFSET 5 #define AVR32_USBB_UHINTE_HSOFIE_SIZE 1 #define AVR32_USBB_UHINTE_HWUPIE 6 #define AVR32_USBB_UHINTE_HWUPIE_MASK 0x00000040 #define AVR32_USBB_UHINTE_HWUPIE_OFFSET 6 #define AVR32_USBB_UHINTE_HWUPIE_SIZE 1 #define AVR32_USBB_UHINTE_P0INTE 8 #define AVR32_USBB_UHINTE_P0INTE_MASK 0x00000100 #define AVR32_USBB_UHINTE_P0INTE_OFFSET 8 #define AVR32_USBB_UHINTE_P0INTE_SIZE 1 #define AVR32_USBB_UHINTE_P1INTE 9 #define AVR32_USBB_UHINTE_P1INTE_MASK 0x00000200 #define AVR32_USBB_UHINTE_P1INTE_OFFSET 9 #define AVR32_USBB_UHINTE_P1INTE_SIZE 1 #define AVR32_USBB_UHINTE_P2INTE 10 #define AVR32_USBB_UHINTE_P2INTE_MASK 0x00000400 #define AVR32_USBB_UHINTE_P2INTE_OFFSET 10 #define AVR32_USBB_UHINTE_P2INTE_SIZE 1 #define AVR32_USBB_UHINTE_P3INTE 11 #define AVR32_USBB_UHINTE_P3INTE_MASK 0x00000800 #define AVR32_USBB_UHINTE_P3INTE_OFFSET 11 #define AVR32_USBB_UHINTE_P3INTE_SIZE 1 #define AVR32_USBB_UHINTE_P4INTE 12 #define AVR32_USBB_UHINTE_P4INTE_MASK 0x00001000 #define AVR32_USBB_UHINTE_P4INTE_OFFSET 12 #define AVR32_USBB_UHINTE_P4INTE_SIZE 1 #define AVR32_USBB_UHINTE_P5INTE 13 #define AVR32_USBB_UHINTE_P5INTE_MASK 0x00002000 #define AVR32_USBB_UHINTE_P5INTE_OFFSET 13 #define AVR32_USBB_UHINTE_P5INTE_SIZE 1 #define AVR32_USBB_UHINTE_P6INTE 14 #define AVR32_USBB_UHINTE_P6INTE_MASK 0x00004000 #define AVR32_USBB_UHINTE_P6INTE_OFFSET 14 #define AVR32_USBB_UHINTE_P6INTE_SIZE 1 #define AVR32_USBB_UHINTE_RSMEDIE 3 #define AVR32_USBB_UHINTE_RSMEDIE_MASK 0x00000008 #define AVR32_USBB_UHINTE_RSMEDIE_OFFSET 3 #define AVR32_USBB_UHINTE_RSMEDIE_SIZE 1 #define AVR32_USBB_UHINTE_RSTIE 2 #define AVR32_USBB_UHINTE_RSTIE_MASK 0x00000004 #define AVR32_USBB_UHINTE_RSTIE_OFFSET 2 #define AVR32_USBB_UHINTE_RSTIE_SIZE 1 #define AVR32_USBB_UHINTE_RXRSMIE 4 #define AVR32_USBB_UHINTE_RXRSMIE_MASK 0x00000010 #define AVR32_USBB_UHINTE_RXRSMIE_OFFSET 4 #define AVR32_USBB_UHINTE_RXRSMIE_SIZE 1 #define AVR32_USBB_UHINTSET 0x0000040c #define AVR32_USBB_UHINTSET_DCONNIS 0 #define AVR32_USBB_UHINTSET_DCONNIS_MASK 0x00000001 #define AVR32_USBB_UHINTSET_DCONNIS_OFFSET 0 #define AVR32_USBB_UHINTSET_DCONNIS_SIZE 1 #define AVR32_USBB_UHINTSET_DDISCIS 1 #define AVR32_USBB_UHINTSET_DDISCIS_MASK 0x00000002 #define AVR32_USBB_UHINTSET_DDISCIS_OFFSET 1 #define AVR32_USBB_UHINTSET_DDISCIS_SIZE 1 #define AVR32_USBB_UHINTSET_DMA1INTS 25 #define AVR32_USBB_UHINTSET_DMA1INTS_MASK 0x02000000 #define AVR32_USBB_UHINTSET_DMA1INTS_OFFSET 25 #define AVR32_USBB_UHINTSET_DMA1INTS_SIZE 1 #define AVR32_USBB_UHINTSET_DMA2INTS 26 #define AVR32_USBB_UHINTSET_DMA2INTS_MASK 0x04000000 #define AVR32_USBB_UHINTSET_DMA2INTS_OFFSET 26 #define AVR32_USBB_UHINTSET_DMA2INTS_SIZE 1 #define AVR32_USBB_UHINTSET_DMA3INTS 27 #define AVR32_USBB_UHINTSET_DMA3INTS_MASK 0x08000000 #define AVR32_USBB_UHINTSET_DMA3INTS_OFFSET 27 #define AVR32_USBB_UHINTSET_DMA3INTS_SIZE 1 #define AVR32_USBB_UHINTSET_DMA4INTS 28 #define AVR32_USBB_UHINTSET_DMA4INTS_MASK 0x10000000 #define AVR32_USBB_UHINTSET_DMA4INTS_OFFSET 28 #define AVR32_USBB_UHINTSET_DMA4INTS_SIZE 1 #define AVR32_USBB_UHINTSET_DMA5INTS 29 #define AVR32_USBB_UHINTSET_DMA5INTS_MASK 0x20000000 #define AVR32_USBB_UHINTSET_DMA5INTS_OFFSET 29 #define AVR32_USBB_UHINTSET_DMA5INTS_SIZE 1 #define AVR32_USBB_UHINTSET_DMA6INTS 30 #define AVR32_USBB_UHINTSET_DMA6INTS_MASK 0x40000000 #define AVR32_USBB_UHINTSET_DMA6INTS_OFFSET 30 #define AVR32_USBB_UHINTSET_DMA6INTS_SIZE 1 #define AVR32_USBB_UHINTSET_HSOFIS 5 #define AVR32_USBB_UHINTSET_HSOFIS_MASK 0x00000020 #define AVR32_USBB_UHINTSET_HSOFIS_OFFSET 5 #define AVR32_USBB_UHINTSET_HSOFIS_SIZE 1 #define AVR32_USBB_UHINTSET_HWUPIS 6 #define AVR32_USBB_UHINTSET_HWUPIS_MASK 0x00000040 #define AVR32_USBB_UHINTSET_HWUPIS_OFFSET 6 #define AVR32_USBB_UHINTSET_HWUPIS_SIZE 1 #define AVR32_USBB_UHINTSET_RSMEDIS 3 #define AVR32_USBB_UHINTSET_RSMEDIS_MASK 0x00000008 #define AVR32_USBB_UHINTSET_RSMEDIS_OFFSET 3 #define AVR32_USBB_UHINTSET_RSMEDIS_SIZE 1 #define AVR32_USBB_UHINTSET_RSTIS 2 #define AVR32_USBB_UHINTSET_RSTIS_MASK 0x00000004 #define AVR32_USBB_UHINTSET_RSTIS_OFFSET 2 #define AVR32_USBB_UHINTSET_RSTIS_SIZE 1 #define AVR32_USBB_UHINTSET_RXRSMIS 4 #define AVR32_USBB_UHINTSET_RXRSMIS_MASK 0x00000010 #define AVR32_USBB_UHINTSET_RXRSMIS_OFFSET 4 #define AVR32_USBB_UHINTSET_RXRSMIS_SIZE 1 #define AVR32_USBB_UHINT_DCONNI 0 #define AVR32_USBB_UHINT_DCONNI_MASK 0x00000001 #define AVR32_USBB_UHINT_DCONNI_OFFSET 0 #define AVR32_USBB_UHINT_DCONNI_SIZE 1 #define AVR32_USBB_UHINT_DDISCI 1 #define AVR32_USBB_UHINT_DDISCI_MASK 0x00000002 #define AVR32_USBB_UHINT_DDISCI_OFFSET 1 #define AVR32_USBB_UHINT_DDISCI_SIZE 1 #define AVR32_USBB_UHINT_DMA1INT 25 #define AVR32_USBB_UHINT_DMA1INT_MASK 0x02000000 #define AVR32_USBB_UHINT_DMA1INT_OFFSET 25 #define AVR32_USBB_UHINT_DMA1INT_SIZE 1 #define AVR32_USBB_UHINT_DMA2INT 26 #define AVR32_USBB_UHINT_DMA2INT_MASK 0x04000000 #define AVR32_USBB_UHINT_DMA2INT_OFFSET 26 #define AVR32_USBB_UHINT_DMA2INT_SIZE 1 #define AVR32_USBB_UHINT_DMA3INT 27 #define AVR32_USBB_UHINT_DMA3INT_MASK 0x08000000 #define AVR32_USBB_UHINT_DMA3INT_OFFSET 27 #define AVR32_USBB_UHINT_DMA3INT_SIZE 1 #define AVR32_USBB_UHINT_DMA4INT 28 #define AVR32_USBB_UHINT_DMA4INT_MASK 0x10000000 #define AVR32_USBB_UHINT_DMA4INT_OFFSET 28 #define AVR32_USBB_UHINT_DMA4INT_SIZE 1 #define AVR32_USBB_UHINT_DMA5INT 29 #define AVR32_USBB_UHINT_DMA5INT_MASK 0x20000000 #define AVR32_USBB_UHINT_DMA5INT_OFFSET 29 #define AVR32_USBB_UHINT_DMA5INT_SIZE 1 #define AVR32_USBB_UHINT_DMA6INT 30 #define AVR32_USBB_UHINT_DMA6INT_MASK 0x40000000 #define AVR32_USBB_UHINT_DMA6INT_OFFSET 30 #define AVR32_USBB_UHINT_DMA6INT_SIZE 1 #define AVR32_USBB_UHINT_HSOFI 5 #define AVR32_USBB_UHINT_HSOFI_MASK 0x00000020 #define AVR32_USBB_UHINT_HSOFI_OFFSET 5 #define AVR32_USBB_UHINT_HSOFI_SIZE 1 #define AVR32_USBB_UHINT_HWUPI 6 #define AVR32_USBB_UHINT_HWUPI_MASK 0x00000040 #define AVR32_USBB_UHINT_HWUPI_OFFSET 6 #define AVR32_USBB_UHINT_HWUPI_SIZE 1 #define AVR32_USBB_UHINT_P0INT 8 #define AVR32_USBB_UHINT_P0INT_MASK 0x00000100 #define AVR32_USBB_UHINT_P0INT_OFFSET 8 #define AVR32_USBB_UHINT_P0INT_SIZE 1 #define AVR32_USBB_UHINT_P1INT 9 #define AVR32_USBB_UHINT_P1INT_MASK 0x00000200 #define AVR32_USBB_UHINT_P1INT_OFFSET 9 #define AVR32_USBB_UHINT_P1INT_SIZE 1 #define AVR32_USBB_UHINT_P2INT 10 #define AVR32_USBB_UHINT_P2INT_MASK 0x00000400 #define AVR32_USBB_UHINT_P2INT_OFFSET 10 #define AVR32_USBB_UHINT_P2INT_SIZE 1 #define AVR32_USBB_UHINT_P3INT 11 #define AVR32_USBB_UHINT_P3INT_MASK 0x00000800 #define AVR32_USBB_UHINT_P3INT_OFFSET 11 #define AVR32_USBB_UHINT_P3INT_SIZE 1 #define AVR32_USBB_UHINT_P4INT 12 #define AVR32_USBB_UHINT_P4INT_MASK 0x00001000 #define AVR32_USBB_UHINT_P4INT_OFFSET 12 #define AVR32_USBB_UHINT_P4INT_SIZE 1 #define AVR32_USBB_UHINT_P5INT 13 #define AVR32_USBB_UHINT_P5INT_MASK 0x00002000 #define AVR32_USBB_UHINT_P5INT_OFFSET 13 #define AVR32_USBB_UHINT_P5INT_SIZE 1 #define AVR32_USBB_UHINT_P6INT 14 #define AVR32_USBB_UHINT_P6INT_MASK 0x00004000 #define AVR32_USBB_UHINT_P6INT_OFFSET 14 #define AVR32_USBB_UHINT_P6INT_SIZE 1 #define AVR32_USBB_UHINT_RSMEDI 3 #define AVR32_USBB_UHINT_RSMEDI_MASK 0x00000008 #define AVR32_USBB_UHINT_RSMEDI_OFFSET 3 #define AVR32_USBB_UHINT_RSMEDI_SIZE 1 #define AVR32_USBB_UHINT_RSTI 2 #define AVR32_USBB_UHINT_RSTI_MASK 0x00000004 #define AVR32_USBB_UHINT_RSTI_OFFSET 2 #define AVR32_USBB_UHINT_RSTI_SIZE 1 #define AVR32_USBB_UHINT_RXRSMI 4 #define AVR32_USBB_UHINT_RXRSMI_MASK 0x00000010 #define AVR32_USBB_UHINT_RXRSMI_OFFSET 4 #define AVR32_USBB_UHINT_RXRSMI_SIZE 1 #define AVR32_USBB_UIDE 24 #define AVR32_USBB_UIDE_MASK 0x01000000 #define AVR32_USBB_UIDE_OFFSET 24 #define AVR32_USBB_UIDE_SIZE 1 #define AVR32_USBB_UIMOD 25 #define AVR32_USBB_UIMOD_MASK 0x02000000 #define AVR32_USBB_UIMOD_OFFSET 25 #define AVR32_USBB_UIMOD_SIZE 1 #define AVR32_USBB_UNAME1 0x00000824 #define AVR32_USBB_UNAME1_MASK 0xffffffff #define AVR32_USBB_UNAME1_OFFSET 0 #define AVR32_USBB_UNAME1_SIZE 32 #define AVR32_USBB_UNAME1_UNAME1 0 #define AVR32_USBB_UNAME1_UNAME1_MASK 0xffffffff #define AVR32_USBB_UNAME1_UNAME1_OFFSET 0 #define AVR32_USBB_UNAME1_UNAME1_SIZE 32 #define AVR32_USBB_UNAME2 0x00000828 #define AVR32_USBB_UNAME2_MASK 0xffffffff #define AVR32_USBB_UNAME2_OFFSET 0 #define AVR32_USBB_UNAME2_SIZE 32 #define AVR32_USBB_UNAME2_UNAME2 0 #define AVR32_USBB_UNAME2_UNAME2_MASK 0xffffffff #define AVR32_USBB_UNAME2_UNAME2_OFFSET 0 #define AVR32_USBB_UNAME2_UNAME2_SIZE 32 #define AVR32_USBB_UNLOCK 22 #define AVR32_USBB_UNLOCK_MASK 0x00400000 #define AVR32_USBB_UNLOCK_OFFSET 22 #define AVR32_USBB_UNLOCK_SIZE 1 #define AVR32_USBB_UPCFG0 0x00000500 #define AVR32_USBB_UPCFG0_ALLOC 1 #define AVR32_USBB_UPCFG0_ALLOC_MASK 0x00000002 #define AVR32_USBB_UPCFG0_ALLOC_OFFSET 1 #define AVR32_USBB_UPCFG0_ALLOC_SIZE 1 #define AVR32_USBB_UPCFG0_AUTOSW 10 #define AVR32_USBB_UPCFG0_AUTOSW_MASK 0x00000400 #define AVR32_USBB_UPCFG0_AUTOSW_OFFSET 10 #define AVR32_USBB_UPCFG0_AUTOSW_SIZE 1 #define AVR32_USBB_UPCFG0_DATASIZERDWR 22 #define AVR32_USBB_UPCFG0_DATASIZERDWR_MASK 0x00c00000 #define AVR32_USBB_UPCFG0_DATASIZERDWR_OFFSET 22 #define AVR32_USBB_UPCFG0_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UPCFG0_INTFRQ 24 #define AVR32_USBB_UPCFG0_INTFRQ_MASK 0xff000000 #define AVR32_USBB_UPCFG0_INTFRQ_OFFSET 24 #define AVR32_USBB_UPCFG0_INTFRQ_SIZE 8 #define AVR32_USBB_UPCFG0_PBK 2 #define AVR32_USBB_UPCFG0_PBK_DOUBLE 0x00000001 #define AVR32_USBB_UPCFG0_PBK_MASK 0x0000000c #define AVR32_USBB_UPCFG0_PBK_OFFSET 2 #define AVR32_USBB_UPCFG0_PBK_SINGLE 0x00000000 #define AVR32_USBB_UPCFG0_PBK_SIZE 2 #define AVR32_USBB_UPCFG0_PBK_TRIPLE 0x00000002 #define AVR32_USBB_UPCFG0_PEPNUM 16 #define AVR32_USBB_UPCFG0_PEPNUM_MASK 0x000f0000 #define AVR32_USBB_UPCFG0_PEPNUM_OFFSET 16 #define AVR32_USBB_UPCFG0_PEPNUM_SIZE 4 #define AVR32_USBB_UPCFG0_PINGEN 20 #define AVR32_USBB_UPCFG0_PINGEN_MASK 0x00100000 #define AVR32_USBB_UPCFG0_PINGEN_OFFSET 20 #define AVR32_USBB_UPCFG0_PINGEN_SIZE 1 #define AVR32_USBB_UPCFG0_PSIZE 4 #define AVR32_USBB_UPCFG0_PSIZE_1024 0x00000007 #define AVR32_USBB_UPCFG0_PSIZE_128 0x00000004 #define AVR32_USBB_UPCFG0_PSIZE_16 0x00000001 #define AVR32_USBB_UPCFG0_PSIZE_256 0x00000005 #define AVR32_USBB_UPCFG0_PSIZE_32 0x00000002 #define AVR32_USBB_UPCFG0_PSIZE_512 0x00000006 #define AVR32_USBB_UPCFG0_PSIZE_64 0x00000003 #define AVR32_USBB_UPCFG0_PSIZE_8 0x00000000 #define AVR32_USBB_UPCFG0_PSIZE_MASK 0x00000070 #define AVR32_USBB_UPCFG0_PSIZE_OFFSET 4 #define AVR32_USBB_UPCFG0_PSIZE_SIZE 3 #define AVR32_USBB_UPCFG0_PTOKEN 8 #define AVR32_USBB_UPCFG0_PTOKEN_IN 0x00000001 #define AVR32_USBB_UPCFG0_PTOKEN_MASK 0x00000300 #define AVR32_USBB_UPCFG0_PTOKEN_OFFSET 8 #define AVR32_USBB_UPCFG0_PTOKEN_OUT 0x00000002 #define AVR32_USBB_UPCFG0_PTOKEN_SETUP 0x00000000 #define AVR32_USBB_UPCFG0_PTOKEN_SIZE 2 #define AVR32_USBB_UPCFG0_PTYPE 12 #define AVR32_USBB_UPCFG0_PTYPE_BULK 0x00000002 #define AVR32_USBB_UPCFG0_PTYPE_CONTROL 0x00000000 #define AVR32_USBB_UPCFG0_PTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UPCFG0_PTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UPCFG0_PTYPE_MASK 0x00003000 #define AVR32_USBB_UPCFG0_PTYPE_OFFSET 12 #define AVR32_USBB_UPCFG0_PTYPE_SIZE 2 #define AVR32_USBB_UPCFG1 0x00000504 #define AVR32_USBB_UPCFG1_ALLOC 1 #define AVR32_USBB_UPCFG1_ALLOC_MASK 0x00000002 #define AVR32_USBB_UPCFG1_ALLOC_OFFSET 1 #define AVR32_USBB_UPCFG1_ALLOC_SIZE 1 #define AVR32_USBB_UPCFG1_AUTOSW 10 #define AVR32_USBB_UPCFG1_AUTOSW_MASK 0x00000400 #define AVR32_USBB_UPCFG1_AUTOSW_OFFSET 10 #define AVR32_USBB_UPCFG1_AUTOSW_SIZE 1 #define AVR32_USBB_UPCFG1_DATASIZERDWR 22 #define AVR32_USBB_UPCFG1_DATASIZERDWR_MASK 0x00c00000 #define AVR32_USBB_UPCFG1_DATASIZERDWR_OFFSET 22 #define AVR32_USBB_UPCFG1_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UPCFG1_INTFRQ 24 #define AVR32_USBB_UPCFG1_INTFRQ_MASK 0xff000000 #define AVR32_USBB_UPCFG1_INTFRQ_OFFSET 24 #define AVR32_USBB_UPCFG1_INTFRQ_SIZE 8 #define AVR32_USBB_UPCFG1_PBK 2 #define AVR32_USBB_UPCFG1_PBK_DOUBLE 0x00000001 #define AVR32_USBB_UPCFG1_PBK_MASK 0x0000000c #define AVR32_USBB_UPCFG1_PBK_OFFSET 2 #define AVR32_USBB_UPCFG1_PBK_SINGLE 0x00000000 #define AVR32_USBB_UPCFG1_PBK_SIZE 2 #define AVR32_USBB_UPCFG1_PBK_TRIPLE 0x00000002 #define AVR32_USBB_UPCFG1_PEPNUM 16 #define AVR32_USBB_UPCFG1_PEPNUM_MASK 0x000f0000 #define AVR32_USBB_UPCFG1_PEPNUM_OFFSET 16 #define AVR32_USBB_UPCFG1_PEPNUM_SIZE 4 #define AVR32_USBB_UPCFG1_PINGEN 20 #define AVR32_USBB_UPCFG1_PINGEN_MASK 0x00100000 #define AVR32_USBB_UPCFG1_PINGEN_OFFSET 20 #define AVR32_USBB_UPCFG1_PINGEN_SIZE 1 #define AVR32_USBB_UPCFG1_PSIZE 4 #define AVR32_USBB_UPCFG1_PSIZE_1024 0x00000007 #define AVR32_USBB_UPCFG1_PSIZE_128 0x00000004 #define AVR32_USBB_UPCFG1_PSIZE_16 0x00000001 #define AVR32_USBB_UPCFG1_PSIZE_256 0x00000005 #define AVR32_USBB_UPCFG1_PSIZE_32 0x00000002 #define AVR32_USBB_UPCFG1_PSIZE_512 0x00000006 #define AVR32_USBB_UPCFG1_PSIZE_64 0x00000003 #define AVR32_USBB_UPCFG1_PSIZE_8 0x00000000 #define AVR32_USBB_UPCFG1_PSIZE_MASK 0x00000070 #define AVR32_USBB_UPCFG1_PSIZE_OFFSET 4 #define AVR32_USBB_UPCFG1_PSIZE_SIZE 3 #define AVR32_USBB_UPCFG1_PTOKEN 8 #define AVR32_USBB_UPCFG1_PTOKEN_IN 0x00000001 #define AVR32_USBB_UPCFG1_PTOKEN_MASK 0x00000300 #define AVR32_USBB_UPCFG1_PTOKEN_OFFSET 8 #define AVR32_USBB_UPCFG1_PTOKEN_OUT 0x00000002 #define AVR32_USBB_UPCFG1_PTOKEN_SETUP 0x00000000 #define AVR32_USBB_UPCFG1_PTOKEN_SIZE 2 #define AVR32_USBB_UPCFG1_PTYPE 12 #define AVR32_USBB_UPCFG1_PTYPE_BULK 0x00000002 #define AVR32_USBB_UPCFG1_PTYPE_CONTROL 0x00000000 #define AVR32_USBB_UPCFG1_PTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UPCFG1_PTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UPCFG1_PTYPE_MASK 0x00003000 #define AVR32_USBB_UPCFG1_PTYPE_OFFSET 12 #define AVR32_USBB_UPCFG1_PTYPE_SIZE 2 #define AVR32_USBB_UPCFG2 0x00000508 #define AVR32_USBB_UPCFG2_ALLOC 1 #define AVR32_USBB_UPCFG2_ALLOC_MASK 0x00000002 #define AVR32_USBB_UPCFG2_ALLOC_OFFSET 1 #define AVR32_USBB_UPCFG2_ALLOC_SIZE 1 #define AVR32_USBB_UPCFG2_AUTOSW 10 #define AVR32_USBB_UPCFG2_AUTOSW_MASK 0x00000400 #define AVR32_USBB_UPCFG2_AUTOSW_OFFSET 10 #define AVR32_USBB_UPCFG2_AUTOSW_SIZE 1 #define AVR32_USBB_UPCFG2_DATASIZERDWR 22 #define AVR32_USBB_UPCFG2_DATASIZERDWR_MASK 0x00c00000 #define AVR32_USBB_UPCFG2_DATASIZERDWR_OFFSET 22 #define AVR32_USBB_UPCFG2_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UPCFG2_INTFRQ 24 #define AVR32_USBB_UPCFG2_INTFRQ_MASK 0xff000000 #define AVR32_USBB_UPCFG2_INTFRQ_OFFSET 24 #define AVR32_USBB_UPCFG2_INTFRQ_SIZE 8 #define AVR32_USBB_UPCFG2_PBK 2 #define AVR32_USBB_UPCFG2_PBK_DOUBLE 0x00000001 #define AVR32_USBB_UPCFG2_PBK_MASK 0x0000000c #define AVR32_USBB_UPCFG2_PBK_OFFSET 2 #define AVR32_USBB_UPCFG2_PBK_SINGLE 0x00000000 #define AVR32_USBB_UPCFG2_PBK_SIZE 2 #define AVR32_USBB_UPCFG2_PBK_TRIPLE 0x00000002 #define AVR32_USBB_UPCFG2_PEPNUM 16 #define AVR32_USBB_UPCFG2_PEPNUM_MASK 0x000f0000 #define AVR32_USBB_UPCFG2_PEPNUM_OFFSET 16 #define AVR32_USBB_UPCFG2_PEPNUM_SIZE 4 #define AVR32_USBB_UPCFG2_PINGEN 20 #define AVR32_USBB_UPCFG2_PINGEN_MASK 0x00100000 #define AVR32_USBB_UPCFG2_PINGEN_OFFSET 20 #define AVR32_USBB_UPCFG2_PINGEN_SIZE 1 #define AVR32_USBB_UPCFG2_PSIZE 4 #define AVR32_USBB_UPCFG2_PSIZE_1024 0x00000007 #define AVR32_USBB_UPCFG2_PSIZE_128 0x00000004 #define AVR32_USBB_UPCFG2_PSIZE_16 0x00000001 #define AVR32_USBB_UPCFG2_PSIZE_256 0x00000005 #define AVR32_USBB_UPCFG2_PSIZE_32 0x00000002 #define AVR32_USBB_UPCFG2_PSIZE_512 0x00000006 #define AVR32_USBB_UPCFG2_PSIZE_64 0x00000003 #define AVR32_USBB_UPCFG2_PSIZE_8 0x00000000 #define AVR32_USBB_UPCFG2_PSIZE_MASK 0x00000070 #define AVR32_USBB_UPCFG2_PSIZE_OFFSET 4 #define AVR32_USBB_UPCFG2_PSIZE_SIZE 3 #define AVR32_USBB_UPCFG2_PTOKEN 8 #define AVR32_USBB_UPCFG2_PTOKEN_IN 0x00000001 #define AVR32_USBB_UPCFG2_PTOKEN_MASK 0x00000300 #define AVR32_USBB_UPCFG2_PTOKEN_OFFSET 8 #define AVR32_USBB_UPCFG2_PTOKEN_OUT 0x00000002 #define AVR32_USBB_UPCFG2_PTOKEN_SETUP 0x00000000 #define AVR32_USBB_UPCFG2_PTOKEN_SIZE 2 #define AVR32_USBB_UPCFG2_PTYPE 12 #define AVR32_USBB_UPCFG2_PTYPE_BULK 0x00000002 #define AVR32_USBB_UPCFG2_PTYPE_CONTROL 0x00000000 #define AVR32_USBB_UPCFG2_PTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UPCFG2_PTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UPCFG2_PTYPE_MASK 0x00003000 #define AVR32_USBB_UPCFG2_PTYPE_OFFSET 12 #define AVR32_USBB_UPCFG2_PTYPE_SIZE 2 #define AVR32_USBB_UPCFG3 0x0000050c #define AVR32_USBB_UPCFG3_ALLOC 1 #define AVR32_USBB_UPCFG3_ALLOC_MASK 0x00000002 #define AVR32_USBB_UPCFG3_ALLOC_OFFSET 1 #define AVR32_USBB_UPCFG3_ALLOC_SIZE 1 #define AVR32_USBB_UPCFG3_AUTOSW 10 #define AVR32_USBB_UPCFG3_AUTOSW_MASK 0x00000400 #define AVR32_USBB_UPCFG3_AUTOSW_OFFSET 10 #define AVR32_USBB_UPCFG3_AUTOSW_SIZE 1 #define AVR32_USBB_UPCFG3_DATASIZERDWR 22 #define AVR32_USBB_UPCFG3_DATASIZERDWR_MASK 0x00c00000 #define AVR32_USBB_UPCFG3_DATASIZERDWR_OFFSET 22 #define AVR32_USBB_UPCFG3_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UPCFG3_INTFRQ 24 #define AVR32_USBB_UPCFG3_INTFRQ_MASK 0xff000000 #define AVR32_USBB_UPCFG3_INTFRQ_OFFSET 24 #define AVR32_USBB_UPCFG3_INTFRQ_SIZE 8 #define AVR32_USBB_UPCFG3_PBK 2 #define AVR32_USBB_UPCFG3_PBK_DOUBLE 0x00000001 #define AVR32_USBB_UPCFG3_PBK_MASK 0x0000000c #define AVR32_USBB_UPCFG3_PBK_OFFSET 2 #define AVR32_USBB_UPCFG3_PBK_SINGLE 0x00000000 #define AVR32_USBB_UPCFG3_PBK_SIZE 2 #define AVR32_USBB_UPCFG3_PBK_TRIPLE 0x00000002 #define AVR32_USBB_UPCFG3_PEPNUM 16 #define AVR32_USBB_UPCFG3_PEPNUM_MASK 0x000f0000 #define AVR32_USBB_UPCFG3_PEPNUM_OFFSET 16 #define AVR32_USBB_UPCFG3_PEPNUM_SIZE 4 #define AVR32_USBB_UPCFG3_PINGEN 20 #define AVR32_USBB_UPCFG3_PINGEN_MASK 0x00100000 #define AVR32_USBB_UPCFG3_PINGEN_OFFSET 20 #define AVR32_USBB_UPCFG3_PINGEN_SIZE 1 #define AVR32_USBB_UPCFG3_PSIZE 4 #define AVR32_USBB_UPCFG3_PSIZE_1024 0x00000007 #define AVR32_USBB_UPCFG3_PSIZE_128 0x00000004 #define AVR32_USBB_UPCFG3_PSIZE_16 0x00000001 #define AVR32_USBB_UPCFG3_PSIZE_256 0x00000005 #define AVR32_USBB_UPCFG3_PSIZE_32 0x00000002 #define AVR32_USBB_UPCFG3_PSIZE_512 0x00000006 #define AVR32_USBB_UPCFG3_PSIZE_64 0x00000003 #define AVR32_USBB_UPCFG3_PSIZE_8 0x00000000 #define AVR32_USBB_UPCFG3_PSIZE_MASK 0x00000070 #define AVR32_USBB_UPCFG3_PSIZE_OFFSET 4 #define AVR32_USBB_UPCFG3_PSIZE_SIZE 3 #define AVR32_USBB_UPCFG3_PTOKEN 8 #define AVR32_USBB_UPCFG3_PTOKEN_IN 0x00000001 #define AVR32_USBB_UPCFG3_PTOKEN_MASK 0x00000300 #define AVR32_USBB_UPCFG3_PTOKEN_OFFSET 8 #define AVR32_USBB_UPCFG3_PTOKEN_OUT 0x00000002 #define AVR32_USBB_UPCFG3_PTOKEN_SETUP 0x00000000 #define AVR32_USBB_UPCFG3_PTOKEN_SIZE 2 #define AVR32_USBB_UPCFG3_PTYPE 12 #define AVR32_USBB_UPCFG3_PTYPE_BULK 0x00000002 #define AVR32_USBB_UPCFG3_PTYPE_CONTROL 0x00000000 #define AVR32_USBB_UPCFG3_PTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UPCFG3_PTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UPCFG3_PTYPE_MASK 0x00003000 #define AVR32_USBB_UPCFG3_PTYPE_OFFSET 12 #define AVR32_USBB_UPCFG3_PTYPE_SIZE 2 #define AVR32_USBB_UPCFG4 0x00000510 #define AVR32_USBB_UPCFG4_ALLOC 1 #define AVR32_USBB_UPCFG4_ALLOC_MASK 0x00000002 #define AVR32_USBB_UPCFG4_ALLOC_OFFSET 1 #define AVR32_USBB_UPCFG4_ALLOC_SIZE 1 #define AVR32_USBB_UPCFG4_AUTOSW 10 #define AVR32_USBB_UPCFG4_AUTOSW_MASK 0x00000400 #define AVR32_USBB_UPCFG4_AUTOSW_OFFSET 10 #define AVR32_USBB_UPCFG4_AUTOSW_SIZE 1 #define AVR32_USBB_UPCFG4_DATASIZERDWR 22 #define AVR32_USBB_UPCFG4_DATASIZERDWR_MASK 0x00c00000 #define AVR32_USBB_UPCFG4_DATASIZERDWR_OFFSET 22 #define AVR32_USBB_UPCFG4_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UPCFG4_INTFRQ 24 #define AVR32_USBB_UPCFG4_INTFRQ_MASK 0xff000000 #define AVR32_USBB_UPCFG4_INTFRQ_OFFSET 24 #define AVR32_USBB_UPCFG4_INTFRQ_SIZE 8 #define AVR32_USBB_UPCFG4_PBK 2 #define AVR32_USBB_UPCFG4_PBK_DOUBLE 0x00000001 #define AVR32_USBB_UPCFG4_PBK_MASK 0x0000000c #define AVR32_USBB_UPCFG4_PBK_OFFSET 2 #define AVR32_USBB_UPCFG4_PBK_SINGLE 0x00000000 #define AVR32_USBB_UPCFG4_PBK_SIZE 2 #define AVR32_USBB_UPCFG4_PBK_TRIPLE 0x00000002 #define AVR32_USBB_UPCFG4_PEPNUM 16 #define AVR32_USBB_UPCFG4_PEPNUM_MASK 0x000f0000 #define AVR32_USBB_UPCFG4_PEPNUM_OFFSET 16 #define AVR32_USBB_UPCFG4_PEPNUM_SIZE 4 #define AVR32_USBB_UPCFG4_PINGEN 20 #define AVR32_USBB_UPCFG4_PINGEN_MASK 0x00100000 #define AVR32_USBB_UPCFG4_PINGEN_OFFSET 20 #define AVR32_USBB_UPCFG4_PINGEN_SIZE 1 #define AVR32_USBB_UPCFG4_PSIZE 4 #define AVR32_USBB_UPCFG4_PSIZE_1024 0x00000007 #define AVR32_USBB_UPCFG4_PSIZE_128 0x00000004 #define AVR32_USBB_UPCFG4_PSIZE_16 0x00000001 #define AVR32_USBB_UPCFG4_PSIZE_256 0x00000005 #define AVR32_USBB_UPCFG4_PSIZE_32 0x00000002 #define AVR32_USBB_UPCFG4_PSIZE_512 0x00000006 #define AVR32_USBB_UPCFG4_PSIZE_64 0x00000003 #define AVR32_USBB_UPCFG4_PSIZE_8 0x00000000 #define AVR32_USBB_UPCFG4_PSIZE_MASK 0x00000070 #define AVR32_USBB_UPCFG4_PSIZE_OFFSET 4 #define AVR32_USBB_UPCFG4_PSIZE_SIZE 3 #define AVR32_USBB_UPCFG4_PTOKEN 8 #define AVR32_USBB_UPCFG4_PTOKEN_IN 0x00000001 #define AVR32_USBB_UPCFG4_PTOKEN_MASK 0x00000300 #define AVR32_USBB_UPCFG4_PTOKEN_OFFSET 8 #define AVR32_USBB_UPCFG4_PTOKEN_OUT 0x00000002 #define AVR32_USBB_UPCFG4_PTOKEN_SETUP 0x00000000 #define AVR32_USBB_UPCFG4_PTOKEN_SIZE 2 #define AVR32_USBB_UPCFG4_PTYPE 12 #define AVR32_USBB_UPCFG4_PTYPE_BULK 0x00000002 #define AVR32_USBB_UPCFG4_PTYPE_CONTROL 0x00000000 #define AVR32_USBB_UPCFG4_PTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UPCFG4_PTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UPCFG4_PTYPE_MASK 0x00003000 #define AVR32_USBB_UPCFG4_PTYPE_OFFSET 12 #define AVR32_USBB_UPCFG4_PTYPE_SIZE 2 #define AVR32_USBB_UPCFG5 0x00000514 #define AVR32_USBB_UPCFG5_ALLOC 1 #define AVR32_USBB_UPCFG5_ALLOC_MASK 0x00000002 #define AVR32_USBB_UPCFG5_ALLOC_OFFSET 1 #define AVR32_USBB_UPCFG5_ALLOC_SIZE 1 #define AVR32_USBB_UPCFG5_AUTOSW 10 #define AVR32_USBB_UPCFG5_AUTOSW_MASK 0x00000400 #define AVR32_USBB_UPCFG5_AUTOSW_OFFSET 10 #define AVR32_USBB_UPCFG5_AUTOSW_SIZE 1 #define AVR32_USBB_UPCFG5_DATASIZERDWR 22 #define AVR32_USBB_UPCFG5_DATASIZERDWR_MASK 0x00c00000 #define AVR32_USBB_UPCFG5_DATASIZERDWR_OFFSET 22 #define AVR32_USBB_UPCFG5_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UPCFG5_INTFRQ 24 #define AVR32_USBB_UPCFG5_INTFRQ_MASK 0xff000000 #define AVR32_USBB_UPCFG5_INTFRQ_OFFSET 24 #define AVR32_USBB_UPCFG5_INTFRQ_SIZE 8 #define AVR32_USBB_UPCFG5_PBK 2 #define AVR32_USBB_UPCFG5_PBK_DOUBLE 0x00000001 #define AVR32_USBB_UPCFG5_PBK_MASK 0x0000000c #define AVR32_USBB_UPCFG5_PBK_OFFSET 2 #define AVR32_USBB_UPCFG5_PBK_SINGLE 0x00000000 #define AVR32_USBB_UPCFG5_PBK_SIZE 2 #define AVR32_USBB_UPCFG5_PBK_TRIPLE 0x00000002 #define AVR32_USBB_UPCFG5_PEPNUM 16 #define AVR32_USBB_UPCFG5_PEPNUM_MASK 0x000f0000 #define AVR32_USBB_UPCFG5_PEPNUM_OFFSET 16 #define AVR32_USBB_UPCFG5_PEPNUM_SIZE 4 #define AVR32_USBB_UPCFG5_PINGEN 20 #define AVR32_USBB_UPCFG5_PINGEN_MASK 0x00100000 #define AVR32_USBB_UPCFG5_PINGEN_OFFSET 20 #define AVR32_USBB_UPCFG5_PINGEN_SIZE 1 #define AVR32_USBB_UPCFG5_PSIZE 4 #define AVR32_USBB_UPCFG5_PSIZE_1024 0x00000007 #define AVR32_USBB_UPCFG5_PSIZE_128 0x00000004 #define AVR32_USBB_UPCFG5_PSIZE_16 0x00000001 #define AVR32_USBB_UPCFG5_PSIZE_256 0x00000005 #define AVR32_USBB_UPCFG5_PSIZE_32 0x00000002 #define AVR32_USBB_UPCFG5_PSIZE_512 0x00000006 #define AVR32_USBB_UPCFG5_PSIZE_64 0x00000003 #define AVR32_USBB_UPCFG5_PSIZE_8 0x00000000 #define AVR32_USBB_UPCFG5_PSIZE_MASK 0x00000070 #define AVR32_USBB_UPCFG5_PSIZE_OFFSET 4 #define AVR32_USBB_UPCFG5_PSIZE_SIZE 3 #define AVR32_USBB_UPCFG5_PTOKEN 8 #define AVR32_USBB_UPCFG5_PTOKEN_IN 0x00000001 #define AVR32_USBB_UPCFG5_PTOKEN_MASK 0x00000300 #define AVR32_USBB_UPCFG5_PTOKEN_OFFSET 8 #define AVR32_USBB_UPCFG5_PTOKEN_OUT 0x00000002 #define AVR32_USBB_UPCFG5_PTOKEN_SETUP 0x00000000 #define AVR32_USBB_UPCFG5_PTOKEN_SIZE 2 #define AVR32_USBB_UPCFG5_PTYPE 12 #define AVR32_USBB_UPCFG5_PTYPE_BULK 0x00000002 #define AVR32_USBB_UPCFG5_PTYPE_CONTROL 0x00000000 #define AVR32_USBB_UPCFG5_PTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UPCFG5_PTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UPCFG5_PTYPE_MASK 0x00003000 #define AVR32_USBB_UPCFG5_PTYPE_OFFSET 12 #define AVR32_USBB_UPCFG5_PTYPE_SIZE 2 #define AVR32_USBB_UPCFG6 0x00000518 #define AVR32_USBB_UPCFG6_ALLOC 1 #define AVR32_USBB_UPCFG6_ALLOC_MASK 0x00000002 #define AVR32_USBB_UPCFG6_ALLOC_OFFSET 1 #define AVR32_USBB_UPCFG6_ALLOC_SIZE 1 #define AVR32_USBB_UPCFG6_AUTOSW 10 #define AVR32_USBB_UPCFG6_AUTOSW_MASK 0x00000400 #define AVR32_USBB_UPCFG6_AUTOSW_OFFSET 10 #define AVR32_USBB_UPCFG6_AUTOSW_SIZE 1 #define AVR32_USBB_UPCFG6_DATASIZERDWR 22 #define AVR32_USBB_UPCFG6_DATASIZERDWR_MASK 0x00c00000 #define AVR32_USBB_UPCFG6_DATASIZERDWR_OFFSET 22 #define AVR32_USBB_UPCFG6_DATASIZERDWR_SIZE 2 #define AVR32_USBB_UPCFG6_INTFRQ 24 #define AVR32_USBB_UPCFG6_INTFRQ_MASK 0xff000000 #define AVR32_USBB_UPCFG6_INTFRQ_OFFSET 24 #define AVR32_USBB_UPCFG6_INTFRQ_SIZE 8 #define AVR32_USBB_UPCFG6_PBK 2 #define AVR32_USBB_UPCFG6_PBK_DOUBLE 0x00000001 #define AVR32_USBB_UPCFG6_PBK_MASK 0x0000000c #define AVR32_USBB_UPCFG6_PBK_OFFSET 2 #define AVR32_USBB_UPCFG6_PBK_SINGLE 0x00000000 #define AVR32_USBB_UPCFG6_PBK_SIZE 2 #define AVR32_USBB_UPCFG6_PBK_TRIPLE 0x00000002 #define AVR32_USBB_UPCFG6_PEPNUM 16 #define AVR32_USBB_UPCFG6_PEPNUM_MASK 0x000f0000 #define AVR32_USBB_UPCFG6_PEPNUM_OFFSET 16 #define AVR32_USBB_UPCFG6_PEPNUM_SIZE 4 #define AVR32_USBB_UPCFG6_PINGEN 20 #define AVR32_USBB_UPCFG6_PINGEN_MASK 0x00100000 #define AVR32_USBB_UPCFG6_PINGEN_OFFSET 20 #define AVR32_USBB_UPCFG6_PINGEN_SIZE 1 #define AVR32_USBB_UPCFG6_PSIZE 4 #define AVR32_USBB_UPCFG6_PSIZE_1024 0x00000007 #define AVR32_USBB_UPCFG6_PSIZE_128 0x00000004 #define AVR32_USBB_UPCFG6_PSIZE_16 0x00000001 #define AVR32_USBB_UPCFG6_PSIZE_256 0x00000005 #define AVR32_USBB_UPCFG6_PSIZE_32 0x00000002 #define AVR32_USBB_UPCFG6_PSIZE_512 0x00000006 #define AVR32_USBB_UPCFG6_PSIZE_64 0x00000003 #define AVR32_USBB_UPCFG6_PSIZE_8 0x00000000 #define AVR32_USBB_UPCFG6_PSIZE_MASK 0x00000070 #define AVR32_USBB_UPCFG6_PSIZE_OFFSET 4 #define AVR32_USBB_UPCFG6_PSIZE_SIZE 3 #define AVR32_USBB_UPCFG6_PTOKEN 8 #define AVR32_USBB_UPCFG6_PTOKEN_IN 0x00000001 #define AVR32_USBB_UPCFG6_PTOKEN_MASK 0x00000300 #define AVR32_USBB_UPCFG6_PTOKEN_OFFSET 8 #define AVR32_USBB_UPCFG6_PTOKEN_OUT 0x00000002 #define AVR32_USBB_UPCFG6_PTOKEN_SETUP 0x00000000 #define AVR32_USBB_UPCFG6_PTOKEN_SIZE 2 #define AVR32_USBB_UPCFG6_PTYPE 12 #define AVR32_USBB_UPCFG6_PTYPE_BULK 0x00000002 #define AVR32_USBB_UPCFG6_PTYPE_CONTROL 0x00000000 #define AVR32_USBB_UPCFG6_PTYPE_INTERRUPT 0x00000003 #define AVR32_USBB_UPCFG6_PTYPE_ISOCHRONOUS 0x00000001 #define AVR32_USBB_UPCFG6_PTYPE_MASK 0x00003000 #define AVR32_USBB_UPCFG6_PTYPE_OFFSET 12 #define AVR32_USBB_UPCFG6_PTYPE_SIZE 2 #define AVR32_USBB_UPCON0 0x000005c0 #define AVR32_USBB_UPCON0CLR 0x00000620 #define AVR32_USBB_UPCON0CLR_FIFOCONC 14 #define AVR32_USBB_UPCON0CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UPCON0CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UPCON0CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UPCON0CLR_NAKEDEC 4 #define AVR32_USBB_UPCON0CLR_NAKEDEC_MASK 0x00000010 #define AVR32_USBB_UPCON0CLR_NAKEDEC_OFFSET 4 #define AVR32_USBB_UPCON0CLR_NAKEDEC_SIZE 1 #define AVR32_USBB_UPCON0CLR_NBUSYBKEC 12 #define AVR32_USBB_UPCON0CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UPCON0CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UPCON0CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UPCON0CLR_OVERFIEC 5 #define AVR32_USBB_UPCON0CLR_OVERFIEC_MASK 0x00000020 #define AVR32_USBB_UPCON0CLR_OVERFIEC_OFFSET 5 #define AVR32_USBB_UPCON0CLR_OVERFIEC_SIZE 1 #define AVR32_USBB_UPCON0CLR_PDISHDMAC 16 #define AVR32_USBB_UPCON0CLR_PDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UPCON0CLR_PDISHDMAC_OFFSET 16 #define AVR32_USBB_UPCON0CLR_PDISHDMAC_SIZE 1 #define AVR32_USBB_UPCON0CLR_PERREC 3 #define AVR32_USBB_UPCON0CLR_PERREC_MASK 0x00000008 #define AVR32_USBB_UPCON0CLR_PERREC_OFFSET 3 #define AVR32_USBB_UPCON0CLR_PERREC_SIZE 1 #define AVR32_USBB_UPCON0CLR_PFREEZEC 17 #define AVR32_USBB_UPCON0CLR_PFREEZEC_MASK 0x00020000 #define AVR32_USBB_UPCON0CLR_PFREEZEC_OFFSET 17 #define AVR32_USBB_UPCON0CLR_PFREEZEC_SIZE 1 #define AVR32_USBB_UPCON0CLR_RXINEC 0 #define AVR32_USBB_UPCON0CLR_RXINEC_MASK 0x00000001 #define AVR32_USBB_UPCON0CLR_RXINEC_OFFSET 0 #define AVR32_USBB_UPCON0CLR_RXINEC_SIZE 1 #define AVR32_USBB_UPCON0CLR_RXSTALLDEC 6 #define AVR32_USBB_UPCON0CLR_RXSTALLDEC_MASK 0x00000040 #define AVR32_USBB_UPCON0CLR_RXSTALLDEC_OFFSET 6 #define AVR32_USBB_UPCON0CLR_RXSTALLDEC_SIZE 1 #define AVR32_USBB_UPCON0CLR_SHORTPACKETIEC 7 #define AVR32_USBB_UPCON0CLR_SHORTPACKETIEC_MASK 0x00000080 #define AVR32_USBB_UPCON0CLR_SHORTPACKETIEC_OFFSET 7 #define AVR32_USBB_UPCON0CLR_SHORTPACKETIEC_SIZE 1 #define AVR32_USBB_UPCON0CLR_TXOUTEC 1 #define AVR32_USBB_UPCON0CLR_TXOUTEC_MASK 0x00000002 #define AVR32_USBB_UPCON0CLR_TXOUTEC_OFFSET 1 #define AVR32_USBB_UPCON0CLR_TXOUTEC_SIZE 1 #define AVR32_USBB_UPCON0CLR_TXSTPEC 2 #define AVR32_USBB_UPCON0CLR_TXSTPEC_MASK 0x00000004 #define AVR32_USBB_UPCON0CLR_TXSTPEC_OFFSET 2 #define AVR32_USBB_UPCON0CLR_TXSTPEC_SIZE 1 #define AVR32_USBB_UPCON0SET 0x000005f0 #define AVR32_USBB_UPCON0SET_NAKEDES 4 #define AVR32_USBB_UPCON0SET_NAKEDES_MASK 0x00000010 #define AVR32_USBB_UPCON0SET_NAKEDES_OFFSET 4 #define AVR32_USBB_UPCON0SET_NAKEDES_SIZE 1 #define AVR32_USBB_UPCON0SET_NBUSYBKES 12 #define AVR32_USBB_UPCON0SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UPCON0SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UPCON0SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UPCON0SET_OVERFIES 5 #define AVR32_USBB_UPCON0SET_OVERFIES_MASK 0x00000020 #define AVR32_USBB_UPCON0SET_OVERFIES_OFFSET 5 #define AVR32_USBB_UPCON0SET_OVERFIES_SIZE 1 #define AVR32_USBB_UPCON0SET_PDISHDMAS 16 #define AVR32_USBB_UPCON0SET_PDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UPCON0SET_PDISHDMAS_OFFSET 16 #define AVR32_USBB_UPCON0SET_PDISHDMAS_SIZE 1 #define AVR32_USBB_UPCON0SET_PERRES 3 #define AVR32_USBB_UPCON0SET_PERRES_MASK 0x00000008 #define AVR32_USBB_UPCON0SET_PERRES_OFFSET 3 #define AVR32_USBB_UPCON0SET_PERRES_SIZE 1 #define AVR32_USBB_UPCON0SET_PFREEZES 17 #define AVR32_USBB_UPCON0SET_PFREEZES_MASK 0x00020000 #define AVR32_USBB_UPCON0SET_PFREEZES_OFFSET 17 #define AVR32_USBB_UPCON0SET_PFREEZES_SIZE 1 #define AVR32_USBB_UPCON0SET_RSTDTS 18 #define AVR32_USBB_UPCON0SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UPCON0SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UPCON0SET_RSTDTS_SIZE 1 #define AVR32_USBB_UPCON0SET_RXINES 0 #define AVR32_USBB_UPCON0SET_RXINES_MASK 0x00000001 #define AVR32_USBB_UPCON0SET_RXINES_OFFSET 0 #define AVR32_USBB_UPCON0SET_RXINES_SIZE 1 #define AVR32_USBB_UPCON0SET_RXSTALLDES 6 #define AVR32_USBB_UPCON0SET_RXSTALLDES_MASK 0x00000040 #define AVR32_USBB_UPCON0SET_RXSTALLDES_OFFSET 6 #define AVR32_USBB_UPCON0SET_RXSTALLDES_SIZE 1 #define AVR32_USBB_UPCON0SET_SHORTPACKETIES 7 #define AVR32_USBB_UPCON0SET_SHORTPACKETIES_MASK 0x00000080 #define AVR32_USBB_UPCON0SET_SHORTPACKETIES_OFFSET 7 #define AVR32_USBB_UPCON0SET_SHORTPACKETIES_SIZE 1 #define AVR32_USBB_UPCON0SET_TXOUTES 1 #define AVR32_USBB_UPCON0SET_TXOUTES_MASK 0x00000002 #define AVR32_USBB_UPCON0SET_TXOUTES_OFFSET 1 #define AVR32_USBB_UPCON0SET_TXOUTES_SIZE 1 #define AVR32_USBB_UPCON0SET_TXSTPES 2 #define AVR32_USBB_UPCON0SET_TXSTPES_MASK 0x00000004 #define AVR32_USBB_UPCON0SET_TXSTPES_OFFSET 2 #define AVR32_USBB_UPCON0SET_TXSTPES_SIZE 1 #define AVR32_USBB_UPCON0_FIFOCON 14 #define AVR32_USBB_UPCON0_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UPCON0_FIFOCON_OFFSET 14 #define AVR32_USBB_UPCON0_FIFOCON_SIZE 1 #define AVR32_USBB_UPCON0_NAKEDE 4 #define AVR32_USBB_UPCON0_NAKEDE_MASK 0x00000010 #define AVR32_USBB_UPCON0_NAKEDE_OFFSET 4 #define AVR32_USBB_UPCON0_NAKEDE_SIZE 1 #define AVR32_USBB_UPCON0_NBUSYBKE 12 #define AVR32_USBB_UPCON0_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UPCON0_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UPCON0_NBUSYBKE_SIZE 1 #define AVR32_USBB_UPCON0_OVERFIE 5 #define AVR32_USBB_UPCON0_OVERFIE_MASK 0x00000020 #define AVR32_USBB_UPCON0_OVERFIE_OFFSET 5 #define AVR32_USBB_UPCON0_OVERFIE_SIZE 1 #define AVR32_USBB_UPCON0_PDISHDMA 16 #define AVR32_USBB_UPCON0_PDISHDMA_MASK 0x00010000 #define AVR32_USBB_UPCON0_PDISHDMA_OFFSET 16 #define AVR32_USBB_UPCON0_PDISHDMA_SIZE 1 #define AVR32_USBB_UPCON0_PERRE 3 #define AVR32_USBB_UPCON0_PERRE_MASK 0x00000008 #define AVR32_USBB_UPCON0_PERRE_OFFSET 3 #define AVR32_USBB_UPCON0_PERRE_SIZE 1 #define AVR32_USBB_UPCON0_PFREEZE 17 #define AVR32_USBB_UPCON0_PFREEZE_MASK 0x00020000 #define AVR32_USBB_UPCON0_PFREEZE_OFFSET 17 #define AVR32_USBB_UPCON0_PFREEZE_SIZE 1 #define AVR32_USBB_UPCON0_RSTDT 18 #define AVR32_USBB_UPCON0_RSTDT_MASK 0x00040000 #define AVR32_USBB_UPCON0_RSTDT_OFFSET 18 #define AVR32_USBB_UPCON0_RSTDT_SIZE 1 #define AVR32_USBB_UPCON0_RXINE 0 #define AVR32_USBB_UPCON0_RXINE_MASK 0x00000001 #define AVR32_USBB_UPCON0_RXINE_OFFSET 0 #define AVR32_USBB_UPCON0_RXINE_SIZE 1 #define AVR32_USBB_UPCON0_RXSTALLDE 6 #define AVR32_USBB_UPCON0_RXSTALLDE_MASK 0x00000040 #define AVR32_USBB_UPCON0_RXSTALLDE_OFFSET 6 #define AVR32_USBB_UPCON0_RXSTALLDE_SIZE 1 #define AVR32_USBB_UPCON0_SHORTPACKETIE 7 #define AVR32_USBB_UPCON0_SHORTPACKETIE_MASK 0x00000080 #define AVR32_USBB_UPCON0_SHORTPACKETIE_OFFSET 7 #define AVR32_USBB_UPCON0_SHORTPACKETIE_SIZE 1 #define AVR32_USBB_UPCON0_TXOUTE 1 #define AVR32_USBB_UPCON0_TXOUTE_MASK 0x00000002 #define AVR32_USBB_UPCON0_TXOUTE_OFFSET 1 #define AVR32_USBB_UPCON0_TXOUTE_SIZE 1 #define AVR32_USBB_UPCON0_TXSTPE 2 #define AVR32_USBB_UPCON0_TXSTPE_MASK 0x00000004 #define AVR32_USBB_UPCON0_TXSTPE_OFFSET 2 #define AVR32_USBB_UPCON0_TXSTPE_SIZE 1 #define AVR32_USBB_UPCON1 0x000005c4 #define AVR32_USBB_UPCON1CLR 0x00000624 #define AVR32_USBB_UPCON1CLR_FIFOCONC 14 #define AVR32_USBB_UPCON1CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UPCON1CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UPCON1CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UPCON1CLR_NAKEDEC 4 #define AVR32_USBB_UPCON1CLR_NAKEDEC_MASK 0x00000010 #define AVR32_USBB_UPCON1CLR_NAKEDEC_OFFSET 4 #define AVR32_USBB_UPCON1CLR_NAKEDEC_SIZE 1 #define AVR32_USBB_UPCON1CLR_NBUSYBKEC 12 #define AVR32_USBB_UPCON1CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UPCON1CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UPCON1CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UPCON1CLR_OVERFIEC 5 #define AVR32_USBB_UPCON1CLR_OVERFIEC_MASK 0x00000020 #define AVR32_USBB_UPCON1CLR_OVERFIEC_OFFSET 5 #define AVR32_USBB_UPCON1CLR_OVERFIEC_SIZE 1 #define AVR32_USBB_UPCON1CLR_PDISHDMAC 16 #define AVR32_USBB_UPCON1CLR_PDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UPCON1CLR_PDISHDMAC_OFFSET 16 #define AVR32_USBB_UPCON1CLR_PDISHDMAC_SIZE 1 #define AVR32_USBB_UPCON1CLR_PERREC 3 #define AVR32_USBB_UPCON1CLR_PERREC_MASK 0x00000008 #define AVR32_USBB_UPCON1CLR_PERREC_OFFSET 3 #define AVR32_USBB_UPCON1CLR_PERREC_SIZE 1 #define AVR32_USBB_UPCON1CLR_PFREEZEC 17 #define AVR32_USBB_UPCON1CLR_PFREEZEC_MASK 0x00020000 #define AVR32_USBB_UPCON1CLR_PFREEZEC_OFFSET 17 #define AVR32_USBB_UPCON1CLR_PFREEZEC_SIZE 1 #define AVR32_USBB_UPCON1CLR_RXINEC 0 #define AVR32_USBB_UPCON1CLR_RXINEC_MASK 0x00000001 #define AVR32_USBB_UPCON1CLR_RXINEC_OFFSET 0 #define AVR32_USBB_UPCON1CLR_RXINEC_SIZE 1 #define AVR32_USBB_UPCON1CLR_RXSTALLDEC 6 #define AVR32_USBB_UPCON1CLR_RXSTALLDEC_MASK 0x00000040 #define AVR32_USBB_UPCON1CLR_RXSTALLDEC_OFFSET 6 #define AVR32_USBB_UPCON1CLR_RXSTALLDEC_SIZE 1 #define AVR32_USBB_UPCON1CLR_SHORTPACKETIEC 7 #define AVR32_USBB_UPCON1CLR_SHORTPACKETIEC_MASK 0x00000080 #define AVR32_USBB_UPCON1CLR_SHORTPACKETIEC_OFFSET 7 #define AVR32_USBB_UPCON1CLR_SHORTPACKETIEC_SIZE 1 #define AVR32_USBB_UPCON1CLR_TXOUTEC 1 #define AVR32_USBB_UPCON1CLR_TXOUTEC_MASK 0x00000002 #define AVR32_USBB_UPCON1CLR_TXOUTEC_OFFSET 1 #define AVR32_USBB_UPCON1CLR_TXOUTEC_SIZE 1 #define AVR32_USBB_UPCON1CLR_TXSTPEC 2 #define AVR32_USBB_UPCON1CLR_TXSTPEC_MASK 0x00000004 #define AVR32_USBB_UPCON1CLR_TXSTPEC_OFFSET 2 #define AVR32_USBB_UPCON1CLR_TXSTPEC_SIZE 1 #define AVR32_USBB_UPCON1SET 0x000005f4 #define AVR32_USBB_UPCON1SET_NAKEDES 4 #define AVR32_USBB_UPCON1SET_NAKEDES_MASK 0x00000010 #define AVR32_USBB_UPCON1SET_NAKEDES_OFFSET 4 #define AVR32_USBB_UPCON1SET_NAKEDES_SIZE 1 #define AVR32_USBB_UPCON1SET_NBUSYBKES 12 #define AVR32_USBB_UPCON1SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UPCON1SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UPCON1SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UPCON1SET_OVERFIES 5 #define AVR32_USBB_UPCON1SET_OVERFIES_MASK 0x00000020 #define AVR32_USBB_UPCON1SET_OVERFIES_OFFSET 5 #define AVR32_USBB_UPCON1SET_OVERFIES_SIZE 1 #define AVR32_USBB_UPCON1SET_PDISHDMAS 16 #define AVR32_USBB_UPCON1SET_PDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UPCON1SET_PDISHDMAS_OFFSET 16 #define AVR32_USBB_UPCON1SET_PDISHDMAS_SIZE 1 #define AVR32_USBB_UPCON1SET_PERRES 3 #define AVR32_USBB_UPCON1SET_PERRES_MASK 0x00000008 #define AVR32_USBB_UPCON1SET_PERRES_OFFSET 3 #define AVR32_USBB_UPCON1SET_PERRES_SIZE 1 #define AVR32_USBB_UPCON1SET_PFREEZES 17 #define AVR32_USBB_UPCON1SET_PFREEZES_MASK 0x00020000 #define AVR32_USBB_UPCON1SET_PFREEZES_OFFSET 17 #define AVR32_USBB_UPCON1SET_PFREEZES_SIZE 1 #define AVR32_USBB_UPCON1SET_RSTDTS 18 #define AVR32_USBB_UPCON1SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UPCON1SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UPCON1SET_RSTDTS_SIZE 1 #define AVR32_USBB_UPCON1SET_RXINES 0 #define AVR32_USBB_UPCON1SET_RXINES_MASK 0x00000001 #define AVR32_USBB_UPCON1SET_RXINES_OFFSET 0 #define AVR32_USBB_UPCON1SET_RXINES_SIZE 1 #define AVR32_USBB_UPCON1SET_RXSTALLDES 6 #define AVR32_USBB_UPCON1SET_RXSTALLDES_MASK 0x00000040 #define AVR32_USBB_UPCON1SET_RXSTALLDES_OFFSET 6 #define AVR32_USBB_UPCON1SET_RXSTALLDES_SIZE 1 #define AVR32_USBB_UPCON1SET_SHORTPACKETIES 7 #define AVR32_USBB_UPCON1SET_SHORTPACKETIES_MASK 0x00000080 #define AVR32_USBB_UPCON1SET_SHORTPACKETIES_OFFSET 7 #define AVR32_USBB_UPCON1SET_SHORTPACKETIES_SIZE 1 #define AVR32_USBB_UPCON1SET_TXOUTES 1 #define AVR32_USBB_UPCON1SET_TXOUTES_MASK 0x00000002 #define AVR32_USBB_UPCON1SET_TXOUTES_OFFSET 1 #define AVR32_USBB_UPCON1SET_TXOUTES_SIZE 1 #define AVR32_USBB_UPCON1SET_TXSTPES 2 #define AVR32_USBB_UPCON1SET_TXSTPES_MASK 0x00000004 #define AVR32_USBB_UPCON1SET_TXSTPES_OFFSET 2 #define AVR32_USBB_UPCON1SET_TXSTPES_SIZE 1 #define AVR32_USBB_UPCON1_FIFOCON 14 #define AVR32_USBB_UPCON1_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UPCON1_FIFOCON_OFFSET 14 #define AVR32_USBB_UPCON1_FIFOCON_SIZE 1 #define AVR32_USBB_UPCON1_NAKEDE 4 #define AVR32_USBB_UPCON1_NAKEDE_MASK 0x00000010 #define AVR32_USBB_UPCON1_NAKEDE_OFFSET 4 #define AVR32_USBB_UPCON1_NAKEDE_SIZE 1 #define AVR32_USBB_UPCON1_NBUSYBKE 12 #define AVR32_USBB_UPCON1_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UPCON1_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UPCON1_NBUSYBKE_SIZE 1 #define AVR32_USBB_UPCON1_OVERFIE 5 #define AVR32_USBB_UPCON1_OVERFIE_MASK 0x00000020 #define AVR32_USBB_UPCON1_OVERFIE_OFFSET 5 #define AVR32_USBB_UPCON1_OVERFIE_SIZE 1 #define AVR32_USBB_UPCON1_PDISHDMA 16 #define AVR32_USBB_UPCON1_PDISHDMA_MASK 0x00010000 #define AVR32_USBB_UPCON1_PDISHDMA_OFFSET 16 #define AVR32_USBB_UPCON1_PDISHDMA_SIZE 1 #define AVR32_USBB_UPCON1_PERRE 3 #define AVR32_USBB_UPCON1_PERRE_MASK 0x00000008 #define AVR32_USBB_UPCON1_PERRE_OFFSET 3 #define AVR32_USBB_UPCON1_PERRE_SIZE 1 #define AVR32_USBB_UPCON1_PFREEZE 17 #define AVR32_USBB_UPCON1_PFREEZE_MASK 0x00020000 #define AVR32_USBB_UPCON1_PFREEZE_OFFSET 17 #define AVR32_USBB_UPCON1_PFREEZE_SIZE 1 #define AVR32_USBB_UPCON1_RSTDT 18 #define AVR32_USBB_UPCON1_RSTDT_MASK 0x00040000 #define AVR32_USBB_UPCON1_RSTDT_OFFSET 18 #define AVR32_USBB_UPCON1_RSTDT_SIZE 1 #define AVR32_USBB_UPCON1_RXINE 0 #define AVR32_USBB_UPCON1_RXINE_MASK 0x00000001 #define AVR32_USBB_UPCON1_RXINE_OFFSET 0 #define AVR32_USBB_UPCON1_RXINE_SIZE 1 #define AVR32_USBB_UPCON1_RXSTALLDE 6 #define AVR32_USBB_UPCON1_RXSTALLDE_MASK 0x00000040 #define AVR32_USBB_UPCON1_RXSTALLDE_OFFSET 6 #define AVR32_USBB_UPCON1_RXSTALLDE_SIZE 1 #define AVR32_USBB_UPCON1_SHORTPACKETIE 7 #define AVR32_USBB_UPCON1_SHORTPACKETIE_MASK 0x00000080 #define AVR32_USBB_UPCON1_SHORTPACKETIE_OFFSET 7 #define AVR32_USBB_UPCON1_SHORTPACKETIE_SIZE 1 #define AVR32_USBB_UPCON1_TXOUTE 1 #define AVR32_USBB_UPCON1_TXOUTE_MASK 0x00000002 #define AVR32_USBB_UPCON1_TXOUTE_OFFSET 1 #define AVR32_USBB_UPCON1_TXOUTE_SIZE 1 #define AVR32_USBB_UPCON1_TXSTPE 2 #define AVR32_USBB_UPCON1_TXSTPE_MASK 0x00000004 #define AVR32_USBB_UPCON1_TXSTPE_OFFSET 2 #define AVR32_USBB_UPCON1_TXSTPE_SIZE 1 #define AVR32_USBB_UPCON2 0x000005c8 #define AVR32_USBB_UPCON2CLR 0x00000628 #define AVR32_USBB_UPCON2CLR_FIFOCONC 14 #define AVR32_USBB_UPCON2CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UPCON2CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UPCON2CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UPCON2CLR_NAKEDEC 4 #define AVR32_USBB_UPCON2CLR_NAKEDEC_MASK 0x00000010 #define AVR32_USBB_UPCON2CLR_NAKEDEC_OFFSET 4 #define AVR32_USBB_UPCON2CLR_NAKEDEC_SIZE 1 #define AVR32_USBB_UPCON2CLR_NBUSYBKEC 12 #define AVR32_USBB_UPCON2CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UPCON2CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UPCON2CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UPCON2CLR_OVERFIEC 5 #define AVR32_USBB_UPCON2CLR_OVERFIEC_MASK 0x00000020 #define AVR32_USBB_UPCON2CLR_OVERFIEC_OFFSET 5 #define AVR32_USBB_UPCON2CLR_OVERFIEC_SIZE 1 #define AVR32_USBB_UPCON2CLR_PDISHDMAC 16 #define AVR32_USBB_UPCON2CLR_PDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UPCON2CLR_PDISHDMAC_OFFSET 16 #define AVR32_USBB_UPCON2CLR_PDISHDMAC_SIZE 1 #define AVR32_USBB_UPCON2CLR_PERREC 3 #define AVR32_USBB_UPCON2CLR_PERREC_MASK 0x00000008 #define AVR32_USBB_UPCON2CLR_PERREC_OFFSET 3 #define AVR32_USBB_UPCON2CLR_PERREC_SIZE 1 #define AVR32_USBB_UPCON2CLR_PFREEZEC 17 #define AVR32_USBB_UPCON2CLR_PFREEZEC_MASK 0x00020000 #define AVR32_USBB_UPCON2CLR_PFREEZEC_OFFSET 17 #define AVR32_USBB_UPCON2CLR_PFREEZEC_SIZE 1 #define AVR32_USBB_UPCON2CLR_RXINEC 0 #define AVR32_USBB_UPCON2CLR_RXINEC_MASK 0x00000001 #define AVR32_USBB_UPCON2CLR_RXINEC_OFFSET 0 #define AVR32_USBB_UPCON2CLR_RXINEC_SIZE 1 #define AVR32_USBB_UPCON2CLR_RXSTALLDEC 6 #define AVR32_USBB_UPCON2CLR_RXSTALLDEC_MASK 0x00000040 #define AVR32_USBB_UPCON2CLR_RXSTALLDEC_OFFSET 6 #define AVR32_USBB_UPCON2CLR_RXSTALLDEC_SIZE 1 #define AVR32_USBB_UPCON2CLR_SHORTPACKETIEC 7 #define AVR32_USBB_UPCON2CLR_SHORTPACKETIEC_MASK 0x00000080 #define AVR32_USBB_UPCON2CLR_SHORTPACKETIEC_OFFSET 7 #define AVR32_USBB_UPCON2CLR_SHORTPACKETIEC_SIZE 1 #define AVR32_USBB_UPCON2CLR_TXOUTEC 1 #define AVR32_USBB_UPCON2CLR_TXOUTEC_MASK 0x00000002 #define AVR32_USBB_UPCON2CLR_TXOUTEC_OFFSET 1 #define AVR32_USBB_UPCON2CLR_TXOUTEC_SIZE 1 #define AVR32_USBB_UPCON2CLR_TXSTPEC 2 #define AVR32_USBB_UPCON2CLR_TXSTPEC_MASK 0x00000004 #define AVR32_USBB_UPCON2CLR_TXSTPEC_OFFSET 2 #define AVR32_USBB_UPCON2CLR_TXSTPEC_SIZE 1 #define AVR32_USBB_UPCON2SET 0x000005f8 #define AVR32_USBB_UPCON2SET_NAKEDES 4 #define AVR32_USBB_UPCON2SET_NAKEDES_MASK 0x00000010 #define AVR32_USBB_UPCON2SET_NAKEDES_OFFSET 4 #define AVR32_USBB_UPCON2SET_NAKEDES_SIZE 1 #define AVR32_USBB_UPCON2SET_NBUSYBKES 12 #define AVR32_USBB_UPCON2SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UPCON2SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UPCON2SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UPCON2SET_OVERFIES 5 #define AVR32_USBB_UPCON2SET_OVERFIES_MASK 0x00000020 #define AVR32_USBB_UPCON2SET_OVERFIES_OFFSET 5 #define AVR32_USBB_UPCON2SET_OVERFIES_SIZE 1 #define AVR32_USBB_UPCON2SET_PDISHDMAS 16 #define AVR32_USBB_UPCON2SET_PDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UPCON2SET_PDISHDMAS_OFFSET 16 #define AVR32_USBB_UPCON2SET_PDISHDMAS_SIZE 1 #define AVR32_USBB_UPCON2SET_PERRES 3 #define AVR32_USBB_UPCON2SET_PERRES_MASK 0x00000008 #define AVR32_USBB_UPCON2SET_PERRES_OFFSET 3 #define AVR32_USBB_UPCON2SET_PERRES_SIZE 1 #define AVR32_USBB_UPCON2SET_PFREEZES 17 #define AVR32_USBB_UPCON2SET_PFREEZES_MASK 0x00020000 #define AVR32_USBB_UPCON2SET_PFREEZES_OFFSET 17 #define AVR32_USBB_UPCON2SET_PFREEZES_SIZE 1 #define AVR32_USBB_UPCON2SET_RSTDTS 18 #define AVR32_USBB_UPCON2SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UPCON2SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UPCON2SET_RSTDTS_SIZE 1 #define AVR32_USBB_UPCON2SET_RXINES 0 #define AVR32_USBB_UPCON2SET_RXINES_MASK 0x00000001 #define AVR32_USBB_UPCON2SET_RXINES_OFFSET 0 #define AVR32_USBB_UPCON2SET_RXINES_SIZE 1 #define AVR32_USBB_UPCON2SET_RXSTALLDES 6 #define AVR32_USBB_UPCON2SET_RXSTALLDES_MASK 0x00000040 #define AVR32_USBB_UPCON2SET_RXSTALLDES_OFFSET 6 #define AVR32_USBB_UPCON2SET_RXSTALLDES_SIZE 1 #define AVR32_USBB_UPCON2SET_SHORTPACKETIES 7 #define AVR32_USBB_UPCON2SET_SHORTPACKETIES_MASK 0x00000080 #define AVR32_USBB_UPCON2SET_SHORTPACKETIES_OFFSET 7 #define AVR32_USBB_UPCON2SET_SHORTPACKETIES_SIZE 1 #define AVR32_USBB_UPCON2SET_TXOUTES 1 #define AVR32_USBB_UPCON2SET_TXOUTES_MASK 0x00000002 #define AVR32_USBB_UPCON2SET_TXOUTES_OFFSET 1 #define AVR32_USBB_UPCON2SET_TXOUTES_SIZE 1 #define AVR32_USBB_UPCON2SET_TXSTPES 2 #define AVR32_USBB_UPCON2SET_TXSTPES_MASK 0x00000004 #define AVR32_USBB_UPCON2SET_TXSTPES_OFFSET 2 #define AVR32_USBB_UPCON2SET_TXSTPES_SIZE 1 #define AVR32_USBB_UPCON2_FIFOCON 14 #define AVR32_USBB_UPCON2_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UPCON2_FIFOCON_OFFSET 14 #define AVR32_USBB_UPCON2_FIFOCON_SIZE 1 #define AVR32_USBB_UPCON2_NAKEDE 4 #define AVR32_USBB_UPCON2_NAKEDE_MASK 0x00000010 #define AVR32_USBB_UPCON2_NAKEDE_OFFSET 4 #define AVR32_USBB_UPCON2_NAKEDE_SIZE 1 #define AVR32_USBB_UPCON2_NBUSYBKE 12 #define AVR32_USBB_UPCON2_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UPCON2_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UPCON2_NBUSYBKE_SIZE 1 #define AVR32_USBB_UPCON2_OVERFIE 5 #define AVR32_USBB_UPCON2_OVERFIE_MASK 0x00000020 #define AVR32_USBB_UPCON2_OVERFIE_OFFSET 5 #define AVR32_USBB_UPCON2_OVERFIE_SIZE 1 #define AVR32_USBB_UPCON2_PDISHDMA 16 #define AVR32_USBB_UPCON2_PDISHDMA_MASK 0x00010000 #define AVR32_USBB_UPCON2_PDISHDMA_OFFSET 16 #define AVR32_USBB_UPCON2_PDISHDMA_SIZE 1 #define AVR32_USBB_UPCON2_PERRE 3 #define AVR32_USBB_UPCON2_PERRE_MASK 0x00000008 #define AVR32_USBB_UPCON2_PERRE_OFFSET 3 #define AVR32_USBB_UPCON2_PERRE_SIZE 1 #define AVR32_USBB_UPCON2_PFREEZE 17 #define AVR32_USBB_UPCON2_PFREEZE_MASK 0x00020000 #define AVR32_USBB_UPCON2_PFREEZE_OFFSET 17 #define AVR32_USBB_UPCON2_PFREEZE_SIZE 1 #define AVR32_USBB_UPCON2_RSTDT 18 #define AVR32_USBB_UPCON2_RSTDT_MASK 0x00040000 #define AVR32_USBB_UPCON2_RSTDT_OFFSET 18 #define AVR32_USBB_UPCON2_RSTDT_SIZE 1 #define AVR32_USBB_UPCON2_RXINE 0 #define AVR32_USBB_UPCON2_RXINE_MASK 0x00000001 #define AVR32_USBB_UPCON2_RXINE_OFFSET 0 #define AVR32_USBB_UPCON2_RXINE_SIZE 1 #define AVR32_USBB_UPCON2_RXSTALLDE 6 #define AVR32_USBB_UPCON2_RXSTALLDE_MASK 0x00000040 #define AVR32_USBB_UPCON2_RXSTALLDE_OFFSET 6 #define AVR32_USBB_UPCON2_RXSTALLDE_SIZE 1 #define AVR32_USBB_UPCON2_SHORTPACKETIE 7 #define AVR32_USBB_UPCON2_SHORTPACKETIE_MASK 0x00000080 #define AVR32_USBB_UPCON2_SHORTPACKETIE_OFFSET 7 #define AVR32_USBB_UPCON2_SHORTPACKETIE_SIZE 1 #define AVR32_USBB_UPCON2_TXOUTE 1 #define AVR32_USBB_UPCON2_TXOUTE_MASK 0x00000002 #define AVR32_USBB_UPCON2_TXOUTE_OFFSET 1 #define AVR32_USBB_UPCON2_TXOUTE_SIZE 1 #define AVR32_USBB_UPCON2_TXSTPE 2 #define AVR32_USBB_UPCON2_TXSTPE_MASK 0x00000004 #define AVR32_USBB_UPCON2_TXSTPE_OFFSET 2 #define AVR32_USBB_UPCON2_TXSTPE_SIZE 1 #define AVR32_USBB_UPCON3 0x000005cc #define AVR32_USBB_UPCON3CLR 0x0000062c #define AVR32_USBB_UPCON3CLR_FIFOCONC 14 #define AVR32_USBB_UPCON3CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UPCON3CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UPCON3CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UPCON3CLR_NAKEDEC 4 #define AVR32_USBB_UPCON3CLR_NAKEDEC_MASK 0x00000010 #define AVR32_USBB_UPCON3CLR_NAKEDEC_OFFSET 4 #define AVR32_USBB_UPCON3CLR_NAKEDEC_SIZE 1 #define AVR32_USBB_UPCON3CLR_NBUSYBKEC 12 #define AVR32_USBB_UPCON3CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UPCON3CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UPCON3CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UPCON3CLR_OVERFIEC 5 #define AVR32_USBB_UPCON3CLR_OVERFIEC_MASK 0x00000020 #define AVR32_USBB_UPCON3CLR_OVERFIEC_OFFSET 5 #define AVR32_USBB_UPCON3CLR_OVERFIEC_SIZE 1 #define AVR32_USBB_UPCON3CLR_PDISHDMAC 16 #define AVR32_USBB_UPCON3CLR_PDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UPCON3CLR_PDISHDMAC_OFFSET 16 #define AVR32_USBB_UPCON3CLR_PDISHDMAC_SIZE 1 #define AVR32_USBB_UPCON3CLR_PERREC 3 #define AVR32_USBB_UPCON3CLR_PERREC_MASK 0x00000008 #define AVR32_USBB_UPCON3CLR_PERREC_OFFSET 3 #define AVR32_USBB_UPCON3CLR_PERREC_SIZE 1 #define AVR32_USBB_UPCON3CLR_PFREEZEC 17 #define AVR32_USBB_UPCON3CLR_PFREEZEC_MASK 0x00020000 #define AVR32_USBB_UPCON3CLR_PFREEZEC_OFFSET 17 #define AVR32_USBB_UPCON3CLR_PFREEZEC_SIZE 1 #define AVR32_USBB_UPCON3CLR_RXINEC 0 #define AVR32_USBB_UPCON3CLR_RXINEC_MASK 0x00000001 #define AVR32_USBB_UPCON3CLR_RXINEC_OFFSET 0 #define AVR32_USBB_UPCON3CLR_RXINEC_SIZE 1 #define AVR32_USBB_UPCON3CLR_RXSTALLDEC 6 #define AVR32_USBB_UPCON3CLR_RXSTALLDEC_MASK 0x00000040 #define AVR32_USBB_UPCON3CLR_RXSTALLDEC_OFFSET 6 #define AVR32_USBB_UPCON3CLR_RXSTALLDEC_SIZE 1 #define AVR32_USBB_UPCON3CLR_SHORTPACKETIEC 7 #define AVR32_USBB_UPCON3CLR_SHORTPACKETIEC_MASK 0x00000080 #define AVR32_USBB_UPCON3CLR_SHORTPACKETIEC_OFFSET 7 #define AVR32_USBB_UPCON3CLR_SHORTPACKETIEC_SIZE 1 #define AVR32_USBB_UPCON3CLR_TXOUTEC 1 #define AVR32_USBB_UPCON3CLR_TXOUTEC_MASK 0x00000002 #define AVR32_USBB_UPCON3CLR_TXOUTEC_OFFSET 1 #define AVR32_USBB_UPCON3CLR_TXOUTEC_SIZE 1 #define AVR32_USBB_UPCON3CLR_TXSTPEC 2 #define AVR32_USBB_UPCON3CLR_TXSTPEC_MASK 0x00000004 #define AVR32_USBB_UPCON3CLR_TXSTPEC_OFFSET 2 #define AVR32_USBB_UPCON3CLR_TXSTPEC_SIZE 1 #define AVR32_USBB_UPCON3SET 0x000005fc #define AVR32_USBB_UPCON3SET_NAKEDES 4 #define AVR32_USBB_UPCON3SET_NAKEDES_MASK 0x00000010 #define AVR32_USBB_UPCON3SET_NAKEDES_OFFSET 4 #define AVR32_USBB_UPCON3SET_NAKEDES_SIZE 1 #define AVR32_USBB_UPCON3SET_NBUSYBKES 12 #define AVR32_USBB_UPCON3SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UPCON3SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UPCON3SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UPCON3SET_OVERFIES 5 #define AVR32_USBB_UPCON3SET_OVERFIES_MASK 0x00000020 #define AVR32_USBB_UPCON3SET_OVERFIES_OFFSET 5 #define AVR32_USBB_UPCON3SET_OVERFIES_SIZE 1 #define AVR32_USBB_UPCON3SET_PDISHDMAS 16 #define AVR32_USBB_UPCON3SET_PDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UPCON3SET_PDISHDMAS_OFFSET 16 #define AVR32_USBB_UPCON3SET_PDISHDMAS_SIZE 1 #define AVR32_USBB_UPCON3SET_PERRES 3 #define AVR32_USBB_UPCON3SET_PERRES_MASK 0x00000008 #define AVR32_USBB_UPCON3SET_PERRES_OFFSET 3 #define AVR32_USBB_UPCON3SET_PERRES_SIZE 1 #define AVR32_USBB_UPCON3SET_PFREEZES 17 #define AVR32_USBB_UPCON3SET_PFREEZES_MASK 0x00020000 #define AVR32_USBB_UPCON3SET_PFREEZES_OFFSET 17 #define AVR32_USBB_UPCON3SET_PFREEZES_SIZE 1 #define AVR32_USBB_UPCON3SET_RSTDTS 18 #define AVR32_USBB_UPCON3SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UPCON3SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UPCON3SET_RSTDTS_SIZE 1 #define AVR32_USBB_UPCON3SET_RXINES 0 #define AVR32_USBB_UPCON3SET_RXINES_MASK 0x00000001 #define AVR32_USBB_UPCON3SET_RXINES_OFFSET 0 #define AVR32_USBB_UPCON3SET_RXINES_SIZE 1 #define AVR32_USBB_UPCON3SET_RXSTALLDES 6 #define AVR32_USBB_UPCON3SET_RXSTALLDES_MASK 0x00000040 #define AVR32_USBB_UPCON3SET_RXSTALLDES_OFFSET 6 #define AVR32_USBB_UPCON3SET_RXSTALLDES_SIZE 1 #define AVR32_USBB_UPCON3SET_SHORTPACKETIES 7 #define AVR32_USBB_UPCON3SET_SHORTPACKETIES_MASK 0x00000080 #define AVR32_USBB_UPCON3SET_SHORTPACKETIES_OFFSET 7 #define AVR32_USBB_UPCON3SET_SHORTPACKETIES_SIZE 1 #define AVR32_USBB_UPCON3SET_TXOUTES 1 #define AVR32_USBB_UPCON3SET_TXOUTES_MASK 0x00000002 #define AVR32_USBB_UPCON3SET_TXOUTES_OFFSET 1 #define AVR32_USBB_UPCON3SET_TXOUTES_SIZE 1 #define AVR32_USBB_UPCON3SET_TXSTPES 2 #define AVR32_USBB_UPCON3SET_TXSTPES_MASK 0x00000004 #define AVR32_USBB_UPCON3SET_TXSTPES_OFFSET 2 #define AVR32_USBB_UPCON3SET_TXSTPES_SIZE 1 #define AVR32_USBB_UPCON3_FIFOCON 14 #define AVR32_USBB_UPCON3_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UPCON3_FIFOCON_OFFSET 14 #define AVR32_USBB_UPCON3_FIFOCON_SIZE 1 #define AVR32_USBB_UPCON3_NAKEDE 4 #define AVR32_USBB_UPCON3_NAKEDE_MASK 0x00000010 #define AVR32_USBB_UPCON3_NAKEDE_OFFSET 4 #define AVR32_USBB_UPCON3_NAKEDE_SIZE 1 #define AVR32_USBB_UPCON3_NBUSYBKE 12 #define AVR32_USBB_UPCON3_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UPCON3_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UPCON3_NBUSYBKE_SIZE 1 #define AVR32_USBB_UPCON3_OVERFIE 5 #define AVR32_USBB_UPCON3_OVERFIE_MASK 0x00000020 #define AVR32_USBB_UPCON3_OVERFIE_OFFSET 5 #define AVR32_USBB_UPCON3_OVERFIE_SIZE 1 #define AVR32_USBB_UPCON3_PDISHDMA 16 #define AVR32_USBB_UPCON3_PDISHDMA_MASK 0x00010000 #define AVR32_USBB_UPCON3_PDISHDMA_OFFSET 16 #define AVR32_USBB_UPCON3_PDISHDMA_SIZE 1 #define AVR32_USBB_UPCON3_PERRE 3 #define AVR32_USBB_UPCON3_PERRE_MASK 0x00000008 #define AVR32_USBB_UPCON3_PERRE_OFFSET 3 #define AVR32_USBB_UPCON3_PERRE_SIZE 1 #define AVR32_USBB_UPCON3_PFREEZE 17 #define AVR32_USBB_UPCON3_PFREEZE_MASK 0x00020000 #define AVR32_USBB_UPCON3_PFREEZE_OFFSET 17 #define AVR32_USBB_UPCON3_PFREEZE_SIZE 1 #define AVR32_USBB_UPCON3_RSTDT 18 #define AVR32_USBB_UPCON3_RSTDT_MASK 0x00040000 #define AVR32_USBB_UPCON3_RSTDT_OFFSET 18 #define AVR32_USBB_UPCON3_RSTDT_SIZE 1 #define AVR32_USBB_UPCON3_RXINE 0 #define AVR32_USBB_UPCON3_RXINE_MASK 0x00000001 #define AVR32_USBB_UPCON3_RXINE_OFFSET 0 #define AVR32_USBB_UPCON3_RXINE_SIZE 1 #define AVR32_USBB_UPCON3_RXSTALLDE 6 #define AVR32_USBB_UPCON3_RXSTALLDE_MASK 0x00000040 #define AVR32_USBB_UPCON3_RXSTALLDE_OFFSET 6 #define AVR32_USBB_UPCON3_RXSTALLDE_SIZE 1 #define AVR32_USBB_UPCON3_SHORTPACKETIE 7 #define AVR32_USBB_UPCON3_SHORTPACKETIE_MASK 0x00000080 #define AVR32_USBB_UPCON3_SHORTPACKETIE_OFFSET 7 #define AVR32_USBB_UPCON3_SHORTPACKETIE_SIZE 1 #define AVR32_USBB_UPCON3_TXOUTE 1 #define AVR32_USBB_UPCON3_TXOUTE_MASK 0x00000002 #define AVR32_USBB_UPCON3_TXOUTE_OFFSET 1 #define AVR32_USBB_UPCON3_TXOUTE_SIZE 1 #define AVR32_USBB_UPCON3_TXSTPE 2 #define AVR32_USBB_UPCON3_TXSTPE_MASK 0x00000004 #define AVR32_USBB_UPCON3_TXSTPE_OFFSET 2 #define AVR32_USBB_UPCON3_TXSTPE_SIZE 1 #define AVR32_USBB_UPCON4 0x000005d0 #define AVR32_USBB_UPCON4CLR 0x00000630 #define AVR32_USBB_UPCON4CLR_FIFOCONC 14 #define AVR32_USBB_UPCON4CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UPCON4CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UPCON4CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UPCON4CLR_NAKEDEC 4 #define AVR32_USBB_UPCON4CLR_NAKEDEC_MASK 0x00000010 #define AVR32_USBB_UPCON4CLR_NAKEDEC_OFFSET 4 #define AVR32_USBB_UPCON4CLR_NAKEDEC_SIZE 1 #define AVR32_USBB_UPCON4CLR_NBUSYBKEC 12 #define AVR32_USBB_UPCON4CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UPCON4CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UPCON4CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UPCON4CLR_OVERFIEC 5 #define AVR32_USBB_UPCON4CLR_OVERFIEC_MASK 0x00000020 #define AVR32_USBB_UPCON4CLR_OVERFIEC_OFFSET 5 #define AVR32_USBB_UPCON4CLR_OVERFIEC_SIZE 1 #define AVR32_USBB_UPCON4CLR_PDISHDMAC 16 #define AVR32_USBB_UPCON4CLR_PDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UPCON4CLR_PDISHDMAC_OFFSET 16 #define AVR32_USBB_UPCON4CLR_PDISHDMAC_SIZE 1 #define AVR32_USBB_UPCON4CLR_PERREC 3 #define AVR32_USBB_UPCON4CLR_PERREC_MASK 0x00000008 #define AVR32_USBB_UPCON4CLR_PERREC_OFFSET 3 #define AVR32_USBB_UPCON4CLR_PERREC_SIZE 1 #define AVR32_USBB_UPCON4CLR_PFREEZEC 17 #define AVR32_USBB_UPCON4CLR_PFREEZEC_MASK 0x00020000 #define AVR32_USBB_UPCON4CLR_PFREEZEC_OFFSET 17 #define AVR32_USBB_UPCON4CLR_PFREEZEC_SIZE 1 #define AVR32_USBB_UPCON4CLR_RXINEC 0 #define AVR32_USBB_UPCON4CLR_RXINEC_MASK 0x00000001 #define AVR32_USBB_UPCON4CLR_RXINEC_OFFSET 0 #define AVR32_USBB_UPCON4CLR_RXINEC_SIZE 1 #define AVR32_USBB_UPCON4CLR_RXSTALLDEC 6 #define AVR32_USBB_UPCON4CLR_RXSTALLDEC_MASK 0x00000040 #define AVR32_USBB_UPCON4CLR_RXSTALLDEC_OFFSET 6 #define AVR32_USBB_UPCON4CLR_RXSTALLDEC_SIZE 1 #define AVR32_USBB_UPCON4CLR_SHORTPACKETIEC 7 #define AVR32_USBB_UPCON4CLR_SHORTPACKETIEC_MASK 0x00000080 #define AVR32_USBB_UPCON4CLR_SHORTPACKETIEC_OFFSET 7 #define AVR32_USBB_UPCON4CLR_SHORTPACKETIEC_SIZE 1 #define AVR32_USBB_UPCON4CLR_TXOUTEC 1 #define AVR32_USBB_UPCON4CLR_TXOUTEC_MASK 0x00000002 #define AVR32_USBB_UPCON4CLR_TXOUTEC_OFFSET 1 #define AVR32_USBB_UPCON4CLR_TXOUTEC_SIZE 1 #define AVR32_USBB_UPCON4CLR_TXSTPEC 2 #define AVR32_USBB_UPCON4CLR_TXSTPEC_MASK 0x00000004 #define AVR32_USBB_UPCON4CLR_TXSTPEC_OFFSET 2 #define AVR32_USBB_UPCON4CLR_TXSTPEC_SIZE 1 #define AVR32_USBB_UPCON4SET 0x00000600 #define AVR32_USBB_UPCON4SET_NAKEDES 4 #define AVR32_USBB_UPCON4SET_NAKEDES_MASK 0x00000010 #define AVR32_USBB_UPCON4SET_NAKEDES_OFFSET 4 #define AVR32_USBB_UPCON4SET_NAKEDES_SIZE 1 #define AVR32_USBB_UPCON4SET_NBUSYBKES 12 #define AVR32_USBB_UPCON4SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UPCON4SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UPCON4SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UPCON4SET_OVERFIES 5 #define AVR32_USBB_UPCON4SET_OVERFIES_MASK 0x00000020 #define AVR32_USBB_UPCON4SET_OVERFIES_OFFSET 5 #define AVR32_USBB_UPCON4SET_OVERFIES_SIZE 1 #define AVR32_USBB_UPCON4SET_PDISHDMAS 16 #define AVR32_USBB_UPCON4SET_PDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UPCON4SET_PDISHDMAS_OFFSET 16 #define AVR32_USBB_UPCON4SET_PDISHDMAS_SIZE 1 #define AVR32_USBB_UPCON4SET_PERRES 3 #define AVR32_USBB_UPCON4SET_PERRES_MASK 0x00000008 #define AVR32_USBB_UPCON4SET_PERRES_OFFSET 3 #define AVR32_USBB_UPCON4SET_PERRES_SIZE 1 #define AVR32_USBB_UPCON4SET_PFREEZES 17 #define AVR32_USBB_UPCON4SET_PFREEZES_MASK 0x00020000 #define AVR32_USBB_UPCON4SET_PFREEZES_OFFSET 17 #define AVR32_USBB_UPCON4SET_PFREEZES_SIZE 1 #define AVR32_USBB_UPCON4SET_RSTDTS 18 #define AVR32_USBB_UPCON4SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UPCON4SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UPCON4SET_RSTDTS_SIZE 1 #define AVR32_USBB_UPCON4SET_RXINES 0 #define AVR32_USBB_UPCON4SET_RXINES_MASK 0x00000001 #define AVR32_USBB_UPCON4SET_RXINES_OFFSET 0 #define AVR32_USBB_UPCON4SET_RXINES_SIZE 1 #define AVR32_USBB_UPCON4SET_RXSTALLDES 6 #define AVR32_USBB_UPCON4SET_RXSTALLDES_MASK 0x00000040 #define AVR32_USBB_UPCON4SET_RXSTALLDES_OFFSET 6 #define AVR32_USBB_UPCON4SET_RXSTALLDES_SIZE 1 #define AVR32_USBB_UPCON4SET_SHORTPACKETIES 7 #define AVR32_USBB_UPCON4SET_SHORTPACKETIES_MASK 0x00000080 #define AVR32_USBB_UPCON4SET_SHORTPACKETIES_OFFSET 7 #define AVR32_USBB_UPCON4SET_SHORTPACKETIES_SIZE 1 #define AVR32_USBB_UPCON4SET_TXOUTES 1 #define AVR32_USBB_UPCON4SET_TXOUTES_MASK 0x00000002 #define AVR32_USBB_UPCON4SET_TXOUTES_OFFSET 1 #define AVR32_USBB_UPCON4SET_TXOUTES_SIZE 1 #define AVR32_USBB_UPCON4SET_TXSTPES 2 #define AVR32_USBB_UPCON4SET_TXSTPES_MASK 0x00000004 #define AVR32_USBB_UPCON4SET_TXSTPES_OFFSET 2 #define AVR32_USBB_UPCON4SET_TXSTPES_SIZE 1 #define AVR32_USBB_UPCON4_FIFOCON 14 #define AVR32_USBB_UPCON4_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UPCON4_FIFOCON_OFFSET 14 #define AVR32_USBB_UPCON4_FIFOCON_SIZE 1 #define AVR32_USBB_UPCON4_NAKEDE 4 #define AVR32_USBB_UPCON4_NAKEDE_MASK 0x00000010 #define AVR32_USBB_UPCON4_NAKEDE_OFFSET 4 #define AVR32_USBB_UPCON4_NAKEDE_SIZE 1 #define AVR32_USBB_UPCON4_NBUSYBKE 12 #define AVR32_USBB_UPCON4_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UPCON4_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UPCON4_NBUSYBKE_SIZE 1 #define AVR32_USBB_UPCON4_OVERFIE 5 #define AVR32_USBB_UPCON4_OVERFIE_MASK 0x00000020 #define AVR32_USBB_UPCON4_OVERFIE_OFFSET 5 #define AVR32_USBB_UPCON4_OVERFIE_SIZE 1 #define AVR32_USBB_UPCON4_PDISHDMA 16 #define AVR32_USBB_UPCON4_PDISHDMA_MASK 0x00010000 #define AVR32_USBB_UPCON4_PDISHDMA_OFFSET 16 #define AVR32_USBB_UPCON4_PDISHDMA_SIZE 1 #define AVR32_USBB_UPCON4_PERRE 3 #define AVR32_USBB_UPCON4_PERRE_MASK 0x00000008 #define AVR32_USBB_UPCON4_PERRE_OFFSET 3 #define AVR32_USBB_UPCON4_PERRE_SIZE 1 #define AVR32_USBB_UPCON4_PFREEZE 17 #define AVR32_USBB_UPCON4_PFREEZE_MASK 0x00020000 #define AVR32_USBB_UPCON4_PFREEZE_OFFSET 17 #define AVR32_USBB_UPCON4_PFREEZE_SIZE 1 #define AVR32_USBB_UPCON4_RSTDT 18 #define AVR32_USBB_UPCON4_RSTDT_MASK 0x00040000 #define AVR32_USBB_UPCON4_RSTDT_OFFSET 18 #define AVR32_USBB_UPCON4_RSTDT_SIZE 1 #define AVR32_USBB_UPCON4_RXINE 0 #define AVR32_USBB_UPCON4_RXINE_MASK 0x00000001 #define AVR32_USBB_UPCON4_RXINE_OFFSET 0 #define AVR32_USBB_UPCON4_RXINE_SIZE 1 #define AVR32_USBB_UPCON4_RXSTALLDE 6 #define AVR32_USBB_UPCON4_RXSTALLDE_MASK 0x00000040 #define AVR32_USBB_UPCON4_RXSTALLDE_OFFSET 6 #define AVR32_USBB_UPCON4_RXSTALLDE_SIZE 1 #define AVR32_USBB_UPCON4_SHORTPACKETIE 7 #define AVR32_USBB_UPCON4_SHORTPACKETIE_MASK 0x00000080 #define AVR32_USBB_UPCON4_SHORTPACKETIE_OFFSET 7 #define AVR32_USBB_UPCON4_SHORTPACKETIE_SIZE 1 #define AVR32_USBB_UPCON4_TXOUTE 1 #define AVR32_USBB_UPCON4_TXOUTE_MASK 0x00000002 #define AVR32_USBB_UPCON4_TXOUTE_OFFSET 1 #define AVR32_USBB_UPCON4_TXOUTE_SIZE 1 #define AVR32_USBB_UPCON4_TXSTPE 2 #define AVR32_USBB_UPCON4_TXSTPE_MASK 0x00000004 #define AVR32_USBB_UPCON4_TXSTPE_OFFSET 2 #define AVR32_USBB_UPCON4_TXSTPE_SIZE 1 #define AVR32_USBB_UPCON5 0x000005d4 #define AVR32_USBB_UPCON5CLR 0x00000634 #define AVR32_USBB_UPCON5CLR_FIFOCONC 14 #define AVR32_USBB_UPCON5CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UPCON5CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UPCON5CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UPCON5CLR_NAKEDEC 4 #define AVR32_USBB_UPCON5CLR_NAKEDEC_MASK 0x00000010 #define AVR32_USBB_UPCON5CLR_NAKEDEC_OFFSET 4 #define AVR32_USBB_UPCON5CLR_NAKEDEC_SIZE 1 #define AVR32_USBB_UPCON5CLR_NBUSYBKEC 12 #define AVR32_USBB_UPCON5CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UPCON5CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UPCON5CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UPCON5CLR_OVERFIEC 5 #define AVR32_USBB_UPCON5CLR_OVERFIEC_MASK 0x00000020 #define AVR32_USBB_UPCON5CLR_OVERFIEC_OFFSET 5 #define AVR32_USBB_UPCON5CLR_OVERFIEC_SIZE 1 #define AVR32_USBB_UPCON5CLR_PDISHDMAC 16 #define AVR32_USBB_UPCON5CLR_PDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UPCON5CLR_PDISHDMAC_OFFSET 16 #define AVR32_USBB_UPCON5CLR_PDISHDMAC_SIZE 1 #define AVR32_USBB_UPCON5CLR_PERREC 3 #define AVR32_USBB_UPCON5CLR_PERREC_MASK 0x00000008 #define AVR32_USBB_UPCON5CLR_PERREC_OFFSET 3 #define AVR32_USBB_UPCON5CLR_PERREC_SIZE 1 #define AVR32_USBB_UPCON5CLR_PFREEZEC 17 #define AVR32_USBB_UPCON5CLR_PFREEZEC_MASK 0x00020000 #define AVR32_USBB_UPCON5CLR_PFREEZEC_OFFSET 17 #define AVR32_USBB_UPCON5CLR_PFREEZEC_SIZE 1 #define AVR32_USBB_UPCON5CLR_RXINEC 0 #define AVR32_USBB_UPCON5CLR_RXINEC_MASK 0x00000001 #define AVR32_USBB_UPCON5CLR_RXINEC_OFFSET 0 #define AVR32_USBB_UPCON5CLR_RXINEC_SIZE 1 #define AVR32_USBB_UPCON5CLR_RXSTALLDEC 6 #define AVR32_USBB_UPCON5CLR_RXSTALLDEC_MASK 0x00000040 #define AVR32_USBB_UPCON5CLR_RXSTALLDEC_OFFSET 6 #define AVR32_USBB_UPCON5CLR_RXSTALLDEC_SIZE 1 #define AVR32_USBB_UPCON5CLR_SHORTPACKETIEC 7 #define AVR32_USBB_UPCON5CLR_SHORTPACKETIEC_MASK 0x00000080 #define AVR32_USBB_UPCON5CLR_SHORTPACKETIEC_OFFSET 7 #define AVR32_USBB_UPCON5CLR_SHORTPACKETIEC_SIZE 1 #define AVR32_USBB_UPCON5CLR_TXOUTEC 1 #define AVR32_USBB_UPCON5CLR_TXOUTEC_MASK 0x00000002 #define AVR32_USBB_UPCON5CLR_TXOUTEC_OFFSET 1 #define AVR32_USBB_UPCON5CLR_TXOUTEC_SIZE 1 #define AVR32_USBB_UPCON5CLR_TXSTPEC 2 #define AVR32_USBB_UPCON5CLR_TXSTPEC_MASK 0x00000004 #define AVR32_USBB_UPCON5CLR_TXSTPEC_OFFSET 2 #define AVR32_USBB_UPCON5CLR_TXSTPEC_SIZE 1 #define AVR32_USBB_UPCON5SET 0x00000604 #define AVR32_USBB_UPCON5SET_NAKEDES 4 #define AVR32_USBB_UPCON5SET_NAKEDES_MASK 0x00000010 #define AVR32_USBB_UPCON5SET_NAKEDES_OFFSET 4 #define AVR32_USBB_UPCON5SET_NAKEDES_SIZE 1 #define AVR32_USBB_UPCON5SET_NBUSYBKES 12 #define AVR32_USBB_UPCON5SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UPCON5SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UPCON5SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UPCON5SET_OVERFIES 5 #define AVR32_USBB_UPCON5SET_OVERFIES_MASK 0x00000020 #define AVR32_USBB_UPCON5SET_OVERFIES_OFFSET 5 #define AVR32_USBB_UPCON5SET_OVERFIES_SIZE 1 #define AVR32_USBB_UPCON5SET_PDISHDMAS 16 #define AVR32_USBB_UPCON5SET_PDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UPCON5SET_PDISHDMAS_OFFSET 16 #define AVR32_USBB_UPCON5SET_PDISHDMAS_SIZE 1 #define AVR32_USBB_UPCON5SET_PERRES 3 #define AVR32_USBB_UPCON5SET_PERRES_MASK 0x00000008 #define AVR32_USBB_UPCON5SET_PERRES_OFFSET 3 #define AVR32_USBB_UPCON5SET_PERRES_SIZE 1 #define AVR32_USBB_UPCON5SET_PFREEZES 17 #define AVR32_USBB_UPCON5SET_PFREEZES_MASK 0x00020000 #define AVR32_USBB_UPCON5SET_PFREEZES_OFFSET 17 #define AVR32_USBB_UPCON5SET_PFREEZES_SIZE 1 #define AVR32_USBB_UPCON5SET_RSTDTS 18 #define AVR32_USBB_UPCON5SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UPCON5SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UPCON5SET_RSTDTS_SIZE 1 #define AVR32_USBB_UPCON5SET_RXINES 0 #define AVR32_USBB_UPCON5SET_RXINES_MASK 0x00000001 #define AVR32_USBB_UPCON5SET_RXINES_OFFSET 0 #define AVR32_USBB_UPCON5SET_RXINES_SIZE 1 #define AVR32_USBB_UPCON5SET_RXSTALLDES 6 #define AVR32_USBB_UPCON5SET_RXSTALLDES_MASK 0x00000040 #define AVR32_USBB_UPCON5SET_RXSTALLDES_OFFSET 6 #define AVR32_USBB_UPCON5SET_RXSTALLDES_SIZE 1 #define AVR32_USBB_UPCON5SET_SHORTPACKETIES 7 #define AVR32_USBB_UPCON5SET_SHORTPACKETIES_MASK 0x00000080 #define AVR32_USBB_UPCON5SET_SHORTPACKETIES_OFFSET 7 #define AVR32_USBB_UPCON5SET_SHORTPACKETIES_SIZE 1 #define AVR32_USBB_UPCON5SET_TXOUTES 1 #define AVR32_USBB_UPCON5SET_TXOUTES_MASK 0x00000002 #define AVR32_USBB_UPCON5SET_TXOUTES_OFFSET 1 #define AVR32_USBB_UPCON5SET_TXOUTES_SIZE 1 #define AVR32_USBB_UPCON5SET_TXSTPES 2 #define AVR32_USBB_UPCON5SET_TXSTPES_MASK 0x00000004 #define AVR32_USBB_UPCON5SET_TXSTPES_OFFSET 2 #define AVR32_USBB_UPCON5SET_TXSTPES_SIZE 1 #define AVR32_USBB_UPCON5_FIFOCON 14 #define AVR32_USBB_UPCON5_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UPCON5_FIFOCON_OFFSET 14 #define AVR32_USBB_UPCON5_FIFOCON_SIZE 1 #define AVR32_USBB_UPCON5_NAKEDE 4 #define AVR32_USBB_UPCON5_NAKEDE_MASK 0x00000010 #define AVR32_USBB_UPCON5_NAKEDE_OFFSET 4 #define AVR32_USBB_UPCON5_NAKEDE_SIZE 1 #define AVR32_USBB_UPCON5_NBUSYBKE 12 #define AVR32_USBB_UPCON5_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UPCON5_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UPCON5_NBUSYBKE_SIZE 1 #define AVR32_USBB_UPCON5_OVERFIE 5 #define AVR32_USBB_UPCON5_OVERFIE_MASK 0x00000020 #define AVR32_USBB_UPCON5_OVERFIE_OFFSET 5 #define AVR32_USBB_UPCON5_OVERFIE_SIZE 1 #define AVR32_USBB_UPCON5_PDISHDMA 16 #define AVR32_USBB_UPCON5_PDISHDMA_MASK 0x00010000 #define AVR32_USBB_UPCON5_PDISHDMA_OFFSET 16 #define AVR32_USBB_UPCON5_PDISHDMA_SIZE 1 #define AVR32_USBB_UPCON5_PERRE 3 #define AVR32_USBB_UPCON5_PERRE_MASK 0x00000008 #define AVR32_USBB_UPCON5_PERRE_OFFSET 3 #define AVR32_USBB_UPCON5_PERRE_SIZE 1 #define AVR32_USBB_UPCON5_PFREEZE 17 #define AVR32_USBB_UPCON5_PFREEZE_MASK 0x00020000 #define AVR32_USBB_UPCON5_PFREEZE_OFFSET 17 #define AVR32_USBB_UPCON5_PFREEZE_SIZE 1 #define AVR32_USBB_UPCON5_RSTDT 18 #define AVR32_USBB_UPCON5_RSTDT_MASK 0x00040000 #define AVR32_USBB_UPCON5_RSTDT_OFFSET 18 #define AVR32_USBB_UPCON5_RSTDT_SIZE 1 #define AVR32_USBB_UPCON5_RXINE 0 #define AVR32_USBB_UPCON5_RXINE_MASK 0x00000001 #define AVR32_USBB_UPCON5_RXINE_OFFSET 0 #define AVR32_USBB_UPCON5_RXINE_SIZE 1 #define AVR32_USBB_UPCON5_RXSTALLDE 6 #define AVR32_USBB_UPCON5_RXSTALLDE_MASK 0x00000040 #define AVR32_USBB_UPCON5_RXSTALLDE_OFFSET 6 #define AVR32_USBB_UPCON5_RXSTALLDE_SIZE 1 #define AVR32_USBB_UPCON5_SHORTPACKETIE 7 #define AVR32_USBB_UPCON5_SHORTPACKETIE_MASK 0x00000080 #define AVR32_USBB_UPCON5_SHORTPACKETIE_OFFSET 7 #define AVR32_USBB_UPCON5_SHORTPACKETIE_SIZE 1 #define AVR32_USBB_UPCON5_TXOUTE 1 #define AVR32_USBB_UPCON5_TXOUTE_MASK 0x00000002 #define AVR32_USBB_UPCON5_TXOUTE_OFFSET 1 #define AVR32_USBB_UPCON5_TXOUTE_SIZE 1 #define AVR32_USBB_UPCON5_TXSTPE 2 #define AVR32_USBB_UPCON5_TXSTPE_MASK 0x00000004 #define AVR32_USBB_UPCON5_TXSTPE_OFFSET 2 #define AVR32_USBB_UPCON5_TXSTPE_SIZE 1 #define AVR32_USBB_UPCON6 0x000005d8 #define AVR32_USBB_UPCON6CLR 0x00000638 #define AVR32_USBB_UPCON6CLR_FIFOCONC 14 #define AVR32_USBB_UPCON6CLR_FIFOCONC_MASK 0x00004000 #define AVR32_USBB_UPCON6CLR_FIFOCONC_OFFSET 14 #define AVR32_USBB_UPCON6CLR_FIFOCONC_SIZE 1 #define AVR32_USBB_UPCON6CLR_NAKEDEC 4 #define AVR32_USBB_UPCON6CLR_NAKEDEC_MASK 0x00000010 #define AVR32_USBB_UPCON6CLR_NAKEDEC_OFFSET 4 #define AVR32_USBB_UPCON6CLR_NAKEDEC_SIZE 1 #define AVR32_USBB_UPCON6CLR_NBUSYBKEC 12 #define AVR32_USBB_UPCON6CLR_NBUSYBKEC_MASK 0x00001000 #define AVR32_USBB_UPCON6CLR_NBUSYBKEC_OFFSET 12 #define AVR32_USBB_UPCON6CLR_NBUSYBKEC_SIZE 1 #define AVR32_USBB_UPCON6CLR_OVERFIEC 5 #define AVR32_USBB_UPCON6CLR_OVERFIEC_MASK 0x00000020 #define AVR32_USBB_UPCON6CLR_OVERFIEC_OFFSET 5 #define AVR32_USBB_UPCON6CLR_OVERFIEC_SIZE 1 #define AVR32_USBB_UPCON6CLR_PDISHDMAC 16 #define AVR32_USBB_UPCON6CLR_PDISHDMAC_MASK 0x00010000 #define AVR32_USBB_UPCON6CLR_PDISHDMAC_OFFSET 16 #define AVR32_USBB_UPCON6CLR_PDISHDMAC_SIZE 1 #define AVR32_USBB_UPCON6CLR_PERREC 3 #define AVR32_USBB_UPCON6CLR_PERREC_MASK 0x00000008 #define AVR32_USBB_UPCON6CLR_PERREC_OFFSET 3 #define AVR32_USBB_UPCON6CLR_PERREC_SIZE 1 #define AVR32_USBB_UPCON6CLR_PFREEZEC 17 #define AVR32_USBB_UPCON6CLR_PFREEZEC_MASK 0x00020000 #define AVR32_USBB_UPCON6CLR_PFREEZEC_OFFSET 17 #define AVR32_USBB_UPCON6CLR_PFREEZEC_SIZE 1 #define AVR32_USBB_UPCON6CLR_RXINEC 0 #define AVR32_USBB_UPCON6CLR_RXINEC_MASK 0x00000001 #define AVR32_USBB_UPCON6CLR_RXINEC_OFFSET 0 #define AVR32_USBB_UPCON6CLR_RXINEC_SIZE 1 #define AVR32_USBB_UPCON6CLR_RXSTALLDEC 6 #define AVR32_USBB_UPCON6CLR_RXSTALLDEC_MASK 0x00000040 #define AVR32_USBB_UPCON6CLR_RXSTALLDEC_OFFSET 6 #define AVR32_USBB_UPCON6CLR_RXSTALLDEC_SIZE 1 #define AVR32_USBB_UPCON6CLR_SHORTPACKETIEC 7 #define AVR32_USBB_UPCON6CLR_SHORTPACKETIEC_MASK 0x00000080 #define AVR32_USBB_UPCON6CLR_SHORTPACKETIEC_OFFSET 7 #define AVR32_USBB_UPCON6CLR_SHORTPACKETIEC_SIZE 1 #define AVR32_USBB_UPCON6CLR_TXOUTEC 1 #define AVR32_USBB_UPCON6CLR_TXOUTEC_MASK 0x00000002 #define AVR32_USBB_UPCON6CLR_TXOUTEC_OFFSET 1 #define AVR32_USBB_UPCON6CLR_TXOUTEC_SIZE 1 #define AVR32_USBB_UPCON6CLR_TXSTPEC 2 #define AVR32_USBB_UPCON6CLR_TXSTPEC_MASK 0x00000004 #define AVR32_USBB_UPCON6CLR_TXSTPEC_OFFSET 2 #define AVR32_USBB_UPCON6CLR_TXSTPEC_SIZE 1 #define AVR32_USBB_UPCON6SET 0x00000608 #define AVR32_USBB_UPCON6SET_NAKEDES 4 #define AVR32_USBB_UPCON6SET_NAKEDES_MASK 0x00000010 #define AVR32_USBB_UPCON6SET_NAKEDES_OFFSET 4 #define AVR32_USBB_UPCON6SET_NAKEDES_SIZE 1 #define AVR32_USBB_UPCON6SET_NBUSYBKES 12 #define AVR32_USBB_UPCON6SET_NBUSYBKES_MASK 0x00001000 #define AVR32_USBB_UPCON6SET_NBUSYBKES_OFFSET 12 #define AVR32_USBB_UPCON6SET_NBUSYBKES_SIZE 1 #define AVR32_USBB_UPCON6SET_OVERFIES 5 #define AVR32_USBB_UPCON6SET_OVERFIES_MASK 0x00000020 #define AVR32_USBB_UPCON6SET_OVERFIES_OFFSET 5 #define AVR32_USBB_UPCON6SET_OVERFIES_SIZE 1 #define AVR32_USBB_UPCON6SET_PDISHDMAS 16 #define AVR32_USBB_UPCON6SET_PDISHDMAS_MASK 0x00010000 #define AVR32_USBB_UPCON6SET_PDISHDMAS_OFFSET 16 #define AVR32_USBB_UPCON6SET_PDISHDMAS_SIZE 1 #define AVR32_USBB_UPCON6SET_PERRES 3 #define AVR32_USBB_UPCON6SET_PERRES_MASK 0x00000008 #define AVR32_USBB_UPCON6SET_PERRES_OFFSET 3 #define AVR32_USBB_UPCON6SET_PERRES_SIZE 1 #define AVR32_USBB_UPCON6SET_PFREEZES 17 #define AVR32_USBB_UPCON6SET_PFREEZES_MASK 0x00020000 #define AVR32_USBB_UPCON6SET_PFREEZES_OFFSET 17 #define AVR32_USBB_UPCON6SET_PFREEZES_SIZE 1 #define AVR32_USBB_UPCON6SET_RSTDTS 18 #define AVR32_USBB_UPCON6SET_RSTDTS_MASK 0x00040000 #define AVR32_USBB_UPCON6SET_RSTDTS_OFFSET 18 #define AVR32_USBB_UPCON6SET_RSTDTS_SIZE 1 #define AVR32_USBB_UPCON6SET_RXINES 0 #define AVR32_USBB_UPCON6SET_RXINES_MASK 0x00000001 #define AVR32_USBB_UPCON6SET_RXINES_OFFSET 0 #define AVR32_USBB_UPCON6SET_RXINES_SIZE 1 #define AVR32_USBB_UPCON6SET_RXSTALLDES 6 #define AVR32_USBB_UPCON6SET_RXSTALLDES_MASK 0x00000040 #define AVR32_USBB_UPCON6SET_RXSTALLDES_OFFSET 6 #define AVR32_USBB_UPCON6SET_RXSTALLDES_SIZE 1 #define AVR32_USBB_UPCON6SET_SHORTPACKETIES 7 #define AVR32_USBB_UPCON6SET_SHORTPACKETIES_MASK 0x00000080 #define AVR32_USBB_UPCON6SET_SHORTPACKETIES_OFFSET 7 #define AVR32_USBB_UPCON6SET_SHORTPACKETIES_SIZE 1 #define AVR32_USBB_UPCON6SET_TXOUTES 1 #define AVR32_USBB_UPCON6SET_TXOUTES_MASK 0x00000002 #define AVR32_USBB_UPCON6SET_TXOUTES_OFFSET 1 #define AVR32_USBB_UPCON6SET_TXOUTES_SIZE 1 #define AVR32_USBB_UPCON6SET_TXSTPES 2 #define AVR32_USBB_UPCON6SET_TXSTPES_MASK 0x00000004 #define AVR32_USBB_UPCON6SET_TXSTPES_OFFSET 2 #define AVR32_USBB_UPCON6SET_TXSTPES_SIZE 1 #define AVR32_USBB_UPCON6_FIFOCON 14 #define AVR32_USBB_UPCON6_FIFOCON_MASK 0x00004000 #define AVR32_USBB_UPCON6_FIFOCON_OFFSET 14 #define AVR32_USBB_UPCON6_FIFOCON_SIZE 1 #define AVR32_USBB_UPCON6_NAKEDE 4 #define AVR32_USBB_UPCON6_NAKEDE_MASK 0x00000010 #define AVR32_USBB_UPCON6_NAKEDE_OFFSET 4 #define AVR32_USBB_UPCON6_NAKEDE_SIZE 1 #define AVR32_USBB_UPCON6_NBUSYBKE 12 #define AVR32_USBB_UPCON6_NBUSYBKE_MASK 0x00001000 #define AVR32_USBB_UPCON6_NBUSYBKE_OFFSET 12 #define AVR32_USBB_UPCON6_NBUSYBKE_SIZE 1 #define AVR32_USBB_UPCON6_OVERFIE 5 #define AVR32_USBB_UPCON6_OVERFIE_MASK 0x00000020 #define AVR32_USBB_UPCON6_OVERFIE_OFFSET 5 #define AVR32_USBB_UPCON6_OVERFIE_SIZE 1 #define AVR32_USBB_UPCON6_PDISHDMA 16 #define AVR32_USBB_UPCON6_PDISHDMA_MASK 0x00010000 #define AVR32_USBB_UPCON6_PDISHDMA_OFFSET 16 #define AVR32_USBB_UPCON6_PDISHDMA_SIZE 1 #define AVR32_USBB_UPCON6_PERRE 3 #define AVR32_USBB_UPCON6_PERRE_MASK 0x00000008 #define AVR32_USBB_UPCON6_PERRE_OFFSET 3 #define AVR32_USBB_UPCON6_PERRE_SIZE 1 #define AVR32_USBB_UPCON6_PFREEZE 17 #define AVR32_USBB_UPCON6_PFREEZE_MASK 0x00020000 #define AVR32_USBB_UPCON6_PFREEZE_OFFSET 17 #define AVR32_USBB_UPCON6_PFREEZE_SIZE 1 #define AVR32_USBB_UPCON6_RSTDT 18 #define AVR32_USBB_UPCON6_RSTDT_MASK 0x00040000 #define AVR32_USBB_UPCON6_RSTDT_OFFSET 18 #define AVR32_USBB_UPCON6_RSTDT_SIZE 1 #define AVR32_USBB_UPCON6_RXINE 0 #define AVR32_USBB_UPCON6_RXINE_MASK 0x00000001 #define AVR32_USBB_UPCON6_RXINE_OFFSET 0 #define AVR32_USBB_UPCON6_RXINE_SIZE 1 #define AVR32_USBB_UPCON6_RXSTALLDE 6 #define AVR32_USBB_UPCON6_RXSTALLDE_MASK 0x00000040 #define AVR32_USBB_UPCON6_RXSTALLDE_OFFSET 6 #define AVR32_USBB_UPCON6_RXSTALLDE_SIZE 1 #define AVR32_USBB_UPCON6_SHORTPACKETIE 7 #define AVR32_USBB_UPCON6_SHORTPACKETIE_MASK 0x00000080 #define AVR32_USBB_UPCON6_SHORTPACKETIE_OFFSET 7 #define AVR32_USBB_UPCON6_SHORTPACKETIE_SIZE 1 #define AVR32_USBB_UPCON6_TXOUTE 1 #define AVR32_USBB_UPCON6_TXOUTE_MASK 0x00000002 #define AVR32_USBB_UPCON6_TXOUTE_OFFSET 1 #define AVR32_USBB_UPCON6_TXOUTE_SIZE 1 #define AVR32_USBB_UPCON6_TXSTPE 2 #define AVR32_USBB_UPCON6_TXSTPE_MASK 0x00000004 #define AVR32_USBB_UPCON6_TXSTPE_OFFSET 2 #define AVR32_USBB_UPCON6_TXSTPE_SIZE 1 #define AVR32_USBB_UPDAT0 0x000006b0 #define AVR32_USBB_UPDAT0_P_DATA 0 #define AVR32_USBB_UPDAT0_P_DATA_MASK 0xffffffff #define AVR32_USBB_UPDAT0_P_DATA_OFFSET 0 #define AVR32_USBB_UPDAT0_P_DATA_SIZE 32 #define AVR32_USBB_UPDAT1 0x000006b4 #define AVR32_USBB_UPDAT1_P_DATA 0 #define AVR32_USBB_UPDAT1_P_DATA_MASK 0xffffffff #define AVR32_USBB_UPDAT1_P_DATA_OFFSET 0 #define AVR32_USBB_UPDAT1_P_DATA_SIZE 32 #define AVR32_USBB_UPDAT2 0x000006b8 #define AVR32_USBB_UPDAT2_P_DATA 0 #define AVR32_USBB_UPDAT2_P_DATA_MASK 0xffffffff #define AVR32_USBB_UPDAT2_P_DATA_OFFSET 0 #define AVR32_USBB_UPDAT2_P_DATA_SIZE 32 #define AVR32_USBB_UPDAT3 0x000006bc #define AVR32_USBB_UPDAT3_P_DATA 0 #define AVR32_USBB_UPDAT3_P_DATA_MASK 0xffffffff #define AVR32_USBB_UPDAT3_P_DATA_OFFSET 0 #define AVR32_USBB_UPDAT3_P_DATA_SIZE 32 #define AVR32_USBB_UPDAT4 0x000006c0 #define AVR32_USBB_UPDAT4_P_DATA 0 #define AVR32_USBB_UPDAT4_P_DATA_MASK 0xffffffff #define AVR32_USBB_UPDAT4_P_DATA_OFFSET 0 #define AVR32_USBB_UPDAT4_P_DATA_SIZE 32 #define AVR32_USBB_UPDAT5 0x000006c4 #define AVR32_USBB_UPDAT5_P_DATA 0 #define AVR32_USBB_UPDAT5_P_DATA_MASK 0xffffffff #define AVR32_USBB_UPDAT5_P_DATA_OFFSET 0 #define AVR32_USBB_UPDAT5_P_DATA_SIZE 32 #define AVR32_USBB_UPDAT6 0x000006c8 #define AVR32_USBB_UPDAT6_P_DATA 0 #define AVR32_USBB_UPDAT6_P_DATA_MASK 0xffffffff #define AVR32_USBB_UPDAT6_P_DATA_OFFSET 0 #define AVR32_USBB_UPDAT6_P_DATA_SIZE 32 #define AVR32_USBB_UPERR0 0x00000680 #define AVR32_USBB_UPERR0_COUNTER 5 #define AVR32_USBB_UPERR0_COUNTER_MASK 0x00000060 #define AVR32_USBB_UPERR0_COUNTER_OFFSET 5 #define AVR32_USBB_UPERR0_COUNTER_SIZE 2 #define AVR32_USBB_UPERR0_CRC16 4 #define AVR32_USBB_UPERR0_CRC16_MASK 0x00000010 #define AVR32_USBB_UPERR0_CRC16_OFFSET 4 #define AVR32_USBB_UPERR0_CRC16_SIZE 1 #define AVR32_USBB_UPERR0_DATAPID 1 #define AVR32_USBB_UPERR0_DATAPID_MASK 0x00000002 #define AVR32_USBB_UPERR0_DATAPID_OFFSET 1 #define AVR32_USBB_UPERR0_DATAPID_SIZE 1 #define AVR32_USBB_UPERR0_DATATGL 0 #define AVR32_USBB_UPERR0_DATATGL_MASK 0x00000001 #define AVR32_USBB_UPERR0_DATATGL_OFFSET 0 #define AVR32_USBB_UPERR0_DATATGL_SIZE 1 #define AVR32_USBB_UPERR0_PID 2 #define AVR32_USBB_UPERR0_PID_MASK 0x00000004 #define AVR32_USBB_UPERR0_PID_OFFSET 2 #define AVR32_USBB_UPERR0_PID_SIZE 1 #define AVR32_USBB_UPERR0_TIMEOUT 3 #define AVR32_USBB_UPERR0_TIMEOUT_MASK 0x00000008 #define AVR32_USBB_UPERR0_TIMEOUT_OFFSET 3 #define AVR32_USBB_UPERR0_TIMEOUT_SIZE 1 #define AVR32_USBB_UPERR1 0x00000684 #define AVR32_USBB_UPERR1_COUNTER 5 #define AVR32_USBB_UPERR1_COUNTER_MASK 0x00000060 #define AVR32_USBB_UPERR1_COUNTER_OFFSET 5 #define AVR32_USBB_UPERR1_COUNTER_SIZE 2 #define AVR32_USBB_UPERR1_CRC16 4 #define AVR32_USBB_UPERR1_CRC16_MASK 0x00000010 #define AVR32_USBB_UPERR1_CRC16_OFFSET 4 #define AVR32_USBB_UPERR1_CRC16_SIZE 1 #define AVR32_USBB_UPERR1_DATAPID 1 #define AVR32_USBB_UPERR1_DATAPID_MASK 0x00000002 #define AVR32_USBB_UPERR1_DATAPID_OFFSET 1 #define AVR32_USBB_UPERR1_DATAPID_SIZE 1 #define AVR32_USBB_UPERR1_DATATGL 0 #define AVR32_USBB_UPERR1_DATATGL_MASK 0x00000001 #define AVR32_USBB_UPERR1_DATATGL_OFFSET 0 #define AVR32_USBB_UPERR1_DATATGL_SIZE 1 #define AVR32_USBB_UPERR1_PID 2 #define AVR32_USBB_UPERR1_PID_MASK 0x00000004 #define AVR32_USBB_UPERR1_PID_OFFSET 2 #define AVR32_USBB_UPERR1_PID_SIZE 1 #define AVR32_USBB_UPERR1_TIMEOUT 3 #define AVR32_USBB_UPERR1_TIMEOUT_MASK 0x00000008 #define AVR32_USBB_UPERR1_TIMEOUT_OFFSET 3 #define AVR32_USBB_UPERR1_TIMEOUT_SIZE 1 #define AVR32_USBB_UPERR2 0x00000688 #define AVR32_USBB_UPERR2_COUNTER 5 #define AVR32_USBB_UPERR2_COUNTER_MASK 0x00000060 #define AVR32_USBB_UPERR2_COUNTER_OFFSET 5 #define AVR32_USBB_UPERR2_COUNTER_SIZE 2 #define AVR32_USBB_UPERR2_CRC16 4 #define AVR32_USBB_UPERR2_CRC16_MASK 0x00000010 #define AVR32_USBB_UPERR2_CRC16_OFFSET 4 #define AVR32_USBB_UPERR2_CRC16_SIZE 1 #define AVR32_USBB_UPERR2_DATAPID 1 #define AVR32_USBB_UPERR2_DATAPID_MASK 0x00000002 #define AVR32_USBB_UPERR2_DATAPID_OFFSET 1 #define AVR32_USBB_UPERR2_DATAPID_SIZE 1 #define AVR32_USBB_UPERR2_DATATGL 0 #define AVR32_USBB_UPERR2_DATATGL_MASK 0x00000001 #define AVR32_USBB_UPERR2_DATATGL_OFFSET 0 #define AVR32_USBB_UPERR2_DATATGL_SIZE 1 #define AVR32_USBB_UPERR2_PID 2 #define AVR32_USBB_UPERR2_PID_MASK 0x00000004 #define AVR32_USBB_UPERR2_PID_OFFSET 2 #define AVR32_USBB_UPERR2_PID_SIZE 1 #define AVR32_USBB_UPERR2_TIMEOUT 3 #define AVR32_USBB_UPERR2_TIMEOUT_MASK 0x00000008 #define AVR32_USBB_UPERR2_TIMEOUT_OFFSET 3 #define AVR32_USBB_UPERR2_TIMEOUT_SIZE 1 #define AVR32_USBB_UPERR3 0x0000068c #define AVR32_USBB_UPERR3_COUNTER 5 #define AVR32_USBB_UPERR3_COUNTER_MASK 0x00000060 #define AVR32_USBB_UPERR3_COUNTER_OFFSET 5 #define AVR32_USBB_UPERR3_COUNTER_SIZE 2 #define AVR32_USBB_UPERR3_CRC16 4 #define AVR32_USBB_UPERR3_CRC16_MASK 0x00000010 #define AVR32_USBB_UPERR3_CRC16_OFFSET 4 #define AVR32_USBB_UPERR3_CRC16_SIZE 1 #define AVR32_USBB_UPERR3_DATAPID 1 #define AVR32_USBB_UPERR3_DATAPID_MASK 0x00000002 #define AVR32_USBB_UPERR3_DATAPID_OFFSET 1 #define AVR32_USBB_UPERR3_DATAPID_SIZE 1 #define AVR32_USBB_UPERR3_DATATGL 0 #define AVR32_USBB_UPERR3_DATATGL_MASK 0x00000001 #define AVR32_USBB_UPERR3_DATATGL_OFFSET 0 #define AVR32_USBB_UPERR3_DATATGL_SIZE 1 #define AVR32_USBB_UPERR3_PID 2 #define AVR32_USBB_UPERR3_PID_MASK 0x00000004 #define AVR32_USBB_UPERR3_PID_OFFSET 2 #define AVR32_USBB_UPERR3_PID_SIZE 1 #define AVR32_USBB_UPERR3_TIMEOUT 3 #define AVR32_USBB_UPERR3_TIMEOUT_MASK 0x00000008 #define AVR32_USBB_UPERR3_TIMEOUT_OFFSET 3 #define AVR32_USBB_UPERR3_TIMEOUT_SIZE 1 #define AVR32_USBB_UPERR4 0x00000690 #define AVR32_USBB_UPERR4_COUNTER 5 #define AVR32_USBB_UPERR4_COUNTER_MASK 0x00000060 #define AVR32_USBB_UPERR4_COUNTER_OFFSET 5 #define AVR32_USBB_UPERR4_COUNTER_SIZE 2 #define AVR32_USBB_UPERR4_CRC16 4 #define AVR32_USBB_UPERR4_CRC16_MASK 0x00000010 #define AVR32_USBB_UPERR4_CRC16_OFFSET 4 #define AVR32_USBB_UPERR4_CRC16_SIZE 1 #define AVR32_USBB_UPERR4_DATAPID 1 #define AVR32_USBB_UPERR4_DATAPID_MASK 0x00000002 #define AVR32_USBB_UPERR4_DATAPID_OFFSET 1 #define AVR32_USBB_UPERR4_DATAPID_SIZE 1 #define AVR32_USBB_UPERR4_DATATGL 0 #define AVR32_USBB_UPERR4_DATATGL_MASK 0x00000001 #define AVR32_USBB_UPERR4_DATATGL_OFFSET 0 #define AVR32_USBB_UPERR4_DATATGL_SIZE 1 #define AVR32_USBB_UPERR4_PID 2 #define AVR32_USBB_UPERR4_PID_MASK 0x00000004 #define AVR32_USBB_UPERR4_PID_OFFSET 2 #define AVR32_USBB_UPERR4_PID_SIZE 1 #define AVR32_USBB_UPERR4_TIMEOUT 3 #define AVR32_USBB_UPERR4_TIMEOUT_MASK 0x00000008 #define AVR32_USBB_UPERR4_TIMEOUT_OFFSET 3 #define AVR32_USBB_UPERR4_TIMEOUT_SIZE 1 #define AVR32_USBB_UPERR5 0x00000694 #define AVR32_USBB_UPERR5_COUNTER 5 #define AVR32_USBB_UPERR5_COUNTER_MASK 0x00000060 #define AVR32_USBB_UPERR5_COUNTER_OFFSET 5 #define AVR32_USBB_UPERR5_COUNTER_SIZE 2 #define AVR32_USBB_UPERR5_CRC16 4 #define AVR32_USBB_UPERR5_CRC16_MASK 0x00000010 #define AVR32_USBB_UPERR5_CRC16_OFFSET 4 #define AVR32_USBB_UPERR5_CRC16_SIZE 1 #define AVR32_USBB_UPERR5_DATAPID 1 #define AVR32_USBB_UPERR5_DATAPID_MASK 0x00000002 #define AVR32_USBB_UPERR5_DATAPID_OFFSET 1 #define AVR32_USBB_UPERR5_DATAPID_SIZE 1 #define AVR32_USBB_UPERR5_DATATGL 0 #define AVR32_USBB_UPERR5_DATATGL_MASK 0x00000001 #define AVR32_USBB_UPERR5_DATATGL_OFFSET 0 #define AVR32_USBB_UPERR5_DATATGL_SIZE 1 #define AVR32_USBB_UPERR5_PID 2 #define AVR32_USBB_UPERR5_PID_MASK 0x00000004 #define AVR32_USBB_UPERR5_PID_OFFSET 2 #define AVR32_USBB_UPERR5_PID_SIZE 1 #define AVR32_USBB_UPERR5_TIMEOUT 3 #define AVR32_USBB_UPERR5_TIMEOUT_MASK 0x00000008 #define AVR32_USBB_UPERR5_TIMEOUT_OFFSET 3 #define AVR32_USBB_UPERR5_TIMEOUT_SIZE 1 #define AVR32_USBB_UPERR6 0x00000698 #define AVR32_USBB_UPERR6_COUNTER 5 #define AVR32_USBB_UPERR6_COUNTER_MASK 0x00000060 #define AVR32_USBB_UPERR6_COUNTER_OFFSET 5 #define AVR32_USBB_UPERR6_COUNTER_SIZE 2 #define AVR32_USBB_UPERR6_CRC16 4 #define AVR32_USBB_UPERR6_CRC16_MASK 0x00000010 #define AVR32_USBB_UPERR6_CRC16_OFFSET 4 #define AVR32_USBB_UPERR6_CRC16_SIZE 1 #define AVR32_USBB_UPERR6_DATAPID 1 #define AVR32_USBB_UPERR6_DATAPID_MASK 0x00000002 #define AVR32_USBB_UPERR6_DATAPID_OFFSET 1 #define AVR32_USBB_UPERR6_DATAPID_SIZE 1 #define AVR32_USBB_UPERR6_DATATGL 0 #define AVR32_USBB_UPERR6_DATATGL_MASK 0x00000001 #define AVR32_USBB_UPERR6_DATATGL_OFFSET 0 #define AVR32_USBB_UPERR6_DATATGL_SIZE 1 #define AVR32_USBB_UPERR6_PID 2 #define AVR32_USBB_UPERR6_PID_MASK 0x00000004 #define AVR32_USBB_UPERR6_PID_OFFSET 2 #define AVR32_USBB_UPERR6_PID_SIZE 1 #define AVR32_USBB_UPERR6_TIMEOUT 3 #define AVR32_USBB_UPERR6_TIMEOUT_MASK 0x00000008 #define AVR32_USBB_UPERR6_TIMEOUT_OFFSET 3 #define AVR32_USBB_UPERR6_TIMEOUT_SIZE 1 #define AVR32_USBB_UPINRQ0 0x00000650 #define AVR32_USBB_UPINRQ0_INMODE 8 #define AVR32_USBB_UPINRQ0_INMODE_MASK 0x00000100 #define AVR32_USBB_UPINRQ0_INMODE_OFFSET 8 #define AVR32_USBB_UPINRQ0_INMODE_SIZE 1 #define AVR32_USBB_UPINRQ0_INRQ 0 #define AVR32_USBB_UPINRQ0_INRQ_MASK 0x000000ff #define AVR32_USBB_UPINRQ0_INRQ_OFFSET 0 #define AVR32_USBB_UPINRQ0_INRQ_SIZE 8 #define AVR32_USBB_UPINRQ1 0x00000654 #define AVR32_USBB_UPINRQ1_INMODE 8 #define AVR32_USBB_UPINRQ1_INMODE_MASK 0x00000100 #define AVR32_USBB_UPINRQ1_INMODE_OFFSET 8 #define AVR32_USBB_UPINRQ1_INMODE_SIZE 1 #define AVR32_USBB_UPINRQ1_INRQ 0 #define AVR32_USBB_UPINRQ1_INRQ_MASK 0x000000ff #define AVR32_USBB_UPINRQ1_INRQ_OFFSET 0 #define AVR32_USBB_UPINRQ1_INRQ_SIZE 8 #define AVR32_USBB_UPINRQ2 0x00000658 #define AVR32_USBB_UPINRQ2_INMODE 8 #define AVR32_USBB_UPINRQ2_INMODE_MASK 0x00000100 #define AVR32_USBB_UPINRQ2_INMODE_OFFSET 8 #define AVR32_USBB_UPINRQ2_INMODE_SIZE 1 #define AVR32_USBB_UPINRQ2_INRQ 0 #define AVR32_USBB_UPINRQ2_INRQ_MASK 0x000000ff #define AVR32_USBB_UPINRQ2_INRQ_OFFSET 0 #define AVR32_USBB_UPINRQ2_INRQ_SIZE 8 #define AVR32_USBB_UPINRQ3 0x0000065c #define AVR32_USBB_UPINRQ3_INMODE 8 #define AVR32_USBB_UPINRQ3_INMODE_MASK 0x00000100 #define AVR32_USBB_UPINRQ3_INMODE_OFFSET 8 #define AVR32_USBB_UPINRQ3_INMODE_SIZE 1 #define AVR32_USBB_UPINRQ3_INRQ 0 #define AVR32_USBB_UPINRQ3_INRQ_MASK 0x000000ff #define AVR32_USBB_UPINRQ3_INRQ_OFFSET 0 #define AVR32_USBB_UPINRQ3_INRQ_SIZE 8 #define AVR32_USBB_UPINRQ4 0x00000660 #define AVR32_USBB_UPINRQ4_INMODE 8 #define AVR32_USBB_UPINRQ4_INMODE_MASK 0x00000100 #define AVR32_USBB_UPINRQ4_INMODE_OFFSET 8 #define AVR32_USBB_UPINRQ4_INMODE_SIZE 1 #define AVR32_USBB_UPINRQ4_INRQ 0 #define AVR32_USBB_UPINRQ4_INRQ_MASK 0x000000ff #define AVR32_USBB_UPINRQ4_INRQ_OFFSET 0 #define AVR32_USBB_UPINRQ4_INRQ_SIZE 8 #define AVR32_USBB_UPINRQ5 0x00000664 #define AVR32_USBB_UPINRQ5_INMODE 8 #define AVR32_USBB_UPINRQ5_INMODE_MASK 0x00000100 #define AVR32_USBB_UPINRQ5_INMODE_OFFSET 8 #define AVR32_USBB_UPINRQ5_INMODE_SIZE 1 #define AVR32_USBB_UPINRQ5_INRQ 0 #define AVR32_USBB_UPINRQ5_INRQ_MASK 0x000000ff #define AVR32_USBB_UPINRQ5_INRQ_OFFSET 0 #define AVR32_USBB_UPINRQ5_INRQ_SIZE 8 #define AVR32_USBB_UPINRQ6 0x00000668 #define AVR32_USBB_UPINRQ6_INMODE 8 #define AVR32_USBB_UPINRQ6_INMODE_MASK 0x00000100 #define AVR32_USBB_UPINRQ6_INMODE_OFFSET 8 #define AVR32_USBB_UPINRQ6_INMODE_SIZE 1 #define AVR32_USBB_UPINRQ6_INRQ 0 #define AVR32_USBB_UPINRQ6_INRQ_MASK 0x000000ff #define AVR32_USBB_UPINRQ6_INRQ_OFFSET 0 #define AVR32_USBB_UPINRQ6_INRQ_SIZE 8 #define AVR32_USBB_UPRSM 6 #define AVR32_USBB_UPRSMC 6 #define AVR32_USBB_UPRSMC_MASK 0x00000040 #define AVR32_USBB_UPRSMC_OFFSET 6 #define AVR32_USBB_UPRSMC_SIZE 1 #define AVR32_USBB_UPRSME 6 #define AVR32_USBB_UPRSMEC 6 #define AVR32_USBB_UPRSMEC_MASK 0x00000040 #define AVR32_USBB_UPRSMEC_OFFSET 6 #define AVR32_USBB_UPRSMEC_SIZE 1 #define AVR32_USBB_UPRSMES 6 #define AVR32_USBB_UPRSMES_MASK 0x00000040 #define AVR32_USBB_UPRSMES_OFFSET 6 #define AVR32_USBB_UPRSMES_SIZE 1 #define AVR32_USBB_UPRSME_MASK 0x00000040 #define AVR32_USBB_UPRSME_OFFSET 6 #define AVR32_USBB_UPRSME_SIZE 1 #define AVR32_USBB_UPRSMS 6 #define AVR32_USBB_UPRSMS_MASK 0x00000040 #define AVR32_USBB_UPRSMS_OFFSET 6 #define AVR32_USBB_UPRSMS_SIZE 1 #define AVR32_USBB_UPRSM_MASK 0x00000040 #define AVR32_USBB_UPRSM_OFFSET 6 #define AVR32_USBB_UPRSM_SIZE 1 #define AVR32_USBB_UPRST 0x0000041c #define AVR32_USBB_UPRST_PEN0 0 #define AVR32_USBB_UPRST_PEN0_MASK 0x00000001 #define AVR32_USBB_UPRST_PEN0_OFFSET 0 #define AVR32_USBB_UPRST_PEN0_SIZE 1 #define AVR32_USBB_UPRST_PEN1 1 #define AVR32_USBB_UPRST_PEN1_MASK 0x00000002 #define AVR32_USBB_UPRST_PEN1_OFFSET 1 #define AVR32_USBB_UPRST_PEN1_SIZE 1 #define AVR32_USBB_UPRST_PEN2 2 #define AVR32_USBB_UPRST_PEN2_MASK 0x00000004 #define AVR32_USBB_UPRST_PEN2_OFFSET 2 #define AVR32_USBB_UPRST_PEN2_SIZE 1 #define AVR32_USBB_UPRST_PEN3 3 #define AVR32_USBB_UPRST_PEN3_MASK 0x00000008 #define AVR32_USBB_UPRST_PEN3_OFFSET 3 #define AVR32_USBB_UPRST_PEN3_SIZE 1 #define AVR32_USBB_UPRST_PEN4 4 #define AVR32_USBB_UPRST_PEN4_MASK 0x00000010 #define AVR32_USBB_UPRST_PEN4_OFFSET 4 #define AVR32_USBB_UPRST_PEN4_SIZE 1 #define AVR32_USBB_UPRST_PEN5 5 #define AVR32_USBB_UPRST_PEN5_MASK 0x00000020 #define AVR32_USBB_UPRST_PEN5_OFFSET 5 #define AVR32_USBB_UPRST_PEN5_SIZE 1 #define AVR32_USBB_UPRST_PEN6 6 #define AVR32_USBB_UPRST_PEN6_MASK 0x00000040 #define AVR32_USBB_UPRST_PEN6_OFFSET 6 #define AVR32_USBB_UPRST_PEN6_SIZE 1 #define AVR32_USBB_UPRST_PRST0 16 #define AVR32_USBB_UPRST_PRST0_MASK 0x00010000 #define AVR32_USBB_UPRST_PRST0_OFFSET 16 #define AVR32_USBB_UPRST_PRST0_SIZE 1 #define AVR32_USBB_UPRST_PRST1 17 #define AVR32_USBB_UPRST_PRST1_MASK 0x00020000 #define AVR32_USBB_UPRST_PRST1_OFFSET 17 #define AVR32_USBB_UPRST_PRST1_SIZE 1 #define AVR32_USBB_UPRST_PRST2 18 #define AVR32_USBB_UPRST_PRST2_MASK 0x00040000 #define AVR32_USBB_UPRST_PRST2_OFFSET 18 #define AVR32_USBB_UPRST_PRST2_SIZE 1 #define AVR32_USBB_UPRST_PRST3 19 #define AVR32_USBB_UPRST_PRST3_MASK 0x00080000 #define AVR32_USBB_UPRST_PRST3_OFFSET 19 #define AVR32_USBB_UPRST_PRST3_SIZE 1 #define AVR32_USBB_UPRST_PRST4 20 #define AVR32_USBB_UPRST_PRST4_MASK 0x00100000 #define AVR32_USBB_UPRST_PRST4_OFFSET 20 #define AVR32_USBB_UPRST_PRST4_SIZE 1 #define AVR32_USBB_UPRST_PRST5 21 #define AVR32_USBB_UPRST_PRST5_MASK 0x00200000 #define AVR32_USBB_UPRST_PRST5_OFFSET 21 #define AVR32_USBB_UPRST_PRST5_SIZE 1 #define AVR32_USBB_UPRST_PRST6 22 #define AVR32_USBB_UPRST_PRST6_MASK 0x00400000 #define AVR32_USBB_UPRST_PRST6_OFFSET 22 #define AVR32_USBB_UPRST_PRST6_SIZE 1 #define AVR32_USBB_UPSTA0 0x00000530 #define AVR32_USBB_UPSTA0CLR 0x00000560 #define AVR32_USBB_UPSTA0CLR_NAKEDIC 4 #define AVR32_USBB_UPSTA0CLR_NAKEDIC_MASK 0x00000010 #define AVR32_USBB_UPSTA0CLR_NAKEDIC_OFFSET 4 #define AVR32_USBB_UPSTA0CLR_NAKEDIC_SIZE 1 #define AVR32_USBB_UPSTA0CLR_OVERFIC 5 #define AVR32_USBB_UPSTA0CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UPSTA0CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UPSTA0CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UPSTA0CLR_RXINIC 0 #define AVR32_USBB_UPSTA0CLR_RXINIC_MASK 0x00000001 #define AVR32_USBB_UPSTA0CLR_RXINIC_OFFSET 0 #define AVR32_USBB_UPSTA0CLR_RXINIC_SIZE 1 #define AVR32_USBB_UPSTA0CLR_RXSTALLDIC 6 #define AVR32_USBB_UPSTA0CLR_RXSTALLDIC_MASK 0x00000040 #define AVR32_USBB_UPSTA0CLR_RXSTALLDIC_OFFSET 6 #define AVR32_USBB_UPSTA0CLR_RXSTALLDIC_SIZE 1 #define AVR32_USBB_UPSTA0CLR_SHORTPACKETIC 7 #define AVR32_USBB_UPSTA0CLR_SHORTPACKETIC_MASK 0x00000080 #define AVR32_USBB_UPSTA0CLR_SHORTPACKETIC_OFFSET 7 #define AVR32_USBB_UPSTA0CLR_SHORTPACKETIC_SIZE 1 #define AVR32_USBB_UPSTA0CLR_TXOUTIC 1 #define AVR32_USBB_UPSTA0CLR_TXOUTIC_MASK 0x00000002 #define AVR32_USBB_UPSTA0CLR_TXOUTIC_OFFSET 1 #define AVR32_USBB_UPSTA0CLR_TXOUTIC_SIZE 1 #define AVR32_USBB_UPSTA0CLR_TXSTPIC 2 #define AVR32_USBB_UPSTA0CLR_TXSTPIC_MASK 0x00000004 #define AVR32_USBB_UPSTA0CLR_TXSTPIC_OFFSET 2 #define AVR32_USBB_UPSTA0CLR_TXSTPIC_SIZE 1 #define AVR32_USBB_UPSTA0SET 0x00000590 #define AVR32_USBB_UPSTA0SET_NAKEDIS 4 #define AVR32_USBB_UPSTA0SET_NAKEDIS_MASK 0x00000010 #define AVR32_USBB_UPSTA0SET_NAKEDIS_OFFSET 4 #define AVR32_USBB_UPSTA0SET_NAKEDIS_SIZE 1 #define AVR32_USBB_UPSTA0SET_NBUSYBKS 12 #define AVR32_USBB_UPSTA0SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UPSTA0SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UPSTA0SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UPSTA0SET_OVERFIS 5 #define AVR32_USBB_UPSTA0SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UPSTA0SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UPSTA0SET_OVERFIS_SIZE 1 #define AVR32_USBB_UPSTA0SET_PERRIS 3 #define AVR32_USBB_UPSTA0SET_PERRIS_MASK 0x00000008 #define AVR32_USBB_UPSTA0SET_PERRIS_OFFSET 3 #define AVR32_USBB_UPSTA0SET_PERRIS_SIZE 1 #define AVR32_USBB_UPSTA0SET_RXINIS 0 #define AVR32_USBB_UPSTA0SET_RXINIS_MASK 0x00000001 #define AVR32_USBB_UPSTA0SET_RXINIS_OFFSET 0 #define AVR32_USBB_UPSTA0SET_RXINIS_SIZE 1 #define AVR32_USBB_UPSTA0SET_RXSTALLDIS 6 #define AVR32_USBB_UPSTA0SET_RXSTALLDIS_MASK 0x00000040 #define AVR32_USBB_UPSTA0SET_RXSTALLDIS_OFFSET 6 #define AVR32_USBB_UPSTA0SET_RXSTALLDIS_SIZE 1 #define AVR32_USBB_UPSTA0SET_SHORTPACKETIS 7 #define AVR32_USBB_UPSTA0SET_SHORTPACKETIS_MASK 0x00000080 #define AVR32_USBB_UPSTA0SET_SHORTPACKETIS_OFFSET 7 #define AVR32_USBB_UPSTA0SET_SHORTPACKETIS_SIZE 1 #define AVR32_USBB_UPSTA0SET_TXOUTIS 1 #define AVR32_USBB_UPSTA0SET_TXOUTIS_MASK 0x00000002 #define AVR32_USBB_UPSTA0SET_TXOUTIS_OFFSET 1 #define AVR32_USBB_UPSTA0SET_TXOUTIS_SIZE 1 #define AVR32_USBB_UPSTA0SET_TXSTPIS 2 #define AVR32_USBB_UPSTA0SET_TXSTPIS_MASK 0x00000004 #define AVR32_USBB_UPSTA0SET_TXSTPIS_OFFSET 2 #define AVR32_USBB_UPSTA0SET_TXSTPIS_SIZE 1 #define AVR32_USBB_UPSTA0_CFGOK 18 #define AVR32_USBB_UPSTA0_CFGOK_MASK 0x00040000 #define AVR32_USBB_UPSTA0_CFGOK_OFFSET 18 #define AVR32_USBB_UPSTA0_CFGOK_SIZE 1 #define AVR32_USBB_UPSTA0_CURRBK 14 #define AVR32_USBB_UPSTA0_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UPSTA0_CURRBK_OFFSET 14 #define AVR32_USBB_UPSTA0_CURRBK_SIZE 2 #define AVR32_USBB_UPSTA0_DTSEQ 8 #define AVR32_USBB_UPSTA0_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UPSTA0_DTSEQ_OFFSET 8 #define AVR32_USBB_UPSTA0_DTSEQ_SIZE 2 #define AVR32_USBB_UPSTA0_NAKEDI 4 #define AVR32_USBB_UPSTA0_NAKEDI_MASK 0x00000010 #define AVR32_USBB_UPSTA0_NAKEDI_OFFSET 4 #define AVR32_USBB_UPSTA0_NAKEDI_SIZE 1 #define AVR32_USBB_UPSTA0_NBUSYBK 12 #define AVR32_USBB_UPSTA0_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UPSTA0_NBUSYBK_OFFSET 12 #define AVR32_USBB_UPSTA0_NBUSYBK_SIZE 2 #define AVR32_USBB_UPSTA0_OVERFI 5 #define AVR32_USBB_UPSTA0_OVERFI_MASK 0x00000020 #define AVR32_USBB_UPSTA0_OVERFI_OFFSET 5 #define AVR32_USBB_UPSTA0_OVERFI_SIZE 1 #define AVR32_USBB_UPSTA0_PBYCT 20 #define AVR32_USBB_UPSTA0_PBYCT_MASK 0x7ff00000 #define AVR32_USBB_UPSTA0_PBYCT_OFFSET 20 #define AVR32_USBB_UPSTA0_PBYCT_SIZE 11 #define AVR32_USBB_UPSTA0_PERRI 3 #define AVR32_USBB_UPSTA0_PERRI_MASK 0x00000008 #define AVR32_USBB_UPSTA0_PERRI_OFFSET 3 #define AVR32_USBB_UPSTA0_PERRI_SIZE 1 #define AVR32_USBB_UPSTA0_RWALL 16 #define AVR32_USBB_UPSTA0_RWALL_MASK 0x00010000 #define AVR32_USBB_UPSTA0_RWALL_OFFSET 16 #define AVR32_USBB_UPSTA0_RWALL_SIZE 1 #define AVR32_USBB_UPSTA0_RXINI 0 #define AVR32_USBB_UPSTA0_RXINI_MASK 0x00000001 #define AVR32_USBB_UPSTA0_RXINI_OFFSET 0 #define AVR32_USBB_UPSTA0_RXINI_SIZE 1 #define AVR32_USBB_UPSTA0_RXSTALLDI 6 #define AVR32_USBB_UPSTA0_RXSTALLDI_MASK 0x00000040 #define AVR32_USBB_UPSTA0_RXSTALLDI_OFFSET 6 #define AVR32_USBB_UPSTA0_RXSTALLDI_SIZE 1 #define AVR32_USBB_UPSTA0_SHORTPACKETI 7 #define AVR32_USBB_UPSTA0_SHORTPACKETI_MASK 0x00000080 #define AVR32_USBB_UPSTA0_SHORTPACKETI_OFFSET 7 #define AVR32_USBB_UPSTA0_SHORTPACKETI_SIZE 1 #define AVR32_USBB_UPSTA0_TXOUTI 1 #define AVR32_USBB_UPSTA0_TXOUTI_MASK 0x00000002 #define AVR32_USBB_UPSTA0_TXOUTI_OFFSET 1 #define AVR32_USBB_UPSTA0_TXOUTI_SIZE 1 #define AVR32_USBB_UPSTA0_TXSTPI 2 #define AVR32_USBB_UPSTA0_TXSTPI_MASK 0x00000004 #define AVR32_USBB_UPSTA0_TXSTPI_OFFSET 2 #define AVR32_USBB_UPSTA0_TXSTPI_SIZE 1 #define AVR32_USBB_UPSTA1 0x00000534 #define AVR32_USBB_UPSTA1CLR 0x00000564 #define AVR32_USBB_UPSTA1CLR_NAKEDIC 4 #define AVR32_USBB_UPSTA1CLR_NAKEDIC_MASK 0x00000010 #define AVR32_USBB_UPSTA1CLR_NAKEDIC_OFFSET 4 #define AVR32_USBB_UPSTA1CLR_NAKEDIC_SIZE 1 #define AVR32_USBB_UPSTA1CLR_OVERFIC 5 #define AVR32_USBB_UPSTA1CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UPSTA1CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UPSTA1CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UPSTA1CLR_RXINIC 0 #define AVR32_USBB_UPSTA1CLR_RXINIC_MASK 0x00000001 #define AVR32_USBB_UPSTA1CLR_RXINIC_OFFSET 0 #define AVR32_USBB_UPSTA1CLR_RXINIC_SIZE 1 #define AVR32_USBB_UPSTA1CLR_RXSTALLDIC 6 #define AVR32_USBB_UPSTA1CLR_RXSTALLDIC_MASK 0x00000040 #define AVR32_USBB_UPSTA1CLR_RXSTALLDIC_OFFSET 6 #define AVR32_USBB_UPSTA1CLR_RXSTALLDIC_SIZE 1 #define AVR32_USBB_UPSTA1CLR_SHORTPACKETIC 7 #define AVR32_USBB_UPSTA1CLR_SHORTPACKETIC_MASK 0x00000080 #define AVR32_USBB_UPSTA1CLR_SHORTPACKETIC_OFFSET 7 #define AVR32_USBB_UPSTA1CLR_SHORTPACKETIC_SIZE 1 #define AVR32_USBB_UPSTA1CLR_TXOUTIC 1 #define AVR32_USBB_UPSTA1CLR_TXOUTIC_MASK 0x00000002 #define AVR32_USBB_UPSTA1CLR_TXOUTIC_OFFSET 1 #define AVR32_USBB_UPSTA1CLR_TXOUTIC_SIZE 1 #define AVR32_USBB_UPSTA1CLR_TXSTPIC 2 #define AVR32_USBB_UPSTA1CLR_TXSTPIC_MASK 0x00000004 #define AVR32_USBB_UPSTA1CLR_TXSTPIC_OFFSET 2 #define AVR32_USBB_UPSTA1CLR_TXSTPIC_SIZE 1 #define AVR32_USBB_UPSTA1SET 0x00000594 #define AVR32_USBB_UPSTA1SET_NAKEDIS 4 #define AVR32_USBB_UPSTA1SET_NAKEDIS_MASK 0x00000010 #define AVR32_USBB_UPSTA1SET_NAKEDIS_OFFSET 4 #define AVR32_USBB_UPSTA1SET_NAKEDIS_SIZE 1 #define AVR32_USBB_UPSTA1SET_NBUSYBKS 12 #define AVR32_USBB_UPSTA1SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UPSTA1SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UPSTA1SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UPSTA1SET_OVERFIS 5 #define AVR32_USBB_UPSTA1SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UPSTA1SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UPSTA1SET_OVERFIS_SIZE 1 #define AVR32_USBB_UPSTA1SET_PERRIS 3 #define AVR32_USBB_UPSTA1SET_PERRIS_MASK 0x00000008 #define AVR32_USBB_UPSTA1SET_PERRIS_OFFSET 3 #define AVR32_USBB_UPSTA1SET_PERRIS_SIZE 1 #define AVR32_USBB_UPSTA1SET_RXINIS 0 #define AVR32_USBB_UPSTA1SET_RXINIS_MASK 0x00000001 #define AVR32_USBB_UPSTA1SET_RXINIS_OFFSET 0 #define AVR32_USBB_UPSTA1SET_RXINIS_SIZE 1 #define AVR32_USBB_UPSTA1SET_RXSTALLDIS 6 #define AVR32_USBB_UPSTA1SET_RXSTALLDIS_MASK 0x00000040 #define AVR32_USBB_UPSTA1SET_RXSTALLDIS_OFFSET 6 #define AVR32_USBB_UPSTA1SET_RXSTALLDIS_SIZE 1 #define AVR32_USBB_UPSTA1SET_SHORTPACKETIS 7 #define AVR32_USBB_UPSTA1SET_SHORTPACKETIS_MASK 0x00000080 #define AVR32_USBB_UPSTA1SET_SHORTPACKETIS_OFFSET 7 #define AVR32_USBB_UPSTA1SET_SHORTPACKETIS_SIZE 1 #define AVR32_USBB_UPSTA1SET_TXOUTIS 1 #define AVR32_USBB_UPSTA1SET_TXOUTIS_MASK 0x00000002 #define AVR32_USBB_UPSTA1SET_TXOUTIS_OFFSET 1 #define AVR32_USBB_UPSTA1SET_TXOUTIS_SIZE 1 #define AVR32_USBB_UPSTA1SET_TXSTPIS 2 #define AVR32_USBB_UPSTA1SET_TXSTPIS_MASK 0x00000004 #define AVR32_USBB_UPSTA1SET_TXSTPIS_OFFSET 2 #define AVR32_USBB_UPSTA1SET_TXSTPIS_SIZE 1 #define AVR32_USBB_UPSTA1_CFGOK 18 #define AVR32_USBB_UPSTA1_CFGOK_MASK 0x00040000 #define AVR32_USBB_UPSTA1_CFGOK_OFFSET 18 #define AVR32_USBB_UPSTA1_CFGOK_SIZE 1 #define AVR32_USBB_UPSTA1_CURRBK 14 #define AVR32_USBB_UPSTA1_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UPSTA1_CURRBK_OFFSET 14 #define AVR32_USBB_UPSTA1_CURRBK_SIZE 2 #define AVR32_USBB_UPSTA1_DTSEQ 8 #define AVR32_USBB_UPSTA1_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UPSTA1_DTSEQ_OFFSET 8 #define AVR32_USBB_UPSTA1_DTSEQ_SIZE 2 #define AVR32_USBB_UPSTA1_NAKEDI 4 #define AVR32_USBB_UPSTA1_NAKEDI_MASK 0x00000010 #define AVR32_USBB_UPSTA1_NAKEDI_OFFSET 4 #define AVR32_USBB_UPSTA1_NAKEDI_SIZE 1 #define AVR32_USBB_UPSTA1_NBUSYBK 12 #define AVR32_USBB_UPSTA1_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UPSTA1_NBUSYBK_OFFSET 12 #define AVR32_USBB_UPSTA1_NBUSYBK_SIZE 2 #define AVR32_USBB_UPSTA1_OVERFI 5 #define AVR32_USBB_UPSTA1_OVERFI_MASK 0x00000020 #define AVR32_USBB_UPSTA1_OVERFI_OFFSET 5 #define AVR32_USBB_UPSTA1_OVERFI_SIZE 1 #define AVR32_USBB_UPSTA1_PBYCT 20 #define AVR32_USBB_UPSTA1_PBYCT_MASK 0x7ff00000 #define AVR32_USBB_UPSTA1_PBYCT_OFFSET 20 #define AVR32_USBB_UPSTA1_PBYCT_SIZE 11 #define AVR32_USBB_UPSTA1_PERRI 3 #define AVR32_USBB_UPSTA1_PERRI_MASK 0x00000008 #define AVR32_USBB_UPSTA1_PERRI_OFFSET 3 #define AVR32_USBB_UPSTA1_PERRI_SIZE 1 #define AVR32_USBB_UPSTA1_RWALL 16 #define AVR32_USBB_UPSTA1_RWALL_MASK 0x00010000 #define AVR32_USBB_UPSTA1_RWALL_OFFSET 16 #define AVR32_USBB_UPSTA1_RWALL_SIZE 1 #define AVR32_USBB_UPSTA1_RXINI 0 #define AVR32_USBB_UPSTA1_RXINI_MASK 0x00000001 #define AVR32_USBB_UPSTA1_RXINI_OFFSET 0 #define AVR32_USBB_UPSTA1_RXINI_SIZE 1 #define AVR32_USBB_UPSTA1_RXSTALLDI 6 #define AVR32_USBB_UPSTA1_RXSTALLDI_MASK 0x00000040 #define AVR32_USBB_UPSTA1_RXSTALLDI_OFFSET 6 #define AVR32_USBB_UPSTA1_RXSTALLDI_SIZE 1 #define AVR32_USBB_UPSTA1_SHORTPACKETI 7 #define AVR32_USBB_UPSTA1_SHORTPACKETI_MASK 0x00000080 #define AVR32_USBB_UPSTA1_SHORTPACKETI_OFFSET 7 #define AVR32_USBB_UPSTA1_SHORTPACKETI_SIZE 1 #define AVR32_USBB_UPSTA1_TXOUTI 1 #define AVR32_USBB_UPSTA1_TXOUTI_MASK 0x00000002 #define AVR32_USBB_UPSTA1_TXOUTI_OFFSET 1 #define AVR32_USBB_UPSTA1_TXOUTI_SIZE 1 #define AVR32_USBB_UPSTA1_TXSTPI 2 #define AVR32_USBB_UPSTA1_TXSTPI_MASK 0x00000004 #define AVR32_USBB_UPSTA1_TXSTPI_OFFSET 2 #define AVR32_USBB_UPSTA1_TXSTPI_SIZE 1 #define AVR32_USBB_UPSTA2 0x00000538 #define AVR32_USBB_UPSTA2CLR 0x00000568 #define AVR32_USBB_UPSTA2CLR_NAKEDIC 4 #define AVR32_USBB_UPSTA2CLR_NAKEDIC_MASK 0x00000010 #define AVR32_USBB_UPSTA2CLR_NAKEDIC_OFFSET 4 #define AVR32_USBB_UPSTA2CLR_NAKEDIC_SIZE 1 #define AVR32_USBB_UPSTA2CLR_OVERFIC 5 #define AVR32_USBB_UPSTA2CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UPSTA2CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UPSTA2CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UPSTA2CLR_RXINIC 0 #define AVR32_USBB_UPSTA2CLR_RXINIC_MASK 0x00000001 #define AVR32_USBB_UPSTA2CLR_RXINIC_OFFSET 0 #define AVR32_USBB_UPSTA2CLR_RXINIC_SIZE 1 #define AVR32_USBB_UPSTA2CLR_RXSTALLDIC 6 #define AVR32_USBB_UPSTA2CLR_RXSTALLDIC_MASK 0x00000040 #define AVR32_USBB_UPSTA2CLR_RXSTALLDIC_OFFSET 6 #define AVR32_USBB_UPSTA2CLR_RXSTALLDIC_SIZE 1 #define AVR32_USBB_UPSTA2CLR_SHORTPACKETIC 7 #define AVR32_USBB_UPSTA2CLR_SHORTPACKETIC_MASK 0x00000080 #define AVR32_USBB_UPSTA2CLR_SHORTPACKETIC_OFFSET 7 #define AVR32_USBB_UPSTA2CLR_SHORTPACKETIC_SIZE 1 #define AVR32_USBB_UPSTA2CLR_TXOUTIC 1 #define AVR32_USBB_UPSTA2CLR_TXOUTIC_MASK 0x00000002 #define AVR32_USBB_UPSTA2CLR_TXOUTIC_OFFSET 1 #define AVR32_USBB_UPSTA2CLR_TXOUTIC_SIZE 1 #define AVR32_USBB_UPSTA2CLR_TXSTPIC 2 #define AVR32_USBB_UPSTA2CLR_TXSTPIC_MASK 0x00000004 #define AVR32_USBB_UPSTA2CLR_TXSTPIC_OFFSET 2 #define AVR32_USBB_UPSTA2CLR_TXSTPIC_SIZE 1 #define AVR32_USBB_UPSTA2SET 0x00000598 #define AVR32_USBB_UPSTA2SET_NAKEDIS 4 #define AVR32_USBB_UPSTA2SET_NAKEDIS_MASK 0x00000010 #define AVR32_USBB_UPSTA2SET_NAKEDIS_OFFSET 4 #define AVR32_USBB_UPSTA2SET_NAKEDIS_SIZE 1 #define AVR32_USBB_UPSTA2SET_NBUSYBKS 12 #define AVR32_USBB_UPSTA2SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UPSTA2SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UPSTA2SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UPSTA2SET_OVERFIS 5 #define AVR32_USBB_UPSTA2SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UPSTA2SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UPSTA2SET_OVERFIS_SIZE 1 #define AVR32_USBB_UPSTA2SET_PERRIS 3 #define AVR32_USBB_UPSTA2SET_PERRIS_MASK 0x00000008 #define AVR32_USBB_UPSTA2SET_PERRIS_OFFSET 3 #define AVR32_USBB_UPSTA2SET_PERRIS_SIZE 1 #define AVR32_USBB_UPSTA2SET_RXINIS 0 #define AVR32_USBB_UPSTA2SET_RXINIS_MASK 0x00000001 #define AVR32_USBB_UPSTA2SET_RXINIS_OFFSET 0 #define AVR32_USBB_UPSTA2SET_RXINIS_SIZE 1 #define AVR32_USBB_UPSTA2SET_RXSTALLDIS 6 #define AVR32_USBB_UPSTA2SET_RXSTALLDIS_MASK 0x00000040 #define AVR32_USBB_UPSTA2SET_RXSTALLDIS_OFFSET 6 #define AVR32_USBB_UPSTA2SET_RXSTALLDIS_SIZE 1 #define AVR32_USBB_UPSTA2SET_SHORTPACKETIS 7 #define AVR32_USBB_UPSTA2SET_SHORTPACKETIS_MASK 0x00000080 #define AVR32_USBB_UPSTA2SET_SHORTPACKETIS_OFFSET 7 #define AVR32_USBB_UPSTA2SET_SHORTPACKETIS_SIZE 1 #define AVR32_USBB_UPSTA2SET_TXOUTIS 1 #define AVR32_USBB_UPSTA2SET_TXOUTIS_MASK 0x00000002 #define AVR32_USBB_UPSTA2SET_TXOUTIS_OFFSET 1 #define AVR32_USBB_UPSTA2SET_TXOUTIS_SIZE 1 #define AVR32_USBB_UPSTA2SET_TXSTPIS 2 #define AVR32_USBB_UPSTA2SET_TXSTPIS_MASK 0x00000004 #define AVR32_USBB_UPSTA2SET_TXSTPIS_OFFSET 2 #define AVR32_USBB_UPSTA2SET_TXSTPIS_SIZE 1 #define AVR32_USBB_UPSTA2_CFGOK 18 #define AVR32_USBB_UPSTA2_CFGOK_MASK 0x00040000 #define AVR32_USBB_UPSTA2_CFGOK_OFFSET 18 #define AVR32_USBB_UPSTA2_CFGOK_SIZE 1 #define AVR32_USBB_UPSTA2_CURRBK 14 #define AVR32_USBB_UPSTA2_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UPSTA2_CURRBK_OFFSET 14 #define AVR32_USBB_UPSTA2_CURRBK_SIZE 2 #define AVR32_USBB_UPSTA2_DTSEQ 8 #define AVR32_USBB_UPSTA2_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UPSTA2_DTSEQ_OFFSET 8 #define AVR32_USBB_UPSTA2_DTSEQ_SIZE 2 #define AVR32_USBB_UPSTA2_NAKEDI 4 #define AVR32_USBB_UPSTA2_NAKEDI_MASK 0x00000010 #define AVR32_USBB_UPSTA2_NAKEDI_OFFSET 4 #define AVR32_USBB_UPSTA2_NAKEDI_SIZE 1 #define AVR32_USBB_UPSTA2_NBUSYBK 12 #define AVR32_USBB_UPSTA2_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UPSTA2_NBUSYBK_OFFSET 12 #define AVR32_USBB_UPSTA2_NBUSYBK_SIZE 2 #define AVR32_USBB_UPSTA2_OVERFI 5 #define AVR32_USBB_UPSTA2_OVERFI_MASK 0x00000020 #define AVR32_USBB_UPSTA2_OVERFI_OFFSET 5 #define AVR32_USBB_UPSTA2_OVERFI_SIZE 1 #define AVR32_USBB_UPSTA2_PBYCT 20 #define AVR32_USBB_UPSTA2_PBYCT_MASK 0x7ff00000 #define AVR32_USBB_UPSTA2_PBYCT_OFFSET 20 #define AVR32_USBB_UPSTA2_PBYCT_SIZE 11 #define AVR32_USBB_UPSTA2_PERRI 3 #define AVR32_USBB_UPSTA2_PERRI_MASK 0x00000008 #define AVR32_USBB_UPSTA2_PERRI_OFFSET 3 #define AVR32_USBB_UPSTA2_PERRI_SIZE 1 #define AVR32_USBB_UPSTA2_RWALL 16 #define AVR32_USBB_UPSTA2_RWALL_MASK 0x00010000 #define AVR32_USBB_UPSTA2_RWALL_OFFSET 16 #define AVR32_USBB_UPSTA2_RWALL_SIZE 1 #define AVR32_USBB_UPSTA2_RXINI 0 #define AVR32_USBB_UPSTA2_RXINI_MASK 0x00000001 #define AVR32_USBB_UPSTA2_RXINI_OFFSET 0 #define AVR32_USBB_UPSTA2_RXINI_SIZE 1 #define AVR32_USBB_UPSTA2_RXSTALLDI 6 #define AVR32_USBB_UPSTA2_RXSTALLDI_MASK 0x00000040 #define AVR32_USBB_UPSTA2_RXSTALLDI_OFFSET 6 #define AVR32_USBB_UPSTA2_RXSTALLDI_SIZE 1 #define AVR32_USBB_UPSTA2_SHORTPACKETI 7 #define AVR32_USBB_UPSTA2_SHORTPACKETI_MASK 0x00000080 #define AVR32_USBB_UPSTA2_SHORTPACKETI_OFFSET 7 #define AVR32_USBB_UPSTA2_SHORTPACKETI_SIZE 1 #define AVR32_USBB_UPSTA2_TXOUTI 1 #define AVR32_USBB_UPSTA2_TXOUTI_MASK 0x00000002 #define AVR32_USBB_UPSTA2_TXOUTI_OFFSET 1 #define AVR32_USBB_UPSTA2_TXOUTI_SIZE 1 #define AVR32_USBB_UPSTA2_TXSTPI 2 #define AVR32_USBB_UPSTA2_TXSTPI_MASK 0x00000004 #define AVR32_USBB_UPSTA2_TXSTPI_OFFSET 2 #define AVR32_USBB_UPSTA2_TXSTPI_SIZE 1 #define AVR32_USBB_UPSTA3 0x0000053c #define AVR32_USBB_UPSTA3CLR 0x0000056c #define AVR32_USBB_UPSTA3CLR_NAKEDIC 4 #define AVR32_USBB_UPSTA3CLR_NAKEDIC_MASK 0x00000010 #define AVR32_USBB_UPSTA3CLR_NAKEDIC_OFFSET 4 #define AVR32_USBB_UPSTA3CLR_NAKEDIC_SIZE 1 #define AVR32_USBB_UPSTA3CLR_OVERFIC 5 #define AVR32_USBB_UPSTA3CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UPSTA3CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UPSTA3CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UPSTA3CLR_RXINIC 0 #define AVR32_USBB_UPSTA3CLR_RXINIC_MASK 0x00000001 #define AVR32_USBB_UPSTA3CLR_RXINIC_OFFSET 0 #define AVR32_USBB_UPSTA3CLR_RXINIC_SIZE 1 #define AVR32_USBB_UPSTA3CLR_RXSTALLDIC 6 #define AVR32_USBB_UPSTA3CLR_RXSTALLDIC_MASK 0x00000040 #define AVR32_USBB_UPSTA3CLR_RXSTALLDIC_OFFSET 6 #define AVR32_USBB_UPSTA3CLR_RXSTALLDIC_SIZE 1 #define AVR32_USBB_UPSTA3CLR_SHORTPACKETIC 7 #define AVR32_USBB_UPSTA3CLR_SHORTPACKETIC_MASK 0x00000080 #define AVR32_USBB_UPSTA3CLR_SHORTPACKETIC_OFFSET 7 #define AVR32_USBB_UPSTA3CLR_SHORTPACKETIC_SIZE 1 #define AVR32_USBB_UPSTA3CLR_TXOUTIC 1 #define AVR32_USBB_UPSTA3CLR_TXOUTIC_MASK 0x00000002 #define AVR32_USBB_UPSTA3CLR_TXOUTIC_OFFSET 1 #define AVR32_USBB_UPSTA3CLR_TXOUTIC_SIZE 1 #define AVR32_USBB_UPSTA3CLR_TXSTPIC 2 #define AVR32_USBB_UPSTA3CLR_TXSTPIC_MASK 0x00000004 #define AVR32_USBB_UPSTA3CLR_TXSTPIC_OFFSET 2 #define AVR32_USBB_UPSTA3CLR_TXSTPIC_SIZE 1 #define AVR32_USBB_UPSTA3SET 0x0000059c #define AVR32_USBB_UPSTA3SET_NAKEDIS 4 #define AVR32_USBB_UPSTA3SET_NAKEDIS_MASK 0x00000010 #define AVR32_USBB_UPSTA3SET_NAKEDIS_OFFSET 4 #define AVR32_USBB_UPSTA3SET_NAKEDIS_SIZE 1 #define AVR32_USBB_UPSTA3SET_NBUSYBKS 12 #define AVR32_USBB_UPSTA3SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UPSTA3SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UPSTA3SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UPSTA3SET_OVERFIS 5 #define AVR32_USBB_UPSTA3SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UPSTA3SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UPSTA3SET_OVERFIS_SIZE 1 #define AVR32_USBB_UPSTA3SET_PERRIS 3 #define AVR32_USBB_UPSTA3SET_PERRIS_MASK 0x00000008 #define AVR32_USBB_UPSTA3SET_PERRIS_OFFSET 3 #define AVR32_USBB_UPSTA3SET_PERRIS_SIZE 1 #define AVR32_USBB_UPSTA3SET_RXINIS 0 #define AVR32_USBB_UPSTA3SET_RXINIS_MASK 0x00000001 #define AVR32_USBB_UPSTA3SET_RXINIS_OFFSET 0 #define AVR32_USBB_UPSTA3SET_RXINIS_SIZE 1 #define AVR32_USBB_UPSTA3SET_RXSTALLDIS 6 #define AVR32_USBB_UPSTA3SET_RXSTALLDIS_MASK 0x00000040 #define AVR32_USBB_UPSTA3SET_RXSTALLDIS_OFFSET 6 #define AVR32_USBB_UPSTA3SET_RXSTALLDIS_SIZE 1 #define AVR32_USBB_UPSTA3SET_SHORTPACKETIS 7 #define AVR32_USBB_UPSTA3SET_SHORTPACKETIS_MASK 0x00000080 #define AVR32_USBB_UPSTA3SET_SHORTPACKETIS_OFFSET 7 #define AVR32_USBB_UPSTA3SET_SHORTPACKETIS_SIZE 1 #define AVR32_USBB_UPSTA3SET_TXOUTIS 1 #define AVR32_USBB_UPSTA3SET_TXOUTIS_MASK 0x00000002 #define AVR32_USBB_UPSTA3SET_TXOUTIS_OFFSET 1 #define AVR32_USBB_UPSTA3SET_TXOUTIS_SIZE 1 #define AVR32_USBB_UPSTA3SET_TXSTPIS 2 #define AVR32_USBB_UPSTA3SET_TXSTPIS_MASK 0x00000004 #define AVR32_USBB_UPSTA3SET_TXSTPIS_OFFSET 2 #define AVR32_USBB_UPSTA3SET_TXSTPIS_SIZE 1 #define AVR32_USBB_UPSTA3_CFGOK 18 #define AVR32_USBB_UPSTA3_CFGOK_MASK 0x00040000 #define AVR32_USBB_UPSTA3_CFGOK_OFFSET 18 #define AVR32_USBB_UPSTA3_CFGOK_SIZE 1 #define AVR32_USBB_UPSTA3_CURRBK 14 #define AVR32_USBB_UPSTA3_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UPSTA3_CURRBK_OFFSET 14 #define AVR32_USBB_UPSTA3_CURRBK_SIZE 2 #define AVR32_USBB_UPSTA3_DTSEQ 8 #define AVR32_USBB_UPSTA3_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UPSTA3_DTSEQ_OFFSET 8 #define AVR32_USBB_UPSTA3_DTSEQ_SIZE 2 #define AVR32_USBB_UPSTA3_NAKEDI 4 #define AVR32_USBB_UPSTA3_NAKEDI_MASK 0x00000010 #define AVR32_USBB_UPSTA3_NAKEDI_OFFSET 4 #define AVR32_USBB_UPSTA3_NAKEDI_SIZE 1 #define AVR32_USBB_UPSTA3_NBUSYBK 12 #define AVR32_USBB_UPSTA3_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UPSTA3_NBUSYBK_OFFSET 12 #define AVR32_USBB_UPSTA3_NBUSYBK_SIZE 2 #define AVR32_USBB_UPSTA3_OVERFI 5 #define AVR32_USBB_UPSTA3_OVERFI_MASK 0x00000020 #define AVR32_USBB_UPSTA3_OVERFI_OFFSET 5 #define AVR32_USBB_UPSTA3_OVERFI_SIZE 1 #define AVR32_USBB_UPSTA3_PBYCT 20 #define AVR32_USBB_UPSTA3_PBYCT_MASK 0x7ff00000 #define AVR32_USBB_UPSTA3_PBYCT_OFFSET 20 #define AVR32_USBB_UPSTA3_PBYCT_SIZE 11 #define AVR32_USBB_UPSTA3_PERRI 3 #define AVR32_USBB_UPSTA3_PERRI_MASK 0x00000008 #define AVR32_USBB_UPSTA3_PERRI_OFFSET 3 #define AVR32_USBB_UPSTA3_PERRI_SIZE 1 #define AVR32_USBB_UPSTA3_RWALL 16 #define AVR32_USBB_UPSTA3_RWALL_MASK 0x00010000 #define AVR32_USBB_UPSTA3_RWALL_OFFSET 16 #define AVR32_USBB_UPSTA3_RWALL_SIZE 1 #define AVR32_USBB_UPSTA3_RXINI 0 #define AVR32_USBB_UPSTA3_RXINI_MASK 0x00000001 #define AVR32_USBB_UPSTA3_RXINI_OFFSET 0 #define AVR32_USBB_UPSTA3_RXINI_SIZE 1 #define AVR32_USBB_UPSTA3_RXSTALLDI 6 #define AVR32_USBB_UPSTA3_RXSTALLDI_MASK 0x00000040 #define AVR32_USBB_UPSTA3_RXSTALLDI_OFFSET 6 #define AVR32_USBB_UPSTA3_RXSTALLDI_SIZE 1 #define AVR32_USBB_UPSTA3_SHORTPACKETI 7 #define AVR32_USBB_UPSTA3_SHORTPACKETI_MASK 0x00000080 #define AVR32_USBB_UPSTA3_SHORTPACKETI_OFFSET 7 #define AVR32_USBB_UPSTA3_SHORTPACKETI_SIZE 1 #define AVR32_USBB_UPSTA3_TXOUTI 1 #define AVR32_USBB_UPSTA3_TXOUTI_MASK 0x00000002 #define AVR32_USBB_UPSTA3_TXOUTI_OFFSET 1 #define AVR32_USBB_UPSTA3_TXOUTI_SIZE 1 #define AVR32_USBB_UPSTA3_TXSTPI 2 #define AVR32_USBB_UPSTA3_TXSTPI_MASK 0x00000004 #define AVR32_USBB_UPSTA3_TXSTPI_OFFSET 2 #define AVR32_USBB_UPSTA3_TXSTPI_SIZE 1 #define AVR32_USBB_UPSTA4 0x00000540 #define AVR32_USBB_UPSTA4CLR 0x00000570 #define AVR32_USBB_UPSTA4CLR_NAKEDIC 4 #define AVR32_USBB_UPSTA4CLR_NAKEDIC_MASK 0x00000010 #define AVR32_USBB_UPSTA4CLR_NAKEDIC_OFFSET 4 #define AVR32_USBB_UPSTA4CLR_NAKEDIC_SIZE 1 #define AVR32_USBB_UPSTA4CLR_OVERFIC 5 #define AVR32_USBB_UPSTA4CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UPSTA4CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UPSTA4CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UPSTA4CLR_RXINIC 0 #define AVR32_USBB_UPSTA4CLR_RXINIC_MASK 0x00000001 #define AVR32_USBB_UPSTA4CLR_RXINIC_OFFSET 0 #define AVR32_USBB_UPSTA4CLR_RXINIC_SIZE 1 #define AVR32_USBB_UPSTA4CLR_RXSTALLDIC 6 #define AVR32_USBB_UPSTA4CLR_RXSTALLDIC_MASK 0x00000040 #define AVR32_USBB_UPSTA4CLR_RXSTALLDIC_OFFSET 6 #define AVR32_USBB_UPSTA4CLR_RXSTALLDIC_SIZE 1 #define AVR32_USBB_UPSTA4CLR_SHORTPACKETIC 7 #define AVR32_USBB_UPSTA4CLR_SHORTPACKETIC_MASK 0x00000080 #define AVR32_USBB_UPSTA4CLR_SHORTPACKETIC_OFFSET 7 #define AVR32_USBB_UPSTA4CLR_SHORTPACKETIC_SIZE 1 #define AVR32_USBB_UPSTA4CLR_TXOUTIC 1 #define AVR32_USBB_UPSTA4CLR_TXOUTIC_MASK 0x00000002 #define AVR32_USBB_UPSTA4CLR_TXOUTIC_OFFSET 1 #define AVR32_USBB_UPSTA4CLR_TXOUTIC_SIZE 1 #define AVR32_USBB_UPSTA4CLR_TXSTPIC 2 #define AVR32_USBB_UPSTA4CLR_TXSTPIC_MASK 0x00000004 #define AVR32_USBB_UPSTA4CLR_TXSTPIC_OFFSET 2 #define AVR32_USBB_UPSTA4CLR_TXSTPIC_SIZE 1 #define AVR32_USBB_UPSTA4SET 0x000005a0 #define AVR32_USBB_UPSTA4SET_NAKEDIS 4 #define AVR32_USBB_UPSTA4SET_NAKEDIS_MASK 0x00000010 #define AVR32_USBB_UPSTA4SET_NAKEDIS_OFFSET 4 #define AVR32_USBB_UPSTA4SET_NAKEDIS_SIZE 1 #define AVR32_USBB_UPSTA4SET_NBUSYBKS 12 #define AVR32_USBB_UPSTA4SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UPSTA4SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UPSTA4SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UPSTA4SET_OVERFIS 5 #define AVR32_USBB_UPSTA4SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UPSTA4SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UPSTA4SET_OVERFIS_SIZE 1 #define AVR32_USBB_UPSTA4SET_PERRIS 3 #define AVR32_USBB_UPSTA4SET_PERRIS_MASK 0x00000008 #define AVR32_USBB_UPSTA4SET_PERRIS_OFFSET 3 #define AVR32_USBB_UPSTA4SET_PERRIS_SIZE 1 #define AVR32_USBB_UPSTA4SET_RXINIS 0 #define AVR32_USBB_UPSTA4SET_RXINIS_MASK 0x00000001 #define AVR32_USBB_UPSTA4SET_RXINIS_OFFSET 0 #define AVR32_USBB_UPSTA4SET_RXINIS_SIZE 1 #define AVR32_USBB_UPSTA4SET_RXSTALLDIS 6 #define AVR32_USBB_UPSTA4SET_RXSTALLDIS_MASK 0x00000040 #define AVR32_USBB_UPSTA4SET_RXSTALLDIS_OFFSET 6 #define AVR32_USBB_UPSTA4SET_RXSTALLDIS_SIZE 1 #define AVR32_USBB_UPSTA4SET_SHORTPACKETIS 7 #define AVR32_USBB_UPSTA4SET_SHORTPACKETIS_MASK 0x00000080 #define AVR32_USBB_UPSTA4SET_SHORTPACKETIS_OFFSET 7 #define AVR32_USBB_UPSTA4SET_SHORTPACKETIS_SIZE 1 #define AVR32_USBB_UPSTA4SET_TXOUTIS 1 #define AVR32_USBB_UPSTA4SET_TXOUTIS_MASK 0x00000002 #define AVR32_USBB_UPSTA4SET_TXOUTIS_OFFSET 1 #define AVR32_USBB_UPSTA4SET_TXOUTIS_SIZE 1 #define AVR32_USBB_UPSTA4SET_TXSTPIS 2 #define AVR32_USBB_UPSTA4SET_TXSTPIS_MASK 0x00000004 #define AVR32_USBB_UPSTA4SET_TXSTPIS_OFFSET 2 #define AVR32_USBB_UPSTA4SET_TXSTPIS_SIZE 1 #define AVR32_USBB_UPSTA4_CFGOK 18 #define AVR32_USBB_UPSTA4_CFGOK_MASK 0x00040000 #define AVR32_USBB_UPSTA4_CFGOK_OFFSET 18 #define AVR32_USBB_UPSTA4_CFGOK_SIZE 1 #define AVR32_USBB_UPSTA4_CURRBK 14 #define AVR32_USBB_UPSTA4_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UPSTA4_CURRBK_OFFSET 14 #define AVR32_USBB_UPSTA4_CURRBK_SIZE 2 #define AVR32_USBB_UPSTA4_DTSEQ 8 #define AVR32_USBB_UPSTA4_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UPSTA4_DTSEQ_OFFSET 8 #define AVR32_USBB_UPSTA4_DTSEQ_SIZE 2 #define AVR32_USBB_UPSTA4_NAKEDI 4 #define AVR32_USBB_UPSTA4_NAKEDI_MASK 0x00000010 #define AVR32_USBB_UPSTA4_NAKEDI_OFFSET 4 #define AVR32_USBB_UPSTA4_NAKEDI_SIZE 1 #define AVR32_USBB_UPSTA4_NBUSYBK 12 #define AVR32_USBB_UPSTA4_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UPSTA4_NBUSYBK_OFFSET 12 #define AVR32_USBB_UPSTA4_NBUSYBK_SIZE 2 #define AVR32_USBB_UPSTA4_OVERFI 5 #define AVR32_USBB_UPSTA4_OVERFI_MASK 0x00000020 #define AVR32_USBB_UPSTA4_OVERFI_OFFSET 5 #define AVR32_USBB_UPSTA4_OVERFI_SIZE 1 #define AVR32_USBB_UPSTA4_PBYCT 20 #define AVR32_USBB_UPSTA4_PBYCT_MASK 0x7ff00000 #define AVR32_USBB_UPSTA4_PBYCT_OFFSET 20 #define AVR32_USBB_UPSTA4_PBYCT_SIZE 11 #define AVR32_USBB_UPSTA4_PERRI 3 #define AVR32_USBB_UPSTA4_PERRI_MASK 0x00000008 #define AVR32_USBB_UPSTA4_PERRI_OFFSET 3 #define AVR32_USBB_UPSTA4_PERRI_SIZE 1 #define AVR32_USBB_UPSTA4_RWALL 16 #define AVR32_USBB_UPSTA4_RWALL_MASK 0x00010000 #define AVR32_USBB_UPSTA4_RWALL_OFFSET 16 #define AVR32_USBB_UPSTA4_RWALL_SIZE 1 #define AVR32_USBB_UPSTA4_RXINI 0 #define AVR32_USBB_UPSTA4_RXINI_MASK 0x00000001 #define AVR32_USBB_UPSTA4_RXINI_OFFSET 0 #define AVR32_USBB_UPSTA4_RXINI_SIZE 1 #define AVR32_USBB_UPSTA4_RXSTALLDI 6 #define AVR32_USBB_UPSTA4_RXSTALLDI_MASK 0x00000040 #define AVR32_USBB_UPSTA4_RXSTALLDI_OFFSET 6 #define AVR32_USBB_UPSTA4_RXSTALLDI_SIZE 1 #define AVR32_USBB_UPSTA4_SHORTPACKETI 7 #define AVR32_USBB_UPSTA4_SHORTPACKETI_MASK 0x00000080 #define AVR32_USBB_UPSTA4_SHORTPACKETI_OFFSET 7 #define AVR32_USBB_UPSTA4_SHORTPACKETI_SIZE 1 #define AVR32_USBB_UPSTA4_TXOUTI 1 #define AVR32_USBB_UPSTA4_TXOUTI_MASK 0x00000002 #define AVR32_USBB_UPSTA4_TXOUTI_OFFSET 1 #define AVR32_USBB_UPSTA4_TXOUTI_SIZE 1 #define AVR32_USBB_UPSTA4_TXSTPI 2 #define AVR32_USBB_UPSTA4_TXSTPI_MASK 0x00000004 #define AVR32_USBB_UPSTA4_TXSTPI_OFFSET 2 #define AVR32_USBB_UPSTA4_TXSTPI_SIZE 1 #define AVR32_USBB_UPSTA5 0x00000544 #define AVR32_USBB_UPSTA5CLR 0x00000574 #define AVR32_USBB_UPSTA5CLR_NAKEDIC 4 #define AVR32_USBB_UPSTA5CLR_NAKEDIC_MASK 0x00000010 #define AVR32_USBB_UPSTA5CLR_NAKEDIC_OFFSET 4 #define AVR32_USBB_UPSTA5CLR_NAKEDIC_SIZE 1 #define AVR32_USBB_UPSTA5CLR_OVERFIC 5 #define AVR32_USBB_UPSTA5CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UPSTA5CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UPSTA5CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UPSTA5CLR_RXINIC 0 #define AVR32_USBB_UPSTA5CLR_RXINIC_MASK 0x00000001 #define AVR32_USBB_UPSTA5CLR_RXINIC_OFFSET 0 #define AVR32_USBB_UPSTA5CLR_RXINIC_SIZE 1 #define AVR32_USBB_UPSTA5CLR_RXSTALLDIC 6 #define AVR32_USBB_UPSTA5CLR_RXSTALLDIC_MASK 0x00000040 #define AVR32_USBB_UPSTA5CLR_RXSTALLDIC_OFFSET 6 #define AVR32_USBB_UPSTA5CLR_RXSTALLDIC_SIZE 1 #define AVR32_USBB_UPSTA5CLR_SHORTPACKETIC 7 #define AVR32_USBB_UPSTA5CLR_SHORTPACKETIC_MASK 0x00000080 #define AVR32_USBB_UPSTA5CLR_SHORTPACKETIC_OFFSET 7 #define AVR32_USBB_UPSTA5CLR_SHORTPACKETIC_SIZE 1 #define AVR32_USBB_UPSTA5CLR_TXOUTIC 1 #define AVR32_USBB_UPSTA5CLR_TXOUTIC_MASK 0x00000002 #define AVR32_USBB_UPSTA5CLR_TXOUTIC_OFFSET 1 #define AVR32_USBB_UPSTA5CLR_TXOUTIC_SIZE 1 #define AVR32_USBB_UPSTA5CLR_TXSTPIC 2 #define AVR32_USBB_UPSTA5CLR_TXSTPIC_MASK 0x00000004 #define AVR32_USBB_UPSTA5CLR_TXSTPIC_OFFSET 2 #define AVR32_USBB_UPSTA5CLR_TXSTPIC_SIZE 1 #define AVR32_USBB_UPSTA5SET 0x000005a4 #define AVR32_USBB_UPSTA5SET_NAKEDIS 4 #define AVR32_USBB_UPSTA5SET_NAKEDIS_MASK 0x00000010 #define AVR32_USBB_UPSTA5SET_NAKEDIS_OFFSET 4 #define AVR32_USBB_UPSTA5SET_NAKEDIS_SIZE 1 #define AVR32_USBB_UPSTA5SET_NBUSYBKS 12 #define AVR32_USBB_UPSTA5SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UPSTA5SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UPSTA5SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UPSTA5SET_OVERFIS 5 #define AVR32_USBB_UPSTA5SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UPSTA5SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UPSTA5SET_OVERFIS_SIZE 1 #define AVR32_USBB_UPSTA5SET_PERRIS 3 #define AVR32_USBB_UPSTA5SET_PERRIS_MASK 0x00000008 #define AVR32_USBB_UPSTA5SET_PERRIS_OFFSET 3 #define AVR32_USBB_UPSTA5SET_PERRIS_SIZE 1 #define AVR32_USBB_UPSTA5SET_RXINIS 0 #define AVR32_USBB_UPSTA5SET_RXINIS_MASK 0x00000001 #define AVR32_USBB_UPSTA5SET_RXINIS_OFFSET 0 #define AVR32_USBB_UPSTA5SET_RXINIS_SIZE 1 #define AVR32_USBB_UPSTA5SET_RXSTALLDIS 6 #define AVR32_USBB_UPSTA5SET_RXSTALLDIS_MASK 0x00000040 #define AVR32_USBB_UPSTA5SET_RXSTALLDIS_OFFSET 6 #define AVR32_USBB_UPSTA5SET_RXSTALLDIS_SIZE 1 #define AVR32_USBB_UPSTA5SET_SHORTPACKETIS 7 #define AVR32_USBB_UPSTA5SET_SHORTPACKETIS_MASK 0x00000080 #define AVR32_USBB_UPSTA5SET_SHORTPACKETIS_OFFSET 7 #define AVR32_USBB_UPSTA5SET_SHORTPACKETIS_SIZE 1 #define AVR32_USBB_UPSTA5SET_TXOUTIS 1 #define AVR32_USBB_UPSTA5SET_TXOUTIS_MASK 0x00000002 #define AVR32_USBB_UPSTA5SET_TXOUTIS_OFFSET 1 #define AVR32_USBB_UPSTA5SET_TXOUTIS_SIZE 1 #define AVR32_USBB_UPSTA5SET_TXSTPIS 2 #define AVR32_USBB_UPSTA5SET_TXSTPIS_MASK 0x00000004 #define AVR32_USBB_UPSTA5SET_TXSTPIS_OFFSET 2 #define AVR32_USBB_UPSTA5SET_TXSTPIS_SIZE 1 #define AVR32_USBB_UPSTA5_CFGOK 18 #define AVR32_USBB_UPSTA5_CFGOK_MASK 0x00040000 #define AVR32_USBB_UPSTA5_CFGOK_OFFSET 18 #define AVR32_USBB_UPSTA5_CFGOK_SIZE 1 #define AVR32_USBB_UPSTA5_CURRBK 14 #define AVR32_USBB_UPSTA5_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UPSTA5_CURRBK_OFFSET 14 #define AVR32_USBB_UPSTA5_CURRBK_SIZE 2 #define AVR32_USBB_UPSTA5_DTSEQ 8 #define AVR32_USBB_UPSTA5_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UPSTA5_DTSEQ_OFFSET 8 #define AVR32_USBB_UPSTA5_DTSEQ_SIZE 2 #define AVR32_USBB_UPSTA5_NAKEDI 4 #define AVR32_USBB_UPSTA5_NAKEDI_MASK 0x00000010 #define AVR32_USBB_UPSTA5_NAKEDI_OFFSET 4 #define AVR32_USBB_UPSTA5_NAKEDI_SIZE 1 #define AVR32_USBB_UPSTA5_NBUSYBK 12 #define AVR32_USBB_UPSTA5_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UPSTA5_NBUSYBK_OFFSET 12 #define AVR32_USBB_UPSTA5_NBUSYBK_SIZE 2 #define AVR32_USBB_UPSTA5_OVERFI 5 #define AVR32_USBB_UPSTA5_OVERFI_MASK 0x00000020 #define AVR32_USBB_UPSTA5_OVERFI_OFFSET 5 #define AVR32_USBB_UPSTA5_OVERFI_SIZE 1 #define AVR32_USBB_UPSTA5_PBYCT 20 #define AVR32_USBB_UPSTA5_PBYCT_MASK 0x7ff00000 #define AVR32_USBB_UPSTA5_PBYCT_OFFSET 20 #define AVR32_USBB_UPSTA5_PBYCT_SIZE 11 #define AVR32_USBB_UPSTA5_PERRI 3 #define AVR32_USBB_UPSTA5_PERRI_MASK 0x00000008 #define AVR32_USBB_UPSTA5_PERRI_OFFSET 3 #define AVR32_USBB_UPSTA5_PERRI_SIZE 1 #define AVR32_USBB_UPSTA5_RWALL 16 #define AVR32_USBB_UPSTA5_RWALL_MASK 0x00010000 #define AVR32_USBB_UPSTA5_RWALL_OFFSET 16 #define AVR32_USBB_UPSTA5_RWALL_SIZE 1 #define AVR32_USBB_UPSTA5_RXINI 0 #define AVR32_USBB_UPSTA5_RXINI_MASK 0x00000001 #define AVR32_USBB_UPSTA5_RXINI_OFFSET 0 #define AVR32_USBB_UPSTA5_RXINI_SIZE 1 #define AVR32_USBB_UPSTA5_RXSTALLDI 6 #define AVR32_USBB_UPSTA5_RXSTALLDI_MASK 0x00000040 #define AVR32_USBB_UPSTA5_RXSTALLDI_OFFSET 6 #define AVR32_USBB_UPSTA5_RXSTALLDI_SIZE 1 #define AVR32_USBB_UPSTA5_SHORTPACKETI 7 #define AVR32_USBB_UPSTA5_SHORTPACKETI_MASK 0x00000080 #define AVR32_USBB_UPSTA5_SHORTPACKETI_OFFSET 7 #define AVR32_USBB_UPSTA5_SHORTPACKETI_SIZE 1 #define AVR32_USBB_UPSTA5_TXOUTI 1 #define AVR32_USBB_UPSTA5_TXOUTI_MASK 0x00000002 #define AVR32_USBB_UPSTA5_TXOUTI_OFFSET 1 #define AVR32_USBB_UPSTA5_TXOUTI_SIZE 1 #define AVR32_USBB_UPSTA5_TXSTPI 2 #define AVR32_USBB_UPSTA5_TXSTPI_MASK 0x00000004 #define AVR32_USBB_UPSTA5_TXSTPI_OFFSET 2 #define AVR32_USBB_UPSTA5_TXSTPI_SIZE 1 #define AVR32_USBB_UPSTA6 0x00000548 #define AVR32_USBB_UPSTA6CLR 0x00000578 #define AVR32_USBB_UPSTA6CLR_NAKEDIC 4 #define AVR32_USBB_UPSTA6CLR_NAKEDIC_MASK 0x00000010 #define AVR32_USBB_UPSTA6CLR_NAKEDIC_OFFSET 4 #define AVR32_USBB_UPSTA6CLR_NAKEDIC_SIZE 1 #define AVR32_USBB_UPSTA6CLR_OVERFIC 5 #define AVR32_USBB_UPSTA6CLR_OVERFIC_MASK 0x00000020 #define AVR32_USBB_UPSTA6CLR_OVERFIC_OFFSET 5 #define AVR32_USBB_UPSTA6CLR_OVERFIC_SIZE 1 #define AVR32_USBB_UPSTA6CLR_RXINIC 0 #define AVR32_USBB_UPSTA6CLR_RXINIC_MASK 0x00000001 #define AVR32_USBB_UPSTA6CLR_RXINIC_OFFSET 0 #define AVR32_USBB_UPSTA6CLR_RXINIC_SIZE 1 #define AVR32_USBB_UPSTA6CLR_RXSTALLDIC 6 #define AVR32_USBB_UPSTA6CLR_RXSTALLDIC_MASK 0x00000040 #define AVR32_USBB_UPSTA6CLR_RXSTALLDIC_OFFSET 6 #define AVR32_USBB_UPSTA6CLR_RXSTALLDIC_SIZE 1 #define AVR32_USBB_UPSTA6CLR_SHORTPACKETIC 7 #define AVR32_USBB_UPSTA6CLR_SHORTPACKETIC_MASK 0x00000080 #define AVR32_USBB_UPSTA6CLR_SHORTPACKETIC_OFFSET 7 #define AVR32_USBB_UPSTA6CLR_SHORTPACKETIC_SIZE 1 #define AVR32_USBB_UPSTA6CLR_TXOUTIC 1 #define AVR32_USBB_UPSTA6CLR_TXOUTIC_MASK 0x00000002 #define AVR32_USBB_UPSTA6CLR_TXOUTIC_OFFSET 1 #define AVR32_USBB_UPSTA6CLR_TXOUTIC_SIZE 1 #define AVR32_USBB_UPSTA6CLR_TXSTPIC 2 #define AVR32_USBB_UPSTA6CLR_TXSTPIC_MASK 0x00000004 #define AVR32_USBB_UPSTA6CLR_TXSTPIC_OFFSET 2 #define AVR32_USBB_UPSTA6CLR_TXSTPIC_SIZE 1 #define AVR32_USBB_UPSTA6SET 0x000005a8 #define AVR32_USBB_UPSTA6SET_NAKEDIS 4 #define AVR32_USBB_UPSTA6SET_NAKEDIS_MASK 0x00000010 #define AVR32_USBB_UPSTA6SET_NAKEDIS_OFFSET 4 #define AVR32_USBB_UPSTA6SET_NAKEDIS_SIZE 1 #define AVR32_USBB_UPSTA6SET_NBUSYBKS 12 #define AVR32_USBB_UPSTA6SET_NBUSYBKS_MASK 0x00001000 #define AVR32_USBB_UPSTA6SET_NBUSYBKS_OFFSET 12 #define AVR32_USBB_UPSTA6SET_NBUSYBKS_SIZE 1 #define AVR32_USBB_UPSTA6SET_OVERFIS 5 #define AVR32_USBB_UPSTA6SET_OVERFIS_MASK 0x00000020 #define AVR32_USBB_UPSTA6SET_OVERFIS_OFFSET 5 #define AVR32_USBB_UPSTA6SET_OVERFIS_SIZE 1 #define AVR32_USBB_UPSTA6SET_PERRIS 3 #define AVR32_USBB_UPSTA6SET_PERRIS_MASK 0x00000008 #define AVR32_USBB_UPSTA6SET_PERRIS_OFFSET 3 #define AVR32_USBB_UPSTA6SET_PERRIS_SIZE 1 #define AVR32_USBB_UPSTA6SET_RXINIS 0 #define AVR32_USBB_UPSTA6SET_RXINIS_MASK 0x00000001 #define AVR32_USBB_UPSTA6SET_RXINIS_OFFSET 0 #define AVR32_USBB_UPSTA6SET_RXINIS_SIZE 1 #define AVR32_USBB_UPSTA6SET_RXSTALLDIS 6 #define AVR32_USBB_UPSTA6SET_RXSTALLDIS_MASK 0x00000040 #define AVR32_USBB_UPSTA6SET_RXSTALLDIS_OFFSET 6 #define AVR32_USBB_UPSTA6SET_RXSTALLDIS_SIZE 1 #define AVR32_USBB_UPSTA6SET_SHORTPACKETIS 7 #define AVR32_USBB_UPSTA6SET_SHORTPACKETIS_MASK 0x00000080 #define AVR32_USBB_UPSTA6SET_SHORTPACKETIS_OFFSET 7 #define AVR32_USBB_UPSTA6SET_SHORTPACKETIS_SIZE 1 #define AVR32_USBB_UPSTA6SET_TXOUTIS 1 #define AVR32_USBB_UPSTA6SET_TXOUTIS_MASK 0x00000002 #define AVR32_USBB_UPSTA6SET_TXOUTIS_OFFSET 1 #define AVR32_USBB_UPSTA6SET_TXOUTIS_SIZE 1 #define AVR32_USBB_UPSTA6SET_TXSTPIS 2 #define AVR32_USBB_UPSTA6SET_TXSTPIS_MASK 0x00000004 #define AVR32_USBB_UPSTA6SET_TXSTPIS_OFFSET 2 #define AVR32_USBB_UPSTA6SET_TXSTPIS_SIZE 1 #define AVR32_USBB_UPSTA6_CFGOK 18 #define AVR32_USBB_UPSTA6_CFGOK_MASK 0x00040000 #define AVR32_USBB_UPSTA6_CFGOK_OFFSET 18 #define AVR32_USBB_UPSTA6_CFGOK_SIZE 1 #define AVR32_USBB_UPSTA6_CURRBK 14 #define AVR32_USBB_UPSTA6_CURRBK_MASK 0x0000c000 #define AVR32_USBB_UPSTA6_CURRBK_OFFSET 14 #define AVR32_USBB_UPSTA6_CURRBK_SIZE 2 #define AVR32_USBB_UPSTA6_DTSEQ 8 #define AVR32_USBB_UPSTA6_DTSEQ_MASK 0x00000300 #define AVR32_USBB_UPSTA6_DTSEQ_OFFSET 8 #define AVR32_USBB_UPSTA6_DTSEQ_SIZE 2 #define AVR32_USBB_UPSTA6_NAKEDI 4 #define AVR32_USBB_UPSTA6_NAKEDI_MASK 0x00000010 #define AVR32_USBB_UPSTA6_NAKEDI_OFFSET 4 #define AVR32_USBB_UPSTA6_NAKEDI_SIZE 1 #define AVR32_USBB_UPSTA6_NBUSYBK 12 #define AVR32_USBB_UPSTA6_NBUSYBK_MASK 0x00003000 #define AVR32_USBB_UPSTA6_NBUSYBK_OFFSET 12 #define AVR32_USBB_UPSTA6_NBUSYBK_SIZE 2 #define AVR32_USBB_UPSTA6_OVERFI 5 #define AVR32_USBB_UPSTA6_OVERFI_MASK 0x00000020 #define AVR32_USBB_UPSTA6_OVERFI_OFFSET 5 #define AVR32_USBB_UPSTA6_OVERFI_SIZE 1 #define AVR32_USBB_UPSTA6_PBYCT 20 #define AVR32_USBB_UPSTA6_PBYCT_MASK 0x7ff00000 #define AVR32_USBB_UPSTA6_PBYCT_OFFSET 20 #define AVR32_USBB_UPSTA6_PBYCT_SIZE 11 #define AVR32_USBB_UPSTA6_PERRI 3 #define AVR32_USBB_UPSTA6_PERRI_MASK 0x00000008 #define AVR32_USBB_UPSTA6_PERRI_OFFSET 3 #define AVR32_USBB_UPSTA6_PERRI_SIZE 1 #define AVR32_USBB_UPSTA6_RWALL 16 #define AVR32_USBB_UPSTA6_RWALL_MASK 0x00010000 #define AVR32_USBB_UPSTA6_RWALL_OFFSET 16 #define AVR32_USBB_UPSTA6_RWALL_SIZE 1 #define AVR32_USBB_UPSTA6_RXINI 0 #define AVR32_USBB_UPSTA6_RXINI_MASK 0x00000001 #define AVR32_USBB_UPSTA6_RXINI_OFFSET 0 #define AVR32_USBB_UPSTA6_RXINI_SIZE 1 #define AVR32_USBB_UPSTA6_RXSTALLDI 6 #define AVR32_USBB_UPSTA6_RXSTALLDI_MASK 0x00000040 #define AVR32_USBB_UPSTA6_RXSTALLDI_OFFSET 6 #define AVR32_USBB_UPSTA6_RXSTALLDI_SIZE 1 #define AVR32_USBB_UPSTA6_SHORTPACKETI 7 #define AVR32_USBB_UPSTA6_SHORTPACKETI_MASK 0x00000080 #define AVR32_USBB_UPSTA6_SHORTPACKETI_OFFSET 7 #define AVR32_USBB_UPSTA6_SHORTPACKETI_SIZE 1 #define AVR32_USBB_UPSTA6_TXOUTI 1 #define AVR32_USBB_UPSTA6_TXOUTI_MASK 0x00000002 #define AVR32_USBB_UPSTA6_TXOUTI_OFFSET 1 #define AVR32_USBB_UPSTA6_TXOUTI_SIZE 1 #define AVR32_USBB_UPSTA6_TXSTPI 2 #define AVR32_USBB_UPSTA6_TXSTPI_MASK 0x00000004 #define AVR32_USBB_UPSTA6_TXSTPI_OFFSET 2 #define AVR32_USBB_UPSTA6_TXSTPI_SIZE 1 #define AVR32_USBB_USBCON 0x00000800 #define AVR32_USBB_USBCON_BCERRE 4 #define AVR32_USBB_USBCON_BCERRE_MASK 0x00000010 #define AVR32_USBB_USBCON_BCERRE_OFFSET 4 #define AVR32_USBB_USBCON_BCERRE_SIZE 1 #define AVR32_USBB_USBCON_FRZCLK 14 #define AVR32_USBB_USBCON_FRZCLK_MASK 0x00004000 #define AVR32_USBB_USBCON_FRZCLK_OFFSET 14 #define AVR32_USBB_USBCON_FRZCLK_SIZE 1 #define AVR32_USBB_USBCON_HNPERRE 6 #define AVR32_USBB_USBCON_HNPERRE_MASK 0x00000040 #define AVR32_USBB_USBCON_HNPERRE_OFFSET 6 #define AVR32_USBB_USBCON_HNPERRE_SIZE 1 #define AVR32_USBB_USBCON_HNPREQ 11 #define AVR32_USBB_USBCON_HNPREQ_MASK 0x00000800 #define AVR32_USBB_USBCON_HNPREQ_OFFSET 11 #define AVR32_USBB_USBCON_HNPREQ_SIZE 1 #define AVR32_USBB_USBCON_IDTE 0 #define AVR32_USBB_USBCON_IDTE_MASK 0x00000001 #define AVR32_USBB_USBCON_IDTE_OFFSET 0 #define AVR32_USBB_USBCON_IDTE_SIZE 1 #define AVR32_USBB_USBCON_OTGPADE 12 #define AVR32_USBB_USBCON_OTGPADE_MASK 0x00001000 #define AVR32_USBB_USBCON_OTGPADE_OFFSET 12 #define AVR32_USBB_USBCON_OTGPADE_SIZE 1 #define AVR32_USBB_USBCON_ROLEEXE 5 #define AVR32_USBB_USBCON_ROLEEXE_MASK 0x00000020 #define AVR32_USBB_USBCON_ROLEEXE_OFFSET 5 #define AVR32_USBB_USBCON_ROLEEXE_SIZE 1 #define AVR32_USBB_USBCON_SRPE 2 #define AVR32_USBB_USBCON_SRPE_MASK 0x00000004 #define AVR32_USBB_USBCON_SRPE_OFFSET 2 #define AVR32_USBB_USBCON_SRPE_SIZE 1 #define AVR32_USBB_USBCON_SRPREQ 10 #define AVR32_USBB_USBCON_SRPREQ_MASK 0x00000400 #define AVR32_USBB_USBCON_SRPREQ_OFFSET 10 #define AVR32_USBB_USBCON_SRPREQ_SIZE 1 #define AVR32_USBB_USBCON_SRPSEL 9 #define AVR32_USBB_USBCON_SRPSEL_MASK 0x00000200 #define AVR32_USBB_USBCON_SRPSEL_OFFSET 9 #define AVR32_USBB_USBCON_SRPSEL_SIZE 1 #define AVR32_USBB_USBCON_STOE 7 #define AVR32_USBB_USBCON_STOE_MASK 0x00000080 #define AVR32_USBB_USBCON_STOE_OFFSET 7 #define AVR32_USBB_USBCON_STOE_SIZE 1 #define AVR32_USBB_USBCON_TIMPAGE 20 #define AVR32_USBB_USBCON_TIMPAGE_A_WAIT_VRISE 0x00000000 #define AVR32_USBB_USBCON_TIMPAGE_MASK 0x00300000 #define AVR32_USBB_USBCON_TIMPAGE_OFFSET 20 #define AVR32_USBB_USBCON_TIMPAGE_PD_TMOUT_CNT 0x00000002 #define AVR32_USBB_USBCON_TIMPAGE_SIZE 2 #define AVR32_USBB_USBCON_TIMPAGE_SRP_DET_TMOUT 0x00000003 #define AVR32_USBB_USBCON_TIMPAGE_VB_BUS_PULSING 0x00000001 #define AVR32_USBB_USBCON_TIMVALUE 16 #define AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_100_MS 0x00000003 #define AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_20_MS 0x00000000 #define AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_50_MS 0x00000001 #define AVR32_USBB_USBCON_TIMVALUE_A_WAIT_VRISE_70_MS 0x00000002 #define AVR32_USBB_USBCON_TIMVALUE_MASK 0x00030000 #define AVR32_USBB_USBCON_TIMVALUE_OFFSET 16 #define AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_105_MS 0x00000001 #define AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_118_MS 0x00000002 #define AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_131_MS 0x00000003 #define AVR32_USBB_USBCON_TIMVALUE_PD_TMOUT_CNT_93_MS 0x00000000 #define AVR32_USBB_USBCON_TIMVALUE_SIZE 2 #define AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_100_US 0x00000001 #define AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_10_US 0x00000000 #define AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_11_MS 0x00000003 #define AVR32_USBB_USBCON_TIMVALUE_SRP_DET_TMOUT_1_MS 0x00000002 #define AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_15_MS 0x00000000 #define AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_23_MS 0x00000001 #define AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_31_MS 0x00000002 #define AVR32_USBB_USBCON_TIMVALUE_VB_BUS_PULSING_40_MS 0x00000003 #define AVR32_USBB_USBCON_UIDE 24 #define AVR32_USBB_USBCON_UIDE_MASK 0x01000000 #define AVR32_USBB_USBCON_UIDE_OFFSET 24 #define AVR32_USBB_USBCON_UIDE_SIZE 1 #define AVR32_USBB_USBCON_UIMOD 25 #define AVR32_USBB_USBCON_UIMOD_MASK 0x02000000 #define AVR32_USBB_USBCON_UIMOD_OFFSET 25 #define AVR32_USBB_USBCON_UIMOD_SIZE 1 #define AVR32_USBB_USBCON_UNLOCK 22 #define AVR32_USBB_USBCON_UNLOCK_MASK 0x00400000 #define AVR32_USBB_USBCON_UNLOCK_OFFSET 22 #define AVR32_USBB_USBCON_UNLOCK_SIZE 1 #define AVR32_USBB_USBCON_USBE 15 #define AVR32_USBB_USBCON_USBE_MASK 0x00008000 #define AVR32_USBB_USBCON_USBE_OFFSET 15 #define AVR32_USBB_USBCON_USBE_SIZE 1 #define AVR32_USBB_USBCON_VBERRE 3 #define AVR32_USBB_USBCON_VBERRE_MASK 0x00000008 #define AVR32_USBB_USBCON_VBERRE_OFFSET 3 #define AVR32_USBB_USBCON_VBERRE_SIZE 1 #define AVR32_USBB_USBCON_VBUSHWC 8 #define AVR32_USBB_USBCON_VBUSHWC_MASK 0x00000100 #define AVR32_USBB_USBCON_VBUSHWC_OFFSET 8 #define AVR32_USBB_USBCON_VBUSHWC_SIZE 1 #define AVR32_USBB_USBCON_VBUSPO 13 #define AVR32_USBB_USBCON_VBUSPO_MASK 0x00002000 #define AVR32_USBB_USBCON_VBUSPO_OFFSET 13 #define AVR32_USBB_USBCON_VBUSPO_SIZE 1 #define AVR32_USBB_USBCON_VBUSTE 1 #define AVR32_USBB_USBCON_VBUSTE_MASK 0x00000002 #define AVR32_USBB_USBCON_VBUSTE_OFFSET 1 #define AVR32_USBB_USBCON_VBUSTE_SIZE 1 #define AVR32_USBB_USBE_SIZE 1 #define AVR32_USBB_USBFSM 0x0000082c #define AVR32_USBB_USBFSM_DRDSTATE 0 #define AVR32_USBB_USBFSM_DRDSTATE_A_HOST 0x00000003 #define AVR32_USBB_USBFSM_DRDSTATE_A_IDLE 0x00000000 #define AVR32_USBB_USBFSM_DRDSTATE_A_PERIPHERAL 0x00000005 #define AVR32_USBB_USBFSM_DRDSTATE_A_SUSPEND 0x00000004 #define AVR32_USBB_USBFSM_DRDSTATE_A_VBUS_ERR 0x00000007 #define AVR32_USBB_USBFSM_DRDSTATE_A_WAIT_BCON 0x00000002 #define AVR32_USBB_USBFSM_DRDSTATE_A_WAIT_DISCHARGE 0x00000008 #define AVR32_USBB_USBFSM_DRDSTATE_A_WAIT_VFALL 0x00000006 #define AVR32_USBB_USBFSM_DRDSTATE_A_WAIT_VRISE 0x00000001 #define AVR32_USBB_USBFSM_DRDSTATE_B_HOST 0x0000000e #define AVR32_USBB_USBFSM_DRDSTATE_B_IDLE 0x00000009 #define AVR32_USBB_USBFSM_DRDSTATE_B_PERIPHERAL 0x0000000a #define AVR32_USBB_USBFSM_DRDSTATE_B_SRP_INIT 0x0000000f #define AVR32_USBB_USBFSM_DRDSTATE_B_WAIT_ACON 0x0000000d #define AVR32_USBB_USBFSM_DRDSTATE_B_WAIT_BEGIN_HNP 0x0000000b #define AVR32_USBB_USBFSM_DRDSTATE_B_WAIT_DISCHARGE 0x0000000c #define AVR32_USBB_USBFSM_DRDSTATE_MASK 0x0000000f #define AVR32_USBB_USBFSM_DRDSTATE_OFFSET 0 #define AVR32_USBB_USBFSM_DRDSTATE_SIZE 4 #define AVR32_USBB_USBSTA 0x00000804 #define AVR32_USBB_USBSTACLR 0x00000808 #define AVR32_USBB_USBSTACLR_BCERRIC 4 #define AVR32_USBB_USBSTACLR_BCERRIC_MASK 0x00000010 #define AVR32_USBB_USBSTACLR_BCERRIC_OFFSET 4 #define AVR32_USBB_USBSTACLR_BCERRIC_SIZE 1 #define AVR32_USBB_USBSTACLR_HNPERRIC 6 #define AVR32_USBB_USBSTACLR_HNPERRIC_MASK 0x00000040 #define AVR32_USBB_USBSTACLR_HNPERRIC_OFFSET 6 #define AVR32_USBB_USBSTACLR_HNPERRIC_SIZE 1 #define AVR32_USBB_USBSTACLR_IDTIC 0 #define AVR32_USBB_USBSTACLR_IDTIC_MASK 0x00000001 #define AVR32_USBB_USBSTACLR_IDTIC_OFFSET 0 #define AVR32_USBB_USBSTACLR_IDTIC_SIZE 1 #define AVR32_USBB_USBSTACLR_ROLEEXIC 5 #define AVR32_USBB_USBSTACLR_ROLEEXIC_MASK 0x00000020 #define AVR32_USBB_USBSTACLR_ROLEEXIC_OFFSET 5 #define AVR32_USBB_USBSTACLR_ROLEEXIC_SIZE 1 #define AVR32_USBB_USBSTACLR_SRPIC 2 #define AVR32_USBB_USBSTACLR_SRPIC_MASK 0x00000004 #define AVR32_USBB_USBSTACLR_SRPIC_OFFSET 2 #define AVR32_USBB_USBSTACLR_SRPIC_SIZE 1 #define AVR32_USBB_USBSTACLR_STOIC 7 #define AVR32_USBB_USBSTACLR_STOIC_MASK 0x00000080 #define AVR32_USBB_USBSTACLR_STOIC_OFFSET 7 #define AVR32_USBB_USBSTACLR_STOIC_SIZE 1 #define AVR32_USBB_USBSTACLR_VBERRIC 3 #define AVR32_USBB_USBSTACLR_VBERRIC_MASK 0x00000008 #define AVR32_USBB_USBSTACLR_VBERRIC_OFFSET 3 #define AVR32_USBB_USBSTACLR_VBERRIC_SIZE 1 #define AVR32_USBB_USBSTACLR_VBUSRQC 9 #define AVR32_USBB_USBSTACLR_VBUSRQC_MASK 0x00000200 #define AVR32_USBB_USBSTACLR_VBUSRQC_OFFSET 9 #define AVR32_USBB_USBSTACLR_VBUSRQC_SIZE 1 #define AVR32_USBB_USBSTACLR_VBUSTIC 1 #define AVR32_USBB_USBSTACLR_VBUSTIC_MASK 0x00000002 #define AVR32_USBB_USBSTACLR_VBUSTIC_OFFSET 1 #define AVR32_USBB_USBSTACLR_VBUSTIC_SIZE 1 #define AVR32_USBB_USBSTASET 0x0000080c #define AVR32_USBB_USBSTASET_BCERRIS 4 #define AVR32_USBB_USBSTASET_BCERRIS_MASK 0x00000010 #define AVR32_USBB_USBSTASET_BCERRIS_OFFSET 4 #define AVR32_USBB_USBSTASET_BCERRIS_SIZE 1 #define AVR32_USBB_USBSTASET_HNPERRIS 6 #define AVR32_USBB_USBSTASET_HNPERRIS_MASK 0x00000040 #define AVR32_USBB_USBSTASET_HNPERRIS_OFFSET 6 #define AVR32_USBB_USBSTASET_HNPERRIS_SIZE 1 #define AVR32_USBB_USBSTASET_IDTIS 0 #define AVR32_USBB_USBSTASET_IDTIS_MASK 0x00000001 #define AVR32_USBB_USBSTASET_IDTIS_OFFSET 0 #define AVR32_USBB_USBSTASET_IDTIS_SIZE 1 #define AVR32_USBB_USBSTASET_ROLEEXIS 5 #define AVR32_USBB_USBSTASET_ROLEEXIS_MASK 0x00000020 #define AVR32_USBB_USBSTASET_ROLEEXIS_OFFSET 5 #define AVR32_USBB_USBSTASET_ROLEEXIS_SIZE 1 #define AVR32_USBB_USBSTASET_SRPIS 2 #define AVR32_USBB_USBSTASET_SRPIS_MASK 0x00000004 #define AVR32_USBB_USBSTASET_SRPIS_OFFSET 2 #define AVR32_USBB_USBSTASET_SRPIS_SIZE 1 #define AVR32_USBB_USBSTASET_STOIS 7 #define AVR32_USBB_USBSTASET_STOIS_MASK 0x00000080 #define AVR32_USBB_USBSTASET_STOIS_OFFSET 7 #define AVR32_USBB_USBSTASET_STOIS_SIZE 1 #define AVR32_USBB_USBSTASET_VBERRIS 3 #define AVR32_USBB_USBSTASET_VBERRIS_MASK 0x00000008 #define AVR32_USBB_USBSTASET_VBERRIS_OFFSET 3 #define AVR32_USBB_USBSTASET_VBERRIS_SIZE 1 #define AVR32_USBB_USBSTASET_VBUSRQS 9 #define AVR32_USBB_USBSTASET_VBUSRQS_MASK 0x00000200 #define AVR32_USBB_USBSTASET_VBUSRQS_OFFSET 9 #define AVR32_USBB_USBSTASET_VBUSRQS_SIZE 1 #define AVR32_USBB_USBSTASET_VBUSTIS 1 #define AVR32_USBB_USBSTASET_VBUSTIS_MASK 0x00000002 #define AVR32_USBB_USBSTASET_VBUSTIS_OFFSET 1 #define AVR32_USBB_USBSTASET_VBUSTIS_SIZE 1 #define AVR32_USBB_USBSTA_BCERRI 4 #define AVR32_USBB_USBSTA_BCERRI_MASK 0x00000010 #define AVR32_USBB_USBSTA_BCERRI_OFFSET 4 #define AVR32_USBB_USBSTA_BCERRI_SIZE 1 #define AVR32_USBB_USBSTA_CLKUSABLE 14 #define AVR32_USBB_USBSTA_CLKUSABLE_MASK 0x00004000 #define AVR32_USBB_USBSTA_CLKUSABLE_OFFSET 14 #define AVR32_USBB_USBSTA_CLKUSABLE_SIZE 1 #define AVR32_USBB_USBSTA_HNPERRI 6 #define AVR32_USBB_USBSTA_HNPERRI_MASK 0x00000040 #define AVR32_USBB_USBSTA_HNPERRI_OFFSET 6 #define AVR32_USBB_USBSTA_HNPERRI_SIZE 1 #define AVR32_USBB_USBSTA_ID 10 #define AVR32_USBB_USBSTA_IDTI 0 #define AVR32_USBB_USBSTA_IDTI_MASK 0x00000001 #define AVR32_USBB_USBSTA_IDTI_OFFSET 0 #define AVR32_USBB_USBSTA_IDTI_SIZE 1 #define AVR32_USBB_USBSTA_ID_MASK 0x00000400 #define AVR32_USBB_USBSTA_ID_OFFSET 10 #define AVR32_USBB_USBSTA_ID_SIZE 1 #define AVR32_USBB_USBSTA_ROLEEXI 5 #define AVR32_USBB_USBSTA_ROLEEXI_MASK 0x00000020 #define AVR32_USBB_USBSTA_ROLEEXI_OFFSET 5 #define AVR32_USBB_USBSTA_ROLEEXI_SIZE 1 #define AVR32_USBB_USBSTA_SPEED 12 #define AVR32_USBB_USBSTA_SPEED_FULL 0x00000000 #define AVR32_USBB_USBSTA_SPEED_LOW 0x00000002 #define AVR32_USBB_USBSTA_SPEED_MASK 0x00003000 #define AVR32_USBB_USBSTA_SPEED_OFFSET 12 #define AVR32_USBB_USBSTA_SPEED_SIZE 2 #define AVR32_USBB_USBSTA_SRPI 2 #define AVR32_USBB_USBSTA_SRPI_MASK 0x00000004 #define AVR32_USBB_USBSTA_SRPI_OFFSET 2 #define AVR32_USBB_USBSTA_SRPI_SIZE 1 #define AVR32_USBB_USBSTA_STOI 7 #define AVR32_USBB_USBSTA_STOI_MASK 0x00000080 #define AVR32_USBB_USBSTA_STOI_OFFSET 7 #define AVR32_USBB_USBSTA_STOI_SIZE 1 #define AVR32_USBB_USBSTA_VBERRI 3 #define AVR32_USBB_USBSTA_VBERRI_MASK 0x00000008 #define AVR32_USBB_USBSTA_VBERRI_OFFSET 3 #define AVR32_USBB_USBSTA_VBERRI_SIZE 1 #define AVR32_USBB_USBSTA_VBUS 11 #define AVR32_USBB_USBSTA_VBUSRQ 9 #define AVR32_USBB_USBSTA_VBUSRQ_MASK 0x00000200 #define AVR32_USBB_USBSTA_VBUSRQ_OFFSET 9 #define AVR32_USBB_USBSTA_VBUSRQ_SIZE 1 #define AVR32_USBB_USBSTA_VBUSTI 1 #define AVR32_USBB_USBSTA_VBUSTI_MASK 0x00000002 #define AVR32_USBB_USBSTA_VBUSTI_OFFSET 1 #define AVR32_USBB_USBSTA_VBUSTI_SIZE 1 #define AVR32_USBB_USBSTA_VBUS_MASK 0x00000800 #define AVR32_USBB_USBSTA_VBUS_OFFSET 11 #define AVR32_USBB_USBSTA_VBUS_SIZE 1 #define AVR32_USBB_UTMIRESET 8 #define AVR32_USBB_UTMIRESET_MASK 0x00000100 #define AVR32_USBB_UTMIRESET_OFFSET 8 #define AVR32_USBB_UTMIRESET_SIZE 1 #define AVR32_USBB_UVERS 0x00000818 #define AVR32_USBB_UVERS_METAL_FIX_NUM 16 #define AVR32_USBB_UVERS_METAL_FIX_NUM_MASK 0x00070000 #define AVR32_USBB_UVERS_METAL_FIX_NUM_OFFSET 16 #define AVR32_USBB_UVERS_METAL_FIX_NUM_SIZE 3 #define AVR32_USBB_UVERS_VERSION_NUM 0 #define AVR32_USBB_UVERS_VERSION_NUM_MASK 0x0000ffff #define AVR32_USBB_UVERS_VERSION_NUM_OFFSET 0 #define AVR32_USBB_UVERS_VERSION_NUM_SIZE 16 #define AVR32_USBB_VBERRE 3 #define AVR32_USBB_VBERRE_MASK 0x00000008 #define AVR32_USBB_VBERRE_OFFSET 3 #define AVR32_USBB_VBERRE_SIZE 1 #define AVR32_USBB_VBERRI 3 #define AVR32_USBB_VBERRIC 3 #define AVR32_USBB_VBERRIC_MASK 0x00000008 #define AVR32_USBB_VBERRIC_OFFSET 3 #define AVR32_USBB_VBERRIC_SIZE 1 #define AVR32_USBB_VBERRIS 3 #define AVR32_USBB_VBERRIS_MASK 0x00000008 #define AVR32_USBB_VBERRIS_OFFSET 3 #define AVR32_USBB_VBERRIS_SIZE 1 #define AVR32_USBB_VBERRI_MASK 0x00000008 #define AVR32_USBB_VBERRI_OFFSET 3 #define AVR32_USBB_VBERRI_SIZE 1 #define AVR32_USBB_VBUSE 7 #define AVR32_USBB_VBUSEC 7 #define AVR32_USBB_VBUSEC_MASK 0x00000080 #define AVR32_USBB_VBUSEC_OFFSET 7 #define AVR32_USBB_VBUSEC_SIZE 1 #define AVR32_USBB_VBUSES 7 #define AVR32_USBB_VBUSES_MASK 0x00000080 #define AVR32_USBB_VBUSES_OFFSET 7 #define AVR32_USBB_VBUSES_SIZE 1 #define AVR32_USBB_VBUSE_MASK 0x00000080 #define AVR32_USBB_VBUSE_OFFSET 7 #define AVR32_USBB_VBUSE_SIZE 1 #define AVR32_USBB_VBUSHWC 8 #define AVR32_USBB_VBUSHWC_MASK 0x00000100 #define AVR32_USBB_VBUSHWC_OFFSET 8 #define AVR32_USBB_VBUSHWC_SIZE 1 #define AVR32_USBB_VBUSPO 13 #define AVR32_USBB_VBUSPO_MASK 0x00002000 #define AVR32_USBB_VBUSPO_OFFSET 13 #define AVR32_USBB_VBUSPO_SIZE 1 #define AVR32_USBB_VBUSRQ 9 #define AVR32_USBB_VBUSRQC 9 #define AVR32_USBB_VBUSRQC_MASK 0x00000200 #define AVR32_USBB_VBUSRQC_OFFSET 9 #define AVR32_USBB_VBUSRQC_SIZE 1 #define AVR32_USBB_VBUSRQS 9 #define AVR32_USBB_VBUSRQS_MASK 0x00000200 #define AVR32_USBB_VBUSRQS_OFFSET 9 #define AVR32_USBB_VBUSRQS_SIZE 1 #define AVR32_USBB_VBUSRQ_MASK 0x00000200 #define AVR32_USBB_VBUSRQ_OFFSET 9 #define AVR32_USBB_VBUSRQ_SIZE 1 #define AVR32_USBB_VBUSTE 1 #define AVR32_USBB_VBUSTE_MASK 0x00000002 #define AVR32_USBB_VBUSTE_OFFSET 1 #define AVR32_USBB_VBUSTE_SIZE 1 #define AVR32_USBB_VBUSTIC_SIZE 1 #define AVR32_USBB_VBUSTIS_SIZE 1 #define AVR32_USBB_VBUSTI_SIZE 1 #define AVR32_USBB_VBUS_SIZE 1 #define AVR32_USBB_VB_BUS_PULSING 0x00000001 #define AVR32_USBB_VB_BUS_PULSING_15_MS 0x00000000 #define AVR32_USBB_VB_BUS_PULSING_23_MS 0x00000001 #define AVR32_USBB_VB_BUS_PULSING_31_MS 0x00000002 #define AVR32_USBB_VB_BUS_PULSING_40_MS 0x00000003 #define AVR32_USBB_VERSION_NUM 0 #define AVR32_USBB_VERSION_NUM_MASK 0x0000ffff #define AVR32_USBB_VERSION_NUM_OFFSET 0 #define AVR32_USBB_VERSION_NUM_SIZE 16 #define AVR32_USBB_WAKEUP 4 #define AVR32_USBB_WAKEUPC 4 #define AVR32_USBB_WAKEUPC_MASK 0x00000010 #define AVR32_USBB_WAKEUPC_OFFSET 4 #define AVR32_USBB_WAKEUPC_SIZE 1 #define AVR32_USBB_WAKEUPE 4 #define AVR32_USBB_WAKEUPEC 4 #define AVR32_USBB_WAKEUPEC_MASK 0x00000010 #define AVR32_USBB_WAKEUPEC_OFFSET 4 #define AVR32_USBB_WAKEUPEC_SIZE 1 #define AVR32_USBB_WAKEUPES 4 #define AVR32_USBB_WAKEUPES_MASK 0x00000010 #define AVR32_USBB_WAKEUPES_OFFSET 4 #define AVR32_USBB_WAKEUPES_SIZE 1 #define AVR32_USBB_WAKEUPE_MASK 0x00000010 #define AVR32_USBB_WAKEUPE_OFFSET 4 #define AVR32_USBB_WAKEUPE_SIZE 1 #define AVR32_USBB_WAKEUPS 4 #define AVR32_USBB_WAKEUPS_MASK 0x00000010 #define AVR32_USBB_WAKEUPS_OFFSET 4 #define AVR32_USBB_WAKEUPS_SIZE 1 #define AVR32_USBB_WAKEUP_MASK 0x00000010 #define AVR32_USBB_WAKEUP_OFFSET 4 #define AVR32_USBB_WAKEUP_SIZE 1 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_usbb_udcon_t { unsigned int :13; unsigned int frzclk : 1; unsigned int usbe : 1; unsigned int opmode2 : 1; unsigned int tstpckt : 1; unsigned int tstk : 1; unsigned int tstj : 1; unsigned int ls : 1; unsigned int spdconf : 2; unsigned int rmwkup : 1; unsigned int detach : 1; unsigned int adden : 1; unsigned int uadd : 7; } avr32_usbb_udcon_t; typedef struct avr32_usbb_udint_t { unsigned int : 1; unsigned int dma6int : 1; unsigned int dma5int : 1; unsigned int dma4int : 1; unsigned int dma3int : 1; unsigned int dma2int : 1; unsigned int dma1int : 1; unsigned int : 6; unsigned int ep6int : 1; unsigned int ep5int : 1; unsigned int ep4int : 1; unsigned int ep3int : 1; unsigned int ep2int : 1; unsigned int ep1int : 1; unsigned int ep0int : 1; unsigned int : 1; unsigned int clkusable : 1; unsigned int speed : 1; unsigned int vbus : 1; unsigned int vbusti : 1; unsigned int uprsm : 1; unsigned int eorsm : 1; unsigned int wakeup : 1; unsigned int eorst : 1; unsigned int sof : 1; unsigned int msof : 1; unsigned int susp : 1; } avr32_usbb_udint_t; typedef struct avr32_usbb_udintclr_t { unsigned int :24; unsigned int vbustic : 1; unsigned int uprsmc : 1; unsigned int eorsmc : 1; unsigned int wakeupc : 1; unsigned int eorstc : 1; unsigned int sofc : 1; unsigned int msofc : 1; unsigned int suspc : 1; } avr32_usbb_udintclr_t; typedef struct avr32_usbb_udintset_t { unsigned int : 1; unsigned int dma6ints : 1; unsigned int dma5ints : 1; unsigned int dma4ints : 1; unsigned int dma3ints : 1; unsigned int dma2ints : 1; unsigned int dma1ints : 1; unsigned int :17; unsigned int vbustis : 1; unsigned int uprsms : 1; unsigned int eorsms : 1; unsigned int wakeups : 1; unsigned int eorsts : 1; unsigned int sofs : 1; unsigned int msofs : 1; unsigned int susps : 1; } avr32_usbb_udintset_t; typedef struct avr32_usbb_udinte_t { unsigned int : 1; unsigned int dma6inte : 1; unsigned int dma5inte : 1; unsigned int dma4inte : 1; unsigned int dma3inte : 1; unsigned int dma2inte : 1; unsigned int dma1inte : 1; unsigned int : 6; unsigned int ep6inte : 1; unsigned int ep5inte : 1; unsigned int ep4inte : 1; unsigned int ep3inte : 1; unsigned int ep2inte : 1; unsigned int ep1inte : 1; unsigned int ep0inte : 1; unsigned int : 4; unsigned int vbuse : 1; unsigned int uprsme : 1; unsigned int eorsme : 1; unsigned int wakeupe : 1; unsigned int eorste : 1; unsigned int sofe : 1; unsigned int msofe : 1; unsigned int suspe : 1; } avr32_usbb_udinte_t; typedef struct avr32_usbb_udinteclr_t { unsigned int : 1; unsigned int dam6intec : 1; unsigned int dma5intec : 1; unsigned int dma4intec : 1; unsigned int dma3intec : 1; unsigned int dma2intec : 1; unsigned int dma1intec : 1; unsigned int : 6; unsigned int ep6intec : 1; unsigned int ep5intec : 1; unsigned int ep4intec : 1; unsigned int ep3intec : 1; unsigned int ep2intec : 1; unsigned int ep1intec : 1; unsigned int ep0intec : 1; unsigned int : 4; unsigned int vbusec : 1; unsigned int uprsmec : 1; unsigned int eorsmec : 1; unsigned int wakeupec : 1; unsigned int eorstec : 1; unsigned int sofec : 1; unsigned int msofec : 1; unsigned int suspec : 1; } avr32_usbb_udinteclr_t; typedef struct avr32_usbb_udinteset_t { unsigned int : 1; unsigned int dma6intes : 1; unsigned int dma5intes : 1; unsigned int dma4intes : 1; unsigned int dma3intes : 1; unsigned int dma2intes : 1; unsigned int dma1intes : 1; unsigned int : 6; unsigned int ep6intes : 1; unsigned int ep5intes : 1; unsigned int ep4intes : 1; unsigned int ep3intes : 1; unsigned int ep2intes : 1; unsigned int ep1intes : 1; unsigned int ep0intes : 1; unsigned int : 4; unsigned int vbuses : 1; unsigned int uprsmes : 1; unsigned int eorsmes : 1; unsigned int wakeupes : 1; unsigned int eorstes : 1; unsigned int sofes : 1; unsigned int msofes : 1; unsigned int suspes : 1; } avr32_usbb_udinteset_t; typedef struct avr32_usbb_uerst_t { unsigned int : 9; unsigned int eprst6 : 1; unsigned int eprst5 : 1; unsigned int eprst4 : 1; unsigned int eprst3 : 1; unsigned int eprst2 : 1; unsigned int eprst1 : 1; unsigned int eprst0 : 1; unsigned int : 9; unsigned int epen6 : 1; unsigned int epen5 : 1; unsigned int epen4 : 1; unsigned int epen3 : 1; unsigned int epen2 : 1; unsigned int epen1 : 1; unsigned int epen0 : 1; } avr32_usbb_uerst_t; typedef struct avr32_usbb_udfnum_t { unsigned int :16; unsigned int fncerr : 1; unsigned int : 1; unsigned int fnum :11; unsigned int mfnum : 3; } avr32_usbb_udfnum_t; typedef struct avr32_usbb_udtst1_t { unsigned int loadsofcnt : 1; unsigned int sofcntmax : 7; unsigned int loadcntb : 1; unsigned int : 1; unsigned int counterb : 6; unsigned int loadcnta : 1; unsigned int countera :15; } avr32_usbb_udtst1_t; typedef struct avr32_usbb_udtst2_t { unsigned int :25; unsigned int nothostdisconnect : 1; unsigned int bypassdpll : 1; unsigned int forcesuspendmto1 : 1; unsigned int disbalegatedclock : 1; unsigned int loopbackmode : 1; unsigned int hsserialmode : 1; unsigned int fulldetachen : 1; } avr32_usbb_udtst2_t; typedef struct avr32_usbb_udfeatures_t { unsigned int en_high_bd_iso_ept_15 : 1; unsigned int en_high_bd_iso_ept_14 : 1; unsigned int en_high_bd_iso_ept_13 : 1; unsigned int en_high_bd_iso_ept_12 : 1; unsigned int en_high_bd_iso_ept_11 : 1; unsigned int en_high_bd_iso_ept_10 : 1; unsigned int en_high_bd_iso_ept_9 : 1; unsigned int en_high_bd_iso_ept_8 : 1; unsigned int en_high_bd_iso_ept_7 : 1; unsigned int en_high_bd_iso_ept_6 : 1; unsigned int en_high_bd_iso_ept_5 : 1; unsigned int en_high_bd_iso_ept_4 : 1; unsigned int en_high_bd_iso_ept_3 : 1; unsigned int en_high_bd_iso_ept_2 : 1; unsigned int en_high_bd_iso_ept_1 : 1; unsigned int data_bus_8_16 : 1; unsigned int byte_write_dpram : 1; unsigned int fifo_max_size : 3; unsigned int dma_fifo_word_depth : 4; unsigned int dma_buffer_size : 1; unsigned int dma_channel_nbr : 3; unsigned int ept_nbr_max : 4; } avr32_usbb_udfeatures_t; typedef struct avr32_usbb_uecfg0_t { unsigned int datasizerdwr : 2; unsigned int :15; unsigned int nbtrans : 2; unsigned int eptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int epdir : 1; unsigned int : 1; unsigned int epsize : 3; unsigned int epbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_uecfg0_t; typedef struct avr32_usbb_uecfg1_t { unsigned int datasizerdwr : 2; unsigned int :15; unsigned int nbtrans : 2; unsigned int eptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int epdir : 1; unsigned int : 1; unsigned int epsize : 3; unsigned int epbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_uecfg1_t; typedef struct avr32_usbb_uecfg2_t { unsigned int datasizerdwr : 2; unsigned int :15; unsigned int nbtrans : 2; unsigned int eptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int epdir : 1; unsigned int : 1; unsigned int epsize : 3; unsigned int epbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_uecfg2_t; typedef struct avr32_usbb_uecfg3_t { unsigned int datasizerdwr : 2; unsigned int :15; unsigned int nbtrans : 2; unsigned int eptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int epdir : 1; unsigned int : 1; unsigned int epsize : 3; unsigned int epbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_uecfg3_t; typedef struct avr32_usbb_uecfg4_t { unsigned int datasizerdwr : 2; unsigned int :15; unsigned int nbtrans : 2; unsigned int eptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int epdir : 1; unsigned int : 1; unsigned int epsize : 3; unsigned int epbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_uecfg4_t; typedef struct avr32_usbb_uecfg5_t { unsigned int datasizerdwr : 2; unsigned int :15; unsigned int nbtrans : 2; unsigned int eptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int epdir : 1; unsigned int : 1; unsigned int epsize : 3; unsigned int epbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_uecfg5_t; typedef struct avr32_usbb_uecfg6_t { unsigned int datasizerdwr : 2; unsigned int :15; unsigned int nbtrans : 2; unsigned int eptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int epdir : 1; unsigned int : 1; unsigned int epsize : 3; unsigned int epbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_uecfg6_t; typedef struct avr32_usbb_uesta0_t { unsigned int : 1; unsigned int byct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int ctrldir : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 1; unsigned int errortrans : 1; unsigned int dtseq : 2; unsigned int shortpacket : 1; unsigned int stalledi : 1; unsigned int overfi : 1; unsigned int nakini : 1; unsigned int nakouti : 1; unsigned int rxstpi : 1; unsigned int rxouti : 1; unsigned int txini : 1; } avr32_usbb_uesta0_t; typedef struct avr32_usbb_uesta1_t { unsigned int : 1; unsigned int byct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int ctrldir : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 1; unsigned int errortrans : 1; unsigned int dtseq : 2; unsigned int shortpacket : 1; unsigned int stalledi : 1; unsigned int overfi : 1; unsigned int nakini : 1; unsigned int nakouti : 1; unsigned int rxstpi : 1; unsigned int rxouti : 1; unsigned int txini : 1; } avr32_usbb_uesta1_t; typedef struct avr32_usbb_uesta2_t { unsigned int : 1; unsigned int byct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int ctrldir : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 1; unsigned int errortrans : 1; unsigned int dtseq : 2; unsigned int shortpacket : 1; unsigned int stalledi : 1; unsigned int overfi : 1; unsigned int nakini : 1; unsigned int nakouti : 1; unsigned int rxstpi : 1; unsigned int rxouti : 1; unsigned int txini : 1; } avr32_usbb_uesta2_t; typedef struct avr32_usbb_uesta3_t { unsigned int : 1; unsigned int byct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int ctrldir : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 1; unsigned int errortrans : 1; unsigned int dtseq : 2; unsigned int shortpacket : 1; unsigned int stalledi : 1; unsigned int overfi : 1; unsigned int nakini : 1; unsigned int nakouti : 1; unsigned int rxstpi : 1; unsigned int rxouti : 1; unsigned int txini : 1; } avr32_usbb_uesta3_t; typedef struct avr32_usbb_uesta4_t { unsigned int : 1; unsigned int byct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int ctrldir : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 1; unsigned int errortrans : 1; unsigned int dtseq : 2; unsigned int shortpacket : 1; unsigned int stalledi : 1; unsigned int overfi : 1; unsigned int nakini : 1; unsigned int nakouti : 1; unsigned int rxstpi : 1; unsigned int rxouti : 1; unsigned int txini : 1; } avr32_usbb_uesta4_t; typedef struct avr32_usbb_uesta5_t { unsigned int : 1; unsigned int byct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int ctrldir : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 1; unsigned int errortrans : 1; unsigned int dtseq : 2; unsigned int shortpacket : 1; unsigned int stalledi : 1; unsigned int overfi : 1; unsigned int nakini : 1; unsigned int nakouti : 1; unsigned int rxstpi : 1; unsigned int rxouti : 1; unsigned int txini : 1; } avr32_usbb_uesta5_t; typedef struct avr32_usbb_uesta6_t { unsigned int : 1; unsigned int byct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int ctrldir : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 1; unsigned int errortrans : 1; unsigned int dtseq : 2; unsigned int shortpacket : 1; unsigned int stalledi : 1; unsigned int overfi : 1; unsigned int nakini : 1; unsigned int nakouti : 1; unsigned int rxstpi : 1; unsigned int rxouti : 1; unsigned int txini : 1; } avr32_usbb_uesta6_t; typedef struct avr32_usbb_uesta0clr_t { unsigned int :24; unsigned int shortpacketc : 1; unsigned int stalledic : 1; unsigned int overfic : 1; unsigned int nakinic : 1; unsigned int nakoutic : 1; unsigned int rxstpic : 1; unsigned int rxoutic : 1; unsigned int txinic : 1; } avr32_usbb_uesta0clr_t; typedef struct avr32_usbb_uesta1clr_t { unsigned int :24; unsigned int shortpacketc : 1; unsigned int stalledic : 1; unsigned int overfic : 1; unsigned int nakinic : 1; unsigned int nakoutic : 1; unsigned int rxstpic : 1; unsigned int rxoutic : 1; unsigned int txinic : 1; } avr32_usbb_uesta1clr_t; typedef struct avr32_usbb_uesta2clr_t { unsigned int :24; unsigned int shortpacketc : 1; unsigned int stalledic : 1; unsigned int overfic : 1; unsigned int nakinic : 1; unsigned int nakoutic : 1; unsigned int rxstpic : 1; unsigned int rxoutic : 1; unsigned int txinic : 1; } avr32_usbb_uesta2clr_t; typedef struct avr32_usbb_uesta3clr_t { unsigned int :24; unsigned int shortpacketc : 1; unsigned int stalledic : 1; unsigned int overfic : 1; unsigned int nakinic : 1; unsigned int nakoutic : 1; unsigned int rxstpic : 1; unsigned int rxoutic : 1; unsigned int txinic : 1; } avr32_usbb_uesta3clr_t; typedef struct avr32_usbb_uesta4clr_t { unsigned int :24; unsigned int shortpacketc : 1; unsigned int stalledic : 1; unsigned int overfic : 1; unsigned int nakinic : 1; unsigned int nakoutic : 1; unsigned int rxstpic : 1; unsigned int rxoutic : 1; unsigned int txinic : 1; } avr32_usbb_uesta4clr_t; typedef struct avr32_usbb_uesta5clr_t { unsigned int :24; unsigned int shortpacketc : 1; unsigned int stalledic : 1; unsigned int overfic : 1; unsigned int nakinic : 1; unsigned int nakoutic : 1; unsigned int rxstpic : 1; unsigned int rxoutic : 1; unsigned int txinic : 1; } avr32_usbb_uesta5clr_t; typedef struct avr32_usbb_uesta6clr_t { unsigned int :24; unsigned int shortpacketc : 1; unsigned int stalledic : 1; unsigned int overfic : 1; unsigned int nakinic : 1; unsigned int nakoutic : 1; unsigned int rxstpic : 1; unsigned int rxoutic : 1; unsigned int txinic : 1; } avr32_usbb_uesta6clr_t; typedef struct avr32_usbb_uesta0set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 1; unsigned int errortranss : 1; unsigned int : 1; unsigned int setmdata : 1; unsigned int shortpackets : 1; unsigned int stalledis : 1; unsigned int overfis : 1; unsigned int nakinis : 1; unsigned int nakoutis : 1; unsigned int rxstpis : 1; unsigned int rxoutis : 1; unsigned int txinis : 1; } avr32_usbb_uesta0set_t; typedef struct avr32_usbb_uesta1set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 1; unsigned int errortranss : 1; unsigned int : 1; unsigned int setmdata : 1; unsigned int shortpackets : 1; unsigned int stalledis : 1; unsigned int overfis : 1; unsigned int nakinis : 1; unsigned int nakoutis : 1; unsigned int rxstpis : 1; unsigned int rxoutis : 1; unsigned int txinis : 1; } avr32_usbb_uesta1set_t; typedef struct avr32_usbb_uesta2set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 1; unsigned int errortranss : 1; unsigned int : 1; unsigned int setmdata : 1; unsigned int shortpackets : 1; unsigned int stalledis : 1; unsigned int overfis : 1; unsigned int nakinis : 1; unsigned int nakoutis : 1; unsigned int rxstpis : 1; unsigned int rxoutis : 1; unsigned int txinis : 1; } avr32_usbb_uesta2set_t; typedef struct avr32_usbb_uesta3set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 1; unsigned int errortranss : 1; unsigned int : 1; unsigned int setmdata : 1; unsigned int shortpackets : 1; unsigned int stalledis : 1; unsigned int overfis : 1; unsigned int nakinis : 1; unsigned int nakoutis : 1; unsigned int rxstpis : 1; unsigned int rxoutis : 1; unsigned int txinis : 1; } avr32_usbb_uesta3set_t; typedef struct avr32_usbb_uesta4set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 1; unsigned int errortranss : 1; unsigned int : 1; unsigned int setmdata : 1; unsigned int shortpackets : 1; unsigned int stalledis : 1; unsigned int overfis : 1; unsigned int nakinis : 1; unsigned int nakoutis : 1; unsigned int rxstpis : 1; unsigned int rxoutis : 1; unsigned int txinis : 1; } avr32_usbb_uesta4set_t; typedef struct avr32_usbb_uesta5set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 1; unsigned int errortranss : 1; unsigned int : 1; unsigned int setmdata : 1; unsigned int shortpackets : 1; unsigned int stalledis : 1; unsigned int overfis : 1; unsigned int nakinis : 1; unsigned int nakoutis : 1; unsigned int rxstpis : 1; unsigned int rxoutis : 1; unsigned int txinis : 1; } avr32_usbb_uesta5set_t; typedef struct avr32_usbb_uesta6set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 1; unsigned int errortranss : 1; unsigned int : 1; unsigned int setmdata : 1; unsigned int shortpackets : 1; unsigned int stalledis : 1; unsigned int overfis : 1; unsigned int nakinis : 1; unsigned int nakoutis : 1; unsigned int rxstpis : 1; unsigned int rxoutis : 1; unsigned int txinis : 1; } avr32_usbb_uesta6set_t; typedef struct avr32_usbb_uecon0_t { unsigned int :12; unsigned int stallrq : 1; unsigned int rstdt : 1; unsigned int nyetdis : 1; unsigned int epdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int killbk : 1; unsigned int nbusybke : 1; unsigned int : 1; unsigned int errortranse : 1; unsigned int dataxe : 1; unsigned int mdatae : 1; unsigned int shortpackete : 1; unsigned int stallede : 1; unsigned int overfe : 1; unsigned int nakine : 1; unsigned int nakoute : 1; unsigned int rxstpe : 1; unsigned int rxoute : 1; unsigned int txine : 1; } avr32_usbb_uecon0_t; typedef struct avr32_usbb_uecon1_t { unsigned int :12; unsigned int stallrq : 1; unsigned int rstdt : 1; unsigned int nyetdis : 1; unsigned int epdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int killbk : 1; unsigned int nbusybke : 1; unsigned int : 1; unsigned int errortranse : 1; unsigned int dataxe : 1; unsigned int mdatae : 1; unsigned int shortpackete : 1; unsigned int stallede : 1; unsigned int overfe : 1; unsigned int nakine : 1; unsigned int nakoute : 1; unsigned int rxstpe : 1; unsigned int rxoute : 1; unsigned int txine : 1; } avr32_usbb_uecon1_t; typedef struct avr32_usbb_uecon2_t { unsigned int :12; unsigned int stallrq : 1; unsigned int rstdt : 1; unsigned int nyetdis : 1; unsigned int epdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int killbk : 1; unsigned int nbusybke : 1; unsigned int : 1; unsigned int errortranse : 1; unsigned int dataxe : 1; unsigned int mdatae : 1; unsigned int shortpackete : 1; unsigned int stallede : 1; unsigned int overfe : 1; unsigned int nakine : 1; unsigned int nakoute : 1; unsigned int rxstpe : 1; unsigned int rxoute : 1; unsigned int txine : 1; } avr32_usbb_uecon2_t; typedef struct avr32_usbb_uecon3_t { unsigned int :12; unsigned int stallrq : 1; unsigned int rstdt : 1; unsigned int nyetdis : 1; unsigned int epdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int killbk : 1; unsigned int nbusybke : 1; unsigned int : 1; unsigned int errortranse : 1; unsigned int dataxe : 1; unsigned int mdatae : 1; unsigned int shortpackete : 1; unsigned int stallede : 1; unsigned int overfe : 1; unsigned int nakine : 1; unsigned int nakoute : 1; unsigned int rxstpe : 1; unsigned int rxoute : 1; unsigned int txine : 1; } avr32_usbb_uecon3_t; typedef struct avr32_usbb_uecon4_t { unsigned int :12; unsigned int stallrq : 1; unsigned int rstdt : 1; unsigned int nyetdis : 1; unsigned int epdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int killbk : 1; unsigned int nbusybke : 1; unsigned int : 1; unsigned int errortranse : 1; unsigned int dataxe : 1; unsigned int mdatae : 1; unsigned int shortpackete : 1; unsigned int stallede : 1; unsigned int overfe : 1; unsigned int nakine : 1; unsigned int nakoute : 1; unsigned int rxstpe : 1; unsigned int rxoute : 1; unsigned int txine : 1; } avr32_usbb_uecon4_t; typedef struct avr32_usbb_uecon5_t { unsigned int :12; unsigned int stallrq : 1; unsigned int rstdt : 1; unsigned int nyetdis : 1; unsigned int epdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int killbk : 1; unsigned int nbusybke : 1; unsigned int : 1; unsigned int errortranse : 1; unsigned int dataxe : 1; unsigned int mdatae : 1; unsigned int shortpackete : 1; unsigned int stallede : 1; unsigned int overfe : 1; unsigned int nakine : 1; unsigned int nakoute : 1; unsigned int rxstpe : 1; unsigned int rxoute : 1; unsigned int txine : 1; } avr32_usbb_uecon5_t; typedef struct avr32_usbb_uecon6_t { unsigned int :12; unsigned int stallrq : 1; unsigned int rstdt : 1; unsigned int nyetdis : 1; unsigned int epdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int killbk : 1; unsigned int nbusybke : 1; unsigned int : 1; unsigned int errortranse : 1; unsigned int dataxe : 1; unsigned int mdatae : 1; unsigned int shortpackete : 1; unsigned int stallede : 1; unsigned int overfe : 1; unsigned int nakine : 1; unsigned int nakoute : 1; unsigned int rxstpe : 1; unsigned int rxoute : 1; unsigned int txine : 1; } avr32_usbb_uecon6_t; typedef struct avr32_usbb_uecon0set_t { unsigned int :12; unsigned int stallrqs : 1; unsigned int rstdts : 1; unsigned int nyetdiss : 1; unsigned int epdishdmas : 1; unsigned int : 2; unsigned int killbks : 1; unsigned int nbusybkes : 1; unsigned int : 1; unsigned int errortranses : 1; unsigned int dataxes : 1; unsigned int mdataes : 1; unsigned int shortpacketes : 1; unsigned int stalledes : 1; unsigned int overfes : 1; unsigned int nakines : 1; unsigned int nakoutes : 1; unsigned int rxstpes : 1; unsigned int rxoutes : 1; unsigned int txines : 1; } avr32_usbb_uecon0set_t; typedef struct avr32_usbb_uecon1set_t { unsigned int :12; unsigned int stallrqs : 1; unsigned int rstdts : 1; unsigned int nyetdiss : 1; unsigned int epdishdmas : 1; unsigned int : 2; unsigned int killbks : 1; unsigned int nbusybkes : 1; unsigned int : 1; unsigned int errortranses : 1; unsigned int dataxes : 1; unsigned int mdataes : 1; unsigned int shortpacketes : 1; unsigned int stalledes : 1; unsigned int overfes : 1; unsigned int nakines : 1; unsigned int nakoutes : 1; unsigned int rxstpes : 1; unsigned int rxoutes : 1; unsigned int txines : 1; } avr32_usbb_uecon1set_t; typedef struct avr32_usbb_uecon2set_t { unsigned int :12; unsigned int stallrqs : 1; unsigned int rstdts : 1; unsigned int nyetdiss : 1; unsigned int epdishdmas : 1; unsigned int : 2; unsigned int killbks : 1; unsigned int nbusybkes : 1; unsigned int : 1; unsigned int errortranses : 1; unsigned int dataxes : 1; unsigned int mdataes : 1; unsigned int shortpacketes : 1; unsigned int stalledes : 1; unsigned int overfes : 1; unsigned int nakines : 1; unsigned int nakoutes : 1; unsigned int rxstpes : 1; unsigned int rxoutes : 1; unsigned int txines : 1; } avr32_usbb_uecon2set_t; typedef struct avr32_usbb_uecon3set_t { unsigned int :12; unsigned int stallrqs : 1; unsigned int rstdts : 1; unsigned int nyetdiss : 1; unsigned int epdishdmas : 1; unsigned int : 2; unsigned int killbks : 1; unsigned int nbusybkes : 1; unsigned int : 1; unsigned int errortranses : 1; unsigned int dataxes : 1; unsigned int mdataes : 1; unsigned int shortpacketes : 1; unsigned int stalledes : 1; unsigned int overfes : 1; unsigned int nakines : 1; unsigned int nakoutes : 1; unsigned int rxstpes : 1; unsigned int rxoutes : 1; unsigned int txines : 1; } avr32_usbb_uecon3set_t; typedef struct avr32_usbb_uecon4set_t { unsigned int :12; unsigned int stallrqs : 1; unsigned int rstdts : 1; unsigned int nyetdiss : 1; unsigned int epdishdmas : 1; unsigned int : 2; unsigned int killbks : 1; unsigned int nbusybkes : 1; unsigned int : 1; unsigned int errortranses : 1; unsigned int dataxes : 1; unsigned int mdataes : 1; unsigned int shortpacketes : 1; unsigned int stalledes : 1; unsigned int overfes : 1; unsigned int nakines : 1; unsigned int nakoutes : 1; unsigned int rxstpes : 1; unsigned int rxoutes : 1; unsigned int txines : 1; } avr32_usbb_uecon4set_t; typedef struct avr32_usbb_uecon5set_t { unsigned int :12; unsigned int stallrqs : 1; unsigned int rstdts : 1; unsigned int nyetdiss : 1; unsigned int epdishdmas : 1; unsigned int : 2; unsigned int killbks : 1; unsigned int nbusybkes : 1; unsigned int : 1; unsigned int errortranses : 1; unsigned int dataxes : 1; unsigned int mdataes : 1; unsigned int shortpacketes : 1; unsigned int stalledes : 1; unsigned int overfes : 1; unsigned int nakines : 1; unsigned int nakoutes : 1; unsigned int rxstpes : 1; unsigned int rxoutes : 1; unsigned int txines : 1; } avr32_usbb_uecon5set_t; typedef struct avr32_usbb_uecon6set_t { unsigned int :12; unsigned int stallrqs : 1; unsigned int rstdts : 1; unsigned int nyetdiss : 1; unsigned int epdishdmas : 1; unsigned int : 2; unsigned int killbks : 1; unsigned int nbusybkes : 1; unsigned int : 1; unsigned int errortranses : 1; unsigned int dataxes : 1; unsigned int mdataes : 1; unsigned int shortpacketes : 1; unsigned int stalledes : 1; unsigned int overfes : 1; unsigned int nakines : 1; unsigned int nakoutes : 1; unsigned int rxstpes : 1; unsigned int rxoutes : 1; unsigned int txines : 1; } avr32_usbb_uecon6set_t; typedef struct avr32_usbb_uecon0clr_t { unsigned int :12; unsigned int stallrqc : 1; unsigned int : 1; unsigned int nyetdisc : 1; unsigned int epdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 1; unsigned int errortransec : 1; unsigned int dataxec : 1; unsigned int mdataec : 1; unsigned int shortpacketec : 1; unsigned int stalledec : 1; unsigned int overfec : 1; unsigned int nakinec : 1; unsigned int nakoutec : 1; unsigned int rxstpec : 1; unsigned int rxoutec : 1; unsigned int txinec : 1; } avr32_usbb_uecon0clr_t; typedef struct avr32_usbb_uecon1clr_t { unsigned int :12; unsigned int stallrqc : 1; unsigned int : 1; unsigned int nyetdisc : 1; unsigned int epdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 1; unsigned int errortransec : 1; unsigned int dataxec : 1; unsigned int mdataec : 1; unsigned int shortpacketec : 1; unsigned int stalledec : 1; unsigned int overfec : 1; unsigned int nakinec : 1; unsigned int nakoutec : 1; unsigned int rxstpec : 1; unsigned int rxoutec : 1; unsigned int txinec : 1; } avr32_usbb_uecon1clr_t; typedef struct avr32_usbb_uecon2clr_t { unsigned int :12; unsigned int stallrqc : 1; unsigned int : 1; unsigned int nyetdisc : 1; unsigned int epdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 1; unsigned int errortransec : 1; unsigned int dataxec : 1; unsigned int mdataec : 1; unsigned int shortpacketec : 1; unsigned int stalledec : 1; unsigned int overfec : 1; unsigned int nakinec : 1; unsigned int nakoutec : 1; unsigned int rxstpec : 1; unsigned int rxoutec : 1; unsigned int txinec : 1; } avr32_usbb_uecon2clr_t; typedef struct avr32_usbb_uecon3clr_t { unsigned int :12; unsigned int stallrqc : 1; unsigned int : 1; unsigned int nyetdisc : 1; unsigned int epdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 1; unsigned int errortransec : 1; unsigned int dataxec : 1; unsigned int mdataec : 1; unsigned int shortpacketec : 1; unsigned int stalledec : 1; unsigned int overfec : 1; unsigned int nakinec : 1; unsigned int nakoutec : 1; unsigned int rxstpec : 1; unsigned int rxoutec : 1; unsigned int txinec : 1; } avr32_usbb_uecon3clr_t; typedef struct avr32_usbb_uecon4clr_t { unsigned int :12; unsigned int stallrqc : 1; unsigned int : 1; unsigned int nyetdisc : 1; unsigned int epdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 1; unsigned int errortransec : 1; unsigned int dataxec : 1; unsigned int mdataec : 1; unsigned int shortpacketec : 1; unsigned int stalledec : 1; unsigned int overfec : 1; unsigned int nakinec : 1; unsigned int nakoutec : 1; unsigned int rxstpec : 1; unsigned int rxoutec : 1; unsigned int txinec : 1; } avr32_usbb_uecon4clr_t; typedef struct avr32_usbb_uecon5clr_t { unsigned int :12; unsigned int stallrqc : 1; unsigned int : 1; unsigned int nyetdisc : 1; unsigned int epdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 1; unsigned int errortransec : 1; unsigned int dataxec : 1; unsigned int mdataec : 1; unsigned int shortpacketec : 1; unsigned int stalledec : 1; unsigned int overfec : 1; unsigned int nakinec : 1; unsigned int nakoutec : 1; unsigned int rxstpec : 1; unsigned int rxoutec : 1; unsigned int txinec : 1; } avr32_usbb_uecon5clr_t; typedef struct avr32_usbb_uecon6clr_t { unsigned int :12; unsigned int stallrqc : 1; unsigned int : 1; unsigned int nyetdisc : 1; unsigned int epdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 1; unsigned int errortransec : 1; unsigned int dataxec : 1; unsigned int mdataec : 1; unsigned int shortpacketec : 1; unsigned int stalledec : 1; unsigned int overfec : 1; unsigned int nakinec : 1; unsigned int nakoutec : 1; unsigned int rxstpec : 1; unsigned int rxoutec : 1; unsigned int txinec : 1; } avr32_usbb_uecon6clr_t; typedef struct avr32_usbb_uddma1_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uddma1_nextdesc_t; typedef struct avr32_usbb_uddma1_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uddma1_control_t; typedef struct avr32_usbb_uddma1_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uddma1_status_t; typedef struct avr32_usbb_uddma2_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uddma2_nextdesc_t; typedef struct avr32_usbb_uddma2_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uddma2_control_t; typedef struct avr32_usbb_uddma2_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uddma2_status_t; typedef struct avr32_usbb_uddma3_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uddma3_nextdesc_t; typedef struct avr32_usbb_uddma3_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uddma3_control_t; typedef struct avr32_usbb_uddma3_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uddma3_status_t; typedef struct avr32_usbb_uddma4_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uddma4_nextdesc_t; typedef struct avr32_usbb_uddma4_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uddma4_control_t; typedef struct avr32_usbb_uddma4_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uddma4_status_t; typedef struct avr32_usbb_uddma5_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uddma5_nextdesc_t; typedef struct avr32_usbb_uddma5_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uddma5_control_t; typedef struct avr32_usbb_uddma5_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uddma5_status_t; typedef struct avr32_usbb_uddma6_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uddma6_nextdesc_t; typedef struct avr32_usbb_uddma6_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uddma6_control_t; typedef struct avr32_usbb_uddma6_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uddma6_status_t; typedef struct avr32_usbb_uhcon_t { unsigned int :18; unsigned int spdconf : 2; unsigned int : 1; unsigned int resume : 1; unsigned int reset : 1; unsigned int sofe : 1; unsigned int : 8; } avr32_usbb_uhcon_t; typedef struct avr32_usbb_uhint_t { unsigned int : 1; unsigned int dma6int : 1; unsigned int dma5int : 1; unsigned int dma4int : 1; unsigned int dma3int : 1; unsigned int dma2int : 1; unsigned int dma1int : 1; unsigned int :10; unsigned int p6int : 1; unsigned int p5int : 1; unsigned int p4int : 1; unsigned int p3int : 1; unsigned int p2int : 1; unsigned int p1int : 1; unsigned int p0int : 1; unsigned int : 1; unsigned int hwupi : 1; unsigned int hsofi : 1; unsigned int rxrsmi : 1; unsigned int rsmedi : 1; unsigned int rsti : 1; unsigned int ddisci : 1; unsigned int dconni : 1; } avr32_usbb_uhint_t; typedef struct avr32_usbb_uhintclr_t { unsigned int :25; unsigned int hwupic : 1; unsigned int hsofic : 1; unsigned int rxrsmic : 1; unsigned int rsmedic : 1; unsigned int rstic : 1; unsigned int ddiscic : 1; unsigned int dconnic : 1; } avr32_usbb_uhintclr_t; typedef struct avr32_usbb_uhintset_t { unsigned int : 1; unsigned int dma6ints : 1; unsigned int dma5ints : 1; unsigned int dma4ints : 1; unsigned int dma3ints : 1; unsigned int dma2ints : 1; unsigned int dma1ints : 1; unsigned int :18; unsigned int hwupis : 1; unsigned int hsofis : 1; unsigned int rxrsmis : 1; unsigned int rsmedis : 1; unsigned int rstis : 1; unsigned int ddiscis : 1; unsigned int dconnis : 1; } avr32_usbb_uhintset_t; typedef struct avr32_usbb_uhinte_t { unsigned int : 1; unsigned int dma6inte : 1; unsigned int dma5inte : 1; unsigned int dma4inte : 1; unsigned int dma3inte : 1; unsigned int dma2inte : 1; unsigned int dma1inte : 1; unsigned int :10; unsigned int p6inte : 1; unsigned int p5inte : 1; unsigned int p4inte : 1; unsigned int p3inte : 1; unsigned int p2inte : 1; unsigned int p1inte : 1; unsigned int p0inte : 1; unsigned int : 1; unsigned int hwupie : 1; unsigned int hsofie : 1; unsigned int rxrsmie : 1; unsigned int rsmedie : 1; unsigned int rstie : 1; unsigned int ddiscie : 1; unsigned int dconnie : 1; } avr32_usbb_uhinte_t; typedef struct avr32_usbb_uhinteclr_t { unsigned int : 1; unsigned int dma6intec : 1; unsigned int dma5intec : 1; unsigned int dma4intec : 1; unsigned int dma3intec : 1; unsigned int dma2intec : 1; unsigned int dma1intec : 1; unsigned int :10; unsigned int p6intec : 1; unsigned int p5intec : 1; unsigned int p4intec : 1; unsigned int p3intec : 1; unsigned int p2intec : 1; unsigned int p1intec : 1; unsigned int p0intec : 1; unsigned int : 1; unsigned int hwupiec : 1; unsigned int hsofiec : 1; unsigned int rxrsmiec : 1; unsigned int rsmediec : 1; unsigned int rstiec : 1; unsigned int ddisciec : 1; unsigned int dconniec : 1; } avr32_usbb_uhinteclr_t; typedef struct avr32_usbb_uhinteset_t { unsigned int : 1; unsigned int dma6intes : 1; unsigned int dma5intes : 1; unsigned int dma4intes : 1; unsigned int dma3intes : 1; unsigned int dma2intes : 1; unsigned int dma1intes : 1; unsigned int :10; unsigned int p6intes : 1; unsigned int p5intes : 1; unsigned int p4intes : 1; unsigned int p3intes : 1; unsigned int p2intes : 1; unsigned int p1intes : 1; unsigned int p0intes : 1; unsigned int : 1; unsigned int hwupies : 1; unsigned int hsofies : 1; unsigned int rxrsmies : 1; unsigned int rsmedies : 1; unsigned int rsties : 1; unsigned int ddiscies : 1; unsigned int dconnies : 1; } avr32_usbb_uhinteset_t; typedef struct avr32_usbb_uprst_t { unsigned int : 9; unsigned int prst6 : 1; unsigned int prst5 : 1; unsigned int prst4 : 1; unsigned int prst3 : 1; unsigned int prst2 : 1; unsigned int prst1 : 1; unsigned int prst0 : 1; unsigned int : 9; unsigned int pen6 : 1; unsigned int pen5 : 1; unsigned int pen4 : 1; unsigned int pen3 : 1; unsigned int pen2 : 1; unsigned int pen1 : 1; unsigned int pen0 : 1; } avr32_usbb_uprst_t; typedef struct avr32_usbb_uhfnum_t { unsigned int : 8; unsigned int flenhigh : 8; unsigned int : 2; unsigned int fnum :11; unsigned int mfnum : 3; } avr32_usbb_uhfnum_t; typedef struct avr32_usbb_uhaddr1_t { unsigned int : 1; unsigned int uhaddr_p3 : 7; unsigned int : 1; unsigned int uhaddr_p2 : 7; unsigned int : 1; unsigned int uhaddr_p1 : 7; unsigned int : 1; unsigned int uhaddr_p0 : 7; } avr32_usbb_uhaddr1_t; typedef struct avr32_usbb_uhaddr2_t { unsigned int : 1; unsigned int uhaddr_p7 : 7; unsigned int : 1; unsigned int uhaddr_p6 : 7; unsigned int : 1; unsigned int uhaddr_p5 : 7; unsigned int : 1; unsigned int uhaddr_p4 : 7; } avr32_usbb_uhaddr2_t; typedef struct avr32_usbb_uhaddr3_t { unsigned int : 1; unsigned int uhaddr_p11 : 7; unsigned int : 1; unsigned int uhaddr_p10 : 7; unsigned int : 1; unsigned int uhaddr_p9 : 7; unsigned int : 1; unsigned int uhaddr_p8 : 7; } avr32_usbb_uhaddr3_t; typedef struct avr32_usbb_upcfg0_t { unsigned int intfrq : 8; unsigned int datasizerdwr : 2; unsigned int : 1; unsigned int pingen : 1; unsigned int pepnum : 4; unsigned int : 2; unsigned int ptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int ptoken : 2; unsigned int : 1; unsigned int psize : 3; unsigned int pbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_upcfg0_t; typedef struct avr32_usbb_upcfg1_t { unsigned int intfrq : 8; unsigned int datasizerdwr : 2; unsigned int : 1; unsigned int pingen : 1; unsigned int pepnum : 4; unsigned int : 2; unsigned int ptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int ptoken : 2; unsigned int : 1; unsigned int psize : 3; unsigned int pbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_upcfg1_t; typedef struct avr32_usbb_upcfg2_t { unsigned int intfrq : 8; unsigned int datasizerdwr : 2; unsigned int : 1; unsigned int pingen : 1; unsigned int pepnum : 4; unsigned int : 2; unsigned int ptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int ptoken : 2; unsigned int : 1; unsigned int psize : 3; unsigned int pbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_upcfg2_t; typedef struct avr32_usbb_upcfg3_t { unsigned int intfrq : 8; unsigned int datasizerdwr : 2; unsigned int : 1; unsigned int pingen : 1; unsigned int pepnum : 4; unsigned int : 2; unsigned int ptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int ptoken : 2; unsigned int : 1; unsigned int psize : 3; unsigned int pbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_upcfg3_t; typedef struct avr32_usbb_upcfg4_t { unsigned int intfrq : 8; unsigned int datasizerdwr : 2; unsigned int : 1; unsigned int pingen : 1; unsigned int pepnum : 4; unsigned int : 2; unsigned int ptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int ptoken : 2; unsigned int : 1; unsigned int psize : 3; unsigned int pbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_upcfg4_t; typedef struct avr32_usbb_upcfg5_t { unsigned int intfrq : 8; unsigned int datasizerdwr : 2; unsigned int : 1; unsigned int pingen : 1; unsigned int pepnum : 4; unsigned int : 2; unsigned int ptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int ptoken : 2; unsigned int : 1; unsigned int psize : 3; unsigned int pbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_upcfg5_t; typedef struct avr32_usbb_upcfg6_t { unsigned int intfrq : 8; unsigned int datasizerdwr : 2; unsigned int : 1; unsigned int pingen : 1; unsigned int pepnum : 4; unsigned int : 2; unsigned int ptype : 2; unsigned int : 1; unsigned int autosw : 1; unsigned int ptoken : 2; unsigned int : 1; unsigned int psize : 3; unsigned int pbk : 2; unsigned int alloc : 1; unsigned int : 1; } avr32_usbb_upcfg6_t; typedef struct avr32_usbb_upsta0_t { unsigned int : 1; unsigned int pbyct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 2; unsigned int dtseq : 2; unsigned int shortpacketi : 1; unsigned int rxstalldi : 1; unsigned int overfi : 1; unsigned int nakedi : 1; unsigned int perri : 1; unsigned int txstpi : 1; unsigned int txouti : 1; unsigned int rxini : 1; } avr32_usbb_upsta0_t; typedef struct avr32_usbb_upsta1_t { unsigned int : 1; unsigned int pbyct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 2; unsigned int dtseq : 2; unsigned int shortpacketi : 1; unsigned int rxstalldi : 1; unsigned int overfi : 1; unsigned int nakedi : 1; unsigned int perri : 1; unsigned int txstpi : 1; unsigned int txouti : 1; unsigned int rxini : 1; } avr32_usbb_upsta1_t; typedef struct avr32_usbb_upsta2_t { unsigned int : 1; unsigned int pbyct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 2; unsigned int dtseq : 2; unsigned int shortpacketi : 1; unsigned int rxstalldi : 1; unsigned int overfi : 1; unsigned int nakedi : 1; unsigned int perri : 1; unsigned int txstpi : 1; unsigned int txouti : 1; unsigned int rxini : 1; } avr32_usbb_upsta2_t; typedef struct avr32_usbb_upsta3_t { unsigned int : 1; unsigned int pbyct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 2; unsigned int dtseq : 2; unsigned int shortpacketi : 1; unsigned int rxstalldi : 1; unsigned int overfi : 1; unsigned int nakedi : 1; unsigned int perri : 1; unsigned int txstpi : 1; unsigned int txouti : 1; unsigned int rxini : 1; } avr32_usbb_upsta3_t; typedef struct avr32_usbb_upsta4_t { unsigned int : 1; unsigned int pbyct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 2; unsigned int dtseq : 2; unsigned int shortpacketi : 1; unsigned int rxstalldi : 1; unsigned int overfi : 1; unsigned int nakedi : 1; unsigned int perri : 1; unsigned int txstpi : 1; unsigned int txouti : 1; unsigned int rxini : 1; } avr32_usbb_upsta4_t; typedef struct avr32_usbb_upsta5_t { unsigned int : 1; unsigned int pbyct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 2; unsigned int dtseq : 2; unsigned int shortpacketi : 1; unsigned int rxstalldi : 1; unsigned int overfi : 1; unsigned int nakedi : 1; unsigned int perri : 1; unsigned int txstpi : 1; unsigned int txouti : 1; unsigned int rxini : 1; } avr32_usbb_upsta5_t; typedef struct avr32_usbb_upsta6_t { unsigned int : 1; unsigned int pbyct :11; unsigned int : 1; unsigned int cfgok : 1; unsigned int : 1; unsigned int rwall : 1; unsigned int currbk : 2; unsigned int nbusybk : 2; unsigned int : 2; unsigned int dtseq : 2; unsigned int shortpacketi : 1; unsigned int rxstalldi : 1; unsigned int overfi : 1; unsigned int nakedi : 1; unsigned int perri : 1; unsigned int txstpi : 1; unsigned int txouti : 1; unsigned int rxini : 1; } avr32_usbb_upsta6_t; typedef struct avr32_usbb_upsta0clr_t { unsigned int :24; unsigned int shortpacketic : 1; unsigned int rxstalldic : 1; unsigned int overfic : 1; unsigned int nakedic : 1; unsigned int : 1; unsigned int txstpic : 1; unsigned int txoutic : 1; unsigned int rxinic : 1; } avr32_usbb_upsta0clr_t; typedef struct avr32_usbb_upsta1clr_t { unsigned int :24; unsigned int shortpacketic : 1; unsigned int rxstalldic : 1; unsigned int overfic : 1; unsigned int nakedic : 1; unsigned int : 1; unsigned int txstpic : 1; unsigned int txoutic : 1; unsigned int rxinic : 1; } avr32_usbb_upsta1clr_t; typedef struct avr32_usbb_upsta2clr_t { unsigned int :24; unsigned int shortpacketic : 1; unsigned int rxstalldic : 1; unsigned int overfic : 1; unsigned int nakedic : 1; unsigned int : 1; unsigned int txstpic : 1; unsigned int txoutic : 1; unsigned int rxinic : 1; } avr32_usbb_upsta2clr_t; typedef struct avr32_usbb_upsta3clr_t { unsigned int :24; unsigned int shortpacketic : 1; unsigned int rxstalldic : 1; unsigned int overfic : 1; unsigned int nakedic : 1; unsigned int : 1; unsigned int txstpic : 1; unsigned int txoutic : 1; unsigned int rxinic : 1; } avr32_usbb_upsta3clr_t; typedef struct avr32_usbb_upsta4clr_t { unsigned int :24; unsigned int shortpacketic : 1; unsigned int rxstalldic : 1; unsigned int overfic : 1; unsigned int nakedic : 1; unsigned int : 1; unsigned int txstpic : 1; unsigned int txoutic : 1; unsigned int rxinic : 1; } avr32_usbb_upsta4clr_t; typedef struct avr32_usbb_upsta5clr_t { unsigned int :24; unsigned int shortpacketic : 1; unsigned int rxstalldic : 1; unsigned int overfic : 1; unsigned int nakedic : 1; unsigned int : 1; unsigned int txstpic : 1; unsigned int txoutic : 1; unsigned int rxinic : 1; } avr32_usbb_upsta5clr_t; typedef struct avr32_usbb_upsta6clr_t { unsigned int :24; unsigned int shortpacketic : 1; unsigned int rxstalldic : 1; unsigned int overfic : 1; unsigned int nakedic : 1; unsigned int : 1; unsigned int txstpic : 1; unsigned int txoutic : 1; unsigned int rxinic : 1; } avr32_usbb_upsta6clr_t; typedef struct avr32_usbb_upsta0set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 4; unsigned int shortpacketis : 1; unsigned int rxstalldis : 1; unsigned int overfis : 1; unsigned int nakedis : 1; unsigned int perris : 1; unsigned int txstpis : 1; unsigned int txoutis : 1; unsigned int rxinis : 1; } avr32_usbb_upsta0set_t; typedef struct avr32_usbb_upsta1set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 4; unsigned int shortpacketis : 1; unsigned int rxstalldis : 1; unsigned int overfis : 1; unsigned int nakedis : 1; unsigned int perris : 1; unsigned int txstpis : 1; unsigned int txoutis : 1; unsigned int rxinis : 1; } avr32_usbb_upsta1set_t; typedef struct avr32_usbb_upsta2set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 4; unsigned int shortpacketis : 1; unsigned int rxstalldis : 1; unsigned int overfis : 1; unsigned int nakedis : 1; unsigned int perris : 1; unsigned int txstpis : 1; unsigned int txoutis : 1; unsigned int rxinis : 1; } avr32_usbb_upsta2set_t; typedef struct avr32_usbb_upsta3set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 4; unsigned int shortpacketis : 1; unsigned int rxstalldis : 1; unsigned int overfis : 1; unsigned int nakedis : 1; unsigned int perris : 1; unsigned int txstpis : 1; unsigned int txoutis : 1; unsigned int rxinis : 1; } avr32_usbb_upsta3set_t; typedef struct avr32_usbb_upsta4set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 4; unsigned int shortpacketis : 1; unsigned int rxstalldis : 1; unsigned int overfis : 1; unsigned int nakedis : 1; unsigned int perris : 1; unsigned int txstpis : 1; unsigned int txoutis : 1; unsigned int rxinis : 1; } avr32_usbb_upsta4set_t; typedef struct avr32_usbb_upsta5set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 4; unsigned int shortpacketis : 1; unsigned int rxstalldis : 1; unsigned int overfis : 1; unsigned int nakedis : 1; unsigned int perris : 1; unsigned int txstpis : 1; unsigned int txoutis : 1; unsigned int rxinis : 1; } avr32_usbb_upsta5set_t; typedef struct avr32_usbb_upsta6set_t { unsigned int :19; unsigned int nbusybks : 1; unsigned int : 4; unsigned int shortpacketis : 1; unsigned int rxstalldis : 1; unsigned int overfis : 1; unsigned int nakedis : 1; unsigned int perris : 1; unsigned int txstpis : 1; unsigned int txoutis : 1; unsigned int rxinis : 1; } avr32_usbb_upsta6set_t; typedef struct avr32_usbb_upcon0_t { unsigned int :13; unsigned int rstdt : 1; unsigned int pfreeze : 1; unsigned int pdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int : 1; unsigned int nbusybke : 1; unsigned int : 4; unsigned int shortpacketie : 1; unsigned int rxstallde : 1; unsigned int overfie : 1; unsigned int nakede : 1; unsigned int perre : 1; unsigned int txstpe : 1; unsigned int txoute : 1; unsigned int rxine : 1; } avr32_usbb_upcon0_t; typedef struct avr32_usbb_upcon1_t { unsigned int :13; unsigned int rstdt : 1; unsigned int pfreeze : 1; unsigned int pdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int : 1; unsigned int nbusybke : 1; unsigned int : 4; unsigned int shortpacketie : 1; unsigned int rxstallde : 1; unsigned int overfie : 1; unsigned int nakede : 1; unsigned int perre : 1; unsigned int txstpe : 1; unsigned int txoute : 1; unsigned int rxine : 1; } avr32_usbb_upcon1_t; typedef struct avr32_usbb_upcon2_t { unsigned int :13; unsigned int rstdt : 1; unsigned int pfreeze : 1; unsigned int pdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int : 1; unsigned int nbusybke : 1; unsigned int : 4; unsigned int shortpacketie : 1; unsigned int rxstallde : 1; unsigned int overfie : 1; unsigned int nakede : 1; unsigned int perre : 1; unsigned int txstpe : 1; unsigned int txoute : 1; unsigned int rxine : 1; } avr32_usbb_upcon2_t; typedef struct avr32_usbb_upcon3_t { unsigned int :13; unsigned int rstdt : 1; unsigned int pfreeze : 1; unsigned int pdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int : 1; unsigned int nbusybke : 1; unsigned int : 4; unsigned int shortpacketie : 1; unsigned int rxstallde : 1; unsigned int overfie : 1; unsigned int nakede : 1; unsigned int perre : 1; unsigned int txstpe : 1; unsigned int txoute : 1; unsigned int rxine : 1; } avr32_usbb_upcon3_t; typedef struct avr32_usbb_upcon4_t { unsigned int :13; unsigned int rstdt : 1; unsigned int pfreeze : 1; unsigned int pdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int : 1; unsigned int nbusybke : 1; unsigned int : 4; unsigned int shortpacketie : 1; unsigned int rxstallde : 1; unsigned int overfie : 1; unsigned int nakede : 1; unsigned int perre : 1; unsigned int txstpe : 1; unsigned int txoute : 1; unsigned int rxine : 1; } avr32_usbb_upcon4_t; typedef struct avr32_usbb_upcon5_t { unsigned int :13; unsigned int rstdt : 1; unsigned int pfreeze : 1; unsigned int pdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int : 1; unsigned int nbusybke : 1; unsigned int : 4; unsigned int shortpacketie : 1; unsigned int rxstallde : 1; unsigned int overfie : 1; unsigned int nakede : 1; unsigned int perre : 1; unsigned int txstpe : 1; unsigned int txoute : 1; unsigned int rxine : 1; } avr32_usbb_upcon5_t; typedef struct avr32_usbb_upcon6_t { unsigned int :13; unsigned int rstdt : 1; unsigned int pfreeze : 1; unsigned int pdishdma : 1; unsigned int : 1; unsigned int fifocon : 1; unsigned int : 1; unsigned int nbusybke : 1; unsigned int : 4; unsigned int shortpacketie : 1; unsigned int rxstallde : 1; unsigned int overfie : 1; unsigned int nakede : 1; unsigned int perre : 1; unsigned int txstpe : 1; unsigned int txoute : 1; unsigned int rxine : 1; } avr32_usbb_upcon6_t; typedef struct avr32_usbb_upcon0set_t { unsigned int :13; unsigned int rstdts : 1; unsigned int pfreezes : 1; unsigned int pdishdmas : 1; unsigned int : 3; unsigned int nbusybkes : 1; unsigned int : 4; unsigned int shortpacketies : 1; unsigned int rxstalldes : 1; unsigned int overfies : 1; unsigned int nakedes : 1; unsigned int perres : 1; unsigned int txstpes : 1; unsigned int txoutes : 1; unsigned int rxines : 1; } avr32_usbb_upcon0set_t; typedef struct avr32_usbb_upcon1set_t { unsigned int :13; unsigned int rstdts : 1; unsigned int pfreezes : 1; unsigned int pdishdmas : 1; unsigned int : 3; unsigned int nbusybkes : 1; unsigned int : 4; unsigned int shortpacketies : 1; unsigned int rxstalldes : 1; unsigned int overfies : 1; unsigned int nakedes : 1; unsigned int perres : 1; unsigned int txstpes : 1; unsigned int txoutes : 1; unsigned int rxines : 1; } avr32_usbb_upcon1set_t; typedef struct avr32_usbb_upcon2set_t { unsigned int :13; unsigned int rstdts : 1; unsigned int pfreezes : 1; unsigned int pdishdmas : 1; unsigned int : 3; unsigned int nbusybkes : 1; unsigned int : 4; unsigned int shortpacketies : 1; unsigned int rxstalldes : 1; unsigned int overfies : 1; unsigned int nakedes : 1; unsigned int perres : 1; unsigned int txstpes : 1; unsigned int txoutes : 1; unsigned int rxines : 1; } avr32_usbb_upcon2set_t; typedef struct avr32_usbb_upcon3set_t { unsigned int :13; unsigned int rstdts : 1; unsigned int pfreezes : 1; unsigned int pdishdmas : 1; unsigned int : 3; unsigned int nbusybkes : 1; unsigned int : 4; unsigned int shortpacketies : 1; unsigned int rxstalldes : 1; unsigned int overfies : 1; unsigned int nakedes : 1; unsigned int perres : 1; unsigned int txstpes : 1; unsigned int txoutes : 1; unsigned int rxines : 1; } avr32_usbb_upcon3set_t; typedef struct avr32_usbb_upcon4set_t { unsigned int :13; unsigned int rstdts : 1; unsigned int pfreezes : 1; unsigned int pdishdmas : 1; unsigned int : 3; unsigned int nbusybkes : 1; unsigned int : 4; unsigned int shortpacketies : 1; unsigned int rxstalldes : 1; unsigned int overfies : 1; unsigned int nakedes : 1; unsigned int perres : 1; unsigned int txstpes : 1; unsigned int txoutes : 1; unsigned int rxines : 1; } avr32_usbb_upcon4set_t; typedef struct avr32_usbb_upcon5set_t { unsigned int :13; unsigned int rstdts : 1; unsigned int pfreezes : 1; unsigned int pdishdmas : 1; unsigned int : 3; unsigned int nbusybkes : 1; unsigned int : 4; unsigned int shortpacketies : 1; unsigned int rxstalldes : 1; unsigned int overfies : 1; unsigned int nakedes : 1; unsigned int perres : 1; unsigned int txstpes : 1; unsigned int txoutes : 1; unsigned int rxines : 1; } avr32_usbb_upcon5set_t; typedef struct avr32_usbb_upcon6set_t { unsigned int :13; unsigned int rstdts : 1; unsigned int pfreezes : 1; unsigned int pdishdmas : 1; unsigned int : 3; unsigned int nbusybkes : 1; unsigned int : 4; unsigned int shortpacketies : 1; unsigned int rxstalldes : 1; unsigned int overfies : 1; unsigned int nakedes : 1; unsigned int perres : 1; unsigned int txstpes : 1; unsigned int txoutes : 1; unsigned int rxines : 1; } avr32_usbb_upcon6set_t; typedef struct avr32_usbb_upcon0clr_t { unsigned int :14; unsigned int pfreezec : 1; unsigned int pdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 4; unsigned int shortpacketiec : 1; unsigned int rxstalldec : 1; unsigned int overfiec : 1; unsigned int nakedec : 1; unsigned int perrec : 1; unsigned int txstpec : 1; unsigned int txoutec : 1; unsigned int rxinec : 1; } avr32_usbb_upcon0clr_t; typedef struct avr32_usbb_upcon1clr_t { unsigned int :14; unsigned int pfreezec : 1; unsigned int pdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 4; unsigned int shortpacketiec : 1; unsigned int rxstalldec : 1; unsigned int overfiec : 1; unsigned int nakedec : 1; unsigned int perrec : 1; unsigned int txstpec : 1; unsigned int txoutec : 1; unsigned int rxinec : 1; } avr32_usbb_upcon1clr_t; typedef struct avr32_usbb_upcon2clr_t { unsigned int :14; unsigned int pfreezec : 1; unsigned int pdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 4; unsigned int shortpacketiec : 1; unsigned int rxstalldec : 1; unsigned int overfiec : 1; unsigned int nakedec : 1; unsigned int perrec : 1; unsigned int txstpec : 1; unsigned int txoutec : 1; unsigned int rxinec : 1; } avr32_usbb_upcon2clr_t; typedef struct avr32_usbb_upcon3clr_t { unsigned int :14; unsigned int pfreezec : 1; unsigned int pdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 4; unsigned int shortpacketiec : 1; unsigned int rxstalldec : 1; unsigned int overfiec : 1; unsigned int nakedec : 1; unsigned int perrec : 1; unsigned int txstpec : 1; unsigned int txoutec : 1; unsigned int rxinec : 1; } avr32_usbb_upcon3clr_t; typedef struct avr32_usbb_upcon4clr_t { unsigned int :14; unsigned int pfreezec : 1; unsigned int pdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 4; unsigned int shortpacketiec : 1; unsigned int rxstalldec : 1; unsigned int overfiec : 1; unsigned int nakedec : 1; unsigned int perrec : 1; unsigned int txstpec : 1; unsigned int txoutec : 1; unsigned int rxinec : 1; } avr32_usbb_upcon4clr_t; typedef struct avr32_usbb_upcon5clr_t { unsigned int :14; unsigned int pfreezec : 1; unsigned int pdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 4; unsigned int shortpacketiec : 1; unsigned int rxstalldec : 1; unsigned int overfiec : 1; unsigned int nakedec : 1; unsigned int perrec : 1; unsigned int txstpec : 1; unsigned int txoutec : 1; unsigned int rxinec : 1; } avr32_usbb_upcon5clr_t; typedef struct avr32_usbb_upcon6clr_t { unsigned int :14; unsigned int pfreezec : 1; unsigned int pdishdmac : 1; unsigned int : 1; unsigned int fifoconc : 1; unsigned int : 1; unsigned int nbusybkec : 1; unsigned int : 4; unsigned int shortpacketiec : 1; unsigned int rxstalldec : 1; unsigned int overfiec : 1; unsigned int nakedec : 1; unsigned int perrec : 1; unsigned int txstpec : 1; unsigned int txoutec : 1; unsigned int rxinec : 1; } avr32_usbb_upcon6clr_t; typedef struct avr32_usbb_upinrq0_t { unsigned int :23; unsigned int inmode : 1; unsigned int inrq : 8; } avr32_usbb_upinrq0_t; typedef struct avr32_usbb_upinrq1_t { unsigned int :23; unsigned int inmode : 1; unsigned int inrq : 8; } avr32_usbb_upinrq1_t; typedef struct avr32_usbb_upinrq2_t { unsigned int :23; unsigned int inmode : 1; unsigned int inrq : 8; } avr32_usbb_upinrq2_t; typedef struct avr32_usbb_upinrq3_t { unsigned int :23; unsigned int inmode : 1; unsigned int inrq : 8; } avr32_usbb_upinrq3_t; typedef struct avr32_usbb_upinrq4_t { unsigned int :23; unsigned int inmode : 1; unsigned int inrq : 8; } avr32_usbb_upinrq4_t; typedef struct avr32_usbb_upinrq5_t { unsigned int :23; unsigned int inmode : 1; unsigned int inrq : 8; } avr32_usbb_upinrq5_t; typedef struct avr32_usbb_upinrq6_t { unsigned int :23; unsigned int inmode : 1; unsigned int inrq : 8; } avr32_usbb_upinrq6_t; typedef struct avr32_usbb_uperr0_t { unsigned int :25; unsigned int counter : 2; unsigned int crc16 : 1; unsigned int timeout : 1; unsigned int pid : 1; unsigned int datapid : 1; unsigned int datatgl : 1; } avr32_usbb_uperr0_t; typedef struct avr32_usbb_uperr1_t { unsigned int :25; unsigned int counter : 2; unsigned int crc16 : 1; unsigned int timeout : 1; unsigned int pid : 1; unsigned int datapid : 1; unsigned int datatgl : 1; } avr32_usbb_uperr1_t; typedef struct avr32_usbb_uperr2_t { unsigned int :25; unsigned int counter : 2; unsigned int crc16 : 1; unsigned int timeout : 1; unsigned int pid : 1; unsigned int datapid : 1; unsigned int datatgl : 1; } avr32_usbb_uperr2_t; typedef struct avr32_usbb_uperr3_t { unsigned int :25; unsigned int counter : 2; unsigned int crc16 : 1; unsigned int timeout : 1; unsigned int pid : 1; unsigned int datapid : 1; unsigned int datatgl : 1; } avr32_usbb_uperr3_t; typedef struct avr32_usbb_uperr4_t { unsigned int :25; unsigned int counter : 2; unsigned int crc16 : 1; unsigned int timeout : 1; unsigned int pid : 1; unsigned int datapid : 1; unsigned int datatgl : 1; } avr32_usbb_uperr4_t; typedef struct avr32_usbb_uperr5_t { unsigned int :25; unsigned int counter : 2; unsigned int crc16 : 1; unsigned int timeout : 1; unsigned int pid : 1; unsigned int datapid : 1; unsigned int datatgl : 1; } avr32_usbb_uperr5_t; typedef struct avr32_usbb_uperr6_t { unsigned int :25; unsigned int counter : 2; unsigned int crc16 : 1; unsigned int timeout : 1; unsigned int pid : 1; unsigned int datapid : 1; unsigned int datatgl : 1; } avr32_usbb_uperr6_t; typedef struct avr32_usbb_uhdma1_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uhdma1_nextdesc_t; typedef struct avr32_usbb_uhdma1_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma1_control_t; typedef struct avr32_usbb_uhdma1_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma1_status_t; typedef struct avr32_usbb_uhdma2_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uhdma2_nextdesc_t; typedef struct avr32_usbb_uhdma2_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma2_control_t; typedef struct avr32_usbb_uhdma2_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma2_status_t; typedef struct avr32_usbb_uhdma3_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uhdma3_nextdesc_t; typedef struct avr32_usbb_uhdma3_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma3_control_t; typedef struct avr32_usbb_uhdma3_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma3_status_t; typedef struct avr32_usbb_uhdma4_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uhdma4_nextdesc_t; typedef struct avr32_usbb_uhdma4_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma4_control_t; typedef struct avr32_usbb_uhdma4_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma4_status_t; typedef struct avr32_usbb_uhdma5_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uhdma5_nextdesc_t; typedef struct avr32_usbb_uhdma5_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma5_control_t; typedef struct avr32_usbb_uhdma5_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma5_status_t; typedef struct avr32_usbb_uhdma6_nextdesc_t { unsigned int nxt_desc_addr :28; unsigned int : 4; } avr32_usbb_uhdma6_nextdesc_t; typedef struct avr32_usbb_uhdma6_control_t { unsigned int ch_byte_length :16; unsigned int : 8; unsigned int burst_lock_en : 1; unsigned int desc_ld_irq_en : 1; unsigned int eobuff_irq_en : 1; unsigned int eot_irq_en : 1; unsigned int dmaend_en : 1; unsigned int buff_close_in_en : 1; unsigned int ld_nxt_ch_desc_en : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma6_control_t; typedef struct avr32_usbb_uhdma6_status_t { unsigned int ch_byte_cnt :16; unsigned int : 9; unsigned int desc_ld_sta : 1; unsigned int eoch_buff_sta : 1; unsigned int eot_sta : 1; unsigned int : 2; unsigned int ch_active : 1; unsigned int ch_en : 1; } avr32_usbb_uhdma6_status_t; typedef struct avr32_usbb_usbcon_t { unsigned int : 6; unsigned int uimod : 1; unsigned int uide : 1; unsigned int : 1; unsigned int unlock : 1; unsigned int timpage : 2; unsigned int : 2; unsigned int timvalue : 2; unsigned int usbe : 1; unsigned int frzclk : 1; unsigned int vbuspo : 1; unsigned int otgpade : 1; unsigned int hnpreq : 1; unsigned int srpreq : 1; unsigned int srpsel : 1; unsigned int vbushwc : 1; unsigned int stoe : 1; unsigned int hnperre : 1; unsigned int roleexe : 1; unsigned int bcerre : 1; unsigned int vberre : 1; unsigned int srpe : 1; unsigned int vbuste : 1; unsigned int idte : 1; } avr32_usbb_usbcon_t; typedef struct avr32_usbb_usbsta_t { unsigned int :17; unsigned int clkusable : 1; unsigned int speed : 2; unsigned int vbus : 1; unsigned int id : 1; unsigned int vbusrq : 1; unsigned int : 1; unsigned int stoi : 1; unsigned int hnperri : 1; unsigned int roleexi : 1; unsigned int bcerri : 1; unsigned int vberri : 1; unsigned int srpi : 1; unsigned int vbusti : 1; unsigned int idti : 1; } avr32_usbb_usbsta_t; typedef struct avr32_usbb_usbstaclr_t { unsigned int :22; unsigned int vbusrqc : 1; unsigned int : 1; unsigned int stoic : 1; unsigned int hnperric : 1; unsigned int roleexic : 1; unsigned int bcerric : 1; unsigned int vberric : 1; unsigned int srpic : 1; unsigned int vbustic : 1; unsigned int idtic : 1; } avr32_usbb_usbstaclr_t; typedef struct avr32_usbb_usbstaset_t { unsigned int :22; unsigned int vbusrqs : 1; unsigned int : 1; unsigned int stois : 1; unsigned int hnperris : 1; unsigned int roleexis : 1; unsigned int bcerris : 1; unsigned int vberris : 1; unsigned int srpis : 1; unsigned int vbustis : 1; unsigned int idtis : 1; } avr32_usbb_usbstaset_t; typedef struct avr32_usbb_uatst1_t { unsigned int loadsofcnt : 1; unsigned int sofcntmax : 7; unsigned int loadcntb : 1; unsigned int : 1; unsigned int counterb : 6; unsigned int loadcnta : 1; unsigned int countera :15; } avr32_usbb_uatst1_t; typedef struct avr32_usbb_uatst2_t { unsigned int :23; unsigned int utmireset : 1; unsigned int forcehsresetto50ms : 1; unsigned int hosthsdisconnectdisable : 1; unsigned int bypassdpll : 1; unsigned int forcesuspendmto1 : 1; unsigned int disbalegatedclock : 1; unsigned int loopbackmode : 1; unsigned int hsserialmode : 1; unsigned int fulldetachen : 1; } avr32_usbb_uatst2_t; typedef struct avr32_usbb_uvers_t { unsigned int :13; unsigned int metal_fix_num : 3; unsigned int version_num :16; } avr32_usbb_uvers_t; typedef struct avr32_usbb_ufeatures_t { unsigned int en_high_bd_iso_ept_15 : 1; unsigned int en_high_bd_iso_ept_14 : 1; unsigned int en_high_bd_iso_ept_13 : 1; unsigned int en_high_bd_iso_ept_12 : 1; unsigned int en_high_bd_iso_ept_11 : 1; unsigned int en_high_bd_iso_ept_10 : 1; unsigned int en_high_bd_iso_ept_9 : 1; unsigned int en_high_bd_iso_ept_8 : 1; unsigned int en_high_bd_iso_ept_7 : 1; unsigned int en_high_bd_iso_ept_6 : 1; unsigned int en_high_bd_iso_ept_5 : 1; unsigned int en_high_bd_iso_ept_4 : 1; unsigned int en_high_bd_iso_ept_3 : 1; unsigned int en_high_bd_iso_ept_2 : 1; unsigned int en_high_bd_iso_ept_1 : 1; unsigned int data_bus_8_16 : 1; unsigned int byte_write_dpram : 1; unsigned int fifo_max_size : 3; unsigned int dma_fifo_word_depth : 4; unsigned int dma_buffer_size : 1; unsigned int dma_channel_nbr : 3; unsigned int ept_nbr_max : 4; } avr32_usbb_ufeatures_t; typedef struct avr32_usbb_usbfsm_t { unsigned int :28; unsigned int drdstate : 4; } avr32_usbb_usbfsm_t; typedef struct avr32_usbb_t { union { unsigned long udcon ;//0x0000 avr32_usbb_udcon_t UDCON ; }; union { const unsigned long udint ;//0x0004 const avr32_usbb_udint_t UDINT ; }; union { unsigned long udintclr ;//0x0008 avr32_usbb_udintclr_t UDINTCLR ; }; union { unsigned long udintset ;//0x000c avr32_usbb_udintset_t UDINTSET ; }; union { const unsigned long udinte ;//0x0010 const avr32_usbb_udinte_t UDINTE ; }; union { unsigned long udinteclr ;//0x0014 avr32_usbb_udinteclr_t UDINTECLR ; }; union { unsigned long udinteset ;//0x0018 avr32_usbb_udinteset_t UDINTESET ; }; union { unsigned long uerst ;//0x001c avr32_usbb_uerst_t UERST ; }; union { const unsigned long udfnum ;//0x0020 const avr32_usbb_udfnum_t UDFNUM ; }; union { unsigned long udtst1 ;//0x0024 avr32_usbb_udtst1_t UDTST1 ; }; union { unsigned long udtst2 ;//0x0028 avr32_usbb_udtst2_t UDTST2 ; }; const unsigned long udvers ;//0x002c union { const unsigned long udfeatures;//0x0030 const avr32_usbb_udfeatures_t UDFEATURES; }; const unsigned long udaddrsize;//0x0034 const unsigned long udname1 ;//0x0038 const unsigned long udname2 ;//0x003c unsigned int :32 ;//0x0040 unsigned int :32 ;//0x0044 unsigned int :32 ;//0x0048 unsigned int :32 ;//0x004c unsigned int :32 ;//0x0050 unsigned int :32 ;//0x0054 unsigned int :32 ;//0x0058 unsigned int :32 ;//0x005c unsigned int :32 ;//0x0060 unsigned int :32 ;//0x0064 unsigned int :32 ;//0x0068 unsigned int :32 ;//0x006c unsigned int :32 ;//0x0070 unsigned int :32 ;//0x0074 unsigned int :32 ;//0x0078 unsigned int :32 ;//0x007c unsigned int :32 ;//0x0080 unsigned int :32 ;//0x0084 unsigned int :32 ;//0x0088 unsigned int :32 ;//0x008c unsigned int :32 ;//0x0090 unsigned int :32 ;//0x0094 unsigned int :32 ;//0x0098 unsigned int :32 ;//0x009c unsigned int :32 ;//0x00a0 unsigned int :32 ;//0x00a4 unsigned int :32 ;//0x00a8 unsigned int :32 ;//0x00ac unsigned int :32 ;//0x00b0 unsigned int :32 ;//0x00b4 unsigned int :32 ;//0x00b8 unsigned int :32 ;//0x00bc unsigned int :32 ;//0x00c0 unsigned int :32 ;//0x00c4 unsigned int :32 ;//0x00c8 unsigned int :32 ;//0x00cc unsigned int :32 ;//0x00d0 unsigned int :32 ;//0x00d4 unsigned int :32 ;//0x00d8 unsigned int :32 ;//0x00dc unsigned int :32 ;//0x00e0 unsigned int :32 ;//0x00e4 unsigned int :32 ;//0x00e8 unsigned int :32 ;//0x00ec unsigned int :32 ;//0x00f0 unsigned int :32 ;//0x00f4 unsigned int :32 ;//0x00f8 unsigned int :32 ;//0x00fc union { unsigned long uecfg0 ;//0x0100 avr32_usbb_uecfg0_t UECFG0 ; }; union { unsigned long uecfg1 ;//0x0104 avr32_usbb_uecfg1_t UECFG1 ; }; union { unsigned long uecfg2 ;//0x0108 avr32_usbb_uecfg2_t UECFG2 ; }; union { unsigned long uecfg3 ;//0x010c avr32_usbb_uecfg3_t UECFG3 ; }; union { unsigned long uecfg4 ;//0x0110 avr32_usbb_uecfg4_t UECFG4 ; }; union { unsigned long uecfg5 ;//0x0114 avr32_usbb_uecfg5_t UECFG5 ; }; union { unsigned long uecfg6 ;//0x0118 avr32_usbb_uecfg6_t UECFG6 ; }; unsigned int :32 ;//0x011c unsigned int :32 ;//0x0120 unsigned int :32 ;//0x0124 unsigned int :32 ;//0x0128 unsigned int :32 ;//0x012c union { const unsigned long uesta0 ;//0x0130 const avr32_usbb_uesta0_t UESTA0 ; }; union { const unsigned long uesta1 ;//0x0134 const avr32_usbb_uesta1_t UESTA1 ; }; union { const unsigned long uesta2 ;//0x0138 const avr32_usbb_uesta2_t UESTA2 ; }; union { const unsigned long uesta3 ;//0x013c const avr32_usbb_uesta3_t UESTA3 ; }; union { const unsigned long uesta4 ;//0x0140 const avr32_usbb_uesta4_t UESTA4 ; }; union { const unsigned long uesta5 ;//0x0144 const avr32_usbb_uesta5_t UESTA5 ; }; union { const unsigned long uesta6 ;//0x0148 const avr32_usbb_uesta6_t UESTA6 ; }; unsigned int :32 ;//0x014c unsigned int :32 ;//0x0150 unsigned int :32 ;//0x0154 unsigned int :32 ;//0x0158 unsigned int :32 ;//0x015c union { unsigned long uesta0clr ;//0x0160 avr32_usbb_uesta0clr_t UESTA0CLR ; }; union { unsigned long uesta1clr ;//0x0164 avr32_usbb_uesta1clr_t UESTA1CLR ; }; union { unsigned long uesta2clr ;//0x0168 avr32_usbb_uesta2clr_t UESTA2CLR ; }; union { unsigned long uesta3clr ;//0x016c avr32_usbb_uesta3clr_t UESTA3CLR ; }; union { unsigned long uesta4clr ;//0x0170 avr32_usbb_uesta4clr_t UESTA4CLR ; }; union { unsigned long uesta5clr ;//0x0174 avr32_usbb_uesta5clr_t UESTA5CLR ; }; union { unsigned long uesta6clr ;//0x0178 avr32_usbb_uesta6clr_t UESTA6CLR ; }; unsigned int :32 ;//0x017c unsigned int :32 ;//0x0180 unsigned int :32 ;//0x0184 unsigned int :32 ;//0x0188 unsigned int :32 ;//0x018c union { unsigned long uesta0set ;//0x0190 avr32_usbb_uesta0set_t UESTA0SET ; }; union { unsigned long uesta1set ;//0x0194 avr32_usbb_uesta1set_t UESTA1SET ; }; union { unsigned long uesta2set ;//0x0198 avr32_usbb_uesta2set_t UESTA2SET ; }; union { unsigned long uesta3set ;//0x019c avr32_usbb_uesta3set_t UESTA3SET ; }; union { unsigned long uesta4set ;//0x01a0 avr32_usbb_uesta4set_t UESTA4SET ; }; union { unsigned long uesta5set ;//0x01a4 avr32_usbb_uesta5set_t UESTA5SET ; }; union { unsigned long uesta6set ;//0x01a8 avr32_usbb_uesta6set_t UESTA6SET ; }; unsigned int :32 ;//0x01ac unsigned int :32 ;//0x01b0 unsigned int :32 ;//0x01b4 unsigned int :32 ;//0x01b8 unsigned int :32 ;//0x01bc union { const unsigned long uecon0 ;//0x01c0 const avr32_usbb_uecon0_t UECON0 ; }; union { const unsigned long uecon1 ;//0x01c4 const avr32_usbb_uecon1_t UECON1 ; }; union { const unsigned long uecon2 ;//0x01c8 const avr32_usbb_uecon2_t UECON2 ; }; union { const unsigned long uecon3 ;//0x01cc const avr32_usbb_uecon3_t UECON3 ; }; union { const unsigned long uecon4 ;//0x01d0 const avr32_usbb_uecon4_t UECON4 ; }; union { const unsigned long uecon5 ;//0x01d4 const avr32_usbb_uecon5_t UECON5 ; }; union { const unsigned long uecon6 ;//0x01d8 const avr32_usbb_uecon6_t UECON6 ; }; unsigned int :32 ;//0x01dc unsigned int :32 ;//0x01e0 unsigned int :32 ;//0x01e4 unsigned int :32 ;//0x01e8 unsigned int :32 ;//0x01ec union { unsigned long uecon0set ;//0x01f0 avr32_usbb_uecon0set_t UECON0SET ; }; union { unsigned long uecon1set ;//0x01f4 avr32_usbb_uecon1set_t UECON1SET ; }; union { unsigned long uecon2set ;//0x01f8 avr32_usbb_uecon2set_t UECON2SET ; }; union { unsigned long uecon3set ;//0x01fc avr32_usbb_uecon3set_t UECON3SET ; }; union { unsigned long uecon4set ;//0x0200 avr32_usbb_uecon4set_t UECON4SET ; }; union { unsigned long uecon5set ;//0x0204 avr32_usbb_uecon5set_t UECON5SET ; }; union { unsigned long uecon6set ;//0x0208 avr32_usbb_uecon6set_t UECON6SET ; }; unsigned int :32 ;//0x020c unsigned int :32 ;//0x0210 unsigned int :32 ;//0x0214 unsigned int :32 ;//0x0218 unsigned int :32 ;//0x021c union { unsigned long uecon0clr ;//0x0220 avr32_usbb_uecon0clr_t UECON0CLR ; }; union { unsigned long uecon1clr ;//0x0224 avr32_usbb_uecon1clr_t UECON1CLR ; }; union { unsigned long uecon2clr ;//0x0228 avr32_usbb_uecon2clr_t UECON2CLR ; }; union { unsigned long uecon3clr ;//0x022c avr32_usbb_uecon3clr_t UECON3CLR ; }; union { unsigned long uecon4clr ;//0x0230 avr32_usbb_uecon4clr_t UECON4CLR ; }; union { unsigned long uecon5clr ;//0x0234 avr32_usbb_uecon5clr_t UECON5CLR ; }; union { unsigned long uecon6clr ;//0x0238 avr32_usbb_uecon6clr_t UECON6CLR ; }; unsigned int :32 ;//0x023c unsigned int :32 ;//0x0240 unsigned int :32 ;//0x0244 unsigned int :32 ;//0x0248 unsigned int :32 ;//0x024c unsigned long uedat0 ;//0x0250 unsigned long uedat1 ;//0x0254 unsigned long uedat2 ;//0x0258 unsigned long uedat3 ;//0x025c unsigned long uedat4 ;//0x0260 unsigned long uedat5 ;//0x0264 unsigned long uedat6 ;//0x0268 unsigned int :32 ;//0x026c unsigned int :32 ;//0x0270 unsigned int :32 ;//0x0274 unsigned int :32 ;//0x0278 unsigned int :32 ;//0x027c unsigned int :32 ;//0x0280 unsigned int :32 ;//0x0284 unsigned int :32 ;//0x0288 unsigned int :32 ;//0x028c unsigned int :32 ;//0x0290 unsigned int :32 ;//0x0294 unsigned int :32 ;//0x0298 unsigned int :32 ;//0x029c unsigned int :32 ;//0x02a0 unsigned int :32 ;//0x02a4 unsigned int :32 ;//0x02a8 unsigned int :32 ;//0x02ac unsigned int :32 ;//0x02b0 unsigned int :32 ;//0x02b4 unsigned int :32 ;//0x02b8 unsigned int :32 ;//0x02bc unsigned int :32 ;//0x02c0 unsigned int :32 ;//0x02c4 unsigned int :32 ;//0x02c8 unsigned int :32 ;//0x02cc unsigned int :32 ;//0x02d0 unsigned int :32 ;//0x02d4 unsigned int :32 ;//0x02d8 unsigned int :32 ;//0x02dc unsigned int :32 ;//0x02e0 unsigned int :32 ;//0x02e4 unsigned int :32 ;//0x02e8 unsigned int :32 ;//0x02ec unsigned int :32 ;//0x02f0 unsigned int :32 ;//0x02f4 unsigned int :32 ;//0x02f8 unsigned int :32 ;//0x02fc unsigned int :32 ;//0x0300 unsigned int :32 ;//0x0304 unsigned int :32 ;//0x0308 unsigned int :32 ;//0x030c union { unsigned long uddma1_nextdesc;//0x0310 avr32_usbb_uddma1_nextdesc_t UDDMA1_NEXTDESC; }; unsigned long uddma1_addr;//0x0314 union { unsigned long uddma1_control;//0x0318 avr32_usbb_uddma1_control_t UDDMA1_CONTROL; }; union { unsigned long uddma1_status;//0x031c avr32_usbb_uddma1_status_t UDDMA1_STATUS; }; union { unsigned long uddma2_nextdesc;//0x0320 avr32_usbb_uddma2_nextdesc_t UDDMA2_NEXTDESC; }; unsigned long uddma2_addr;//0x0324 union { unsigned long uddma2_control;//0x0328 avr32_usbb_uddma2_control_t UDDMA2_CONTROL; }; union { unsigned long uddma2_status;//0x032c avr32_usbb_uddma2_status_t UDDMA2_STATUS; }; union { unsigned long uddma3_nextdesc;//0x0330 avr32_usbb_uddma3_nextdesc_t UDDMA3_NEXTDESC; }; unsigned long uddma3_addr;//0x0334 union { unsigned long uddma3_control;//0x0338 avr32_usbb_uddma3_control_t UDDMA3_CONTROL; }; union { unsigned long uddma3_status;//0x033c avr32_usbb_uddma3_status_t UDDMA3_STATUS; }; union { unsigned long uddma4_nextdesc;//0x0340 avr32_usbb_uddma4_nextdesc_t UDDMA4_NEXTDESC; }; unsigned long uddma4_addr;//0x0344 union { unsigned long uddma4_control;//0x0348 avr32_usbb_uddma4_control_t UDDMA4_CONTROL; }; union { unsigned long uddma4_status;//0x034c avr32_usbb_uddma4_status_t UDDMA4_STATUS; }; union { unsigned long uddma5_nextdesc;//0x0350 avr32_usbb_uddma5_nextdesc_t UDDMA5_NEXTDESC; }; unsigned long uddma5_addr;//0x0354 union { unsigned long uddma5_control;//0x0358 avr32_usbb_uddma5_control_t UDDMA5_CONTROL; }; union { unsigned long uddma5_status;//0x035c avr32_usbb_uddma5_status_t UDDMA5_STATUS; }; union { unsigned long uddma6_nextdesc;//0x0360 avr32_usbb_uddma6_nextdesc_t UDDMA6_NEXTDESC; }; unsigned long uddma6_addr;//0x0364 union { unsigned long uddma6_control;//0x0368 avr32_usbb_uddma6_control_t UDDMA6_CONTROL; }; union { unsigned long uddma6_status;//0x036c avr32_usbb_uddma6_status_t UDDMA6_STATUS; }; unsigned int :32 ;//0x0370 unsigned int :32 ;//0x0374 unsigned int :32 ;//0x0378 unsigned int :32 ;//0x037c unsigned int :32 ;//0x0380 unsigned int :32 ;//0x0384 unsigned int :32 ;//0x0388 unsigned int :32 ;//0x038c unsigned int :32 ;//0x0390 unsigned int :32 ;//0x0394 unsigned int :32 ;//0x0398 unsigned int :32 ;//0x039c unsigned int :32 ;//0x03a0 unsigned int :32 ;//0x03a4 unsigned int :32 ;//0x03a8 unsigned int :32 ;//0x03ac unsigned int :32 ;//0x03b0 unsigned int :32 ;//0x03b4 unsigned int :32 ;//0x03b8 unsigned int :32 ;//0x03bc unsigned int :32 ;//0x03c0 unsigned int :32 ;//0x03c4 unsigned int :32 ;//0x03c8 unsigned int :32 ;//0x03cc unsigned int :32 ;//0x03d0 unsigned int :32 ;//0x03d4 unsigned int :32 ;//0x03d8 unsigned int :32 ;//0x03dc unsigned int :32 ;//0x03e0 unsigned int :32 ;//0x03e4 unsigned int :32 ;//0x03e8 unsigned int :32 ;//0x03ec unsigned int :32 ;//0x03f0 unsigned int :32 ;//0x03f4 unsigned int :32 ;//0x03f8 unsigned int :32 ;//0x03fc union { unsigned long uhcon ;//0x0400 avr32_usbb_uhcon_t UHCON ; }; union { const unsigned long uhint ;//0x0404 const avr32_usbb_uhint_t UHINT ; }; union { unsigned long uhintclr ;//0x0408 avr32_usbb_uhintclr_t UHINTCLR ; }; union { unsigned long uhintset ;//0x040c avr32_usbb_uhintset_t UHINTSET ; }; union { const unsigned long uhinte ;//0x0410 const avr32_usbb_uhinte_t UHINTE ; }; union { unsigned long uhinteclr ;//0x0414 avr32_usbb_uhinteclr_t UHINTECLR ; }; union { unsigned long uhinteset ;//0x0418 avr32_usbb_uhinteset_t UHINTESET ; }; union { unsigned long uprst ;//0x041c avr32_usbb_uprst_t UPRST ; }; union { unsigned long uhfnum ;//0x0420 avr32_usbb_uhfnum_t UHFNUM ; }; union { unsigned long uhaddr1 ;//0x0424 avr32_usbb_uhaddr1_t UHADDR1 ; }; union { unsigned long uhaddr2 ;//0x0428 avr32_usbb_uhaddr2_t UHADDR2 ; }; union { unsigned long uhaddr3 ;//0x042c avr32_usbb_uhaddr3_t UHADDR3 ; }; unsigned int :32 ;//0x0430 unsigned int :32 ;//0x0434 unsigned int :32 ;//0x0438 unsigned int :32 ;//0x043c unsigned int :32 ;//0x0440 unsigned int :32 ;//0x0444 unsigned int :32 ;//0x0448 unsigned int :32 ;//0x044c unsigned int :32 ;//0x0450 unsigned int :32 ;//0x0454 unsigned int :32 ;//0x0458 unsigned int :32 ;//0x045c unsigned int :32 ;//0x0460 unsigned int :32 ;//0x0464 unsigned int :32 ;//0x0468 unsigned int :32 ;//0x046c unsigned int :32 ;//0x0470 unsigned int :32 ;//0x0474 unsigned int :32 ;//0x0478 unsigned int :32 ;//0x047c unsigned int :32 ;//0x0480 unsigned int :32 ;//0x0484 unsigned int :32 ;//0x0488 unsigned int :32 ;//0x048c unsigned int :32 ;//0x0490 unsigned int :32 ;//0x0494 unsigned int :32 ;//0x0498 unsigned int :32 ;//0x049c unsigned int :32 ;//0x04a0 unsigned int :32 ;//0x04a4 unsigned int :32 ;//0x04a8 unsigned int :32 ;//0x04ac unsigned int :32 ;//0x04b0 unsigned int :32 ;//0x04b4 unsigned int :32 ;//0x04b8 unsigned int :32 ;//0x04bc unsigned int :32 ;//0x04c0 unsigned int :32 ;//0x04c4 unsigned int :32 ;//0x04c8 unsigned int :32 ;//0x04cc unsigned int :32 ;//0x04d0 unsigned int :32 ;//0x04d4 unsigned int :32 ;//0x04d8 unsigned int :32 ;//0x04dc unsigned int :32 ;//0x04e0 unsigned int :32 ;//0x04e4 unsigned int :32 ;//0x04e8 unsigned int :32 ;//0x04ec unsigned int :32 ;//0x04f0 unsigned int :32 ;//0x04f4 unsigned int :32 ;//0x04f8 unsigned int :32 ;//0x04fc union { unsigned long upcfg0 ;//0x0500 avr32_usbb_upcfg0_t UPCFG0 ; }; union { unsigned long upcfg1 ;//0x0504 avr32_usbb_upcfg1_t UPCFG1 ; }; union { unsigned long upcfg2 ;//0x0508 avr32_usbb_upcfg2_t UPCFG2 ; }; union { unsigned long upcfg3 ;//0x050c avr32_usbb_upcfg3_t UPCFG3 ; }; union { unsigned long upcfg4 ;//0x0510 avr32_usbb_upcfg4_t UPCFG4 ; }; union { unsigned long upcfg5 ;//0x0514 avr32_usbb_upcfg5_t UPCFG5 ; }; union { unsigned long upcfg6 ;//0x0518 avr32_usbb_upcfg6_t UPCFG6 ; }; unsigned int :32 ;//0x051c unsigned int :32 ;//0x0520 unsigned int :32 ;//0x0524 unsigned int :32 ;//0x0528 unsigned int :32 ;//0x052c union { const unsigned long upsta0 ;//0x0530 const avr32_usbb_upsta0_t UPSTA0 ; }; union { const unsigned long upsta1 ;//0x0534 const avr32_usbb_upsta1_t UPSTA1 ; }; union { const unsigned long upsta2 ;//0x0538 const avr32_usbb_upsta2_t UPSTA2 ; }; union { const unsigned long upsta3 ;//0x053c const avr32_usbb_upsta3_t UPSTA3 ; }; union { const unsigned long upsta4 ;//0x0540 const avr32_usbb_upsta4_t UPSTA4 ; }; union { const unsigned long upsta5 ;//0x0544 const avr32_usbb_upsta5_t UPSTA5 ; }; union { const unsigned long upsta6 ;//0x0548 const avr32_usbb_upsta6_t UPSTA6 ; }; unsigned int :32 ;//0x054c unsigned int :32 ;//0x0550 unsigned int :32 ;//0x0554 unsigned int :32 ;//0x0558 unsigned int :32 ;//0x055c union { unsigned long upsta0clr ;//0x0560 avr32_usbb_upsta0clr_t UPSTA0CLR ; }; union { unsigned long upsta1clr ;//0x0564 avr32_usbb_upsta1clr_t UPSTA1CLR ; }; union { unsigned long upsta2clr ;//0x0568 avr32_usbb_upsta2clr_t UPSTA2CLR ; }; union { unsigned long upsta3clr ;//0x056c avr32_usbb_upsta3clr_t UPSTA3CLR ; }; union { unsigned long upsta4clr ;//0x0570 avr32_usbb_upsta4clr_t UPSTA4CLR ; }; union { unsigned long upsta5clr ;//0x0574 avr32_usbb_upsta5clr_t UPSTA5CLR ; }; union { unsigned long upsta6clr ;//0x0578 avr32_usbb_upsta6clr_t UPSTA6CLR ; }; unsigned int :32 ;//0x057c unsigned int :32 ;//0x0580 unsigned int :32 ;//0x0584 unsigned int :32 ;//0x0588 unsigned int :32 ;//0x058c union { unsigned long upsta0set ;//0x0590 avr32_usbb_upsta0set_t UPSTA0SET ; }; union { unsigned long upsta1set ;//0x0594 avr32_usbb_upsta1set_t UPSTA1SET ; }; union { unsigned long upsta2set ;//0x0598 avr32_usbb_upsta2set_t UPSTA2SET ; }; union { unsigned long upsta3set ;//0x059c avr32_usbb_upsta3set_t UPSTA3SET ; }; union { unsigned long upsta4set ;//0x05a0 avr32_usbb_upsta4set_t UPSTA4SET ; }; union { unsigned long upsta5set ;//0x05a4 avr32_usbb_upsta5set_t UPSTA5SET ; }; union { unsigned long upsta6set ;//0x05a8 avr32_usbb_upsta6set_t UPSTA6SET ; }; unsigned int :32 ;//0x05ac unsigned int :32 ;//0x05b0 unsigned int :32 ;//0x05b4 unsigned int :32 ;//0x05b8 unsigned int :32 ;//0x05bc union { const unsigned long upcon0 ;//0x05c0 const avr32_usbb_upcon0_t UPCON0 ; }; union { const unsigned long upcon1 ;//0x05c4 const avr32_usbb_upcon1_t UPCON1 ; }; union { const unsigned long upcon2 ;//0x05c8 const avr32_usbb_upcon2_t UPCON2 ; }; union { const unsigned long upcon3 ;//0x05cc const avr32_usbb_upcon3_t UPCON3 ; }; union { const unsigned long upcon4 ;//0x05d0 const avr32_usbb_upcon4_t UPCON4 ; }; union { const unsigned long upcon5 ;//0x05d4 const avr32_usbb_upcon5_t UPCON5 ; }; union { const unsigned long upcon6 ;//0x05d8 const avr32_usbb_upcon6_t UPCON6 ; }; unsigned int :32 ;//0x05dc unsigned int :32 ;//0x05e0 unsigned int :32 ;//0x05e4 unsigned int :32 ;//0x05e8 unsigned int :32 ;//0x05ec union { unsigned long upcon0set ;//0x05f0 avr32_usbb_upcon0set_t UPCON0SET ; }; union { unsigned long upcon1set ;//0x05f4 avr32_usbb_upcon1set_t UPCON1SET ; }; union { unsigned long upcon2set ;//0x05f8 avr32_usbb_upcon2set_t UPCON2SET ; }; union { unsigned long upcon3set ;//0x05fc avr32_usbb_upcon3set_t UPCON3SET ; }; union { unsigned long upcon4set ;//0x0600 avr32_usbb_upcon4set_t UPCON4SET ; }; union { unsigned long upcon5set ;//0x0604 avr32_usbb_upcon5set_t UPCON5SET ; }; union { unsigned long upcon6set ;//0x0608 avr32_usbb_upcon6set_t UPCON6SET ; }; unsigned int :32 ;//0x060c unsigned int :32 ;//0x0610 unsigned int :32 ;//0x0614 unsigned int :32 ;//0x0618 unsigned int :32 ;//0x061c union { unsigned long upcon0clr ;//0x0620 avr32_usbb_upcon0clr_t UPCON0CLR ; }; union { unsigned long upcon1clr ;//0x0624 avr32_usbb_upcon1clr_t UPCON1CLR ; }; union { unsigned long upcon2clr ;//0x0628 avr32_usbb_upcon2clr_t UPCON2CLR ; }; union { unsigned long upcon3clr ;//0x062c avr32_usbb_upcon3clr_t UPCON3CLR ; }; union { unsigned long upcon4clr ;//0x0630 avr32_usbb_upcon4clr_t UPCON4CLR ; }; union { unsigned long upcon5clr ;//0x0634 avr32_usbb_upcon5clr_t UPCON5CLR ; }; union { unsigned long upcon6clr ;//0x0638 avr32_usbb_upcon6clr_t UPCON6CLR ; }; unsigned int :32 ;//0x063c unsigned int :32 ;//0x0640 unsigned int :32 ;//0x0644 unsigned int :32 ;//0x0648 unsigned int :32 ;//0x064c union { unsigned long upinrq0 ;//0x0650 avr32_usbb_upinrq0_t UPINRQ0 ; }; union { unsigned long upinrq1 ;//0x0654 avr32_usbb_upinrq1_t UPINRQ1 ; }; union { unsigned long upinrq2 ;//0x0658 avr32_usbb_upinrq2_t UPINRQ2 ; }; union { unsigned long upinrq3 ;//0x065c avr32_usbb_upinrq3_t UPINRQ3 ; }; union { unsigned long upinrq4 ;//0x0660 avr32_usbb_upinrq4_t UPINRQ4 ; }; union { unsigned long upinrq5 ;//0x0664 avr32_usbb_upinrq5_t UPINRQ5 ; }; union { unsigned long upinrq6 ;//0x0668 avr32_usbb_upinrq6_t UPINRQ6 ; }; unsigned int :32 ;//0x066c unsigned int :32 ;//0x0670 unsigned int :32 ;//0x0674 unsigned int :32 ;//0x0678 unsigned int :32 ;//0x067c union { unsigned long uperr0 ;//0x0680 avr32_usbb_uperr0_t UPERR0 ; }; union { unsigned long uperr1 ;//0x0684 avr32_usbb_uperr1_t UPERR1 ; }; union { unsigned long uperr2 ;//0x0688 avr32_usbb_uperr2_t UPERR2 ; }; union { unsigned long uperr3 ;//0x068c avr32_usbb_uperr3_t UPERR3 ; }; union { unsigned long uperr4 ;//0x0690 avr32_usbb_uperr4_t UPERR4 ; }; union { unsigned long uperr5 ;//0x0694 avr32_usbb_uperr5_t UPERR5 ; }; union { unsigned long uperr6 ;//0x0698 avr32_usbb_uperr6_t UPERR6 ; }; unsigned int :32 ;//0x069c unsigned int :32 ;//0x06a0 unsigned int :32 ;//0x06a4 unsigned int :32 ;//0x06a8 unsigned int :32 ;//0x06ac unsigned long updat0 ;//0x06b0 unsigned long updat1 ;//0x06b4 unsigned long updat2 ;//0x06b8 unsigned long updat3 ;//0x06bc unsigned long updat4 ;//0x06c0 unsigned long updat5 ;//0x06c4 unsigned long updat6 ;//0x06c8 unsigned int :32 ;//0x06cc unsigned int :32 ;//0x06d0 unsigned int :32 ;//0x06d4 unsigned int :32 ;//0x06d8 unsigned int :32 ;//0x06dc unsigned int :32 ;//0x06e0 unsigned int :32 ;//0x06e4 unsigned int :32 ;//0x06e8 unsigned int :32 ;//0x06ec unsigned int :32 ;//0x06f0 unsigned int :32 ;//0x06f4 unsigned int :32 ;//0x06f8 unsigned int :32 ;//0x06fc unsigned int :32 ;//0x0700 unsigned int :32 ;//0x0704 unsigned int :32 ;//0x0708 unsigned int :32 ;//0x070c union { unsigned long uhdma1_nextdesc;//0x0710 avr32_usbb_uhdma1_nextdesc_t UHDMA1_NEXTDESC; }; unsigned long uhdma1_addr;//0x0714 union { unsigned long uhdma1_control;//0x0718 avr32_usbb_uhdma1_control_t UHDMA1_CONTROL; }; union { unsigned long uhdma1_status;//0x071c avr32_usbb_uhdma1_status_t UHDMA1_STATUS; }; union { unsigned long uhdma2_nextdesc;//0x0720 avr32_usbb_uhdma2_nextdesc_t UHDMA2_NEXTDESC; }; unsigned long uhdma2_addr;//0x0724 union { unsigned long uhdma2_control;//0x0728 avr32_usbb_uhdma2_control_t UHDMA2_CONTROL; }; union { unsigned long uhdma2_status;//0x072c avr32_usbb_uhdma2_status_t UHDMA2_STATUS; }; union { unsigned long uhdma3_nextdesc;//0x0730 avr32_usbb_uhdma3_nextdesc_t UHDMA3_NEXTDESC; }; unsigned long uhdma3_addr;//0x0734 union { unsigned long uhdma3_control;//0x0738 avr32_usbb_uhdma3_control_t UHDMA3_CONTROL; }; union { unsigned long uhdma3_status;//0x073c avr32_usbb_uhdma3_status_t UHDMA3_STATUS; }; union { unsigned long uhdma4_nextdesc;//0x0740 avr32_usbb_uhdma4_nextdesc_t UHDMA4_NEXTDESC; }; unsigned long uhdma4_addr;//0x0744 union { unsigned long uhdma4_control;//0x0748 avr32_usbb_uhdma4_control_t UHDMA4_CONTROL; }; union { unsigned long uhdma4_status;//0x074c avr32_usbb_uhdma4_status_t UHDMA4_STATUS; }; union { unsigned long uhdma5_nextdesc;//0x0750 avr32_usbb_uhdma5_nextdesc_t UHDMA5_NEXTDESC; }; unsigned long uhdma5_addr;//0x0754 union { unsigned long uhdma5_control;//0x0758 avr32_usbb_uhdma5_control_t UHDMA5_CONTROL; }; union { unsigned long uhdma5_status;//0x075c avr32_usbb_uhdma5_status_t UHDMA5_STATUS; }; union { unsigned long uhdma6_nextdesc;//0x0760 avr32_usbb_uhdma6_nextdesc_t UHDMA6_NEXTDESC; }; unsigned long uhdma6_addr;//0x0764 union { unsigned long uhdma6_control;//0x0768 avr32_usbb_uhdma6_control_t UHDMA6_CONTROL; }; union { unsigned long uhdma6_status;//0x076c avr32_usbb_uhdma6_status_t UHDMA6_STATUS; }; unsigned int :32 ;//0x0770 unsigned int :32 ;//0x0774 unsigned int :32 ;//0x0778 unsigned int :32 ;//0x077c unsigned int :32 ;//0x0780 unsigned int :32 ;//0x0784 unsigned int :32 ;//0x0788 unsigned int :32 ;//0x078c unsigned int :32 ;//0x0790 unsigned int :32 ;//0x0794 unsigned int :32 ;//0x0798 unsigned int :32 ;//0x079c unsigned int :32 ;//0x07a0 unsigned int :32 ;//0x07a4 unsigned int :32 ;//0x07a8 unsigned int :32 ;//0x07ac unsigned int :32 ;//0x07b0 unsigned int :32 ;//0x07b4 unsigned int :32 ;//0x07b8 unsigned int :32 ;//0x07bc unsigned int :32 ;//0x07c0 unsigned int :32 ;//0x07c4 unsigned int :32 ;//0x07c8 unsigned int :32 ;//0x07cc unsigned int :32 ;//0x07d0 unsigned int :32 ;//0x07d4 unsigned int :32 ;//0x07d8 unsigned int :32 ;//0x07dc unsigned int :32 ;//0x07e0 unsigned int :32 ;//0x07e4 unsigned int :32 ;//0x07e8 unsigned int :32 ;//0x07ec unsigned int :32 ;//0x07f0 unsigned int :32 ;//0x07f4 unsigned int :32 ;//0x07f8 unsigned int :32 ;//0x07fc union { unsigned long usbcon ;//0x0800 avr32_usbb_usbcon_t USBCON ; }; union { const unsigned long usbsta ;//0x0804 const avr32_usbb_usbsta_t USBSTA ; }; union { unsigned long usbstaclr ;//0x0808 avr32_usbb_usbstaclr_t USBSTACLR ; }; union { unsigned long usbstaset ;//0x080c avr32_usbb_usbstaset_t USBSTASET ; }; union { unsigned long uatst1 ;//0x0810 avr32_usbb_uatst1_t UATST1 ; }; union { unsigned long uatst2 ;//0x0814 avr32_usbb_uatst2_t UATST2 ; }; union { const unsigned long uvers ;//0x0818 const avr32_usbb_uvers_t UVERS ; }; union { const unsigned long ufeatures ;//0x081c const avr32_usbb_ufeatures_t UFEATURES ; }; const unsigned long uaddrsize ;//0x0820 const unsigned long uname1 ;//0x0824 const unsigned long uname2 ;//0x0828 union { const unsigned long usbfsm ;//0x082c const avr32_usbb_usbfsm_t USBFSM ; }; } avr32_usbb_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif /*#ifdef AVR32_USBB_310_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/avr32/wdt_230.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 : UC3000 * Revision : $Revision: 74772 $ * Checkin Date : $Date: 2010-05-14 06:51:12 +0200 (Fri, 14 May 2010) $ * ****************************************************************************/ #ifndef AVR32_WDT_230_H_INCLUDED #define AVR32_WDT_230_H_INCLUDED #define AVR32_WDT_H_VERSION 230 #include "avr32/abi.h" /* Note to user: The following defines are always generated: - Register offset: AVR32_WDT_ - Bitfield mask: AVR32_WDT__ - Bitfield offset: AVR32_WDT___OFFSET - Bitfield size: AVR32_WDT___SIZE - Bitfield values: AVR32_WDT___ 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_WDT_ - Bitfield offset: AVR32_WDT__OFFSET - Bitfield size: AVR32_WDT__SIZE - Bitfield values: AVR32_WDT__ - Bitfield values: AVR32_WDT_ All defines are sorted alphabetically. */ #define AVR32_WDT_CLR 0x00000004 #define AVR32_WDT_CTRL 0x00000000 #define AVR32_WDT_CTRL_EN 0 #define AVR32_WDT_CTRL_EN_MASK 0x00000001 #define AVR32_WDT_CTRL_EN_OFFSET 0 #define AVR32_WDT_CTRL_EN_SIZE 1 #define AVR32_WDT_CTRL_KEY 24 #define AVR32_WDT_CTRL_KEY_MASK 0xff000000 #define AVR32_WDT_CTRL_KEY_OFFSET 24 #define AVR32_WDT_CTRL_KEY_SIZE 8 #define AVR32_WDT_CTRL_PSEL 8 #define AVR32_WDT_CTRL_PSEL_MASK 0x00001f00 #define AVR32_WDT_CTRL_PSEL_OFFSET 8 #define AVR32_WDT_CTRL_PSEL_SIZE 5 #define AVR32_WDT_EN 0 #define AVR32_WDT_EN_MASK 0x00000001 #define AVR32_WDT_EN_OFFSET 0 #define AVR32_WDT_EN_SIZE 1 #define AVR32_WDT_KEY 24 #define AVR32_WDT_KEY_MASK 0xff000000 #define AVR32_WDT_KEY_OFFSET 24 #define AVR32_WDT_KEY_SIZE 8 #define AVR32_WDT_PSEL 8 #define AVR32_WDT_PSEL_MASK 0x00001f00 #define AVR32_WDT_PSEL_OFFSET 8 #define AVR32_WDT_PSEL_SIZE 5 #define AVR32_WDT_KEY_VALUE 0x00000055 #ifdef __AVR32_ABI_COMPILER__ typedef struct avr32_wdt_ctrl_t { unsigned int key : 8; unsigned int :11; unsigned int psel : 5; unsigned int : 7; unsigned int en : 1; } avr32_wdt_ctrl_t; typedef struct avr32_wdt_t { union { unsigned long ctrl ;//0x0000 avr32_wdt_ctrl_t CTRL ; }; unsigned long clr ;//0x0004 } avr32_wdt_t; /*#ifdef __AVR32_ABI_COMPILER__*/ #endif /*#ifdef AVR32_WDT_230_H_INCLUDED*/ #endif ================================================ FILE: firmware/mock_hardware/include/board.h ================================================ #include "conf_board.h" ================================================ FILE: firmware/mock_hardware/include/compiler.h ================================================ #include #include #include #include #include "avr32/io.h" #ifndef _COMPILER_AVR32_H_ #define _COMPILER_AVR32_H_ #define COMPILER_PRAGMA(arg) #define COMPILER_PACK_SET(alignment) COMPILER_PRAGMA(pack(alignment)) #define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack()) #define COMPILER_ALIGNED(a) __attribute__((__aligned__(a))) #define COMPILER_WORD_ALIGNED __attribute__((__aligned__(4))) typedef int8_t S8; //!< 8-bit signed integer. typedef uint8_t U8; //!< 8-bit unsigned integer. typedef int16_t S16; //!< 16-bit signed integer. typedef uint16_t U16; //!< 16-bit unsigned integer. typedef uint16_t le16_t; typedef uint16_t be16_t; typedef int32_t S32; //!< 32-bit signed integer. typedef uint32_t U32; //!< 32-bit unsigned integer. typedef uint32_t le32_t; typedef uint32_t be32_t; typedef signed long long int S64; //!< 64-bit signed integer. typedef unsigned long long int U64; //!< 64-bit unsigned integer. typedef float F32; //!< 32-bit floating-point number. typedef double F64; //!< 64-bit floating-point number. typedef uint32_t iram_size_t; //! @} /*! \name Status Types */ //! @{ typedef bool Status_bool_t; //!< Boolean status. typedef U8 Status_t; //!< 8-bit-coded status. //! @} /*! \name Aliasing Aggregate Types */ //! @{ //! 16-bit union. typedef union { S16 s16; U16 u16; S8 s8[2]; U8 u8[2]; } Union16; //! 32-bit union. typedef union { S32 s32; U32 u32; S16 s16[2]; U16 u16[2]; S8 s8[4]; U8 u8[4]; } Union32; //! 64-bit union. typedef union { S64 s64; U64 u64; S32 s32[2]; U32 u32[2]; S16 s16[4]; U16 u16[4]; S8 s8[8]; U8 u8[8]; } Union64; //! Union of pointers to 64-, 32-, 16- and 8-bit unsigned integers. typedef union { S64* s64ptr; U64* u64ptr; S32* s32ptr; U32* u32ptr; S16* s16ptr; U16* u16ptr; S8* s8ptr; U8* u8ptr; } UnionPtr; //! Union of pointers to volatile 64-, 32-, 16- and 8-bit unsigned integers. typedef union { volatile S64* s64ptr; volatile U64* u64ptr; volatile S32* s32ptr; volatile U32* u32ptr; volatile S16* s16ptr; volatile U16* u16ptr; volatile S8* s8ptr; volatile U8* u8ptr; } UnionVPtr; //! Union of pointers to constant 64-, 32-, 16- and 8-bit unsigned integers. typedef union { const S64* s64ptr; const U64* u64ptr; const S32* s32ptr; const U32* u32ptr; const S16* s16ptr; const U16* u16ptr; const S8* s8ptr; const U8* u8ptr; } UnionCPtr; //! Union of pointers to constant volatile 64-, 32-, 16- and 8-bit unsigned integers. typedef union { const volatile S64* s64ptr; const volatile U64* u64ptr; const volatile S32* s32ptr; const volatile U32* u32ptr; const volatile S16* s16ptr; const volatile U16* u16ptr; const volatile S8* s8ptr; const volatile U8* u8ptr; } UnionCVPtr; //! Structure of pointers to 64-, 32-, 16- and 8-bit unsigned integers. typedef struct { S64* s64ptr; U64* u64ptr; S32* s32ptr; U32* u32ptr; S16* s16ptr; U16* u16ptr; S8* s8ptr; U8* u8ptr; } StructPtr; //! Structure of pointers to volatile 64-, 32-, 16- and 8-bit unsigned integers. typedef struct { volatile S64* s64ptr; volatile U64* u64ptr; volatile S32* s32ptr; volatile U32* u32ptr; volatile S16* s16ptr; volatile U16* u16ptr; volatile S8* s8ptr; volatile U8* u8ptr; } StructVPtr; //! Structure of pointers to constant 64-, 32-, 16- and 8-bit unsigned integers. typedef struct { const S64* s64ptr; const U64* u64ptr; const S32* s32ptr; const U32* u32ptr; const S16* s16ptr; const U16* u16ptr; const S8* s8ptr; const U8* u8ptr; } StructCPtr; //! Structure of pointers to constant volatile 64-, 32-, 16- and 8-bit unsigned integers. typedef struct { const volatile S64* s64ptr; const volatile U64* u64ptr; const volatile S32* s32ptr; const volatile U32* u32ptr; const volatile S16* s16ptr; const volatile U16* u16ptr; const volatile S8* s8ptr; const volatile U8* u8ptr; } StructCVPtr; /*! \name Usual Constants */ //! @{ #define DISABLE 0 #define ENABLE 1 #ifndef __cplusplus #if !defined(__bool_true_false_are_defined) #define false 0 #define true 1 #endif #endif #define PASS 0 #define FAIL 1 #define LOW 0 #define HIGH 1 //! @} /*! \name Mathematics * * The same considerations as for clz and ctz apply here but AVR32-GCC does not * provide built-in functions to access the assembly instructions abs, min and * max and it does not produce them by itself in most cases, so two sets of * macros are defined here: * - Abs, Min and Max to apply to constant expressions (values known at * compile time); * - abs, min and max to apply to non-constant expressions (values unknown at * compile time). */ //! @{ /*! \brief Takes the absolute value of \a a. * * \param a Input value. * * \return Absolute value of \a a. * * \note More optimized if only used with values known at compile time. */ #define Abs(a) (((a) < 0) ? -(a) : (a)) /*! \brief Takes the minimal value of \a a and \a b. * * \param a Input value. * \param b Input value. * * \return Minimal value of \a a and \a b. * * \note More optimized if only used with values known at compile time. */ #define Min(a, b) (((a) < (b)) ? (a) : (b)) /*! \brief Takes the maximal value of \a a and \a b. * * \param a Input value. * \param b Input value. * * \return Maximal value of \a a and \a b. * * \note More optimized if only used with values known at compile time. */ #define Max(a, b) (((a) > (b)) ? (a) : (b)) #define abs(a) Abs(a) #define min(a, b) Min(a, b) #define max(a, b) Max(a, b) #endif ================================================ FILE: firmware/mock_hardware/include/conf_usb_host.h ================================================ #include "compiler.h" ================================================ FILE: firmware/mock_hardware/include/delay.h ================================================ #define delay_ms(delay) #define delay_us(delay) ================================================ FILE: firmware/mock_hardware/include/flashc.h ================================================ #include #include "conf_board.h" void hardware_declareNVRAM(const void* ptr, uint32_t bytes); void hardware_declareVRAM(const void* ptr, uint32_t bytes); #define DECLARE_NVRAM(ptr, bytes) \ void declare_nvram_constructor(void) __attribute__((constructor)); \ void declare_nvram_constructor(void) \ { \ hardware_declareNVRAM(ptr, bytes); \ } #define DECLARE_VRAM(ptr, bytes) \ void declare_vram_constructor(void) __attribute__((constructor)); \ void declare_vram_constructor(void) \ { \ hardware_declareVRAM(ptr, bytes); \ } void* flashc_memset8(void* dst, uint8_t src, size_t nbytes, bool erase); void* flashc_memset16(void* dst, uint16_t src, size_t nbytes, bool erase); void* flashc_memset32(void* dst, uint32_t src, size_t nbytes, bool erase); void* flashc_memset64(void* dst, uint64_t src, size_t nbytes, bool erase); void* flashc_memcpy(void* dst, const void* src, size_t nbytes, bool erase); ================================================ FILE: firmware/mock_hardware/include/fs_com.h ================================================ ================================================ FILE: firmware/mock_hardware/include/ftdi.h ================================================ #include "types.h" #include "uhc.h" #pragma once #define FTDI_RX_BUF_SIZE 64 #define FTDI_STATUS_BYTES 2 void ftdi_read(void); void ftdi_write(u8* data, u32 bytes); void ftdi_change(uhc_device_t* dev, u8 plug); void ftdi_setup(void); u8* ftdi_rx_buf(void); volatile u8 ftdi_rx_bytes(void); volatile u8 ftdi_rx_busy(void); volatile u8 ftdi_tx_busy(void); u8 ftdi_connected(void); ================================================ FILE: firmware/mock_hardware/include/gpio.h ================================================ #include "compiler.h" bool gpio_get_pin_value(uint32_t pin); void gpio_set_gpio_pin(uint32_t pin); void gpio_clr_gpio_pin(uint32_t pin); void gpio_set_pin_high(uint32_t pin); void gpio_set_pin_low(uint32_t pin); ================================================ FILE: firmware/mock_hardware/include/intc.h ================================================ ================================================ FILE: firmware/mock_hardware/include/interrupt.h ================================================ #define cpu_irq_enable_level(level) #define cpu_irq_disable_level(level) #define cpu_irq_enable() #define irq_initialize_vectors() #define Disable_global_interrupt() #define Enable_global_interrupt() ================================================ FILE: firmware/mock_hardware/include/parts.h ================================================ ================================================ FILE: firmware/mock_hardware/include/pm.h ================================================ ================================================ FILE: firmware/mock_hardware/include/preprocessor.h ================================================ ================================================ FILE: firmware/mock_hardware/include/print_funcs.h ================================================ #include "compiler.h" #include #include extern void init_dbg_rs232(long pba_hz); #ifdef FIRMWARE_DEBUG_OUTPUT static inline void print_dbg(const char* str) { fprintf(stderr, "%s", str); } static inline void print_dbg_char(int c) { fprintf(stderr, "%d", c); } static inline void print_dbg_ulong(unsigned long n) { fprintf(stderr, "%ld", n); } static inline void print_dbg_char_hex(unsigned char n) { fprintf(stderr, "%x", n); } static inline void print_dbg_short_hex(unsigned short n) { fprintf(stderr, "%d", n); } static inline void print_dbg_hex(unsigned long n) { fprintf(stderr, "%lx", n); } #else static inline void print_dbg(const char* str) { } static inline void print_dbg_char(int c) { } static inline void print_dbg_ulong(unsigned long n) { } static inline void print_dbg_char_hex(unsigned char n) { } static inline void print_dbg_short_hex(unsigned short n) { } static inline void print_dbg_hex(unsigned long n) { } #endif ================================================ FILE: firmware/mock_hardware/include/spi.h ================================================ typedef enum { SPI_ERROR = -1, SPI_OK = 0, SPI_ERROR_TIMEOUT = 1, SPI_ERROR_ARGUMENT, SPI_ERROR_OVERRUN, SPI_ERROR_MODE_FAULT, SPI_ERROR_OVERRUN_AND_MODE_FAULT } spi_status_t; spi_status_t spi_selectChip(volatile void *spi, uint8_t chip); spi_status_t spi_unselectChip(volatile void *spi, uint8_t chip); spi_status_t spi_write(volatile void *spi, uint16_t data); ================================================ FILE: firmware/mock_hardware/include/sysclk.h ================================================ void sysclk_init(void); ================================================ FILE: firmware/mock_hardware/include/tc.h ================================================ ================================================ FILE: firmware/mock_hardware/include/twi.h ================================================ ================================================ FILE: firmware/mock_hardware/include/usart.h ================================================ ================================================ FILE: firmware/mock_hardware/include/usb_protocol.h ================================================ /** * \file * * \brief USB protocol definitions. * * This file contains the USB definitions and data structures provided by the * USB 2.0 specification. * * Copyright (c) 2009-2015 Atmel Corporation. All rights reserved. * * \asf_license_start * * \page License * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. 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. * * 3. The name of Atmel may not be used to endorse or promote products derived * from this software without specific prior written permission. * * 4. This software may only be redistributed and used in connection with an * Atmel microcontroller product. * * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL 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. * * \asf_license_stop * */ /* * Support and FAQ: visit Atmel Support */ #ifndef _USB_PROTOCOL_H_ #define _USB_PROTOCOL_H_ #include "usb_atmel.h" #include "compiler.h" /** * \ingroup usb_group * \defgroup usb_protocol_group USB Protocol Definitions * * This module defines constants and data structures provided by the USB * 2.0 specification. * * @{ */ //! Value for field bcdUSB #define USB_V2_0 0x0200 //!< USB Specification version 2.00 #define USB_V2_1 0x0201 //!< USB Specification version 2.01 /*! \name Generic definitions (Class, subclass and protocol) */ //! @{ #define NO_CLASS 0x00 #define CLASS_VENDOR_SPECIFIC 0xFF #define NO_SUBCLASS 0x00 #define NO_PROTOCOL 0x00 //! @} //! \name IAD (Interface Association Descriptor) constants //! @{ #define CLASS_IAD 0xEF #define SUB_CLASS_IAD 0x02 #define PROTOCOL_IAD 0x01 //! @} /** * \brief USB request data transfer direction (bmRequestType) */ #define USB_REQ_DIR_OUT (0 << 7) //!< Host to device #define USB_REQ_DIR_IN (1 << 7) //!< Device to host #define USB_REQ_DIR_MASK (1 << 7) //!< Mask /** * \brief USB request types (bmRequestType) */ #define USB_REQ_TYPE_STANDARD (0 << 5) //!< Standard request #define USB_REQ_TYPE_CLASS (1 << 5) //!< Class-specific request #define USB_REQ_TYPE_VENDOR (2 << 5) //!< Vendor-specific request #define USB_REQ_TYPE_MASK (3 << 5) //!< Mask /** * \brief USB recipient codes (bmRequestType) */ #define USB_REQ_RECIP_DEVICE (0 << 0) //!< Recipient device #define USB_REQ_RECIP_INTERFACE (1 << 0) //!< Recipient interface #define USB_REQ_RECIP_ENDPOINT (2 << 0) //!< Recipient endpoint #define USB_REQ_RECIP_OTHER (3 << 0) //!< Recipient other #define USB_REQ_RECIP_MASK (0x1F) //!< Mask /** * \brief Standard USB requests (bRequest) */ enum usb_reqid { USB_REQ_GET_STATUS = 0, USB_REQ_CLEAR_FEATURE = 1, USB_REQ_SET_FEATURE = 3, USB_REQ_SET_ADDRESS = 5, USB_REQ_GET_DESCRIPTOR = 6, USB_REQ_SET_DESCRIPTOR = 7, USB_REQ_GET_CONFIGURATION = 8, USB_REQ_SET_CONFIGURATION = 9, USB_REQ_GET_INTERFACE = 10, USB_REQ_SET_INTERFACE = 11, USB_REQ_SYNCH_FRAME = 12, }; /** * \brief Standard USB device status flags * */ enum usb_device_status { USB_DEV_STATUS_BUS_POWERED = 0, USB_DEV_STATUS_SELF_POWERED = 1, USB_DEV_STATUS_REMOTEWAKEUP = 2 }; /** * \brief Standard USB Interface status flags * */ enum usb_interface_status { USB_IFACE_STATUS_RESERVED = 0 }; /** * \brief Standard USB endpoint status flags * */ enum usb_endpoint_status { USB_EP_STATUS_HALTED = 1, }; /** * \brief Standard USB device feature flags * * \note valid for SetFeature request. */ enum usb_device_feature { USB_DEV_FEATURE_REMOTE_WAKEUP = 1, //!< Remote wakeup enabled USB_DEV_FEATURE_TEST_MODE = 2, //!< USB test mode USB_DEV_FEATURE_OTG_B_HNP_ENABLE = 3, USB_DEV_FEATURE_OTG_A_HNP_SUPPORT = 4, USB_DEV_FEATURE_OTG_A_ALT_HNP_SUPPORT = 5 }; /** * \brief Test Mode possible on HS USB device * * \note valid for USB_DEV_FEATURE_TEST_MODE request. */ enum usb_device_hs_test_mode { USB_DEV_TEST_MODE_J = 1, USB_DEV_TEST_MODE_K = 2, USB_DEV_TEST_MODE_SE0_NAK = 3, USB_DEV_TEST_MODE_PACKET = 4, USB_DEV_TEST_MODE_FORCE_ENABLE = 5, }; /** * \brief Standard USB endpoint feature/status flags */ enum usb_endpoint_feature { USB_EP_FEATURE_HALT = 0, }; /** * \brief Standard USB Test Mode Selectors */ enum usb_test_mode_selector { USB_TEST_J = 0x01, USB_TEST_K = 0x02, USB_TEST_SE0_NAK = 0x03, USB_TEST_PACKET = 0x04, USB_TEST_FORCE_ENABLE = 0x05, }; /** * \brief Standard USB descriptor types */ enum usb_descriptor_type { USB_DT_DEVICE = 1, USB_DT_CONFIGURATION = 2, USB_DT_STRING = 3, USB_DT_INTERFACE = 4, USB_DT_ENDPOINT = 5, USB_DT_DEVICE_QUALIFIER = 6, USB_DT_OTHER_SPEED_CONFIGURATION = 7, USB_DT_INTERFACE_POWER = 8, USB_DT_OTG = 9, USB_DT_IAD = 0x0B, USB_DT_BOS = 0x0F, USB_DT_DEVICE_CAPABILITY = 0x10, }; /** * \brief USB Device Capability types */ enum usb_capability_type { USB_DC_USB20_EXTENSION = 0x02, }; /** * \brief USB Device Capability - USB 2.0 Extension * To fill bmAttributes field of usb_capa_ext_desc_t structure. */ enum usb_capability_extension_attr { USB_DC_EXT_LPM = 0x00000002, }; #define HIRD_50_US 0 #define HIRD_125_US 1 #define HIRD_200_US 2 #define HIRD_275_US 3 #define HIRD_350_US 4 #define HIRD_425_US 5 #define HIRD_500_US 6 #define HIRD_575_US 7 #define HIRD_650_US 8 #define HIRD_725_US 9 #define HIRD_800_US 10 #define HIRD_875_US 11 #define HIRD_950_US 12 #define HIRD_1025_US 13 #define HIRD_1100_US 14 #define HIRD_1175_US 15 /** Fields definition from a LPM TOKEN */ #define USB_LPM_ATTRIBUT_BLINKSTATE_MASK (0xF << 0) #define USB_LPM_ATTRIBUT_FIRD_MASK (0xF << 4) #define USB_LPM_ATTRIBUT_REMOTEWAKE_MASK (1 << 8) #define USB_LPM_ATTRIBUT_BLINKSTATE(value) ((value & 0xF) << 0) #define USB_LPM_ATTRIBUT_FIRD(value) ((value & 0xF) << 4) #define USB_LPM_ATTRIBUT_REMOTEWAKE(value) ((value & 1) << 8) #define USB_LPM_ATTRIBUT_BLINKSTATE_L1 USB_LPM_ATTRIBUT_BLINKSTATE(1) /** * \brief Standard USB endpoint transfer types */ enum usb_ep_type { USB_EP_TYPE_CONTROL = 0x00, USB_EP_TYPE_ISOCHRONOUS = 0x01, USB_EP_TYPE_BULK = 0x02, USB_EP_TYPE_INTERRUPT = 0x03, USB_EP_TYPE_MASK = 0x03, }; /** * \brief Standard USB language IDs for string descriptors */ enum usb_langid { USB_LANGID_EN_US = 0x0409, //!< English (United States) }; /** * \brief Mask selecting the index part of an endpoint address */ #define USB_EP_ADDR_MASK 0x0f //! \brief USB address identifier typedef uint8_t usb_add_t; /** * \brief Endpoint transfer direction is IN */ #define USB_EP_DIR_IN 0x80 /** * \brief Endpoint transfer direction is OUT */ #define USB_EP_DIR_OUT 0x00 //! \brief Endpoint identifier typedef uint8_t usb_ep_t; /** * \brief Maximum length in bytes of a USB descriptor * * The maximum length of a USB descriptor is limited by the 8-bit * bLength field. */ #define USB_MAX_DESC_LEN 255 /* * 2-byte alignment requested for all USB structures. */ //COMPILER_PACK_SET(1) /** * \brief A USB Device SETUP request * * The data payload of SETUP packets always follows this structure. */ typedef struct { uint8_t bmRequestType; uint8_t bRequest; le16_t wValue; le16_t wIndex; le16_t wLength; } usb_setup_req_t; /** * \brief Standard USB device descriptor structure */ typedef struct { uint8_t bLength; uint8_t bDescriptorType; le16_t bcdUSB; uint8_t bDeviceClass; uint8_t bDeviceSubClass; uint8_t bDeviceProtocol; uint8_t bMaxPacketSize0; le16_t idVendor; le16_t idProduct; le16_t bcdDevice; uint8_t iManufacturer; uint8_t iProduct; uint8_t iSerialNumber; uint8_t bNumConfigurations; } usb_dev_desc_t; /** * \brief Standard USB device qualifier descriptor structure * * This descriptor contains information about the device when running at * the "other" speed (i.e. if the device is currently operating at high * speed, this descriptor can be used to determine what would change if * the device was operating at full speed.) */ typedef struct { uint8_t bLength; uint8_t bDescriptorType; le16_t bcdUSB; uint8_t bDeviceClass; uint8_t bDeviceSubClass; uint8_t bDeviceProtocol; uint8_t bMaxPacketSize0; uint8_t bNumConfigurations; uint8_t bReserved; } usb_dev_qual_desc_t; /** * \brief USB Device BOS descriptor structure * * The BOS descriptor (Binary device Object Store) defines a root * descriptor that is similar to the configuration descriptor, and is * the base descriptor for accessing a family of related descriptors. * A host can read a BOS descriptor and learn from the wTotalLength field * the entire size of the device-level descriptor set, or it can read in * the entire BOS descriptor set of device capabilities. * The host accesses this descriptor using the GetDescriptor() request. * The descriptor type in the GetDescriptor() request is set to BOS. */ typedef struct { uint8_t bLength; uint8_t bDescriptorType; le16_t wTotalLength; uint8_t bNumDeviceCaps; } usb_dev_bos_desc_t; /** * \brief USB Device Capabilities - USB 2.0 Extension Descriptor structure * * Defines the set of USB 1.1-specific device level capabilities. */ typedef struct { uint8_t bLength; uint8_t bDescriptorType; uint8_t bDevCapabilityType; le32_t bmAttributes; } usb_dev_capa_ext_desc_t; /** * \brief USB Device LPM Descriptor structure * * The BOS descriptor and capabilities descriptors for LPM. */ typedef struct { usb_dev_bos_desc_t bos; usb_dev_capa_ext_desc_t capa_ext; } usb_dev_lpm_desc_t; /** * \brief Standard USB Interface Association Descriptor structure */ typedef struct { uint8_t bLength; //!< size of this descriptor in bytes uint8_t bDescriptorType; //!< INTERFACE descriptor type uint8_t bFirstInterface; //!< Number of interface uint8_t bInterfaceCount; //!< value to select alternate setting uint8_t bFunctionClass; //!< Class code assigned by the USB uint8_t bFunctionSubClass; //!< Sub-class code assigned by the USB uint8_t bFunctionProtocol; //!< Protocol code assigned by the USB uint8_t iFunction; //!< Index of string descriptor } usb_association_desc_t; /** * \brief Standard USB configuration descriptor structure */ typedef struct { uint8_t bLength; uint8_t bDescriptorType; le16_t wTotalLength; uint8_t bNumInterfaces; uint8_t bConfigurationValue; uint8_t iConfiguration; uint8_t bmAttributes; uint8_t bMaxPower; } usb_conf_desc_t; #define USB_CONFIG_ATTR_MUST_SET (1 << 7) //!< Must always be set #define USB_CONFIG_ATTR_BUS_POWERED (0 << 6) //!< Bus-powered #define USB_CONFIG_ATTR_SELF_POWERED (1 << 6) //!< Self-powered #define USB_CONFIG_ATTR_REMOTE_WAKEUP (1 << 5) //!< remote wakeup supported #define USB_CONFIG_MAX_POWER(ma) (((ma) + 1) / 2) //!< Max power in mA /** * \brief Standard USB association descriptor structure */ typedef struct { uint8_t bLength; //!< Size of this descriptor in bytes uint8_t bDescriptorType; //!< Interface descriptor type uint8_t bFirstInterface; //!< Number of interface uint8_t bInterfaceCount; //!< value to select alternate setting uint8_t bFunctionClass; //!< Class code assigned by the USB uint8_t bFunctionSubClass; //!< Sub-class code assigned by the USB uint8_t bFunctionProtocol; //!< Protocol code assigned by the USB uint8_t iFunction; //!< Index of string descriptor } usb_iad_desc_t; /** * \brief Standard USB interface descriptor structure */ typedef struct { uint8_t bLength; uint8_t bDescriptorType; uint8_t bInterfaceNumber; uint8_t bAlternateSetting; uint8_t bNumEndpoints; uint8_t bInterfaceClass; uint8_t bInterfaceSubClass; uint8_t bInterfaceProtocol; uint8_t iInterface; } usb_iface_desc_t; /** * \brief Standard USB endpoint descriptor structure */ typedef struct { uint8_t bLength; uint8_t bDescriptorType; uint8_t bEndpointAddress; uint8_t bmAttributes; le16_t wMaxPacketSize; uint8_t bInterval; } usb_ep_desc_t; /** * \brief A standard USB string descriptor structure */ typedef struct { uint8_t bLength; uint8_t bDescriptorType; } usb_str_desc_t; typedef struct { usb_str_desc_t desc; le16_t string[1]; } usb_str_lgid_desc_t; //COMPILER_PACK_RESET() //! @} #endif /* _USB_PROTOCOL_H_ */ ================================================ FILE: firmware/mock_hardware/mock_hardware_api.c ================================================ #include "mock_hardware_api.h" #include "mock_hardware_api_private.h" #include "mock_serial.h" #include "mock_interrupt.h" #include "events.h" #include "hid.h" #include "cbbq.h" //#include "test/cbbq_utils.h" #include #include #define GPIO_NUM_PINS 50 bool gpioBlock[GPIO_NUM_PINS]; uint16_t adcBlock[4]; uint16_t dacBlock[4]; #define VSERIAL_IN_BUFFER_SIZE 512 #define VSERIAL_OUT_BUFFER_SIZE 512 cbbq serial_in_queue; cbbq serial_out_queue; void* nvram_ptr = NULL; void* vram_ptr = NULL; uint32_t nvram_size = 0; uint32_t vram_size = 0; uint8_t* screenBuffer = NULL; #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 // main interface points to module code -- the two halves of main() in the original source extern void initialize_module(void); extern void check_events(void); // this *could* be simulated as an event, but key press/hold has already been calculated in glfw, // and getting module timing assumptions right is tricky, so just let's just skip to the handler extern void process_keypress(uint8_t key, uint8_t mod_key, bool is_held_key, bool is_release); void hardware_hidMessage(uint8_t key, uint8_t mod, bool held, bool release) { process_keypress(key, mod, held, release); } void hardware_hidConnect() { event_t ev; ev.type = kEventHidConnect; event_post(&ev); } void hardware_hidDisconnect() { event_t ev; ev.type = kEventHidDisconnect; event_post(&ev); } void initialize_serial() { queue_init(&serial_in_queue, VSERIAL_IN_BUFFER_SIZE); queue_init(&serial_out_queue, VSERIAL_OUT_BUFFER_SIZE); } void hardware_init() { initialize_serial(); initialize_module(); hardware_afterInit(); } void hardware_step() { check_events(); hardware_afterStep(); } void hardware_triggerInterrupt(int interrupt) { mock_interrupt(interrupt); } bool hardware_getGPIO(uint32_t pin) { if (pin >= 0 && pin < GPIO_NUM_PINS) { return gpioBlock[pin]; } return false; } void hardware_setGPIO(uint32_t pin, bool value) { if (pin >= 0 && pin < GPIO_NUM_PINS) { // Check for interrupt on pins A00-A07 bool changed = false; if (pin < 8 && gpioBlock[pin] != value) { changed = true; } gpioBlock[pin] = value; // Trigger interrupt only on rising edge if (changed && value) { mock_gpio_interrupt(pin); } } } uint16_t hardware_getADC(int channel) { return adcBlock[channel]; } void hardware_setADC(int channel, uint16_t value) { adcBlock[channel] = value; } uint16_t hardware_getDAC(int channel) { return dacBlock[channel]; } void hardware_setDAC(int channel, uint16_t value) { dacBlock[channel] = value; } void hardware_postEvent(uint32_t type, uint32_t data) { event_t e; e.type = type; e.data = data; event_post(&e); } void hardware_serialConnectionChange(bool connected, uint8_t type, uint8_t protocol, uint8_t width, uint8_t height) { mock_monome_serial_setup(connected, type, protocol, width, height); } int hardware_readSerial(uint8_t** pbuf, uint8_t* pcount) { int ret = queue_read(&serial_out_queue, pbuf, pcount); // queue_display(&serial_out_queue); // printf("hardware_readSerial queue_read returned: %d\n", ret); return ret; } int hardware_writeSerial_internal(uint8_t* buf, uint8_t byteCount) { int ret = queue_write(&serial_out_queue, buf, byteCount); // queue_display(&serial_out_queue); // printf("hardware_writeSerial_internal queue_write returned: %d\n", ret); return ret; } int hardware_readSerial_internal(uint8_t** pbuf, uint8_t* pcount) { int ret = queue_read(&serial_in_queue, pbuf, pcount); // queue_display(&serial_in_queue); // printf("hardware_readSerial_internal queue_read returned: %d\n", ret); return ret; } int hardware_writeSerial(uint8_t* buf, uint8_t byteCount) { int ret = queue_write(&serial_in_queue, buf, byteCount); // queue_display(&serial_in_queue); // printf("hardware_writeSerial queue_write returned: %d\n", ret); return ret; } void hardware_declareNVRAM(void* ptr, uint32_t size) { nvram_ptr = ptr; nvram_size = size; } void hardware_readNVRAM(void** ptr, uint32_t* size) { *ptr = nvram_ptr; *size = nvram_size; } void hardware_writeNVRAM(const void* src, uint32_t size) { memcpy(nvram_ptr, src, nvram_size >= size ? size : nvram_size); } void hardware_declareVRAM(void* ptr, uint32_t size) { vram_ptr = ptr; vram_size = size; } void hardware_readVRAM(void** ptr, uint32_t* size) { hardware_beforeReadVRAM(vram_ptr, vram_size); if (ptr) { *ptr = vram_ptr; } if (size) { *size = vram_size; } } void hardware_writeVRAM(const void* src, uint32_t size) { memcpy(vram_ptr, src, vram_size >= size ? size : vram_size); hardware_afterWriteVRAM(vram_ptr, vram_size); } void hardware_getScreenBuffer(uint8_t** ptr, uint16_t* width, uint16_t* height) { if (ptr) *ptr = screenBuffer; if (width) *width = 128; if (height) *height = 64; } void hardware_setScreenBuffer(uint8_t* buf) { screenBuffer = buf; } // TODO: make this generic to support more follower types uint16_t faderbank[64]; void hardware_iiUpdateFollowerData(uint8_t device, uint8_t param, uint16_t data) { // For now, only support 16 params each on devices 0x34-0x37 uint8_t offset = device - 0x34; if (offset < 4 && param < 16) { uint8_t index = offset * 16 + param; faderbank[index] = data; } } uint16_t hardware_iiGetFollowerData(uint8_t device, uint8_t param) { // For now, only support 16 params each on devices 0x34-0x37 uint8_t offset = device - 0x34; if (offset < 4 && param < 16) { uint8_t index = offset * 16 + param; return faderbank[index]; } return 0; } #define II_MAX_DATA 8 #define II_MAX_MESSAGES 32 typedef struct { uint8_t addr; uint8_t data[II_MAX_DATA]; uint8_t length; } iiMessage; iiMessage iiMessageBuffer[II_MAX_MESSAGES]; size_t iiMessageBufferIndex = 0; bool hardware_iiPushMessage(uint8_t addr, uint8_t* data, uint8_t length) { if (iiMessageBufferIndex < II_MAX_MESSAGES && length <= II_MAX_DATA) { iiMessageBuffer[iiMessageBufferIndex].addr = addr; iiMessageBuffer[iiMessageBufferIndex].length = length; memcpy(iiMessageBuffer[iiMessageBufferIndex].data, data, length); iiMessageBufferIndex++; return true; } return false; } bool hardware_iiPopMessage(uint8_t* addr, uint8_t* data, uint8_t* length) { if (iiMessageBufferIndex > 0) { if (addr) { *addr = iiMessageBuffer[iiMessageBufferIndex].addr; } if (length) { *length = iiMessageBuffer[iiMessageBufferIndex].length; } if (data && *length <= II_MAX_DATA) { memcpy(data, iiMessageBuffer[iiMessageBufferIndex].data, *length); } iiMessageBufferIndex--; return true; } return false; } ================================================ FILE: firmware/mock_hardware/mock_hardware_api.h ================================================ #ifndef MOCK_API_SKIP_TYPES #include "../teletype4/src/serializer.h" #include #include #endif #ifndef MOCK_API #ifdef ARCH_WIN #define MOCK_API(returntype, name, argslist) __declspec(dllexport) \ returntype hardware_##name argslist #elif ARCH_MAC #define MOCK_API(returntype, name, argslist) __attribute__((visibility("default"))) \ returntype hardware_##name argslist #elif ARCH_LIN #define MOCK_API(returntype, name, argslist) __attribute__((visibility("default"))) \ returntype hardware_##name argslist #endif #endif MOCK_API(void, init, ()); MOCK_API(void, step, ()); MOCK_API(void, triggerInterrupt, (int interrupt)); MOCK_API(bool, getGPIO, (uint32_t pin)); MOCK_API(void, setGPIO, (uint32_t pin, bool value)); MOCK_API(uint16_t, getADC, (int channel)); MOCK_API(void, setADC, (int channel, uint16_t value)); MOCK_API(uint16_t, getDAC, (int channel)); MOCK_API(void, setDAC, (int channel, uint16_t value)); MOCK_API(void, postEvent, (uint32_t type, uint32_t data)); MOCK_API(void, serialConnectionChange, (bool connected, uint8_t type, uint8_t protocol, uint8_t width, uint8_t height)); MOCK_API(int, readSerial, (uint8_t** pbuf, uint8_t* pcount)); MOCK_API(int, writeSerial, (uint8_t* buf, uint8_t byteCount)); MOCK_API(void, readNVRAM, (void** ptr, uint32_t* size)); MOCK_API(void, writeNVRAM, (const void* src, uint32_t size)); MOCK_API(void, readVRAM, (void** ptr, uint32_t* size)); MOCK_API(void, writeVRAM, (const void* src, uint32_t size)); MOCK_API(void, setScreenBuffer, (uint8_t *ptr)); MOCK_API(void, hidConnect, ()); MOCK_API(void, hidDisconnect, ()); MOCK_API(void, hidMessage, (uint8_t key, uint8_t mod, bool held, bool release)); MOCK_API(void, iiUpdateFollowerData, (uint8_t device, uint8_t param, uint16_t data)); MOCK_API(uint16_t, iiGetFollowerData, (uint8_t device, uint8_t param)); MOCK_API(bool, iiPushMessage, (uint8_t addr, uint8_t* data, uint8_t length)); MOCK_API(bool, iiPopMessage, (uint8_t* addr, uint8_t* data, uint8_t* length)); MOCK_API(void, serializePreset, (tt_serializer_t* stream, uint8_t preset_num)); MOCK_API(void, deserializePreset, (tt_deserializer_t* stream, uint8_t preset_num, bool clearExisting)); MOCK_API(void, getVersion, (char* buffer)); MOCK_API(double, getClockPeriod, ()); ================================================ FILE: firmware/mock_hardware/mock_hardware_api_private.h ================================================ // Functions that are only intended to be called internally extern int hardware_readSerial_internal(uint8_t** pbuf, uint8_t* pcount); extern int hardware_writeSerial_internal(uint8_t* buf, uint8_t byteCount); extern void hardware_afterInit(); extern void hardware_afterStep(); extern void hardware_beforeReadVRAM(void* ptr, uint32_t size); extern void hardware_afterWriteVRAM(void* ptr, uint32_t size); extern void hardware_getScreenBuffer(uint8_t **ptr, uint16_t* width, uint16_t* height); ================================================ FILE: firmware/mock_hardware/mock_interrupt.c ================================================ #include "mock_hardware_api.h" // libavr32 headers #include "types.h" #include "events.h" #include "timers.h" #define B08 40 #define B09 41 #define NMI 13 // state variables from module init_*.c volatile u64 tcTicks = 0; volatile u8 tcOverflow = 0; static const u64 tcMax = (u64)0x7fffffff; static const u64 tcMaxInv = (u64)0x10000000; // reimplement function from module init_*.c u64 get_ticks(void) { return tcTicks; } void simulate_tc_interrupt() { tcTicks++; // overflow control if (tcTicks > tcMax) { tcTicks = 0; tcOverflow = 1; } else { tcOverflow = 0; } process_timers(); } void simulate_clock_normal_interrupt() { event_t e; e.type = kEventClockNormal; e.data = !hardware_getGPIO(B09); event_post(&e); } void simulate_external_clock_interrupt() { event_t e; e.type = kEventClockExt; e.data = hardware_getGPIO(B08); event_post(&e); } void simulate_front_button_interrupt() { event_t e; e.type = kEventFront; e.data = hardware_getGPIO(NMI); event_post(&e); } void mock_gpio_interrupt(int pin) { event_t e; e.type = kEventTrigger; e.data = pin; event_post(&e); } void simulate_ansible_tr_interrupt(int pin, int offset) { event_t e; e.type = kEventTr; e.data = hardware_getGPIO(pin) + offset; event_post(&e); } void mock_interrupt(int interrupt) { switch (interrupt) { // todo: make an enum for this case 0: // system clock simulate_tc_interrupt(); break; case 1: // clock jack normal simulate_clock_normal_interrupt(); break; case 2: // external clock rising edge simulate_external_clock_interrupt(); break; case 3: // front button state change simulate_front_button_interrupt(); break; case 6: // ansible input 1 change simulate_ansible_tr_interrupt(40, 0); break; case 7: // ansible input 2 change simulate_ansible_tr_interrupt(41, 2); break; } } ================================================ FILE: firmware/mock_hardware/mock_interrupt.h ================================================ void mock_interrupt(int interrupt); void mock_gpio_interrupt(int pin); ================================================ FILE: firmware/mock_hardware/mock_serial.c ================================================ // libavr32 headers #include "monome.h" #include "mock_hardware_api_private.h" #include #include // types and declarations private to monome.c not in monome.h // 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; extern monomeDesc mdesc; extern void set_funcs(); // end types and declarations from monome.c u8* mock_serial_current_message_buffer; u8 mock_serial_current_message_length; bool mock_serial_isconnected = false; u8 mock_serial_connected() { return mock_serial_isconnected ? 1 : 0; } void mock_serial_read(void) { while (hardware_readSerial_internal(&mock_serial_current_message_buffer, &mock_serial_current_message_length) > 0) { (*monome_read_serial)(); } } void mock_serial_write(u8* data, u32 bytes) { hardware_writeSerial_internal(data, bytes); } volatile u8 mock_serial_tx_busy() { return 0; } volatile u8 mock_serial_rx_busy() { return 0; } u8* mock_serial_rx_buf(void) { return mock_serial_current_message_buffer; } volatile u8 mock_serial_rx_bytes(void) { return mock_serial_current_message_length; } void setup_mock_serial() { serial_read = &mock_serial_read; serial_write = &mock_serial_write; tx_busy = &mock_serial_tx_busy; rx_busy = &mock_serial_rx_busy; rx_buf = &mock_serial_rx_buf; rx_bytes = &mock_serial_rx_bytes; serial_connected = &mock_serial_connected; } void mock_monome_serial_setup(bool connected, uint8_t type, uint8_t protocol, uint8_t width, uint8_t height) { if (connected) { // fill out the global mdesc structure mdesc.protocol = (eMonomeProtocol)protocol; mdesc.vari = mdesc.protocol == eProtocolMext; if (type == 0) { mdesc.device = eDeviceGrid; mdesc.rows = height; mdesc.cols = width; mdesc.tilt = 1; } else { mdesc.device = eDeviceArc; mdesc.tilt = 1; mdesc.encs = width; } // set device-specific event handlers based on the global mdesc set_funcs(); setup_mock_serial(); // push a connection event event_t ev; ev.type = kEventMonomeConnect; u8* data = (u8*)(&(ev.data)); *data++ = (u8)(mdesc.device); *data++ = type? mdesc.encs : mdesc.cols; *data++ = mdesc.rows; event_post(&ev); mock_serial_isconnected = true; } else { // push a disconnect event event_t ev; // kEventFtdiDisconnect is the low-level disconnect event for both FTDI and CDC devices ev.type = kEventFtdiDisconnect; event_post(&ev); mock_serial_isconnected = false; } } ================================================ FILE: firmware/mock_hardware/mock_serial.h ================================================ #include #include void mock_monome_serial_setup(bool connected, uint8_t type, uint8_t protocol, uint8_t width, uint8_t height); ================================================ FILE: firmware/mock_hardware/modules/ansible/adapter_ansible.c ================================================ #include "gitversion.h" #include "types.h" #include "mock_hardware_api.h" #include "mock_hardware_api_private.h" #include #include "main.h" #include "flashc.h" void hid_parse_frame(u8* data, u8 sz) { } void process_keypress(uint8_t key, uint8_t mod_key, bool is_held_key) { } void hardware_serializePreset(tt_serializer_t* stream, uint8_t preset_num) { } void hardware_deserializePreset(tt_deserializer_t* stream, uint8_t preset_num, bool clearExisting) { } nvram_data_t ansible_vram; DECLARE_VRAM(&ansible_vram, sizeof(nvram_data_t)) void hardware_beforeReadVRAM(void* ptr, uint32_t size) { save_tuning(&ansible_vram); save_levels(&ansible_vram); save_cycles(&ansible_vram); save_kria(&ansible_vram); save_mp(&ansible_vram); save_es(&ansible_vram); } void hardware_afterWriteVRAM(void* ptr, uint32_t size) { init_tuning(&ansible_vram); init_levels(&ansible_vram); init_cycles(&ansible_vram); init_kria(&ansible_vram); init_mp(&ansible_vram); init_es(&ansible_vram); } void hardware_afterInit() { } void hardware_afterStep() { } void hardware_getVersion(char* buffer) { strcpy(buffer, git_version); } double hardware_getClockPeriod() { return 0.001; } ================================================ FILE: firmware/mock_hardware/modules/ansible/ansible_usb_disk.c ================================================ #include "init_common.h" #include "main.h" #include "monome.h" #include "print_funcs.h" #include "ansible_preset_docdef.h" #include "ansible_usb_disk.h" typedef char * FS_STRING; #define DEBUG_ANSIBLE_USB_DISK 0 #define DISK_BLINK_INTERVAL 250 static void handler_UsbDiskKey(int32_t data); static void handler_UsbDiskFront(int32_t data); static bool usb_disk_mount_drive(void); static bool usb_disk_backup_binary(FS_STRING fname); static bool usb_disk_restore_backup(FS_STRING fname); static bool usb_disk_load_flash(FS_STRING fname); static bool usb_disk_save_flash(FS_STRING fname); static void flush(void); static void blink_read(void* o); static void blink_write(void* o); static char ansible_usb_disk_textbuf[ANSIBLE_USBDISK_TXTBUF_LEN] = { 0 }; static uint8_t usb_disk_buffer[ANSIBLE_USBDISK_BLOCKSIZE] = { 0 }; static jsmntok_t ansible_usb_disk_tokbuf[ANSIBLE_USBDISK_TOKBUF_LEN]; static volatile bool usb_disk_locked = false; static bool usb_disk_lock(void) { if (!usb_disk_locked) { usb_disk_locked = true; print_dbg("\r\n\r\n> usb disk locked"); return true; } return false; } static void usb_disk_unlock(void) { usb_disk_locked = false; print_dbg("\r\n> usb disk unlocked\r\n"); } static volatile bool load_armed = false, save_armed = false; static bool blink = false; static void handler_UsbDiskKey(int32_t data) { } static void handler_UsbDiskFront(s32 data) { } static void blink_read(void* o) { } static void blink_write(void* o) { } void set_mode_usb_disk(void) { } bool usb_disk_enter() { } void usb_disk_exit() { } void usb_disk_skip_apps(bool skip) { } void usb_disk_select_app(ansible_mode_t mode) { } size_t gets_chunks(char* dst, size_t len) { return 0; } static void copy_chunks(char* dst, const char* src, size_t len) { } static uint16_t buf_pos = 0; size_t total_written = 0; static void flush(void) { } void puts_buffered(const char* src, size_t len) { } static bool usb_disk_mount_drive(void) { } static bool usb_disk_backup_binary(FS_STRING fname) { } static bool usb_disk_restore_backup(FS_STRING fname) { } static bool usb_disk_load_flash(FS_STRING fname) { } static bool usb_disk_save_flash(FS_STRING fname) { } ================================================ FILE: firmware/mock_hardware/modules/teletype/adapter_teletype.c ================================================ #include "mock_hardware_api.h" #include "mock_hardware_api_private.h" #include "flashc.h" #include "module/edit_mode.h" #include "module/flash.h" #include "module/gitversion.h" #include "module/globals.h" #include "module/live_mode.h" #include "module/preset_w_mode.h" #include "src/scene_serialization.h" #include "src/teletype_io.h" #include "types.h" extern nvram_data_t f; extern scene_state_t scene_state; #ifdef DECLARE_NVRAM DECLARE_NVRAM(&f, sizeof(nvram_data_t)) #endif #ifdef DECLARE_VRAM DECLARE_VRAM(&scene_state, sizeof(scene_state)) #endif void clock_null(uint8_t phase) { } typedef void (*clock_pulse_t)(uint8_t phase); volatile uint8_t clock_external; volatile clock_pulse_t clock_pulse = &clock_null; void tele_usb_disk() { } extern u8 get_revision(void) { return 0; } void hardware_serializePreset(tt_serializer_t* stream, uint8_t preset_num) { if (preset_num == 255) { // save from active scene state and text serialize_scene(stream, &scene_state, &scene_text); } else { // save from flash scene_state_t scene; ss_init(&scene); char text[SCENE_TEXT_LINES][SCENE_TEXT_CHARS]; memset(text, 0, SCENE_TEXT_LINES * SCENE_TEXT_CHARS); flash_read(preset_num, &scene, &text, 1, 1, 1); serialize_scene(stream, &scene, &text); } } // copied and modified from module/flash.c void fake_flash_read(scene_state_t* src_scene, scene_state_t* dest_scene, char (*src_text)[SCENE_TEXT_LINES][SCENE_TEXT_CHARS], char (*dest_text)[SCENE_TEXT_LINES][SCENE_TEXT_CHARS], uint8_t init_pattern, uint8_t init_grid, uint8_t init_i2c_op_address) { memcpy(ss_scripts_ptr(dest_scene), ss_scripts_ptr(src_scene), // handle difference in macros between TT 5 and 4 #ifdef EDITABLE_SCRIPT_COUNT ss_scripts_size(EDITABLE_SCRIPT_COUNT) #else // Exclude size of TEMP script as above ss_scripts_size() - sizeof(scene_script_t) #endif ); if (init_pattern) { memcpy(ss_patterns_ptr(dest_scene), ss_patterns_ptr(src_scene), ss_patterns_size()); } if (init_grid) { memcpy(&dest_scene->grid, &src_scene->grid, sizeof(scene_grid_t)); } memcpy(dest_text, src_text, SCENE_TEXT_LINES * SCENE_TEXT_CHARS); // need to reset timestamps uint32_t ticks = tele_get_ticks(); // handle difference in macros between TT 5 and 4 #ifdef TOTAL_SCRIPT_COUNT for (size_t i = 0; i < TOTAL_SCRIPT_COUNT; i++) #else for (size_t i = 0; i < TEMP_SCRIPT; i++) #endif dest_scene->scripts[i].last_time = ticks; dest_scene->variables.time = 0; if (init_i2c_op_address) dest_scene->i2c_op_address = -1; ss_midi_init(dest_scene); } // copied and modified from module/flash.c void fake_do_preset_read(scene_state_t* src_scene, scene_state_t* dest_scene, char (*src_text)[SCENE_TEXT_LINES][SCENE_TEXT_CHARS], char (*dest_text)[SCENE_TEXT_LINES][SCENE_TEXT_CHARS], uint8_t init_pattern, uint8_t init_grid, uint8_t init_i2c_op_address, uint8_t run_init) { ss_grid_init(dest_scene); fake_flash_read(src_scene, dest_scene, src_text, dest_text, init_pattern, init_grid, init_i2c_op_address); set_dash_updated(); if (run_init) { scene_state.initializing = true; run_script(&scene_state, INIT_SCRIPT); scene_state.initializing = false; } } void hardware_deserializePreset(tt_deserializer_t* stream, uint8_t preset_num, bool clearExisting) { if (preset_num == 255) { scene_state_t scene; ss_init(&scene); char text[SCENE_TEXT_LINES][SCENE_TEXT_CHARS]; memset(text, 0, SCENE_TEXT_LINES * SCENE_TEXT_CHARS); if (!clearExisting) { memcpy(&scene, &scene_state, sizeof(scene_state_t)); memcpy(text, scene_text, SCENE_TEXT_LINES * SCENE_TEXT_CHARS); } deserialize_scene(stream, &scene, &text); // load into active scene state and text fake_do_preset_read(&scene, &scene_state, &text, &scene_text, 1, 1, 1, clearExisting ? 1 : 0); // refresh some obvious things that might have been affected by the load set_preset_w_mode(); set_edit_mode_script(get_edit_script()); tele_pattern_updated(); scene_state.grid.grid_dirty = 1; } else { // load into flash scene_state_t scene; ss_init(&scene); char text[SCENE_TEXT_LINES][SCENE_TEXT_CHARS]; memset(text, 0, SCENE_TEXT_LINES * SCENE_TEXT_CHARS); deserialize_scene(stream, &scene, &text); flash_write(preset_num, &scene, &text); } } void calibrate_adc() { // set PARAM and IN calibration to cover 0-16383 ss_set_in_min(&scene_state, 0); ss_set_in_max(&scene_state, 16380); ss_set_param_min(&scene_state, 0); ss_set_param_max(&scene_state, 16380); } void hardware_beforeReadVRAM(void* ptr, uint32_t size) { } void hardware_afterWriteVRAM(void* ptr, uint32_t size) { tele_metro_updated(); tele_vars_updated(); set_preset_w_mode(); set_edit_mode_script(get_edit_script()); tele_pattern_updated(); scene_state.grid.grid_dirty = 1; calibrate_adc(); } void hardware_afterInit() { calibrate_adc(); } int ss_defeat_counter = 0; extern void process_keypress(uint8_t key, uint8_t mod_key, bool is_held_key, bool is_release); void hardware_afterStep() { if (++ss_defeat_counter > 48000) { // send a fake keypress to reset screensaver timer process_keypress(0xFF, 0, false, true); ss_defeat_counter = 0; } } void hardware_getVersion(char* buffer) { strcpy(buffer, git_version); } double hardware_getClockPeriod() { return 0.001; } ================================================ FILE: firmware/mock_hardware/modules/teletype/usb_disk_mode.c ================================================ #include void handler_usb_PollADC(int32_t data) { } void handler_usb_Front(int32_t data) { } void handler_usb_ScreenRefresh(int32_t data) { } ================================================ FILE: firmware/mock_hardware/modules/trilogy/adapter_trilogy.c ================================================ #include "mock_hardware_api.h" #include "mock_hardware_api_private.h" #include "types.h" #include void clock_null(uint8_t phase) { } typedef void (*clock_pulse_t)(uint8_t phase); volatile uint8_t clock_external; volatile clock_pulse_t clock_pulse = &clock_null; void hid_parse_frame(u8* data, u8 sz) { } void process_keypress(uint8_t key, uint8_t mod_key, bool is_held_key) { } void hardware_serializePreset(tt_serializer_t* stream, uint8_t preset_num) { } void hardware_deserializePreset(tt_deserializer_t* stream, uint8_t preset_num, bool clearExisting) { } void hardware_beforeReadVRAM(void* ptr, uint32_t size) { } void hardware_afterWriteVRAM(void* ptr, uint32_t size) { } void hardware_afterInit() { } void hardware_afterStep() { } #ifndef GIT_VERSION #define GIT_VERSION "?" #endif void hardware_getVersion(char* buffer) { strcpy(buffer, GIT_VERSION); } double hardware_getClockPeriod() { return 0.001; } ================================================ FILE: firmware/teletype.mk ================================================ FLAGS += \ -D__AVR32_UC3B0512__ \ -Imock_hardware \ -Imock_hardware/include \ -I$(TARGET_NAME)/libavr32/src \ -I$(TARGET_NAME)/libavr32/src/usb/midi \ -I$(TARGET_NAME)/libavr32/src/usb/hid \ -I$(TARGET_NAME)/libavr32/src/usb/cdc \ -I$(TARGET_NAME)/libavr32/src/usb/ftdi \ -I$(TARGET_NAME)/libavr32/conf \ -I$(TARGET_NAME)/libavr32/conf/teletype \ -I$(TARGET_NAME)/libavr32/asf/common/services/usb \ -I$(TARGET_NAME)/libavr32/asf/common/services/usb/uhc \ -I$(TARGET_NAME)/libavr32/asf/common/services/usb/class/hid \ -I$(TARGET_NAME)/src \ -I$(TARGET_NAME)/src/ops \ -I$(TARGET_NAME)/ \ SOURCES = \ $(wildcard $(TARGET_NAME)/src/*.c) \ $(TARGET_NAME)/src/scanner.c \ $(TARGET_NAME)/src/match_token.c \ $(TARGET_NAME)/module/gitversion.c \ $(wildcard $(TARGET_NAME)/src/ops/*.c) \ $(wildcard $(TARGET_NAME)/module/*.c) \ $(TARGET_NAME)/libavr32/src/events.c \ $(TARGET_NAME)/libavr32/src/timers.c \ $(TARGET_NAME)/libavr32/src/util.c \ $(TARGET_NAME)/libavr32/src/font.c \ $(TARGET_NAME)/libavr32/src/kbd.c \ $(TARGET_NAME)/libavr32/src/region.c \ $(TARGET_NAME)/libavr32/src/random.c \ $(TARGET_NAME)/libavr32/src/usb/hid/hid.c \ $(TARGET_NAME)/libavr32/src/music.c \ $(TARGET_NAME)/libavr32/src/midi_common.c \ $(wildcard $(TARGET_NAME)/libavr32/src/euclidean/*.c) \ $(wildcard mock_hardware/*.c) \ $(wildcard mock_hardware/common/*.c) \ $(wildcard mock_hardware/modules/teletype/*.c) \ SOURCES := $(filter-out $(TARGET_NAME)/module/usb_disk_mode.c, $(SOURCES)) RAGEL ?= ragel # Add a rule to build match_token.c from match_token.rl $(TARGET_NAME)/src/match_token.c: $(TARGET_NAME)/src/match_token.rl $(RAGEL) -C -G2 $(TARGET_NAME)/src/match_token.rl -o $(TARGET_NAME)/src/match_token.c # Add a rule to build scanner.c from scanner.rl $(TARGET_NAME)/src/scanner.c: $(TARGET_NAME)/src/scanner.rl $(RAGEL) -C -G2 $(TARGET_NAME)/src/scanner.rl -o $(TARGET_NAME)/src/scanner.c # Add the git commit id to a file for use when printing out the version $(TARGET_NAME)/module/gitversion.c: $(TARGET_NAME) echo "const char *git_version = \"$(GIT_VERSION)\";" > $@ include common.mk ================================================ FILE: firmware/whitewhale.mk ================================================ FLAGS += \ -D__AVR32_UC3B0256__ \ -Imock_hardware \ -Imock_hardware/include \ -I$(TARGET_NAME)/libavr32/src \ -I$(TARGET_NAME)/libavr32/src/usb/midi \ -I$(TARGET_NAME)/libavr32/src/usb/hid \ -I$(TARGET_NAME)/libavr32/src/usb/cdc \ -I$(TARGET_NAME)/libavr32/asf/common/services/usb \ -I$(TARGET_NAME)/libavr32/asf/common/services/usb/uhc \ -I$(TARGET_NAME)/libavr32/conf \ -I$(TARGET_NAME)/libavr32/conf/trilogy \ SOURCES = \ $(TARGET_NAME)/src/main.c \ $(TARGET_NAME)/libavr32/src/events.c \ $(TARGET_NAME)/libavr32/src/timers.c \ $(TARGET_NAME)/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: lib/base64/LICENSE ================================================ Copyright © 2004-2017 by René Nyffenegger This source code is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this source code must not be misrepresented; you must not claim that you wrote the original source code. If you use this source code in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original source code. 3. This notice may not be removed or altered from any source distribution. ================================================ FILE: lib/base64/README.md ================================================ cpp-base64 by René Nyffenegger https://github.com/ReneNyffenegger/cpp-base64 ================================================ FILE: lib/base64/base64.cpp ================================================ /* base64.cpp and base64.h base64 encoding and decoding with C++. Version: 1.01.00 Copyright (C) 2004-2017 René Nyffenegger This source code is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this source code must not be misrepresented; you must not claim that you wrote the original source code. If you use this source code in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original source code. 3. This notice may not be removed or altered from any source distribution. René Nyffenegger rene.nyffenegger@adp-gmbh.ch */ #include "base64.h" #include static const std::string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/"; static inline bool is_base64(unsigned char c) { return (isalnum(c) || (c == '+') || (c == '/')); } std::string base64_encode(unsigned char const* bytes_to_encode, unsigned int in_len) { std::string ret; int i = 0; int j = 0; unsigned char char_array_3[3]; unsigned char char_array_4[4]; while (in_len--) { char_array_3[i++] = *(bytes_to_encode++); if (i == 3) { char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); char_array_4[3] = char_array_3[2] & 0x3f; for(i = 0; (i <4) ; i++) ret += base64_chars[char_array_4[i]]; i = 0; } } if (i) { for(j = i; j < 3; j++) char_array_3[j] = '\0'; char_array_4[0] = ( char_array_3[0] & 0xfc) >> 2; char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); for (j = 0; (j < i + 1); j++) ret += base64_chars[char_array_4[j]]; while((i++ < 3)) ret += '='; } return ret; } std::string base64_decode(std::string const& encoded_string) { int in_len = encoded_string.size(); int i = 0; int j = 0; int in_ = 0; unsigned char char_array_4[4], char_array_3[3]; std::string ret; while (in_len-- && ( encoded_string[in_] != '=') && is_base64(encoded_string[in_])) { char_array_4[i++] = encoded_string[in_]; in_++; if (i ==4) { for (i = 0; i <4; i++) char_array_4[i] = base64_chars.find(char_array_4[i]); char_array_3[0] = ( char_array_4[0] << 2 ) + ((char_array_4[1] & 0x30) >> 4); char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; for (i = 0; (i < 3); i++) ret += char_array_3[i]; i = 0; } } if (i) { for (j = 0; j < i; j++) char_array_4[j] = base64_chars.find(char_array_4[j]); char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); for (j = 0; (j < i - 1); j++) ret += char_array_3[j]; } return ret; } ================================================ FILE: lib/base64/base64.h ================================================ // // base64 encoding and decoding with C++. // Version: 1.01.00 // #ifndef BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A #define BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A #include std::string base64_encode(unsigned char const* , unsigned int len); std::string base64_decode(std::string const& s); #endif /* BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A */ ================================================ FILE: lib/cbbq/LICENSE.md ================================================ License: MIT Copyright © 2021 Michael Dewberry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: lib/cbbq/README.md ================================================ cbbq ==== Header-only C library implementing a lock-free, thread-safe, single-producer/single-consumer circular message queue for short variable-length byte-sequence messages. See [the library](cbbq.h) for documentation. License: [MIT](LICENSE.md) ================================================ FILE: lib/cbbq/cbbq.h ================================================ /* cbbq.h C implementation of a lock-free, thread-safe, single-producer/single-consumer circular message queue for short variable-length byte-sequence messages by Michael Dewberry http://dewb.org https://github.com/dewb based directly on the "bbqueue" design by Andrea Lattuada and James Munns https://ferrous-systems.com/blog/lock-free-ring-buffer/ https://github.com/jamesmunns/bbqueue me: "C is terrible and nobody should write it, we should use languages with memory safety" also me: Requirements/notes * [TODO] C11 and support for recommended * if your MCU is too simple to reorder instructions, you might be okay without it (???) * Only one thread reads, only one thread writes * Individual message length 255 bytes or less * Queue size up to 2^32-1 bytes * [TODO] support multi-producer/single-consumer with an optional lock function on write? License: MIT Copyright © 2021 Michael Dewberry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef CBBQ_DEBUG #include #define ASSERT(expr) assert(expr); #define CHECK_INVARIANTS(q) \ ASSERT(q->read <= q->watermark); \ ASSERT(q->write <= q->watermark); \ ASSERT(q->read <= q->size); \ ASSERT(q->write <= q->size); \ ASSERT(q->watermark <= q->size); #else #define ASSERT(expr) #define CHECK_INVARIANTS(expr) #endif #include #include #include #include typedef struct { uint8_t* buf; uint32_t size; uint32_t read; uint32_t write; uint32_t watermark; } cbbq; void queue_init(cbbq* q, uint32_t size) { if (!q) { return; } q->buf = (uint8_t*)malloc(size); q->size = size; q->read = 0; q->write = 0; q->watermark = 0; } void queue_free(cbbq* q) { if (q) { free(q->buf); } } typedef enum { Success = 1, NoMessagesAvailable = 0, MessageTooLarge = -1, QueueFull = -2, } QueueResult; // Write a message into the queue. // queue_write should only be called by the producer thread. QueueResult queue_write(cbbq* q, uint8_t* msg_bytes, uint8_t msg_length) { CHECK_INVARIANTS(q) // total amount to write is the length byte plus the message contents uint32_t write_length = 1 + msg_length; if (write_length > q->size) { return MessageTooLarge; } // can we fit this message in the remaining area? if (q->size - q->write >= write_length) { if (q->read > q->write && q->read <= q->write + write_length) { // can't overtake read pointer return QueueFull; } // record the message length into the buffer *(q->buf + q->write) = msg_length; // copy the message bytes into the buffer memcpy(q->buf + q->write + 1, msg_bytes, msg_length); // move the write pointer ahead q->write = q->write + write_length; // if we're in the non-flipped case, update watermark if (q->read < q->write) { q->watermark = q->write; } } else // we have to wrap around { if (q->read <= write_length) { // can't overtake read pointer return QueueFull; } // set the high water mark at the previous write pointer q->watermark = q->write; // write pointer is now implicitly 0 // record the message length into the buffer *(q->buf) = msg_length; // copy the message bytes into the buffer memcpy(q->buf + 1, msg_bytes, msg_length); // update the write pointer q->write = write_length; } return Success; } // Read a message from the queue. // The contents of the pointer written to read_bytes is only valid until the next // call to queue_read. // queue_read should only be called by the consumer thread. QueueResult queue_read(cbbq* q, uint8_t** read_bytes, uint8_t* read_length) { CHECK_INVARIANTS(q) // are there messages left to read? if (q->read == q->write) { if (read_bytes) { *read_bytes = NULL; } if (read_length) { *read_length = 0; } return NoMessagesAvailable; } // if we are flipped and the read pointer reaches the watermark, next read starts at 0 if (q->read > q->write && q->read >= q->watermark) { q->read = 0; } // get the message length from the buffer uint8_t msg_length = *(q->buf + q->read); // give the consumer a pointer to the message if (read_bytes) { *read_bytes = q->buf + q->read + 1; } // give the consumer the message length if (read_length) { *read_length = msg_length; } // move the read pointer to the next message q->read = (q->read + msg_length + 1); return Success; } ================================================ FILE: lib/cbbq/test/.gitignore ================================================ bin a.out ================================================ FILE: lib/cbbq/test/cbbq_test.c ================================================ #define CBBQ_DEBUG #include "cbbq.h" #include "cbbq_utils.h" #include #include #define ASSERT(expr) assert(expr); #define QASSERT(expr) \ { \ bool tb = expr; \ printf("[%d] size: %d, read: %d, write: %d, watermark: %d, flipped: %s\n", \ __LINE__, q.size, q.read, q.write, q.watermark, q.read > q.write ? "true" : "false"); \ queue_display(&q); \ if (!tb) \ printf("FAIL: %s\n", #expr); \ assert(tb); \ } int main(void) { printf("\nTesting...\n\n"); cbbq q; queue_init(&q, 21); QASSERT(q.size == 21); uint8_t* rbuf; uint8_t rlen; // start with no messages QASSERT(NoMessagesAvailable == queue_read(&q, &rbuf, &rlen)); // quick write and immediate read QASSERT(queue_write(&q, (uint8_t[]) { 0xAA }, 1)); QASSERT(queue_read(&q, &rbuf, &rlen)); ASSERT(rlen == 1); ASSERT(rbuf[0] == 0xAA); ASSERT(q.write == 2); ASSERT(q.read == 2); QASSERT(NoMessagesAvailable == queue_read(&q, &rbuf, &rlen)); // fill the buffer with messages QASSERT(queue_write(&q, (uint8_t[]) { 0x01, 0x02, 0x03 }, 3)); QASSERT(queue_write(&q, (uint8_t[]) { 0x04, 0x05, 0x06, 0x07, 0x08 }, 5)); QASSERT(queue_write(&q, (uint8_t[]) { 0xFF, 0xFF }, 2)); QASSERT(queue_write(&q, (uint8_t[]) { 0xDE, 0xAD, 0xBE, 0xEF, 0xFF }, 5)); // try to insert a message that won't fit QASSERT(QueueFull == queue_write(&q, (uint8_t[]) { 0xDD, 0xDD, 0xDD }, 3)); // read the first message QASSERT(queue_read(&q, &rbuf, &rlen)); ASSERT(rlen == 3); ASSERT(rbuf[0] == 0x01); ASSERT(rbuf[1] == 0x02); ASSERT(rbuf[2] == 0x03); // read the second message QASSERT(queue_read(&q, &rbuf, &rlen)); ASSERT(rlen == 5); ASSERT(rbuf[0] == 0x04); ASSERT(rbuf[1] == 0x05); ASSERT(rbuf[2] == 0x06); ASSERT(rbuf[3] == 0x07); ASSERT(rbuf[4] == 0x08); // read the third message QASSERT(queue_read(&q, &rbuf, &rlen)); ASSERT(rlen == 2); ASSERT(rbuf[0] == 0xFF); ASSERT(rbuf[1] == 0xFF); // write a new message that wraps QASSERT(queue_write(&q, (uint8_t[]) { 0xAA, 0xBB, 0xCC, 0xDD }, 4)); ASSERT(q.write == 5); ASSERT(q.watermark == 21); // read the fourth message QASSERT(queue_read(&q, &rbuf, &rlen)); ASSERT(rlen == 5); ASSERT(rbuf[0] == 0xDE); ASSERT(rbuf[1] == 0xAD); ASSERT(rbuf[2] == 0xBE); ASSERT(rbuf[3] == 0xEF); ASSERT(rbuf[4] == 0xFF); // read the fifth message QASSERT(queue_read(&q, &rbuf, &rlen)); ASSERT(rlen == 4); ASSERT(rbuf[0] == 0xAA); ASSERT(rbuf[1] == 0xBB); ASSERT(rbuf[2] == 0xCC); ASSERT(rbuf[3] == 0xDD); // should be no more messages QASSERT(NoMessagesAvailable == queue_read(&q, &rbuf, &rlen)); // write more messages QASSERT(queue_write(&q, (uint8_t[]) { 0x01, 0x02, 0x03 }, 3)); QASSERT(queue_write(&q, (uint8_t[]) { 0x01, 0x02, 0x03 }, 3)); QASSERT(queue_write(&q, (uint8_t[]) { 0x01, 0x02, 0x03 }, 3)); // read the sixth message QASSERT(queue_read(&q, &rbuf, &rlen)); ASSERT(rlen == 3); ASSERT(rbuf[0] == 0x01); ASSERT(rbuf[1] == 0x02); ASSERT(rbuf[2] == 0x03); // this should wrap QASSERT(queue_write(&q, (uint8_t[]) { 0xAA, 0xAA, 0xAA, 0xAA, 0xAA }, 5)); ASSERT(q.write == 6); // this should barely fit in the remaining space before the read pointer QASSERT(queue_write(&q, (uint8_t[]) { 0x11 }, 1)); // this should fail because writing it would overtake read QASSERT(QueueFull == queue_write(&q, (uint8_t[]) { 0x11 }, 1)); // this should fail because it's larger than q.size QASSERT(MessageTooLarge == queue_write(&q, (uint8_t[]) { 0x11 }, 22)); printf("Tests passed.\n\n"); return 0; } ================================================ FILE: lib/cbbq/test/cbbq_utils.h ================================================ #pragma once #include // debugging utilities for cbbq void queue_display(cbbq* q) { for (int i = 0; i < q->size; i++) printf("%02X ", q->buf[i]); printf("\n"); uint8_t i1, i2, i3; char c1, c2, c3; if (q->read <= q->write && q->read <= q->watermark) { i1 = q->read; c1 = 'r'; if (q->write <= q->watermark) { i2 = q->write; c2 = 'w'; i3 = q->watermark; c3 = 'm'; } else { i3 = q->write; c3 = 'w'; i2 = q->watermark; c2 = 'm'; } } else if (q->write <= q->read && q->write <= q->watermark) { i1 = q->write; c1 = 'w'; if (q->read <= q->watermark) { i2 = q->read; c2 = 'r'; i3 = q->watermark; c3 = 'm'; } else { i3 = q->read; c3 = 'r'; i2 = q->watermark; c2 = 'm'; } } else { i1 = q->watermark; c1 = 'm'; if (q->read <= q->write) { i2 = q->read; c2 = 'r'; i3 = q->write; c3 = 'w'; } else { i3 = q->read; c3 = 'r'; i2 = q->write; c2 = 'w'; } } for (int x = 0; x < i1; x++) { printf(" "); } printf("%c", c1); if (i2 == i1) { printf("%c", c2); } else { printf(" "); for (int x = 0; x < i2 - i1 - 1; x++) { printf(" "); } printf("%c", c2); } if (i3 == i2) { printf("%c\n\n", c3); } else { printf(i2 == i1 ? " " : " "); for (int x = 0; x < i3 - i2 - 1; x++) { printf(" "); } printf("%c\n\n", c3); } } ================================================ FILE: lib/cbbq/test/test.sh ================================================ mkdir -p bin cc cbbq_test.c -I.. -o bin/cbbq_test && bin/cbbq_test ================================================ FILE: lib/oscpack/LICENSE ================================================ Oscpack is distributed under the MIT open source license: ``` Copyright © 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. ``` All feedback welcome. Please feel free to email comments to Ross at rossb@audiomulch.com ================================================ FILE: lib/oscpack/README.md ================================================ oscpack 1.1.0 by Ross Bencina http://www.rossbencina.com/code/oscpack ================================================ FILE: lib/oscpack/ip/IpEndpointName.cpp ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #include "IpEndpointName.h" #include #include "NetworkingUtils.h" unsigned long IpEndpointName::GetHostByName( const char *s ) { return ::GetHostByName(s); } void IpEndpointName::AddressAsString( char *s ) const { if( address == ANY_ADDRESS ){ std::sprintf( s, "" ); }else{ std::sprintf( s, "%d.%d.%d.%d", (int)((address >> 24) & 0xFF), (int)((address >> 16) & 0xFF), (int)((address >> 8) & 0xFF), (int)(address & 0xFF) ); } } void IpEndpointName::AddressAndPortAsString( char *s ) const { if( port == ANY_PORT ){ if( address == ANY_ADDRESS ){ std::sprintf( s, ":" ); }else{ std::sprintf( s, "%d.%d.%d.%d:", (int)((address >> 24) & 0xFF), (int)((address >> 16) & 0xFF), (int)((address >> 8) & 0xFF), (int)(address & 0xFF) ); } }else{ if( address == ANY_ADDRESS ){ std::sprintf( s, ":%d", port ); }else{ std::sprintf( s, "%d.%d.%d.%d:%d", (int)((address >> 24) & 0xFF), (int)((address >> 16) & 0xFF), (int)((address >> 8) & 0xFF), (int)(address & 0xFF), (int)port ); } } } ================================================ FILE: lib/oscpack/ip/IpEndpointName.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_IPENDPOINTNAME_H #define INCLUDED_OSCPACK_IPENDPOINTNAME_H class IpEndpointName{ static unsigned long GetHostByName( const char *s ); public: static const unsigned long ANY_ADDRESS = 0xFFFFFFFF; static const int ANY_PORT = -1; IpEndpointName() : address( ANY_ADDRESS ), port( ANY_PORT ) {} IpEndpointName( int port_ ) : address( ANY_ADDRESS ), port( port_ ) {} IpEndpointName( unsigned long ipAddress_, int port_ ) : address( ipAddress_ ), port( port_ ) {} IpEndpointName( const char *addressName, int port_=ANY_PORT ) : address( GetHostByName( addressName ) ) , port( port_ ) {} IpEndpointName( int addressA, int addressB, int addressC, int addressD, int port_=ANY_PORT ) : address( ( (addressA << 24) | (addressB << 16) | (addressC << 8) | addressD ) ) , port( port_ ) {} // address and port are maintained in host byte order here unsigned long address; int port; bool IsMulticastAddress() const { return ((address >> 24) & 0xFF) >= 224 && ((address >> 24) & 0xFF) <= 239; } enum { ADDRESS_STRING_LENGTH=17 }; void AddressAsString( char *s ) const; enum { ADDRESS_AND_PORT_STRING_LENGTH=23}; void AddressAndPortAsString( char *s ) const; }; inline bool operator==( const IpEndpointName& lhs, const IpEndpointName& rhs ) { return (lhs.address == rhs.address && lhs.port == rhs.port ); } inline bool operator!=( const IpEndpointName& lhs, const IpEndpointName& rhs ) { return !(lhs == rhs); } #endif /* INCLUDED_OSCPACK_IPENDPOINTNAME_H */ ================================================ FILE: lib/oscpack/ip/NetworkingUtils.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_NETWORKINGUTILS_H #define INCLUDED_OSCPACK_NETWORKINGUTILS_H // in general NetworkInitializer is only used internally, but if you're // application creates multiple sockets from different threads at runtime you // should instantiate one of these in main just to make sure the networking // layer is initialized. class NetworkInitializer{ public: NetworkInitializer(); ~NetworkInitializer(); }; // return ip address of host name in host byte order unsigned long GetHostByName( const char *name ); #endif /* INCLUDED_OSCPACK_NETWORKINGUTILS_H */ ================================================ FILE: lib/oscpack/ip/PacketListener.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_PACKETLISTENER_H #define INCLUDED_OSCPACK_PACKETLISTENER_H class IpEndpointName; class PacketListener{ public: virtual ~PacketListener() {} virtual void ProcessPacket( const char *data, int size, const IpEndpointName& remoteEndpoint ) = 0; }; #endif /* INCLUDED_OSCPACK_PACKETLISTENER_H */ ================================================ FILE: lib/oscpack/ip/TimerListener.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_TIMERLISTENER_H #define INCLUDED_OSCPACK_TIMERLISTENER_H class TimerListener{ public: virtual ~TimerListener() {} virtual void TimerExpired() = 0; }; #endif /* INCLUDED_OSCPACK_TIMERLISTENER_H */ ================================================ FILE: lib/oscpack/ip/UdpSocket.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_UDPSOCKET_H #define INCLUDED_OSCPACK_UDPSOCKET_H #include // size_t #include "NetworkingUtils.h" #include "IpEndpointName.h" class PacketListener; class TimerListener; class UdpSocket; class SocketReceiveMultiplexer{ class Implementation; Implementation *impl_; friend class UdpSocket; public: SocketReceiveMultiplexer(); ~SocketReceiveMultiplexer(); // only call the attach/detach methods _before_ calling Run // only one listener per socket, each socket at most once void AttachSocketListener( UdpSocket *socket, PacketListener *listener ); void DetachSocketListener( UdpSocket *socket, PacketListener *listener ); void AttachPeriodicTimerListener( int periodMilliseconds, TimerListener *listener ); void AttachPeriodicTimerListener( int initialDelayMilliseconds, int periodMilliseconds, TimerListener *listener ); void DetachPeriodicTimerListener( TimerListener *listener ); void Run(); // loop and block processing messages indefinitely void RunUntilSigInt(); void Break(); // call this from a listener to exit once the listener returns void AsynchronousBreak(); // call this from another thread or signal handler to exit the Run() state }; class UdpSocket{ class Implementation; Implementation *impl_; friend class SocketReceiveMultiplexer::Implementation; public: // Ctor throws std::runtime_error if there's a problem // initializing the socket. UdpSocket(); virtual ~UdpSocket(); // Enable broadcast addresses (e.g. x.x.x.255) // Sets SO_BROADCAST socket option. void SetEnableBroadcast( bool enableBroadcast ); // Enable multiple listeners for a single port on same // network interface* // Sets SO_REUSEADDR (also SO_REUSEPORT on OS X). // [*] The exact behavior of SO_REUSEADDR and // SO_REUSEPORT is undefined for some common cases // and may have drastically different behavior on different // operating systems. void SetAllowReuse( bool allowReuse ); // The socket is created in an unbound, unconnected state // such a socket can only be used to send to an arbitrary // address using SendTo(). To use Send() you need to first // connect to a remote endpoint using Connect(). To use // ReceiveFrom you need to first bind to a local endpoint // using Bind(). // Retrieve the local endpoint name when sending to 'to' IpEndpointName LocalEndpointFor( const IpEndpointName& remoteEndpoint ) const; // Connect to a remote endpoint which is used as the target // for calls to Send() void Connect( const IpEndpointName& remoteEndpoint ); void Send( const char *data, std::size_t size ); void SendTo( const IpEndpointName& remoteEndpoint, const char *data, std::size_t size ); // Bind a local endpoint to receive incoming data. Endpoint // can be 'any' for the system to choose an endpoint void Bind( const IpEndpointName& localEndpoint ); bool IsBound() const; std::size_t ReceiveFrom( IpEndpointName& remoteEndpoint, char *data, std::size_t size ); }; // convenience classes for transmitting and receiving // they just call Connect and/or Bind in the ctor. // note that you can still use a receive socket // for transmitting etc class UdpTransmitSocket : public UdpSocket{ public: UdpTransmitSocket( const IpEndpointName& remoteEndpoint ) { Connect( remoteEndpoint ); } }; class UdpReceiveSocket : public UdpSocket{ public: UdpReceiveSocket( const IpEndpointName& localEndpoint ) { Bind( localEndpoint ); } }; // UdpListeningReceiveSocket provides a simple way to bind one listener // to a single socket without having to manually set up a SocketReceiveMultiplexer class UdpListeningReceiveSocket : public UdpSocket{ SocketReceiveMultiplexer mux_; PacketListener *listener_; public: UdpListeningReceiveSocket( const IpEndpointName& localEndpoint, PacketListener *listener ) : listener_( listener ) { Bind( localEndpoint ); mux_.AttachSocketListener( this, listener_ ); } ~UdpListeningReceiveSocket() { mux_.DetachSocketListener( this, listener_ ); } // see SocketReceiveMultiplexer above for the behaviour of these methods... void Run() { mux_.Run(); } void RunUntilSigInt() { mux_.RunUntilSigInt(); } void Break() { mux_.Break(); } void AsynchronousBreak() { mux_.AsynchronousBreak(); } }; #endif /* INCLUDED_OSCPACK_UDPSOCKET_H */ ================================================ FILE: lib/oscpack/ip/posix/NetworkingUtils.cpp ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #include "ip/NetworkingUtils.h" #include #include #include #include NetworkInitializer::NetworkInitializer() {} NetworkInitializer::~NetworkInitializer() {} unsigned long GetHostByName( const char *name ) { unsigned long result = 0; struct hostent *h = gethostbyname( name ); if( h ){ struct in_addr a; std::memcpy( &a, h->h_addr_list[0], h->h_length ); result = ntohl(a.s_addr); } return result; } ================================================ FILE: lib/oscpack/ip/posix/UdpSocket.cpp ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #include "ip/UdpSocket.h" #include #include #include #include #include #include #include #include #include // for sockaddr_in #include #include #include #include #include #include #include // for memset #include #include #include "ip/PacketListener.h" #include "ip/TimerListener.h" #if defined(__APPLE__) && !defined(_SOCKLEN_T) // pre system 10.3 didn't have socklen_t typedef ssize_t socklen_t; #endif static void SockaddrFromIpEndpointName( struct sockaddr_in& sockAddr, const IpEndpointName& endpoint ) { std::memset( (char *)&sockAddr, 0, sizeof(sockAddr ) ); sockAddr.sin_family = AF_INET; sockAddr.sin_addr.s_addr = (endpoint.address == IpEndpointName::ANY_ADDRESS) ? INADDR_ANY : htonl( endpoint.address ); sockAddr.sin_port = (endpoint.port == IpEndpointName::ANY_PORT) ? 0 : htons( endpoint.port ); } static IpEndpointName IpEndpointNameFromSockaddr( const struct sockaddr_in& sockAddr ) { return IpEndpointName( (sockAddr.sin_addr.s_addr == INADDR_ANY) ? IpEndpointName::ANY_ADDRESS : ntohl( sockAddr.sin_addr.s_addr ), (sockAddr.sin_port == 0) ? IpEndpointName::ANY_PORT : ntohs( sockAddr.sin_port ) ); } class UdpSocket::Implementation{ bool isBound_; bool isConnected_; int socket_; struct sockaddr_in connectedAddr_; struct sockaddr_in sendToAddr_; public: Implementation() : isBound_( false ) , isConnected_( false ) , socket_( -1 ) { if( (socket_ = socket( AF_INET, SOCK_DGRAM, 0 )) == -1 ){ throw std::runtime_error("unable to create udp socket\n"); } std::memset( &sendToAddr_, 0, sizeof(sendToAddr_) ); sendToAddr_.sin_family = AF_INET; } ~Implementation() { if (socket_ != -1) close(socket_); } void SetEnableBroadcast( bool enableBroadcast ) { int broadcast = (enableBroadcast) ? 1 : 0; // int on posix setsockopt(socket_, SOL_SOCKET, SO_BROADCAST, &broadcast, sizeof(broadcast)); } void SetAllowReuse( bool allowReuse ) { int reuseAddr = (allowReuse) ? 1 : 0; // int on posix setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR, &reuseAddr, sizeof(reuseAddr)); #ifdef __APPLE__ // needed also for OS X - enable multiple listeners for a single port on same network interface int reusePort = (allowReuse) ? 1 : 0; // int on posix setsockopt(socket_, SOL_SOCKET, SO_REUSEPORT, &reusePort, sizeof(reusePort)); #endif } IpEndpointName LocalEndpointFor( const IpEndpointName& remoteEndpoint ) const { assert( isBound_ ); // first connect the socket to the remote server struct sockaddr_in connectSockAddr; SockaddrFromIpEndpointName( connectSockAddr, remoteEndpoint ); if (connect(socket_, (struct sockaddr *)&connectSockAddr, sizeof(connectSockAddr)) < 0) { throw std::runtime_error("unable to connect udp socket\n"); } // get the address struct sockaddr_in sockAddr; std::memset( (char *)&sockAddr, 0, sizeof(sockAddr ) ); socklen_t length = sizeof(sockAddr); if (getsockname(socket_, (struct sockaddr *)&sockAddr, &length) < 0) { throw std::runtime_error("unable to getsockname\n"); } if( isConnected_ ){ // reconnect to the connected address if (connect(socket_, (struct sockaddr *)&connectedAddr_, sizeof(connectedAddr_)) < 0) { throw std::runtime_error("unable to connect udp socket\n"); } }else{ // unconnect from the remote address struct sockaddr_in unconnectSockAddr; std::memset( (char *)&unconnectSockAddr, 0, sizeof(unconnectSockAddr ) ); unconnectSockAddr.sin_family = AF_UNSPEC; // address fields are zero int connectResult = connect(socket_, (struct sockaddr *)&unconnectSockAddr, sizeof(unconnectSockAddr)); if ( connectResult < 0 && errno != EAFNOSUPPORT ) { throw std::runtime_error("unable to un-connect udp socket\n"); } } return IpEndpointNameFromSockaddr( sockAddr ); } void Connect( const IpEndpointName& remoteEndpoint ) { SockaddrFromIpEndpointName( connectedAddr_, remoteEndpoint ); if (connect(socket_, (struct sockaddr *)&connectedAddr_, sizeof(connectedAddr_)) < 0) { throw std::runtime_error("unable to connect udp socket\n"); } isConnected_ = true; } void Send( const char *data, std::size_t size ) { assert( isConnected_ ); send( socket_, data, size, 0 ); } void SendTo( const IpEndpointName& remoteEndpoint, const char *data, std::size_t size ) { sendToAddr_.sin_addr.s_addr = htonl( remoteEndpoint.address ); sendToAddr_.sin_port = htons( remoteEndpoint.port ); sendto( socket_, data, size, 0, (sockaddr*)&sendToAddr_, sizeof(sendToAddr_) ); } void Bind( const IpEndpointName& localEndpoint ) { struct sockaddr_in bindSockAddr; SockaddrFromIpEndpointName( bindSockAddr, localEndpoint ); if (bind(socket_, (struct sockaddr *)&bindSockAddr, sizeof(bindSockAddr)) < 0) { throw std::runtime_error("unable to bind udp socket\n"); } isBound_ = true; } bool IsBound() const { return isBound_; } std::size_t ReceiveFrom( IpEndpointName& remoteEndpoint, char *data, std::size_t size ) { assert( isBound_ ); struct sockaddr_in fromAddr; socklen_t fromAddrLen = sizeof(fromAddr); ssize_t result = recvfrom(socket_, data, size, 0, (struct sockaddr *) &fromAddr, (socklen_t*)&fromAddrLen); if( result < 0 ) return 0; remoteEndpoint.address = ntohl(fromAddr.sin_addr.s_addr); remoteEndpoint.port = ntohs(fromAddr.sin_port); return (std::size_t)result; } int Socket() { return socket_; } }; UdpSocket::UdpSocket() { impl_ = new Implementation(); } UdpSocket::~UdpSocket() { delete impl_; } void UdpSocket::SetEnableBroadcast( bool enableBroadcast ) { impl_->SetEnableBroadcast( enableBroadcast ); } void UdpSocket::SetAllowReuse( bool allowReuse ) { impl_->SetAllowReuse( allowReuse ); } IpEndpointName UdpSocket::LocalEndpointFor( const IpEndpointName& remoteEndpoint ) const { return impl_->LocalEndpointFor( remoteEndpoint ); } void UdpSocket::Connect( const IpEndpointName& remoteEndpoint ) { impl_->Connect( remoteEndpoint ); } void UdpSocket::Send( const char *data, std::size_t size ) { impl_->Send( data, size ); } void UdpSocket::SendTo( const IpEndpointName& remoteEndpoint, const char *data, std::size_t size ) { impl_->SendTo( remoteEndpoint, data, size ); } void UdpSocket::Bind( const IpEndpointName& localEndpoint ) { impl_->Bind( localEndpoint ); } bool UdpSocket::IsBound() const { return impl_->IsBound(); } std::size_t UdpSocket::ReceiveFrom( IpEndpointName& remoteEndpoint, char *data, std::size_t size ) { return impl_->ReceiveFrom( remoteEndpoint, data, size ); } struct AttachedTimerListener{ AttachedTimerListener( int id, int p, TimerListener *tl ) : initialDelayMs( id ) , periodMs( p ) , listener( tl ) {} int initialDelayMs; int periodMs; TimerListener *listener; }; static bool CompareScheduledTimerCalls( const std::pair< double, AttachedTimerListener > & lhs, const std::pair< double, AttachedTimerListener > & rhs ) { return lhs.first < rhs.first; } SocketReceiveMultiplexer *multiplexerInstanceToAbortWithSigInt_ = 0; extern "C" /*static*/ void InterruptSignalHandler( int ); /*static*/ void InterruptSignalHandler( int ) { multiplexerInstanceToAbortWithSigInt_->AsynchronousBreak(); signal( SIGINT, SIG_DFL ); } class SocketReceiveMultiplexer::Implementation{ std::vector< std::pair< PacketListener*, UdpSocket* > > socketListeners_; std::vector< AttachedTimerListener > timerListeners_; volatile bool break_; int breakPipe_[2]; // [0] is the reader descriptor and [1] the writer double GetCurrentTimeMs() const { struct timeval t; gettimeofday( &t, 0 ); return ((double)t.tv_sec*1000.) + ((double)t.tv_usec / 1000.); } public: Implementation() { if( pipe(breakPipe_) != 0 ) throw std::runtime_error( "creation of asynchronous break pipes failed\n" ); } ~Implementation() { close( breakPipe_[0] ); close( breakPipe_[1] ); } void AttachSocketListener( UdpSocket *socket, PacketListener *listener ) { assert( std::find( socketListeners_.begin(), socketListeners_.end(), std::make_pair(listener, socket) ) == socketListeners_.end() ); // we don't check that the same socket has been added multiple times, even though this is an error socketListeners_.push_back( std::make_pair( listener, socket ) ); } void DetachSocketListener( UdpSocket *socket, PacketListener *listener ) { std::vector< std::pair< PacketListener*, UdpSocket* > >::iterator i = std::find( socketListeners_.begin(), socketListeners_.end(), std::make_pair(listener, socket) ); assert( i != socketListeners_.end() ); socketListeners_.erase( i ); } void AttachPeriodicTimerListener( int periodMilliseconds, TimerListener *listener ) { timerListeners_.push_back( AttachedTimerListener( periodMilliseconds, periodMilliseconds, listener ) ); } void AttachPeriodicTimerListener( int initialDelayMilliseconds, int periodMilliseconds, TimerListener *listener ) { timerListeners_.push_back( AttachedTimerListener( initialDelayMilliseconds, periodMilliseconds, listener ) ); } void DetachPeriodicTimerListener( TimerListener *listener ) { std::vector< AttachedTimerListener >::iterator i = timerListeners_.begin(); while( i != timerListeners_.end() ){ if( i->listener == listener ) break; ++i; } assert( i != timerListeners_.end() ); timerListeners_.erase( i ); } void Run() { break_ = false; char *data = 0; try{ // configure the master fd_set for select() fd_set masterfds, tempfds; FD_ZERO( &masterfds ); FD_ZERO( &tempfds ); // in addition to listening to the inbound sockets we // also listen to the asynchronous break pipe, so that AsynchronousBreak() // can break us out of select() from another thread. FD_SET( breakPipe_[0], &masterfds ); int fdmax = breakPipe_[0]; for( std::vector< std::pair< PacketListener*, UdpSocket* > >::iterator i = socketListeners_.begin(); i != socketListeners_.end(); ++i ){ if( fdmax < i->second->impl_->Socket() ) fdmax = i->second->impl_->Socket(); FD_SET( i->second->impl_->Socket(), &masterfds ); } // configure the timer queue double currentTimeMs = GetCurrentTimeMs(); // expiry time ms, listener std::vector< std::pair< double, AttachedTimerListener > > timerQueue_; for( std::vector< AttachedTimerListener >::iterator i = timerListeners_.begin(); i != timerListeners_.end(); ++i ) timerQueue_.push_back( std::make_pair( currentTimeMs + i->initialDelayMs, *i ) ); std::sort( timerQueue_.begin(), timerQueue_.end(), CompareScheduledTimerCalls ); const int MAX_BUFFER_SIZE = 4098; data = new char[ MAX_BUFFER_SIZE ]; IpEndpointName remoteEndpoint; struct timeval timeout; while( !break_ ){ tempfds = masterfds; struct timeval *timeoutPtr = 0; if( !timerQueue_.empty() ){ double timeoutMs = timerQueue_.front().first - GetCurrentTimeMs(); if( timeoutMs < 0 ) timeoutMs = 0; long timoutSecondsPart = (long)(timeoutMs * .001); timeout.tv_sec = (time_t)timoutSecondsPart; // 1000000 microseconds in a second timeout.tv_usec = (suseconds_t)((timeoutMs - (timoutSecondsPart * 1000)) * 1000); timeoutPtr = &timeout; } if( select( fdmax + 1, &tempfds, 0, 0, timeoutPtr ) < 0 ){ if( break_ ){ break; }else if( errno == EINTR ){ // on returning an error, select() doesn't clear tempfds. // so tempfds would remain all set, which would cause read( breakPipe_[0]... // below to block indefinitely. therefore if select returns EINTR we restart // the while() loop instead of continuing on to below. continue; }else{ throw std::runtime_error("select failed\n"); } } if( FD_ISSET( breakPipe_[0], &tempfds ) ){ // clear pending data from the asynchronous break pipe char c; read( breakPipe_[0], &c, 1 ); } if( break_ ) break; for( std::vector< std::pair< PacketListener*, UdpSocket* > >::iterator i = socketListeners_.begin(); i != socketListeners_.end(); ++i ){ if( FD_ISSET( i->second->impl_->Socket(), &tempfds ) ){ std::size_t size = i->second->ReceiveFrom( remoteEndpoint, data, MAX_BUFFER_SIZE ); if( size > 0 ){ i->first->ProcessPacket( data, (int)size, remoteEndpoint ); if( break_ ) break; } } } // execute any expired timers currentTimeMs = GetCurrentTimeMs(); bool resort = false; for( std::vector< std::pair< double, AttachedTimerListener > >::iterator i = timerQueue_.begin(); i != timerQueue_.end() && i->first <= currentTimeMs; ++i ){ i->second.listener->TimerExpired(); if( break_ ) break; i->first += i->second.periodMs; resort = true; } if( resort ) std::sort( timerQueue_.begin(), timerQueue_.end(), CompareScheduledTimerCalls ); } delete [] data; }catch(...){ if( data ) delete [] data; throw; } } void Break() { break_ = true; } void AsynchronousBreak() { break_ = true; // Send a termination message to the asynchronous break pipe, so select() will return write( breakPipe_[1], "!", 1 ); } }; SocketReceiveMultiplexer::SocketReceiveMultiplexer() { impl_ = new Implementation(); } SocketReceiveMultiplexer::~SocketReceiveMultiplexer() { delete impl_; } void SocketReceiveMultiplexer::AttachSocketListener( UdpSocket *socket, PacketListener *listener ) { impl_->AttachSocketListener( socket, listener ); } void SocketReceiveMultiplexer::DetachSocketListener( UdpSocket *socket, PacketListener *listener ) { impl_->DetachSocketListener( socket, listener ); } void SocketReceiveMultiplexer::AttachPeriodicTimerListener( int periodMilliseconds, TimerListener *listener ) { impl_->AttachPeriodicTimerListener( periodMilliseconds, listener ); } void SocketReceiveMultiplexer::AttachPeriodicTimerListener( int initialDelayMilliseconds, int periodMilliseconds, TimerListener *listener ) { impl_->AttachPeriodicTimerListener( initialDelayMilliseconds, periodMilliseconds, listener ); } void SocketReceiveMultiplexer::DetachPeriodicTimerListener( TimerListener *listener ) { impl_->DetachPeriodicTimerListener( listener ); } void SocketReceiveMultiplexer::Run() { impl_->Run(); } void SocketReceiveMultiplexer::RunUntilSigInt() { assert( multiplexerInstanceToAbortWithSigInt_ == 0 ); /* at present we support only one multiplexer instance running until sig int */ multiplexerInstanceToAbortWithSigInt_ = this; signal( SIGINT, InterruptSignalHandler ); impl_->Run(); signal( SIGINT, SIG_DFL ); multiplexerInstanceToAbortWithSigInt_ = 0; } void SocketReceiveMultiplexer::Break() { impl_->Break(); } void SocketReceiveMultiplexer::AsynchronousBreak() { impl_->AsynchronousBreak(); } ================================================ FILE: lib/oscpack/ip/win32/NetworkingUtils.cpp ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #include "ip/NetworkingUtils.h" #include // this must come first to prevent errors with MSVC7 #include #include static LONG initCount_ = 0; static bool winsockInitialized_ = false; NetworkInitializer::NetworkInitializer() { if( InterlockedIncrement( &initCount_ ) == 1 ){ // there is a race condition here if one thread tries to access // the library while another is still initializing it. // i can't think of an easy way to fix it so i'm telling you here // incase you need to init the library from two threads at once. // this is why the header file advises to instantiate one of these // in main() so that the initialization happens globally // initialize winsock WSAData wsaData; int nCode = WSAStartup(MAKEWORD(1, 1), &wsaData); if( nCode != 0 ){ //std::cout << "WSAStartup() failed with error code " << nCode << "\n"; }else{ winsockInitialized_ = true; } } } NetworkInitializer::~NetworkInitializer() { if( InterlockedDecrement( &initCount_ ) == 0 ){ if( winsockInitialized_ ){ WSACleanup(); winsockInitialized_ = false; } } } unsigned long GetHostByName( const char *name ) { NetworkInitializer networkInitializer; unsigned long result = 0; struct hostent *h = gethostbyname( name ); if( h ){ struct in_addr a; std::memcpy( &a, h->h_addr_list[0], h->h_length ); result = ntohl(a.s_addr); } return result; } ================================================ FILE: lib/oscpack/ip/win32/UdpSocket.cpp ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #include // this must come first to prevent errors with MSVC7 #include #include // for timeGetTime() #ifndef WINCE #include #endif #include #include #include // for memset #include #include #include "ip/UdpSocket.h" // usually I'd include the module header first // but this is causing conflicts with BCB4 due to // std::size_t usage. #include "ip/NetworkingUtils.h" #include "ip/PacketListener.h" #include "ip/TimerListener.h" typedef int socklen_t; static void SockaddrFromIpEndpointName( struct sockaddr_in& sockAddr, const IpEndpointName& endpoint ) { std::memset( (char *)&sockAddr, 0, sizeof(sockAddr ) ); sockAddr.sin_family = AF_INET; sockAddr.sin_addr.s_addr = (endpoint.address == IpEndpointName::ANY_ADDRESS) ? INADDR_ANY : htonl( endpoint.address ); sockAddr.sin_port = (endpoint.port == IpEndpointName::ANY_PORT) ? (short)0 : htons( (short)endpoint.port ); } static IpEndpointName IpEndpointNameFromSockaddr( const struct sockaddr_in& sockAddr ) { return IpEndpointName( (sockAddr.sin_addr.s_addr == INADDR_ANY) ? IpEndpointName::ANY_ADDRESS : ntohl( sockAddr.sin_addr.s_addr ), (sockAddr.sin_port == 0) ? IpEndpointName::ANY_PORT : ntohs( sockAddr.sin_port ) ); } class UdpSocket::Implementation{ NetworkInitializer networkInitializer_; bool isBound_; bool isConnected_; SOCKET socket_; struct sockaddr_in connectedAddr_; struct sockaddr_in sendToAddr_; public: Implementation() : isBound_( false ) , isConnected_( false ) , socket_( INVALID_SOCKET ) { if( (socket_ = socket( AF_INET, SOCK_DGRAM, 0 )) == INVALID_SOCKET ){ throw std::runtime_error("unable to create udp socket\n"); } std::memset( &sendToAddr_, 0, sizeof(sendToAddr_) ); sendToAddr_.sin_family = AF_INET; } ~Implementation() { if (socket_ != INVALID_SOCKET) closesocket(socket_); } void SetEnableBroadcast( bool enableBroadcast ) { char broadcast = (char)((enableBroadcast) ? 1 : 0); // char on win32 setsockopt(socket_, SOL_SOCKET, SO_BROADCAST, &broadcast, sizeof(broadcast)); } void SetAllowReuse( bool allowReuse ) { // Note: SO_REUSEADDR is non-deterministic for listening sockets on Win32. See MSDN article: // "Using SO_REUSEADDR and SO_EXCLUSIVEADDRUSE" // http://msdn.microsoft.com/en-us/library/ms740621%28VS.85%29.aspx char reuseAddr = (char)((allowReuse) ? 1 : 0); // char on win32 setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR, &reuseAddr, sizeof(reuseAddr)); } IpEndpointName LocalEndpointFor( const IpEndpointName& remoteEndpoint ) const { assert( isBound_ ); // first connect the socket to the remote server struct sockaddr_in connectSockAddr; SockaddrFromIpEndpointName( connectSockAddr, remoteEndpoint ); if (connect(socket_, (struct sockaddr *)&connectSockAddr, sizeof(connectSockAddr)) < 0) { throw std::runtime_error("unable to connect udp socket\n"); } // get the address struct sockaddr_in sockAddr; std::memset( (char *)&sockAddr, 0, sizeof(sockAddr ) ); socklen_t length = sizeof(sockAddr); if (getsockname(socket_, (struct sockaddr *)&sockAddr, &length) < 0) { throw std::runtime_error("unable to getsockname\n"); } if( isConnected_ ){ // reconnect to the connected address if (connect(socket_, (struct sockaddr *)&connectedAddr_, sizeof(connectedAddr_)) < 0) { throw std::runtime_error("unable to connect udp socket\n"); } }else{ // unconnect from the remote address struct sockaddr_in unconnectSockAddr; SockaddrFromIpEndpointName( unconnectSockAddr, IpEndpointName() ); if( connect(socket_, (struct sockaddr *)&unconnectSockAddr, sizeof(unconnectSockAddr)) < 0 && WSAGetLastError() != WSAEADDRNOTAVAIL ){ throw std::runtime_error("unable to un-connect udp socket\n"); } } return IpEndpointNameFromSockaddr( sockAddr ); } void Connect( const IpEndpointName& remoteEndpoint ) { SockaddrFromIpEndpointName( connectedAddr_, remoteEndpoint ); if (connect(socket_, (struct sockaddr *)&connectedAddr_, sizeof(connectedAddr_)) < 0) { throw std::runtime_error("unable to connect udp socket\n"); } isConnected_ = true; } void Send( const char *data, std::size_t size ) { assert( isConnected_ ); send( socket_, data, (int)size, 0 ); } void SendTo( const IpEndpointName& remoteEndpoint, const char *data, std::size_t size ) { sendToAddr_.sin_addr.s_addr = htonl( remoteEndpoint.address ); sendToAddr_.sin_port = htons( (short)remoteEndpoint.port ); sendto( socket_, data, (int)size, 0, (sockaddr*)&sendToAddr_, sizeof(sendToAddr_) ); } void Bind( const IpEndpointName& localEndpoint ) { struct sockaddr_in bindSockAddr; SockaddrFromIpEndpointName( bindSockAddr, localEndpoint ); if (bind(socket_, (struct sockaddr *)&bindSockAddr, sizeof(bindSockAddr)) < 0) { throw std::runtime_error("unable to bind udp socket\n"); } isBound_ = true; } bool IsBound() const { return isBound_; } std::size_t ReceiveFrom( IpEndpointName& remoteEndpoint, char *data, std::size_t size ) { assert( isBound_ ); struct sockaddr_in fromAddr; socklen_t fromAddrLen = sizeof(fromAddr); int result = recvfrom(socket_, data, (int)size, 0, (struct sockaddr *) &fromAddr, (socklen_t*)&fromAddrLen); if( result < 0 ) return 0; remoteEndpoint.address = ntohl(fromAddr.sin_addr.s_addr); remoteEndpoint.port = ntohs(fromAddr.sin_port); return result; } SOCKET& Socket() { return socket_; } }; UdpSocket::UdpSocket() { impl_ = new Implementation(); } UdpSocket::~UdpSocket() { delete impl_; } void UdpSocket::SetEnableBroadcast( bool enableBroadcast ) { impl_->SetEnableBroadcast( enableBroadcast ); } void UdpSocket::SetAllowReuse( bool allowReuse ) { impl_->SetAllowReuse( allowReuse ); } IpEndpointName UdpSocket::LocalEndpointFor( const IpEndpointName& remoteEndpoint ) const { return impl_->LocalEndpointFor( remoteEndpoint ); } void UdpSocket::Connect( const IpEndpointName& remoteEndpoint ) { impl_->Connect( remoteEndpoint ); } void UdpSocket::Send( const char *data, std::size_t size ) { impl_->Send( data, size ); } void UdpSocket::SendTo( const IpEndpointName& remoteEndpoint, const char *data, std::size_t size ) { impl_->SendTo( remoteEndpoint, data, size ); } void UdpSocket::Bind( const IpEndpointName& localEndpoint ) { impl_->Bind( localEndpoint ); } bool UdpSocket::IsBound() const { return impl_->IsBound(); } std::size_t UdpSocket::ReceiveFrom( IpEndpointName& remoteEndpoint, char *data, std::size_t size ) { return impl_->ReceiveFrom( remoteEndpoint, data, size ); } struct AttachedTimerListener{ AttachedTimerListener( int id, int p, TimerListener *tl ) : initialDelayMs( id ) , periodMs( p ) , listener( tl ) {} int initialDelayMs; int periodMs; TimerListener *listener; }; static bool CompareScheduledTimerCalls( const std::pair< double, AttachedTimerListener > & lhs, const std::pair< double, AttachedTimerListener > & rhs ) { return lhs.first < rhs.first; } SocketReceiveMultiplexer *multiplexerInstanceToAbortWithSigInt_ = 0; extern "C" /*static*/ void InterruptSignalHandler( int ); /*static*/ void InterruptSignalHandler( int ) { multiplexerInstanceToAbortWithSigInt_->AsynchronousBreak(); #ifndef WINCE signal( SIGINT, SIG_DFL ); #endif } class SocketReceiveMultiplexer::Implementation{ NetworkInitializer networkInitializer_; std::vector< std::pair< PacketListener*, UdpSocket* > > socketListeners_; std::vector< AttachedTimerListener > timerListeners_; volatile bool break_; HANDLE breakEvent_; double GetCurrentTimeMs() const { #ifndef WINCE return timeGetTime(); // FIXME: bad choice if you want to run for more than 40 days #else return 0; #endif } public: Implementation() { breakEvent_ = CreateEvent( NULL, FALSE, FALSE, NULL ); } ~Implementation() { CloseHandle( breakEvent_ ); } void AttachSocketListener( UdpSocket *socket, PacketListener *listener ) { assert( std::find( socketListeners_.begin(), socketListeners_.end(), std::make_pair(listener, socket) ) == socketListeners_.end() ); // we don't check that the same socket has been added multiple times, even though this is an error socketListeners_.push_back( std::make_pair( listener, socket ) ); } void DetachSocketListener( UdpSocket *socket, PacketListener *listener ) { std::vector< std::pair< PacketListener*, UdpSocket* > >::iterator i = std::find( socketListeners_.begin(), socketListeners_.end(), std::make_pair(listener, socket) ); assert( i != socketListeners_.end() ); socketListeners_.erase( i ); } void AttachPeriodicTimerListener( int periodMilliseconds, TimerListener *listener ) { timerListeners_.push_back( AttachedTimerListener( periodMilliseconds, periodMilliseconds, listener ) ); } void AttachPeriodicTimerListener( int initialDelayMilliseconds, int periodMilliseconds, TimerListener *listener ) { timerListeners_.push_back( AttachedTimerListener( initialDelayMilliseconds, periodMilliseconds, listener ) ); } void DetachPeriodicTimerListener( TimerListener *listener ) { std::vector< AttachedTimerListener >::iterator i = timerListeners_.begin(); while( i != timerListeners_.end() ){ if( i->listener == listener ) break; ++i; } assert( i != timerListeners_.end() ); timerListeners_.erase( i ); } void Run() { break_ = false; // prepare the window events which we use to wake up on incoming data // we use this instead of select() primarily to support the AsyncBreak() // mechanism. std::vector events( socketListeners_.size() + 1, 0 ); int j=0; for( std::vector< std::pair< PacketListener*, UdpSocket* > >::iterator i = socketListeners_.begin(); i != socketListeners_.end(); ++i, ++j ){ HANDLE event = CreateEvent( NULL, FALSE, FALSE, NULL ); WSAEventSelect( i->second->impl_->Socket(), event, FD_READ ); // note that this makes the socket non-blocking which is why we can safely call RecieveFrom() on all sockets below events[j] = event; } events[ socketListeners_.size() ] = breakEvent_; // last event in the collection is the break event // configure the timer queue double currentTimeMs = GetCurrentTimeMs(); // expiry time ms, listener std::vector< std::pair< double, AttachedTimerListener > > timerQueue_; for( std::vector< AttachedTimerListener >::iterator i = timerListeners_.begin(); i != timerListeners_.end(); ++i ) timerQueue_.push_back( std::make_pair( currentTimeMs + i->initialDelayMs, *i ) ); std::sort( timerQueue_.begin(), timerQueue_.end(), CompareScheduledTimerCalls ); const int MAX_BUFFER_SIZE = 4098; char *data = new char[ MAX_BUFFER_SIZE ]; IpEndpointName remoteEndpoint; while( !break_ ){ double currentTimeMs = GetCurrentTimeMs(); DWORD waitTime = INFINITE; if( !timerQueue_.empty() ){ waitTime = (DWORD)( timerQueue_.front().first >= currentTimeMs ? timerQueue_.front().first - currentTimeMs : 0 ); } DWORD waitResult = WaitForMultipleObjects( (DWORD)socketListeners_.size() + 1, &events[0], FALSE, waitTime ); if( break_ ) break; if( waitResult != WAIT_TIMEOUT ){ for( int i = waitResult - WAIT_OBJECT_0; i < (int)socketListeners_.size(); ++i ){ std::size_t size = socketListeners_[i].second->ReceiveFrom( remoteEndpoint, data, MAX_BUFFER_SIZE ); if( size > 0 ){ socketListeners_[i].first->ProcessPacket( data, (int)size, remoteEndpoint ); if( break_ ) break; } } } // execute any expired timers currentTimeMs = GetCurrentTimeMs(); bool resort = false; for( std::vector< std::pair< double, AttachedTimerListener > >::iterator i = timerQueue_.begin(); i != timerQueue_.end() && i->first <= currentTimeMs; ++i ){ i->second.listener->TimerExpired(); if( break_ ) break; i->first += i->second.periodMs; resort = true; } if( resort ) std::sort( timerQueue_.begin(), timerQueue_.end(), CompareScheduledTimerCalls ); } delete [] data; // free events j = 0; for( std::vector< std::pair< PacketListener*, UdpSocket* > >::iterator i = socketListeners_.begin(); i != socketListeners_.end(); ++i, ++j ){ WSAEventSelect( i->second->impl_->Socket(), events[j], 0 ); // remove association between socket and event CloseHandle( events[j] ); unsigned long enableNonblocking = 0; ioctlsocket( i->second->impl_->Socket(), FIONBIO, &enableNonblocking ); // make the socket blocking again } } void Break() { break_ = true; } void AsynchronousBreak() { break_ = true; SetEvent( breakEvent_ ); } }; SocketReceiveMultiplexer::SocketReceiveMultiplexer() { impl_ = new Implementation(); } SocketReceiveMultiplexer::~SocketReceiveMultiplexer() { delete impl_; } void SocketReceiveMultiplexer::AttachSocketListener( UdpSocket *socket, PacketListener *listener ) { impl_->AttachSocketListener( socket, listener ); } void SocketReceiveMultiplexer::DetachSocketListener( UdpSocket *socket, PacketListener *listener ) { impl_->DetachSocketListener( socket, listener ); } void SocketReceiveMultiplexer::AttachPeriodicTimerListener( int periodMilliseconds, TimerListener *listener ) { impl_->AttachPeriodicTimerListener( periodMilliseconds, listener ); } void SocketReceiveMultiplexer::AttachPeriodicTimerListener( int initialDelayMilliseconds, int periodMilliseconds, TimerListener *listener ) { impl_->AttachPeriodicTimerListener( initialDelayMilliseconds, periodMilliseconds, listener ); } void SocketReceiveMultiplexer::DetachPeriodicTimerListener( TimerListener *listener ) { impl_->DetachPeriodicTimerListener( listener ); } void SocketReceiveMultiplexer::Run() { impl_->Run(); } void SocketReceiveMultiplexer::RunUntilSigInt() { assert( multiplexerInstanceToAbortWithSigInt_ == 0 ); /* at present we support only one multiplexer instance running until sig int */ multiplexerInstanceToAbortWithSigInt_ = this; #ifndef WINCE signal( SIGINT, InterruptSignalHandler ); #endif impl_->Run(); #ifndef WINCE signal( SIGINT, SIG_DFL ); #endif multiplexerInstanceToAbortWithSigInt_ = 0; } void SocketReceiveMultiplexer::Break() { impl_->Break(); } void SocketReceiveMultiplexer::AsynchronousBreak() { impl_->AsynchronousBreak(); } ================================================ FILE: lib/oscpack/osc/MessageMappingOscPacketListener.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_MESSAGEMAPPINGOSCPACKETLISTENER_H #define INCLUDED_OSCPACK_MESSAGEMAPPINGOSCPACKETLISTENER_H #include #include #include "OscPacketListener.h" namespace osc{ template< class T > class MessageMappingOscPacketListener : public OscPacketListener{ public: typedef void (T::*function_type)(const osc::ReceivedMessage&, const IpEndpointName&); protected: void RegisterMessageFunction( const char *addressPattern, function_type f ) { functions_.insert( std::make_pair( addressPattern, f ) ); } virtual void ProcessMessage( const osc::ReceivedMessage& m, const IpEndpointName& remoteEndpoint ) { typename function_map_type::iterator i = functions_.find( m.AddressPattern() ); if( i != functions_.end() ) (dynamic_cast(this)->*(i->second))( m, remoteEndpoint ); } private: struct cstr_compare{ bool operator()( const char *lhs, const char *rhs ) const { return std::strcmp( lhs, rhs ) < 0; } }; typedef std::map function_map_type; function_map_type functions_; }; } // namespace osc #endif /* INCLUDED_OSCPACK_MESSAGEMAPPINGOSCPACKETLISTENER_H */ ================================================ FILE: lib/oscpack/osc/OscException.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_OSCEXCEPTION_H #define INCLUDED_OSCPACK_OSCEXCEPTION_H #include namespace osc { class Exception : public std::exception { const char* what_; public: Exception() throw() {} Exception(const Exception& src) throw() : std::exception(src) , what_(src.what_) { } Exception(const char* w) throw() : what_(w) { } Exception& operator=(const Exception& src) throw() { what_ = src.what_; return *this; } virtual ~Exception() throw() {} const char* what() const throw() override { return what_; } }; } // namespace osc #endif /* INCLUDED_OSCPACK_OSCEXCEPTION_H */ ================================================ FILE: lib/oscpack/osc/OscHostEndianness.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_OSCHOSTENDIANNESS_H #define INCLUDED_OSCPACK_OSCHOSTENDIANNESS_H /* Make sure either OSC_HOST_LITTLE_ENDIAN or OSC_HOST_BIG_ENDIAN is defined We try to use preprocessor symbols to deduce the host endianness. Alternatively you can define one of the above symbols from the command line. Usually you do this with the -D flag to the compiler. e.g.: $ g++ -DOSC_HOST_LITTLE_ENDIAN ... */ #if defined(OSC_HOST_LITTLE_ENDIAN) || defined(OSC_HOST_BIG_ENDIAN) // endianness defined on the command line. nothing to do here. #elif defined(__WIN32__) || defined(WIN32) || defined(WINCE) // assume that __WIN32__ is only defined on little endian systems #define OSC_HOST_LITTLE_ENDIAN 1 #undef OSC_HOST_BIG_ENDIAN #elif defined(__APPLE__) #if defined(__LITTLE_ENDIAN__) #define OSC_HOST_LITTLE_ENDIAN 1 #undef OSC_HOST_BIG_ENDIAN #elif defined(__BIG_ENDIAN__) #define OSC_HOST_BIG_ENDIAN 1 #undef OSC_HOST_LITTLE_ENDIAN #endif #elif defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) // should cover gcc and clang #if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) #define OSC_HOST_LITTLE_ENDIAN 1 #undef OSC_HOST_BIG_ENDIAN #elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) #define OSC_HOST_BIG_ENDIAN 1 #undef OSC_HOST_LITTLE_ENDIAN #endif #else // gcc defines __LITTLE_ENDIAN__ and __BIG_ENDIAN__ // for others used here see http://sourceforge.net/p/predef/wiki/Endianness/ #if (defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) \ || (defined(__ARMEL__) && !defined(__ARMEB__)) \ || (defined(__AARCH64EL__) && !defined(__AARCH64EB__)) \ || (defined(_MIPSEL) && !defined(_MIPSEB)) \ || (defined(__MIPSEL) && !defined(__MIPSEB)) \ || (defined(__MIPSEL__) && !defined(__MIPSEB__)) #define OSC_HOST_LITTLE_ENDIAN 1 #undef OSC_HOST_BIG_ENDIAN #elif (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) \ || (defined(__ARMEB__) && !defined(__ARMEL__)) \ || (defined(__AARCH64EB__) && !defined(__AARCH64EL__)) \ || (defined(_MIPSEB) && !defined(_MIPSEL)) \ || (defined(__MIPSEB) && !defined(__MIPSEL)) \ || (defined(__MIPSEB__) && !defined(__MIPSEL__)) #define OSC_HOST_BIG_ENDIAN 1 #undef OSC_HOST_LITTLE_ENDIAN #endif #endif #if !defined(OSC_HOST_LITTLE_ENDIAN) && !defined(OSC_HOST_BIG_ENDIAN) #error please edit OSCHostEndianness.h or define one of {OSC_HOST_LITTLE_ENDIAN, OSC_HOST_BIG_ENDIAN} to configure endianness #endif #endif /* INCLUDED_OSCPACK_OSCHOSTENDIANNESS_H */ ================================================ FILE: lib/oscpack/osc/OscOutboundPacketStream.cpp ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #include "OscOutboundPacketStream.h" #if defined(__WIN32__) || defined(WIN32) || defined(_WIN32) #include // for alloca #else //#include // alloca on Linux (also OSX) #include // alloca on OSX and FreeBSD (and Linux?) #endif #include #include // memcpy, memmove, strcpy, strlen #include // ptrdiff_t #include "OscHostEndianness.h" #if defined(__BORLANDC__) // workaround for BCB4 release build intrinsics bug namespace std { using ::__strcpy__; // avoid error: E2316 '__strcpy__' is not a member of 'std'. } #endif namespace osc{ static void FromInt32( char *p, int32 x ) { #ifdef OSC_HOST_LITTLE_ENDIAN union{ osc::int32 i; char c[4]; } u; u.i = x; p[3] = u.c[0]; p[2] = u.c[1]; p[1] = u.c[2]; p[0] = u.c[3]; #else *reinterpret_cast(p) = x; #endif } static void FromUInt32( char *p, uint32 x ) { #ifdef OSC_HOST_LITTLE_ENDIAN union{ osc::uint32 i; char c[4]; } u; u.i = x; p[3] = u.c[0]; p[2] = u.c[1]; p[1] = u.c[2]; p[0] = u.c[3]; #else *reinterpret_cast(p) = x; #endif } static void FromInt64( char *p, int64 x ) { #ifdef OSC_HOST_LITTLE_ENDIAN union{ osc::int64 i; char c[8]; } u; u.i = x; p[7] = u.c[0]; p[6] = u.c[1]; p[5] = u.c[2]; p[4] = u.c[3]; p[3] = u.c[4]; p[2] = u.c[5]; p[1] = u.c[6]; p[0] = u.c[7]; #else *reinterpret_cast(p) = x; #endif } static void FromUInt64( char *p, uint64 x ) { #ifdef OSC_HOST_LITTLE_ENDIAN union{ osc::uint64 i; char c[8]; } u; u.i = x; p[7] = u.c[0]; p[6] = u.c[1]; p[5] = u.c[2]; p[4] = u.c[3]; p[3] = u.c[4]; p[2] = u.c[5]; p[1] = u.c[6]; p[0] = u.c[7]; #else *reinterpret_cast(p) = x; #endif } // round up to the next highest multiple of 4. unless x is already a multiple of 4 static inline std::size_t RoundUp4( std::size_t x ) { return (x + 3) & ~((std::size_t)0x03); } OutboundPacketStream::OutboundPacketStream( char *buffer, std::size_t capacity ) : data_( buffer ) , end_( data_ + capacity ) , typeTagsCurrent_( end_ ) , messageCursor_( data_ ) , argumentCurrent_( data_ ) , elementSizePtr_( 0 ) , messageIsInProgress_( false ) { // sanity check integer types declared in OscTypes.h // you'll need to fix OscTypes.h if any of these asserts fail assert( sizeof(osc::int32) == 4 ); assert( sizeof(osc::uint32) == 4 ); assert( sizeof(osc::int64) == 8 ); assert( sizeof(osc::uint64) == 8 ); } OutboundPacketStream::~OutboundPacketStream() { } char *OutboundPacketStream::BeginElement( char *beginPtr ) { if( elementSizePtr_ == 0 ){ elementSizePtr_ = reinterpret_cast(data_); return beginPtr; }else{ // store an offset to the old element size ptr in the element size slot // we store an offset rather than the actual pointer to be 64 bit clean. *reinterpret_cast(beginPtr) = (uint32)(reinterpret_cast(elementSizePtr_) - data_); elementSizePtr_ = reinterpret_cast(beginPtr); return beginPtr + 4; } } void OutboundPacketStream::EndElement( char *endPtr ) { assert( elementSizePtr_ != 0 ); if( elementSizePtr_ == reinterpret_cast(data_) ){ elementSizePtr_ = 0; }else{ // while building an element, an offset to the containing element's // size slot is stored in the elements size slot (or a ptr to data_ // if there is no containing element). We retrieve that here uint32 *previousElementSizePtr = reinterpret_cast(data_ + *elementSizePtr_); // then we store the element size in the slot. note that the element // size does not include the size slot, hence the - 4 below. std::ptrdiff_t d = endPtr - reinterpret_cast(elementSizePtr_); // assert( d >= 4 && d <= 0x7FFFFFFF ); // assume packets smaller than 2Gb uint32 elementSize = static_cast(d - 4); FromUInt32( reinterpret_cast(elementSizePtr_), elementSize ); // finally, we reset the element size ptr to the containing element elementSizePtr_ = previousElementSizePtr; } } bool OutboundPacketStream::ElementSizeSlotRequired() const { return (elementSizePtr_ != 0); } void OutboundPacketStream::CheckForAvailableBundleSpace() { std::size_t required = Size() + ((ElementSizeSlotRequired())?4:0) + 16; if( required > Capacity() ) throw OutOfBufferMemoryException(); } void OutboundPacketStream::CheckForAvailableMessageSpace( const char *addressPattern ) { // plus 4 for at least four bytes of type tag std::size_t required = Size() + ((ElementSizeSlotRequired())?4:0) + RoundUp4(std::strlen(addressPattern) + 1) + 4; if( required > Capacity() ) throw OutOfBufferMemoryException(); } void OutboundPacketStream::CheckForAvailableArgumentSpace( std::size_t argumentLength ) { // plus three for extra type tag, comma and null terminator std::size_t required = (argumentCurrent_ - data_) + argumentLength + RoundUp4( (end_ - typeTagsCurrent_) + 3 ); if( required > Capacity() ) throw OutOfBufferMemoryException(); } void OutboundPacketStream::Clear() { typeTagsCurrent_ = end_; messageCursor_ = data_; argumentCurrent_ = data_; elementSizePtr_ = 0; messageIsInProgress_ = false; } std::size_t OutboundPacketStream::Capacity() const { return end_ - data_; } std::size_t OutboundPacketStream::Size() const { std::size_t result = argumentCurrent_ - data_; if( IsMessageInProgress() ){ // account for the length of the type tag string. the total type tag // includes an initial comma, plus at least one terminating \0 result += RoundUp4( (end_ - typeTagsCurrent_) + 2 ); } return result; } const char *OutboundPacketStream::Data() const { return data_; } bool OutboundPacketStream::IsReady() const { return (!IsMessageInProgress() && !IsBundleInProgress()); } bool OutboundPacketStream::IsMessageInProgress() const { return messageIsInProgress_; } bool OutboundPacketStream::IsBundleInProgress() const { return (elementSizePtr_ != 0); } OutboundPacketStream& OutboundPacketStream::operator<<( const BundleInitiator& rhs ) { if( IsMessageInProgress() ) throw MessageInProgressException(); CheckForAvailableBundleSpace(); messageCursor_ = BeginElement( messageCursor_ ); std::memcpy( messageCursor_, "#bundle\0", 8 ); FromUInt64( messageCursor_ + 8, rhs.timeTag ); messageCursor_ += 16; argumentCurrent_ = messageCursor_; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const BundleTerminator& rhs ) { (void) rhs; if( !IsBundleInProgress() ) throw BundleNotInProgressException(); if( IsMessageInProgress() ) throw MessageInProgressException(); EndElement( messageCursor_ ); return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const BeginMessage& rhs ) { if( IsMessageInProgress() ) throw MessageInProgressException(); CheckForAvailableMessageSpace( rhs.addressPattern ); messageCursor_ = BeginElement( messageCursor_ ); std::strcpy( messageCursor_, rhs.addressPattern ); std::size_t rhsLength = std::strlen(rhs.addressPattern); messageCursor_ += rhsLength + 1; // zero pad to 4-byte boundary std::size_t i = rhsLength + 1; while( i & 0x3 ){ *messageCursor_++ = '\0'; ++i; } argumentCurrent_ = messageCursor_; typeTagsCurrent_ = end_; messageIsInProgress_ = true; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const MessageTerminator& rhs ) { (void) rhs; if( !IsMessageInProgress() ) throw MessageNotInProgressException(); std::size_t typeTagsCount = end_ - typeTagsCurrent_; if( typeTagsCount ){ char *tempTypeTags = (char*)alloca(typeTagsCount); std::memcpy( tempTypeTags, typeTagsCurrent_, typeTagsCount ); // slot size includes comma and null terminator std::size_t typeTagSlotSize = RoundUp4( typeTagsCount + 2 ); std::size_t argumentsSize = argumentCurrent_ - messageCursor_; std::memmove( messageCursor_ + typeTagSlotSize, messageCursor_, argumentsSize ); messageCursor_[0] = ','; // copy type tags in reverse (really forward) order for( std::size_t i=0; i < typeTagsCount; ++i ) messageCursor_[i+1] = tempTypeTags[ (typeTagsCount-1) - i ]; char *p = messageCursor_ + 1 + typeTagsCount; for( std::size_t i=0; i < (typeTagSlotSize - (typeTagsCount + 1)); ++i ) *p++ = '\0'; typeTagsCurrent_ = end_; // advance messageCursor_ for next message messageCursor_ += typeTagSlotSize + argumentsSize; }else{ // send an empty type tags string std::memcpy( messageCursor_, ",\0\0\0", 4 ); // advance messageCursor_ for next message messageCursor_ += 4; } argumentCurrent_ = messageCursor_; EndElement( messageCursor_ ); messageIsInProgress_ = false; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( bool rhs ) { CheckForAvailableArgumentSpace(0); *(--typeTagsCurrent_) = (char)((rhs) ? TRUE_TYPE_TAG : FALSE_TYPE_TAG); return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const NilType& rhs ) { (void) rhs; CheckForAvailableArgumentSpace(0); *(--typeTagsCurrent_) = NIL_TYPE_TAG; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const InfinitumType& rhs ) { (void) rhs; CheckForAvailableArgumentSpace(0); *(--typeTagsCurrent_) = INFINITUM_TYPE_TAG; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( int32 rhs ) { CheckForAvailableArgumentSpace(4); *(--typeTagsCurrent_) = INT32_TYPE_TAG; FromInt32( argumentCurrent_, rhs ); argumentCurrent_ += 4; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( float rhs ) { CheckForAvailableArgumentSpace(4); *(--typeTagsCurrent_) = FLOAT_TYPE_TAG; #ifdef OSC_HOST_LITTLE_ENDIAN union{ float f; char c[4]; } u; u.f = rhs; argumentCurrent_[3] = u.c[0]; argumentCurrent_[2] = u.c[1]; argumentCurrent_[1] = u.c[2]; argumentCurrent_[0] = u.c[3]; #else *reinterpret_cast(argumentCurrent_) = rhs; #endif argumentCurrent_ += 4; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( char rhs ) { CheckForAvailableArgumentSpace(4); *(--typeTagsCurrent_) = CHAR_TYPE_TAG; FromInt32( argumentCurrent_, rhs ); argumentCurrent_ += 4; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const RgbaColor& rhs ) { CheckForAvailableArgumentSpace(4); *(--typeTagsCurrent_) = RGBA_COLOR_TYPE_TAG; FromUInt32( argumentCurrent_, rhs ); argumentCurrent_ += 4; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const MidiMessage& rhs ) { CheckForAvailableArgumentSpace(4); *(--typeTagsCurrent_) = MIDI_MESSAGE_TYPE_TAG; FromUInt32( argumentCurrent_, rhs ); argumentCurrent_ += 4; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( int64 rhs ) { CheckForAvailableArgumentSpace(8); *(--typeTagsCurrent_) = INT64_TYPE_TAG; FromInt64( argumentCurrent_, rhs ); argumentCurrent_ += 8; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const TimeTag& rhs ) { CheckForAvailableArgumentSpace(8); *(--typeTagsCurrent_) = TIME_TAG_TYPE_TAG; FromUInt64( argumentCurrent_, rhs ); argumentCurrent_ += 8; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( double rhs ) { CheckForAvailableArgumentSpace(8); *(--typeTagsCurrent_) = DOUBLE_TYPE_TAG; #ifdef OSC_HOST_LITTLE_ENDIAN union{ double f; char c[8]; } u; u.f = rhs; argumentCurrent_[7] = u.c[0]; argumentCurrent_[6] = u.c[1]; argumentCurrent_[5] = u.c[2]; argumentCurrent_[4] = u.c[3]; argumentCurrent_[3] = u.c[4]; argumentCurrent_[2] = u.c[5]; argumentCurrent_[1] = u.c[6]; argumentCurrent_[0] = u.c[7]; #else *reinterpret_cast(argumentCurrent_) = rhs; #endif argumentCurrent_ += 8; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const char *rhs ) { CheckForAvailableArgumentSpace( RoundUp4(std::strlen(rhs) + 1) ); *(--typeTagsCurrent_) = STRING_TYPE_TAG; std::strcpy( argumentCurrent_, rhs ); std::size_t rhsLength = std::strlen(rhs); argumentCurrent_ += rhsLength + 1; // zero pad to 4-byte boundary std::size_t i = rhsLength + 1; while( i & 0x3 ){ *argumentCurrent_++ = '\0'; ++i; } return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const Symbol& rhs ) { CheckForAvailableArgumentSpace( RoundUp4(std::strlen(rhs) + 1) ); *(--typeTagsCurrent_) = SYMBOL_TYPE_TAG; std::strcpy( argumentCurrent_, rhs ); std::size_t rhsLength = std::strlen(rhs); argumentCurrent_ += rhsLength + 1; // zero pad to 4-byte boundary std::size_t i = rhsLength + 1; while( i & 0x3 ){ *argumentCurrent_++ = '\0'; ++i; } return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const Blob& rhs ) { CheckForAvailableArgumentSpace( 4 + RoundUp4(rhs.size) ); *(--typeTagsCurrent_) = BLOB_TYPE_TAG; FromUInt32( argumentCurrent_, rhs.size ); argumentCurrent_ += 4; std::memcpy( argumentCurrent_, rhs.data, rhs.size ); argumentCurrent_ += rhs.size; // zero pad to 4-byte boundary unsigned long i = rhs.size; while( i & 0x3 ){ *argumentCurrent_++ = '\0'; ++i; } return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const ArrayInitiator& rhs ) { (void) rhs; CheckForAvailableArgumentSpace(0); *(--typeTagsCurrent_) = ARRAY_BEGIN_TYPE_TAG; return *this; } OutboundPacketStream& OutboundPacketStream::operator<<( const ArrayTerminator& rhs ) { (void) rhs; CheckForAvailableArgumentSpace(0); *(--typeTagsCurrent_) = ARRAY_END_TYPE_TAG; return *this; } } // namespace osc ================================================ FILE: lib/oscpack/osc/OscOutboundPacketStream.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_OSCOUTBOUNDPACKETSTREAM_H #define INCLUDED_OSCPACK_OSCOUTBOUNDPACKETSTREAM_H #include // size_t #include "OscTypes.h" #include "OscException.h" namespace osc{ class OutOfBufferMemoryException : public Exception{ public: OutOfBufferMemoryException( const char *w="out of buffer memory" ) : Exception( w ) {} }; class BundleNotInProgressException : public Exception{ public: BundleNotInProgressException( const char *w="call to EndBundle when bundle is not in progress" ) : Exception( w ) {} }; class MessageInProgressException : public Exception{ public: MessageInProgressException( const char *w="opening or closing bundle or message while message is in progress" ) : Exception( w ) {} }; class MessageNotInProgressException : public Exception{ public: MessageNotInProgressException( const char *w="call to EndMessage when message is not in progress" ) : Exception( w ) {} }; class OutboundPacketStream{ public: OutboundPacketStream( char *buffer, std::size_t capacity ); ~OutboundPacketStream(); void Clear(); std::size_t Capacity() const; // invariant: size() is valid even while building a message. std::size_t Size() const; const char *Data() const; // indicates that all messages have been closed with a matching EndMessage // and all bundles have been closed with a matching EndBundle bool IsReady() const; bool IsMessageInProgress() const; bool IsBundleInProgress() const; OutboundPacketStream& operator<<( const BundleInitiator& rhs ); OutboundPacketStream& operator<<( const BundleTerminator& rhs ); OutboundPacketStream& operator<<( const BeginMessage& rhs ); OutboundPacketStream& operator<<( const MessageTerminator& rhs ); OutboundPacketStream& operator<<( bool rhs ); OutboundPacketStream& operator<<( const NilType& rhs ); OutboundPacketStream& operator<<( const InfinitumType& rhs ); OutboundPacketStream& operator<<( int32 rhs ); #if !(defined(__x86_64__) || defined(_M_X64) || defined(_LP64)) OutboundPacketStream& operator<<( int rhs ) { *this << (int32)rhs; return *this; } #endif OutboundPacketStream& operator<<( float rhs ); OutboundPacketStream& operator<<( char rhs ); OutboundPacketStream& operator<<( const RgbaColor& rhs ); OutboundPacketStream& operator<<( const MidiMessage& rhs ); OutboundPacketStream& operator<<( int64 rhs ); OutboundPacketStream& operator<<( const TimeTag& rhs ); OutboundPacketStream& operator<<( double rhs ); OutboundPacketStream& operator<<( const char* rhs ); OutboundPacketStream& operator<<( const Symbol& rhs ); OutboundPacketStream& operator<<( const Blob& rhs ); OutboundPacketStream& operator<<( const ArrayInitiator& rhs ); OutboundPacketStream& operator<<( const ArrayTerminator& rhs ); private: char *BeginElement( char *beginPtr ); void EndElement( char *endPtr ); bool ElementSizeSlotRequired() const; void CheckForAvailableBundleSpace(); void CheckForAvailableMessageSpace( const char *addressPattern ); void CheckForAvailableArgumentSpace( std::size_t argumentLength ); char *data_; char *end_; char *typeTagsCurrent_; // stored in reverse order char *messageCursor_; char *argumentCurrent_; // elementSizePtr_ has two special values: 0 indicates that a bundle // isn't open, and elementSizePtr_==data_ indicates that a bundle is // open but that it doesn't have a size slot (ie the outermost bundle) uint32 *elementSizePtr_; bool messageIsInProgress_; }; } // namespace osc #endif /* INCLUDED_OSCPACK_OSCOUTBOUNDPACKETSTREAM_H */ ================================================ FILE: lib/oscpack/osc/OscPacketListener.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_OSCPACKETLISTENER_H #define INCLUDED_OSCPACK_OSCPACKETLISTENER_H #include "../ip/PacketListener.h" #include "OscReceivedElements.h" namespace osc { class OscPacketListener : public PacketListener { protected: virtual void ProcessBundle(const osc::ReceivedBundle& b, const IpEndpointName& remoteEndpoint) { // ignore bundle time tag for now for (ReceivedBundle::const_iterator i = b.ElementsBegin(); i != b.ElementsEnd(); ++i) { if (i->IsBundle()) ProcessBundle(ReceivedBundle(*i), remoteEndpoint); else ProcessMessage(ReceivedMessage(*i), remoteEndpoint); } } virtual void ProcessMessage(const osc::ReceivedMessage& m, const IpEndpointName& remoteEndpoint) = 0; public: void ProcessPacket(const char* data, int size, const IpEndpointName& remoteEndpoint) override { osc::ReceivedPacket p(data, size); if (p.IsBundle()) ProcessBundle(ReceivedBundle(p), remoteEndpoint); else ProcessMessage(ReceivedMessage(p), remoteEndpoint); } }; } // namespace osc #endif /* INCLUDED_OSCPACK_OSCPACKETLISTENER_H */ ================================================ FILE: lib/oscpack/osc/OscPrintReceivedElements.cpp ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #include "OscPrintReceivedElements.h" #include #include #include #include #if defined(__BORLANDC__) // workaround for BCB4 release build intrinsics bug namespace std { using ::__strcpy__; // avoid error: E2316 '__strcpy__' is not a member of 'std'. } #endif namespace osc{ std::ostream& operator<<( std::ostream & os, const ReceivedMessageArgument& arg ) { switch( arg.TypeTag() ){ case TRUE_TYPE_TAG: os << "bool:true"; break; case FALSE_TYPE_TAG: os << "bool:false"; break; case NIL_TYPE_TAG: os << "(Nil)"; break; case INFINITUM_TYPE_TAG: os << "(Infinitum)"; break; case INT32_TYPE_TAG: os << "int32:" << arg.AsInt32Unchecked(); break; case FLOAT_TYPE_TAG: os << "float32:" << arg.AsFloatUnchecked(); break; case CHAR_TYPE_TAG: { char s[2] = {0}; s[0] = arg.AsCharUnchecked(); os << "char:'" << s << "'"; } break; case RGBA_COLOR_TYPE_TAG: { uint32 color = arg.AsRgbaColorUnchecked(); os << "RGBA:0x" << std::hex << std::setfill('0') << std::setw(2) << (int)((color>>24) & 0xFF) << std::setw(2) << (int)((color>>16) & 0xFF) << std::setw(2) << (int)((color>>8) & 0xFF) << std::setw(2) << (int)(color & 0xFF) << std::setfill(' '); os.unsetf(std::ios::basefield); } break; case MIDI_MESSAGE_TYPE_TAG: { uint32 m = arg.AsMidiMessageUnchecked(); os << "midi (port, status, data1, data2):<<" << std::hex << std::setfill('0') << "0x" << std::setw(2) << (int)((m>>24) & 0xFF) << " 0x" << std::setw(2) << (int)((m>>16) & 0xFF) << " 0x" << std::setw(2) << (int)((m>>8) & 0xFF) << " 0x" << std::setw(2) << (int)(m & 0xFF) << std::setfill(' ') << ">>"; os.unsetf(std::ios::basefield); } break; case INT64_TYPE_TAG: os << "int64:" << arg.AsInt64Unchecked(); break; case TIME_TAG_TYPE_TAG: { os << "OSC-timetag:" << arg.AsTimeTagUnchecked() << " "; std::time_t t = (unsigned long)( arg.AsTimeTagUnchecked() >> 32 ); const char *timeString = std::ctime( &t ); size_t len = std::strlen( timeString ); // -1 to omit trailing newline from string returned by ctime() if( len > 1 ) os.write( timeString, len - 1 ); } break; case DOUBLE_TYPE_TAG: os << "double:" << arg.AsDoubleUnchecked(); break; case STRING_TYPE_TAG: os << "OSC-string:`" << arg.AsStringUnchecked() << "'"; break; case SYMBOL_TYPE_TAG: os << "OSC-string (symbol):`" << arg.AsSymbolUnchecked() << "'"; break; case BLOB_TYPE_TAG: { const void *data; osc_bundle_element_size_t size; arg.AsBlobUnchecked( data, size ); os << "OSC-blob:<<" << std::hex << std::setfill('0'); unsigned char *p = (unsigned char*)data; for( osc_bundle_element_size_t i = 0; i < size; ++i ){ os << "0x" << std::setw(2) << int(p[i]); if( i != size-1 ) os << ' '; } os.unsetf(std::ios::basefield); os << ">>" << std::setfill(' '); } break; case ARRAY_BEGIN_TYPE_TAG: os << "["; break; case ARRAY_END_TYPE_TAG: os << "]"; break; default: os << "unknown"; } return os; } std::ostream& operator<<( std::ostream & os, const ReceivedMessage& m ) { os << "["; if( m.AddressPatternIsUInt32() ) os << m.AddressPatternAsUInt32(); else os << m.AddressPattern(); bool first = true; for( ReceivedMessage::const_iterator i = m.ArgumentsBegin(); i != m.ArgumentsEnd(); ++i ){ if( first ){ os << " "; first = false; }else{ os << ", "; } os << *i; } os << "]"; return os; } std::ostream& operator<<( std::ostream & os, const ReceivedBundle& b ) { static int indent = 0; for( int j=0; j < indent; ++j ) os << " "; os << "{ ( "; if( b.TimeTag() == 1 ) os << "immediate"; else os << b.TimeTag(); os << " )\n"; ++indent; for( ReceivedBundle::const_iterator i = b.ElementsBegin(); i != b.ElementsEnd(); ++i ){ if( i->IsBundle() ){ ReceivedBundle b(*i); os << b << "\n"; }else{ ReceivedMessage m(*i); for( int j=0; j < indent; ++j ) os << " "; os << m << "\n"; } } --indent; for( int j=0; j < indent; ++j ) os << " "; os << "}"; return os; } std::ostream& operator<<( std::ostream & os, const ReceivedPacket& p ) { if( p.IsBundle() ){ ReceivedBundle b(p); os << b << "\n"; }else{ ReceivedMessage m(p); os << m << "\n"; } return os; } } // namespace osc ================================================ FILE: lib/oscpack/osc/OscPrintReceivedElements.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_OSCPRINTRECEIVEDELEMENTS_H #define INCLUDED_OSCPACK_OSCPRINTRECEIVEDELEMENTS_H #include #include "OscReceivedElements.h" namespace osc{ std::ostream& operator<<( std::ostream & os, const ReceivedPacket& p ); std::ostream& operator<<( std::ostream & os, const ReceivedMessageArgument& arg ); std::ostream& operator<<( std::ostream & os, const ReceivedMessage& m ); std::ostream& operator<<( std::ostream & os, const ReceivedBundle& b ); } // namespace osc #endif /* INCLUDED_OSCPACK_OSCPRINTRECEIVEDELEMENTS_H */ ================================================ FILE: lib/oscpack/osc/OscReceivedElements.cpp ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #include "OscReceivedElements.h" #include "OscHostEndianness.h" #include // ptrdiff_t namespace osc { // return the first 4 byte boundary after the end of a str4 // be careful about calling this version if you don't know whether // the string is terminated correctly. static inline const char* FindStr4End(const char* p) { if (p[0] == '\0') // special case for SuperCollider integer address pattern return p + 4; p += 3; while (*p) p += 4; return p + 1; } // return the first 4 byte boundary after the end of a str4 // returns 0 if p == end or if the string is unterminated static inline const char* FindStr4End(const char* p, const char* end) { if (p >= end) return 0; if (p[0] == '\0') // special case for SuperCollider integer address pattern return p + 4; p += 3; end -= 1; while (p < end && *p) p += 4; if (*p) return 0; else return p + 1; } // round up to the next highest multiple of 4. unless x is already a multiple of 4 static inline uint32 RoundUp4(uint32 x) { return (x + 3) & ~((uint32)0x03); } static inline int32 ToInt32(const char* p) { #ifdef OSC_HOST_LITTLE_ENDIAN union { osc::int32 i; char c[4]; } u; u.c[0] = p[3]; u.c[1] = p[2]; u.c[2] = p[1]; u.c[3] = p[0]; return u.i; #else return *(int32*)p; #endif } static inline uint32 ToUInt32(const char* p) { #ifdef OSC_HOST_LITTLE_ENDIAN union { osc::uint32 i; char c[4]; } u; u.c[0] = p[3]; u.c[1] = p[2]; u.c[2] = p[1]; u.c[3] = p[0]; return u.i; #else return *(uint32*)p; #endif } static inline int64 ToInt64(const char* p) { #ifdef OSC_HOST_LITTLE_ENDIAN union { osc::int64 i; char c[8]; } u; u.c[0] = p[7]; u.c[1] = p[6]; u.c[2] = p[5]; u.c[3] = p[4]; u.c[4] = p[3]; u.c[5] = p[2]; u.c[6] = p[1]; u.c[7] = p[0]; return u.i; #else return *(int64*)p; #endif } static inline uint64 ToUInt64(const char* p) { #ifdef OSC_HOST_LITTLE_ENDIAN union { osc::uint64 i; char c[8]; } u; u.c[0] = p[7]; u.c[1] = p[6]; u.c[2] = p[5]; u.c[3] = p[4]; u.c[4] = p[3]; u.c[5] = p[2]; u.c[6] = p[1]; u.c[7] = p[0]; return u.i; #else return *(uint64*)p; #endif } //------------------------------------------------------------------------------ bool ReceivedPacket::IsBundle() const { return (Size() > 0 && Contents()[0] == '#'); } //------------------------------------------------------------------------------ bool ReceivedBundleElement::IsBundle() const { return (Size() > 0 && Contents()[0] == '#'); } osc_bundle_element_size_t ReceivedBundleElement::Size() const { return ToInt32(sizePtr_); } //------------------------------------------------------------------------------ bool ReceivedMessageArgument::AsBool() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == TRUE_TYPE_TAG) return true; else if (*typeTagPtr_ == FALSE_TYPE_TAG) return false; else throw WrongArgumentTypeException(); } bool ReceivedMessageArgument::AsBoolUnchecked() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == TRUE_TYPE_TAG) return true; else return false; } int32 ReceivedMessageArgument::AsInt32() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == INT32_TYPE_TAG) return AsInt32Unchecked(); else throw WrongArgumentTypeException(); } int32 ReceivedMessageArgument::AsInt32Unchecked() const { #ifdef OSC_HOST_LITTLE_ENDIAN union { osc::int32 i; char c[4]; } u; u.c[0] = argumentPtr_[3]; u.c[1] = argumentPtr_[2]; u.c[2] = argumentPtr_[1]; u.c[3] = argumentPtr_[0]; return u.i; #else return *(int32*)argument_; #endif } float ReceivedMessageArgument::AsFloat() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == FLOAT_TYPE_TAG) return AsFloatUnchecked(); else throw WrongArgumentTypeException(); } float ReceivedMessageArgument::AsFloatUnchecked() const { #ifdef OSC_HOST_LITTLE_ENDIAN union { float f; char c[4]; } u; u.c[0] = argumentPtr_[3]; u.c[1] = argumentPtr_[2]; u.c[2] = argumentPtr_[1]; u.c[3] = argumentPtr_[0]; return u.f; #else return *(float*)argument_; #endif } char ReceivedMessageArgument::AsChar() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == CHAR_TYPE_TAG) return AsCharUnchecked(); else throw WrongArgumentTypeException(); } char ReceivedMessageArgument::AsCharUnchecked() const { return (char)ToInt32(argumentPtr_); } uint32 ReceivedMessageArgument::AsRgbaColor() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == RGBA_COLOR_TYPE_TAG) return AsRgbaColorUnchecked(); else throw WrongArgumentTypeException(); } uint32 ReceivedMessageArgument::AsRgbaColorUnchecked() const { return ToUInt32(argumentPtr_); } uint32 ReceivedMessageArgument::AsMidiMessage() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == MIDI_MESSAGE_TYPE_TAG) return AsMidiMessageUnchecked(); else throw WrongArgumentTypeException(); } uint32 ReceivedMessageArgument::AsMidiMessageUnchecked() const { return ToUInt32(argumentPtr_); } int64 ReceivedMessageArgument::AsInt64() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == INT64_TYPE_TAG) return AsInt64Unchecked(); else throw WrongArgumentTypeException(); } int64 ReceivedMessageArgument::AsInt64Unchecked() const { return ToInt64(argumentPtr_); } uint64 ReceivedMessageArgument::AsTimeTag() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == TIME_TAG_TYPE_TAG) return AsTimeTagUnchecked(); else throw WrongArgumentTypeException(); } uint64 ReceivedMessageArgument::AsTimeTagUnchecked() const { return ToUInt64(argumentPtr_); } double ReceivedMessageArgument::AsDouble() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == DOUBLE_TYPE_TAG) return AsDoubleUnchecked(); else throw WrongArgumentTypeException(); } double ReceivedMessageArgument::AsDoubleUnchecked() const { #ifdef OSC_HOST_LITTLE_ENDIAN union { double d; char c[8]; } u; u.c[0] = argumentPtr_[7]; u.c[1] = argumentPtr_[6]; u.c[2] = argumentPtr_[5]; u.c[3] = argumentPtr_[4]; u.c[4] = argumentPtr_[3]; u.c[5] = argumentPtr_[2]; u.c[6] = argumentPtr_[1]; u.c[7] = argumentPtr_[0]; return u.d; #else return *(double*)argument_; #endif } const char* ReceivedMessageArgument::AsString() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == STRING_TYPE_TAG) return argumentPtr_; else throw WrongArgumentTypeException(); } const char* ReceivedMessageArgument::AsSymbol() const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == SYMBOL_TYPE_TAG) return argumentPtr_; else throw WrongArgumentTypeException(); } void ReceivedMessageArgument::AsBlob(const void*& data, osc_bundle_element_size_t& size) const { if (!typeTagPtr_) throw MissingArgumentException(); else if (*typeTagPtr_ == BLOB_TYPE_TAG) AsBlobUnchecked(data, size); else throw WrongArgumentTypeException(); } void ReceivedMessageArgument::AsBlobUnchecked(const void*& data, osc_bundle_element_size_t& size) const { // read blob size as an unsigned int then validate osc_bundle_element_size_t sizeResult = (osc_bundle_element_size_t)ToUInt32(argumentPtr_); if (!IsValidElementSizeValue(sizeResult)) throw MalformedMessageException("invalid blob size"); size = sizeResult; data = (void*)(argumentPtr_ + osc::OSC_SIZEOF_INT32); } std::size_t ReceivedMessageArgument::ComputeArrayItemCount() const { // it is only valid to call ComputeArrayItemCount when the argument is the array start marker if (!IsArrayBegin()) throw WrongArgumentTypeException(); std::size_t result = 0; unsigned int level = 0; const char* typeTag = typeTagPtr_ + 1; // iterate through all type tags. note that ReceivedMessage::Init // has already checked that the message is well formed. while (*typeTag) { switch (*typeTag++) { case ARRAY_BEGIN_TYPE_TAG: level += 1; break; case ARRAY_END_TYPE_TAG: if (level == 0) return result; level -= 1; break; default: if (level == 0) // only count items at level 0 ++result; } } return result; } //------------------------------------------------------------------------------ void ReceivedMessageArgumentIterator::Advance() { if (!value_.typeTagPtr_) return; switch (*value_.typeTagPtr_++) { case '\0': // don't advance past end --value_.typeTagPtr_; break; case TRUE_TYPE_TAG: case FALSE_TYPE_TAG: case NIL_TYPE_TAG: case INFINITUM_TYPE_TAG: // zero length break; case INT32_TYPE_TAG: case FLOAT_TYPE_TAG: case CHAR_TYPE_TAG: case RGBA_COLOR_TYPE_TAG: case MIDI_MESSAGE_TYPE_TAG: value_.argumentPtr_ += 4; break; case INT64_TYPE_TAG: case TIME_TAG_TYPE_TAG: case DOUBLE_TYPE_TAG: value_.argumentPtr_ += 8; break; case STRING_TYPE_TAG: case SYMBOL_TYPE_TAG: // we use the unsafe function FindStr4End(char*) here because all of // the arguments have already been validated in // ReceivedMessage::Init() below. value_.argumentPtr_ = FindStr4End(value_.argumentPtr_); break; case BLOB_TYPE_TAG: { // treat blob size as an unsigned int for the purposes of this calculation uint32 blobSize = ToUInt32(value_.argumentPtr_); value_.argumentPtr_ = value_.argumentPtr_ + osc::OSC_SIZEOF_INT32 + RoundUp4(blobSize); } break; case ARRAY_BEGIN_TYPE_TAG: case ARRAY_END_TYPE_TAG: // [ Indicates the beginning of an array. The tags following are for // data in the Array until a close brace tag is reached. // ] Indicates the end of an array. // zero length, don't advance argument ptr break; default: // unknown type tag // don't advance --value_.typeTagPtr_; break; } } //------------------------------------------------------------------------------ ReceivedMessage::ReceivedMessage(const ReceivedPacket& packet) : addressPattern_(packet.Contents()) { Init(packet.Contents(), packet.Size()); } ReceivedMessage::ReceivedMessage(const ReceivedBundleElement& bundleElement) : addressPattern_(bundleElement.Contents()) { Init(bundleElement.Contents(), bundleElement.Size()); } bool ReceivedMessage::AddressPatternIsUInt32() const { return (addressPattern_[0] == '\0'); } uint32 ReceivedMessage::AddressPatternAsUInt32() const { return ToUInt32(addressPattern_); } void ReceivedMessage::Init(const char* message, osc_bundle_element_size_t size) { if (!IsValidElementSizeValue(size)) throw MalformedMessageException("invalid message size"); if (size == 0) throw MalformedMessageException("zero length messages not permitted"); if (!IsMultipleOf4(size)) throw MalformedMessageException("message size must be multiple of four"); const char* end = message + size; typeTagsBegin_ = FindStr4End(addressPattern_, end); if (typeTagsBegin_ == 0) { // address pattern was not terminated before end throw MalformedMessageException("unterminated address pattern"); } if (typeTagsBegin_ == end) { // message consists of only the address pattern - no arguments or type tags. typeTagsBegin_ = 0; typeTagsEnd_ = 0; arguments_ = 0; } else { if (*typeTagsBegin_ != ',') throw MalformedMessageException("type tags not present"); if (*(typeTagsBegin_ + 1) == '\0') { // zero length type tags typeTagsBegin_ = 0; typeTagsEnd_ = 0; arguments_ = 0; } else { // check that all arguments are present and well formed arguments_ = FindStr4End(typeTagsBegin_, end); if (arguments_ == 0) { throw MalformedMessageException("type tags were not terminated before end of message"); } ++typeTagsBegin_; // advance past initial ',' const char* typeTag = typeTagsBegin_; const char* argument = arguments_; unsigned int arrayLevel = 0; do { switch (*typeTag) { case TRUE_TYPE_TAG: case FALSE_TYPE_TAG: case NIL_TYPE_TAG: case INFINITUM_TYPE_TAG: // zero length break; // [ Indicates the beginning of an array. The tags following are for // data in the Array until a close brace tag is reached. // ] Indicates the end of an array. case ARRAY_BEGIN_TYPE_TAG: ++arrayLevel; // (zero length argument data) break; case ARRAY_END_TYPE_TAG: --arrayLevel; // (zero length argument data) break; case INT32_TYPE_TAG: case FLOAT_TYPE_TAG: case CHAR_TYPE_TAG: case RGBA_COLOR_TYPE_TAG: case MIDI_MESSAGE_TYPE_TAG: if (argument == end) throw MalformedMessageException("arguments exceed message size"); argument += 4; if (argument > end) throw MalformedMessageException("arguments exceed message size"); break; case INT64_TYPE_TAG: case TIME_TAG_TYPE_TAG: case DOUBLE_TYPE_TAG: if (argument == end) throw MalformedMessageException("arguments exceed message size"); argument += 8; if (argument > end) throw MalformedMessageException("arguments exceed message size"); break; case STRING_TYPE_TAG: case SYMBOL_TYPE_TAG: if (argument == end) throw MalformedMessageException("arguments exceed message size"); argument = FindStr4End(argument, end); if (argument == 0) throw MalformedMessageException("unterminated string argument"); break; case BLOB_TYPE_TAG: { if (argument + osc::OSC_SIZEOF_INT32 > end) MalformedMessageException("arguments exceed message size"); // treat blob size as an unsigned int for the purposes of this calculation uint32 blobSize = ToUInt32(argument); argument = argument + osc::OSC_SIZEOF_INT32 + RoundUp4(blobSize); if (argument > end) MalformedMessageException("arguments exceed message size"); } break; default: throw MalformedMessageException("unknown type tag"); } } while (*++typeTag != '\0'); typeTagsEnd_ = typeTag; if (arrayLevel != 0) throw MalformedMessageException("array was not terminated before end of message (expected ']' end of array tag)"); } // These invariants should be guaranteed by the above code. // we depend on them in the implementation of ArgumentCount() #ifndef NDEBUG std::ptrdiff_t argumentCount = typeTagsEnd_ - typeTagsBegin_; assert(argumentCount >= 0); assert(argumentCount <= OSC_INT32_MAX); #endif } } //------------------------------------------------------------------------------ ReceivedBundle::ReceivedBundle(const ReceivedPacket& packet) : elementCount_(0) { Init(packet.Contents(), packet.Size()); } ReceivedBundle::ReceivedBundle(const ReceivedBundleElement& bundleElement) : elementCount_(0) { Init(bundleElement.Contents(), bundleElement.Size()); } void ReceivedBundle::Init(const char* bundle, osc_bundle_element_size_t size) { if (!IsValidElementSizeValue(size)) throw MalformedBundleException("invalid bundle size"); if (size < 16) throw MalformedBundleException("packet too short for bundle"); if (!IsMultipleOf4(size)) throw MalformedBundleException("bundle size must be multiple of four"); if (bundle[0] != '#' || bundle[1] != 'b' || bundle[2] != 'u' || bundle[3] != 'n' || bundle[4] != 'd' || bundle[5] != 'l' || bundle[6] != 'e' || bundle[7] != '\0') throw MalformedBundleException("bad bundle address pattern"); end_ = bundle + size; timeTag_ = bundle + 8; const char* p = timeTag_ + 8; while (p < end_) { if (p + osc::OSC_SIZEOF_INT32 > end_) throw MalformedBundleException("packet too short for elementSize"); // treat element size as an unsigned int for the purposes of this calculation uint32 elementSize = ToUInt32(p); if ((elementSize & ((uint32)0x03)) != 0) throw MalformedBundleException("bundle element size must be multiple of four"); p += osc::OSC_SIZEOF_INT32 + elementSize; if (p > end_) throw MalformedBundleException("packet too short for bundle element"); ++elementCount_; } if (p != end_) throw MalformedBundleException("bundle contents "); } uint64 ReceivedBundle::TimeTag() const { return ToUInt64(timeTag_); } } // namespace osc ================================================ FILE: lib/oscpack/osc/OscReceivedElements.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_OSCRECEIVEDELEMENTS_H #define INCLUDED_OSCPACK_OSCRECEIVEDELEMENTS_H #include #include #include // size_t #include "OscTypes.h" #include "OscException.h" namespace osc{ class MalformedPacketException : public Exception{ public: MalformedPacketException( const char *w="malformed packet" ) : Exception( w ) {} }; class MalformedMessageException : public Exception{ public: MalformedMessageException( const char *w="malformed message" ) : Exception( w ) {} }; class MalformedBundleException : public Exception{ public: MalformedBundleException( const char *w="malformed bundle" ) : Exception( w ) {} }; class WrongArgumentTypeException : public Exception{ public: WrongArgumentTypeException( const char *w="wrong argument type" ) : Exception( w ) {} }; class MissingArgumentException : public Exception{ public: MissingArgumentException( const char *w="missing argument" ) : Exception( w ) {} }; class ExcessArgumentException : public Exception{ public: ExcessArgumentException( const char *w="too many arguments" ) : Exception( w ) {} }; class ReceivedPacket{ public: // Although the OSC spec is not entirely clear on this, we only support // packets up to 0x7FFFFFFC bytes long (the maximum 4-byte aligned value // representable by an int32). An exception will be raised if you pass a // larger value to the ReceivedPacket() constructor. ReceivedPacket( const char *contents, osc_bundle_element_size_t size ) : contents_( contents ) , size_( ValidateSize(size) ) {} ReceivedPacket( const char *contents, std::size_t size ) : contents_( contents ) , size_( ValidateSize( (osc_bundle_element_size_t)size ) ) {} #if !(defined(__x86_64__) || defined(_M_X64) || defined(_LP64)) ReceivedPacket( const char *contents, int size ) : contents_( contents ) , size_( ValidateSize( (osc_bundle_element_size_t)size ) ) {} #endif bool IsMessage() const { return !IsBundle(); } bool IsBundle() const; osc_bundle_element_size_t Size() const { return size_; } const char *Contents() const { return contents_; } private: const char *contents_; osc_bundle_element_size_t size_; static osc_bundle_element_size_t ValidateSize( osc_bundle_element_size_t size ) { // sanity check integer types declared in OscTypes.h // you'll need to fix OscTypes.h if any of these asserts fail assert( sizeof(osc::int32) == 4 ); assert( sizeof(osc::uint32) == 4 ); assert( sizeof(osc::int64) == 8 ); assert( sizeof(osc::uint64) == 8 ); if( !IsValidElementSizeValue(size) ) throw MalformedPacketException( "invalid packet size" ); if( size == 0 ) throw MalformedPacketException( "zero length elements not permitted" ); if( !IsMultipleOf4(size) ) throw MalformedPacketException( "element size must be multiple of four" ); return size; } }; class ReceivedBundleElement{ public: ReceivedBundleElement( const char *sizePtr ) : sizePtr_( sizePtr ) {} friend class ReceivedBundleElementIterator; bool IsMessage() const { return !IsBundle(); } bool IsBundle() const; osc_bundle_element_size_t Size() const; const char *Contents() const { return sizePtr_ + osc::OSC_SIZEOF_INT32; } private: const char *sizePtr_; }; class ReceivedBundleElementIterator{ public: ReceivedBundleElementIterator( const char *sizePtr ) : value_( sizePtr ) {} ReceivedBundleElementIterator operator++() { Advance(); return *this; } ReceivedBundleElementIterator operator++(int) { ReceivedBundleElementIterator old( *this ); Advance(); return old; } const ReceivedBundleElement& operator*() const { return value_; } const ReceivedBundleElement* operator->() const { return &value_; } friend bool operator==(const ReceivedBundleElementIterator& lhs, const ReceivedBundleElementIterator& rhs ); private: ReceivedBundleElement value_; void Advance() { value_.sizePtr_ = value_.Contents() + value_.Size(); } bool IsEqualTo( const ReceivedBundleElementIterator& rhs ) const { return value_.sizePtr_ == rhs.value_.sizePtr_; } }; inline bool operator==(const ReceivedBundleElementIterator& lhs, const ReceivedBundleElementIterator& rhs ) { return lhs.IsEqualTo( rhs ); } inline bool operator!=(const ReceivedBundleElementIterator& lhs, const ReceivedBundleElementIterator& rhs ) { return !( lhs == rhs ); } class ReceivedMessageArgument{ public: ReceivedMessageArgument( const char *typeTagPtr, const char *argumentPtr ) : typeTagPtr_( typeTagPtr ) , argumentPtr_( argumentPtr ) {} friend class ReceivedMessageArgumentIterator; char TypeTag() const { return *typeTagPtr_; } // the unchecked methods below don't check whether the argument actually // is of the specified type. they should only be used if you've already // checked the type tag or the associated IsType() method. bool IsBool() const { return *typeTagPtr_ == TRUE_TYPE_TAG || *typeTagPtr_ == FALSE_TYPE_TAG; } bool AsBool() const; bool AsBoolUnchecked() const; bool IsNil() const { return *typeTagPtr_ == NIL_TYPE_TAG; } bool IsInfinitum() const { return *typeTagPtr_ == INFINITUM_TYPE_TAG; } bool IsInt32() const { return *typeTagPtr_ == INT32_TYPE_TAG; } int32 AsInt32() const; int32 AsInt32Unchecked() const; bool IsFloat() const { return *typeTagPtr_ == FLOAT_TYPE_TAG; } float AsFloat() const; float AsFloatUnchecked() const; bool IsChar() const { return *typeTagPtr_ == CHAR_TYPE_TAG; } char AsChar() const; char AsCharUnchecked() const; bool IsRgbaColor() const { return *typeTagPtr_ == RGBA_COLOR_TYPE_TAG; } uint32 AsRgbaColor() const; uint32 AsRgbaColorUnchecked() const; bool IsMidiMessage() const { return *typeTagPtr_ == MIDI_MESSAGE_TYPE_TAG; } uint32 AsMidiMessage() const; uint32 AsMidiMessageUnchecked() const; bool IsInt64() const { return *typeTagPtr_ == INT64_TYPE_TAG; } int64 AsInt64() const; int64 AsInt64Unchecked() const; bool IsTimeTag() const { return *typeTagPtr_ == TIME_TAG_TYPE_TAG; } uint64 AsTimeTag() const; uint64 AsTimeTagUnchecked() const; bool IsDouble() const { return *typeTagPtr_ == DOUBLE_TYPE_TAG; } double AsDouble() const; double AsDoubleUnchecked() const; bool IsString() const { return *typeTagPtr_ == STRING_TYPE_TAG; } const char* AsString() const; const char* AsStringUnchecked() const { return argumentPtr_; } bool IsSymbol() const { return *typeTagPtr_ == SYMBOL_TYPE_TAG; } const char* AsSymbol() const; const char* AsSymbolUnchecked() const { return argumentPtr_; } bool IsBlob() const { return *typeTagPtr_ == BLOB_TYPE_TAG; } void AsBlob( const void*& data, osc_bundle_element_size_t& size ) const; void AsBlobUnchecked( const void*& data, osc_bundle_element_size_t& size ) const; bool IsArrayBegin() const { return *typeTagPtr_ == ARRAY_BEGIN_TYPE_TAG; } bool IsArrayEnd() const { return *typeTagPtr_ == ARRAY_END_TYPE_TAG; } // Calculate the number of top-level items in the array. Nested arrays count as one item. // Only valid at array start. Will throw an exception if IsArrayStart() == false. std::size_t ComputeArrayItemCount() const; private: const char *typeTagPtr_; const char *argumentPtr_; }; class ReceivedMessageArgumentIterator{ public: ReceivedMessageArgumentIterator( const char *typeTags, const char *arguments ) : value_( typeTags, arguments ) {} ReceivedMessageArgumentIterator operator++() { Advance(); return *this; } ReceivedMessageArgumentIterator operator++(int) { ReceivedMessageArgumentIterator old( *this ); Advance(); return old; } const ReceivedMessageArgument& operator*() const { return value_; } const ReceivedMessageArgument* operator->() const { return &value_; } friend bool operator==(const ReceivedMessageArgumentIterator& lhs, const ReceivedMessageArgumentIterator& rhs ); private: ReceivedMessageArgument value_; void Advance(); bool IsEqualTo( const ReceivedMessageArgumentIterator& rhs ) const { return value_.typeTagPtr_ == rhs.value_.typeTagPtr_; } }; inline bool operator==(const ReceivedMessageArgumentIterator& lhs, const ReceivedMessageArgumentIterator& rhs ) { return lhs.IsEqualTo( rhs ); } inline bool operator!=(const ReceivedMessageArgumentIterator& lhs, const ReceivedMessageArgumentIterator& rhs ) { return !( lhs == rhs ); } class ReceivedMessageArgumentStream{ friend class ReceivedMessage; ReceivedMessageArgumentStream( const ReceivedMessageArgumentIterator& begin, const ReceivedMessageArgumentIterator& end ) : p_( begin ) , end_( end ) {} ReceivedMessageArgumentIterator p_, end_; public: // end of stream bool Eos() const { return p_ == end_; } ReceivedMessageArgumentStream& operator>>( bool& rhs ) { if( Eos() ) throw MissingArgumentException(); rhs = (*p_++).AsBool(); return *this; } // not sure if it would be useful to stream Nil and Infinitum // for now it's not possible // same goes for array boundaries ReceivedMessageArgumentStream& operator>>( int32& rhs ) { if( Eos() ) throw MissingArgumentException(); rhs = (*p_++).AsInt32(); return *this; } ReceivedMessageArgumentStream& operator>>( float& rhs ) { if( Eos() ) throw MissingArgumentException(); rhs = (*p_++).AsFloat(); return *this; } ReceivedMessageArgumentStream& operator>>( char& rhs ) { if( Eos() ) throw MissingArgumentException(); rhs = (*p_++).AsChar(); return *this; } ReceivedMessageArgumentStream& operator>>( RgbaColor& rhs ) { if( Eos() ) throw MissingArgumentException(); rhs.value = (*p_++).AsRgbaColor(); return *this; } ReceivedMessageArgumentStream& operator>>( MidiMessage& rhs ) { if( Eos() ) throw MissingArgumentException(); rhs.value = (*p_++).AsMidiMessage(); return *this; } ReceivedMessageArgumentStream& operator>>( int64& rhs ) { if( Eos() ) throw MissingArgumentException(); rhs = (*p_++).AsInt64(); return *this; } ReceivedMessageArgumentStream& operator>>( TimeTag& rhs ) { if( Eos() ) throw MissingArgumentException(); rhs.value = (*p_++).AsTimeTag(); return *this; } ReceivedMessageArgumentStream& operator>>( double& rhs ) { if( Eos() ) throw MissingArgumentException(); rhs = (*p_++).AsDouble(); return *this; } ReceivedMessageArgumentStream& operator>>( Blob& rhs ) { if( Eos() ) throw MissingArgumentException(); (*p_++).AsBlob( rhs.data, rhs.size ); return *this; } ReceivedMessageArgumentStream& operator>>( const char*& rhs ) { if( Eos() ) throw MissingArgumentException(); rhs = (*p_++).AsString(); return *this; } ReceivedMessageArgumentStream& operator>>( Symbol& rhs ) { if( Eos() ) throw MissingArgumentException(); rhs.value = (*p_++).AsSymbol(); return *this; } ReceivedMessageArgumentStream& operator>>( MessageTerminator& rhs ) { (void) rhs; // suppress unused parameter warning if( !Eos() ) throw ExcessArgumentException(); return *this; } }; class ReceivedMessage{ void Init( const char *bundle, osc_bundle_element_size_t size ); public: explicit ReceivedMessage( const ReceivedPacket& packet ); explicit ReceivedMessage( const ReceivedBundleElement& bundleElement ); const char *AddressPattern() const { return addressPattern_; } // Support for non-standard SuperCollider integer address patterns: bool AddressPatternIsUInt32() const; uint32 AddressPatternAsUInt32() const; uint32 ArgumentCount() const { return static_cast(typeTagsEnd_ - typeTagsBegin_); } const char *TypeTags() const { return typeTagsBegin_; } typedef ReceivedMessageArgumentIterator const_iterator; ReceivedMessageArgumentIterator ArgumentsBegin() const { return ReceivedMessageArgumentIterator( typeTagsBegin_, arguments_ ); } ReceivedMessageArgumentIterator ArgumentsEnd() const { return ReceivedMessageArgumentIterator( typeTagsEnd_, 0 ); } ReceivedMessageArgumentStream ArgumentStream() const { return ReceivedMessageArgumentStream( ArgumentsBegin(), ArgumentsEnd() ); } private: const char *addressPattern_; const char *typeTagsBegin_; const char *typeTagsEnd_; const char *arguments_; }; class ReceivedBundle{ void Init( const char *message, osc_bundle_element_size_t size ); public: explicit ReceivedBundle( const ReceivedPacket& packet ); explicit ReceivedBundle( const ReceivedBundleElement& bundleElement ); uint64 TimeTag() const; uint32 ElementCount() const { return elementCount_; } typedef ReceivedBundleElementIterator const_iterator; ReceivedBundleElementIterator ElementsBegin() const { return ReceivedBundleElementIterator( timeTag_ + 8 ); } ReceivedBundleElementIterator ElementsEnd() const { return ReceivedBundleElementIterator( end_ ); } private: const char *timeTag_; const char *end_; uint32 elementCount_; }; } // namespace osc #endif /* INCLUDED_OSCPACK_OSCRECEIVEDELEMENTS_H */ ================================================ FILE: lib/oscpack/osc/OscTypes.cpp ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #include "OscTypes.h" namespace osc{ BundleInitiator BeginBundleImmediate(1); BundleTerminator EndBundle; MessageTerminator EndMessage; NilType OscNil; #ifndef _OBJC_OBJC_H_ NilType Nil; // Objective-C defines Nil. so our Nil is deprecated. use OscNil instead #endif InfinitumType Infinitum; ArrayInitiator BeginArray; ArrayTerminator EndArray; } // namespace osc ================================================ FILE: lib/oscpack/osc/OscTypes.h ================================================ /* oscpack -- Open Sound Control (OSC) packet manipulation library http://www.rossbencina.com/code/oscpack Copyright (c) 2004-2013 Ross Bencina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* The text above constitutes the entire oscpack license; however, the oscpack developer(s) also make the following non-binding requests: Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version. It is also requested that these non-binding requests be included whenever the above license is reproduced. */ #ifndef INCLUDED_OSCPACK_OSCTYPES_H #define INCLUDED_OSCPACK_OSCTYPES_H #include namespace osc { // basic types #if defined(__BORLANDC__) || defined(_MSC_VER) typedef __int64 int64; typedef unsigned __int64 uint64; #elif defined(__x86_64__) || defined(_M_X64) || defined(_LP64) typedef int64_t int64; typedef uint64_t uint64; #else typedef long long int64; typedef unsigned long long uint64; #endif #if defined(__x86_64__) || defined(_M_X64) || defined(_LP64) typedef signed int int32; typedef unsigned int uint32; #else typedef signed long int32; typedef unsigned long uint32; #endif enum ValueTypeSizes { OSC_SIZEOF_INT32 = 4, OSC_SIZEOF_UINT32 = 4, OSC_SIZEOF_INT64 = 8, OSC_SIZEOF_UINT64 = 8, }; // osc_bundle_element_size_t is used for the size of bundle elements and blobs // the OSC spec specifies these as int32 (signed) but we ensure that they // are always positive since negative field sizes make no sense. typedef int32 osc_bundle_element_size_t; enum { OSC_INT32_MAX = 0x7FFFFFFF, // Element sizes are specified to be int32, and are always rounded up to nearest // multiple of 4. Therefore their values can't be greater than 0x7FFFFFFC. OSC_BUNDLE_ELEMENT_SIZE_MAX = 0x7FFFFFFC }; inline bool IsValidElementSizeValue(osc_bundle_element_size_t x) { // sizes may not be negative or exceed OSC_BUNDLE_ELEMENT_SIZE_MAX return x >= 0 && x <= OSC_BUNDLE_ELEMENT_SIZE_MAX; } inline bool IsMultipleOf4(osc_bundle_element_size_t x) { return (x & ((osc_bundle_element_size_t)0x03)) == 0; } enum TypeTagValues { TRUE_TYPE_TAG = 'T', FALSE_TYPE_TAG = 'F', NIL_TYPE_TAG = 'N', INFINITUM_TYPE_TAG = 'I', INT32_TYPE_TAG = 'i', FLOAT_TYPE_TAG = 'f', CHAR_TYPE_TAG = 'c', RGBA_COLOR_TYPE_TAG = 'r', MIDI_MESSAGE_TYPE_TAG = 'm', INT64_TYPE_TAG = 'h', TIME_TAG_TYPE_TAG = 't', DOUBLE_TYPE_TAG = 'd', STRING_TYPE_TAG = 's', SYMBOL_TYPE_TAG = 'S', BLOB_TYPE_TAG = 'b', ARRAY_BEGIN_TYPE_TAG = '[', ARRAY_END_TYPE_TAG = ']' }; // i/o manipulators used for streaming interfaces struct BundleInitiator { explicit BundleInitiator(uint64 timeTag_) : timeTag(timeTag_) { } uint64 timeTag; }; extern BundleInitiator BeginBundleImmediate; inline BundleInitiator BeginBundle(uint64 timeTag = 1) { return BundleInitiator(timeTag); } struct BundleTerminator { }; extern BundleTerminator EndBundle; struct BeginMessage { explicit BeginMessage(const char* addressPattern_) : addressPattern(addressPattern_) { } const char* addressPattern; }; struct MessageTerminator { }; extern MessageTerminator EndMessage; // osc specific types. they are defined as structs so they can be used // as separately identifiable types with the streaming operators. struct NilType { }; extern NilType OscNil; #ifndef _OBJC_OBJC_H_ extern NilType Nil; // Objective-C defines Nil. so our Nil is deprecated. use OscNil instead #endif struct InfinitumType { }; extern InfinitumType Infinitum; struct RgbaColor { RgbaColor() {} explicit RgbaColor(uint32 value_) : value(value_) { } uint32 value; operator uint32() const { return value; } }; struct MidiMessage { MidiMessage() {} explicit MidiMessage(uint32 value_) : value(value_) { } uint32 value; operator uint32() const { return value; } }; struct TimeTag { TimeTag() {} explicit TimeTag(uint64 value_) : value(value_) { } uint64 value; operator uint64() const { return value; } }; struct Symbol { Symbol() {} explicit Symbol(const char* value_) : value(value_) { } const char* value; operator const char*() const { return value; } }; struct Blob { Blob() {} explicit Blob(const void* data_, osc_bundle_element_size_t size_) : data(data_) , size(size_) { } const void* data; osc_bundle_element_size_t size; }; struct ArrayInitiator { }; extern ArrayInitiator BeginArray; struct ArrayTerminator { }; extern ArrayTerminator EndArray; } // namespace osc #endif /* INCLUDED_OSCPACK_OSCTYPES_H */ ================================================ FILE: lib/serialosc/MonomeDevice.h ================================================ #ifndef __MONOMEDEVICE_H__ #define __MONOMEDEVICE_H__ #include typedef enum { PROTOCOL_40H, PROTOCOL_SERIES, PROTOCOL_MEXT } MonomeProtocol; struct MonomeDevice { std::string id; std::string type; std::string prefix; int port; int width; int height; int rotation; MonomeProtocol protocol; bool varibright; }; #endif //__MONOMEDEVICE_H__ ================================================ FILE: lib/serialosc/README.md ================================================ C++ serialosc example by Daniel-Bytes (with modifications by @dewb for varibright grid messages) http://daniel-bytes.github.io/serialosc_example/ https://github.com/daniel-bytes/serialosc_example ================================================ FILE: lib/serialosc/SerialOsc.cpp ================================================ #include "SerialOsc.h" #include "osc/OscOutboundPacketStream.h" #include #include #include #define OSC_BUFFER_SIZE 1024 SerialOsc::SerialOsc(std::string devicePrefix, int defaultPort, int maxPortsToScan) : listenSocket(nullptr) , listener(nullptr) , devicePrefix(devicePrefix) , listenPort(defaultPort) , portsToScan(maxPortsToScan < 1 ? 1 : maxPortsToScan) , serviceDetected(false) { } SerialOsc::~SerialOsc(void) { if (listenSocket != nullptr) { stop(); delete listenSocket; } for (auto it = devices.begin(); it != devices.end(); ++it) { delete *it; } } void SerialOsc::start(Listener* listener) { this->listener = listener; if (listener == nullptr || listenSocket != nullptr) { return; } for (int i = 0; i < portsToScan; i++) { int tempPort = listenPort + i; try { listenSocket = new UdpListeningReceiveSocket( IpEndpointName("localhost", tempPort), this); listenPort = tempPort; std::cout << "Binding to port " << tempPort << "." << std::endl; break; } catch (std::runtime_error& ex) { // try next port listenSocket = nullptr; std::cerr << "Failed to bind to port " << tempPort << ". " << ex.what() << std::endl; } } if (listenSocket != nullptr) { thread = std::thread(&SerialOsc::runThread, this); sendStatusMessage(); sendVersionMessage(); sendDeviceQueryMessage(); sendDeviceNotifyMessage(); } } void SerialOsc::stop(void) { if (listenSocket != nullptr) { listenSocket->AsynchronousBreak(); thread.join(); listenSocket = nullptr; } } bool SerialOsc::isServiceDetected(void) const { return serviceDetected; } std::string SerialOsc::getVersionString(void) const { return versionString; } void SerialOsc::runThread(void) { if (listenSocket != nullptr) { listenSocket->Run(); } } void SerialOsc::sendStatusMessage(void) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, SERIALOSC_PORT)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); p << osc::BeginBundleImmediate << osc::BeginMessage("/serialosc/status") << SERIALOSC_ADDRESS << listenPort << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendVersionMessage(void) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, SERIALOSC_PORT)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); p << osc::BeginBundleImmediate << osc::BeginMessage("/serialosc/version") << SERIALOSC_ADDRESS << listenPort << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendDeviceQueryMessage(void) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, SERIALOSC_PORT)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); p << osc::BeginBundleImmediate << osc::BeginMessage("/serialosc/list") << SERIALOSC_ADDRESS << listenPort << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendDeviceNotifyMessage(void) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, SERIALOSC_PORT)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); p << osc::BeginBundleImmediate << osc::BeginMessage("/serialosc/notify") << SERIALOSC_ADDRESS << listenPort << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendDeviceInfoMessage(int port) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, port)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); p << osc::BeginBundleImmediate << osc::BeginMessage("/sys/info") << listenPort << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendDevicePortMessage(int port) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, port)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); p << osc::BeginBundleImmediate << osc::BeginMessage("/sys/port") << listenPort << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendDevicePrefixMessage(int port) { std::string prefix = devicePrefix; if (prefix.find("/") == 0) { prefix = prefix.substr(1); } UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, port)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); p << osc::BeginBundleImmediate << osc::BeginMessage("/sys/prefix") << prefix.c_str() << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendDeviceLedCommand(const MonomeDevice* const device, int x, int y, bool state) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, device->port)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); std::string address = (device->prefix + "/grid/led/set"); p << osc::BeginBundleImmediate << osc::BeginMessage(address.c_str()) << x << y << (state ? 1 : 0) << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendDeviceLedAllCommand(const MonomeDevice* const device, bool state) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, device->port)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); std::string address = (device->prefix + "/grid/led/all"); p << osc::BeginBundleImmediate << osc::BeginMessage(address.c_str()) << (state ? 1 : 0) << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendDeviceLedRowCommand(const MonomeDevice* const device, int x_offset, int y, uint8_t stateBits) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, device->port)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); std::string address = (device->prefix + "/grid/led/row"); p << osc::BeginBundleImmediate << osc::BeginMessage(address.c_str()) << x_offset << y << stateBits << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendDeviceLedMapCommand(const MonomeDevice* const device, int x, int y, uint8_t* stateMap) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, device->port)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); std::string address = (device->prefix + "/grid/led/map"); p << osc::BeginBundleImmediate << osc::BeginMessage(address.c_str()) << x << y; for (int i = 0; i < 8; i++) { p << stateMap[i]; } p << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendDeviceLedLevelMapCommand(const MonomeDevice* const device, int x, int y, uint8_t* stateMap) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, device->port)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); std::string address = (device->prefix + "/grid/led/level/map"); p << osc::BeginBundleImmediate << osc::BeginMessage(address.c_str()) << x << y; for (int i = 0; i < 64; i++) { p << stateMap[i]; } p << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::sendDeviceRingMapCommand(const MonomeDevice* const device, int n, uint8_t leds[64]) { UdpTransmitSocket transmitSocket(IpEndpointName(SERIALOSC_ADDRESS, device->port)); char buffer[OSC_BUFFER_SIZE]; osc::OutboundPacketStream p(buffer, OSC_BUFFER_SIZE); std::string address = (device->prefix + "/ring/map"); p << osc::BeginBundleImmediate << osc::BeginMessage(address.c_str()) << n; for (int i = 0; i < 64; i++) { p << leds[i]; } p << osc::EndMessage << osc::EndBundle; transmitSocket.Send(p.Data(), p.Size()); } void SerialOsc::ProcessMessage(const osc::ReceivedMessage& m, const IpEndpointName& remoteEndpoint) { std::string address = m.AddressPattern(); auto iter = m.ArgumentsBegin(); try { if (address == "/serialosc/status") { int state = (iter++)->AsInt32(); if (state == 1) { serviceDetected = true; } } else if (address == "/serialosc/version") { std::string version = (iter++)->AsString(); std::string commit = (iter++)->AsString(); versionString = version + " (" + commit + ")"; } else if (address == "/serialosc/device" || address == "/serialosc/add") { std::string id = (iter++)->AsString(); std::string type = (iter++)->AsString(); int port = (iter++)->AsInt32(); MonomeDevice* device = nullptr; auto deviceIterator = std::find_if(devices.begin(), devices.end(), [id](const MonomeDevice* x) { return x->id == id; }); if (deviceIterator == devices.end()) { device = new MonomeDevice; devices.push_back(device); if (address == "/serialosc/add") { sendDeviceNotifyMessage(); } } else { device = *deviceIterator; } device->id = id; const char* idstr = device->id.c_str(); if (strncmp(idstr, "m40h", 4) == 0 || strncmp(idstr, "a40h", 4) == 0) { device->protocol = PROTOCOL_40H; device->varibright = false; } else if (strncmp(idstr, "m64-", 4) == 0 || strncmp(idstr, "m128-", 5) == 0 || strncmp(idstr, "m256-", 5) == 0) { device->protocol = PROTOCOL_SERIES; device->varibright = false; } else { device->protocol = PROTOCOL_MEXT; device->varibright = true; } device->type = type; device->port = port; device->prefix = devicePrefix; if (device->prefix.find("/") != 0) { device->prefix = "/" + device->prefix; } // wait until after size message recieved -MD // listener->deviceFound(device); sendDeviceInfoMessage(device->port); } else if (address == "/serialosc/remove") { std::string id = (iter++)->AsString(); auto deviceIterator = std::find_if(devices.begin(), devices.end(), [id](const MonomeDevice* x) { return x->id == id; }); if (deviceIterator != devices.end()) { std::remove(devices.begin(), devices.end(), *deviceIterator); delete *deviceIterator; devices.erase(deviceIterator); listener->deviceRemoved(id); sendDeviceNotifyMessage(); } } else if (address == "/sys/id") { currentDeviceID = (iter++)->AsString(); } else if (address == "/sys/size") { auto deviceIterator = std::find_if(devices.begin(), devices.end(), [=](const MonomeDevice* x) { return x->id == currentDeviceID; }); if (deviceIterator != devices.end()) { auto device = *deviceIterator; device->width = (iter++)->AsInt32(); device->height = (iter++)->AsInt32(); // wait to notify listeners here, after size is known -MD listener->deviceFound(device); } } else if (address == "/sys/rotation") { auto deviceIterator = std::find_if(devices.begin(), devices.end(), [=](const MonomeDevice* x) { return x->id == currentDeviceID; }); if (deviceIterator != devices.end()) { auto device = *deviceIterator; device->rotation = (iter++)->AsInt32(); } } else if (address == ("/" + devicePrefix + "/grid/key")) { auto deviceIterator = std::find_if(devices.begin(), devices.end(), [=](const MonomeDevice* x) { return x->port == remoteEndpoint.port; }); int x = (iter++)->AsInt32(); int y = (iter++)->AsInt32(); bool state = (iter++)->AsInt32() > 0; listener->buttonPressMessageReceived(*deviceIterator, x, y, state); } else if (address == ("/" + devicePrefix + "/enc/delta")) { auto deviceIterator = std::find_if(devices.begin(), devices.end(), [=](const MonomeDevice* x) { return x->port == remoteEndpoint.port; }); int n = (iter++)->AsInt32(); int d = (iter++)->AsInt32(); listener->encDeltaMessageReceived(*deviceIterator, n, d); } // TODO : Handle other incoming device commands } catch (osc::WrongArgumentTypeException& exc) { printf("WrongArgumentTypeException: %s", exc.what()); } } ================================================ FILE: lib/serialosc/SerialOsc.h ================================================ #ifndef __SERIALOSC_H__ #define __SERIALOSC_H__ #include "MonomeDevice.h" #include "ip/UdpSocket.h" #include "osc/OscPacketListener.h" #include #include #include #define SERIALOSC_ADDRESS "127.0.0.1" #define SERIALOSC_PORT 12002 class UdpListeningReceiveSocket; class SerialOsc : protected osc::OscPacketListener { public: struct Listener { virtual void deviceFound(const MonomeDevice* const device) {} virtual void deviceRemoved(const std::string& id) {} virtual void buttonPressMessageReceived(MonomeDevice* device, int x, int y, bool state) = 0; virtual void encDeltaMessageReceived(MonomeDevice* device, int n, int delta) = 0; }; typedef std::vector MonomeDeviceCollection; typedef std::vector::iterator MonomeDeviceCollectionIterator; public: SerialOsc(std::string devicePrefix, int defaultPort, int maxPortsToScan = 1000); virtual ~SerialOsc(void); void start(Listener* listener); void stop(void); bool isServiceDetected() const; std::string getVersionString() const; int getListenPort(void) const { return listenPort; } int getDeviceCount(void) const { return devices.size(); } const MonomeDeviceCollection& getDevices(void) const { return devices; } public: // Serialosc messages void sendStatusMessage(void); void sendVersionMessage(void); void sendDeviceQueryMessage(void); void sendDeviceNotifyMessage(void); void sendDeviceInfoMessage(int port); void sendDevicePortMessage(int port); void sendDevicePrefixMessage(int port); // Device messages void sendDeviceLedCommand(const MonomeDevice* const device, int x, int y, bool state); void sendDeviceLedAllCommand(const MonomeDevice* const device, bool state); void sendDeviceLedRowCommand(const MonomeDevice* const device, int x_offset, int y, uint8_t stateBits); void sendDeviceLedMapCommand(const MonomeDevice* const device, int x, int y, uint8_t* stateMap); void sendDeviceLedLevelMapCommand(const MonomeDevice* const device, int x, int y, uint8_t* stateMap); void sendDeviceRingMapCommand(const MonomeDevice* const device, int n, uint8_t leds[64]); protected: void runThread(void); void ProcessMessage(const osc::ReceivedMessage& m, const IpEndpointName& remoteEndpoint) override; protected: UdpListeningReceiveSocket* listenSocket; Listener* listener; MonomeDeviceCollection devices; std::string currentDeviceID; std::string devicePrefix; int listenPort; int portsToScan; std::thread thread; bool serviceDetected; std::string versionString; }; #endif //_SERIALOSC_H__ ================================================ FILE: lib/simple-svg/CMakeLists.txt ================================================ project (simple-svg) cmake_minimum_required(VERSION 2.8) add_executable(simple_svg main_1.0.0.cpp simple_svg_1.0.0.hpp) set_property(TARGET simple_svg PROPERTY CXX_STANDARD 11) if(MSVC) add_definitions(/D_CRT_SECURE_NO_WARNINGS) add_definitions(/D_SCL_SECURE_NO_WARNINGS) add_definitions(/DNOMINMAX) endif(MSVC) ================================================ FILE: lib/simple-svg/LICENSE ================================================ Copyright (c) 2015, adishavit 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 simple-svg nor the names of its 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 HOLDER 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. ================================================ FILE: lib/simple-svg/README.md ================================================ # simple-svg Easy to use SVG library for C++ (fork) This library is a single file header-only C++ library for creating SVG files. Simple-SVG was written to provide an easy API to allow beginners to become more accustomed to C++ by easily creating graphics. This project creates files that can then be viewed by a sister project [File Monitor](http://code.google.com/p/file-monitor). As you make changes to your SVG document, you will automatically see an updated image in File Monitor. This is a fork/clone of the original code [here](https://code.google.com/p/simple-svg/). ================================================ FILE: lib/simple-svg/main_1.0.0.cpp ================================================ /******************************************************************************* * The "New BSD License" : http://www.opensource.org/licenses/bsd-license.php * ******************************************************************************** Copyright (c) 2010, Mark Turney 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 nor the names of its 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 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. ******************************************************************************/ #include "simple_svg_1.0.0.hpp" using namespace svg; // Demo page shows sample usage of the Simple SVG library. int main() { Dimensions dimensions(100, 100); Document doc("my_svg.svg", Layout(dimensions, Layout::BottomLeft)); // Red image border. Polygon border(Stroke(1, Color::Red)); border << Point(0, 0) << Point(dimensions.width, 0) << Point(dimensions.width, dimensions.height) << Point(0, dimensions.height); doc << border; // Long notation. Local variable is created, children are added to varaible. LineChart chart(5.0); Polyline polyline_a(Stroke(.5, Color::Blue)); Polyline polyline_b(Stroke(.5, Color::Aqua)); Polyline polyline_c(Stroke(.5, Color::Fuchsia)); polyline_a << Point(0, 0) << Point(10, 30) << Point(20, 40) << Point(30, 45) << Point(40, 44); polyline_b << Point(0, 10) << Point(10, 22) << Point(20, 30) << Point(30, 32) << Point(40, 30); polyline_c << Point(0, 12) << Point(10, 15) << Point(20, 14) << Point(30, 10) << Point(40, 2); chart << polyline_a << polyline_b << polyline_c; doc << chart; // Condensed notation, parenthesis isolate temporaries that are inserted into parents. doc << (LineChart(Dimensions(65, 5)) << (Polyline(Stroke(.5, Color::Blue)) << Point(0, 0) << Point(10, 8) << Point(20, 13)) << (Polyline(Stroke(.5, Color::Orange)) << Point(0, 10) << Point(10, 16) << Point(20, 20)) << (Polyline(Stroke(.5, Color::Cyan)) << Point(0, 5) << Point(10, 13) << Point(20, 16))); doc << Circle(Point(80, 80), 20, Fill(Color(100, 200, 120)), Stroke(1, Color(200, 250, 150))); doc << Text(Point(5, 77), "Simple SVG", Color::Silver, Font(10, "Verdana")); doc << (Polygon(Color(200, 160, 220), Stroke(.5, Color(150, 160, 200))) << Point(20, 70) << Point(25, 72) << Point(33, 70) << Point(35, 60) << Point(25, 55) << Point(18, 63)); doc << Rectangle(Point(70, 55), 20, 15, Color::Yellow); doc.save(); } ================================================ FILE: lib/simple-svg/simple_svg_1.0.0.hpp ================================================ /******************************************************************************* * The "New BSD License" : http://www.opensource.org/licenses/bsd-license.php * ******************************************************************************** Copyright (c) 2010, Mark Turney 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 nor the names of its 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 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. ******************************************************************************/ #ifndef SIMPLE_SVG_HPP #define SIMPLE_SVG_HPP #include #include #include #include #include namespace svg { // Utility XML/String Functions. template inline std::string attribute(std::string const & attribute_name, T const & value, std::string const & unit = "") { std::stringstream ss; ss << attribute_name << "=\"" << value << unit << "\" "; return ss.str(); } inline std::string elemStart(std::string const & element_name) { return "\t<" + element_name + " "; } inline std::string elemEnd(std::string const & element_name) { return "\n"; } inline std::string emptyElemEnd() { return "/>\n"; } // Quick optional return type. This allows functions to return an invalid // value if no good return is possible. The user checks for validity // before using the returned value. template class optional { public: optional(T const & type) : valid(true), type(type) { } optional() : valid(false), type(T()) { } T * operator->() { // If we try to access an invalid value, an exception is thrown. if (!valid) throw std::exception(); return &type; } // Test for validity. bool operator!() const { return !valid; } private: bool valid; T type; }; struct Dimensions { Dimensions(double width, double height) : width(width), height(height) { } Dimensions(double combined = 0) : width(combined), height(combined) { } double width; double height; }; struct Point { Point(double x = 0, double y = 0) : x(x), y(y) { } double x; double y; }; inline optional getMinPoint(std::vector const & points) { if (points.empty()) return optional(); Point min = points[0]; for (unsigned i = 0; i < points.size(); ++i) { if (points[i].x < min.x) min.x = points[i].x; if (points[i].y < min.y) min.y = points[i].y; } return optional(min); } inline optional getMaxPoint(std::vector const & points) { if (points.empty()) return optional(); Point max = points[0]; for (unsigned i = 0; i < points.size(); ++i) { if (points[i].x > max.x) max.x = points[i].x; if (points[i].y > max.y) max.y = points[i].y; } return optional(max); } // Defines the dimensions, scale, origin, and origin offset of the document. struct Layout { enum Origin { TopLeft, BottomLeft, TopRight, BottomRight }; Layout(Dimensions const & dimensions = Dimensions(400, 300), Origin origin = BottomLeft, double scale = 1, Point const & origin_offset = Point(0, 0)) : dimensions(dimensions), scale(scale), origin(origin), origin_offset(origin_offset) { } Dimensions dimensions; double scale; Origin origin; Point origin_offset; }; // Convert coordinates in user space to SVG native space. inline double translateX(double x, Layout const & layout) { if (layout.origin == Layout::BottomRight || layout.origin == Layout::TopRight) return layout.dimensions.width - ((x + layout.origin_offset.x) * layout.scale); else return (layout.origin_offset.x + x) * layout.scale; } inline double translateY(double y, Layout const & layout) { if (layout.origin == Layout::BottomLeft || layout.origin == Layout::BottomRight) return layout.dimensions.height - ((y + layout.origin_offset.y) * layout.scale); else return (layout.origin_offset.y + y) * layout.scale; } inline double translateScale(double dimension, Layout const & layout) { return dimension * layout.scale; } class Serializeable { public: Serializeable() { } virtual ~Serializeable() { }; virtual std::string toString(Layout const & layout) const = 0; }; class Color : public Serializeable { public: enum Defaults { Transparent = -1, Aqua, Black, Blue, Brown, Cyan, Fuchsia, Green, Lime, Magenta, Orange, Purple, Red, Silver, White, Yellow }; Color(int r, int g, int b) : transparent(false), red(r), green(g), blue(b) { } Color(Defaults color) : transparent(false), red(0), green(0), blue(0) { switch (color) { case Aqua: assign(0, 255, 255); break; case Black: assign(0, 0, 0); break; case Blue: assign(0, 0, 255); break; case Brown: assign(165, 42, 42); break; case Cyan: assign(0, 255, 255); break; case Fuchsia: assign(255, 0, 255); break; case Green: assign(0, 128, 0); break; case Lime: assign(0, 255, 0); break; case Magenta: assign(255, 0, 255); break; case Orange: assign(255, 165, 0); break; case Purple: assign(128, 0, 128); break; case Red: assign(255, 0, 0); break; case Silver: assign(192, 192, 192); break; case White: assign(255, 255, 255); break; case Yellow: assign(255, 255, 0); break; default: transparent = true; break; } } virtual ~Color() { } std::string toString(Layout const &) const { std::stringstream ss; if (transparent) ss << "none"; else ss << "rgb(" << red << "," << green << "," << blue << ")"; return ss.str(); } private: bool transparent; int red; int green; int blue; void assign(int r, int g, int b) { red = r; green = g; blue = b; } }; class Fill : public Serializeable { public: Fill(Color::Defaults color) : color(color) { } Fill(Color color = Color::Transparent) : color(color) { } std::string toString(Layout const & layout) const { std::stringstream ss; ss << attribute("fill", color.toString(layout)); return ss.str(); } private: Color color; }; class Stroke : public Serializeable { public: Stroke(double width = -1, Color color = Color::Transparent, bool nonScalingStroke = false) : width(width), color(color), nonScaling(nonScalingStroke) { } std::string toString(Layout const & layout) const { // If stroke width is invalid. if (width < 0) return std::string(); std::stringstream ss; ss << attribute("stroke-width", translateScale(width, layout)) << attribute("stroke", color.toString(layout)); if (nonScaling) ss << attribute("vector-effect", "non-scaling-stroke"); return ss.str(); } private: double width; Color color; bool nonScaling; }; class Font : public Serializeable { public: Font(double size = 12, std::string const & family = "Verdana") : size(size), family(family) { } std::string toString(Layout const & layout) const { std::stringstream ss; ss << attribute("font-size", translateScale(size, layout)) << attribute("font-family", family); return ss.str(); } private: double size; std::string family; }; class Shape : public Serializeable { public: Shape(Fill const & fill = Fill(), Stroke const & stroke = Stroke()) : fill(fill), stroke(stroke) { } virtual ~Shape() { } virtual std::string toString(Layout const & layout) const = 0; virtual void offset(Point const & offset) = 0; protected: Fill fill; Stroke stroke; }; template inline std::string vectorToString(std::vector collection, Layout const & layout) { std::string combination_str; for (unsigned i = 0; i < collection.size(); ++i) combination_str += collection[i].toString(layout); return combination_str; } class Circle : public Shape { public: Circle(Point const & center, double diameter, Fill const & fill, Stroke const & stroke = Stroke()) : Shape(fill, stroke), center(center), radius(diameter / 2) { } std::string toString(Layout const & layout) const { std::stringstream ss; ss << elemStart("circle") << attribute("cx", translateX(center.x, layout)) << attribute("cy", translateY(center.y, layout)) << attribute("r", translateScale(radius, layout)) << fill.toString(layout) << stroke.toString(layout) << emptyElemEnd(); return ss.str(); } void offset(Point const & offset) { center.x += offset.x; center.y += offset.y; } private: Point center; double radius; }; class Elipse : public Shape { public: Elipse(Point const & center, double width, double height, Fill const & fill = Fill(), Stroke const & stroke = Stroke()) : Shape(fill, stroke), center(center), radius_width(width / 2), radius_height(height / 2) { } std::string toString(Layout const & layout) const { std::stringstream ss; ss << elemStart("ellipse") << attribute("cx", translateX(center.x, layout)) << attribute("cy", translateY(center.y, layout)) << attribute("rx", translateScale(radius_width, layout)) << attribute("ry", translateScale(radius_height, layout)) << fill.toString(layout) << stroke.toString(layout) << emptyElemEnd(); return ss.str(); } void offset(Point const & offset) { center.x += offset.x; center.y += offset.y; } private: Point center; double radius_width; double radius_height; }; class Rectangle : public Shape { public: Rectangle(Point const & edge, double width, double height, Fill const & fill = Fill(), Stroke const & stroke = Stroke()) : Shape(fill, stroke), edge(edge), width(width), height(height) { } std::string toString(Layout const & layout) const { std::stringstream ss; ss << elemStart("rect") << attribute("x", translateX(edge.x, layout)) << attribute("y", translateY(edge.y, layout)) << attribute("width", translateScale(width, layout)) << attribute("height", translateScale(height, layout)) << fill.toString(layout) << stroke.toString(layout) << emptyElemEnd(); return ss.str(); } void offset(Point const & offset) { edge.x += offset.x; edge.y += offset.y; } private: Point edge; double width; double height; }; class Line : public Shape { public: Line(Point const & start_point, Point const & end_point, Stroke const & stroke = Stroke()) : Shape(Fill(), stroke), start_point(start_point), end_point(end_point) { } std::string toString(Layout const & layout) const { std::stringstream ss; ss << elemStart("line") << attribute("x1", translateX(start_point.x, layout)) << attribute("y1", translateY(start_point.y, layout)) << attribute("x2", translateX(end_point.x, layout)) << attribute("y2", translateY(end_point.y, layout)) << stroke.toString(layout) << emptyElemEnd(); return ss.str(); } void offset(Point const & offset) { start_point.x += offset.x; start_point.y += offset.y; end_point.x += offset.x; end_point.y += offset.y; } private: Point start_point; Point end_point; }; class Polygon : public Shape { public: Polygon(Fill const & fill = Fill(), Stroke const & stroke = Stroke()) : Shape(fill, stroke) { } Polygon(Stroke const & stroke = Stroke()) : Shape(Color::Transparent, stroke) { } Polygon & operator<<(Point const & point) { points.push_back(point); return *this; } std::string toString(Layout const & layout) const { std::stringstream ss; ss << elemStart("polygon"); ss << "points=\""; for (unsigned i = 0; i < points.size(); ++i) ss << translateX(points[i].x, layout) << "," << translateY(points[i].y, layout) << " "; ss << "\" "; ss << fill.toString(layout) << stroke.toString(layout) << emptyElemEnd(); return ss.str(); } void offset(Point const & offset) { for (unsigned i = 0; i < points.size(); ++i) { points[i].x += offset.x; points[i].y += offset.y; } } private: std::vector points; }; class Path : public Shape { public: Path(Fill const & fill = Fill(), Stroke const & stroke = Stroke()) : Shape(fill, stroke) { startNewSubPath(); } Path(Stroke const & stroke = Stroke()) : Shape(Color::Transparent, stroke) { startNewSubPath(); } Path & operator<<(Point const & point) { paths.back().push_back(point); return *this; } void startNewSubPath() { if (paths.empty() || 0 < paths.back().size()) paths.emplace_back(); } std::string toString(Layout const & layout) const { std::stringstream ss; ss << elemStart("path"); ss << "d=\""; for (auto const& subpath: paths) { if (subpath.empty()) continue; ss << "M"; for (auto const& point: subpath) ss << translateX(point.x, layout) << "," << translateY(point.y, layout) << " "; ss << "z "; } ss << "\" "; ss << "fill-rule=\"evenodd\" "; ss << fill.toString(layout) << stroke.toString(layout) << emptyElemEnd(); return ss.str(); } void offset(Point const & offset) { for (auto& subpath : paths) for (auto& point : subpath) { point.x += offset.x; point.y += offset.y; } } private: std::vector> paths; }; class Polyline : public Shape { public: Polyline(Fill const & fill = Fill(), Stroke const & stroke = Stroke()) : Shape(fill, stroke) { } Polyline(Stroke const & stroke = Stroke()) : Shape(Color::Transparent, stroke) { } Polyline(std::vector const & points, Fill const & fill = Fill(), Stroke const & stroke = Stroke()) : Shape(fill, stroke), points(points) { } Polyline & operator<<(Point const & point) { points.push_back(point); return *this; } std::string toString(Layout const & layout) const { std::stringstream ss; ss << elemStart("polyline"); ss << "points=\""; for (unsigned i = 0; i < points.size(); ++i) ss << translateX(points[i].x, layout) << "," << translateY(points[i].y, layout) << " "; ss << "\" "; ss << fill.toString(layout) << stroke.toString(layout) << emptyElemEnd(); return ss.str(); } void offset(Point const & offset) { for (unsigned i = 0; i < points.size(); ++i) { points[i].x += offset.x; points[i].y += offset.y; } } std::vector points; }; class Text : public Shape { public: Text(Point const & origin, std::string const & content, Fill const & fill = Fill(), Font const & font = Font(), Stroke const & stroke = Stroke()) : Shape(fill, stroke), origin(origin), content(content), font(font) { } std::string toString(Layout const & layout) const { std::stringstream ss; ss << elemStart("text") << attribute("x", translateX(origin.x, layout)) << attribute("y", translateY(origin.y, layout)) << fill.toString(layout) << stroke.toString(layout) << font.toString(layout) << ">" << content << elemEnd("text"); return ss.str(); } void offset(Point const & offset) { origin.x += offset.x; origin.y += offset.y; } private: Point origin; std::string content; Font font; }; // Sample charting class. class LineChart : public Shape { public: LineChart(Dimensions margin = Dimensions(), double scale = 1, Stroke const & axis_stroke = Stroke(.5, Color::Purple)) : axis_stroke(axis_stroke), margin(margin), scale(scale) { } LineChart & operator<<(Polyline const & polyline) { if (polyline.points.empty()) return *this; polylines.push_back(polyline); return *this; } std::string toString(Layout const & layout) const { if (polylines.empty()) return ""; std::string ret; for (unsigned i = 0; i < polylines.size(); ++i) ret += polylineToString(polylines[i], layout); return ret + axisString(layout); } void offset(Point const & offset) { for (unsigned i = 0; i < polylines.size(); ++i) polylines[i].offset(offset); } private: Stroke axis_stroke; Dimensions margin; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-private-field" double scale; #pragma GCC diagnostic pop std::vector polylines; optional getDimensions() const { if (polylines.empty()) return optional(); optional min = getMinPoint(polylines[0].points); optional max = getMaxPoint(polylines[0].points); for (unsigned i = 0; i < polylines.size(); ++i) { if (getMinPoint(polylines[i].points)->x < min->x) min->x = getMinPoint(polylines[i].points)->x; if (getMinPoint(polylines[i].points)->y < min->y) min->y = getMinPoint(polylines[i].points)->y; if (getMaxPoint(polylines[i].points)->x > max->x) max->x = getMaxPoint(polylines[i].points)->x; if (getMaxPoint(polylines[i].points)->y > max->y) max->y = getMaxPoint(polylines[i].points)->y; } return optional(Dimensions(max->x - min->x, max->y - min->y)); } std::string axisString(Layout const & layout) const { optional dimensions = getDimensions(); if (!dimensions) return ""; // Make the axis 10% wider and higher than the data points. double width = dimensions->width * 1.1; double height = dimensions->height * 1.1; // Draw the axis. Polyline axis(Color::Transparent, axis_stroke); axis << Point(margin.width, margin.height + height) << Point(margin.width, margin.height) << Point(margin.width + width, margin.height); return axis.toString(layout); } std::string polylineToString(Polyline const & polyline, Layout const & layout) const { Polyline shifted_polyline = polyline; shifted_polyline.offset(Point(margin.width, margin.height)); std::vector vertices; for (unsigned i = 0; i < shifted_polyline.points.size(); ++i) vertices.push_back(Circle(shifted_polyline.points[i], getDimensions()->height / 30.0, Color::Black)); return shifted_polyline.toString(layout) + vectorToString(vertices, layout); } }; class Document { public: Document() {}; Document(std::string const & file_name, Layout layout = Layout()) : file_name(file_name), layout(layout) { } Document & operator<<(Shape const & shape) { body_nodes_str_list.push_back(shape.toString(layout)); return *this; } std::string toString() const { std::stringstream ss; writeToStream(ss); return ss.str(); } bool save() const { std::ofstream ofs(file_name.c_str()); if (!ofs.good()) return false; writeToStream(ofs); ofs.close(); return true; } private: void writeToStream(std::ostream& str) const { str << "\n\n\n"; for (const auto& body_node_str : body_nodes_str_list) { str << body_node_str; } str << elemEnd("svg"); } private: std::string file_name; Layout layout; std::vector body_nodes_str_list; }; } #endif ================================================ FILE: mkdocs.yml ================================================ site_name: monome for VCV Rack site_url: https://dewb.github.io/monome-rack repo_url: https://github.com/Dewb/monome-rack nav: - Manual: 'index.md' - 'General Info': - Introduction: 'general/intro.md' - 'Connecting Devices': 'general/connections.md' - 'Voltage Standards': 'general/voltage.md' - 'Credits & License': "general/credits.md" - 'Core Modules': - Ansible: 'modules/ansible.md' - Earthsea: 'modules/earthsea.md' - Meadowphysics: 'modules/meadowphysics.md' - Teletype: 'modules/teletype.md' - 'White Whale': 'modules/whitewhale.md' - 'Accessory Modules': - 'Virtual Grids': 'modules/grids.md' - 'Faderbank': 'modules/faderbank.md' - 'Getting Help': - Index: 'help.md' - 'Releases↗': 'https://github.com/Dewb/monome-rack/releases' - 'Library Page↗': 'https://library.vcvrack.com/monome' theme: name: terminal locale: en custom_dir: docs/custom-theme features: - navigation.side.indexes watch: - docs/custom-theme docs_dir: docs/content site_dir: build/docs extra_css: [extra.css] markdown_extensions: - toc: baselevel: "1" toc_depth: "3" permalink: false - attr_list - md_in_html plugins: - search: lang: en separator: '[\s\-,:!=\[\]()"/]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;' ================================================ FILE: plugin.json ================================================ { "slug": "monome", "name": "monome", "version": "2.2.8", "minRackVersion": "2.4.0", "license": "GPL-2.0-only", "author": "Michael Dewberry", "authorEmail": "", "authorUrl": "https://dewb.github.io/monome-rack/general/credits/", "pluginUrl": "https://dewb.github.io/monome-rack", "manualUrl": "https://dewb.github.io/monome-rack", "sourceUrl": "https://github.com/Dewb/monome-rack", "donateUrl": "", "changelogUrl": "https://github.com/Dewb/monome-rack/releases", "modules": [ { "slug": "whitewhale", "name": "white whale", "description": "grid-enabled probabilistic step sequencer", "modularGridUrl": "https://www.modulargrid.net/e/monome-white-whale", "manualUrl": "https://dewb.github.io/monome-rack/modules/whitewhale", "tags": [ "sequencer", "clock generator", "digital", "hardware clone", "external" ] }, { "slug": "earthsea", "name": "earthsea", "description": "grid-enabled shape-memory pattern instrument", "modularGridUrl": "https://www.modulargrid.net/e/monome-earthsea", "manualUrl": "https://dewb.github.io/monome-rack/modules/earthsea", "tags": [ "sequencer", "digital", "hardware clone", "external" ] }, { "slug": "meadowphysics", "name": "meadowphysics", "description": "grid-enabled rhizomatic cascading counter", "modularGridUrl": "https://www.modulargrid.net/e/monome-meadowphysics", "manualUrl": "https://dewb.github.io/monome-rack/modules/meadowphysics", "tags": [ "sequencer", "clock generator", "digital", "hardware clone", "external" ] }, { "slug": "teletype", "name": "teletype", "description": "algorithmic ecosystem: a dynamic, musical event triggering platform", "modularGridUrl": "https://www.modulargrid.net/e/monome-teletype", "manualUrl": "https://dewb.github.io/monome-rack/modules/teletype", "tags": [ "arpeggiator", "clock generator", "clock modulator", "envelope follower", "envelope generator", "function generator", "logic", "quantizer", "random", "sequencer", "slew limiter", "sample and hold", "utility", "digital", "hardware clone", "external" ] }, { "slug": "ansible", "name": "ansible", "description": "multi-mode sequencer and control voltage generator, for grid and arc controllers", "modularGridUrl": "https://www.modulargrid.net/e/monome-ansible", "manualUrl": "https://dewb.github.io/monome-rack/modules/ansible", "tags": [ "sequencer", "clock generator", "logic", "function generator", "digital", "hardware clone", "external" ] }, { "slug": "grid128", "name": "grid 128", "description": "16x8 grid controller", "manualUrl": "https://dewb.github.io/monome-rack/modules/grids", "tags": [ "digital", "hardware clone", "controller" ] }, { "slug": "grid64", "name": "grid 64", "description": "8x8 grid controller", "manualUrl": "https://dewb.github.io/monome-rack/modules/grids", "tags": [ "digital", "hardware clone", "controller" ] }, { "slug": "grid256", "name": "grid 256", "description": "16x16 grid controller", "manualUrl": "https://dewb.github.io/monome-rack/modules/grids", "tags": [ "digital", "hardware clone", "controller" ] }, { "slug": "faderbank", "name": "faderbank", "description": "virtual control surface and teletype parameter expander", "manualUrl": "https://dewb.github.io/monome-rack/modules/faderbank", "tags": [ "digital", "hardware clone", "controller", "expander", "polyphonic" ] } ] } ================================================ FILE: presets/teletype/00_TRIANGLE MOUNTAIN.vcvm ================================================ { "plugin": "monome", "model": "teletype", "version": "2.0.0-alpha5", "params": [ { "value": 0.0, "id": 0 }, { "value": 0.0, "id": 1 } ], "data": { "loadScript": { "active": true, "flash": 0, "data": "TRIANGLE MOUNTAIN\n\n1: RESET POSITION TO 0\n2: NEXT SCALE\n3: SHORTEN LOOP\n4: TOGGLE FORWARD/REVERSE\n5: THROW CV 2 A NEW NOTE\n6: RANDOMIZE LOOP LENGTH \n7: SET ROOT TO CV IN\n8: ADD 1 SEMI TO CV 4\n\nTEMPO ON METRO, SET WITH\nPARAM KNOB\n\nCV 1 TO OSC FREQ\n\nCHANGE SCALES IN TRACKER.\n\nPATCH CV 2 TO ANOTHER OSC\nFOR WEIRD COUNTERPOINT\n\nTRY PATCHING CV4 TO CV IN\nFOR AUTOMATIC TRANSPOSITION.\n\n\n\n#1\nP.I 0\n\n#2\nP.N WRAP ADD P.N 1 0 3\nP.I P.END\n\n#3\nP.END WRAP SUB P.END 1 1 7\n\n#4\nX EZ X\n\n#5\nS: CV 2 ADD N P.HERE V 1\nS: TR.PULSE B\n\n#6\nP.END RRAND 1 7\n\n#7\nZ IN\n\n#8\nCV 4 N WRAP 0 0 11\n\n#M\nIF X: P.PREV\nELSE: P.NEXT\nCV 1 ADD N P.HERE Z\nM SUB 320 RSH PARAM 6\nS.ALL\nTR.PULSE A\n\n#I\nL A B: TR.TIME I 40\n\n#P\n8\t8\t8\t8\n1\t1\t1\t1\n0\t0\t0\t0\n5\t7\t7\t7\n\n0\t0\t0\t0\n4\t2\t3\t5\n7\t5\t6\t7\n11\t9\t8\t10\n12\t12\t11\t14\n16\t15\t15\t19\n19\t19\t17\t21\n23\t22\t22\t26\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n\n#G\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n" } } } ================================================ FILE: presets/teletype/01_RANDOMS.vcvm ================================================ { "plugin": "monome", "model": "teletype", "version": "2.0.0-alpha5", "params": [ { "value": 0.0, "id": 0 }, { "value": 0.0, "id": 1 } ], "data": { "loadScript": { "active": true, "flash": 0, "data": "RANDOMS\n\n1: RANDOM STATE (TR A)\n2: RAND DIMINISHED NOTES (CV1)\n3: BURST GEN (TR B)\n4: DRUNK SLEWED VOLTS (CV2)\n5: START/RESET LFO\n6: 1/F MELODY GENERATOR (CV3)\n7: (FROM TR D)\n8: (FROM TR C)\n\nINS CORRESPOND TO OUTPUT JACKS\nBENEATH.\n\nPATCH TR C TO INS, AND TR D TO\nIN7 FOR LFO FUNCTIONS.\n\nPARAM KNOB SETS BURST RATE.\n\n\n\n#1\nTR A TOSS\n\n#2\nCV 1 N QT RAND 36 3\n\n#3\nY ADD 200 RSH PARAM 4\nTR.PULSE B\nDEL RAND Y: TR.PULSE B\nDEL RAND Y: TR.PULSE B\nDEL RAND Y: TR.PULSE B\nDEL ADD 40 Y: TR B 0\n\n#4\nZ V RRAND -2 2\nCV 2 ADD CV 2 Z\n\n#5\nT RRAND 10 10000\nCV.SET 4 0\nCV.SLEW 4 T\nCV 4 V 8\nDEL T: TR.PULSE C\n\n#6\nX ADD X RRAND -1 1\nPROB 50: X ADD X RRAND -2 2\nPROB 25: X ADD X RRAND -4 4\nPROB 12: X ADD X RRAND -8 8\nPROB 6: X ADD X RRAND -16 16\nCV 3 N WRAP X 0 48\n\n#7\nT RRAND 10 10000\nCV.SLEW 4 T\nCV 4 V 8\nDEL T: TR.PULSE C\n\n#8\nT RRAND 10 10000\nCV.SLEW 4 T\nCV 4 0\nDEL T: TR.PULSE D\n\n#M\n\n#I\nL A B: TR.TIME I 25\nDRUNK 12\nCV.SLEW 2 1000\nTR.PULSE D\nCV.SLEW 3 5\n\n#P\n0\t0\t0\t0\n1\t1\t1\t1\n0\t0\t0\t0\n63\t63\t63\t63\n\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n\n#G\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n" } } } ================================================ FILE: presets/teletype/02_HIDDEN PATH NO PATH.vcvm ================================================ { "plugin": "monome", "model": "teletype", "version": "2.0.0-alpha5", "params": [ { "value": 0.0, "id": 0 }, { "value": 0.0, "id": 1 } ], "data": { "loadScript": { "active": true, "flash": 0, "data": "HIDDEN PATH NO PATH\n\n1: CLOCK\n2: WANDERING STEP\n3: CV 2 MIRRO CV 1\n4: STEP FORWARD\n5: GENTLE WANDER CV 3&4\n6: JUMP TO START\n7: SUDDEN TELEPORT CV 3&4\n\nCV 1: OSC FREQ (MAIN)\nCV 2: OSC FREQ (DRONE)\nTR 1-4: PROBABLE GATES\n\n\n\n#1\nS.ALL\nCV 1 N P.HERE\nTR.PULSE A\nPROB 80: TR.PULSE B\nPROB 50: TR.PULSE C\nPROB 20: TR.PULSE D\n\n#2\nIF TOSS: P.NEXT\nELIF TOSS: P.PREV\n\n#3\nS: CV 2 CV 1\n\n#4\nP.NEXT\n\n#5\nCV 3 V RAND 5\nCV 4 V RAND TOSS\n\n#6\nP.I 0\n\n#7\nCV.SET 3 V RAND 5\nCV.SET 4 V RAND TOSS\n\n#8\n\n#M\n\n#I\nCV.SLEW 3 500\nCV.SLEW 4 200\nL 1 4: TR I 0\nP.N 0\n\n#P\n18\t0\t0\t0\n1\t1\t1\t1\n0\t0\t0\t0\n63\t63\t63\t63\n\n0\t0\t0\t0\n3\t0\t0\t0\n7\t0\t0\t0\n9\t0\t0\t0\n12\t0\t0\t0\n15\t0\t0\t0\n19\t0\t0\t0\n22\t0\t0\t0\n29\t0\t0\t0\n25\t0\t0\t0\n22\t0\t0\t0\n20\t0\t0\t0\n17\t0\t0\t0\n15\t0\t0\t0\n13\t0\t0\t0\n10\t0\t0\t0\n8\t0\t0\t0\n5\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n\n#G\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n" } } } ================================================ FILE: presets/teletype/03_4TRACK.vcvm ================================================ { "plugin": "monome", "model": "teletype", "version": "2.0.0-alpha5", "params": [ { "value": 0.0, "id": 0 }, { "value": 0.0, "id": 1 } ], "data": { "loadScript": { "active": true, "flash": 0, "data": "4TRACK\n\n1-4: CLOCK INDIVIDUAL TRACK\n5: CLOCK ALL\n6: RESET\n7: DRUNK POSITION\n\nTILDE ENTERS TRACKER MODE TO\nEDIT NOTES\n\nCOLS 1-3 ARE NOTES, 4 IS CV\n0-1000 FOR OV-10.00V CV/TR\nOUT PER COLUMN\n\n\n\n#1\nP.N 0\nCV 1 N P.NEXT\nTR.PULSE A\n\n#2\nP.N 1\nCV 2 N P.NEXT\nTR.PULSE B\n\n#3\nP.N 2\nCV 3 N P.NEXT\nTR.PULSE C\n\n#4\nP.N 3\nCV 4 VV P.NEXT\nTR.TOG D\n\n#5\nP.N 0\nCV 1 N P.NEXT\nCV 2 N PN 1 P.HERE\nCV 3 N PN 2 P.HERE\nCV 4 N PN 3 P.HERE\nL A D: TR.PULSE I\n\n#6\nP.I P.END\n\n#7\nP.I ADD P.I RRAND -2 1\n\n#8\n\n#M\n\n#I\nL A D: TR.TIME 30\nL 1 4: CV.SLEW 50\n\n#P\n8\t8\t8\t8\n1\t1\t1\t1\n0\t0\t0\t0\n7\t63\t63\t63\n\n0\t0\t0\t0\n2\t4\t0\t845\n7\t0\t0\t0\n14\t12\t0\t613\n18\t0\t0\t30\n11\t16\t0\t500\n4\t0\t0\t800\n0\t0\t0\t50\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n\n#G\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n" } } } ================================================ FILE: presets/teletype/04_MOOD RING.vcvm ================================================ { "plugin": "monome", "model": "teletype", "version": "2.0.0-alpha5", "params": [ { "value": 0.0, "id": 0 }, { "value": 0.0, "id": 1 } ], "data": { "loadScript": { "active": true, "flash": 0, "data": "MOOD RING\n3 VOICE JAZZ BOX GENERATOR\n\nCV 1-3 TO VCO PITCH\nTR A-C TO ENVELOPES\n\nTR 1-4 CHANGE ROOT NOTE\n1: DOWN 2ND\n2: UP 2ND\n3: DOWN 3RD\n4: UP 4TH\n\nTR 5-8 IMPROVISE SCALES\n5: DOWN 2ND\n6: UP 2ND\n7: UP 3RD\n8: UP 4TH\n\nTR 1 HAS A RHYTHM SET BY\nMETRO TIME.\n\nDRIVE TR1-4 WITH A SLOW CLOCK\nOR MANUALLY WITH WALK.\n\nDRIVE TR5-8 WITH A FAST CLOCK\nOR MULTIPLE CLOCK INPUTS\nFOR ALGORITHMIC SOLOING.\n\n\n\n#1\nX WRAP SUB X 1 0 6\nS: CV 1 N PN 0 X\nIF EQ X 6: P.N 3\nELIF EQ X 4: P.N 2\nELIF EQ 0 MOD X 3: P.N 0\nELSE: P.N 1\n\n#2\nX WRAP ADD X 1 0 6\nS: CV 1 N PN 0 X\nIF EQ X 6: P.N 3\nELIF EQ X 4: P.N 2\nELIF EQ 0 MOD X 3: P.N 0\nELSE: P.N 1\n\n#3\nX WRAP SUB X 2 0 6\nS: CV 1 N PN 0 X\nIF EQ X 6: P.N 3\nELIF EQ X 4: P.N 2\nELIF EQ 0 MOD X 3: P.N 0\nELSE: P.N 1\n\n#4\nX WRAP ADD X 3 0 6\nS: CV 1 N PN 0 X\nIF EQ X 6: P.N 3\nELIF EQ X 4: P.N 2\nELIF EQ 0 MOD X 3: P.N 0\nELSE: P.N 1\n\n#5\nY PN 0 X\nP.I WRAP SUB P.I 1 0 14\nCV 3 N ADD Y P.HERE\nZ ADD 2 MUL 4 TOSS\nCV 2 N PN P.N ADD Z X\nPROB 70: TR.PULSE 3\n\n#6\nY PN 0 X\nP.I WRAP ADD P.I 1 0 14\nCV 3 N ADD Y P.HERE\nZ ADD 2 MUL 4 TOSS\nCV 2 N ADD Y PN P.N Z\nPROB 70: TR.PULSE 3\n\n#7\nY PN 0 X\nP.I WRAP ADD P.I 2 0 14\nCV 3 N ADD Y P.HERE\nZ ADD 2 MUL 4 TOSS\nCV 2 N ADD Y PN P.N Z\nPROB 70: TR.PULSE 3\n\n#8\nY PN 0 X\nP.I WRAP ADD P.I 3 0 14\nCV 3 N ADD Y P.HERE\nZ ADD 2 MUL 4 TOSS\nCV 2 N ADD Y PN P.N Z\nPROB 70: TR.PULSE 3\n\n#M\nS.POP\nPROB 50: TR.PULSE A\nDEL MUL T RRAND 1 5: TR.TOG A\nDEL MUL T 4: TR.PULSE A\nDEL MUL T 7: TR.PULSE A\nPROB 80: TR.PULSE B\n\n#I\nM 750\nT 93\nL A D: TR.TIME 25\nL 1 4: CV.SLEW I 12\n\n#P\n15\t15\t17\t15\n1\t1\t1\t1\n0\t0\t0\t0\n14\t14\t16\t14\n\n0\t0\t0\t0\n2\t2\t1\t2\n4\t3\t3\t3\n5\t5\t4\t5\n7\t7\t6\t6\n9\t9\t7\t8\n11\t10\t9\t10\n12\t12\t10\t12\n14\t14\t12\t14\n16\t15\t13\t15\n17\t17\t15\t17\n19\t19\t16\t18\n21\t21\t18\t20\n23\t22\t19\t22\n24\t24\t21\t24\n0\t0\t22\t0\n0\t0\t24\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n\n#G\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n" } } } ================================================ FILE: presets/teletype/MINIM.vcvm ================================================ { "plugin": "monome", "model": "teletype", "version": "2.1.5", "params": [ { "value": 0.0, "id": 0 }, { "value": 0.0, "id": 1 } ], "data": { "loadScript": { "active": true, "flash": 0, "data": "M I N I M \n@MODULARBEAT\n\n\nSCALE: %8\nCV IN: %9\n\nA CHORD+ARP SEQUENCER...\n\nLEFT SIDE: CHORD SEQ\nCENTER: SET LOOP START+END\nRIGHT SIDE: ARP SEQ\n\nIN 1: ADVANCE CHORD\nIN 2: RESET ARP\nIN 3: ADVANCE ARP\n\nCV IN: CHORD VOICING\nPARAM KNOB: SCALE\nTR 1: CHORD TRIGGER\nTR 2: LIVE CHORD TRIGGER\nTR 3: ARP TRIGGER\nTR 4: LIVE ARP TRIGGER\n\nCV 1-3: CHORD\nCV 4: ARP\n\n\n\n#1\nG.GBTN.L + PN.I 0 10 0 0\nZ 0; $ * A 4; C PN.HERE 0\nK PN.I 0; G.GBTN.L + K 10 6 6\nL 1 3: $ 2\nIF ! A: TR.P * == G.BTNY K 2\nTR.P A; A 1\n\n#2\nJ / * - I 1 R 6; K * / J 4 12\nCV I N.CS K PRM C J\nIF ! STATE 2: BRK\nL 0 7: G.GBTN.L I 0 0\nG.GBTN.L PN.I 1 6 6\nP 13 0; B 4; P 15 0\n\n#3\nZ 1; G.GBTN.L PN.I 1 0 0; $ B\nT PN.I 1; G.GBTN.L T 6 6\nJ PN.HERE 1; K * / J 4 12\nCV - 7 PN 2 T N.CS K PRM C J\nIF ! B: TR.P * == G.BTNY T 4\nTR.P * PN 2 T / B 4; B 4\n\n#4\nJ + P + Z 12 > P + Z 8 PN.I Z\nIF * J P + Z 14: S.POP\nPN.START Z P Z; PN.L Z P + Z 2\nPN.I Z * P Z P + Z 14; J + Z 8\nP J - P + Z 0 1; P + Z 14 1\n$ 5\n\n#5\nELIF == PN.I Z P Z: P + Z 12 1\nS: PN.NEXT Z; $ 5; BRK\nIF || P + Z 12 ! P + Z 14: BRK\nJ * ! Z 10; K + P + Z 8 J\nL + PN.I Z J K: G.GBTN.L I 2 2\nG.GBTN.L + PN.I Z J 6 6\n\n#6\nX G.GRPI; J G.BTNV\nK ! + P + X 2 J\nIF K: G.GBTN.L X 5 5; $ 7; BRK\nIF J: P - X 2 + G.GBTN.Y2 X 1\nIF J: P - X 4 G.GBTN.Y1 X\nP + X 2 MAX - G.GBTN.C X 1 0\n\n#7\nJ P - X 4; K P - X 2\nP X ? P + X 4 - P - X 6 1 P X\nP - X 8 J; P - X 6 K\nY - X 8; Z Y; J + J * Y 8\nK - + K * Y 8 1; P + X 4 0\nL J K: G.BTN.L I 15; $ 5\n\n#8\nJ G.BTNV; K G.GRPI; D ! / K 9\nPN D - K * ! D 10 + G.BTNX ! D\nIF D: PN.- 1 K 9; B 0\nIF ! D: A 0; $ 1\nIF ! && ! J D: G.BTN.SW G.BTNI\nIF D: PN 2 K * J 3; $ 3\n\n#M\nJ == + PRT 7 1 8; R * + IN 2 3\nIF J: PRT 8 PRM; PRT 9 IN; BRK\nPRT 7 O; J PRT 7; X + J 10\nD + * J 7 16; K + D 56; P.N 3\nG.GBX X K 0 J 1 1 1 0 8 7 1\nG.GBX J D 9 J 1 1 1 0 8 7 1\n\n#I\nINIT.DATA; Q.GRW 1\nPARAM.SCALE 0 8; IN.SCALE 0 17\nPRT 7 0; M 25; M.ACT 1\nG.GBX 8 0 7 0 1 1 0 5 6 1 8\nG.GBX 9 8 8 0 1 1 0 5 6 1 8\nLIVE.DASH 1; $ 5\n\n#P\n1\t1\t8\t8\n1\t1\t1\t1\n0\t0\t0\t0\n7\t7\t7\t7\n\n1\t6\t3\t0\n1\t6\t3\t0\n1\t6\t3\t1\n1\t6\t3\t1\n1\t6\t3\t1\n1\t6\t3\t1\n1\t6\t3\t1\n1\t6\t3\t1\n0\t0\t0\t-1\n0\t0\t0\t-1\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t1\n0\t0\t0\t1\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n0\t0\t0\t0\n\n#G\n0000000000000000\n0000001000000100\n0000100000010000\n0010000001000000\n1000000110000001\n0000001000000100\n0000100000010000\n0010000001000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n0000000000000000\n\n1\t2\t4\t4\t1\t2\t4\t5\t1\t1\t1\t1\t1\t1\t1\t1\n5\t7\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n7\t3\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n" } } } ================================================ FILE: res/keymaps/README.md ================================================ ## Teletype Keyboard Layouts These JSON files define keyboard layouts for Teletype, selectable from the right-click menu. Keyboard layout choice is global for all Teletype modules, and is saved with the Rack settings, not the patch. ### Why does Teletype need custom keyboard layouts? The Teletype module firmware code operates directly on HID scancodes sent in USB packets. It acts more like a videogame input mapping system than a text entry system. Rack's GLFW input processing does attempt to do international layout translation, but this text-only mapping is not sufficient for Teletype to understand which keys are being pressed. Even on US keyboards, we have to remap from GLFW scancodes back to HID scancodes. ### How do I use this to improve support for my keyboard? Copy one of the existing layouts and change the values of `"output"` to match the HID codes that Teletype should receive for a given GLFW keycode. For example, in the US Dvorak layout, the A key is still A, but the scancodes for B, C, and D should now produce X, J, and E. ```json { "name": "US Dvorak", "keymap": [ ... { "input": "GLFW_KEY_A", "output": "HID_A" }, { "input": "GLFW_KEY_B", "output": "HID_X" }, { "input": "GLFW_KEY_C", "output": "HID_J" }, { "input": "GLFW_KEY_D", "output": "HID_E" }, ... ] } ``` By default, the entire key will be translated regardless which modifier keys are pressed, and the modifier state will be passed along to Teletype as is. If you need to map a character that is accessible via the shift key in your layout to a completely different key than its non-shifted character, you can add `"input_shift": true` to only remap the shifted character. If you need to customize the behavior so an input key produces a character that requires a shift key in the default US HID layout, you can add `"output_shift": true` to send a synthetic shift modifier to Teletype. For example, one of the differences between US and UK keyboards is that the " and @ characters swap positions as shifted characters on the ' and 2 keys. ```json { "name": "UK", "keymap": [ ... { "input": "GLFW_KEY_APOSTROPHE", "output": "HID_QUOTE" }, { "input": "GLFW_KEY_APOSTROPHE", "input_shift": true, "output": "HID_2", "output_shift": true }, ... { "input": "GLFW_KEY_2", "output": "HID_2" }, { "input": "GLFW_KEY_2", "input_shift": true, "output": "HID_QUOTE", "output_shift": true }, ... ] } ``` Remapping of other modifiers is not currently supported, and Alt/Control/Meta are passed to Teletype unchanged. If you need the ability to remap other modifiers in order to properly map your keyboard, please [open an issue](https://github.com/Dewb/monome-rack/issues/new/choose). ### What are the GLFW and HID scancode names? #### GLFW: * GLFW documentation: https://www.glfw.org/docs/3.3/group__keys.html #### HID: * Atmel ASF USB HID header: https://github.com/avrxml/asf/blob/master/common/services/usb/class/hid/usb_protocol_hid.h Teletype may add additional constants to cover gaps in ASF support, see [TeletypeKeyboard.cpp](https://github.com/Dewb/monome-rack/tree/main/src/teletype/TeletypeKeyboard.cpp) for a definitive list. ================================================ FILE: res/keymaps/uk.json ================================================ { "name": "UK", "keymap": [ { "input": "GLFW_KEY_SPACE", "output": "HID_SPACEBAR" }, { "input": "GLFW_KEY_APOSTROPHE", "output": "HID_QUOTE" }, { "input": "GLFW_KEY_APOSTROPHE", "input_shift": true, "output": "HID_2", "output_shift": true }, { "input": "GLFW_KEY_COMMA", "output": "HID_COMMA" }, { "input": "GLFW_KEY_MINUS", "output": "HID_UNDERSCORE" }, { "input": "GLFW_KEY_PERIOD", "output": "HID_DOT" }, { "input": "GLFW_KEY_SLASH", "output": "HID_SLASH" }, { "input": "GLFW_KEY_0", "output": "HID_0" }, { "input": "GLFW_KEY_1", "output": "HID_1" }, { "input": "GLFW_KEY_2", "output": "HID_2" }, { "input": "GLFW_KEY_2", "input_shift": true, "output": "HID_QUOTE", "output_shift": true }, { "input": "GLFW_KEY_3", "output": "HID_3" }, { "input": "GLFW_KEY_3", "input_shift": true, "output": "HID_TILDE" }, { "input": "GLFW_KEY_4", "output": "HID_4" }, { "input": "GLFW_KEY_5", "output": "HID_5" }, { "input": "GLFW_KEY_6", "output": "HID_6" }, { "input": "GLFW_KEY_7", "output": "HID_7" }, { "input": "GLFW_KEY_8", "output": "HID_8" }, { "input": "GLFW_KEY_9", "output": "HID_9" }, { "input": "GLFW_KEY_SEMICOLON", "output": "HID_COLON" }, { "input": "GLFW_KEY_EQUAL", "output": "HID_PLUS" }, { "input": "GLFW_KEY_A", "output": "HID_A" }, { "input": "GLFW_KEY_B", "output": "HID_B" }, { "input": "GLFW_KEY_C", "output": "HID_C" }, { "input": "GLFW_KEY_D", "output": "HID_D" }, { "input": "GLFW_KEY_E", "output": "HID_E" }, { "input": "GLFW_KEY_F", "output": "HID_F" }, { "input": "GLFW_KEY_G", "output": "HID_G" }, { "input": "GLFW_KEY_H", "output": "HID_H" }, { "input": "GLFW_KEY_I", "output": "HID_I" }, { "input": "GLFW_KEY_J", "output": "HID_J" }, { "input": "GLFW_KEY_K", "output": "HID_K" }, { "input": "GLFW_KEY_L", "output": "HID_L" }, { "input": "GLFW_KEY_M", "output": "HID_M" }, { "input": "GLFW_KEY_N", "output": "HID_N" }, { "input": "GLFW_KEY_O", "output": "HID_O" }, { "input": "GLFW_KEY_P", "output": "HID_P" }, { "input": "GLFW_KEY_Q", "output": "HID_Q" }, { "input": "GLFW_KEY_R", "output": "HID_R" }, { "input": "GLFW_KEY_S", "output": "HID_S" }, { "input": "GLFW_KEY_T", "output": "HID_T" }, { "input": "GLFW_KEY_U", "output": "HID_U" }, { "input": "GLFW_KEY_V", "output": "HID_V" }, { "input": "GLFW_KEY_W", "output": "HID_W" }, { "input": "GLFW_KEY_X", "output": "HID_X" }, { "input": "GLFW_KEY_Y", "output": "HID_Y" }, { "input": "GLFW_KEY_Z", "output": "HID_Z" }, { "input": "GLFW_KEY_LEFT_BRACKET", "output": "HID_OPEN_BRACKET" }, { "input": "GLFW_KEY_BACKSLASH", "output": "HID_3", "output_shift": true }, { "input": "GLFW_KEY_BACKSLASH", "input_shift": true, "output": "HID_TILDE", "output_shift": true }, { "input": "GLFW_KEY_RIGHT_BRACKET", "output": "HID_CLOSE_BRACKET" }, { "input": "GLFW_KEY_GRAVE_ACCENT", "output": "HID_TILDE" }, { "input": "GLFW_KEY_WORLD_1", "output": "" }, { "input": "GLFW_KEY_WORLD_2", "output": "" }, { "input": "GLFW_KEY_ESCAPE", "output": "HID_ESCAPE" }, { "input": "GLFW_KEY_ENTER", "output": "HID_ENTER" }, { "input": "GLFW_KEY_TAB", "output": "HID_TAB" }, { "input": "GLFW_KEY_BACKSPACE", "output": "HID_BACKSPACE" }, { "input": "GLFW_KEY_INSERT", "output": "HID_INSERT" }, { "input": "GLFW_KEY_DELETE", "output": "HID_DELETE" }, { "input": "GLFW_KEY_RIGHT", "output": "HID_RIGHT" }, { "input": "GLFW_KEY_LEFT", "output": "HID_LEFT" }, { "input": "GLFW_KEY_DOWN", "output": "HID_DOWN" }, { "input": "GLFW_KEY_UP", "output": "HID_UP" }, { "input": "GLFW_KEY_PAGE_UP", "output": "HID_PAGEUP" }, { "input": "GLFW_KEY_PAGE_DOWN", "output": "HID_PAGEDOWN" }, { "input": "GLFW_KEY_HOME", "output": "HID_HOME" }, { "input": "GLFW_KEY_END", "output": "HID_END" }, { "input": "GLFW_KEY_CAPS_LOCK", "output": "HID_CAPS_LOCK" }, { "input": "GLFW_KEY_SCROLL_LOCK", "output": "HID_SCROLL_LOCK" }, { "input": "GLFW_KEY_NUM_LOCK", "output": "HID_KEYPAD_NUM_LOCK" }, { "input": "GLFW_KEY_PRINT_SCREEN", "output": "HID_PRINTSCREEN" }, { "input": "GLFW_KEY_PAUSE", "output": "HID_PAUSE" }, { "input": "GLFW_KEY_F1", "output": "HID_F1" }, { "input": "GLFW_KEY_F2", "output": "HID_F2" }, { "input": "GLFW_KEY_F3", "output": "HID_F3" }, { "input": "GLFW_KEY_F4", "output": "HID_F4" }, { "input": "GLFW_KEY_F5", "output": "HID_F5" }, { "input": "GLFW_KEY_F6", "output": "HID_F6" }, { "input": "GLFW_KEY_F7", "output": "HID_F7" }, { "input": "GLFW_KEY_F8", "output": "HID_F8" }, { "input": "GLFW_KEY_F9", "output": "HID_F9" }, { "input": "GLFW_KEY_F10", "output": "HID_F10" }, { "input": "GLFW_KEY_F11", "output": "HID_F11" }, { "input": "GLFW_KEY_F12", "output": "HID_F12" }, { "input": "GLFW_KEY_F13", "output": "HID_F13" }, { "input": "GLFW_KEY_F14", "output": "HID_F14" }, { "input": "GLFW_KEY_F15", "output": "HID_F15" }, { "input": "GLFW_KEY_F16", "output": "HID_F16" }, { "input": "GLFW_KEY_F17", "output": "HID_F17" }, { "input": "GLFW_KEY_F18", "output": "HID_F18" }, { "input": "GLFW_KEY_F19", "output": "HID_F19" }, { "input": "GLFW_KEY_F20", "output": "HID_F20" }, { "input": "GLFW_KEY_F21", "output": "HID_F21" }, { "input": "GLFW_KEY_F22", "output": "HID_F22" }, { "input": "GLFW_KEY_F23", "output": "HID_F23" }, { "input": "GLFW_KEY_F24", "output": "HID_F24" }, { "input": "GLFW_KEY_KP_0", "output": "HID_KEYPAD_0" }, { "input": "GLFW_KEY_KP_1", "output": "HID_KEYPAD_1" }, { "input": "GLFW_KEY_KP_2", "output": "HID_KEYPAD_2" }, { "input": "GLFW_KEY_KP_3", "output": "HID_KEYPAD_3" }, { "input": "GLFW_KEY_KP_4", "output": "HID_KEYPAD_4" }, { "input": "GLFW_KEY_KP_5", "output": "HID_KEYPAD_5" }, { "input": "GLFW_KEY_KP_6", "output": "HID_KEYPAD_6" }, { "input": "GLFW_KEY_KP_7", "output": "HID_KEYPAD_7" }, { "input": "GLFW_KEY_KP_8", "output": "HID_KEYPAD_8" }, { "input": "GLFW_KEY_KP_9", "output": "HID_KEYPAD_9" }, { "input": "GLFW_KEY_KP_DECIMAL", "output": "HID_KEYPAD_DECIMAL" }, { "input": "GLFW_KEY_KP_DIVIDE", "output": "HID_KEYPAD_DIVIDE" }, { "input": "GLFW_KEY_KP_MULTIPLY", "output": "HID_KEYPAD_MULTIPLY" }, { "input": "GLFW_KEY_KP_SUBTRACT", "output": "HID_KEYPAD_MINUS" }, { "input": "GLFW_KEY_KP_ADD", "output": "HID_KEYPAD_PLUS" }, { "input": "GLFW_KEY_KP_ENTER", "output": "HID_KEYPAD_ENTER" }, { "input": "GLFW_KEY_KP_EQUAL", "output": "" } ] } ================================================ FILE: res/keymaps/us-dvorak.json ================================================ { "name": "US Dvorak", "keymap": [ { "input": "GLFW_KEY_SPACE", "output": "HID_SPACEBAR" }, { "input": "GLFW_KEY_APOSTROPHE", "output": "HID_UNDERSCORE" }, { "input": "GLFW_KEY_COMMA", "output": "HID_W" }, { "input": "GLFW_KEY_MINUS", "output": "HID_OPEN_BRACKET" }, { "input": "GLFW_KEY_PERIOD", "output": "HID_V" }, { "input": "GLFW_KEY_SLASH", "output": "HID_Z" }, { "input": "GLFW_KEY_0", "output": "HID_0" }, { "input": "GLFW_KEY_1", "output": "HID_1" }, { "input": "GLFW_KEY_2", "output": "HID_2" }, { "input": "GLFW_KEY_3", "output": "HID_3" }, { "input": "GLFW_KEY_4", "output": "HID_4" }, { "input": "GLFW_KEY_5", "output": "HID_5" }, { "input": "GLFW_KEY_6", "output": "HID_6" }, { "input": "GLFW_KEY_7", "output": "HID_7" }, { "input": "GLFW_KEY_8", "output": "HID_8" }, { "input": "GLFW_KEY_9", "output": "HID_9" }, { "input": "GLFW_KEY_SEMICOLON", "output": "HID_S" }, { "input": "GLFW_KEY_EQUAL", "output": "HID_CLOSE_BRACKET" }, { "input": "GLFW_KEY_A", "output": "HID_A" }, { "input": "GLFW_KEY_B", "output": "HID_X" }, { "input": "GLFW_KEY_C", "output": "HID_J" }, { "input": "GLFW_KEY_D", "output": "HID_E" }, { "input": "GLFW_KEY_E", "output": "HID_DOT" }, { "input": "GLFW_KEY_F", "output": "HID_U" }, { "input": "GLFW_KEY_G", "output": "HID_I" }, { "input": "GLFW_KEY_H", "output": "HID_D" }, { "input": "GLFW_KEY_I", "output": "HID_C" }, { "input": "GLFW_KEY_J", "output": "HID_H" }, { "input": "GLFW_KEY_K", "output": "HID_T" }, { "input": "GLFW_KEY_L", "output": "HID_N" }, { "input": "GLFW_KEY_M", "output": "HID_M" }, { "input": "GLFW_KEY_N", "output": "HID_B" }, { "input": "GLFW_KEY_O", "output": "HID_R" }, { "input": "GLFW_KEY_P", "output": "HID_L" }, { "input": "GLFW_KEY_Q", "output": "HID_QUOTE" }, { "input": "GLFW_KEY_R", "output": "HID_P" }, { "input": "GLFW_KEY_S", "output": "HID_O" }, { "input": "GLFW_KEY_T", "output": "HID_Y" }, { "input": "GLFW_KEY_U", "output": "HID_G" }, { "input": "GLFW_KEY_V", "output": "HID_K" }, { "input": "GLFW_KEY_W", "output": "HID_COMMA" }, { "input": "GLFW_KEY_X", "output": "HID_Q" }, { "input": "GLFW_KEY_Y", "output": "HID_F" }, { "input": "GLFW_KEY_Z", "output": "HID_COLON" }, { "input": "GLFW_KEY_LEFT_BRACKET", "output": "HID_SLASH" }, { "input": "GLFW_KEY_BACKSLASH", "output": "HID_BACKSLASH" }, { "input": "GLFW_KEY_RIGHT_BRACKET", "output": "HID_PLUS" }, { "input": "GLFW_KEY_GRAVE_ACCENT", "output": "HID_TILDE" }, { "input": "GLFW_KEY_WORLD_1", "output": "" }, { "input": "GLFW_KEY_WORLD_2", "output": "" }, { "input": "GLFW_KEY_ESCAPE", "output": "HID_ESCAPE" }, { "input": "GLFW_KEY_ENTER", "output": "HID_ENTER" }, { "input": "GLFW_KEY_TAB", "output": "HID_TAB" }, { "input": "GLFW_KEY_BACKSPACE", "output": "HID_BACKSPACE" }, { "input": "GLFW_KEY_INSERT", "output": "HID_INSERT" }, { "input": "GLFW_KEY_DELETE", "output": "HID_DELETE" }, { "input": "GLFW_KEY_RIGHT", "output": "HID_RIGHT" }, { "input": "GLFW_KEY_LEFT", "output": "HID_LEFT" }, { "input": "GLFW_KEY_DOWN", "output": "HID_DOWN" }, { "input": "GLFW_KEY_UP", "output": "HID_UP" }, { "input": "GLFW_KEY_PAGE_UP", "output": "HID_PAGEUP" }, { "input": "GLFW_KEY_PAGE_DOWN", "output": "HID_PAGEDOWN" }, { "input": "GLFW_KEY_HOME", "output": "HID_HOME" }, { "input": "GLFW_KEY_END", "output": "HID_END" }, { "input": "GLFW_KEY_CAPS_LOCK", "output": "HID_CAPS_LOCK" }, { "input": "GLFW_KEY_SCROLL_LOCK", "output": "HID_SCROLL_LOCK" }, { "input": "GLFW_KEY_NUM_LOCK", "output": "HID_KEYPAD_NUM_LOCK" }, { "input": "GLFW_KEY_PRINT_SCREEN", "output": "HID_PRINTSCREEN" }, { "input": "GLFW_KEY_PAUSE", "output": "HID_PAUSE" }, { "input": "GLFW_KEY_F1", "output": "HID_F1" }, { "input": "GLFW_KEY_F2", "output": "HID_F2" }, { "input": "GLFW_KEY_F3", "output": "HID_F3" }, { "input": "GLFW_KEY_F4", "output": "HID_F4" }, { "input": "GLFW_KEY_F5", "output": "HID_F5" }, { "input": "GLFW_KEY_F6", "output": "HID_F6" }, { "input": "GLFW_KEY_F7", "output": "HID_F7" }, { "input": "GLFW_KEY_F8", "output": "HID_F8" }, { "input": "GLFW_KEY_F9", "output": "HID_F9" }, { "input": "GLFW_KEY_F10", "output": "HID_F10" }, { "input": "GLFW_KEY_F11", "output": "HID_F11" }, { "input": "GLFW_KEY_F12", "output": "HID_F12" }, { "input": "GLFW_KEY_F13", "output": "HID_F13" }, { "input": "GLFW_KEY_F14", "output": "HID_F14" }, { "input": "GLFW_KEY_F15", "output": "HID_F15" }, { "input": "GLFW_KEY_F16", "output": "HID_F16" }, { "input": "GLFW_KEY_F17", "output": "HID_F17" }, { "input": "GLFW_KEY_F18", "output": "HID_F18" }, { "input": "GLFW_KEY_F19", "output": "HID_F19" }, { "input": "GLFW_KEY_F20", "output": "HID_F20" }, { "input": "GLFW_KEY_F21", "output": "HID_F21" }, { "input": "GLFW_KEY_F22", "output": "HID_F22" }, { "input": "GLFW_KEY_F23", "output": "HID_F23" }, { "input": "GLFW_KEY_F24", "output": "HID_F24" }, { "input": "GLFW_KEY_KP_0", "output": "HID_KEYPAD_0" }, { "input": "GLFW_KEY_KP_1", "output": "HID_KEYPAD_1" }, { "input": "GLFW_KEY_KP_2", "output": "HID_KEYPAD_2" }, { "input": "GLFW_KEY_KP_3", "output": "HID_KEYPAD_3" }, { "input": "GLFW_KEY_KP_4", "output": "HID_KEYPAD_4" }, { "input": "GLFW_KEY_KP_5", "output": "HID_KEYPAD_5" }, { "input": "GLFW_KEY_KP_6", "output": "HID_KEYPAD_6" }, { "input": "GLFW_KEY_KP_7", "output": "HID_KEYPAD_7" }, { "input": "GLFW_KEY_KP_8", "output": "HID_KEYPAD_8" }, { "input": "GLFW_KEY_KP_9", "output": "HID_KEYPAD_9" }, { "input": "GLFW_KEY_KP_DECIMAL", "output": "HID_KEYPAD_DECIMAL" }, { "input": "GLFW_KEY_KP_DIVIDE", "output": "HID_KEYPAD_DIVIDE" }, { "input": "GLFW_KEY_KP_MULTIPLY", "output": "HID_KEYPAD_MULTIPLY" }, { "input": "GLFW_KEY_KP_SUBTRACT", "output": "HID_KEYPAD_MINUS" }, { "input": "GLFW_KEY_KP_ADD", "output": "HID_KEYPAD_PLUS" }, { "input": "GLFW_KEY_KP_ENTER", "output": "HID_KEYPAD_ENTER" }, { "input": "GLFW_KEY_KP_EQUAL", "output": "" } ] } ================================================ FILE: res/keymaps/us-qwerty.json ================================================ { "name": "US Qwerty", "keymap": [ { "input": "GLFW_KEY_SPACE", "output": "HID_SPACEBAR" }, { "input": "GLFW_KEY_APOSTROPHE", "output": "HID_QUOTE" }, { "input": "GLFW_KEY_COMMA", "output": "HID_COMMA" }, { "input": "GLFW_KEY_MINUS", "output": "HID_UNDERSCORE" }, { "input": "GLFW_KEY_PERIOD", "output": "HID_DOT" }, { "input": "GLFW_KEY_SLASH", "output": "HID_SLASH" }, { "input": "GLFW_KEY_0", "output": "HID_0" }, { "input": "GLFW_KEY_1", "output": "HID_1" }, { "input": "GLFW_KEY_2", "output": "HID_2" }, { "input": "GLFW_KEY_3", "output": "HID_3" }, { "input": "GLFW_KEY_4", "output": "HID_4" }, { "input": "GLFW_KEY_5", "output": "HID_5" }, { "input": "GLFW_KEY_6", "output": "HID_6" }, { "input": "GLFW_KEY_7", "output": "HID_7" }, { "input": "GLFW_KEY_8", "output": "HID_8" }, { "input": "GLFW_KEY_9", "output": "HID_9" }, { "input": "GLFW_KEY_SEMICOLON", "output": "HID_COLON" }, { "input": "GLFW_KEY_EQUAL", "output": "HID_PLUS" }, { "input": "GLFW_KEY_A", "output": "HID_A" }, { "input": "GLFW_KEY_B", "output": "HID_B" }, { "input": "GLFW_KEY_C", "output": "HID_C" }, { "input": "GLFW_KEY_D", "output": "HID_D" }, { "input": "GLFW_KEY_E", "output": "HID_E" }, { "input": "GLFW_KEY_F", "output": "HID_F" }, { "input": "GLFW_KEY_G", "output": "HID_G" }, { "input": "GLFW_KEY_H", "output": "HID_H" }, { "input": "GLFW_KEY_I", "output": "HID_I" }, { "input": "GLFW_KEY_J", "output": "HID_J" }, { "input": "GLFW_KEY_K", "output": "HID_K" }, { "input": "GLFW_KEY_L", "output": "HID_L" }, { "input": "GLFW_KEY_M", "output": "HID_M" }, { "input": "GLFW_KEY_N", "output": "HID_N" }, { "input": "GLFW_KEY_O", "output": "HID_O" }, { "input": "GLFW_KEY_P", "output": "HID_P" }, { "input": "GLFW_KEY_Q", "output": "HID_Q" }, { "input": "GLFW_KEY_R", "output": "HID_R" }, { "input": "GLFW_KEY_S", "output": "HID_S" }, { "input": "GLFW_KEY_T", "output": "HID_T" }, { "input": "GLFW_KEY_U", "output": "HID_U" }, { "input": "GLFW_KEY_V", "output": "HID_V" }, { "input": "GLFW_KEY_W", "output": "HID_W" }, { "input": "GLFW_KEY_X", "output": "HID_X" }, { "input": "GLFW_KEY_Y", "output": "HID_Y" }, { "input": "GLFW_KEY_Z", "output": "HID_Z" }, { "input": "GLFW_KEY_LEFT_BRACKET", "output": "HID_OPEN_BRACKET" }, { "input": "GLFW_KEY_BACKSLASH", "output": "HID_BACKSLASH" }, { "input": "GLFW_KEY_RIGHT_BRACKET", "output": "HID_CLOSE_BRACKET" }, { "input": "GLFW_KEY_GRAVE_ACCENT", "output": "HID_TILDE" }, { "input": "GLFW_KEY_WORLD_1", "output": "" }, { "input": "GLFW_KEY_WORLD_2", "output": "" }, { "input": "GLFW_KEY_ESCAPE", "output": "HID_ESCAPE" }, { "input": "GLFW_KEY_ENTER", "output": "HID_ENTER" }, { "input": "GLFW_KEY_TAB", "output": "HID_TAB" }, { "input": "GLFW_KEY_BACKSPACE", "output": "HID_BACKSPACE" }, { "input": "GLFW_KEY_INSERT", "output": "HID_INSERT" }, { "input": "GLFW_KEY_DELETE", "output": "HID_DELETE" }, { "input": "GLFW_KEY_RIGHT", "output": "HID_RIGHT" }, { "input": "GLFW_KEY_LEFT", "output": "HID_LEFT" }, { "input": "GLFW_KEY_DOWN", "output": "HID_DOWN" }, { "input": "GLFW_KEY_UP", "output": "HID_UP" }, { "input": "GLFW_KEY_PAGE_UP", "output": "HID_PAGEUP" }, { "input": "GLFW_KEY_PAGE_DOWN", "output": "HID_PAGEDOWN" }, { "input": "GLFW_KEY_HOME", "output": "HID_HOME" }, { "input": "GLFW_KEY_END", "output": "HID_END" }, { "input": "GLFW_KEY_CAPS_LOCK", "output": "HID_CAPS_LOCK" }, { "input": "GLFW_KEY_SCROLL_LOCK", "output": "HID_SCROLL_LOCK" }, { "input": "GLFW_KEY_NUM_LOCK", "output": "HID_KEYPAD_NUM_LOCK" }, { "input": "GLFW_KEY_PRINT_SCREEN", "output": "HID_PRINTSCREEN" }, { "input": "GLFW_KEY_PAUSE", "output": "HID_PAUSE" }, { "input": "GLFW_KEY_F1", "output": "HID_F1" }, { "input": "GLFW_KEY_F2", "output": "HID_F2" }, { "input": "GLFW_KEY_F3", "output": "HID_F3" }, { "input": "GLFW_KEY_F4", "output": "HID_F4" }, { "input": "GLFW_KEY_F5", "output": "HID_F5" }, { "input": "GLFW_KEY_F6", "output": "HID_F6" }, { "input": "GLFW_KEY_F7", "output": "HID_F7" }, { "input": "GLFW_KEY_F8", "output": "HID_F8" }, { "input": "GLFW_KEY_F9", "output": "HID_F9" }, { "input": "GLFW_KEY_F10", "output": "HID_F10" }, { "input": "GLFW_KEY_F11", "output": "HID_F11" }, { "input": "GLFW_KEY_F12", "output": "HID_F12" }, { "input": "GLFW_KEY_F13", "output": "HID_F13" }, { "input": "GLFW_KEY_F14", "output": "HID_F14" }, { "input": "GLFW_KEY_F15", "output": "HID_F15" }, { "input": "GLFW_KEY_F16", "output": "HID_F16" }, { "input": "GLFW_KEY_F17", "output": "HID_F17" }, { "input": "GLFW_KEY_F18", "output": "HID_F18" }, { "input": "GLFW_KEY_F19", "output": "HID_F19" }, { "input": "GLFW_KEY_F20", "output": "HID_F20" }, { "input": "GLFW_KEY_F21", "output": "HID_F21" }, { "input": "GLFW_KEY_F22", "output": "HID_F22" }, { "input": "GLFW_KEY_F23", "output": "HID_F23" }, { "input": "GLFW_KEY_F24", "output": "HID_F24" }, { "input": "GLFW_KEY_KP_0", "output": "HID_KEYPAD_0" }, { "input": "GLFW_KEY_KP_1", "output": "HID_KEYPAD_1" }, { "input": "GLFW_KEY_KP_2", "output": "HID_KEYPAD_2" }, { "input": "GLFW_KEY_KP_3", "output": "HID_KEYPAD_3" }, { "input": "GLFW_KEY_KP_4", "output": "HID_KEYPAD_4" }, { "input": "GLFW_KEY_KP_5", "output": "HID_KEYPAD_5" }, { "input": "GLFW_KEY_KP_6", "output": "HID_KEYPAD_6" }, { "input": "GLFW_KEY_KP_7", "output": "HID_KEYPAD_7" }, { "input": "GLFW_KEY_KP_8", "output": "HID_KEYPAD_8" }, { "input": "GLFW_KEY_KP_9", "output": "HID_KEYPAD_9" }, { "input": "GLFW_KEY_KP_DECIMAL", "output": "HID_KEYPAD_DECIMAL" }, { "input": "GLFW_KEY_KP_DIVIDE", "output": "HID_KEYPAD_DIVIDE" }, { "input": "GLFW_KEY_KP_MULTIPLY", "output": "HID_KEYPAD_MULTIPLY" }, { "input": "GLFW_KEY_KP_SUBTRACT", "output": "HID_KEYPAD_MINUS" }, { "input": "GLFW_KEY_KP_ADD", "output": "HID_KEYPAD_PLUS" }, { "input": "GLFW_KEY_KP_ENTER", "output": "HID_KEYPAD_ENTER" }, { "input": "GLFW_KEY_KP_EQUAL", "output": "" } ] } ================================================ FILE: src/ansible/AnsibleModule.hpp ================================================ #pragma once #include "LibAVR32Module.hpp" #include "AnsibleModule.hpp" using namespace rack; struct AnsibleModule : LibAVR32Module { enum ParamIds { KEY1_PARAM, KEY2_PARAM, MODE_PARAM, USB_PARAM, NUM_PARAMS }; enum InputIds { IN1_INPUT, IN2_INPUT, NUM_INPUTS }; enum OutputIds { TR1_OUTPUT, TR2_OUTPUT, TR3_OUTPUT, TR4_OUTPUT, CV1_OUTPUT, CV2_OUTPUT, CV3_OUTPUT, CV4_OUTPUT, NUM_OUTPUTS }; enum LightIds { MODE_YELLOW_LIGHT, MODE_WHITE_LIGHT, TR1_LIGHT, TR2_LIGHT, TR3_LIGHT, TR4_LIGHT, CV1_LIGHT, CV2_LIGHT, CV3_LIGHT, CV4_LIGHT, NUM_LIGHTS }; rack::dsp::SchmittTrigger inputTriggers[2]; AnsibleModule() : LibAVR32Module("ansible", "ansible") { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); configButton(KEY1_PARAM, "KEY 1"); configButton(KEY2_PARAM, "KEY 2"); configButton(MODE_PARAM, "MODE"); configInput(IN1_INPUT, "IN 1"); configInput(IN2_INPUT, "IN 2"); configOutput(TR1_OUTPUT, "TR 1"); configOutput(TR2_OUTPUT, "TR 2"); configOutput(TR3_OUTPUT, "TR 3"); configOutput(TR4_OUTPUT, "TR 4"); configOutput(CV1_OUTPUT, "CV 1"); configOutput(CV2_OUTPUT, "CV 2"); configOutput(CV3_OUTPUT, "CV 3"); configOutput(CV4_OUTPUT, "CV 4"); configButton(USB_PARAM, "USB Device Port"); setDeviceConnectionParam(USB_PARAM); } void processInputs(const ProcessArgs& args) override { bool in1Normal = !inputs[IN1_INPUT].isConnected(); if (in1Normal != firmware.getGPIO(B10)) { firmware.setGPIO(B10, in1Normal); firmware.triggerInterrupt(1); } for (int i = 0; i < 2; i++) { inputTriggers[i].process( inputs[IN1_INPUT + i].getVoltage(), triggerLowThreshold, triggerHighThreshold); if (inputTriggers[i].isHigh() != firmware.getGPIO(B08 + i)) { firmware.setGPIO(B08 + i, inputTriggers[i].isHigh()); firmware.triggerInterrupt(6 + i); } } bool key1Button = params[KEY1_PARAM].getValue() == 0; if (key1Button != firmware.getGPIO(B07)) { firmware.setGPIO(B07, key1Button); } bool key2Button = params[KEY2_PARAM].getValue() == 0; if (key2Button != firmware.getGPIO(B06)) { firmware.setGPIO(B06, key2Button); } bool modeButton = params[MODE_PARAM].getValue() == 0; if (modeButton != firmware.getGPIO(NMI)) { firmware.setGPIO(NMI, modeButton); } } void processOutputs(const ProcessArgs& args) override { float cv1 = dacToVolts(firmware.getDAC(2)); float cv2 = dacToVolts(firmware.getDAC(3)); float cv3 = dacToVolts(firmware.getDAC(0)); float cv4 = dacToVolts(firmware.getDAC(1)); bool tr1 = firmware.getGPIO(B02); bool tr2 = firmware.getGPIO(B03); bool tr3 = firmware.getGPIO(B04); bool tr4 = firmware.getGPIO(B05); // Update bicolor mode light from B00/B01 lights[MODE_YELLOW_LIGHT].setSmoothBrightness(firmware.getGPIO(B00) * 0.7, args.sampleTime); lights[MODE_WHITE_LIGHT].setSmoothBrightness(firmware.getGPIO(B01) * 0.4, args.sampleTime); // Update normal lights lights[TR1_LIGHT].setSmoothBrightness(tr1, args.sampleTime); lights[TR2_LIGHT].setSmoothBrightness(tr2, args.sampleTime); lights[TR3_LIGHT].setSmoothBrightness(tr3, args.sampleTime); lights[TR4_LIGHT].setSmoothBrightness(tr4, args.sampleTime); lights[CV1_LIGHT].setSmoothBrightness(cv1 / 10.0, args.sampleTime); lights[CV2_LIGHT].setSmoothBrightness(cv2 / 10.0, args.sampleTime); lights[CV3_LIGHT].setSmoothBrightness(cv3 / 10.0, args.sampleTime); lights[CV4_LIGHT].setSmoothBrightness(cv4 / 10.0, args.sampleTime); // Update output jacks from GPIO & DAC outputs[TR1_OUTPUT].setVoltage(tr1 * 8.0); outputs[TR2_OUTPUT].setVoltage(tr2 * 8.0); outputs[TR3_OUTPUT].setVoltage(tr3 * 8.0); outputs[TR4_OUTPUT].setVoltage(tr4 * 8.0); outputs[CV1_OUTPUT].setVoltage(cv1); outputs[CV2_OUTPUT].setVoltage(cv2); outputs[CV3_OUTPUT].setVoltage(cv3); outputs[CV4_OUTPUT].setVoltage(cv4); } }; ================================================ FILE: src/ansible/AnsibleWidget.hpp ================================================ #pragma once #include "AnsibleModule.hpp" #include "HoldableButton.hpp" #include "LibAVR32ModuleWidget.hpp" #include "USBAJack.hpp" #include "YellowWhiteLight.hpp" using namespace rack; struct AnsibleWidget : LibAVR32ModuleWidget { AnsibleWidget(AnsibleModule* module) { setModule(module); box.size = Vec(15 * 6, 380); { auto panel = new ThemedSvgPanel(); panel->setBackground( APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/ansible.svg")), APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/ansible-dark.svg"))); panel->box.size = box.size; addChild(panel); } addChild(createWidget(Vec(RACK_GRID_WIDTH / 2, 0))); addChild(createWidget(Vec(RACK_GRID_WIDTH / 2, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addParam(createParam(Vec(7, 333), module, AnsibleModule::USB_PARAM)); addParam(createParam(Vec(62, 336), module, AnsibleModule::MODE_PARAM)); addParam(createParam(Vec(19, 256), module, AnsibleModule::KEY1_PARAM)); addParam(createParam(Vec(54, 256), module, AnsibleModule::KEY2_PARAM)); addOutput(createOutput(Vec(15, 54), module, AnsibleModule::TR1_OUTPUT)); addOutput(createOutput(Vec(50, 75), module, AnsibleModule::CV1_OUTPUT)); addOutput(createOutput(Vec(15, 92), module, AnsibleModule::TR2_OUTPUT)); addOutput(createOutput(Vec(50, 111), module, AnsibleModule::CV2_OUTPUT)); addOutput(createOutput(Vec(15, 130), module, AnsibleModule::TR3_OUTPUT)); addOutput(createOutput(Vec(50, 149), module, AnsibleModule::CV3_OUTPUT)); addOutput(createOutput(Vec(15, 168), module, AnsibleModule::TR4_OUTPUT)); addOutput(createOutput(Vec(50, 187), module, AnsibleModule::CV4_OUTPUT)); addInput(createInput(Vec(15, 286), module, AnsibleModule::IN1_INPUT)); addInput(createInput(Vec(50, 286), module, AnsibleModule::IN2_INPUT)); addChild(createLight>(Vec(3, 72), module, AnsibleModule::TR1_LIGHT)); addChild(createLight>(Vec(77, 72), module, AnsibleModule::CV1_LIGHT)); addChild(createLight>(Vec(3, 110), module, AnsibleModule::TR2_LIGHT)); addChild(createLight>(Vec(77, 110), module, AnsibleModule::CV2_LIGHT)); addChild(createLight>(Vec(3, 148), module, AnsibleModule::TR3_LIGHT)); addChild(createLight>(Vec(77, 148), module, AnsibleModule::CV3_LIGHT)); addChild(createLight>(Vec(3, 186), module, AnsibleModule::TR4_LIGHT)); addChild(createLight>(Vec(77, 186), module, AnsibleModule::CV4_LIGHT)); addChild(createLight>(Vec(77, 326), module, AnsibleModule::MODE_YELLOW_LIGHT)); } }; ================================================ FILE: src/common/core/ActionQueue.hpp ================================================ #pragma once #include "rack.hpp" #include typedef std::function Action; typedef rack::dsp::RingBuffer ActionQueue; ================================================ FILE: src/common/core/FirmwareManager.cpp ================================================ #include "FirmwareManager.hpp" #include "rack.hpp" #include #include #include #include #include #include namespace fs = ghc::filesystem; extern rack::Plugin* pluginInstance; #if ARCH_LIN #define LIB_EXTENSION ".so" #define PATH_SEPARATOR '/' #define MODULE_HANDLE_TYPE void* #elif ARCH_WIN #define LIB_EXTENSION ".dll" #define PATH_SEPARATOR '\\' #define MODULE_HANDLE_TYPE HINSTANCE #elif ARCH_MAC #define LIB_EXTENSION ".dylib" #define PATH_SEPARATOR '/' #define MODULE_HANDLE_TYPE void* #endif #if ARCH_WIN #include #include #define GET_PROC_ADDRESS(returntype, name, argslist) \ fw_fn_hardware_##name = reinterpret_cast( \ reinterpret_cast( \ GetProcAddress(handle, "hardware_" #name))); \ if (!fw_fn_hardware_##name) \ { \ WARN("Failed to find symbol 'hardware" #name "'"); \ return false; \ } #elif ARCH_LIN || ARCH_MAC #include #include #include #define GET_PROC_ADDRESS(returntype, name, argslist) \ fw_fn_hardware_##name = reinterpret_cast( \ reinterpret_cast( \ dlsym(handle, "hardware_" #name))); \ if (!fw_fn_hardware_##name) \ { \ WARN("Failed to find symbol 'hardware_" #name "'"); \ return false; \ } #endif #define DECLARE_PROC(returntype, name, argslist) \ typedef returntype(*fw_fn_hardware_##name##_t) argslist; \ fw_fn_hardware_##name##_t fw_fn_hardware_##name; struct FirmwareManagerImpl { #ifdef MOCK_API #undef MOCK_API #endif #define MOCK_API DECLARE_PROC #include "mock_hardware_api.h" double clockPeriod; double clockPhase; std::string tempLibraryFolder; std::string tempLibraryFile; MODULE_HANDLE_TYPE handle; static std::unordered_set alreadyLoadedPaths; FirmwareManagerImpl() { clockPhase = 0.0; clockPeriod = 0.001; } ~FirmwareManagerImpl() { #if ARCH_WIN FreeLibrary(handle); #elif ARCH_LIN || ARCH_MAC dlclose(handle); #endif if (!tempLibraryFile.empty()) { unlink(tempLibraryFile.c_str()); } if (!tempLibraryFolder.empty()) { rmdir(tempLibraryFolder.c_str()); } } bool load(std::string firmwareName) { using namespace rack; std::string librarySource; librarySource = rack::asset::plugin(pluginInstance, "res/firmware/" + firmwareName + LIB_EXTENSION); std::error_code ec; if (!fs::is_regular_file(fs::status(librarySource, ec))) { WARN("Requested firmware not found or invalid"); return false; } std::string libraryToLoad = librarySource; // If we have already loaded this firmware at least once, create a temp copy so it will have its own address space if (alreadyLoadedPaths.find(libraryToLoad) != alreadyLoadedPaths.end()) { bool success = false; #if ARCH_WIN char* tempdir = 0; (tempdir = getenv("TMPDIR")) || (tempdir = getenv("TMP")) || (tempdir = getenv("TEMP")) || (tempdir = getenv("TEMPDIR")) || (tempdir = getenv("LOCALAPPDATA")); if (tempdir != 0) { char* name = tmpnam(NULL); if (name != 0) { tempLibraryFolder = tempdir; if (tempLibraryFolder.back() != PATH_SEPARATOR && name[0] != PATH_SEPARATOR) { tempLibraryFolder += PATH_SEPARATOR; } tempLibraryFolder += std::string(name); if (mkdir(tempLibraryFolder.c_str()) == 0) { success = true; } } } #elif ARCH_LIN || ARCH_MAC char* name = tmpnam(NULL); if (name != 0) { tempLibraryFolder = name; if (mkdir(tempLibraryFolder.c_str(), 0777) == 0) { success = true; } } #endif if (!success) { WARN("Could not create temporary folder for firmware"); return false; } tempLibraryFile = tempLibraryFolder + PATH_SEPARATOR + "monome_vcvrack_firmware" + LIB_EXTENSION; // DEBUG("Creating new temporary firmware instance at %s", tempLibraryFile.c_str()); { std::ifstream src(librarySource, std::ios::binary); std::ofstream dst(tempLibraryFile, std::ios::binary); dst << src.rdbuf(); } libraryToLoad = tempLibraryFile; } else { // first time load, record it. alreadyLoadedPaths.insert(libraryToLoad); } INFO("Loading module firmware from %s", libraryToLoad.c_str()); #if ARCH_WIN int wideLength = MultiByteToWideChar(CP_UTF8, 0, libraryToLoad.c_str(), -1, nullptr, 0); if (wideLength > 0) { std::vector wideLibName(wideLength); wideLength = MultiByteToWideChar(CP_UTF8, 0, libraryToLoad.c_str(), -1, wideLibName.data(), wideLength); if (wideLength > 0) { SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS); handle = LoadLibraryW(wideLibName.data()); SetErrorMode(0); } } if (!handle) { int error = GetLastError(); WARN("Failed to load library %s: %d", libraryToLoad.c_str(), error); return false; } #elif ARCH_LIN || ARCH_MAC handle = dlopen(libraryToLoad.c_str(), RTLD_NOW | RTLD_LOCAL); if (!handle) { WARN("Failed to load library %s: %s", libraryToLoad.c_str(), dlerror()); return false; } #endif #ifdef MOCK_API #undef MOCK_API #endif #define MOCK_API GET_PROC_ADDRESS #include "mock_hardware_api.h" // cache this so we don't have to call it constantly clockPeriod = fw_fn_hardware_getClockPeriod(); return true; } }; std::unordered_set FirmwareManagerImpl::alreadyLoadedPaths; FirmwareManager::FirmwareManager() : impl(nullptr) { } FirmwareManager::~FirmwareManager() { delete impl; } const std::string FirmwareManager::getLibExtension() { return LIB_EXTENSION; } bool FirmwareManager::load(std::string firmwareName) { delete impl; impl = new FirmwareManagerImpl(); if (!impl->load(firmwareName)) { delete impl; impl = nullptr; WARN("Could not load firmware %s", firmwareName.c_str()); return false; } loadedName = firmwareName; return true; } void FirmwareManager::init() { if (impl) { impl->fw_fn_hardware_init(); } } void FirmwareManager::step() { if (impl) { impl->fw_fn_hardware_step(); } } bool FirmwareManager::getGPIO(uint32_t pin) { if (impl) { return impl->fw_fn_hardware_getGPIO(pin); } else { return false; } } void FirmwareManager::setGPIO(uint32_t pin, bool value) { if (impl) { impl->fw_fn_hardware_setGPIO(pin, value); } } uint16_t FirmwareManager::getDAC(int channel) { if (impl) { return impl->fw_fn_hardware_getDAC(channel); } else { return 0; } } void FirmwareManager::setADC(int channel, uint16_t value) { if (impl) { impl->fw_fn_hardware_setADC(channel, value); } } void FirmwareManager::postEvent(uint32_t type, uint32_t data) { if (impl) { impl->fw_fn_hardware_postEvent(type, data); } } void FirmwareManager::serialConnectionChange(bool connected, uint8_t type, uint8_t protocol, uint8_t width, uint8_t height) { if (impl) { return impl->fw_fn_hardware_serialConnectionChange(connected, type, protocol, width, height); } } int FirmwareManager::readSerial(uint8_t** pbuf, uint8_t* pcount) { if (impl) { return impl->fw_fn_hardware_readSerial(pbuf, pcount); } else { *pbuf = NULL; *pcount = 0; return -1; } } int FirmwareManager::writeSerial(uint8_t* buf, uint8_t byteCount) { if (impl) { return impl->fw_fn_hardware_writeSerial(buf, byteCount); } else { return -1; } } void FirmwareManager::triggerInterrupt(int interrupt) { if (impl) { impl->fw_fn_hardware_triggerInterrupt(interrupt); } } void FirmwareManager::setClockPeriod(float seconds) { if (impl) { impl->clockPeriod = seconds; } } void FirmwareManager::advanceClock(float seconds) { if (impl) { impl->clockPhase += seconds; if (impl->clockPhase > impl->clockPeriod) { impl->clockPhase -= impl->clockPeriod; impl->fw_fn_hardware_triggerInterrupt(0); } } } void FirmwareManager::readNVRAM(void** ptr, uint32_t* size) { if (impl) { impl->fw_fn_hardware_readNVRAM(ptr, size); } } void FirmwareManager::writeNVRAM(const void* ptr, uint32_t size) { if (impl) { impl->fw_fn_hardware_writeNVRAM(ptr, size); } } void FirmwareManager::readVRAM(void** ptr, uint32_t* size) { if (impl) { impl->fw_fn_hardware_readVRAM(ptr, size); } } void FirmwareManager::writeVRAM(const void* ptr, uint32_t size) { if (impl) { impl->fw_fn_hardware_writeVRAM(ptr, size); } } void FirmwareManager::setScreenBuffer(uint8_t* ptr) { if (impl) { impl->fw_fn_hardware_setScreenBuffer(ptr); } } void FirmwareManager::hidConnect() { if (impl) { impl->fw_fn_hardware_hidConnect(); } } void FirmwareManager::hidDisconnect() { if (impl) { impl->fw_fn_hardware_hidDisconnect(); } } void FirmwareManager::hidMessage(uint8_t key, uint8_t mod, bool held, bool release) { if (impl) { impl->fw_fn_hardware_hidMessage(key, mod, held, release); } } void FirmwareManager::iiUpdateFollowerData(uint8_t device, uint8_t param, uint16_t value) { if (impl) { impl->fw_fn_hardware_iiUpdateFollowerData(device, param, value); } } bool FirmwareManager::iiPopMessage(uint8_t* addr, uint8_t* data, uint8_t* length) { if (impl) { return impl->fw_fn_hardware_iiPopMessage(addr, data, length); } return false; } void FirmwareManager::serializePreset(tt_serializer_t* stream, uint8_t preset_num) { if (impl) { return impl->fw_fn_hardware_serializePreset(stream, preset_num); } } void FirmwareManager::deserializePreset(tt_deserializer_t* stream, uint8_t preset_num, bool clearExisting) { if (impl) { return impl->fw_fn_hardware_deserializePreset(stream, preset_num, clearExisting); } } void FirmwareManager::getVersion(char* buffer) { if (impl) { return impl->fw_fn_hardware_getVersion(buffer); } } double FirmwareManager::getClockPeriod() { if (impl) { return impl->fw_fn_hardware_getClockPeriod(); } else { return 0.001; } } ================================================ FILE: src/common/core/FirmwareManager.hpp ================================================ #include #include #pragma once #ifdef MOCK_API #undef MOCK_API #endif #define MOCK_API(RET, METHODNAME, ARGS) #include "mock_hardware_api.h" #define MOCK_API_SKIP_TYPES struct FirmwareManager { FirmwareManager(); ~FirmwareManager(); const std::string getLibExtension(); bool load(std::string firmwareName); void unload(); const std::string& getLoadedName() const { return loadedName; } void setClockPeriod(float seconds); void advanceClock(float seconds); #ifdef MOCK_API #undef MOCK_API #endif #define MOCK_API(RET, METHODNAME, ARGS) RET METHODNAME ARGS #include "mock_hardware_api.h" struct FirmwareManagerImpl* impl; protected: std::string loadedName; }; ================================================ FILE: src/common/core/GridConnection/GridConnection.cpp ================================================ #include "GridConnection.hpp" #include "SerialOscInterface.hpp" void GridConnectionManager::registerGrid(Grid* grid) { grids.insert(grid); // Check if there's a consumer with a saved connection looking for this grid IGridConsumer* consumerToConnect = nullptr; for (auto consumer : consumers) { if (!isConnected(consumer) && grid->getDevice().id == consumer->gridGetLastDeviceId(true)) { consumerToConnect = consumer; break; } } if (consumerToConnect != nullptr) { connect(grid, consumerToConnect); } } void GridConnectionManager::registerGridConsumer(IGridConsumer* consumer) { consumers.insert(consumer); // Check if this consumer had a saved connection to an already-registered grid Grid* gridToConnect = nullptr; for (auto grid : grids) { if (!isConnected(grid->getDevice().id) && consumer->gridGetLastDeviceId(true) == grid->getDevice().id) { gridToConnect = grid; break; } } if (gridToConnect != nullptr) { connect(gridToConnect, consumer); } } void GridConnectionManager::deregisterGrid(std::string id, bool deleteGrid) { for (Grid* grid : grids) { if (grid->getDevice().id == id) { disconnect(grid); grids.erase(grid); // Connection manager owns the pointer, so deleteGrid should always be true, // unless this is being called from the Grid destructor if (deleteGrid) { delete grid; } return; } } } void GridConnectionManager::deregisterGridConsumer(IGridConsumer* consumer) { disconnect(consumer); consumers.erase(consumer); } void GridConnectionManager::connect(Grid* grid, IGridConsumer* consumer) { disconnect(consumer, true); disconnect(grid, true); consumerToGridMap[consumer] = grid; idToConsumerMap[grid->getDevice().id] = consumer; consumer->gridConnected(grid); // If serialosc is managing the grid (e.g. it's a hardware grid), inform serialosc about new grid owner auto port = grid->getDevice().port; auto so = SerialOscInterface::get(); if (port > 0 && so != nullptr && so->driver != nullptr) { so->driver->sendDevicePrefixMessage(port); so->driver->sendDevicePortMessage(port); } } bool GridConnectionManager::isConnected(IGridConsumer* consumer) { return consumerToGridMap.find(consumer) != consumerToGridMap.end(); } bool GridConnectionManager::isConnected(std::string id) { return idToConsumerMap.find(id) != idToConsumerMap.end(); } void GridConnectionManager::disconnect(Grid* grid, bool ownerChanged) { if (grid) { grid->clearAll(); auto iter = idToConsumerMap.find(grid->getDevice().id); if (iter != idToConsumerMap.end()) { auto consumer = iter->second; consumer->gridDisconnected(ownerChanged); idToConsumerMap.erase(grid->getDevice().id); consumerToGridMap.erase(consumer); } } } void GridConnectionManager::disconnect(IGridConsumer* consumer, bool ownerChanged) { if (consumer) { auto iter = consumerToGridMap.find(consumer); if (iter != consumerToGridMap.end()) { Grid* grid = iter->second; if (grid) { grid->clearAll(); consumer->gridDisconnected(ownerChanged); consumerToGridMap.erase(consumer); idToConsumerMap.erase(grid->getDevice().id); } } } } void GridConnectionManager::toggleConnection(Grid* grid, IGridConsumer* consumer) { if (consumer && consumer->gridGetDevice() == grid) { disconnect(consumer, true); consumer->setLastDeviceId(""); } else { connect(grid, consumer); } } void GridConnectionManager::dispatchButtonMessage(MonomeDevice* device, int x, int y, bool state) { auto iter = idToConsumerMap.find(device->id); if (iter != idToConsumerMap.end()) { iter->second->gridButtonEvent(x, y, state); } } void GridConnectionManager::dispatchEncDeltaMessage(MonomeDevice* device, int n, int d) { auto iter = idToConsumerMap.find(device->id); if (iter != idToConsumerMap.end()) { iter->second->encDeltaEvent(n, d); } } const std::set& GridConnectionManager::getGrids() { return grids; } GridConnectionManager& GridConnectionManager::get() { static GridConnectionManager instance; return instance; } ================================================ FILE: src/common/core/GridConnection/GridConnection.hpp ================================================ #pragma once #include "MonomeDevice.h" #include #include #include struct SerialOscInterface; struct Grid { virtual ~Grid() {} virtual const MonomeDevice& getDevice() = 0; virtual void updateRow(int x_offset, int y, uint8_t bitfield) = 0; virtual void updateQuadrant(int x, int y, uint8_t* leds) = 0; virtual void updateRing(int n, uint8_t leds[64]) = 0; virtual void clearAll() = 0; virtual bool isHardware() = 0; }; struct IGridConsumer { virtual ~IGridConsumer() {} virtual void gridConnected(Grid* grid) = 0; virtual void gridDisconnected(bool ownerChanged) = 0; virtual std::string gridGetCurrentDeviceId() = 0; virtual std::string gridGetLastDeviceId(bool owned) = 0; virtual void setLastDeviceId(std::string id) = 0; virtual void gridButtonEvent(int x, int y, bool state) = 0; virtual void encDeltaEvent(int n, int d) = 0; virtual Grid* gridGetDevice() = 0; }; struct GridConnectionManager final { // Only call these from the UI thread void registerGrid(Grid* grid); void registerGridConsumer(IGridConsumer* consumer); void deregisterGrid(std::string id, bool deleteGrid = false); void deregisterGridConsumer(IGridConsumer* consumer); void connect(Grid* grid, IGridConsumer* consumer); bool isConnected(IGridConsumer* consumer); bool isConnected(std::string id); void disconnect(Grid* grid, bool ownerChanged = false); void disconnect(IGridConsumer* consumer, bool ownerChanged = false); void toggleConnection(Grid* grid, IGridConsumer* consumer); void dispatchButtonMessage(MonomeDevice* device, int x, int y, bool state); void dispatchEncDeltaMessage(MonomeDevice* device, int n, int d); const std::set& getGrids(); static GridConnectionManager& get(); private: GridConnectionManager() = default; ~GridConnectionManager() = default; GridConnectionManager(const GridConnectionManager&) = delete; GridConnectionManager& operator=(const GridConnectionManager&) = delete; GridConnectionManager(GridConnectionManager&&) = delete; GridConnectionManager&& operator=(const GridConnectionManager&&) = delete; std::set consumers; std::set grids; std::map idToConsumerMap; std::map consumerToGridMap; }; ================================================ FILE: src/common/core/GridConnection/GridConnectionMenu.cpp ================================================ #include "GridConnectionMenu.hpp" #include "SerialOscInterface.hpp" using namespace rack; struct ConnectGridItem : rack::ui::MenuItem { Grid* grid; IGridConsumer* consumer; ActionQueue* actionQueue; void onAction(const rack::event::Action& e) override { if (actionQueue) { auto thisGrid = grid; auto thisConsumer = consumer; actionQueue->push([thisGrid, thisConsumer]() { GridConnectionManager::get().toggleConnection(thisGrid, thisConsumer); }); } } }; void menuUserReacquireGrid(IGridConsumer* consumer, std::string lastDeviceId, ActionQueue* actionQueue) { for (Grid* grid : GridConnectionManager::get().getGrids()) { if (lastDeviceId == grid->getDevice().id) { if (actionQueue) { actionQueue->push([grid, consumer]() { GridConnectionManager::get().connect(grid, consumer); }); } return; } } } void appendDeviceConnectionMenu(rack::Menu* menu, IGridConsumer* consumer, ActionQueue* actionQueue, bool hardwareOnly) { std::string currentConnectedDeviceId = consumer->gridGetCurrentDeviceId(); std::string lastConnectedDeviceId = consumer->gridGetLastDeviceId(false); menu->addChild(construct(&MenuLabel::text, "Device Connection")); if (SerialOscInterface::get()->isServiceDetected()) { menu->addChild( construct( &MenuLabel::text, "serialosc version " + SerialOscInterface::get()->getServiceVersion())); } else { menu->addChild( createMenuItem("└ serialosc service not detected, click here to install", "", [=]() { system::openBrowser("https://monome.org/docs/serialosc/setup/"); })); } // enumerate registered grid devices int deviceCount = 0; bool preferredDeviceFound = false; for (Grid* grid : GridConnectionManager::get().getGrids()) { if (hardwareOnly && !grid->isHardware()) { continue; } auto connectItem = new ConnectGridItem(); connectItem->text = "└ " + grid->getDevice().type + " (" + grid->getDevice().id + ") "; auto rightText = ""; if (currentConnectedDeviceId == grid->getDevice().id) { rightText = "✔"; preferredDeviceFound = true; } else if (currentConnectedDeviceId == "" && lastConnectedDeviceId == grid->getDevice().id) { rightText = "⋯"; preferredDeviceFound = true; } connectItem->rightText = rightText; connectItem->grid = grid; connectItem->actionQueue = actionQueue; connectItem->consumer = consumer; menu->addChild(connectItem); deviceCount++; } if (deviceCount == 0) { std::string message = hardwareOnly ? "no hardware devices found" : "no hardware or virtual devices found"; menu->addChild(construct(&MenuLabel::text, " (" + message + ")")); } if (currentConnectedDeviceId == "" && lastConnectedDeviceId != "") { if (preferredDeviceFound) { menu->addChild(createMenuItem("Reacquire grid", "", [=]() { if (lastConnectedDeviceId != "") { menuUserReacquireGrid(consumer, lastConnectedDeviceId, actionQueue); } } )); } else { menu->addChild(construct(&MenuLabel::text, "Can't reacquire grid (" + lastConnectedDeviceId + " not found)")); } } } ================================================ FILE: src/common/core/GridConnection/GridConnectionMenu.hpp ================================================ #pragma once #include "rack.hpp" #include "GridConnection.hpp" #include "ActionQueue.hpp" void appendDeviceConnectionMenu(rack::Menu* menu, IGridConsumer* consumer, ActionQueue* queue, bool hardwareOnly = false); ================================================ FILE: src/common/core/GridConnection/GridConsumerBase.cpp ================================================ #include "GridConsumerBase.hpp" GridConsumerBase::GridConsumerBase() : lastConnectedDeviceId("") , currentConnectedDeviceId("") , gridConnection(nullptr) { } void GridConsumerBase::gridConnected(Grid* newConnection) { gridConnection = newConnection; if (gridConnection) { std::string id = gridConnection->getDevice().id; lastConnectedDeviceId = id; currentConnectedDeviceId = id; connectionOwned = true; } } void GridConsumerBase::gridDisconnected(bool ownerChanged) { gridConnection = nullptr; currentConnectedDeviceId = ""; if (ownerChanged) { connectionOwned = false; } } std::string GridConsumerBase::gridGetCurrentDeviceId() { return currentConnectedDeviceId; } std::string GridConsumerBase::gridGetLastDeviceId(bool owned) { if (owned && !connectionOwned) { return ""; } return lastConnectedDeviceId; } void GridConsumerBase::setLastDeviceId(std::string id) { lastConnectedDeviceId = id; } Grid* GridConsumerBase::gridGetDevice() { return gridConnection; } void GridConsumerBase::userReacquireGrid() { if (lastConnectedDeviceId != "" && gridConnection == nullptr) { for (Grid* grid : GridConnectionManager::get().getGrids()) { if (gridGetLastDeviceId(false) == grid->getDevice().id) { GridConnectionManager::get().connect(grid, this); return; } } } } void GridConsumerBase::saveGridConnectionToJson(json_t* rootJ) { std::string deviceId = lastConnectedDeviceId; if (gridConnection) { deviceId = gridConnection->getDevice().id; } json_object_set_new(rootJ, "connectedDeviceId", json_string(deviceId.c_str())); json_object_set_new(rootJ, "connectionOwned", json_boolean(connectionOwned)); } void GridConsumerBase::loadGridConnectionFromJson(json_t* rootJ) { json_t* id = json_object_get(rootJ, "connectedDeviceId"); if (id) { lastConnectedDeviceId = json_string_value(id); } json_t* owned = json_object_get(rootJ, "connectionOwned"); if (owned) { connectionOwned = json_boolean_value(owned); } } ================================================ FILE: src/common/core/GridConnection/GridConsumerBase.hpp ================================================ #pragma once #include "GridConnection.hpp" #include "rack.hpp" struct GridConsumerBase : public IGridConsumer { // IGridConsumer partial implementation; child classes implement gridButtonEvent/encDeltaEvent void gridConnected(Grid* grid) override; void gridDisconnected(bool ownerChanged) override; std::string gridGetCurrentDeviceId() override; std::string gridGetLastDeviceId(bool owned) override; virtual void setLastDeviceId(std::string id) override; Grid* gridGetDevice() override; GridConsumerBase(); virtual ~GridConsumerBase() {}; void userReacquireGrid(); void saveGridConnectionToJson(json_t* rootJ); void loadGridConnectionFromJson(json_t* rootJ); std::string lastConnectedDeviceId; std::string currentConnectedDeviceId; bool connectionOwned; protected: Grid* gridConnection; }; ================================================ FILE: src/common/core/GridConnection/SerialOscGrid.cpp ================================================ #include "SerialOscGrid.hpp" #include "SerialOscInterface.hpp" SerialOscGrid::SerialOscGrid(const MonomeDevice* const _device) : device(*_device) { } const MonomeDevice& SerialOscGrid::getDevice() { return device; } void SerialOscGrid::updateRow(int x_offset, int y, uint8_t bitfield) { SerialOscInterface::get()->driver->sendDeviceLedRowCommand(&device, x_offset, y, bitfield); } void SerialOscGrid::updateQuadrant(int x, int y, uint8_t* leds) { if (device.protocol == PROTOCOL_40H) { uint8_t* p = leds; for (int i = 0; i < 8; i++) { uint8_t bits = 0; for (int j = 0; j < 8; j++) { if (*p++) { bits |= 1 << j; } } SerialOscInterface::get()->driver->sendDeviceLedRowCommand(&device, 0, i, bits); } } else if (device.protocol == PROTOCOL_SERIES) { uint8_t* p = leds; uint8_t map[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { if (*p++) { map[i] |= 1 << j; } } } SerialOscInterface::get()->driver->sendDeviceLedMapCommand(&device, x, y, map); } else { SerialOscInterface::get()->driver->sendDeviceLedLevelMapCommand(&device, x, y, leds); } } void SerialOscGrid::updateRing(int n, uint8_t leds[64]) { SerialOscInterface::get()->driver->sendDeviceRingMapCommand(&device, n, leds); } void SerialOscGrid::clearAll() { SerialOscInterface::get()->driver->sendDeviceLedAllCommand(&device, false); } ================================================ FILE: src/common/core/GridConnection/SerialOscGrid.hpp ================================================ #pragma once #include "GridConnection.hpp" #include "MonomeDevice.h" struct SerialOscGrid : Grid { SerialOscGrid(const MonomeDevice* const device); MonomeDevice device; const MonomeDevice& getDevice() override; void updateRow(int x_offset, int y, uint8_t bitfield) override; void updateQuadrant(int x, int y, uint8_t* leds) override; void updateRing(int n, uint8_t leds[64]) override; void clearAll() override; bool isHardware() override { return true; } }; ================================================ FILE: src/common/core/GridConnection/SerialOscInterface.cpp ================================================ #include "SerialOscInterface.hpp" #include "SerialOscGrid.hpp" SerialOscInterface::SerialOscInterface() { driver = new SerialOsc("rack", 13000); driver->start(this); } SerialOscInterface::~SerialOscInterface() { driver->stop(); delete driver; } bool SerialOscInterface::isServiceDetected() const { return driver->isServiceDetected(); } std::string SerialOscInterface::getServiceVersion() const { return driver->getVersionString(); } void SerialOscInterface::deviceFound(const MonomeDevice* const device) { if (!device) { return; } // don't register the same device id twice for (auto grid : GridConnectionManager::get().getGrids()) { if (grid->getDevice().id == device->id) { return; } } GridConnectionManager::get().registerGrid(new SerialOscGrid(device)); } void SerialOscInterface::deviceRemoved(const std::string& id) { GridConnectionManager::get().deregisterGrid(id, true); } void SerialOscInterface::buttonPressMessageReceived(MonomeDevice* device, int x, int y, bool state) { GridConnectionManager::get().dispatchButtonMessage(device, x, y, state); } void SerialOscInterface::encDeltaMessageReceived(MonomeDevice* device, int n, int d) { GridConnectionManager::get().dispatchEncDeltaMessage(device, n, d); } SerialOscInterface* SerialOscInterface::get() { static SerialOscInterface* instance = new SerialOscInterface(); return instance; } ================================================ FILE: src/common/core/GridConnection/SerialOscInterface.hpp ================================================ #include "SerialOsc.h" struct SerialOscInterface final : public SerialOsc::Listener { // constructor is private ~SerialOscInterface(); bool isServiceDetected() const; std::string getServiceVersion() const; // SerialOsc::Listener methods void deviceFound(const MonomeDevice* const device) override; void deviceRemoved(const std::string& id) override; void buttonPressMessageReceived(MonomeDevice* device, int x, int y, bool state) override; void encDeltaMessageReceived(MonomeDevice* device, int n, int delta) override; SerialOsc* driver; static SerialOscInterface* get(); private: SerialOscInterface(); SerialOscInterface(const SerialOscInterface&) = delete; SerialOscInterface& operator=(const SerialOscInterface&) = delete; SerialOscInterface(SerialOscInterface&&) = delete; SerialOscInterface&& operator=(const SerialOscInterface&&) = delete; }; ================================================ FILE: src/common/core/IIBus.cpp ================================================ #include "IIBus.h" #include "LibAVR32Module.hpp" #define FADERBANK_II_MAX_VALUE 16383 extern rack::plugin::Model* modelFaderbank; IIBus::IIBus(LibAVR32Module* leader) : leader(leader) { } bool IIBus::isFollower(rack::Module* module) { // Only faderbanks participate in II right now return module != nullptr && module->model == modelFaderbank; } void IIBus::step() { if (leader == nullptr) { return; } // let's tentatively define a bus as an unbroken chain of II-supporting // modules directly attached to either the left or right of the leader. // scan the "bus" for eligible modules, starting to the leader's left std::vector followers; auto module = leader->getLeftExpander().module; while (isFollower(module)) { followers.push_back(module); module = module->getLeftExpander().module; } // flip the order, so we can prioritize left-to-right if (followers.size() > 1) { std::reverse(followers.begin(), followers.end()); } // scan to the leader's right module = leader->getRightExpander().module; while (isFollower(module)) { followers.push_back(module); module = module->getRightExpander().module; } // gather params from all followers for (size_t follower = 0; follower < std::min(static_cast(4), followers.size()); follower++) { for (uint8_t fader = 0; fader < std::min(16, followers[follower]->getNumParams()); fader++) { auto param = followers[follower]->getParamQuantity(fader); if (param) { uint16_t value = static_cast(param->getScaledValue() * FADERBANK_II_MAX_VALUE); leader->firmware.iiUpdateFollowerData(follower + 0x34, fader, value); } } } } ================================================ FILE: src/common/core/IIBus.h ================================================ #pragma once #include "rack.hpp" #include #include #include struct LibAVR32Module; // Notes on the work-in-progress implementation of II (monome ecosystem i2c): // // An i2c module cannot wait for a response to messages. Even if the Rack engine is // using multiple threads, a leader and follower may be executing on the same thread. // // Since the leader will block waiting on a request for data from a follower, we need to // have the data ready in advance. Therefore the bus must continuously maintain a data // structure accessible to the leader with all data the leader could possibly request. struct IIBus { IIBus(LibAVR32Module* leader); bool isFollower(rack::Module* module); void step(); protected: LibAVR32Module* leader; }; ================================================ FILE: src/common/core/LibAVR32Module.cpp ================================================ #include "LibAVR32Module.hpp" #include "SerialOscInterface.hpp" #include "base64.h" #include LibAVR32Module::LibAVR32Module(std::string firmwarePrefix, std::string defaultFirmwareName) : firmwarePrefix(firmwarePrefix) , firmwareName(defaultFirmwareName) , defaultFirmwareName(defaultFirmwareName) , theme(GridTheme::Yellow) , usbParamId(-1) { // make sure serialosc is fully initialized by the time // the user needs to interact with it SerialOscInterface::get(); dacOffsetVolts = 0.0007; triggerHighThreshold = 2.21; triggerLowThreshold = 0.8; inputRate = 2; outputRate = 4; firmware.load(firmwareName); firmware.init(); firmware.advanceClock(0.02); firmware.step(); } LibAVR32Module::~LibAVR32Module() { GridConnectionManager::get().deregisterGridConsumer(this); } void LibAVR32Module::gridConnected(Grid* newConnection) { if (gridConnection != nullptr) { firmware.serialConnectionChange(false, 0, 0, 0, 0); } GridConsumerBase::gridConnected(newConnection); if (gridConnection) { auto d = gridConnection->getDevice(); if (d.type == "monome arc 2") { firmware.serialConnectionChange(true, 1, d.protocol, 2, 1); } else if (d.type.compare(0, 10, "monome arc") == 0) { firmware.serialConnectionChange(true, 1, d.protocol, 4, 1); } else { firmware.serialConnectionChange(true, 0, d.protocol, d.width, d.height); } if (usbParamId >= 0) { params[usbParamId].setValue(1.0); } } } void LibAVR32Module::gridDisconnected(bool ownerChanged) { GridConsumerBase::gridDisconnected(ownerChanged); firmware.serialConnectionChange(false, 0, 0, 0, 0); if (usbParamId >= 0) { params[usbParamId].setValue(0.0); } } void LibAVR32Module::gridButtonEvent(int x, int y, bool state) { // send grid press as serial event if (gridConnection) { switch (gridConnection->getDevice().protocol) { case PROTOCOL_40H: { uint8_t msg[2] = { (uint8_t)(state ? 0x01 : 0x00), (uint8_t)(((0x0F & x) << 4) | (0x0F & y)) }; firmware.writeSerial(msg, 2); } break; case PROTOCOL_SERIES: { uint8_t msg[2] = { (uint8_t)(state ? 0x00 : 0x10), (uint8_t)(((0x0F & x) << 4) | (0x0F & y)) }; firmware.writeSerial(msg, 2); } break; case PROTOCOL_MEXT: { uint8_t msg[3] = { (uint8_t)(state ? 0x21 : 0x20), (uint8_t)x, (uint8_t)y }; firmware.writeSerial(msg, 3); } break; default: break; } } // alternative: send grid press directly to event queue // performance is surprisingly much worse! // uint32_t data = (0xF & x) | ((0xF & y) << 8) | ((state ? 0 : 1) << 16); // firmware.postEvent(16 /* kEventMonomeGridKey */, data); } void LibAVR32Module::encDeltaEvent(int n, int d) { if (gridConnection) { uint8_t msg[3] = { (uint8_t)0x50, (uint8_t)n, (uint8_t)d }; firmware.writeSerial(msg, 3); } } void LibAVR32Module::readSerialMessages() { uint8_t* msg; uint8_t count; if (firmware.readSerial(&msg, &count) > 0) { if ((msg[0] & 0xF0) == 0x70) { while ((msg[0] & 0xF0) == 0x70 && count >= 2) { // 40h protocol row update uint8_t y = msg[0] & 0x0F; uint8_t bitfield = msg[1]; if (gridConnection) { gridConnection->updateRow(0, y, bitfield); } if (count > 2) // there are more 0x7x two-byte commands in this serial message { msg += 2; count -= 2; } else { break; } } } else if (msg[0] == 0x1A && count >= 35) { // mext protocol quadrant update uint8_t x = msg[1]; uint8_t y = msg[2]; uint8_t leds[64]; for (int i = 0; i < 32; i++) { leds[2 * i + 0] = msg[3 + i] >> 4; leds[2 * i + 1] = msg[3 + i] & 0xF; } if (gridConnection) { gridConnection->updateQuadrant(x, y, leds); } } else if ((msg[0] & 0xF0) == 0x80 && count >= 9) { // series protocol quadrant update int x = (msg[0] & 0x1) * 8; int y = (msg[0] & 0x2) * 8; uint8_t leds[64]; for (int j = 0; j < 8; j++) { for (int i = 0; i < 8; i++) { leds[i + 8 * j] = (msg[1 + j] & (0x1 << i)) ? 15 : 0; } } if (gridConnection) { gridConnection->updateQuadrant(x, y, leds); } } else if (msg[0] == 0x92 && count >= 32) { if (gridConnection) { uint8_t leds[64]; for (int i = 0; i < 32; i++) { leds[i * 2] = msg[2 + i] >> 4; leds[i * 2 + 1] = msg[2 + i] & 0x0F; } gridConnection->updateRing(msg[1], leds); } } } } void LibAVR32Module::requestReloadFirmware(bool preserveVRAM, bool preserveNVRAM, const std::string& firmwareName) { audioThreadActions.push([this, preserveVRAM, preserveNVRAM, firmwareName]() { this->reloadFirmware(preserveVRAM, preserveNVRAM, firmwareName); }); } void LibAVR32Module::reloadFirmware(bool preserveVRAM, bool preserveNVRAM, const std::string& newName) { void *data, *nvram_copy, *vram_copy = 0; uint32_t nvram_size, vram_size = 0; firmwareName = newName.empty() ? firmware.getLoadedName() : newName; if (firmwareName != firmware.getLoadedName()) { preserveVRAM = false; preserveNVRAM = false; } if (preserveNVRAM) { firmware.readNVRAM(&data, &nvram_size); nvram_copy = malloc(nvram_size); memcpy(nvram_copy, data, nvram_size); } if (preserveVRAM) { firmware.readVRAM(&data, &vram_size); vram_copy = malloc(vram_size); memcpy(vram_copy, data, vram_size); } firmware.load(firmwareName); firmware.init(); firmware.setScreenBuffer(getScreenBuffer()); if (preserveNVRAM) { firmware.writeNVRAM(nvram_copy, nvram_size); free(nvram_copy); } if (preserveVRAM) { firmware.writeVRAM(vram_copy, vram_size); free(vram_copy); } gridConnected(gridConnection); } void LibAVR32Module::process(const ProcessArgs& args) { while (audioThreadActions.size()) { audioThreadActions.shift()(); } // Run inputs at 1/2 audio rate by default, configurable in right-click menu if (args.frame % inputRate == 0) { // Module-specific code to bind Rack inputs to GPIO/ADC processInputs(args); } // Advance hardware timers firmware.advanceClock(args.sampleTime); // Pump hardware event loop firmware.step(); // Run outputs at 1/4 audio rate by default, configurable in right-click menu if (args.frame % outputRate == 0) { // Module-specific code to bind GPIO/DAC to Rack outputs & lights processOutputs(args); } // Act on serial output from module to the outside world (grid LEDs, etc.) readSerialMessages(); // Keep USB param state in sync with device connection state processDeviceConnectionParam(); } json_t* LibAVR32Module::dataToJson() { json_t* rootJ = json_object(); json_object_set_new(rootJ, "firmwareName", json_string(firmwareName.c_str())); json_object_set_new(rootJ, "inputRate", json_integer(inputRate)); json_object_set_new(rootJ, "outputRate", json_integer(outputRate)); saveGridConnectionToJson(rootJ); void* data = 0; uint32_t size = 0; firmware.readNVRAM(&data, &size); if (data && size > 0) { json_object_set_new(rootJ, "nvram", json_string(base64_encode((unsigned char*)data, size).c_str())); } firmware.readVRAM(&data, &size); if (data && size > 0) { json_object_set_new(rootJ, "vram", json_string(base64_encode((unsigned char*)data, size).c_str())); } return rootJ; } void LibAVR32Module::dataFromJson(json_t* rootJ) { loadGridConnectionFromJson(rootJ); json_t* jsonFirmwareName = json_object_get(rootJ, "firmwareName"); std::string newFirmwareName = jsonFirmwareName ? json_string_value(jsonFirmwareName) : defaultFirmwareName; if (newFirmwareName != firmwareName) { reloadFirmware(false, false, newFirmwareName); } void* data = 0; uint32_t size = 0; json_t* jd; jd = json_object_get(rootJ, "nvram"); if (jd) { std::string decoded = base64_decode(json_string_value(jd)); firmware.readNVRAM(&data, &size); if (data && size == decoded.length()) { firmware.writeNVRAM((void*)decoded.c_str(), size); } } jd = json_object_get(rootJ, "vram"); if (jd) { std::string decoded = base64_decode(json_string_value(jd)); firmware.readVRAM(&data, &size); if (data && size == decoded.length()) { firmware.writeVRAM((void*)decoded.c_str(), size); } } jd = json_object_get(rootJ, "inputRate"); if (jd) { int value = json_integer_value(jd); if (value == 1 || value == 2 || value == 4 || value == 8 || value == 16) { inputRate = value; } } jd = json_object_get(rootJ, "outputRate"); if (jd) { int value = json_integer_value(jd); if (value == 1 || value == 2 || value == 4 || value == 8 || value == 16) { outputRate = value; } } GridConnectionManager::get().registerGridConsumer(this); } void LibAVR32Module::onReset() { rack::engine::Module::onReset(); reloadFirmware(false); } void LibAVR32Module::processDeviceConnectionParam() { if (usbParamId >= 0) { float usbParamState = params[usbParamId].getValue(); if (usbParamState > 0 && gridConnection == nullptr) { userReacquireGrid(); } params[usbParamId].setValue(gridConnection != nullptr ? 1.0 : 0.0); } } ================================================ FILE: src/common/core/LibAVR32Module.hpp ================================================ #include "FirmwareManager.hpp" #include "GridConnection.hpp" #include "GridConsumerBase.hpp" #include "VirtualGridTheme.hpp" #include "rack.hpp" #include "ActionQueue.hpp" #pragma once #define A00 0 #define A01 1 #define A02 2 #define A03 3 #define A04 4 #define A05 5 #define A06 6 #define A07 7 #define B00 32 #define B01 33 #define B02 34 #define B03 35 #define B04 36 #define B05 37 #define B06 38 #define B07 39 #define B08 40 #define B09 41 #define B10 42 #define B11 43 #define NMI 13 struct GridConnection; struct LibAVR32Module : rack::engine::Module, GridConsumerBase { FirmwareManager firmware; LibAVR32Module(std::string firmwarePrefix, std::string defaultFirmwareName); ~LibAVR32Module(); // Rack module methods void process(const ProcessArgs& args) override; json_t* dataToJson() override; void dataFromJson(json_t* rootJ) override; void onReset() override; // MonomeModuleBase virtual methods virtual void processInputs(const ProcessArgs& args) = 0; virtual void processOutputs(const ProcessArgs& args) = 0; // Override IGridConsumer methods implemented by GridConsumerBase (and call base impl) // TODO: replace this with an event hook system virtual void gridConnected(Grid* newConnection) override; virtual void gridDisconnected(bool ownerChanged) override; // Implement remaining IGridConsumer methods virtual void gridButtonEvent(int x, int y, bool state) override; virtual void encDeltaEvent(int n, int d) override; virtual void readSerialMessages(); void requestReloadFirmware(bool preserveVRAM, bool preserveNVRAM, const std::string& firmwareName = ""); float dacToVolts(uint16_t adc); uint16_t voltsToAdc(float volts); std::string firmwarePrefix; std::string firmwareName; std::string defaultFirmwareName; int inputRate; int outputRate; GridTheme theme; virtual uint8_t* getScreenBuffer() { return 0; } protected: void reloadFirmware(bool preserveVRAM, bool preserveNVRAM = true, const std::string& newFirmware = ""); int usbParamId; void setDeviceConnectionParam(int paramId) { usbParamId = paramId; } void processDeviceConnectionParam(); float dacOffsetVolts; float triggerHighThreshold; float triggerLowThreshold; // Thread-safe for single-producer, single-consumer friend struct TeletypeSceneIO; friend struct LibAVR32ModuleWidget; friend struct USBAJack; ActionQueue audioThreadActions; }; inline float LibAVR32Module::dacToVolts(uint16_t dac) { // special case 0 so CV outs used as gates hit true zero (see issue #187) if (dac == 0) { return 0; } // 12 bits of information left aligned in a 16-bit word, add a small offset to get the 12-bit data closer to true return (10.0 * dac / (0xFFFF * 1.0)) + dacOffsetVolts; } inline uint16_t LibAVR32Module::voltsToAdc(float volts) { // Scale to 12-bit ADC, right-aligned in 16-bit word return (uint16_t)(rack::math::clamp(volts, 0.0, 10.0) * 0.1 * 0xFFF); } ================================================ FILE: src/common/core/LibAVR32ModuleWidget.cpp ================================================ #include "LibAVR32ModuleWidget.hpp" #include "LibAVR32Module.hpp" #include "GridConnectionMenu.hpp" #include "VirtualGridModule.hpp" #include "VirtualGridWidget.hpp" #include "SerialOscInterface.hpp" #include "Screenshot.hpp" #include namespace fs = ghc::filesystem; using namespace rack; struct ReloadFirmwareItem : rack::ui::MenuItem { LibAVR32Module* module; bool preserveVRAM; bool preserveNVRAM; void onAction(const rack::event::Action& e) override { if (module) { module->requestReloadFirmware(preserveVRAM, preserveNVRAM); } } }; struct SwitchFirmwareItem : rack::ui::MenuItem { LibAVR32Module* module; ui::Menu* createChildMenu() override { // duplicate filenames that may be left in res folder by prior versions std::vector ignoreList = {"teletype", "ansible 2", "earthsea 2", "meadowphysics 2", "teletype 2", "whitewhale 2"}; std::vector fwNames = {}; const fs::path fwPath{rack::asset::plugin(pluginInstance, "res/firmware")}; for (auto const& file : fs::directory_iterator{fwPath}) { auto name = file.path().stem().string(); auto extension = file.path().extension().string(); if (extension == module->firmware.getLibExtension() && name.substr(0, module->firmwarePrefix.size()) == module->firmwarePrefix && std::find(std::begin(ignoreList), std::end(ignoreList), name) == std::end(ignoreList)) { fwNames.push_back(name); } } bool currentMissing = false; if (std::find(std::begin(fwNames), std::end(fwNames), module->firmwareName) == std::end(fwNames)) { fwNames.push_back(module->firmwareName); currentMissing = true; } ui::Menu* menu = new ui::Menu; for (auto const& name : fwNames) { menu->addChild(createCheckMenuItem( name, (currentMissing && (module->firmwareName == name)) ? "(missing)" : "", [=]() { return module->firmwareName == name; }, [=]() { module->requestReloadFirmware(false, false, name); } )); } return menu; } }; struct ioRateItem : rack::ui::MenuItem { int* target = nullptr; int defaultValue = 0; ui::Menu* createChildMenu() override { ui::Menu* menu = new ui::Menu; std::string names[] = { "1x", "/2", "/4", "/8", "/16" }; std::string right[] = { "(audio rate)", "", "", "", "(lowest CPU)" }; for (int i = 0; i < 5; i++) { int value = 1 << i; menu->addChild(createCheckMenuItem( names[i], (value == defaultValue) ? "(default)" : right[i], [=]() { return *target == value; }, [=]() { *target = value; })); } return menu; } }; struct FirmwareSubmenuItem : MenuItem { LibAVR32Module* module; LibAVR32ModuleWidget* widget; Menu* createChildMenu() override { Menu* menu = new Menu; char versionbuf[512]; module->firmware.getVersion(versionbuf); menu->addChild(construct(&MenuLabel::text, module->firmwareName)); menu->addChild(construct(&MenuLabel::text, versionbuf)); menu->addChild(construct( &MenuItem::text, "Input rate", &MenuItem::rightText, RIGHT_ARROW, &ioRateItem::defaultValue, 2, &ioRateItem::target, &module->inputRate)); menu->addChild(construct( &MenuItem::text, "Output rate", &MenuItem::rightText, RIGHT_ARROW, &ioRateItem::defaultValue, 4, &ioRateItem::target, &module->outputRate)); menu->addChild(new MenuSeparator()); menu->addChild(createMenuItem("Save PNG screenshot", "", [this]() { screenshotModulePNG(widget, widget->model->slug + "-screenshot.png"); })); menu->addChild(new MenuSeparator()); menu->addChild(construct( &MenuItem::text, "Switch Firmware", &MenuItem::rightText, RIGHT_ARROW, &SwitchFirmwareItem::module, module)); auto hotReloadItem = new ReloadFirmwareItem(); hotReloadItem->text = "Hot Reload"; hotReloadItem->module = module; hotReloadItem->preserveVRAM = true; hotReloadItem->preserveNVRAM = true; menu->addChild(hotReloadItem); auto reloadItem = new ReloadFirmwareItem(); reloadItem->text = "Reload & Restart"; reloadItem->module = module; reloadItem->preserveVRAM = false; reloadItem->preserveNVRAM = true; menu->addChild(reloadItem); auto clearItem = new ReloadFirmwareItem(); clearItem->text = "Clear NVRAM"; clearItem->module = module; clearItem->preserveVRAM = true; clearItem->preserveNVRAM = false; menu->addChild(clearItem); return menu; } }; LibAVR32ModuleWidget::LibAVR32ModuleWidget() { } void LibAVR32ModuleWidget::appendContextMenu(rack::Menu* menu) { LibAVR32Module* m = dynamic_cast(module); assert(m); menu->addChild(new MenuSeparator()); auto firmwareMenu = new FirmwareSubmenuItem(); firmwareMenu->text = "Firmware Tools"; firmwareMenu->module = m; firmwareMenu->widget = this; firmwareMenu->rightText = "▸"; menu->addChild(firmwareMenu); menu->addChild(new MenuSeparator()); appendDeviceConnectionMenu(menu, m, &m->audioThreadActions); } ================================================ FILE: src/common/core/LibAVR32ModuleWidget.hpp ================================================ #include "LibAVR32Module.hpp" #include "rack.hpp" #pragma once extern rack::Plugin* pluginInstance; struct LibAVR32ModuleWidget : rack::app::ModuleWidget { LibAVR32ModuleWidget(); virtual void appendContextMenu(rack::ui::Menu* menu) override; }; ================================================ FILE: src/common/util/Clock12BitParam.hpp ================================================ #pragma once #include template struct Clock12BitParam : rack::engine::ParamQuantity { std::string divisorLabels[9] = { "1/16", "1/8", "1/4", "1/2", "1", "2", "4", "8", "16" }; bool isDividerMode() { return DividerModeWhenInputPatched >= 0 && module && module->inputs[DividerModeWhenInputPatched].isConnected(); } std::string getDisplayValueString() override { float v = getDisplayValue(); if (std::isnan(v)) return "NaN"; uint16_t word = ((((uint16_t)(v * 1638.3) >> 4)) & 0xFFF); if (isDividerMode()) { int div = rack::math::clamp((word << 2) / 455, 0, 8); unit = "x"; return divisorLabels[div]; } else { uint16_t period = 2 * (Multiplier * 12500) / (word + 25); unit = "ms"; return rack::string::f("%d", period); } } void setDisplayValueString(std::string s) override { if (isDividerMode()) { // remove any whitespace s.erase(std::remove_if(s.begin(), s.end(), isspace), s.end()); s = s == "1/1" ? "1" : s; for (int i = 0; i < 9; i++) { if (s == divisorLabels[i]) { uint16_t word = (i * 455 + 227) << 2; setImmediateValue(word * (10.0 / 16383.0) + 0.0007); return; } } } else { ParamQuantity::setDisplayValueString(s); } } void setDisplayValue(float dv) override { uint16_t period = rack::math::clamp((int)floor(dv), 22 * Multiplier, 1000 * Multiplier); uint16_t word = (Multiplier * 12500 / (period / 2) - 25) << 4; setImmediateValue(word * (10.0 / 16383.0) + 0.0007); } }; ================================================ FILE: src/common/util/Screenshot.cpp ================================================ #include "Screenshot.hpp" #include "osdialog.h" #include "stb_image_write.h" #if SCREENSHOT_SVG #include #include #include struct SVGcontext { svg::Document doc; int width; int height; }; int svg__renderCreate(void* uptr, void* otherUptr) { return 1; } int svg__renderCreateTexture(void* uptr, int type, int w, int h, int imageFlags, const unsigned char* data) { return 1; } int svg__renderDeleteTexture(void* uptr, int image) { return 1; } int svg__renderUpdateTexture(void* uptr, int image, int x, int y, int w, int h, const unsigned char* data) { return 1; } int svg__renderGetTextureSize(void* uptr, int image, int* w, int* h) { return 1; } void svg__renderViewport(void* uptr, float width, float height, float devicePixelRatio) { } void svg__renderFlush(void* uptr) { } svg::Point vertToPoint(SVGcontext* ctx, NVGvertex v) { return svg::Point(v.x, ctx->height - v.y); } void svg__renderFill(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, const float* bounds, const NVGpath* paths, int npaths) { SVGcontext* svgContext = reinterpret_cast(uptr); if (svgContext == nullptr) { return; } for (int i = 0; i < npaths; i++) { auto c = paint->innerColor; svg::Color fillColor(c.r, c.g, c.b); svg::Polygon svgPolygon((svg::Fill(svg::Color::White), svg::Stroke(1, svg::Color::Black))); const NVGpath* path = &paths[i]; for (int v = 0; v < path->nstroke; v++) { svgPolygon << vertToPoint(svgContext, path->stroke[v]); } svgContext->doc << svgPolygon; } } void svg__renderStroke(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, float strokeWidth, const NVGpath* paths, int npaths) { SVGcontext* svgContext = reinterpret_cast(uptr); if (svgContext == nullptr) { return; } for (int i = 0; i < npaths; i++) { svg::Polyline svgPolyline(svg::Stroke(strokeWidth, svg::Color::Black)); const NVGpath* path = &paths[i]; for (int v = 0; v < path->nstroke; v++) { svgPolyline << vertToPoint(svgContext, path->stroke[v]); } svgContext->doc << svgPolyline; } } void svg__renderTriangles(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, const NVGvertex* verts, int nverts, float fringe) { } void svg__renderDelete(void* uptr) { SVGcontext* svgContext = reinterpret_cast(uptr); if (svgContext == nullptr) { return; } svgContext->doc.save(); delete svgContext; } struct NVGcontext* nvgCreateSVGRenderer(std::string svgPath, int width, int height, NVGcontext* other) { struct NVGparams params; struct NVGcontext* ctx = NULL; struct SVGcontext* userData = new SVGcontext(); svg::Dimensions dimensions(width, height); svg::Document doc(svgPath, svg::Layout(dimensions, svg::Layout::BottomLeft)); svg::Polygon border(svg::Stroke(1, svg::Color::Red)); border << svg::Point(0, 0) << svg::Point(dimensions.width, 0) << svg::Point(dimensions.width, dimensions.height) << svg::Point(0, dimensions.height); doc << border; //doc.save(); userData->doc = doc; userData->width = width; userData->height = height; memset(¶ms, 0, sizeof(params)); params.renderCreate = svg__renderCreate; params.renderCreateTexture = svg__renderCreateTexture; params.renderDeleteTexture = svg__renderDeleteTexture; params.renderUpdateTexture = svg__renderUpdateTexture; params.renderGetTextureSize = svg__renderGetTextureSize; params.renderViewport = svg__renderViewport; params.renderFlush = svg__renderFlush; params.renderFill = svg__renderFill; params.renderStroke = svg__renderStroke; params.renderTriangles = svg__renderTriangles; params.renderDelete = svg__renderDelete; params.userPtr = userData; params.edgeAntiAlias = 1; ctx = nvgCreateInternal(¶ms, other); return ctx; } void nvgDestroySVGRenderer(NVGcontext* ctx) { nvgDeleteInternal(ctx); } void screenshotModuleSVG(rack::app::ModuleWidget* moduleWidget, std::string svgPath) { auto size = moduleWidget->box.size; auto ctx = nvgCreateSVGRenderer(svgPath, size.x, size.y, nullptr); rack::widget::Widget::DrawArgs args; args.vg = ctx; args.fb = nullptr; args.clipBox = rack::math::Rect(0, 0, size.x, size.y); moduleWidget->draw(args); nvgDestroySVGRenderer(ctx); } #endif void screenshotModulePNG(rack::app::ModuleWidget* moduleWidget, std::string defaultFileName) { // adapted from rack::Window::screenshotModules() // https://github.com/VCVRack/Rack/blob/a811a9c78a4876824a2f721d91bdebced6a1a387/src/window/Window.cpp#L564 float zoom = 2.0; auto fbw = new rack::widget::FramebufferWidget; fbw->oversample = 1; struct ModuleWidgetContainer : rack::widget::Widget { void draw(const DrawArgs& args) override { Widget::draw(args); Widget::drawLayer(args, 1); } }; ModuleWidgetContainer* mwc = new ModuleWidgetContainer; fbw->addChild(mwc); rack::app::ModuleWidget* mw = moduleWidget->model->createModuleWidget(moduleWidget->module); mwc->box.size = mw->box.size; fbw->box.size = mw->box.size; mwc->addChild(mw); fbw->step(); fbw->render(rack::math::Vec(zoom, zoom)); char* path_result = osdialog_file( OSDIALOG_SAVE, NULL, defaultFileName.c_str(), NULL); if (!path_result) return; nvgluBindFramebuffer(fbw->getFramebuffer()); int width, height; int depth = 4; nvgImageSize(APP->window->vg, fbw->getImageHandle(), &width, &height); uint8_t* pixels = new uint8_t[height * width * depth]; glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); for (int y = 0; y < height / 2; y++) { int flipY = height - y - 1; uint8_t tmp[width * depth]; std::memcpy(tmp, &pixels[y * width * depth], width * depth); std::memcpy(&pixels[y * width * depth], &pixels[flipY * width * depth], width * depth); std::memcpy(&pixels[flipY * width * depth], tmp, width * depth); } stbi_write_png(path_result, width, height, depth, pixels, width * depth); delete[] pixels; nvgluBindFramebuffer(NULL); mw->module = nullptr; delete fbw; INFO("Screenshot saved to %s", path_result); std::free(path_result); } ================================================ FILE: src/common/util/Screenshot.hpp ================================================ #pragma once #include #include "rack.hpp" #define SCREENSHOT_SVG 0 #if SCREENSHOT_SVG void screenshotModuleSVG(rack::app::ModuleWidget* moduleWidget, std::string svgPath); #endif void screenshotModulePNG(rack::app::ModuleWidget* moduleWidget, std::string pngPath); ================================================ FILE: src/common/widgets/CustomMenuTemplates.hpp ================================================ #pragma once #include "rack.hpp" using namespace rack; template TMenuItem* createUnconsumingIndexSubmenuItem(std::string text, std::vector labels, std::function getter, std::function setter, bool disabled = false) { struct IndexItem : ui::MenuItem { std::function getter; std::function setter; size_t index; void step() override { size_t currIndex = getter(); this->rightText = CHECKMARK(currIndex == index); MenuItem::step(); } void onAction(const event::Action& e) override { setter(index); e.unconsume(); } }; struct Item : TMenuItem { std::function getter; std::function setter; std::vector labels; void step() override { size_t currIndex = getter(); std::string label = (currIndex < labels.size()) ? labels[currIndex] : ""; this->rightText = label + " " + RIGHT_ARROW; TMenuItem::step(); } ui::Menu* createChildMenu() override { ui::Menu* menu = new ui::Menu; for (size_t i = 0; i < labels.size(); i++) { IndexItem* item = createMenuItem(labels[i]); item->getter = getter; item->setter = setter; item->index = i; menu->addChild(item); } return menu; } }; Item* item = createMenuItem(text); item->getter = getter; item->setter = setter; item->labels = labels; item->disabled = disabled; return item; } template TMenuItem* createUnconsumingIndexSubmenuItemWithDynamicLabels(std::string text, std::function()> getLabels, std::function getter, std::function setter, bool disabled = false) { struct IndexItem : ui::MenuItem { std::function getter; std::function setter; size_t index; void step() override { size_t currIndex = getter(); this->rightText = CHECKMARK(currIndex == index); MenuItem::step(); } void onAction(const event::Action& e) override { setter(index); e.unconsume(); } }; struct Item : TMenuItem { std::function()> getLabels; std::function getter; std::function setter; void step() override { size_t currIndex = getter(); auto labels = getLabels(); std::string label = (currIndex < labels.size()) ? labels[currIndex] : ""; this->rightText = label + " " + RIGHT_ARROW; TMenuItem::step(); } ui::Menu* createChildMenu() override { ui::Menu* menu = new ui::Menu; auto labels = getLabels(); for (size_t i = 0; i < labels.size(); i++) { IndexItem* item = createMenuItem(labels[i]); item->getter = getter; item->setter = setter; item->index = i; menu->addChild(item); } return menu; } }; Item* item = createMenuItem(text); item->getter = getter; item->setter = setter; item->getLabels = getLabels; item->disabled = disabled; return item; } template TMenuItem* createSubmenuItemWithDynamicRightText(std::string text, std::function getRightText, std::function createMenu, bool disabled = false) { struct Item : TMenuItem { std::function getRightText; std::function createMenu; void step() override { this->rightText = getRightText() + " " + RIGHT_ARROW; TMenuItem::step(); } ui::Menu* createChildMenu() override { ui::Menu* menu = new ui::Menu; createMenu(menu); return menu; } }; Item* item = createMenuItem(text, getRightText() + " " + RIGHT_ARROW); item->getRightText = getRightText; item->createMenu = createMenu; item->disabled = disabled; return item; } ================================================ FILE: src/common/widgets/HoldableButton.hpp ================================================ #include "rack.hpp" struct HoldableButton : rack::TL1105 { bool heldThisGesture; HoldableButton() : rack::TL1105() { heldThisGesture = false; } void onButton(const rack::widget::Widget::ButtonEvent& e) override { // Shift from momentary to toggle if we're control-clicked, to enable a "hold" state if (momentary && e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT && (e.mods & RACK_MOD_CTRL) == RACK_MOD_CTRL) { momentary = false; heldThisGesture = true; } // don't cancel the hold on the very first release event else if (e.action == GLFW_RELEASE && heldThisGesture) { heldThisGesture = false; } else { momentary = true; heldThisGesture = false; } TL1105::onButton(e); } void draw(const DrawArgs& args) override { if (!momentary) { nvgBeginPath(args.vg); nvgCircle(args.vg, box.size.x / 2, box.size.y / 2, box.size.x / 2 + 2); nvgStrokeColor(args.vg, nvgRGB(190, 180, 0)); nvgStrokeWidth(args.vg, 4); nvgStroke(args.vg); } TL1105::draw(args); } }; ================================================ FILE: src/common/widgets/SifamTPM.hpp ================================================ #pragma once #include struct Sifam : rack::app::SvgKnob { rack::widget::SvgWidget* bg; rack::widget::SvgWidget* fg; rack::widget::SvgWidget* indicator; rack::widget::TransformWidget* indicatorTransform; Sifam() { minAngle = -0.83 * M_PI; maxAngle = 0.83 * M_PI; bg = new rack::widget::SvgWidget; fb->addChildBelow(bg, tw); fg = new rack::widget::SvgWidget; fb->addChildAbove(fg, tw); indicatorTransform = new rack::widget::TransformWidget; indicator = new rack::widget::SvgWidget; indicatorTransform->addChild(indicator); fb->addChildAbove(indicatorTransform, fg); } void onChange(const ChangeEvent& e) override { SvgKnob::onChange(e); for (int i = 0; i < 6; i++) { indicatorTransform->transform[i] = tw->transform[i]; } } }; struct SifamTPN111GrayBlackStripe : Sifam { SifamTPN111GrayBlackStripe() { setSvg(rack::window::Svg::load(rack::asset::plugin(pluginInstance, "res/SifamTPN111.svg"))); bg->setSvg(rack::window::Svg::load(rack::asset::plugin(pluginInstance, "res/SifamTPN111-bg.svg"))); fg->setSvg(rack::window::Svg::load(rack::asset::plugin(pluginInstance, "res/SifamTPN111-gray-fg.svg"))); indicator->setSvg(rack::window::Svg::load(rack::asset::plugin(pluginInstance, "res/SifamTPN111-blackstripe.svg"))); indicatorTransform->box.size = indicator->box.size; } }; ================================================ FILE: src/common/widgets/USBAJack.hpp ================================================ #pragma once #include "rack.hpp" #include "LibAVR32Module.hpp" #include "GridConnectionMenu.hpp" struct USBAJack : rack::Switch { USBAJack() { box.size = rack::Vec(44, 23.75); } void draw(const DrawArgs& args) override { auto vg = args.vg; auto m = dynamic_cast(module); float w = box.size.x; float h = box.size.y; float z = 4.75; rack::engine::ParamQuantity* pq = getParamQuantity(); if (pq && pq->getValue() >= 1.0) { // draw shadow nvgBeginPath(vg); nvgRoundedRect(vg, 0, z - 1, w, h - z + 1, 4.5); nvgFillColor(vg, nvgRGB(165, 165, 165)); nvgFill(vg); // draw face nvgBeginPath(vg); nvgRoundedRect(vg, 0, 0, w, h - z + 1, 3.5); nvgFillColor(vg, nvgRGB(200, 200, 200)); nvgFill(vg); // draw 3D highlight nvgBeginPath(vg); nvgRoundedRect(vg, 2, 1, w - 4, h - z - 1, 3); nvgFillPaint(vg, nvgBoxGradient(vg, 2, 1, w - 4, 18, 2, 5, nvgRGB(225, 225, 225), nvgRGB(190, 190, 190))); nvgFill(vg); // draw embossed text label std::string label = m->currentConnectedDeviceId.substr(0, 11); nvgFontSize(vg, 6.0); nvgTextAlign(vg, NVG_ALIGN_RIGHT | NVG_ALIGN_BOTTOM); nvgFillColor(vg, nvgRGB(250, 250, 250)); nvgText(vg, w - 4.1, z + 12.4, label.c_str(), 0); nvgFillColor(vg, nvgRGB(150, 150, 150)); nvgText(vg, w - 4.5, z + 12, label.c_str(), 0); } else { // draw port background nvgBeginPath(vg); nvgRoundedRect(vg, 3, z, w - 6, h - z - 5, 1.5); nvgFillColor(vg, nvgRGB(0, 0, 0)); nvgFill(vg); // draw connector base nvgBeginPath(vg); nvgRect(vg, 7, 4 + z, w - 14, 6); nvgFillColor(vg, nvgRGB(50, 50, 50)); nvgFill(vg); // draw contacts float p = (w - 14) / 8.5; nvgBeginPath(vg); nvgRoundedRect(vg, 7 + 1 * p, z + 5, p, 4, 1.5); nvgRoundedRect(vg, 7 + 2.9 * p, z + 5, p, 3.5, 1.5); nvgRoundedRect(vg, 7 + 4.6 * p, z + 5, p, 3.5, 1.5); nvgRoundedRect(vg, 7 + 6.5 * p, z + 5, p, 4, 1.5); nvgFillColor(vg, nvgRGB(77, 75, 0)); nvgFill(vg); // draw connector prong nvgBeginPath(vg); nvgRect(vg, 7, 4 + z, 30, 3); nvgFillColor(vg, nvgRGB(120, 120, 120)); nvgFill(vg); } } void appendContextMenu(rack::ui::Menu* menu) override { auto mw = dynamic_cast(parent); if (mw) { auto m = dynamic_cast(mw->module); if (mw) { menu->addChild(new rack::MenuSeparator()); appendDeviceConnectionMenu(menu, m, &m->audioThreadActions); } } } }; ================================================ FILE: src/common/widgets/YellowWhiteLight.hpp ================================================ #pragma once #include "rack.hpp" struct YellowWhiteLight : rack::componentlibrary::GrayModuleLightWidget { YellowWhiteLight() { this->addBaseColor(rack::SCHEME_YELLOW); this->addBaseColor(rack::SCHEME_WHITE); } }; ================================================ FILE: src/earthsea/EarthseaModule.hpp ================================================ #include "LibAVR32Module.hpp" #pragma once struct EarthseaModule : LibAVR32Module { enum ParamIds { CV1_PARAM, CV2_PARAM, CV3_PARAM, BUTTON_PARAM, USB_PARAM, NUM_PARAMS }; enum InputIds { NUM_INPUTS }; enum OutputIds { CV1_OUTPUT, CV2_OUTPUT, CV3_OUTPUT, POS_OUTPUT, EDGE_OUTPUT, NUM_OUTPUTS }; enum LightIds { CV1_LIGHT, CV2_LIGHT, CV3_LIGHT, POS_LIGHT, EDGE_LIGHT, NUM_LIGHTS }; EarthseaModule() : LibAVR32Module("earthsea", "earthsea") { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); configButton(BUTTON_PARAM, "PRESET"); configParam(CV1_PARAM, 0, 10.0, 0.0, "SHAPE 1", "V"); configParam(CV2_PARAM, 0, 10.0, 0.0, "SHAPE 2", "V"); configParam(CV3_PARAM, 0, 10.0, 0.0, "SHAPE 3", "V"); configOutput(CV1_OUTPUT, "SHAPE 1"); configOutput(CV2_OUTPUT, "SHAPE 2"); configOutput(CV3_OUTPUT, "SHAPE 3"); configOutput(EDGE_OUTPUT, "EDGE"); configOutput(POS_OUTPUT, "POS"); configButton(USB_PARAM, "USB Device Port"); setDeviceConnectionParam(USB_PARAM); } void processInputs(const ProcessArgs& args) override { bool frontButton = params[BUTTON_PARAM].getValue() == 0; if (frontButton != firmware.getGPIO(NMI)) { firmware.setGPIO(NMI, frontButton); firmware.triggerInterrupt(3); } // Convert knob float parameters to 12-bit ADC values firmware.setADC(0, voltsToAdc(params[CV1_PARAM].getValue())); firmware.setADC(1, voltsToAdc(params[CV2_PARAM].getValue())); firmware.setADC(2, voltsToAdc(params[CV3_PARAM].getValue())); } void processOutputs(const ProcessArgs& args) override { float cv1 = dacToVolts(firmware.getDAC(2)); float cv2 = dacToVolts(firmware.getDAC(3)); float cv3 = dacToVolts(firmware.getDAC(0)); float pos = dacToVolts(firmware.getDAC(1)); bool edge = firmware.getGPIO(B00); // Update lights from DAC and GPIO lights[CV1_LIGHT].setSmoothBrightness(cv1 / 10.0, args.sampleTime); lights[CV2_LIGHT].setSmoothBrightness(cv2 / 10.0, args.sampleTime); lights[CV3_LIGHT].setSmoothBrightness(cv3 / 10.0, args.sampleTime); lights[POS_LIGHT].setSmoothBrightness(pos / 10.0, args.sampleTime); lights[EDGE_LIGHT].setSmoothBrightness(edge, args.sampleTime); // Update output jacks from GPIO & DAC outputs[CV1_OUTPUT].setVoltage(cv1); outputs[CV2_OUTPUT].setVoltage(cv2); outputs[CV3_OUTPUT].setVoltage(cv3); outputs[POS_OUTPUT].setVoltage(pos); outputs[EDGE_OUTPUT].setVoltage(edge * 8.0); } }; ================================================ FILE: src/earthsea/EarthseaWidget.hpp ================================================ #pragma once #include "EarthseaModule.hpp" #include "LibAVR32ModuleWidget.hpp" #include "SifamTPM.hpp" #include "USBAJack.hpp" using namespace rack; struct EarthseaWidget : LibAVR32ModuleWidget { EarthseaWidget(EarthseaModule* module) { setModule(module); box.size = Vec(15 * 6, 380); { auto panel = new ThemedSvgPanel(); panel->setBackground( APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/earthsea.svg")), APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/earthsea-dark.svg"))); panel->box.size = box.size; addChild(panel); } // Screws positioned for sliding nuts :) addChild(createWidget(Vec(RACK_GRID_WIDTH / 2, 0))); addChild(createWidget(Vec(RACK_GRID_WIDTH / 2, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addParam(createParam(Vec(7, 333), module, EarthseaModule::USB_PARAM)); addParam(createParam(Vec(62, 336), module, EarthseaModule::BUTTON_PARAM)); addParam(createParam(Vec(12.5, 30), module, EarthseaModule::CV1_PARAM)); addParam(createParam(Vec(12.5, 116), module, EarthseaModule::CV2_PARAM)); addParam(createParam(Vec(12.5, 202), module, EarthseaModule::CV3_PARAM)); addOutput(createOutput(Vec(50, 82), module, EarthseaModule::CV1_OUTPUT)); addOutput(createOutput(Vec(50, 166), module, EarthseaModule::CV2_OUTPUT)); addOutput(createOutput(Vec(50, 248), module, EarthseaModule::CV3_OUTPUT)); addOutput(createOutput(Vec(50, 286), module, EarthseaModule::POS_OUTPUT)); addOutput(createOutput(Vec(15, 265), module, EarthseaModule::EDGE_OUTPUT)); addChild(createLight>(Vec(77, 78), module, EarthseaModule::CV1_LIGHT)); addChild(createLight>(Vec(77, 162), module, EarthseaModule::CV2_LIGHT)); addChild(createLight>(Vec(77, 244), module, EarthseaModule::CV3_LIGHT)); addChild(createLight>(Vec(77, 282), module, EarthseaModule::POS_LIGHT)); addChild(createLight>(Vec(2, 282), module, EarthseaModule::EDGE_LIGHT)); } }; ================================================ FILE: src/faderbank/FaderbankModule.cpp ================================================ #include "FaderbankModule.hpp" FaderbankModule::FaderbankModule() { config(NUM_FADERS, 0, NUM_FADERS, 0); for (unsigned i = 0; i < NUM_FADERS; i++) { configParam(i, 0.0, 10.0, 0.0, rack::string::f("Fader %d", i + 1), " V"); } resetConfig(); } FaderbankModule::~FaderbankModule() { } void FaderbankModule::process(const ProcessArgs& args) { processMIDIMessages(args); for (unsigned i = 0; i < NUM_FADERS; i++) { outputs[i].setVoltage(params[i].getValue()); } if (polyphonicMode) { outputs[NUM_FADERS - 1].setChannels(16); for (unsigned i = 0; i < NUM_FADERS; i++) { outputs[NUM_FADERS - 1].setVoltage(params[i].getValue(), i); } } else { outputs[NUM_FADERS - 1].setChannels(1); } } void FaderbankModule::processMIDIMessages(const ProcessArgs& args) { int min14bitInterval = floor(args.sampleRate * 0.004); rack::midi::Message msg; while (midiInput.tryPop(&msg, args.frame)) { DEBUG("MIDI: %lld %s", msg.getFrame(), msg.toString().c_str()); switch (msg.getStatus()) { case 0xb: // Continuous Controller { // Combine channel and CC number into a lookup key uint8_t ccNum = msg.getNote(); uint16_t key = (msg.getChannel() << 8) | ccNum; auto iter = inputMap.find(key); if (iter != inputMap.end()) { auto faderDestinations = iter->second; for (auto index : faderDestinations) { if (index < NUM_FADERS) { records[index].highValue = msg.getValue(); records[index].lastHighValue = msg.getValue(); records[index].lastHighValueFrame = args.frame; } } } if (ccNum >= 32) { // look for potential LSB CC of 14-bit CC key = (msg.getChannel() << 8) | (ccNum - 32); iter = inputMap.find(key); if (iter != inputMap.end()) { auto faderDestinations = iter->second; for (auto index : faderDestinations) { if (index < NUM_FADERS && records[index].faderMode == FaderMode14bitCC) { records[index].lowValue = msg.getValue(); records[index].lastLowValueFrame = args.frame; } } } } } break; case 0xF: // System Exclusive { if (msg.bytes[1] == 0x7d && // 16n manufacturer ID msg.bytes[2] == 0x00 && msg.bytes[3] == 0x00 && msg.bytes[4] == 0x0F && // sysex config response ID msg.bytes.size() >= (9 + 80)) { for (int i = 0; i < NUM_FADERS; i++) { uint8_t channel = ((msg.bytes[9 + 16 + i]) & 0xF) - 1; uint8_t ccNum = msg.bytes[9 + 48 + i] & 0x7F; records[i].ccNum = ccNum; records[i].channel = channel; if (msg.bytes.size() >= 9 + 83) { uint16_t ccMode = (msg.bytes[9 + 80] & 0x7F) | ((msg.bytes[9 + 81] & 0x7F) << 7) | ((msg.bytes[9 + 82] & 0x03) << 14); records[i].faderMode = (ccMode & (1 << i)) == 0 ? FaderModeCC : FaderMode14bitCC; } } updateInputMap(); } } break; default: break; } } for (int i = 0; i < NUM_FADERS; i++) { uint16_t value; bool updateable = false; bool expect14bit = records[i].faderMode == FaderMode14bitCC && records[i].ccNum < 96; if (records[i].highValue != 0xFF) { if (expect14bit) { if (records[i].lowValue != 0xFF) { value = ((records[i].highValue & 0x7F) << 7) + (records[i].lowValue & 0x7F); updateable = true; } else if ((args.frame - records[i].lastHighValueFrame) > min14bitInterval) { // give up waiting for a low value value = (records[i].highValue & 0x7F) << 7; updateable = true; } } else { value = records[i].highValue & 0x7F; updateable = true; } } else if (expect14bit && records[i].lowValue != 0xFF && (args.frame - records[i].lastLowValueFrame) > min14bitInterval) { // give up waiting for a high value value = ((records[i].lastHighValue & 0x7F) << 7) + (records[i].lowValue & 0x7F); updateable = true; } if (updateable) { auto param = getParamQuantity(i); if (param) { param->setScaledValue((value * 1.0f) / ((expect14bit ? 0x3FFF : 0x7F) * 1.0f)); } records[i].highValue = 0xFF; records[i].lowValue = 0xFF; } } } void FaderbankModule::resetConfig() { for (int i = 0; i < NUM_FADERS; i++) { // by default, assign CC faders starting with 32, all on channel 1 records[i].ccNum = 32 + i; records[i].channel = 0; records[i].faderMode = FaderModeCC; } updateInputMap(); } void FaderbankModule::updateInputMap() { inputMap.clear(); for (int i = 0; i < NUM_FADERS; i++) { uint16_t key = (records[i].channel << 8) | records[i].ccNum; if (inputMap.find(key) == inputMap.end()) { inputMap.insert(make_pair(key, std::vector())); } inputMap[key].push_back(i); } } void FaderbankModule::updateFaderRanges() { for (int i = 0; i < NUM_FADERS; i++) { auto param = getParamQuantity(i); if (param != nullptr) { float orig = param->getValue(); switch (faderRange) { case FaderRange10V: { param->minValue = 0.0; param->maxValue = 10.0; } break; case FaderRange5V: { param->minValue = 0.0; param->maxValue = 5.0; } break; case FaderRangeBipolar: { param->minValue = -5.0; param->maxValue = 5.0; } break; default: break; } param->setValue(orig); } } } void FaderbankModule::autodetectConfig() { resetConfig(); midiInput.setDriverId(rack::midi::getDriverIds()[0]); if (midiInput.deviceId == -1) { for (int deviceId : midiInput.getDeviceIds()) { if (midiInput.getDeviceName(deviceId).substr(0, 3).find("16n") != std::string::npos) { midiInput.setDeviceId(deviceId); break; } } } midiOutput.setDriverId(rack::midi::getDriverIds()[0]); if (midiOutput.deviceId == -1) { for (int deviceId : midiOutput.getDeviceIds()) { if (midiOutput.getDeviceName(deviceId).find("16n") != std::string::npos) { midiOutput.setDeviceId(deviceId); break; } } } // Send a sysex message to request device channel/CC config. if (midiOutput.deviceId != -1) { rack::midi::Message msg; msg.setSize(6); msg.bytes = { 0xF0, 0x7d, 0x00, 0x00, 0x1F, 0xF7 }; midiOutput.sendMessage(msg); } } void FaderbankModule::writeConfigSysex() { if (midiOutput.deviceId != -1) { rack::midi::Message msg; msg.setSize(41); uint8_t header[] = { 0xF0, 0x7d, 0x00, 0x00, 0x0C }; for (int i = 0; i < 5; i++) { msg.bytes[i] = header[i]; } uint16_t modeBits = 0x0000; for (int i = 0; i < NUM_FADERS; i++) { msg.bytes[5 + i] = (records[i].channel + 1) & 0x1F; msg.bytes[21 + i] = records[i].ccNum & 0x7F; if (records[i].faderMode == FaderMode14bitCC) { modeBits |= (1 << i); } } msg.bytes[37] = modeBits & 0x7F; msg.bytes[38] = (modeBits >> 7) & 0x7F; msg.bytes[39] = (modeBits >> 14) & 0x03; msg.bytes[40] = 0xF7; midiOutput.sendMessage(msg); } } json_t* FaderbankModule::dataToJson() { json_t* rootJ = json_object(); json_object_set_new(rootJ, "faderRange", json_integer(faderRange)); json_object_set_new(rootJ, "faderSize", json_integer(faderSize)); json_object_set_new(rootJ, "polyphonicMode", json_boolean(polyphonicMode)); json_object_set_new(rootJ, "midi", midiInput.toJson()); json_object_set_new(rootJ, "midiOutput", midiOutput.toJson()); json_t* configJ = json_array(); for (auto& entry : records) { json_t* faderRecord = json_object(); json_object_set_new(faderRecord, "channel", json_integer(entry.channel)); json_object_set_new(faderRecord, "faderMode", json_integer(entry.faderMode)); json_object_set_new(faderRecord, "ccNum", json_integer(entry.ccNum)); json_array_append(configJ, faderRecord); } json_object_set_new(rootJ, "fader_config", configJ); return rootJ; } void FaderbankModule::dataFromJson(json_t* rootJ) { json_t* faderRangeJ = json_object_get(rootJ, "faderRange"); if (faderRangeJ) faderRange = static_cast(json_integer_value(faderRangeJ)); updateFaderRanges(); json_t* faderSizeJ = json_object_get(rootJ, "faderSize"); if (faderSizeJ) faderSize = static_cast(json_integer_value(faderSizeJ)); json_t* polyphonicModeJ = json_object_get(rootJ, "polyphonicMode"); if (polyphonicModeJ) polyphonicMode = json_boolean_value(polyphonicModeJ); json_t* midiJ = json_object_get(rootJ, "midi"); if (midiJ) midiInput.fromJson(midiJ); json_t* midiOutputJ = json_object_get(rootJ, "midiOutput"); if (midiOutputJ) midiOutput.fromJson(midiOutputJ); // backwards compatibility for patches with older config structure json_t* oldConfigJ = json_object_get(rootJ, "16n_config"); if (oldConfigJ) { json_t* dataJ; const char* key; json_object_foreach(oldConfigJ, key, dataJ) { int16_t val = std::stoi(key); int8_t fader = json_integer_value(dataJ); records[fader].ccNum = val & 0x7F; records[fader].channel = val >> 8; } } // current format for config json_t* configJ = json_object_get(rootJ, "fader_config"); if (configJ) { json_t* dataJ; size_t key; json_array_foreach(configJ, key, dataJ) { if (key < NUM_FADERS) { json_t* channelJ = json_object_get(dataJ, "channel"); if (channelJ) { records[key].channel = json_integer_value(channelJ) & 0xF; } json_t* modeJ = json_object_get(dataJ, "faderMode"); if (modeJ) { records[key].faderMode = static_cast(json_integer_value(modeJ)); } json_t* ccJ = json_object_get(dataJ, "ccNum"); if (ccJ) { records[key].ccNum = json_integer_value(ccJ) & 0x7F; } } } } updateInputMap(); } void FaderbankModule::fromJson(json_t* rootJ) { // deserialize data before params, so voltage range option is set correctly json_t* dataJ = json_object_get(rootJ, "data"); if (dataJ) dataFromJson(dataJ); Module::fromJson(rootJ); } FaderbankModule::ControllerRecord::ControllerRecord() { highValue = 0xFF; lowValue = 0xFF; lastHighValue = 0; channel = 0; ccNum = 0; faderMode = FaderModeCC; } ================================================ FILE: src/faderbank/FaderbankModule.hpp ================================================ #pragma once #include "rack.hpp" #include #define NUM_FADERS 16 struct FaderbankModule : rack::Module { FaderbankModule(); ~FaderbankModule(); void process(const ProcessArgs& args) override; void processMIDIMessages(const ProcessArgs& args); void resetConfig(); void updateInputMap(); void updateFaderRanges(); void autodetectConfig(); void writeConfigSysex(); json_t* dataToJson() override; void dataFromJson(json_t* rootJ) override; // override fromJson to deserialize data before params void fromJson(json_t* rootJ) override; std::map > inputMap; rack::midi::InputQueue midiInput; rack::midi::Output midiOutput; typedef enum { FaderSize90mm, FaderSize60mm } FaderSize; typedef enum { FaderRange10V, FaderRange5V, FaderRangeBipolar } FaderRange; typedef enum { FaderModeCC, FaderMode14bitCC } FaderMode; struct ControllerRecord { uint8_t highValue; uint8_t lowValue; uint8_t lastHighValue; int64_t lastHighValueFrame; int64_t lastLowValueFrame; uint8_t ccNum; uint8_t channel; FaderMode faderMode; ControllerRecord(); }; FaderSize faderSize = FaderSize90mm; FaderRange faderRange = FaderRange10V; bool polyphonicMode = false; ControllerRecord records[NUM_FADERS]; }; ================================================ FILE: src/faderbank/FaderbankWidget.cpp ================================================ #include "FaderbankWidget.hpp" #include "FaderbankModule.hpp" #include "CustomMenuTemplates.hpp" extern rack::Plugin* pluginInstance; using namespace rack; struct ThemedSvgSlider : app::SvgSlider { std::vector> lightThemedBackgrounds; std::vector> darkThemedBackgrounds; unsigned int *theme = 0; void updateGraphics() { int t = theme == nullptr ? 0 : *theme; SvgSlider::setBackgroundSvg( settings::preferDarkPanels ? darkThemedBackgrounds[t % darkThemedBackgrounds.size()] : lightThemedBackgrounds[t % lightThemedBackgrounds.size()] ); } void step() override { updateGraphics(); SvgSlider::step(); } }; struct FaderbankSlider : ThemedSvgSlider { FaderbankSlider() { lightThemedBackgrounds.push_back(Svg::load(asset::plugin(pluginInstance, "res/FaderBackground90mm.svg"))); lightThemedBackgrounds.push_back(Svg::load(asset::plugin(pluginInstance, "res/FaderBackground60mm.svg"))); darkThemedBackgrounds.push_back(Svg::load(asset::plugin(pluginInstance, "res/FaderBackground90mm-dark.svg"))); darkThemedBackgrounds.push_back(Svg::load(asset::plugin(pluginInstance, "res/FaderBackground60mm-dark.svg"))); setHandleSvg(Svg::load(asset::plugin(pluginInstance, "res/FaderHandle.svg"))); updateGraphics(); maxHandlePos = rack::window::mm2px(math::Vec(0.738, 1.8)); minHandlePos = rack::window::mm2px(math::Vec(0.738, 87.3)); box.grow(math::Vec(3, 1)); } void step() override { minHandlePos = rack::window::mm2px(math::Vec(0.738, (theme == nullptr || *theme == 0) ? 87.3 : 59.8)); ThemedSvgSlider::step(); } }; struct WideYellowLight : YellowLight { // custom draw function to make glow look better on a // rectangular light that is much wider than it is tall void drawHalo(const DrawArgs& args) override { if (args.fb) return; const float halo = settings::haloBrightness; if (halo == 0.f) return; if (color.r == 0.f && color.g == 0.f && color.b == 0.f) return; math::Vec c = box.size.div(2); float xoradius = c.x + std::min(c.x * 1.55f, 15.f); float yoradius = c.y + std::min(c.y * 1.85f, 15.f); nvgBeginPath(args.vg); nvgRect(args.vg, c.x - xoradius, c.y - yoradius, 2 * xoradius, 3 * yoradius); NVGcolor icol = color::mult(color, halo); NVGcolor ocol = nvgRGBA(0, 0, 0, 0); nvgSave(args.vg); nvgScale(args.vg, 1.0f, 1.85f * c.y / c.x); NVGpaint paint = nvgRadialGradient(args.vg, c.x, c.y, c.x * 0.46, xoradius * 0.8, icol, ocol); nvgFillPaint(args.vg, paint); nvgFill(args.vg); nvgRestore(args.vg); } }; template struct FaderbankSliderLight : RectangleLight> { FaderbankSliderLight() { this->setSvg(Svg::load(asset::plugin(pluginInstance, "res/FaderSliderLight.svg"))); } }; struct FaderbankSliderYellow : LightSlider> { FaderbankSliderYellow() { getLight()->box.size.x = getLight()->box.size.x * 6; getLight()->box.size.y = getLight()->box.size.y * 0.4; } }; FaderbankWidget::FaderbankWidget(FaderbankModule* module) { setModule(module); box.size = Vec(735, 380); { auto panel = new ThemedSvgPanel(); panel->setBackground( APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/grid.svg")), APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/grid-dark.svg"))); panel->box.size = box.size; addChild(panel); } // dummy opaque widget to prevent accidentally dragging the module when clicking between faders // TODO: increase hitboxes of faders instead auto dummy = new OpaqueWidget(); dummy->box.size = Vec(735 - 29, 300); dummy->setPosition(Vec(14.5, 60)); addChild(dummy); for (int i = 0; i < NUM_FADERS; i++) { addOutput(createOutput(Vec(17 + 45 * i, 20), module, i)); auto slider = createParam(Vec(14.5 + 45 * i, 60), module, i); if (module != nullptr) { slider->theme = (unsigned int*)&module->faderSize; } else { // set the handles on a diagonal in the library slider->handle->box.pos = slider->minHandlePos.crossfade(slider->maxHandlePos, i/(NUM_FADERS * 1.0)); } addParam(slider); } } void appendFaderConfigMenu(FaderbankModule* fb, ::Menu* menu, int faderIndex) { if (fb == nullptr || menu == nullptr || faderIndex < 0 || faderIndex > NUM_FADERS) { return; } std::vector modeNames { "CC", "CC (14-bit)" }; std::vector channelNames; for (auto i = 0; i < 16; i++) { std::ostringstream ss; ss << (i + 1); channelNames.push_back(ss.str()); } std::ostringstream faderName; faderName << faderIndex + 1; menu->addChild(createSubmenuItemWithDynamicRightText(faderName.str(), [=]() { FaderbankModule::ControllerRecord record = fb->records[faderIndex]; std::ostringstream faderDesc; faderDesc << "Ch " << (int)(record.channel + 1) << " " << modeNames[record.faderMode] << " "; if (record.faderMode == FaderbankModule::FaderModeCC) { faderDesc << (int)record.ccNum; } else if (record.faderMode == FaderbankModule::FaderMode14bitCC) { faderDesc << (int)record.ccNum << "/" << (int)(record.ccNum + 32); } return faderDesc.str(); }, [=](Menu* childMenu) { childMenu->addChild(createUnconsumingIndexSubmenuItem("Channel", channelNames, [=]() { return fb->records[faderIndex].channel; }, [=](int index) { fb->records[faderIndex].channel = index & 0xF; fb->updateInputMap(); } )); childMenu->addChild(createUnconsumingIndexSubmenuItem("Mode", modeNames, [=]() { return fb->records[faderIndex].faderMode; }, [=](int index) { fb->records[faderIndex].faderMode = static_cast(index); fb->updateInputMap(); } )); childMenu->addChild(createUnconsumingIndexSubmenuItemWithDynamicLabels("CC Number", [=]() { FaderbankModule::ControllerRecord record = fb->records[faderIndex]; uint8_t ccMax = record.faderMode == FaderbankModule::FaderMode14bitCC ? 31 : 127; std::vector ccNames; for (auto i = 0; i < ccMax + 1; i++) { std::ostringstream ss; ss << i; ccNames.push_back(ss.str()); } return ccNames; }, [=]() { return fb->records[faderIndex].ccNum; }, [=](int index) { fb->records[faderIndex].ccNum = index & 0x7F; fb->updateInputMap(); } )); } )); } void FaderbankWidget::appendContextMenu(Menu* menu) { auto fb = dynamic_cast(module); if (!fb) { return; } menu->addChild(new MenuSeparator()); menu->addChild(createUnconsumingIndexSubmenuItem("Fader voltage range", { "0-10V", "0-5V", "+/-5V" }, [=]() { return fb->faderRange; }, [=](int index) { fb->faderRange = static_cast(index); fb->updateFaderRanges(); // update all the slider handle positions for (widget::Widget* child : children) { child->step(); ChangeEvent eChange; child->onChange(eChange); } })); menu->addChild(createUnconsumingIndexSubmenuItem("Fader size", { "90mm", "60mm" }, [=]() { return fb->faderSize; }, [=](int index) { fb->faderSize = static_cast(index); // update all the slider handle positions for (widget::Widget* child : children) { child->step(); ChangeEvent eChange; child->onChange(eChange); } } )); menu->addChild(createCheckMenuItem( "Polyphonic mode", "", [=]() { return fb->polyphonicMode; }, [=]() { fb->polyphonicMode = !fb->polyphonicMode; })); menu->addChild(new MenuSeparator()); menu->addChild(createMenuItem("Autodetect 16n hardware", "", [=]() { fb->autodetectConfig(); })); menu->addChild(createSubmenuItem("MIDI Configuration", "", [=](Menu* configMenu) { configMenu->addChild(createSubmenuItem("Input device", fb->midiInput.getDeviceName(fb->midiInput.getDeviceId()), [=](Menu* childMenu) { appendMidiMenu(childMenu, &fb->midiInput); // remove channel selection auto last = childMenu->children.back(); childMenu->removeChild(last); delete last; // and separator last = childMenu->children.back(); childMenu->removeChild(last); delete last; })); configMenu->addChild(createSubmenuItem("Output device", fb->midiOutput.getDeviceName(fb->midiOutput.getDeviceId()), [=](Menu* childMenu) { appendMidiMenu(childMenu, &fb->midiOutput); // remove channel selection auto last = childMenu->children.back(); childMenu->removeChild(last); delete last; // and separator last = childMenu->children.back(); childMenu->removeChild(last); delete last; })); configMenu->addChild(createSubmenuItem("Fader settings", "", [=](Menu* childMenu) { for (int i = 0; i < NUM_FADERS; i++) { appendFaderConfigMenu(fb, childMenu, i); } })); configMenu->addChild(new MenuSeparator()); configMenu->addChild(createMenuItem("Write configuration to 16n hardware", "", [=]() { fb->writeConfigSysex(); } )); } )); } ================================================ FILE: src/faderbank/FaderbankWidget.hpp ================================================ #include "rack.hpp" #pragma once struct FaderbankModule; struct FaderbankWidget : rack::app::ModuleWidget { FaderbankWidget(FaderbankModule* module); void appendContextMenu(rack::ui::Menu* menu) override; }; ================================================ FILE: src/meadowphysics/MeadowphysicsModule.hpp ================================================ #include "Clock12BitParam.hpp" #include "LibAVR32Module.hpp" #pragma once struct MeadowphysicsModule : LibAVR32Module { enum ParamIds { CLOCK_PARAM, BUTTON_PARAM, USB_PARAM, NUM_PARAMS }; enum InputIds { CLOCK_INPUT, NUM_INPUTS }; enum OutputIds { CLOCK_OUTPUT, TR1_OUTPUT, TR2_OUTPUT, TR3_OUTPUT, TR4_OUTPUT, TR5_OUTPUT, TR6_OUTPUT, TR7_OUTPUT, TR8_OUTPUT, NUM_OUTPUTS }; enum LightIds { CLOCK_LIGHT, TR1_LIGHT, TR2_LIGHT, TR3_LIGHT, TR4_LIGHT, TR5_LIGHT, TR6_LIGHT, TR7_LIGHT, TR8_LIGHT, NUM_LIGHTS }; rack::dsp::SchmittTrigger clockTrigger; MeadowphysicsModule() : LibAVR32Module("meadowphysics", "meadowphysics") { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); configButton(BUTTON_PARAM, "PRESET"); configParam>(CLOCK_PARAM, 0.0, 10.0, 5.0, "CLOCK", "ms"); configInput(CLOCK_INPUT, "CLOCK"); configOutput(CLOCK_OUTPUT, "CLOCK"); configOutput(TR1_OUTPUT, "TR 1"); configOutput(TR2_OUTPUT, "TR 2"); configOutput(TR3_OUTPUT, "TR 3"); configOutput(TR4_OUTPUT, "TR 4"); configOutput(TR5_OUTPUT, "TR 5"); configOutput(TR6_OUTPUT, "TR 6"); configOutput(TR7_OUTPUT, "TR 7"); configOutput(TR8_OUTPUT, "TR 8"); configButton(USB_PARAM, "USB Device Port"); setDeviceConnectionParam(USB_PARAM); } void processInputs(const ProcessArgs& args) override { // Convert clock input jack to GPIO signals for normal connection and value bool clockNormal = !inputs[CLOCK_INPUT].isConnected(); if (clockNormal != firmware.getGPIO(B09)) { firmware.setGPIO(B09, clockNormal); firmware.triggerInterrupt(1); } clockTrigger.process(inputs[CLOCK_INPUT].getVoltage(), triggerLowThreshold, triggerHighThreshold); bool externalClock = clockTrigger.isHigh(); if (externalClock != firmware.getGPIO(B08)) { firmware.setGPIO(B08, externalClock); firmware.triggerInterrupt(2); } bool frontButton = params[BUTTON_PARAM].getValue() == 0; if (frontButton != firmware.getGPIO(NMI)) { firmware.setGPIO(NMI, frontButton); firmware.triggerInterrupt(3); } // Convert knob float parameters to 12-bit ADC values firmware.setADC(0, voltsToAdc(params[CLOCK_PARAM].getValue())); } void processOutputs(const ProcessArgs& args) override { // Update lights from GPIO lights[CLOCK_LIGHT].setSmoothBrightness(firmware.getGPIO(B10), args.sampleTime); lights[TR1_LIGHT].setSmoothBrightness(firmware.getGPIO(B00), args.sampleTime); lights[TR2_LIGHT].setSmoothBrightness(firmware.getGPIO(B01), args.sampleTime); lights[TR3_LIGHT].setSmoothBrightness(firmware.getGPIO(B02), args.sampleTime); lights[TR4_LIGHT].setSmoothBrightness(firmware.getGPIO(B03), args.sampleTime); lights[TR5_LIGHT].setSmoothBrightness(firmware.getGPIO(B04), args.sampleTime); lights[TR6_LIGHT].setSmoothBrightness(firmware.getGPIO(B05), args.sampleTime); lights[TR7_LIGHT].setSmoothBrightness(firmware.getGPIO(B06), args.sampleTime); lights[TR8_LIGHT].setSmoothBrightness(firmware.getGPIO(B07), args.sampleTime); // Update output jacks from GPIO outputs[CLOCK_OUTPUT].setVoltage(firmware.getGPIO(B10) * 8.0); outputs[TR1_OUTPUT].setVoltage(firmware.getGPIO(B00) * 8.0); outputs[TR2_OUTPUT].setVoltage(firmware.getGPIO(B01) * 8.0); outputs[TR3_OUTPUT].setVoltage(firmware.getGPIO(B02) * 8.0); outputs[TR4_OUTPUT].setVoltage(firmware.getGPIO(B03) * 8.0); outputs[TR5_OUTPUT].setVoltage(firmware.getGPIO(B04) * 8.0); outputs[TR6_OUTPUT].setVoltage(firmware.getGPIO(B05) * 8.0); outputs[TR7_OUTPUT].setVoltage(firmware.getGPIO(B06) * 8.0); outputs[TR8_OUTPUT].setVoltage(firmware.getGPIO(B07) * 8.0); } }; ================================================ FILE: src/meadowphysics/MeadowphysicsWidget.hpp ================================================ #pragma once #include "LibAVR32ModuleWidget.hpp" #include "SifamTPM.hpp" #include "USBAJack.hpp" using namespace rack; struct MeadowphysicsWidget : LibAVR32ModuleWidget { MeadowphysicsWidget(MeadowphysicsModule* module) { setModule(module); box.size = Vec(15 * 6, 380); { auto panel = new ThemedSvgPanel(); panel->setBackground( APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/meadowphysics.svg")), APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/meadowphysics-dark.svg"))); panel->box.size = box.size; addChild(panel); } // Screws positioned for sliding nuts :) addChild(createWidget(Vec(RACK_GRID_WIDTH / 2, 0))); addChild(createWidget(Vec(RACK_GRID_WIDTH / 2, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addParam(createParam(Vec(7, 333), module, MeadowphysicsModule::USB_PARAM)); addParam(createParam(Vec(62, 336), module, MeadowphysicsModule::BUTTON_PARAM)); addParam(createParam(Vec(12, 232), module, MeadowphysicsModule::CLOCK_PARAM)); addOutput(createOutput(Vec(15, 54), module, MeadowphysicsModule::TR1_OUTPUT)); addOutput(createOutput(Vec(50, 75), module, MeadowphysicsModule::TR2_OUTPUT)); addOutput(createOutput(Vec(15, 92), module, MeadowphysicsModule::TR3_OUTPUT)); addOutput(createOutput(Vec(50, 113), module, MeadowphysicsModule::TR4_OUTPUT)); addOutput(createOutput(Vec(15, 130), module, MeadowphysicsModule::TR5_OUTPUT)); addOutput(createOutput(Vec(50, 151), module, MeadowphysicsModule::TR6_OUTPUT)); addOutput(createOutput(Vec(15, 168), module, MeadowphysicsModule::TR7_OUTPUT)); addOutput(createOutput(Vec(50, 189), module, MeadowphysicsModule::TR8_OUTPUT)); addInput(createInput(Vec(15, 286), module, MeadowphysicsModule::CLOCK_INPUT)); addOutput(createOutput(Vec(50, 286), module, MeadowphysicsModule::CLOCK_OUTPUT)); addChild(createLight>(Vec(3, 71), module, MeadowphysicsModule::TR1_LIGHT)); addChild(createLight>(Vec(77, 71), module, MeadowphysicsModule::TR2_LIGHT)); addChild(createLight>(Vec(3, 109), module, MeadowphysicsModule::TR3_LIGHT)); addChild(createLight>(Vec(77, 109), module, MeadowphysicsModule::TR4_LIGHT)); addChild(createLight>(Vec(3, 147), module, MeadowphysicsModule::TR5_LIGHT)); addChild(createLight>(Vec(77, 147), module, MeadowphysicsModule::TR6_LIGHT)); addChild(createLight>(Vec(3, 185), module, MeadowphysicsModule::TR7_LIGHT)); addChild(createLight>(Vec(77, 185), module, MeadowphysicsModule::TR8_LIGHT)); addChild(createLight>(Vec(77, 282), module, MeadowphysicsModule::CLOCK_LIGHT)); } }; ================================================ FILE: src/plugin.cpp ================================================ #include "AnsibleModule.hpp" #include "AnsibleWidget.hpp" #include "EarthseaModule.hpp" #include "EarthseaWidget.hpp" #include "FaderbankModule.hpp" #include "FaderbankWidget.hpp" #include "MeadowphysicsModule.hpp" #include "MeadowphysicsWidget.hpp" #include "SerialOscInterface.hpp" #include "TeletypeModule.hpp" #include "TeletypeWidget.hpp" #include "VirtualGridModule.hpp" #include "VirtualGridWidget.hpp" #include "WhiteWhaleModule.hpp" #include "WhiteWhaleWidget.hpp" #include "TeletypeKeyboard.hpp" using namespace rack; Plugin* pluginInstance; Model* modelFaderbank; void init(Plugin* p) { pluginInstance = p; Model* modelWhiteWhale = createModel("whitewhale"); Model* modelMeadowphysics = createModel("meadowphysics"); Model* modelEarthsea = createModel("earthsea"); Model* modelTeletype = createModel("teletype"); Model* modelAnsible = createModel("ansible"); Model* modelGrid128 = createModel, VirtualGridWidgetTemplate<16, 8>>("grid128"); Model* modelGrid64 = createModel, VirtualGridWidgetTemplate<8, 8>>("grid64"); Model* modelGrid256 = createModel, VirtualGridWidgetTemplate<16, 16>>("grid256"); modelFaderbank = createModel("faderbank"); p->addModel(modelWhiteWhale); p->addModel(modelMeadowphysics); p->addModel(modelEarthsea); p->addModel(modelTeletype); p->addModel(modelAnsible); p->addModel(modelGrid128); p->addModel(modelGrid64); p->addModel(modelGrid256); p->addModel(modelFaderbank); initThemes(); } json_t* settingsToJson() { json_t* rootJ = json_object(); json_object_set_new(rootJ, "keyboardLayout", json_string(TeletypeKeyboard::getCurrentLayout().c_str())); return rootJ; } void settingsFromJson(json_t* rootJ) { json_t* themeJ = json_object_get(rootJ, "keyboardLayout"); if (themeJ) TeletypeKeyboard::setCurrentLayout(json_string_value(themeJ)); } ================================================ FILE: src/teletype/TeletypeKeyboard.cpp ================================================ #include "TeletypeKeyboard.hpp" #include "osdialog.h" #include using namespace rack; extern rack::Plugin* pluginInstance; TeletypeKeyboard::KeycodeMap TeletypeKeyboard::keycodeMap; bool TeletypeKeyboard::initialized = false; std::string TeletypeKeyboard::currentLayout = "us-qwerty"; void TeletypeKeyboard::init() { if (!initialized) { loadMap(); initialized = true; } } void TeletypeKeyboard::setCurrentLayout(std::string layoutName) { if (currentLayout != layoutName) { currentLayout = layoutName; initialized = false; } } const std::string& TeletypeKeyboard::getCurrentLayout() { return currentLayout; } void TeletypeKeyboard::loadMap() { auto path = rack::asset::plugin(pluginInstance, "res/keymaps/" + currentLayout + ".json"); FILE* file = std::fopen(path.c_str(), "r"); if (!file) return; DEFER({ std::fclose(file); }); json_error_t error; json_t* rootJ = json_loadf(file, 0, &error); if (!rootJ) { std::string message = rack::string::f( "Teletype keymap file %s has invalid JSON at line %d, column %d.\n\nError text: %s", path.c_str(), error.line, error.column, error.text ); osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK, message.c_str()); return; } DEFER({ json_decref(rootJ); }); keycodeMap.clear(); json_t* mapArrayJ = json_object_get(rootJ, "keymap"); if (mapArrayJ) { size_t i; json_t* mapEntryJ; json_array_foreach(mapArrayJ, i, mapEntryJ) { json_t* inputJ = json_object_get(mapEntryJ, "input"); json_t* outputJ = json_object_get(mapEntryJ, "output"); if (inputJ && outputJ) { int inputCode = stringToGLFWCode(std::string(json_string_value(inputJ))); uint8_t outputCode = stringToHIDCode(std::string(json_string_value(outputJ))); if (inputCode != GLFW_KEY_UNKNOWN && outputCode != 0) { int inputMod = 0; uint8_t outputMod = 0; json_t* inputShift = json_object_get(mapEntryJ, "input_shift"); json_t* outputShift = json_object_get(mapEntryJ, "output_shift"); if (inputShift && json_boolean_value(inputShift)) { inputMod |= GLFW_MOD_SHIFT; } if (outputShift && json_boolean_value(outputShift)) { outputMod |= 0x02; } keycodeMap.insert(std::make_pair(std::make_pair(inputCode, inputMod), std::make_pair(outputCode, outputMod))); } } } } } bool TeletypeKeyboard::process(const rack::event::SelectKey& e, uint8_t* pKey, uint8_t* pMod) { init(); uint8_t key = 0; uint8_t mod = 0; bool found = false; bool shiftConsumed = false; // Look for a mapping with shift explicitly set if (e.mods & GLFW_MOD_SHIFT) { auto result = keycodeMap.find(std::make_pair(e.key, GLFW_MOD_SHIFT)); if (result != keycodeMap.end()) { key = result->second.first; mod = result->second.second; found = true; shiftConsumed = true; } } // Look for a mapping of the keycode with no modifiers if (!found) { auto result = keycodeMap.find(std::make_pair(e.key, 0)); if (result != keycodeMap.end()) { key = result->second.first; mod = result->second.second; found = true; } } if (e.mods & GLFW_MOD_CONTROL) { mod |= 0x1; } if ((e.mods & GLFW_MOD_SHIFT) && !shiftConsumed) { mod |= 0x2; } if (e.mods & GLFW_MOD_ALT) { mod |= 0x4; } if (e.mods & GLFW_MOD_SUPER) { mod |= 0x8; } if (found) { if (pKey) { *pKey = key; } if (pMod) { *pMod = mod; } } return found; } int TeletypeKeyboard::stringToGLFWCode(std::string s) { // Defines from glfw3.h if (s == "GLFW_KEY_UNKNOWN") return GLFW_KEY_UNKNOWN; else if (s == "GLFW_KEY_SPACE") return GLFW_KEY_SPACE; else if (s == "GLFW_KEY_APOSTROPHE") return GLFW_KEY_APOSTROPHE; else if (s == "GLFW_KEY_COMMA") return GLFW_KEY_COMMA; else if (s == "GLFW_KEY_MINUS") return GLFW_KEY_MINUS; else if (s == "GLFW_KEY_PERIOD") return GLFW_KEY_PERIOD; else if (s == "GLFW_KEY_SLASH") return GLFW_KEY_SLASH; else if (s == "GLFW_KEY_0") return GLFW_KEY_0; else if (s == "GLFW_KEY_1") return GLFW_KEY_1; else if (s == "GLFW_KEY_2") return GLFW_KEY_2; else if (s == "GLFW_KEY_3") return GLFW_KEY_3; else if (s == "GLFW_KEY_4") return GLFW_KEY_4; else if (s == "GLFW_KEY_5") return GLFW_KEY_5; else if (s == "GLFW_KEY_6") return GLFW_KEY_6; else if (s == "GLFW_KEY_7") return GLFW_KEY_7; else if (s == "GLFW_KEY_8") return GLFW_KEY_8; else if (s == "GLFW_KEY_9") return GLFW_KEY_9; else if (s == "GLFW_KEY_SEMICOLON") return GLFW_KEY_SEMICOLON; else if (s == "GLFW_KEY_EQUAL") return GLFW_KEY_EQUAL; else if (s == "GLFW_KEY_A") return GLFW_KEY_A; else if (s == "GLFW_KEY_B") return GLFW_KEY_B; else if (s == "GLFW_KEY_C") return GLFW_KEY_C; else if (s == "GLFW_KEY_D") return GLFW_KEY_D; else if (s == "GLFW_KEY_E") return GLFW_KEY_E; else if (s == "GLFW_KEY_F") return GLFW_KEY_F; else if (s == "GLFW_KEY_G") return GLFW_KEY_G; else if (s == "GLFW_KEY_H") return GLFW_KEY_H; else if (s == "GLFW_KEY_I") return GLFW_KEY_I; else if (s == "GLFW_KEY_J") return GLFW_KEY_J; else if (s == "GLFW_KEY_K") return GLFW_KEY_K; else if (s == "GLFW_KEY_L") return GLFW_KEY_L; else if (s == "GLFW_KEY_M") return GLFW_KEY_M; else if (s == "GLFW_KEY_N") return GLFW_KEY_N; else if (s == "GLFW_KEY_O") return GLFW_KEY_O; else if (s == "GLFW_KEY_P") return GLFW_KEY_P; else if (s == "GLFW_KEY_Q") return GLFW_KEY_Q; else if (s == "GLFW_KEY_R") return GLFW_KEY_R; else if (s == "GLFW_KEY_S") return GLFW_KEY_S; else if (s == "GLFW_KEY_T") return GLFW_KEY_T; else if (s == "GLFW_KEY_U") return GLFW_KEY_U; else if (s == "GLFW_KEY_V") return GLFW_KEY_V; else if (s == "GLFW_KEY_W") return GLFW_KEY_W; else if (s == "GLFW_KEY_X") return GLFW_KEY_X; else if (s == "GLFW_KEY_Y") return GLFW_KEY_Y; else if (s == "GLFW_KEY_Z") return GLFW_KEY_Z; else if (s == "GLFW_KEY_LEFT_BRACKET") return GLFW_KEY_LEFT_BRACKET; else if (s == "GLFW_KEY_BACKSLASH") return GLFW_KEY_BACKSLASH; else if (s == "GLFW_KEY_RIGHT_BRACKET") return GLFW_KEY_RIGHT_BRACKET; else if (s == "GLFW_KEY_GRAVE_ACCENT") return GLFW_KEY_GRAVE_ACCENT; else if (s == "GLFW_KEY_WORLD_1") return GLFW_KEY_WORLD_1; else if (s == "GLFW_KEY_WORLD_2") return GLFW_KEY_WORLD_2; else if (s == "GLFW_KEY_ESCAPE") return GLFW_KEY_ESCAPE; else if (s == "GLFW_KEY_ENTER") return GLFW_KEY_ENTER; else if (s == "GLFW_KEY_TAB") return GLFW_KEY_TAB; else if (s == "GLFW_KEY_BACKSPACE") return GLFW_KEY_BACKSPACE; else if (s == "GLFW_KEY_INSERT") return GLFW_KEY_INSERT; else if (s == "GLFW_KEY_DELETE") return GLFW_KEY_DELETE; else if (s == "GLFW_KEY_RIGHT") return GLFW_KEY_RIGHT; else if (s == "GLFW_KEY_LEFT") return GLFW_KEY_LEFT; else if (s == "GLFW_KEY_DOWN") return GLFW_KEY_DOWN; else if (s == "GLFW_KEY_UP") return GLFW_KEY_UP; else if (s == "GLFW_KEY_PAGE_UP") return GLFW_KEY_PAGE_UP; else if (s == "GLFW_KEY_PAGE_DOWN") return GLFW_KEY_PAGE_DOWN; else if (s == "GLFW_KEY_HOME") return GLFW_KEY_HOME; else if (s == "GLFW_KEY_END") return GLFW_KEY_END; else if (s == "GLFW_KEY_CAPS_LOCK") return GLFW_KEY_CAPS_LOCK; else if (s == "GLFW_KEY_SCROLL_LOCK") return GLFW_KEY_SCROLL_LOCK; else if (s == "GLFW_KEY_NUM_LOCK") return GLFW_KEY_NUM_LOCK; else if (s == "GLFW_KEY_PRINT_SCREEN") return GLFW_KEY_PRINT_SCREEN; else if (s == "GLFW_KEY_PAUSE") return GLFW_KEY_PAUSE; else if (s == "GLFW_KEY_F1") return GLFW_KEY_F1; else if (s == "GLFW_KEY_F2") return GLFW_KEY_F2; else if (s == "GLFW_KEY_F3") return GLFW_KEY_F3; else if (s == "GLFW_KEY_F4") return GLFW_KEY_F4; else if (s == "GLFW_KEY_F5") return GLFW_KEY_F5; else if (s == "GLFW_KEY_F6") return GLFW_KEY_F6; else if (s == "GLFW_KEY_F7") return GLFW_KEY_F7; else if (s == "GLFW_KEY_F8") return GLFW_KEY_F8; else if (s == "GLFW_KEY_F9") return GLFW_KEY_F9; else if (s == "GLFW_KEY_F10") return GLFW_KEY_F10; else if (s == "GLFW_KEY_F11") return GLFW_KEY_F11; else if (s == "GLFW_KEY_F12") return GLFW_KEY_F12; else if (s == "GLFW_KEY_F13") return GLFW_KEY_F13; else if (s == "GLFW_KEY_F14") return GLFW_KEY_F14; else if (s == "GLFW_KEY_F15") return GLFW_KEY_F15; else if (s == "GLFW_KEY_F16") return GLFW_KEY_F16; else if (s == "GLFW_KEY_F17") return GLFW_KEY_F17; else if (s == "GLFW_KEY_F18") return GLFW_KEY_F18; else if (s == "GLFW_KEY_F19") return GLFW_KEY_F19; else if (s == "GLFW_KEY_F20") return GLFW_KEY_F20; else if (s == "GLFW_KEY_F21") return GLFW_KEY_F21; else if (s == "GLFW_KEY_F22") return GLFW_KEY_F22; else if (s == "GLFW_KEY_F23") return GLFW_KEY_F23; else if (s == "GLFW_KEY_F24") return GLFW_KEY_F24; else if (s == "GLFW_KEY_F25") return GLFW_KEY_F25; else if (s == "GLFW_KEY_KP_0") return GLFW_KEY_KP_0; else if (s == "GLFW_KEY_KP_1") return GLFW_KEY_KP_1; else if (s == "GLFW_KEY_KP_2") return GLFW_KEY_KP_2; else if (s == "GLFW_KEY_KP_3") return GLFW_KEY_KP_3; else if (s == "GLFW_KEY_KP_4") return GLFW_KEY_KP_4; else if (s == "GLFW_KEY_KP_5") return GLFW_KEY_KP_5; else if (s == "GLFW_KEY_KP_6") return GLFW_KEY_KP_6; else if (s == "GLFW_KEY_KP_7") return GLFW_KEY_KP_7; else if (s == "GLFW_KEY_KP_8") return GLFW_KEY_KP_8; else if (s == "GLFW_KEY_KP_9") return GLFW_KEY_KP_9; else if (s == "GLFW_KEY_KP_DECIMAL") return GLFW_KEY_KP_DECIMAL; else if (s == "GLFW_KEY_KP_DIVIDE") return GLFW_KEY_KP_DIVIDE; else if (s == "GLFW_KEY_KP_MULTIPLY") return GLFW_KEY_KP_MULTIPLY; else if (s == "GLFW_KEY_KP_SUBTRACT") return GLFW_KEY_KP_SUBTRACT; else if (s == "GLFW_KEY_KP_ADD") return GLFW_KEY_KP_ADD; else if (s == "GLFW_KEY_KP_ENTER") return GLFW_KEY_KP_ENTER; else if (s == "GLFW_KEY_KP_EQUAL") return GLFW_KEY_KP_EQUAL; return GLFW_KEY_UNKNOWN; } uint8_t TeletypeKeyboard::stringToHIDCode(std::string s) { // HID #defines from Atmel ASF usb_protocol_hid.h if (s == "HID_A") return 0x04; else if (s == "HID_B") return 0x05; else if (s == "HID_C") return 0x06; else if (s == "HID_D") return 0x07; else if (s == "HID_E") return 0x08; else if (s == "HID_F") return 0x09; else if (s == "HID_G") return 0x0A; else if (s == "HID_H") return 0x0B; else if (s == "HID_I") return 0x0C; else if (s == "HID_J") return 0x0D; else if (s == "HID_K") return 0x0E; else if (s == "HID_L") return 0x0F; else if (s == "HID_M") return 0x10; else if (s == "HID_N") return 0x11; else if (s == "HID_O") return 0x12; else if (s == "HID_P") return 0x13; else if (s == "HID_Q") return 0x14; else if (s == "HID_R") return 0x15; else if (s == "HID_S") return 0x16; else if (s == "HID_T") return 0x17; else if (s == "HID_U") return 0x18; else if (s == "HID_V") return 0x19; else if (s == "HID_W") return 0x1A; else if (s == "HID_X") return 0x1B; else if (s == "HID_Y") return 0x1C; else if (s == "HID_Z") return 0x1D; else if (s == "HID_1") return 30; else if (s == "HID_2") return 31; else if (s == "HID_3") return 32; else if (s == "HID_4") return 33; else if (s == "HID_5") return 34; else if (s == "HID_6") return 35; else if (s == "HID_7") return 36; else if (s == "HID_8") return 37; else if (s == "HID_9") return 38; else if (s == "HID_0") return 39; else if (s == "HID_ENTER") return 40; else if (s == "HID_ESCAPE") return 41; else if (s == "HID_BACKSPACE") return 42; else if (s == "HID_TAB") return 43; else if (s == "HID_SPACEBAR") return 44; else if (s == "HID_UNDERSCORE") return 45; else if (s == "HID_PLUS") return 46; else if (s == "HID_OPEN_BRACKET") return 47; else if (s == "HID_CLOSE_BRACKET") return 48; else if (s == "HID_BACKSLASH") return 49; else if (s == "HID_ASH") return 50; else if (s == "HID_COLON") return 51; else if (s == "HID_QUOTE") return 52; else if (s == "HID_TILDE") return 53; else if (s == "HID_COMMA") return 54; else if (s == "HID_DOT") return 55; else if (s == "HID_SLASH") return 56; else if (s == "HID_CAPS_LOCK") return 57; else if (s == "HID_F1") return 58; else if (s == "HID_F2") return 59; else if (s == "HID_F3") return 60; else if (s == "HID_F4") return 61; else if (s == "HID_F5") return 62; else if (s == "HID_F6") return 63; else if (s == "HID_F7") return 64; else if (s == "HID_F8") return 65; else if (s == "HID_F9") return 66; else if (s == "HID_F10") return 67; else if (s == "HID_F11") return 68; else if (s == "HID_F12") return 69; else if (s == "HID_PRINTSCREEN") return 70; else if (s == "HID_SCROLL_LOCK") return 71; else if (s == "HID_PAUSE") return 72; else if (s == "HID_INSERT") return 73; else if (s == "HID_HOME") return 74; else if (s == "HID_PAGEUP") return 75; else if (s == "HID_DELETE") return 76; else if (s == "HID_END") return 77; else if (s == "HID_PAGEDOWN") return 78; else if (s == "HID_RIGHT") return 79; else if (s == "HID_LEFT") return 80; else if (s == "HID_DOWN") return 81; else if (s == "HID_UP") return 82; else if (s == "HID_KEYPAD_NUM_LOCK") return 83; else if (s == "HID_KEYPAD_DIVIDE") return 84; else if (s == "HID_KEYPAD_AT") return 85; else if (s == "HID_KEYPAD_MULTIPLY") return 85; else if (s == "HID_KEYPAD_MINUS") return 86; else if (s == "HID_KEYPAD_PLUS") return 87; else if (s == "HID_KEYPAD_ENTER") return 88; else if (s == "HID_KEYPAD_1") return 89; else if (s == "HID_KEYPAD_2") return 90; else if (s == "HID_KEYPAD_3") return 91; else if (s == "HID_KEYPAD_4") return 92; else if (s == "HID_KEYPAD_5") return 93; else if (s == "HID_KEYPAD_6") return 94; else if (s == "HID_KEYPAD_7") return 95; else if (s == "HID_KEYPAD_8") return 96; else if (s == "HID_KEYPAD_9") return 97; else if (s == "HID_KEYPAD_0") return 98; else if (s == "HID_KEYPAD_DECIMAL") // not in usb_protocol_hid.h or used in TT code, but previously supported return 99; return 0; } ================================================ FILE: src/teletype/TeletypeKeyboard.hpp ================================================ #pragma once #include "rack.hpp" #include struct TeletypeKeyboard { static void init(); static void setCurrentLayout(std::string layoutName); static const std::string& getCurrentLayout(); static bool process(const rack::event::SelectKey& e, uint8_t* pkey, uint8_t* pmod); static int stringToGLFWCode(std::string s); static uint8_t stringToHIDCode(std::string s); protected: static void loadMap(); typedef std::map, std::pair> KeycodeMap; static KeycodeMap keycodeMap; static bool initialized; static std::string currentLayout; }; ================================================ FILE: src/teletype/TeletypeModule.cpp ================================================ #include "TeletypeModule.hpp" #include "scene/TeletypeSceneIO.hpp" #include "screen/EngineStoppedScreen.hpp" #include #define TO_Q15(x) ((x) << 15) #define FROM_Q15(x) ((((x) >> 14) + 1) >> 1) struct TTParamQuantity : rack::engine::ParamQuantity { std::string getDisplayValueString() override { float v = getDisplayValue(); if (std::isnan(v)) return "NaN"; // Calculate the same value that the TT firmware will calculate from this voltage. // 0-10V 12-bit ADC, shifted left 2 bits (to 0-16380), then scaled to 0-16383 in Q15 fixed-point uint16_t rawval = ((uint16_t)(v * 0.1f * 4095.0f) & 0xFFF) << 2; return rack::string::f("%d", FROM_Q15(TO_Q15(16383) / 16380 * rawval)); } void setDisplayValue(float dv) override { // Reverse the above calc to set the float voltage that the ADC will turn into the given value uint16_t val = rack::math::clamp((int)floor(dv), 0, 16383); uint16_t rawval = FROM_Q15(TO_Q15(16380) / 16383 * val); // Add the same 12-bit sampling error correction offset here setImmediateValue(rawval * (10.0 / 16380.0) + 0.0007); } }; TeletypeModule::TeletypeModule() : LibAVR32Module("teletype", "teletype5") , iiBus(this) , screenBuffer{} { // initialize screen with "engine stopped" message memcpy(screenBuffer, engineStoppedScreen, 128 * 40 * sizeof(uint8_t)); firmware.setScreenBuffer(getScreenBuffer()); config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); configParam(PARAM_PARAM, 0.0, 10.0, 5.0, "PARAM", ""); configButton(BUTTON_PARAM, "SCENE"); configInput(IN_INPUT, "IN"); configInput(TRIG1_INPUT, "TRIGGER 1"); configInput(TRIG2_INPUT, "TRIGGER 2"); configInput(TRIG3_INPUT, "TRIGGER 3"); configInput(TRIG4_INPUT, "TRIGGER 4"); configInput(TRIG5_INPUT, "TRIGGER 5"); configInput(TRIG6_INPUT, "TRIGGER 6"); configInput(TRIG7_INPUT, "TRIGGER 7"); configInput(TRIG8_INPUT, "TRIGGER 8"); configOutput(TR1_OUTPUT, "TR 1"); configOutput(TR2_OUTPUT, "TR 2"); configOutput(TR3_OUTPUT, "TR 3"); configOutput(TR4_OUTPUT, "TR 4"); configOutput(CV1_OUTPUT, "CV 1"); configOutput(CV2_OUTPUT, "CV 2"); configOutput(CV3_OUTPUT, "CV 3"); configOutput(CV4_OUTPUT, "CV 4"); configButton(USB_PARAM, "USB Device Port"); setDeviceConnectionParam(USB_PARAM); } void TeletypeModule::processInputs(const ProcessArgs& args) { bool frontButton = params[BUTTON_PARAM].getValue() == 0; if (frontButton != firmware.getGPIO(NMI)) { firmware.setGPIO(NMI, frontButton); firmware.triggerInterrupt(3); } // Convert knob float parameters to 12-bit ADC values firmware.setADC(1, voltsToAdc(params[PARAM_PARAM].getValue())); firmware.setADC(0, voltsToAdc(inputs[IN_INPUT].getVoltage())); for (int i = 0; i < 8; i++) { inputTriggers[i].process( inputs[TRIG1_INPUT + i].getVoltage(), triggerLowThreshold, triggerHighThreshold); firmware.setGPIO(A00 + i, inputTriggers[i].isHigh()); } // process II follower-to-leader input // no support for leader-to-follower commands right now iiBus.step(); } void TeletypeModule::processOutputs(const ProcessArgs& args) { float cv1 = dacToVolts(firmware.getDAC(2)); float cv2 = dacToVolts(firmware.getDAC(3)); float cv3 = dacToVolts(firmware.getDAC(0)); float cv4 = dacToVolts(firmware.getDAC(1)); bool tr1 = firmware.getGPIO(B08); bool tr2 = firmware.getGPIO(B09); bool tr3 = firmware.getGPIO(B10); bool tr4 = firmware.getGPIO(B11); // Update lights lights[TR1_LIGHT].setSmoothBrightness(tr1, args.sampleTime); lights[TR2_LIGHT].setSmoothBrightness(tr2, args.sampleTime); lights[TR3_LIGHT].setSmoothBrightness(tr3, args.sampleTime); lights[TR4_LIGHT].setSmoothBrightness(tr4, args.sampleTime); lights[CV1_LIGHT].setSmoothBrightness(cv1 / 10.0, args.sampleTime); lights[CV2_LIGHT].setSmoothBrightness(cv2 / 10.0, args.sampleTime); lights[CV3_LIGHT].setSmoothBrightness(cv3 / 10.0, args.sampleTime); lights[CV4_LIGHT].setSmoothBrightness(cv4 / 10.0, args.sampleTime); // Update TR outs from GPIO (8V) outputs[TR1_OUTPUT].setVoltage(tr1 * 8.0); outputs[TR2_OUTPUT].setVoltage(tr2 * 8.0); outputs[TR3_OUTPUT].setVoltage(tr3 * 8.0); outputs[TR4_OUTPUT].setVoltage(tr4 * 8.0); // Update CV outs from DAC outputs[CV1_OUTPUT].setVoltage(cv1); outputs[CV2_OUTPUT].setVoltage(cv2); outputs[CV3_OUTPUT].setVoltage(cv3); outputs[CV4_OUTPUT].setVoltage(cv4); } json_t* TeletypeModule::dataToJson() { json_t* rootJ = LibAVR32Module::dataToJson(); json_object_set_new(rootJ, "theme", json_integer(theme)); return rootJ; } void TeletypeModule::dataFromJson(json_t* rootJ) { LibAVR32Module::dataFromJson(rootJ); auto json_theme = json_object_get(rootJ, "theme"); if (json_theme) { theme = static_cast(json_integer_value(json_theme)); } // Special json key only in factory presets, not saved in dataToJson json_t* jd = json_object_get(rootJ, "loadScript"); if (jd) { json_t* scriptDataJson = json_object_get(jd, "data"); json_t* jsonActive = json_object_get(jd, "active"); json_t* jsonFlash = json_object_get(jd, "flash"); bool loadActive = jsonActive && json_is_true(jsonActive); bool loadFlash = jsonFlash && json_is_number(jsonFlash); if ((loadActive || loadFlash) && scriptDataJson && json_is_string(scriptDataJson)) { std::string script = json_string_value(scriptDataJson); reloadFirmware(false); if (loadActive) { TeletypeSceneIO::presetImportString(this, script, 255, true); } if (loadFlash) { int num = json_integer_value(jsonFlash); if (num >= 0 && num < 32) { TeletypeSceneIO::presetImportString(this, script, num, true); } } // send an ESC press/release to open preset description firmware.hidMessage(0x29, 0, false, false); firmware.hidMessage(0x29, 0, false, true); } } } ================================================ FILE: src/teletype/TeletypeModule.hpp ================================================ #include "LibAVR32Module.hpp" #include "IIBus.h" #include "rack.hpp" struct TeletypeModule : LibAVR32Module { enum ParamIds { PARAM_PARAM, BUTTON_PARAM, USB_PARAM, NUM_PARAMS }; enum InputIds { TRIG1_INPUT, TRIG2_INPUT, TRIG3_INPUT, TRIG4_INPUT, TRIG5_INPUT, TRIG6_INPUT, TRIG7_INPUT, TRIG8_INPUT, IN_INPUT, NUM_INPUTS }; enum OutputIds { TR1_OUTPUT, TR2_OUTPUT, TR3_OUTPUT, TR4_OUTPUT, CV1_OUTPUT, CV2_OUTPUT, CV3_OUTPUT, CV4_OUTPUT, NUM_OUTPUTS }; enum LightIds { TR1_LIGHT, TR2_LIGHT, TR3_LIGHT, TR4_LIGHT, CV1_LIGHT, CV2_LIGHT, CV3_LIGHT, CV4_LIGHT, NUM_LIGHTS }; TeletypeModule(); void processInputs(const ProcessArgs& args) override; void processOutputs(const ProcessArgs& args) override; json_t* dataToJson() override; void dataFromJson(json_t* rootJ) override; rack::dsp::SchmittTrigger inputTriggers[8]; virtual uint8_t* getScreenBuffer() override { return screenBuffer; } protected: IIBus iiBus; uint8_t screenBuffer[128 * 64]; }; ================================================ FILE: src/teletype/TeletypeWidget.cpp ================================================ #include "TeletypeWidget.hpp" #include "SifamTPM.hpp" #include "TeletypeKeyboard.hpp" #include "TeletypeModule.hpp" #include "USBAJack.hpp" #include "scene/TeletypeSceneIOMenu.hpp" #include "screen/TeletypeScreenWidget.hpp" #include namespace fs = ghc::filesystem; TeletypeWidget::TeletypeWidget(TeletypeModule* module) { setModule(module); box.size = Vec(15 * 18, 380); { auto panel = new ThemedSvgPanel(); panel->setBackground( APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/teletype.svg")), APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/teletype-dark.svg"))); panel->box.size = box.size; addChild(panel); } addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addParam(createParam(Vec(7, 333), module, TeletypeModule::USB_PARAM)); addParam(createParam(Vec(62, 337), module, TeletypeModule::BUTTON_PARAM)); screen = new TeletypeScreenWidget(module); screen->box.pos = Vec(30, 200); screen->box.size = Vec(210, 112); addChild(screen); addParam(createParam(Vec(211, 47.5), module, TeletypeModule::PARAM_PARAM)); addInput(createInput(Vec(11, 38.5), module, TeletypeModule::TRIG1_INPUT)); addInput(createInput(Vec(50.5, 38.5), module, TeletypeModule::TRIG3_INPUT)); addInput(createInput(Vec(90, 38.5), module, TeletypeModule::TRIG5_INPUT)); addInput(createInput(Vec(130, 38.5), module, TeletypeModule::TRIG7_INPUT)); addInput(createInput(Vec(30, 77.5), module, TeletypeModule::TRIG2_INPUT)); addInput(createInput(Vec(69.5, 77.5), module, TeletypeModule::TRIG4_INPUT)); addInput(createInput(Vec(109, 77.5), module, TeletypeModule::TRIG6_INPUT)); addInput(createInput(Vec(148.5, 77.5), module, TeletypeModule::TRIG8_INPUT)); addInput(createInput(Vec(169, 38.5), module, TeletypeModule::IN_INPUT)); addOutput(createOutput(Vec(90, 117.5), module, TeletypeModule::TR1_OUTPUT)); addOutput(createOutput(Vec(129.5, 117.5), module, TeletypeModule::TR2_OUTPUT)); addOutput(createOutput(Vec(169, 117.5), module, TeletypeModule::TR3_OUTPUT)); addOutput(createOutput(Vec(208.5, 117.5), module, TeletypeModule::TR4_OUTPUT)); addOutput(createOutput(Vec(109, 157.5), module, TeletypeModule::CV1_OUTPUT)); addOutput(createOutput(Vec(148.5, 157.5), module, TeletypeModule::CV2_OUTPUT)); addOutput(createOutput(Vec(188, 157.5), module, TeletypeModule::CV3_OUTPUT)); addOutput(createOutput(Vec(227.5, 157.5), module, TeletypeModule::CV4_OUTPUT)); addChild(createLight>(Vec(117, 112), module, TeletypeModule::TR1_LIGHT)); addChild(createLight>(Vec(156.5, 112), module, TeletypeModule::TR2_LIGHT)); addChild(createLight>(Vec(196, 112), module, TeletypeModule::TR3_LIGHT)); addChild(createLight>(Vec(235.5, 112), module, TeletypeModule::TR4_LIGHT)); addChild(createLight>(Vec(136, 152), module, TeletypeModule::CV1_LIGHT)); addChild(createLight>(Vec(175.5, 152), module, TeletypeModule::CV2_LIGHT)); addChild(createLight>(Vec(215, 152), module, TeletypeModule::CV3_LIGHT)); addChild(createLight>(Vec(254.5, 152), module, TeletypeModule::CV4_LIGHT)); } struct TeletypeKeyboardLayoutItem : rack::ui::MenuItem { LibAVR32Module* module; TeletypeKeyboardLayoutItem() { text = "Keyboard Layout"; rightText = TeletypeKeyboard::getCurrentLayout() + " " + RIGHT_ARROW; } ui::Menu* createChildMenu() override { std::vector layoutNames = {}; const fs::path mapPath { rack::asset::plugin(pluginInstance, "res/keymaps") }; for (auto const& file : fs::directory_iterator { mapPath }) { auto name = file.path().stem().string(); auto extension = file.path().extension().string(); if (extension == ".json") { layoutNames.push_back(name); } } ui::Menu* menu = new ui::Menu; for (auto const& name : layoutNames) { menu->addChild(createCheckMenuItem( name, "", [=]() { return name == TeletypeKeyboard::getCurrentLayout(); }, [=]() { TeletypeKeyboard::setCurrentLayout(name); TeletypeKeyboard::init(); } )); } return menu; } }; struct TeletypeKeystrokeItem : rack::ui::MenuItem { TeletypeModule* module; rack::widget::Widget* screen; uint8_t key; uint8_t mod; TeletypeKeystrokeItem(TeletypeModule* module, rack::widget::Widget* screen, uint8_t key, uint8_t mod, std::string _text, std::string _rightText = "") : module(module) , screen(screen) , key(key) , mod(mod) { text = _text; rightText = _rightText; } void onAction(const rack::event::Action& e) override { if (module) { module->firmware.hidMessage(key, mod, false, false); module->firmware.hidMessage(key, mod, false, true); if (screen) { APP->event->setSelectedWidget(screen); } } } }; void TeletypeWidget::appendContextMenu(rack::Menu* menu) { LibAVR32ModuleWidget::appendContextMenu(menu); TeletypeModule* m = dynamic_cast(module); assert(m); menu->addChild(new MenuSeparator()); menu->addChild(createIndexPtrSubmenuItem("Theme", { "Red", "Orange", "Yellow", "White" }, &m->theme)); menu->addChild(new TeletypeKeyboardLayoutItem()); menu->addChild(new MenuSeparator()); menu->addChild(new InternalPresetSubmenu(m, "Import scenes", Load)); menu->addChild(new InternalPresetSubmenu(m, "Export scenes", Save)); menu->addChild(new MenuSeparator()); menu->addChild(construct(&MenuLabel::text, "Shortcuts")); menu->addChild(new TeletypeKeystrokeItem(m, screen, 0x45, 0, "LIVE mode", "F12")); menu->addChild(new TeletypeKeystrokeItem(m, screen, 0x3a, 4, "EDIT mode", "Alt+F1")); menu->addChild(new TeletypeKeystrokeItem(m, screen, 0x44, 0, "TRACKER mode", "F11")); menu->addChild(new TeletypeKeystrokeItem(m, screen, 0x2b, 0, "Cycle LIVE/EDIT/TRACKER", "Tab")); menu->addChild(new TeletypeKeystrokeItem(m, screen, 0x29, 0, "SCENE READ mode", "Esc")); menu->addChild(new TeletypeKeystrokeItem(m, screen, 0x29, 4, "SCENE WRITE mode", "Alt+Esc")); //menu->addChild(new TeletypeKeystrokeItem(m, screen, 0x0a, 4, "GRID visualizer mode", "Alt+G")); //menu->addChild(new TeletypeKeystrokeItem(m, screen, 0x35, 0, "Toggle system variables display", "~")); menu->addChild(new TeletypeKeystrokeItem(m, screen, 0x2f, 0, "Previous script/page/value/scene", "[")); menu->addChild(new TeletypeKeystrokeItem(m, screen, 0x30, 0, "Next script/page/value/scene", "]")); menu->addChild(new TeletypeKeystrokeItem(m, screen, 0x0b, 4, "HELP mode", "Alt+H")); } ================================================ FILE: src/teletype/TeletypeWidget.hpp ================================================ #include "LibAVR32ModuleWidget.hpp" #pragma once struct TeletypeModule; struct TeletypeWidget : LibAVR32ModuleWidget { TeletypeWidget(TeletypeModule* module); virtual void appendContextMenu(rack::ui::Menu* menu) override; rack::widget::Widget* screen; }; ================================================ FILE: src/teletype/scene/TeletypeSceneIO.cpp ================================================ #include "TeletypeSceneIO.hpp" #include "LibAVR32Module.hpp" #include "osdialog.h" #include #include #include "rack.hpp" void TeletypeSceneIO::presetImportExportFileOperation(LibAVR32Module* module, SceneOperation operation, int preset_num, std::string fileName) { if (!module) { return; } if (operation == Save) { FILE* file = std::fopen(fileName.c_str(), "w+"); if (!file) { std::string message = rack::string::f("Couldn't write to %s. Error: %d", fileName.c_str(), errno); osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK, message.c_str()); return; } DEFER({ std::fclose(file); }); tt_serializer_t stream { .write_buffer = [](void* user_data, uint8_t* buffer, uint16_t size) { std::fwrite(buffer, 1, size, static_cast(user_data)); }, .write_char = [](void* user_data, uint8_t c) { std::fputc(c, static_cast(user_data)); }, .print_dbg = [](const char* c) {}, .data = (void*)file, }; module->firmware.serializePreset(&stream, preset_num); } else { std::ifstream ifs(fileName); std::string scene( (std::istreambuf_iterator(ifs)), (std::istreambuf_iterator()) ); TeletypeSceneIO::presetImportString(module, scene, preset_num, true); } } void TeletypeSceneIO::presetImportExportClipboardOperation(LibAVR32Module* module, SceneOperation operation, int preset_num, bool clearExisting) { if (!module) { return; } if (operation == Save) { std::stringstream clip; tt_serializer_t stream { .write_buffer = [](void* user_data, uint8_t* buffer, uint16_t size) { *static_cast(user_data) << std::string(buffer, buffer + size); }, .write_char = [](void* user_data, uint8_t c) { *static_cast(user_data) << c; }, .print_dbg = [](const char* c) {}, .data = (void*)&clip, }; module->firmware.serializePreset(&stream, preset_num); glfwSetClipboardString(APP->window->win, clip.str().c_str()); } else { std::string rawclip(glfwGetClipboardString(APP->window->win)); TeletypeSceneIO::presetImportString(module, rawclip, preset_num, clearExisting); } } void TeletypeSceneIO::presetImportString(LibAVR32Module* module, std::string scene, int preset_num, bool clearExisting) { // Remove any linefeeds scene.erase(std::remove(scene.begin(), scene.end(), '\r'), scene.end()); // Tabs in pattern/grid sections may have been turned into spaces. Turn them back auto patStart = scene.find("#P"); auto gridStart = scene.find("#G"); if (patStart != std::string::npos || gridStart != std::string::npos) { auto start = patStart == std::string::npos ? gridStart : gridStart == std::string::npos ? patStart : std::min(patStart, gridStart); std::regex r(" +"); std::string tab("\t"); std::string result = scene.substr(0, start); std::regex_replace(std::back_inserter(result), scene.begin() + start, scene.end(), r, tab); scene = result; } // Add a final newline, since a selection in discord/browser probably won't include it scene += "\n"; module->audioThreadActions.push([=]() { std::stringstream clip(scene); tt_deserializer_t stream { .read_char = [](void* user_data) { return static_cast(static_cast(user_data)->get()); }, .eof = [](void* user_data) { return static_cast(user_data)->eof(); }, .print_dbg = [](const char* c) {}, .data = (void*)&clip, }; module->firmware.deserializePreset(&stream, preset_num, clearExisting); }); } ================================================ FILE: src/teletype/scene/TeletypeSceneIO.hpp ================================================ #include struct LibAVR32Module; typedef enum { Load = 0, Save } SceneOperation; struct TeletypeSceneIO { static void presetImportString(LibAVR32Module* module, std::string scene, int preset_num, bool clearExisting); static void presetImportExportFileOperation(LibAVR32Module* module, SceneOperation operation, int preset_num, std::string fileName); static void presetImportExportClipboardOperation(LibAVR32Module* module, SceneOperation operation, int preset_num, bool clearExisting); }; ================================================ FILE: src/teletype/scene/TeletypeSceneIOMenu.cpp ================================================ #include "TeletypeSceneIOMenu.hpp" #include "osdialog.h" #include "rack.hpp" #include #ifdef ARCH_WIN #define PATH_SEPARATOR '\\' #else #define PATH_SEPARATOR '/' #endif struct InternalPresetItem : rack::ui::MenuItem { LibAVR32Module* module; int preset_num; SceneOperation operation; InternalPresetItem(LibAVR32Module* module, int preset_num, SceneOperation operation) : module(module) , preset_num(preset_num) , operation(operation) { if (preset_num == -1) { text = (operation == Load ? "Import from file" : "Export to file"); } else { text = (operation == Load ? ".txt → " : "") + std::to_string(preset_num) + (operation == Save ? " → .txt" : ""); } } void onAction(const rack::event::Action& e) override { osdialog_filters* filters = osdialog_filters_parse("Teletype Scene Files (*.txt):txt"); std::stringstream defaultFileName; if (preset_num < 0) { defaultFileName << "tt_active" << (operation == Save ? "_s.txt" : ".txt"); } else { defaultFileName << "tt" << std::setw(2) << std::setfill('0') << preset_num << (operation == Save ? "s.txt" : ".txt"); } char* path_result = osdialog_file( operation == Save ? OSDIALOG_SAVE : OSDIALOG_OPEN, NULL, defaultFileName.str().c_str(), filters); osdialog_filters_free(filters); if (!path_result) return; std::string path(path_result); std::free(path_result); TeletypeSceneIO::presetImportExportFileOperation(module, operation, preset_num, path); } }; struct InternalPresetClipboardItem : rack::ui::MenuItem { LibAVR32Module* module; int preset_num; SceneOperation operation; bool clearExisting; InternalPresetClipboardItem(LibAVR32Module* module, int preset_num, SceneOperation operation, bool clearExisting = true) : module(module) , preset_num(preset_num) , operation(operation) , clearExisting(clearExisting) { text = (operation == Save ? "Copy to clipboard" : (clearExisting ? "Paste and init new scene from clipboard" : "Paste and merge clipboard into current scene")); } void onAction(const rack::event::Action& e) override { TeletypeSceneIO::presetImportExportClipboardOperation(module, operation, preset_num, clearExisting); } }; struct InternalPresetBulkItem : rack::ui::MenuItem { LibAVR32Module* module; SceneOperation operation; std::string suffix; InternalPresetBulkItem(LibAVR32Module* module, SceneOperation operation, std::string suffix) : module(module) , operation(operation) , suffix(suffix) { text = operation == Load ? ("tt##" + suffix + ".txt → All") : ("All → tt##" + suffix + ".txt"); } void onAction(const rack::event::Action& e) override { char* path_result = osdialog_file( OSDIALOG_OPEN_DIR, NULL, NULL, NULL); if (!path_result) return; std::string path(path_result); std::free(path_result); for (int i = 0; i < 32; i++) { std::stringstream fileName; fileName << path << PATH_SEPARATOR << "tt" << std::setfill('0') << std::setw(2) << i << suffix << ".txt"; TeletypeSceneIO::presetImportExportFileOperation(module, operation, i, fileName.str()); } } }; struct InternalPresetActiveSubmenu : rack::ui::MenuItem { LibAVR32Module* module; SceneOperation operation; InternalPresetActiveSubmenu(LibAVR32Module* module, SceneOperation operation) : module(module) , operation(operation) { text = "Active scene"; rightText = "▸"; } rack::ui::Menu* createChildMenu() override { LibAVR32Module* m = dynamic_cast(module); assert(m); auto menu = new rack::ui::Menu(); menu->addChild(new InternalPresetItem(module, -1, operation)); menu->addChild(new InternalPresetClipboardItem(module, -1, operation)); if (operation == Load) { menu->addChild(new InternalPresetClipboardItem(module, -1, operation, false)); // paste and merge } return menu; } }; struct InternalPresetGroupSubmenu : rack::ui::MenuItem { LibAVR32Module* module; SceneOperation operation; int first; int last; InternalPresetGroupSubmenu(LibAVR32Module* module, int first, int last, SceneOperation operation) : module(module) , operation(operation) , first(first) , last(last) { text = std::to_string(first) + " - " + std::to_string(last); rightText = "▸"; } rack::ui::Menu* createChildMenu() override { LibAVR32Module* m = dynamic_cast(module); assert(m); auto menu = new rack::ui::Menu(); for (int i = first; i <= last; i++) { menu->addChild(new InternalPresetItem(module, i, operation)); } return menu; } }; InternalPresetSubmenu::InternalPresetSubmenu(LibAVR32Module* module, std::string _text, SceneOperation operation) : module(module) , operation(operation) { text = _text; rightText = "▸"; } rack::ui::Menu* InternalPresetSubmenu::createChildMenu() { LibAVR32Module* m = dynamic_cast(module); assert(m); auto menu = new rack::ui::Menu(); menu->addChild(new InternalPresetActiveSubmenu(module, operation)); for (int i = 0; i < 4; i++) { menu->addChild(new InternalPresetGroupSubmenu(module, i * 8, i * 8 + 7, operation)); } menu->addChild(new InternalPresetBulkItem(module, operation, "")); menu->addChild(new InternalPresetBulkItem(module, operation, "s")); return menu; } ================================================ FILE: src/teletype/scene/TeletypeSceneIOMenu.hpp ================================================ #include "TeletypeSceneIO.hpp" #include struct InternalPresetSubmenu : rack::ui::MenuItem { LibAVR32Module* module; SceneOperation operation; InternalPresetSubmenu(LibAVR32Module* module, std::string _text, SceneOperation operation); rack::ui::Menu* createChildMenu() override; }; ================================================ FILE: src/teletype/screen/EngineStoppedScreen.hpp ================================================ unsigned char engineStoppedScreen[128 * 40] = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x8, 0x0, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x8, 0x0, 0x0, 0x8, 0x8, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }; ================================================ FILE: src/teletype/screen/ExampleScreen.hpp ================================================ unsigned char exampleScreen[128 * 64] = { 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0xf, 0xf, 0x1, 0xf, 0xf, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0xf, 0x1, 0x1, 0x1, 0x1, 0xf, 0xf, 0x1, 0x1, 0xf, 0xf, 0x1, 0x1, 0xf, 0xf, 0xf, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0xf, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0x1, 0xf, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0xf, 0x1, 0xf, 0x1, 0xf, 0xf, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0xf, 0x1, 0x1, 0x1, 0x1, 0xf, 0xf, 0x1, 0x1, 0xf, 0xf, 0x1, 0x1, 0xf, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0xf, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0xf, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0xf, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0xf, 0x1, 0xf, 0x1, 0xf, 0xf, 0xf, 0x1, 0xf, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0xf, 0x0, 0x0, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0xf, 0x0, 0xf, 0x0, 0xf, 0xf, 0xf, 0x0, 0xf, 0x0, 0x0, 0x0, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, }; ================================================ FILE: src/teletype/screen/TeletypeScreenWidget.cpp ================================================ #include "TeletypeScreenWidget.hpp" #include "TeletypeModule.hpp" #include "TeletypeKeyboard.hpp" #include "ExampleScreen.hpp" //#define SAVE_SCREEN_FILENAME "/tmp/ttscreen.txt" #ifdef SAVE_SCREEN_FILENAME #include #include #include #endif TeletypeScreenWidget::TeletypeScreenWidget(LibAVR32Module* module) : module(module) { if (module) { TeletypeKeyboard::init(); } } void TeletypeScreenWidget::onSelect(const event::Select& e) { } void TeletypeScreenWidget::onDeselect(const event::Deselect& e) { } void TeletypeScreenWidget::onSelectKey(const event::SelectKey& e) { uint8_t key = 0; uint8_t mod = 0; if (TeletypeKeyboard::process(e, &key, &mod)) { if (module) { if (e.action == GLFW_PRESS) { module->firmware.hidMessage(key, mod, false, false); } else if (e.action == GLFW_REPEAT) { module->firmware.hidMessage(key, mod, true, false); } else if (e.action == GLFW_RELEASE) { module->firmware.hidMessage(key, mod, false, true); } } } e.consume(this); } void TeletypeScreenWidget::draw(const DrawArgs& args) { drawFrame(args.vg); } void TeletypeScreenWidget::drawLayer(const DrawArgs& args, int layer) { if (layer == 1) { if (this == APP->event->selectedWidget) { drawFocusRectangle(args.vg); } drawPixels(args.vg); } } void TeletypeScreenWidget::drawFrame(NVGcontext* vg) { NVGcolor hiColor = !settings::preferDarkPanels ? nvgRGB(250, 250, 250) : nvgRGB(96, 96, 94); NVGcolor loColor = !settings::preferDarkPanels ? nvgRGB(140, 140, 130) : nvgRGB(20, 20, 5); // draw skeumorphic shadow around screen float t = 0.95; float r = 2.75; nvgBeginPath(vg); nvgRoundedRect(vg, box.size.x - t, -t, 2 * t, box.size.y + t, r); nvgFillColor(vg, hiColor); nvgFill(vg); nvgBeginPath(vg); nvgRoundedRect(vg, -t, -t, box.size.x + 2 * t, 2 * t, r); nvgRoundedRect(vg, -t, -t, 2 * t, box.size.y + t, r); nvgFillColor(vg, loColor); nvgFill(vg); nvgBeginPath(vg); nvgRoundedRect(vg, -t, box.size.y - t, box.size.x + 2 * t, 2 * t, r); nvgFillColor(vg, hiColor); nvgFill(vg); // draw the empty screen nvgBeginPath(vg); nvgRoundedRect(vg, 0, 0, box.size.x, box.size.y, 2); nvgFillColor(vg, nvgRGB(0, 0, 0)); nvgFill(vg); } void TeletypeScreenWidget::drawFocusRectangle(NVGcontext* vg) { // draw keyboard focus highlight rectangle NVGcolor color; levelToGradient(module->theme, 14, &color, nullptr); nvgBeginPath(vg); nvgRoundedRect(vg, -2, -2, box.size.x + 4, box.size.y + 4, 2.5); nvgStrokeColor(vg, color); nvgStrokeWidth(vg, 3.5); nvgStroke(vg); nvgFillColor(vg, color); nvgFill(vg); // redraw empty screen nvgBeginPath(vg); nvgRoundedRect(vg, 0, 0, box.size.x, box.size.y, 2); nvgFillColor(vg, nvgRGB(0, 0, 0)); nvgFill(vg); } void TeletypeScreenWidget::drawPixels(NVGcontext* vg) { uint8_t* buffer = module ? module->getScreenBuffer() : exampleScreen; GridTheme theme = module ? module->theme : GridTheme::Yellow; uint16_t pixel_x = 128; uint16_t pixel_y = 64; if (buffer == NULL || pixel_x == 0 || pixel_y == 0) { return; } #ifdef SAVE_SCREEN_FILENAME std::ofstream ss(SAVE_SCREEN_FILENAME); ss << "unsigned char exampleScreen[128 * 64] = {\n" << std::hex; for (int i = 0; i < 128 * 64; i++) { ss << "0x" << static_cast(buffer[i]) << ", "; } ss << "\n};\n"; #endif int margin = 5; float pixel_width = (box.size.x - 2 * margin) / (pixel_x * 1.0); float pixel_height = (box.size.y - 2 * margin) / (pixel_y * 1.0); for (int j = 0; j < pixel_y; j++) { for (int i = 0; i < pixel_x; i++) { float x = margin + i * pixel_width; float y = margin + j * pixel_height; uint8_t d = *buffer++; if (d > 0) { drawPixel(vg, theme, x, y, pixel_width, pixel_height, d); } } } } void TeletypeScreenWidget::drawPixel(NVGcontext* vg, GridTheme theme, float x, float y, float width, float height, int data) { nvgBeginPath(vg); nvgRect(vg, x, y, width * 0.92, height * 0.92); NVGcolor color; levelToGradient(theme, data, &color, nullptr); nvgFillColor(vg, color); nvgFill(vg); } ================================================ FILE: src/teletype/screen/TeletypeScreenWidget.hpp ================================================ #include "LibAVR32Module.hpp" #include "VirtualGridTheme.hpp" #include "rack.hpp" using namespace rack; struct TeletypeScreenWidget : OpaqueWidget { TeletypeScreenWidget(LibAVR32Module* module); virtual void onSelect(const event::Select& e) override; virtual void onDeselect(const event::Deselect& e) override; virtual void onSelectKey(const event::SelectKey& e) override; virtual void draw(const DrawArgs& args) override; virtual void drawLayer(const DrawArgs& args, int layer) override; protected: void drawFrame(NVGcontext* vg); void drawFocusRectangle(NVGcontext* vg); void drawPixels(NVGcontext* vg); void drawPixel(NVGcontext* vg, GridTheme theme, float x, float y, float width, float height, int data); LibAVR32Module* module; }; ================================================ FILE: src/virtualgrid/VirtualGridKey.hpp ================================================ #include "rack.hpp" #include "VirtualGridTheme.hpp" struct VirtualGridKey : rack::app::ParamWidget { uint8_t* ledAddress; GridTheme* theme; float margin; float pushAmount; float cornerRadius; typedef enum { OFF, PRESSED } KeyPressState; VirtualGridKey() : ledAddress(nullptr) , theme(nullptr) , margin(0.0) , pushAmount(0.0) , cornerRadius(0.0) , _locked(false) { } VirtualGridWidget* getGrid() { return dynamic_cast(parent); } void setKeyAddress(uint8_t* ledByte) { ledAddress = ledByte; } void draw(const DrawArgs& args) override { drawLayer(args, 0); } void drawLayer(const DrawArgs& args, int layer) override { auto vg = args.vg; uint8_t val = ledAddress != NULL ? *ledAddress : 0; auto rect = box.size; rect.x -= 2 * margin; rect.y -= 2 * margin; float x = margin; float y = margin; float pushed = isPushed(); // sample this once so it's consistent float innerCornerRadius = cornerRadius * 4.0 / 4.3; NVGcolor color1, color2; levelToGradient( theme ? *theme : GridTheme::Yellow, val, &color1, &color2 ); NVGcolor edgeColor = !rack::settings::preferDarkPanels ? nvgRGB(180, 180, 180) : nvgRGB(96, 96, 94); NVGcolor shadowColor = !rack::settings::preferDarkPanels ? nvgRGB(140, 140, 140) : nvgRGB(60, 60, 50); NVGcolor faceColor = !rack::settings::preferDarkPanels ? nvgRGB(58, 58, 58) : nvgRGB(20, 20, 10); if (!pushed) { // highlight top and side edges if ((val > 0 && layer == 1) || (val == 0 && layer == 0)) { nvgBeginPath(vg); nvgRoundedRect(vg, x - 0.3, y - 0.3, rect.x + 0.6, rect.y + 0.3, cornerRadius); nvgFillColor(vg, val > 0 ? color1 : edgeColor); nvgFill(vg); } // shadow if (layer == 0) { nvgBeginPath(vg); nvgRoundedRect(vg, x, y + pushAmount, rect.x, rect.y - pushAmount + 1.2, innerCornerRadius); nvgFillColor(vg, shadowColor); nvgFill(vg); } } else { // highlight top and side edges if ((val > 0 && layer == 1) || (val == 0 && layer == 0)) { nvgBeginPath(vg); nvgRoundedRect(vg, x - 0.3, y - 0.3 + pushAmount, rect.x + 0.6, rect.y - pushAmount + 0.3, cornerRadius); nvgFillColor(vg, val > 0 ? color1 : edgeColor); nvgFill(vg); } // shadow if (layer == 0) { nvgBeginPath(vg); nvgRoundedRect(vg, x, y + pushAmount, rect.x, rect.y - pushAmount + 0.8, innerCornerRadius); nvgFillColor(vg, shadowColor); nvgFill(vg); } } // button vertical face if (!pushed) { if ((val > 0 && layer == 1) || (val == 0 && layer == 0)) { nvgBeginPath(vg); nvgRoundedRect(vg, x, y + rect.y - (pushAmount + 10), rect.x, pushAmount + 10, innerCornerRadius); nvgFillColor(vg, val > 0 ? color2 : faceColor); nvgFill(vg); } } // button top surface if (layer == 1) { nvgBeginPath(vg); auto paint = nvgBoxGradient(vg, x, y + (pushed ? pushAmount : 0), rect.x, rect.y - pushAmount, rect.x * 0.4, rect.x * 1.2, color1, color2); nvgRoundedRect(vg, x, y + (pushed ? pushAmount : 0), rect.x, rect.y - pushAmount, innerCornerRadius); if (val > 0) { nvgFillPaint(vg, paint); } else { nvgFillColor(vg, nvgRGB(0, 0, 0)); } nvgFill(vg); } if (isLocked()) { NVGcolor lockColor = nvgRGB(0, 0, 0); if (val < 4) { levelToGradient(theme ? *theme : GridTheme::Yellow, 14, &lockColor, nullptr); } drawDot(args, x + rect.x / 4, y + 3 * rect.y / 4, rect.x / 4 - 1.5 * margin, lockColor); } } void drawDot(const DrawArgs& args, float cx, float cy, float r, NVGcolor& color) { auto vg = args.vg; nvgBeginPath(vg); nvgCircle(vg, cx, cy, r); nvgFillColor(vg, color); nvgFill(vg); } rack::engine::ParamQuantity* getSecondaryParamQuantity() { if (!module) return NULL; return module->paramQuantities[paramId + 1]; } bool isPushed() { return (getParamQuantity() && getParamQuantity()->getValue() == PRESSED) || (getSecondaryParamQuantity() && getSecondaryParamQuantity()->getValue() == PRESSED); } bool isLocked() { return _locked; } void setLocked(bool b) { _locked = b; } void beginPress() { if (getSecondaryParamQuantity()) { // If shift+ctrl is held and this key is not already locked, lock it // If the key is locked, unlock it. if (isLocked()) { setLocked(false); } else if ((APP->window->getMods() & GLFW_MOD_SHIFT) == GLFW_MOD_SHIFT && (APP->window->getMods() & RACK_MOD_CTRL) == RACK_MOD_CTRL) { setLocked(true); getSecondaryParamQuantity()->setImmediateValue(PRESSED); return; } // if we're Ctrl/Mac-clicking an already-held button, release it if ((APP->window->getMods() & RACK_MOD_CTRL) == RACK_MOD_CTRL && getSecondaryParamQuantity()->getValue() > 0) { getSecondaryParamQuantity()->setImmediateValue(OFF); } else { getSecondaryParamQuantity()->setImmediateValue(PRESSED); } } } void endPress() { // Ignore mouseup if the key is locked, or when Ctrl is held down if (isLocked() || (APP->window->getMods() & RACK_MOD_CTRL) == RACK_MOD_CTRL) { return; } if (getSecondaryParamQuantity()) { getSecondaryParamQuantity()->setImmediateValue(OFF); } } void onButton(const rack::event::Button& e) override { if (e.button == GLFW_MOUSE_BUTTON_LEFT) { if (e.action == GLFW_PRESS) { beginPress(); } else { endPress(); } } else if (e.button == GLFW_MOUSE_BUTTON_RIGHT) { // If this key has not been MIDI mapped, the right-click menu // is not useful, so show the module menu auto* paramHandle = module ? APP->engine->getParamHandle(module->id, paramId) : NULL; if (!paramHandle) { return; } } // Repeat logic from ParamWidget::onButton() with minor modifications OpaqueWidget::onButton(e); // Record touch so MIDI mapping works if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT && (e.mods & RACK_MOD_MASK) == 0) { if (module) { APP->scene->rack->touchedParam = this; } e.consume(this); } if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT && (e.mods & RACK_MOD_MASK) == 0) { destroyTooltip(); createContextMenu(); e.consume(NULL); // replaces e.consume(this), which causes key to get pressed on right click for some reason } } void onDragStart(const rack::event::DragStart& e) override { beginPress(); } void onDragEnd(const rack::event::DragEnd& e) override { if (e.getTarget() == nullptr || e.getTarget()->parent == this->parent) { endPress(); } } void onDragLeave(const rack::event::DragLeave& e) override { if (e.origin->parent == this->parent) { endPress(); } } void onDragEnter(const rack::event::DragEnter& e) override { if (e.origin->parent == this->parent) { beginPress(); } } void onEnter(const EnterEvent& e) override { // override base class to prevent tooltip creation } protected: bool _locked; }; ================================================ FILE: src/virtualgrid/VirtualGridModule.cpp ================================================ #include "VirtualGridModule.hpp" #include "LibAVR32Module.hpp" #include "GridConsumerBase.hpp" #include #include struct MirrorModeGridConsumer : GridConsumerBase { MirrorModeGridConsumer(VirtualGridModule* module) : module(module) { } virtual ~MirrorModeGridConsumer() { } void gridConnected(Grid* newConnection) override { if (newConnection == module) { // don't mirror self return; } GridConsumerBase::gridConnected(newConnection); if (module && newConnection) { // update initial LED state uint8_t leds[64]; for (int x_offset = 0; x_offset < 16; x_offset += 8) { for (int y_offset = 0; y_offset < 16; y_offset += 8) { for (int x = 0; x < 8; x++) { for (int y = 0; y < 8; y++) { leds[y * 8 + x] = module->ledBuffer[(y_offset + y) * 16 + x_offset + x]; } } newConnection->updateQuadrant(x_offset, y_offset, leds); } } } } void gridButtonEvent(int x, int y, bool state) override { if (module) { int w = module->device.width; auto param = module->getParamQuantity((x + y * w) * 2); if (param) { module->audioThreadActions.push([param, state]() { param->setImmediateValue(state ? 1 : 0); }); } } } void encDeltaEvent(int n, int d) override { } protected: VirtualGridModule* module; }; std::string formatVirtualDeviceId(int64_t id) { std::ostringstream ss; std::string prefix("virt"); // Rack IDs are in the range 0-2^53 ss << prefix << std::setw(14) << std::setfill('0') << std::hex << id; return ss.str(); } VirtualGridModule::VirtualGridModule(unsigned w, unsigned h) { if (w * h > GRID_MAX_SIZE) { FATAL("Unsupported grid size"); assert(0); } config(w * h * 2, 0, 0, 0); for (unsigned j = 0; j < h; j++) { for (unsigned i = 0; i < w; i++) { int n = i + j * w * 2; // first set of params, for midi mapping auto param = configButton(n, rack::string::f("(%d,%d)", i , j)); param->resetEnabled = false; param->smoothEnabled = false; param->randomizeEnabled = false; // second set of params, for interactive use param = configButton(n + 1, rack::string::f("(%d,%d)", i, j)); param->resetEnabled = false; param->smoothEnabled = false; param->randomizeEnabled = false; } } device.width = w; device.height = h; device.port = 0; device.rotation = 0; device.id = formatVirtualDeviceId(0); device.prefix = ""; device.type = "virtual " + std::to_string(w * h); device.protocol = PROTOCOL_MEXT; theme = GridTheme::Yellow; mirrorModeConsumer = new MirrorModeGridConsumer(this); clearAll(); } VirtualGridModule::~VirtualGridModule() { GridConnectionManager::get().deregisterGridConsumer(mirrorModeConsumer); delete mirrorModeConsumer; } void VirtualGridModule::onAdd() { device.id = formatVirtualDeviceId(id); } void VirtualGridModule::process(const ProcessArgs& args) { while (audioThreadActions.size()) { audioThreadActions.shift()(); } std::vector> presses; std::vector> releases; for (int i = 0; i < device.width; i++) { for (int j = 0; j < device.height; j++) { // we need to check the pressed state of two parameters per button, // one for MIDI mapping, one for interactive presses, in order to // prevent midi-mappings from locking a button at 0 and preventing clicking. int n = i + (j * device.width); int p = n * 2; bool state = (params[p].getValue() > 0) || (params[p + 1].getValue() > 0); if (state != pressedState[n]) { pressedState[n] = state; if (state) { presses.push_back(std::make_tuple(i, j)); } else { releases.push_back(std::make_tuple(i, j)); } } } } // ensure any near-simultaneous releases and presses are processed releases-first std::for_each(releases.begin(), releases.end(), [=](std::tuple c) { GridConnectionManager::get().dispatchButtonMessage(&this->device, std::get<0>(c), std::get<1>(c), false); }); std::for_each(presses.begin(), presses.end(), [=](std::tuple c) { GridConnectionManager::get().dispatchButtonMessage(&this->device, std::get<0>(c), std::get<1>(c), true); }); } json_t* VirtualGridModule::dataToJson() { json_t* rootJ = json_object(); json_object_set_new(rootJ, "protocol", json_integer(device.protocol)); json_object_set_new(rootJ, "theme", json_integer(theme)); auto consumer = dynamic_cast(mirrorModeConsumer); if (consumer) { json_t* mirrorJ = json_object(); consumer->saveGridConnectionToJson(mirrorJ); json_object_set_new(rootJ, "mirror", mirrorJ); } return rootJ; } json_t* VirtualGridModule::paramsToJson() { // don't serialize key states json_t* rootJ = json_array(); return rootJ; } void VirtualGridModule::dataFromJson(json_t* rootJ) { auto json_proto = json_object_get(rootJ, "protocol"); if (json_proto) { device.protocol = static_cast(json_integer_value(json_proto)); } auto json_theme = json_object_get(rootJ, "theme"); if (json_theme) { theme = static_cast(json_integer_value(json_theme)); } auto consumer = dynamic_cast(mirrorModeConsumer); if (consumer) { auto json_mirror = json_object_get(rootJ, "mirror"); consumer->loadGridConnectionFromJson(json_mirror); GridConnectionManager::get().registerGridConsumer(consumer); } } const MonomeDevice& VirtualGridModule::getDevice() { return device; } void VirtualGridModule::updateRow(int x_offset, int y, uint8_t bitfield) { if (mirrorModeConsumer) { auto mirroredGrid = mirrorModeConsumer->gridGetDevice(); if (mirroredGrid) { mirroredGrid->updateRow(x_offset, y, bitfield); } } uint8_t* ptr = ledBuffer + y * 16 + x_offset; for (int i = 0; i < 8; i++) { *ptr++ = ((bitfield & (1 << i)) > 0) ? 0xF : 0; } } void VirtualGridModule::updateQuadrant(int x_offset, int y_offset, uint8_t* leds) { if (mirrorModeConsumer) { auto mirroredGrid = mirrorModeConsumer->gridGetDevice(); if (mirroredGrid) { mirroredGrid->updateQuadrant(x_offset, y_offset, leds); } } uint8_t* ptr = ledBuffer + y_offset * 16 + x_offset; for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { *ptr++ = *leds++; } ptr += 8; } } void VirtualGridModule::clearAll() { memset(ledBuffer, 0, sizeof(uint8_t) * GRID_MAX_SIZE); memset(pressedState, 0, sizeof(uint8_t) * GRID_MAX_SIZE); for (auto p : params) { p.setValue(0); } } ================================================ FILE: src/virtualgrid/VirtualGridModule.hpp ================================================ #pragma once #include "GridConnection.hpp" #include "VirtualGridTheme.hpp" #include "rack.hpp" #include "ActionQueue.hpp" #define GRID_MAX_SIZE 256 struct VirtualGridModule : rack::Module, Grid { MonomeDevice device; GridTheme theme; uint8_t ledBuffer[GRID_MAX_SIZE]; bool pressedState[GRID_MAX_SIZE]; VirtualGridModule(unsigned w, unsigned h); ~VirtualGridModule(); // rack::Module virtual methods void onAdd() override; void process(const ProcessArgs& args) override; json_t* dataToJson() override; json_t* paramsToJson() override; void dataFromJson(json_t* rootJ) override; // Grid virtual methods const MonomeDevice& getDevice() override; void updateRow(int x_offset, int y, uint8_t bitfield) override; void updateQuadrant(int x_offset, int y_offset, uint8_t* leds) override; void updateRing(int n, uint8_t leds[64]) override {}; void clearAll() override; bool isHardware() override { return false; } IGridConsumer* mirrorModeConsumer; ActionQueue audioThreadActions; }; template struct VirtualGridModuleTemplate : VirtualGridModule { VirtualGridModuleTemplate() : VirtualGridModule(width, height) { } }; ================================================ FILE: src/virtualgrid/VirtualGridTheme.cpp ================================================ #include "VirtualGridTheme.hpp" NVGcolor themeColors[4][16][2]; // e^kx - 1 / e^k - 1 easing function int ease(int level, int minval, int maxval, float curve) { int range = maxval - minval; float y = (exp(curve * level / 15.0) - 1) / (exp(curve) - 1); return (int)floor(y * range) + minval; } NVGcolor calcColor(int level, float curve, int minR, int maxR, int minG, int maxG, int minB, int maxB) { return nvgRGB(ease(level, minR, maxR, curve), ease(level, minG, maxG, curve), ease(level, minB, maxB, curve)); } void initThemes() { float curve0 = -2.7; float curve1 = -2.2; for (int level = 0; level < 16; level++) { themeColors[GridTheme::Red][level][0] = calcColor(level, curve0, 20, 255, 15, 175, 5, 30); themeColors[GridTheme::Red][level][1] = calcColor(level, curve1, 15, 255, 10, 85, 0, 15); themeColors[GridTheme::Orange][level][0] = calcColor(level, curve0, 15, 255, 15, 210, 0, 75); themeColors[GridTheme::Orange][level][1] = calcColor(level, curve1, 12, 225, 10, 115, 0, 45); themeColors[GridTheme::White][level][0] = calcColor(level, curve0, 30, 255, 22, 255, 22, 207); themeColors[GridTheme::White][level][1] = calcColor(level, curve1, 15, 160, 15, 170, 15, 224); themeColors[GridTheme::Yellow][level][0] = calcColor(level, curve0, 22, 255, 22, 250, 21, 142); themeColors[GridTheme::Yellow][level][1] = calcColor(level, curve1, 9, 203, 3, 176, 6, 217); } } void levelToGradient(GridTheme theme, uint8_t level, NVGcolor* color1, NVGcolor* color2) { if (theme >= 0 && theme < 4 && level >= 0 && level < 16) { if (color1) { *color1 = themeColors[theme][level][0]; } if (color2) { *color2 = themeColors[theme][level][1]; } } } ================================================ FILE: src/virtualgrid/VirtualGridTheme.hpp ================================================ #pragma once #include "rack.hpp" typedef enum { Red, Orange, Yellow, White, NUM_THEMES } GridTheme; void levelToGradient(GridTheme theme, uint8_t level, NVGcolor* color1, NVGcolor* color2); void initThemes(); ================================================ FILE: src/virtualgrid/VirtualGridWidget.cpp ================================================ #include "VirtualGridWidget.hpp" #include "Screenshot.hpp" #include "VirtualGridKey.hpp" #include "VirtualGridModule.hpp" #include "VirtualGridTheme.hpp" #include "GridConnectionMenu.hpp" using namespace rack; uint8_t samplePattern[] = { 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 15, 0, 14, 0, 0, 0, 0, 0, 15, 0, 14, 0, 0, 0, 0, 0, 14, 0, 12, 0, 0, 15, 0, 0, 14, 0, 12, 0, 15, 0, 0, 0, 12, 0, 9, 15, 0, 14, 0, 0, 12, 0, 9, 0, 14, 0, 0, 15, 9, 0, 5, 14, 0, 12, 0, 0, 9, 0, 5, 0, 12, 0, 15, 14, 5, 0, 1, 12, 0, 9, 0, 0, 5, 0, 1, 0, 9, 0, 14, 12, 1, 0, 0, 9, 0, 5, 0, 15, 1, 0, 0, 0, 5, 0, 12, 9, 0, 0, 0, 5, 0, 1, 0, 14, 0, 0, 0, 0, 1, 0, 9, 5, 0, 0, 0, 1, 15, 0, 0, 12, 0, 0, 0, 0, 0, 15, 5, 1, 0, 15, 0, 0, 14, 0, 0, 9, 0, 0, 0, 0, 0, 14, 1, 0, 0, 14, 0, 0, 12, 0, 0, 5, 0, 15, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 9, 0, 0, 1, 0, 14, 0, 15, 0, 9, 0, 0, 0, 9, 0, 0, 5, 0, 15, 0, 0, 12, 0, 14, 0, 5, 0, 0, 0, 5, 0, 0, 1, 0, 14, 0, 0, 9, 0, 12, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 12, 0, 0, 5, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 1, 0, 5, 0, 0, 0, }; GridTheme sampleThemeYellow = GridTheme::Yellow; GridTheme sampleThemeOrange = GridTheme::Orange; GridTheme sampleThemeRed = GridTheme::Red; VirtualGridWidget::VirtualGridWidget(VirtualGridModule* module, unsigned w, unsigned h) { setModule(module); if (module) { VirtualGridModule* grid = dynamic_cast(module); assert(grid); GridConnectionManager::get().registerGrid(grid); id = grid->device.id; } float rackWidth = 0; GridTheme* sampleTheme = &sampleThemeYellow; if (w == h) { rackWidth = 375; margins.x = 13.5; margins.y = 16; sampleTheme = h == 8 ? &sampleThemeOrange : &sampleThemeRed; } else if (w == 2 * h) { rackWidth = 735; margins.x = 16; margins.y = 16; sampleTheme = &sampleThemeYellow; } else { FATAL("Unsupported grid size"); assert(0); } box.size = Vec(rackWidth, 380); { auto panel = new ThemedSvgPanel(); panel->setBackground( APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/grid.svg")), APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/grid-dark.svg"))); panel->box.size = box.size; addChild(panel); } // create an opaque child underneath the keys to defeat module dragging in between the buttons auto gridZone = new OpaqueWidget(); gridZone->setSize(Vec(box.size.x - 2 * margins.x, box.size.y - 2 * margins.y)); gridZone->setPosition(Vec(margins.x, margins.y)); addChild(gridZone); float spacingRatio = 0.14; float button_size = (box.size.y - margins.y * 2) / (h + (h - 1) * spacingRatio); float spacing = button_size * spacingRatio; float keyMargin = 0.5 * spacing; for (unsigned j = 0; j < h; j++) { for (unsigned i = 0; i < w; i++) { float x = margins.x + i * (button_size + spacing) - keyMargin; float y = margins.y + j * (button_size + spacing) - keyMargin; int n = i + j * w; VirtualGridKey* key = (VirtualGridKey*)createParam(Vec(x, y), module, n * 2); if (module) { key->setKeyAddress(module->ledBuffer + i + j * 16); key->theme = &(module->theme); } else { key->setKeyAddress(samplePattern + i + j * 16); key->theme = sampleTheme; } key->box.size = Vec(button_size + spacing, button_size + spacing); key->margin = keyMargin; key->pushAmount = h == 16 ? 2.1 : 3.8; key->cornerRadius = h == 16 ? 2.5 : 4.3; addParam(key); } } } VirtualGridWidget::~VirtualGridWidget() { if (module) { GridConnectionManager::get().deregisterGrid(id); } } void VirtualGridWidget::clearHeldKeys() { for (auto p : getParams()) { auto key = static_cast(p); if (key && !key->isLocked()) { key->getSecondaryParamQuantity()->setImmediateValue(VirtualGridKey::OFF); } } } void VirtualGridWidget::clearLockedKeys() { for (auto p : getParams()) { auto key = static_cast(p); if (key && key->isLocked()) { key->setLocked(false); key->getSecondaryParamQuantity()->setImmediateValue(VirtualGridKey::OFF); } } } void VirtualGridWidget::onDragEnter(const event::DragEnter& e) { } void VirtualGridWidget::onDragStart(const event::DragStart& e) { ModuleWidget::onDragStart(e); } void VirtualGridWidget::onDragEnd(const event::DragEnd& e) { ModuleWidget::onDragEnd(e); } void VirtualGridWidget::onDragLeave(const event::DragLeave& e) { clearHeldKeys(); ModuleWidget::onDragLeave(e); } void VirtualGridWidget::onHoverKey(const rack::Widget::HoverKeyEvent& e) { #if defined ARCH_MAC bool isHoldModifier = e.key == GLFW_KEY_LEFT_SUPER || e.key == GLFW_KEY_RIGHT_SUPER; #else bool isHoldModifier = e.key == GLFW_KEY_LEFT_CONTROL || e.key == GLFW_KEY_RIGHT_CONTROL; #endif if (isHoldModifier && e.action == GLFW_RELEASE) { clearHeldKeys(); } else if (e.key == GLFW_KEY_ESCAPE && e.action == GLFW_PRESS) { clearHeldKeys(); clearLockedKeys(); } else { rack::app::ModuleWidget::onHoverKey(e); } } void VirtualGridWidget::onLeave(const rack::Widget::LeaveEvent& e) { clearHeldKeys(); } void setProtocol(VirtualGridModule* grid, MonomeProtocol protocol) { if (protocol != grid->device.protocol) { GridConnectionManager::get().deregisterGrid(grid->device.id, false); grid->device.protocol = protocol; GridConnectionManager::get().registerGrid(grid); } } void VirtualGridWidget::appendContextMenu(Menu * menu) { VirtualGridModule* grid = dynamic_cast(module); assert(grid); menu->addChild(new MenuSeparator()); menu->addChild(createMenuItem("Save grid screenshot", "", [this]() { screenshotModulePNG(this, "grid-screenshot.png"); })); menu->addChild(createSubmenuItem("Mirror hardware grid", "", [=](Menu *childMenu) { appendDeviceConnectionMenu(childMenu, grid->mirrorModeConsumer, &grid->audioThreadActions, true); childMenu->addChild(createMenuItem("Stop mirroring", "", [=]() { if (grid->mirrorModeConsumer) { GridConnectionManager::get().disconnect(grid->mirrorModeConsumer); grid->mirrorModeConsumer->setLastDeviceId(""); } }, !grid->mirrorModeConsumer || grid->mirrorModeConsumer->gridGetDevice() == nullptr )); })); menu->addChild(new MenuSeparator()); menu->addChild(createIndexPtrSubmenuItem("Theme", { "Red", "Orange", "Yellow", "White" }, &grid->theme)); menu->addChild(createIndexSubmenuItem("Protocol", {"40h", "Series", "Mext (varibright)"}, [=]() { return grid ? grid->device.protocol : 0; }, [=](size_t index) { setProtocol(grid, static_cast(index)); })); menu->addChild(createMenuItem("Release Locked Keys", "Esc", [this]() { this->clearLockedKeys(); })); menu->addChild(construct(&MenuLabel::text, model->name + " (" + id + ")")); } ================================================ FILE: src/virtualgrid/VirtualGridWidget.hpp ================================================ #include "rack.hpp" #pragma once extern rack::Plugin* pluginInstance; struct VirtualGridKey; struct VirtualGridModule; struct VirtualGridWidget : rack::app::ModuleWidget { VirtualGridWidget(VirtualGridModule* module, unsigned w, unsigned h); ~VirtualGridWidget(); void onDragEnter(const rack::event::DragEnter& e) override; void onDragStart(const rack::event::DragStart& e) override; void onDragEnd(const rack::event::DragEnd& e) override; void onDragLeave(const rack::event::DragLeave& e) override; void onHoverKey(const rack::Widget::HoverKeyEvent& e) override; void onLeave(const rack::Widget::LeaveEvent& e) override; void appendContextMenu(rack::ui::Menu* menu) override; void clearHeldKeys(); void clearLockedKeys(); protected: friend struct VirtualGridKey; rack::Vec margins; std::string id; }; template struct VirtualGridWidgetTemplate : VirtualGridWidget { VirtualGridWidgetTemplate(VirtualGridModule* module) : VirtualGridWidget(module, width, height) { } }; ================================================ FILE: src/whitewhale/WhiteWhaleModule.hpp ================================================ #pragma once #include "LibAVR32Module.hpp" #include "Clock12BitParam.hpp" struct WhiteWhaleModule : LibAVR32Module { enum ParamIds { CLOCK_PARAM, PARAM_PARAM, BUTTON_PARAM, USB_PARAM, NUM_PARAMS }; enum InputIds { CLOCK_INPUT, NUM_INPUTS }; enum OutputIds { CLOCK_OUTPUT, TR1_OUTPUT, TR2_OUTPUT, TR3_OUTPUT, TR4_OUTPUT, CVA_OUTPUT, CVB_OUTPUT, NUM_OUTPUTS }; enum LightIds { CLOCK_LIGHT, TR1_LIGHT, TR2_LIGHT, TR3_LIGHT, TR4_LIGHT, CVA_LIGHT, CVB_LIGHT, NUM_LIGHTS }; rack::dsp::SchmittTrigger clockTrigger; WhiteWhaleModule() : LibAVR32Module("whitewhale", "whitewhale") { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); configButton(BUTTON_PARAM, "PRESET"); configParam(PARAM_PARAM, 0.0, 10.0, 5.0, "PARAM"); configParam>(CLOCK_PARAM, 0.0, 10.0, 5.0, "CLOCK", "ms"); configInput(CLOCK_INPUT, "CLOCK"); configOutput(CLOCK_OUTPUT, "CLOCK"); configOutput(TR1_OUTPUT, "TR 1"); configOutput(TR2_OUTPUT, "TR 2"); configOutput(TR3_OUTPUT, "TR 3"); configOutput(TR4_OUTPUT, "TR 4"); configOutput(CVA_OUTPUT, "CV A"); configOutput(CVB_OUTPUT, "CV B"); configButton(USB_PARAM, "USB Device Port"); setDeviceConnectionParam(USB_PARAM); } void processInputs(const ProcessArgs& args) override { // Convert clock input jack to GPIO signals for normal connection and value bool clockNormal = !inputs[CLOCK_INPUT].isConnected(); if (clockNormal != firmware.getGPIO(B09)) { firmware.setGPIO(B09, clockNormal); firmware.triggerInterrupt(1); } clockTrigger.process(inputs[CLOCK_INPUT].getVoltage(), triggerLowThreshold, triggerHighThreshold); bool externalClock = clockTrigger.isHigh(); if (externalClock != firmware.getGPIO(B08)) { firmware.setGPIO(B08, externalClock); firmware.triggerInterrupt(2); } bool frontButton = params[BUTTON_PARAM].getValue() == 0; if (frontButton != firmware.getGPIO(NMI)) { firmware.setGPIO(NMI, frontButton); firmware.triggerInterrupt(3); } // Convert knob float parameters to 12-bit ADC values firmware.setADC(0, voltsToAdc(params[CLOCK_PARAM].getValue())); firmware.setADC(1, voltsToAdc(params[PARAM_PARAM].getValue())); } void processOutputs(const ProcessArgs& args) override { float cv1 = dacToVolts(firmware.getDAC(0)); float cv2 = dacToVolts(firmware.getDAC(1)); bool clock = firmware.getGPIO(B10); bool tr1 = firmware.getGPIO(B00); bool tr2 = firmware.getGPIO(B01); bool tr3 = firmware.getGPIO(B02); bool tr4 = firmware.getGPIO(B03); // Update lights from GPIO lights[CLOCK_LIGHT].setSmoothBrightness(clock, args.sampleTime); lights[TR1_LIGHT].setSmoothBrightness(tr1, args.sampleTime); lights[TR2_LIGHT].setSmoothBrightness(tr2, args.sampleTime); lights[TR3_LIGHT].setSmoothBrightness(tr3, args.sampleTime); lights[TR4_LIGHT].setSmoothBrightness(tr4, args.sampleTime); lights[CVA_LIGHT].setSmoothBrightness(cv1 / 10.0, args.sampleTime); lights[CVB_LIGHT].setSmoothBrightness(cv2 / 10.0, args.sampleTime); // Update output jacks from GPIO & DAC outputs[CLOCK_OUTPUT].setVoltage(clock * 8.0); outputs[TR1_OUTPUT].setVoltage(tr1 * 8.0); outputs[TR2_OUTPUT].setVoltage(tr2 * 8.0); outputs[TR3_OUTPUT].setVoltage(tr3 * 8.0); outputs[TR4_OUTPUT].setVoltage(tr4 * 8.0); outputs[CVA_OUTPUT].setVoltage(cv1); outputs[CVB_OUTPUT].setVoltage(cv2); } }; ================================================ FILE: src/whitewhale/WhiteWhaleWidget.hpp ================================================ #pragma once #include "LibAVR32ModuleWidget.hpp" #include "SifamTPM.hpp" #include "USBAJack.hpp" #include "WhiteWhaleModule.hpp" using namespace rack; struct WhiteWhaleWidget : LibAVR32ModuleWidget { WhiteWhaleWidget(WhiteWhaleModule* module) { setModule(module); box.size = Vec(15 * 6, 380); { auto panel = new ThemedSvgPanel(); panel->setBackground( APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/whitewhale.svg")), APP->window->loadSvg(rack::asset::plugin(pluginInstance, "res/whitewhale-dark.svg"))); panel->box.size = box.size; addChild(panel); } // Screws positioned for sliding nuts :) addChild(createWidget(Vec(RACK_GRID_WIDTH / 2, 0))); addChild(createWidget(Vec(RACK_GRID_WIDTH / 2, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addParam(createParam(Vec(7, 333), module, WhiteWhaleModule::USB_PARAM)); addParam(createParam(Vec(62, 336), module, WhiteWhaleModule::BUTTON_PARAM)); addParam(createParam(Vec(12, 30), module, WhiteWhaleModule::PARAM_PARAM)); addParam(createParam(Vec(12, 232), module, WhiteWhaleModule::CLOCK_PARAM)); addOutput(createOutput(Vec(50, 83), module, WhiteWhaleModule::TR1_OUTPUT)); addOutput(createOutput(Vec(50, 121), module, WhiteWhaleModule::TR2_OUTPUT)); addOutput(createOutput(Vec(50, 159), module, WhiteWhaleModule::TR3_OUTPUT)); addOutput(createOutput(Vec(50, 197), module, WhiteWhaleModule::TR4_OUTPUT)); addOutput(createOutput(Vec(15, 101), module, WhiteWhaleModule::CVA_OUTPUT)); addOutput(createOutput(Vec(15, 139), module, WhiteWhaleModule::CVB_OUTPUT)); addInput(createInput(Vec(13, 286), module, WhiteWhaleModule::CLOCK_INPUT)); addOutput(createOutput(Vec(50, 286), module, WhiteWhaleModule::CLOCK_OUTPUT)); addChild(createLight>(Vec(77, 79), module, WhiteWhaleModule::TR1_LIGHT)); addChild(createLight>(Vec(77, 117), module, WhiteWhaleModule::TR2_LIGHT)); addChild(createLight>(Vec(77, 155), module, WhiteWhaleModule::TR3_LIGHT)); addChild(createLight>(Vec(77, 193), module, WhiteWhaleModule::TR4_LIGHT)); addChild(createLight>(Vec(77, 282), module, WhiteWhaleModule::CLOCK_LIGHT)); addChild(createLight>(Vec(3, 117), module, WhiteWhaleModule::CVA_LIGHT)); addChild(createLight>(Vec(3, 155), module, WhiteWhaleModule::CVB_LIGHT)); } };