KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dev_gpio.h
Go to the documentation of this file.
1 /*
2  * KM3NeT CLB v2 Firmware
3  * ----------------------
4  *
5  * Copyright 2013 KM3NeT Collaboration
6  *
7  * All Rights Reserved.
8  *
9  *
10  * File : dev_gpio.h
11  * Created : 5 mrt. 2013
12  * Author : Vincent van Beveren
13  */
14 
15 
16 #ifndef DEV_GPIO_H_
17 #define DEV_GPIO_H_
18 
19 #include "dev_defs.h"
20 
21 /**
22  * @file
23  *
24  * @ingroup devices
25  *
26  * This provides a device mapping for a wishbone bus mapped GPIO device.
27  */
28 #define SDB_ID_GPIO 0xCDE5276D //! SDB ID GPIO
29 
30 /**
31  * Structure defines GPIO device.
32  */
33 typedef struct
34 {
35  reg_o CLR; ///< Clear output register
36  reg_o SET; ///< Set output register.
37  reg_io DIR; ///< Direction register (1 - output, 0 - input).
38  reg_i GET; ///< Pin state registers.
39 } GPIO_Device;
40 
41 #endif /* DEV_GPIO_H_ */
volatile unsigned int SET
Set output register.
Definition: dev_gpio.h:36
const volatile unsigned int GET
Pin state registers.
Definition: dev_gpio.h:38
volatile unsigned int CLR
Clear output register.
Definition: dev_gpio.h:35
Structure defines GPIO device.
Definition: dev_gpio.h:33
volatile unsigned int DIR
Direction register (1 - output, 0 - input).
Definition: dev_gpio.h:37
#define reg_i
Read-only register.
Definition: dev_defs.h:39
#define reg_o
Write-only register.
Definition: dev_defs.h:36
#define reg_io
Input/Output register.
Definition: dev_defs.h:33
This module contains some very basic type definitions used for hardware mappings. ...