From 5b8679ee9e0ad4d0cbec5e9317a1fc9168831708 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 7 Aug 2024 02:45:58 -0700 Subject: [PATCH] [docs] note state change in `DigitalInOut.switch_to_output()` --- circuitpython_mocks/digitalio/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/circuitpython_mocks/digitalio/__init__.py b/circuitpython_mocks/digitalio/__init__.py index 450a585..ad90722 100644 --- a/circuitpython_mocks/digitalio/__init__.py +++ b/circuitpython_mocks/digitalio/__init__.py @@ -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