diag: trace RTC synchronization and WSS clock state

This commit is contained in:
chenjintao
2026-10-26 11:55:40 +08:00
parent b2c78208bf
commit c53a117368
14 changed files with 439 additions and 4 deletions
+37
View File
@@ -0,0 +1,37 @@
#ifndef TALKINGQ_TIME_DIAG_ABI_H
#define TALKINGQ_TIME_DIAG_ABI_H
/* Shared by the ARMCC kernel and GCC application. No pointers or enums in ABI. */
#define TALKINGQ_TIME_DIAG_ABI_VERSION 1U
#define TALKINGQ_TIME_DIAG_API_NAME "talkingq_time_diag_snapshot_v1"
#define TALKINGQ_TIME_DIAG_API_HASH 0x11B09482U
typedef struct {
unsigned int abi_version;
unsigned int sample_ticks;
unsigned int rtc_initialized;
unsigned int counter;
unsigned int sys_offset;
unsigned int app_offset;
unsigned int app_follows_sys;
unsigned int app_ever_configured;
int offset_storage;
int network_tz_minutes;
int rtc_tz_hours;
int rtc_source;
int ntp_type;
int ntp_status;
int ntp_ready;
int gnss_rtc_status;
int gnss_cid;
int ntp_triggers;
int ntp_dns_attempted;
char ntp_server[32];
} talkingq_time_diag_snapshot;
typedef int (*talkingq_time_diag_snapshot_fn)(talkingq_time_diag_snapshot *, unsigned int);
int talkingq_time_diag_snapshot_v1(talkingq_time_diag_snapshot *out, unsigned int size);
void talkingq_time_diag_trace(const char *phase);
#endif