Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
aap
blincolnlights
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
blincolnlights
/
gpio.h
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
61 lines (57 loc) · 992 Bytes
master
Breadcrumbs
blincolnlights
/
gpio.h
Copy path
Top
File metadata and controls
Code
Blame
61 lines (57 loc) · 992 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
typedef
struct
GPIO
GPIO
;
struct
GPIO
{
u32
fsel0
;
// 00
u32
fsel1
;
u32
fsel2
;
u32
fsel3
;
u32
fsel4
;
// 10
u32
fsel5
;
u32
res__18
;
u32
set0
;
u32
set1
;
// 20
u32
res__24
;
u32
clr0
;
u32
clr1
;
u32
res__30
;
// 30
u32
lev0
;
u32
lev1
;
u32
res__3c
;
u32
eds0
;
// 40
u32
eds1
;
u32
res__48
;
u32
ren0
;
u32
ren1
;
// 50
u32
res__54
;
u32
fen0
;
u32
fen1
;
u32
res__60
;
// 60
u32
hen0
;
u32
hen1
;
u32
res__6c
;
u32
len0
;
// 70
u32
len1
;
u32
res__78
;
u32
aren0
;
u32
aren1
;
// 80
u32
res__84
;
u32
afen0
;
u32
afen1
;
u32
res__90
;
// 90
// not PI 4
u32
pud
;
u32
pudclk0
;
u32
pudclk1
;
u32
res__a0
;
// a0
u32
space
[
16
];
// PI 4 only
u32
pup_pdn_cntrl_reg0
;
// e4
u32
pup_pdn_cntrl_reg1
;
u32
pup_pdn_cntrl_reg2
;
u32
pup_pdn_cntrl_reg3
;
};
extern
volatile
GPIO
*
gpio
;
// 10 pin settings per FSEL register
#define
INP_GPIO
(
pin
) (&gpio->fsel0)[(pin)/10] &= ~(7<<(((pin)%10)*3))
#define
OUT_GPIO
(
pin
) (&gpio->fsel0)[(pin)/10] |= (1<<(((pin)%10)*3))
void
opengpio
(
void
);
You can’t perform that action at this time.