Skip to content

Commit

Permalink
Update _PMBus.py
Browse files Browse the repository at this point in the history
### Description 
- add arg to allow the PHASE to not be included
  • Loading branch information
ruck314 authored Nov 4, 2024
1 parent 266afd6 commit 91997a8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions python/surf/protocols/i2c/_PMBus.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import pyrogue as pr

class PMBus(pr.Device):
def __init__(self, simpleDisplay = True, dynamicAddr=False, **kwargs):
def __init__(self, simpleDisplay = True, includePhase = True, dynamicAddr=False, **kwargs):
super().__init__(**kwargs)

self.add(pr.RemoteVariable(
Expand Down Expand Up @@ -73,13 +73,14 @@ def __init__(self, simpleDisplay = True, dynamicAddr=False, **kwargs):
hidden = simpleDisplay,
))

self.add(pr.RemoteVariable(
name = 'PHASE',
offset = (4*0x04),
bitSize = 8,
mode = 'RW',
hidden = simpleDisplay,
))
if includePhase:
self.add(pr.RemoteVariable(
name = 'PHASE',
offset = (4*0x04),
bitSize = 8,
mode = 'RW',
hidden = simpleDisplay,
))

self.add(pr.RemoteVariable(
name = 'WRITE_PROTECT',
Expand Down

0 comments on commit 91997a8

Please sign in to comment.