]> sigrok.org Git - libsigrok.git/blobdiff - hwdriver.c
Don't define names ending with _t (POSIX reserved).
[libsigrok.git] / hwdriver.c
index b62fdd41c643aee802656409a86fc9e459c2cd17..fee0dd08d2da3c82a6c6b5dbec67e60499d2e611 100644 (file)
@@ -27,7 +27,9 @@
 #include "libsigrok.h"
 #include "libsigrok-internal.h"
 
+/** @cond PRIVATE */
 #define LOG_PREFIX "hwdriver"
+/** @endcond */
 
 /**
  * @file
@@ -96,10 +98,10 @@ static struct sr_config_info sr_config_info_data[] = {
                "Power off", NULL},
        {SR_CONF_DATA_SOURCE, SR_T_CHAR, "data_source",
                "Data source", NULL},
-       {SR_CONF_NUM_LOGIC_PROBES, SR_T_INT32, "logic_probes",
-               "Number of logic probes", NULL},
-       {SR_CONF_NUM_ANALOG_PROBES, SR_T_INT32, "analog_probes",
-               "Number of analog probes", NULL},
+       {SR_CONF_NUM_LOGIC_CHANNELS, SR_T_INT32, "logic_channels",
+               "Number of logic channels", NULL},
+       {SR_CONF_NUM_ANALOG_CHANNELS, SR_T_INT32, "analog_channels",
+               "Number of analog channels", NULL},
        {SR_CONF_OUTPUT_VOLTAGE, SR_T_FLOAT, "output_voltage",
                "Current output voltage", NULL},
        {SR_CONF_OUTPUT_VOLTAGE_MAX, SR_T_FLOAT, "output_voltage_max",
@@ -208,8 +210,8 @@ extern SR_PRIV struct sr_dev_driver zeroplus_logic_cube_driver_info;
 #ifdef HAVE_HW_ASIX_SIGMA
 extern SR_PRIV struct sr_dev_driver asix_sigma_driver_info;
 #endif
-#ifdef HAVE_HW_CHRONOVU_LA8
-extern SR_PRIV struct sr_dev_driver chronovu_la8_driver_info;
+#ifdef HAVE_HW_CHRONOVU_LA
+extern SR_PRIV struct sr_dev_driver chronovu_la_driver_info;
 #endif
 #ifdef HAVE_HW_LINK_MSO19
 extern SR_PRIV struct sr_dev_driver link_mso19_driver_info;
@@ -246,8 +248,10 @@ extern SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info;
 extern SR_PRIV struct sr_dev_driver radioshack_22_805_driver_info;
 extern SR_PRIV struct sr_dev_driver radioshack_22_812_driver_info;
 extern SR_PRIV struct sr_dev_driver tecpel_dmm_8061_ser_driver_info;
+extern SR_PRIV struct sr_dev_driver voltcraft_m3650cr_driver_info;
 extern SR_PRIV struct sr_dev_driver voltcraft_m3650d_driver_info;
 extern SR_PRIV struct sr_dev_driver voltcraft_m4650cr_driver_info;
+extern SR_PRIV struct sr_dev_driver voltcraft_me42_driver_info;
 extern SR_PRIV struct sr_dev_driver voltcraft_vc820_ser_driver_info;
 extern SR_PRIV struct sr_dev_driver voltcraft_vc830_ser_driver_info;
 extern SR_PRIV struct sr_dev_driver voltcraft_vc840_ser_driver_info;
@@ -310,7 +314,7 @@ static struct sr_dev_driver *drivers_list[] = {
 #endif
 #ifdef HAVE_HW_GMC_MH_1X_2X
        &gmc_mh_1x_2x_rs232_driver_info,
-    &gmc_mh_2x_bd232_driver_info,
+       &gmc_mh_2x_bd232_driver_info,
 #endif
 #ifdef HAVE_HW_HAMEG_HMO
        &hameg_hmo_driver_info,
@@ -364,8 +368,8 @@ static struct sr_dev_driver *drivers_list[] = {
 #ifdef HAVE_HW_ASIX_SIGMA
        &asix_sigma_driver_info,
 #endif
-#ifdef HAVE_HW_CHRONOVU_LA8
-       &chronovu_la8_driver_info,
+#ifdef HAVE_HW_CHRONOVU_LA
+       &chronovu_la_driver_info,
 #endif
 #ifdef HAVE_HW_LINK_MSO19
        &link_mso19_driver_info,
@@ -402,8 +406,10 @@ static struct sr_dev_driver *drivers_list[] = {
        &radioshack_22_805_driver_info,
        &radioshack_22_812_driver_info,
        &tecpel_dmm_8061_ser_driver_info,
+       &voltcraft_m3650cr_driver_info,
        &voltcraft_m3650d_driver_info,
        &voltcraft_m4650cr_driver_info,
+       &voltcraft_me42_driver_info,
        &voltcraft_vc820_ser_driver_info,
        &voltcraft_vc830_ser_driver_info,
        &voltcraft_vc840_ser_driver_info,
@@ -583,7 +589,7 @@ SR_PRIV void sr_config_free(struct sr_config *src)
  * @param[in] sdi (optional) If the key is specific to a device, this must
  *            contain a pointer to the struct sr_dev_inst to be checked.
  *            Otherwise it must be NULL.
- * @param[in] probe_group The probe group on the device for which to list the
+ * @param[in] cg The channel group on the device for which to list the
  *                    values, or NULL.
  * @param[in] key The configuration key (SR_CONF_*).
  * @param[in,out] data Pointer to a GVariant where the value will be stored.
@@ -600,7 +606,7 @@ SR_PRIV void sr_config_free(struct sr_config *src)
  */
 SR_API int sr_config_get(const struct sr_dev_driver *driver,
                const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group,
+               const struct sr_channel_group *cg,
                int key, GVariant **data)
 {
        int ret;
@@ -611,7 +617,7 @@ SR_API int sr_config_get(const struct sr_dev_driver *driver,
        if (!driver->config_get)
                return SR_ERR_ARG;
 
-       if ((ret = driver->config_get(key, data, sdi, probe_group)) == SR_OK) {
+       if ((ret = driver->config_get(key, data, sdi, cg)) == SR_OK) {
                /* Got a floating reference from the driver. Sink it here,
                 * caller will need to unref when done with it. */
                g_variant_ref_sink(*data);
@@ -624,7 +630,7 @@ SR_API int sr_config_get(const struct sr_dev_driver *driver,
  * Set value of a configuration key in a device instance.
  *
  * @param[in] sdi The device instance.
- * @param[in] probe_group The probe group on the device for which to list the
+ * @param[in] cg The channel group on the device for which to list the
  *                    values, or NULL.
  * @param[in] key The configuration key (SR_CONF_*).
  * @param data The new value for the key, as a GVariant with GVariantType
@@ -638,7 +644,7 @@ SR_API int sr_config_get(const struct sr_dev_driver *driver,
  *          that it's not applicable.
  */
 SR_API int sr_config_set(const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group,
+               const struct sr_channel_group *cg,
                int key, GVariant *data)
 {
        int ret;
@@ -650,7 +656,7 @@ SR_API int sr_config_set(const struct sr_dev_inst *sdi,
        else if (!sdi->driver->config_set)
                ret = SR_ERR_ARG;
        else
-               ret = sdi->driver->config_set(key, data, sdi, probe_group);
+               ret = sdi->driver->config_set(key, data, sdi, cg);
 
        g_variant_unref(data);
 
@@ -684,7 +690,7 @@ SR_API int sr_config_commit(const struct sr_dev_inst *sdi)
  * @param[in] driver The sr_dev_driver struct to query.
  * @param[in] sdi (optional) If the key is specific to a device, this must
  *            contain a pointer to the struct sr_dev_inst to be checked.
- * @param[in] probe_group The probe group on the device for which to list the
+ * @param[in] cg The channel group on the device for which to list the
  *                    values, or NULL.
  * @param[in] key The configuration key (SR_CONF_*).
  * @param[in,out] data A pointer to a GVariant where the list will be stored.
@@ -701,7 +707,7 @@ SR_API int sr_config_commit(const struct sr_dev_inst *sdi)
  */
 SR_API int sr_config_list(const struct sr_dev_driver *driver,
                const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group,
+               const struct sr_channel_group *cg,
                int key, GVariant **data)
 {
        int ret;
@@ -710,7 +716,7 @@ SR_API int sr_config_list(const struct sr_dev_driver *driver,
                ret = SR_ERR;
        else if (!driver->config_list)
                ret = SR_ERR_ARG;
-       else if ((ret = driver->config_list(key, data, sdi, probe_group)) == SR_OK)
+       else if ((ret = driver->config_list(key, data, sdi, cg)) == SR_OK)
                g_variant_ref_sink(*data);
 
        return ret;
@@ -770,7 +776,7 @@ SR_PRIV int sr_source_remove(int fd)
  *  @see sr_session_source_add()
  */
 SR_PRIV int sr_source_add(int fd, int events, int timeout,
-                         sr_receive_data_callback_t cb, void *cb_data)
+                         sr_receive_data_callback cb, void *cb_data)
 {
        return sr_session_source_add(fd, events, timeout, cb, cb_data);
 }