diff options
author | Vasilii Chernov <vchernov@inr.ru> | 2016-03-03 10:34:49 +0100 |
---|---|---|
committer | Vasilii Chernov <vchernov@inr.ru> | 2016-03-03 10:34:49 +0100 |
commit | ee16e47966afe180d3c32e2b1d93301052894fac (patch) | |
tree | 56aecf261aaae57e28c08cef573ae6642ec5394d /views/transform.c | |
parent | 02d0026e2df2ba5c68c0c1a67aec4437c9e8e8f3 (diff) | |
parent | 195c28f3074486165b6e0935362810f8a1fb9531 (diff) | |
download | pcitool-ee16e47966afe180d3c32e2b1d93301052894fac.tar.gz pcitool-ee16e47966afe180d3c32e2b1d93301052894fac.tar.bz2 pcitool-ee16e47966afe180d3c32e2b1d93301052894fac.tar.xz pcitool-ee16e47966afe180d3c32e2b1d93301052894fac.zip |
Merge with http://ufo.kit.edu/ufo/log/csa/pcitool 369 revision
Diffstat (limited to 'views/transform.c')
-rw-r--r-- | views/transform.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/views/transform.c b/views/transform.c index 25f30d1..3aa3b2b 100644 --- a/views/transform.c +++ b/views/transform.c @@ -18,7 +18,7 @@ static pcilib_view_context_t * pcilib_transform_view_init(pcilib_t *ctx, pcilib_ pcilib_view_context_t *view_ctx; pcilib_transform_view_description_t *v = (pcilib_transform_view_description_t*)(ctx->views[view]); - if(v->script) { + if (v->script) { pcilib_access_mode_t mode = 0; err = pcilib_py_load_script(ctx, v->script); @@ -39,11 +39,13 @@ static pcilib_view_context_t * pcilib_transform_view_init(pcilib_t *ctx, pcilib_ if (!v->read_from_reg) v->read_from_reg = "read_from_register"; if (!v->write_to_reg) v->write_to_reg = "write_to_register"; + } else if (!ctx->py) { + v->base.mode &= (~PCILIB_REGISTER_RW); } - + view_ctx = (pcilib_view_context_t*)malloc(sizeof(pcilib_view_context_t)); if (view_ctx) memset(view_ctx, 0, sizeof(pcilib_view_context_t)); - + return view_ctx; } |