Changeset 4302
- Timestamp:
- 04/03/08 06:21:21 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/src/openmoko-panel-bt.c
r4197 r4302 23 23 #include <stdio.h> 24 24 25 #define BT_POWERON_FILENAME "/sys/ class/i2c-dev/i2c-0/device/0-0008/gta01-pm-bt.0/power_on"26 #define BT_ POWERON_FILENAME2 "/sys/class/i2c-dev/i2c-0/device/0-0008/neo1973-pm-bt.0/power_on"25 #define BT_POWERON_FILENAME "/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/neo1973-pm-bt.0/power_on" 26 #define BT_RESET_FILENAME "/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/neo1973-pm-bt.0/reset" 27 27 28 28 typedef struct { … … 37 37 int val; 38 38 39 if (f == NULL) f = fopen(BT_POWERON_FILENAME2, "r+");40 39 if (f == NULL) return -1; 41 40 … … 50 49 FILE * f = fopen(BT_POWERON_FILENAME, "w"); 51 50 52 if (f == NULL) f = fopen(BT_POWERON_FILENAME2, "w"); 51 if (f == NULL) return -1; 52 53 fprintf(f, "%i\n", val); 54 55 fclose(f); 56 57 return val; 58 } 59 60 static int 61 reset_bt_power(int val) 62 { 63 FILE * f = fopen(BT_RESET_FILENAME, "w"); 64 53 65 if (f == NULL) return -1; 54 66 … … 77 89 78 90 ret = set_bt_power(1); 91 ret = reset_bt_power(0); 79 92 mb_panel_update(applet, 1); 80 93 nn = notify_notification_new ("Bluetooth turned on", NULL, NULL, NULL);
Note: See TracChangeset
for help on using the changeset viewer.
