Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de833659ae | ||
|
|
1e6a3f9e17 | ||
|
|
62c77e7dbf | ||
|
|
582a6ac75c | ||
|
|
901a92a2fd | ||
|
|
f175f5df95 | ||
|
|
6c81656e8e | ||
|
|
5dae013ff8 | ||
|
|
30ab4dd14f | ||
|
|
dcf9fa1aaa | ||
|
|
f912c74fe7 | ||
|
|
574ca7f59c | ||
|
|
da19852964 | ||
|
|
ff49259a1a | ||
|
|
b0094e631e | ||
|
|
6c9b4743f7 |
No files matched your search
@@ -3,6 +3,7 @@
|
|||||||
* [Introduction](home.md)
|
* [Introduction](home.md)
|
||||||
* [QMK Overview](qmk_overview.md)
|
* [QMK Overview](qmk_overview.md)
|
||||||
* [Build Environment Setup](build_environment_setup.md)
|
* [Build Environment Setup](build_environment_setup.md)
|
||||||
|
* [Make instructions](make_instructions.md)
|
||||||
|
|
||||||
### Making a keymap
|
### Making a keymap
|
||||||
* [Keymap overview](keymap.md)
|
* [Keymap overview](keymap.md)
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
GFXINC += drivers/gdisp/emulator_lcd
|
|
||||||
GFXSRC += drivers/gdisp/emulator_lcd/emulator_lcd.c
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#define GDISP_DRIVER_VMT GDISPVMT_EMULATOR_LCD_ERGODOX
|
|
||||||
#define GDISP_HARDWARE_DRAWPIXEL TRUE
|
|
||||||
#define GDISP_HARDWARE_PIXELREAD TRUE
|
|
||||||
#define GDISP_HARDWARE_CONTROL TRUE
|
|
||||||
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO
|
|
||||||
#define GDISP_SCREEN_WIDTH 128
|
|
||||||
#define GDISP_SCREEN_HEIGHT 32
|
|
||||||
#define ROTATE_180_IS_FLIP
|
|
||||||
|
|
||||||
#include "emulator/emulator_driver_impl.h"
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
GFXINC += drivers/gdisp/emulator_led
|
|
||||||
GFXSRC += drivers/gdisp/emulator_led/emulator_led.c
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#define GDISP_DRIVER_VMT GDISPVMT_EMULATOR_LED_ERGODOX
|
|
||||||
#define GDISP_HARDWARE_DRAWPIXEL TRUE
|
|
||||||
#define GDISP_HARDWARE_PIXELREAD TRUE
|
|
||||||
#define GDISP_HARDWARE_CONTROL TRUE
|
|
||||||
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO
|
|
||||||
#define GDISP_SCREEN_WIDTH 7
|
|
||||||
#define GDISP_SCREEN_HEIGHT 7
|
|
||||||
#define ROTATE_180_IS_FLIP
|
|
||||||
|
|
||||||
#include "emulator/emulator_driver_impl.h"
|
|
||||||
@@ -123,7 +123,7 @@ void initialize_user_visualizer(visualizer_state_t* state) {
|
|||||||
start_keyframe_animation(&default_startup_animation);
|
start_keyframe_animation(&default_startup_animation);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool is_led_on(visualizer_user_data_t* user_data, uint8_t num) {
|
static inline bool is_led_on(visualizer_user_data_t* user_data, uint8_t num) {
|
||||||
return user_data->led_on & (1u << num);
|
return user_data->led_on & (1u << num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ To flash with ´teensy-loader-cli´:
|
|||||||
|
|
||||||
- Build the firmware with `make keymapname`, for example `make default`
|
- Build the firmware with `make keymapname`, for example `make default`
|
||||||
|
|
||||||
- Run ´<path/to/>teensy_loader_cli --mcu=atmega32u4 -w ergodox_ez_<keymap>.hex´
|
- Run ´<path/to/>teensy_loader_cli -mmcu=atmega32u4 -w ergodox_ez_<keymap>.hex´
|
||||||
|
|
||||||
- Press the Reset button by inserting a paperclip gently into the reset hole
|
- Press the Reset button by inserting a paperclip gently into the reset hole
|
||||||
in the top right corder.
|
in the top right corder.
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define CATERINA_BOOTLOADER
|
#define CATERINA_BOOTLOADER
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
|||||||
@@ -40,9 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define CATERINA_BOOTLOADER
|
#define CATERINA_BOOTLOADER
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
|||||||
+120
-22
@@ -455,7 +455,103 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||||||
return process_action_kb(record);
|
return process_action_kb(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool ascii_to_qwerty_shift_lut[0x80] PROGMEM = {
|
#ifdef JIS_KEYCODE
|
||||||
|
static const uint16_t ascii_to_shift_lut[8] PROGMEM = {
|
||||||
|
0x0000, /*0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,*/
|
||||||
|
0x0000, /*0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,*/
|
||||||
|
0x7ff0, /*0, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 0, 0, 0, 0,*/
|
||||||
|
0x000f, /*0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 1, 1, 1, 1,*/
|
||||||
|
0x7fff, /*0, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1,*/
|
||||||
|
0xffe1, /*1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 0, 0, 0, 0, 1,*/
|
||||||
|
0x8000, /*1, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,*/
|
||||||
|
0x001e, /*0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 1, 1, 1, 0*/
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct {
|
||||||
|
uint8_t controls_0[16],
|
||||||
|
controls_1[16],
|
||||||
|
numerics[16],
|
||||||
|
alphabets_0[16],
|
||||||
|
alphabets_1[16];
|
||||||
|
} lower_to_keycode PROGMEM = {
|
||||||
|
.controls_0 = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0,
|
||||||
|
},
|
||||||
|
.controls_1 = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, KC_ESC, 0, 0, 0, 0,
|
||||||
|
},
|
||||||
|
.numerics = {
|
||||||
|
KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7,
|
||||||
|
KC_8, KC_9, KC_QUOT, KC_SCLN, KC_COMM, KC_MINS, KC_DOT, KC_SLSH,
|
||||||
|
},
|
||||||
|
.alphabets_0 = {
|
||||||
|
KC_LBRC, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G,
|
||||||
|
KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O,
|
||||||
|
},
|
||||||
|
.alphabets_1 = {
|
||||||
|
KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W,
|
||||||
|
KC_X, KC_Y, KC_Z, KC_RBRC, KC_JYEN, KC_BSLS, KC_EQL, KC_RO,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
static const uint8_t* ascii_to_keycode_lut[8] = {
|
||||||
|
lower_to_keycode.controls_0,
|
||||||
|
lower_to_keycode.controls_1,
|
||||||
|
lower_to_keycode.numerics,
|
||||||
|
lower_to_keycode.numerics,
|
||||||
|
lower_to_keycode.alphabets_0,
|
||||||
|
lower_to_keycode.alphabets_1,
|
||||||
|
lower_to_keycode.alphabets_0,
|
||||||
|
lower_to_keycode.alphabets_1
|
||||||
|
};
|
||||||
|
|
||||||
|
void send_string(const char *str) {
|
||||||
|
while (1) {
|
||||||
|
uint8_t keycode;
|
||||||
|
bool shift;
|
||||||
|
uint8_t ascii_code = pgm_read_byte(str);
|
||||||
|
|
||||||
|
if ( ascii_code == 0x00u ){ break; }
|
||||||
|
else if (ascii_code == 0x20u) {
|
||||||
|
keycode = KC_SPC;
|
||||||
|
shift = false;
|
||||||
|
}
|
||||||
|
else if (ascii_code == 0x7Fu) {
|
||||||
|
keycode = KC_DEL;
|
||||||
|
shift = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int hi = ascii_code>>4 & 0x0f;
|
||||||
|
lo = ascii_code & 0x0f;
|
||||||
|
keycode = pgm_read_byte(&ascii_to_keycode_lut[hi][lo]);
|
||||||
|
shift = !!( pgm_read_word(&ascii_to_shift_lut[hi]) & (0x8000u>>lo) );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shift) {
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
register_code(keycode);
|
||||||
|
unregister_code(keycode);
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
register_code(keycode);
|
||||||
|
unregister_code(keycode);
|
||||||
|
}
|
||||||
|
++str;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
static const bool ascii_to_qwerty_shift_lut[0x80] PROGMEM = {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
@@ -474,7 +570,7 @@ const bool ascii_to_qwerty_shift_lut[0x80] PROGMEM = {
|
|||||||
0, 0, 0, 1, 1, 1, 1, 0
|
0, 0, 0, 1, 1, 1, 1, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ascii_to_qwerty_keycode_lut[0x80] PROGMEM = {
|
static const uint8_t ascii_to_qwerty_keycode_lut[0x80] PROGMEM = {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0,
|
KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
@@ -493,6 +589,28 @@ const uint8_t ascii_to_qwerty_keycode_lut[0x80] PROGMEM = {
|
|||||||
KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL
|
KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void send_string(const char *str) {
|
||||||
|
while (1) {
|
||||||
|
uint8_t keycode;
|
||||||
|
uint8_t ascii_code = pgm_read_byte(str);
|
||||||
|
if (!ascii_code) break;
|
||||||
|
keycode = pgm_read_byte(&ascii_to_qwerty_keycode_lut[ascii_code]);
|
||||||
|
if (pgm_read_byte(&ascii_to_qwerty_shift_lut[ascii_code])) {
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
register_code(keycode);
|
||||||
|
unregister_code(keycode);
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
register_code(keycode);
|
||||||
|
unregister_code(keycode);
|
||||||
|
}
|
||||||
|
++str;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* for users whose OSes are set to Colemak */
|
/* for users whose OSes are set to Colemak */
|
||||||
#if 0
|
#if 0
|
||||||
#include "keymap_colemak.h"
|
#include "keymap_colemak.h"
|
||||||
@@ -537,26 +655,6 @@ const uint8_t ascii_to_colemak_keycode_lut[0x80] PROGMEM = {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void send_string(const char *str) {
|
|
||||||
while (1) {
|
|
||||||
uint8_t keycode;
|
|
||||||
uint8_t ascii_code = pgm_read_byte(str);
|
|
||||||
if (!ascii_code) break;
|
|
||||||
keycode = pgm_read_byte(&ascii_to_qwerty_keycode_lut[ascii_code]);
|
|
||||||
if (pgm_read_byte(&ascii_to_qwerty_shift_lut[ascii_code])) {
|
|
||||||
register_code(KC_LSFT);
|
|
||||||
register_code(keycode);
|
|
||||||
unregister_code(keycode);
|
|
||||||
unregister_code(KC_LSFT);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
register_code(keycode);
|
|
||||||
unregister_code(keycode);
|
|
||||||
}
|
|
||||||
++str;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||||
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
||||||
layer_on(layer3);
|
layer_on(layer3);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
#MCU = at90usb1287
|
#MCU = at90usb1286
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
# Processor frequency.
|
||||||
|
|||||||
@@ -83,3 +83,7 @@ void lcd_backlight_brightness(uint8_t b) {
|
|||||||
current_brightness = b;
|
current_brightness = b;
|
||||||
lcd_backlight_color(current_hue, current_saturation, current_intensity);
|
lcd_backlight_color(current_hue, current_saturation, current_intensity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t lcd_get_backlight_brightness(void) {
|
||||||
|
return current_brightness;
|
||||||
|
}
|
||||||
@@ -32,13 +32,14 @@ SOFTWARE.
|
|||||||
#define LCD_SAT(color) ((color >> 8) & 0xFF)
|
#define LCD_SAT(color) ((color >> 8) & 0xFF)
|
||||||
#define LCD_INT(color) (color & 0xFF)
|
#define LCD_INT(color) (color & 0xFF)
|
||||||
|
|
||||||
inline uint32_t change_lcd_color_intensity(uint32_t color, uint8_t new_intensity) {
|
static inline uint32_t change_lcd_color_intensity(uint32_t color, uint8_t new_intensity) {
|
||||||
return (color & 0xFFFFFF00) | new_intensity;
|
return (color & 0xFFFFFF00) | new_intensity;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_backlight_init(void);
|
void lcd_backlight_init(void);
|
||||||
void lcd_backlight_color(uint8_t hue, uint8_t saturation, uint8_t intensity);
|
void lcd_backlight_color(uint8_t hue, uint8_t saturation, uint8_t intensity);
|
||||||
void lcd_backlight_brightness(uint8_t b);
|
void lcd_backlight_brightness(uint8_t b);
|
||||||
|
uint8_t lcd_get_backlight_brightness(void);
|
||||||
|
|
||||||
void lcd_backlight_hal_init(void);
|
void lcd_backlight_hal_init(void);
|
||||||
void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b);
|
void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ static uint8_t crossfade_start_frame[NUM_ROWS][NUM_COLS];
|
|||||||
static uint8_t crossfade_end_frame[NUM_ROWS][NUM_COLS];
|
static uint8_t crossfade_end_frame[NUM_ROWS][NUM_COLS];
|
||||||
|
|
||||||
static uint8_t compute_gradient_color(float t, float index, float num) {
|
static uint8_t compute_gradient_color(float t, float index, float num) {
|
||||||
const float two_pi = M_2_PI;
|
const float two_pi = M_PI * 2.0f;
|
||||||
float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi;
|
float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi;
|
||||||
float x = t * two_pi + normalized_index;
|
float x = t * two_pi + normalized_index;
|
||||||
float v = 0.5 * (cosf(x) + 1.0f);
|
float v = 0.5 * (cosf(x) + 1.0f);
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "visualizer.h"
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "visualizer.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef PROTOCOL_CHIBIOS
|
#ifdef PROTOCOL_CHIBIOS
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ SOFTWARE.
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
|
|
||||||
#ifdef LCD_BACKLIGHT_ENABLE
|
#ifdef LCD_BACKLIGHT_ENABLE
|
||||||
|
|||||||
Reference in new issue
Block a user