]> sigrok.org Git - libsigrok.git/blobdiff - libsigrok.h
Rename SR_T_CHAR to SR_T_STRING.
[libsigrok.git] / libsigrok.h
index 3235ddf26ddbdcd620b60debd16e30893b9667fb..0b6888d93c663376a9242a8de38dd99c2c82de04 100644 (file)
@@ -41,9 +41,9 @@ extern "C" {
  *
  * The correct way to get/use the libsigrok API functions is:
  *
  @code{.c}
    #include <libsigrok/libsigrok.h>
  @endcode
* @code{.c}
*   #include <libsigrok/libsigrok.h>
* @endcode
  */
 
 /*
@@ -63,7 +63,7 @@ extern "C" {
  */
 
 /** Status/error codes returned by libsigrok functions. */
-enum {
+enum sr_error_code {
        SR_OK                =  0, /**< No error. */
        SR_ERR               = -1, /**< Generic/unspecified error. */
        SR_ERR_MALLOC        = -2, /**< Malloc/calloc/realloc error. */
@@ -132,12 +132,12 @@ enum sr_loglevel {
 #endif
 
 /** Type definition for callback function for data reception. */
-typedef int (*sr_receive_data_callback_t)(int fd, int revents, void *cb_data);
+typedef int (*sr_receive_data_callback)(int fd, int revents, void *cb_data);
 
 /** Data types used by sr_config_info(). */
 enum sr_datatype {
        SR_T_UINT64 = 10000,
-       SR_T_CHAR,
+       SR_T_STRING,
        SR_T_BOOL,
        SR_T_FLOAT,
        SR_T_RATIONAL_PERIOD,
@@ -569,7 +569,7 @@ struct sr_config {
 struct sr_config_info {
        /** Config key like SR_CONF_CONN, etc. */
        int key;
-       /** Data type like SR_T_CHAR, etc. */
+       /** Data type like SR_T_STRING, etc. */
        int datatype;
        /** Id string, e.g. "serialcomm". */
        char *id;
@@ -864,7 +864,7 @@ struct sr_dev_inst {
 };
 
 /** Types of device instance, struct sr_dev_inst.type */
-enum {
+enum sr_dev_inst_type {
        /** Device instance type for USB devices. */
        SR_INST_USB = 10000,
        /** Device instance type for serial port devices. */
@@ -874,7 +874,7 @@ enum {
 };
 
 /** Device instance status, struct sr_dev_inst.status */
-enum {
+enum sr_dev_inst_status {
        /** The device instance was not found. */
        SR_ST_NOT_FOUND = 10000,
        /** The device instance was found, but is still booting. */