From 487c3ec5642c5d9cda0d0e334147bd5ae3a0eb04 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Mon, 12 May 2014 16:56:25 +0200 Subject: [PATCH] fixed bug with mixed r/w registers --- xml-db/put.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xml-db/put.pl b/xml-db/put.pl index 927a9ea..d2beab0 100755 --- a/xml-db/put.pl +++ b/xml-db/put.pl @@ -128,7 +128,7 @@ sub writedata { $old = $o->{$b}; my $mask = ~(((1<<$obj->{bits})-1) << $obj->{start}); $old = $old & $mask; - + my $new = $value & ((1<<$obj->{bits})-1); $new = $new << $obj->{start}; $new = $new | $old; @@ -139,7 +139,8 @@ sub writedata { my $mask = ~(((1<<$obj->{bits})-1) << $obj->{start}); my $new = $value & ((1<<$obj->{bits})-1); $new = $new << $obj->{start}; - trb_register_write($netaddr,$obj->{address}+$slice*$stepsize,$new); + + trb_register_loadbit($netaddr,$obj->{address}+$slice*$stepsize,~$mask,$new); } } -- 2.43.0