Need help getting initialized with MSP430F5529 to lsm303agr using STMems_Standard_C_Divers
P4SEL |= 0x06; // Assign I2C pins P4.1, P4.2 to USCI_B1
UCB1CTL1 |= UCSWRST; // Enable SW reset
UCB1CTL0 = UCMST + UCMODE_3 + UCSYNC; // I2C Master, synchronous mode
UCB1CTL1 = UCSSEL_2 + UCSWRST; // Use SMCLK
UCB1BR0 = 12; // fSCL = SMCLK/12 = ~100kHz
UCB1BR1 = 0;
UCB1CTL1 &= ~UCSWRST; // Clear SW reset, resume operation
ret = lsm303agr_read_reg(ctx, LSM303AGR_WHO_AM_I_A, &ACC_Data_Raw[0], 1);
How do I define ctx?
