/* Gets the unique 64-bit ID assigned to this IC (useful for security purposes to detect if the flash was changed, etc.)  */
void w25q16bvGetUniqueID(uint8_t *buffer)
/* Gets the unique 64-bit ID assigned to this IC (useful for security purposes to detect if the flash was changed, etc.)  */
void w25q16bvGetUniqueID(uint8_t *buffer)
{
  uint8_t i;
  W25Q16BV_SELECT();
  w25q16bv_TransferByte(W25Q16BV_CMD_READUNIQUEID);
  w25q16bv_TransferByte(0xFF);
  w25q16bv_TransferByte(0xFF);
  w25q16bv_TransferByte(0xFF);
  w25q16bv_TransferByte(0xFF);
  for (i = 0; i < 8; i++)
  {
    buffer[i] = w25q16bv_TransferByte(0xFF);
  }
  W25Q16BV_DESELECT();
}