27#ifndef PROTOCORE_GPIB_H
28#define PROTOCORE_GPIB_H
38#define PC_GPIB_PORT 1234
40#define PC_GPIB_DISCOVERY_PORT 3040
43enum class GpibEos : uint8_t
52enum class GpibRead : uint8_t
64size_t pc_gpib_command(
char *buf,
size_t cap,
const char *cmd);
72size_t pc_gpib_addr(
char *buf,
size_t cap, uint8_t pad,
int sad);
79size_t pc_gpib_read(
char *buf,
size_t cap, GpibRead mode, uint8_t ch);
86size_t pc_gpib_spoll(
char *buf,
size_t cap,
int pad,
int sad);
89size_t pc_gpib_eos(
char *buf,
size_t cap, GpibEos eos);
97size_t pc_gpib_build_data(uint8_t *buf,
size_t cap,
const uint8_t *src,
size_t len);
100bool pc_gpib_is_command(
const char *line,
size_t len);
107bool pc_gpib_parse_decimal(
const char *s,
size_t len, uint32_t *out);
115bool pc_gpib_parse_addr(
const char *s,
size_t len, uint8_t *pad,
int *sad);
122bool pc_gpib_parse_version(
const char *s,
size_t len,
const char **ver,
size_t *ver_len);
User-facing configuration for ProtoCore.