Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1345 → Rev 1346

/demos/trunk/base/newpcidemo.c
32,44 → 32,18
*/
 
#include "kernel/kern.h"
#include "drivers/keyb.h"
#include "drivers/shark_linuxc26.h"
#include "drivers/shark_pci26.h"
#include "drivers/shark_fb26.h"
#include "drivers/grx_fb.h"
 
extern int FB26_init();
 
int main (int argc, char *argv[])
{
unsigned long long i;
 
LINUXC26_register_module();
PCI26_init();
 
FB26_init();
for (i=0;i<10000000000;i++);
 
FB26_open(0);
 
for (i=0;i<1000000000;i++);
 
FB26_setmode(0,"800x600-16");
 
/* Works only with 16 bpp mode */
grx_fb_init(0);
 
grx_line(0,0,799,599,0xFFFF);
 
grx_rect(200,200,300,300,0xFF00);
 
grx_box(150,250,350,400,0xFFFF);
 
grx_circle(600,600,100,0x00FF);
 
for (i=0;i<10000000000;i++);
sys_end();
FB26_close(0);
 
return 0;
 
}
/demos/trunk/base/ipcidemo.c
0,0 → 1,88
/*
* Project: S.Ha.R.K.
*
* Coordinators:
* Giorgio Buttazzo <giorgio@sssup.it>
* Paolo Gai <pj@gandalf.sssup.it>
*
* Authors :
* Giacomo Guidi <giacomo@gandalf.sssup.it>
* (see the web pages for full authors list)
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
*
* http://www.sssup.it
* http://retis.sssup.it
* http://shark.sssup.it
*/
 
/*
* Copyright (C) 2000 Paolo Gai
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
 
#include "kernel/kern.h"
#include "modules/edf.h"
#include "modules/hardcbs.h"
#include "modules/rr.h"
#include "modules/dummy.h"
#include "modules/intdrive.h"
 
#include "modules/sem.h"
#include "modules/hartport.h"
#include "modules/cabs.h"
 
#include "drivers/shark_linuxc26.h"
 
#include "drivers/keyb.h"
 
/*+ sysyem tick in us +*/
#define TICK 0
 
/*+ RR tick in us +*/
#define RRTICK 10000
 
TIME __kernel_register_levels__(void *arg)
{
struct multiboot_info *mb = (struct multiboot_info *)arg;
 
INTDRIVE_register_level(1000,10000,0);
EDF_register_level(EDF_ENABLE_ALL);
HCBS_register_level(HCBS_ENABLE_ALL,1);
RR_register_level(RRTICK, RR_MAIN_YES, mb);
dummy_register_level();
 
SEM_register_module();
 
CABS_register_module();
 
LINUXC26_register_module();
 
return TICK;
}
 
TASK __init__(void *arg)
{
struct multiboot_info *mb = (struct multiboot_info *)arg;
 
HARTPORT_init();
 
__call_main__(mb);
 
return (void *)0;
}
 
/demos/trunk/base/makefile
75,7 → 75,7
make -f $(SUBMAKE) APP=pcidemo INIT= OTHEROBJS="initfile.o" OTHERINCL= SHARKOPT=__OLDCHAR__
 
newpcidemo:
make -f $(SUBMAKE) APP=newpcidemo INIT= OTHEROBJS="initfile.o" OTHERINCL= SHARKOPT="__OLDCHAR__ __NEWPCI__ __FB__ __LINUXC26__"
make -f $(SUBMAKE) APP=newpcidemo INIT= OTHEROBJS="ipcidemo.o" OTHERINCL= SHARKOPT="__OLDCHAR__ __NEWPCI__ __LINUXC26__"
 
talk:
make -f $(SUBMAKE) APP=talk INIT= OTHEROBJS="initfile.o" OTHERINCL= SHARKOPT=__OLDCHAR__