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

Subversion Repositories openarty

[/] [openarty/] [trunk/] [sw/] [board/] [gpsdump.c] - Diff between revs 34 and 36

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

Rev 34 Rev 36
Line 33... Line 33...
//
//
//
//
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
//
//
//
 
#include "zipsys.h"
#include "artyboard.h"
#include "artyboard.h"
 
 
void entry(void) {
void entry(void) {
 
/*
 
        // Method one: direct polling
 
        while(1) {
 
                int     ch;
 
                ch = sys->io_gps_rx;
 
                if ((ch&-256)==0)
 
                        sys->io_uart_tx = ch;
 
        }
 
*/
 
        // Method two: Waiting on interrupts
 
        zip->pic = SYSINT_GPSRX;
        while(1) {
        while(1) {
                int     ch;
                while((zip->pic & SYSINT_GPSRX)==0)
                ch = sys->io_gps_rx;
                        ;
                if ((ch&-256)==0)
                sys->io_uart_tx = sys->io_gps_rx;
                        sys->io_uart_tx = ch;
                zip->pic = SYSINT_GPSRX;
        }
        }
 
 
 
        /*
 
        // Method three: Use the DMA
 
        zip->dma.ctrl = DMACLEAR;
 
        while(1) {
 
                zip->dma.rd = &sys->io_gps_rx;
 
                zip->dma.wr = &sys->io_uart_tx;
 
                zip->dma.len = 0x01000000; // More than we'll ever do ...
 
                zip->dma.ctrl = (DMAONEATATIME|DMA_CONSTDST|DMA_CONSTSRC|DMA_GPSRX);
 
                // zip->dma.ctrl = (DMAONEATATIME|DMA_CONSTDST|DMA_CONSTSRC);
 
 
 
                while(zip->dma.ctrl & 0x80000000)
 
                        if (zip->dma.ctrl & 0x40000000)
 
                                zip_halt();;
 
        }
 
        */
}
}
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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