Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

morse.c

00001 /*
00002  *      This program is free software; you can redistribute it and/or
00003  *      modify it under the terms of the GNU General Public License
00004  *      as published by the Free Software Foundation; either version
00005  *      2 of the License, or (at your option) any later version.
00006  *
00007  *  Copyright 1999 Michael Klein <michael(dot)klein(at)puffin(dot)lb(dot)shuttle(dot)de>
00008 */
00009 
00010 #ifdef SAVE_RCSID
00011 static char *rcsid =
00012     "@(#) $Id: morse.c,v 1.8 2006/02/24 12:01:06 trikalio Exp $";
00013 #endif
00014 
00015 #include "opencbm.h"
00016 
00017 #include "arch.h"
00018 
00019 #include <fcntl.h>
00020 #include <stdlib.h>
00021 
00022 static unsigned char morse[] = {
00023 #include "morse.inc"
00024 };
00025 
00026 int ARCH_MAINDECL main(int argc, char *argv[])
00027 {
00028     __u_char drv = argc > 1 ? arch_atoc(argv[1]) : 8;
00029     CBM_FILE fd;
00030     
00031     if(cbm_driver_open(&fd, 0) == 0)
00032     {
00033         cbm_upload(fd, drv, 0x0500, morse, sizeof(morse));
00034         cbm_listen(fd, drv, 15);
00035         cbm_raw_write(fd, "U3:SOS", 6);
00036         cbm_unlisten(fd);
00037         cbm_driver_close(fd);
00038         return 0;
00039     }
00040     return 1;
00041 }

Generated on Sun Apr 30 18:45:55 2006 for opencbm by  doxygen 1.4.2