File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,9 @@ Writes and reads registers to/from a card's BAR.
305305By convention, registers are 32-bit unsigned integers.
306306Note 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
309312Resets a card channel
310313
@@ -345,11 +348,14 @@ bar = libReadoutCard.BarChannel("-1", 0) # Dummy channel
345348bar.register_read(0)
346349# Write 123 to register at index 0
347350bar.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
350355print bar.__init__.__doc__
351356print bar.register_read.__doc__
352357print bar.register_write.__doc__
358+ print bar.register_modify.__doc__
353359~~~
354360Note: depending on your environment, you may have to be in the same directory as the libReadoutCard.so file to import
355361it.
You can’t perform that action at this time.
0 commit comments