”~“可以实现取反的操作,再加上if else 选择操作来判断。
static u8 switch_key0 = 0;
switch_key0 = ~switch_key0;if(switch_key0)
{
Moto_X_switch_On;
printf("1开\n");
}
else
{
Moto_X_switch_OFF;
printf("1关\n");
}
后续更新......
”~“可以实现取反的操作,再加上if else 选择操作来判断。
static u8 switch_key0 = 0;
switch_key0 = ~switch_key0;}
后续更新......