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

flash.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: flash.c,v 1.7 2006/02/24 12:01:06 trikalio Exp $";
00013 #endif
00014 
00015 #include "opencbm.h"
00016 
00017 #include "arch.h"
00018 
00019 #include <stdlib.h>
00020 
00021 static unsigned char flash[] = {
00022 #include "flash.inc"
00023 };
00024 
00025 int ARCH_MAINDECL main(int argc, char *argv[])
00026 {
00027     __u_char drv = argc > 1 ? arch_atoc(argv[1]) : 8;
00028     CBM_FILE fd;
00029     
00030     if(cbm_driver_open(&fd, 0) == 0)
00031     {
00032         cbm_upload(fd, drv, 0x0500, flash, sizeof(flash));
00033         cbm_exec_command(fd, drv, "U3:", 0);
00034         cbm_driver_close(fd);
00035         return 0;
00036     }
00037     return 1;
00038 }

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