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

Subversion Repositories gecko3

[/] [gecko3/] [trunk/] [GECKO3COM/] [gecko3com-fw/] [firmware/] [src/] [gecko3com_main.c] - Diff between revs 20 and 21

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

Rev 20 Rev 21
Line 852... Line 852...
        response_queue.length = 0;
        response_queue.length = 0;
      }
      }
    } /* end of IN Transfer clause */
    } /* end of IN Transfer clause */
 
 
 
 
 
 
 
    if(flLOCAL == GECKO3COM_REMOTE) {
    /* if we operate in REMOTE mode (means we pass the data to the FPGA)
    /* if we operate in REMOTE mode (means we pass the data to the FPGA)
     * continously check the DONE pin from the FPGA, to avoid that bad things
     * continously check the DONE pin from the FPGA, to avoid that bad things
     * happen when someone reconfigures the FPGA through JTAG */
     * happen when someone reconfigures the FPGA through JTAG */
    if(flLOCAL == GECKO3COM_REMOTE && !fpga_done()) {
      if(!fpga_done()) {
 
 
 
        mdelay(40);
 
        if(!fpga_done()) {
 
          //set_led_ext(GREEN);
      deactivate_gpif();
      deactivate_gpif();
      flLOCAL = GECKO3COM_LOCAL;
      flLOCAL = GECKO3COM_LOCAL;
    }
    }
 
      }
 
 
 
      if(!(EP2468STAT & bmEP2EMPTY) && (GPIFTRIG & bmGPIF_IDLE)) {
 
        flGPIF = 0;
 
        gpif_trigger_write();
 
      }
 
    }
 
 
    /* if the LED flag is set to off, disable the external LED */
    /* if the LED flag is set to off, disable the external LED */
    if(flLED == LEDS_OFF) {
    if(flLED == LEDS_OFF) {
      set_led_ext(LEDS_OFF);
      set_led_ext(LEDS_OFF);
    }
    }
Line 936... Line 948...
  /* disconnect USB, so the host doesn't wait for us during the fpga
  /* disconnect USB, so the host doesn't wait for us during the fpga
   *configuration process (takes up to 20s) */
   *configuration process (takes up to 20s) */
  USBCS |= bmDISCON;
  USBCS |= bmDISCON;
 
 
#ifdef DEBUG_LEVEL_ERROR
#ifdef DEBUG_LEVEL_ERROR
  ser_init();
  //ser_init();
  printf_tiny("hi\n");
  //printf_tiny("hi\n");
#endif
#endif
 
 
  /* set the context switch flag to local operation, not fpga */
  /* set the context switch flag to local operation, not fpga */
  flLOCAL = GECKO3COM_LOCAL;
  flLOCAL = GECKO3COM_LOCAL;
 
 

powered by: WebSVN 2.1.0

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