blob: b8f5bdb0866b542ede8dd6f1e67e90a2f8b5f855 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
%module pcipywrap
%{
#include "pcipywrap.h"
%}
extern void redirect_logs_to_exeption();
typedef struct {
%extend {
pcipywrap(const char* fpga_device = "/dev/fpga0", 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);
PyObject* read_dma(unsigned char dma, size_t size);
PyObject* lock_global();
void unlock_global();
PyObject* lock(const char *lock_id);
PyObject* lock_persistent(const char *lock_id);
PyObject* try_lock(const char *lock_id);
PyObject* try_lock_persistent(const char *lock_id);
PyObject* unlock(const char *lock_id);
PyObject* unlock_persistent(const char *lock_id);
}
} pcipywrap;
|