pic32/libraries/SoftPWMServo/SoftPWMServo.cpp
// Disable the SoftPWM functionality on a particular pin number
Disable the SoftPWM functionality on a particular pin number
Disable the SoftPWM functionality on a particular pin number
int32_t SoftPWMServoPinDisable(uint32_t Pin)
{
    int32_t intr;
    if (Pin >= SOFTPWMSERVO_MAX_PINS)
    {
        return SOFTPWMSERVO_ERROR;
    }
    intr = disableInterrupts();
    CopyBuffers();
    Remove(Pin);
    Chan[InactiveBuffer][Pin].SetPort = NULL;
    Chan[InactiveBuffer][Pin].ClearPort = NULL;
    Chan[InactiveBuffer][Pin].PWMValue = 0;
    restoreInterrupts(intr);    
    return SOFTPWMSERVO_OK;
}
int32_t SoftPWMServoPinDisable ( uint32_t Pin ) { int32_t intr ; if ( Pin >= SOFTPWMSERVO_MAX_PINS ) { return SOFTPWMSERVO_ERROR ; } intr = disableInterrupts ( ) ; CopyBuffers ( ) ; Remove ( Pin ) ; Chan [ InactiveBuffer ] [ Pin ] . SetPort = NULL ; Chan [ InactiveBuffer ] [ Pin ] . ClearPort = NULL ; Chan [ InactiveBuffer ] [ Pin ] . PWMValue = 0 ; restoreInterrupts ( intr ) ; return SOFTPWMSERVO_OK ; }
Disable the SoftPWM functionality on a particular pin number
Disable the SoftPWM functionality on a particular pin number
// Pull this one out of the linked list of active channels // Mark it as unused