Logo Search packages:      
Sourcecode: alsa-driver version File versions  Download package

short HpiDspCode_ReadWord ( struct dsp_code psDspCode,
u32 *  pdwWord 
)

Read one word from the dsp code file

Returns:
0 for success, or error code if eof, or block length exceeded
Parameters:
psDspCode  Where to store the read word

Definition at line 151 of file hpidspcd.c.

References dsp_code::dwBlockLength, dsp_code::dwWordCount, HPI_ERROR_DSP_FILE_FORMAT, and dsp_code::psFirmware.

{
      if (psDspCode->dwWordCount + 1 > psDspCode->dwBlockLength)
            return (HPI_ERROR_DSP_FILE_FORMAT);

      *pdwWord =
            ((u32 *)(psDspCode->psFirmware->data))[psDspCode->
            dwWordCount];
      psDspCode->dwWordCount++;
      return 0;
}


Generated by  Doxygen 1.6.0   Back to index