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