GBA specific definitions for internal peripheral handling. More...
GBA specific definitions for internal peripheral handling.
Definition in file periph_gba.h.
#include <stdint.h>
Include dependency graph for periph_gba.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. More... | |
| #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_SCREEN_WIDTH (240) |