38#ifndef PROTOCORE_AD9238_H
39#define PROTOCORE_AD9238_H
43#if PROTOCORE_ENABLE_AD9238
62 AD9238_REG_CHIP_PORT_CONFIG = 0x000,
63 AD9238_REG_CHIP_ID = 0x001,
64 AD9238_REG_CHIP_GRADE = 0x002,
65 AD9238_REG_CHANNEL_INDEX = 0x005,
66 AD9238_REG_POWER_DOWN = 0x008,
67 AD9238_REG_TEST_IO = 0x00D,
68 AD9238_REG_ANALOG_INPUT = 0x00F,
69 AD9238_REG_OFFSET_ADJUST = 0x010,
70 AD9238_REG_OUTPUT_MODE = 0x014,
71 AD9238_REG_OUTPUT_PHASE = 0x016,
72 AD9238_REG_OUTPUT_DELAY = 0x017,
73 AD9238_REG_VREF = 0x018,
74 AD9238_REG_DEVICE_UPDATE = 0x0FF,
79 AD9238_TEST_OFF = 0x00,
80 AD9238_TEST_MIDSCALE_SHORT = 0x01, AD9238_TEST_POS_FULLSCALE = 0x02, AD9238_TEST_NEG_FULLSCALE = 0x03,
81 AD9238_TEST_CHECKERBOARD = 0x04,
82 AD9238_TEST_PN23 = 0x05, AD9238_TEST_PN9 = 0x06, AD9238_TEST_ONE_ZERO_TOGGLE = 0x07, );
85EMBED_ENUM_BYTE(Ad9238OutputFormat, AD9238_FORMAT_OFFSET_BINARY = 0x00, AD9238_FORMAT_TWOS_COMPLEMENT = 0x01,
86 AD9238_FORMAT_GRAY_CODE = 0x02, );
89EMBED_ENUM_BYTE(Ad9238Channel, AD9238_CHAN_A = 0x01, AD9238_CHAN_B = 0x02, AD9238_CHAN_BOTH = 0x03, );
98} Ad9238BuildInstructionArgs;
107} Ad9238BuildWriteArgs;
115} Ad9238BuildReadArgs;
122} Ad9238BuildTransferArgs;
154 Ad9238BuildInstructionArgs build_instruction_args;
155 Ad9238BuildWriteArgs build_write_args;
156 Ad9238BuildReadArgs build_read_args;
157 Ad9238BuildTransferArgs build_transfer_args;
163extern Ad9238Vars Ad9238V;
168 void (*
const build_instruction)(
const uint8_t *work);
169 void (*
const build_write)(
const uint8_t *work);
170 void (*
const build_read)(
const uint8_t *work);
171 void (*
const build_transfer)(uint8_t *work);
176void protocore_ad9238_build_instruction(
const uint8_t *work);
177void protocore_ad9238_build_write(
const uint8_t *work);
178void protocore_ad9238_build_read(
const uint8_t *work);
179void protocore_ad9238_build_transfer(uint8_t *work);
185static const Ad9238Ns Ad9238 __attribute__((unused)) = {
186 .build_instruction = protocore_ad9238_build_instruction,
187 .build_write = protocore_ad9238_build_write,
188 .build_read = protocore_ad9238_build_read,
189 .build_transfer = protocore_ad9238_build_transfer,
EMBED_ENUM_BYTE(ProtoConn, PROTO_NONE=0, PROTO_HTTP=1, PROTO_TELNET=2, PROTO_SSH=3, PROTO_MODBUS=4, PROTO_OPCUA=5, PROTO_SSH_RFWD=6, PROTO_RELAY=7, PROTO_BRIDGE=8, PROTO_NTRIP_CASTER=9, PROTO_MESH=10, PROTO_UDP=11,)
Application protocol spoken on a listener port or connection slot.