Don't define names ending with _t (POSIX reserved).
Avoid defining any names ending in _t, those are generally reserved for POSIX usage. For details see: http://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
This commit is contained in:
parent
999f6730c6
commit
144f6660d0
|
@ -174,7 +174,7 @@ SR_PRIV int brymen_dmm_receive_data(int fd, int revents, void *cb_data)
|
|||
SR_PRIV int brymen_stream_detect(struct sr_serial_dev_inst *serial,
|
||||
uint8_t *buf, size_t *buflen,
|
||||
packet_length_t get_packet_size,
|
||||
packet_valid_t is_valid,
|
||||
packet_valid_callback is_valid,
|
||||
uint64_t timeout_ms, int baudrate)
|
||||
{
|
||||
int64_t start, time, byte_delay_us;
|
||||
|
|
|
@ -82,7 +82,7 @@ SR_PRIV int brymen_parse(const uint8_t *buf, float *floatval,
|
|||
SR_PRIV int brymen_stream_detect(struct sr_serial_dev_inst *serial,
|
||||
uint8_t *buf, size_t *buflen,
|
||||
packet_length_t get_packet_size,
|
||||
packet_valid_t is_valid,
|
||||
packet_valid_callback is_valid,
|
||||
uint64_t timeout_ms, int baudrate);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -217,7 +217,7 @@ SR_PRIV int sr_scpi_open(struct sr_scpi_dev_inst *scpi)
|
|||
* SR_ERR_MALLOC upon memory allocation errors.
|
||||
*/
|
||||
SR_PRIV int sr_scpi_source_add(struct sr_scpi_dev_inst *scpi, int events,
|
||||
int timeout, sr_receive_data_callback_t cb, void *cb_data)
|
||||
int timeout, sr_receive_data_callback cb, void *cb_data)
|
||||
{
|
||||
return scpi->source_add(scpi->priv, events, timeout, cb, cb_data);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ static int scpi_serial_open(void *priv)
|
|||
}
|
||||
|
||||
static int scpi_serial_source_add(void *priv, int events, int timeout,
|
||||
sr_receive_data_callback_t cb, void *cb_data)
|
||||
sr_receive_data_callback cb, void *cb_data)
|
||||
{
|
||||
struct scpi_serial *sscpi = priv;
|
||||
struct sr_serial_dev_inst *serial = sscpi->serial;
|
||||
|
|
|
@ -116,7 +116,7 @@ static int scpi_tcp_open(void *priv)
|
|||
}
|
||||
|
||||
static int scpi_tcp_source_add(void *priv, int events, int timeout,
|
||||
sr_receive_data_callback_t cb, void *cb_data)
|
||||
sr_receive_data_callback cb, void *cb_data)
|
||||
{
|
||||
struct scpi_tcp *tcp = priv;
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ static int scpi_usbtmc_open(void *priv)
|
|||
}
|
||||
|
||||
static int scpi_usbtmc_source_add(void *priv, int events, int timeout,
|
||||
sr_receive_data_callback_t cb, void *cb_data)
|
||||
sr_receive_data_callback cb, void *cb_data)
|
||||
{
|
||||
struct usbtmc_scpi *uscpi = priv;
|
||||
struct sr_usbtmc_dev_inst *usbtmc = uscpi->usbtmc;
|
||||
|
|
|
@ -317,7 +317,7 @@ static int scpi_usbtmc_libusb_open(void *priv)
|
|||
}
|
||||
|
||||
static int scpi_usbtmc_libusb_source_add(void *priv, int events, int timeout,
|
||||
sr_receive_data_callback_t cb, void *cb_data)
|
||||
sr_receive_data_callback cb, void *cb_data)
|
||||
{
|
||||
struct scpi_usbtmc_libusb *uscpi = priv;
|
||||
(void)events;
|
||||
|
|
|
@ -68,7 +68,7 @@ static int scpi_visa_open(void *priv)
|
|||
}
|
||||
|
||||
static int scpi_visa_source_add(void *priv, int events, int timeout,
|
||||
sr_receive_data_callback_t cb, void *cb_data)
|
||||
sr_receive_data_callback cb, void *cb_data)
|
||||
{
|
||||
(void) priv;
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ static int scpi_vxi_open(void *priv)
|
|||
}
|
||||
|
||||
static int scpi_vxi_source_add(void *priv, int events, int timeout,
|
||||
sr_receive_data_callback_t cb, void *cb_data)
|
||||
sr_receive_data_callback cb, void *cb_data)
|
||||
{
|
||||
(void)priv;
|
||||
|
||||
|
|
|
@ -570,7 +570,8 @@ SR_PRIV int serial_readline(struct sr_serial_dev_inst *serial, char **buf,
|
|||
*/
|
||||
SR_PRIV int serial_stream_detect(struct sr_serial_dev_inst *serial,
|
||||
uint8_t *buf, size_t *buflen,
|
||||
size_t packet_size, packet_valid_t is_valid,
|
||||
size_t packet_size,
|
||||
packet_valid_callback is_valid,
|
||||
uint64_t timeout_ms, int baudrate)
|
||||
{
|
||||
uint64_t start, time, byte_delay_us;
|
||||
|
@ -684,7 +685,7 @@ typedef int event_handle;
|
|||
#endif
|
||||
|
||||
SR_PRIV int serial_source_add(struct sr_serial_dev_inst *serial, int events,
|
||||
int timeout, sr_receive_data_callback_t cb, void *cb_data)
|
||||
int timeout, sr_receive_data_callback cb, void *cb_data)
|
||||
{
|
||||
enum sp_event mask = 0;
|
||||
unsigned int i;
|
||||
|
|
|
@ -210,7 +210,7 @@ static int usb_callback(int fd, int revents, void *cb_data)
|
|||
#endif
|
||||
|
||||
SR_PRIV int usb_source_add(struct sr_context *ctx, int timeout,
|
||||
sr_receive_data_callback_t cb, void *cb_data)
|
||||
sr_receive_data_callback cb, void *cb_data)
|
||||
{
|
||||
if (ctx->usb_source_present) {
|
||||
sr_err("A USB event source is already present.");
|
||||
|
|
|
@ -776,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);
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ struct sr_context {
|
|||
GMutex usb_mutex;
|
||||
HANDLE usb_event;
|
||||
GPollFD usb_pollfd;
|
||||
sr_receive_data_callback_t usb_cb;
|
||||
sr_receive_data_callback usb_cb;
|
||||
void *usb_cb_data;
|
||||
#endif
|
||||
#endif
|
||||
|
@ -265,7 +265,7 @@ SR_PRIV struct sr_config *sr_config_new(int key, GVariant *data);
|
|||
SR_PRIV void sr_config_free(struct sr_config *src);
|
||||
SR_PRIV int sr_source_remove(int fd);
|
||||
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);
|
||||
|
||||
/*--- session.c -------------------------------------------------------------*/
|
||||
|
||||
|
@ -307,21 +307,21 @@ SR_PRIV int sr_sessionfile_check(const char *filename);
|
|||
|
||||
/*--- std.c -----------------------------------------------------------------*/
|
||||
|
||||
typedef int (*dev_close_t)(struct sr_dev_inst *sdi);
|
||||
typedef void (*std_dev_clear_t)(void *priv);
|
||||
typedef int (*dev_close_callback)(struct sr_dev_inst *sdi);
|
||||
typedef void (*std_dev_clear_callback)(void *priv);
|
||||
|
||||
SR_PRIV int std_init(struct sr_context *sr_ctx, struct sr_dev_driver *di,
|
||||
const char *prefix);
|
||||
#ifdef HAVE_LIBSERIALPORT
|
||||
SR_PRIV int std_serial_dev_open(struct sr_dev_inst *sdi);
|
||||
SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi,
|
||||
void *cb_data, dev_close_t dev_close_fn,
|
||||
void *cb_data, dev_close_callback dev_close_fn,
|
||||
struct sr_serial_dev_inst *serial, const char *prefix);
|
||||
#endif
|
||||
SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi,
|
||||
const char *prefix);
|
||||
SR_PRIV int std_dev_clear(const struct sr_dev_driver *driver,
|
||||
std_dev_clear_t clear_private);
|
||||
std_dev_clear_callback clear_private);
|
||||
SR_PRIV int std_serial_dev_close(struct sr_dev_inst *sdi);
|
||||
|
||||
/*--- strutil.c -------------------------------------------------------------*/
|
||||
|
@ -341,7 +341,7 @@ enum {
|
|||
SERIAL_NONBLOCK = 4,
|
||||
};
|
||||
|
||||
typedef gboolean (*packet_valid_t)(const uint8_t *buf);
|
||||
typedef gboolean (*packet_valid_callback)(const uint8_t *buf);
|
||||
|
||||
SR_PRIV int serial_open(struct sr_serial_dev_inst *serial, int flags);
|
||||
SR_PRIV int serial_close(struct sr_serial_dev_inst *serial);
|
||||
|
@ -366,12 +366,13 @@ SR_PRIV int serial_readline(struct sr_serial_dev_inst *serial, char **buf,
|
|||
int *buflen, gint64 timeout_ms);
|
||||
SR_PRIV int serial_stream_detect(struct sr_serial_dev_inst *serial,
|
||||
uint8_t *buf, size_t *buflen,
|
||||
size_t packet_size, packet_valid_t is_valid,
|
||||
size_t packet_size,
|
||||
packet_valid_callback is_valid,
|
||||
uint64_t timeout_ms, int baudrate);
|
||||
SR_PRIV int sr_serial_extract_options(GSList *options, const char **serial_device,
|
||||
const char **serial_options);
|
||||
SR_PRIV int serial_source_add(struct sr_serial_dev_inst *serial, int events,
|
||||
int timeout, sr_receive_data_callback_t cb, void *cb_data);
|
||||
int timeout, sr_receive_data_callback cb, void *cb_data);
|
||||
SR_PRIV int serial_source_remove(struct sr_serial_dev_inst *serial);
|
||||
SR_PRIV GSList *sr_serial_find_usb(uint16_t vendor_id, uint16_t product_id);
|
||||
#endif
|
||||
|
@ -392,7 +393,7 @@ SR_PRIV int ezusb_upload_firmware(libusb_device *dev, int configuration,
|
|||
SR_PRIV GSList *sr_usb_find(libusb_context *usb_ctx, const char *conn);
|
||||
SR_PRIV int sr_usb_open(libusb_context *usb_ctx, struct sr_usb_dev_inst *usb);
|
||||
SR_PRIV int usb_source_add(struct sr_context *ctx, int timeout,
|
||||
sr_receive_data_callback_t cb, void *cb_data);
|
||||
sr_receive_data_callback cb, void *cb_data);
|
||||
SR_PRIV int usb_source_remove(struct sr_context *ctx);
|
||||
#endif
|
||||
|
||||
|
@ -443,7 +444,7 @@ struct sr_scpi_dev_inst {
|
|||
const char *resource, char **params, const char *serialcomm);
|
||||
int (*open)(void *priv);
|
||||
int (*source_add)(void *priv, int events,
|
||||
int timeout, sr_receive_data_callback_t cb, void *cb_data);
|
||||
int timeout, sr_receive_data_callback cb, void *cb_data);
|
||||
int (*source_remove)(void *priv);
|
||||
int (*send)(void *priv, const char *command);
|
||||
int (*read_begin)(void *priv);
|
||||
|
@ -460,7 +461,7 @@ SR_PRIV struct sr_scpi_dev_inst *scpi_dev_inst_new(struct drv_context *drvc,
|
|||
const char *resource, const char *serialcomm);
|
||||
SR_PRIV int sr_scpi_open(struct sr_scpi_dev_inst *scpi);
|
||||
SR_PRIV int sr_scpi_source_add(struct sr_scpi_dev_inst *scpi, int events,
|
||||
int timeout, sr_receive_data_callback_t cb, void *cb_data);
|
||||
int timeout, sr_receive_data_callback cb, void *cb_data);
|
||||
SR_PRIV int sr_scpi_source_remove(struct sr_scpi_dev_inst *scpi);
|
||||
SR_PRIV int sr_scpi_send(struct sr_scpi_dev_inst *scpi,
|
||||
const char *format, ...);
|
||||
|
|
|
@ -132,7 +132,7 @@ 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 {
|
||||
|
|
28
log.c
28
log.c
|
@ -48,13 +48,13 @@ static int sr_logv(void *cb_data, int loglevel, const char *format,
|
|||
va_list args);
|
||||
|
||||
/* Pointer to the currently selected log callback. Default: sr_logv(). */
|
||||
static sr_log_callback_t sr_log_callback = sr_logv;
|
||||
static sr_log_callback sr_log_cb = sr_logv;
|
||||
|
||||
/*
|
||||
* Pointer to private data that can be passed to the log callback.
|
||||
* This can be used (for example) by C++ GUIs to pass a "this" pointer.
|
||||
*/
|
||||
static void *sr_log_callback_data = NULL;
|
||||
static void *sr_log_cb_data = NULL;
|
||||
|
||||
/* Log domain (a short string that is used as prefix for all messages). */
|
||||
/** @cond PRIVATE */
|
||||
|
@ -166,7 +166,7 @@ SR_API char *sr_log_logdomain_get(void)
|
|||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
SR_API int sr_log_callback_set(sr_log_callback_t cb, void *cb_data)
|
||||
SR_API int sr_log_callback_set(sr_log_callback cb, void *cb_data)
|
||||
{
|
||||
if (!cb) {
|
||||
sr_err("log: %s: cb was NULL", __func__);
|
||||
|
@ -175,8 +175,8 @@ SR_API int sr_log_callback_set(sr_log_callback_t cb, void *cb_data)
|
|||
|
||||
/* Note: 'cb_data' is allowed to be NULL. */
|
||||
|
||||
sr_log_callback = cb;
|
||||
sr_log_callback_data = cb_data;
|
||||
sr_log_cb = cb;
|
||||
sr_log_cb_data = cb_data;
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ SR_API int sr_log_callback_set(sr_log_callback_t cb, void *cb_data)
|
|||
/**
|
||||
* Set the libsigrok log callback to the default built-in one.
|
||||
*
|
||||
* Additionally, the internal 'sr_log_callback_data' pointer is set to NULL.
|
||||
* Additionally, the internal 'sr_log_cb_data' pointer is set to NULL.
|
||||
*
|
||||
* @return SR_OK upon success, a negative error code otherwise.
|
||||
*
|
||||
|
@ -196,8 +196,8 @@ SR_API int sr_log_callback_set_default(void)
|
|||
* Note: No log output in this function, as it should safely work
|
||||
* even if the currently set log callback is buggy/broken.
|
||||
*/
|
||||
sr_log_callback = sr_logv;
|
||||
sr_log_callback_data = NULL;
|
||||
sr_log_cb = sr_logv;
|
||||
sr_log_cb_data = NULL;
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ SR_PRIV int sr_log(int loglevel, const char *format, ...)
|
|||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
ret = sr_log_callback(sr_log_callback_data, loglevel, format, args);
|
||||
ret = sr_log_cb(sr_log_cb_data, loglevel, format, args);
|
||||
va_end(args);
|
||||
|
||||
return ret;
|
||||
|
@ -241,7 +241,7 @@ SR_PRIV int sr_spew(const char *format, ...)
|
|||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
ret = sr_log_callback(sr_log_callback_data, SR_LOG_SPEW, format, args);
|
||||
ret = sr_log_cb(sr_log_cb_data, SR_LOG_SPEW, format, args);
|
||||
va_end(args);
|
||||
|
||||
return ret;
|
||||
|
@ -254,7 +254,7 @@ SR_PRIV int sr_dbg(const char *format, ...)
|
|||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
ret = sr_log_callback(sr_log_callback_data, SR_LOG_DBG, format, args);
|
||||
ret = sr_log_cb(sr_log_cb_data, SR_LOG_DBG, format, args);
|
||||
va_end(args);
|
||||
|
||||
return ret;
|
||||
|
@ -267,7 +267,7 @@ SR_PRIV int sr_info(const char *format, ...)
|
|||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
ret = sr_log_callback(sr_log_callback_data, SR_LOG_INFO, format, args);
|
||||
ret = sr_log_cb(sr_log_cb_data, SR_LOG_INFO, format, args);
|
||||
va_end(args);
|
||||
|
||||
return ret;
|
||||
|
@ -280,7 +280,7 @@ SR_PRIV int sr_warn(const char *format, ...)
|
|||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
ret = sr_log_callback(sr_log_callback_data, SR_LOG_WARN, format, args);
|
||||
ret = sr_log_cb(sr_log_cb_data, SR_LOG_WARN, format, args);
|
||||
va_end(args);
|
||||
|
||||
return ret;
|
||||
|
@ -293,7 +293,7 @@ SR_PRIV int sr_err(const char *format, ...)
|
|||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
ret = sr_log_callback(sr_log_callback_data, SR_LOG_ERR, format, args);
|
||||
ret = sr_log_cb(sr_log_cb_data, SR_LOG_ERR, format, args);
|
||||
va_end(args);
|
||||
|
||||
return ret;
|
||||
|
|
16
proto.h
16
proto.h
|
@ -33,12 +33,12 @@ SR_API int sr_exit(struct sr_context *ctx);
|
|||
|
||||
/*--- log.c -----------------------------------------------------------------*/
|
||||
|
||||
typedef int (*sr_log_callback_t)(void *cb_data, int loglevel,
|
||||
const char *format, va_list args);
|
||||
typedef int (*sr_log_callback)(void *cb_data, int loglevel,
|
||||
const char *format, va_list args);
|
||||
|
||||
SR_API int sr_log_loglevel_set(int loglevel);
|
||||
SR_API int sr_log_loglevel_get(void);
|
||||
SR_API int sr_log_callback_set(sr_log_callback_t cb, void *cb_data);
|
||||
SR_API int sr_log_callback_set(sr_log_callback cb, void *cb_data);
|
||||
SR_API int sr_log_callback_set_default(void);
|
||||
SR_API int sr_log_logdomain_set(const char *logdomain);
|
||||
SR_API char *sr_log_logdomain_get(void);
|
||||
|
@ -80,7 +80,7 @@ SR_API const struct sr_config_info *sr_config_info_name_get(const char *optname)
|
|||
|
||||
/*--- session.c -------------------------------------------------------------*/
|
||||
|
||||
typedef void (*sr_datafeed_callback_t)(const struct sr_dev_inst *sdi,
|
||||
typedef void (*sr_datafeed_callback)(const struct sr_dev_inst *sdi,
|
||||
const struct sr_datafeed_packet *packet, void *cb_data);
|
||||
|
||||
/* Session setup */
|
||||
|
@ -93,7 +93,7 @@ SR_API int sr_session_dev_list(GSList **devlist);
|
|||
|
||||
/* Datafeed setup */
|
||||
SR_API int sr_session_datafeed_callback_remove_all(void);
|
||||
SR_API int sr_session_datafeed_callback_add(sr_datafeed_callback_t cb,
|
||||
SR_API int sr_session_datafeed_callback_add(sr_datafeed_callback cb,
|
||||
void *cb_data);
|
||||
|
||||
/* Session control */
|
||||
|
@ -107,11 +107,11 @@ SR_API int sr_session_save_init(const char *filename, uint64_t samplerate,
|
|||
SR_API int sr_session_append(const char *filename, unsigned char *buf,
|
||||
int unitsize, int units);
|
||||
SR_API int sr_session_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);
|
||||
SR_API int sr_session_source_add_pollfd(GPollFD *pollfd, int timeout,
|
||||
sr_receive_data_callback_t cb, void *cb_data);
|
||||
sr_receive_data_callback cb, void *cb_data);
|
||||
SR_API int sr_session_source_add_channel(GIOChannel *channel, int events,
|
||||
int timeout, sr_receive_data_callback_t cb, void *cb_data);
|
||||
int timeout, sr_receive_data_callback cb, void *cb_data);
|
||||
SR_API int sr_session_source_remove(int fd);
|
||||
SR_API int sr_session_source_remove_pollfd(GPollFD *pollfd);
|
||||
SR_API int sr_session_source_remove_channel(GIOChannel *channel);
|
||||
|
|
14
session.c
14
session.c
|
@ -45,7 +45,7 @@
|
|||
|
||||
struct source {
|
||||
int timeout;
|
||||
sr_receive_data_callback_t cb;
|
||||
sr_receive_data_callback cb;
|
||||
void *cb_data;
|
||||
|
||||
/* This is used to keep track of the object (fd, pollfd or channel) which is
|
||||
|
@ -55,7 +55,7 @@ struct source {
|
|||
};
|
||||
|
||||
struct datafeed_callback {
|
||||
sr_datafeed_callback_t cb;
|
||||
sr_datafeed_callback cb;
|
||||
void *cb_data;
|
||||
};
|
||||
|
||||
|
@ -252,7 +252,7 @@ SR_API int sr_session_datafeed_callback_remove_all(void)
|
|||
* @retval SR_OK Success.
|
||||
* @retval SR_ERR_BUG No session exists.
|
||||
*/
|
||||
SR_API int sr_session_datafeed_callback_add(sr_datafeed_callback_t cb, void *cb_data)
|
||||
SR_API int sr_session_datafeed_callback_add(sr_datafeed_callback cb, void *cb_data)
|
||||
{
|
||||
struct datafeed_callback *cb_struct;
|
||||
|
||||
|
@ -584,7 +584,7 @@ SR_PRIV int sr_session_send(const struct sr_dev_inst *sdi,
|
|||
* @retval SR_ERR_MALLOC Memory allocation error.
|
||||
*/
|
||||
static int _sr_session_source_add(GPollFD *pollfd, int timeout,
|
||||
sr_receive_data_callback_t cb, void *cb_data, gintptr poll_object)
|
||||
sr_receive_data_callback cb, void *cb_data, gintptr poll_object)
|
||||
{
|
||||
struct source *new_sources, *s;
|
||||
GPollFD *new_pollfds;
|
||||
|
@ -640,7 +640,7 @@ static int _sr_session_source_add(GPollFD *pollfd, int timeout,
|
|||
* @retval SR_ERR_MALLOC Memory allocation error.
|
||||
*/
|
||||
SR_API int sr_session_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)
|
||||
{
|
||||
GPollFD p;
|
||||
|
||||
|
@ -663,7 +663,7 @@ SR_API int sr_session_source_add(int fd, int events, int timeout,
|
|||
* @retval SR_ERR_MALLOC Memory allocation error.
|
||||
*/
|
||||
SR_API int sr_session_source_add_pollfd(GPollFD *pollfd, int timeout,
|
||||
sr_receive_data_callback_t cb, void *cb_data)
|
||||
sr_receive_data_callback cb, void *cb_data)
|
||||
{
|
||||
return _sr_session_source_add(pollfd, timeout, cb,
|
||||
cb_data, (gintptr)pollfd);
|
||||
|
@ -683,7 +683,7 @@ SR_API int sr_session_source_add_pollfd(GPollFD *pollfd, int timeout,
|
|||
* @retval SR_ERR_MALLOC Memory allocation error.
|
||||
*/
|
||||
SR_API int sr_session_source_add_channel(GIOChannel *channel, int events,
|
||||
int timeout, sr_receive_data_callback_t cb, void *cb_data)
|
||||
int timeout, sr_receive_data_callback cb, void *cb_data)
|
||||
{
|
||||
GPollFD p;
|
||||
|
||||
|
|
4
std.c
4
std.c
|
@ -182,7 +182,7 @@ SR_PRIV int std_serial_dev_close(struct sr_dev_inst *sdi)
|
|||
* @retval SR_ERR Other errors.
|
||||
*/
|
||||
SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi,
|
||||
void *cb_data, dev_close_t dev_close_fn,
|
||||
void *cb_data, dev_close_callback dev_close_fn,
|
||||
struct sr_serial_dev_inst *serial, const char *prefix)
|
||||
{
|
||||
int ret;
|
||||
|
@ -245,7 +245,7 @@ SR_PRIV int std_serial_dev_acquisition_stop(struct sr_dev_inst *sdi,
|
|||
* @return SR_OK on success.
|
||||
*/
|
||||
SR_PRIV int std_dev_clear(const struct sr_dev_driver *driver,
|
||||
std_dev_clear_t clear_private)
|
||||
std_dev_clear_callback clear_private)
|
||||
{
|
||||
struct drv_context *drvc;
|
||||
struct sr_dev_inst *sdi;
|
||||
|
|
Loading…
Reference in New Issue