MCPcopy Create free account
hub / github.com/ARM-software/AVH / rdRegs

Function rdRegs

interface/vstream/python/vsi_audio.py:481–509  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

479
480
481def 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
512def wrRegs(index, value):

Callers

nothing calls this directly

Calls 2

rdSTATUSFunction · 0.70
rdFILENAMEFunction · 0.70

Tested by

no test coverage detected