<p style="white-space: pre-wrap; word-wrap: break-word;">This  is a fairly unique function, because we know the pins we're interested in are configured for input, we don't care about intermittent pin state manipulation by interrupts, and the state changes are fairly slow. The atmel functions are mostly very generic and inefficient, there is already a few cycles delay for every port state access unless you run those in the high-power modes, and then there is a critical section wrapped around the atmel function because it uses multiple accesses to check per-pin direction and also gets the state for pins set to output, none of which is necessary here.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/26395">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/26395">change 26395</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/26395"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ccid-firmware </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I8f32ad446438ef7776cc8a4aac1946f1a39a8ceb </div>
<div style="display:none"> Gerrit-Change-Number: 26395 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 27 Nov 2021 14:55:59 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>