func buttonHandler() { exti.L0.ClearPending() select { case c <- Green: default: // Signal that c is full. LED.SetBit(Blue) delay.Loop(1e5) LED.ClearBit(Blue) } }
func buttonHandler() { exti.L0.ClearPending() select { case c <- led: if led++; led > Red { led = Green } default: // Signal that c is full. LED.SetBit(Blue) delay.Loop(1e5) LED.ClearBit(Blue) } }