Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1463 → Rev 1462

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