/* Writes a half-word buffer to the FSMC NOR memory.  */
NOR_Status NOR_WriteBuffer(uint16_t *pBuffer, uint32_t WriteAddr, uint32_t NumHalfwordToWrite)
/* Writes a half-word buffer to the FSMC NOR memory.  */
NOR_Status NOR_WriteBuffer(uint16_t *pBuffer, uint32_t WriteAddr, uint32_t NumHalfwordToWrite)
{
  NOR_Status status = NOR_ONGOING; 
  do
  {
    status = NOR_WriteHalfWord(WriteAddr, *pBuffer++);
    WriteAddr = WriteAddr + 2;
    NumHalfwordToWrite--;
  }
  while((status == NOR_SUCCESS) && (NumHalfwordToWrite != 0));
  return (status); 
}