From 7c9f26b5826665cda05a30720275c2e00a31cbae Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Fri, 8 Mar 2013 16:27:32 -0800 Subject: [PATCH] stm32: add some documentation to keyboard_scan.c This adds some documentation explaining the method to the madness involving the board's gpio_list array. BUG=none BRANCH=none TEST=it's just comments. Change-Id: I30731555bbc358b0bebd75f906cbbb3116206146 Signed-off-by: David Hendricks Reviewed-on: https://gerrit.chromium.org/gerrit/44994 Reviewed-by: Vincent Palatin --- chip/stm32/keyboard_scan.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chip/stm32/keyboard_scan.c b/chip/stm32/keyboard_scan.c index f1532f6ec5..5d12a092b9 100644 --- a/chip/stm32/keyboard_scan.c +++ b/chip/stm32/keyboard_scan.c @@ -5,6 +5,12 @@ /* * Keyboard scanner module for Chrome EC + * + * To make this code portable, we rely heavily on looping over the keyboard + * input and output entries in the board's gpio_list[]. Each set of inputs or + * outputs must be listed in consecutive, increasing order so that scan loops + * can iterate beginning at KB_IN00 or KB_OUT00 for however many GPIOs are + * utilized (KB_INPUTS or KB_OUTPUTS). */ #include "atomic.h"