/* Writes more than one byte to the HT24Cxx with a single WRITE cycle.  */
void HT24CxxPageWrite(unsigned char *pucBuffer, unsigned short usWriteAddr, unsigned char ucNumByteToWrite)
/* Writes more than one byte to the HT24Cxx with a single WRITE cycle.  */
void HT24CxxPageWrite(unsigned char *pucBuffer, unsigned short usWriteAddr, unsigned char ucNumByteToWrite)
{
    xI2CMasterWriteS1(HT24Cxx_PIN_I2C_PORT, HT24Cxx_ADDRESS,
                     (unsigned char)((usWriteAddr & 0x00FF)),
                     xfalse);
    while(ucNumByteToWrite--)  
    {     
      if(ucNumByteToWrite == 0)
      {
        xI2CMasterWriteS2(HT24Cxx_PIN_I2C_PORT, *pucBuffer, xtrue);
      }      else
      {
    	xI2CMasterWriteS2(HT24Cxx_PIN_I2C_PORT, *pucBuffer, xfalse);
        pucBuffer++;
      } 
    }
}