SCRIPT namespace replacements

This commit is contained in:
PJ Reiniger
2025-11-07 20:00:05 -05:00
committed by Peter Johnson
parent ae6c043632
commit 9aca8e0fd6
2622 changed files with 22275 additions and 22275 deletions

View File

@@ -15,22 +15,22 @@
#include "mockdata/PWMDataInternal.h"
#include "wpi/hal/handles/HandlesInternal.h"
using namespace hal;
using namespace wpi::hal;
namespace hal::init {
namespace wpi::hal::init {
void InitializePWM() {}
} // namespace hal::init
} // namespace wpi::hal::init
extern "C" {
HAL_DigitalHandle HAL_InitializePWMPort(int32_t channel,
const char* allocationLocation,
int32_t* status) {
hal::init::CheckInit();
wpi::hal::init::CheckInit();
if (channel < 0 || channel >= kNumPWMChannels) {
*status = RESOURCE_OUT_OF_RANGE;
hal::SetLastErrorIndexOutOfRange(status, "Invalid Index for PWM", 0,
wpi::hal::SetLastErrorIndexOutOfRange(status, "Invalid Index for PWM", 0,
kNumPWMChannels, channel);
return HAL_kInvalidHandle;
}
@@ -50,10 +50,10 @@ HAL_DigitalHandle HAL_InitializePWMPort(int32_t channel,
if (*status != 0) {
if (port) {
hal::SetLastErrorPreviouslyAllocated(status, "PWM or DIO", channel,
wpi::hal::SetLastErrorPreviouslyAllocated(status, "PWM or DIO", channel,
port->previousAllocation);
} else {
hal::SetLastErrorIndexOutOfRange(status, "Invalid Index for PWM", 0,
wpi::hal::SetLastErrorIndexOutOfRange(status, "Invalid Index for PWM", 0,
kNumPWMChannels, channel);
}
return HAL_kInvalidHandle; // failed to allocate. Pass error back.