Skip to content

Commit

Permalink
TMC-IC: RegistersGroups word-width shall be 32 bit by default if None…
Browse files Browse the repository at this point in the history
… is given
  • Loading branch information
trinamic-bp committed Jan 31, 2025
1 parent ce333e3 commit 20c056e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pytrinamic/ic/tmc_ic.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,14 @@ class RegisterGroup:
The registers are added in a derived class as object attributes.
It also contains convenience functions.
"""
def __init__(self, name, channel, block, width=32) -> None:
def __init__(self, name, channel, block, width) -> None:
self.name = name
self.channel = channel
self.block = block
self.width = width
if width is None:
self.width = 32
else:
self.width = width

def find(self, name: str):
for register in self.registers():
Expand Down

0 comments on commit 20c056e

Please sign in to comment.