27#ifndef _PICO9918_DIAG_H
28#define _PICO9918_DIAG_H
32#include "pico9918_build_config.h"
40#ifndef PICO9918_DIAG_GPU_FRAME_COUNTER
42#define PICO9918_DIAG_GPU_FRAME_COUNTER 0
46#define PICO9918_DIAG_CHAR_WIDTH 6
47#define PICO9918_DIAG_CHAR_HEIGHT 6
57PICO9918_STATIC_ASSERT(
sizeof(PICO9918_PIXEL_T) == PICO9918_BUILD_PIXEL_SIZE,
58 "PICO9918_PIXEL_T does not match the width this library was built "
59 "with (see pico9918_build_config.h). Select the same pixel "
60 "policy the library used - one ships, and it is the default in "
61 "platform/ on both platforms.");
129 PICO9918_PIXEL_T* pixels);
134 PICO9918_PIXEL_T* pixels);
void pico9918_diag_set_clock_hz(float clockHz)
system clock, Hz
void pico9918_diag_init(void)
one-time initialisation of the panel value strings
void pico9918_diag_set_temperature(float tempC)
core temperature, degrees C
void pico9918_diag_set_version_info(const char *hwVersion, const char *fwVersion)
Version identity for the HWVER / FWVER rows.
void pico9918_diag_update(pico9918_t *tms9918, uint32_t frameCount)
recompute the panel values - call once per frame
void pico9918_diag_config_updated(pico9918_t *tms9918)
rebuild the panel row table - call whenever the PICO9918_CONF_DIAG* bytes change
int pico9918_diag_render_text(uint16_t scanline, const char *text, uint16_t x, uint16_t y, PICO9918_PIXEL_T fg, PICO9918_PIXEL_T *pixels)
render text into the scanline buffer, if row scanline falls in the glyph band starting at y.
void pico9918_diag_render(pico9918_t *tms9918, uint16_t y, uint32_t vVirtualPixels, PICO9918_PIXEL_T *pixels)
render the diagnostics panels for border row y
void pico9918_diag_set_output_name(const char *name, const char *units)
Display-mode label for the OUTPUT row, e.g.
void pico9918_diag_set_frame_rate(float frameRateHz)
Host display timing, Hz.
void pico9918_diag_update_render_time(uint32_t renderTime, uint32_t frameTime)
accumulate one scanline's render and total time, in microseconds
pico9918-core - core interface
#define PICO9918_INST_ARG
declare the instance ahead of other parameters
#define PICO9918_INST_ONLY_ARG
declare the instance as the only parameter
#define PICO9918_DLLEXPORT
the linkage every public entry point carries - see LINKAGE MODES above