summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/ypr0/gpio_ypr0.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/ypr0/gpio_ypr0.h')
-rw-r--r--firmware/target/hosted/ypr0/gpio_ypr0.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/firmware/target/hosted/ypr0/gpio_ypr0.h b/firmware/target/hosted/ypr0/gpio_ypr0.h
new file mode 100644
index 0000000000..9fc7444887
--- /dev/null
+++ b/firmware/target/hosted/ypr0/gpio_ypr0.h
@@ -0,0 +1,42 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: ascodec-target.h 26116 2010-05-17 20:53:25Z funman $
9 *
10 * Module wrapper for GPIO, using /dev/r0GPIO (r0Gpio.ko) of Samsung YP-R0
11 *
12 * Copyright (c) 2011 Lorenzo Miori
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
21 *
22 ****************************************************************************/
23
24#ifndef GPIO_YPR0_H
25#define GPIO_YPR0_H
26
27#include "r0GPIOIoctl.h"
28
29/* Some meaningful pins used in the R0 */
30
31#define GPIO_HEADPHONE_SENSE GPIO1_5
32//26
33#define GPIO_EXT_PWR_SENSE GPIO1_26
34//59
35#define GPIO_SD_SENSE GPIO2_24
36
37void gpio_init(void);
38void gpio_close(void);
39int gpio_control_struct(int request, R0GPIOInfo pin);
40int gpio_control(int request, int num, int mode, int val);
41
42#endif \ No newline at end of file