integrated sensor stand alone code used for int. test 2
Fork of Totalpni by
pni.h@0:b2d4134279d4, 2015-02-04 (annotated)
- Committer:
- cholletisaik777
- Date:
- Wed Feb 04 15:55:52 2015 +0000
- Revision:
- 0:b2d4134279d4
PNI code(integrated GYRO and MAGNETOMETER)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
cholletisaik777 | 0:b2d4134279d4 | 1 | #define SLAVE_ADDR 0x50 |
cholletisaik777 | 0:b2d4134279d4 | 2 | #define SLAVE_ADDR_READ 0x51 |
cholletisaik777 | 0:b2d4134279d4 | 3 | #define SENTRALSTATUS 0x37 |
cholletisaik777 | 0:b2d4134279d4 | 4 | #define RESETREQ 0x9B |
cholletisaik777 | 0:b2d4134279d4 | 5 | #define MAGRATE 0x55 |
cholletisaik777 | 0:b2d4134279d4 | 6 | #define ACCERATE 0x56 |
cholletisaik777 | 0:b2d4134279d4 | 7 | #define GYRORATE 0x57 |
cholletisaik777 | 0:b2d4134279d4 | 8 | #define QRATE_DIV 0x32 |
cholletisaik777 | 0:b2d4134279d4 | 9 | #define ALGO_CTRL 0x54 |
cholletisaik777 | 0:b2d4134279d4 | 10 | #define ENB_EVT 0x33 |
cholletisaik777 | 0:b2d4134279d4 | 11 | #define HOST_CTRL 0x34 |
cholletisaik777 | 0:b2d4134279d4 | 12 | #define EVT_STATUS 0x35 |
cholletisaik777 | 0:b2d4134279d4 | 13 | #define ALGO_STATUS 0x38 |
cholletisaik777 | 0:b2d4134279d4 | 14 | #define GYRO_XOUT_H 0x22 |
cholletisaik777 | 0:b2d4134279d4 | 15 | #define MAG_XOUT_H 0X12 |
cholletisaik777 | 0:b2d4134279d4 | 16 | |
cholletisaik777 | 0:b2d4134279d4 | 17 | //Configaration bits |
cholletisaik777 | 0:b2d4134279d4 | 18 | #define BIT_RESREQ 0x01 |
cholletisaik777 | 0:b2d4134279d4 | 19 | #define BIT_EEP_DET 0x01 |
cholletisaik777 | 0:b2d4134279d4 | 20 | #define BIT_EEP_UPDN 0x02 |
cholletisaik777 | 0:b2d4134279d4 | 21 | #define BIT_EEP_UPERR 0x04 |
cholletisaik777 | 0:b2d4134279d4 | 22 | #define BIT_EEP_IDLE 0x08 |
cholletisaik777 | 0:b2d4134279d4 | 23 | #define BIT_EEP_NODET 0x10 |
cholletisaik777 | 0:b2d4134279d4 | 24 | #define BIT_STBY 0x01 |
cholletisaik777 | 0:b2d4134279d4 | 25 | #define BIT_RAW_ENB 0x02 |
cholletisaik777 | 0:b2d4134279d4 | 26 | #define BIT_HPR_OUT 0x04 |
cholletisaik777 | 0:b2d4134279d4 | 27 | #define BIT_CPU_RES 0x01 |
cholletisaik777 | 0:b2d4134279d4 | 28 | #define BIT_ERR 0x02 |
cholletisaik777 | 0:b2d4134279d4 | 29 | #define BIT_QRES 0x04 |
cholletisaik777 | 0:b2d4134279d4 | 30 | #define BIT_MAG_RES 0x08 |
cholletisaik777 | 0:b2d4134279d4 | 31 | #define BIT_ACC_RES 0x10 |
cholletisaik777 | 0:b2d4134279d4 | 32 | #define BIT_GYRO_RES 0x20 |
cholletisaik777 | 0:b2d4134279d4 | 33 | #define BIT_GYROODR 0x0F |
cholletisaik777 | 0:b2d4134279d4 | 34 | #define BIT_MAGODR 0x64 |
cholletisaik777 | 0:b2d4134279d4 | 35 | #define BIT_RUN_ENB 0x01 |
cholletisaik777 | 0:b2d4134279d4 | 36 | #define BIT_ALGO_RAW 0x02 |
cholletisaik777 | 0:b2d4134279d4 | 37 | #define BIT_EVT_ENB 0X2A |