bissl buggy Lauflicht, ich glaube es ist etwas besser jetzt
This commit is contained in:
+2
-1
@@ -125,6 +125,7 @@ int main(void)
|
||||
GPIOA->ODR |= MASK_LED_ALL;
|
||||
while(1){
|
||||
if((GPIOB->IDR & (1 << 0)) == 0){
|
||||
delay(20);
|
||||
state=0;
|
||||
break;
|
||||
}
|
||||
@@ -197,7 +198,7 @@ static void delay(const uint16_t ms)
|
||||
{
|
||||
for (uint16_t i = 0; i < ms; ++i)
|
||||
{
|
||||
if((GPIOB->IDR & (1 << 0)) == 0){
|
||||
if((GPIOB->IDR & (1 << 0) && state != 99) == 0){
|
||||
state = 99;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user