File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: Copyright (c) 2022 Alec Delaney
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+
5
+ """
6
+ `circuitpython_typing.pwmio`
7
+ ================================================================================
8
+
9
+ Type annotation definitions for PWMOut where Blinka doesn't otherwise define it.
10
+
11
+ * Author(s): Alec Delaney
12
+ """
13
+
14
+ # # Protocol was introduced in Python 3.8.
15
+ try :
16
+ from typing import Union , Tuple , Protocol
17
+ except ImportError :
18
+ from typing_extensions import Protocol
19
+
20
+ class PWMOut (Protocol ):
21
+ """Protocol that implements, at the bare minimum, the `duty_cycle` property"""
22
+
23
+ @property
24
+ def duty_cycle (self ) -> int :
25
+ """The duty cycle as a ratio using 16-bits"""
26
+ ...
27
+
28
+ @duty_cycle .setter
29
+ def duty_cycle (self , duty_cycle : int ) -> None :
30
+ ...
You can’t perform that action at this time.
0 commit comments