Skip to content

Commit 4fd5722

Browse files
authored
Update README.md
1 parent 9a117e9 commit 4fd5722

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ Writes and reads registers to/from a card's BAR.
305305
By convention, registers are 32-bit unsigned integers.
306306
Note that their addresses are given by byte address, and not as you would index an array of 32-bit integers.
307307
308+
### roc-reg-modify
309+
Modifies certain bits of a card's register through the BAR.
310+
308311
### roc-reset
309312
Resets a card channel
310313
@@ -345,11 +348,14 @@ bar = libReadoutCard.BarChannel("-1", 0) # Dummy channel
345348
bar.register_read(0)
346349
# Write 123 to register at index 0
347350
bar.register_write(0, 123)
351+
# Modify bits 3-5 to at index 0 to 0x101
352+
bar.register_modify(0, 3, 3, 0x101)
348353
349354
# Print doc strings for more information
350355
print bar.__init__.__doc__
351356
print bar.register_read.__doc__
352357
print bar.register_write.__doc__
358+
print bar.register_modify.__doc__
353359
~~~
354360
Note: depending on your environment, you may have to be in the same directory as the libReadoutCard.so file to import
355361
it.

0 commit comments

Comments
 (0)