From 6ed72445c1789c8407d539d24a177f32f42fe5c8 Mon Sep 17 00:00:00 2001
From: schneider <schneider@muc.ccc.de>
Date: Sat, 17 Aug 2019 08:14:51 +0200
Subject: [PATCH] doc(buttons): Add a comment about not using PB_Get

---
 epicardium/modules/buttons.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/epicardium/modules/buttons.c b/epicardium/modules/buttons.c
index e2cb20d3..8364e725 100644
--- a/epicardium/modules/buttons.c
+++ b/epicardium/modules/buttons.c
@@ -15,6 +15,10 @@ uint8_t epic_buttons_read(uint8_t mask)
 {
 	uint8_t ret = 0;
 	if (portexpander_detected() && (mask & 0x3)) {
+		/*
+		 * Not using PB_Get() here as that performs one I2C transcation
+		 * per button.
+		 */
 		uint8_t pin_status = ~portexpander_get();
 
 		for (uint8_t m = 1; m < 0x8; m <<= 1) {
-- 
GitLab