summaryrefslogtreecommitdiff
path: root/keyboards/woodkeys/meira/issi.h
diff options
context:
space:
mode:
authorpeepeetee <43021794+peepeetee@users.noreply.github.com>2022-02-01 12:44:28 +0800
committerGitHub <noreply@github.com>2022-01-31 20:44:28 -0800
commitda5cb5fd6f91c2f7aebbcebbf211252c51d9b4a5 (patch)
tree22e9c5bd94715010c5b8fe65ac4c7baf0554e13e /keyboards/woodkeys/meira/issi.h
parent984481ff8e17173a0faaa12c524d0b502fb438cb (diff)
downloadqmk_firmware-da5cb5fd6f91c2f7aebbcebbf211252c51d9b4a5.tar.gz
qmk_firmware-da5cb5fd6f91c2f7aebbcebbf211252c51d9b4a5.zip
[Keyboard] move woodkeys.click keyboards to /woodkeys (#16113)
Diffstat (limited to 'keyboards/woodkeys/meira/issi.h')
-rwxr-xr-xkeyboards/woodkeys/meira/issi.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/keyboards/woodkeys/meira/issi.h b/keyboards/woodkeys/meira/issi.h
new file mode 100755
index 0000000000..74379ddbc8
--- /dev/null
+++ b/keyboards/woodkeys/meira/issi.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#ifdef ISSI_ENABLE
+
+typedef struct ISSIDeviceStruct{
+ uint8_t fn_dirty; // function registers need to be resent
+ uint8_t fn_device_addr;
+ uint8_t fn_register_addr;
+ uint8_t fn_registers[13];
+ uint8_t led_dirty; // LED data has changed and needs to be resent
+ uint8_t led_device_addr;
+ uint8_t led_register_addr;
+ uint8_t led_ctrl[18];
+ uint8_t led_blink_ctrl[18];
+ uint8_t led_pwm[144];
+}ISSIDeviceStruct;
+
+extern ISSIDeviceStruct *issi_devices[];
+
+// Low level commands- 'device' is the 2-bit i2c id.
+void issi_init(void);
+void set_shutdown(uint8_t device, uint8_t shutdown);
+void writeRegister8(uint8_t device, uint8_t frame, uint8_t reg, uint8_t data);
+
+// Higher level, no device is given, but it is calculated from 'matrix'
+// Each device has 2 blocks, max of 4 devices:
+// Device | Block = Matrix
+// 0 A 0
+// 0 B 1
+// 1 A 2
+// 1 B 3
+// 2 A 4
+// 2 B 5
+// 3 A 6
+// 3 B 7
+void activateLED(uint8_t matrix, uint8_t cx, uint8_t cy, uint8_t pwm);
+void update_issi(uint8_t device_addr, uint8_t blocking);
+
+#endif