Sourcecode/codec.c: Difference between revisions

New page: Sample (pseudo) sourcecode to talk with the CODEC SPI interface. Used for example to interface with the touchscreen. <source lang=cpp> static u32 cdcCurrentPage = 99; u32 TouchReadBuf...
 
mNo edit summary
 
Line 2: Line 2:


Used for example to interface with the touchscreen.
Used for example to interface with the touchscreen.


<source lang=cpp>
<source lang=cpp>


static u32 cdcCurrentPage = 99;
static u32 cdcCurrentPage = -1;
 
u32 TouchReadBuffer(...)
{
// Check if panel is touched (one of these 2):
// val = CDC_ReadRegisterEx(3, 9)
// val = CDC_ReadRegisterEx(3, 14)
 
// if touched, read touch data into buf (2 bytes per touch position)
// CDC_ReadRegistersEx(252, 1, buf, 20)
}


void CDC_ChangePage(u32 page)
void CDC_ChangePage(u32 page)