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

Function wrRegs

interface/sensor/python/vsi_sensor.py:476–506  ·  view source on GitHub ↗
(index, value)

Source from the content-addressed store, hash-verified

474# @param value value to write (32-bit)
475# @return value value written (32-bit)
476def wrRegs(index, value):
477 global SAMPLE_SIZE, DATA_THRESHOLD, FIFO_SIZE
478
479 if index == 0:
480 wrCONTROL(value)
481 elif index == 1:
482 value = STATUS
483 elif index == 2:
484 wrSENSOR_NAME_LEN(value)
485 elif index == 3:
486 wrSENSOR_NAME_CHAR(chr(value))
487 elif index == 4:
488 value = SENSOR_NAME_VALID
489 elif index == 5:
490 if value == 0:
491 value = 1
492 SAMPLE_SIZE = value
493 elif index == 6:
494 value = SAMPLE_COUNT
495 elif index == 7:
496 value = SAMPLE_PORT
497 elif index == 8:
498 if value == 0:
499 value = 1
500 DATA_THRESHOLD = value
501 elif index == 9:
502 if value == 0:
503 value = 1
504 FIFO_SIZE = value
505
506 return value

Callers

nothing calls this directly

Calls 3

wrSENSOR_NAME_LENFunction · 0.85
wrSENSOR_NAME_CHARFunction · 0.85
wrCONTROLFunction · 0.70

Tested by

no test coverage detected