Initial public khodo snapshot
ci / checks (push) Successful in 38m58s

This commit is contained in:
khodowany
2026-09-04 19:30:11 -05:00
commit 4f9a269f85
99 changed files with 59585 additions and 0 deletions
+73
View File
@@ -0,0 +1,73 @@
#pragma once
#ifndef NO_SYS
#define NO_SYS 1
#endif
#ifndef LWIP_SOCKET
#define LWIP_SOCKET 0
#endif
#define LWIP_NETCONN 0
#define MEM_LIBC_MALLOC 0
#define MEM_ALIGNMENT 4
#define MEM_SIZE 16000
#define MEMP_NUM_TCP_SEG 32
#define MEMP_NUM_ARP_QUEUE 10
#define PBUF_POOL_SIZE 24
#define LWIP_ARP 1
#define LWIP_ETHERNET 1
#define LWIP_ICMP 1
#define LWIP_RAW 1
#define LWIP_DHCP 1
#define LWIP_DNS 1
#define LWIP_IPV4 1
#define LWIP_TCP 1
#define LWIP_UDP 1
#define LWIP_TCP_KEEPALIVE 1
#define LWIP_NETIF_STATUS_CALLBACK 1
#define LWIP_NETIF_LINK_CALLBACK 1
#define LWIP_NETIF_HOSTNAME 1
#define LWIP_NETIF_TX_SINGLE_PBUF 1
#define LWIP_CHKSUM_ALGORITHM 3
#define DHCP_DOES_ARP_CHECK 0
#define LWIP_DHCP_DOES_ACD_CHECK 0
#define TCP_MSS 1460
#define TCP_WND (8 * TCP_MSS)
#define TCP_SND_BUF (8 * TCP_MSS)
#define TCP_SND_QUEUELEN ((4 * TCP_SND_BUF + TCP_MSS - 1) / TCP_MSS)
#define MEM_STATS 0
#define SYS_STATS 0
#define MEMP_STATS 0
#define LINK_STATS 0
#define ETHARP_DEBUG LWIP_DBG_OFF
#define NETIF_DEBUG LWIP_DBG_OFF
#define PBUF_DEBUG LWIP_DBG_OFF
#define API_LIB_DEBUG LWIP_DBG_OFF
#define API_MSG_DEBUG LWIP_DBG_OFF
#define SOCKETS_DEBUG LWIP_DBG_OFF
#define ICMP_DEBUG LWIP_DBG_OFF
#define INET_DEBUG LWIP_DBG_OFF
#define IP_DEBUG LWIP_DBG_OFF
#define IP_REASS_DEBUG LWIP_DBG_OFF
#define RAW_DEBUG LWIP_DBG_OFF
#define MEM_DEBUG LWIP_DBG_OFF
#define MEMP_DEBUG LWIP_DBG_OFF
#define SYS_DEBUG LWIP_DBG_OFF
#define TCP_DEBUG LWIP_DBG_OFF
#define TCP_INPUT_DEBUG LWIP_DBG_OFF
#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
#define TCP_RTO_DEBUG LWIP_DBG_OFF
#define TCP_CWND_DEBUG LWIP_DBG_OFF
#define TCP_WND_DEBUG LWIP_DBG_OFF
#define TCP_FR_DEBUG LWIP_DBG_OFF
#define TCP_QLEN_DEBUG LWIP_DBG_OFF
#define TCP_RST_DEBUG LWIP_DBG_OFF
#define UDP_DEBUG LWIP_DBG_OFF
#define TCPIP_DEBUG LWIP_DBG_OFF
#define PPP_DEBUG LWIP_DBG_OFF
#define SLIP_DEBUG LWIP_DBG_OFF
#define DHCP_DEBUG LWIP_DBG_OFF
+36
View File
@@ -0,0 +1,36 @@
#pragma once
#include <array>
#include <cstdint>
#include <types.hpp>
#include <vamp_style.hpp>
namespace vamp_pico {
constexpr auto display_width = std::int32_t{320};
constexpr auto display_height = std::int32_t{240};
constexpr auto color_black = std::uint16_t{0x0000};
constexpr auto color_white = std::uint16_t{0xffff};
constexpr auto color_gray = std::uint16_t{0x8410};
class display {
public:
auto init() -> void;
auto fill(std::uint16_t color) -> void;
auto fill_rect(std::int32_t x, std::int32_t y, std::int32_t width, std::int32_t height, std::uint16_t color) -> void;
auto draw_text(std::int32_t x, std::int32_t y, std::char_t const* text, std::uint16_t color, std::int32_t scale = 2) -> void;
auto show_boot(std::char_t const* line1, std::char_t const* line2, std::uint16_t accent) -> void;
auto show_remote(vamp_style::color status, std::char_t const* title, std::char_t const* part, std::uint32_t page, std::uint32_t pages, std::bool_t active) -> void;
private:
std::bool_t remote_valid_{};
vamp_style::color last_status_{};
std::bool_t last_active_{};
std::array<std::char_t, 96> last_title_{};
std::array<std::char_t, 48> last_part_{};
std::uint32_t last_page_{};
std::uint32_t last_pages_{};
};
}
+21
View File
@@ -0,0 +1,21 @@
#pragma once
#include <vamp_protocol/page_control.hpp>
#include <types.hpp>
namespace vamp_pico {
struct remote_display_state {
std::bool_t active{};
std::char_t title[96]{};
std::char_t part[48]{};
std::char_t mode[24]{};
std::uint32_t page{};
std::uint32_t pages{};
};
auto post_remote_command(vamp_protocol::page_command command, vamp_pico::remote_display_state& state) -> std::bool_t;
auto heartbeat() -> std::bool_t;
auto fetch_remote_display(vamp_pico::remote_display_state& state) -> std::bool_t;
}
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#include <cstdint>
#include <types.hpp>
namespace vamp_pico {
struct touch_point {
std::int32_t x{};
std::int32_t y{};
};
class touch_controller {
public:
auto init() -> void;
auto read(touch_point& point) -> std::bool_t;
};
}