libnds
Loading...
Searching...
No Matches
Enumerations | Functions
codec.h File Reference

DSi "codec" Touchscreen/Sound Controller control for ARM7. More...

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

Enumerations

enum  cdcBanks {
  CDC_CONTROL = 0x00 ,
  CDC_SOUND = 0x01 ,
  CDC_TOUCHCNT = 0x03 ,
  CDC_TOUCHDATA = 0xFC
}
 Devices that can be controled with the CDC. More...
 

Functions

static bool cdcIsAvailable (void)
 Determine if the CDC is available or not.
 
bool cdcTouchPenDown (void)
 Check if the DSi CODEC is registering pen input.
 
bool cdcTouchReadData (touchRawArray *data)
 Read raw touch data from the DSi CODEC.
 

Detailed Description

DSi "codec" Touchscreen/Sound Controller control for ARM7.

Enumeration Type Documentation

◆ cdcBanks

enum cdcBanks

Devices that can be controled with the CDC.

Enumerator
CDC_CONTROL 

Chip control.

CDC_SOUND 

ADC/DAC control.

CDC_TOUCHCNT 

TSC control.

CDC_TOUCHDATA 

TSC data buffer.

Function Documentation

◆ cdcIsAvailable()

static bool cdcIsAvailable ( void  )
inlinestatic

Determine if the CDC is available or not.

Returns
If the CDC is available, it returns true.

◆ cdcTouchPenDown()

bool cdcTouchPenDown ( void  )

Check if the DSi CODEC is registering pen input.

Returns
If the pen is down, it returns true.

◆ cdcTouchReadData()

bool cdcTouchReadData ( touchRawArray *  data)

Read raw touch data from the DSi CODEC.

Parameters
dataStruct to hold the read data.
Returns
If there is valid data, true. Otherwise, false.