9 // do we have a 'minimal' lib yet anywhere formalized? if not, we could
10 // attempt to include it here.
12 // for reference material, see the Pandora wiki. Specifically, some good
14 // http://pandorawiki.org/Kernel_interface
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.
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_NUB2 "/dev/input/js2"
24 #define PND_DEVICE_BATTERY_GAUGE_PERC "/sys/class/power_supply/bq27500-0/capacity"
26 #define PND_DEVICE_LED_CHARGER "/sys/class/leds/pandora::charger"
27 #define PND_DEVICE_LED_POWER "/sys/class/leds/pandora::power"
28 #define PND_DEVICE_LED_SD1 "/sys/class/leds/pandora::sd1"
29 #define PND_DEVICE_LED_SD2 "/sys/class/leds/pandora::sd2"
30 #define PND_DEVICE_LED_WIFI "/sys/class/leds/pandora::wifi"
31 #define PND_DEVICE_LED_BT "/sys/class/leds/pandora::bluetooth"
32 #define PND_DEVICE_LED_SUFFIX_BRIGHTNESS "/brightness"
36 unsigned char pnd_device_open_write_close ( char *name, char *v );
37 unsigned char pnd_device_open_read_close ( char *name, char *r_buffer, unsigned int buffer_len );
39 /* overall clock speed
40 * WARN: No boundaries are checked, so try to avoid setting clock to 2GHz :)
41 * NOTE: get-clock() is not implemented yet.
43 unsigned char pnd_device_set_clock ( unsigned int c ); // returns >0 on success
44 unsigned int pnd_device_get_clock ( void );
46 /* return the battery current %age level; 0-100%
47 * On error, returns -1
49 int pnd_device_get_battery_gauge_perc ( void );
54 unsigned char pnd_device_set_backlight ( unsigned int v ); // value to set; 0 is off
55 unsigned int pnd_device_get_backlight ( void );
57 // set one or more LEDs on
58 unsigned char pnd_device_set_led_power_brightness ( unsigned char v ); // 0-255
60 // suspend/hibernate/etc