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

Subversion Repositories s6soc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /s6soc
    from Rev 20 to Rev 21
    Reverse comparison

Rev 20 → Rev 21

/trunk/sw/dev/rtcsim.c
41,7 → 41,7
 
unsigned rtcclock, rtcalarm, rtcdate;
#ifdef ZIPOS
SEMAPHORE SEMDATE, SEMCLOCK;
// SEMAPHORE SEMDATE, SEMCLOCK;
#endif
 
unsigned rtcnext(unsigned now) {
127,25 → 127,34
}
 
#ifdef ZIPOS
#include "board.h"
#include "../zipos/ktraps.h"
#include "../zipos/swint.h"
 
void rtctask(void) {
rtcdate = 0x20160430;
rtctime = 0;
// IOSPACE *sys = (IOSPACE *)IOADDR;
rtcdate = 0x20160504;
rtcclock = 0;
while(1) {
unsigned event = wait(SWINT_RTCPPS);
if (event&INT_TIMA) {
unsigned event = wait(SWINT_CLOCK,-1);
if (event&SWINT_CLOCK) {
unsigned v, nextevent = SWINT_PPS;
semget(SEMCLOCK);
rtctime = v = rtcnext(rtctime);
rtcclock = v = rtcnext(rtcclock);
semput(SEMCLOCK);
#ifdef SWINT_ALARM
if (v == rtcalarm)
nextevent |= SWINT_ALARM;
#endif
if (v == 0) {
semget(SEMDATE);
rtcdate = rtcdatenext(rtcdate);
semput(SEMDATE);
 
#ifdef SWINT_PPD
nextevent |= SWINT_PPD;
} swthrow(nextevent);
#endif
} post(nextevent);
}
}
}
/trunk/sw/dev/display.c
38,6 → 38,7
//
//
#include "board.h"
#include "display.h"
 
static void dispwait(void) {
// Slow us down to the speed the display can handle
94,7 → 95,9
}
 
#ifdef ZIPOS
void displaytask(void) {
#include "../zipos/ktraps.h"
#include "../zipos/kfildes.h"
void display_task(void) {
while(1) {
int ch;
read(FILENO_STDIN, &ch, 1);
/trunk/sw/dev/rtcsim.h
42,7 → 42,11
 
extern unsigned rtcclock, rtcalarm, rtcdate;
#ifdef ZIPOS
SEMAPHORE SEMDATE, SEMCLOCK;
// SEMAPHORE SEMDATE, SEMCLOCK;
#define SEMGET(A)
#define SEMPUT(A)
#define semget(A)
#define semput(A)
#endif
 
extern unsigned rtcnext(unsigned now);
/trunk/sw/dev/display.h
40,6 → 40,7
#ifndef DISPLAY_H
#define DISPLAY_H
 
#define PACK(A,B,C,D) (((A)<<24)|((B)<<16)|((C)<<8)|(D))
extern void dispchar(int ch);
 
#ifdef ZIPOS

powered by: WebSVN 2.1.0

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