Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Main Page
Related Pages
Supported Boards
Modules
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Enumerations
Data Structures
Data Structures
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
w
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerator
Related Symbols
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
►
RIOT OS
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
periph_gba.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2023 HAW Hamburg. All rights reserved.
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
19
#ifndef PERIPH_GBA_H
20
#define PERIPH_GBA_H
21
22
#include <stdint.h>
23
24
#ifdef __cplusplus
25
extern
"C"
26
{
27
#endif
28
32
#define REG32(ADDR) (*(uint32_t volatile (*))(ADDR))
33
37
#define REG16(ADDR) (*(uint16_t volatile (*))(ADDR))
38
42
#define MEM16(ADDR) ((uint16_t(*))(ADDR))
43
48
#define GBA_SCREEN_WIDTH (240)
49
#define GBA_SCREEN_HEIGHT (160)
55
#define GBA_DISPCNT REG16(0x4000000)
56
61
#define GBA_DISPCNT_BGMODE_0 0x0000
62
#define GBA_DISPCNT_BGMODE_1 0x0001
63
#define GBA_DISPCNT_BGMODE_2 0x0002
64
#define GBA_DISPCNT_BGMODE_3 0x0003
65
#define GBA_DISPCNT_BGMODE_4 0x0004
66
#define GBA_DISPCNT_BGMODE_5 0x0005
68
#define GBA_DISPCNT_SDBG_0 0x0100
69
#define GBA_DISPCNT_SDBG_1 0x0200
70
#define GBA_DISPCNT_SDBG_2 0x0400
71
#define GBA_DISPCNT_SDBG_3 0x0800
73
#define GBA_DISPCNT_SDOBJ 0x1000
79
#define GBA_DISPSTAT REG16(0x4000004)
80
85
#define GBA_BG0CNT REG16(0x4000008)
86
#define GBA_BG1CNT REG16(0x400000a)
87
#define GBA_BG2CNT REG16(0x400000c)
88
#define GBA_BG3CNT REG16(0x400000e)
94
#define GBA_VRAM_PALETTE MEM16(0x5000000)
95
99
#define GBA_VRAM MEM16(0x6000000)
100
101
#ifdef __cplusplus
102
}
103
#endif
104
105
#endif
/* PERIPH_GBA_H */
Generated on Sat Mar 29 2025 11:53:05 by
1.12.0