Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/peakrdl_python/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

Variables that describes the peakrdl-python Package
"""
__version__ = "3.0.0rc7"
__version__ = "3.0.0rc8"
45 changes: 0 additions & 45 deletions src/peakrdl_python/lib/base_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,28 +385,6 @@ class _FieldReadOnlyFramework(Field[FieldType], ABC):
"""
__slots__ : list[str] = []

def decode_read_value(self, value: int) -> FieldType:
"""
extracts the field value from a register value, by applying the bit
mask and shift needed

Args:
value: value to decode, normally read from a register

Returns:
field value

Warning:
This method will be removed from a future version, if you have a compelling use
case for it please add a comment to the #184 ticket

"""
# end users should not need access to the `decode_read_value` as the decoding is done
# for them, it felt like an anomaly that this was public, see #184
warnings.warn('decode_read_value will be made private in a future version',
DeprecationWarning, stacklevel=2)
return self._decode_read_value(value=value)

def _decode_read_value(self, value: int) -> FieldType:
"""
extracts the field value from a register value, by applying the bit
Expand Down Expand Up @@ -476,29 +454,6 @@ def _write_value_checks(self, value: int) -> None:
raise ValueError(f'value to be written to register must be less '
f'than or equal to {self.max_value:d}')


def encode_write_value(self, value: FieldType) -> int:
"""
Check that a value is legal for the field and then encode it in preparation to be written
to the register

Args:
value: field value

Returns:
value which can be applied to the register to update the field

Warning:
This method will be removed from a future version, if you have a compelling use
case for it please add a comment to the #184 ticket

"""
# end users should not need access to the `decode_read_value` as the decoding is done
# for them, it felt like an anomaly that this was public, see #184
warnings.warn('encode_write_value will be made private in a future version',
DeprecationWarning, stacklevel=2)
return self._encode_write_value(value=value)

def _encode_write_value(self, value: FieldType) -> int:
"""
Check that a value is legal for the field and then encode it in preparation to be written
Expand Down