/* Program a word (32bit) in the flash device.  */
int NORFLASH_ProgramWord32(uint32_t addr, uint32_t data)
/* Program a word (32bit) in the flash device.  */
int NORFLASH_ProgramWord32(uint32_t addr, uint32_t data)
{
  int status;
  if (addr & 3)
    return NORFLASH_MISALIGNED_ADDRESS;
  status = NORFLASH_ProgramWord16(addr, data & 0xFFFF);
  if (status == NORFLASH_STATUS_OK)
  {
    addr  += 2;
    status = NORFLASH_ProgramWord16(addr, data >> 16);
  }
  return status;
}