From: Uwe Hermann Date: Thu, 2 Feb 2012 08:28:56 +0000 (+0100) Subject: srd: Add explicit srd_pd_output_callback_t typedef. X-Git-Tag: libsigrokdecode-0.1.0~65 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bb590e071c0f6554695334b5da804c75267541fb;p=libsigrokdecode.git srd: Add explicit srd_pd_output_callback_t typedef. --- diff --git a/controller.c b/controller.c index d7d3faf..d5bab5b 100644 --- a/controller.c +++ b/controller.c @@ -690,8 +690,7 @@ int srd_session_feed(uint64_t start_samplenum, uint8_t *inbuf, uint64_t inbuflen return SRD_OK; } - -int srd_register_callback(int output_type, void *cb) +int srd_register_callback(int output_type, srd_pd_output_callback_t cb) { struct srd_pd_callback *pd_cb; diff --git a/sigrokdecode.h b/sigrokdecode.h index 2a78a4d..947e0c0 100644 --- a/sigrokdecode.h +++ b/sigrokdecode.h @@ -198,7 +198,8 @@ int srd_session_start(int num_probes, int unitsize, uint64_t samplerate); int srd_session_feed(uint64_t start_samplenum, uint8_t *inbuf, uint64_t inbuflen); int pd_add(struct srd_decoder_instance *di, int output_type, char *output_id); struct srd_decoder_instance *get_di_by_decobject(void *decobject); -int srd_register_callback(int output_type, void *cb); +typedef void (*srd_pd_output_callback_t)(struct srd_proto_data *pdata); +int srd_register_callback(int output_type, srd_pd_output_callback_t cb); void *srd_find_callback(int output_type); /*--- decoder.c -------------------------------------------------------------*/