orcus
|
Main header file for Orcus functions. More...
#include <stdint.h>
#include <stdbool.h>
#include <uart.h>
#include <rgb.h>
#include <2d.h>
#include <audio.h>
#include <arm940.h>
#include <sd.h>
#include <lcd.h>
#include <dma.h>
#include <timer.h>
#include <cachemmu.h>
Functions | |
uint32_t | btnState () |
Get current button state. More... | |
uint32_t | btnStateDebounced () |
Get current button state (debounced). More... | |
void | gp2xInit () |
Initialise GP2X. More... | |
bool | gp2xIsF200 () |
Check if running on an F200. More... | |
void | gp2xSetCpuSpeed (unsigned int mhz) |
Set the CPU clock speed. More... | |
void | gp2xSetDefaultRamTimings () |
Set default recommended RAM timings. More... | |
void | gp2xSetFastRamTimings () |
Set faster RAM timings. More... | |
void | gp2xSetRamTimings (int tRC, int tRAS, int tWR, int tMRD, int tRFC, int tRP, int tRCD) |
Set custom RAM timings. More... | |
uint32_t btnState | ( | ) |
uint32_t btnStateDebounced | ( | ) |
Get current button state. This function debounces presses to give a reliable indicator.
One can check for a particular button state using &.
For example:
void gp2xInit | ( | ) |
Initialise the GP2X hardware and set up system calls. This must be called before using any other functions from Orcus.
bool gp2xIsF200 | ( | ) |
Check if running on an F200. This tests to see if the NET2272 chip (only fitted to F100s) is present.
void gp2xSetCpuSpeed | ( | unsigned int | mhz | ) |
Set the CPU clock speed (both ARM920T and ARM940T use the same clock source).
void gp2xSetDefaultRamTimings | ( | ) |
Equivalent to gp2xSetRamTimings(7, 15, 2, 7, 7, 7, 7)
void gp2xSetFastRamTimings | ( | ) |
Equivalent to gp2xSetRamTimings(5, 3, 0, 0, 0, 1, 1)
void gp2xSetRamTimings | ( | int | tRC, |
int | tRAS, | ||
int | tWR, | ||
int | tMRD, | ||
int | tRFC, | ||
int | tRP, | ||
int | tRCD | ||
) |
Sets RAM timing registers in MMSP2.