mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 01:21:49 +00:00
Keyborg: options to turn on/off fast scan mode
For experiments, we sometimes need to turn off fast scan mode. Let's add an option so that this can be easily done. BUG=None TEST=Manual test with fast scan mode on/off. BRANCH=None Change-Id: Icd9a4a4b18699f34f424e84167748fcfe30588e3 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/202141 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
200246949a
commit
4b396a05c4
@@ -13,6 +13,7 @@
|
||||
|
||||
/* Optional features */
|
||||
#define CONFIG_DEBUG_PRINTF
|
||||
#define CONFIG_KEYBORG_FAST_SCAN
|
||||
#undef CONFIG_ADC
|
||||
#undef CONFIG_COMMON_GPIO
|
||||
#undef CONFIG_COMMON_PANIC_OUTPUT
|
||||
|
||||
@@ -148,6 +148,7 @@ static inline void set_scan_needed(int col)
|
||||
scan_needed[word + 1] |= SPAN_MASK >> (32 - bit);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KEYBORG_FAST_SCAN
|
||||
int fast_scan(uint32_t *data)
|
||||
{
|
||||
int col;
|
||||
@@ -181,6 +182,17 @@ int fast_scan(uint32_t *data)
|
||||
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
#else
|
||||
int fast_scan(uint32_t *data)
|
||||
{
|
||||
int col;
|
||||
|
||||
for (col = 0; col < COL_COUNT * 2; ++col)
|
||||
set_scan_needed(col);
|
||||
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
void scan_column(uint8_t *data)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user