sparkfun / Arduino_Apollo3

Arduino core to support the Apollo3 microcontroller from Ambiq Micro
83 stars 38 forks source link

implementing pin mappings in an arduino compatible way #391

Closed jerabaul29 closed 2 years ago

jerabaul29 commented 3 years ago

Issues #390 and #270 (and possibly quite a few posts on the forum) are boiling deep down to a few pin mappings being missing, at least:

digitalPinToPort
portOutputRegister
digitalPinToBitMask
portInputRegister

Would it be possible to define / make these available, for each artemis board variant? That would be very useful for making it possible to use a number of breakout boards which libraries rely on these being defined to work.

Wenn0101 commented 2 years ago

I cannot find these functions as part of the documented Arduino API. At first I thought they hadn't been documented yet, but I don't think they ever will.

They appear to be functions that allow the user to "break through" the abstraction to the hardware underneath. Unfortunately, they don't seem to make much sense when referring to the apollo3 processor underneath all of this. I can't see any way to implement these that doesn't feel like a quirky workaround, I suggest working with the libraries that use these to implement their functionality to work with the documented Arduino API