diff options
Diffstat (limited to 'chip_interface/lid.h')
-rw-r--r-- | chip_interface/lid.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/chip_interface/lid.h b/chip_interface/lid.h index cffa35c4f4..8c680428f8 100644 --- a/chip_interface/lid.h +++ b/chip_interface/lid.h @@ -1,26 +1,29 @@ -/* lid.h - handle lid open/close +/* 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) */ + * lid.h - handle lid open/close + */ #ifndef __CHIP_INTERFACE_LID_H #define __CHIP_INTERFACE_LID_H /* Initialize the GPIO pin */ -EcError CrLidSwitchInit(void); +EcError EcLidSwitchInit(void); /* Calls GPIOPinRead() to read the GPIO state. */ /* TODO: has the state been debounced? */ -EcError CrLidSwitchState(void); +EcError EcLidSwitchState(void); /* Register a calback function. It is called while lid state is changed. */ -EcError CrLidSwitchRegister(void (*callback)(void)); +EcError EcLidSwitchRegister(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 LidSwitchChanged(void) { - int lid_open = CrLidSwitchState(); + int lid_open = EcLidSwitchState(); if (lid_open) { if (system is in S3) { // resume system @@ -32,7 +35,7 @@ void LidSwitchChanged(void) { } } ... somewhere in init code ... - CrLidSwitchRegister(LidSwitchChanged); + EcLidSwitchRegister(LidSwitchChanged); #endif #endif /* __CHIP_INTERFACE_LID_H */ |