📄 pwm.ini
字号:
define char prevState0
define char prevState1
define int NUMOFPORTS
NUMOFPORTS = 2;
//This function evaluates the pin value and the previous state of the pin
//From that data a visual representation of the pin is printed in either
//the high, low, changed condition
func char print_Pin( char pinValue, char prevState )
{
if( pinValue == 0 )
{
if ( prevState == 0)
{
printf(" | ");
}
else
{
printf(" -----*");
prevState = 0;
}
}
else
{
if( prevState == 0 )
{
printf(" -----*");
prevState = 1;
}
else
{
printf(" |");
}
}
return( prevState );
}
//This function is run to visually represent the
func void pwm_Output( void )
{
prevState0 = print_Pin( (char) PWM0PIN, prevState0 );
prevState1 = print_Pin( (char) PWM1PIN, prevState1 );
printf("\n");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -