Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

dpoke.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include "pmac.h"

Include dependency graph for dpoke.c:

Include dependency graph

Go to the source code of this file.

Functions

void handler (int sig)
int main (int argc, char **argv)

Variables

int done = 0


Function Documentation

void handler int    sig
 

Definition at line 9 of file dpoke.c.

00010 {
00011   done = 1;
00012 }

int main int    argc,
char **    argv
 

Definition at line 14 of file dpoke.c.

00015 {
00016   int n;
00017   int value;
00018   static char syntax[] = "syntax:  %s <index> <value>\n";
00019 
00020   /* get DP RAM */
00021   pmac_init();
00022 
00023   if (argc != 3)
00024   {
00025     printf(syntax, argv[0]);
00026     exit(1);
00027   }
00028 
00029   if (sscanf(argv[1], "%d", &n) != 1)
00030   {
00031     printf(syntax, argv[0]);
00032     exit(1);
00033   }
00034 
00035   if (sscanf(argv[2], "%x", &value) != 1)
00036   {
00037     printf(syntax, argv[0]);
00038     exit(1);
00039   }
00040 
00041   write_pmac_uint32(n, value);
00042 
00043   pmac_exit();
00044 
00045   exit(0);
00046 }


Variable Documentation

int done = 0 [static]
 

Definition at line 7 of file dpoke.c.


Generated on Sun Dec 2 15:57:08 2001 for rcslib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001