-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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)modecan beIN,OUTorAFtypecan bePPorOD. Irrelevant whenmode=Pin.IN.pullcan bePULL_UP,PULL_DOWNorNone(orPULL_NONEbut we could save on QSTRs)afis 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