/* Reads a block of data from the FSMC NOR memory.  */
void NOR_ReadBuffer(uint16_t *pBuffer, uint32_t ReadAddr, uint32_t NumHalfwordToRead)
/* Reads a block of data from the FSMC NOR memory.  */
void NOR_ReadBuffer(uint16_t *pBuffer, uint32_t ReadAddr, uint32_t NumHalfwordToRead)
{
  NOR_WRITE(ADDR_SHIFT(0x0555), 0x00AA);
  NOR_WRITE(ADDR_SHIFT(0x02AA), 0x0055);
  NOR_WRITE((Bank1_NOR2_ADDR + ReadAddr), 0x00F0);
  for(; NumHalfwordToRead != 0x00; NumHalfwordToRead--)
  {
    *pBuffer++ = *(__IO uint16_t *)((Bank1_NOR2_ADDR + ReadAddr));
    ReadAddr = ReadAddr + 2; 
  }  
}