flashreinit.c 1.27 KB
/*---------------------------------------------------------------------
        Copyright (C) 1998 Nintendo.
        
        File            flash.c
        Coded    by     Atushi Watanabe. Dec  1, 1998.
        Modified by     Atushi Watanabe. Apr 4, 2000.
        Comments        1M Flash ROM access functions(Ver.7.6)
   
 	$Id: flashreinit.c,v 1.1.1.1 2002/10/29 08:06:43 blythe Exp $
   ---------------------------------------------------------------------*/
/**************************************************************************
 *
 *  $Revision: 1.1.1.1 $
 *  $Date: 2002/10/29 08:06:43 $
 *  $Source: 
 *
 **************************************************************************/

#include	<ultra64.h>
#include        "osint_flash.h"

OSPiHandle *
osFlashReInit(u8 latency, u8 pulse, u8 page_size, u8 rel_duration, u32 start)
{

  /* Fill basic information */
  __osFlashHandler.baseAddress = PHYS_TO_K1(start);
  ++__osFlashHandler.type;

  /* Get Domain parameters */
  __osFlashHandler.latency = (u8)latency;
  __osFlashHandler.pulse = (u8)pulse;
  __osFlashHandler.pageSize = (u8)page_size;
  __osFlashHandler.relDuration = (u8)rel_duration;
  __osFlashHandler.domain = PI_DOMAIN2;

  /* Fill speed and transferInfo to zero */
  return(&__osFlashHandler);

}  /* FlashReInit */