#include "libsigrok.h"
#include "libsigrok-internal.h"
-/* Message logging helpers with subsystem-specific prefix string. */
-#define LOG_PREFIX "hameg-hmo: "
-#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args)
-#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args)
-#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args)
-#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args)
-#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args)
-#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args)
+#define LOG_PREFIX "hameg-hmo"
#define MAX_INSTRUMENT_VERSIONS 10
#define MAX_COMMAND_SIZE 31
struct analog_channel_state {
int coupling;
- float vdiv;
+ int vdiv;
float vertical_offset;
gboolean state;
gboolean *digital_channels;
gboolean *digital_pods;
- float timebase;
+ int timebase;
float horiz_triggerpos;
int trigger_source;
int trigger_slope;
+ uint64_t sample_rate;
};
/** Private, per-device-instance driver context. */
SR_PRIV struct scope_state *hmo_scope_state_new(struct scope_config *config);
SR_PRIV void hmo_scope_state_free(struct scope_state *state);
SR_PRIV int hmo_scope_state_get(struct sr_dev_inst *sdi);
+SR_PRIV int hmo_update_sample_rate(const struct sr_dev_inst *sdi);
#endif