2014-08-03 14:52:29 +00:00
|
|
|
/*
|
|
|
|
Copyright 2014 Kai Ryu <kai1103@gmail.com>
|
|
|
|
|
|
|
|
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/>.
|
|
|
|
*/
|
|
|
|
|
2014-08-11 06:08:49 +00:00
|
|
|
#include <avr/pgmspace.h>
|
|
|
|
#include "keycode.h"
|
2014-08-03 14:52:29 +00:00
|
|
|
#include "keymap_common.h"
|
|
|
|
|
|
|
|
// Default
|
|
|
|
#ifdef KEYMAP_SECTION_ENABLE
|
|
|
|
const uint8_t keymaps[KEYMAPS_COUNT][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
|
|
|
|
#else
|
|
|
|
const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
|
|
|
|
#endif
|
2014-08-18 05:02:46 +00:00
|
|
|
[0] = KEYMAP( Z, X, ESC ),
|
|
|
|
[1] = KEYMAP( BTN1,BTN2,ESC ),
|
|
|
|
[2] = KEYMAP( LEFT,RGHT,ESC ),
|
|
|
|
[3] = KEYMAP( UP, DOWN,ESC ),
|
|
|
|
[4] = KEYMAP( PGUP,PGDN,ESC ),
|
|
|
|
[5] = KEYMAP( SPC, ESC, ESC ),
|
2014-08-03 14:52:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fn action definition
|
|
|
|
*/
|
|
|
|
#ifdef KEYMAP_SECTION_ENABLE
|
|
|
|
const uint16_t fn_actions[FN_ACTIONS_COUNT] __attribute__ ((section (".keymap.fn_actions"))) = {
|
|
|
|
#else
|
|
|
|
const uint16_t fn_actions[] PROGMEM = {
|
|
|
|
#endif
|
2014-09-19 03:36:26 +00:00
|
|
|
|
2014-08-03 14:52:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef KEYMAP_IN_EEPROM_ENABLE
|
|
|
|
uint16_t keys_count(void) {
|
|
|
|
return sizeof(keymaps) / sizeof(keymaps[0]) * MATRIX_ROWS * MATRIX_COLS;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint16_t fn_actions_count(void) {
|
|
|
|
return sizeof(fn_actions) / sizeof(fn_actions[0]);
|
|
|
|
}
|
|
|
|
#endif
|