Files
OpenCellular/board/keyborg/board.h
Vic Yang 94acd01e0c Keyborg: implement methods needed for touch wake
In order to wake the chips from STOP/SLEEP mode with a touch, we need to
put the two chips in correct state before going into STOP/SLEEP mode.
Also, when one of the chips wakes up, it needs to wake the other chip
with GPIO interrupt.

This CL implements the necessary methods and also adds a sample routine
that put the chips in STOP mode and wait for a touch using the
implemented methods.

BUG=None
TEST=Build and boot. Touch the panel and see the response in console.
BRANCH=None

Change-Id: Ia5f7df8b550ee2459bcae1840f8a2717c8d947ce
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/204482
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2014-06-19 03:25:12 +00:00

53 lines
1.2 KiB
C

/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Keyborg board configuration */
#ifndef __BOARD_H
#define __BOARD_H
/* 48 MHz SYSCLK clock frequency */
#define CPU_CLOCK 48000000
/* Optional features */
#define CONFIG_DEBUG_PRINTF
#define CONFIG_KEYBORG_FAST_SCAN
#define CONFIG_KEYBORG_SPI_FULL_PACKET
#undef CONFIG_ADC
#undef CONFIG_COMMON_GPIO
#undef CONFIG_COMMON_PANIC_OUTPUT
#undef CONFIG_COMMON_RUNTIME
#undef CONFIG_COMMON_TIMER
#undef CONFIG_CONSOLE_CMDHELP
#undef CONFIG_DEBUG_EXCEPTIONS
#undef CONFIG_DEBUG_STACK_OVERFLOW
#undef CONFIG_FLASH
#undef CONFIG_FMAP
#undef CONFIG_LID_SWITCH
#undef CONFIG_TASK_PROFILING
#undef CONFIG_WATCHDOG_HELP
/* How the touch data is stored and printed */
#define CONFIG_ENCODE_SEGMENT
#undef CONFIG_ENCODE_RAW
#undef CONFIG_ENCODE_DUMP_PYTHON
#ifndef __ASSEMBLER__
enum gpio_signal;
/* Initialize all useful registers */
void hardware_init(void);
/* Re-initialize clock */
void hardware_clock_init(void);
/* On the master, reboot both chips. On the slave, reboot itself. */
void system_reboot(void);
#endif /* !__ASSEMBLER__ */
#endif /* __BOARD_H */