[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [6107] Fix mag event handler for hmc5843
From: |
Allen Ibara |
Subject: |
[paparazzi-commits] [6107] Fix mag event handler for hmc5843 |
Date: |
Fri, 08 Oct 2010 05:36:48 +0000 |
Revision: 6107
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6107
Author: aibara
Date: 2010-10-08 05:36:48 +0000 (Fri, 08 Oct 2010)
Log Message:
-----------
Fix mag event handler for hmc5843
Modified Paths:
--------------
paparazzi3/trunk/sw/airborne/booz/peripherals/booz_hmc5843.c
paparazzi3/trunk/sw/airborne/booz/peripherals/booz_hmc5843.h
paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/imu/imu_b2.h
Modified: paparazzi3/trunk/sw/airborne/booz/peripherals/booz_hmc5843.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/peripherals/booz_hmc5843.c
2010-10-08 05:28:01 UTC (rev 6106)
+++ paparazzi3/trunk/sw/airborne/booz/peripherals/booz_hmc5843.c
2010-10-08 05:36:48 UTC (rev 6107)
@@ -3,7 +3,7 @@
#include "i2c.h"
struct Hmc5843 hmc5843;
-static struct i2c_transaction hmc5843_i2c_trans;
+struct i2c_transaction hmc5843_i2c_trans;
void hmc5843_init(void) {
hmc5843.status = HMC5843_UNINITIALIZED1;
Modified: paparazzi3/trunk/sw/airborne/booz/peripherals/booz_hmc5843.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/peripherals/booz_hmc5843.h
2010-10-08 05:28:01 UTC (rev 6106)
+++ paparazzi3/trunk/sw/airborne/booz/peripherals/booz_hmc5843.h
2010-10-08 05:36:48 UTC (rev 6107)
@@ -44,6 +44,7 @@
};
extern struct Hmc5843 hmc5843;
+extern struct i2c_transaction hmc5843_i2c_trans;
extern void hmc5843_init(void);
extern void hmc5843_periodic(void);
@@ -70,7 +71,7 @@
#define MagEvent(_m_handler) { \
if (hmc5843.status == HMC5843_READING && hmc5843_i2c_trans.status ==
I2CTransSuccess) { \
- memcpy(hmc5843.data.buf, (const void*)i2c2.buf, 6); \
+ memcpy(hmc5843.data.buf, (const void*)hmc5843_i2c_trans.buf, 6);
\
_m_handler(); \
hmc5843.status = HMC5843_IDLE; \
} \
Modified: paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/imu/imu_b2.h
===================================================================
--- paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/imu/imu_b2.h
2010-10-08 05:28:01 UTC (rev 6106)
+++ paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/imu/imu_b2.h
2010-10-08 05:36:48 UTC (rev 6107)
@@ -166,6 +166,11 @@
_mag_handler(); \
} \
}
+#elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC5843
+#include "peripherals/booz_hmc5843.h"
+#define ImuMagEvent(_mag_handler) { \
+ MagEvent(_mag_handler); \
+ }
#else
#define ImuMagEvent(_mag_handler) {}
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [6107] Fix mag event handler for hmc5843,
Allen Ibara <=