summaryrefslogtreecommitdiffstats
path: root/keyboards/crkbd/i2c.h
diff options
context:
space:
mode:
authormarksard <38324387+marksard@users.noreply.github.com>2018-09-04 08:34:16 +0900
committerDrashna Jaelre <drashna@live.com>2018-09-03 16:34:16 -0700
commit35efcc9f398a1a2493b482dd1bd7c859f93ef450 (patch)
tree004b44e13067b8793ad9523340ce0539977bf8b9 /keyboards/crkbd/i2c.h
parentfa1ee47cf2293d06693b86e8dd188d9fbc9338c4 (diff)
Keyboard: Improvement of crkbd communication functions (based on helix-keyboard) (#3798)
* improvement of crkbd communication functions (based on helix-keyboard) * Removed unnecessary code. * Changed read restriction from #define to #pragma once. * Changed from sizeof to defined size. * moved lib folder to crkbdroot. removed warning of ws2812.d
Diffstat (limited to 'keyboards/crkbd/i2c.h')
-rw-r--r--keyboards/crkbd/i2c.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/keyboards/crkbd/i2c.h b/keyboards/crkbd/i2c.h
index c15b6bc506..710662c7ab 100644
--- a/keyboards/crkbd/i2c.h
+++ b/keyboards/crkbd/i2c.h
@@ -1,5 +1,4 @@
-#ifndef I2C_H
-#define I2C_H
+#pragma once
#include <stdint.h>
@@ -15,7 +14,7 @@
#define SLAVE_BUFFER_SIZE 0x10
-// i2c SCL clock frequency
+// i2c SCL clock frequency 400kHz
#define SCL_CLOCK 400000L
extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
@@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void);
extern unsigned char i2c_read(unsigned char ack);
#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
-
-#endif