Revise KEYMAP macro to make left and right halves more clear

master
Danny Nguyen 2017-04-03 12:15:14 -04:00
parent 48f4c5997b
commit d0cfaba6d2
2 changed files with 52 additions and 52 deletions

View File

@ -9,20 +9,20 @@
//void promicro_bootloader_jmp(bool program); //void promicro_bootloader_jmp(bool program);
#define KEYMAP( \ #define KEYMAP( \
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
) \ ) \
{ \ { \
{ k00, k01, k02, k03, k04, k05 }, \ { L00, L01, L02, L03, L04, L05 }, \
{ k10, k11, k12, k13, k14, k15 }, \ { L10, L11, L12, L13, L14, L15 }, \
{ k20, k21, k22, k23, k24, k25 }, \ { L20, L21, L22, L23, L24, L25 }, \
{ k30, k31, k32, k33, k34, k35 }, \ { L30, L31, L32, L33, L34, L35 }, \
{ k40, k41, k42, k43, k44, k45 }, \ { R00, R01, R02, R03, R04, R05 }, \
{ k50, k51, k52, k53, k54, k55 }, \ { R10, R11, R12, R13, R14, R15 }, \
{ k60, k61, k62, k63, k64, k65 }, \ { R20, R21, R22, R23, R24, R25 }, \
{ k70, k71, k72, k73, k74, k75 } \ { R30, R31, R32, R33, R34, R35 } \
} }
#endif #endif

View File

@ -10,62 +10,62 @@
#ifdef USE_I2C #ifdef USE_I2C
#include <stddef.h> #include <stddef.h>
#ifdef __AVR__ #ifdef __AVR__
#include <avr/io.h> #include <avr/io.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
#endif #endif
#ifdef SSD1306OLED #ifdef SSD1306OLED
extern bool iota_gfx_init(void); extern bool iota_gfx_init(void);
extern void iota_gfx_task(void); extern void iota_gfx_task(void);
extern bool iota_gfx_off(void); extern bool iota_gfx_off(void);
extern bool iota_gfx_on(void); extern bool iota_gfx_on(void);
extern void iota_gfx_flush(void); extern void iota_gfx_flush(void);
extern void iota_gfx_write_char(uint8_t c); extern void iota_gfx_write_char(uint8_t c);
extern void iota_gfx_write(const char *data); extern void iota_gfx_write(const char *data);
extern void iota_gfx_write_P(const char *data); extern void iota_gfx_write_P(const char *data);
extern void iota_gfx_clear_screen(void); extern void iota_gfx_clear_screen(void);
#endif #endif
#endif #endif
//void promicro_bootloader_jmp(bool program); //void promicro_bootloader_jmp(bool program);
#ifndef FLIP_HALF #ifndef FLIP_HALF
//Standard Keymap // Standard Keymap
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
#define KEYMAP( \ #define KEYMAP( \
k40, k41, k42, k43, k44, k45, k05, k04, k03, k02, k01, k00, \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
k50, k51, k52, k53, k54, k55, k15, k14, k13, k12, k11, k10, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
k60, k61, k62, k63, k64, k65, k25, k24, k23, k22, k21, k20, \ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
k70, k71, k72, k73, k74, k75, k35, k34, k33, k32, k31, k30 \ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
) \ ) \
{ \ { \
{ k45, k44, k43, k42, k41, k40 }, \ { L00, L01, L02, L03, L04, L05 }, \
{ k55, k54, k53, k52, k51, k50 }, \ { L10, L11, L12, L13, L14, L15 }, \
{ k65, k64, k63, k62, k61, k60 }, \ { L20, L21, L22, L23, L24, L25 }, \
{ k75, k74, k73, k72, k71, k70 }, \ { L30, L31, L32, L33, L34, L35 }, \
{ k00, k01, k02, k03, k04, k05 }, \ { R05, R04, R03, R02, R01, R00 }, \
{ k10, k11, k12, k13, k14, k15 }, \ { R15, R14, R13, R12, R11, R10 }, \
{ k20, k21, k22, k23, k24, k25 }, \ { R25, R24, R23, R22, R21, R20 }, \
{ k30, k31, k32, k33, k34, k35 } \ { R35, R34, R33, R32, R31, R30 } \
} }
#else #else
// Keymap with one side flipped // Keymap with right side flipped
// (TRRS jack on both halves are to the right)
#define KEYMAP( \ #define KEYMAP( \
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
) \ ) \
{ \ { \
{ k00, k01, k02, k03, k04, k05 }, \ { L00, L01, L02, L03, L04, L05 }, \
{ k10, k11, k12, k13, k14, k15 }, \ { L10, L11, L12, L13, L14, L15 }, \
{ k20, k21, k22, k23, k24, k25 }, \ { L20, L21, L22, L23, L24, L25 }, \
{ k30, k31, k32, k33, k34, k35 }, \ { L30, L31, L32, L33, L34, L35 }, \
{ k45, k44, k43, k42, k41, k40 }, \ { R00, R01, R02, R03, R04, R05 }, \
{ k55, k54, k53, k52, k51, k50 }, \ { R10, R11, R12, R13, R14, R15 }, \
{ k65, k64, k63, k62, k61, k60 }, \ { R20, R21, R22, R23, R24, R25 }, \
{ k75, k74, k73, k72, k71, k70 } \ { R30, R31, R32, R33, R34, R35 } \
} }
#endif #endif
#endif #endif