File tree Expand file tree Collapse file tree 4 files changed +31
-0
lines changed
Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ ChibiCopter - https://github.com/grantmd/ChibiCopter
3+ A quadcopter platform running under ChibiOS/RT.
4+
5+ Convenience functions for accessing I2C data
6+ */
7+
8+ #include "ch.h"
9+ #include "hal.h"
10+
11+ #include "I2CSensor.h"
12+
13+ void I2CSensorInit (void ){
14+ }
Original file line number Diff line number Diff line change 1+ /*
2+ ChibiCopter - https://github.com/grantmd/ChibiCopter
3+ A quadcopter platform running under ChibiOS/RT.
4+
5+ Convenience functions for accessing I2C data
6+ */
7+
8+ #ifndef _I2C_H_
9+ #define _I2C_H_
10+
11+ // Public functions
12+ void I2CSensorInit (void );
13+
14+ #endif /* _I2C_H_ */
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ CSRC = $(PORTSRC) \
8686 $(CHIBIOS)/os/various/devices_lib/accel/lis302dl.c \
8787 $(CHIBIOS)/os/various/chprintf.c \
8888 Comms.c \
89+ I2CSensor.c \
8990 Accel.c \
9091 Gyro.c \
9192 Spektrum.c \
Original file line number Diff line number Diff line change 1111#include "hal.h"
1212
1313#include "Comms.h"
14+ #include "I2CSensor.h"
1415#include "Accel.h"
1516#include "Gyro.h"
1617#include "Spektrum.h"
@@ -73,6 +74,7 @@ int main(void){
7374 * Sensor I/O
7475 */
7576 mavlink_system .state = MAV_STATE_CALIBRATING ;
77+ I2CSensorInit ();
7678 AccelInit ();
7779 GyroInit ();
7880
You can’t perform that action at this time.
0 commit comments