Lines Matching refs:field
67 field = self._reg.find(f".//fields/field[name='{name}']")
68 field_lsb = int(field.find("lsb").text, 0)
69 field_msb = int(field.find("msb").text, 0)
75 def _enums(self, field: str) -> list[ET.Element]:
80 def __getitem__(self, field: str) -> int:
84 msk, pos = self._msk_pos(field)
88 def __setitem__(self, field: str, value: int) -> None:
92 msk, pos = self._msk_pos(field)
98 def enum_get(self, field: str) -> str:
99 value = self[field]
100 for enum in self._enums(field):
106 def enum_set(self, field: str, value: str) -> None:
107 for enum in self._enums(field):
109 self[field] = int(enum.find("value").text, 0)