]> sigrok.org Git - libsigrok.git/blobdiff - hardware/link-mso19/link-mso19.h
serial: RTS/DTR support on Windows/MinGW.
[libsigrok.git] / hardware / link-mso19 / link-mso19.h
index 47a9af28be33ddbe4c575cc9085f32f0d25b6cee..76c9545f7db5aad8ada3400a5edfc5d6481d52b9 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SIGROK_LINK_MSO19_H
-#define SIGROK_LINK_MSO19_H
+#ifndef LIBSIGROK_HARDWARE_LINK_MSO19_LINK_MSO19_H
+#define LIBSIGROK_HARDWARE_LINK_MSO19_LINK_MSO19_H
+
+/* Message logging helpers with driver-specific prefix string. */
+#define DRIVER_LOG_DOMAIN "mso-19: "
+#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
+#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
+#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
+#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
+#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
+#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
 
 /* Structure for the pattern generator state */
 struct mso_patgen {
@@ -51,7 +60,7 @@ struct mso_prototrig {
        uint8_t spimode;
 };
 
-/* our private per-instance data */
+/* Private, per-device-instance driver context. */
 struct mso {
        /* info */
        uint8_t hwmodel;
@@ -78,7 +87,7 @@ struct mso {
        double dso_trigger_voltage;
        uint16_t dso_trigger_width;
        struct mso_prototrig protocol_trigger;
-       gpointer session_id;
+       void *session_dev_id;
        uint16_t buffer_n;
        char buffer[4096];
 };