Skip to content

Instantly share code, notes, and snippets.

Avatar

Jack Humbert jackhumbert

View GitHub Profile
View planck_rev6_beakl_colemak.json
{
"layout": "LAYOUT_ortho_4x12",
"keyboard": "planck/rev6",
"author": "jackhumbert",
"layers": [
[
"KC_TAB",
"KC_Q",
"KC_W",
"KC_F",
@jackhumbert
jackhumbert / lsc.sublime-build
Created Sep 5, 2019
If you name your livescript files like <desired_file_name>.ls, this build system will automatically generate the desired files.
View lsc.sublime-build
{
"cmd": ["lsc", "${file_path}/${file_name}", ">", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"path": "D:/msys64/mingw64/bin/",
"shell": true
}
@jackhumbert
jackhumbert / Makefile
Created Nov 7, 2018
BootloaderHID Makefile for Planck THK
View Makefile
# Name: Makefile
# Project: bootloadHID
# Author: Christian Starkjohann
# Creation Date: 2007-03-19
# Tabsize: 4
# Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
# License: GNU GPL v2 (see License.txt)
# This Revision: $Id$
###############################################################################
View something.c
enum {
PIN_INPUT,
PIN_INPUT_HIGH,
PIN_INPUT_LOW,
PIN_OUTPUT,
PIN_OUTPUT_HIGH,
PIN_OUTPUT_LOW
}
#ifdef __AVR__
View i2c_slave.diff
diff --git a/os/hal/include/hal_i2c.h b/os/hal/include/hal_i2c.h
index c9c8409cb..4a90ba98d 100644
--- a/os/hal/include/hal_i2c.h
+++ b/os/hal/include/hal_i2c.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
@jackhumbert
jackhumbert / keymap.c
Created Mar 16, 2018
preonic with encoder
View keymap.c
/* Copyright 2015-2017 Jack Humbert
*
* 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
View keymap.c
static uint8_t encoder_state = 0;
static int8_t encoder_value = 0;
static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 };
void matrix_init_user(void) {
encoder_state = PIND & 0x3;
}
void matrix_scan_user(void) {
View kb.c
#include "kb.h"
#include "led.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
led_init_ports();
};
View planckdefault.json
{"version":1,"keyboard":{"keys":[{"id":0,"legend":"Tab","state":{"x":0,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":7},"row":0,"col":0,"keycodes":[{"id":"KC_TAB","fields":[]},{"id":"KC_LSFT","fields":[]},{"id":"KC_GRV","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":1,"legend":"Q","state":{"x":1,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":7},"row":0,"col":1,"keycodes":[{"id":"KC_Q","fields":[]},{"id":"KC_LSFT","fields":[]},{"id":"KC_1","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":
View keymap_simon.c
#include "atomic.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = { /* Qwerty */
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO },
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_NUHS, KC_F2 },
{ MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_NO, KC_BSLS },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_UP, KC_CAPS },
{ KC_LCTL, KC_LGUI, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, KC_PSCR, KC_LEFT, KC_DOWN, KC_RGHT },
},