rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
log_cols.h File Reference

The bench log's INA3221 columns with SENSE_MAP in force (protocol 4.25): one group of three per channel that watches something, named after what it watches: FAST's channel first, then the others in channel order, at most LOG_COLS_GROUPS of them. More...

#include <stdbool.h>
#include <stdint.h>
#include "link_pages.h"

Go to the source code of this file.

Data Structures

struct  log_cols_t
 The log's columns: their number, targets and names. More...

Macros

#define LOG_COLS_MAX   LINK_SM_CHANNELS
#define LOG_COLS_GROUPS   3u
 The groups a file carries: its 14 other columns and 3 groups of 3 make 23 of the 24 the reader takes.
#define LOG_COL_NAME_MAX   20u
 "supply 0x43 ch3" and its terminator.

Functions

void log_cols_from_map (const uint16_t *map, log_cols_t *out)
 The groups SENSE_MAP registers 0 to 25 map make, into out; none for a NULL map.

Detailed Description

The bench log's INA3221 columns with SENSE_MAP in force (protocol 4.25): one group of three per channel that watches something, named after what it watches: FAST's channel first, then the others in channel order, at most LOG_COLS_GROUPS of them.

The reader takes 24 columns (LOG_MAX_COLUMNS), and the bench file's other columns are 14 of them, so a channel past the third watching one is not logged.

A channel takes a group when its part is enabled, its shunt is not 0 and its WATCH is not NONE. The group is "<target> current (A); <target> max (A); <target> voltage (V)": the window's mean and highest current and its lowest bus voltage. <target> is "out N" for output channel N, "port N" for programming port N and "supply" for the supply rail. Two channels that watch the same target each name their channel after it, "out 3 0x41 ch2", so no two columns share a name.

SPDX-License-Identifier: MIT

Function Documentation

◆ log_cols_from_map()

void log_cols_from_map ( const uint16_t * map,
log_cols_t * out )

The groups SENSE_MAP registers 0 to 25 map make, into out; none for a NULL map.

Parameters
mapThe SENSE_MAP registers 0 to 25, or NULL.
outReceives the groups.