mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
[hal] Use new HMB api for addressable LED (#4479)
Theres is now a built in HMB api, but you have to dlopen it to access it. Moved our existing infrastructure for this to its own class, added the new functions, then updated interrupts and LEDs to use it.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <wpi/mutex.h>
|
||||
#include <wpi/timestamp.h>
|
||||
|
||||
#include "FPGACalls.h"
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "hal/ChipObject.h"
|
||||
@@ -394,6 +395,11 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int fpgaInit = hal::init::InitializeFPGA();
|
||||
if (fpgaInit != HAL_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
hal::init::InitializeHAL();
|
||||
|
||||
hal::init::HAL_IsInitialized.store(true);
|
||||
@@ -426,11 +432,7 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
status = InterruptManager::Initialize(global->getSystemInterface());
|
||||
|
||||
if (status != 0) {
|
||||
return false;
|
||||
}
|
||||
InterruptManager::Initialize(global->getSystemInterface());
|
||||
|
||||
hal::InitializeDriverStation();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user