Skip to content

Commit e236f02

Browse files
committed
Stubbing out I2C helper functions
1 parent 955be0e commit e236f02

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

I2CSensor.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
}

I2CSensor.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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_ */

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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 \

main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
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

0 commit comments

Comments
 (0)