]> sigrok.org Git - libsigrok.git/blobdiff - sigrok.h
add DF_ANALOG, and an analog output module
[libsigrok.git] / sigrok.h
index 9551b8874a8ad01fb0095c57f334a8809ea21cfa..5e6f2314c86874538feb79cd64c0c87016bc99dd 100644 (file)
--- a/sigrok.h
+++ b/sigrok.h
 #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,
@@ -89,17 +93,15 @@ enum {
        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;
 };
 
@@ -143,6 +145,7 @@ struct output {
 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);
@@ -267,6 +270,7 @@ struct sigrok_device_instance {
        char *vendor;
        char *model;
        char *version;
+       void *priv;
        union {
                struct usb_device_instance *usb;
                struct serial_device_instance *serial;