summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
authoralex-ong <the.onga@gmail.com>2018-08-12 17:23:58 +1000
committeralex-ong <the.onga@gmail.com>2018-08-12 17:23:58 +1000
commit2758158a4bb15b0f5ec30de92760133248afe1f8 (patch)
treeab6cbaa941139c8c397284465f15e5537d0ba533 /keyboards
parent619b5d1e6d40c37eb77036158b8f2b99d673e2ba (diff)
Added xeal60 via clone of lets split
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/handwired/xeal60/config.h24
-rw-r--r--keyboards/handwired/xeal60/i2c.c162
-rw-r--r--keyboards/handwired/xeal60/i2c.h49
-rw-r--r--keyboards/handwired/xeal60/info.json12
-rw-r--r--keyboards/handwired/xeal60/keymaps/DE_simple/config.h37
-rw-r--r--keyboards/handwired/xeal60/keymaps/DE_simple/keymap.c155
-rw-r--r--keyboards/handwired/xeal60/keymaps/DE_simple/readme.md59
-rw-r--r--keyboards/handwired/xeal60/keymaps/DE_simple/rules.mk0
-rw-r--r--keyboards/handwired/xeal60/keymaps/OLED_sample/config.h60
-rw-r--r--keyboards/handwired/xeal60/keymaps/OLED_sample/keymap.c441
-rw-r--r--keyboards/handwired/xeal60/keymaps/OLED_sample/readme.md25
-rw-r--r--keyboards/handwired/xeal60/keymaps/OLED_sample/rules.mk25
-rw-r--r--keyboards/handwired/xeal60/keymaps/adam/config.h50
-rw-r--r--keyboards/handwired/xeal60/keymaps/adam/keymap.c78
-rw-r--r--keyboards/handwired/xeal60/keymaps/bbaserdem/README.md27
-rw-r--r--keyboards/handwired/xeal60/keymaps/bbaserdem/config.h27
-rw-r--r--keyboards/handwired/xeal60/keymaps/bbaserdem/keymap.c36
-rw-r--r--keyboards/handwired/xeal60/keymaps/bbaserdem/rules.mk11
-rw-r--r--keyboards/handwired/xeal60/keymaps/bbaserdem_right/README.md5
-rw-r--r--keyboards/handwired/xeal60/keymaps/bbaserdem_right/config.h9
-rw-r--r--keyboards/handwired/xeal60/keymaps/bbaserdem_right/keymap.c31
-rw-r--r--keyboards/handwired/xeal60/keymaps/bbaserdem_right/rules.mk26
-rw-r--r--keyboards/handwired/xeal60/keymaps/cpeters1982/config.h54
-rw-r--r--keyboards/handwired/xeal60/keymaps/cpeters1982/keymap.c221
-rw-r--r--keyboards/handwired/xeal60/keymaps/cpeters1982/rules.mk8
-rw-r--r--keyboards/handwired/xeal60/keymaps/default/config.h37
-rw-r--r--keyboards/handwired/xeal60/keymaps/default/keymap.c211
-rw-r--r--keyboards/handwired/xeal60/keymaps/default/rules.mk3
-rw-r--r--keyboards/handwired/xeal60/keymaps/dlaroe/config.h37
-rw-r--r--keyboards/handwired/xeal60/keymaps/dlaroe/keymap.c255
-rw-r--r--keyboards/handwired/xeal60/keymaps/dlaroe/rules.mk0
-rw-r--r--keyboards/handwired/xeal60/keymaps/drashna/config.h80
-rw-r--r--keyboards/handwired/xeal60/keymaps/drashna/keymap.c98
-rw-r--r--keyboards/handwired/xeal60/keymaps/drashna/rules.mk25
-rw-r--r--keyboards/handwired/xeal60/keymaps/drashna_old/config.h86
-rw-r--r--keyboards/handwired/xeal60/keymaps/drashna_old/keymap.c1
-rw-r--r--keyboards/handwired/xeal60/keymaps/drashna_old/rules.mk28
-rw-r--r--keyboards/handwired/xeal60/keymaps/dwallace/config.h43
-rw-r--r--keyboards/handwired/xeal60/keymaps/dwallace/keymap.c224
-rw-r--r--keyboards/handwired/xeal60/keymaps/dwallace/rules.mk1
-rw-r--r--keyboards/handwired/xeal60/keymaps/fabian/config.h34
-rw-r--r--keyboards/handwired/xeal60/keymaps/fabian/keymap.c271
-rw-r--r--keyboards/handwired/xeal60/keymaps/fabian/rules.mk9
-rw-r--r--keyboards/handwired/xeal60/keymaps/fido/config.h45
-rw-r--r--keyboards/handwired/xeal60/keymaps/fido/keymap.c74
-rw-r--r--keyboards/handwired/xeal60/keymaps/fido/rules.mk1
-rw-r--r--keyboards/handwired/xeal60/keymaps/heartrobotninja/config.h58
-rw-r--r--keyboards/handwired/xeal60/keymaps/heartrobotninja/keymap.c180
-rw-r--r--keyboards/handwired/xeal60/keymaps/heartrobotninja/rules.mk26
-rw-r--r--keyboards/handwired/xeal60/keymaps/henxing/Readme.md51
-rw-r--r--keyboards/handwired/xeal60/keymaps/henxing/config.h37
-rw-r--r--keyboards/handwired/xeal60/keymaps/henxing/keymap.c113
-rw-r--r--keyboards/handwired/xeal60/keymaps/hexwire/README.md116
-rw-r--r--keyboards/handwired/xeal60/keymaps/hexwire/config.h43
-rw-r--r--keyboards/handwired/xeal60/keymaps/hexwire/keymap.c218
-rw-r--r--keyboards/handwired/xeal60/keymaps/hexwire/rules.mk1
-rw-r--r--keyboards/handwired/xeal60/keymaps/khord/config.h44
-rw-r--r--keyboards/handwired/xeal60/keymaps/khord/keymap.c170
-rw-r--r--keyboards/handwired/xeal60/keymaps/khord/rules.mk7
-rw-r--r--keyboards/handwired/xeal60/keymaps/kris/keymap.c213
-rw-r--r--keyboards/handwired/xeal60/keymaps/krusli/keymap.c238
-rw-r--r--keyboards/handwired/xeal60/keymaps/krusli/readme.md2
-rw-r--r--keyboards/handwired/xeal60/keymaps/mbsurfer/config.h43
-rw-r--r--keyboards/handwired/xeal60/keymaps/mbsurfer/keymap.c274
-rw-r--r--keyboards/handwired/xeal60/keymaps/mbsurfer/rules.mk7
-rw-r--r--keyboards/handwired/xeal60/keymaps/mike808/config.h43
-rw-r--r--keyboards/handwired/xeal60/keymaps/mike808/keymap.c158
-rw-r--r--keyboards/handwired/xeal60/keymaps/mike808/rules.mk1
-rw-r--r--keyboards/handwired/xeal60/keymaps/mjt/config.h38
-rw-r--r--keyboards/handwired/xeal60/keymaps/mjt/keymap.c213
-rw-r--r--keyboards/handwired/xeal60/keymaps/mjt/rules.mk25
-rw-r--r--keyboards/handwired/xeal60/keymaps/mtdjr/config.h43
-rw-r--r--keyboards/handwired/xeal60/keymaps/mtdjr/keymap.c55
-rw-r--r--keyboards/handwired/xeal60/keymaps/mtdjr/rules.mk5
-rw-r--r--keyboards/handwired/xeal60/keymaps/normacos/config.h37
-rw-r--r--keyboards/handwired/xeal60/keymaps/normacos/keymap.c213
-rw-r--r--keyboards/handwired/xeal60/keymaps/normacos/readme.md86
-rw-r--r--keyboards/handwired/xeal60/keymaps/piemod/README.md31
-rw-r--r--keyboards/handwired/xeal60/keymaps/piemod/config.h49
-rw-r--r--keyboards/handwired/xeal60/keymaps/piemod/keymap.c99
-rw-r--r--keyboards/handwired/xeal60/keymaps/piemod/rules.mk13
-rw-r--r--keyboards/handwired/xeal60/keymaps/pitty/README.md91
-rw-r--r--keyboards/handwired/xeal60/keymaps/pitty/config.h26
-rw-r--r--keyboards/handwired/xeal60/keymaps/pitty/keymap.c169
-rw-r--r--keyboards/handwired/xeal60/keymaps/pitty/rules.mk6
-rw-r--r--keyboards/handwired/xeal60/keymaps/poker/config.h37
-rw-r--r--keyboards/handwired/xeal60/keymaps/poker/keymap.c240
-rw-r--r--keyboards/handwired/xeal60/keymaps/poker/rules.mk3
-rw-r--r--keyboards/handwired/xeal60/keymaps/smt/config.h37
-rw-r--r--keyboards/handwired/xeal60/keymaps/smt/keymap.c218
-rw-r--r--keyboards/handwired/xeal60/keymaps/smt/readme.md88
-rw-r--r--keyboards/handwired/xeal60/keymaps/that_canadian/config.h32
-rw-r--r--keyboards/handwired/xeal60/keymaps/that_canadian/keymap.c163
-rw-r--r--keyboards/handwired/xeal60/keymaps/waples/README.md58
-rw-r--r--keyboards/handwired/xeal60/keymaps/waples/config.h17
-rw-r--r--keyboards/handwired/xeal60/keymaps/waples/keymap.c131
-rw-r--r--keyboards/handwired/xeal60/keymaps/waples/rules.mk3
-rw-r--r--keyboards/handwired/xeal60/keymaps/xk/config.h44
-rw-r--r--keyboards/handwired/xeal60/keymaps/xk/keymap.c370
-rw-r--r--keyboards/handwired/xeal60/keymaps/xk/rules.mk19
-rw-r--r--keyboards/handwired/xeal60/keymaps/zer09/config.h59
-rw-r--r--keyboards/handwired/xeal60/keymaps/zer09/keymap.c38
-rw-r--r--keyboards/handwired/xeal60/keymaps/zer09/keymap.h32
-rw-r--r--keyboards/handwired/xeal60/keymaps/zer09/rules.mk6
-rw-r--r--keyboards/handwired/xeal60/lets_split.c16
-rw-r--r--keyboards/handwired/xeal60/lets_split.h31
-rw-r--r--keyboards/handwired/xeal60/matrix.c470
-rw-r--r--keyboards/handwired/xeal60/readme.md187
-rw-r--r--keyboards/handwired/xeal60/rev1/config.h86
-rw-r--r--keyboards/handwired/xeal60/rev1/rev1.c15
-rw-r--r--keyboards/handwired/xeal60/rev1/rev1.h30
-rw-r--r--keyboards/handwired/xeal60/rev1/rules.mk1
-rw-r--r--keyboards/handwired/xeal60/rules.mk77
-rw-r--r--keyboards/handwired/xeal60/serial.c228
-rw-r--r--keyboards/handwired/xeal60/serial.h26
-rw-r--r--keyboards/handwired/xeal60/split_util.c86
-rw-r--r--keyboards/handwired/xeal60/split_util.h20
117 files changed, 9305 insertions, 0 deletions
diff --git a/keyboards/handwired/xeal60/config.h b/keyboards/handwired/xeal60/config.h
new file mode 100644
index 0000000000..c910d8f24f
--- /dev/null
+++ b/keyboards/handwired/xeal60/config.h
@@ -0,0 +1,24 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 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
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+#endif
diff --git a/keyboards/handwired/xeal60/i2c.c b/keyboards/handwired/xeal60/i2c.c
new file mode 100644
index 0000000000..084c890c40
--- /dev/null
+++ b/keyboards/handwired/xeal60/i2c.c
@@ -0,0 +1,162 @@
+#include <util/twi.h>
+#include <avr/io.h>
+#include <stdlib.h>
+#include <avr/interrupt.h>
+#include <util/twi.h>
+#include <stdbool.h>
+#include "i2c.h"
+
+#ifdef USE_I2C
+
+// Limits the amount of we wait for any one i2c transaction.
+// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
+// 9 bits, a single transaction will take around 90μs to complete.
+//
+// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
+// poll loop takes at least 8 clock cycles to execute
+#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
+
+#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
+
+volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
+
+static volatile uint8_t slave_buffer_pos;
+static volatile bool slave_has_register_set = false;
+
+// Wait for an i2c operation to finish
+inline static
+void i2c_delay(void) {
+ uint16_t lim = 0;
+ while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
+ lim++;
+
+ // easier way, but will wait slightly longer
+ // _delay_us(100);
+}
+
+// Setup twi to run at 100kHz
+void i2c_master_init(void) {
+ // no prescaler
+ TWSR = 0;
+ // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
+ // Check datasheets for more info.
+ TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
+}
+
+// Start a transaction with the given i2c slave address. The direction of the
+// transfer is set with I2C_READ and I2C_WRITE.
+// returns: 0 => success
+// 1 => error
+uint8_t i2c_master_start(uint8_t address) {
+ TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
+
+ i2c_delay();
+
+ // check that we started successfully
+ if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
+ return 1;
+
+ TWDR = address;
+ TWCR = (1<<TWINT) | (1<<TWEN);
+
+ i2c_delay();
+
+ if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
+ return 1; // slave did not acknowledge
+ else
+ return 0; // success
+}