Added a 'flags' arg to pnd_apps_exec
[pandora-libraries.git] / lib / pnd_device.c
1
2 #include <stdio.h> /* for FILE etc */
3 #include <stdlib.h> /* for malloc */
4 #include <string.h>
5
6 #include <sys/types.h> /* for open */
7 #include <sys/stat.h>
8 #include <fcntl.h>
9 #include <unistd.h>
10
11 #include "pnd_device.h"
12
13 unsigned char pnd_device_set_clock ( unsigned int c ) {
14   char buffer [ 100 ];
15   int f;
16
17   sprint ( buffer, "%u", c );
18
19   if ( ( f = open ( PND_DEVICE_PROC_CLOCK, O_RDONLY ) ) < 0 ) {
20     return ( 0 );
21   }
22
23   if ( write ( f, buffer, strlen ( buffer ) ) < strlen ( buffer ) ) {
24     return ( 0 );
25   }
26
27   close ( f );
28
29   return ( 1 );
30 }
31
32 unsigned int pnd_device_get_clock ( void ) {
33   return ( 0 );
34 }