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

Subversion Repositories gecko3

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /gecko3/trunk/GECKO3COM/gecko3com-fw/firmware/src
    from Rev 17 to Rev 18
    Reverse comparison

Rev 17 → Rev 18

/gecko3com_main.c
848,6 → 848,13
}
} /* end of IN Transfer clause */
 
/* if(!(EP2468STAT & bmEP2EMPTY) && flLOCAL == GECKO3COM_REMOTE) { */
/* flGPIF &= ~bmGPIF_PENDING_DATA; */
/* OUTPKTEND = USB_TMC_EP_OUT; */
/* gpif_trigger_write(); */
/* EP2FIFOCFG |= bmAUTOOUT; */
/* } */
 
/* if the LED flag is set to off, disable the external LED */
if(flLED == LEDS_OFF) {
set_led_ext(LEDS_OFF);
/gecko3com_gpif.c
92,10 → 92,14
 
clear_fifo_gpif_irq();
 
/* check if there is data available for an OUT transfer */
//if((flGPIF & bmGPIF_PENDING_DATA) == bmGPIF_PENDING_DATA) {
if(!(EP2468STAT & bmEP2EMPTY)) {
//EA = 0; /* disable all interrupts */
 
/* check if there is data available for an OUT transfer */
if((flGPIF & bmGPIF_PENDING_DATA) == bmGPIF_PENDING_DATA) {
//if(!(EP2468STAT & bmEP2EMPTY)) {
flGPIF &= ~bmGPIF_PENDING_DATA;
GPIFABORT = 0xFF;
SYNCDELAY;
gpif_trigger_write();
}
else {
102,7 → 106,8
INPKTEND = USB_TMC_EP_IN;
gpif_trigger_read();
}
 
//EA = 1; /* global interrupt enable */
ISR_DEBUG_PORT &= ~bmGPIF_DONE;
}
 
118,16 → 123,16
clear_fifo_gpif_irq();
 
/* check if there is a active IN transfer */
/*if((GPIFIDLECTL & bmBIT3) == bmBIT3) {
if((GPIFIDLECTL & bmBIT3) == bmBIT3) {
flGPIF |= bmGPIF_PENDING_DATA;
}
else*/ {
EA = 0; /* disable all interrupts */
else {
//EA = 0; /* disable all interrupts */
GPIFABORT = 0xFF;
SYNCDELAY;
EA = 1; /* global interrupt enable */
 
gpif_trigger_write();
//EA = 1; /* global interrupt enable */
}
 
ISR_DEBUG_PORT &= ~bmFIFO_PF;
150,9 → 155,6
/*FIXME only here for testing */
//EP6AUTOINLENH = (20) >> 8; SYNCDELAY; /* this is the length for high speed */
//EP6AUTOINLENL = (20) & 0xff; SYNCDELAY;
//REVCTL = 0; /* set it back to 0 */
//SYNCDELAY;
 
/* enable autoout and autoin feature of the endpoints */
EP2FIFOCFG |= bmAUTOOUT;
161,15 → 163,16
SYNCDELAY;
 
/* set endpoint 2 fifo (out) programmable flag to "higher or equal 3"
* we use the programmable flag as interrupt source to detect if data for the FPGA
* is available and as GPIF flag to stop the flowstate, for this the flag has to change
* one cycle before the FIFO is completly empty, else we transfer one word too much */
* we use the programmable flag as interrupt source to detect if data for the
* FPGA is available and as GPIF flag to stop the flowstate, for this the
* flag has to change one cycle before the FIFO is completly empty, else we
* transfer one word too much */
EP2FIFOPFH = bmDECIS;
EP2FIFOPFL = 3;
EP2FIFOPFL = 1;
SYNCDELAY;
 
EP2GPIFFLGSEL = bmFLAG_PROGRAMMABLE;
// EP2GPIFFLGSEL = bmFLAG_EMPTY;
//EP2GPIFFLGSEL = bmFLAG_PROGRAMMABLE;
EP2GPIFFLGSEL = bmFLAG_EMPTY;
SYNCDELAY;
EP6GPIFFLGSEL = bmFLAG_FULL;
SYNCDELAY;
212,7 → 215,6
to signal the firmware that the GPIF is done */
hook_fgv(FGV_GPIFWF,(unsigned short) isr_gpif_done);
hook_fgv(FGV_EP2PF,(unsigned short) isr_endpoint_out_data);
hook_fgv(FGV_EP2PF,(unsigned short) isr_endpoint_out_data);
 
EP2FIFOIE = bmFIFO_PF;
GPIFIE = bmGPIFWF;
283,9 → 285,6
flGPIF = 0; /* unset all internal GPIF flags */
 
 
REVCTL = bmDYN_OUT | bmENH_PKT; /* restore the setting */
SYNCDELAY;
 
#ifdef GECKO3MAIN
//EP2FIFOCFG &= ~bmOEP;
EP2FIFOCFG &= ~bmAUTOOUT; /* disable AutoOUT feature */
298,5 → 297,5
EA = 1; /* global interrupt enable */
 
 
print_info("gpif deactivated\n");
//print_info("gpif deactivated\n");
}

powered by: WebSVN 2.1.0

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