diff options
Diffstat (limited to 'src/arch/msp430fr5969lp/driver/i2c.cc')
-rw-r--r-- | src/arch/msp430fr5969lp/driver/i2c.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/msp430fr5969lp/driver/i2c.cc b/src/arch/msp430fr5969lp/driver/i2c.cc index 55f8591..be41a50 100644 --- a/src/arch/msp430fr5969lp/driver/i2c.cc +++ b/src/arch/msp430fr5969lp/driver/i2c.cc @@ -8,7 +8,7 @@ signed char I2C::setup() { UCB0CTL1 = UCSWRST; UCB0CTLW0 = UCMODE_3 | UCMST | UCSYNC | UCSSEL_2 | UCSWRST | UCCLTO_1; - UCB0BRW = 0xf00; + UCB0BRW = (F_CPU / F_I2C) - 1; P1DIR &= ~(BIT6 | BIT7); P1SEL0 &= ~(BIT6 | BIT7); P1SEL1 |= BIT6 | BIT7; |