#---------------------------------------------------------------------------- | |||||
# On command line: | |||||
# | |||||
# make all = Make software. | |||||
# | |||||
# make clean = Clean out built project files. | |||||
# | |||||
# make coff = Convert ELF to AVR COFF. | |||||
# | |||||
# make extcoff = Convert ELF to AVR Extended COFF. | |||||
# | |||||
# make program = Download the hex file to the device. | |||||
# Please customize your programmer settings(PROGRAM_CMD) | |||||
# | |||||
# make teensy = Download the hex file to the device, using teensy_loader_cli. | |||||
# (must have teensy_loader_cli installed). | |||||
# | |||||
# make dfu = Download the hex file to the device, using dfu-programmer (must | |||||
# have dfu-programmer installed). | |||||
# | |||||
# make flip = Download the hex file to the device, using Atmel FLIP (must | |||||
# have Atmel FLIP installed). | |||||
# | |||||
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer | |||||
# (must have dfu-programmer installed). | |||||
# | |||||
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP | |||||
# (must have Atmel FLIP installed). | |||||
# | |||||
# make debug = Start either simulavr or avarice as specified for debugging, | |||||
# with avr-gdb or avr-insight as the front end for debugging. | |||||
# | |||||
# make filename.s = Just compile filename.c into the assembler code only. | |||||
# | |||||
# make filename.i = Create a preprocessed source file for use in submitting | |||||
# bug reports to the GCC project. | |||||
# | |||||
# To rebuild project do "make clean" then "make all". | |||||
#---------------------------------------------------------------------------- | |||||
# Target file name (without extension). | # Target file name (without extension). | ||||
TARGET = alps64 | |||||
TARGET ?= alps64 | |||||
# Directory common source filess exist | # Directory common source filess exist | ||||
TMK_DIR = ../../tmk_core | |||||
TMK_DIR ?= ../../tmk_core | |||||
# Directory keyboard dependent files exist | # Directory keyboard dependent files exist | ||||
TARGET_DIR = . | |||||
TARGET_DIR ?= . | |||||
# project specific files | # project specific files | ||||
SRC = matrix.c \ | |||||
SRC ?= matrix.c \ | |||||
led.c | led.c | ||||
CONFIG_H = config.h | |||||
CONFIG_H ?= config.h | |||||
# MCU name | # MCU name | ||||
MCU = atmega32u2 | |||||
MCU ?= atmega32u2 | |||||
# Processor frequency. | # Processor frequency. | ||||
# This will define a symbol, F_CPU, in all source code files equal to the | # This will define a symbol, F_CPU, in all source code files equal to the | ||||
# does not *change* the processor frequency - it should merely be updated to | # 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 | # reflect the processor speed set externally so that the code can use accurate | ||||
# software delays. | # software delays. | ||||
F_CPU = 16000000 | |||||
F_CPU ?= 16000000 | |||||
# | # | ||||
# LUFA specific | # LUFA specific | ||||
# | # | ||||
# Target architecture (see library "Board Types" documentation). | # Target architecture (see library "Board Types" documentation). | ||||
ARCH = AVR8 | |||||
ARCH ?= AVR8 | |||||
# Input clock frequency. | # Input clock frequency. | ||||
# This will define a symbol, F_USB, in all source code files equal to the | # This will define a symbol, F_USB, in all source code files equal to the | ||||
# | # | ||||
# If no clock division is performed on the input clock inside the AVR (via the | # 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. | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||||
F_USB = $(F_CPU) | |||||
F_USB ?= $(F_CPU) | |||||
# Interrupt driven control endpoint task(+60) | # Interrupt driven control endpoint task(+60) | ||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||||
# Atmel DFU loader 4096 | # Atmel DFU loader 4096 | ||||
# LUFA bootloader 4096 | # LUFA bootloader 4096 | ||||
# USBaspLoader 2048 | # USBaspLoader 2048 | ||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096 | |||||
BOOTLOADER_SIZE ?= 4096 | |||||
OPT_DEFS += -DBOOTLOADER_SIZE=$(BOOTLOADER_SIZE) | |||||
# Build Options | # Build Options | ||||
# comment out to disable the options. | # comment out to disable the options. | ||||
# | # | ||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | |||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | |||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||||
CONSOLE_ENABLE = yes # Console for debug(+400) | |||||
COMMAND_ENABLE = yes # Commands for debug and configuration | |||||
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | |||||
#NKRO_ENABLE = yes # USB Nkey Rollover | |||||
#ACTIONMAP_ENABLE = yes # Use 16bit action codes in keymap instead of 8bit keycodes | |||||
ifdef ACTIONMAP_ENABLE | |||||
KEYMAP_FILE = actionmap | |||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) | |||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | |||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | |||||
CONSOLE_ENABLE ?= yes # Console for debug(+400) | |||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration | |||||
#SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend | |||||
#NKRO_ENABLE ?= yes # USB Nkey Rollover | |||||
#ACTIONMAP_ENABLE ?= yes # Use 16bit action codes in keymap instead of 8bit keycodes | |||||
# | |||||
# Keymap file | |||||
# | |||||
ifeq (yes,$(strip $(UNIMAP_ENABLE))) | |||||
KEYMAP_FILE = unimap | |||||
else | else | ||||
KEYMAP_FILE = keymap | |||||
ifeq (yes,$(strip $(ACTIONMAP_ENABLE))) | |||||
KEYMAP_FILE = actionmap | |||||
else | |||||
KEYMAP_FILE = keymap | |||||
endif | |||||
endif | endif | ||||
ifdef KEYMAP | ifdef KEYMAP | ||||
SRC := $(KEYMAP_FILE)_$(KEYMAP).c $(SRC) | SRC := $(KEYMAP_FILE)_$(KEYMAP).c $(SRC) |
TARGET = alps64_actionmap | |||||
ACTIONMAP_ENABLE = yes # Use 16bit action codes in keymap instead of 8bit keycodes | |||||
include Makefile |
# build firmware for keymap editor | |||||
# | |||||
TARGET = alps64_editor | |||||
KEYMAP_SECTION_ENABLE = yes # fixed address keymap for keymap editor | KEYMAP_SECTION_ENABLE = yes # fixed address keymap for keymap editor | ||||
KEYMAP = editor | KEYMAP = editor | ||||
include Makefile | include Makefile |
TARGET = alps64_unimap | |||||
UNIMAP_ENABLE = yes | |||||
KEYMAP_SECTION_ENABLE = yes | |||||
include Makefile |
/* | |||||
Copyright 2016 Jun Wako <[email protected]> | |||||
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 "unimap_trans.h" | |||||
#define AC_FN0 ACTION_LAYER_MOMENTARY(1) | |||||
#ifdef KEYMAP_SECTION_ENABLE | |||||
const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] __attribute__ ((section (".keymap.keymaps"))) = { | |||||
#else | |||||
const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] PROGMEM = { | |||||
#endif | |||||
/* | |||||
* Universal keyboard layout | |||||
* ,-----------------------------------------------. | |||||
* |F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24| | |||||
* ,---. |-----------------------------------------------| ,-----------. ,-----------. | |||||
* |Esc| |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut| | |||||
* `---' `-----------------------------------------------' `-----------' `-----------' | |||||
* ,-----------------------------------------------------------. ,-----------. ,---------------. | |||||
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| | |||||
* |-----------------------------------------------------------| |-----------| |---------------| | |||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| | |||||
* |-----------------------------------------------------------| `-----------' |---------------| | |||||
* |CapsL | A| S| D| F| G| H| J| K| L| ;| '| #|Retn| | 4| 5| 6|KP,| | |||||
* |-----------------------------------------------------------| ,---. |---------------| | |||||
* |Shft| <| Z| X| C| V| B| N| M| ,| .| /| RO|Shift | |Up | | 1| 2| 3|KP=| | |||||
* |-----------------------------------------------------------| ,-----------. |---------------| | |||||
* |Ctl|Gui|Alt|MHEN| Space |HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| | |||||
* `-----------------------------------------------------------' `-----------' `---------------' | |||||
*/ | |||||
UNIMAP( | |||||
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, | |||||
ESC, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, | |||||
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, NO, NO, NO, NO, NO, NO, NO, | |||||
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, NO, NO, NO, NO, NO, NO, NO, | |||||
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NO, ENT, NO, NO, NO, NO, | |||||
LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, NO, RSFT, NO, NO, NO, NO, NO, | |||||
LCTL,LGUI,LALT,NO, SPC, NO, NO, RALT,RGUI,APP, FN0, NO, NO, NO, NO, NO, NO | |||||
), | |||||
UNIMAP( | |||||
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, | |||||
TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, | |||||
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, | |||||
CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,UP, TRNS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, | |||||
TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT, TRNS,PENT, TRNS,TRNS,TRNS,TRNS, | |||||
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, | |||||
TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS, TRNS,TRNS | |||||
), | |||||
}; |
/* | |||||
Copyright 2016 Jun Wako <[email protected]> | |||||
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/>. | |||||
*/ | |||||
#ifndef UNIMAP_TRNAS_H | |||||
#define UNIMAP_TRNAS_H | |||||
#include <stdint.h> | |||||
#include <avr/pgmspace.h> | |||||
#include "unimap.h" | |||||
/* Mapping to Universal keyboard layout | |||||
* ,-----------------------------------------------------------. | |||||
* |` | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| | |||||
* |-----------------------------------------------------------| | |||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | |||||
* |-----------------------------------------------------------| | |||||
* |Caps | A| S| D| F| G| H| J| K| L| ;| '|Enter | | |||||
* |-----------------------------------------------------------| | |||||
* |Shft| \| Z| X| C| V| B| N| M| ,| .| /|Shift |Esc| | |||||
* |-----------------------------------------------------------' | |||||
* |Ctrl|Gui |Alt | Space |App |Alt |Gui |Ctrl | | |||||
* `-----------------------------------------------------------' | |||||
* | |||||
* ,-----------------------------------------------------------. | |||||
* |36 |37 |46 |47 |56 |57 |66 |67 |76 |77 |06 |07 |17 |26 |27 | | |||||
* |-----------------------------------------------------------| | |||||
* |34 |35 |44 |45 |54 |55 |64 |65 |75 |05 |15 |16 |25 |24 | | |||||
* |-----------------------------------------------------------| | |||||
* |32 |33 |43 |52 |53 |63 |73 |74 |03 |04 |13 |14 | 23 | | |||||
* |-----------------------------------------------------------| | |||||
* |31 |41 |42 |51 |61 |62 |71 |72 |01 |02 |11 |12 |21 |22 | | |||||
* |-----------------------------------------------------------| | |||||
* |30 |40 |50 | 60 |70 |00 |10 |20 | | |||||
* `-----------------------------------------------------------' | |||||
*/ | |||||
const uint8_t PROGMEM unimap_trans[MATRIX_ROWS][MATRIX_COLS] = { | |||||
{ UNIMAP_RALT, UNIMAP_M, UNIMAP_COMM, UNIMAP_K, UNIMAP_L, UNIMAP_O, UNIMAP_0, UNIMAP_MINS }, /* 00-07 */ | |||||
{ UNIMAP_RGUI, UNIMAP_DOT, UNIMAP_SLSH, UNIMAP_SCLN, UNIMAP_QUOT, UNIMAP_P, UNIMAP_LBRC, UNIMAP_EQL }, /* 10-17 */ | |||||
{ UNIMAP_RCTL, UNIMAP_RSFT, UNIMAP_ESC, UNIMAP_ENT, UNIMAP_BSLS, UNIMAP_RBRC, UNIMAP_JYEN, UNIMAP_BSPC }, /* 20-27 */ | |||||
{ UNIMAP_LCTL, UNIMAP_LSFT, UNIMAP_CAPS, UNIMAP_A, UNIMAP_TAB, UNIMAP_Q, UNIMAP_GRV, UNIMAP_1 }, /* 30-37 */ | |||||
{ UNIMAP_LGUI, UNIMAP_NUBS, UNIMAP_Z, UNIMAP_S, UNIMAP_W, UNIMAP_E, UNIMAP_2, UNIMAP_3 }, /* 40-47 */ | |||||
{ UNIMAP_LALT, UNIMAP_X, UNIMAP_D, UNIMAP_F, UNIMAP_R, UNIMAP_T, UNIMAP_4, UNIMAP_5 }, /* 50-57 */ | |||||
{ UNIMAP_SPC, UNIMAP_C, UNIMAP_V, UNIMAP_G, UNIMAP_Y, UNIMAP_U, UNIMAP_6, UNIMAP_7 }, /* 60-67 */ | |||||
{ UNIMAP_APP, UNIMAP_B, UNIMAP_N, UNIMAP_H, UNIMAP_J, UNIMAP_I, UNIMAP_8, UNIMAP_9 }, /* 70-77 */ | |||||
}; | |||||
#endif | |||||