Subversion Repositories Projects

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
244 dhylands 1
/****************************************************************************
2
*
3
*   Copyright (c) 2008 Dave Hylands     <dhylands@gmail.com>
4
*
5
*   This program is free software; you can redistribute it and/or modify
6
*   it under the terms of the GNU General Public License version 2 as
7
*   published by the Free Software Foundation.
8
*
9
*   Alternatively, this software may be distributed under the terms of BSD
10
*   license.
11
*
12
*   See README and COPYING for more details.
13
*
14
****************************************************************************
15
*
16
*   Interface file for the user-gpio library, which allows user-mode
17
*   access to gpio pins.
18
*
19
****************************************************************************/
20
 
21
#if !defined( USER_GPIO_H )
22
#define USER_GPIO_H
23
 
24
/* ---- Include Files ---------------------------------------------------- */
25
 
26
/* ---- Constants and Types ---------------------------------------------- */
27
 
28
/* ---- Variable Externs ------------------------------------------------- */
29
 
30
/* ---- Function Prototypes ---------------------------------------------- */
31
 
32
int  gpio_init( void );
33
void gpio_term( void );
34
 
35
/*
36
 * This is the same API as gpiolib, which is used from kernel space.
37
 */
38
 
39
int  gpio_request( unsigned gpio, const char *label );
40
void gpio_free( unsigned gpio );
41
int  gpio_direction_input( unsigned gpio );
42
int  gpio_direction_output( unsigned gpio, int initialValue );
43
int  gpio_get_value( unsigned gpio );
44
void gpio_set_value( unsigned gpio, int value );
45
 
46
#endif  /* USER_GPIO_H */
47