* 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 {
uint8_t spimode;
};
-/* our private per-instance data */
+/* Private, per-device-instance driver context. */
struct mso {
/* info */
uint8_t hwmodel;
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];
};
};
/* FIXME: Determine corresponding voltages */
-uint16_t la_threshold_map[] = {
+static uint16_t la_threshold_map[] = {
0x8600,
0x8770,
0x88ff,