libnds
|
NDS hardware definitions. These definitions are usually only touched during the initialization of the program. More...
#include "ndstypes.h"
Data Structures | |
struct | RTCtime |
struct containing time and day of the real time clock. More... | |
struct | sysVectors_t |
A struct with all the CPU exeption vectors. each member contains an ARM instuction that will be executed when an exeption occured. More... | |
struct | tPERSONAL_DATA |
User's DS settings. Defines the structure the DS firmware uses for transfer of the user's settings to the booted program. More... | |
Macros | |
#define | HALT_CR (*(vu16*)0x04000300) |
Halt control register. More... | |
#define | PersonalData ((PERSONAL_DATA*)0x2FFFC80) |
Default location for the user's personal data (see PERSONAL_DATA). | |
#define | REG_DISPSTAT (*(vu16*)0x04000004) |
LCD status register. | |
#define | REG_POWERCNT *(vu16*)0x4000304 |
Power control register. More... | |
#define | REG_VCOUNT (*(vu16*)0x4000006) |
Current display scanline. | |
Typedefs | |
typedef struct tPERSONAL_DATA | PERSONAL_DATA |
User's DS settings. Defines the structure the DS firmware uses for transfer of the user's settings to the booted program. More... | |
typedef struct sysVectors_t | sysVectors |
A struct with all the CPU exeption vectors. each member contains an ARM instuction that will be executed when an exeption occured. More... | |
Enumerations |
Functions | |
u32 | getBatteryLevel () |
gets the DS Battery level | |
u8 * | getHeapEnd () |
returns current end of heap space | |
u8 * | getHeapLimit () |
returns current heap limit | |
u8 * | getHeapStart () |
returns current start of heap space | |
static bool | isDSiMode () |
Checks whether the application is running in DSi mode. | |
static void | lcdMainOnBottom (void) |
Forces the main core to display on the bottom. | |
static void | lcdMainOnTop (void) |
Forces the main core to display on the top. | |
static void | lcdSwap (void) |
Switches the screens. | |
void | ledBlink (int bm) |
void * | memCached (void *address) |
returns a cached mirror of an address. More... | |
void * | memUncached (void *address) |
returns an uncached mirror of an address. More... | |
void | powerOff (int bits) |
Turns off specified hardware. More... | |
void | powerOn (int bits) |
Turns on specified hardware. More... | |
bool | setCpuClock (bool speed) |
Sets the ARM9 clock speed, only possible in DSi mode. More... | |
void | setVectorBase (int highVector) |
Set the arm9 vector base. More... | |
static void | SetYtrigger (int Yvalue) |
sets the Y trigger(?) More... | |
static void | systemShutDown (void) |
Powers down the DS. | |
void | systemSleep (void) |
Causes the nds to go to sleep. The nds will be reawakened when the lid is opened. More... | |
NDS hardware definitions. These definitions are usually only touched during the initialization of the program.
#define HALT_CR (*(vu16*)0x04000300) |
Halt control register.
Writing 0x40 to HALT_CR activates GBA mode. HALT_CR can only be accessed via the BIOS.
#define REG_POWERCNT *(vu16*)0x4000304 |
Power control register.
This register controls what hardware should be turned on or off.
typedef struct tPERSONAL_DATA PERSONAL_DATA |
User's DS settings. Defines the structure the DS firmware uses for transfer of the user's settings to the booted program.
Theme/Color values:
Language values:
typedef struct sysVectors_t sysVectors |
A struct with all the CPU exeption vectors. each member contains an ARM instuction that will be executed when an exeption occured.
See gbatek for more information.
enum ARM7_power |
Power-controlled hardware devices accessable to the ARM7.
Note that these should only be used when programming for the ARM7. Trying to boot up these hardware devices via the ARM9 would lead to unexpected results. ARM7 only.
enum BACKLIGHT_LEVELS |
enum DISP_BITS |
LCD Status register bitdefines.
enum PM_Bits |
Power Management control bits.
void ledBlink | ( | int | bm | ) |
Set the LED blink mode
bm | What to power on. |
void* memCached | ( | void * | address | ) |
returns a cached mirror of an address.
address | an address. |
void* memUncached | ( | void * | address | ) |
returns an uncached mirror of an address.
address | an address. |
void powerOff | ( | int | bits | ) |
Turns off specified hardware.
May be called from arm7 or arm9 (arm9 power bits will be ignored by arm7, arm7 power bits will be passed to the arm7 from the arm9).
bits | What to power on. |
|
inline |
Turns on specified hardware.
May be called from arm7 or arm9 (arm9 power bits will be ignored by arm7, arm7 power bits will be passed to the arm7 from the arm9).
bits | What to power on. |
bool setCpuClock | ( | bool | speed | ) |
Sets the ARM9 clock speed, only possible in DSi mode.
speed | CPU speed (false = 67.03MHz, true = 134.06MHz) |
void setVectorBase | ( | int | highVector | ) |
Set the arm9 vector base.
Arm9 only
highVector | high vector |
|
inlinestatic |
sets the Y trigger(?)
Yvalue | the value for the Y trigger. |
void systemSleep | ( | void | ) |
Causes the nds to go to sleep. The nds will be reawakened when the lid is opened.