]> sigrok.org Git - libsigrokdecode.git/blobdiff - sigrokdecode.h.in
code cleanup
[libsigrokdecode.git] / sigrokdecode.h.in
index 033e30ee4652e557097c2facd5f62998eebde4db..a7221faa7bdb3071ff0f63e779ec39eb94fd91a4 100644 (file)
 extern "C" {
 #endif
 
+/**
+ * @file
+ *
+ * The public libsigrokdecode header file to be used by frontends.
+ *
+ * This is the only file that libsigrokdecode users (frontends) are supposed
+ * to use and include. There are other header files which get installed with
+ * libsigrokdecode, but those are not meant to be used directly by frontends.
+ *
+ * The correct way to get/use the libsigrokdecode API functions is:
+ *
+ * @code{.c}
+ *   #include <sigrokdecode.h>
+ * @endcode
+ */
+
 /*
  * Package version macros (can be used for conditional compilation).
  */
@@ -139,7 +155,6 @@ enum {
 
 #define SRD_MAX_NUM_PROBES 64
 
-/* TODO: Documentation. */
 struct srd_decoder {
        /** The decoder ID. Must be non-NULL and unique for all decoders. */
        char *id;
@@ -251,20 +266,19 @@ typedef struct {
 SRD_API int srd_init(const char *path);
 SRD_API int srd_exit(void);
 SRD_API int srd_inst_option_set(struct srd_decoder_inst *di,
-                               GHashTable *options);
+               GHashTable *options);
 SRD_API int srd_inst_probe_set_all(struct srd_decoder_inst *di,
-                                  GHashTable *probes);
+               GHashTable *probes);
 SRD_API struct srd_decoder_inst *srd_inst_new(const char *id,
-                                             GHashTable *options);
+               GHashTable *options);
 SRD_API int srd_inst_stack(struct srd_decoder_inst *di_from,
-                          struct srd_decoder_inst *di_to);
+               struct srd_decoder_inst *di_to);
 SRD_API struct srd_decoder_inst *srd_inst_find_by_id(const char *inst_id);
-SRD_API int srd_session_start(int num_probes, int unitsize,
-                             uint64_t samplerate);
+SRD_API int srd_session_start(int num_probes, int unitsize, uint64_t samplerate);
 SRD_API int srd_session_send(uint64_t start_samplenum, const uint8_t *inbuf,
-                            uint64_t inbuflen);
+               uint64_t inbuflen);
 SRD_API int srd_pd_output_callback_add(int output_type,
-                               srd_pd_output_callback_t cb, void *cb_data);
+               srd_pd_output_callback_t cb, void *cb_data);
 
 /*--- decoder.c -------------------------------------------------------------*/