Files
templates/c/telemetry-logger/telemetry_gas.h
T
Andrey e93bd3b6aa style: унифицируй форматирование C и C++
Закрепи табуляцию и размещение скобок в настройках проекта. Примени единый стиль к собственным исходникам.
2026-12-02 11:33:41 +03:00

26 lines
771 B
C

#ifndef TELEMETRY_GAS_H
#define TELEMETRY_GAS_H
#include "telemetry_logger.h"
#include "gas_logger.h"
typedef struct
{
slog_t *log;
uint32_t schema_id;
uint32_t release_generation;
uint64_t unsigned_channels;
uint16_t base;
uint16_t channel_base;
bool recording;
} slog_gas_t;
/* GAS logger v1 register projection. Words at channel_base are consecutive.
* Use a caller-owned lock if reading and capturing from different contexts. */
bool slog_gas_init(slog_gas_t *gas, slog_t *log, uint16_t base, uint16_t channel_base,
uint32_t schema_id, uint64_t unsigned_channels);
gl_result slog_gas_read(const slog_gas_t *gas, uint16_t address, uint16_t *out, uint16_t count);
gl_result slog_gas_write(slog_gas_t *gas, uint16_t address, uint16_t value);
#endif