コード例 #1
0
ファイル: gesture.c プロジェクト: Basavaraja-MS/ec_local
void gesture_calc(uint32_t *event)
{
	/* Only check for gesture if lid is closed and tap detection is on */
	if (!tap_detection || lid_is_open())
		return;

	if (gesture_tap_for_battery())
		*event |= CONFIG_GESTURE_TAP_EVENT;
}
コード例 #2
0
ファイル: gesture.c プロジェクト: fourier49/BZ_DEV_EC
void gesture_calc(void)
{
	/* Only check for gesture if lid is closed and tap detection is on */
	if (!tap_detection || lid_is_open())
		return;

	if (gesture_tap_for_battery()) {
		CPRINTS("Double Tap!");
		lightbar_sequence(LIGHTBAR_TAP);

		/* Don't need to run motion sense task for a while */
		task_wait_event(500 * MSEC);
	}
}