Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1462 → Rev 1463

/demos/trunk/tftptest/tftptest.c
1,8 → 1,10
#include <string.h>
#include <kernel/func.h>
#include <kernel/kern.h>
#include <drivers/keyb.h>
 
#include <drivers/shark_keyb26.h>
#include <drivers/udpip.h>
 
#include "tftp.h"
#include "endian.h"
 
9,7 → 11,6
#include "modules/sem.h"
 
#include <kernel/kern.h>
#include <drivers/pci.h>
#include <ll/i386/hw-instr.h>
 
 
25,9 → 26,9
 
void esci(KEY_EVT *k)
{
cprintf("Exit from the program...\n");
cprintf("Ctrl-C pressed!\n");
sys_abort(500);
sys_shutdown_message("Exit from the program...\n");
sys_shutdown_message("Ctrl-C pressed!\n");
sys_end();
}
 
void augprog(KEY_EVT *k)
40,21 → 41,25
 
k.flag = CNTL_BIT;
k.scan = KEY_C;
k.status = KEY_PRESSED;
k.ascii = 'C';
keyb_hook(k, esci);
keyb_hook(k, esci,FALSE);
k.flag = CNTR_BIT;
k.scan = KEY_C;
k.ascii = 'c';
keyb_hook(k, esci);
k.status = KEY_PRESSED;
keyb_hook(k, esci,FALSE);
 
k.flag = CNTL_BIT;
k.scan = KEY_A;
k.ascii = 'A';
keyb_hook(k, augprog);
k.status = KEY_PRESSED;
keyb_hook(k, augprog,FALSE);
k.flag = CNTR_BIT;
k.scan = KEY_A;
k.ascii = 'a';
keyb_hook(k, augprog);
k.status = KEY_PRESSED;
keyb_hook(k, augprog,FALSE);
}
 
TASK test_upload(void *arg) {
212,9 → 217,6
 
tftp_close(handle, TFTP_STOP_NOW);
 
 
// wait();
 
tftp_close(handle2, TFTP_STOP_NOW);
 
cprintf("\nProgram terminated correctly.\n");