Hi Everybody:
In LCDK C6748 McASP example, I try get the receive buffer pointer in the memory using following code,
while(1)
{
if(lastFullRxBuf != lastSentTxBuf)
{
/*
** Start the transmission from the link paramset. The param set
** 1 will be linked to param set at PAR_TX_START. So do not
** update paRAM set1.
*/
parToSend = PAR_TX_START + (parOffTxToSend % NUM_PAR);
parOffTxToSend = (parOffTxToSend + 1) % NUM_PAR;
parToLink = PAR_TX_START + parOffTxToSend;
lastSentTxBuf = (lastSentTxBuf + 1) % NUM_BUF;
//---
-- -> unsigned char * txptr=(unsigned char *)txBufPtr[lastSentTxBuf];
-- -> unsigned char * rxptr=(unsigned char *)rxBufPtr[lastFullRxBuf];
// SpectrumAnalyze(rxptr, txptr);
//...
/* Copy the buffer */
memcpy((void *)txBufPtr[lastSentTxBuf],
(void *)rxBufPtr[lastFullRxBuf],
AUDIO_BUF_SIZE);
in the rx bufffer byte by byte output like the following (input is audio signal from line in), how can I build (digital math) number from this memory content. look like every word (32bits), only first two bytes are used, AIC3106 is 24 bit ADC, that confuse me. I want to get the data pointed by rxptr, so I can put filter or equalizer, please help!.
rxBuf1
01000011 00000010 00000000 00000000
10011100 00000010 00000000 00000000
01110101 00000010 00000000 00000000
01100000 00000010 00000000 00000000
00110100 00000010 00000000 00000000
10011011 00000010 00000000 00000000
01110000 00000010 00000000 00000000
01111100 00000010 00000000 00000000
01001101 00000010 00000000 00000000
01111010 00000010 00000000 00000000
00111110 00000010 00000000 00000000
10101110 00000010 00000000 00000000
01110101 00000010 00000000 00000000
01111001 00000010 00000000 00000000
00111010 00000010 00000000 00000000
10111000 00000010 00000000 00000000
01110000 00000010 00000000 00000000
10000111 00000010 00000000 00000000
01010101 00000010 00000000 00000000
01110110 00000010 00000000 00000000
01011011 00000010 00000000 00000000
01101000 00000010 00000000 00000000
01011101 00000010 00000000 00000000
00100011 00000010 00000000 00000000
00100000 00000010 00000000 00000000
01101101 00000010 00000000 00000000
01010101 00000010 00000000 00000000
01010101 00000010 00000000 00000000
00011111 00000010 00000000 00000000
01110100 00000010 00000000 00000000
00110011 00000010 00000000 00000000
10011001 00000010 00000000 00000000
01101010 00000010 00000000 00000000
01000101 00000010 00000000 00000000
00110001 00000010 00000000 00000000
01110101 00000010 00000000 00000000
01100001 00000010 00000000 00000000
01010110 00000010 00000000 00000000
00101010 00000010 00000000 00000000
01110100 00000010 00000000 00000000
00110111 00000010 00000000 00000000
01111110 00000010 00000000 00000000
01010000 00000010 00000000 00000000
00111011 00000010 00000000 00000000
00011111 00000010 00000000 00000000