diff options
author | yiancar <yiangosyiangou@cytanet.com.cy> | 2020-11-02 19:09:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 06:09:48 +1100 |
commit | 4b839db3841f001f78291373b2b6c3eca34582ed (patch) | |
tree | bba345e493bad7ceda76222402cf5bc0f8b4f09b | |
parent | e041ec1655f49ce756a2949a367f8ae7c92a9635 (diff) | |
download | qmk_firmware-4b839db3841f001f78291373b2b6c3eca34582ed.tar.gz qmk_firmware-4b839db3841f001f78291373b2b6c3eca34582ed.zip |
NK65 eeprom compatibility with 128KB and 256KB (#10804)
* NK65 define hack for 128kb 256kb versions of F303
* Updated to chibios define
-rwxr-xr-x | keyboards/nk65/config.h | 11 | ||||
-rwxr-xr-x | keyboards/nk65/nk65.c | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index 826e54180..f9845f678 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h | |||
@@ -144,3 +144,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
144 | 144 | ||
145 | // VIA lighting is handled by the keyboard-level code | 145 | // VIA lighting is handled by the keyboard-level code |
146 | #define VIA_CUSTOM_LIGHTING_ENABLE | 146 | #define VIA_CUSTOM_LIGHTING_ENABLE |
147 | |||
148 | /* Custom EEPROM start addressing. This is to support | ||
149 | * both 128kb and 256kb versions of F303. | ||
150 | * Register 0x1FFFF7CC holds the size of the flash memory. | ||
151 | */ | ||
152 | #define EEPROM_START_ADDRESS | ||
153 | #define FEE_MCU_FLASH_SIZE \ | ||
154 | ({ \ | ||
155 | uint16_t (*flash_size) = (uint16_t*)FLASHSIZE_BASE; \ | ||
156 | *flash_size; \ | ||
157 | }) | ||
diff --git a/keyboards/nk65/nk65.c b/keyboards/nk65/nk65.c index 972373e1b..fae30ac75 100755 --- a/keyboards/nk65/nk65.c +++ b/keyboards/nk65/nk65.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include "nk65.h" | 20 | #include "nk65.h" |
21 | #include "drivers/issi/is31fl3733.h" | 21 | #include "drivers/issi/is31fl3733.h" |
22 | 22 | ||
23 | /* Indicator LEDS are part of the LED driver | 23 | /* Indicator LEDS are part of the LED driver |
24 | * Top LED is blue only. LED driver 2 RGB 7 Green channel | 24 | * Top LED is blue only. LED driver 2 RGB 7 Green channel |
25 | * Middle LED is blue and red. LED driver 2 RGB 6 Red and Blue channel | 25 | * Middle LED is blue and red. LED driver 2 RGB 6 Red and Blue channel |
26 | * Bottom LED is red only LED driver 2 RGB 6 Green channel. | 26 | * Bottom LED is red only LED driver 2 RGB 6 Green channel. |
@@ -48,7 +48,7 @@ __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { | |||
48 | if (state & (1UL << 2)) { | 48 | if (state & (1UL << 2)) { |
49 | G = 255; | 49 | G = 255; |
50 | } | 50 | } |
51 | 51 | ||
52 | IS31FL3733_set_color( 6+64-1, R, G, B ); | 52 | IS31FL3733_set_color( 6+64-1, R, G, B ); |
53 | return state; | 53 | return state; |
54 | } | 54 | } |