sr: input/output: Mark more symbols with SR_PRIV.
This commit is contained in:
parent
0f8522bf74
commit
7c1d391c8b
|
@ -102,7 +102,7 @@ static int loadfile(struct sr_input *in, const char *filename)
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
struct sr_input_format input_binary = {
|
||||
SR_PRIV struct sr_input_format input_binary = {
|
||||
.id = "binary",
|
||||
.description = "Raw binary",
|
||||
.format_match = format_match,
|
||||
|
|
|
@ -167,7 +167,7 @@ static int loadfile(struct sr_input *in, const char *filename)
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
struct sr_input_format input_chronovu_la8 = {
|
||||
SR_PRIV struct sr_input_format input_chronovu_la8 = {
|
||||
.id = "chronovu-la8",
|
||||
.description = "ChronoVu LA8",
|
||||
.format_match = format_match,
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#include "sigrok.h"
|
||||
#include "sigrok-internal.h"
|
||||
|
||||
extern struct sr_input_format input_chronovu_la8;
|
||||
extern struct sr_input_format input_binary;
|
||||
extern SR_PRIV struct sr_input_format input_chronovu_la8;
|
||||
extern SR_PRIV struct sr_input_format input_binary;
|
||||
|
||||
static struct sr_input_format *input_module_list[] = {
|
||||
&input_chronovu_la8,
|
||||
|
|
|
@ -437,7 +437,7 @@ static int data_ascii(struct sr_output *o, const char *data_in,
|
|||
}
|
||||
#endif
|
||||
|
||||
struct sr_output_format output_analog_bits = {
|
||||
SR_PRIV struct sr_output_format output_analog_bits = {
|
||||
.id = "analog_bits",
|
||||
.description = "Bits (takes argument, default 64)",
|
||||
.df_type = SR_DF_ANALOG,
|
||||
|
@ -445,6 +445,7 @@ struct sr_output_format output_analog_bits = {
|
|||
.data = data_bits,
|
||||
.event = event,
|
||||
};
|
||||
|
||||
#if 0
|
||||
struct sr_output_format output_analog_hex = {
|
||||
.id = "analog_hex",
|
||||
|
|
|
@ -59,7 +59,7 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
struct sr_output_format output_binary = {
|
||||
SR_PRIV struct sr_output_format output_binary = {
|
||||
.id = "binary",
|
||||
.description = "Raw binary",
|
||||
.df_type = SR_DF_LOGIC,
|
||||
|
|
|
@ -231,7 +231,7 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
struct sr_output_format output_chronovu_la8 = {
|
||||
SR_PRIV struct sr_output_format output_chronovu_la8 = {
|
||||
.id = "chronovu-la8",
|
||||
.description = "ChronoVu LA8",
|
||||
.df_type = SR_DF_LOGIC,
|
||||
|
|
|
@ -216,7 +216,7 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
struct sr_output_format output_csv = {
|
||||
SR_PRIV struct sr_output_format output_csv = {
|
||||
.id = "csv",
|
||||
.description = "Comma-separated values (CSV)",
|
||||
.df_type = SR_DF_LOGIC,
|
||||
|
|
|
@ -277,7 +277,7 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
struct sr_output_format output_gnuplot = {
|
||||
SR_PRIV struct sr_output_format output_gnuplot = {
|
||||
.id = "gnuplot",
|
||||
.description = "Gnuplot",
|
||||
.df_type = SR_DF_LOGIC,
|
||||
|
|
|
@ -124,7 +124,7 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
struct sr_output_format output_ols = {
|
||||
SR_PRIV struct sr_output_format output_ols = {
|
||||
.id = "ols",
|
||||
.description = "OpenBench Logic Sniffer",
|
||||
.df_type = SR_DF_LOGIC,
|
||||
|
|
|
@ -20,17 +20,17 @@
|
|||
#include "sigrok.h"
|
||||
#include "sigrok-internal.h"
|
||||
|
||||
extern struct sr_output_format output_text_bits;
|
||||
extern struct sr_output_format output_text_hex;
|
||||
extern struct sr_output_format output_text_ascii;
|
||||
extern struct sr_output_format output_binary;
|
||||
extern struct sr_output_format output_vcd;
|
||||
extern struct sr_output_format output_ols;
|
||||
extern struct sr_output_format output_gnuplot;
|
||||
extern struct sr_output_format output_chronovu_la8;
|
||||
extern struct sr_output_format output_csv;
|
||||
/* extern struct sr_output_format output_analog_bits; */
|
||||
/* extern struct sr_output_format output_analog_gnuplot; */
|
||||
extern SR_PRIV struct sr_output_format output_text_bits;
|
||||
extern SR_PRIV struct sr_output_format output_text_hex;
|
||||
extern SR_PRIV struct sr_output_format output_text_ascii;
|
||||
extern SR_PRIV struct sr_output_format output_binary;
|
||||
extern SR_PRIV struct sr_output_format output_vcd;
|
||||
extern SR_PRIV struct sr_output_format output_ols;
|
||||
extern SR_PRIV struct sr_output_format output_gnuplot;
|
||||
extern SR_PRIV struct sr_output_format output_chronovu_la8;
|
||||
extern SR_PRIV struct sr_output_format output_csv;
|
||||
/* extern SR_PRIV struct sr_output_format output_analog_bits; */
|
||||
/* extern SR_PRIV struct sr_output_format output_analog_gnuplot; */
|
||||
|
||||
static struct sr_output_format *output_module_list[] = {
|
||||
&output_text_bits,
|
||||
|
|
|
@ -25,13 +25,14 @@
|
|||
#include "sigrok-internal.h"
|
||||
#include "text.h"
|
||||
|
||||
int init_ascii(struct sr_output *o)
|
||||
SR_PRIV int init_ascii(struct sr_output *o)
|
||||
{
|
||||
return init(o, DEFAULT_BPL_ASCII, MODE_ASCII);
|
||||
}
|
||||
|
||||
int data_ascii(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||
char **data_out, uint64_t *length_out)
|
||||
SR_PRIV int data_ascii(struct sr_output *o, const char *data_in,
|
||||
uint64_t length_in, char **data_out,
|
||||
uint64_t *length_out)
|
||||
{
|
||||
struct context *ctx;
|
||||
unsigned int outsize, offset, p;
|
||||
|
@ -114,7 +115,7 @@ int data_ascii(struct sr_output *o, const char *data_in, uint64_t length_in,
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
struct sr_output_format output_text_ascii = {
|
||||
SR_PRIV struct sr_output_format output_text_ascii = {
|
||||
.id = "ascii",
|
||||
.description = "ASCII (takes argument, default 74)",
|
||||
.df_type = SR_DF_LOGIC,
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
#include "sigrok-internal.h"
|
||||
#include "text.h"
|
||||
|
||||
int init_bits(struct sr_output *o)
|
||||
SR_PRIV int init_bits(struct sr_output *o)
|
||||
{
|
||||
return init(o, DEFAULT_BPL_BITS, MODE_BITS);
|
||||
}
|
||||
|
||||
int data_bits(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||
char **data_out, uint64_t *length_out)
|
||||
SR_PRIV int data_bits(struct sr_output *o, const char *data_in,
|
||||
uint64_t length_in, char **data_out, uint64_t *length_out)
|
||||
{
|
||||
struct context *ctx;
|
||||
unsigned int outsize, offset, p;
|
||||
|
@ -101,7 +101,7 @@ int data_bits(struct sr_output *o, const char *data_in, uint64_t length_in,
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
struct sr_output_format output_text_bits = {
|
||||
SR_PRIV struct sr_output_format output_text_bits = {
|
||||
.id = "bits",
|
||||
.description = "Bits (takes argument, default 64)",
|
||||
.df_type = SR_DF_LOGIC,
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
#include "sigrok.h"
|
||||
#include "text.h"
|
||||
|
||||
int init_hex(struct sr_output *o)
|
||||
SR_PRIV int init_hex(struct sr_output *o)
|
||||
{
|
||||
return init(o, DEFAULT_BPL_HEX, MODE_HEX);
|
||||
}
|
||||
|
||||
int data_hex(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||
char **data_out, uint64_t *length_out)
|
||||
SR_PRIV int data_hex(struct sr_output *o, const char *data_in,
|
||||
uint64_t length_in, char **data_out, uint64_t *length_out)
|
||||
{
|
||||
struct context *ctx;
|
||||
unsigned int outsize, offset, p;
|
||||
|
@ -89,7 +89,7 @@ int data_hex(struct sr_output *o, const char *data_in, uint64_t length_in,
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
struct sr_output_format output_text_hex = {
|
||||
SR_PRIV struct sr_output_format output_text_hex = {
|
||||
.id = "hex",
|
||||
.description = "Hexadecimal (takes argument, default 192)",
|
||||
.df_type = SR_DF_LOGIC,
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "sigrok.h"
|
||||
#include "text.h"
|
||||
|
||||
void flush_linebufs(struct context *ctx, char *outbuf)
|
||||
SR_PRIV void flush_linebufs(struct context *ctx, char *outbuf)
|
||||
{
|
||||
static int max_probename_len = 0;
|
||||
int len, i;
|
||||
|
@ -63,7 +63,7 @@ void flush_linebufs(struct context *ctx, char *outbuf)
|
|||
memset(ctx->linebuf, 0, i * ctx->linebuf_len);
|
||||
}
|
||||
|
||||
int init(struct sr_output *o, int default_spl, enum outputmode mode)
|
||||
SR_PRIV int init(struct sr_output *o, int default_spl, enum outputmode mode)
|
||||
{
|
||||
struct context *ctx;
|
||||
struct sr_probe *probe;
|
||||
|
@ -136,8 +136,8 @@ int init(struct sr_output *o, int default_spl, enum outputmode mode)
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
int event(struct sr_output *o, int event_type, char **data_out,
|
||||
uint64_t *length_out)
|
||||
SR_PRIV int event(struct sr_output *o, int event_type, char **data_out,
|
||||
uint64_t *length_out)
|
||||
{
|
||||
struct context *ctx;
|
||||
int outsize;
|
||||
|
|
|
@ -46,22 +46,23 @@ struct context {
|
|||
enum outputmode mode;
|
||||
};
|
||||
|
||||
void flush_linebufs(struct context *ctx, char *outbuf);
|
||||
int init(struct sr_output *o, int default_spl, enum outputmode mode);
|
||||
int event(struct sr_output *o, int event_type, char **data_out,
|
||||
uint64_t *length_out);
|
||||
SR_PRIV void flush_linebufs(struct context *ctx, char *outbuf);
|
||||
SR_PRIV int init(struct sr_output *o, int default_spl, enum outputmode mode);
|
||||
SR_PRIV int event(struct sr_output *o, int event_type, char **data_out,
|
||||
uint64_t *length_out);
|
||||
|
||||
SR_PRIV int init_bits(struct sr_output *o);
|
||||
SR_PRIV int data_bits(struct sr_output *o, const char *data_in,
|
||||
uint64_t length_in, char **data_out,
|
||||
uint64_t *length_out);
|
||||
|
||||
int init_bits(struct sr_output *o);
|
||||
int data_bits(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||
char **data_out, uint64_t *length_out);
|
||||
SR_PRIV int init_hex(struct sr_output *o);
|
||||
SR_PRIV int data_hex(struct sr_output *o, const char *data_in,
|
||||
uint64_t length_in, char **data_out, uint64_t *length_out);
|
||||
|
||||
int init_hex(struct sr_output *o);
|
||||
int data_hex(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||
char **data_out, uint64_t *length_out);
|
||||
|
||||
int init_ascii(struct sr_output *o);
|
||||
int data_ascii(struct sr_output *o, const char *data_in, uint64_t length_in,
|
||||
char **data_out, uint64_t *length_out);
|
||||
SR_PRIV int init_ascii(struct sr_output *o);
|
||||
SR_PRIV int data_ascii(struct sr_output *o, const char *data_in,
|
||||
uint64_t length_in, char **data_out,
|
||||
uint64_t *length_out);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue