- gc9a01.c/h: GC9A01 240x240 round LCD SPI driver (SPI2, GPIO 9-14) 5x7 bitmap font with scaling, display_fill_rect/draw_string/draw_arc - main.c: hud_task — "SAULT" orange header (scale=3) + battery voltage white on black (scale=4), updates at 1 Hz from g_vesc[0].voltage_x10 - config.h: add DISP_* GPIO defines; revert 06219af UART regression — lsusb on Orin confirms /dev/ttyACM0 = CH343 (1a86:55d3) wired to GPIO 43/44, not native USB; UART must stay on 43/44, CAN stays on 2/1 (SN65HVD230 physical rewire to GPIO 2/1 still required for CAN to work) - CMakeLists.txt: add gc9a01.c Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
926 B
C
25 lines
926 B
C
#pragma once
|
||
/* gc9a01.h — GC9A01 240×240 round LCD SPI driver (bd-1yr8 display bead) */
|
||
|
||
#include <stdint.h>
|
||
|
||
/* ── Initialise SPI bus + GC9A01. Call once from app_main. ── */
|
||
void gc9a01_init(void);
|
||
|
||
/* ── Display primitives (also satisfy ota_display.h contract) ── */
|
||
void display_fill_rect(int x, int y, int w, int h, uint16_t rgb565);
|
||
void display_draw_string(int x, int y, const char *str, uint16_t fg, uint16_t bg);
|
||
void display_draw_string_s(int x, int y, const char *str,
|
||
uint16_t fg, uint16_t bg, int scale);
|
||
void display_draw_arc(int cx, int cy, int r,
|
||
int start_deg, int end_deg, int thickness, uint16_t color);
|
||
|
||
/* ── Colour palette (RGB565) ── */
|
||
#define COL_BG 0x0000u
|
||
#define COL_WHITE 0xFFFFu
|
||
#define COL_GREEN 0x07E0u
|
||
#define COL_YELLOW 0xFFE0u
|
||
#define COL_RED 0xF800u
|
||
#define COL_BLUE 0x001Fu
|
||
#define COL_ORANGE 0xFD20u
|