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

Subversion Repositories s6soc

[/] [s6soc/] [trunk/] [sw/] [zipos/] [kernel.c] - Diff between revs 29 and 37

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

Rev 29 Rev 37
Line 59... Line 59...
extern  void    restore_context(int *), save_context(int *);
extern  void    restore_context(int *), save_context(int *);
SYSPIPE *rxpipe, *txpipe, *keypipe, *lcdpipe, *pwmpipe, *cmdpipe;
SYSPIPE *rxpipe, *txpipe, *keypipe, *lcdpipe, *pwmpipe, *cmdpipe;
KDEVICE *pipedev, *txdev, *pwmdev;
KDEVICE *pipedev, *txdev, *pwmdev;
void    *heap; //  = _top_of_heap; // Need to wait on startup to set this
void    *heap; //  = _top_of_heap; // Need to wait on startup to set this
 
 
#define CONTEXT_LENGTH  100000  // 1ms
#define CONTEXT_LENGTH  80000   // 1ms
#define TICKS_PER_SECOND        1000
#define TICKS_PER_SECOND        1000
 
 
void kwrite_audio(TASKP tsk, int dev, int *dst, int len);
void kwrite_audio(TASKP tsk, int dev, int *dst, int len);
void kwrite_txuart(TASKP tsk, int dev, int *dst, int len);
void kwrite_txuart(TASKP tsk, int dev, int *dst, int len);
int     kpost(TASKP *task, unsigned events, int milliseconds);
int     kpost(TASKP *task, unsigned events, int milliseconds);
Line 119... Line 119...
                        // know about.
                        // know about.
                        pic &= 0x7fff;
                        pic &= 0x7fff;
                        // Acknowledge current ints, and turn off pending ints
                        // Acknowledge current ints, and turn off pending ints
                        sys->io_pic = INT_DISABLEV(pic)|(INT_CLEAR(pic));
                        sys->io_pic = INT_DISABLEV(pic)|(INT_CLEAR(pic));
                        if(pic&INT_TIMA) {
                        if(pic&INT_TIMA) {
                                milliseconds++;
 
                                if (++ticks >= TICKS_PER_SECOND) {//(pic & SYSINT_PPS)
                                if (++ticks >= TICKS_PER_SECOND) {//(pic & SYSINT_PPS)
                                        // Toggle the low order LED
                                        // Toggle the low order LED
                                        tickcount++;
                                        tickcount++;
                                        ticks = 0;
                                        ticks = 0;
                                        sys->io_spio = ((sys->io_spio&1)^1)|0x010;
                                        sys->io_spio = ((sys->io_spio&1)^1)|0x010;

powered by: WebSVN 2.1.0

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