#ifndef LIBSIGROKDECODE_LIBSIGROKDECODE_INTERNAL_H
#define LIBSIGROKDECODE_LIBSIGROKDECODE_INTERNAL_H
+#include <Python.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
#include "libsigrokdecode.h"
+/* Custom Python types: */
+
+typedef struct {
+ PyObject_HEAD
+ struct srd_decoder_inst *di;
+ uint64_t start_samplenum;
+ unsigned int itercnt;
+ uint8_t *inbuf;
+ uint64_t inbuflen;
+ PyObject *sample;
+} srd_logic;
+
struct srd_session {
int session_id;
GSList *callbacks;
};
-
/* srd.c */
SRD_PRIV int srd_decoder_searchpath_add(const char *path);
SRD_PRIV int srd_inst_start(struct srd_decoder_inst *di);
SRD_PRIV int srd_inst_decode(const struct srd_decoder_inst *di,
uint64_t start_samplenum, uint64_t end_samplenum,
- const uint8_t *inbuf, uint64_t inbuflen);
+ const uint8_t *inbuf, uint64_t inbuflen, uint64_t unitsize);
SRD_PRIV void srd_inst_free(struct srd_decoder_inst *di);
SRD_PRIV void srd_inst_free_all(struct srd_session *sess, GSList *stack);