I am using the board STM32F3 and I am trying to establish I2C communication between the microcontroller and the accelerometer LSM303DLHC by using the HAL functions. This is the code:
uint8_t IC[4];
#define acc 0b0011001
IC[0] = 0x20; // register adress
IC[1] = 0x87; // data to write
HAL_I2C_Master_Transmit(&hi2c1, acc<<1, IC, 2, 10);
When I compile, I obtain the following errors:
error: #165: too few arguments in function call
error: #18: expected a ")"
I have no idea how to debug this code, can someone help me?
#include
s. Smells like some stray(
or semicolon. \$\endgroup\$