mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +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
@@ -19,6 +19,7 @@
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
#include "HAL/handles/LimitedHandleResource.h"
|
||||
#include "HAL/handles/UnlimitedHandleResource.h"
|
||||
#include "HALInitializer.h"
|
||||
#include "MockData/AnalogInDataInternal.h"
|
||||
#include "MockData/DIODataInternal.h"
|
||||
#include "MockData/HAL_Value.h"
|
||||
@@ -85,6 +86,7 @@ void InitializeInterrupts() {
|
||||
extern "C" {
|
||||
HAL_InterruptHandle HAL_InitializeInterrupts(HAL_Bool watcher,
|
||||
int32_t* status) {
|
||||
hal::init::CheckInit();
|
||||
HAL_InterruptHandle handle = interruptHandles->Allocate();
|
||||
if (handle == HAL_kInvalidHandle) {
|
||||
*status = NO_AVAILABLE_RESOURCES;
|
||||
|
||||
Reference in New Issue
Block a user