Write testing code for setting pwm
fix the wrong register name also
Clean some useless commement and code
Prevent delay to be optimized
Use inline function to instead of macro
we need function to check the type of parameter