X-Git-Url: http://git.scottworley.com/tattlekey/blobdiff_plain/5ec2b60aca31cb3f8f0da44017885bc08b72a6b2..8655eb017b9424d39740c87c322cb0df11302f39:/client/tattlekey.c diff --git a/client/tattlekey.c b/client/tattlekey.c index f34552b..910f696 100644 --- a/client/tattlekey.c +++ b/client/tattlekey.c @@ -1,23 +1,22 @@ /** - * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * Copyright (c) 2022 Raspberry Pi (Trading) Ltd. * * SPDX-License-Identifier: BSD-3-Clause */ +#include "pico/cyw43_arch.h" #include "pico/stdlib.h" int main() { -#ifndef PICO_DEFAULT_LED_PIN -#warning blink example requires a board with a regular LED -#else - const uint LED_PIN = PICO_DEFAULT_LED_PIN; - gpio_init(LED_PIN); - gpio_set_dir(LED_PIN, GPIO_OUT); + stdio_init_all(); + if (cyw43_arch_init()) { + printf("Wi-Fi init failed"); + return -1; + } while (true) { - gpio_put(LED_PIN, 1); + cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 1); sleep_ms(250); - gpio_put(LED_PIN, 0); + cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 0); sleep_ms(250); } -#endif }