diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-02-23 07:20:33 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-02-23 07:20:33 +0100 |
commit | a962c90543955bac98308c1b0d909048070d900a (patch) | |
tree | 70b06851187e6bf8cfd8ee28931bdea25ea92ac7 /pywrap/pcipywrap.i | |
parent | 055279e09c3db9429e02874ec9620b9af357c80a (diff) | |
parent | 52eb7f4fb76ddf99dedf44332aae7af4df76ab36 (diff) | |
download | pcitool-a962c90543955bac98308c1b0d909048070d900a.tar.gz pcitool-a962c90543955bac98308c1b0d909048070d900a.tar.bz2 pcitool-a962c90543955bac98308c1b0d909048070d900a.tar.xz pcitool-a962c90543955bac98308c1b0d909048070d900a.zip |
Merge Python scripting support from Vasiliy Chernov
Diffstat (limited to 'pywrap/pcipywrap.i')
-rw-r--r-- | pywrap/pcipywrap.i | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pywrap/pcipywrap.i b/pywrap/pcipywrap.i new file mode 100644 index 0000000..88a746f --- /dev/null +++ b/pywrap/pcipywrap.i @@ -0,0 +1,25 @@ +%module pcipywrap + +%{ +#include "pcipywrap.h" +%} + +extern void __redirect_logs_to_exeption(); + +typedef struct { + %extend { + Pcipywrap(const char* fpga_device = NULL, const char* model = NULL); + Pcipywrap(PyObject* ctx){return create_Pcipywrap(ctx);} + ~Pcipywrap(); + + PyObject* read_register(const char *regname = NULL, const char *bank = NULL); + PyObject* write_register(PyObject* val, const char *regname, const char *bank = NULL); + + PyObject* get_property(const char *prop); + PyObject* set_property(PyObject* val, const char *prop); + + PyObject* get_registers_list(const char *bank = NULL); + PyObject* get_register_info(const char* reg,const char *bank = NULL); + PyObject* get_property_list(const char* branch = NULL); + } +} Pcipywrap; |