File: setps2rate.c

package info (click to toggle)
imwheel 1.0.0pre12-8
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 864 kB
  • ctags: 400
  • sloc: ansic: 4,347; sh: 883; makefile: 98
file content (18 lines) | stat: -rw-r--r-- 253 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>

int main(int argc, char **argv)
{
	char *device="/dev/psaux";
	FILE *f;
	char buf[2]={0xF3, 100};

	if(!(f=fopen(device, "w")))
	{
		perror(device);
		exit(1);
	}
	if(argc>1)
		buf[1]=atoi(argv[1]);
	fwrite(buf,1,2,f);
	fclose(f);
}