Created pnd_desktop.[ch] pair, to contain relocated dotdesktop and icon stuff
[pandora-libraries.git] / include / pnd_device.h
1
2 #ifndef h_pnd_device_h
3 #define h_pnd_device_h
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 // do we have a 'minimal' lib yet anywhere formalized? if not, we could
10 // attempt to include it here.
11
12 // for reference material, see the Pandora wiki. Specifically, some good
13 // places to look:
14 // http://pandorawiki.org/Kernel_interface
15
16 /* for reference, here are some devices of use; most of these should already have
17  * functions below, to avoid you having to code your own.
18  */
19 #define PND_DEVICE_PROC_CLOCK "/proc/pandora/cpu_mhz_max"
20 #define PND_DEVICE_SYS_BACKLIGHT_BRIGHTNESS "/sys/class/backlight/gpio-backlight/brightness"
21 #define PND_DEVICE_FRAMEBUFFER "/dev/fb0"
22 #define PND_DEVICE_NUB1 "/dev/input/js1"
23 #define PND_DEVICE_NUB1 "/dev/input/js2"
24
25 /* utility
26  */
27 unsigned char pnd_device_open_write_close ( char *name, char *v );
28 unsigned char pnd_device_open_read_close ( char *name, char *r_buffer, unsigned int buffer_len );
29
30 /* overall clock speed
31  * WARN: No boundaries are checked, so try to avoid setting clock to 2GHz :)
32  * NOTE: get-clock() is not implemented yet.
33  */
34 unsigned char pnd_device_set_clock ( unsigned int c ); // returns >0 on success
35 unsigned int pnd_device_get_clock ( void );
36
37 // LCD to set on/off
38
39 // Backlight control
40 unsigned char pnd_device_set_backlight ( unsigned int v ); // value to set; 0 is off
41 unsigned int pnd_device_get_backlight ( void );
42
43 // set one or more LEDs on
44
45 // suspend/hibernate/etc
46
47 #ifdef __cplusplus
48 } /* "C" */
49 #endif
50
51 #endif