1
0

Fix some definition

This commit is contained in:
Kai Ryu 2014-07-05 23:29:16 +09:00
parent 6e392e7a64
commit 062a2cdfd1
5 changed files with 15 additions and 30 deletions

View File

@ -39,7 +39,7 @@
#----------------------------------------------------------------------------
# Target file name (without extension).
TARGET = lr92_lufa
TARGET = lr94_lufa
# Directory common source filess exist
TOP_DIR = ../..
@ -112,11 +112,6 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# USBaspLoader 2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# PCB Revision
ifdef REV
OPT_DEFS += -DGH60_REV_$(REV)
endif
# Additional definitions from command line
ifdef DEFS
OPT_DEFS += $(foreach DEF,$(DEFS),-D$(DEF))
@ -131,10 +126,11 @@ 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 - not yet supported in LUFA
NKRO_ENABLE = yes # USB Nkey Rollover
USB_6KRO_ENABLE = yes # USB 6key Rollover
#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
KEYMAP_EX_ENABLE = yes # External keymap in eeprom
KEYMAP_IN_EEPROM_ENABLE = yes # Read keymap from eeprom
KEYMAP_SECTION_ENABLE = yes # Fixed address keymap for keymap editor
BREATHING_LED_ENABLE = yes # Enable breathing backlight

View File

@ -39,7 +39,7 @@
#----------------------------------------------------------------------------
# Target file name (without extension).
TARGET = lr92_pjrc
TARGET = lr94_pjrc
# Directory common source filess exist
TOP_DIR = ../..
@ -82,11 +82,6 @@ F_CPU = 16000000
# LUFA bootloader 4096
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# PCB Revision
ifdef REV
OPT_DEFS += -DGH60_REV_$(REV)
endif
# Additional definitions from command line
ifdef DEFS
OPT_DEFS += $(foreach DEF,$(DEFS),-D$(DEF))
@ -101,12 +96,13 @@ 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 - not yet supported in LUFA
NKRO_ENABLE = yes # USB Nkey Rollover
USB_6KRO_ENABLE = yes # USB 6key Rollover
#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
KEYMAP_EX_ENABLE = yes # External keymap in eeprom
KEYMAP_IN_EEPROM_ENABLE = yes # Read keymap from eeprom
KEYMAP_SECTION_ENABLE = yes # Fixed address keymap for keymap editor
BREATHING_LED_ENABLE = yes # Enable breathing backlight
# Search Path

View File

@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)
{
#ifndef KEYMAP_EX_ENABLE
#ifndef KEYMAP_IN_EEPROM_ENABLE
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
#else
return eeconfig_read_keymap_key(layer, key.row, key.col);
@ -30,7 +30,7 @@ uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)
action_t keymap_fn_to_action(uint8_t keycode)
{
return (action_t) {
#ifndef KEYMAP_EX_ENABLE
#ifndef KEYMAP_IN_EEPROM_ENABLE
.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)])
#else
.code = eeconfig_read_keymap_fn_action(FN_INDEX(keycode))
@ -38,7 +38,7 @@ action_t keymap_fn_to_action(uint8_t keycode)
};
}
#ifdef KEYMAP_EX_ENABLE
#ifdef KEYMAP_IN_EEPROM_ENABLE
const uint8_t* keymaps_pointer(void) {
return (const uint8_t*)keymaps;
}

View File

@ -28,21 +28,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "print.h"
#include "debug.h"
#include "keymap.h"
#include "keymap_ex.h"
#include "keymap_in_eeprom.h"
/*
#ifdef KEYMAP_EX_ENABLE
extern const uint8_t keymaps[KEYMAPS_COUNT][MATRIX_ROWS][MATRIX_COLS];
extern const uint16_t fn_actions[FN_ACTIONS_COUNT];
#else
*/
extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
extern const uint16_t fn_actions[];
//#endif
/* LR92 keymap definition macro
/* LR94 keymap definition macro
* K1J, K3M and K2B are extra keys for ISO
*/
#define KEYMAP( \

View File

@ -90,7 +90,7 @@ const uint16_t fn_actions[] PROGMEM = {
[4] = ACTION_BACKLIGHT_INCREASE()
};
#ifdef KEYMAP_EX_ENABLE
#ifdef KEYMAP_IN_EEPROM_ENABLE
uint16_t keys_count(void) {
return sizeof(keymaps) / sizeof(keymaps[0]) * MATRIX_ROWS * MATRIX_COLS;
}