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

The bench log's columns per watched target. More...

#include "log_cols.h"
#include <stdio.h>
#include <string.h>

Functions

static bool target_name (uint16_t w, char *out, size_t n)
 What WATCH value w names, into out; false for none.
static bool logged (const uint16_t *map, unsigned c)
 Whether channel c of map reads something it names.
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 columns per watched target.

See log_cols.h.

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.

◆ logged()

bool logged ( const uint16_t * map,
unsigned c )
static

Whether channel c of map reads something it names.

Parameters
mapThe SENSE_MAP registers.
cThe channel.
Returns
true when the channel is logged.

◆ target_name()

bool target_name ( uint16_t w,
char * out,
size_t n )
static

What WATCH value w names, into out; false for none.

Parameters
wThe WATCH value.
outReceives the name.
nThe size of out, in bytes.
Returns
true when w names a target; false for none.