- |
|
1 |
// i2c slave addresses |
1 |
#define MAG_ADDR_R 0x3D //addresa pro cteni |
2 |
#define HMC5883L_WRT_ADDR 0x3C |
2 |
#define MAG_ADDR_W 0x3C |
3 |
#define HMC5883L_READ_ADDR 0x3D |
3 |
|
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 |
4 |
|
10 |
|
5 |
//Konstanty nastavujici rozsah |
11 |
//Konstanty nastavujici rozsah |
6 |
//pro void set_mag_roz (unsigned int8 h) |
12 |
//pro void set_mag_roz (unsigned int8 h) |
7 |
#define MAG_ROZ088 0x00 |
13 |
#define MAG_ROZ088 0x00 |
8 |
#define MAG_ROZ130 0x20 |
14 |
#define MAG_ROZ130 0x20 |
9 |
#define MAG_ROZ190 0x40 |
15 |
#define MAG_ROZ190 0x40 |
10 |
#define MAG_ROZ250 0x60 |
16 |
#define MAG_ROZ250 0x60 |
11 |
#define MAG_ROZ400 0x80 |
17 |
#define MAG_ROZ400 0x80 |
12 |
#define MAG_ROZ470 0xA0 |
18 |
#define MAG_ROZ470 0xA0 |
13 |
#define MAG_ROZ560 0xC0 |
19 |
#define MAG_ROZ560 0xC0 |
14 |
#define MAG_ROZ810 0xE0 |
20 |
#define MAG_ROZ810 0xE0 |
15 |
|
21 |
|
16 |
|
22 |
|
17 |
#include "HMC5883L.c" |
23 |
#include "HMC5883L.c" |