/* Write one page of bytes to specified main memory page address.  */
unsigned char AT45DBxxxDPageWrite(unsigned long ulPageAddr, unsigned char *pucBuffer)
/* Write one page of bytes to specified main memory page address.  */
unsigned char AT45DBxxxDPageWrite(unsigned long ulPageAddr, unsigned char *pucBuffer)
{
	unsigned int i = 0;
    if(ulPageAddr >= AT45DBxxxDInfo.ulTatalPages) return AT45DBxxxD_OP_INVALID;
    while(!AT45DBxxxDWaitReady())
    {
    	if(++i > AT45DBxxxD_OVERTIME)
    	{
    		return AT45DBxxxD_OP_BUSY;
    	}
    }
    AT45DBxxxDBufferWrite(AT45DBxxxD_BUF1, pucBuffer, 0, AT45DBxxxDInfo.usPageSize);
    AT45DBxxxDBuftoMm(AT45DBxxxD_BUF1, ulPageAddr);
    return AT45DBxxxD_OP_OK;
}