mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Make the HAL self initialize when ever any initialization function is called (#1012)
This commit is contained in:
committed by
Peter Johnson
parent
59a8e9da57
commit
e21a246a4d
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "HAL/I2C.h"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "MockData/I2CDataInternal.h"
|
||||
|
||||
using namespace hal;
|
||||
@@ -19,6 +20,7 @@ void InitializeI2C() {}
|
||||
|
||||
extern "C" {
|
||||
void HAL_InitializeI2C(HAL_I2CPort port, int32_t* status) {
|
||||
hal::init::CheckInit();
|
||||
SimI2CData[port].SetInitialized(true);
|
||||
}
|
||||
int32_t HAL_TransactionI2C(HAL_I2CPort port, int32_t deviceAddress,
|
||||
|
||||
Reference in New Issue
Block a user