#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#endif
+#ifndef ARRAY_AND_SIZE
+#define ARRAY_AND_SIZE(a) (a), ARRAY_SIZE(a)
+#endif
+
/* Data types, used by hardware plugins for set_configuration() */
enum {
T_UINT64,
DF_HEADER,
DF_END,
DF_TRIGGER,
- DF_LOGIC8,
- DF_LOGIC16,
- DF_LOGIC24,
- DF_LOGIC32,
- DF_LOGIC48,
- DF_LOGIC64,
+ DF_LOGIC,
+ DF_ANALOG,
+ DF_PD,
};
struct datafeed_packet {
uint16_t type;
uint64_t length;
+ uint16_t unitsize;
void *payload;
};
struct output_format {
char *extension;
char *description;
+ int df_type;
int (*init) (struct output *o);
int (*data) (struct output *o, char *data_in, uint64_t length_in,
char **data_out, uint64_t *length_out);
char *vendor;
char *model;
char *version;
+ void *priv;
union {
struct usb_device_instance *usb;
struct serial_device_instance *serial;