Fix check for connected pins
This commit is contained in:
1 parent
c190318bb9
commit
027bcd348c
1 file changed
+1
-1
@@ -244,7 +244,7 @@ uint8_t HardwarePWM::usedChannelCount(void)
|
||||
uint8_t usedChannels = 0;
|
||||
for(int i=0; i<MAX_CHANNELS; i++)
|
||||
{
|
||||
if ( _pwm->PSEL.OUT[i] & PWM_PSEL_OUT_CONNECT_Msk )
|
||||
if ( (_pwm->PSEL.OUT[i] & PWM_PSEL_OUT_CONNECT_Msk) != (PWM_PSEL_OUT_CONNECT_Disconnected << PWM_PSEL_OUT_CONNECT_Pos) )
|
||||
{
|
||||
usedChannels++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user