mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal] Remove HAL_GetPort (#7754)
This commit is contained in:
@@ -63,13 +63,12 @@ static inline int32_t GetFullRangeScaleFactor(DigitalPort* port) {
|
||||
|
||||
extern "C" {
|
||||
|
||||
HAL_DigitalHandle HAL_InitializePWMPort(HAL_PortHandle portHandle,
|
||||
HAL_DigitalHandle HAL_InitializePWMPort(int32_t channel,
|
||||
const char* allocationLocation,
|
||||
int32_t* status) {
|
||||
hal::init::CheckInit();
|
||||
|
||||
int16_t channel = getPortHandleChannel(portHandle);
|
||||
if (channel == InvalidHandleIndex) {
|
||||
if (channel < 0 || channel >= kNumPWMChannels) {
|
||||
*status = RESOURCE_OUT_OF_RANGE;
|
||||
hal::SetLastErrorIndexOutOfRange(status, "Invalid Index for PWM", 0,
|
||||
kNumPWMChannels, channel);
|
||||
|
||||
Reference in New Issue
Block a user