diff --git a/lwipopts.h b/lwipopts.h index 6d230db..1b42a47 100644 --- a/lwipopts.h +++ b/lwipopts.h @@ -16,19 +16,22 @@ #define LWIP_ALTCP_TLS 1 #define LWIP_ALTCP_TLS_MBEDTLS 1 +// Bogus aligned value +#define CLANG_ALIGNMENT_1__________ 1 + // allow override in some examples #ifndef NO_SYS -#define NO_SYS 1 +# define NO_SYS 1 #endif // allow override in some examples #ifndef LWIP_SOCKET -#define LWIP_SOCKET 0 +# define LWIP_SOCKET 0 #endif #if PICO_CYW43_ARCH_POLL -#define MEM_LIBC_MALLOC 1 +# define MEM_LIBC_MALLOC 1 #else // MEM_LIBC_MALLOC is incompatible with non polling versions -#define MEM_LIBC_MALLOC 0 +# define MEM_LIBC_MALLOC 0 #endif #define MEM_ALIGNMENT 4 #define MEM_SIZE 4000 @@ -63,10 +66,13 @@ #define DHCP_DOES_ARP_CHECK 0 #define LWIP_DHCP_DOES_ACD_CHECK 0 +// Bogus aligned value +#define CLANG_ALIGNMENT_2__________ 2 + #ifndef NDEBUG -#define LWIP_DEBUG 1 -#define LWIP_STATS 1 -#define LWIP_STATS_DISPLAY 1 +# define LWIP_DEBUG 1 +# define LWIP_STATS 1 +# define LWIP_STATS_DISPLAY 1 #endif #define ETHARP_DEBUG LWIP_DBG_OFF @@ -98,4 +104,7 @@ #define SLIP_DEBUG LWIP_DBG_OFF #define DHCP_DEBUG LWIP_DBG_OFF +// Bogus aligned value +#define CLANG_ALIGNMENT_3__________ 3 + #endif /* __LWIPOPTS_H__ */ diff --git a/main.cpp b/main.cpp index 515b74c..d8cf087 100644 --- a/main.cpp +++ b/main.cpp @@ -4,37 +4,34 @@ /* Standard header files. */ +#include // for std::ceil #include #include -#include // for std::ceil - /* SDK header files. */ -#include "pico/stdlib.h" -#include "pico/cyw43_arch.h" #include "hardware/watchdog.h" - +#include "pico/cyw43_arch.h" +#include "pico/stdlib.h" /* Local header files. */ -#include "usbfs.h" #include "opt/config.h" #include "opt/httpclient.h" #include "opt/internals.h" - +#include "usbfs.h" /* Stuff from pimoroni example */ -#include "libraries/pico_graphics/pico_graphics.hpp" #include "cosmic_unicorn.hpp" - +#include "libraries/pico_graphics/pico_graphics.hpp" /* Our stuff. */ #include -typedef enum States { +typedef enum States +{ ST_DO_REQUEST = 0, ST_WAIT_RESPONSE, ST_HANDLE_RESPONSE, @@ -44,51 +41,56 @@ typedef enum States { std::vector split(const std::string& s); -class ZabbixAlert { - public: - ZabbixAlert( - uint32_t clock, uint32_t hostid, uint8_t severity, - uint8_t suppressed) : - clock(clock), hostid(hostid), severity(severity), - suppressed(suppressed) {} - - static ZabbixAlert from_csv(const std::string& s) { - /* "