Skip to content

Commit

Permalink
[docs] note state change in DigitalInOut.switch_to_output()
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Aug 7, 2024
1 parent c2fb201 commit d016296
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion circuitpython_mocks/digitalio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ def switch_to_output(
value: Union[bool, int] = False,
drive_mode: DriveMode = DriveMode.PUSH_PULL,
):
"""Switch the Digital Pin Mode to Output"""
"""Switch the Digital Pin Mode to Output.
.. mock-expects::
This function also changes the state of the pin's `value`.
So, this function will check against `SetState`
:py:attr:`~circuitpython_mocks._mixins.Expecting.expectations`.
"""
self.direction = Direction.OUTPUT
self.value = value
self.drive_mode = drive_mode
Expand Down

0 comments on commit d016296

Please sign in to comment.