]> git.scottworley.com Git - tattlekey/blame - client/config.h
client: const config
[tattlekey] / client / config.h
CommitLineData
fbc57595
SW
1#ifndef CONFIG_H
2#define CONFIG_H
3
1e0a316e
SW
4#include "lwip/arch.h"
5
1d699cc3 6/* Wi-Fi credentials */
e8a53974
SW
7extern const char config_wifi_ssid[];
8extern const char config_wifi_pass[];
fbc57595 9
1d699cc3 10/* Network address of the server to contact */
e8a53974
SW
11extern const char config_tattle_server_ip_address[];
12extern const u16_t config_tattle_port;
1e0a316e 13
1d699cc3 14/* For distinguishing reports from multiple tattlekey devices. */
e8a53974 15extern const u16_t config_this_tattler_identity;
1e0a316e 16
d1521eda
SW
17/* Which GPIO pin is the button connected to?
18 * The button should span this pin and ground, connecting this pin to ground
19 * when pressed.
20 * https://projects.raspberrypi.org/en/projects/introduction-to-the-pico/10
21 * recommends pins 18, 22, or 28. */
e8a53974 22extern const uint config_button_pin;
d1521eda 23
2f7a1e89
SW
24/* Don't bother reporting each separate button press when it is pressed many
25 * times in short succession. (We also use this to de-bounce. :) */
e8a53974 26extern const u32_t config_minimum_seconds_between_button_presses;
2f7a1e89 27
ff379463 28/* Send each report multiple times. */
e8a53974 29extern const uint config_resend_count;
ff379463 30
a36c278f
SW
31/* These control the size of the per-send-count press queues.
32When the button is pressed more than config_maximum_queue_size times
33within the resend interval, some presses will be reported fewer
34than config_resend_count times. This is usually fine because it's
35the old, longest-delyed, most-redundant reports that get dropped;
36fresh, timely reports of new button presses will not get anywhere near
37config_resend_count in a resend interval because the early resend interals
38are so short. */
e8a53974 39extern const uint config_maximum_queue_size;
a36c278f
SW
40
41/* This is paranoia about unanticipated delays. Setting this to zero
42would pobably be fine, but imposing a minimum queue size is an easy
43safety measure. */
e8a53974 44extern const uint config_minimum_queue_size;
a36c278f 45
fbc57595 46#endif