Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. int adr= LSM303_ADDRESS_ACCEL;
  2. int reg= LSM303_REGISTER_ACCEL_CTRL_REG1_A;
  3. unsigned char value=0x27;
  4. const unsigned char buf[] = {static_cast <unsigned char > (reg),value};
  5. periph::blk::tx_transfer tran(buf,sizeof buf);
  6. i2c1.transaction(adr, tran);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement