X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=keyboard%2Fergodox%2Ftwimaster.c;h=6959d81c0e1661924f04d19d98dabf629800f801;hb=777d1fba76c4c89b2e82ba6f62fb321f4ae68054;hp=a4dc5c11ad2525c6574cfa41b3384eead29f54ff;hpb=39da065913380c89246e6f788e1be772947c470e;p=tmk_firmware.git diff --git a/keyboard/ergodox/twimaster.c b/keyboard/ergodox/twimaster.c index a4dc5c1..6959d81 100644 --- a/keyboard/ergodox/twimaster.c +++ b/keyboard/ergodox/twimaster.c @@ -14,11 +14,11 @@ /* define CPU frequency in Mhz here if not defined in Makefile */ #ifndef F_CPU -#define F_CPU 4000000UL +#define F_CPU 16000000UL #endif /* I2C clock in Hz */ -#define SCL_CLOCK 100000L +#define SCL_CLOCK 400000L /************************************************************************* @@ -26,7 +26,7 @@ *************************************************************************/ void i2c_init(void) { - /* initialize TWI clock: 100 kHz clock, TWPS = 0 => prescaler = 1 */ + /* initialize TWI clock: 400 kHz clock, TWPS = 0 => prescaler = 1 */ TWSR = 0; /* no prescaler */ TWBR = ((F_CPU/SCL_CLOCK)-16)/2; /* must be > 10 for stable operation */