38#ifndef PROTOCORE_AD9238_H
39#define PROTOCORE_AD9238_H
43#if PROTOCORE_ENABLE_AD9238
63 AD9238_REG_CHIP_PORT_CONFIG = 0x000,
64 AD9238_REG_CHIP_ID = 0x001,
65 AD9238_REG_CHIP_GRADE = 0x002,
66 AD9238_REG_CHANNEL_INDEX = 0x005,
67 AD9238_REG_POWER_DOWN = 0x008,
68 AD9238_REG_TEST_IO = 0x00D,
69 AD9238_REG_ANALOG_INPUT = 0x00F,
70 AD9238_REG_OFFSET_ADJUST = 0x010,
71 AD9238_REG_OUTPUT_MODE = 0x014,
72 AD9238_REG_OUTPUT_PHASE = 0x016,
73 AD9238_REG_OUTPUT_DELAY = 0x017,
74 AD9238_REG_VREF = 0x018,
75 AD9238_REG_DEVICE_UPDATE = 0x0FF,
81 AD9238_TEST_OFF = 0x00,
82 AD9238_TEST_MIDSCALE_SHORT = 0x01,
83 AD9238_TEST_POS_FULLSCALE = 0x02,
84 AD9238_TEST_NEG_FULLSCALE = 0x03,
85 AD9238_TEST_CHECKERBOARD = 0x04,
86 AD9238_TEST_PN23 = 0x05,
87 AD9238_TEST_PN9 = 0x06,
88 AD9238_TEST_ONE_ZERO_TOGGLE = 0x07,
94 AD9238_FORMAT_OFFSET_BINARY = 0x00,
95 AD9238_FORMAT_TWOS_COMPLEMENT = 0x01,
96 AD9238_FORMAT_GRAY_CODE = 0x02,
102 AD9238_CHAN_A = 0x01,
103 AD9238_CHAN_B = 0x02,
104 AD9238_CHAN_BOTH = 0x03,
114} Ad9238BuildInstructionArgs;
123} Ad9238BuildWriteArgs;
131} Ad9238BuildReadArgs;
138} Ad9238BuildTransferArgs;
170 Ad9238BuildInstructionArgs build_instruction_args;
171 Ad9238BuildWriteArgs build_write_args;
172 Ad9238BuildReadArgs build_read_args;
173 Ad9238BuildTransferArgs build_transfer_args;
179extern Ad9238Vars Ad9238V;
184 void (*
const build_instruction)(uint8_t *work);
185 void (*
const build_write)(uint8_t *work);
186 void (*
const build_read)(uint8_t *work);
187 void (*
const build_transfer)(uint8_t *work);
192void protocore_ad9238_build_instruction(uint8_t *work);
193void protocore_ad9238_build_write(uint8_t *work);
194void protocore_ad9238_build_read(uint8_t *work);
195void protocore_ad9238_build_transfer(uint8_t *work);
201static const Ad9238Ns Ad9238 __attribute__((unused)) = {
202 .build_instruction = protocore_ad9238_build_instruction,
203 .build_write = protocore_ad9238_build_write,
204 .build_read = protocore_ad9238_build_read,
205 .build_transfer = protocore_ad9238_build_transfer,
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