summaryrefslogtreecommitdiffstats
path: root/xml/test_pywrap/test_prop2.py
diff options
context:
space:
mode:
authorVasilii Chernov <vchernov@inr.ru>2016-02-08 11:55:33 +0100
committerVasilii Chernov <vchernov@inr.ru>2016-02-08 11:55:33 +0100
commite10e102b8b0ff3bf35f16b5276d56059d242e1fd (patch)
treee5ae763aa808412523ee74d6c8cbdabf5b01695f /xml/test_pywrap/test_prop2.py
parent5349163e93a107fdfea2ad58760f6149a8d749b0 (diff)
downloadpcitool-e10e102b8b0ff3bf35f16b5276d56059d242e1fd.tar.gz
pcitool-e10e102b8b0ff3bf35f16b5276d56059d242e1fd.tar.bz2
pcitool-e10e102b8b0ff3bf35f16b5276d56059d242e1fd.tar.xz
pcitool-e10e102b8b0ff3bf35f16b5276d56059d242e1fd.zip
Add support for setting register value to script transfrom. Add set_property and get_property functions to pcipywrap. Cleaning cmakelists from unused dependencies
Diffstat (limited to 'xml/test_pywrap/test_prop2.py')
-rw-r--r--xml/test_pywrap/test_prop2.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/xml/test_pywrap/test_prop2.py b/xml/test_pywrap/test_prop2.py
index e9a3364..68c6f1e 100644
--- a/xml/test_pywrap/test_prop2.py
+++ b/xml/test_pywrap/test_prop2.py
@@ -1,7 +1,8 @@
import pcipywrap
-import os
-def read_from_register():
- reg1_val = pcipywrap.read_register('reg1');
- test_prop1_val = pcipywrap.read_register('test_prop3');
- return test_prop1_val - reg1_val;
+def read_from_register():
+ return pcipywrap.get_property('/registers/fpga/reg1') / 3
+
+def write_to_register(value):
+ pcipywrap.set_property('/registers/fpga/reg1', value*3)
+