mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +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:
@@ -3,13 +3,15 @@
|
||||
#include <iostream>
|
||||
|
||||
static const int NUM_MODULE_NUMBERS = 63;
|
||||
extern PCM *modules[NUM_MODULE_NUMBERS];
|
||||
extern PCM *PCM_modules[NUM_MODULE_NUMBERS];
|
||||
extern void initializePCM(int module);
|
||||
|
||||
extern "C" {
|
||||
|
||||
void *initializeCompressor(uint8_t module) {
|
||||
initializePCM(module);
|
||||
|
||||
return modules[module];
|
||||
return PCM_modules[module];
|
||||
}
|
||||
|
||||
bool checkCompressorModule(uint8_t module) {
|
||||
@@ -114,3 +116,5 @@ void clearAllPCMStickyFaults(void *pcm_pointer, int32_t *status) {
|
||||
|
||||
*status = module->ClearStickyFaults();
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user