summaryrefslogtreecommitdiff
path: root/chip_interface/power_button.h
diff options
context:
space:
mode:
Diffstat (limited to 'chip_interface/power_button.h')
-rw-r--r--chip_interface/power_button.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/chip_interface/power_button.h b/chip_interface/power_button.h
index bc6d43e2d1..6b7293065e 100644
--- a/chip_interface/power_button.h
+++ b/chip_interface/power_button.h
@@ -1,7 +1,10 @@
-/* power_button.h - Power button function.
- * Hides chip-specific implementation behind this interface.
+/* Copyright (c) 2011 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.
*
- * (Chromium license) */
+ * power_button.h - Power button function.
+ * Hides chip-specific implementation behind this interface.
+ */
#ifndef __CHIP_INTERFACE_POWER_BUTTON_H
#define __CHIP_INTERFACE_POWER_BUTTON_H
@@ -10,24 +13,24 @@
* Initialize the power button as GPIO input pin and enable interrupt for
* keyboard scanner code.
*/
-EcError CrPowerButtonInit(void);
+EcError EcPowerButtonInit(void);
/* Calls GPIOPinRead() to read the GPIO state. */
/* TODO: has the state been debounced? */
-EcError CrPowerButtonGetState(void);
+EcError EcPowerButtonGetState(void);
/* Register a calback function. It is called while power button is changing its
* state (pressed or released ).
*/
-EcError CrPowerButtonRegister(void (*callback)(void));
+EcError EcPowerButtonRegister(void (*callback)(void));
/* Below is the example code to register this function. */
#if 0
/* This callback function is implemented in Chrome OS features layer. */
void PowerButtonCallback(void) {
- int pressed = CrPowerButtonGetState();
+ int pressed = EcPowerButtonGetState();
if (!prev_status) {
if (pressed) {
// Power button is just pressed. Generate scan code,
@@ -42,7 +45,7 @@ void PowerButtonCallback(void) {
}
... somewhere in init code ...
- CrPowerButtonRegister(PowerButtonCallback);
+ EcPowerButtonRegister(PowerButtonCallback);
#endif /* #if 0 */