libnds
Loading...
Searching...
No Matches
Functions
touch.h File Reference

High-level touchscreen functions for ARM7. More...

#include <nds/arm7/serial.h>
#include <nds/touch.h>

Functions

void touchApplyCalibration (u16 rawx, u16 rawy, u16 *px, u16 *py)
 Apply calibration to raw X/Y touch screen measurements.
 
void touchInit (void)
 Initialize the touch subsystem (NDS/DSi).
 
bool touchPenDown (void)
 Returns true if the screen is currently being touched.
 
void touchReadData (touchRawArray *data)
 Read a complete, raw touch measurement into the provided buffer.
 
void touchReadXY (touchPosition *touchPos)
 Read a touch X/Y position into the provided buffer.
 

Detailed Description

High-level touchscreen functions for ARM7.

Function Documentation

◆ touchApplyCalibration()

void touchApplyCalibration ( u16  rawx,
u16  rawy,
u16 px,
u16 py 
)

Apply calibration to raw X/Y touch screen measurements.

Parameters
rawxRaw X value
rawyRaw Y value
pxCalibrated X value
pyCalibrated Y value