Selaa lähdekoodia

kimera: Add support for Kimera Core

kimera
Kai Ryu 8 vuotta sitten
vanhempi
commit
24614640e3
2 muutettua tiedostoa jossa 35 lisäystä ja 3 poistoa
  1. 3
    3
      keyboard/kimera/Makefile
  2. 32
    0
      keyboard/kimera/kimera.h

+ 3
- 3
keyboard/kimera/Makefile Näytä tiedosto

ifdef VER ifdef VER
OPT_DEFS += -DKIMERA_$(REV) OPT_DEFS += -DKIMERA_$(REV)
else else
OPT_DEFS += -DKIMERA_V5
OPT_DEFS += -DKIMERA_CORE
endif endif


# Additional definitions from command line # Additional definitions from command line
# comment out to disable the options. # comment out to disable the options.
# #
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
#MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400) CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
KEYMAP_IN_EEPROM_ENABLE = yes # External keymap in eeprom KEYMAP_IN_EEPROM_ENABLE = yes # External keymap in eeprom
#KEYMAP_SECTION_ENABLE = yes # Fixed address keymap for keymap editor #KEYMAP_SECTION_ENABLE = yes # Fixed address keymap for keymap editor
SOFTPWM_LED_ENABLE = yes # Enable SoftPWM to drive backlight SOFTPWM_LED_ENABLE = yes # Enable SoftPWM to drive backlight
#FADING_LED_ENABLE = yes # Enable fading backlight
FADING_LED_ENABLE = yes # Enable fading backlight
BREATHING_LED_ENABLE = yes # Enable breathing backlight BREATHING_LED_ENABLE = yes # Enable breathing backlight
LEDMAP_ENABLE = yes # Enable LED mapping LEDMAP_ENABLE = yes # Enable LED mapping
LEDMAP_IN_EEPROM_ENABLE = yes # Read LED mapping from eeprom LEDMAP_IN_EEPROM_ENABLE = yes # Read LED mapping from eeprom

+ 32
- 0
keyboard/kimera/kimera.h Näytä tiedosto

`----------------' `----------------'
*/ */


#ifndef KIMERA_CORE

#define LED1_PORT PORTB #define LED1_PORT PORTB
#define LED1_PIN PINB #define LED1_PIN PINB
#define LED1_DDR DDRB #define LED1_DDR DDRB
#define LED4_BIT PB6 #define LED4_BIT PB6
#define LED4_OCR OCR1B #define LED4_OCR OCR1B


#else

#define LED1_PORT PORTB
#define LED1_PIN PINB
#define LED1_DDR DDRB
#define LED1_BIT PB5

#define LED2_PORT PORTB
#define LED2_PIN PINB
#define LED2_DDR DDRB
#define LED2_BIT PB6

#define LED3_PORT PORTC
#define LED3_PIN PINC
#define LED3_DDR DDRC
#define LED3_BIT PC6

#define LED4_PORT PORTC
#define LED4_PIN PINC
#define LED4_DDR DDRC
#define LED4_BIT PC7
#define LED4_OCR OCR4D

#endif

/* /*
IC1 (PCA9555) IC2 (PCA9555) IC1 (PCA9555) IC2 (PCA9555)
,----------. ,----------. ,----------. ,----------.
EXP_COMM_CONFIG_0, EXP_COMM_CONFIG_0,
EXP_COMM_CONFIG_1 EXP_COMM_CONFIG_1
}; };
#ifndef KIMERA_CORE
#define PX_TO_EXP(x) (((x)>>5<<1)+((((x)>>3)&1)^(((x)>>4)&1))) #define PX_TO_EXP(x) (((x)>>5<<1)+((((x)>>3)&1)^(((x)>>4)&1)))
#define PX_TO_PORT(x) (((x)>>4)&1) #define PX_TO_PORT(x) (((x)>>4)&1)
#else
#define PX_TO_EXP(x) ((x)>>4)
#define PX_TO_PORT(x) (((x)>>3)&1)
#endif
#define PX_TO_PIN(x) ((x)&7) #define PX_TO_PIN(x) ((x)&7)
#define PX_COUNT (EXP_PIN_PER_PORT * EXP_PORT_COUNT * EXP_COUNT) #define PX_COUNT (EXP_PIN_PER_PORT * EXP_PORT_COUNT * EXP_COUNT)