DHCOM_HAL
Hardware-abstraction library (HAL) for multiple targets, including DHCOM modules
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Typedefs
Enumerations
Enumerator
Macros
Pages
include
hal
GPIO.h
Go to the documentation of this file.
1
/*
2
* GPIO.h
3
*
4
* Created on: Dec 17, 2012
5
* Author: Peter Kishalov (PK), DH electronics GmbH
6
*/
7
8
9
#ifndef GPIO_H_
10
#define GPIO_H_
11
12
13
#include <
DHCOM_HAL.h
>
14
#include <
hal/Types.h
>
15
#include <stddef.h>
16
17
18
namespace
dhcom
19
{
20
21
22
class
System;
23
class
GPIOImpl;
24
25
26
class
DHCOM_HAL
GPIO
27
{
28
public
:
30
enum
PORT
31
{
32
PORT_GPIO_A = 0,
33
PORT_GPIO_B, PORT_GPIO_C,
PORT_GPIO_D
,
34
PORT_GPIO_E, PORT_GPIO_F, PORT_GPIO_G,
PORT_GPIO_H
,
35
PORT_GPIO_I, PORT_GPIO_J, PORT_GPIO_K,
PORT_GPIO_L
,
36
PORT_GPIO_M, PORT_GPIO_N, PORT_GPIO_O,
PORT_GPIO_P
,
37
PORT_GPIO_Q, PORT_GPIO_R, PORT_GPIO_S,
PORT_GPIO_T
,
38
PORT_GPIO_U, PORT_GPIO_V,
PORT_GPIO_W
,
39
};
40
42
enum
DIRECTION
43
{
44
DIRECTION_INPUT
,
45
DIRECTION_OUTPUT
,
46
};
47
48
GPIO
(
const
System
&sys, PORT port);
49
GPIO
(
uint16_t
pinInternal);
50
~
GPIO
();
51
52
STATUS
open();
53
STATUS
close();
54
bool
isOpen()
const
;
55
56
STATUS
setDirection(DIRECTION dir);
57
STATUS
set
(
bool
value);
58
bool
get
(
STATUS
*status = NULL)
const
;
59
int16_t
pin()
const
;
60
61
private
:
62
GPIOImpl *
const
impl_;
63
};
64
65
144
}
145
146
147
#endif
/* GPIO_H_ */
Generated on Wed Jul 10 2013 16:30:56 for DHCOM_HAL by
1.8.2