summaryrefslogtreecommitdiff
path: root/keyboards/40percentclub/i75/promicro
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2018-12-05 21:56:43 +0000
committerDrashna Jaelre <drashna@live.com>2018-12-05 13:56:43 -0800
commit368de26996fbd54eefbf54c567a90bf0d81e20c7 (patch)
tree64264bc5bea843e55b0b99be277dfb295667bae7 /keyboards/40percentclub/i75/promicro
parent161afe2e54e14b210b30539bd8a100471bcdf2c3 (diff)
Keyboard: Initial i75 port (#4553)
* Initial i75 port - currently supporting promicro and teensy2 * Initial i75 port - review fixes
Diffstat (limited to 'keyboards/40percentclub/i75/promicro')
-rw-r--r--keyboards/40percentclub/i75/promicro/config.h40
-rw-r--r--keyboards/40percentclub/i75/promicro/promicro.c16
-rw-r--r--keyboards/40percentclub/i75/promicro/promicro.h47
-rw-r--r--keyboards/40percentclub/i75/promicro/rules.mk58
4 files changed, 161 insertions, 0 deletions
diff --git a/keyboards/40percentclub/i75/promicro/config.h b/keyboards/40percentclub/i75/promicro/config.h
new file mode 100644
index 0000000000..bc9146328e
--- /dev/null
+++ b/keyboards/40percentclub/i75/promicro/config.h
@@ -0,0 +1,40 @@
+/* Copyright 2018
+ *
+ * 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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* key matrix size */
+#define MATRIX_ROWS 9
+#define MATRIX_COLS 9
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { B4, E6, D7, C6, D4, D0, D1, D2, D3 }
+#define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/40percentclub/i75/promicro/promicro.c b/keyboards/40percentclub/i75/promicro/promicro.c
new file mode 100644
index 0000000000..28684e7144
--- /dev/null
+++ b/keyboards/40percentclub/i75/promicro/promicro.c
@@ -0,0 +1,16 @@
+/* Copyright 2018
+ *
+ * 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/>.
+ */
+#include "i75.h"
diff --git a/keyboards/40percentclub/i75/promicro/promicro.h b/keyboards/40percentclub/i75/promicro/promicro.h
new file mode 100644
index 0000000000..29394855a6
--- /dev/null
+++ b/keyboards/40percentclub/i75/promicro/promicro.h
@@ -0,0 +1,47 @@
+/* Copyright 2018
+ *
+ * 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/>.
+ */
+
+#pragma once
+
+#include "i75.h"
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT_ortho_5x15( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, \
+ K16, K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, \
+ K33, K34, K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \
+ K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, K64, K65, \
+ K66, K67, K68, K70, K71, K72, K73, K74, K75, K76, K77, K78, K80, K81, K82 \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \
+ { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
+ { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
+ { K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \
+ { K70, K71, K72, K73, K74, K75, K76, K77, K78 }, \
+ { K80, K81, K82 } \
+}
diff --git a/keyboards/40percentclub/i75/promicro/rules.mk b/keyboards/40percentclub/i75/promicro/rules.mk
new file mode 100644
index 0000000000..dc6f196237
--- /dev/null
+++ b/keyboards/40percentclub/i75/promicro/rules.mk
@@ -0,0 +1,58 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = caterina
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096