summaryrefslogtreecommitdiffstats
path: root/keyboards/handwired/not_so_minidox/serial.h
diff options
context:
space:
mode:
authormtdjr <mtdjr@users.noreply.github.com>2018-05-31 17:30:05 +0200
committerDrashna Jaelre <drashna@live.com>2018-05-31 17:30:05 +0200
commitee9a7aba396160929604aca54a23ad5534d59940 (patch)
treef4fbbde03ed548a68fd56bec5c6baf8cf217f180 /keyboards/handwired/not_so_minidox/serial.h
parent21ad968ac14b177a7c97d34106c4d6201912627f (diff)
downloadqmk_firmware-ee9a7aba396160929604aca54a23ad5534d59940.tar.gz
qmk_firmware-ee9a7aba396160929604aca54a23ad5534d59940.tar.xz
add not-so-minidox handwire keyboard (#3061)
* add not-so-minidox handwire keyboard * corrected keymap * multiple adjustments to not_so_minidox keyboard * remove I2C master left define * update default layer set function * move solenoid code into userspace * minor adjustments to config.h * update keymaps to utilize userspace * move features and config to userspace, correct build issue * correct solenoid pin * adjust defaults for solenoid pin and enable * default solenoid to on for not_so_minidox * disable RGBLIGHT_SLEEP for xd75 * tweaking solenoid enable/disable in userspace and keymaps
Diffstat (limited to 'keyboards/handwired/not_so_minidox/serial.h')
-rw-r--r--keyboards/handwired/not_so_minidox/serial.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/keyboards/handwired/not_so_minidox/serial.h b/keyboards/handwired/not_so_minidox/serial.h
new file mode 100644
index 000000000..15fe4db7b
--- /dev/null
+++ b/keyboards/handwired/not_so_minidox/serial.h
@@ -0,0 +1,26 @@
+#ifndef MY_SERIAL_H
+#define MY_SERIAL_H
+
+#include "config.h"
+#include <stdbool.h>
+
+/* TODO: some defines for interrupt setup */
+#define SERIAL_PIN_DDR DDRD
+#define SERIAL_PIN_PORT PORTD
+#define SERIAL_PIN_INPUT PIND
+#define SERIAL_PIN_MASK _BV(PD0)
+#define SERIAL_PIN_INTERRUPT INT0_vect
+
+#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+#define SERIAL_MASTER_BUFFER_LENGTH 1
+
+// Buffers for master - slave communication
+extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
+extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
+
+void serial_master_init(void);
+void serial_slave_init(void);
+int serial_update_buffers(void);
+bool serial_slave_data_corrupt(void);
+
+#endif