Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1374 → Rev 1373

/demos/trunk/advtimer/advtimer.c
40,8 → 40,6
#include "ll/i386/cons.h"
#include "ll/i386/advtimer.h"
 
#include "drivers/shark_linuxc26.h"
#include "drivers/shark_input26.h"
#include "drivers/shark_keyb26.h"
 
#define UPDATE_PERIOD 10000
50,37 → 48,10
extern unsigned int clk_per_msec;
extern unsigned int apic_clk_per_msec;
 
volatile int shark_running = 1;
 
int device_drivers_close()
{
KEYB26_close();
INPUT26_close();
 
return 0;
}
 
int device_drivers_init()
{
 
KEYB_PARMS kparms = BASE_KEYB;
 
LINUXC26_register_module();
 
INPUT26_init();
 
KEYB26_init(&kparms);
 
return 0;
 
}
 
void program_key_end(KEY_EVT *k)
{
 
shark_running = 0;
sys_end();
 
}
 
150,6 → 121,8
 
}
 
sys_end();
}
 
void set_screen()
168,9 → 141,7
HARD_TASK_MODEL mp; //Show current setting
PID update;
KEY_EVT k;
device_drivers_init();
k.flag = ALTL_BIT;
k.scan = KEY_C;
k.ascii = 'c';
188,12 → 159,6
update = task_create("Update", Update, &mp, NULL);
if (update != NIL) task_activate(update);
 
while(shark_running);
 
device_drivers_close();
 
sys_end();
 
return 0;
 
}