OpenCores
URL https://opencores.org/ocsvn/gecko3/gecko3/trunk

Subversion Repositories gecko3

[/] [gecko3/] [trunk/] [GECKO3COM/] [gecko3com-fw/] [firmware/] [src/] [gecko3com_gpif.c] - Diff between revs 28 and 29

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 28 Rev 29
Line 167... Line 167...
  /* IFCLK is generated internally and runs at 30 MHz; GPIF "master mode" */
  /* IFCLK is generated internally and runs at 30 MHz; GPIF "master mode" */
  //IFCONFIG = bmIFCLKSRC | bm3048MHZ | bmIFCLKOE | bmGSTATE | bmIFGPIF;
  //IFCONFIG = bmIFCLKSRC | bm3048MHZ | bmIFCLKOE | bmGSTATE | bmIFGPIF;
  IFCONFIG = bmIFCLKSRC | bmIFCLKOE | bmGSTATE | bmIFGPIF;
  IFCONFIG = bmIFCLKSRC | bmIFCLKOE | bmGSTATE | bmIFGPIF;
  SYNCDELAY;
  SYNCDELAY;
 
 
  /* we have to commit the currently processed packet BEFORE we switch to auto out mode */
  /* we have to commit the currently processed packet BEFORE we switch
 
   *to auto out mode */
  OUTPKTEND = bmSKIP | USB_TMC_EP_OUT;
  OUTPKTEND = bmSKIP | USB_TMC_EP_OUT;
 
 
  /*FIXME  only here for testing */
    /* reset FIFOs */
  //EP6AUTOINLENH = (20) >> 8;     SYNCDELAY;  /* this is the length for high speed */
 
  //EP6AUTOINLENL = (20) & 0xff;  SYNCDELAY;
  FIFORESET = bmNAKALL;                                 SYNCDELAY;
 
  FIFORESET = 6;                                        SYNCDELAY;
 
  FIFORESET = 0;                                 SYNCDELAY;
 
 
  /* enable autoout and autoin feature of the endpoints */
  /* enable autoout and autoin feature of the endpoints */
  EP2FIFOCFG |= bmAUTOOUT;
  EP2FIFOCFG |= bmAUTOOUT;
  SYNCDELAY;
  SYNCDELAY;
  EP6FIFOCFG |= bmAUTOIN;
  EP6FIFOCFG |= bmAUTOIN;
Line 192... Line 195...
  SYNCDELAY;
  SYNCDELAY;
 
 
  EP2GPIFFLGSEL = bmFLAG_PROGRAMMABLE;
  EP2GPIFFLGSEL = bmFLAG_PROGRAMMABLE;
  //EP2GPIFFLGSEL = bmFLAG_EMPTY;
  //EP2GPIFFLGSEL = bmFLAG_EMPTY;
  SYNCDELAY;
  SYNCDELAY;
 
 
 
  //EP6FIFOPFH = bmDECIS | 0x19;
 
  //EP6FIFOPFL = 0xFB;
 
  //SYNCDELAY;
 
 
 
  //EP6GPIFFLGSEL = bmFLAG_PROGRAMMABLE;
  EP6GPIFFLGSEL = bmFLAG_FULL;
  EP6GPIFFLGSEL = bmFLAG_FULL;
  SYNCDELAY;
  SYNCDELAY;
 
 
  EP2GPIFPFSTOP = 0;
  EP2GPIFPFSTOP = 0;
  EP6GPIFPFSTOP = 0;
  EP6GPIFPFSTOP = 0;
Line 209... Line 218...
  GPIFCTLCFG = InitData[ 1 ];
  GPIFCTLCFG = InitData[ 1 ];
  GPIFIDLECS = InitData[ 2 ];
  GPIFIDLECS = InitData[ 2 ];
  GPIFIDLECTL = InitData[ 3 ];
  GPIFIDLECTL = InitData[ 3 ];
  /* Hmmm, what's InitData[ 4 ] ... */
  /* Hmmm, what's InitData[ 4 ] ... */
  GPIFWFSELECT = InitData[ 5 ];
  GPIFWFSELECT = InitData[ 5 ];
  /* GPIFREADYSTAT = InitData[ 6 ]; */  /* I think this register is read only... */
  /* I think this register is read only... */
 
  /* GPIFREADYSTAT = InitData[ 6 ]; */
 
 
  for (i = 0; i < 128; i++){
  for (i = 0; i < 128; i++){
    GPIF_WAVE_DATA[i] = WaveData[i];
    GPIF_WAVE_DATA[i] = WaveData[i];
  }
  }
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.