{ 0x0403, 0xed73 }, /* HO730 */
};
+enum {
+ PG_INVALID = -1,
+ PG_NONE,
+ PG_ANALOG,
+ PG_DIGITAL,
+};
+
static int init(struct sr_context *sr_ctx)
{
return std_init(sr_ctx, di, LOG_PREFIX);
if (sr_serial_extract_options(options, &serial_device,
&serial_options) == SR_OK) {
- sdi = hameg_probe_serial_device(serial_device, serial_options);
+ sdi = hmo_probe_serial_device(serial_device, serial_options);
if (sdi != NULL) {
devices = g_slist_append(devices, sdi);
drvc->instances = g_slist_append(drvc->instances, sdi);
}
for (l = tty_devs; l; l = l->next) {
- sdi = hameg_probe_serial_device(l->data, serial_options);
+ sdi = hmo_probe_serial_device(l->data, serial_options);
if (sdi != NULL) {
devices = g_slist_append(devices, sdi);
drvc->instances = g_slist_append(drvc->instances, sdi);
devc = priv;
model = devc->model_config;
- scope_state_free(devc->model_state);
+ hmo_scope_state_free(devc->model_state);
for (i = 0; i < model->analog_channels; ++i)
g_slist_free(devc->analog_groups[i].probes);
serial_open(sdi->conn, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK)
return SR_ERR;
- if (scope_state_get(sdi) != SR_OK)
+ if (hmo_scope_state_get(sdi) != SR_OK)
return SR_ERR;
sdi->status = SR_ST_ACTIVE;
return SR_ERR;
}
- sr_source_add(serial->fd, G_IO_IN, 50, hameg_hmo_receive_data, (void *)sdi);
+ sr_source_add(serial->fd, G_IO_IN, 50, hmo_receive_data, (void *)sdi);
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, LOG_PREFIX);
return SR_OK;
}
-SR_PRIV int scope_state_get(struct sr_dev_inst *sdi)
+SR_PRIV int hmo_scope_state_get(struct sr_dev_inst *sdi)
{
struct dev_context *devc;
struct scope_state *state;
return NULL;
}
-SR_PRIV void scope_state_free(struct scope_state *state)
+SR_PRIV void hmo_scope_state_free(struct scope_state *state)
{
g_free(state->analog_channels);
g_free(state->digital_channels);
return SR_OK;
}
-SR_PRIV struct sr_dev_inst *hameg_probe_serial_device(const char *serial_device,
- const char *serial_options)
+SR_PRIV struct sr_dev_inst *hmo_probe_serial_device(const char *serial_device,
+ const char *serial_options)
{
struct sr_dev_inst *sdi;
struct dev_context *devc;
return NULL;
}
-SR_PRIV int hameg_hmo_receive_data(int fd, int revents, void *cb_data)
+SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data)
{
struct sr_probe *probe;
struct sr_dev_inst *sdi;
SR_PRIV struct sr_dev_driver hameg_hmo_driver_info;
static struct sr_dev_driver *di = &hameg_hmo_driver_info;
-enum {
- PG_INVALID = -1,
- PG_NONE,
- PG_ANALOG,
- PG_DIGITAL,
-};
-
struct scope_config {
const char *name[MAX_INSTRUMENT_VERSIONS];
const uint8_t analog_channels;
SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi);
SR_PRIV int hmo_request_data(const struct sr_dev_inst *sdi);
-SR_PRIV int hameg_hmo_receive_data(int fd, int revents, void *cb_data);
-SR_PRIV struct sr_dev_inst *hameg_probe_serial_device(const char *serial_device,
- const char *serial_options);
+SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data);
+SR_PRIV struct sr_dev_inst *hmo_probe_serial_device(const char *serial_device,
+ const char *serial_options);
-SR_PRIV struct scope_state *scope_state_new(struct scope_config *config);
-SR_PRIV void scope_state_free(struct scope_state *state);
-SR_PRIV int scope_state_get(struct sr_dev_inst *sdi);
+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);
#endif