mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
Cr50: Fix compilation without CONFIG_USB_HID defined.
Just a minor tweak to #ifdef a bit of code that is only meaningful if CONFIG_USB_HID is defined. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I3491f67d7145d7c4a7e4f6ad3944172f0f49327c Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/275130 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
1de5ac02ec
commit
09f8a93bb8
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "gpio_list.h"
|
||||
|
||||
#ifdef CONFIG_USB_HID
|
||||
static void send_hid_event(void)
|
||||
{
|
||||
#if !defined(CHIP_VARIANT_CR50_A1)
|
||||
@@ -45,6 +46,7 @@ static void send_hid_event(void)
|
||||
#endif
|
||||
}
|
||||
DECLARE_DEFERRED(send_hid_event);
|
||||
#endif
|
||||
|
||||
/* Interrupt handler for button pushes */
|
||||
void button_event(enum gpio_signal signal)
|
||||
@@ -57,7 +59,9 @@ void button_event(enum gpio_signal signal)
|
||||
signal -= (GPIO_SW_N_ - GPIO_SW_N);
|
||||
|
||||
v = gpio_get_level(signal);
|
||||
#ifdef CONFIG_USB_HID
|
||||
send_hid_event();
|
||||
#endif
|
||||
ccprintf("Button %d = %d\n", signal, v);
|
||||
gpio_set_level(signal - GPIO_SW_N + GPIO_LED_4, v);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user