/* Read the photo data from the PTC08 memory.  */
xtBoolean PTC08PhotoDataGet(unsigned char *pucBuffer, unsigned long ulAddr, unsigned long ulLen)
/* Read the photo data from the PTC08 memory.  */
xtBoolean PTC08PhotoDataGet(unsigned char *pucBuffer, unsigned long ulAddr, unsigned long ulLen)
{
    unsigned long i;
    ucGetPhotoCmd[8] = ulAddr/256;
    ucGetPhotoCmd[9] = ulAddr%256;
    ucGetPhotoCmd[12] =ulLen/256;
    ucGetPhotoCmd[13] =ulLen%256;
    UARTBufferPut(PTC08_UART, (unsigned char *)&ucGetPhotoCmd[0], 16);
    if (!UARTBufferGet(PTC08_UART, pucBuffer, 10+ulLen)) 
    {
        return xfalse;
    }
    for (i = 0; i < 5; i++)
    {
        if (pucBuffer[i] != ucGetPhotoRcv[i]) 
        {
            return xfalse;
        }
    }
    for (i = ulLen+5; i < ulLen+10; i++)
    {
        if (pucBuffer[i] != ucGetPhotoRcv[i]) 
        {
            return xfalse;
        }
    }
    return xtrue;
}