Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
28
Issues
28
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
0bd09ee8
Commit
0bd09ee8
authored
Mar 07, 2012
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing gpio.h - no longer used
parent
1ec938bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
41 deletions
+0
-41
gpio.h
include/gpio.h
+0
-41
No files found.
include/gpio.h
deleted
100644 → 0
View file @
1ec938bd
#ifndef __GPIO_H
#define __GPIO_H
#include <inttypes.h>
#include "board.h"
struct
GPIO_WB
{
uint32_t
CODR
;
/*Clear output register*/
uint32_t
SODR
;
/*Set output register*/
uint32_t
DDR
;
/*Data direction register (1 means out)*/
uint32_t
PSR
;
/*Pin state register*/
};
static
volatile
struct
GPIO_WB
*
__gpio
=
(
volatile
struct
GPIO_WB
*
)
BASE_GPIO
;
static
inline
void
gpio_out
(
int
pin
,
int
val
)
{
if
(
val
)
__gpio
->
SODR
=
(
1
<<
pin
);
else
__gpio
->
CODR
=
(
1
<<
pin
);
}
static
inline
void
gpio_dir
(
int
pin
,
int
val
)
{
if
(
val
)
__gpio
->
DDR
|=
(
1
<<
pin
);
else
__gpio
->
DDR
&=
~
(
1
<<
pin
);
}
static
inline
int
gpio_in
(
int
pin
)
{
return
__gpio
->
PSR
&
(
1
<<
pin
)
?
1
:
0
;
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment