summaryrefslogtreecommitdiff
path: root/include/switch.h
blob: 97d428e356e4ac2f90c8981e8446a3a498fe2d1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Copyright 2013 The ChromiumOS Authors
 * 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"

#ifdef CONFIG_SWITCH
/**
 * Interrupt handler for switch inputs.
 *
 * @param signal	Signal which triggered the interrupt.
 */
void switch_interrupt(enum gpio_signal signal);
#else
static inline void switch_interrupt(enum gpio_signal signal)
{
}
#endif /* !CONFIG_SWITCH */

#endif /* __CROS_EC_SWITCH_H */