Skip to content
Snippets Groups Projects
Commit 6c33c5d7 authored by Cristian Maglie's avatar Cristian Maglie Committed by Cristian Maglie
Browse files

Fixed analogWriteResolution() behaviour for PWM pins

parent caf00d44
No related branches found
No related tags found
No related merge requests found
......@@ -260,10 +260,13 @@ void analogWrite( uint32_t ulPin, uint32_t ulValue )
break ;
}
ulValue = mapResolution(ulValue, _writeResolution, 8);
// Set PORT
if ( isTC )
{
// -- Configure TC
// DISABLE TCx
TCx->COUNT8.CTRLA.reg &=~(TC_CTRLA_ENABLE);
// Set Timer counter Mode to 8 bits
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment