GBA specific definitions for internal peripheral handling. More...
GBA specific definitions for internal peripheral handling.
Definition in file periph_gba.h.
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | GBA_DISPCNT REG16(0x4000000) |
Display Control register. | |
#define | GBA_DISPSTAT REG16(0x4000004) |
General LCD Status register. | |
#define | GBA_VRAM_PALETTE MEM16(0x5000000) |
VRAM color palette memory. | |
#define | GBA_VRAM MEM16(0x6000000) |
VRAM, 96Kb, 0x6017FFF - size depends on display mode! | |
#define | REG32(ADDR) (*(uint32_t volatile (*))(ADDR)) |
Type for 32-bit registers. | |
#define | REG16(ADDR) (*(uint16_t volatile (*))(ADDR)) |
Type for 16-bit registers. | |
#define | MEM16(ADDR) ((uint16_t(*))(ADDR)) |
Type for 16-bit memory addresses. | |
#define | GBA_SCREEN_WIDTH (240) |
Screen dimension in pixel. | |
#define | GBA_SCREEN_HEIGHT (160) |
height | |
Settings for GBA_DISPCNT | |
#define | GBA_DISPCNT_BGMODE_0 0x0000 |
Tiled, four layers, up to 1024 tiles. | |
#define | GBA_DISPCNT_BGMODE_1 0x0001 |
Tiled, three layers, up to 1024 tiles. | |
#define | GBA_DISPCNT_BGMODE_2 0x0002 |
Tiled, two layers, up to 1024 tiles. | |
#define | GBA_DISPCNT_BGMODE_3 0x0003 |
Bitmap, 240x160, 15-bit RGB. | |
#define | GBA_DISPCNT_BGMODE_4 0x0004 |
Bitmap, 240x160, 8-bit RGB. | |
#define | GBA_DISPCNT_BGMODE_5 0x0005 |
Bitmap, 160x128, 15-bit RGB. | |
#define | GBA_DISPCNT_SDBG_0 0x0100 |
Enable display of background 0. | |
#define | GBA_DISPCNT_SDBG_1 0x0200 |
Enable display of background 1. | |
#define | GBA_DISPCNT_SDBG_2 0x0400 |
Enable display of background 2. | |
#define | GBA_DISPCNT_SDBG_3 0x0800 |
Enable display of background 3. | |
#define | GBA_DISPCNT_SDOBJ 0x1000 |
Enable display of objects. | |
LCD background control registers | |
#define | GBA_BG0CNT REG16(0x4000008) |
BG0. | |
#define | GBA_BG1CNT REG16(0x400000a) |
BG1. | |
#define | GBA_BG2CNT REG16(0x400000c) |
BG2. | |
#define | GBA_BG3CNT REG16(0x400000e) |
BG3. | |
#define GBA_BG0CNT REG16(0x4000008) |
BG0.
Definition at line 85 of file periph_gba.h.
#define GBA_BG1CNT REG16(0x400000a) |
BG1.
Definition at line 86 of file periph_gba.h.
#define GBA_BG2CNT REG16(0x400000c) |
BG2.
Definition at line 87 of file periph_gba.h.
#define GBA_BG3CNT REG16(0x400000e) |
BG3.
Definition at line 88 of file periph_gba.h.
#define GBA_DISPCNT REG16(0x4000000) |
Display Control register.
Definition at line 55 of file periph_gba.h.
#define GBA_DISPCNT_BGMODE_0 0x0000 |
Tiled, four layers, up to 1024 tiles.
Definition at line 61 of file periph_gba.h.
#define GBA_DISPCNT_BGMODE_1 0x0001 |
Tiled, three layers, up to 1024 tiles.
Definition at line 62 of file periph_gba.h.
#define GBA_DISPCNT_BGMODE_2 0x0002 |
Tiled, two layers, up to 1024 tiles.
Definition at line 63 of file periph_gba.h.
#define GBA_DISPCNT_BGMODE_3 0x0003 |
Bitmap, 240x160, 15-bit RGB.
Definition at line 64 of file periph_gba.h.
#define GBA_DISPCNT_BGMODE_4 0x0004 |
Bitmap, 240x160, 8-bit RGB.
Definition at line 65 of file periph_gba.h.
#define GBA_DISPCNT_BGMODE_5 0x0005 |
Bitmap, 160x128, 15-bit RGB.
Definition at line 66 of file periph_gba.h.
#define GBA_DISPCNT_SDBG_0 0x0100 |
Enable display of background 0.
Definition at line 68 of file periph_gba.h.
#define GBA_DISPCNT_SDBG_1 0x0200 |
Enable display of background 1.
Definition at line 69 of file periph_gba.h.
#define GBA_DISPCNT_SDBG_2 0x0400 |
Enable display of background 2.
Definition at line 70 of file periph_gba.h.
#define GBA_DISPCNT_SDBG_3 0x0800 |
Enable display of background 3.
Definition at line 71 of file periph_gba.h.
#define GBA_DISPCNT_SDOBJ 0x1000 |
Enable display of objects.
Definition at line 73 of file periph_gba.h.
#define GBA_DISPSTAT REG16(0x4000004) |
General LCD Status register.
Definition at line 79 of file periph_gba.h.
#define GBA_SCREEN_HEIGHT (160) |
height
Definition at line 49 of file periph_gba.h.
#define GBA_SCREEN_WIDTH (240) |
#define GBA_VRAM MEM16(0x6000000) |
VRAM, 96Kb, 0x6017FFF - size depends on display mode!
Definition at line 99 of file periph_gba.h.
#define GBA_VRAM_PALETTE MEM16(0x5000000) |
VRAM color palette memory.
Definition at line 94 of file periph_gba.h.
Type for 16-bit memory addresses.
Definition at line 42 of file periph_gba.h.
Type for 16-bit registers.
Definition at line 37 of file periph_gba.h.
Type for 32-bit registers.
Definition at line 32 of file periph_gba.h.