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 19 and 20

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

Rev 19 Rev 20
Line 742... Line 742...
        case FPGA_COMMUNICATION:
        case FPGA_COMMUNICATION:
          /* Switch the context from the FX2 to the FPGA.
          /* Switch the context from the FX2 to the FPGA.
           * After this command all endpoint 2 and 6 data goes directly to the
           * After this command all endpoint 2 and 6 data goes directly to the
           * FPGA, the FX2 doesn't parse commands anymore. Use endpoint 0 TMC
           * FPGA, the FX2 doesn't parse commands anymore. Use endpoint 0 TMC
           * commands to switch back */
           * commands to switch back */
 
          if(fpga_done()) {
          init_gpif();
          init_gpif();
          flLOCAL = GECKO3COM_REMOTE;
          flLOCAL = GECKO3COM_REMOTE;
 
          }
 
          else {
 
            ieee488_status.EventStatusRegister |= bmEXECUTION_ERROR;
 
          }
          usb_tmc_state = TMC_STATE_IDLE;
          usb_tmc_state = TMC_STATE_IDLE;
          break;
          break;
 
 
        case SPI_DELETE:
        case SPI_DELETE:
          /* Erases one of the file spaces in the SPI flash  */
          /* Erases one of the file spaces in the SPI flash  */
Line 846... Line 851...
        IEEE488_clear_mav();
        IEEE488_clear_mav();
        response_queue.length = 0;
        response_queue.length = 0;
      }
      }
    } /* end of IN Transfer clause */
    } /* end of IN Transfer clause */
 
 
 
 
 
    /* 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
 
     * happen when someone reconfigures the FPGA through JTAG */
 
    if(flLOCAL == GECKO3COM_REMOTE && !fpga_done()) {
 
      deactivate_gpif();
 
      flLOCAL = GECKO3COM_LOCAL;
 
    }
 
 
 
 
    /* 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);
    }
    }
 
 
 
 
    /* resets the watchdog timer back to the initial value */
    /* resets the watchdog timer back to the initial value */
    watchdog_count = WATCHDOG_TIME;
    watchdog_count = WATCHDOG_TIME;
 
 
  } /* end of infinite main loop */
  } /* end of infinite main loop */
}
}

powered by: WebSVN 2.1.0

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