-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
rfcRequest for CommentRequest for Comment
Description
This continues what started being discussed in #1405. The Pin API as far as the constructor (and the init()) method is concerned needs to be modified a bit in order to make it more general and suitable for a wide range of MCUs. Here's my proposal:
Pin(pin, mode, *, type=Pin.PP, pull=None, af=0)
mode
can beIN
,OUT
orAF
type
can bePP
orOD
. Irrelevant whenmode=Pin.IN
.pull
can bePULL_UP
,PULL_DOWN
orNone
(orPULL_NONE
but we could save on QSTRs)af
is only relevant whenmode=Pin.AF
. Alternate functions can vary widely from micro to micro so I think it's OK for the values of this param to be port specific.
Metadata
Metadata
Assignees
Labels
rfcRequest for CommentRequest for Comment