mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-18 05:32:05 +00:00
Merge branch 'master' of https://github.com/qmk/qmk_firmware
This commit is contained in:
commit
059412caeb
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -11,3 +11,6 @@
|
|||||||
[submodule "lib/googletest"]
|
[submodule "lib/googletest"]
|
||||||
path = lib/googletest
|
path = lib/googletest
|
||||||
url = https://github.com/google/googletest
|
url = https://github.com/google/googletest
|
||||||
|
[submodule "lib/lufa"]
|
||||||
|
path = lib/lufa
|
||||||
|
url = https://github.com/qmk/lufa
|
||||||
|
@ -27,7 +27,7 @@ addons:
|
|||||||
- diffutils
|
- diffutils
|
||||||
- dos2unix
|
- dos2unix
|
||||||
- doxygen
|
- doxygen
|
||||||
after_success:
|
after_script:
|
||||||
bash util/travis_compiled_push.sh
|
bash util/travis_compiled_push.sh
|
||||||
notifications:
|
notifications:
|
||||||
webhooks:
|
webhooks:
|
||||||
|
@ -8,8 +8,17 @@ Our users, contributors, and collaborators are expected to treat each other with
|
|||||||
|
|
||||||
* The use of sexualized language or imagery
|
* The use of sexualized language or imagery
|
||||||
* Unwelcome advances, sexual or otherwise
|
* Unwelcome advances, sexual or otherwise
|
||||||
|
* Deliberate intimidation, stalking, or following
|
||||||
* Insults or derogatory comments, or personal or political attacks
|
* Insults or derogatory comments, or personal or political attacks
|
||||||
* Publishing others’ private information without explicit permission
|
* Publishing others’ private information without explicit permission
|
||||||
|
* Sustained disruption of talks or other events
|
||||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
|
* Advocating for, or encouraging, any of the above behaviour
|
||||||
|
|
||||||
If someone is violating this Code of Conduct you may email hello@qmk.fm to bring your concern to the Members. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
|
# Reporting
|
||||||
|
|
||||||
|
If someone is violating this Code of Conduct, please email hello@qmk.fm or reach out to one of the Collaborators to bring it to our attention. All complaints will be reviewed and investigated.
|
||||||
|
|
||||||
|
QMK will seek to use the least punitive means available to resolve an issue. If the circumstances require asking an offender to leave, we will do that.
|
||||||
|
|
||||||
|
Reports will be taken and kept in strict confidence. You will not be required to confront an offender directly.
|
||||||
|
1
Makefile
1
Makefile
@ -548,6 +548,7 @@ ifndef SKIP_GIT
|
|||||||
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi
|
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi
|
||||||
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi
|
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi
|
||||||
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi
|
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi
|
||||||
|
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 1 --init lib/lufa; fi
|
||||||
git submodule status --recursive 2>/dev/null | \
|
git submodule status --recursive 2>/dev/null | \
|
||||||
while IFS= read -r x; do \
|
while IFS= read -r x; do \
|
||||||
case "$$x" in \
|
case "$$x" in \
|
||||||
|
4
bin/qmk
4
bin/qmk
@ -38,7 +38,7 @@ with open('requirements.txt', 'r') as fd:
|
|||||||
|
|
||||||
# Figure out our version
|
# Figure out our version
|
||||||
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
|
command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
|
||||||
result = subprocess.run(command, universal_newlines=True, capture_output=True)
|
result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
|
||||||
if result.returncode == 0:
|
if result.returncode == 0:
|
||||||
os.environ['QMK_VERSION'] = 'QMK ' + result.stdout.strip()
|
os.environ['QMK_VERSION'] = 'QMK ' + result.stdout.strip()
|
||||||
@ -47,7 +47,7 @@ else:
|
|||||||
|
|
||||||
# Setup the CLI
|
# Setup the CLI
|
||||||
import milc
|
import milc
|
||||||
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}ψ{style_reset_all}'
|
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||||
|
|
||||||
# If we were invoked as `qmk <cmd>` massage sys.argv into `qmk-<cmd>`.
|
# If we were invoked as `qmk <cmd>` massage sys.argv into `qmk-<cmd>`.
|
||||||
# This means we can't accept arguments to the qmk script itself.
|
# This means we can't accept arguments to the qmk script itself.
|
||||||
|
@ -358,3 +358,9 @@ ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
|
|||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
|
||||||
OPT_DEFS += -DSPACE_CADET_ENABLE
|
OPT_DEFS += -DSPACE_CADET_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/dip_switch.c
|
||||||
|
OPT_DEFS += -DDIP_SWITCH_ENABLE
|
||||||
|
endif
|
||||||
|
53
docs/ChangeLog/20190830.md
Normal file
53
docs/ChangeLog/20190830.md
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# QMK Breaking Change - 2019 Aug 30
|
||||||
|
|
||||||
|
Four times a year QMK runs a process for merging Breaking Changes. A Breaking Change is any change which modifies how QMK behaves in a way that is incompatible or potentially dangerous. We limit these changes to 4 times per year so that users can have confidence that updating their QMK tree will not break their keymaps.
|
||||||
|
|
||||||
|
This document marks the inaugural Breaking Change merge. A list of changes follows.
|
||||||
|
|
||||||
|
## Core code formatting with clang-format
|
||||||
|
|
||||||
|
* All core files (`drivers/`, `quantum/`, `tests/`, and `tmk_core/`) have been formatted with clang-format
|
||||||
|
* A travis process to reformat PR's on merge has been instituted
|
||||||
|
* You can use the new CLI command `qmk cformat` to format before submitting your PR if you wish.
|
||||||
|
|
||||||
|
## LUFA USB descriptor cleanup
|
||||||
|
|
||||||
|
* Some code cleanups related to the USB HID descriptors on AVR keyboards, to make them easier to read and understand
|
||||||
|
* More information: see https://github.com/qmk/qmk_firmware/pull/4871
|
||||||
|
* No behaviour changes anticipated and no keymaps modified
|
||||||
|
|
||||||
|
## Migrating `ACTION_LAYER_MOMENTARY()` entries in `fn_actions` to `MO()` keycodes
|
||||||
|
|
||||||
|
* `fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()`
|
||||||
|
* The end result of removing this obsolete feature should result in a decent reduction in firmware size and code complexity
|
||||||
|
* All keymaps affected are recommended to switch away from `fn_actions` in favour of the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features
|
||||||
|
|
||||||
|
## Update Atreus to current code conventions
|
||||||
|
|
||||||
|
* Duplicate include guards have bypassed the expected header processing behavior
|
||||||
|
* All keymaps affected are recommended to remove duplication of `<keyboard>/config.h` to `<keyboard>/keymaps/<user>/config.h` and only provide overrides at the keymap level
|
||||||
|
|
||||||
|
## Backport changes to keymap language files from ZSA fork
|
||||||
|
|
||||||
|
* Fixes an issue in the `keymap_br_abnt2.h` file that includes the wrong source (`keymap_common.h` instead of `keymap.h`)
|
||||||
|
* Updates the `keymap_swedish.h` file to be specific to swedish, and not just "nordic" in general.
|
||||||
|
* Any keymaps using this will need to remove `NO_*` and replace it with `SE_*`.
|
||||||
|
|
||||||
|
## Update repo to use LUFA as a git submodule
|
||||||
|
|
||||||
|
* `/lib/LUFA` removed from the repo
|
||||||
|
* LUFA set as a submodule, pointing to qmk/lufa
|
||||||
|
* This should allow more flexibility with LUFA, and allow us to keep the sub-module up to date, a lot more easily. It was ~2 years out of date with no easy path to fix that. This prevents that from being an issue in the future
|
||||||
|
|
||||||
|
## Migrating `ACTION_BACKLIGHT_*()` entries in `fn_actions` to `BL_` keycodes
|
||||||
|
|
||||||
|
* `fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()`
|
||||||
|
* All keymaps using these actions have had the relevant `KC_FN*` keys replaced with the equivalent `BL_*` keys
|
||||||
|
* If you currently use `KC_FN*` you will need to replace `fn_actions` with the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features
|
||||||
|
|
||||||
|
## Remove `KC_DELT` alias in favor of `KC_DEL`
|
||||||
|
|
||||||
|
* `KC_DELT` was a redundant, undocumented alias for `KC_DELETE`
|
||||||
|
* It has been removed and all its uses replaced with the more common `KC_DEL` alias
|
||||||
|
* Around 90 keymaps (mostly for ErgoDox boards) have been modified as a result
|
||||||
|
|
@ -13,11 +13,15 @@
|
|||||||
* [How to Use Github](getting_started_github.md)
|
* [How to Use Github](getting_started_github.md)
|
||||||
* [Getting Help](getting_started_getting_help.md)
|
* [Getting Help](getting_started_getting_help.md)
|
||||||
|
|
||||||
|
* [Breaking Changes](breaking_changes.md)
|
||||||
|
* [2019 Aug 30](ChangeLog/20190830.md)
|
||||||
|
|
||||||
* [FAQ](faq.md)
|
* [FAQ](faq.md)
|
||||||
* [General FAQ](faq_general.md)
|
* [General FAQ](faq_general.md)
|
||||||
* [Build/Compile QMK](faq_build.md)
|
* [Build/Compile QMK](faq_build.md)
|
||||||
* [Debugging/Troubleshooting QMK](faq_debug.md)
|
* [Debugging/Troubleshooting QMK](faq_debug.md)
|
||||||
* [Keymap](faq_keymap.md)
|
* [Keymap](faq_keymap.md)
|
||||||
|
* [Driver Installation with Zadig](driver_installation_zadig.md)
|
||||||
|
|
||||||
* Detailed Guides
|
* Detailed Guides
|
||||||
* [Install Build Tools](getting_started_build_tools.md)
|
* [Install Build Tools](getting_started_build_tools.md)
|
||||||
@ -59,6 +63,7 @@
|
|||||||
* [Combos](feature_combo.md)
|
* [Combos](feature_combo.md)
|
||||||
* [Command](feature_command.md)
|
* [Command](feature_command.md)
|
||||||
* [Debounce API](feature_debounce_type.md)
|
* [Debounce API](feature_debounce_type.md)
|
||||||
|
* [DIP Switch](feature_dip_switch.md)
|
||||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||||
* [Encoders](feature_encoders.md)
|
* [Encoders](feature_encoders.md)
|
||||||
* [Grave Escape](feature_grave_esc.md)
|
* [Grave Escape](feature_grave_esc.md)
|
||||||
|
108
docs/breaking_changes.md
Normal file
108
docs/breaking_changes.md
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
# Breaking Changes
|
||||||
|
|
||||||
|
This document describes QMK's Breaking Change process. A Breaking Change is any change which modifies how QMK behaves in a way that in incompatible or potentially dangerous. We limit these changes so that users can have confidence that updating their QMK tree will not break their keymaps.
|
||||||
|
|
||||||
|
The breaking change period is when we will merge PR's that change QMK in dangerous or unexpected ways. There is a built-in period of testing so we are confident that any problems caused are rare or unable to be predicted.
|
||||||
|
|
||||||
|
## What has been included in past Breaking Changes?
|
||||||
|
|
||||||
|
* [2019 Aug 30](ChangeLog/20190830.md)
|
||||||
|
|
||||||
|
## When is the next Breaking Change?
|
||||||
|
|
||||||
|
The next Breaking Change is scheduled for Nov 29.
|
||||||
|
|
||||||
|
### Important Dates
|
||||||
|
|
||||||
|
* [ ] 2019 Oct 04 - `future` is created. It will be rebased weekly.
|
||||||
|
* [ ] 2019 Nov 01 - `future` closed to new PR's.
|
||||||
|
* [ ] 2019 Nov 01 - Call for testers.
|
||||||
|
* [ ] 2019 Nov 27 - `master` is locked, no PR's merged.
|
||||||
|
* [ ] 2019 Nov 29 - Merge `future` to `master`.
|
||||||
|
* [ ] 2019 Nov 30 - `master` is unlocked. PR's can be merged again.
|
||||||
|
|
||||||
|
## What changes will be included?
|
||||||
|
|
||||||
|
To see a list of breaking change candidates you can look at the [`breaking_change` label](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). New changes might be added between now and when `future` is closed, and a PR with that label applied is not guaranteed to be merged.
|
||||||
|
|
||||||
|
If you want your breaking change to be included in this round you need to create a PR with the `breaking_change` label and have it accepted before `future` closes. After `future` closes no new breaking changes will be accepted.
|
||||||
|
|
||||||
|
Criteria for acceptance:
|
||||||
|
|
||||||
|
* PR is complete and ready to merge
|
||||||
|
* PR has a ChangeLog
|
||||||
|
|
||||||
|
# Checklists
|
||||||
|
|
||||||
|
This section documents various processes we use when running the Breaking Changes process.
|
||||||
|
|
||||||
|
## Rebase `future` from `master`
|
||||||
|
|
||||||
|
This is run every Friday while `future` is open.
|
||||||
|
|
||||||
|
Process:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd qmk_firmware
|
||||||
|
git checkout master
|
||||||
|
git pull --ff-only
|
||||||
|
git checkout future
|
||||||
|
git rebase master
|
||||||
|
git push --force
|
||||||
|
```
|
||||||
|
|
||||||
|
## 8 Weeks Before Merge
|
||||||
|
|
||||||
|
* `qmk_firmware` git commands
|
||||||
|
* [ ] `git checkout master`
|
||||||
|
* [ ] `git pull --ff-only`
|
||||||
|
* [ ] `git checkout -b future`
|
||||||
|
* [ ] Edit `readme.md`
|
||||||
|
* [ ] Add a big notice at the top that this is a testing branch.
|
||||||
|
* [ ] Include a link to this document
|
||||||
|
* [ ] `git commit -m 'Branch point for <DATE> Breaking Change'`
|
||||||
|
* [ ] `git tag breakpoint_<YYYY>_<MM>_<DD>`
|
||||||
|
* [ ] `git tag <next_version>` # Prevent the breakpoint tag from confusing version incrementing
|
||||||
|
* [ ] `git push origin future`
|
||||||
|
* [ ] `git push --tags`
|
||||||
|
* GitHub Actions
|
||||||
|
* [ ] Switch all [breaking_change PR's](https://github.com/qmk/qmk_firmware/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3Abreaking_change) to `future`
|
||||||
|
* [ ] Any that have a ChangeLog entry may be merged immediately.
|
||||||
|
|
||||||
|
## 4 Weeks Before Merge
|
||||||
|
|
||||||
|
* `future` is now closed to new PR's, only fixes for current PR's may be merged
|
||||||
|
* Post call for testers
|
||||||
|
* [ ] Discord
|
||||||
|
* [ ] GitHub PR
|
||||||
|
* [ ] https://reddit.com/r/olkb
|
||||||
|
|
||||||
|
## 1 Week Before Merge
|
||||||
|
|
||||||
|
* Announce that master will be closed from <2 Days Before> to <Day of Merge>
|
||||||
|
* [ ] Discord
|
||||||
|
* [ ] GitHub PR
|
||||||
|
* [ ] https://reddit.com/r/olkb
|
||||||
|
|
||||||
|
## 2 Days Before Merge
|
||||||
|
|
||||||
|
* Announce that master is closed for 2 days
|
||||||
|
* [ ] Discord
|
||||||
|
* [ ] GitHub PR
|
||||||
|
* [ ] https://reddit.com/r/olkb
|
||||||
|
|
||||||
|
## Day Of Merge
|
||||||
|
|
||||||
|
* `qmk_firmware` git commands
|
||||||
|
* [ ] `git checkout future`
|
||||||
|
* [ ] `git pull --ff-only`
|
||||||
|
* [ ] `git rebase origin/master`
|
||||||
|
* [ ] Edit `readme.md`
|
||||||
|
* [ ] Remove the notes about `future`
|
||||||
|
* [ ] Roll up the ChangeLog into one file.
|
||||||
|
* [ ] `git commit -m 'Merge point for <DATE> Breaking Change'`
|
||||||
|
* [ ] `git push origin future`
|
||||||
|
* Github Actions
|
||||||
|
* [ ] Create a PR for `future`
|
||||||
|
* [ ] Make sure travis comes back clean
|
||||||
|
* [ ] Merge `future` PR
|
25
docs/cli.md
25
docs/cli.md
@ -6,7 +6,8 @@ This page describes how to setup and use the QMK CLI.
|
|||||||
|
|
||||||
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to help you work with QMK:
|
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to help you work with QMK:
|
||||||
|
|
||||||
* `qmk compile-json`
|
* `qmk compile`
|
||||||
|
* `qmk doctor`
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
|
|
||||||
@ -20,12 +21,28 @@ You may want to add this to your `.profile`, `.bash_profile`, `.zsh_profile`, or
|
|||||||
|
|
||||||
# Commands
|
# Commands
|
||||||
|
|
||||||
## `qmk compile-json`
|
## `qmk compile`
|
||||||
|
|
||||||
This command allows you to compile JSON files you have downloaded from <https://config.qmk.fm>.
|
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm> or compile keymaps in the repo.
|
||||||
|
|
||||||
|
**Usage for Configurator Exports**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk compile <configuratorExport.json>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for Keymaps**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk compile -kb <keyboard_name> -km <keymap_name>
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk cformat`
|
||||||
|
|
||||||
|
This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files.
|
||||||
|
|
||||||
**Usage**:
|
**Usage**:
|
||||||
|
|
||||||
```
|
```
|
||||||
qmk compile-json mine.json
|
qmk cformat [file1] [file2] [...] [fileN]
|
||||||
```
|
```
|
||||||
|
42
docs/driver_installation_zadig.md
Normal file
42
docs/driver_installation_zadig.md
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# Bootloader Driver Installation with Zadig
|
||||||
|
|
||||||
|
QMK presents itself to the host as a regular HID keyboard device, and as such requires no special drivers. However, in order to flash your keyboard on Windows, the bootloader device that appears when you reset the board often *does*.
|
||||||
|
|
||||||
|
There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the Halfkay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver.
|
||||||
|
|
||||||
|
We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with Msys2 or WSL, the `qmk_install.sh` script will have asked if you want it to install the drivers for you.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Place your keyboard into the bootloader mode, either by hitting the `RESET` keycode (which may be on a different layer), or by pressing the reset switch usually located on the underside of the board. If your keyboard has neither, try holding Escape, or Space+`B`, as you plug it in (see the [Bootmagic](feature_bootmagic.md) docs for more details).
|
||||||
|
Some keyboards may have specific instructions for entering the bootloader, for example the [Bootmagic Lite](feature_bootmagic.md#bootmagic-lite) key (Escape) might be on a different key, such as Left Control. Refer to the board's README if you are unsure.
|
||||||
|
|
||||||
|
Zadig will automatically detect the bootloader device. You may sometimes need to check **Options -> List All Devices**.
|
||||||
|
- For keyboards with Atmel AVR MCUs, the bootloader will be named something similar to `ATm32U4DFU`, and have a Vendor ID of `03EB`.
|
||||||
|
- USBasp bootloaders will appear as `USBasp`, with a VID/PID of `16C0:05DC`.
|
||||||
|
- AVR keyboards flashed with the QMK-DFU bootloader will be named `<keyboard name> Bootloader` and will also have the VID `03EB`.
|
||||||
|
- For most ARM keyboards, it will be called `STM32 BOOTLOADER`, and have a VID/PID of `0483:DF11`.
|
||||||
|
|
||||||
|
!> If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is probably not in bootloader mode. The arrow will be colored orange and you will be asked to confirm modifying a system driver. **Do not** proceed if this is the case!
|
||||||
|
|
||||||
|
If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Finally, unplug and replug the keyboard to make sure the new driver has been loaded. If you are using the QMK Toolbox to flash, exit and restart it too, as it can sometimes fail to recognize the driver change.
|
||||||
|
|
||||||
|
## Recovering from Installation to Wrong Device
|
||||||
|
|
||||||
|
If you find that you can no longer type with the keyboard, you may have installed the driver onto the keyboard itself instead of the bootloader. You can easily confirm this in Zadig - a healthy keyboard has the `HidUsb` driver installed on all of its interfaces:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Open the Device Manager and look for a device that looks like your keyboard.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Right-click it and hit **Uninstall device**. Make sure to tick **Delete the driver software for this device** first.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Click **Action -> Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again!
|
@ -75,14 +75,11 @@ Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices m
|
|||||||
|
|
||||||
## Unknown Device for DFU Bootloader
|
## Unknown Device for DFU Bootloader
|
||||||
|
|
||||||
Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader.
|
Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader, or none at all.
|
||||||
|
|
||||||
Re-running the installation script for MSYS2 may help (eg run `util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package.
|
Re-running the QMK installation script (`./util/qmk_install.sh` from the `qmk_firmware` directory in MSYS2 or WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package manually.
|
||||||
|
|
||||||
If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, and run it on the system. Then, you will need to reset your board into bootloader mode. After that, locate the device in question. If the device doesn't show up in the list (or nothing shows up in the list), you may need to enable the `List all devices` option in the `Options` menu.
|
|
||||||
|
|
||||||
From here, you will need to know what type of controller the board is using. You may see it listed in the Device Manager as `ATmega32U4` device (which is an AVR board), or an `STM32` device (Which is an ARM board). For AVR boards, use `libusb-win32` for the driver. For ARM boards, use the `WinUSB` driver. Once the correct driver type has been selected, click on the `Replace Driver` button, unplug your board, plug it back in, and reset it again.
|
|
||||||
|
|
||||||
|
If that doesn't work, then you may need to download and run Zadig. See [Bootloader Driver Installation with Zadig](driver_installation_zadig.md) for more detailed information.
|
||||||
|
|
||||||
## WINAVR is Obsolete
|
## WINAVR is Obsolete
|
||||||
It is no longer recommended and may cause some problem.
|
It is no longer recommended and may cause some problem.
|
||||||
|
90
docs/feature_dip_switch.md
Normal file
90
docs/feature_dip_switch.md
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
# DIP Switches
|
||||||
|
|
||||||
|
DIP switches are supported by adding this to your `rules.mk`:
|
||||||
|
|
||||||
|
DIP_SWITCH_ENABLE = yes
|
||||||
|
|
||||||
|
and this to your `config.h`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define DIP_SWITCH_PINS { B14, A15, A10, B9 }
|
||||||
|
```
|
||||||
|
|
||||||
|
## Callbacks
|
||||||
|
|
||||||
|
The callback functions can be inserted into your `<keyboard>.c`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_kb(uint8_t index, bool active) {
|
||||||
|
dip_switch_update_user(index, active);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
or `keymap.c`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_user(uint8_t index, bool active) {
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
if(active) { audio_on(); } else { audio_off(); }
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if(active) { clicky_on(); } else { clicky_off(); }
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if(active) { music_on(); } else { music_off(); }
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if (active) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(plover_song);
|
||||||
|
#endif
|
||||||
|
layer_on(_PLOVER);
|
||||||
|
} else {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(plover_gb_song);
|
||||||
|
#endif
|
||||||
|
layer_off(_PLOVER);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Additionally, we support bit mask functions which allow for more complex handling.
|
||||||
|
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_mask_kb(uint32_t state) {
|
||||||
|
dip_switch_update_mask_user(state);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
or `keymap.c`:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_mask_user(uint32_t state) {
|
||||||
|
if (state & (1UL<<0) && state & (1UL<<1)) {
|
||||||
|
layer_on(_ADJUST); // C on esc
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
if (state & (1UL<<0)) {
|
||||||
|
layer_on(_TEST_A); // A on ESC
|
||||||
|
} else {
|
||||||
|
layer_off(_TEST_A);
|
||||||
|
}
|
||||||
|
if (state & (1UL<<1)) {
|
||||||
|
layer_on(_TEST_B); // B on esc
|
||||||
|
} else {
|
||||||
|
layer_off(_TEST_B);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Hardware
|
||||||
|
|
||||||
|
One side of the DIP switch should be wired directly to the pin on the MCU, and the other side to ground. It should not matter which side is connected to which, as it should be functionally the same.
|
@ -97,14 +97,16 @@ void oled_task_user(void) {
|
|||||||
## Basic Configuration
|
## Basic Configuration
|
||||||
|
|
||||||
| Define | Default | Description |
|
| Define | Default | Description |
|
||||||
|------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
|
|----------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display |
|
| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display |
|
||||||
| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts |
|
| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts |
|
||||||
| `OLED_FONT_START` | `0` | The starting characer index for custom fonts |
|
| `OLED_FONT_START` | `0` | The starting characer index for custom fonts |
|
||||||
| `OLED_FONT_END` | `224` | The ending characer index for custom fonts |
|
| `OLED_FONT_END` | `224` | The ending characer index for custom fonts |
|
||||||
| `OLED_FONT_WIDTH` | `6` | The font width |
|
| `OLED_FONT_WIDTH` | `6` | The font width |
|
||||||
| `OLED_FONT_HEIGHT` | `8` | The font height (untested) |
|
| `OLED_FONT_HEIGHT` | `8` | The font height (untested) |
|
||||||
| `OLED_DISABLE_TIMEOUT` | *Not defined* | Disables the built in OLED timeout feature. Useful when implementing custom timeout rules. |
|
| `OLED_TIMEOUT` | `60000` | Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|
||||||
|
| `OLED_SCROLL_TIMEOUT` | `0` | Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|
||||||
|
| `OLED_SCROLL_TIMEOUT_RIGHT`| *Not defined* | Scroll timeout direction is right when defined, left when undefined. |
|
||||||
| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
|
| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
|
||||||
| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
|
| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ QMK has a staggering number of features for building your keyboard. It can take
|
|||||||
* [Combos](feature_combo.md) - Custom actions for multiple key holds.
|
* [Combos](feature_combo.md) - Custom actions for multiple key holds.
|
||||||
* [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic").
|
* [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic").
|
||||||
* [Debounce API](feature_debounce_type.md) - Customization of debouncing algorithms, and the ability to add more/custom debouncing.
|
* [Debounce API](feature_debounce_type.md) - Customization of debouncing algorithms, and the ability to add more/custom debouncing.
|
||||||
|
* [DIP Switch](feature_dip_switch.md) - Toggle switches for customizing board function.
|
||||||
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
||||||
* [Encoders](feature_encoders.md) - Rotary encoders!
|
* [Encoders](feature_encoders.md) - Rotary encoders!
|
||||||
* [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave.
|
* [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave.
|
||||||
|
@ -144,6 +144,36 @@ Flashing sequence:
|
|||||||
3. Flash a .hex file
|
3. Flash a .hex file
|
||||||
4. Reset the device into application mode (may be done automatically)
|
4. Reset the device into application mode (may be done automatically)
|
||||||
|
|
||||||
|
## BootloadHID
|
||||||
|
|
||||||
|
BootloadHID is a USB bootloader for AVR microcontrollers. The uploader tool requires no kernel level driver on Windows and can therefore be run without installing any DLLs.
|
||||||
|
|
||||||
|
To ensure compatibility with the bootloadHID bootloader, make sure this block is present your `rules.mk`:
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||||
|
# different sizes, comment this out, and the correct address will be loaded
|
||||||
|
# automatically (+60). See bootloader.mk for all options.
|
||||||
|
BOOTLOADER = bootloadHID
|
||||||
|
|
||||||
|
Compatible flashers:
|
||||||
|
|
||||||
|
* [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash) (recommended Windows GUI)
|
||||||
|
* [bootloadhid Command Line](https://www.obdev.at/products/vusb/bootloadhid.html) / `:BootloadHID` in QMK (recommended command line)
|
||||||
|
|
||||||
|
Flashing sequence:
|
||||||
|
|
||||||
|
1. Enter the bootloader using any of the following methods:
|
||||||
|
* Tap the `RESET` keycode (may not work on all devices)
|
||||||
|
* Hold the salt key while plugging the keyboard in (usually documented within keyboard readme)
|
||||||
|
2. Wait for the OS to detect the device
|
||||||
|
3. Flash a .hex file
|
||||||
|
4. Reset the device into application mode (may be done automatically)
|
||||||
|
|
||||||
|
or:
|
||||||
|
|
||||||
|
make <keyboard>:<keymap>:bootloadHID
|
||||||
|
|
||||||
## STM32
|
## STM32
|
||||||
|
|
||||||
All STM32 chips come preloaded with a factory bootloader that cannot be modified nor deleted. Some STM32 chips have bootloaders that do not come with USB programming (e.g. STM32F103) but the process is still the same.
|
All STM32 chips come preloaded with a factory bootloader that cannot be modified nor deleted. Some STM32 chips have bootloaders that do not come with USB programming (e.g. STM32F103) but the process is still the same.
|
||||||
|
70
docs/flashing_bootloadhid.md
Normal file
70
docs/flashing_bootloadhid.md
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
# BootloadHID Flashing Instructions and Bootloader Information
|
||||||
|
|
||||||
|
ps2avr(GB) boards use an ATmega32A microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
|
||||||
|
|
||||||
|
General flashing sequence:
|
||||||
|
|
||||||
|
1. Enter the bootloader using any of the following methods:
|
||||||
|
* Tap the `RESET` keycode (may not work on all devices)
|
||||||
|
* Hold the salt key while plugging the keyboard in (usually documented within keyboard readme)
|
||||||
|
2. Wait for the OS to detect the device
|
||||||
|
3. Flash a .hex file
|
||||||
|
4. Reset the device into application mode (may be done automatically)
|
||||||
|
|
||||||
|
## bootloadHID Flashing Target
|
||||||
|
|
||||||
|
Using the QMK installation script, detailed [here](newbs_getting_started.md), the required bootloadHID tools should be automatically installed.
|
||||||
|
|
||||||
|
To flash via the command line, use the target `:bootloadHID` by executing the following command:
|
||||||
|
|
||||||
|
make <keyboard>:<keymap>:bootloadHID
|
||||||
|
|
||||||
|
## GUI Flashing
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
|
||||||
|
2. Place your keyboard into reset.
|
||||||
|
3. Ensure the configured VendorID is `16c0` and ProductID is `05df`
|
||||||
|
4. Press the `Find Device` button and ensure that your keyboard is found.
|
||||||
|
5. Press the `Open .hex File` button and locate the `.hex` file you created.
|
||||||
|
6. Press the `Flash Device` button and wait for the process to complete.
|
||||||
|
|
||||||
|
## Command Line Flashing
|
||||||
|
|
||||||
|
1. Place your keyboard into reset.
|
||||||
|
2. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
|
||||||
|
|
||||||
|
### Windows Manual Installation
|
||||||
|
For MSYS2:
|
||||||
|
1. Download the BootloadHID firmware package from https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz.
|
||||||
|
2. Extract contents using a compatible tool, for example 7-Zip.
|
||||||
|
3. Add to the MSYS path by copying `commandline/bootloadHID.exe` from the extracted archive to your MSYS2 installation, typically `C:\msys64\usr\bin`.
|
||||||
|
|
||||||
|
For native Windows flashing, the `bootloadHID.exe` can be used outside of the MSYS2 environment.
|
||||||
|
|
||||||
|
### Linux Manual Installation
|
||||||
|
1. Install libusb development dependency:
|
||||||
|
```bash
|
||||||
|
# This depends on OS - for Debian the following works
|
||||||
|
sudo apt-get install libusb-dev
|
||||||
|
```
|
||||||
|
2. Download the BootloadHID firmware package:
|
||||||
|
```
|
||||||
|
wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp
|
||||||
|
```
|
||||||
|
3. Build the bootloadHID executable:
|
||||||
|
```
|
||||||
|
cd /tmp/bootloadHID.2012-12-08/commandline/
|
||||||
|
make
|
||||||
|
sudo cp bootloadHID /usr/local/bin
|
||||||
|
```
|
||||||
|
|
||||||
|
### MacOS Manual Installation
|
||||||
|
1. Install Homebrew by typing the following:
|
||||||
|
```
|
||||||
|
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
|
```
|
||||||
|
2. Install the following packages:
|
||||||
|
```
|
||||||
|
brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
|
||||||
|
```
|
@ -14,7 +14,7 @@ The full syntax of the `make` command is `<keyboard_folder>:<keymap>:<target>`,
|
|||||||
The `<target>` means the following
|
The `<target>` means the following
|
||||||
* If no target is given, then it's the same as `all` below
|
* If no target is given, then it's the same as `all` below
|
||||||
* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck.
|
* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck.
|
||||||
* `dfu`, `teensy`, `avrdude` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
|
* `dfu`, `teensy`, `avrdude`, `dfu-util` or `bootloadHID`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
|
||||||
* **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`.
|
* **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`.
|
||||||
* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
|
* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ The following defines can be used to configure the I2C master driver.
|
|||||||
|Variable |Description |Default|
|
|Variable |Description |Default|
|
||||||
|------------------|---------------------------------------------------|-------|
|
|------------------|---------------------------------------------------|-------|
|
||||||
|`F_SCL` |Clock frequency in Hz |400KHz |
|
|`F_SCL` |Clock frequency in Hz |400KHz |
|
||||||
|`Prescaler` |Divides master clock to aid in I2C clock selection |1 |
|
|
||||||
|
|
||||||
AVRs usually have set GPIO which turn into I2C pins, therefore no further configuration is required.
|
AVRs usually have set GPIO which turn into I2C pins, therefore no further configuration is required.
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||||
<meta property="og:title" content="QMK Firmware Docs">
|
<meta property="og:title" content="QMK Firmware Docs">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:description" content="The full documenation of the open-source firmware">
|
<meta property="og:description" content="The full documentation of the open-source firmware">
|
||||||
<meta property="og:image" content="https://i.imgur.com/svjvIrw.jpg">
|
<meta property="og:image" content="https://i.imgur.com/svjvIrw.jpg">
|
||||||
<meta property="og:url" content="https://docs.qmk.fm">
|
<meta property="og:url" content="https://docs.qmk.fm">
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
|
@ -248,6 +248,42 @@ Programming.....................................................................
|
|||||||
Booting
|
Booting
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## BootloadHID
|
||||||
|
|
||||||
|
For Bootmapper Client(BMC)/bootloadHID/ATmega32A based boards, when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
|
||||||
|
|
||||||
|
make <my_keyboard>:<my_keymap>:bootloaderHID
|
||||||
|
|
||||||
|
For example, if your keymap is named "xyverz" and you're building a keymap for a jj40, you'll use this command:
|
||||||
|
|
||||||
|
make jj40:xyverz:bootloaderHID
|
||||||
|
|
||||||
|
Once the firmware finishes compiling, it will output something like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
Linking: .build/jj40_default.elf [OK]
|
||||||
|
Creating load file for flashing: .build/jj40_default.hex [OK]
|
||||||
|
Copying jj40_default.hex to qmk_firmware folder [OK]
|
||||||
|
Checking file size of jj40_default.hex [OK]
|
||||||
|
* The firmware size is fine - 21920/28672 (6752 bytes free)
|
||||||
|
```
|
||||||
|
|
||||||
|
After it gets to this point, the build script will look for the DFU bootloader every 5 seconds. It will repeat the following until the device is found or you cancel it.
|
||||||
|
|
||||||
|
```
|
||||||
|
Error opening HIDBoot device: The specified device was not found
|
||||||
|
Trying again in 5s.
|
||||||
|
```
|
||||||
|
|
||||||
|
Once it does this, you'll want to reset the controller. It should then show output similar to this:
|
||||||
|
|
||||||
|
```
|
||||||
|
Page size = 128 (0x80)
|
||||||
|
Device size = 32768 (0x8000); 30720 bytes remaining
|
||||||
|
Uploading 22016 (0x5600) bytes starting at 0 (0x0)
|
||||||
|
0x05580 ... 0x05600
|
||||||
|
```
|
||||||
|
|
||||||
## STM32 (ARM)
|
## STM32 (ARM)
|
||||||
|
|
||||||
For a majority of ARM boards (including the Proton C, Planck Rev 6, and Preonic Rev 3), when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
|
For a majority of ARM boards (including the Proton C, Planck Rev 6, and Preonic Rev 3), when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
* [热改键](feature_bootmagic.md)
|
* [热改键](feature_bootmagic.md)
|
||||||
* [组合](feature_combo)
|
* [组合](feature_combo)
|
||||||
* [命令](feature_command.md)
|
* [命令](feature_command.md)
|
||||||
|
* [拨动开关](feature_dip_switch.md)
|
||||||
* [动态宏指令](feature_dynamic_macros.md)
|
* [动态宏指令](feature_dynamic_macros.md)
|
||||||
* [编码器](feature_encoders.md)
|
* [编码器](feature_encoders.md)
|
||||||
* [重音号Esc复合键](feature_grave_esc.md)
|
* [重音号Esc复合键](feature_grave_esc.md)
|
||||||
|
@ -38,11 +38,7 @@ static const I2CConfig i2cconfig = {
|
|||||||
I2C1_CLOCK_SPEED,
|
I2C1_CLOCK_SPEED,
|
||||||
I2C1_DUTY_CYCLE,
|
I2C1_DUTY_CYCLE,
|
||||||
#else
|
#else
|
||||||
STM32_TIMINGR_PRESC(I2C1_TIMINGR_PRESC) |
|
STM32_TIMINGR_PRESC(I2C1_TIMINGR_PRESC) | STM32_TIMINGR_SCLDEL(I2C1_TIMINGR_SCLDEL) | STM32_TIMINGR_SDADEL(I2C1_TIMINGR_SDADEL) | STM32_TIMINGR_SCLH(I2C1_TIMINGR_SCLH) | STM32_TIMINGR_SCLL(I2C1_TIMINGR_SCLL), 0, 0
|
||||||
STM32_TIMINGR_SCLDEL(I2C1_TIMINGR_SCLDEL) | STM32_TIMINGR_SDADEL(I2C1_TIMINGR_SDADEL) |
|
|
||||||
STM32_TIMINGR_SCLH(I2C1_TIMINGR_SCLH) | STM32_TIMINGR_SCLL(I2C1_TIMINGR_SCLL),
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -58,9 +54,7 @@ static i2c_status_t chibios_to_qmk(const msg_t* status) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__ ((weak))
|
__attribute__((weak)) void i2c_init(void) {
|
||||||
void i2c_init(void)
|
|
||||||
{
|
|
||||||
// Try releasing special pins for a short time
|
// Try releasing special pins for a short time
|
||||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT);
|
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT);
|
||||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT);
|
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT);
|
||||||
@ -78,37 +72,32 @@ void i2c_init(void)
|
|||||||
// i2cInit(); //This is invoked by halInit() so no need to redo it.
|
// i2cInit(); //This is invoked by halInit() so no need to redo it.
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_start(uint8_t address)
|
i2c_status_t i2c_start(uint8_t address) {
|
||||||
{
|
|
||||||
i2c_address = address;
|
i2c_address = address;
|
||||||
i2cStart(&I2C_DRIVER, &i2cconfig);
|
i2cStart(&I2C_DRIVER, &i2cconfig);
|
||||||
return I2C_STATUS_SUCCESS;
|
return I2C_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout)
|
i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||||
{
|
|
||||||
i2c_address = address;
|
i2c_address = address;
|
||||||
i2cStart(&I2C_DRIVER, &i2cconfig);
|
i2cStart(&I2C_DRIVER, &i2cconfig);
|
||||||
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
|
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
|
||||||
return chibios_to_qmk(&status);
|
return chibios_to_qmk(&status);
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
|
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||||
{
|
|
||||||
i2c_address = address;
|
i2c_address = address;
|
||||||
i2cStart(&I2C_DRIVER, &i2cconfig);
|
i2cStart(&I2C_DRIVER, &i2cconfig);
|
||||||
msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
|
msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
|
||||||
return chibios_to_qmk(&status);
|
return chibios_to_qmk(&status);
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout)
|
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||||
{
|
|
||||||
i2c_address = devaddr;
|
i2c_address = devaddr;
|
||||||
i2cStart(&I2C_DRIVER, &i2cconfig);
|
i2cStart(&I2C_DRIVER, &i2cconfig);
|
||||||
|
|
||||||
uint8_t complete_packet[length + 1];
|
uint8_t complete_packet[length + 1];
|
||||||
for(uint8_t i = 0; i < length; i++)
|
for (uint8_t i = 0; i < length; i++) {
|
||||||
{
|
|
||||||
complete_packet[i + 1] = data[i];
|
complete_packet[i + 1] = data[i];
|
||||||
}
|
}
|
||||||
complete_packet[0] = regaddr;
|
complete_packet[0] = regaddr;
|
||||||
@ -117,15 +106,11 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data,
|
|||||||
return chibios_to_qmk(&status);
|
return chibios_to_qmk(&status);
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
|
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) {
|
||||||
{
|
|
||||||
i2c_address = devaddr;
|
i2c_address = devaddr;
|
||||||
i2cStart(&I2C_DRIVER, &i2cconfig);
|
i2cStart(&I2C_DRIVER, &i2cconfig);
|
||||||
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®addr, 1, data, length, MS2ST(timeout));
|
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®addr, 1, data, length, MS2ST(timeout));
|
||||||
return chibios_to_qmk(&status);
|
return chibios_to_qmk(&status);
|
||||||
}
|
}
|
||||||
|
|
||||||
void i2c_stop(void)
|
void i2c_stop(void) { i2cStop(&I2C_DRIVER); }
|
||||||
{
|
|
||||||
i2cStop(&I2C_DRIVER);
|
|
||||||
}
|
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
|
||||||
|
|
||||||
#if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32L0xx) || defined(STM32L1xx)
|
#if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32L0xx) || defined(STM32L1xx)
|
||||||
# define USE_I2CV1
|
# define USE_I2CV1
|
||||||
#endif
|
#endif
|
||||||
|
@ -21,23 +21,14 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "analog.h"
|
#include "analog.h"
|
||||||
|
|
||||||
|
|
||||||
static uint8_t aref = (1 << REFS0); // default to AREF = Vcc
|
static uint8_t aref = (1 << REFS0); // default to AREF = Vcc
|
||||||
|
|
||||||
|
void analogReference(uint8_t mode) { aref = mode & 0xC0; }
|
||||||
void analogReference(uint8_t mode)
|
|
||||||
{
|
|
||||||
aref = mode & 0xC0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Arduino compatible pin input
|
// Arduino compatible pin input
|
||||||
int16_t analogRead(uint8_t pin)
|
int16_t analogRead(uint8_t pin) {
|
||||||
{
|
|
||||||
#if defined(__AVR_ATmega32U4__)
|
#if defined(__AVR_ATmega32U4__)
|
||||||
static const uint8_t PROGMEM pin_to_mux[] = {
|
static const uint8_t PROGMEM pin_to_mux[] = {0x00, 0x01, 0x04, 0x05, 0x06, 0x07, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20};
|
||||||
0x00, 0x01, 0x04, 0x05, 0x06, 0x07,
|
|
||||||
0x25, 0x24, 0x23, 0x22, 0x21, 0x20};
|
|
||||||
if (pin >= 12) return 0;
|
if (pin >= 12) return 0;
|
||||||
return adc_read(pgm_read_byte(pin_to_mux + pin));
|
return adc_read(pgm_read_byte(pin_to_mux + pin));
|
||||||
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
|
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
|
||||||
@ -49,8 +40,7 @@ int16_t analogRead(uint8_t pin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Mux input
|
// Mux input
|
||||||
int16_t adc_read(uint8_t mux)
|
int16_t adc_read(uint8_t mux) {
|
||||||
{
|
|
||||||
#if defined(__AVR_AT90USB162__)
|
#if defined(__AVR_AT90USB162__)
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
@ -60,10 +50,9 @@ int16_t adc_read(uint8_t mux)
|
|||||||
ADCSRB = (1 << ADHSM) | (mux & 0x20); // high speed mode
|
ADCSRB = (1 << ADHSM) | (mux & 0x20); // high speed mode
|
||||||
ADMUX = aref | (mux & 0x1F); // configure mux input
|
ADMUX = aref | (mux & 0x1F); // configure mux input
|
||||||
ADCSRA = (1 << ADEN) | ADC_PRESCALER | (1 << ADSC); // start the conversion
|
ADCSRA = (1 << ADEN) | ADC_PRESCALER | (1 << ADSC); // start the conversion
|
||||||
while (ADCSRA & (1<<ADSC)) ; // wait for result
|
while (ADCSRA & (1 << ADSC))
|
||||||
|
; // wait for result
|
||||||
low = ADCL; // must read LSB first
|
low = ADCL; // must read LSB first
|
||||||
return (ADCH << 8) | low; // must read MSB only once!
|
return (ADCH << 8) | low; // must read MSB only once!
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
11
drivers/avr/apa102.c
Executable file → Normal file
11
drivers/avr/apa102.c
Executable file → Normal file
@ -27,9 +27,7 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
// Setleds for standard RGB
|
// Setleds for standard RGB
|
||||||
void inline apa102_setleds(LED_TYPE *ledarray, uint16_t leds){
|
void inline apa102_setleds(LED_TYPE *ledarray, uint16_t leds) { apa102_setleds_pin(ledarray, leds, _BV(RGB_DI_PIN & 0xF), _BV(RGB_CLK_PIN & 0xF)); }
|
||||||
apa102_setleds_pin(ledarray,leds, _BV(RGB_DI_PIN & 0xF), _BV(RGB_CLK_PIN & 0xF));
|
|
||||||
}
|
|
||||||
|
|
||||||
void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK) {
|
void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK) {
|
||||||
pinMode(RGB_DI_PIN, PinDirectionOutput);
|
pinMode(RGB_DI_PIN, PinDirectionOutput);
|
||||||
@ -54,12 +52,9 @@ void apa102_send_frame(uint32_t frame){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void apa102_start_frame(){
|
void apa102_start_frame() { apa102_send_frame(0); }
|
||||||
apa102_send_frame(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void apa102_end_frame(uint16_t leds)
|
void apa102_end_frame(uint16_t leds) {
|
||||||
{
|
|
||||||
// This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h
|
// This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h
|
||||||
// and adapted. The code is MIT licensed. I think thats compatible?
|
// and adapted. The code is MIT licensed. I think thats compatible?
|
||||||
|
|
||||||
|
1
drivers/avr/apa102.h
Executable file → Normal file
1
drivers/avr/apa102.h
Executable file → Normal file
@ -27,7 +27,6 @@
|
|||||||
|
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
|
|
||||||
|
|
||||||
/* User Interface
|
/* User Interface
|
||||||
*
|
*
|
||||||
* Input:
|
* Input:
|
||||||
|
@ -16,261 +16,19 @@
|
|||||||
// Standard ASCII 5x7 font
|
// Standard ASCII 5x7 font
|
||||||
|
|
||||||
static const unsigned char font[] PROGMEM = {
|
static const unsigned char font[] PROGMEM = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x18, 0x3C, 0x18, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x18, 0x24, 0x18, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x26, 0x29, 0x79, 0x29, 0x26, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x60, 0x60, 0x60, 0x60, 0x60, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x20, 0x10, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C,
|
||||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
|
0x30, 0x38, 0x3E, 0x38, 0x30, 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x23, 0x13, 0x08, 0x64, 0x62, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x80, 0x70, 0x30, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x60, 0x60, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x72, 0x49, 0x49, 0x49, 0x46, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x27, 0x45, 0x45, 0x45, 0x39, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x41, 0x21, 0x11, 0x09, 0x07, 0x36, 0x49, 0x49, 0x49, 0x36, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00,
|
||||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
|
0x00, 0x08, 0x14, 0x22, 0x41, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x41, 0x22, 0x14, 0x08, 0x02, 0x01, 0x59, 0x09, 0x06, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x7F, 0x08, 0x14, 0x22, 0x41, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x26, 0x49, 0x49, 0x49, 0x32, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x63, 0x14, 0x08, 0x14, 0x63, 0x03, 0x04, 0x78, 0x04, 0x03,
|
||||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C,
|
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x04, 0x02, 0x01, 0x02, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x03, 0x07, 0x08, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x38, 0x44, 0x44, 0x44, 0x28, 0x38, 0x44, 0x44, 0x28, 0x7F, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x38, 0x44, 0x44, 0x44, 0x38, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x48, 0x54, 0x54, 0x54, 0x24, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x3C, 0x40, 0x30, 0x40, 0x3C,
|
||||||
0x18, 0x3C, 0x7E, 0x3C, 0x18,
|
0x44, 0x28, 0x10, 0x28, 0x44, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x41, 0x36, 0x08, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x1E, 0xA1, 0xA1, 0x61, 0x12, 0x3A, 0x40, 0x40, 0x20, 0x7A, 0x38, 0x54, 0x54, 0x55, 0x59, 0x21, 0x55, 0x55, 0x79, 0x41, 0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut
|
||||||
0x1C, 0x57, 0x7D, 0x57, 0x1C,
|
0x21, 0x55, 0x54, 0x78, 0x40, 0x20, 0x54, 0x55, 0x79, 0x40, 0x0C, 0x1E, 0x52, 0x72, 0x12, 0x39, 0x55, 0x55, 0x55, 0x59, 0x39, 0x54, 0x54, 0x54, 0x59, 0x39, 0x55, 0x54, 0x54, 0x58, 0x00, 0x00, 0x45, 0x7C, 0x41, 0x00, 0x02, 0x45, 0x7D, 0x42, 0x00, 0x01, 0x45, 0x7C, 0x40, 0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut
|
||||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C,
|
0xF0, 0x28, 0x25, 0x28, 0xF0, 0x7C, 0x54, 0x55, 0x45, 0x00, 0x20, 0x54, 0x54, 0x7C, 0x54, 0x7C, 0x0A, 0x09, 0x7F, 0x49, 0x32, 0x49, 0x49, 0x49, 0x32, 0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut
|
||||||
0x00, 0x18, 0x3C, 0x18, 0x00,
|
0x32, 0x4A, 0x48, 0x48, 0x30, 0x3A, 0x41, 0x41, 0x21, 0x7A, 0x3A, 0x42, 0x40, 0x20, 0x78, 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut
|
||||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF,
|
0x3D, 0x40, 0x40, 0x40, 0x3D, 0x3C, 0x24, 0xFF, 0x24, 0x24, 0x48, 0x7E, 0x49, 0x43, 0x66, 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 0xFF, 0x09, 0x29, 0xF6, 0x20, 0xC0, 0x88, 0x7E, 0x09, 0x03, 0x20, 0x54, 0x54, 0x79, 0x41, 0x00, 0x00, 0x44, 0x7D, 0x41, 0x30, 0x48, 0x48, 0x4A, 0x32, 0x38, 0x40, 0x40, 0x22, 0x7A, 0x00, 0x7A, 0x0A, 0x0A, 0x72, 0x7D, 0x0D, 0x19, 0x31, 0x7D, 0x26, 0x29, 0x29, 0x2F, 0x28, 0x26, 0x29, 0x29, 0x29, 0x26, 0x30, 0x48, 0x4D, 0x40, 0x20, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x38, 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 0x2F, 0x10, 0x28, 0x34, 0xFA, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x08, 0x14, 0x2A, 0x14, 0x22, 0x22, 0x14, 0x2A, 0x14, 0x08, 0x55, 0x00, 0x55, 0x00, 0x55, // #176 (25% block) missing in old code
|
||||||
0x00, 0x18, 0x24, 0x18, 0x00,
|
|
||||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF,
|
|
||||||
0x30, 0x48, 0x3A, 0x06, 0x0E,
|
|
||||||
0x26, 0x29, 0x79, 0x29, 0x26,
|
|
||||||
0x40, 0x7F, 0x05, 0x05, 0x07,
|
|
||||||
0x40, 0x7F, 0x05, 0x25, 0x3F,
|
|
||||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A,
|
|
||||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08,
|
|
||||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F,
|
|
||||||
0x14, 0x22, 0x7F, 0x22, 0x14,
|
|
||||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F,
|
|
||||||
0x06, 0x09, 0x7F, 0x01, 0x7F,
|
|
||||||
0x00, 0x66, 0x89, 0x95, 0x6A,
|
|
||||||
0x60, 0x60, 0x60, 0x60, 0x60,
|
|
||||||
0x94, 0xA2, 0xFF, 0xA2, 0x94,
|
|
||||||
0x08, 0x04, 0x7E, 0x04, 0x08,
|
|
||||||
0x10, 0x20, 0x7E, 0x20, 0x10,
|
|
||||||
0x08, 0x08, 0x2A, 0x1C, 0x08,
|
|
||||||
0x08, 0x1C, 0x2A, 0x08, 0x08,
|
|
||||||
0x1E, 0x10, 0x10, 0x10, 0x10,
|
|
||||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C,
|
|
||||||
0x30, 0x38, 0x3E, 0x38, 0x30,
|
|
||||||
0x06, 0x0E, 0x3E, 0x0E, 0x06,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x5F, 0x00, 0x00,
|
|
||||||
0x00, 0x07, 0x00, 0x07, 0x00,
|
|
||||||
0x14, 0x7F, 0x14, 0x7F, 0x14,
|
|
||||||
0x24, 0x2A, 0x7F, 0x2A, 0x12,
|
|
||||||
0x23, 0x13, 0x08, 0x64, 0x62,
|
|
||||||
0x36, 0x49, 0x56, 0x20, 0x50,
|
|
||||||
0x00, 0x08, 0x07, 0x03, 0x00,
|
|
||||||
0x00, 0x1C, 0x22, 0x41, 0x00,
|
|
||||||
0x00, 0x41, 0x22, 0x1C, 0x00,
|
|
||||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A,
|
|
||||||
0x08, 0x08, 0x3E, 0x08, 0x08,
|
|
||||||
0x00, 0x80, 0x70, 0x30, 0x00,
|
|
||||||
0x08, 0x08, 0x08, 0x08, 0x08,
|
|
||||||
0x00, 0x00, 0x60, 0x60, 0x00,
|
|
||||||
0x20, 0x10, 0x08, 0x04, 0x02,
|
|
||||||
0x3E, 0x51, 0x49, 0x45, 0x3E,
|
|
||||||
0x00, 0x42, 0x7F, 0x40, 0x00,
|
|
||||||
0x72, 0x49, 0x49, 0x49, 0x46,
|
|
||||||
0x21, 0x41, 0x49, 0x4D, 0x33,
|
|
||||||
0x18, 0x14, 0x12, 0x7F, 0x10,
|
|
||||||
0x27, 0x45, 0x45, 0x45, 0x39,
|
|
||||||
0x3C, 0x4A, 0x49, 0x49, 0x31,
|
|
||||||
0x41, 0x21, 0x11, 0x09, 0x07,
|
|
||||||
0x36, 0x49, 0x49, 0x49, 0x36,
|
|
||||||
0x46, 0x49, 0x49, 0x29, 0x1E,
|
|
||||||
0x00, 0x00, 0x14, 0x00, 0x00,
|
|
||||||
0x00, 0x40, 0x34, 0x00, 0x00,
|
|
||||||
0x00, 0x08, 0x14, 0x22, 0x41,
|
|
||||||
0x14, 0x14, 0x14, 0x14, 0x14,
|
|
||||||
0x00, 0x41, 0x22, 0x14, 0x08,
|
|
||||||
0x02, 0x01, 0x59, 0x09, 0x06,
|
|
||||||
0x3E, 0x41, 0x5D, 0x59, 0x4E,
|
|
||||||
0x7C, 0x12, 0x11, 0x12, 0x7C,
|
|
||||||
0x7F, 0x49, 0x49, 0x49, 0x36,
|
|
||||||
0x3E, 0x41, 0x41, 0x41, 0x22,
|
|
||||||
0x7F, 0x41, 0x41, 0x41, 0x3E,
|
|
||||||
0x7F, 0x49, 0x49, 0x49, 0x41,
|
|
||||||
0x7F, 0x09, 0x09, 0x09, 0x01,
|
|
||||||
0x3E, 0x41, 0x41, 0x51, 0x73,
|
|
||||||
0x7F, 0x08, 0x08, 0x08, 0x7F,
|
|
||||||
0x00, 0x41, 0x7F, 0x41, 0x00,
|
|
||||||
0x20, 0x40, 0x41, 0x3F, 0x01,
|
|
||||||
0x7F, 0x08, 0x14, 0x22, 0x41,
|
|
||||||
0x7F, 0x40, 0x40, 0x40, 0x40,
|
|
||||||
0x7F, 0x02, 0x1C, 0x02, 0x7F,
|
|
||||||
0x7F, 0x04, 0x08, 0x10, 0x7F,
|
|
||||||
0x3E, 0x41, 0x41, 0x41, 0x3E,
|
|
||||||
0x7F, 0x09, 0x09, 0x09, 0x06,
|
|
||||||
0x3E, 0x41, 0x51, 0x21, 0x5E,
|
|
||||||
0x7F, 0x09, 0x19, 0x29, 0x46,
|
|
||||||
0x26, 0x49, 0x49, 0x49, 0x32,
|
|
||||||
0x03, 0x01, 0x7F, 0x01, 0x03,
|
|
||||||
0x3F, 0x40, 0x40, 0x40, 0x3F,
|
|
||||||
0x1F, 0x20, 0x40, 0x20, 0x1F,
|
|
||||||
0x3F, 0x40, 0x38, 0x40, 0x3F,
|
|
||||||
0x63, 0x14, 0x08, 0x14, 0x63,
|
|
||||||
0x03, 0x04, 0x78, 0x04, 0x03,
|
|
||||||
0x61, 0x59, 0x49, 0x4D, 0x43,
|
|
||||||
0x00, 0x7F, 0x41, 0x41, 0x41,
|
|
||||||
0x02, 0x04, 0x08, 0x10, 0x20,
|
|
||||||
0x00, 0x41, 0x41, 0x41, 0x7F,
|
|
||||||
0x04, 0x02, 0x01, 0x02, 0x04,
|
|
||||||
0x40, 0x40, 0x40, 0x40, 0x40,
|
|
||||||
0x00, 0x03, 0x07, 0x08, 0x00,
|
|
||||||
0x20, 0x54, 0x54, 0x78, 0x40,
|
|
||||||
0x7F, 0x28, 0x44, 0x44, 0x38,
|
|
||||||
0x38, 0x44, 0x44, 0x44, 0x28,
|
|
||||||
0x38, 0x44, 0x44, 0x28, 0x7F,
|
|
||||||
0x38, 0x54, 0x54, 0x54, 0x18,
|
|
||||||
0x00, 0x08, 0x7E, 0x09, 0x02,
|
|
||||||
0x18, 0xA4, 0xA4, 0x9C, 0x78,
|
|
||||||
0x7F, 0x08, 0x04, 0x04, 0x78,
|
|
||||||
0x00, 0x44, 0x7D, 0x40, 0x00,
|
|
||||||
0x20, 0x40, 0x40, 0x3D, 0x00,
|
|
||||||
0x7F, 0x10, 0x28, 0x44, 0x00,
|
|
||||||
0x00, 0x41, 0x7F, 0x40, 0x00,
|
|
||||||
0x7C, 0x04, 0x78, 0x04, 0x78,
|
|
||||||
0x7C, 0x08, 0x04, 0x04, 0x78,
|
|
||||||
0x38, 0x44, 0x44, 0x44, 0x38,
|
|
||||||
0xFC, 0x18, 0x24, 0x24, 0x18,
|
|
||||||
0x18, 0x24, 0x24, 0x18, 0xFC,
|
|
||||||
0x7C, 0x08, 0x04, 0x04, 0x08,
|
|
||||||
0x48, 0x54, 0x54, 0x54, 0x24,
|
|
||||||
0x04, 0x04, 0x3F, 0x44, 0x24,
|
|
||||||
0x3C, 0x40, 0x40, 0x20, 0x7C,
|
|
||||||
0x1C, 0x20, 0x40, 0x20, 0x1C,
|
|
||||||
0x3C, 0x40, 0x30, 0x40, 0x3C,
|
|
||||||
0x44, 0x28, 0x10, 0x28, 0x44,
|
|
||||||
0x4C, 0x90, 0x90, 0x90, 0x7C,
|
|
||||||
0x44, 0x64, 0x54, 0x4C, 0x44,
|
|
||||||
0x00, 0x08, 0x36, 0x41, 0x00,
|
|
||||||
0x00, 0x00, 0x77, 0x00, 0x00,
|
|
||||||
0x00, 0x41, 0x36, 0x08, 0x00,
|
|
||||||
0x02, 0x01, 0x02, 0x04, 0x02,
|
|
||||||
0x3C, 0x26, 0x23, 0x26, 0x3C,
|
|
||||||
0x1E, 0xA1, 0xA1, 0x61, 0x12,
|
|
||||||
0x3A, 0x40, 0x40, 0x20, 0x7A,
|
|
||||||
0x38, 0x54, 0x54, 0x55, 0x59,
|
|
||||||
0x21, 0x55, 0x55, 0x79, 0x41,
|
|
||||||
0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut
|
|
||||||
0x21, 0x55, 0x54, 0x78, 0x40,
|
|
||||||
0x20, 0x54, 0x55, 0x79, 0x40,
|
|
||||||
0x0C, 0x1E, 0x52, 0x72, 0x12,
|
|
||||||
0x39, 0x55, 0x55, 0x55, 0x59,
|
|
||||||
0x39, 0x54, 0x54, 0x54, 0x59,
|
|
||||||
0x39, 0x55, 0x54, 0x54, 0x58,
|
|
||||||
0x00, 0x00, 0x45, 0x7C, 0x41,
|
|
||||||
0x00, 0x02, 0x45, 0x7D, 0x42,
|
|
||||||
0x00, 0x01, 0x45, 0x7C, 0x40,
|
|
||||||
0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut
|
|
||||||
0xF0, 0x28, 0x25, 0x28, 0xF0,
|
|
||||||
0x7C, 0x54, 0x55, 0x45, 0x00,
|
|
||||||
0x20, 0x54, 0x54, 0x7C, 0x54,
|
|
||||||
0x7C, 0x0A, 0x09, 0x7F, 0x49,
|
|
||||||
0x32, 0x49, 0x49, 0x49, 0x32,
|
|
||||||
0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut
|
|
||||||
0x32, 0x4A, 0x48, 0x48, 0x30,
|
|
||||||
0x3A, 0x41, 0x41, 0x21, 0x7A,
|
|
||||||
0x3A, 0x42, 0x40, 0x20, 0x78,
|
|
||||||
0x00, 0x9D, 0xA0, 0xA0, 0x7D,
|
|
||||||
0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut
|
|
||||||
0x3D, 0x40, 0x40, 0x40, 0x3D,
|
|
||||||
0x3C, 0x24, 0xFF, 0x24, 0x24,
|
|
||||||
0x48, 0x7E, 0x49, 0x43, 0x66,
|
|
||||||
0x2B, 0x2F, 0xFC, 0x2F, 0x2B,
|
|
||||||
0xFF, 0x09, 0x29, 0xF6, 0x20,
|
|
||||||
0xC0, 0x88, 0x7E, 0x09, 0x03,
|
|
||||||
0x20, 0x54, 0x54, 0x79, 0x41,
|
|
||||||
0x00, 0x00, 0x44, 0x7D, 0x41,
|
|
||||||
0x30, 0x48, 0x48, 0x4A, 0x32,
|
|
||||||
0x38, 0x40, 0x40, 0x22, 0x7A,
|
|
||||||
0x00, 0x7A, 0x0A, 0x0A, 0x72,
|
|
||||||
0x7D, 0x0D, 0x19, 0x31, 0x7D,
|
|
||||||
0x26, 0x29, 0x29, 0x2F, 0x28,
|
|
||||||
0x26, 0x29, 0x29, 0x29, 0x26,
|
|
||||||
0x30, 0x48, 0x4D, 0x40, 0x20,
|
|
||||||
0x38, 0x08, 0x08, 0x08, 0x08,
|
|
||||||
0x08, 0x08, 0x08, 0x08, 0x38,
|
|
||||||
0x2F, 0x10, 0xC8, 0xAC, 0xBA,
|
|
||||||
0x2F, 0x10, 0x28, 0x34, 0xFA,
|
|
||||||
0x00, 0x00, 0x7B, 0x00, 0x00,
|
|
||||||
0x08, 0x14, 0x2A, 0x14, 0x22,
|
|
||||||
0x22, 0x14, 0x2A, 0x14, 0x08,
|
|
||||||
0x55, 0x00, 0x55, 0x00, 0x55, // #176 (25% block) missing in old code
|
|
||||||
0xAA, 0x55, 0xAA, 0x55, 0xAA, // 50% block
|
0xAA, 0x55, 0xAA, 0x55, 0xAA, // 50% block
|
||||||
0xFF, 0x55, 0xFF, 0x55, 0xFF, // 75% block
|
0xFF, 0x55, 0xFF, 0x55, 0xFF, // 75% block
|
||||||
0x00, 0x00, 0x00, 0xFF, 0x00,
|
0x00, 0x00, 0x00, 0xFF, 0x00, 0x10, 0x10, 0x10, 0xFF, 0x00, 0x14, 0x14, 0x14, 0xFF, 0x00, 0x10, 0x10, 0xFF, 0x00, 0xFF, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x14, 0x14, 0x14, 0xFC, 0x00, 0x14, 0x14, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x14, 0x14, 0xF4, 0x04, 0xFC, 0x14, 0x14, 0x17, 0x10, 0x1F, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0x1F, 0x00, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x14, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x1F, 0x10, 0x17, 0x00, 0x00, 0xFC, 0x04, 0xF4, 0x14, 0x14, 0x17, 0x10, 0x17, 0x14, 0x14, 0xF4, 0x04, 0xF4, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xF7, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x17, 0x14, 0x10, 0x10, 0x1F, 0x10, 0x1F,
|
||||||
0x10, 0x10, 0x10, 0xFF, 0x00,
|
0x14, 0x14, 0x14, 0xF4, 0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38, 0x44, 0x44, 0x38, 0x44, 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta
|
||||||
0x14, 0x14, 0x14, 0xFF, 0x00,
|
0x7E, 0x02, 0x02, 0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63, 0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02, 0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30, 0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49, 0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44, 0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E, 0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP
|
||||||
0x10, 0x10, 0xFF, 0x00, 0xFF,
|
|
||||||
0x10, 0x10, 0xF0, 0x10, 0xF0,
|
|
||||||
0x14, 0x14, 0x14, 0xFC, 0x00,
|
|
||||||
0x14, 0x14, 0xF7, 0x00, 0xFF,
|
|
||||||
0x00, 0x00, 0xFF, 0x00, 0xFF,
|
|
||||||
0x14, 0x14, 0xF4, 0x04, 0xFC,
|
|
||||||
0x14, 0x14, 0x17, 0x10, 0x1F,
|
|
||||||
0x10, 0x10, 0x1F, 0x10, 0x1F,
|
|
||||||
0x14, 0x14, 0x14, 0x1F, 0x00,
|
|
||||||
0x10, 0x10, 0x10, 0xF0, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x1F, 0x10,
|
|
||||||
0x10, 0x10, 0x10, 0x1F, 0x10,
|
|
||||||
0x10, 0x10, 0x10, 0xF0, 0x10,
|
|
||||||
0x00, 0x00, 0x00, 0xFF, 0x10,
|
|
||||||
0x10, 0x10, 0x10, 0x10, 0x10,
|
|
||||||
0x10, 0x10, 0x10, 0xFF, 0x10,
|
|
||||||
0x00, 0x00, 0x00, 0xFF, 0x14,
|
|
||||||
0x00, 0x00, 0xFF, 0x00, 0xFF,
|
|
||||||
0x00, 0x00, 0x1F, 0x10, 0x17,
|
|
||||||
0x00, 0x00, 0xFC, 0x04, 0xF4,
|
|
||||||
0x14, 0x14, 0x17, 0x10, 0x17,
|
|
||||||
0x14, 0x14, 0xF4, 0x04, 0xF4,
|
|
||||||
0x00, 0x00, 0xFF, 0x00, 0xF7,
|
|
||||||
0x14, 0x14, 0x14, 0x14, 0x14,
|
|
||||||
0x14, 0x14, 0xF7, 0x00, 0xF7,
|
|
||||||
0x14, 0x14, 0x14, 0x17, 0x14,
|
|
||||||
0x10, 0x10, 0x1F, 0x10, 0x1F,
|
|
||||||
0x14, 0x14, 0x14, 0xF4, 0x14,
|
|
||||||
0x10, 0x10, 0xF0, 0x10, 0xF0,
|
|
||||||
0x00, 0x00, 0x1F, 0x10, 0x1F,
|
|
||||||
0x00, 0x00, 0x00, 0x1F, 0x14,
|
|
||||||
0x00, 0x00, 0x00, 0xFC, 0x14,
|
|
||||||
0x00, 0x00, 0xF0, 0x10, 0xF0,
|
|
||||||
0x10, 0x10, 0xFF, 0x10, 0xFF,
|
|
||||||
0x14, 0x14, 0x14, 0xFF, 0x14,
|
|
||||||
0x10, 0x10, 0x10, 0x1F, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0xF0, 0x10,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
||||||
0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
|
|
||||||
0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0xFF, 0xFF,
|
|
||||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
|
|
||||||
0x38, 0x44, 0x44, 0x38, 0x44,
|
|
||||||
0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta
|
|
||||||
0x7E, 0x02, 0x02, 0x06, 0x06,
|
|
||||||
0x02, 0x7E, 0x02, 0x7E, 0x02,
|
|
||||||
0x63, 0x55, 0x49, 0x41, 0x63,
|
|
||||||
0x38, 0x44, 0x44, 0x3C, 0x04,
|
|
||||||
0x40, 0x7E, 0x20, 0x1E, 0x20,
|
|
||||||
0x06, 0x02, 0x7E, 0x02, 0x02,
|
|
||||||
0x99, 0xA5, 0xE7, 0xA5, 0x99,
|
|
||||||
0x1C, 0x2A, 0x49, 0x2A, 0x1C,
|
|
||||||
0x4C, 0x72, 0x01, 0x72, 0x4C,
|
|
||||||
0x30, 0x4A, 0x4D, 0x4D, 0x30,
|
|
||||||
0x30, 0x48, 0x78, 0x48, 0x30,
|
|
||||||
0xBC, 0x62, 0x5A, 0x46, 0x3D,
|
|
||||||
0x3E, 0x49, 0x49, 0x49, 0x00,
|
|
||||||
0x7E, 0x01, 0x01, 0x01, 0x7E,
|
|
||||||
0x2A, 0x2A, 0x2A, 0x2A, 0x2A,
|
|
||||||
0x44, 0x44, 0x5F, 0x44, 0x44,
|
|
||||||
0x40, 0x51, 0x4A, 0x44, 0x40,
|
|
||||||
0x40, 0x44, 0x4A, 0x51, 0x40,
|
|
||||||
0x00, 0x00, 0xFF, 0x01, 0x03,
|
|
||||||
0xE0, 0x80, 0xFF, 0x00, 0x00,
|
|
||||||
0x08, 0x08, 0x6B, 0x6B, 0x08,
|
|
||||||
0x36, 0x12, 0x36, 0x24, 0x36,
|
|
||||||
0x06, 0x0F, 0x09, 0x0F, 0x06,
|
|
||||||
0x00, 0x00, 0x18, 0x18, 0x00,
|
|
||||||
0x00, 0x00, 0x10, 0x10, 0x00,
|
|
||||||
0x30, 0x40, 0xFF, 0x01, 0x01,
|
|
||||||
0x00, 0x1F, 0x01, 0x01, 0x1E,
|
|
||||||
0x00, 0x19, 0x1D, 0x17, 0x12,
|
|
||||||
0x00, 0x3C, 0x3C, 0x3C, 0x3C,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP
|
|
||||||
};
|
};
|
||||||
#endif // FONT5X7_H
|
#endif // FONT5X7_H
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
# define PIN(x) (*(&x - 2)) /* address of input register of port x */
|
# define PIN(x) (*(&x - 2)) /* address of input register of port x */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if LCD_IO_MODE
|
#if LCD_IO_MODE
|
||||||
# define lcd_e_delay() _delay_us(LCD_DELAY_ENABLE_PULSE)
|
# define lcd_e_delay() _delay_us(LCD_DELAY_ENABLE_PULSE)
|
||||||
# define lcd_e_high() LCD_E_PORT |= _BV(LCD_E_PIN);
|
# define lcd_e_high() LCD_E_PORT |= _BV(LCD_E_PIN);
|
||||||
@ -87,25 +86,21 @@ static void toggle_e(void);
|
|||||||
** local functions
|
** local functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
delay for a minimum of <us> microseconds
|
delay for a minimum of <us> microseconds
|
||||||
the number of loops is calculated at compile-time from MCU clock frequency
|
the number of loops is calculated at compile-time from MCU clock frequency
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
#define delay(us) _delay_us(us)
|
#define delay(us) _delay_us(us)
|
||||||
|
|
||||||
|
|
||||||
#if LCD_IO_MODE
|
#if LCD_IO_MODE
|
||||||
/* toggle Enable Pin to initiate write */
|
/* toggle Enable Pin to initiate write */
|
||||||
static void toggle_e(void)
|
static void toggle_e(void) {
|
||||||
{
|
|
||||||
lcd_e_high();
|
lcd_e_high();
|
||||||
lcd_e_delay();
|
lcd_e_delay();
|
||||||
lcd_e_low();
|
lcd_e_low();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Low-level function to write byte to LCD controller
|
Low-level function to write byte to LCD controller
|
||||||
Input: data byte to write to LCD
|
Input: data byte to write to LCD
|
||||||
@ -114,11 +109,9 @@ Input: data byte to write to LCD
|
|||||||
Returns: none
|
Returns: none
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
#if LCD_IO_MODE
|
#if LCD_IO_MODE
|
||||||
static void lcd_write(uint8_t data,uint8_t rs)
|
static void lcd_write(uint8_t data, uint8_t rs) {
|
||||||
{
|
|
||||||
unsigned char dataBits;
|
unsigned char dataBits;
|
||||||
|
|
||||||
|
|
||||||
if (rs) { /* write data (RS=1, RW=0) */
|
if (rs) { /* write data (RS=1, RW=0) */
|
||||||
lcd_rs_high();
|
lcd_rs_high();
|
||||||
} else { /* write instruction (RS=0, RW=0) */
|
} else { /* write instruction (RS=0, RW=0) */
|
||||||
@ -126,9 +119,7 @@ static void lcd_write(uint8_t data,uint8_t rs)
|
|||||||
}
|
}
|
||||||
lcd_rw_low(); /* RW=0 write mode */
|
lcd_rw_low(); /* RW=0 write mode */
|
||||||
|
|
||||||
if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
if ((&LCD_DATA0_PORT == &LCD_DATA1_PORT) && (&LCD_DATA1_PORT == &LCD_DATA2_PORT) && (&LCD_DATA2_PORT == &LCD_DATA3_PORT) && (LCD_DATA0_PIN == 0) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3)) {
|
||||||
&& (LCD_DATA0_PIN == 0) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) )
|
|
||||||
{
|
|
||||||
/* configure data pins as output */
|
/* configure data pins as output */
|
||||||
DDR(LCD_DATA0_PORT) |= 0x0F;
|
DDR(LCD_DATA0_PORT) |= 0x0F;
|
||||||
|
|
||||||
@ -143,9 +134,7 @@ static void lcd_write(uint8_t data,uint8_t rs)
|
|||||||
|
|
||||||
/* all data pins high (inactive) */
|
/* all data pins high (inactive) */
|
||||||
LCD_DATA0_PORT = dataBits | 0x0F;
|
LCD_DATA0_PORT = dataBits | 0x0F;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
/* configure data pins as output */
|
/* configure data pins as output */
|
||||||
DDR(LCD_DATA0_PORT) |= _BV(LCD_DATA0_PIN);
|
DDR(LCD_DATA0_PORT) |= _BV(LCD_DATA0_PIN);
|
||||||
DDR(LCD_DATA1_PORT) |= _BV(LCD_DATA1_PIN);
|
DDR(LCD_DATA1_PORT) |= _BV(LCD_DATA1_PIN);
|
||||||
@ -182,12 +171,15 @@ static void lcd_write(uint8_t data,uint8_t rs)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define lcd_write(d,rs) if (rs) *(volatile uint8_t*)(LCD_IO_DATA) = d; else *(volatile uint8_t*)(LCD_IO_FUNCTION) = d;
|
# define lcd_write(d, rs) \
|
||||||
|
if (rs) \
|
||||||
|
*(volatile uint8_t *)(LCD_IO_DATA) = d; \
|
||||||
|
else \
|
||||||
|
*(volatile uint8_t *)(LCD_IO_FUNCTION) = d;
|
||||||
/* rs==0 -> write instruction to LCD_IO_FUNCTION */
|
/* rs==0 -> write instruction to LCD_IO_FUNCTION */
|
||||||
/* rs==1 -> write data to LCD_IO_DATA */
|
/* rs==1 -> write data to LCD_IO_DATA */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Low-level function to read byte from LCD controller
|
Low-level function to read byte from LCD controller
|
||||||
Input: rs 1: read data
|
Input: rs 1: read data
|
||||||
@ -195,20 +187,16 @@ Input: rs 1: read data
|
|||||||
Returns: byte read from LCD controller
|
Returns: byte read from LCD controller
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
#if LCD_IO_MODE
|
#if LCD_IO_MODE
|
||||||
static uint8_t lcd_read(uint8_t rs)
|
static uint8_t lcd_read(uint8_t rs) {
|
||||||
{
|
|
||||||
uint8_t data;
|
uint8_t data;
|
||||||
|
|
||||||
|
|
||||||
if (rs)
|
if (rs)
|
||||||
lcd_rs_high(); /* RS=1: read data */
|
lcd_rs_high(); /* RS=1: read data */
|
||||||
else
|
else
|
||||||
lcd_rs_low(); /* RS=0: read busy flag */
|
lcd_rs_low(); /* RS=0: read busy flag */
|
||||||
lcd_rw_high(); /* RW=1 read mode */
|
lcd_rw_high(); /* RW=1 read mode */
|
||||||
|
|
||||||
if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
if ((&LCD_DATA0_PORT == &LCD_DATA1_PORT) && (&LCD_DATA1_PORT == &LCD_DATA2_PORT) && (&LCD_DATA2_PORT == &LCD_DATA3_PORT) && (LCD_DATA0_PIN == 0) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3)) {
|
||||||
&& ( LCD_DATA0_PIN == 0 )&& (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) )
|
|
||||||
{
|
|
||||||
DDR(LCD_DATA0_PORT) &= 0xF0; /* configure data pins as input */
|
DDR(LCD_DATA0_PORT) &= 0xF0; /* configure data pins as input */
|
||||||
|
|
||||||
lcd_e_high();
|
lcd_e_high();
|
||||||
@ -222,9 +210,7 @@ static uint8_t lcd_read(uint8_t rs)
|
|||||||
lcd_e_delay();
|
lcd_e_delay();
|
||||||
data |= PIN(LCD_DATA0_PORT) & 0x0F; /* read low nibble */
|
data |= PIN(LCD_DATA0_PORT) & 0x0F; /* read low nibble */
|
||||||
lcd_e_low();
|
lcd_e_low();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
/* configure data pins as input */
|
/* configure data pins as input */
|
||||||
DDR(LCD_DATA0_PORT) &= ~_BV(LCD_DATA0_PIN);
|
DDR(LCD_DATA0_PORT) &= ~_BV(LCD_DATA0_PIN);
|
||||||
DDR(LCD_DATA1_PORT) &= ~_BV(LCD_DATA1_PIN);
|
DDR(LCD_DATA1_PORT) &= ~_BV(LCD_DATA1_PIN);
|
||||||
@ -260,7 +246,6 @@ static uint8_t lcd_read(uint8_t rs)
|
|||||||
/* rs==1 -> read data from LCD_IO_DATA */
|
/* rs==1 -> read data from LCD_IO_DATA */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
loops while lcd is busy, returns address counter
|
loops while lcd is busy, returns address counter
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
@ -270,7 +255,8 @@ static uint8_t lcd_waitbusy(void)
|
|||||||
register uint8_t c;
|
register uint8_t c;
|
||||||
|
|
||||||
/* wait until busy flag is cleared */
|
/* wait until busy flag is cleared */
|
||||||
while ( (c=lcd_read(0)) & (1<<LCD_BUSY)) {}
|
while ((c = lcd_read(0)) & (1 << LCD_BUSY)) {
|
||||||
|
}
|
||||||
|
|
||||||
/* the address counter is updated 4us after the busy flag is cleared */
|
/* the address counter is updated 4us after the busy flag is cleared */
|
||||||
delay(LCD_DELAY_BUSY_FLAG);
|
delay(LCD_DELAY_BUSY_FLAG);
|
||||||
@ -280,16 +266,13 @@ static uint8_t lcd_waitbusy(void)
|
|||||||
|
|
||||||
} /* lcd_waitbusy */
|
} /* lcd_waitbusy */
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Move cursor to the start of next line or to the first line if the cursor
|
Move cursor to the start of next line or to the first line if the cursor
|
||||||
is already on the last line.
|
is already on the last line.
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
static inline void lcd_newline(uint8_t pos)
|
static inline void lcd_newline(uint8_t pos) {
|
||||||
{
|
|
||||||
register uint8_t addressCounter;
|
register uint8_t addressCounter;
|
||||||
|
|
||||||
|
|
||||||
#if LCD_LINES == 1
|
#if LCD_LINES == 1
|
||||||
addressCounter = 0;
|
addressCounter = 0;
|
||||||
#endif
|
#endif
|
||||||
@ -324,7 +307,6 @@ static inline void lcd_newline(uint8_t pos)
|
|||||||
|
|
||||||
} /* lcd_newline */
|
} /* lcd_newline */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** PUBLIC FUNCTIONS
|
** PUBLIC FUNCTIONS
|
||||||
*/
|
*/
|
||||||
@ -334,34 +316,28 @@ Send LCD controller instruction command
|
|||||||
Input: instruction to send to LCD controller, see HD44780 data sheet
|
Input: instruction to send to LCD controller, see HD44780 data sheet
|
||||||
Returns: none
|
Returns: none
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
void lcd_command(uint8_t cmd)
|
void lcd_command(uint8_t cmd) {
|
||||||
{
|
|
||||||
lcd_waitbusy();
|
lcd_waitbusy();
|
||||||
lcd_write(cmd, 0);
|
lcd_write(cmd, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Send data byte to LCD controller
|
Send data byte to LCD controller
|
||||||
Input: data to send to LCD controller, see HD44780 data sheet
|
Input: data to send to LCD controller, see HD44780 data sheet
|
||||||
Returns: none
|
Returns: none
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
void lcd_data(uint8_t data)
|
void lcd_data(uint8_t data) {
|
||||||
{
|
|
||||||
lcd_waitbusy();
|
lcd_waitbusy();
|
||||||
lcd_write(data, 1);
|
lcd_write(data, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Set cursor to specified position
|
Set cursor to specified position
|
||||||
Input: x horizontal position (0: left most position)
|
Input: x horizontal position (0: left most position)
|
||||||
y vertical position (0: first line)
|
y vertical position (0: first line)
|
||||||
Returns: none
|
Returns: none
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
void lcd_gotoxy(uint8_t x, uint8_t y)
|
void lcd_gotoxy(uint8_t x, uint8_t y) {
|
||||||
{
|
|
||||||
#if LCD_LINES == 1
|
#if LCD_LINES == 1
|
||||||
lcd_command((1 << LCD_DDRAM) + LCD_START_LINE1 + x);
|
lcd_command((1 << LCD_DDRAM) + LCD_START_LINE1 + x);
|
||||||
#endif
|
#endif
|
||||||
@ -384,50 +360,32 @@ void lcd_gotoxy(uint8_t x, uint8_t y)
|
|||||||
|
|
||||||
} /* lcd_gotoxy */
|
} /* lcd_gotoxy */
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
int lcd_getxy(void)
|
int lcd_getxy(void) { return lcd_waitbusy(); }
|
||||||
{
|
|
||||||
return lcd_waitbusy();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Clear display and set cursor to home position
|
Clear display and set cursor to home position
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
void lcd_clrscr(void)
|
void lcd_clrscr(void) { lcd_command(1 << LCD_CLR); }
|
||||||
{
|
|
||||||
lcd_command(1<<LCD_CLR);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Set cursor to home position
|
Set cursor to home position
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
void lcd_home(void)
|
void lcd_home(void) { lcd_command(1 << LCD_HOME); }
|
||||||
{
|
|
||||||
lcd_command(1<<LCD_HOME);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Display character at current cursor position
|
Display character at current cursor position
|
||||||
Input: character to be displayed
|
Input: character to be displayed
|
||||||
Returns: none
|
Returns: none
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
void lcd_putc(char c)
|
void lcd_putc(char c) {
|
||||||
{
|
|
||||||
uint8_t pos;
|
uint8_t pos;
|
||||||
|
|
||||||
|
|
||||||
pos = lcd_waitbusy(); // read busy-flag and address counter
|
pos = lcd_waitbusy(); // read busy-flag and address counter
|
||||||
if (c=='\n')
|
if (c == '\n') {
|
||||||
{
|
|
||||||
lcd_newline(pos);
|
lcd_newline(pos);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
#if LCD_WRAP_LINES == 1
|
#if LCD_WRAP_LINES == 1
|
||||||
# if LCD_LINES == 1
|
# if LCD_LINES == 1
|
||||||
if (pos == LCD_START_LINE1 + LCD_DISP_LENGTH) {
|
if (pos == LCD_START_LINE1 + LCD_DISP_LENGTH) {
|
||||||
@ -457,7 +415,6 @@ void lcd_putc(char c)
|
|||||||
|
|
||||||
} /* lcd_putc */
|
} /* lcd_putc */
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Display string without auto linefeed
|
Display string without auto linefeed
|
||||||
Input: string to be displayed
|
Input: string to be displayed
|
||||||
@ -474,7 +431,6 @@ void lcd_puts(const char *s)
|
|||||||
|
|
||||||
} /* lcd_puts */
|
} /* lcd_puts */
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Display string from program memory without auto linefeed
|
Display string from program memory without auto linefeed
|
||||||
Input: string from program memory be be displayed
|
Input: string from program memory be be displayed
|
||||||
@ -491,7 +447,6 @@ void lcd_puts_p(const char *progmem_s)
|
|||||||
|
|
||||||
} /* lcd_puts_p */
|
} /* lcd_puts_p */
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Initialize display and select type of cursor
|
Initialize display and select type of cursor
|
||||||
Input: dispAttr LCD_DISP_OFF display off
|
Input: dispAttr LCD_DISP_OFF display off
|
||||||
@ -500,32 +455,22 @@ Input: dispAttr LCD_DISP_OFF display off
|
|||||||
LCD_DISP_CURSOR_BLINK display on, cursor on flashing
|
LCD_DISP_CURSOR_BLINK display on, cursor on flashing
|
||||||
Returns: none
|
Returns: none
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
void lcd_init(uint8_t dispAttr)
|
void lcd_init(uint8_t dispAttr) {
|
||||||
{
|
|
||||||
#if LCD_IO_MODE
|
#if LCD_IO_MODE
|
||||||
/*
|
/*
|
||||||
* Initialize LCD to 4 bit I/O mode
|
* Initialize LCD to 4 bit I/O mode
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
if ((&LCD_DATA0_PORT == &LCD_DATA1_PORT) && (&LCD_DATA1_PORT == &LCD_DATA2_PORT) && (&LCD_DATA2_PORT == &LCD_DATA3_PORT) && (&LCD_RS_PORT == &LCD_DATA0_PORT) && (&LCD_RW_PORT == &LCD_DATA0_PORT) && (&LCD_E_PORT == &LCD_DATA0_PORT) && (LCD_DATA0_PIN == 0) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) && (LCD_RS_PIN == 4) && (LCD_RW_PIN == 5) && (LCD_E_PIN == 6)) {
|
||||||
&& ( &LCD_RS_PORT == &LCD_DATA0_PORT) && ( &LCD_RW_PORT == &LCD_DATA0_PORT) && (&LCD_E_PORT == &LCD_DATA0_PORT)
|
|
||||||
&& (LCD_DATA0_PIN == 0 ) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3)
|
|
||||||
&& (LCD_RS_PIN == 4 ) && (LCD_RW_PIN == 5) && (LCD_E_PIN == 6 ) )
|
|
||||||
{
|
|
||||||
/* configure all port bits as output (all LCD lines on same port) */
|
/* configure all port bits as output (all LCD lines on same port) */
|
||||||
DDR(LCD_DATA0_PORT) |= 0x7F;
|
DDR(LCD_DATA0_PORT) |= 0x7F;
|
||||||
}
|
} else if ((&LCD_DATA0_PORT == &LCD_DATA1_PORT) && (&LCD_DATA1_PORT == &LCD_DATA2_PORT) && (&LCD_DATA2_PORT == &LCD_DATA3_PORT) && (LCD_DATA0_PIN == 0) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3)) {
|
||||||
else if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
|
||||||
&& (LCD_DATA0_PIN == 0 ) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) )
|
|
||||||
{
|
|
||||||
/* configure all port bits as output (all LCD data lines on same port, but control lines on different ports) */
|
/* configure all port bits as output (all LCD data lines on same port, but control lines on different ports) */
|
||||||
DDR(LCD_DATA0_PORT) |= 0x0F;
|
DDR(LCD_DATA0_PORT) |= 0x0F;
|
||||||
DDR(LCD_RS_PORT) |= _BV(LCD_RS_PIN);
|
DDR(LCD_RS_PORT) |= _BV(LCD_RS_PIN);
|
||||||
DDR(LCD_RW_PORT) |= _BV(LCD_RW_PIN);
|
DDR(LCD_RW_PORT) |= _BV(LCD_RW_PIN);
|
||||||
DDR(LCD_E_PORT) |= _BV(LCD_E_PIN);
|
DDR(LCD_E_PORT) |= _BV(LCD_E_PIN);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
/* configure all port bits as output (LCD data and control lines on different ports */
|
/* configure all port bits as output (LCD data and control lines on different ports */
|
||||||
DDR(LCD_RS_PORT) |= _BV(LCD_RS_PIN);
|
DDR(LCD_RS_PORT) |= _BV(LCD_RS_PIN);
|
||||||
DDR(LCD_RW_PORT) |= _BV(LCD_RW_PIN);
|
DDR(LCD_RW_PORT) |= _BV(LCD_RW_PIN);
|
||||||
@ -589,4 +534,3 @@ void lcd_init(uint8_t dispAttr)
|
|||||||
lcd_command(dispAttr); /* display/cursor control */
|
lcd_command(dispAttr); /* display/cursor control */
|
||||||
|
|
||||||
} /* lcd_init */
|
} /* lcd_init */
|
||||||
|
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
# error "This library requires AVR-GCC 4.5 or later, update to newer AVR-GCC compiler !"
|
# error "This library requires AVR-GCC 4.5 or later, update to newer AVR-GCC compiler !"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**@{*/
|
/**@{*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -62,7 +61,6 @@
|
|||||||
# include "lcd_definitions.h"
|
# include "lcd_definitions.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Definition for LCD controller type
|
* @name Definition for LCD controller type
|
||||||
* Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller.
|
* Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller.
|
||||||
@ -105,7 +103,6 @@
|
|||||||
# define LCD_WRAP_LINES 0 /**< 0: no wrap, 1: wrap at end of visibile line */
|
# define LCD_WRAP_LINES 0 /**< 0: no wrap, 1: wrap at end of visibile line */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Definitions for 4-bit IO mode
|
* @name Definitions for 4-bit IO mode
|
||||||
*
|
*
|
||||||
@ -174,9 +171,7 @@
|
|||||||
# define LCD_E_PIN 1 /**< pin for Enable line */
|
# define LCD_E_PIN 1 /**< pin for Enable line */
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#elif defined(__AVR_AT90S4414__) || defined(__AVR_AT90S8515__) || defined(__AVR_ATmega64__) || \
|
#elif defined(__AVR_AT90S4414__) || defined(__AVR_AT90S8515__) || defined(__AVR_ATmega64__) || defined(__AVR_ATmega8515__) || defined(__AVR_ATmega103__) || defined(__AVR_ATmega128__) || defined(__AVR_ATmega161__) || defined(__AVR_ATmega162__)
|
||||||
defined(__AVR_ATmega8515__)|| defined(__AVR_ATmega103__) || defined(__AVR_ATmega128__) || \
|
|
||||||
defined(__AVR_ATmega161__) || defined(__AVR_ATmega162__)
|
|
||||||
/*
|
/*
|
||||||
* memory mapped mode is only supported when the device has an external data memory interface
|
* memory mapped mode is only supported when the device has an external data memory interface
|
||||||
*/
|
*/
|
||||||
@ -189,7 +184,6 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Definitions of delays
|
* @name Definitions of delays
|
||||||
* Used to calculate delay timers.
|
* Used to calculate delay timers.
|
||||||
@ -219,7 +213,6 @@
|
|||||||
# define LCD_DELAY_ENABLE_PULSE 1 /**< enable signal pulse width in micro seconds */
|
# define LCD_DELAY_ENABLE_PULSE 1 /**< enable signal pulse width in micro seconds */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Definitions for LCD command instructions
|
* @name Definitions for LCD command instructions
|
||||||
* The constants define the various LCD controller instructions which can be passed to the
|
* The constants define the various LCD controller instructions which can be passed to the
|
||||||
@ -272,16 +265,12 @@
|
|||||||
#define LCD_FUNCTION_8BIT_1LINE 0x30 /* 8-bit interface, single line, 5x7 dots */
|
#define LCD_FUNCTION_8BIT_1LINE 0x30 /* 8-bit interface, single line, 5x7 dots */
|
||||||
#define LCD_FUNCTION_8BIT_2LINES 0x38 /* 8-bit interface, dual line, 5x7 dots */
|
#define LCD_FUNCTION_8BIT_2LINES 0x38 /* 8-bit interface, dual line, 5x7 dots */
|
||||||
|
|
||||||
|
|
||||||
#define LCD_MODE_DEFAULT ((1 << LCD_ENTRY_MODE) | (1 << LCD_ENTRY_INC))
|
#define LCD_MODE_DEFAULT ((1 << LCD_ENTRY_MODE) | (1 << LCD_ENTRY_INC))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Functions
|
* @name Functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Initialize display and select type of cursor
|
@brief Initialize display and select type of cursor
|
||||||
@param dispAttr \b LCD_DISP_OFF display off\n
|
@param dispAttr \b LCD_DISP_OFF display off\n
|
||||||
@ -292,21 +281,18 @@
|
|||||||
*/
|
*/
|
||||||
extern void lcd_init(uint8_t dispAttr);
|
extern void lcd_init(uint8_t dispAttr);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Clear display and set cursor to home position
|
@brief Clear display and set cursor to home position
|
||||||
@return none
|
@return none
|
||||||
*/
|
*/
|
||||||
extern void lcd_clrscr(void);
|
extern void lcd_clrscr(void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Set cursor to home position
|
@brief Set cursor to home position
|
||||||
@return none
|
@return none
|
||||||
*/
|
*/
|
||||||
extern void lcd_home(void);
|
extern void lcd_home(void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Set cursor to specified position
|
@brief Set cursor to specified position
|
||||||
|
|
||||||
@ -316,7 +302,6 @@ extern void lcd_home(void);
|
|||||||
*/
|
*/
|
||||||
extern void lcd_gotoxy(uint8_t x, uint8_t y);
|
extern void lcd_gotoxy(uint8_t x, uint8_t y);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Display character at current cursor position
|
@brief Display character at current cursor position
|
||||||
@param c character to be displayed
|
@param c character to be displayed
|
||||||
@ -324,7 +309,6 @@ extern void lcd_gotoxy(uint8_t x, uint8_t y);
|
|||||||
*/
|
*/
|
||||||
extern void lcd_putc(char c);
|
extern void lcd_putc(char c);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Display string without auto linefeed
|
@brief Display string without auto linefeed
|
||||||
@param s string to be displayed
|
@param s string to be displayed
|
||||||
@ -332,7 +316,6 @@ extern void lcd_putc(char c);
|
|||||||
*/
|
*/
|
||||||
extern void lcd_puts(const char *s);
|
extern void lcd_puts(const char *s);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Display string from program memory without auto linefeed
|
@brief Display string from program memory without auto linefeed
|
||||||
@param progmem_s string from program memory be be displayed
|
@param progmem_s string from program memory be be displayed
|
||||||
@ -341,7 +324,6 @@ extern void lcd_puts(const char *s);
|
|||||||
*/
|
*/
|
||||||
extern void lcd_puts_p(const char *progmem_s);
|
extern void lcd_puts_p(const char *progmem_s);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Send LCD controller instruction command
|
@brief Send LCD controller instruction command
|
||||||
@param cmd instruction to send to LCD controller, see HD44780 data sheet
|
@param cmd instruction to send to LCD controller, see HD44780 data sheet
|
||||||
@ -349,7 +331,6 @@ extern void lcd_puts_p(const char *progmem_s);
|
|||||||
*/
|
*/
|
||||||
extern void lcd_command(uint8_t cmd);
|
extern void lcd_command(uint8_t cmd);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Send data byte to LCD controller
|
@brief Send data byte to LCD controller
|
||||||
|
|
||||||
@ -359,7 +340,6 @@ extern void lcd_command(uint8_t cmd);
|
|||||||
*/
|
*/
|
||||||
extern void lcd_data(uint8_t data);
|
extern void lcd_data(uint8_t data);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief macros for automatically storing string constant in program memory
|
@brief macros for automatically storing string constant in program memory
|
||||||
*/
|
*/
|
||||||
@ -368,4 +348,3 @@ extern void lcd_data(uint8_t data);
|
|||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
#endif // LCD_H
|
#endif // LCD_H
|
||||||
|
|
||||||
|
4
drivers/avr/i2c_master.c
Executable file → Normal file
4
drivers/avr/i2c_master.c
Executable file → Normal file
@ -27,8 +27,8 @@
|
|||||||
#ifndef F_SCL
|
#ifndef F_SCL
|
||||||
# define F_SCL 400000UL // SCL frequency
|
# define F_SCL 400000UL // SCL frequency
|
||||||
#endif
|
#endif
|
||||||
#define Prescaler 1
|
|
||||||
#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16) / 2)
|
#define TWBR_val (((F_CPU / F_SCL) - 16) / 2)
|
||||||
|
|
||||||
void i2c_init(void) {
|
void i2c_init(void) {
|
||||||
TWSR = 0; /* no prescaler */
|
TWSR = 0; /* no prescaler */
|
||||||
|
0
drivers/avr/i2c_master.h
Executable file → Normal file
0
drivers/avr/i2c_master.h
Executable file → Normal file
0
drivers/avr/i2c_slave.c
Executable file → Normal file
0
drivers/avr/i2c_slave.c
Executable file → Normal file
0
drivers/avr/i2c_slave.h
Executable file → Normal file
0
drivers/avr/i2c_slave.h
Executable file → Normal file
@ -182,33 +182,15 @@ extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
|
|||||||
// appropriate addresses for various functions (e.g. reading
|
// appropriate addresses for various functions (e.g. reading
|
||||||
// and writing)
|
// and writing)
|
||||||
const uint16_t PROGMEM port_to_mode_PGM[] = {
|
const uint16_t PROGMEM port_to_mode_PGM[] = {
|
||||||
NOT_A_PORT,
|
NOT_A_PORT, NOT_A_PORT, (uint16_t)&DDRB, (uint16_t)&DDRC, (uint16_t)&DDRD, (uint16_t)&DDRE, (uint16_t)&DDRF,
|
||||||
NOT_A_PORT,
|
|
||||||
(uint16_t) &DDRB,
|
|
||||||
(uint16_t) &DDRC,
|
|
||||||
(uint16_t) &DDRD,
|
|
||||||
(uint16_t) &DDRE,
|
|
||||||
(uint16_t) &DDRF,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM port_to_output_PGM[] = {
|
const uint16_t PROGMEM port_to_output_PGM[] = {
|
||||||
NOT_A_PORT,
|
NOT_A_PORT, NOT_A_PORT, (uint16_t)&PORTB, (uint16_t)&PORTC, (uint16_t)&PORTD, (uint16_t)&PORTE, (uint16_t)&PORTF,
|
||||||
NOT_A_PORT,
|
|
||||||
(uint16_t) &PORTB,
|
|
||||||
(uint16_t) &PORTC,
|
|
||||||
(uint16_t) &PORTD,
|
|
||||||
(uint16_t) &PORTE,
|
|
||||||
(uint16_t) &PORTF,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM port_to_input_PGM[] = {
|
const uint16_t PROGMEM port_to_input_PGM[] = {
|
||||||
NOT_A_PORT,
|
NOT_A_PORT, NOT_A_PORT, (uint16_t)&PINB, (uint16_t)&PINC, (uint16_t)&PIND, (uint16_t)&PINE, (uint16_t)&PINF,
|
||||||
NOT_A_PORT,
|
|
||||||
(uint16_t) &PINB,
|
|
||||||
(uint16_t) &PINC,
|
|
||||||
(uint16_t) &PIND,
|
|
||||||
(uint16_t) &PINE,
|
|
||||||
(uint16_t) &PINF,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
||||||
@ -286,40 +268,20 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
|
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
|
||||||
NOT_ON_TIMER,
|
NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, TIMER0B, /* 3 */
|
||||||
NOT_ON_TIMER,
|
NOT_ON_TIMER, TIMER3A, /* 5 */
|
||||||
NOT_ON_TIMER,
|
|
||||||
TIMER0B, /* 3 */
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
TIMER3A, /* 5 */
|
|
||||||
TIMER4D, /* 6 */
|
TIMER4D, /* 6 */
|
||||||
NOT_ON_TIMER,
|
NOT_ON_TIMER,
|
||||||
|
|
||||||
NOT_ON_TIMER,
|
NOT_ON_TIMER, TIMER1A, /* 9 */
|
||||||
TIMER1A, /* 9 */
|
|
||||||
TIMER1B, /* 10 */
|
TIMER1B, /* 10 */
|
||||||
TIMER0A, /* 11 */
|
TIMER0A, /* 11 */
|
||||||
|
|
||||||
NOT_ON_TIMER,
|
NOT_ON_TIMER, TIMER4A, /* 13 */
|
||||||
TIMER4A, /* 13 */
|
|
||||||
|
|
||||||
NOT_ON_TIMER,
|
NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER,
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
|
|
||||||
NOT_ON_TIMER,
|
NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER,
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
|
const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
|
||||||
|
@ -76,9 +76,18 @@ static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) {
|
|||||||
return _send_cmd1(opr2);
|
return _send_cmd1(opr2);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;}
|
# define send_cmd1(c) \
|
||||||
#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;}
|
if (!_send_cmd1(c)) { \
|
||||||
#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;}
|
goto done; \
|
||||||
|
}
|
||||||
|
# define send_cmd2(c, o) \
|
||||||
|
if (!_send_cmd2(c, o)) { \
|
||||||
|
goto done; \
|
||||||
|
}
|
||||||
|
# define send_cmd3(c, o1, o2) \
|
||||||
|
if (!_send_cmd3(c, o1, o2)) { \
|
||||||
|
goto done; \
|
||||||
|
}
|
||||||
|
|
||||||
static void clear_display(void) {
|
static void clear_display(void) {
|
||||||
matrix_clear(&display);
|
matrix_clear(&display);
|
||||||
@ -129,7 +138,6 @@ bool iota_gfx_init(void) {
|
|||||||
|
|
||||||
send_cmd2(SetDisplayOffset, 0);
|
send_cmd2(SetDisplayOffset, 0);
|
||||||
|
|
||||||
|
|
||||||
send_cmd1(SetStartLine | 0x0);
|
send_cmd1(SetStartLine | 0x0);
|
||||||
send_cmd2(SetChargePump, 0x14 /* Enable */);
|
send_cmd2(SetChargePump, 0x14 /* Enable */);
|
||||||
send_cmd2(SetMemoryMode, 0 /* horizontal addressing */);
|
send_cmd2(SetMemoryMode, 0 /* horizontal addressing */);
|
||||||
@ -196,8 +204,7 @@ void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) {
|
|||||||
|
|
||||||
if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) {
|
if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) {
|
||||||
// We went off the end; scroll the display upwards by one line
|
// We went off the end; scroll the display upwards by one line
|
||||||
memmove(&matrix->display[0], &matrix->display[1],
|
memmove(&matrix->display[0], &matrix->display[1], MatrixCols * (MatrixRows - 1));
|
||||||
MatrixCols * (MatrixRows - 1));
|
|
||||||
matrix->cursor = &matrix->display[MatrixRows - 1][0];
|
matrix->cursor = &matrix->display[MatrixRows - 1][0];
|
||||||
memset(matrix->cursor, ' ', MatrixCols);
|
memset(matrix->cursor, ' ', MatrixCols);
|
||||||
}
|
}
|
||||||
@ -220,9 +227,7 @@ void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) {
|
|||||||
matrix_write_char_inner(matrix, c);
|
matrix_write_char_inner(matrix, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void iota_gfx_write_char(uint8_t c) {
|
void iota_gfx_write_char(uint8_t c) { matrix_write_char(&display, c); }
|
||||||
matrix_write_char(&display, c);
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_write(struct CharacterMatrix *matrix, const char *data) {
|
void matrix_write(struct CharacterMatrix *matrix, const char *data) {
|
||||||
const char *end = data + strlen(data);
|
const char *end = data + strlen(data);
|
||||||
@ -232,9 +237,7 @@ void matrix_write(struct CharacterMatrix *matrix, const char *data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void iota_gfx_write(const char *data) {
|
void iota_gfx_write(const char *data) { matrix_write(&display, data); }
|
||||||
matrix_write(&display, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_write_P(struct CharacterMatrix *matrix, const char *data) {
|
void matrix_write_P(struct CharacterMatrix *matrix, const char *data) {
|
||||||
while (true) {
|
while (true) {
|
||||||
@ -247,9 +250,7 @@ void matrix_write_P(struct CharacterMatrix *matrix, const char *data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void iota_gfx_write_P(const char *data) {
|
void iota_gfx_write_P(const char *data) { matrix_write_P(&display, data); }
|
||||||
matrix_write_P(&display, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_clear(struct CharacterMatrix *matrix) {
|
void matrix_clear(struct CharacterMatrix *matrix) {
|
||||||
memset(matrix->display, ' ', sizeof(matrix->display));
|
memset(matrix->display, ' ', sizeof(matrix->display));
|
||||||
@ -257,9 +258,7 @@ void matrix_clear(struct CharacterMatrix *matrix) {
|
|||||||
matrix->dirty = true;
|
matrix->dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void iota_gfx_clear_screen(void) {
|
void iota_gfx_clear_screen(void) { matrix_clear(&display); }
|
||||||
matrix_clear(&display);
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_render(struct CharacterMatrix *matrix) {
|
void matrix_render(struct CharacterMatrix *matrix) {
|
||||||
last_flush = timer_read();
|
last_flush = timer_read();
|
||||||
@ -303,13 +302,9 @@ done:
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void iota_gfx_flush(void) {
|
void iota_gfx_flush(void) { matrix_render(&display); }
|
||||||
matrix_render(&display);
|
|
||||||
}
|
|
||||||
|
|
||||||
__attribute__ ((weak))
|
__attribute__((weak)) void iota_gfx_task_user(void) {}
|
||||||
void iota_gfx_task_user(void) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void iota_gfx_task(void) {
|
void iota_gfx_task(void) {
|
||||||
iota_gfx_task_user();
|
iota_gfx_task_user();
|
||||||
|
@ -88,6 +88,4 @@ void matrix_write(struct CharacterMatrix *matrix, const char *data);
|
|||||||
void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
|
void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
|
||||||
void matrix_render(struct CharacterMatrix *matrix);
|
void matrix_render(struct CharacterMatrix *matrix);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -60,14 +60,10 @@ I2C_PORT &= ~ (1 << I2C_CLK);
|
|||||||
|
|
||||||
# define I2C_DELAY 1
|
# define I2C_DELAY 1
|
||||||
|
|
||||||
void I2C_WriteBit(unsigned char c)
|
void I2C_WriteBit(unsigned char c) {
|
||||||
{
|
if (c > 0) {
|
||||||
if (c > 0)
|
|
||||||
{
|
|
||||||
I2C_DATA_HI();
|
I2C_DATA_HI();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
I2C_DATA_LO();
|
I2C_DATA_LO();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,8 +73,7 @@ void I2C_WriteBit(unsigned char c)
|
|||||||
I2C_CLOCK_LO();
|
I2C_CLOCK_LO();
|
||||||
_delay_us(I2C_DELAY);
|
_delay_us(I2C_DELAY);
|
||||||
|
|
||||||
if (c > 0)
|
if (c > 0) {
|
||||||
{
|
|
||||||
I2C_DATA_LO();
|
I2C_DATA_LO();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,8 +82,7 @@ void I2C_WriteBit(unsigned char c)
|
|||||||
|
|
||||||
// Inits bitbanging port, must be called before using the functions below
|
// Inits bitbanging port, must be called before using the functions below
|
||||||
//
|
//
|
||||||
void I2C_Init(void)
|
void I2C_Init(void) {
|
||||||
{
|
|
||||||
I2C_PORT &= ~((1 << I2C_DAT) | (1 << I2C_CLK));
|
I2C_PORT &= ~((1 << I2C_DAT) | (1 << I2C_CLK));
|
||||||
|
|
||||||
I2C_CLOCK_HI();
|
I2C_CLOCK_HI();
|
||||||
@ -99,8 +93,7 @@ void I2C_Init(void)
|
|||||||
|
|
||||||
// Send a START Condition
|
// Send a START Condition
|
||||||
//
|
//
|
||||||
void I2C_Start(void)
|
void I2C_Start(void) {
|
||||||
{
|
|
||||||
// set both to high at the same time
|
// set both to high at the same time
|
||||||
I2C_DDR &= ~((1 << I2C_DAT) | (1 << I2C_CLK));
|
I2C_DDR &= ~((1 << I2C_DAT) | (1 << I2C_CLK));
|
||||||
_delay_us(I2C_DELAY);
|
_delay_us(I2C_DELAY);
|
||||||
@ -114,8 +107,7 @@ void I2C_Start(void)
|
|||||||
|
|
||||||
// Send a STOP Condition
|
// Send a STOP Condition
|
||||||
//
|
//
|
||||||
void I2C_Stop(void)
|
void I2C_Stop(void) {
|
||||||
{
|
|
||||||
I2C_CLOCK_HI();
|
I2C_CLOCK_HI();
|
||||||
_delay_us(I2C_DELAY);
|
_delay_us(I2C_DELAY);
|
||||||
|
|
||||||
@ -125,16 +117,13 @@ void I2C_Stop(void)
|
|||||||
|
|
||||||
// write a byte to the I2C slave device
|
// write a byte to the I2C slave device
|
||||||
//
|
//
|
||||||
unsigned char I2C_Write(unsigned char c)
|
unsigned char I2C_Write(unsigned char c) {
|
||||||
{
|
for (char i = 0; i < 8; i++) {
|
||||||
for (char i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
I2C_WriteBit(c & 128);
|
I2C_WriteBit(c & 128);
|
||||||
|
|
||||||
c <<= 1;
|
c <<= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
I2C_WriteBit(0);
|
I2C_WriteBit(0);
|
||||||
_delay_us(I2C_DELAY);
|
_delay_us(I2C_DELAY);
|
||||||
_delay_us(I2C_DELAY);
|
_delay_us(I2C_DELAY);
|
||||||
@ -144,20 +133,17 @@ unsigned char I2C_Write(unsigned char c)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
// Set an led in the buffer to a color
|
// Set an led in the buffer to a color
|
||||||
void inline ws2812_setled(int i, uint8_t r, uint8_t g, uint8_t b)
|
void inline ws2812_setled(int i, uint8_t r, uint8_t g, uint8_t b) {
|
||||||
{
|
|
||||||
led[i].r = r;
|
led[i].r = r;
|
||||||
led[i].g = g;
|
led[i].g = g;
|
||||||
led[i].b = b;
|
led[i].b = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b)
|
void ws2812_setled_all(uint8_t r, uint8_t g, uint8_t b) {
|
||||||
{
|
|
||||||
for (int i = 0; i < sizeof(led) / sizeof(led[0]); i++) {
|
for (int i = 0; i < sizeof(led) / sizeof(led[0]); i++) {
|
||||||
led[i].r = r;
|
led[i].r = r;
|
||||||
led[i].g = g;
|
led[i].g = g;
|
||||||
@ -167,14 +153,12 @@ void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Setleds for standard RGB
|
// Setleds for standard RGB
|
||||||
void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds)
|
void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
|
||||||
{
|
|
||||||
// ws2812_setleds_pin(ledarray,leds, _BV(ws2812_pin));
|
// ws2812_setleds_pin(ledarray,leds, _BV(ws2812_pin));
|
||||||
ws2812_setleds_pin(ledarray, leds, _BV(RGB_DI_PIN & 0xF));
|
ws2812_setleds_pin(ledarray, leds, _BV(RGB_DI_PIN & 0xF));
|
||||||
}
|
}
|
||||||
|
|
||||||
void inline ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask)
|
void inline ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask) {
|
||||||
{
|
|
||||||
// ws2812_DDRREG |= pinmask; // Enable DDR
|
// ws2812_DDRREG |= pinmask; // Enable DDR
|
||||||
// new universal format (DDR)
|
// new universal format (DDR)
|
||||||
_SFR_IO8((RGB_DI_PIN >> 4) + 1) |= pinmask;
|
_SFR_IO8((RGB_DI_PIN >> 4) + 1) |= pinmask;
|
||||||
@ -184,9 +168,7 @@ void inline ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Setleds for SK6812RGBW
|
// Setleds for SK6812RGBW
|
||||||
void inline ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds)
|
void inline ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds) {
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef RGBW_BB_TWI
|
#ifdef RGBW_BB_TWI
|
||||||
uint8_t sreg_prev, twcr_prev;
|
uint8_t sreg_prev, twcr_prev;
|
||||||
sreg_prev = SREG;
|
sreg_prev = SREG;
|
||||||
@ -208,23 +190,18 @@ void inline ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t leds)
|
|||||||
TWCR = twcr_prev;
|
TWCR = twcr_prev;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// ws2812_DDRREG |= _BV(ws2812_pin); // Enable DDR
|
// ws2812_DDRREG |= _BV(ws2812_pin); // Enable DDR
|
||||||
// new universal format (DDR)
|
// new universal format (DDR)
|
||||||
_SFR_IO8((RGB_DI_PIN >> 4) + 1) |= _BV(RGB_DI_PIN & 0xF);
|
_SFR_IO8((RGB_DI_PIN >> 4) + 1) |= _BV(RGB_DI_PIN & 0xF);
|
||||||
|
|
||||||
ws2812_sendarray_mask((uint8_t *)ledarray, leds << 2, _BV(RGB_DI_PIN & 0xF));
|
ws2812_sendarray_mask((uint8_t *)ledarray, leds << 2, _BV(RGB_DI_PIN & 0xF));
|
||||||
|
|
||||||
|
|
||||||
#ifndef RGBW_BB_TWI
|
#ifndef RGBW_BB_TWI
|
||||||
_delay_us(80);
|
_delay_us(80);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ws2812_sendarray(uint8_t *data,uint16_t datlen)
|
void ws2812_sendarray(uint8_t *data, uint16_t datlen) { ws2812_sendarray_mask(data, datlen, _BV(RGB_DI_PIN & 0xF)); }
|
||||||
{
|
|
||||||
ws2812_sendarray_mask(data,datlen,_BV(RGB_DI_PIN & 0xF));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This routine writes an array of bytes with RGB values to the Dataout pin
|
This routine writes an array of bytes with RGB values to the Dataout pin
|
||||||
@ -287,8 +264,7 @@ void ws2812_sendarray(uint8_t *data,uint16_t datlen)
|
|||||||
#define w_nop8 w_nop4 w_nop4
|
#define w_nop8 w_nop4 w_nop4
|
||||||
#define w_nop16 w_nop8 w_nop8
|
#define w_nop16 w_nop8 w_nop8
|
||||||
|
|
||||||
void inline ws2812_sendarray_mask(uint8_t *data,uint16_t datlen,uint8_t maskhi)
|
void inline ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t maskhi) {
|
||||||
{
|
|
||||||
uint8_t curbyte, ctr, masklo;
|
uint8_t curbyte, ctr, masklo;
|
||||||
uint8_t sreg_prev;
|
uint8_t sreg_prev;
|
||||||
|
|
||||||
@ -302,8 +278,7 @@ void inline ws2812_sendarray_mask(uint8_t *data,uint16_t datlen,uint8_t maskhi)
|
|||||||
while (datlen--) {
|
while (datlen--) {
|
||||||
curbyte = (*data++);
|
curbyte = (*data++);
|
||||||
|
|
||||||
asm volatile(
|
asm volatile(" ldi %0,8 \n\t"
|
||||||
" ldi %0,8 \n\t"
|
|
||||||
"loop%=: \n\t"
|
"loop%=: \n\t"
|
||||||
" out %2,%3 \n\t" // '1' [01] '0' [01] - re
|
" out %2,%3 \n\t" // '1' [01] '0' [01] - re
|
||||||
#if (w1_nops & 1)
|
#if (w1_nops & 1)
|
||||||
@ -359,8 +334,7 @@ w_nop16
|
|||||||
" dec %0 \n\t" // '1' [+2] '0' [+2]
|
" dec %0 \n\t" // '1' [+2] '0' [+2]
|
||||||
" brne loop%=\n\t" // '1' [+3] '0' [+4]
|
" brne loop%=\n\t" // '1' [+3] '0' [+4]
|
||||||
: "=&d"(ctr)
|
: "=&d"(ctr)
|
||||||
: "r" (curbyte), "I" (_SFR_IO_ADDR(_SFR_IO8((RGB_DI_PIN >> 4) + 2))), "r" (maskhi), "r" (masklo)
|
: "r"(curbyte), "I"(_SFR_IO_ADDR(_SFR_IO8((RGB_DI_PIN >> 4) + 2))), "r"(maskhi), "r"(masklo));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SREG = sreg_prev;
|
SREG = sreg_prev;
|
||||||
|
@ -61,7 +61,6 @@ void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
|
|||||||
void ws2812_sendarray(uint8_t *array, uint16_t length);
|
void ws2812_sendarray(uint8_t *array, uint16_t length);
|
||||||
void ws2812_sendarray_mask(uint8_t *array, uint16_t length, uint8_t pinmask);
|
void ws2812_sendarray_mask(uint8_t *array, uint16_t length, uint8_t pinmask);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Internal defines
|
* Internal defines
|
||||||
*/
|
*/
|
||||||
|
@ -24,40 +24,31 @@
|
|||||||
*/
|
*/
|
||||||
const PALConfig pal_default_config = {
|
const PALConfig pal_default_config = {
|
||||||
# if STM32_HAS_GPIOA
|
# if STM32_HAS_GPIOA
|
||||||
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
|
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
|
||||||
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
|
|
||||||
# endif
|
# endif
|
||||||
# if STM32_HAS_GPIOB
|
# if STM32_HAS_GPIOB
|
||||||
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
|
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
|
||||||
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
|
|
||||||
# endif
|
# endif
|
||||||
# if STM32_HAS_GPIOC
|
# if STM32_HAS_GPIOC
|
||||||
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
|
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
|
||||||
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
|
|
||||||
# endif
|
# endif
|
||||||
# if STM32_HAS_GPIOD
|
# if STM32_HAS_GPIOD
|
||||||
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
|
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
|
||||||
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
|
|
||||||
# endif
|
# endif
|
||||||
# if STM32_HAS_GPIOE
|
# if STM32_HAS_GPIOE
|
||||||
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
|
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
|
||||||
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
|
|
||||||
# endif
|
# endif
|
||||||
# if STM32_HAS_GPIOF
|
# if STM32_HAS_GPIOF
|
||||||
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
|
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
|
||||||
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
|
|
||||||
# endif
|
# endif
|
||||||
# if STM32_HAS_GPIOG
|
# if STM32_HAS_GPIOG
|
||||||
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
|
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
|
||||||
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
|
|
||||||
# endif
|
# endif
|
||||||
# if STM32_HAS_GPIOH
|
# if STM32_HAS_GPIOH
|
||||||
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
|
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
|
||||||
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
|
|
||||||
# endif
|
# endif
|
||||||
# if STM32_HAS_GPIOI
|
# if STM32_HAS_GPIOI
|
||||||
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
|
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
|
||||||
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
|
|
||||||
# endif
|
# endif
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
@ -79,7 +70,6 @@ void __early_init(void) {
|
|||||||
* @brief SDC card detection.
|
* @brief SDC card detection.
|
||||||
*/
|
*/
|
||||||
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
|
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
|
||||||
|
|
||||||
(void)sdcp;
|
(void)sdcp;
|
||||||
/* TODO: Fill the implementation.*/
|
/* TODO: Fill the implementation.*/
|
||||||
return true;
|
return true;
|
||||||
@ -89,7 +79,6 @@ bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
|
|||||||
* @brief SDC card write protection detection.
|
* @brief SDC card write protection detection.
|
||||||
*/
|
*/
|
||||||
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
||||||
|
|
||||||
(void)sdcp;
|
(void)sdcp;
|
||||||
/* TODO: Fill the implementation.*/
|
/* TODO: Fill the implementation.*/
|
||||||
return false;
|
return false;
|
||||||
@ -101,7 +90,6 @@ bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
|||||||
* @brief MMC_SPI card detection.
|
* @brief MMC_SPI card detection.
|
||||||
*/
|
*/
|
||||||
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
|
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
|
||||||
|
|
||||||
(void)mmcp;
|
(void)mmcp;
|
||||||
/* TODO: Fill the implementation.*/
|
/* TODO: Fill the implementation.*/
|
||||||
return true;
|
return true;
|
||||||
@ -111,7 +99,6 @@ bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
|
|||||||
* @brief MMC_SPI card write protection detection.
|
* @brief MMC_SPI card write protection detection.
|
||||||
*/
|
*/
|
||||||
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
||||||
|
|
||||||
(void)mmcp;
|
(void)mmcp;
|
||||||
/* TODO: Fill the implementation.*/
|
/* TODO: Fill the implementation.*/
|
||||||
return false;
|
return false;
|
||||||
@ -122,5 +109,4 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
|||||||
* @brief Board-specific initialization code.
|
* @brief Board-specific initialization code.
|
||||||
* @todo Add your board-specific code, if any.
|
* @todo Add your board-specific code, if any.
|
||||||
*/
|
*/
|
||||||
void boardInit(void) {
|
void boardInit(void) {}
|
||||||
}
|
|
||||||
|
@ -201,7 +201,6 @@
|
|||||||
|
|
||||||
#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U)
|
#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* I/O ports initial setup, this configuration is established soon after reset
|
* I/O ports initial setup, this configuration is established soon after reset
|
||||||
* in the initialization code.
|
* in the initialization code.
|
||||||
@ -244,102 +243,13 @@
|
|||||||
* PA14 - SWCLK (alternate 0).
|
* PA14 - SWCLK (alternate 0).
|
||||||
* PA15 - ROW4
|
* PA15 - ROW4
|
||||||
*/
|
*/
|
||||||
#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \
|
#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | PIN_MODE_ALTERNATE(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_INPUT(GPIOA_PIN4) | PIN_MODE_INPUT(GPIOA_PIN5) | PIN_MODE_INPUT(GPIOA_PIN6) | PIN_MODE_INPUT(GPIOA_PIN7) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_PIN9) | PIN_MODE_INPUT(GPIOA_PIN10) | PIN_MODE_ALTERNATE(GPIOA_USB_DM) | PIN_MODE_ALTERNATE(GPIOA_USB_DP) | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | PIN_MODE_INPUT(GPIOA_PIN15))
|
||||||
PIN_MODE_ALTERNATE(GPIOA_PIN1) | \
|
#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | PIN_OTYPE_PUSHPULL(GPIOA_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOA_PIN2) | \
|
#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | PIN_OSPEED_HIGH(GPIOA_PIN1) | PIN_OSPEED_VERYLOW(GPIOA_PIN2) | PIN_OSPEED_VERYLOW(GPIOA_PIN3) | PIN_OSPEED_VERYLOW(GPIOA_PIN4) | PIN_OSPEED_VERYLOW(GPIOA_PIN5) | PIN_OSPEED_VERYLOW(GPIOA_PIN6) | PIN_OSPEED_VERYLOW(GPIOA_PIN7) | PIN_OSPEED_VERYLOW(GPIOA_PIN8) | PIN_OSPEED_VERYLOW(GPIOA_PIN9) | PIN_OSPEED_VERYLOW(GPIOA_PIN10) | PIN_OSPEED_HIGH(GPIOA_USB_DM) | PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_VERYLOW(GPIOA_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOA_PIN3) | \
|
#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | PIN_PUPDR_FLOATING(GPIOA_PIN1) | PIN_PUPDR_PULLUP(GPIOA_PIN2) | PIN_PUPDR_PULLUP(GPIOA_PIN3) | PIN_PUPDR_PULLUP(GPIOA_PIN4) | PIN_PUPDR_PULLUP(GPIOA_PIN5) | PIN_PUPDR_PULLUP(GPIOA_PIN6) | PIN_PUPDR_FLOATING(GPIOA_PIN7) | PIN_PUPDR_PULLUP(GPIOA_PIN8) | PIN_PUPDR_PULLUP(GPIOA_PIN9) | PIN_PUPDR_PULLUP(GPIOA_PIN10) | PIN_PUPDR_FLOATING(GPIOA_USB_DM) | PIN_PUPDR_FLOATING(GPIOA_USB_DP) | PIN_PUPDR_PULLUP(GPIOA_SWDIO) | PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | PIN_PUPDR_PULLUP(GPIOA_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOA_PIN4) | \
|
#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | PIN_ODR_HIGH(GPIOA_PIN1) | PIN_ODR_HIGH(GPIOA_PIN2) | PIN_ODR_HIGH(GPIOA_PIN3) | PIN_ODR_HIGH(GPIOA_PIN4) | PIN_ODR_HIGH(GPIOA_PIN5) | PIN_ODR_HIGH(GPIOA_PIN6) | PIN_ODR_HIGH(GPIOA_PIN7) | PIN_ODR_HIGH(GPIOA_PIN8) | PIN_ODR_HIGH(GPIOA_PIN9) | PIN_ODR_HIGH(GPIOA_PIN10) | PIN_ODR_HIGH(GPIOA_USB_DM) | PIN_ODR_HIGH(GPIOA_USB_DP) | PIN_ODR_HIGH(GPIOA_SWDIO) | PIN_ODR_HIGH(GPIOA_SWCLK) | PIN_ODR_HIGH(GPIOA_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOA_PIN5) | \
|
#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | PIN_AFIO_AF(GPIOA_PIN1, 1) | PIN_AFIO_AF(GPIOA_PIN2, 0) | PIN_AFIO_AF(GPIOA_PIN3, 0) | PIN_AFIO_AF(GPIOA_PIN4, 0) | PIN_AFIO_AF(GPIOA_PIN5, 5) | PIN_AFIO_AF(GPIOA_PIN6, 5) | PIN_AFIO_AF(GPIOA_PIN7, 5))
|
||||||
PIN_MODE_INPUT(GPIOA_PIN6) | \
|
#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | PIN_AFIO_AF(GPIOA_PIN9, 0) | PIN_AFIO_AF(GPIOA_PIN10, 0) | PIN_AFIO_AF(GPIOA_USB_DM, 14) | PIN_AFIO_AF(GPIOA_USB_DP, 14) | PIN_AFIO_AF(GPIOA_SWDIO, 0) | PIN_AFIO_AF(GPIOA_SWCLK, 0) | PIN_AFIO_AF(GPIOA_PIN15, 0))
|
||||||
PIN_MODE_INPUT(GPIOA_PIN7) | \
|
|
||||||
PIN_MODE_INPUT(GPIOA_PIN8) | \
|
|
||||||
PIN_MODE_INPUT(GPIOA_PIN9) | \
|
|
||||||
PIN_MODE_INPUT(GPIOA_PIN10) | \
|
|
||||||
PIN_MODE_ALTERNATE(GPIOA_USB_DM) | \
|
|
||||||
PIN_MODE_ALTERNATE(GPIOA_USB_DP) | \
|
|
||||||
PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
|
|
||||||
PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
|
|
||||||
PIN_MODE_INPUT(GPIOA_PIN15))
|
|
||||||
#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOA_PIN15))
|
|
||||||
#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOA_PIN1) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOA_USB_DM) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOA_PIN15))
|
|
||||||
#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOA_PIN1) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOA_PIN2) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOA_PIN3) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOA_PIN4) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOA_PIN5) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOA_PIN6) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOA_PIN7) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOA_PIN8) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOA_PIN9) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOA_PIN10) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \
|
|
||||||
PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOA_PIN15))
|
|
||||||
#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_PIN1) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_PIN2) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_PIN3) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_PIN4) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_PIN5) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_PIN6) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_PIN7) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_PIN8) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_PIN9) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_PIN10) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_USB_DM) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_USB_DP) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_SWDIO) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_SWCLK) | \
|
|
||||||
PIN_ODR_HIGH(GPIOA_PIN15))
|
|
||||||
#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_PIN1, 1) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_PIN2, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_PIN3, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_PIN4, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_PIN5, 5) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_PIN6, 5) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_PIN7, 5))
|
|
||||||
#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_PIN9, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_PIN10, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_USB_DM, 14) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_USB_DP, 14) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_SWDIO, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_SWCLK, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOA_PIN15, 0))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GPIOB setup:
|
* GPIOB setup:
|
||||||
@ -361,102 +271,13 @@
|
|||||||
* PB14 - PIN14 (input pullup).
|
* PB14 - PIN14 (input pullup).
|
||||||
* PB15 - PIN15 (input pullup).
|
* PB15 - PIN15 (input pullup).
|
||||||
*/
|
*/
|
||||||
#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \
|
#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_ALTERNATE(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_ALTERNATE(GPIOB_PIN6) | PIN_MODE_OUTPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_INPUT(GPIOB_PIN9) | PIN_MODE_INPUT(GPIOB_PIN10) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOB_PIN1) | \
|
#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | PIN_OTYPE_PUSHPULL(GPIOB_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOB_PIN2) | \
|
#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | PIN_OSPEED_VERYLOW(GPIOB_PIN1) | PIN_OSPEED_VERYLOW(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_PIN3) | PIN_OSPEED_VERYLOW(GPIOB_PIN4) | PIN_OSPEED_VERYLOW(GPIOB_PIN5) | PIN_OSPEED_HIGH(GPIOB_PIN6) | PIN_OSPEED_VERYLOW(GPIOB_PIN7) | PIN_OSPEED_VERYLOW(GPIOB_PIN8) | PIN_OSPEED_VERYLOW(GPIOB_PIN9) | PIN_OSPEED_VERYLOW(GPIOB_PIN10) | PIN_OSPEED_VERYLOW(GPIOB_PIN11) | PIN_OSPEED_VERYLOW(GPIOB_PIN12) | PIN_OSPEED_VERYLOW(GPIOB_PIN13) | PIN_OSPEED_VERYLOW(GPIOB_PIN14) | PIN_OSPEED_VERYLOW(GPIOB_PIN15))
|
||||||
PIN_MODE_ALTERNATE(GPIOB_PIN3) | \
|
#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_FLOATING(GPIOB_PIN3) | PIN_PUPDR_PULLUP(GPIOB_PIN4) | PIN_PUPDR_PULLUP(GPIOB_PIN5) | PIN_PUPDR_FLOATING(GPIOB_PIN6) | PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | PIN_PUPDR_PULLUP(GPIOB_PIN8) | PIN_PUPDR_PULLUP(GPIOB_PIN9) | PIN_PUPDR_PULLUP(GPIOB_PIN10) | PIN_PUPDR_PULLUP(GPIOB_PIN11) | PIN_PUPDR_PULLUP(GPIOB_PIN12) | PIN_PUPDR_PULLUP(GPIOB_PIN13) | PIN_PUPDR_PULLUP(GPIOB_PIN14) | PIN_PUPDR_PULLUP(GPIOB_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOB_PIN4) | \
|
#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | PIN_ODR_HIGH(GPIOB_PIN1) | PIN_ODR_HIGH(GPIOB_PIN2) | PIN_ODR_HIGH(GPIOB_PIN3) | PIN_ODR_HIGH(GPIOB_PIN4) | PIN_ODR_HIGH(GPIOB_PIN5) | PIN_ODR_HIGH(GPIOB_PIN6) | PIN_ODR_LOW(GPIOB_PIN7) | PIN_ODR_HIGH(GPIOB_PIN8) | PIN_ODR_HIGH(GPIOB_PIN9) | PIN_ODR_HIGH(GPIOB_PIN10) | PIN_ODR_HIGH(GPIOB_PIN11) | PIN_ODR_HIGH(GPIOB_PIN12) | PIN_ODR_HIGH(GPIOB_PIN13) | PIN_ODR_HIGH(GPIOB_PIN14) | PIN_ODR_HIGH(GPIOB_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOB_PIN5) | \
|
#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | PIN_AFIO_AF(GPIOB_PIN1, 0) | PIN_AFIO_AF(GPIOB_PIN2, 0) | PIN_AFIO_AF(GPIOB_PIN3, 0) | PIN_AFIO_AF(GPIOB_PIN4, 0) | PIN_AFIO_AF(GPIOB_PIN5, 0) | PIN_AFIO_AF(GPIOB_PIN6, 4) | PIN_AFIO_AF(GPIOB_PIN7, 0))
|
||||||
PIN_MODE_ALTERNATE(GPIOB_PIN6) | \
|
#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | PIN_AFIO_AF(GPIOB_PIN9, 0) | PIN_AFIO_AF(GPIOB_PIN10, 0) | PIN_AFIO_AF(GPIOB_PIN11, 0) | PIN_AFIO_AF(GPIOB_PIN12, 0) | PIN_AFIO_AF(GPIOB_PIN13, 0) | PIN_AFIO_AF(GPIOB_PIN14, 0) | PIN_AFIO_AF(GPIOB_PIN15, 0))
|
||||||
PIN_MODE_OUTPUT(GPIOB_PIN7) | \
|
|
||||||
PIN_MODE_INPUT(GPIOB_PIN8) | \
|
|
||||||
PIN_MODE_INPUT(GPIOB_PIN9) | \
|
|
||||||
PIN_MODE_INPUT(GPIOB_PIN10) | \
|
|
||||||
PIN_MODE_INPUT(GPIOB_PIN11) | \
|
|
||||||
PIN_MODE_INPUT(GPIOB_PIN12) | \
|
|
||||||
PIN_MODE_INPUT(GPIOB_PIN13) | \
|
|
||||||
PIN_MODE_INPUT(GPIOB_PIN14) | \
|
|
||||||
PIN_MODE_INPUT(GPIOB_PIN15))
|
|
||||||
#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \
|
|
||||||
PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOB_PIN15))
|
|
||||||
#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOB_PIN3) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOB_PIN6) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN13) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOB_PIN15))
|
|
||||||
#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN1) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN2) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOB_PIN3) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN4) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN5) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOB_PIN6) | \
|
|
||||||
PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN12) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN13) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN14) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOB_PIN15))
|
|
||||||
#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN1) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN2) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN3) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN4) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN5) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN6) | \
|
|
||||||
PIN_ODR_LOW(GPIOB_PIN7) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN8) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN9) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN10) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN11) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN12) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN13) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN14) | \
|
|
||||||
PIN_ODR_HIGH(GPIOB_PIN15))
|
|
||||||
#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN1, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN2, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN3, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN4, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN5, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN6, 4) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN7, 0))
|
|
||||||
#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN9, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN10, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN11, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN12, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN13, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN14, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOB_PIN15, 0))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GPIOC setup:
|
* GPIOC setup:
|
||||||
@ -478,102 +299,13 @@
|
|||||||
* PC14 - PIN14 (input floating).
|
* PC14 - PIN14 (input floating).
|
||||||
* PC15 - PIN15 (input floating).
|
* PC15 - PIN15 (input floating).
|
||||||
*/
|
*/
|
||||||
#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \
|
#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_PIN7) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_PIN14) | PIN_MODE_INPUT(GPIOC_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOC_PIN1) | \
|
#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | PIN_OTYPE_PUSHPULL(GPIOC_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOC_PIN2) | \
|
#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | PIN_OSPEED_VERYLOW(GPIOC_PIN1) | PIN_OSPEED_VERYLOW(GPIOC_PIN2) | PIN_OSPEED_VERYLOW(GPIOC_PIN3) | PIN_OSPEED_VERYLOW(GPIOC_PIN4) | PIN_OSPEED_VERYLOW(GPIOC_PIN5) | PIN_OSPEED_VERYLOW(GPIOC_PIN6) | PIN_OSPEED_VERYLOW(GPIOC_PIN7) | PIN_OSPEED_VERYLOW(GPIOC_PIN8) | PIN_OSPEED_VERYLOW(GPIOC_PIN9) | PIN_OSPEED_VERYLOW(GPIOC_PIN10) | PIN_OSPEED_VERYLOW(GPIOC_PIN11) | PIN_OSPEED_VERYLOW(GPIOC_PIN12) | PIN_OSPEED_VERYLOW(GPIOC_PIN13) | PIN_OSPEED_HIGH(GPIOC_PIN14) | PIN_OSPEED_HIGH(GPIOC_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOC_PIN3) | \
|
#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | PIN_PUPDR_PULLUP(GPIOC_PIN1) | PIN_PUPDR_PULLUP(GPIOC_PIN2) | PIN_PUPDR_PULLUP(GPIOC_PIN3) | PIN_PUPDR_PULLUP(GPIOC_PIN4) | PIN_PUPDR_PULLUP(GPIOC_PIN5) | PIN_PUPDR_PULLUP(GPIOC_PIN6) | PIN_PUPDR_PULLUP(GPIOC_PIN7) | PIN_PUPDR_PULLUP(GPIOC_PIN8) | PIN_PUPDR_PULLUP(GPIOC_PIN9) | PIN_PUPDR_PULLUP(GPIOC_PIN10) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_PIN12) | PIN_PUPDR_PULLUP(GPIOC_PIN13) | PIN_PUPDR_FLOATING(GPIOC_PIN14) | PIN_PUPDR_FLOATING(GPIOC_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOC_PIN4) | \
|
#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | PIN_ODR_HIGH(GPIOC_PIN1) | PIN_ODR_HIGH(GPIOC_PIN2) | PIN_ODR_HIGH(GPIOC_PIN3) | PIN_ODR_HIGH(GPIOC_PIN4) | PIN_ODR_HIGH(GPIOC_PIN5) | PIN_ODR_HIGH(GPIOC_PIN6) | PIN_ODR_HIGH(GPIOC_PIN7) | PIN_ODR_HIGH(GPIOC_PIN8) | PIN_ODR_HIGH(GPIOC_PIN9) | PIN_ODR_HIGH(GPIOC_PIN10) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_PIN12) | PIN_ODR_HIGH(GPIOC_PIN13) | PIN_ODR_HIGH(GPIOC_PIN14) | PIN_ODR_HIGH(GPIOC_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOC_PIN5) | \
|
#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | PIN_AFIO_AF(GPIOC_PIN1, 0) | PIN_AFIO_AF(GPIOC_PIN2, 0) | PIN_AFIO_AF(GPIOC_PIN3, 0) | PIN_AFIO_AF(GPIOC_PIN4, 0) | PIN_AFIO_AF(GPIOC_PIN5, 0) | PIN_AFIO_AF(GPIOC_PIN6, 0) | PIN_AFIO_AF(GPIOC_PIN7, 0))
|
||||||
PIN_MODE_INPUT(GPIOC_PIN6) | \
|
#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | PIN_AFIO_AF(GPIOC_PIN9, 0) | PIN_AFIO_AF(GPIOC_PIN10, 0) | PIN_AFIO_AF(GPIOC_PIN11, 0) | PIN_AFIO_AF(GPIOC_PIN12, 0) | PIN_AFIO_AF(GPIOC_PIN13, 0) | PIN_AFIO_AF(GPIOC_PIN14, 0) | PIN_AFIO_AF(GPIOC_PIN15, 0))
|
||||||
PIN_MODE_INPUT(GPIOC_PIN7) | \
|
|
||||||
PIN_MODE_INPUT(GPIOC_PIN8) | \
|
|
||||||
PIN_MODE_INPUT(GPIOC_PIN9) | \
|
|
||||||
PIN_MODE_INPUT(GPIOC_PIN10) | \
|
|
||||||
PIN_MODE_INPUT(GPIOC_PIN11) | \
|
|
||||||
PIN_MODE_INPUT(GPIOC_PIN12) | \
|
|
||||||
PIN_MODE_INPUT(GPIOC_PIN13) | \
|
|
||||||
PIN_MODE_INPUT(GPIOC_PIN14) | \
|
|
||||||
PIN_MODE_INPUT(GPIOC_PIN15))
|
|
||||||
#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOC_PIN15))
|
|
||||||
#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN6) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOC_PIN14) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOC_PIN15))
|
|
||||||
#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN1) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN2) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN3) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN4) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN5) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN6) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN7) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN8) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN9) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN10) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN11) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN12) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOC_PIN13) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOC_PIN14) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOC_PIN15))
|
|
||||||
#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN1) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN2) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN3) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN4) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN5) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN6) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN7) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN8) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN9) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN10) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN11) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN12) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN13) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN14) | \
|
|
||||||
PIN_ODR_HIGH(GPIOC_PIN15))
|
|
||||||
#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN1, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN2, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN3, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN4, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN5, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN6, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN7, 0))
|
|
||||||
#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN9, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN10, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN11, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN12, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN13, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN14, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOC_PIN15, 0))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GPIOD setup:
|
* GPIOD setup:
|
||||||
@ -595,102 +327,13 @@
|
|||||||
* PD14 - PIN14 (input pullup).
|
* PD14 - PIN14 (input pullup).
|
||||||
* PD15 - PIN15 (input pullup).
|
* PD15 - PIN15 (input pullup).
|
||||||
*/
|
*/
|
||||||
#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \
|
#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | PIN_MODE_INPUT(GPIOD_PIN1) | PIN_MODE_INPUT(GPIOD_PIN2) | PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11) | PIN_MODE_INPUT(GPIOD_PIN12) | PIN_MODE_INPUT(GPIOD_PIN13) | PIN_MODE_INPUT(GPIOD_PIN14) | PIN_MODE_INPUT(GPIOD_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOD_PIN1) | \
|
#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | PIN_OTYPE_PUSHPULL(GPIOD_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOD_PIN2) | \
|
#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | PIN_OSPEED_VERYLOW(GPIOD_PIN1) | PIN_OSPEED_VERYLOW(GPIOD_PIN2) | PIN_OSPEED_VERYLOW(GPIOD_PIN3) | PIN_OSPEED_VERYLOW(GPIOD_PIN4) | PIN_OSPEED_VERYLOW(GPIOD_PIN5) | PIN_OSPEED_VERYLOW(GPIOD_PIN6) | PIN_OSPEED_VERYLOW(GPIOD_PIN7) | PIN_OSPEED_VERYLOW(GPIOD_PIN8) | PIN_OSPEED_VERYLOW(GPIOD_PIN9) | PIN_OSPEED_VERYLOW(GPIOD_PIN10) | PIN_OSPEED_VERYLOW(GPIOD_PIN11) | PIN_OSPEED_VERYLOW(GPIOD_PIN12) | PIN_OSPEED_VERYLOW(GPIOD_PIN13) | PIN_OSPEED_VERYLOW(GPIOD_PIN14) | PIN_OSPEED_VERYLOW(GPIOD_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOD_PIN3) | \
|
#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | PIN_PUPDR_PULLUP(GPIOD_PIN1) | PIN_PUPDR_PULLUP(GPIOD_PIN2) | PIN_PUPDR_PULLUP(GPIOD_PIN3) | PIN_PUPDR_PULLUP(GPIOD_PIN4) | PIN_PUPDR_PULLUP(GPIOD_PIN5) | PIN_PUPDR_PULLUP(GPIOD_PIN6) | PIN_PUPDR_PULLUP(GPIOD_PIN7) | PIN_PUPDR_PULLUP(GPIOD_PIN8) | PIN_PUPDR_PULLUP(GPIOD_PIN9) | PIN_PUPDR_PULLUP(GPIOD_PIN10) | PIN_PUPDR_PULLUP(GPIOD_PIN11) | PIN_PUPDR_PULLUP(GPIOD_PIN12) | PIN_PUPDR_PULLUP(GPIOD_PIN13) | PIN_PUPDR_PULLUP(GPIOD_PIN14) | PIN_PUPDR_PULLUP(GPIOD_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOD_PIN4) | \
|
#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | PIN_ODR_HIGH(GPIOD_PIN1) | PIN_ODR_HIGH(GPIOD_PIN2) | PIN_ODR_HIGH(GPIOD_PIN3) | PIN_ODR_HIGH(GPIOD_PIN4) | PIN_ODR_HIGH(GPIOD_PIN5) | PIN_ODR_HIGH(GPIOD_PIN6) | PIN_ODR_HIGH(GPIOD_PIN7) | PIN_ODR_HIGH(GPIOD_PIN8) | PIN_ODR_HIGH(GPIOD_PIN9) | PIN_ODR_HIGH(GPIOD_PIN10) | PIN_ODR_HIGH(GPIOD_PIN11) | PIN_ODR_HIGH(GPIOD_PIN12) | PIN_ODR_HIGH(GPIOD_PIN13) | PIN_ODR_HIGH(GPIOD_PIN14) | PIN_ODR_HIGH(GPIOD_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOD_PIN5) | \
|
#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | PIN_AFIO_AF(GPIOD_PIN1, 0) | PIN_AFIO_AF(GPIOD_PIN2, 0) | PIN_AFIO_AF(GPIOD_PIN3, 0) | PIN_AFIO_AF(GPIOD_PIN4, 0) | PIN_AFIO_AF(GPIOD_PIN5, 0) | PIN_AFIO_AF(GPIOD_PIN6, 0) | PIN_AFIO_AF(GPIOD_PIN7, 0))
|
||||||
PIN_MODE_INPUT(GPIOD_PIN6) | \
|
#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | PIN_AFIO_AF(GPIOD_PIN9, 0) | PIN_AFIO_AF(GPIOD_PIN10, 0) | PIN_AFIO_AF(GPIOD_PIN11, 0) | PIN_AFIO_AF(GPIOD_PIN12, 0) | PIN_AFIO_AF(GPIOD_PIN13, 0) | PIN_AFIO_AF(GPIOD_PIN14, 0) | PIN_AFIO_AF(GPIOD_PIN15, 0))
|
||||||
PIN_MODE_INPUT(GPIOD_PIN7) | \
|
|
||||||
PIN_MODE_INPUT(GPIOD_PIN8) | \
|
|
||||||
PIN_MODE_INPUT(GPIOD_PIN9) | \
|
|
||||||
PIN_MODE_INPUT(GPIOD_PIN10) | \
|
|
||||||
PIN_MODE_INPUT(GPIOD_PIN11) | \
|
|
||||||
PIN_MODE_INPUT(GPIOD_PIN12) | \
|
|
||||||
PIN_MODE_INPUT(GPIOD_PIN13) | \
|
|
||||||
PIN_MODE_INPUT(GPIOD_PIN14) | \
|
|
||||||
PIN_MODE_INPUT(GPIOD_PIN15))
|
|
||||||
#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOD_PIN15))
|
|
||||||
#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOD_PIN15))
|
|
||||||
#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN1) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN2) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN3) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN4) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN5) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN6) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN7) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN8) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN9) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN10) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN11) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN12) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN13) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN14) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOD_PIN15))
|
|
||||||
#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN1) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN2) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN3) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN4) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN5) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN6) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN7) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN8) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN9) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN10) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN11) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN12) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN13) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN14) | \
|
|
||||||
PIN_ODR_HIGH(GPIOD_PIN15))
|
|
||||||
#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN1, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN2, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN3, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN4, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN5, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN6, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN7, 0))
|
|
||||||
#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN9, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN10, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN11, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN12, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN13, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN14, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOD_PIN15, 0))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GPIOE setup:
|
* GPIOE setup:
|
||||||
@ -712,102 +355,13 @@
|
|||||||
* PE14 - PIN14 (output pushpull maximum).
|
* PE14 - PIN14 (output pushpull maximum).
|
||||||
* PE15 - PIN15 (output pushpull maximum).
|
* PE15 - PIN15 (output pushpull maximum).
|
||||||
*/
|
*/
|
||||||
#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \
|
#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | PIN_MODE_INPUT(GPIOE_PIN1) | PIN_MODE_INPUT(GPIOE_PIN2) | PIN_MODE_OUTPUT(GPIOE_PIN3) | PIN_MODE_INPUT(GPIOE_PIN4) | PIN_MODE_INPUT(GPIOE_PIN5) | PIN_MODE_INPUT(GPIOE_PIN6) | PIN_MODE_INPUT(GPIOE_PIN7) | PIN_MODE_OUTPUT(GPIOE_PIN8) | PIN_MODE_OUTPUT(GPIOE_PIN9) | PIN_MODE_OUTPUT(GPIOE_PIN10) | PIN_MODE_OUTPUT(GPIOE_PIN11) | PIN_MODE_OUTPUT(GPIOE_PIN12) | PIN_MODE_OUTPUT(GPIOE_PIN13) | PIN_MODE_OUTPUT(GPIOE_PIN14) | PIN_MODE_OUTPUT(GPIOE_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOE_PIN1) | \
|
#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | PIN_OTYPE_PUSHPULL(GPIOE_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOE_PIN2) |\
|
#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | PIN_OSPEED_VERYLOW(GPIOE_PIN1) | PIN_OSPEED_VERYLOW(GPIOE_PIN2) | PIN_OSPEED_HIGH(GPIOE_PIN3) | PIN_OSPEED_VERYLOW(GPIOE_PIN4) | PIN_OSPEED_VERYLOW(GPIOE_PIN5) | PIN_OSPEED_VERYLOW(GPIOE_PIN6) | PIN_OSPEED_VERYLOW(GPIOE_PIN7) | PIN_OSPEED_HIGH(GPIOE_PIN8) | PIN_OSPEED_HIGH(GPIOE_PIN9) | PIN_OSPEED_HIGH(GPIOE_PIN10) | PIN_OSPEED_HIGH(GPIOE_PIN11) | PIN_OSPEED_HIGH(GPIOE_PIN12) | PIN_OSPEED_HIGH(GPIOE_PIN13) | PIN_OSPEED_HIGH(GPIOE_PIN14) | PIN_OSPEED_HIGH(GPIOE_PIN15))
|
||||||
PIN_MODE_OUTPUT(GPIOE_PIN3) | \
|
#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | PIN_PUPDR_PULLUP(GPIOE_PIN1) | PIN_PUPDR_PULLUP(GPIOE_PIN2) | PIN_PUPDR_FLOATING(GPIOE_PIN3) | PIN_PUPDR_PULLUP(GPIOE_PIN4) | PIN_PUPDR_PULLUP(GPIOE_PIN5) | PIN_PUPDR_PULLUP(GPIOE_PIN6) | PIN_PUPDR_PULLUP(GPIOE_PIN7) | PIN_PUPDR_PULLUP(GPIOE_PIN8) | PIN_PUPDR_PULLUP(GPIOE_PIN9) | PIN_PUPDR_PULLUP(GPIOE_PIN10) | PIN_PUPDR_FLOATING(GPIOE_PIN11) | PIN_PUPDR_PULLUP(GPIOE_PIN12) | PIN_PUPDR_FLOATING(GPIOE_PIN13) | PIN_PUPDR_FLOATING(GPIOE_PIN14) | PIN_PUPDR_FLOATING(GPIOE_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOE_PIN4) |\
|
#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | PIN_ODR_HIGH(GPIOE_PIN1) | PIN_ODR_HIGH(GPIOE_PIN2) | PIN_ODR_HIGH(GPIOE_PIN3) | PIN_ODR_HIGH(GPIOE_PIN4) | PIN_ODR_HIGH(GPIOE_PIN5) | PIN_ODR_HIGH(GPIOE_PIN6) | PIN_ODR_HIGH(GPIOE_PIN7) | PIN_ODR_LOW(GPIOE_PIN8) | PIN_ODR_LOW(GPIOE_PIN9) | PIN_ODR_LOW(GPIOE_PIN10) | PIN_ODR_LOW(GPIOE_PIN11) | PIN_ODR_LOW(GPIOE_PIN12) | PIN_ODR_LOW(GPIOE_PIN13) | PIN_ODR_LOW(GPIOE_PIN14) | PIN_ODR_LOW(GPIOE_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOE_PIN5) |\
|
#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | PIN_AFIO_AF(GPIOE_PIN1, 0) | PIN_AFIO_AF(GPIOE_PIN2, 0) | PIN_AFIO_AF(GPIOE_PIN3, 0) | PIN_AFIO_AF(GPIOE_PIN4, 0) | PIN_AFIO_AF(GPIOE_PIN5, 0) | PIN_AFIO_AF(GPIOE_PIN6, 0) | PIN_AFIO_AF(GPIOE_PIN7, 0))
|
||||||
PIN_MODE_INPUT(GPIOE_PIN6) | \
|
#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | PIN_AFIO_AF(GPIOE_PIN9, 0) | PIN_AFIO_AF(GPIOE_PIN10, 0) | PIN_AFIO_AF(GPIOE_PIN11, 0) | PIN_AFIO_AF(GPIOE_PIN12, 0) | PIN_AFIO_AF(GPIOE_PIN13, 0) | PIN_AFIO_AF(GPIOE_PIN14, 0) | PIN_AFIO_AF(GPIOE_PIN15, 0))
|
||||||
PIN_MODE_INPUT(GPIOE_PIN7) | \
|
|
||||||
PIN_MODE_OUTPUT(GPIOE_PIN8) | \
|
|
||||||
PIN_MODE_OUTPUT(GPIOE_PIN9) | \
|
|
||||||
PIN_MODE_OUTPUT(GPIOE_PIN10) | \
|
|
||||||
PIN_MODE_OUTPUT(GPIOE_PIN11) | \
|
|
||||||
PIN_MODE_OUTPUT(GPIOE_PIN12) | \
|
|
||||||
PIN_MODE_OUTPUT(GPIOE_PIN13) | \
|
|
||||||
PIN_MODE_OUTPUT(GPIOE_PIN14) | \
|
|
||||||
PIN_MODE_OUTPUT(GPIOE_PIN15))
|
|
||||||
#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) |\
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN1) |\
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN2) |\
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN4) |\
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN5) |\
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN10) |\
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN14) |\
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN15))
|
|
||||||
#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) |\
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOE_PIN1) |\
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOE_PIN2) |\
|
|
||||||
PIN_OSPEED_HIGH(GPIOE_PIN3) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOE_PIN8) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOE_PIN9) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOE_PIN10) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOE_PIN11) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOE_PIN12) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOE_PIN13) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOE_PIN14) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOE_PIN15))
|
|
||||||
#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOE_PIN1) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOE_PIN2) |\
|
|
||||||
PIN_PUPDR_FLOATING(GPIOE_PIN3) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOE_PIN4) |\
|
|
||||||
PIN_PUPDR_PULLUP(GPIOE_PIN5) |\
|
|
||||||
PIN_PUPDR_PULLUP(GPIOE_PIN6) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOE_PIN7) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOE_PIN8) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOE_PIN9) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOE_PIN10) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOE_PIN11) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOE_PIN12) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOE_PIN13) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOE_PIN14) |\
|
|
||||||
PIN_PUPDR_FLOATING(GPIOE_PIN15))
|
|
||||||
#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \
|
|
||||||
PIN_ODR_HIGH(GPIOE_PIN1) | \
|
|
||||||
PIN_ODR_HIGH(GPIOE_PIN2) | \
|
|
||||||
PIN_ODR_HIGH(GPIOE_PIN3) | \
|
|
||||||
PIN_ODR_HIGH(GPIOE_PIN4) | \
|
|
||||||
PIN_ODR_HIGH(GPIOE_PIN5) | \
|
|
||||||
PIN_ODR_HIGH(GPIOE_PIN6) | \
|
|
||||||
PIN_ODR_HIGH(GPIOE_PIN7) | \
|
|
||||||
PIN_ODR_LOW(GPIOE_PIN8) | \
|
|
||||||
PIN_ODR_LOW(GPIOE_PIN9) | \
|
|
||||||
PIN_ODR_LOW(GPIOE_PIN10) | \
|
|
||||||
PIN_ODR_LOW(GPIOE_PIN11) | \
|
|
||||||
PIN_ODR_LOW(GPIOE_PIN12) | \
|
|
||||||
PIN_ODR_LOW(GPIOE_PIN13) | \
|
|
||||||
PIN_ODR_LOW(GPIOE_PIN14) | \
|
|
||||||
PIN_ODR_LOW(GPIOE_PIN15))
|
|
||||||
#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN1, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN2, 0) |\
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN3, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN4, 0) |\
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN5, 0) |\
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN6, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN7, 0))
|
|
||||||
#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN9, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN10, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN11, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN12, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN13, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN14, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOE_PIN15, 0))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GPIOF setup:
|
* GPIOF setup:
|
||||||
@ -829,102 +383,13 @@
|
|||||||
* PF14 - PIN14 (input pullup).
|
* PF14 - PIN14 (input pullup).
|
||||||
* PF15 - PIN15 (input pullup).
|
* PF15 - PIN15 (input pullup).
|
||||||
*/
|
*/
|
||||||
#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | \
|
#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | PIN_MODE_INPUT(GPIOF_I2C2_SCL) | PIN_MODE_INPUT(GPIOF_PIN2) | PIN_MODE_INPUT(GPIOF_PIN3) | PIN_MODE_INPUT(GPIOF_PIN4) | PIN_MODE_INPUT(GPIOF_PIN5) | PIN_MODE_INPUT(GPIOF_PIN6) | PIN_MODE_INPUT(GPIOF_PIN7) | PIN_MODE_INPUT(GPIOF_PIN8) | PIN_MODE_INPUT(GPIOF_PIN9) | PIN_MODE_INPUT(GPIOF_PIN10) | PIN_MODE_INPUT(GPIOF_PIN11) | PIN_MODE_INPUT(GPIOF_PIN12) | PIN_MODE_INPUT(GPIOF_PIN13) | PIN_MODE_INPUT(GPIOF_PIN14) | PIN_MODE_INPUT(GPIOF_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \
|
#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOF_PIN2) | \
|
#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | PIN_OSPEED_VERYLOW(GPIOF_PIN2) | PIN_OSPEED_VERYLOW(GPIOF_PIN3) | PIN_OSPEED_VERYLOW(GPIOF_PIN4) | PIN_OSPEED_VERYLOW(GPIOF_PIN5) | PIN_OSPEED_VERYLOW(GPIOF_PIN6) | PIN_OSPEED_VERYLOW(GPIOF_PIN7) | PIN_OSPEED_VERYLOW(GPIOF_PIN8) | PIN_OSPEED_VERYLOW(GPIOF_PIN9) | PIN_OSPEED_VERYLOW(GPIOF_PIN10) | PIN_OSPEED_VERYLOW(GPIOF_PIN11) | PIN_OSPEED_VERYLOW(GPIOF_PIN12) | PIN_OSPEED_VERYLOW(GPIOF_PIN13) | PIN_OSPEED_VERYLOW(GPIOF_PIN14) | PIN_OSPEED_VERYLOW(GPIOF_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOF_PIN3) | \
|
#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | PIN_PUPDR_PULLUP(GPIOF_PIN2) | PIN_PUPDR_PULLUP(GPIOF_PIN3) | PIN_PUPDR_PULLUP(GPIOF_PIN4) | PIN_PUPDR_PULLUP(GPIOF_PIN5) | PIN_PUPDR_PULLUP(GPIOF_PIN6) | PIN_PUPDR_PULLUP(GPIOF_PIN7) | PIN_PUPDR_PULLUP(GPIOF_PIN8) | PIN_PUPDR_PULLUP(GPIOF_PIN9) | PIN_PUPDR_PULLUP(GPIOF_PIN10) | PIN_PUPDR_PULLUP(GPIOF_PIN11) | PIN_PUPDR_PULLUP(GPIOF_PIN12) | PIN_PUPDR_PULLUP(GPIOF_PIN13) | PIN_PUPDR_PULLUP(GPIOF_PIN14) | PIN_PUPDR_PULLUP(GPIOF_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOF_PIN4) | \
|
#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | PIN_ODR_HIGH(GPIOF_I2C2_SCL) | PIN_ODR_HIGH(GPIOF_PIN2) | PIN_ODR_HIGH(GPIOF_PIN3) | PIN_ODR_HIGH(GPIOF_PIN4) | PIN_ODR_HIGH(GPIOF_PIN5) | PIN_ODR_HIGH(GPIOF_PIN6) | PIN_ODR_HIGH(GPIOF_PIN7) | PIN_ODR_HIGH(GPIOF_PIN8) | PIN_ODR_HIGH(GPIOF_PIN9) | PIN_ODR_HIGH(GPIOF_PIN10) | PIN_ODR_HIGH(GPIOF_PIN11) | PIN_ODR_HIGH(GPIOF_PIN12) | PIN_ODR_HIGH(GPIOF_PIN13) | PIN_ODR_HIGH(GPIOF_PIN14) | PIN_ODR_HIGH(GPIOF_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOF_PIN5) | \
|
#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | PIN_AFIO_AF(GPIOF_PIN2, 0) | PIN_AFIO_AF(GPIOF_PIN3, 0) | PIN_AFIO_AF(GPIOF_PIN4, 0) | PIN_AFIO_AF(GPIOF_PIN5, 0) | PIN_AFIO_AF(GPIOF_PIN6, 0) | PIN_AFIO_AF(GPIOF_PIN7, 0))
|
||||||
PIN_MODE_INPUT(GPIOF_PIN6) | \
|
#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | PIN_AFIO_AF(GPIOF_PIN9, 0) | PIN_AFIO_AF(GPIOF_PIN10, 0) | PIN_AFIO_AF(GPIOF_PIN11, 0) | PIN_AFIO_AF(GPIOF_PIN12, 0) | PIN_AFIO_AF(GPIOF_PIN13, 0) | PIN_AFIO_AF(GPIOF_PIN14, 0) | PIN_AFIO_AF(GPIOF_PIN15, 0))
|
||||||
PIN_MODE_INPUT(GPIOF_PIN7) | \
|
|
||||||
PIN_MODE_INPUT(GPIOF_PIN8) | \
|
|
||||||
PIN_MODE_INPUT(GPIOF_PIN9) | \
|
|
||||||
PIN_MODE_INPUT(GPIOF_PIN10) | \
|
|
||||||
PIN_MODE_INPUT(GPIOF_PIN11) | \
|
|
||||||
PIN_MODE_INPUT(GPIOF_PIN12) | \
|
|
||||||
PIN_MODE_INPUT(GPIOF_PIN13) | \
|
|
||||||
PIN_MODE_INPUT(GPIOF_PIN14) | \
|
|
||||||
PIN_MODE_INPUT(GPIOF_PIN15))
|
|
||||||
#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
|
|
||||||
#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | \
|
|
||||||
PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOF_PIN15))
|
|
||||||
#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | \
|
|
||||||
PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN2) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN3) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN4) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN5) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN6) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN7) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN8) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN9) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN10) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN11) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN12) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN13) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN14) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOF_PIN15))
|
|
||||||
#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN2) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN3) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN4) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN5) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN6) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN7) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN8) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN9) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN10) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN11) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN12) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN13) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN14) | \
|
|
||||||
PIN_ODR_HIGH(GPIOF_PIN15))
|
|
||||||
#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN2, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN3, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN4, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN5, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN6, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN7, 0))
|
|
||||||
#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN9, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN10, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN11, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN12, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN13, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN14, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOF_PIN15, 0))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GPIOG setup:
|
* GPIOG setup:
|
||||||
@ -946,102 +411,13 @@
|
|||||||
* PG14 - PIN14 (input pullup).
|
* PG14 - PIN14 (input pullup).
|
||||||
* PG15 - PIN15 (input pullup).
|
* PG15 - PIN15 (input pullup).
|
||||||
*/
|
*/
|
||||||
#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \
|
#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | PIN_MODE_INPUT(GPIOG_PIN1) | PIN_MODE_INPUT(GPIOG_PIN2) | PIN_MODE_INPUT(GPIOG_PIN3) | PIN_MODE_INPUT(GPIOG_PIN4) | PIN_MODE_INPUT(GPIOG_PIN5) | PIN_MODE_INPUT(GPIOG_PIN6) | PIN_MODE_INPUT(GPIOG_PIN7) | PIN_MODE_INPUT(GPIOG_PIN8) | PIN_MODE_INPUT(GPIOG_PIN9) | PIN_MODE_INPUT(GPIOG_PIN10) | PIN_MODE_INPUT(GPIOG_PIN11) | PIN_MODE_INPUT(GPIOG_PIN12) | PIN_MODE_INPUT(GPIOG_PIN13) | PIN_MODE_INPUT(GPIOG_PIN14) | PIN_MODE_INPUT(GPIOG_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOG_PIN1) | \
|
#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | PIN_OTYPE_PUSHPULL(GPIOG_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOG_PIN2) | \
|
#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | PIN_OSPEED_VERYLOW(GPIOG_PIN1) | PIN_OSPEED_VERYLOW(GPIOG_PIN2) | PIN_OSPEED_VERYLOW(GPIOG_PIN3) | PIN_OSPEED_VERYLOW(GPIOG_PIN4) | PIN_OSPEED_VERYLOW(GPIOG_PIN5) | PIN_OSPEED_VERYLOW(GPIOG_PIN6) | PIN_OSPEED_VERYLOW(GPIOG_PIN7) | PIN_OSPEED_VERYLOW(GPIOG_PIN8) | PIN_OSPEED_VERYLOW(GPIOG_PIN9) | PIN_OSPEED_VERYLOW(GPIOG_PIN10) | PIN_OSPEED_VERYLOW(GPIOG_PIN11) | PIN_OSPEED_VERYLOW(GPIOG_PIN12) | PIN_OSPEED_VERYLOW(GPIOG_PIN13) | PIN_OSPEED_VERYLOW(GPIOG_PIN14) | PIN_OSPEED_VERYLOW(GPIOG_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOG_PIN3) | \
|
#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | PIN_PUPDR_PULLUP(GPIOG_PIN1) | PIN_PUPDR_PULLUP(GPIOG_PIN2) | PIN_PUPDR_PULLUP(GPIOG_PIN3) | PIN_PUPDR_PULLUP(GPIOG_PIN4) | PIN_PUPDR_PULLUP(GPIOG_PIN5) | PIN_PUPDR_PULLUP(GPIOG_PIN6) | PIN_PUPDR_PULLUP(GPIOG_PIN7) | PIN_PUPDR_PULLUP(GPIOG_PIN8) | PIN_PUPDR_PULLUP(GPIOG_PIN9) | PIN_PUPDR_PULLUP(GPIOG_PIN10) | PIN_PUPDR_PULLUP(GPIOG_PIN11) | PIN_PUPDR_PULLUP(GPIOG_PIN12) | PIN_PUPDR_PULLUP(GPIOG_PIN13) | PIN_PUPDR_PULLUP(GPIOG_PIN14) | PIN_PUPDR_PULLUP(GPIOG_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOG_PIN4) | \
|
#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | PIN_ODR_HIGH(GPIOG_PIN1) | PIN_ODR_HIGH(GPIOG_PIN2) | PIN_ODR_HIGH(GPIOG_PIN3) | PIN_ODR_HIGH(GPIOG_PIN4) | PIN_ODR_HIGH(GPIOG_PIN5) | PIN_ODR_HIGH(GPIOG_PIN6) | PIN_ODR_HIGH(GPIOG_PIN7) | PIN_ODR_HIGH(GPIOG_PIN8) | PIN_ODR_HIGH(GPIOG_PIN9) | PIN_ODR_HIGH(GPIOG_PIN10) | PIN_ODR_HIGH(GPIOG_PIN11) | PIN_ODR_HIGH(GPIOG_PIN12) | PIN_ODR_HIGH(GPIOG_PIN13) | PIN_ODR_HIGH(GPIOG_PIN14) | PIN_ODR_HIGH(GPIOG_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOG_PIN5) | \
|
#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | PIN_AFIO_AF(GPIOG_PIN1, 0) | PIN_AFIO_AF(GPIOG_PIN2, 0) | PIN_AFIO_AF(GPIOG_PIN3, 0) | PIN_AFIO_AF(GPIOG_PIN4, 0) | PIN_AFIO_AF(GPIOG_PIN5, 0) | PIN_AFIO_AF(GPIOG_PIN6, 0) | PIN_AFIO_AF(GPIOG_PIN7, 0))
|
||||||
PIN_MODE_INPUT(GPIOG_PIN6) | \
|
#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | PIN_AFIO_AF(GPIOG_PIN9, 0) | PIN_AFIO_AF(GPIOG_PIN10, 0) | PIN_AFIO_AF(GPIOG_PIN11, 0) | PIN_AFIO_AF(GPIOG_PIN12, 0) | PIN_AFIO_AF(GPIOG_PIN13, 0) | PIN_AFIO_AF(GPIOG_PIN14, 0) | PIN_AFIO_AF(GPIOG_PIN15, 0))
|
||||||
PIN_MODE_INPUT(GPIOG_PIN7) | \
|
|
||||||
PIN_MODE_INPUT(GPIOG_PIN8) | \
|
|
||||||
PIN_MODE_INPUT(GPIOG_PIN9) | \
|
|
||||||
PIN_MODE_INPUT(GPIOG_PIN10) | \
|
|
||||||
PIN_MODE_INPUT(GPIOG_PIN11) | \
|
|
||||||
PIN_MODE_INPUT(GPIOG_PIN12) | \
|
|
||||||
PIN_MODE_INPUT(GPIOG_PIN13) | \
|
|
||||||
PIN_MODE_INPUT(GPIOG_PIN14) | \
|
|
||||||
PIN_MODE_INPUT(GPIOG_PIN15))
|
|
||||||
#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOG_PIN15))
|
|
||||||
#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOG_PIN15))
|
|
||||||
#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN1) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN2) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN3) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN4) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN5) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN6) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN7) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN8) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN9) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN10) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN11) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN12) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN13) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN14) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOG_PIN15))
|
|
||||||
#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN1) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN2) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN3) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN4) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN5) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN6) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN7) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN8) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN9) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN10) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN11) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN12) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN13) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN14) | \
|
|
||||||
PIN_ODR_HIGH(GPIOG_PIN15))
|
|
||||||
#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN1, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN2, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN3, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN4, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN5, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN6, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN7, 0))
|
|
||||||
#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN9, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN10, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN11, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN12, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN13, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN14, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOG_PIN15, 0))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GPIOH setup:
|
* GPIOH setup:
|
||||||
@ -1063,103 +439,13 @@
|
|||||||
* PH14 - PIN14 (input pullup).
|
* PH14 - PIN14 (input pullup).
|
||||||
* PH15 - PIN15 (input pullup).
|
* PH15 - PIN15 (input pullup).
|
||||||
*/
|
*/
|
||||||
#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \
|
#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | PIN_MODE_INPUT(GPIOH_PIN1) | PIN_MODE_INPUT(GPIOH_PIN2) | PIN_MODE_INPUT(GPIOH_PIN3) | PIN_MODE_INPUT(GPIOH_PIN4) | PIN_MODE_INPUT(GPIOH_PIN5) | PIN_MODE_INPUT(GPIOH_PIN6) | PIN_MODE_INPUT(GPIOH_PIN7) | PIN_MODE_INPUT(GPIOH_PIN8) | PIN_MODE_INPUT(GPIOH_PIN9) | PIN_MODE_INPUT(GPIOH_PIN10) | PIN_MODE_INPUT(GPIOH_PIN11) | PIN_MODE_INPUT(GPIOH_PIN12) | PIN_MODE_INPUT(GPIOH_PIN13) | PIN_MODE_INPUT(GPIOH_PIN14) | PIN_MODE_INPUT(GPIOH_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOH_PIN1) | \
|
#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | PIN_OTYPE_PUSHPULL(GPIOH_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOH_PIN2) | \
|
#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | PIN_OSPEED_VERYLOW(GPIOH_PIN1) | PIN_OSPEED_VERYLOW(GPIOH_PIN2) | PIN_OSPEED_VERYLOW(GPIOH_PIN3) | PIN_OSPEED_VERYLOW(GPIOH_PIN4) | PIN_OSPEED_VERYLOW(GPIOH_PIN5) | PIN_OSPEED_VERYLOW(GPIOH_PIN6) | PIN_OSPEED_VERYLOW(GPIOH_PIN7) | PIN_OSPEED_VERYLOW(GPIOH_PIN8) | PIN_OSPEED_VERYLOW(GPIOH_PIN9) | PIN_OSPEED_VERYLOW(GPIOH_PIN10) | PIN_OSPEED_VERYLOW(GPIOH_PIN11) | PIN_OSPEED_VERYLOW(GPIOH_PIN12) | PIN_OSPEED_VERYLOW(GPIOH_PIN13) | PIN_OSPEED_VERYLOW(GPIOH_PIN14) | PIN_OSPEED_VERYLOW(GPIOH_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOH_PIN3) | \
|
#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | PIN_PUPDR_PULLUP(GPIOH_PIN1) | PIN_PUPDR_PULLUP(GPIOH_PIN2) | PIN_PUPDR_PULLUP(GPIOH_PIN3) | PIN_PUPDR_PULLUP(GPIOH_PIN4) | PIN_PUPDR_PULLUP(GPIOH_PIN5) | PIN_PUPDR_PULLUP(GPIOH_PIN6) | PIN_PUPDR_PULLUP(GPIOH_PIN7) | PIN_PUPDR_PULLUP(GPIOH_PIN8) | PIN_PUPDR_PULLUP(GPIOH_PIN9) | PIN_PUPDR_PULLUP(GPIOH_PIN10) | PIN_PUPDR_PULLUP(GPIOH_PIN11) | PIN_PUPDR_PULLUP(GPIOH_PIN12) | PIN_PUPDR_PULLUP(GPIOH_PIN13) | PIN_PUPDR_PULLUP(GPIOH_PIN14) | PIN_PUPDR_PULLUP(GPIOH_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOH_PIN4) | \
|
#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | PIN_ODR_HIGH(GPIOH_PIN1) | PIN_ODR_HIGH(GPIOH_PIN2) | PIN_ODR_HIGH(GPIOH_PIN3) | PIN_ODR_HIGH(GPIOH_PIN4) | PIN_ODR_HIGH(GPIOH_PIN5) | PIN_ODR_HIGH(GPIOH_PIN6) | PIN_ODR_HIGH(GPIOH_PIN7) | PIN_ODR_HIGH(GPIOH_PIN8) | PIN_ODR_HIGH(GPIOH_PIN9) | PIN_ODR_HIGH(GPIOH_PIN10) | PIN_ODR_HIGH(GPIOH_PIN11) | PIN_ODR_HIGH(GPIOH_PIN12) | PIN_ODR_HIGH(GPIOH_PIN13) | PIN_ODR_HIGH(GPIOH_PIN14) | PIN_ODR_HIGH(GPIOH_PIN15))
|
||||||
PIN_MODE_INPUT(GPIOH_PIN5) | \
|
#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | PIN_AFIO_AF(GPIOH_PIN1, 0) | PIN_AFIO_AF(GPIOH_PIN2, 0) | PIN_AFIO_AF(GPIOH_PIN3, 0) | PIN_AFIO_AF(GPIOH_PIN4, 0) | PIN_AFIO_AF(GPIOH_PIN5, 0) | PIN_AFIO_AF(GPIOH_PIN6, 0) | PIN_AFIO_AF(GPIOH_PIN7, 0))
|
||||||
PIN_MODE_INPUT(GPIOH_PIN6) | \
|
#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | PIN_AFIO_AF(GPIOH_PIN9, 0) | PIN_AFIO_AF(GPIOH_PIN10, 0) | PIN_AFIO_AF(GPIOH_PIN11, 0) | PIN_AFIO_AF(GPIOH_PIN12, 0) | PIN_AFIO_AF(GPIOH_PIN13, 0) | PIN_AFIO_AF(GPIOH_PIN14, 0) | PIN_AFIO_AF(GPIOH_PIN15, 0))
|
||||||
PIN_MODE_INPUT(GPIOH_PIN7) | \
|
|
||||||
PIN_MODE_INPUT(GPIOH_PIN8) | \
|
|
||||||
PIN_MODE_INPUT(GPIOH_PIN9) | \
|
|
||||||
PIN_MODE_INPUT(GPIOH_PIN10) | \
|
|
||||||
PIN_MODE_INPUT(GPIOH_PIN11) | \
|
|
||||||
PIN_MODE_INPUT(GPIOH_PIN12) | \
|
|
||||||
PIN_MODE_INPUT(GPIOH_PIN13) | \
|
|
||||||
PIN_MODE_INPUT(GPIOH_PIN14) | \
|
|
||||||
PIN_MODE_INPUT(GPIOH_PIN15))
|
|
||||||
#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \
|
|
||||||
PIN_OTYPE_PUSHPULL(GPIOH_PIN15))
|
|
||||||
#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \
|
|
||||||
PIN_OSPEED_VERYLOW(GPIOH_PIN15))
|
|
||||||
#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN1) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN2) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN3) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN4) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN5) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN6) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN7) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN8) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN9) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN10) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN11) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN12) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN13) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN14) | \
|
|
||||||
PIN_PUPDR_PULLUP(GPIOH_PIN15))
|
|
||||||
#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN1) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN2) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN3) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN4) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN5) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN6) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN7) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN8) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN9) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN10) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN11) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN12) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN13) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN14) | \
|
|
||||||
PIN_ODR_HIGH(GPIOH_PIN15))
|
|
||||||
#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN1, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN2, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN3, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN4, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN5, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN6, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN7, 0))
|
|
||||||
#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN9, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN10, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN11, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN12, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN13, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN14, 0) | \
|
|
||||||
PIN_AFIO_AF(GPIOH_PIN15, 0))
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* USB bus activation macro, required by the USB driver.
|
* USB bus activation macro, required by the USB driver.
|
||||||
@ -1171,7 +457,9 @@
|
|||||||
* USB bus de-activation macro, required by the USB driver.
|
* USB bus de-activation macro, required by the USB driver.
|
||||||
*/
|
*/
|
||||||
// #define usb_lld_disconnect_bus(usbp)
|
// #define usb_lld_disconnect_bus(usbp)
|
||||||
#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP)
|
#define usb_lld_disconnect_bus(usbp) \
|
||||||
|
(palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); \
|
||||||
|
palClearPad(GPIOA, GPIOA_USB_DP)
|
||||||
// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12)
|
// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12)
|
||||||
|
|
||||||
#if !defined(_FROM_ASM_)
|
#if !defined(_FROM_ASM_)
|
||||||
|
@ -21,9 +21,9 @@
|
|||||||
* @details Digital I/O ports static configuration as defined in @p board.h.
|
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||||
* This variable is used by the HAL when initializing the PAL driver.
|
* This variable is used by the HAL when initializing the PAL driver.
|
||||||
*/
|
*/
|
||||||
const PALConfig pal_default_config =
|
const PALConfig pal_default_config = {
|
||||||
|
.ports =
|
||||||
{
|
{
|
||||||
.ports = {
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* PORTA setup.
|
* PORTA setup.
|
||||||
@ -37,18 +37,9 @@ const PALConfig pal_default_config =
|
|||||||
* PTA0/3 SWD
|
* PTA0/3 SWD
|
||||||
*/
|
*/
|
||||||
.port = IOPORT1,
|
.port = IOPORT1,
|
||||||
.pads = {
|
.pads =
|
||||||
PAL_MODE_ALTERNATIVE_7, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
{
|
||||||
PAL_MODE_ALTERNATIVE_7, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
PAL_MODE_ALTERNATIVE_7, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_7, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_INPUT_ANALOG, PAL_MODE_INPUT_ANALOG, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_INPUT_ANALOG, PAL_MODE_INPUT_ANALOG, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -65,18 +56,9 @@ const PALConfig pal_default_config =
|
|||||||
* PTB19 - PIN25
|
* PTB19 - PIN25
|
||||||
*/
|
*/
|
||||||
.port = IOPORT2,
|
.port = IOPORT2,
|
||||||
.pads = {
|
.pads =
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
{
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_3, PAL_MODE_ALTERNATIVE_3, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_3, PAL_MODE_ALTERNATIVE_3,
|
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -97,18 +79,9 @@ const PALConfig pal_default_config =
|
|||||||
* PTC11 - PIN30
|
* PTC11 - PIN30
|
||||||
*/
|
*/
|
||||||
.port = IOPORT3,
|
.port = IOPORT3,
|
||||||
.pads = {
|
.pads =
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
{
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -125,18 +98,9 @@ const PALConfig pal_default_config =
|
|||||||
* PTD7 - PIN5
|
* PTD7 - PIN5
|
||||||
*/
|
*/
|
||||||
.port = IOPORT4,
|
.port = IOPORT4,
|
||||||
.pads = {
|
.pads =
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
{
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -147,18 +111,9 @@ const PALConfig pal_default_config =
|
|||||||
* PTE1 - PIN26
|
* PTE1 - PIN26
|
||||||
*/
|
*/
|
||||||
.port = IOPORT5,
|
.port = IOPORT5,
|
||||||
.pads = {
|
.pads =
|
||||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED,
|
{
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -178,7 +133,8 @@ const PALConfig pal_default_config =
|
|||||||
void __early_init(void) {
|
void __early_init(void) {
|
||||||
// This is a dirty hack and should only be used as a temporary fix until this
|
// This is a dirty hack and should only be used as a temporary fix until this
|
||||||
// is upstreamed.
|
// is upstreamed.
|
||||||
while (WDOG_TMROUTL < 2); // Must wait for WDOG timer if already running, before jumping
|
while (WDOG_TMROUTL < 2)
|
||||||
|
; // Must wait for WDOG timer if already running, before jumping
|
||||||
|
|
||||||
k20x_clock_init();
|
k20x_clock_init();
|
||||||
}
|
}
|
||||||
@ -187,5 +143,4 @@ void __early_init(void) {
|
|||||||
* @brief Board-specific initialization code.
|
* @brief Board-specific initialization code.
|
||||||
* @todo Add your board-specific code, if any.
|
* @todo Add your board-specific code, if any.
|
||||||
*/
|
*/
|
||||||
void boardInit(void) {
|
void boardInit(void) {}
|
||||||
}
|
|
||||||
|
@ -20,13 +20,11 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
uint8_t DRV2605L_transfer_buffer[2];
|
uint8_t DRV2605L_transfer_buffer[2];
|
||||||
uint8_t DRV2605L_tx_register[0];
|
uint8_t DRV2605L_tx_register[0];
|
||||||
uint8_t DRV2605L_read_buffer[0];
|
uint8_t DRV2605L_read_buffer[0];
|
||||||
uint8_t DRV2605L_read_register;
|
uint8_t DRV2605L_read_register;
|
||||||
|
|
||||||
|
|
||||||
void DRV_write(uint8_t drv_register, uint8_t settings) {
|
void DRV_write(uint8_t drv_register, uint8_t settings) {
|
||||||
DRV2605L_transfer_buffer[0] = drv_register;
|
DRV2605L_transfer_buffer[0] = drv_register;
|
||||||
DRV2605L_transfer_buffer[1] = settings;
|
DRV2605L_transfer_buffer[1] = settings;
|
||||||
@ -35,15 +33,11 @@ void DRV_write(uint8_t drv_register, uint8_t settings) {
|
|||||||
|
|
||||||
uint8_t DRV_read(uint8_t regaddress) {
|
uint8_t DRV_read(uint8_t regaddress) {
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
i2c_readReg(DRV2605L_BASE_ADDRESS << 1,
|
i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, DRV2605L_read_buffer, 1, 100);
|
||||||
regaddress, DRV2605L_read_buffer, 1, 100);
|
|
||||||
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
|
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
|
||||||
#else
|
#else
|
||||||
DRV2605L_tx_register[0] = regaddress;
|
DRV2605L_tx_register[0] = regaddress;
|
||||||
if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1,
|
if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1, DRV2605L_tx_register, 1, DRV2605L_read_buffer, 1)) {
|
||||||
DRV2605L_tx_register, 1,
|
|
||||||
DRV2605L_read_buffer, 1
|
|
||||||
)){
|
|
||||||
printf("err reading reg \n");
|
printf("err reading reg \n");
|
||||||
}
|
}
|
||||||
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
|
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
|
||||||
@ -51,8 +45,7 @@ uint8_t DRV_read(uint8_t regaddress) {
|
|||||||
return DRV2605L_read_register;
|
return DRV2605L_read_register;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DRV_init(void)
|
void DRV_init(void) {
|
||||||
{
|
|
||||||
i2c_init();
|
i2c_init();
|
||||||
/* 0x07 sets DRV2605 into calibration mode */
|
/* 0x07 sets DRV2605 into calibration mode */
|
||||||
DRV_write(DRV_MODE, 0x07);
|
DRV_write(DRV_MODE, 0x07);
|
||||||
@ -121,8 +114,7 @@ void DRV_init(void)
|
|||||||
DRV_write(DRV_GO, 0x01);
|
DRV_write(DRV_GO, 0x01);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DRV_pulse(uint8_t sequence)
|
void DRV_pulse(uint8_t sequence) {
|
||||||
{
|
|
||||||
DRV_write(DRV_GO, 0x00);
|
DRV_write(DRV_GO, 0x00);
|
||||||
DRV_write(DRV_WAVEFORM_SEQ_1, sequence);
|
DRV_write(DRV_WAVEFORM_SEQ_1, sequence);
|
||||||
DRV_write(DRV_GO, 0x01);
|
DRV_write(DRV_GO, 0x01);
|
||||||
|
@ -86,8 +86,7 @@ if (haptic_config.enable) {
|
|||||||
|
|
||||||
void haptic_feedback_toggle(void) {
|
void haptic_feedback_toggle(void) {
|
||||||
haptic_config.feedback++;
|
haptic_config.feedback++;
|
||||||
if (haptic_config.feedback >= HAPTIC_FEEDBACK_MAX)
|
if (haptic_config.feedback >= HAPTIC_FEEDBACK_MAX) haptic_config.feedback = KEY_PRESS;
|
||||||
haptic_config.feedback = KEY_PRESS;
|
|
||||||
xprintf("haptic_config.feedback = %u\n", !haptic_config.feedback);
|
xprintf("haptic_config.feedback = %u\n", !haptic_config.feedback);
|
||||||
eeconfig_update_haptic(haptic_config.raw);
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
}
|
}
|
||||||
@ -214,16 +213,36 @@ void haptic_play(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool process_haptic(uint16_t keycode, keyrecord_t *record) {
|
bool process_haptic(uint16_t keycode, keyrecord_t *record) {
|
||||||
if (keycode == HPT_ON && record->event.pressed) { haptic_enable(); }
|
if (keycode == HPT_ON && record->event.pressed) {
|
||||||
if (keycode == HPT_OFF && record->event.pressed) { haptic_disable(); }
|
haptic_enable();
|
||||||
if (keycode == HPT_TOG && record->event.pressed) { haptic_toggle(); }
|
}
|
||||||
if (keycode == HPT_RST && record->event.pressed) { haptic_reset(); }
|
if (keycode == HPT_OFF && record->event.pressed) {
|
||||||
if (keycode == HPT_FBK && record->event.pressed) { haptic_feedback_toggle(); }
|
haptic_disable();
|
||||||
if (keycode == HPT_BUZ && record->event.pressed) { haptic_buzz_toggle(); }
|
}
|
||||||
if (keycode == HPT_MODI && record->event.pressed) { haptic_mode_increase(); }
|
if (keycode == HPT_TOG && record->event.pressed) {
|
||||||
if (keycode == HPT_MODD && record->event.pressed) { haptic_mode_decrease(); }
|
haptic_toggle();
|
||||||
if (keycode == HPT_DWLI && record->event.pressed) { haptic_dwell_increase(); }
|
}
|
||||||
if (keycode == HPT_DWLD && record->event.pressed) { haptic_dwell_decrease(); }
|
if (keycode == HPT_RST && record->event.pressed) {
|
||||||
|
haptic_reset();
|
||||||
|
}
|
||||||
|
if (keycode == HPT_FBK && record->event.pressed) {
|
||||||
|
haptic_feedback_toggle();
|
||||||
|
}
|
||||||
|
if (keycode == HPT_BUZ && record->event.pressed) {
|
||||||
|
haptic_buzz_toggle();
|
||||||
|
}
|
||||||
|
if (keycode == HPT_MODI && record->event.pressed) {
|
||||||
|
haptic_mode_increase();
|
||||||
|
}
|
||||||
|
if (keycode == HPT_MODD && record->event.pressed) {
|
||||||
|
haptic_mode_decrease();
|
||||||
|
}
|
||||||
|
if (keycode == HPT_DWLI && record->event.pressed) {
|
||||||
|
haptic_dwell_increase();
|
||||||
|
}
|
||||||
|
if (keycode == HPT_DWLD && record->event.pressed) {
|
||||||
|
haptic_dwell_decrease();
|
||||||
|
}
|
||||||
if (haptic_config.enable) {
|
if (haptic_config.enable) {
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
// keypress
|
// keypress
|
||||||
@ -244,5 +263,4 @@ void haptic_shutdown(void) {
|
|||||||
#ifdef SOLENOID_ENABLE
|
#ifdef SOLENOID_ENABLE
|
||||||
solenoid_shutdown();
|
solenoid_shutdown();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
# include "DRV2605L.h"
|
# include "DRV2605L.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef HAPTIC_FEEDBACK_DEFAULT
|
#ifndef HAPTIC_FEEDBACK_DEFAULT
|
||||||
# define HAPTIC_FEEDBACK_DEFAULT 0
|
# define HAPTIC_FEEDBACK_DEFAULT 0
|
||||||
#endif
|
#endif
|
||||||
@ -75,8 +74,3 @@ void haptic_dwell_decrease(void);
|
|||||||
|
|
||||||
void haptic_play(void);
|
void haptic_play(void);
|
||||||
void haptic_shutdown(void);
|
void haptic_shutdown(void);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,19 +26,11 @@ uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL;
|
|||||||
|
|
||||||
extern haptic_config_t haptic_config;
|
extern haptic_config_t haptic_config;
|
||||||
|
|
||||||
|
void solenoid_buzz_on(void) { haptic_set_buzz(1); }
|
||||||
|
|
||||||
void solenoid_buzz_on(void) {
|
void solenoid_buzz_off(void) { haptic_set_buzz(0); }
|
||||||
haptic_set_buzz(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void solenoid_buzz_off(void) {
|
|
||||||
haptic_set_buzz(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void solenoid_set_buzz(int buzz) {
|
|
||||||
haptic_set_buzz(buzz);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
void solenoid_set_buzz(int buzz) { haptic_set_buzz(buzz); }
|
||||||
|
|
||||||
void solenoid_dwell_minus(uint8_t solenoid_dwell) {
|
void solenoid_dwell_minus(uint8_t solenoid_dwell) {
|
||||||
if (solenoid_dwell > 0) solenoid_dwell--;
|
if (solenoid_dwell > 0) solenoid_dwell--;
|
||||||
@ -48,9 +40,7 @@ void solenoid_dwell_plus(uint8_t solenoid_dwell) {
|
|||||||
if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++;
|
if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void solenoid_set_dwell(uint8_t dwell) {
|
void solenoid_set_dwell(uint8_t dwell) { solenoid_dwell = dwell; }
|
||||||
solenoid_dwell = dwell;
|
|
||||||
}
|
|
||||||
|
|
||||||
void solenoid_stop(void) {
|
void solenoid_stop(void) {
|
||||||
writePinLow(SOLENOID_PIN);
|
writePinLow(SOLENOID_PIN);
|
||||||
@ -88,8 +78,7 @@ void solenoid_check(void) {
|
|||||||
solenoid_buzzing = true;
|
solenoid_buzzing = true;
|
||||||
writePinHigh(SOLENOID_PIN);
|
writePinHigh(SOLENOID_PIN);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (solenoid_buzzing) {
|
if (solenoid_buzzing) {
|
||||||
solenoid_buzzing = false;
|
solenoid_buzzing = false;
|
||||||
writePinLow(SOLENOID_PIN);
|
writePinLow(SOLENOID_PIN);
|
||||||
@ -103,7 +92,4 @@ void solenoid_setup(void) {
|
|||||||
solenoid_fire();
|
solenoid_fire();
|
||||||
}
|
}
|
||||||
|
|
||||||
void solenoid_shutdown(void) {
|
void solenoid_shutdown(void) { writePinLow(SOLENOID_PIN); }
|
||||||
writePinLow(SOLENOID_PIN);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
@ -37,15 +37,13 @@ uint8_t g_twi_transfer_buffer[20];
|
|||||||
uint8_t g_pwm_buffer[18];
|
uint8_t g_pwm_buffer[18];
|
||||||
bool g_pwm_buffer_update_required = false;
|
bool g_pwm_buffer_update_required = false;
|
||||||
|
|
||||||
void IS31FL3218_write_register( uint8_t reg, uint8_t data )
|
void IS31FL3218_write_register(uint8_t reg, uint8_t data) {
|
||||||
{
|
|
||||||
g_twi_transfer_buffer[0] = reg;
|
g_twi_transfer_buffer[0] = reg;
|
||||||
g_twi_transfer_buffer[1] = data;
|
g_twi_transfer_buffer[1] = data;
|
||||||
i2c_transmit(ISSI_ADDRESS, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
i2c_transmit(ISSI_ADDRESS, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3218_write_pwm_buffer( uint8_t *pwm_buffer )
|
void IS31FL3218_write_pwm_buffer(uint8_t *pwm_buffer) {
|
||||||
{
|
|
||||||
g_twi_transfer_buffer[0] = ISSI_REG_PWM;
|
g_twi_transfer_buffer[0] = ISSI_REG_PWM;
|
||||||
for (int i = 0; i < 18; i++) {
|
for (int i = 0; i < 18; i++) {
|
||||||
g_twi_transfer_buffer[1 + i] = pwm_buffer[i];
|
g_twi_transfer_buffer[1 + i] = pwm_buffer[i];
|
||||||
@ -54,8 +52,7 @@ void IS31FL3218_write_pwm_buffer( uint8_t *pwm_buffer )
|
|||||||
i2c_transmit(ISSI_ADDRESS, g_twi_transfer_buffer, 19, ISSI_TIMEOUT);
|
i2c_transmit(ISSI_ADDRESS, g_twi_transfer_buffer, 19, ISSI_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3218_init(void)
|
void IS31FL3218_init(void) {
|
||||||
{
|
|
||||||
// In case we ever want to reinitialize (?)
|
// In case we ever want to reinitialize (?)
|
||||||
IS31FL3218_write_register(ISSI_REG_RESET, 0x00);
|
IS31FL3218_write_register(ISSI_REG_RESET, 0x00);
|
||||||
|
|
||||||
@ -76,23 +73,20 @@ void IS31FL3218_init(void)
|
|||||||
IS31FL3218_write_register(ISSI_REG_UPDATE, 0x01);
|
IS31FL3218_write_register(ISSI_REG_UPDATE, 0x01);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3218_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
void IS31FL3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
{
|
|
||||||
g_pwm_buffer[index * 3 + 0] = red;
|
g_pwm_buffer[index * 3 + 0] = red;
|
||||||
g_pwm_buffer[index * 3 + 1] = green;
|
g_pwm_buffer[index * 3 + 1] = green;
|
||||||
g_pwm_buffer[index * 3 + 2] = blue;
|
g_pwm_buffer[index * 3 + 2] = blue;
|
||||||
g_pwm_buffer_update_required = true;
|
g_pwm_buffer_update_required = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3218_set_color_all( uint8_t red, uint8_t green, uint8_t blue )
|
void IS31FL3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
{
|
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
IS31FL3218_set_color(i, red, green, blue);
|
IS31FL3218_set_color(i, red, green, blue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3218_update_pwm_buffers(void)
|
void IS31FL3218_update_pwm_buffers(void) {
|
||||||
{
|
|
||||||
if (g_pwm_buffer_update_required) {
|
if (g_pwm_buffer_update_required) {
|
||||||
IS31FL3218_write_pwm_buffer(g_pwm_buffer);
|
IS31FL3218_write_pwm_buffer(g_pwm_buffer);
|
||||||
// Load PWM registers and LED Control register data
|
// Load PWM registers and LED Control register data
|
||||||
|
@ -103,7 +103,6 @@ bool g_led_control_registers_update_required = false;
|
|||||||
// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09
|
// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09
|
||||||
// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09
|
// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09
|
||||||
|
|
||||||
|
|
||||||
void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
||||||
g_twi_transfer_buffer[0] = reg;
|
g_twi_transfer_buffer[0] = reg;
|
||||||
g_twi_transfer_buffer[1] = data;
|
g_twi_transfer_buffer[1] = data;
|
||||||
@ -138,8 +137,7 @@ void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
|||||||
|
|
||||||
#if ISSI_PERSISTENCE > 0
|
#if ISSI_PERSISTENCE > 0
|
||||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0)
|
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
||||||
@ -196,7 +194,6 @@ void IS31FL3731_init(uint8_t addr) {
|
|||||||
// most usage after initialization is just writing PWM buffers in bank 0
|
// most usage after initialization is just writing PWM buffers in bank 0
|
||||||
// as there's not much point in double-buffering
|
// as there's not much point in double-buffering
|
||||||
IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
|
IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_set_value(int index, uint8_t value) {
|
void IS31FL3731_set_value(int index, uint8_t value) {
|
||||||
|
@ -16,11 +16,9 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef IS31FL3731_DRIVER_H
|
#ifndef IS31FL3731_DRIVER_H
|
||||||
#define IS31FL3731_DRIVER_H
|
#define IS31FL3731_DRIVER_H
|
||||||
|
|
||||||
|
|
||||||
typedef struct is31_led {
|
typedef struct is31_led {
|
||||||
uint8_t driver : 2;
|
uint8_t driver : 2;
|
||||||
uint8_t v;
|
uint8_t v;
|
||||||
@ -206,5 +204,4 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index);
|
|||||||
#define C9_15 0xB2
|
#define C9_15 0xB2
|
||||||
#define C9_16 0xB3
|
#define C9_16 0xB3
|
||||||
|
|
||||||
|
|
||||||
#endif // IS31FL3731_DRIVER_H
|
#endif // IS31FL3731_DRIVER_H
|
||||||
|
@ -90,24 +90,20 @@ bool g_led_control_registers_update_required[DRIVER_COUNT] = { false };
|
|||||||
// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09
|
// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09
|
||||||
// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09
|
// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09
|
||||||
|
|
||||||
|
void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
||||||
void IS31FL3731_write_register( uint8_t addr, uint8_t reg, uint8_t data )
|
|
||||||
{
|
|
||||||
g_twi_transfer_buffer[0] = reg;
|
g_twi_transfer_buffer[0] = reg;
|
||||||
g_twi_transfer_buffer[1] = data;
|
g_twi_transfer_buffer[1] = data;
|
||||||
|
|
||||||
#if ISSI_PERSISTENCE > 0
|
#if ISSI_PERSISTENCE > 0
|
||||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0)
|
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
||||||
{
|
|
||||||
// assumes bank is already selected
|
// assumes bank is already selected
|
||||||
|
|
||||||
// transmit PWM registers in 9 transfers of 16 bytes
|
// transmit PWM registers in 9 transfers of 16 bytes
|
||||||
@ -126,8 +122,7 @@ void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
|||||||
|
|
||||||
#if ISSI_PERSISTENCE > 0
|
#if ISSI_PERSISTENCE > 0
|
||||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0)
|
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
||||||
@ -135,8 +130,7 @@ void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_init( uint8_t addr )
|
void IS31FL3731_init(uint8_t addr) {
|
||||||
{
|
|
||||||
// In order to avoid the LEDs being driven with garbage data
|
// In order to avoid the LEDs being driven with garbage data
|
||||||
// in the LED driver's PWM registers, first enable software shutdown,
|
// in the LED driver's PWM registers, first enable software shutdown,
|
||||||
// then set up the mode and other settings, clear the PWM registers,
|
// then set up the mode and other settings, clear the PWM registers,
|
||||||
@ -165,20 +159,17 @@ void IS31FL3731_init( uint8_t addr )
|
|||||||
IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
|
IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
|
||||||
|
|
||||||
// turn off all LEDs in the LED control register
|
// turn off all LEDs in the LED control register
|
||||||
for ( int i = 0x00; i <= 0x11; i++ )
|
for (int i = 0x00; i <= 0x11; i++) {
|
||||||
{
|
|
||||||
IS31FL3731_write_register(addr, i, 0x00);
|
IS31FL3731_write_register(addr, i, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
// turn off all LEDs in the blink control register (not really needed)
|
// turn off all LEDs in the blink control register (not really needed)
|
||||||
for ( int i = 0x12; i <= 0x23; i++ )
|
for (int i = 0x12; i <= 0x23; i++) {
|
||||||
{
|
|
||||||
IS31FL3731_write_register(addr, i, 0x00);
|
IS31FL3731_write_register(addr, i, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set PWM on all LEDs to 0
|
// set PWM on all LEDs to 0
|
||||||
for ( int i = 0x24; i <= 0xB3; i++ )
|
for (int i = 0x24; i <= 0xB3; i++) {
|
||||||
{
|
|
||||||
IS31FL3731_write_register(addr, i, 0x00);
|
IS31FL3731_write_register(addr, i, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,11 +183,9 @@ void IS31FL3731_init( uint8_t addr )
|
|||||||
// most usage after initialization is just writing PWM buffers in bank 0
|
// most usage after initialization is just writing PWM buffers in bank 0
|
||||||
// as there's not much point in double-buffering
|
// as there's not much point in double-buffering
|
||||||
IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
|
IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
void IS31FL3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
{
|
|
||||||
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
||||||
is31_led led = g_is31_leds[index];
|
is31_led led = g_is31_leds[index];
|
||||||
|
|
||||||
@ -208,16 +197,13 @@ void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_set_color_all( uint8_t red, uint8_t green, uint8_t blue )
|
void IS31FL3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
{
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
for ( int i = 0; i < DRIVER_LED_TOTAL; i++ )
|
|
||||||
{
|
|
||||||
IS31FL3731_set_color(i, red, green, blue);
|
IS31FL3731_set_color(i, red, green, blue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, bool blue )
|
void IS31FL3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
|
||||||
{
|
|
||||||
is31_led led = g_is31_leds[index];
|
is31_led led = g_is31_leds[index];
|
||||||
|
|
||||||
uint8_t control_register_r = (led.r - 0x24) / 8;
|
uint8_t control_register_r = (led.r - 0x24) / 8;
|
||||||
@ -244,24 +230,18 @@ void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, b
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_led_control_registers_update_required[led.driver] = true;
|
g_led_control_registers_update_required[led.driver] = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_update_pwm_buffers( uint8_t addr, uint8_t index )
|
void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
||||||
{
|
if (g_pwm_buffer_update_required[index]) {
|
||||||
if ( g_pwm_buffer_update_required[index] )
|
|
||||||
{
|
|
||||||
IS31FL3731_write_pwm_buffer(addr, g_pwm_buffer[index]);
|
IS31FL3731_write_pwm_buffer(addr, g_pwm_buffer[index]);
|
||||||
}
|
}
|
||||||
g_pwm_buffer_update_required[index] = false;
|
g_pwm_buffer_update_required[index] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_update_led_control_registers( uint8_t addr, uint8_t index )
|
void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||||
{
|
if (g_led_control_registers_update_required[index]) {
|
||||||
if ( g_led_control_registers_update_required[index] )
|
for (int i = 0; i < 18; i++) {
|
||||||
{
|
|
||||||
for ( int i=0; i<18; i++ )
|
|
||||||
{
|
|
||||||
IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]);
|
IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef IS31FL3731_DRIVER_H
|
#ifndef IS31FL3731_DRIVER_H
|
||||||
#define IS31FL3731_DRIVER_H
|
#define IS31FL3731_DRIVER_H
|
||||||
|
|
||||||
@ -209,6 +208,4 @@ void IS31FL3731_update_led_control_registers( uint8_t addr, uint8_t index );
|
|||||||
#define C9_15 0xB2
|
#define C9_15 0xB2
|
||||||
#define C9_16 0xB3
|
#define C9_16 0xB3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // IS31FL3731_DRIVER_H
|
#endif // IS31FL3731_DRIVER_H
|
||||||
|
@ -80,23 +80,20 @@ bool g_pwm_buffer_update_required[DRIVER_COUNT] = { false };
|
|||||||
uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}, {0}};
|
uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}, {0}};
|
||||||
bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
|
bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
|
||||||
|
|
||||||
void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data )
|
void IS31FL3733_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
||||||
{
|
|
||||||
g_twi_transfer_buffer[0] = reg;
|
g_twi_transfer_buffer[0] = reg;
|
||||||
g_twi_transfer_buffer[1] = data;
|
g_twi_transfer_buffer[1] = data;
|
||||||
|
|
||||||
#if ISSI_PERSISTENCE > 0
|
#if ISSI_PERSISTENCE > 0
|
||||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0)
|
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
void IS31FL3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
||||||
{
|
|
||||||
// assumes PG1 is already selected
|
// assumes PG1 is already selected
|
||||||
|
|
||||||
// transmit PWM registers in 12 transfers of 16 bytes
|
// transmit PWM registers in 12 transfers of 16 bytes
|
||||||
@ -114,8 +111,7 @@ void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
|||||||
|
|
||||||
#if ISSI_PERSISTENCE > 0
|
#if ISSI_PERSISTENCE > 0
|
||||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0)
|
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
||||||
@ -123,8 +119,7 @@ void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3733_init( uint8_t addr, uint8_t sync)
|
void IS31FL3733_init(uint8_t addr, uint8_t sync) {
|
||||||
{
|
|
||||||
// In order to avoid the LEDs being driven with garbage data
|
// In order to avoid the LEDs being driven with garbage data
|
||||||
// in the LED driver's PWM registers, shutdown is enabled last.
|
// in the LED driver's PWM registers, shutdown is enabled last.
|
||||||
// Set up the mode and other settings, clear the PWM registers,
|
// Set up the mode and other settings, clear the PWM registers,
|
||||||
@ -137,8 +132,7 @@ void IS31FL3733_init( uint8_t addr, uint8_t sync)
|
|||||||
// Select PG0
|
// Select PG0
|
||||||
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
||||||
// Turn off all LEDs.
|
// Turn off all LEDs.
|
||||||
for ( int i = 0x00; i <= 0x17; i++ )
|
for (int i = 0x00; i <= 0x17; i++) {
|
||||||
{
|
|
||||||
IS31FL3733_write_register(addr, i, 0x00);
|
IS31FL3733_write_register(addr, i, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,8 +143,7 @@ void IS31FL3733_init( uint8_t addr, uint8_t sync)
|
|||||||
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
||||||
// Set PWM on all LEDs to 0
|
// Set PWM on all LEDs to 0
|
||||||
// No need to setup Breath registers to PWM as that is the default.
|
// No need to setup Breath registers to PWM as that is the default.
|
||||||
for ( int i = 0x00; i <= 0xBF; i++ )
|
for (int i = 0x00; i <= 0xBF; i++) {
|
||||||
{
|
|
||||||
IS31FL3733_write_register(addr, i, 0x00);
|
IS31FL3733_write_register(addr, i, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,8 +165,7 @@ void IS31FL3733_init( uint8_t addr, uint8_t sync)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3733_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
{
|
|
||||||
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
||||||
is31_led led = g_is31_leds[index];
|
is31_led led = g_is31_leds[index];
|
||||||
|
|
||||||
@ -184,16 +176,13 @@ void IS31FL3733_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3733_set_color_all( uint8_t red, uint8_t green, uint8_t blue )
|
void IS31FL3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
{
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
for ( int i = 0; i < DRIVER_LED_TOTAL; i++ )
|
|
||||||
{
|
|
||||||
IS31FL3733_set_color(i, red, green, blue);
|
IS31FL3733_set_color(i, red, green, blue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, bool blue )
|
void IS31FL3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
|
||||||
{
|
|
||||||
is31_led led = g_is31_leds[index];
|
is31_led led = g_is31_leds[index];
|
||||||
|
|
||||||
uint8_t control_register_r = led.r / 8;
|
uint8_t control_register_r = led.r / 8;
|
||||||
@ -220,13 +209,10 @@ void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, b
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_led_control_registers_update_required[led.driver] = true;
|
g_led_control_registers_update_required[led.driver] = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index )
|
void IS31FL3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
||||||
{
|
if (g_pwm_buffer_update_required[index]) {
|
||||||
if ( g_pwm_buffer_update_required[index] )
|
|
||||||
{
|
|
||||||
// Firstly we need to unlock the command register and select PG1
|
// Firstly we need to unlock the command register and select PG1
|
||||||
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||||
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
||||||
@ -236,15 +222,12 @@ void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index )
|
|||||||
g_pwm_buffer_update_required[index] = false;
|
g_pwm_buffer_update_required[index] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index )
|
void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||||
{
|
if (g_led_control_registers_update_required[index]) {
|
||||||
if ( g_led_control_registers_update_required[index] )
|
|
||||||
{
|
|
||||||
// Firstly we need to unlock the command register and select PG0
|
// Firstly we need to unlock the command register and select PG0
|
||||||
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||||
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
||||||
for ( int i=0; i<24; i++ )
|
for (int i = 0; i < 24; i++) {
|
||||||
{
|
|
||||||
IS31FL3733_write_register(addr, i, g_led_control_registers[index][i]);
|
IS31FL3733_write_register(addr, i, g_led_control_registers[index][i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef IS31FL3733_DRIVER_H
|
#ifndef IS31FL3733_DRIVER_H
|
||||||
#define IS31FL3733_DRIVER_H
|
#define IS31FL3733_DRIVER_H
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
# include <avr/interrupt.h>
|
# include <avr/interrupt.h>
|
||||||
# include <avr/io.h>
|
# include <avr/io.h>
|
||||||
@ -28,8 +27,6 @@
|
|||||||
#include "i2c_master.h"
|
#include "i2c_master.h"
|
||||||
#include "progmem.h"
|
#include "progmem.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||||
// The address will vary depending on your wiring:
|
// The address will vary depending on your wiring:
|
||||||
@ -81,23 +78,20 @@ bool g_pwm_buffer_update_required = false;
|
|||||||
uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}, {0}};
|
uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}, {0}};
|
||||||
bool g_led_control_registers_update_required = false;
|
bool g_led_control_registers_update_required = false;
|
||||||
|
|
||||||
void IS31FL3736_write_register( uint8_t addr, uint8_t reg, uint8_t data )
|
void IS31FL3736_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
||||||
{
|
|
||||||
g_twi_transfer_buffer[0] = reg;
|
g_twi_transfer_buffer[0] = reg;
|
||||||
g_twi_transfer_buffer[1] = data;
|
g_twi_transfer_buffer[1] = data;
|
||||||
|
|
||||||
#if ISSI_PERSISTENCE > 0
|
#if ISSI_PERSISTENCE > 0
|
||||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0)
|
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3736_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
void IS31FL3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
||||||
{
|
|
||||||
// assumes PG1 is already selected
|
// assumes PG1 is already selected
|
||||||
|
|
||||||
// transmit PWM registers in 12 transfers of 16 bytes
|
// transmit PWM registers in 12 transfers of 16 bytes
|
||||||
@ -115,8 +109,7 @@ void IS31FL3736_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
|||||||
|
|
||||||
#if ISSI_PERSISTENCE > 0
|
#if ISSI_PERSISTENCE > 0
|
||||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0)
|
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
||||||
@ -124,8 +117,7 @@ void IS31FL3736_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3736_init( uint8_t addr )
|
void IS31FL3736_init(uint8_t addr) {
|
||||||
{
|
|
||||||
// In order to avoid the LEDs being driven with garbage data
|
// In order to avoid the LEDs being driven with garbage data
|
||||||
// in the LED driver's PWM registers, shutdown is enabled last.
|
// in the LED driver's PWM registers, shutdown is enabled last.
|
||||||
// Set up the mode and other settings, clear the PWM registers,
|
// Set up the mode and other settings, clear the PWM registers,
|
||||||
@ -137,8 +129,7 @@ void IS31FL3736_init( uint8_t addr )
|
|||||||
// Select PG0
|
// Select PG0
|
||||||
IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
||||||
// Turn off all LEDs.
|
// Turn off all LEDs.
|
||||||
for ( int i = 0x00; i <= 0x17; i++ )
|
for (int i = 0x00; i <= 0x17; i++) {
|
||||||
{
|
|
||||||
IS31FL3736_write_register(addr, i, 0x00);
|
IS31FL3736_write_register(addr, i, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,8 +140,7 @@ void IS31FL3736_init( uint8_t addr )
|
|||||||
IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
||||||
// Set PWM on all LEDs to 0
|
// Set PWM on all LEDs to 0
|
||||||
// No need to setup Breath registers to PWM as that is the default.
|
// No need to setup Breath registers to PWM as that is the default.
|
||||||
for ( int i = 0x00; i <= 0xBF; i++ )
|
for (int i = 0x00; i <= 0xBF; i++) {
|
||||||
{
|
|
||||||
IS31FL3736_write_register(addr, i, 0x00);
|
IS31FL3736_write_register(addr, i, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,8 +162,7 @@ void IS31FL3736_init( uint8_t addr )
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3736_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
void IS31FL3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
{
|
|
||||||
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
||||||
is31_led led = g_is31_leds[index];
|
is31_led led = g_is31_leds[index];
|
||||||
|
|
||||||
@ -184,16 +173,13 @@ void IS31FL3736_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3736_set_color_all( uint8_t red, uint8_t green, uint8_t blue )
|
void IS31FL3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
{
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
for ( int i = 0; i < DRIVER_LED_TOTAL; i++ )
|
|
||||||
{
|
|
||||||
IS31FL3736_set_color(i, red, green, blue);
|
IS31FL3736_set_color(i, red, green, blue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3736_set_led_control_register( uint8_t index, bool red, bool green, bool blue )
|
void IS31FL3736_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
|
||||||
{
|
|
||||||
is31_led led = g_is31_leds[index];
|
is31_led led = g_is31_leds[index];
|
||||||
|
|
||||||
// IS31FL3733
|
// IS31FL3733
|
||||||
@ -234,11 +220,9 @@ void IS31FL3736_set_led_control_register( uint8_t index, bool red, bool green, b
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_led_control_registers_update_required = true;
|
g_led_control_registers_update_required = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3736_mono_set_brightness( int index, uint8_t value )
|
void IS31FL3736_mono_set_brightness(int index, uint8_t value) {
|
||||||
{
|
|
||||||
if (index >= 0 && index < 96) {
|
if (index >= 0 && index < 96) {
|
||||||
// Index in range 0..95 -> A1..A8, B1..B8, etc.
|
// Index in range 0..95 -> A1..A8, B1..B8, etc.
|
||||||
// Map index 0..95 to registers 0x00..0xBE (interleaved)
|
// Map index 0..95 to registers 0x00..0xBE (interleaved)
|
||||||
@ -248,16 +232,13 @@ void IS31FL3736_mono_set_brightness( int index, uint8_t value )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3736_mono_set_brightness_all( uint8_t value )
|
void IS31FL3736_mono_set_brightness_all(uint8_t value) {
|
||||||
{
|
for (int i = 0; i < 96; i++) {
|
||||||
for ( int i = 0; i < 96; i++ )
|
|
||||||
{
|
|
||||||
IS31FL3736_mono_set_brightness(i, value);
|
IS31FL3736_mono_set_brightness(i, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3736_mono_set_led_control_register( uint8_t index, bool enabled )
|
void IS31FL3736_mono_set_led_control_register(uint8_t index, bool enabled) {
|
||||||
{
|
|
||||||
// Index in range 0..95 -> A1..A8, B1..B8, etc.
|
// Index in range 0..95 -> A1..A8, B1..B8, etc.
|
||||||
|
|
||||||
// Map index 0..95 to registers 0x00..0xBE (interleaved)
|
// Map index 0..95 to registers 0x00..0xBE (interleaved)
|
||||||
@ -275,10 +256,8 @@ void IS31FL3736_mono_set_led_control_register( uint8_t index, bool enabled )
|
|||||||
g_led_control_registers_update_required = true;
|
g_led_control_registers_update_required = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3736_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
|
void IS31FL3736_update_pwm_buffers(uint8_t addr1, uint8_t addr2) {
|
||||||
{
|
if (g_pwm_buffer_update_required) {
|
||||||
if ( g_pwm_buffer_update_required )
|
|
||||||
{
|
|
||||||
// Firstly we need to unlock the command register and select PG1
|
// Firstly we need to unlock the command register and select PG1
|
||||||
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||||
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
||||||
@ -289,18 +268,14 @@ void IS31FL3736_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
|
|||||||
g_pwm_buffer_update_required = false;
|
g_pwm_buffer_update_required = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3736_update_led_control_registers( uint8_t addr1, uint8_t addr2 )
|
void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
|
||||||
{
|
if (g_led_control_registers_update_required) {
|
||||||
if ( g_led_control_registers_update_required )
|
|
||||||
{
|
|
||||||
// Firstly we need to unlock the command register and select PG0
|
// Firstly we need to unlock the command register and select PG0
|
||||||
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||||
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
||||||
for ( int i=0; i<24; i++ )
|
for (int i = 0; i < 24; i++) {
|
||||||
{
|
|
||||||
IS31FL3736_write_register(addr1, i, g_led_control_registers[0][i]);
|
IS31FL3736_write_register(addr1, i, g_led_control_registers[0][i]);
|
||||||
// IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i] );
|
// IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,11 +19,9 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
|
||||||
// Simple interface option.
|
// Simple interface option.
|
||||||
// If these aren't defined, just define them to make it compile
|
// If these aren't defined, just define them to make it compile
|
||||||
|
|
||||||
|
|
||||||
#ifndef DRIVER_COUNT
|
#ifndef DRIVER_COUNT
|
||||||
# define DRIVER_COUNT 2
|
# define DRIVER_COUNT 2
|
||||||
#endif
|
#endif
|
||||||
@ -32,7 +30,6 @@
|
|||||||
# define DRIVER_LED_TOTAL 96
|
# define DRIVER_LED_TOTAL 96
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef struct is31_led {
|
typedef struct is31_led {
|
||||||
uint8_t driver : 2;
|
uint8_t driver : 2;
|
||||||
uint8_t r;
|
uint8_t r;
|
||||||
@ -169,4 +166,3 @@ void IS31FL3736_update_led_control_registers( uint8_t addr1, uint8_t addr2 );
|
|||||||
#define L_6 0xBA
|
#define L_6 0xBA
|
||||||
#define L_7 0xBC
|
#define L_7 0xBC
|
||||||
#define L_8 0xBE
|
#define L_8 0xBE
|
||||||
|
|
||||||
|
@ -80,23 +80,20 @@ bool g_pwm_buffer_update_required = false;
|
|||||||
uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}};
|
uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}};
|
||||||
bool g_led_control_registers_update_required = false;
|
bool g_led_control_registers_update_required = false;
|
||||||
|
|
||||||
void IS31FL3737_write_register( uint8_t addr, uint8_t reg, uint8_t data )
|
void IS31FL3737_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
||||||
{
|
|
||||||
g_twi_transfer_buffer[0] = reg;
|
g_twi_transfer_buffer[0] = reg;
|
||||||
g_twi_transfer_buffer[1] = data;
|
g_twi_transfer_buffer[1] = data;
|
||||||
|
|
||||||
#if ISSI_PERSISTENCE > 0
|
#if ISSI_PERSISTENCE > 0
|
||||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0)
|
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3737_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
void IS31FL3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
||||||
{
|
|
||||||
// assumes PG1 is already selected
|
// assumes PG1 is already selected
|
||||||
|
|
||||||
// transmit PWM registers in 12 transfers of 16 bytes
|
// transmit PWM registers in 12 transfers of 16 bytes
|
||||||
@ -114,8 +111,7 @@ void IS31FL3737_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
|||||||
|
|
||||||
#if ISSI_PERSISTENCE > 0
|
#if ISSI_PERSISTENCE > 0
|
||||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0)
|
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
||||||
@ -123,8 +119,7 @@ void IS31FL3737_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3737_init( uint8_t addr )
|
void IS31FL3737_init(uint8_t addr) {
|
||||||
{
|
|
||||||
// In order to avoid the LEDs being driven with garbage data
|
// In order to avoid the LEDs being driven with garbage data
|
||||||
// in the LED driver's PWM registers, shutdown is enabled last.
|
// in the LED driver's PWM registers, shutdown is enabled last.
|
||||||
// Set up the mode and other settings, clear the PWM registers,
|
// Set up the mode and other settings, clear the PWM registers,
|
||||||
@ -136,8 +131,7 @@ void IS31FL3737_init( uint8_t addr )
|
|||||||
// Select PG0
|
// Select PG0
|
||||||
IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
||||||
// Turn off all LEDs.
|
// Turn off all LEDs.
|
||||||
for ( int i = 0x00; i <= 0x17; i++ )
|
for (int i = 0x00; i <= 0x17; i++) {
|
||||||
{
|
|
||||||
IS31FL3737_write_register(addr, i, 0x00);
|
IS31FL3737_write_register(addr, i, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,8 +142,7 @@ void IS31FL3737_init( uint8_t addr )
|
|||||||
IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
||||||
// Set PWM on all LEDs to 0
|
// Set PWM on all LEDs to 0
|
||||||
// No need to setup Breath registers to PWM as that is the default.
|
// No need to setup Breath registers to PWM as that is the default.
|
||||||
for ( int i = 0x00; i <= 0xBF; i++ )
|
for (int i = 0x00; i <= 0xBF; i++) {
|
||||||
{
|
|
||||||
IS31FL3737_write_register(addr, i, 0x00);
|
IS31FL3737_write_register(addr, i, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,8 +164,7 @@ void IS31FL3737_init( uint8_t addr )
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3737_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
{
|
|
||||||
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
if (index >= 0 && index < DRIVER_LED_TOTAL) {
|
||||||
is31_led led = g_is31_leds[index];
|
is31_led led = g_is31_leds[index];
|
||||||
|
|
||||||
@ -183,16 +175,13 @@ void IS31FL3737_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3737_set_color_all( uint8_t red, uint8_t green, uint8_t blue )
|
void IS31FL3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
{
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
for ( int i = 0; i < DRIVER_LED_TOTAL; i++ )
|
|
||||||
{
|
|
||||||
IS31FL3737_set_color(i, red, green, blue);
|
IS31FL3737_set_color(i, red, green, blue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3737_set_led_control_register( uint8_t index, bool red, bool green, bool blue )
|
void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
|
||||||
{
|
|
||||||
is31_led led = g_is31_leds[index];
|
is31_led led = g_is31_leds[index];
|
||||||
|
|
||||||
uint8_t control_register_r = led.r / 8;
|
uint8_t control_register_r = led.r / 8;
|
||||||
@ -219,13 +208,10 @@ void IS31FL3737_set_led_control_register( uint8_t index, bool red, bool green, b
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_led_control_registers_update_required = true;
|
g_led_control_registers_update_required = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3737_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
|
void IS31FL3737_update_pwm_buffers(uint8_t addr1, uint8_t addr2) {
|
||||||
{
|
if (g_pwm_buffer_update_required) {
|
||||||
if ( g_pwm_buffer_update_required )
|
|
||||||
{
|
|
||||||
// Firstly we need to unlock the command register and select PG1
|
// Firstly we need to unlock the command register and select PG1
|
||||||
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||||
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
||||||
@ -236,15 +222,12 @@ void IS31FL3737_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
|
|||||||
g_pwm_buffer_update_required = false;
|
g_pwm_buffer_update_required = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3737_update_led_control_registers( uint8_t addr1, uint8_t addr2 )
|
void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
|
||||||
{
|
if (g_led_control_registers_update_required) {
|
||||||
if ( g_led_control_registers_update_required )
|
|
||||||
{
|
|
||||||
// Firstly we need to unlock the command register and select PG0
|
// Firstly we need to unlock the command register and select PG0
|
||||||
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||||
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
||||||
for ( int i=0; i<24; i++ )
|
for (int i = 0; i < 24; i++) {
|
||||||
{
|
|
||||||
IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]);
|
IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]);
|
||||||
// IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i] );
|
// IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i] );
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef IS31FL3737_DRIVER_H
|
#ifndef IS31FL3737_DRIVER_H
|
||||||
#define IS31FL3737_DRIVER_H
|
#define IS31FL3737_DRIVER_H
|
||||||
|
|
||||||
|
@ -13,228 +13,13 @@
|
|||||||
// Online editor: http://teripom.x0.com/
|
// Online editor: http://teripom.x0.com/
|
||||||
|
|
||||||
static const unsigned char font[] PROGMEM = {
|
static const unsigned char font[] PROGMEM = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
0x72, 0x49, 0x49, 0x49, 0x46, 0x00, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
||||||
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||||
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
0x00, 0x41, 0x36, 0x08, 0x00, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF0, 0xF8, 0xFC, 0x3E,
|
||||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
0x1E, 0x06, 0x01, 0x00, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00, 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F, 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00, 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E, 0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E, 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F,
|
||||||
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70, 0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49, 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69, 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3C, 0x78, 0x70, 0x60, 0x00, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E, 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
|
||||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
|
||||||
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
|
||||||
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
|
||||||
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
|
||||||
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
|
||||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
|
||||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
|
||||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
|
||||||
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
|
||||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
|
||||||
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
|
||||||
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
|
||||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
|
||||||
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
|
||||||
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
|
||||||
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
|
||||||
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
|
||||||
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
|
||||||
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
|
||||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
|
||||||
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
|
||||||
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
|
||||||
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
|
||||||
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
|
||||||
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
|
||||||
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
|
||||||
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
|
||||||
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
|
||||||
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
|
||||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
|
||||||
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
|
||||||
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
|
||||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
|
||||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
|
||||||
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
|
||||||
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
|
||||||
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
|
||||||
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
|
||||||
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
|
||||||
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
|
||||||
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
|
||||||
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
|
||||||
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
|
||||||
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
|
||||||
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
|
||||||
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
|
||||||
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
|
||||||
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
|
||||||
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
|
||||||
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
|
||||||
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
|
||||||
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
|
||||||
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
|
||||||
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
|
||||||
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
|
||||||
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
|
||||||
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
|
||||||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
|
||||||
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
|
||||||
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
|
||||||
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
|
||||||
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
|
||||||
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
|
||||||
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
|
||||||
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
|
||||||
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
|
||||||
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
|
||||||
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
|
||||||
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
|
||||||
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
|
||||||
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
|
||||||
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
|
||||||
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
|
||||||
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
|
||||||
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
|
||||||
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
|
||||||
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
|
||||||
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
|
||||||
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
|
||||||
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
|
||||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
|
||||||
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
|
|
||||||
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
|
|
||||||
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
|
|
||||||
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
|
||||||
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
|
|
||||||
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
|
|
||||||
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
|
|
||||||
0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00,
|
|
||||||
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
|
|
||||||
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
|
|
||||||
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
|
|
||||||
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
|
|
||||||
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
|
|
||||||
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
|
|
||||||
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
|
|
||||||
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
|
|
||||||
0xFC, 0x18, 0x24, 0x24, 0x18, 0x00,
|
|
||||||
0x18, 0x24, 0x24, 0x18, 0xFC, 0x00,
|
|
||||||
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
|
|
||||||
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
|
|
||||||
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
|
|
||||||
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
|
|
||||||
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
|
||||||
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
|
|
||||||
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
|
|
||||||
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
|
|
||||||
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
|
||||||
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
|
||||||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
|
||||||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8,
|
|
||||||
0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F,
|
|
||||||
0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8,
|
|
||||||
0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
|
||||||
0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00,
|
|
||||||
0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00,
|
|
||||||
0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0,
|
|
||||||
0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0,
|
|
||||||
0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0xC0, 0xF0, 0xF8, 0xFC, 0x3E,
|
|
||||||
0x1E, 0x06, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
|
||||||
0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
|
||||||
0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
|
|
||||||
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
|
|
||||||
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
|
|
||||||
0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF,
|
|
||||||
0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00,
|
|
||||||
0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF,
|
|
||||||
0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F,
|
|
||||||
0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00,
|
|
||||||
0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E,
|
|
||||||
0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F,
|
|
||||||
0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F,
|
|
||||||
0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E,
|
|
||||||
0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00,
|
|
||||||
0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E,
|
|
||||||
0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F,
|
|
||||||
0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70,
|
|
||||||
0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49,
|
|
||||||
0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E,
|
|
||||||
0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69,
|
|
||||||
0x69, 0x6F, 0x26, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3C,
|
|
||||||
0x78, 0x70, 0x60, 0x00, 0x00, 0x00,
|
|
||||||
0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
|
||||||
0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
|
||||||
0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
|
|
||||||
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
|
|
||||||
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
|
|
||||||
0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F,
|
|
||||||
0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E,
|
|
||||||
0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F,
|
|
||||||
0x0F, 0x07, 0x01, 0x01, 0x01, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
};
|
};
|
||||||
|
@ -83,7 +83,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define CHARGE_PUMP 0x8D
|
#define CHARGE_PUMP 0x8D
|
||||||
|
|
||||||
// Misc defines
|
// Misc defines
|
||||||
#define OLED_TIMEOUT 60000
|
|
||||||
#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8)
|
#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8)
|
||||||
#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)
|
#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)
|
||||||
|
|
||||||
@ -114,8 +113,11 @@ bool oled_active = false;
|
|||||||
bool oled_scrolling = false;
|
bool oled_scrolling = false;
|
||||||
uint8_t oled_rotation = 0;
|
uint8_t oled_rotation = 0;
|
||||||
uint8_t oled_rotation_width = 0;
|
uint8_t oled_rotation_width = 0;
|
||||||
#if !defined(OLED_DISABLE_TIMEOUT)
|
#if OLED_TIMEOUT > 0
|
||||||
uint16_t oled_last_activity;
|
uint32_t oled_timeout;
|
||||||
|
#endif
|
||||||
|
#if OLED_SCROLL_TIMEOUT > 0
|
||||||
|
uint32_t oled_scroll_timeout;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Internal variables to reduce math instructions
|
// Internal variables to reduce math instructions
|
||||||
@ -138,8 +140,7 @@ static i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t* data, uint16_
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Flips the rendering bits for a character at the current cursor position
|
// Flips the rendering bits for a character at the current cursor position
|
||||||
static void InvertCharacter(uint8_t *cursor)
|
static void InvertCharacter(uint8_t *cursor) {
|
||||||
{
|
|
||||||
const uint8_t *end = cursor + OLED_FONT_WIDTH;
|
const uint8_t *end = cursor + OLED_FONT_WIDTH;
|
||||||
while (cursor < end) {
|
while (cursor < end) {
|
||||||
*cursor = ~(*cursor);
|
*cursor = ~(*cursor);
|
||||||
@ -159,14 +160,19 @@ bool oled_init(uint8_t rotation) {
|
|||||||
static const uint8_t PROGMEM display_setup1[] = {
|
static const uint8_t PROGMEM display_setup1[] = {
|
||||||
I2C_CMD,
|
I2C_CMD,
|
||||||
DISPLAY_OFF,
|
DISPLAY_OFF,
|
||||||
DISPLAY_CLOCK, 0x80,
|
DISPLAY_CLOCK,
|
||||||
MULTIPLEX_RATIO, OLED_DISPLAY_HEIGHT - 1,
|
0x80,
|
||||||
DISPLAY_OFFSET, 0x00,
|
MULTIPLEX_RATIO,
|
||||||
|
OLED_DISPLAY_HEIGHT - 1,
|
||||||
|
DISPLAY_OFFSET,
|
||||||
|
0x00,
|
||||||
DISPLAY_START_LINE | 0x00,
|
DISPLAY_START_LINE | 0x00,
|
||||||
CHARGE_PUMP, 0x14,
|
CHARGE_PUMP,
|
||||||
|
0x14,
|
||||||
#if (OLED_IC != OLED_IC_SH1106)
|
#if (OLED_IC != OLED_IC_SH1106)
|
||||||
// MEMORY_MODE is unsupported on SH1106 (Page Addressing only)
|
// MEMORY_MODE is unsupported on SH1106 (Page Addressing only)
|
||||||
MEMORY_MODE, 0x00, // Horizontal addressing mode
|
MEMORY_MODE,
|
||||||
|
0x00, // Horizontal addressing mode
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) {
|
||||||
@ -175,40 +181,32 @@ bool oled_init(uint8_t rotation) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_180)) {
|
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_180)) {
|
||||||
static const uint8_t PROGMEM display_normal[] = {
|
static const uint8_t PROGMEM display_normal[] = {I2C_CMD, SEGMENT_REMAP_INV, COM_SCAN_DEC};
|
||||||
I2C_CMD,
|
|
||||||
SEGMENT_REMAP_INV,
|
|
||||||
COM_SCAN_DEC };
|
|
||||||
if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) {
|
||||||
print("oled_init cmd normal rotation failed\n");
|
print("oled_init cmd normal rotation failed\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
static const uint8_t PROGMEM display_flipped[] = {
|
static const uint8_t PROGMEM display_flipped[] = {I2C_CMD, SEGMENT_REMAP, COM_SCAN_INC};
|
||||||
I2C_CMD,
|
|
||||||
SEGMENT_REMAP,
|
|
||||||
COM_SCAN_INC };
|
|
||||||
if (I2C_TRANSMIT_P(display_flipped) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT_P(display_flipped) != I2C_STATUS_SUCCESS) {
|
||||||
print("display_flipped failed\n");
|
print("display_flipped failed\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const uint8_t PROGMEM display_setup2[] = {
|
static const uint8_t PROGMEM display_setup2[] = {I2C_CMD, COM_PINS, OLED_COM_PINS, CONTRAST, 0x8F, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x40, DISPLAY_ALL_ON_RESUME, NORMAL_DISPLAY, DEACTIVATE_SCROLL, DISPLAY_ON};
|
||||||
I2C_CMD,
|
|
||||||
COM_PINS, OLED_COM_PINS,
|
|
||||||
CONTRAST, 0x8F,
|
|
||||||
PRE_CHARGE_PERIOD, 0xF1,
|
|
||||||
VCOM_DETECT, 0x40,
|
|
||||||
DISPLAY_ALL_ON_RESUME,
|
|
||||||
NORMAL_DISPLAY,
|
|
||||||
DEACTIVATE_SCROLL,
|
|
||||||
DISPLAY_ON };
|
|
||||||
if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) {
|
||||||
print("display_setup2 failed\n");
|
print("display_setup2 failed\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if OLED_TIMEOUT > 0
|
||||||
|
oled_timeout = timer_read32() + OLED_TIMEOUT;
|
||||||
|
#endif
|
||||||
|
#if OLED_SCROLL_TIMEOUT > 0
|
||||||
|
oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT;
|
||||||
|
#endif
|
||||||
|
|
||||||
oled_clear();
|
oled_clear();
|
||||||
oled_initialized = true;
|
oled_initialized = true;
|
||||||
oled_active = true;
|
oled_active = true;
|
||||||
@ -216,10 +214,7 @@ bool oled_init(uint8_t rotation) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((weak))
|
__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; }
|
||||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
|
||||||
return rotation;
|
|
||||||
}
|
|
||||||
|
|
||||||
void oled_clear(void) {
|
void oled_clear(void) {
|
||||||
memset(oled_buffer, 0, sizeof(oled_buffer));
|
memset(oled_buffer, 0, sizeof(oled_buffer));
|
||||||
@ -227,8 +222,7 @@ void oled_clear(void) {
|
|||||||
oled_dirty = -1; // -1 will be max value as long as display_dirty is unsigned type
|
oled_dirty = -1; // -1 will be max value as long as display_dirty is unsigned type
|
||||||
}
|
}
|
||||||
|
|
||||||
static void calc_bounds(uint8_t update_start, uint8_t* cmd_array)
|
static void calc_bounds(uint8_t update_start, uint8_t *cmd_array) {
|
||||||
{
|
|
||||||
// Calculate commands to set memory addressing bounds.
|
// Calculate commands to set memory addressing bounds.
|
||||||
uint8_t start_page = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH;
|
uint8_t start_page = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH;
|
||||||
uint8_t start_column = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH;
|
uint8_t start_column = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH;
|
||||||
@ -250,23 +244,21 @@ static void calc_bounds(uint8_t update_start, uint8_t* cmd_array)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void calc_bounds_90(uint8_t update_start, uint8_t* cmd_array)
|
static void calc_bounds_90(uint8_t update_start, uint8_t *cmd_array) {
|
||||||
{
|
|
||||||
cmd_array[1] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_HEIGHT * 8;
|
cmd_array[1] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_HEIGHT * 8;
|
||||||
cmd_array[4] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_HEIGHT;
|
cmd_array[4] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_HEIGHT;
|
||||||
cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8 - 1 + cmd_array[1];;
|
cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8 - 1 + cmd_array[1];
|
||||||
|
;
|
||||||
cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) % OLED_DISPLAY_HEIGHT / 8;
|
cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) % OLED_DISPLAY_HEIGHT / 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t crot(uint8_t a, int8_t n)
|
uint8_t crot(uint8_t a, int8_t n) {
|
||||||
{
|
|
||||||
const uint8_t mask = 0x7;
|
const uint8_t mask = 0x7;
|
||||||
n &= mask;
|
n &= mask;
|
||||||
return a << n | a >> (-n & mask);
|
return a << n | a >> (-n & mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rotate_90(const uint8_t* src, uint8_t* dest)
|
static void rotate_90(const uint8_t *src, uint8_t *dest) {
|
||||||
{
|
|
||||||
for (uint8_t i = 0, shift = 7; i < 8; ++i, --shift) {
|
for (uint8_t i = 0, shift = 7; i < 8; ++i, --shift) {
|
||||||
uint8_t selector = (1 << i);
|
uint8_t selector = (1 << i);
|
||||||
for (uint8_t j = 0; j < 8; ++j) {
|
for (uint8_t j = 0; j < 8; ++j) {
|
||||||
@ -283,13 +275,12 @@ void oled_render(void) {
|
|||||||
|
|
||||||
// Find first dirty block
|
// Find first dirty block
|
||||||
uint8_t update_start = 0;
|
uint8_t update_start = 0;
|
||||||
while (!(oled_dirty & (1 << update_start))) { ++update_start; }
|
while (!(oled_dirty & (1 << update_start))) {
|
||||||
|
++update_start;
|
||||||
|
}
|
||||||
|
|
||||||
// Set column & page position
|
// Set column & page position
|
||||||
static uint8_t display_start[] = {
|
static uint8_t display_start[] = {I2C_CMD, COLUMN_ADDR, 0, OLED_DISPLAY_WIDTH - 1, PAGE_ADDR, 0, OLED_DISPLAY_HEIGHT / 8 - 1};
|
||||||
I2C_CMD,
|
|
||||||
COLUMN_ADDR, 0, OLED_DISPLAY_WIDTH - 1,
|
|
||||||
PAGE_ADDR, 0, OLED_DISPLAY_HEIGHT / 8 - 1 };
|
|
||||||
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
|
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
|
||||||
calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start
|
calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start
|
||||||
} else {
|
} else {
|
||||||
@ -353,8 +344,7 @@ void oled_advance_page(bool clearPageRemainder) {
|
|||||||
remaining = remaining / OLED_FONT_WIDTH;
|
remaining = remaining / OLED_FONT_WIDTH;
|
||||||
|
|
||||||
// Write empty character until next line
|
// Write empty character until next line
|
||||||
while (remaining--)
|
while (remaining--) oled_write_char(' ', false);
|
||||||
oled_write_char(' ', false);
|
|
||||||
} else {
|
} else {
|
||||||
// Next page index out of bounds?
|
// Next page index out of bounds?
|
||||||
if (index + remaining >= OLED_MATRIX_SIZE) {
|
if (index + remaining >= OLED_MATRIX_SIZE) {
|
||||||
@ -457,8 +447,8 @@ void oled_write_ln_P(const char *data, bool invert) {
|
|||||||
#endif // defined(__AVR__)
|
#endif // defined(__AVR__)
|
||||||
|
|
||||||
bool oled_on(void) {
|
bool oled_on(void) {
|
||||||
#if !defined(OLED_DISABLE_TIMEOUT)
|
#if OLED_TIMEOUT > 0
|
||||||
oled_last_activity = timer_read();
|
oled_timeout = timer_read32() + OLED_TIMEOUT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const uint8_t PROGMEM display_on[] = {I2C_CMD, DISPLAY_ON};
|
static const uint8_t PROGMEM display_on[] = {I2C_CMD, DISPLAY_ON};
|
||||||
@ -488,8 +478,7 @@ bool oled_scroll_right(void) {
|
|||||||
// Dont enable scrolling if we need to update the display
|
// Dont enable scrolling if we need to update the display
|
||||||
// This prevents scrolling of bad data from starting the scroll too early after init
|
// This prevents scrolling of bad data from starting the scroll too early after init
|
||||||
if (!oled_dirty && !oled_scrolling) {
|
if (!oled_dirty && !oled_scrolling) {
|
||||||
static const uint8_t PROGMEM display_scroll_right[] = {
|
static const uint8_t PROGMEM display_scroll_right[] = {I2C_CMD, SCROLL_RIGHT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL};
|
||||||
I2C_CMD, SCROLL_RIGHT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL };
|
|
||||||
if (I2C_TRANSMIT_P(display_scroll_right) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT_P(display_scroll_right) != I2C_STATUS_SUCCESS) {
|
||||||
print("oled_scroll_right cmd failed\n");
|
print("oled_scroll_right cmd failed\n");
|
||||||
return oled_scrolling;
|
return oled_scrolling;
|
||||||
@ -503,8 +492,7 @@ bool oled_scroll_left(void) {
|
|||||||
// Dont enable scrolling if we need to update the display
|
// Dont enable scrolling if we need to update the display
|
||||||
// This prevents scrolling of bad data from starting the scroll too early after init
|
// This prevents scrolling of bad data from starting the scroll too early after init
|
||||||
if (!oled_dirty && !oled_scrolling) {
|
if (!oled_dirty && !oled_scrolling) {
|
||||||
static const uint8_t PROGMEM display_scroll_left[] = {
|
static const uint8_t PROGMEM display_scroll_left[] = {I2C_CMD, SCROLL_LEFT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL};
|
||||||
I2C_CMD, SCROLL_LEFT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL };
|
|
||||||
if (I2C_TRANSMIT_P(display_scroll_left) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT_P(display_scroll_left) != I2C_STATUS_SUCCESS) {
|
||||||
print("oled_scroll_left cmd failed\n");
|
print("oled_scroll_left cmd failed\n");
|
||||||
return oled_scrolling;
|
return oled_scrolling;
|
||||||
@ -522,6 +510,7 @@ bool oled_scroll_off(void) {
|
|||||||
return oled_scrolling;
|
return oled_scrolling;
|
||||||
}
|
}
|
||||||
oled_scrolling = false;
|
oled_scrolling = false;
|
||||||
|
oled_dirty = -1;
|
||||||
}
|
}
|
||||||
return !oled_scrolling;
|
return !oled_scrolling;
|
||||||
}
|
}
|
||||||
@ -549,17 +538,32 @@ void oled_task(void) {
|
|||||||
|
|
||||||
oled_task_user();
|
oled_task_user();
|
||||||
|
|
||||||
|
#if OLED_SCROLL_TIMEOUT > 0
|
||||||
|
if (oled_dirty && oled_scrolling) {
|
||||||
|
oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT;
|
||||||
|
oled_scroll_off();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Smart render system, no need to check for dirty
|
// Smart render system, no need to check for dirty
|
||||||
oled_render();
|
oled_render();
|
||||||
|
|
||||||
// Display timeout check
|
// Display timeout check
|
||||||
#if !defined(OLED_DISABLE_TIMEOUT)
|
#if OLED_TIMEOUT > 0
|
||||||
if (oled_active && timer_elapsed(oled_last_activity) > OLED_TIMEOUT) {
|
if (oled_active && timer_expired32(timer_read32(), oled_timeout)) {
|
||||||
oled_off();
|
oled_off();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if OLED_SCROLL_TIMEOUT > 0
|
||||||
|
if (!oled_scrolling && timer_expired32(timer_read32(), oled_scroll_timeout)) {
|
||||||
|
# ifdef OLED_SCROLL_TIMEOUT_RIGHT
|
||||||
|
oled_scroll_right();
|
||||||
|
# else
|
||||||
|
oled_scroll_left();
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((weak))
|
__attribute__((weak)) void oled_task_user(void) {}
|
||||||
void oled_task_user(void) {
|
|
||||||
}
|
|
||||||
|
@ -52,10 +52,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
|
// For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
|
||||||
// The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
|
// The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
|
||||||
# ifndef OLED_SOURCE_MAP
|
# ifndef OLED_SOURCE_MAP
|
||||||
#define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }
|
# define OLED_SOURCE_MAP \
|
||||||
|
{ 0, 8, 16, 24, 32, 40, 48, 56 }
|
||||||
# endif
|
# endif
|
||||||
# ifndef OLED_TARGET_MAP
|
# ifndef OLED_TARGET_MAP
|
||||||
#define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 }
|
# define OLED_TARGET_MAP \
|
||||||
|
{ 56, 48, 40, 32, 24, 16, 8, 0 }
|
||||||
# endif
|
# endif
|
||||||
// If OLED_BLOCK_TYPE is uint32_t, these tables would look like:
|
// If OLED_BLOCK_TYPE is uint32_t, these tables would look like:
|
||||||
// #define OLED_SOURCE_MAP { 32, 40, 48, 56 }
|
// #define OLED_SOURCE_MAP { 32, 40, 48, 56 }
|
||||||
@ -93,10 +95,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
|
// For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
|
||||||
// The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
|
// The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
|
||||||
# ifndef OLED_SOURCE_MAP
|
# ifndef OLED_SOURCE_MAP
|
||||||
#define OLED_SOURCE_MAP { 0, 8, 16, 24 }
|
# define OLED_SOURCE_MAP \
|
||||||
|
{ 0, 8, 16, 24 }
|
||||||
# endif
|
# endif
|
||||||
# ifndef OLED_TARGET_MAP
|
# ifndef OLED_TARGET_MAP
|
||||||
#define OLED_TARGET_MAP { 24, 16, 8, 0 }
|
# define OLED_TARGET_MAP \
|
||||||
|
{ 24, 16, 8, 0 }
|
||||||
# endif
|
# endif
|
||||||
// If OLED_BLOCK_TYPE is uint8_t, these tables would look like:
|
// If OLED_BLOCK_TYPE is uint8_t, these tables would look like:
|
||||||
// #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }
|
// #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }
|
||||||
@ -138,6 +142,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
# define OLED_FONT_HEIGHT 8
|
# define OLED_FONT_HEIGHT 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(OLED_TIMEOUT)
|
||||||
|
# if defined(OLED_DISABLE_TIMEOUT)
|
||||||
|
# define OLED_TIMEOUT 0
|
||||||
|
# else
|
||||||
|
# define OLED_TIMEOUT 60000
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// OLED Rotation enum values are flags
|
// OLED Rotation enum values are flags
|
||||||
typedef enum {
|
typedef enum {
|
||||||
OLED_ROTATION_0 = 0,
|
OLED_ROTATION_0 = 0,
|
||||||
|
@ -41,7 +41,12 @@ uint8_t foreColor,drawMode,fontWidth, fontHeight, fontType, fontStartChar, fontT
|
|||||||
uint16_t fontMapWidth;
|
uint16_t fontMapWidth;
|
||||||
|
|
||||||
#define _BV(x) (1 << (x))
|
#define _BV(x) (1 << (x))
|
||||||
#define swap(a, b) { uint8_t t = a; a = b; b = t; }
|
#define swap(a, b) \
|
||||||
|
{ \
|
||||||
|
uint8_t t = a; \
|
||||||
|
a = b; \
|
||||||
|
b = t; \
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t micro_oled_transfer_buffer[20];
|
uint8_t micro_oled_transfer_buffer[20];
|
||||||
static uint8_t micro_oled_screen_current[LCDWIDTH * LCDWIDTH / 8] = {0};
|
static uint8_t micro_oled_screen_current[LCDWIDTH * LCDWIDTH / 8] = {0};
|
||||||
@ -68,243 +73,28 @@ static uint8_t micro_oled_screen_current[LCDWIDTH*LCDWIDTH/8] = { 0 };
|
|||||||
static uint8_t micro_oled_screen_buffer[] = {
|
static uint8_t micro_oled_screen_buffer[] = {
|
||||||
// QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php
|
// QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php
|
||||||
// 64x48 image
|
// 64x48 image
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0xF8, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, 0xF8, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x8C, 0x8C, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x8C, 0x8C, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF8, 0xF1, 0xE3, 0xE7, 0xCF, 0xCF, 0xCF, 0xCF, 0x00, 0x00, 0xCF, 0xCF, 0xCF, 0xC7, 0xE7, 0xE3, 0xF1, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x31, 0x31, 0x31, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x1F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x7F, 0x1F, 0x06, 0x06, 0x06, 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, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||||
0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00,
|
|
||||||
0x00, 0xF0, 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, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
|
|
||||||
0xF8, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFE,
|
|
||||||
0xFE, 0xF8, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x8C, 0x8C, 0x8C, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
||||||
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
|
||||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x8C, 0x8C, 0x8C,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31, 0xFF, 0xFF,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF8, 0xF1, 0xE3, 0xE7, 0xCF,
|
|
||||||
0xCF, 0xCF, 0xCF, 0x00, 0x00, 0xCF, 0xCF, 0xCF, 0xC7, 0xE7,
|
|
||||||
0xE3, 0xF1, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
||||||
0x31, 0x31, 0x31, 0x31, 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, 0x06,
|
|
||||||
0x06, 0x06, 0x1F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0xFF,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
||||||
0xFF, 0x7F, 0x7F, 0x1F, 0x06, 0x06, 0x06, 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, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00,
|
|
||||||
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00,
|
|
||||||
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00
|
|
||||||
};
|
|
||||||
# endif
|
# endif
|
||||||
#elif LCDWIDTH == 128
|
#elif LCDWIDTH == 128
|
||||||
# if LCDHEIGHT == 32
|
# if LCDHEIGHT == 32
|
||||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {
|
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {
|
||||||
// 128x32 qmk image
|
// 128x32 qmk image
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC, 0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 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, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xB2, 0xB2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01, 0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3, 0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C, 0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C, 0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00, 0xFC, 0xFC, 0x60, 0x90, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01, 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||||
0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00,
|
|
||||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00,
|
|
||||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80,
|
|
||||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00,
|
|
||||||
0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80,
|
|
||||||
0x80, 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, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xB2, 0xB2, 0xFF,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03,
|
|
||||||
0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF,
|
|
||||||
0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10,
|
|
||||||
0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01,
|
|
||||||
0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12,
|
|
||||||
0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12,
|
|
||||||
0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF,
|
|
||||||
0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3,
|
|
||||||
0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED,
|
|
||||||
0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0,
|
|
||||||
0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C,
|
|
||||||
0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C,
|
|
||||||
0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00,
|
|
||||||
0xFC, 0xFC, 0x60, 0x90, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F,
|
|
||||||
0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F,
|
|
||||||
0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
|
|
||||||
0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04,
|
|
||||||
0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01,
|
|
||||||
0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07,
|
|
||||||
0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00
|
|
||||||
};
|
|
||||||
# elif LCDHEIGHT == 64
|
# elif LCDHEIGHT == 64
|
||||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {
|
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, 0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE, 0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC, 0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00, 0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70, 0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0, 0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01, 0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70, 0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18, 0x38, 0x66, 0xC3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||||
0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00,
|
|
||||||
0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF,
|
|
||||||
0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE,
|
|
||||||
0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC,
|
|
||||||
0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
||||||
0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
||||||
0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00,
|
|
||||||
0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F,
|
|
||||||
0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F,
|
|
||||||
0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF,
|
|
||||||
0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x01, 0x01, 0x01, 0x01, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00,
|
|
||||||
0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01,
|
|
||||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0xFF, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70,
|
|
||||||
0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0,
|
|
||||||
0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24,
|
|
||||||
0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8,
|
|
||||||
0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04,
|
|
||||||
0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
|
||||||
0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0,
|
|
||||||
0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01,
|
|
||||||
0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70,
|
|
||||||
0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18,
|
|
||||||
0x38, 0x66, 0xC3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
|
|
||||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
|
|
||||||
0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01,
|
|
||||||
0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
|
||||||
0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00,
|
|
||||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
};
|
|
||||||
// TODO: generate bitmap of QMK logo here
|
// TODO: generate bitmap of QMK logo here
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
@ -312,8 +102,6 @@ static uint8_t micro_oled_screen_buffer[] = {
|
|||||||
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {0};
|
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDWIDTH / 8] = {0};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void micro_oled_init(void) {
|
void micro_oled_init(void) {
|
||||||
i2c_init();
|
i2c_init();
|
||||||
i2c_start(I2C_ADDRESS_SA0_1);
|
i2c_start(I2C_ADDRESS_SA0_1);
|
||||||
@ -468,12 +256,10 @@ void send_buffer(void) {
|
|||||||
Draw color pixel in the screen buffer's x,y position with NORM or XOR draw mode.
|
Draw color pixel in the screen buffer's x,y position with NORM or XOR draw mode.
|
||||||
*/
|
*/
|
||||||
void draw_pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode) {
|
void draw_pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode) {
|
||||||
if ((x<0) || (x>=LCDWIDTH) || (y<0) || (y>=LCDHEIGHT))
|
if ((x < 0) || (x >= LCDWIDTH) || (y < 0) || (y >= LCDHEIGHT)) return;
|
||||||
return;
|
|
||||||
|
|
||||||
if (mode == XOR) {
|
if (mode == XOR) {
|
||||||
if (color == PIXEL_ON)
|
if (color == PIXEL_ON) micro_oled_screen_buffer[x + (y / 8) * LCDWIDTH] ^= _BV((y % 8));
|
||||||
micro_oled_screen_buffer[x + (y/8)*LCDWIDTH] ^= _BV((y%8));
|
|
||||||
} else {
|
} else {
|
||||||
if (color == PIXEL_ON)
|
if (color == PIXEL_ON)
|
||||||
micro_oled_screen_buffer[x + (y / 8) * LCDWIDTH] |= _BV((y % 8));
|
micro_oled_screen_buffer[x + (y / 8) * LCDWIDTH] |= _BV((y % 8));
|
||||||
@ -507,7 +293,8 @@ void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, ui
|
|||||||
if (y0 < y1) {
|
if (y0 < y1) {
|
||||||
ystep = 1;
|
ystep = 1;
|
||||||
} else {
|
} else {
|
||||||
ystep = -1;}
|
ystep = -1;
|
||||||
|
}
|
||||||
|
|
||||||
for (; x0 < x1; x0++) {
|
for (; x0 < x1; x0++) {
|
||||||
if (steep) {
|
if (steep) {
|
||||||
@ -526,16 +313,12 @@ void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, ui
|
|||||||
/** \brief Draw horizontal line with color and mode.
|
/** \brief Draw horizontal line with color and mode.
|
||||||
Draw horizontal line using color and mode from x,y to x+width,y of the screen buffer.
|
Draw horizontal line using color and mode from x,y to x+width,y of the screen buffer.
|
||||||
*/
|
*/
|
||||||
void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode) {
|
void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode) { draw_line(x, y, x + width, y, color, mode); }
|
||||||
draw_line(x,y,x+width,y,color,mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** \brief Draw vertical line.
|
/** \brief Draw vertical line.
|
||||||
Draw vertical line using current fore color and current draw mode from x,y to x,y+height of the screen buffer.
|
Draw vertical line using current fore color and current draw mode from x,y to x,y+height of the screen buffer.
|
||||||
*/
|
*/
|
||||||
void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode) {
|
void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode) { draw_line(x, y, x, y + height, color, mode); }
|
||||||
draw_line(x,y,x,y+height,color,mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** \brief Draw rectangle with color and mode.
|
/** \brief Draw rectangle with color and mode.
|
||||||
Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer.
|
Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer.
|
||||||
@ -608,8 +391,7 @@ void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uin
|
|||||||
uint8_t i, j, temp;
|
uint8_t i, j, temp;
|
||||||
uint16_t charPerBitmapRow, charColPositionOnBitmap, charRowPositionOnBitmap, charBitmapStartPosition;
|
uint16_t charPerBitmapRow, charColPositionOnBitmap, charRowPositionOnBitmap, charBitmapStartPosition;
|
||||||
|
|
||||||
if ((font>=TOTALFONTS) || (font<0))
|
if ((font >= TOTALFONTS) || (font < 0)) return;
|
||||||
return;
|
|
||||||
|
|
||||||
uint8_t fontType = font;
|
uint8_t fontType = font;
|
||||||
uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType] + 0);
|
uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType] + 0);
|
||||||
@ -638,8 +420,7 @@ void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uin
|
|||||||
for (j = 0; j < 8; j++) { // 8 is the LCD's page height (see datasheet for explanation)
|
for (j = 0; j < 8; j++) { // 8 is the LCD's page height (see datasheet for explanation)
|
||||||
if (temp & 0x1) {
|
if (temp & 0x1) {
|
||||||
draw_pixel(x + i, y + j, color, mode);
|
draw_pixel(x + i, y + j, color, mode);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
draw_pixel(x + i, y + j, !color, mode);
|
draw_pixel(x + i, y + j, !color, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -663,21 +444,17 @@ void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uin
|
|||||||
for (j = 0; j < 8; j++) { // 8 is the LCD's page height (see datasheet for explanation)
|
for (j = 0; j < 8; j++) { // 8 is the LCD's page height (see datasheet for explanation)
|
||||||
if (temp & 0x1) {
|
if (temp & 0x1) {
|
||||||
draw_pixel(x + i, y + j + (row * 8), color, mode);
|
draw_pixel(x + i, y + j + (row * 8), color, mode);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
draw_pixel(x + i, y + j + (row * 8), !color, mode);
|
draw_pixel(x + i, y + j + (row * 8), !color, mode);
|
||||||
}
|
}
|
||||||
temp >>= 1;
|
temp >>= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_string(uint8_t x, uint8_t y, char* string, uint8_t color, uint8_t mode, uint8_t font) {
|
void draw_string(uint8_t x, uint8_t y, char* string, uint8_t color, uint8_t mode, uint8_t font) {
|
||||||
|
if ((font >= TOTALFONTS) || (font < 0)) return;
|
||||||
if ((font>=TOTALFONTS) || (font<0))
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint8_t fontType = font;
|
uint8_t fontType = font;
|
||||||
uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType] + 0);
|
uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType] + 0);
|
||||||
@ -687,5 +464,4 @@ void draw_string(uint8_t x, uint8_t y, char * string, uint8_t color, uint8_t mod
|
|||||||
draw_char(cur_x, y, string[i], color, mode, font);
|
draw_char(cur_x, y, string[i], color, mode, font);
|
||||||
cur_x += fontWidth + 1;
|
cur_x += fontWidth + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,260 +29,11 @@ https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/
|
|||||||
// Standard ASCII 5x7 font
|
// Standard ASCII 5x7 font
|
||||||
static const unsigned char font5x7[] PROGMEM = {
|
static const unsigned char font5x7[] PROGMEM = {
|
||||||
// first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
|
// first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
|
||||||
5,8,0,255,12,75,
|
5, 8, 0, 255, 12, 75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x18, 0x3C, 0x18, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x18, 0x24, 0x18, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x26, 0x29, 0x79, 0x29, 0x26, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x60, 0x60, 0x60, 0x60, 0x60, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x20, 0x10, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x30, 0x38, 0x3E, 0x38, 0x30,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x23, 0x13, 0x08, 0x64, 0x62, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x80, 0x70, 0x30, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x60, 0x60, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x72, 0x49, 0x49, 0x49, 0x46, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x27, 0x45, 0x45, 0x45, 0x39, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x41, 0x21, 0x11, 0x09, 0x07, 0x36, 0x49, 0x49, 0x49, 0x36, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x41, 0x22, 0x14, 0x08, 0x02,
|
||||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
|
0x01, 0x59, 0x09, 0x06, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x7F, 0x08, 0x14, 0x22, 0x41, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x26, 0x49, 0x49, 0x49, 0x32, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x63, 0x14, 0x08, 0x14, 0x63, 0x03, 0x04, 0x78, 0x04, 0x03, 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x04, 0x02, 0x01, 0x02, 0x04, 0x40, 0x40,
|
||||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
|
0x40, 0x40, 0x40, 0x00, 0x03, 0x07, 0x08, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x38, 0x44, 0x44, 0x44, 0x28, 0x38, 0x44, 0x44, 0x28, 0x7F, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x38, 0x44, 0x44, 0x44, 0x38, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x48, 0x54, 0x54, 0x54, 0x24, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x44, 0x28, 0x10, 0x28, 0x44, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x41, 0x36, 0x08, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x3C, 0x26, 0x23,
|
||||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C,
|
0x26, 0x3C, 0x1E, 0xA1, 0xA1, 0x61, 0x12, 0x3A, 0x40, 0x40, 0x20, 0x7A, 0x38, 0x54, 0x54, 0x55, 0x59, 0x21, 0x55, 0x55, 0x79, 0x41, 0x21, 0x54, 0x54, 0x78, 0x41, 0x21, 0x55, 0x54, 0x78, 0x40, 0x20, 0x54, 0x55, 0x79, 0x40, 0x0C, 0x1E, 0x52, 0x72, 0x12, 0x39, 0x55, 0x55, 0x55, 0x59, 0x39, 0x54, 0x54, 0x54, 0x59, 0x39, 0x55, 0x54, 0x54, 0x58, 0x00, 0x00, 0x45, 0x7C, 0x41, 0x00, 0x02, 0x45, 0x7D, 0x42, 0x00, 0x01, 0x45, 0x7C, 0x40, 0xF0, 0x29, 0x24, 0x29, 0xF0, 0xF0, 0x28, 0x25, 0x28, 0xF0, 0x7C, 0x54, 0x55, 0x45, 0x00, 0x20, 0x54, 0x54, 0x7C, 0x54, 0x7C, 0x0A, 0x09, 0x7F, 0x49, 0x32, 0x49, 0x49, 0x49, 0x32, 0x32, 0x48, 0x48, 0x48, 0x32, 0x32, 0x4A, 0x48, 0x48, 0x30, 0x3A, 0x41, 0x41, 0x21, 0x7A, 0x3A, 0x42, 0x40, 0x20, 0x78, 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 0x39, 0x44, 0x44, 0x44, 0x39, 0x3D, 0x40, 0x40, 0x40, 0x3D, 0x3C, 0x24, 0xFF, 0x24, 0x24, 0x48, 0x7E, 0x49, 0x43, 0x66, 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 0xFF, 0x09, 0x29, 0xF6, 0x20, 0xC0, 0x88, 0x7E, 0x09,
|
||||||
0x18, 0x3C, 0x7E, 0x3C, 0x18,
|
0x03, 0x20, 0x54, 0x54, 0x79, 0x41, 0x00, 0x00, 0x44, 0x7D, 0x41, 0x30, 0x48, 0x48, 0x4A, 0x32, 0x38, 0x40, 0x40, 0x22, 0x7A, 0x00, 0x7A, 0x0A, 0x0A, 0x72, 0x7D, 0x0D, 0x19, 0x31, 0x7D, 0x26, 0x29, 0x29, 0x2F, 0x28, 0x26, 0x29, 0x29, 0x29, 0x26, 0x30, 0x48, 0x4D, 0x40, 0x20, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x38, 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 0x2F, 0x10, 0x28, 0x34, 0xFA, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x08, 0x14, 0x2A, 0x14, 0x22, 0x22, 0x14, 0x2A, 0x14, 0x08, 0xAA, 0x00, 0x55, 0x00, 0xAA, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x10, 0x10, 0x10, 0xFF, 0x00, 0x14, 0x14, 0x14, 0xFF, 0x00, 0x10, 0x10, 0xFF, 0x00, 0xFF, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x14, 0x14, 0x14, 0xFC, 0x00, 0x14, 0x14, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x14, 0x14, 0xF4, 0x04, 0xFC, 0x14, 0x14, 0x17, 0x10, 0x1F, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0x1F, 0x00, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10,
|
||||||
0x1C, 0x57, 0x7D, 0x57, 0x1C,
|
0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x14, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x1F, 0x10, 0x17, 0x00, 0x00, 0xFC, 0x04, 0xF4, 0x14, 0x14, 0x17, 0x10, 0x17, 0x14, 0x14, 0xF4, 0x04, 0xF4, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xF7, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x17, 0x14, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0xF4, 0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38, 0x44, 0x44, 0x38, 0x44, 0x7C,
|
||||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C,
|
0x2A, 0x2A, 0x3E, 0x14, 0x7E, 0x02, 0x02, 0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63, 0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02, 0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30, 0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49, 0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44, 0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E, 0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||||
0x00, 0x18, 0x3C, 0x18, 0x00,
|
|
||||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF,
|
|
||||||
0x00, 0x18, 0x24, 0x18, 0x00,
|
|
||||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF,
|
|
||||||
0x30, 0x48, 0x3A, 0x06, 0x0E,
|
|
||||||
0x26, 0x29, 0x79, 0x29, 0x26,
|
|
||||||
0x40, 0x7F, 0x05, 0x05, 0x07,
|
|
||||||
0x40, 0x7F, 0x05, 0x25, 0x3F,
|
|
||||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A,
|
|
||||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08,
|
|
||||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F,
|
|
||||||
0x14, 0x22, 0x7F, 0x22, 0x14,
|
|
||||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F,
|
|
||||||
0x06, 0x09, 0x7F, 0x01, 0x7F,
|
|
||||||
0x00, 0x66, 0x89, 0x95, 0x6A,
|
|
||||||
0x60, 0x60, 0x60, 0x60, 0x60,
|
|
||||||
0x94, 0xA2, 0xFF, 0xA2, 0x94,
|
|
||||||
0x08, 0x04, 0x7E, 0x04, 0x08,
|
|
||||||
0x10, 0x20, 0x7E, 0x20, 0x10,
|
|
||||||
0x08, 0x08, 0x2A, 0x1C, 0x08,
|
|
||||||
0x08, 0x1C, 0x2A, 0x08, 0x08,
|
|
||||||
0x1E, 0x10, 0x10, 0x10, 0x10,
|
|
||||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C,
|
|
||||||
0x30, 0x38, 0x3E, 0x38, 0x30,
|
|
||||||
0x06, 0x0E, 0x3E, 0x0E, 0x06,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x5F, 0x00, 0x00,
|
|
||||||
0x00, 0x07, 0x00, 0x07, 0x00,
|
|
||||||
0x14, 0x7F, 0x14, 0x7F, 0x14,
|
|
||||||
0x24, 0x2A, 0x7F, 0x2A, 0x12,
|
|
||||||
0x23, 0x13, 0x08, 0x64, 0x62,
|
|
||||||
0x36, 0x49, 0x56, 0x20, 0x50,
|
|
||||||
0x00, 0x08, 0x07, 0x03, 0x00,
|
|
||||||
0x00, 0x1C, 0x22, 0x41, 0x00,
|
|
||||||
0x00, 0x41, 0x22, 0x1C, 0x00,
|
|
||||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A,
|
|
||||||
0x08, 0x08, 0x3E, 0x08, 0x08,
|
|
||||||
0x00, 0x80, 0x70, 0x30, 0x00,
|
|
||||||
0x08, 0x08, 0x08, 0x08, 0x08,
|
|
||||||
0x00, 0x00, 0x60, 0x60, 0x00,
|
|
||||||
0x20, 0x10, 0x08, 0x04, 0x02,
|
|
||||||
0x3E, 0x51, 0x49, 0x45, 0x3E,
|
|
||||||
0x00, 0x42, 0x7F, 0x40, 0x00,
|
|
||||||
0x72, 0x49, 0x49, 0x49, 0x46,
|
|
||||||
0x21, 0x41, 0x49, 0x4D, 0x33,
|
|
||||||
0x18, 0x14, 0x12, 0x7F, 0x10,
|
|
||||||
0x27, 0x45, 0x45, 0x45, 0x39,
|
|
||||||
0x3C, 0x4A, 0x49, 0x49, 0x31,
|
|
||||||
0x41, 0x21, 0x11, 0x09, 0x07,
|
|
||||||
0x36, 0x49, 0x49, 0x49, 0x36,
|
|
||||||
0x46, 0x49, 0x49, 0x29, 0x1E,
|
|
||||||
0x00, 0x00, 0x14, 0x00, 0x00,
|
|
||||||
0x00, 0x40, 0x34, 0x00, 0x00,
|
|
||||||
0x00, 0x08, 0x14, 0x22, 0x41,
|
|
||||||
0x14, 0x14, 0x14, 0x14, 0x14,
|
|
||||||
0x00, 0x41, 0x22, 0x14, 0x08,
|
|
||||||
0x02, 0x01, 0x59, 0x09, 0x06,
|
|
||||||
0x3E, 0x41, 0x5D, 0x59, 0x4E,
|
|
||||||
0x7C, 0x12, 0x11, 0x12, 0x7C,
|
|
||||||
0x7F, 0x49, 0x49, 0x49, 0x36,
|
|
||||||
0x3E, 0x41, 0x41, 0x41, 0x22,
|
|
||||||
0x7F, 0x41, 0x41, 0x41, 0x3E,
|
|
||||||
0x7F, 0x49, 0x49, 0x49, 0x41,
|
|
||||||
0x7F, 0x09, 0x09, 0x09, 0x01,
|
|
||||||
0x3E, 0x41, 0x41, 0x51, 0x73,
|
|
||||||
0x7F, 0x08, 0x08, 0x08, 0x7F,
|
|
||||||
0x00, 0x41, 0x7F, 0x41, 0x00,
|
|
||||||
0x20, 0x40, 0x41, 0x3F, 0x01,
|
|
||||||
0x7F, 0x08, 0x14, 0x22, 0x41,
|
|
||||||
0x7F, 0x40, 0x40, 0x40, 0x40,
|
|
||||||
0x7F, 0x02, 0x1C, 0x02, 0x7F,
|
|
||||||
0x7F, 0x04, 0x08, 0x10, 0x7F,
|
|
||||||
0x3E, 0x41, 0x41, 0x41, 0x3E,
|
|
||||||
0x7F, 0x09, 0x09, 0x09, 0x06,
|
|
||||||
0x3E, 0x41, 0x51, 0x21, 0x5E,
|
|
||||||
0x7F, 0x09, 0x19, 0x29, 0x46,
|
|
||||||
0x26, 0x49, 0x49, 0x49, 0x32,
|
|
||||||
0x03, 0x01, 0x7F, 0x01, 0x03,
|
|
||||||
0x3F, 0x40, 0x40, 0x40, 0x3F,
|
|
||||||
0x1F, 0x20, 0x40, 0x20, 0x1F,
|
|
||||||
0x3F, 0x40, 0x38, 0x40, 0x3F,
|
|
||||||
0x63, 0x14, 0x08, 0x14, 0x63,
|
|
||||||
0x03, 0x04, 0x78, 0x04, 0x03,
|
|
||||||
0x61, 0x59, 0x49, 0x4D, 0x43,
|
|
||||||
0x00, 0x7F, 0x41, 0x41, 0x41,
|
|
||||||
0x02, 0x04, 0x08, 0x10, 0x20,
|
|
||||||
0x00, 0x41, 0x41, 0x41, 0x7F,
|
|
||||||
0x04, 0x02, 0x01, 0x02, 0x04,
|
|
||||||
0x40, 0x40, 0x40, 0x40, 0x40,
|
|
||||||
0x00, 0x03, 0x07, 0x08, 0x00,
|
|
||||||
0x20, 0x54, 0x54, 0x78, 0x40,
|
|
||||||
0x7F, 0x28, 0x44, 0x44, 0x38,
|
|
||||||
0x38, 0x44, 0x44, 0x44, 0x28,
|
|
||||||
0x38, 0x44, 0x44, 0x28, 0x7F,
|
|
||||||
0x38, 0x54, 0x54, 0x54, 0x18,
|
|
||||||
0x00, 0x08, 0x7E, 0x09, 0x02,
|
|
||||||
0x18, 0xA4, 0xA4, 0x9C, 0x78,
|
|
||||||
0x7F, 0x08, 0x04, 0x04, 0x78,
|
|
||||||
0x00, 0x44, 0x7D, 0x40, 0x00,
|
|
||||||
0x20, 0x40, 0x40, 0x3D, 0x00,
|
|
||||||
0x7F, 0x10, 0x28, 0x44, 0x00,
|
|
||||||
0x00, 0x41, 0x7F, 0x40, 0x00,
|
|
||||||
0x7C, 0x04, 0x78, 0x04, 0x78,
|
|
||||||
0x7C, 0x08, 0x04, 0x04, 0x78,
|
|
||||||
0x38, 0x44, 0x44, 0x44, 0x38,
|
|
||||||
0xFC, 0x18, 0x24, 0x24, 0x18,
|
|
||||||
0x18, 0x24, 0x24, 0x18, 0xFC,
|
|
||||||
0x7C, 0x08, 0x04, 0x04, 0x08,
|
|
||||||
0x48, 0x54, 0x54, 0x54, 0x24,
|
|
||||||
0x04, 0x04, 0x3F, 0x44, 0x24,
|
|
||||||
0x3C, 0x40, 0x40, 0x20, 0x7C,
|
|
||||||
0x1C, 0x20, 0x40, 0x20, 0x1C,
|
|
||||||
0x3C, 0x40, 0x30, 0x40, 0x3C,
|
|
||||||
0x44, 0x28, 0x10, 0x28, 0x44,
|
|
||||||
0x4C, 0x90, 0x90, 0x90, 0x7C,
|
|
||||||
0x44, 0x64, 0x54, 0x4C, 0x44,
|
|
||||||
0x00, 0x08, 0x36, 0x41, 0x00,
|
|
||||||
0x00, 0x00, 0x77, 0x00, 0x00,
|
|
||||||
0x00, 0x41, 0x36, 0x08, 0x00,
|
|
||||||
0x02, 0x01, 0x02, 0x04, 0x02,
|
|
||||||
0x3C, 0x26, 0x23, 0x26, 0x3C,
|
|
||||||
0x1E, 0xA1, 0xA1, 0x61, 0x12,
|
|
||||||
0x3A, 0x40, 0x40, 0x20, 0x7A,
|
|
||||||
0x38, 0x54, 0x54, 0x55, 0x59,
|
|
||||||
0x21, 0x55, 0x55, 0x79, 0x41,
|
|
||||||
0x21, 0x54, 0x54, 0x78, 0x41,
|
|
||||||
0x21, 0x55, 0x54, 0x78, 0x40,
|
|
||||||
0x20, 0x54, 0x55, 0x79, 0x40,
|
|
||||||
0x0C, 0x1E, 0x52, 0x72, 0x12,
|
|
||||||
0x39, 0x55, 0x55, 0x55, 0x59,
|
|
||||||
0x39, 0x54, 0x54, 0x54, 0x59,
|
|
||||||
0x39, 0x55, 0x54, 0x54, 0x58,
|
|
||||||
0x00, 0x00, 0x45, 0x7C, 0x41,
|
|
||||||
0x00, 0x02, 0x45, 0x7D, 0x42,
|
|
||||||
0x00, 0x01, 0x45, 0x7C, 0x40,
|
|
||||||
0xF0, 0x29, 0x24, 0x29, 0xF0,
|
|
||||||
0xF0, 0x28, 0x25, 0x28, 0xF0,
|
|
||||||
0x7C, 0x54, 0x55, 0x45, 0x00,
|
|
||||||
0x20, 0x54, 0x54, 0x7C, 0x54,
|
|
||||||
0x7C, 0x0A, 0x09, 0x7F, 0x49,
|
|
||||||
0x32, 0x49, 0x49, 0x49, 0x32,
|
|
||||||
0x32, 0x48, 0x48, 0x48, 0x32,
|
|
||||||
0x32, 0x4A, 0x48, 0x48, 0x30,
|
|
||||||
0x3A, 0x41, 0x41, 0x21, 0x7A,
|
|
||||||
0x3A, 0x42, 0x40, 0x20, 0x78,
|
|
||||||
0x00, 0x9D, 0xA0, 0xA0, 0x7D,
|
|
||||||
0x39, 0x44, 0x44, 0x44, 0x39,
|
|
||||||
0x3D, 0x40, 0x40, 0x40, 0x3D,
|
|
||||||
0x3C, 0x24, 0xFF, 0x24, 0x24,
|
|
||||||
0x48, 0x7E, 0x49, 0x43, 0x66,
|
|
||||||
0x2B, 0x2F, 0xFC, 0x2F, 0x2B,
|
|
||||||
0xFF, 0x09, 0x29, 0xF6, 0x20,
|
|
||||||
0xC0, 0x88, 0x7E, 0x09, 0x03,
|
|
||||||
0x20, 0x54, 0x54, 0x79, 0x41,
|
|
||||||
0x00, 0x00, 0x44, 0x7D, 0x41,
|
|
||||||
0x30, 0x48, 0x48, 0x4A, 0x32,
|
|
||||||
0x38, 0x40, 0x40, 0x22, 0x7A,
|
|
||||||
0x00, 0x7A, 0x0A, 0x0A, 0x72,
|
|
||||||
0x7D, 0x0D, 0x19, 0x31, 0x7D,
|
|
||||||
0x26, 0x29, 0x29, 0x2F, 0x28,
|
|
||||||
0x26, 0x29, 0x29, 0x29, 0x26,
|
|
||||||
0x30, 0x48, 0x4D, 0x40, 0x20,
|
|
||||||
0x38, 0x08, 0x08, 0x08, 0x08,
|
|
||||||
0x08, 0x08, 0x08, 0x08, 0x38,
|
|
||||||
0x2F, 0x10, 0xC8, 0xAC, 0xBA,
|
|
||||||
0x2F, 0x10, 0x28, 0x34, 0xFA,
|
|
||||||
0x00, 0x00, 0x7B, 0x00, 0x00,
|
|
||||||
0x08, 0x14, 0x2A, 0x14, 0x22,
|
|
||||||
0x22, 0x14, 0x2A, 0x14, 0x08,
|
|
||||||
0xAA, 0x00, 0x55, 0x00, 0xAA,
|
|
||||||
0xAA, 0x55, 0xAA, 0x55, 0xAA,
|
|
||||||
0x00, 0x00, 0x00, 0xFF, 0x00,
|
|
||||||
0x10, 0x10, 0x10, 0xFF, 0x00,
|
|
||||||
0x14, 0x14, 0x14, 0xFF, 0x00,
|
|
||||||
0x10, 0x10, 0xFF, 0x00, 0xFF,
|
|
||||||
0x10, 0x10, 0xF0, 0x10, 0xF0,
|
|
||||||
0x14, 0x14, 0x14, 0xFC, 0x00,
|
|
||||||
0x14, 0x14, 0xF7, 0x00, 0xFF,
|
|
||||||
0x00, 0x00, 0xFF, 0x00, 0xFF,
|
|
||||||
0x14, 0x14, 0xF4, 0x04, 0xFC,
|
|
||||||
0x14, 0x14, 0x17, 0x10, 0x1F,
|
|
||||||
0x10, 0x10, 0x1F, 0x10, 0x1F,
|
|
||||||
0x14, 0x14, 0x14, 0x1F, 0x00,
|
|
||||||
0x10, 0x10, 0x10, 0xF0, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x1F, 0x10,
|
|
||||||
0x10, 0x10, 0x10, 0x1F, 0x10,
|
|
||||||
0x10, 0x10, 0x10, 0xF0, 0x10,
|
|
||||||
0x00, 0x00, 0x00, 0xFF, 0x10,
|
|
||||||
0x10, 0x10, 0x10, 0x10, 0x10,
|
|
||||||
0x10, 0x10, 0x10, 0xFF, 0x10,
|
|
||||||
0x00, 0x00, 0x00, 0xFF, 0x14,
|
|
||||||
0x00, 0x00, 0xFF, 0x00, 0xFF,
|
|
||||||
0x00, 0x00, 0x1F, 0x10, 0x17,
|
|
||||||
0x00, 0x00, 0xFC, 0x04, 0xF4,
|
|
||||||
0x14, 0x14, 0x17, 0x10, 0x17,
|
|
||||||
0x14, 0x14, 0xF4, 0x04, 0xF4,
|
|
||||||
0x00, 0x00, 0xFF, 0x00, 0xF7,
|
|
||||||
0x14, 0x14, 0x14, 0x14, 0x14,
|
|
||||||
0x14, 0x14, 0xF7, 0x00, 0xF7,
|
|
||||||
0x14, 0x14, 0x14, 0x17, 0x14,
|
|
||||||
0x10, 0x10, 0x1F, 0x10, 0x1F,
|
|
||||||
0x14, 0x14, 0x14, 0xF4, 0x14,
|
|
||||||
0x10, 0x10, 0xF0, 0x10, 0xF0,
|
|
||||||
0x00, 0x00, 0x1F, 0x10, 0x1F,
|
|
||||||
0x00, 0x00, 0x00, 0x1F, 0x14,
|
|
||||||
0x00, 0x00, 0x00, 0xFC, 0x14,
|
|
||||||
0x00, 0x00, 0xF0, 0x10, 0xF0,
|
|
||||||
0x10, 0x10, 0xFF, 0x10, 0xFF,
|
|
||||||
0x14, 0x14, 0x14, 0xFF, 0x14,
|
|
||||||
0x10, 0x10, 0x10, 0x1F, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0xF0, 0x10,
|
|
||||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
|
||||||
0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
|
|
||||||
0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0xFF, 0xFF,
|
|
||||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
|
|
||||||
0x38, 0x44, 0x44, 0x38, 0x44,
|
|
||||||
0x7C, 0x2A, 0x2A, 0x3E, 0x14,
|
|
||||||
0x7E, 0x02, 0x02, 0x06, 0x06,
|
|
||||||
0x02, 0x7E, 0x02, 0x7E, 0x02,
|
|
||||||
0x63, 0x55, 0x49, 0x41, 0x63,
|
|
||||||
0x38, 0x44, 0x44, 0x3C, 0x04,
|
|
||||||
0x40, 0x7E, 0x20, 0x1E, 0x20,
|
|
||||||
0x06, 0x02, 0x7E, 0x02, 0x02,
|
|
||||||
0x99, 0xA5, 0xE7, 0xA5, 0x99,
|
|
||||||
0x1C, 0x2A, 0x49, 0x2A, 0x1C,
|
|
||||||
0x4C, 0x72, 0x01, 0x72, 0x4C,
|
|
||||||
0x30, 0x4A, 0x4D, 0x4D, 0x30,
|
|
||||||
0x30, 0x48, 0x78, 0x48, 0x30,
|
|
||||||
0xBC, 0x62, 0x5A, 0x46, 0x3D,
|
|
||||||
0x3E, 0x49, 0x49, 0x49, 0x00,
|
|
||||||
0x7E, 0x01, 0x01, 0x01, 0x7E,
|
|
||||||
0x2A, 0x2A, 0x2A, 0x2A, 0x2A,
|
|
||||||
0x44, 0x44, 0x5F, 0x44, 0x44,
|
|
||||||
0x40, 0x51, 0x4A, 0x44, 0x40,
|
|
||||||
0x40, 0x44, 0x4A, 0x51, 0x40,
|
|
||||||
0x00, 0x00, 0xFF, 0x01, 0x03,
|
|
||||||
0xE0, 0x80, 0xFF, 0x00, 0x00,
|
|
||||||
0x08, 0x08, 0x6B, 0x6B, 0x08,
|
|
||||||
0x36, 0x12, 0x36, 0x24, 0x36,
|
|
||||||
0x06, 0x0F, 0x09, 0x0F, 0x06,
|
|
||||||
0x00, 0x00, 0x18, 0x18, 0x00,
|
|
||||||
0x00, 0x00, 0x10, 0x10, 0x00,
|
|
||||||
0x30, 0x40, 0xFF, 0x01, 0x01,
|
|
||||||
0x00, 0x1F, 0x01, 0x01, 0x1E,
|
|
||||||
0x00, 0x19, 0x1D, 0x17, 0x12,
|
|
||||||
0x00, 0x3C, 0x3C, 0x3C, 0x3C,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
};
|
|
||||||
|
@ -27,101 +27,13 @@ https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/
|
|||||||
|
|
||||||
static const unsigned char font8x16[] PROGMEM = {
|
static const unsigned char font8x16[] PROGMEM = {
|
||||||
// first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
|
// first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
|
||||||
8,16,32,96,2,56,
|
8, 16, 32, 96, 2, 56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00, 0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00, 0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00, 0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00, 0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00,
|
||||||
0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00,
|
0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04,
|
||||||
0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00,
|
0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00, 0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00, 0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00, 0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00, 0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||||
0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00,
|
0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04,
|
||||||
0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00,
|
0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00, 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00, 0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00, 0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x10,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00,
|
0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
|
||||||
0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||||
0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00,
|
|
||||||
0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00,
|
|
||||||
0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00,
|
|
||||||
0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00,
|
|
||||||
0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00,
|
|
||||||
0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00,
|
|
||||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
|
||||||
0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
|
|
||||||
0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00,
|
|
||||||
0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00,
|
|
||||||
0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00,
|
|
||||||
0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00,
|
|
||||||
0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00,
|
|
||||||
0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00,
|
|
||||||
0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00,
|
|
||||||
0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00,
|
|
||||||
0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00,
|
|
||||||
0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00,
|
|
||||||
0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00,
|
|
||||||
0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00,
|
|
||||||
0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00,
|
|
||||||
0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00,
|
|
||||||
0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00,
|
|
||||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
|
||||||
0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
|
||||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00,
|
|
||||||
0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00,
|
|
||||||
0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00,
|
|
||||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00,
|
|
||||||
0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
|
|
||||||
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00,
|
|
||||||
0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
|
|
||||||
0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
|
|
||||||
0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00,
|
|
||||||
0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00,
|
|
||||||
0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
|
|
||||||
0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00,
|
|
||||||
0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00,
|
|
||||||
0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00,
|
|
||||||
0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
|
|
||||||
0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00,
|
|
||||||
0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00,
|
|
||||||
0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00,
|
|
||||||
0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00,
|
|
||||||
0x00, 0x10, 0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00,
|
|
||||||
0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00,
|
|
||||||
0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
|
||||||
0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00,
|
|
||||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00,
|
|
||||||
0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
|
|
||||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
|
||||||
0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00,
|
|
||||||
0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00,
|
|
||||||
0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
};
|
|
||||||
|
@ -58,7 +58,6 @@ static const uint8_t led_mapping[GDISP_SCREEN_HEIGHT][GDISP_SCREEN_WIDTH] = {
|
|||||||
{NA, NA, NA, NA, LA(6, 2), LA(6, 1), LA(6, 0)},
|
{NA, NA, NA, NA, LA(6, 2), LA(6, 1), LA(6, 0)},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define IS31_ADDR_DEFAULT 0x74 // AD connected to GND
|
#define IS31_ADDR_DEFAULT 0x74 // AD connected to GND
|
||||||
#define IS31_TIMEOUT 5000
|
#define IS31_TIMEOUT 5000
|
||||||
|
|
||||||
@ -77,17 +76,14 @@ static GFXINLINE void init_board(GDisplay *g) {
|
|||||||
I2CD1.i2c->FLT = 4;
|
I2CD1.i2c->FLT = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GFXINLINE void post_init_board(GDisplay *g) {
|
static GFXINLINE void post_init_board(GDisplay* g) { (void)g; }
|
||||||
(void) g;
|
|
||||||
}
|
|
||||||
|
|
||||||
static GFXINLINE const uint8_t* get_led_mask(GDisplay* g) {
|
static GFXINLINE const uint8_t* get_led_mask(GDisplay* g) {
|
||||||
(void)g;
|
(void)g;
|
||||||
return led_mask;
|
return led_mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GFXINLINE uint8_t get_led_address(GDisplay* g, uint16_t x, uint16_t y)
|
static GFXINLINE uint8_t get_led_address(GDisplay* g, uint16_t x, uint16_t y) {
|
||||||
{
|
|
||||||
(void)g;
|
(void)g;
|
||||||
return led_mapping[y][x];
|
return led_mapping[y][x];
|
||||||
}
|
}
|
||||||
@ -96,8 +92,7 @@ static GFXINLINE void set_hardware_shutdown(GDisplay* g, bool shutdown) {
|
|||||||
(void)g;
|
(void)g;
|
||||||
if (!shutdown) {
|
if (!shutdown) {
|
||||||
palSetPad(GPIOB, 16);
|
palSetPad(GPIOB, 16);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
palClearPad(GPIOB, 16);
|
palClearPad(GPIOB, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
# include "board_is31fl3731c.h"
|
# include "board_is31fl3731c.h"
|
||||||
|
|
||||||
|
|
||||||
// Can't include led_tables from here
|
// Can't include led_tables from here
|
||||||
extern const uint8_t CIE1931_CURVE[];
|
extern const uint8_t CIE1931_CURVE[];
|
||||||
|
|
||||||
@ -160,7 +159,6 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
|||||||
write_ram(g, IS31_FUNCTIONREG, 0, IS31_FUNCTIONREG_SIZE);
|
write_ram(g, IS31_FUNCTIONREG, 0, IS31_FUNCTIONREG_SIZE);
|
||||||
gfxSleepMilliseconds(10);
|
gfxSleepMilliseconds(10);
|
||||||
|
|
||||||
|
|
||||||
// zero all LED registers on all 8 pages, and enable the mask
|
// zero all LED registers on all 8 pages, and enable the mask
|
||||||
__builtin_memcpy(PRIV(g)->write_buffer, get_led_mask(g), IS31_LED_MASK_SIZE);
|
__builtin_memcpy(PRIV(g)->write_buffer, get_led_mask(g), IS31_LED_MASK_SIZE);
|
||||||
for (uint8_t i = 0; i < 8; i++) {
|
for (uint8_t i = 0; i < 8; i++) {
|
||||||
@ -188,8 +186,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
|||||||
# if GDISP_HARDWARE_FLUSH
|
# if GDISP_HARDWARE_FLUSH
|
||||||
LLDSPEC void gdisp_lld_flush(GDisplay *g) {
|
LLDSPEC void gdisp_lld_flush(GDisplay *g) {
|
||||||
// Don't flush if we don't need it.
|
// Don't flush if we don't need it.
|
||||||
if (!(g->flags & GDISP_FLG_NEEDFLUSH))
|
if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return;
|
||||||
return;
|
|
||||||
|
|
||||||
PRIV(g)->page++;
|
PRIV(g)->page++;
|
||||||
PRIV(g)->page %= 2;
|
PRIV(g)->page %= 2;
|
||||||
@ -256,8 +253,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
|||||||
LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
||||||
switch (g->p.x) {
|
switch (g->p.x) {
|
||||||
case GDISP_CONTROL_POWER:
|
case GDISP_CONTROL_POWER:
|
||||||
if (g->g.Powermode == (powermode_t)g->p.ptr)
|
if (g->g.Powermode == (powermode_t)g->p.ptr) return;
|
||||||
return;
|
|
||||||
switch ((powermode_t)g->p.ptr) {
|
switch ((powermode_t)g->p.ptr) {
|
||||||
case powerOff:
|
case powerOff:
|
||||||
case powerSleep:
|
case powerSleep:
|
||||||
@ -274,8 +270,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case GDISP_CONTROL_ORIENTATION:
|
case GDISP_CONTROL_ORIENTATION:
|
||||||
if (g->g.Orientation == (orientation_t)g->p.ptr)
|
if (g->g.Orientation == (orientation_t)g->p.ptr) return;
|
||||||
return;
|
|
||||||
switch ((orientation_t)g->p.ptr) {
|
switch ((orientation_t)g->p.ptr) {
|
||||||
/* Rotation is handled by the drawing routines */
|
/* Rotation is handled by the drawing routines */
|
||||||
case GDISP_ROTATE_0:
|
case GDISP_ROTATE_0:
|
||||||
@ -295,8 +290,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case GDISP_CONTROL_BACKLIGHT:
|
case GDISP_CONTROL_BACKLIGHT:
|
||||||
if (g->g.Backlight == (unsigned)g->p.ptr)
|
if (g->g.Backlight == (unsigned)g->p.ptr) return;
|
||||||
return;
|
|
||||||
unsigned val = (unsigned)g->p.ptr;
|
unsigned val = (unsigned)g->p.ptr;
|
||||||
g->g.Backlight = val > 100 ? 100 : val;
|
g->g.Backlight = val > 100 ? 100 : val;
|
||||||
g->flags |= GDISP_FLG_NEEDFLUSH;
|
g->flags |= GDISP_FLG_NEEDFLUSH;
|
||||||
|
@ -25,11 +25,9 @@
|
|||||||
#define ST7565_SLCK_PIN 5
|
#define ST7565_SLCK_PIN 5
|
||||||
#define ST7565_SS_PIN 4
|
#define ST7565_SS_PIN 4
|
||||||
|
|
||||||
#define palSetPadModeRaw(portname, bits) \
|
#define palSetPadModeRaw(portname, bits) ST7565_PORT->PCR[ST7565_##portname##_PIN] = bits
|
||||||
ST7565_PORT->PCR[ST7565_##portname##_PIN] = bits
|
|
||||||
|
|
||||||
#define palSetPadModeNamed(portname, portmode) \
|
#define palSetPadModeNamed(portname, portmode) palSetPadMode(ST7565_GPIOPORT, ST7565_##portname##_PIN, portmode)
|
||||||
palSetPadMode(ST7565_GPIOPORT, ST7565_##portname##_PIN, portmode)
|
|
||||||
|
|
||||||
#define ST7565_SPI_MODE PORTx_PCRn_DSE | PORTx_PCRn_MUX(2)
|
#define ST7565_SPI_MODE PORTx_PCRn_DSE | PORTx_PCRn_MUX(2)
|
||||||
// DSPI Clock and Transfer Attributes
|
// DSPI Clock and Transfer Attributes
|
||||||
@ -44,8 +42,7 @@ static const SPIConfig spi1config = {
|
|||||||
// brief The chip select line pad number - when not using pcs.
|
// brief The chip select line pad number - when not using pcs.
|
||||||
.sspad = ST7565_SS_PIN,
|
.sspad = ST7565_SS_PIN,
|
||||||
// SPI initialization data.
|
// SPI initialization data.
|
||||||
.tar0 =
|
.tar0 = SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes
|
||||||
SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes
|
|
||||||
| SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns
|
| SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns
|
||||||
| SPIx_CTARn_DT(0) // Delay After Transfer Scaler (no minimum)= 27.78ns
|
| SPIx_CTARn_DT(0) // Delay After Transfer Scaler (no minimum)= 27.78ns
|
||||||
| SPIx_CTARn_CSSCK(0) // PCS to SCK Delay Scaler (min 20 ns) = 27.78ns
|
| SPIx_CTARn_CSSCK(0) // PCS to SCK Delay Scaler (min 20 ns) = 27.78ns
|
||||||
@ -82,28 +79,20 @@ static GFXINLINE void init_board(GDisplay *g) {
|
|||||||
release_bus(g);
|
release_bus(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GFXINLINE void post_init_board(GDisplay *g) {
|
static GFXINLINE void post_init_board(GDisplay *g) { (void)g; }
|
||||||
(void) g;
|
|
||||||
}
|
|
||||||
|
|
||||||
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
|
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
|
||||||
(void)g;
|
(void)g;
|
||||||
if (state) {
|
if (state) {
|
||||||
palClearPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
palClearPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static GFXINLINE void enter_data_mode(GDisplay *g) {
|
static GFXINLINE void enter_data_mode(GDisplay *g) { palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN); }
|
||||||
palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN);
|
|
||||||
}
|
|
||||||
|
|
||||||
static GFXINLINE void enter_cmd_mode(GDisplay *g) {
|
|
||||||
palClearPad(ST7565_GPIOPORT, ST7565_A0_PIN);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
static GFXINLINE void enter_cmd_mode(GDisplay *g) { palClearPad(ST7565_GPIOPORT, ST7565_A0_PIN); }
|
||||||
|
|
||||||
static GFXINLINE void write_data(GDisplay *g, uint8_t *data, uint16_t length) {
|
static GFXINLINE void write_data(GDisplay *g, uint8_t *data, uint16_t length) {
|
||||||
(void)g;
|
(void)g;
|
||||||
|
@ -67,17 +67,24 @@ typedef struct{
|
|||||||
# define PRIV(g) ((PrivData *)g->priv)
|
# define PRIV(g) ((PrivData *)g->priv)
|
||||||
# define RAM(g) (PRIV(g)->ram)
|
# define RAM(g) (PRIV(g)->ram)
|
||||||
|
|
||||||
static GFXINLINE void write_cmd(GDisplay* g, uint8_t cmd) {
|
static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) { PRIV(g)->data[PRIV(g)->data_pos++] = cmd; }
|
||||||
PRIV(g)->data[PRIV(g)->data_pos++] = cmd;
|
|
||||||
}
|
|
||||||
|
|
||||||
static GFXINLINE void flush_cmd(GDisplay *g) {
|
static GFXINLINE void flush_cmd(GDisplay *g) {
|
||||||
write_data(g, PRIV(g)->data, PRIV(g)->data_pos);
|
write_data(g, PRIV(g)->data, PRIV(g)->data_pos);
|
||||||
PRIV(g)->data_pos = 0;
|
PRIV(g)->data_pos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define write_cmd2(g, cmd1, cmd2) { write_cmd(g, cmd1); write_cmd(g, cmd2); }
|
# define write_cmd2(g, cmd1, cmd2) \
|
||||||
#define write_cmd3(g, cmd1, cmd2, cmd3) { write_cmd(g, cmd1); write_cmd(g, cmd2); write_cmd(g, cmd3); }
|
{ \
|
||||||
|
write_cmd(g, cmd1); \
|
||||||
|
write_cmd(g, cmd2); \
|
||||||
|
}
|
||||||
|
# define write_cmd3(g, cmd1, cmd2, cmd3) \
|
||||||
|
{ \
|
||||||
|
write_cmd(g, cmd1); \
|
||||||
|
write_cmd(g, cmd2); \
|
||||||
|
write_cmd(g, cmd3); \
|
||||||
|
}
|
||||||
|
|
||||||
// Some common routines and macros
|
// Some common routines and macros
|
||||||
# define delay(us) gfxSleepMicroseconds(us)
|
# define delay(us) gfxSleepMicroseconds(us)
|
||||||
@ -153,8 +160,7 @@ LLDSPEC void gdisp_lld_flush(GDisplay *g) {
|
|||||||
unsigned p;
|
unsigned p;
|
||||||
|
|
||||||
// Don't flush if we don't need it.
|
// Don't flush if we don't need it.
|
||||||
if (!(g->flags & GDISP_FLG_NEEDFLUSH))
|
if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return;
|
||||||
return;
|
|
||||||
|
|
||||||
acquire_bus(g);
|
acquire_bus(g);
|
||||||
enter_cmd_mode(g);
|
enter_cmd_mode(g);
|
||||||
@ -253,8 +259,7 @@ LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
|
|||||||
uint8_t *dst = &(RAM(g)[xyaddr(dstx, dsty)]);
|
uint8_t *dst = &(RAM(g)[xyaddr(dstx, dsty)]);
|
||||||
if (bitset) {
|
if (bitset) {
|
||||||
*dst |= xybit(dsty);
|
*dst |= xybit(dsty);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
*dst &= ~xybit(dsty);
|
*dst &= ~xybit(dsty);
|
||||||
}
|
}
|
||||||
dstx++;
|
dstx++;
|
||||||
@ -268,8 +273,7 @@ LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
|
|||||||
LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
||||||
switch (g->p.x) {
|
switch (g->p.x) {
|
||||||
case GDISP_CONTROL_POWER:
|
case GDISP_CONTROL_POWER:
|
||||||
if (g->g.Powermode == (powermode_t)g->p.ptr)
|
if (g->g.Powermode == (powermode_t)g->p.ptr) return;
|
||||||
return;
|
|
||||||
switch ((powermode_t)g->p.ptr) {
|
switch ((powermode_t)g->p.ptr) {
|
||||||
case powerOff:
|
case powerOff:
|
||||||
case powerSleep:
|
case powerSleep:
|
||||||
@ -294,8 +298,7 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case GDISP_CONTROL_ORIENTATION:
|
case GDISP_CONTROL_ORIENTATION:
|
||||||
if (g->g.Orientation == (orientation_t)g->p.ptr)
|
if (g->g.Orientation == (orientation_t)g->p.ptr) return;
|
||||||
return;
|
|
||||||
switch ((orientation_t)g->p.ptr) {
|
switch ((orientation_t)g->p.ptr) {
|
||||||
/* Rotation is handled by the drawing routines */
|
/* Rotation is handled by the drawing routines */
|
||||||
case GDISP_ROTATE_0:
|
case GDISP_ROTATE_0:
|
||||||
|
@ -5,7 +5,7 @@ extern keymap_config_t keymap_config;
|
|||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[0] = LAYOUT(
|
[0] = LAYOUT(
|
||||||
KC_ESC, XXXXXXX,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DELT,
|
KC_ESC, XXXXXXX,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
|
||||||
KC_ZKHK,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_JYEN,KC_BSPC,KC_BSPC,
|
KC_ZKHK,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_JYEN,KC_BSPC,KC_BSPC,
|
||||||
KC_TAB, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_ENT, KC_ENT,
|
KC_TAB, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_ENT, KC_ENT,
|
||||||
KC_CAPS,KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_BSLS,KC_ENT, KC_ENT,
|
KC_CAPS,KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_BSLS,KC_ENT, KC_ENT,
|
||||||
|
@ -6,22 +6,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TAB, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL ,
|
KC_TAB, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL ,
|
||||||
KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_QUOT, KC_ENT, KC_NO, KC_PGUP,
|
KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_QUOT, KC_ENT, KC_NO, KC_PGUP,
|
||||||
KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN,
|
KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN,
|
||||||
KC_LCTL, KC_LGUI, KC_NO, KC_LALT, FUNC(1), KC_SPC, KC_NO, KC_RALT, FUNC(2), KC_RGUI, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT,
|
KC_LCTL, KC_LGUI, KC_NO, KC_LALT, MO(1), KC_SPC, KC_NO, KC_RALT, MO(1), KC_RGUI, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT,
|
||||||
),
|
),
|
||||||
[1] = LAYOUT_grid( /* function */
|
[1] = LAYOUT_grid( /* function */
|
||||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_NO ,
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_NO ,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MPLY,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MPLY,
|
||||||
KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, FUNC(1), KC_TRNS, KC_NO, KC_TRNS, FUNC(2), KC_TRNS, KC_NO, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT,
|
KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, MO(1), KC_TRNS, KC_NO, KC_TRNS, MO(1), KC_TRNS, KC_NO, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT,
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
[1] = ACTION_LAYER_MOMENTARY(1),
|
|
||||||
[2] = ACTION_LAYER_MOMENTARY(1),
|
|
||||||
};
|
|
||||||
|
|
||||||
const macro_t * action_get_macro(keyrecord_t * record, uint8_t id, uint8_t opt) {
|
const macro_t * action_get_macro(keyrecord_t * record, uint8_t id, uint8_t opt) {
|
||||||
// MACRODOWN only works in this function
|
// MACRODOWN only works in this function
|
||||||
switch (id) {
|
switch (id) {
|
||||||
|
@ -45,11 +45,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
[1] = ACTION_LAYER_MOMENTARY(1),
|
|
||||||
[2] = ACTION_LAYER_MOMENTARY(1),
|
|
||||||
};
|
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
// MACRODOWN only works in this function
|
// MACRODOWN only works in this function
|
||||||
switch(id) {
|
switch(id) {
|
||||||
|
16
keyboards/atreus/astar/astar.c
Normal file
16
keyboards/atreus/astar/astar.c
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "atreus.h"
|
17
keyboards/atreus/astar/astar.h
Normal file
17
keyboards/atreus/astar/astar.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
40
keyboards/atreus/astar/config.h
Normal file
40
keyboards/atreus/astar/config.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { D0, D1, D3, D2 }
|
||||||
|
#if defined(PCBDOWN)
|
||||||
|
#define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 }
|
||||||
|
#else
|
||||||
|
#define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
|
||||||
|
#endif
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
58
keyboards/atreus/astar/rules.mk
Normal file
58
keyboards/atreus/astar/rules.mk
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# atmega32a bootloadHID
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
|
||||||
|
# If you don't know the bootloader type, then you can specify the
|
||||||
|
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
@ -1 +1,17 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "atreus.h"
|
#include "atreus.h"
|
@ -1,14 +1,34 @@
|
|||||||
#ifndef ATREUS_H
|
/* Copyright 2019
|
||||||
#define ATREUS_H
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
#include "matrix.h"
|
#define ___ KC_NO
|
||||||
#include "backlight.h"
|
|
||||||
#include <stddef.h>
|
#ifdef KEYBOARD_atreus_astar
|
||||||
|
#include "astar.h"
|
||||||
|
#elif KEYBOARD_atreus_teensy2
|
||||||
|
#include "teensy2.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// This a shortcut to help you visually see your layout.
|
// This a shortcut to help you visually see your layout.
|
||||||
// The first section contains all of the arguements
|
// The first section contains all of the arguments.
|
||||||
// The second converts the arguments into a two-dimensional array
|
// The second converts the arguments into a two-dimensional array.
|
||||||
|
// In the PCBDOWN case we need to swap the middle two keys: k35 and k36.
|
||||||
|
#if defined(PCBDOWN)
|
||||||
#define LAYOUT( \
|
#define LAYOUT( \
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
|
||||||
@ -18,8 +38,20 @@
|
|||||||
{ \
|
{ \
|
||||||
{ k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \
|
{ k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \
|
||||||
{ k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \
|
{ k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k36, k25, k26, k27, k28, k29 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b } \
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, ___, k05, k06, k07, k08, k09 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, ___, k15, k16, k17, k18, k19 }, \
|
||||||
{ k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \
|
{ k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \
|
||||||
{ k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \
|
{ k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,22 +1,20 @@
|
|||||||
/*
|
/* Copyright 2019
|
||||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
This program is free software: you can redistribute it and/or modify
|
* it under the terms of the GNU General Public License as published by
|
||||||
it under the terms of the GNU General Public License as published by
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
* (at your option) any later version.
|
||||||
(at your option) any later version.
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
This program is distributed in the hope that it will be useful,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
You should have received a copy of the GNU General Public License
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_H
|
#pragma once
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
@ -27,31 +25,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DEVICE_VER 0x0008
|
#define DEVICE_VER 0x0008
|
||||||
#define MANUFACTURER Technomancy
|
#define MANUFACTURER Technomancy
|
||||||
#define PRODUCT Atreus
|
#define PRODUCT Atreus
|
||||||
#define DESCRIPTION q.m.k. keyboard firmware for Atreus
|
#define DESCRIPTION QMK keyboard firmware for Atreus
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 4
|
#define MATRIX_ROWS 4
|
||||||
#define MATRIX_COLS 11
|
#define MATRIX_COLS 11
|
||||||
|
|
||||||
// Change this to how you wired your keyboard
|
|
||||||
// COLS: Left to right, ROWS: Top to bottom
|
|
||||||
#if defined(ATREUS_ASTAR)
|
|
||||||
# define MATRIX_ROW_PINS { D0, D1, D3, D2 }
|
|
||||||
#if defined(PCBDOWN)
|
|
||||||
# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 }
|
|
||||||
#else
|
|
||||||
# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
|
|
||||||
#endif
|
|
||||||
# define UNUSED_PINS
|
|
||||||
#elif defined(ATREUS_TEENSY2)
|
|
||||||
# define MATRIX_ROW_PINS { D0, D1, D2, D3 }
|
|
||||||
# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 }
|
|
||||||
# define UNUSED_PINS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
@ -83,5 +62,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
//#define NO_ACTION_ONESHOT
|
//#define NO_ACTION_ONESHOT
|
||||||
//#define NO_ACTION_MACRO
|
//#define NO_ACTION_MACRO
|
||||||
//#define NO_ACTION_FUNCTION
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,75 +1,3 @@
|
|||||||
/*
|
#pragma once
|
||||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
// place overrides here
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_H
|
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
|
||||||
|
|
||||||
#define VENDOR_ID 0xFEED
|
|
||||||
#define PRODUCT_ID 0x6060
|
|
||||||
#define DEVICE_VER 0x0001
|
|
||||||
#define MANUFACTURER Arbitrary Definitions
|
|
||||||
#define PRODUCT Planckeus
|
|
||||||
#define DESCRIPTION q.m.k. keyboard firmware for Planckeus
|
|
||||||
|
|
||||||
/* key matrix size */
|
|
||||||
#define MATRIX_ROWS 4
|
|
||||||
#define MATRIX_COLS 11
|
|
||||||
|
|
||||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3 }
|
|
||||||
#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, F7, B0, B1, B2, B3, B7 }
|
|
||||||
#define UNUSED_PINS
|
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
|
||||||
//#define MATRIX_HAS_GHOST
|
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
//#define BACKLIGHT_LEVELS 3
|
|
||||||
|
|
||||||
/* Set 0 if debouncing isn't needed */
|
|
||||||
#define DEBOUNCE 5
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
|
||||||
/* Locking resynchronize hack */
|
|
||||||
#define LOCKING_RESYNC_ENABLE
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Feature disable options
|
|
||||||
* These options are also useful to firmware size reduction.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* disable debug print */
|
|
||||||
//#define NO_DEBUG
|
|
||||||
|
|
||||||
/* disable print */
|
|
||||||
//#define NO_PRINT
|
|
||||||
|
|
||||||
/* disable action features */
|
|
||||||
//#define NO_ACTION_LAYER
|
|
||||||
//#define NO_ACTION_TAPPING
|
|
||||||
//#define NO_ACTION_ONESHOT
|
|
||||||
//#define NO_ACTION_MACRO
|
|
||||||
//#define NO_ACTION_FUNCTION
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_LW] = LAYOUT( /* [> LOWER <] */
|
[_LW] = LAYOUT( /* [> LOWER <] */
|
||||||
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
||||||
KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
|
KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
||||||
KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET
|
KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET
|
||||||
),
|
),
|
||||||
|
@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[_LW] = LAYOUT( /* [> LOWER <] */
|
[_LW] = LAYOUT( /* [> LOWER <] */
|
||||||
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
||||||
KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
|
KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
|
||||||
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
||||||
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS )
|
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS )
|
||||||
};
|
};
|
||||||
|
@ -1,24 +1,6 @@
|
|||||||
/*
|
#pragma once
|
||||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
// place overrides here
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_H
|
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
|
||||||
|
|
||||||
// mouse speed
|
// mouse speed
|
||||||
|
|
||||||
@ -31,69 +13,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MOUSEKEY_WHEEL_DELTA 1
|
#define MOUSEKEY_WHEEL_DELTA 1
|
||||||
#define MOUSEKEY_WHEEL_MAX_SPEED 1
|
#define MOUSEKEY_WHEEL_MAX_SPEED 1
|
||||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 100
|
#define MOUSEKEY_WHEEL_TIME_TO_MAX 100
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
|
||||||
|
|
||||||
#define VENDOR_ID 0xFEED
|
|
||||||
#define PRODUCT_ID 0x6060
|
|
||||||
#define DEVICE_VER 0x0001
|
|
||||||
#define MANUFACTURER Technomancy
|
|
||||||
#define PRODUCT Atreus
|
|
||||||
#define DESCRIPTION q.m.k. keyboard firmware for Atreus
|
|
||||||
|
|
||||||
/* key matrix size */
|
|
||||||
#define MATRIX_ROWS 4
|
|
||||||
#define MATRIX_COLS 11
|
|
||||||
|
|
||||||
// Change this to how you wired your keyboard
|
|
||||||
// COLS: Left to right, ROWS: Top to bottom
|
|
||||||
#if defined(ATREUS_ASTAR)
|
|
||||||
# define MATRIX_ROW_PINS { D0, D1, D3, D2 }
|
|
||||||
#if defined(PCBDOWN)
|
|
||||||
# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 }
|
|
||||||
#else
|
|
||||||
# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
|
|
||||||
#endif
|
|
||||||
# define UNUSED_PINS
|
|
||||||
#elif defined(ATREUS_TEENSY2)
|
|
||||||
# define MATRIX_ROW_PINS { D0, D1, D2, D3 }
|
|
||||||
# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 }
|
|
||||||
# define UNUSED_PINS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
|
||||||
//#define MATRIX_HAS_GHOST
|
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
//#define BACKLIGHT_LEVELS 3
|
|
||||||
|
|
||||||
/* Set 0 if debouncing isn't needed */
|
|
||||||
#define DEBOUNCE 5
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
|
||||||
/* Locking resynchronize hack */
|
|
||||||
#define LOCKING_RESYNC_ENABLE
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Feature disable options
|
|
||||||
* These options are also useful to firmware size reduction.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* disable debug print */
|
|
||||||
//#define NO_DEBUG
|
|
||||||
|
|
||||||
/* disable print */
|
|
||||||
//#define NO_PRINT
|
|
||||||
|
|
||||||
/* disable action features */
|
|
||||||
//#define NO_ACTION_LAYER
|
|
||||||
//#define NO_ACTION_TAPPING
|
|
||||||
//#define NO_ACTION_ONESHOT
|
|
||||||
//#define NO_ACTION_MACRO
|
|
||||||
//#define NO_ACTION_FUNCTION
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,90 +1,6 @@
|
|||||||
/*
|
#pragma once
|
||||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
// place overrides here
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CONFIG_H
|
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
|
||||||
|
|
||||||
/* Make Overloaded Keys switch faster */
|
/* Make Overloaded Keys switch faster */
|
||||||
#define TAPPING_TERM 150
|
#define TAPPING_TERM 150
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
|
||||||
|
|
||||||
#define VENDOR_ID 0xFEED
|
|
||||||
#define PRODUCT_ID 0x6060
|
|
||||||
#define DEVICE_VER 0x0001
|
|
||||||
#define MANUFACTURER Technomancy
|
|
||||||
#define PRODUCT Atreus
|
|
||||||
#define DESCRIPTION q.m.k. keyboard firmware for Atreus
|
|
||||||
|
|
||||||
/* key matrix size */
|
|
||||||
#define MATRIX_ROWS 4
|
|
||||||
#define MATRIX_COLS 11
|
|
||||||
|
|
||||||
// Change this to how you wired your keyboard
|
|
||||||
// COLS: Left to right, ROWS: Top to bottom
|
|
||||||
#if defined(ATREUS_ASTAR)
|
|
||||||
# define MATRIX_ROW_PINS { D0, D1, D3, D2 }
|
|
||||||
#if defined(PCBDOWN)
|
|
||||||
# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 }
|
|
||||||
#else
|
|
||||||
# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
|
|
||||||
#endif
|
|
||||||
# define UNUSED_PINS
|
|
||||||
#elif defined(ATREUS_TEENSY2)
|
|
||||||
# define MATRIX_ROW_PINS { D0, D1, D2, D3 }
|
|
||||||
# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 }
|
|
||||||
# define UNUSED_PINS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
|
||||||
//#define MATRIX_HAS_GHOST
|
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
//#define BACKLIGHT_LEVELS 3
|
|
||||||
|
|
||||||
/* Set 0 if debouncing isn't needed */
|
|
||||||
#define DEBOUNCE 5
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
|
||||||
/* Locking resynchronize hack */
|
|
||||||
#define LOCKING_RESYNC_ENABLE
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Feature disable options
|
|
||||||
* These options are also useful to firmware size reduction.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* disable debug print */
|
|
||||||
//#define NO_DEBUG
|
|
||||||
|
|
||||||
/* disable print */
|
|
||||||
//#define NO_PRINT
|
|
||||||
|
|
||||||
/* disable action features */
|
|
||||||
//#define NO_ACTION_LAYER
|
|
||||||
//#define NO_ACTION_TAPPING
|
|
||||||
//#define NO_ACTION_ONESHOT
|
|
||||||
//#define NO_ACTION_MACRO
|
|
||||||
//#define NO_ACTION_FUNCTION
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,
|
KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,
|
||||||
KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN ,
|
KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN ,
|
||||||
SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT),
|
SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT),
|
||||||
KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS
|
KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, MO(NUMS),KC_RALT, KC_SLSH, KC_BSLS
|
||||||
),
|
),
|
||||||
|
|
||||||
[NUMS] = LAYOUT( /* Numbers / Arrows / Symbols */
|
[NUMS] = LAYOUT( /* Numbers / Arrows / Symbols */
|
||||||
@ -39,7 +39,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
// so that I can get out of mouse mode just by tapping/holding my base layer FN key.
|
// so that I can get out of mouse mode just by tapping/holding my base layer FN key.
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
[BASE] = ACTION_LAYER_OFF(2, 1), // switch back to layer 0
|
[BASE] = ACTION_LAYER_OFF(2, 1), // switch back to layer 0
|
||||||
[NUMS] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay
|
|
||||||
[MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2
|
[MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS
|
||||||
),
|
),
|
||||||
[CURS] = LAYOUT(
|
[CURS] = LAYOUT(
|
||||||
KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS,
|
KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_PGUP, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS,
|
||||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS,
|
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS,
|
||||||
KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_COPY, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_COPY, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[_LW] = LAYOUT( /* [> LOWER <] */
|
[_LW] = LAYOUT( /* [> LOWER <] */
|
||||||
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
||||||
KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
|
KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
|
||||||
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
||||||
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS )
|
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS )
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[_LW] = LAYOUT( /* [> LOWER <] */
|
[_LW] = LAYOUT( /* [> LOWER <] */
|
||||||
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
||||||
KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
|
KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
|
||||||
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_TILD, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_TILD, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
||||||
KC_NO, KC_VOLD, _______, _______, KC_MNXT, _______, _______, _______, TO(_QW), KC_PSCR, KC_SLCK, KC_MPLY
|
KC_NO, KC_VOLD, _______, _______, KC_MNXT, _______, _______, _______, TO(_QW), KC_PSCR, KC_SLCK, KC_MPLY
|
||||||
)
|
)
|
||||||
|
33
keyboards/atreus/keymaps/workman/README.md
Normal file
33
keyboards/atreus/keymaps/workman/README.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
Workman for Atreus
|
||||||
|
==================
|
||||||
|
|
||||||
|
This is the Workman layout for Atreus. You can get PDF and SVG files
|
||||||
|
for the keymap from the author's
|
||||||
|
[website](https://alexschroeder.ch/pdfs/workman/).
|
||||||
|
|
||||||
|
```
|
||||||
|
q d r w b || j f u p ;
|
||||||
|
a s h t g || y n e o i
|
||||||
|
z x m c v || k l , . /
|
||||||
|
esc tab super shift bksp ctrl || alt space RS LW ' ret
|
||||||
|
|
||||||
|
|
||||||
|
Raised layer (RS)
|
||||||
|
|
||||||
|
! @ { } | || - 7 8 9 *
|
||||||
|
# $ ( ) ` || . 4 5 6 +
|
||||||
|
% ^ [ ] ~ || & 1 2 3 \
|
||||||
|
menu caps < > del || _ 0 =
|
||||||
|
|
||||||
|
|
||||||
|
Lower layer (LW)
|
||||||
|
|
||||||
|
insert home up end pgup || vol+ F7 F8 F9 F10
|
||||||
|
del left down right pgdn || vol- F4 F5 F6 F11
|
||||||
|
|| mute F1 F2 F3 F12
|
||||||
|
|| – ¨ reset
|
||||||
|
```
|
||||||
|
|
||||||
|
A note on the EN DASH and DIARESIS mappings on the lower layer: these
|
||||||
|
only work if you set up CAPS as your *Multi Key* because they
|
||||||
|
effectively send `<CAPS> - - .` and `<CAPS> "`, respectively.
|
3
keyboards/atreus/keymaps/workman/config.h
Normal file
3
keyboards/atreus/keymaps/workman/config.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define TAPPING_TOGGLE 1
|
||||||
|
#define ONESHOT_TAP_TOGGLE 1
|
||||||
|
#define PCBDOWN 1
|
76
keyboards/atreus/keymaps/workman/keymap.c
Normal file
76
keyboards/atreus/keymaps/workman/keymap.c
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QW 0
|
||||||
|
#define _RS 1
|
||||||
|
#define _LW 2
|
||||||
|
|
||||||
|
#define OSM_SFT OSM(MOD_LSFT)
|
||||||
|
|
||||||
|
/* In your system, make sure Caps Lock acts as the Compose Key, also known as the Multi Key. If so, then the quote on
|
||||||
|
* the lower layer acts as macro to enter ¨ */
|
||||||
|
enum custom_keycodes {
|
||||||
|
DIAERESIS = SAFE_RANGE,
|
||||||
|
EN_DASH
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Basic layer (L0)
|
||||||
|
* q d r w b || j f u p ;
|
||||||
|
* a s h t g || y n e o i
|
||||||
|
* z x m c v || k l , . /
|
||||||
|
* esc tab super shift bksp ctrl || alt space RS LW ' ret
|
||||||
|
*/
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QW] = LAYOUT( /* Workman */
|
||||||
|
KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN,
|
||||||
|
KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I,
|
||||||
|
KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH,
|
||||||
|
KC_ESC, KC_TAB, KC_LGUI, OSM_SFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), MO(_LW), KC_QUOT, KC_ENT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raised layer (RS)
|
||||||
|
* ! @ { } | || - 7 8 9 *
|
||||||
|
* # $ ( ) ` || . 4 5 6 +
|
||||||
|
* % ^ [ ] ~ || & 1 2 3 \
|
||||||
|
* menu caps < > del || _ 0 =
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_RS] = LAYOUT( /* [> RAISE <] */
|
||||||
|
KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_MINS, KC_7, KC_8, KC_9, KC_ASTR,
|
||||||
|
KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOT, KC_4, KC_5, KC_6, KC_PLUS,
|
||||||
|
KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS,
|
||||||
|
KC_MENU, KC_CAPS, KC_LT, KC_GT, KC_DEL, KC_TRNS, KC_TRNS, KC_UNDS, KC_TRNS, KC_TRNS, KC_0, KC_EQL ),
|
||||||
|
|
||||||
|
/* Lower layer (LW)
|
||||||
|
* insert home up end pgup || vol+ F7 F8 F9 F10
|
||||||
|
* del left down right pgdn || vol- F4 F5 F6 F11
|
||||||
|
* || mute F1 F2 F3 F12
|
||||||
|
* || – ¨ reset
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_LW] = LAYOUT( /* [> LOWER <] */
|
||||||
|
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||||
|
KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_F11,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_F12,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EN_DASH, KC_TRNS, KC_TRNS, DIAERESIS, RESET )
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
switch(keycode) {
|
||||||
|
case DIAERESIS:
|
||||||
|
// assuming KC_CAPS is your Multi Key
|
||||||
|
SEND_STRING(SS_TAP(X_CAPSLOCK)"\"");
|
||||||
|
return false;
|
||||||
|
case EN_DASH:
|
||||||
|
// assuming KC_CAPS is your Multi Key
|
||||||
|
SEND_STRING(SS_TAP(X_CAPSLOCK)"--.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
@ -1,5 +1,6 @@
|
|||||||
Atreus
|
# Atreus
|
||||||
======
|
|
||||||
|

|
||||||
|
|
||||||
A small mechanical keyboard that is based around the shape of the human hand.
|
A small mechanical keyboard that is based around the shape of the human hand.
|
||||||
|
|
||||||
@ -9,16 +10,19 @@ Hardware Availability: https://atreus.technomancy.us
|
|||||||
|
|
||||||
These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2 (usually hand-wired), one powered by an A-Star (usually using a PCB). You will need to use different `make` commands depending on the variant you have; see examples below.
|
These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2 (usually hand-wired), one powered by an A-Star (usually using a PCB). You will need to use different `make` commands depending on the variant you have; see examples below.
|
||||||
|
|
||||||
A-Star:\
|
Make example for this keyboard (after setting up your build environment):
|
||||||
`make atreus:default:avrdude`
|
|
||||||
|
|
||||||
Teensy:\
|
make atreus:default:avrdude
|
||||||
`make TEENSY2=yes atreus:default:teensy`
|
|
||||||
|
If you would like to use one of the alternative controllers:
|
||||||
|
|
||||||
|
make atreus/astar:default:avrdude
|
||||||
|
make atreus/teensy2:default:teensy
|
||||||
|
|
||||||
If your keyboard layout is a mirror image of what you expected (i.e. you do not get QWERTY on the left but YTREWQ on the right), then you have an A-Star powered Atreus (older than March 2016) with PCB labels facing *down* instead of up. Specify that by adding `PCBDOWN=yes` to your `make` commands, e.g.
|
If your keyboard layout is a mirror image of what you expected (i.e. you do not get QWERTY on the left but YTREWQ on the right), then you have an A-Star powered Atreus (older than March 2016) with PCB labels facing *down* instead of up. Specify that by adding `PCBDOWN=yes` to your `make` commands, e.g.
|
||||||
|
|
||||||
`make PCBDOWN=yes atreus:default:avrdude`
|
make PCBDOWN=yes atreus:default:avrdude
|
||||||
|
|
||||||
*Unlike the TMK firmware, these commands should be run from the root of the repository, not the directory containing this readme.*
|
*Unlike the TMK firmware, these commands should be run from the root of the repository, not the directory containing this readme.*
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools), then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
@ -1,71 +1,3 @@
|
|||||||
# MCU name
|
|
||||||
MCU = atmega32u4
|
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Bootloader selection
|
|
||||||
# Teensy halfkay
|
|
||||||
# Pro Micro caterina
|
|
||||||
# Atmel DFU atmel-dfu
|
|
||||||
# LUFA DFU lufa-dfu
|
|
||||||
# QMK DFU qmk-dfu
|
|
||||||
# atmega32a bootloadHID
|
|
||||||
ifdef TEENSY2
|
|
||||||
BOOTLOADER = halfkay
|
|
||||||
OPT_DEFS += -DATREUS_TEENSY2
|
|
||||||
else
|
|
||||||
BOOTLOADER = caterina
|
|
||||||
OPT_DEFS += -DATREUS_ASTAR
|
|
||||||
ifdef PCBDOWN
|
|
||||||
OPT_DEFS += -DPCBDOWN
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# If you don't know the bootloader type, then you can specify the
|
|
||||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
@ -86,3 +18,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
|
|
||||||
|
DEFAULT_FOLDER = atreus/astar
|
||||||
|
36
keyboards/atreus/teensy2/config.h
Normal file
36
keyboards/atreus/teensy2/config.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { D0, D1, D2, D3 }
|
||||||
|
#define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
58
keyboards/atreus/teensy2/rules.mk
Normal file
58
keyboards/atreus/teensy2/rules.mk
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# atmega32a bootloadHID
|
||||||
|
BOOTLOADER = halfkay
|
||||||
|
|
||||||
|
|
||||||
|
# If you don't know the bootloader type, then you can specify the
|
||||||
|
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
16
keyboards/atreus/teensy2/teensy2.c
Normal file
16
keyboards/atreus/teensy2/teensy2.c
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "atreus.h"
|
17
keyboards/atreus/teensy2/teensy2.h
Normal file
17
keyboards/atreus/teensy2/teensy2.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
@ -8,13 +8,16 @@
|
|||||||
#define BDO 4
|
#define BDO 4
|
||||||
#define RESETL 5
|
#define RESETL 5
|
||||||
|
|
||||||
|
#define KC_RAIS MO(RAISE)
|
||||||
|
#define KC_LOWR MO(LOWER)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[DVORAK] = LAYOUT_kc(
|
[DVORAK] = LAYOUT_kc(
|
||||||
NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
|
NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
|
||||||
NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \
|
NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \
|
||||||
NO, A, O, E, U, I, D, H, T, N, S, NO, \
|
NO, A, O, E, U, I, D, H, T, N, S, NO, \
|
||||||
NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \
|
NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \
|
||||||
NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO
|
NO, FN2, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO
|
||||||
),
|
),
|
||||||
|
|
||||||
[QWERTY] = LAYOUT_kc(
|
[QWERTY] = LAYOUT_kc(
|
||||||
@ -22,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
NO, Q, W, E, R, T, Y, U, I, O, P, NO, \
|
NO, Q, W, E, R, T, Y, U, I, O, P, NO, \
|
||||||
NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \
|
NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \
|
||||||
NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \
|
NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \
|
||||||
NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO
|
NO, FN2, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO
|
||||||
),
|
),
|
||||||
|
|
||||||
[RAISE] = LAYOUT_kc(
|
[RAISE] = LAYOUT_kc(
|
||||||
@ -59,8 +62,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
[0] = ACTION_LAYER_MOMENTARY(RAISE), // Raise layer
|
|
||||||
[1] = ACTION_LAYER_MOMENTARY(LOWER), // Lower layer
|
|
||||||
[2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer
|
[2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer
|
||||||
[3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer
|
[3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer
|
||||||
};
|
};
|
||||||
|
@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC ,
|
KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC ,
|
||||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT ,
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT ,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LBRC ,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LBRC ,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, MO(_NAV),KC_BSPC, KC_DELT, KC_ENT, KC_SPC, KC_EQL, KC_MINS, KC_QUOT, KC_ENT, KC_RGUI
|
KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, MO(_NAV),KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_EQL, KC_MINS, KC_QUOT, KC_ENT, KC_RGUI
|
||||||
),
|
),
|
||||||
|
|
||||||
[_NAV] = LAYOUT(
|
[_NAV] = LAYOUT(
|
||||||
|
@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KN_AO,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KN_AO,
|
||||||
OSM_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KN_OE, KN_AE,
|
OSM_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KN_OE, KN_AE,
|
||||||
OSM_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KN_MINS, OSM_LSFT,
|
OSM_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KN_MINS, OSM_LSFT,
|
||||||
MO(NAV), OSM_LCTL, OSM_LALT, KC_LGUI, MO(SYM), KC_BSPC, KC_DELT, KC_ENT, KC_SPC, MO(SYM), KC_LEAD, KC_LALT, KC_LCTRL, KC_HYP
|
MO(NAV), OSM_LCTL, OSM_LALT, KC_LGUI, MO(SYM), KC_BSPC, KC_DEL, KC_ENT, KC_SPC, MO(SYM), KC_LEAD, KC_LALT, KC_LCTRL, KC_HYP
|
||||||
),
|
),
|
||||||
|
|
||||||
[NAV] = LAYOUT(
|
[NAV] = LAYOUT(
|
||||||
|
@ -10,14 +10,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
),
|
),
|
||||||
/* LOWER */
|
/* LOWER */
|
||||||
[1] = LAYOUT( \
|
[1] = LAYOUT( \
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT, \
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
|
||||||
KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_ENT, \
|
KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_ENT, \
|
||||||
KC_CAPS, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGUP, KC_RSFT, \
|
KC_CAPS, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGUP, KC_RSFT, \
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_END, KC_PGDN, KC_EXLM \
|
KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_END, KC_PGDN, KC_EXLM \
|
||||||
),
|
),
|
||||||
/* RAISE */
|
/* RAISE */
|
||||||
[2] = LAYOUT( \
|
[2] = LAYOUT( \
|
||||||
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT, \
|
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
|
||||||
KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_ENT, \
|
KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_ENT, \
|
||||||
KC_CAPS, KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_UP, KC_RSFT, \
|
KC_CAPS, KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_UP, KC_RSFT, \
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT \
|
KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
|
@ -23,12 +23,10 @@ enum custom_macros {
|
|||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
[0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space,
|
[0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space,
|
||||||
[1] = ACTION_LAYER_MOMENTARY(_MOUSE) //Hold for momentary MOUSE
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SPC_LW FUNC(0)
|
#define SPC_LW FUNC(0)
|
||||||
#define MSE FUNC(1)
|
#define MSE MO(_MOUSE)
|
||||||
#define PIPE M(R_PIPE)
|
#define PIPE M(R_PIPE)
|
||||||
#define POINT M(R_POINT)
|
#define POINT M(R_POINT)
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user