hameg-hmo: Use hmo_ prefix for driver-local SR_PRIV functions.

This commit is contained in:
Uwe Hermann 2013-12-03 16:58:34 +01:00
parent 89280b1a4c
commit 719eff68ad
3 changed files with 23 additions and 23 deletions

View File

@ -38,6 +38,13 @@ static struct usb_id_info ho_models[] = {
{ 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);
@ -197,7 +204,7 @@ static GSList *scan(GSList *options)
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);
@ -213,7 +220,7 @@ static GSList *scan(GSList *options)
}
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);
@ -240,7 +247,7 @@ static void clear_helper(void *priv)
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);
@ -267,7 +274,7 @@ static int dev_open(struct sr_dev_inst *sdi)
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;
@ -778,7 +785,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
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);

View File

@ -398,7 +398,7 @@ static int digital_channel_state_get(struct sr_serial_dev_inst *serial,
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;
@ -473,7 +473,7 @@ fail:
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);
@ -560,8 +560,8 @@ SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi)
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;
@ -622,7 +622,7 @@ fail:
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;

View File

@ -41,13 +41,6 @@
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;
@ -121,12 +114,12 @@ struct dev_context {
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