]> git.scottworley.com Git - tattlekey/blob - client/tattlekey.c
client: net: Fix port byte order
[tattlekey] / client / tattlekey.c
1 #include "pico/cyw43_arch.h"
2 #include "pico/stdlib.h"
3
4 #include "blink.h"
5 #include "config.h"
6 #include "net.h"
7
8 int main() {
9 stdio_init_all();
10 if (cyw43_arch_init_with_country(CYW43_COUNTRY_USA))
11 signal_error_by_blinking();
12 signal(1, 200);
13 cyw43_arch_enable_sta_mode();
14 signal(2, 200);
15 if (cyw43_arch_wifi_connect_timeout_ms(wifi_ssid, wifi_pass,
16 CYW43_AUTH_WPA2_AES_PSK, 10000))
17 signal_error_by_blinking();
18 signal(3, 200);
19
20 for (int i = 0;; i++) {
21 send_report(i, 0);
22 signal(4, 200);
23 }
24 }