mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
HAL: Use extern "C" in implementation files.
This turns accidental parameter mismatches between header and implementation into compiler errors. Change-Id: Ic26fabb82b2fd5f79407a11435cdbd35348af15f
This commit is contained in:
@@ -171,6 +171,8 @@ static double unpackAxis(int16_t raw) {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
/**
|
||||
* Set the accelerometer to active or standby mode. It must be in standby
|
||||
* mode to change any configuration.
|
||||
@@ -232,3 +234,5 @@ double getAccelerometerZ() {
|
||||
int raw = (readRegister(kReg_OutZMSB) << 4) | (readRegister(kReg_OutZLSB) >> 4);
|
||||
return unpackAxis(raw);
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user