Logo Pico-Framework A web-first embedded framework for C++
Loading...
Searching...
No Matches
framework_config_old.h
Go to the documentation of this file.
1
12#ifndef FRAMEWORK_CONFIG_H
13#define FRAMEWORK_CONFIG_H
14#pragma once
15
24#define NTP_TIMEOUT_SECONDS 15
25
26
27#define EVENT_QUEUE_LENGTH 8 // Default max bufferred events in the queues
28
33#define WIFI_RETRY_TIMEOUT_MS 15000
34
38#define WIFI_MAX_RETRIES 5
39
46#define WIFI_REBOOT_ON_FAILURE false
52#define WIFI_MONITOR_INTERVAL_MS 30000 // Default: check every 30s
53
54
55
61#define MULTIPART_UPLOAD_PATH "/uploads"
62
63// Note that files of any length can be streamed from the server or uploaded multipart.
64// This is just the maximum size of the HTTP body that can be processed in one go.
65// However if a regular request is made with a body larger than this, it will be truncated.
66
67#if defined(PICO_RP2350)
68#define MAX_HTTP_BODY_LENGTH 4 * 1024
69#else
70#define MAX_HTTP_BODY_LENGTH 16 * 1024
71#endif
72
73#define HTTP_IDLE_TIMEOUT 500
74#define HTTP_RECEIVE_TIMEOUT 2000
75
76#define HTTP_BUFFER_SIZE 1460
77
78// === Framework configuration file ===
79// This file contains various configuration settings for the framework.
80#define STREAM_SEND_DELAY_MS 20
81
82#define ENABLE_GPIO_EVENTS
83
84// GPIO events can be configured to use either FreeRTOS notifications or event queues
85// Notifications are faster and more efficient, but events allow for data passing and broadcasting).
86// They can also be configured to do both
87#define GPIO_NOTIFICATIONS 1
88#define GPIO_EVENTS 2
89#define GPIO_EVENTS_AND_NOTIFICATIONS (GPIO_NOTIFICATIONS | GPIO_EVENTS)
90
91#ifndef GPIO_EVENT_HANDLING
92#define GPIO_EVENT_HANDLING GPIO_EVENTS_AND_NOTIFICATIONS
93#endif
94
95// === Debug Trace Configuration ===
96
97//#define QUIET_MODE ///< Set to disable all normal behavior print output, don't define to print
98
99#ifdef QUIET_MODE
100 #define QUIET_PRINTF(...) do {} while (0)
101#else
102 #define QUIET_PRINTF(...) printf(__VA_ARGS__)
103#endif
104
105// === Debug Trace Configuration ===
106
107#define TRACE_USE_TIMESTAMP 1
108#define TRACE_USE_SD 0
109
110//#define LFS_TRACE_YES // set to enable LittleFS trace output, comment out to disable
111
112// === Module-specific trace enables ===
113#define TRACE_AppContext 0
114#define TRACE_ChunkedDecoder 0
115#define TRACE_FatFsStorageManager 0
116#define TRACE_FrameworkApp 0
117#define TRACE_FrameworkController 0
118#define TRACE_FrameworkModel 0
119#define TRACE_FrameworkTask 0
120#define TRACE_FrameworkManager 0
121#define TRACE_HttpClient 0
122#define TRACE_HttpFileserver 0
123#define TRACE_HttpParser 0
124#define TRACE_HttpRequest 0
125#define TRACE_HttpResponse 0
126#define TRACE_HttpServer 0
127#define TRACE_Middleware 0
128#define TRACE_JsonParser 0
129#define TRACE_JsonRequestHelper 0
130#define TRACE_JsonService 0
131#define TRACE_JwtAuthenticator 0
132#define TRACE_LittleFsStorageManager 0
133#define TRACE_LwipDnsResolver 0
134#define TRACE_MultipartParser 0
135#define TRACE_Network 0
136#define TRACE_Router 0
137#define TRACE_Tcp 0
138#define TRACE_utility 0
139#define TRACE_TimeManager 0
140// etc.
141
142// === Global minimum log level (for all modules) ===
143// Options: 0 = INFO, 1 = WARN, 2 = ERROR
144#define TRACE_LEVEL_MIN TRACE_LVL_INFO
145#define TRACE_LOG_PATH "/framework_trace.log"
146
147#endif // FRAMEWORK_CONFIG_H