Line 1... |
Line -... |
1 |
// i2c slave addresses |
- |
|
2 |
#define HMC5883L_WRT_ADDR 0x3C |
- |
|
3 |
#define HMC5883L_READ_ADDR 0x3D |
- |
|
4 |
|
- |
|
5 |
// Register addresses |
- |
|
6 |
#define HMC5883L_CFG_A_REG 0x00 |
- |
|
7 |
#define HMC5883L_CFG_B_REG 0x01 |
- |
|
8 |
#define HMC5883L_MODE_REG 0x02 |
- |
|
9 |
#define HMC5883L_X_MSB_REG 0x03 |
- |
|
10 |
|
- |
|
11 |
//------------------------------ |
1 |
//------------------------------ |
12 |
// Low level routines |
2 |
// Low level routines |
13 |
//------------------------------ |
3 |
//------------------------------ |
14 |
void hmc5883l_write_reg(int8 reg, int8 data) |
4 |
void hmc5883l_write_reg(int8 reg, int8 data) |
15 |
{ |
5 |
{ |