diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-08 15:38:57 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-08 15:38:57 +0200 |
commit | e4b241c8ec4f12fe6ac479c2153cc540830e6a5d (patch) | |
tree | f2cbc6ed8421449f605e7e602785f45779cde6cc /main/config.def.h | |
parent | ebf45f066dfe308b6de1472399672fd132c157b4 (diff) |
clean up repository
Diffstat (limited to 'main/config.def.h')
-rw-r--r-- | main/config.def.h | 69 |
1 files changed, 59 insertions, 10 deletions
diff --git a/main/config.def.h b/main/config.def.h index 7fcaed9..11612eb 100644 --- a/main/config.def.h +++ b/main/config.def.h @@ -1,17 +1,66 @@ #pragma once #include <pico/cyw43_arch.h> +#include <cyw43_country.h> -// wifi credentials -#define CONF_NET_SSID "network name" -#define CONF_NET_PASS "network password" -#define CONF_NET_AUTH CYW43_AUTH_WPA2_AES_PSK -// max duration (milliseconds) for establishing wifi connection -#define CONF_NET_CONN_TIMEOUT 10e3 +/** + * \name Network (Wi-Fi) configuration + * \{ + */ +#ifndef CFG_NET_DISABLE -#include <cyw43_country.h> -#define CONF_NET_COUNTRY CYW43_COUNTRY_NETHERLANDS +#ifndef CFG_NET_SSID +//! network name (SSID) +#define CFG_NET_SSID "" +//! disable network communication +#define CFG_NET_DISABLE +#warning No SSID defined! Disabling network communication! +#endif + +#ifndef CFG_NET_PASS +//! network password +#define CFG_NET_PASS "" +#endif + +#ifndef CFG_NET_AUTH +//! network security type +#define CFG_NET_AUTH CYW43_AUTH_OPEN +#endif + +#ifndef CFG_NET_CONN_TIMEOUT +//! max duration (milliseconds) for establishing wifi connection +#define CFG_NET_CONN_TIMEOUT 10e3 +#endif + +#ifndef CFG_NET_COUNTRY +//! radio communications country +#define CFG_NET_COUNTRY CYW43_COUNTRY_NETHERLANDS +#endif + +#else // ifndef CFG_NET_DISABLE + +#undef CFG_NET_COUNTRY +#define CFG_NET_COUNTRY CYW43_COUNTRY_WORLDWIDE + +#endif // ifndef CFG_NET_DISABLE +/** \} */ + +/** + * \name i2ctcp server configuration + * \{ + */ +#ifndef CFG_SRV_PORT +//! i2ctcp server port +#define CFG_SRV_PORT 9191 +#endif -#define CONF_SRV_PORT 9191 +#ifndef CFG_NET_DISABLE +//! disable the i2ctcp server +#define CFG_SRV_DISABLE +#endif +/** \} */ -#define LED_PIN CYW43_WL_GPIO_LED_PIN +#ifndef CFG_LED_PIN +//! status LED pin +#define CFG_LED_PIN CYW43_WL_GPIO_LED_PIN +#endif |