26#ifndef PROTOCORE_GPIB_H
27#define PROTOCORE_GPIB_H
31#if PROTOCORE_ENABLE_GPIB
36#define PROTOCORE_GPIB_PORT 1234
38#define PROTOCORE_GPIB_DISCOVERY_PORT 3040
46 GPIB_EOS_PROTOCORE_NONE = 3,
62size_t protocore_gpib_command(
char *buf,
size_t cap,
const char *cmd);
70size_t protocore_gpib_addr(
char *buf,
size_t cap, uint8_t pad,
int sad);
77size_t protocore_gpib_read(
char *buf,
size_t cap, GpibRead mode, uint8_t ch);
84size_t protocore_gpib_spoll(
char *buf,
size_t cap,
int pad,
int sad);
87size_t protocore_gpib_eos(
char *buf,
size_t cap, GpibEos eos);
95size_t protocore_gpib_build_data(uint8_t *buf,
size_t cap,
const uint8_t *src,
size_t len);
98proto_bool protocore_gpib_is_command(
const char *line,
size_t len);
105proto_bool protocore_gpib_parse_decimal(
const char *s,
size_t len, uint32_t *out);
113proto_bool protocore_gpib_parse_addr(
const char *s,
size_t len, uint8_t *pad,
int *sad);
120proto_bool protocore_gpib_parse_version(
const char *s,
size_t len,
const char **ver,
size_t *ver_len);
PROTO_ENUM_PACKED
Application protocol spoken on a listener port or connection slot.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS