while (1)
{
HAL_Delay(200);
t++;
if(t%2==0)
{
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_8, 0);
p++;
if(p%2==0)
{
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_9, 0);
}
if(p%2==1)
{
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_9, 1);
}
}
if(t%2==1)
{
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_8, 1);
}
}
07-09
1255
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-20
06-04
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-08
9387
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)