diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-02-26 02:14:55 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-02-26 02:14:55 +0100 |
commit | 30d740cc6accc3bd477e6bc924d5b74dad71ee6d (patch) | |
tree | 2e197791d23958258b34a3bc53cc5b0584ac7060 /pywrap/pcipywrap.h | |
parent | 3ea1907f3169e0233d3a32a7d470af3c34b6f967 (diff) | |
parent | ed7a7ff66c64cc2e164070865306e7d79652063a (diff) | |
download | pcitool-30d740cc6accc3bd477e6bc924d5b74dad71ee6d.tar.gz pcitool-30d740cc6accc3bd477e6bc924d5b74dad71ee6d.tar.bz2 pcitool-30d740cc6accc3bd477e6bc924d5b74dad71ee6d.tar.xz pcitool-30d740cc6accc3bd477e6bc924d5b74dad71ee6d.zip |
Merge of further work on Python scripting from Vasiliy Chernov
Diffstat (limited to 'pywrap/pcipywrap.h')
-rw-r--r-- | pywrap/pcipywrap.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pywrap/pcipywrap.h b/pywrap/pcipywrap.h index 99cebd7..5876a06 100644 --- a/pywrap/pcipywrap.h +++ b/pywrap/pcipywrap.h @@ -65,4 +65,22 @@ PyObject* Pcipywrap_get_registers_list(Pcipywrap *self, const char *bank); PyObject* Pcipywrap_get_register_info(Pcipywrap *self, const char* reg,const char *bank); PyObject* Pcipywrap_get_property_list(Pcipywrap *self, const char* branch); +PyObject* Pcipywrap_read_dma(Pcipywrap *self, unsigned char dma, size_t size); + +PyObject* Pcipywrap_lock_global(Pcipywrap *self); +void Pcipywrap_unlock_global(Pcipywrap *self); + +/*! + * \brief Wrap for pcilib_lock + * \param lock_id lock identificator + * \warning This function should be called only under Python standart threading lock. + * Otherwise it will stuck with more than 1 threads. See /xml/test_pywrap/test_prop_mt.py + * for example. + * \return 1, serialized to PyObject or NULL with exeption text, if failed. + */ +PyObject* Pcipywrap_lock(Pcipywrap *self, const char *lock_id); + +PyObject* Pcipywrap_try_lock(Pcipywrap *self, const char *lock_id); +PyObject* Pcipywrap_unlock(Pcipywrap *self, const char *lock_id); + #endif /* PCIPYWRAP_H */ |