Commit a6627709 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

MSP430 I2C: Configurable I2C frequency

parent 69c6db98
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;