File tree 2 files changed +32
-2
lines changed
2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 6
6
`circuitpython_typing.led`
7
7
================================================================================
8
8
9
- Type annotation definitions for device drivers. Used for where LEDs are
10
- type annotated.
9
+ Type annotation definitions for LEDs.
11
10
12
11
* Author(s): Alec Delaney
13
12
"""
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 Protocol
17
+ except ImportError :
18
+ from typing_extensions import Protocol
19
+
20
+
21
+ class PWMOut (Protocol ):
22
+ """Protocol that implements, at the bare minimum, the `duty_cycle` property"""
23
+
24
+ @property
25
+ def duty_cycle (self ) -> int :
26
+ """The duty cycle as a ratio using 16-bits"""
27
+ ...
28
+
29
+ @duty_cycle .setter
30
+ def duty_cycle (self , duty_cycle : int ) -> None :
31
+ ...
You can’t perform that action at this time.
0 commit comments