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

Function wrRegs

interface/vstream/python/vsi_audio.py:512–540  ·  view source on GitHub ↗

Write user registers (the VSI User Registers). Write a value to a user register by index. Args: index: User register index (zero based) value: Value to write (32-bit) Returns: value: Value written (32-bit)

(index, value)

Source from the content-addressed store, hash-verified

510
511
512def wrRegs(index, value):
513 """
514 Write user registers (the VSI User Registers).
515
516 Write a value to a user register by index.
517 Args:
518 index: User register index (zero based)
519 value: Value to write (32-bit)
520 Returns:
521 value: Value written (32-bit)
522 """
523 global STATUS, CHANNELS, SAMPLE_RATE, SAMPLE_BITS
524
525 if index == 0:
526 wrCONTROL(value)
527 elif index == 1:
528 value = STATUS
529 elif index == 2:
530 wrDEVICE(value)
531 elif index == 3:
532 wrFILENAME(value)
533 elif index == 4:
534 CHANNELS = value
535 elif index == 5:
536 SAMPLE_RATE = value
537 elif index == 6:
538 SAMPLE_BITS = value
539
540 return value

Callers

nothing calls this directly

Calls 3

wrCONTROLFunction · 0.70
wrDEVICEFunction · 0.70
wrFILENAMEFunction · 0.70

Tested by

no test coverage detected