diff options
author | Takeshi ISHII <2170248+mtei@users.noreply.github.com> | 2019-08-22 09:10:47 +0900 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-08-21 17:10:47 -0700 |
commit | 1c5b0cbbeb049b1ce3fb2da6a81fbf83dd9a3ea7 (patch) | |
tree | daeafd91c08b5631e6e4429fbbd8f895b2855a86 /quantum/config_common.h | |
parent | b62e160a8950f451b08f1fee0109e60a58c5ddaa (diff) | |
download | qmk_firmware-1c5b0cbbeb049b1ce3fb2da6a81fbf83dd9a3ea7.tar.gz qmk_firmware-1c5b0cbbeb049b1ce3fb2da6a81fbf83dd9a3ea7.zip |
AVR GPIO macro defines more readable (#5937)
* A little easier to read the definition of the GPIO control macro for AVR.
No change in build result.
* Changed to not use GNU statement expression extension.
No change in build result.
* Modified split_common/serial.c to use qmk_firmware standard GPIO control macro.
No change in build result.
* fix PE6 -> E6
* remove some space
* add some comment to config_common.h
* Changed split_common/serial.c to use a newer version of qmk_firmware standard GPIO control macro.
Diffstat (limited to 'quantum/config_common.h')
-rw-r--r-- | quantum/config_common.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/quantum/config_common.h b/quantum/config_common.h index bc4d9ec1a..ae72701da 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h | |||
@@ -132,6 +132,16 @@ | |||
132 | #define F7 PINDEF(F, 7) | 132 | #define F7 PINDEF(F, 7) |
133 | #endif | 133 | #endif |
134 | 134 | ||
135 | #ifndef __ASSEMBLER__ | ||
136 | #define _PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + (p >> PORT_SHIFTER) + offset) | ||
137 | // Port X Input Pins Address | ||
138 | #define PINx_ADDRESS(p) _PIN_ADDRESS(p, 0) | ||
139 | // Port X Data Direction Register, 0:input 1:output | ||
140 | #define DDRx_ADDRESS(p) _PIN_ADDRESS(p, 1) | ||
141 | // Port X Data Register | ||
142 | #define PORTx_ADDRESS(p) _PIN_ADDRESS(p, 2) | ||
143 | #endif | ||
144 | |||
135 | #elif defined(PROTOCOL_CHIBIOS) | 145 | #elif defined(PROTOCOL_CHIBIOS) |
136 | // Defines mapping for Proton C replacement | 146 | // Defines mapping for Proton C replacement |
137 | #ifdef CONVERT_TO_PROTON_C | 147 | #ifdef CONVERT_TO_PROTON_C |