Files
OpenCellular/include/switch.h
ChromeOS Developer 6c285c0994 Move external power detect for link to its own file
Now that it doesn't need to leverage SWITCH_TASK to send the AC_CHANGE
notification, pure GPIO-based external power detection can move from
switch.c to its own file.

BUG=chrome-os-partner:18256
BRANCH=none
TEST=add AC power, UI shows charging indicator; remove AC, indicator goes away

Change-Id: Id495f34185b7d971c241ac6d0a8311a6bf544507
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/45789
2013-03-19 10:31:12 -07:00

39 lines
789 B
C

/* Copyright (c) 2012 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.
*/
/* Switch module for Chrome EC */
#ifndef __CROS_EC_SWITCH_H
#define __CROS_EC_SWITCH_H
#include "common.h"
#include "gpio.h"
/**
* Interrupt handler for switch inputs.
*
* @param signal Signal which triggered the interrupt.
*/
void switch_interrupt(enum gpio_signal signal);
/**
* Switch task.
*/
void switch_task(void);
/**
* Return non-zero if lid is open.
*
* Uses the debounced lid state, not the raw signal from the GPIO.
*/
int switch_get_lid_open(void);
/**
* Return non-zero if write protect signal is asserted.
*/
int switch_get_write_protect(void);
#endif /* __CROS_EC_SWITCH_H */