Make the left keyboard half send the state of the keys to the right half via I2C and make the right half send the relevant scancodes to the host via USB.
This commit is contained in:
19
left/src/i2c.h
Normal file
19
left/src/i2c.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef __I2C_H__
|
||||
#define __I2C_H__
|
||||
|
||||
// Macros:
|
||||
|
||||
#define I2C_BUS_BASEADDR I2C0
|
||||
#define I2C_BUS_CLK_SRC I2C0_CLK_SRC
|
||||
#define I2C_BUS_BAUD_RATE 100000 // 100 kHz works even with a 20 meter long bridge cable.
|
||||
#define I2C_BUS_MUX kPORT_MuxAlt2
|
||||
|
||||
#define I2C_BUS_SDA_PORT PORTB
|
||||
#define I2C_BUS_SDA_CLOCK kCLOCK_PortB
|
||||
#define I2C_BUS_SDA_PIN 4
|
||||
|
||||
#define I2C_BUS_SCL_PORT PORTB
|
||||
#define I2C_BUS_SCL_CLOCK kCLOCK_PortB
|
||||
#define I2C_BUS_SCL_PIN 3
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user