Read user registers (the VSI User Registers). Read the value of a user register by index. Args: index: User register index (zero based) Returns: value: Value read (32-bit)
(index)
| 479 | |
| 480 | |
| 481 | def rdRegs(index): |
| 482 | """ |
| 483 | Read user registers (the VSI User Registers). |
| 484 | |
| 485 | Read the value of a user register by index. |
| 486 | Args: |
| 487 | index: User register index (zero based) |
| 488 | Returns: |
| 489 | value: Value read (32-bit) |
| 490 | """ |
| 491 | global CONTROL, DEVICE, CHANNELS, SAMPLE_RATE, SAMPLE_BITS |
| 492 | value = 0 |
| 493 | |
| 494 | if index == 0: |
| 495 | value = CONTROL |
| 496 | elif index == 1: |
| 497 | value = rdSTATUS() |
| 498 | elif index == 2: |
| 499 | value = DEVICE |
| 500 | elif index == 3: |
| 501 | value = rdFILENAME() |
| 502 | elif index == 4: |
| 503 | value = CHANNELS |
| 504 | elif index == 5: |
| 505 | value = SAMPLE_RATE |
| 506 | elif index == 6: |
| 507 | value = SAMPLE_BITS |
| 508 | |
| 509 | return value |
| 510 | |
| 511 | |
| 512 | def wrRegs(index, value): |
nothing calls this directly
no test coverage detected