Linux demo ok.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1464 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2009-12-24 09:47:56 +00:00
parent 0873332c30
commit 282ffcd5ba
1 changed files with 3 additions and 1 deletions

View File

@ -60,6 +60,8 @@ static struct timeval tick = {0, 1000000 / CH_FREQUENCY};
void hal_lld_init(void) {
puts("Win32 ChibiOS/RT simulator (Linux)\n");
gettimeofday(&nextcnt, NULL);
timeradd(&nextcnt, &tick, &nextcnt);
}
/**
@ -77,7 +79,7 @@ void ChkIntSources(void) {
#endif
gettimeofday(&tv, NULL);
if (timercmp(&nextcnt, &tv, <)) {
if (timercmp(&tv, &nextcnt, >=)) {
timeradd(&nextcnt, &tick, &nextcnt);
chSysTimerHandlerI();
if (chSchIsRescRequiredExI())