]>
git.scottworley.com Git - tattlekey/blob - client/blink.c
9f1e419485c191e89291cff7f975bbbf52a8d8ff
1 /* tattlekey: A one-key UDP keyboard
2 * Copyright (C) 2023 Scott Worley <scottworley@scottworley.com>
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 #include "pico/cyw43_arch.h"
19 #include "pico/stdlib.h"
23 void one_blink(int duration
) {
24 cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN
, 1);
26 cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN
, 0);
30 void signal(int count
, int duration
) {
31 for (int i
= 0; i
< count
; i
++)
36 void blink_forever(int duration
) {
42 void signal_error_by_blinking() { blink_forever(100); }
43 void signal_success_by_blinking() { blink_forever(400); }