Add firmware skeleton for RP2040
Complete working firmware including: - CMakeLists.txt for Pico SDK build - SSD1306 OLED driver (128x32, I2C) - High-resolution latency measurement using hardware timer - Debounced button with short/long press detection - Three modes: Single, Continuous, Stats - USB serial debugging output Includes 8x8 font with numbers and letters for display.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#ifndef DISPLAY_H
|
||||
#define DISPLAY_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// Initialize the OLED display
|
||||
void display_init(void);
|
||||
|
||||
// Clear the display
|
||||
void display_clear(void);
|
||||
|
||||
// Show latency value in milliseconds
|
||||
void display_latency(float latency_ms);
|
||||
|
||||
// Show "WAITING..." message
|
||||
void display_waiting(void);
|
||||
|
||||
// Show "TIMEOUT" message
|
||||
void display_timeout(void);
|
||||
|
||||
// Show statistics (min/max/avg)
|
||||
void display_stats(float min_ms, float max_ms, float avg_ms);
|
||||
|
||||
// Show mode indicator
|
||||
void display_mode(const char* mode);
|
||||
|
||||
// Update display (call periodically)
|
||||
void display_update(void);
|
||||
|
||||
#endif // DISPLAY_H
|
||||
Reference in New Issue
Block a user