Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove BATTERY_TYPES

Change-Id: I4fa03a10d0032fd6f92722bbe1d4b7eec0b95cb4

+432 -951
-4
apps/features.txt
··· 20 20 backlight_brightness 21 21 #endif 22 22 23 - #if BATTERY_TYPES_COUNT > 1 24 - battery_types 25 - #endif 26 - 27 23 #if defined(HAVE_BUTTON_LIGHT) 28 24 button_light 29 25 #endif
+18 -18
apps/lang/english.lang
··· 3503 3503 </phrase> 3504 3504 <phrase> 3505 3505 id: LANG_BATTERY_TYPE 3506 - desc: in battery settings 3506 + desc: deprecated 3507 3507 user: core 3508 3508 <source> 3509 3509 *: none 3510 - battery_types: "Battery Type" 3510 + battery_types: "" 3511 3511 </source> 3512 3512 <dest> 3513 3513 *: none 3514 - battery_types: "Battery Type" 3514 + battery_types: "" 3515 3515 </dest> 3516 3516 <voice> 3517 3517 *: none 3518 - battery_types: "Battery type" 3518 + battery_types: "" 3519 3519 </voice> 3520 3520 </phrase> 3521 3521 <phrase> 3522 3522 id: LANG_BATTERY_TYPE_1 3523 - desc: in battery settings 3523 + desc: deprecated 3524 3524 user: core 3525 3525 <source> 3526 3526 *: none 3527 - battery_types: "Alkaline" 3528 - xduoox3: "Newer (2000 mAh)" 3527 + battery_types: "" 3528 + xduoox3: "" 3529 3529 </source> 3530 3530 <dest> 3531 3531 *: none 3532 - battery_types: "Alkaline" 3533 - xduoox3: "Newer (2000 mAh)" 3532 + battery_types: "" 3533 + xduoox3: "" 3534 3534 </dest> 3535 3535 <voice> 3536 3536 *: none 3537 - battery_types: "Alkaline" 3538 - xduoox3: "Newer 2000 milliamp hour" 3537 + battery_types: "" 3538 + xduoox3: "" 3539 3539 </voice> 3540 3540 </phrase> 3541 3541 <phrase> 3542 3542 id: LANG_BATTERY_TYPE_2 3543 - desc: in battery settings 3543 + desc: deprecated 3544 3544 user: core 3545 3545 <source> 3546 3546 *: none 3547 - battery_types: "NiMH" 3548 - xduoox3: "Older (1500 mAh)" 3547 + battery_types: "" 3548 + xduoox3: "" 3549 3549 </source> 3550 3550 <dest> 3551 3551 *: none 3552 - battery_types: "NiMH" 3553 - xduoox3: "Older (1500 mAh)" 3552 + battery_types: "" 3553 + xduoox3: "" 3554 3554 </dest> 3555 3555 <voice> 3556 3556 *: none 3557 - battery_types: "Nickel metal hydride" 3558 - xduoox3: "Older 1500 milliamp hour" 3557 + battery_types: "" 3558 + xduoox3: "" 3559 3559 </voice> 3560 3560 </phrase> 3561 3561 <phrase>
+2 -7
apps/menus/settings_menu.c
··· 263 263 #if BATTERY_CAPACITY_INC > 0 264 264 MENUITEM_SETTING(battery_capacity, &global_settings.battery_capacity, NULL); 265 265 #endif 266 - #if BATTERY_TYPES_COUNT > 1 267 - MENUITEM_SETTING(battery_type, &global_settings.battery_type, NULL); 268 - #endif 266 + 269 267 #ifdef HAVE_USB_CHARGING_ENABLE 270 268 static int usbcharging_callback(int action, 271 269 const struct menu_item_ex *this_item, ··· 286 284 MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON, 287 285 #if BATTERY_CAPACITY_INC > 0 288 286 &battery_capacity, 289 - #endif 290 - #if BATTERY_TYPES_COUNT > 1 291 - &battery_type, 292 287 #endif 293 288 #ifdef HAVE_USB_CHARGING_ENABLE 294 289 &usb_charging, ··· 430 425 431 426 MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), 432 427 0, Icon_System_menu, 433 - #if (BATTERY_CAPACITY_INC > 0) || (BATTERY_TYPES_COUNT > 1) || defined(HAVE_USB_CHARGING_ENABLE) 428 + #if (BATTERY_CAPACITY_INC > 0) || defined(HAVE_USB_CHARGING_ENABLE) 434 429 &battery_menu, 435 430 #endif 436 431 #if defined(HAVE_DIRCACHE) || defined(HAVE_DISK_STORAGE)
-4
apps/settings.c
··· 904 904 set_battery_capacity(global_settings.battery_capacity); 905 905 #endif 906 906 907 - #if BATTERY_TYPES_COUNT > 1 908 - set_battery_type(global_settings.battery_type); 909 - #endif 910 - 911 907 #ifdef HAVE_LCD_INVERT 912 908 lcd_set_invert_display(global_settings.invert); 913 909 #endif
-3
apps/settings.h
··· 686 686 #if BATTERY_CAPACITY_INC > 0 687 687 int battery_capacity; /* in mAh */ 688 688 #endif 689 - #if BATTERY_TYPES_COUNT > 1 690 - int battery_type; /* for units which can take multiple types (Ondio). */ 691 - #endif 692 689 #ifdef HAVE_SPDIF_POWER 693 690 bool spdif_enable; /* S/PDIF power on/off */ 694 691 #endif
-9
apps/settings_list.c
··· 1207 1207 OFFON_SETTING(0, sync_rds_time, LANG_FM_SYNC_RDS_TIME, false, "sync_rds_time", NULL), 1208 1208 #endif 1209 1209 1210 - #if BATTERY_TYPES_COUNT > 1 1211 - CHOICE_SETTING(0, battery_type, LANG_BATTERY_TYPE, 0, "battery type", 1212 - #ifdef XDUOO_X3 1213 - "new_2000mAh,old_1500mAh", 1214 - #else 1215 - "alkaline,nimh", 1216 - #endif 1217 - NULL, 2, ID2P(LANG_BATTERY_TYPE_1), ID2P(LANG_BATTERY_TYPE_2)), 1218 - #endif 1219 1210 #ifdef HAVE_REMOTE_LCD 1220 1211 /* remote lcd */ 1221 1212 INT_SETTING(0, remote_contrast, LANG_CONTRAST,
+2 -2
bootloader/ipod-s5l87xx.c
··· 182 182 } 183 183 184 184 #if (CONFIG_STORAGE & STORAGE_ATA) 185 - extern unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT]; 185 + extern unsigned short battery_level_disksafe; 186 186 static void battery_trap(void) 187 187 { 188 188 int vbat, old_verb; ··· 206 206 * when the HDD is used heavily (large database) the level drops 207 207 * to battery_level_shutoff quickly. 208 208 */ 209 - if (vbat >= battery_level_disksafe[0] + th) 209 + if (vbat >= battery_level_disksafe + th) 210 210 break; 211 211 th = 200; 212 212
-4
firmware/export/config.h
··· 741 741 #define CONFIG_RTC 0 742 742 #endif 743 743 744 - #ifndef BATTERY_TYPES_COUNT 745 - #define BATTERY_TYPES_COUNT 0 746 - #endif 747 - 748 744 #ifndef BATTERY_CAPACITY_DEFAULT 749 745 #define BATTERY_CAPACITY_DEFAULT 0 750 746 #endif
-3
firmware/export/config/agptekrocker.h
··· 32 32 /* Define this to the CPU frequency */ 33 33 #define CPU_FREQ 1008000000 34 34 35 - /* Battery */ 36 - #define BATTERY_TYPES_COUNT 1 37 - 38 35 /* Audio codec */ 39 36 #define HAVE_ROCKER_CODEC 40 37
+1 -1
firmware/export/config/aigoerosq.h
··· 33 33 #define CPU_FREQ 1008000000 34 34 35 35 /* Battery */ 36 - #define BATTERY_TYPES_COUNT 1 36 + 37 37 38 38 /* Audio codec */ 39 39 #define HAVE_EROSQ_LINUX_CODEC
+1 -1
firmware/export/config/cowond2.h
··· 130 130 #define BATTERY_CAPACITY_MIN 1500 /* min. capacity selectable */ 131 131 #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */ 132 132 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 133 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 133 + 134 134 135 135 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 136 136
+1 -1
firmware/export/config/creativezen.h
··· 140 140 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 141 141 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 142 142 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 143 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 143 + 144 144 145 145 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 146 146
+1 -1
firmware/export/config/creativezenmozaic.h
··· 138 138 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 139 139 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 140 140 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 141 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 141 + 142 142 143 143 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 144 144
+1 -1
firmware/export/config/creativezenv.h
··· 133 133 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 134 134 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 135 135 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 136 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 136 + 137 137 138 138 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 139 139
+1 -1
firmware/export/config/creativezenxfi.h
··· 145 145 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 146 146 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 147 147 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 148 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 148 + 149 149 150 150 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 151 151
+1 -1
firmware/export/config/creativezenxfi2.h
··· 149 149 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 150 150 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 151 151 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 152 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 152 + 153 153 154 154 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 155 155
+1 -1
firmware/export/config/creativezenxfi3.h
··· 154 154 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 155 155 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 156 156 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 157 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 157 + 158 158 159 159 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 160 160
+1 -1
firmware/export/config/creativezenxfistyle.h
··· 144 144 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 145 145 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 146 146 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 147 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 147 + 148 148 149 149 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 150 150
-1
firmware/export/config/erosqnative.h
··· 108 108 #endif 109 109 110 110 /* Battery */ 111 - #define BATTERY_TYPES_COUNT 1 112 111 #define BATTERY_CAPACITY_DEFAULT 1300 /* default battery capacity */ 113 112 #define BATTERY_CAPACITY_MIN 1300 /* min. capacity selectable */ 114 113 #define BATTERY_CAPACITY_MAX 1300 /* max. capacity selectable */
+1 -1
firmware/export/config/fiiom3k.h
··· 104 104 #define BATTERY_CAPACITY_MIN 1100 105 105 #define BATTERY_CAPACITY_MAX 1100 106 106 #define BATTERY_CAPACITY_INC 0 107 - #define BATTERY_TYPES_COUNT 1 107 + 108 108 109 109 /* Multiboot */ 110 110 #define HAVE_BOOTDATA
-3
firmware/export/config/fiiom3klinux.h
··· 112 112 #define CONFIG_STORAGE STORAGE_HOSTFS 113 113 #define HAVE_STORAGE_FLUSH 114 114 115 - /* Battery */ 116 - #define BATTERY_TYPES_COUNT 1 117 - 118 115 /* Audio codec */ 119 116 #define HAVE_FIIO_LINUX_CODEC 120 117 #define HAVE_ALSA_32BIT
+1 -1
firmware/export/config/gigabeatfx.h
··· 125 125 #define BATTERY_CAPACITY_MIN 830 /* min. capacity selectable */ 126 126 #define BATTERY_CAPACITY_MAX 830 /* max. capacity selectable */ 127 127 #define BATTERY_CAPACITY_INC 25 /* capacity increment */ 128 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 128 + 129 129 130 130 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 131 131
+1 -1
firmware/export/config/gigabeats.h
··· 170 170 #define BATTERY_CAPACITY_MIN 700 /* min. capacity selectable */ 171 171 #define BATTERY_CAPACITY_MAX 1200 /* max. capacity selectable */ 172 172 #define BATTERY_CAPACITY_INC 25 /* capacity increment */ 173 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 173 + 174 174 175 175 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 176 176
+1 -1
firmware/export/config/gogearhdd1630.h
··· 138 138 #define BATTERY_CAPACITY_MIN 600 /* min. capacity selectable */ 139 139 #define BATTERY_CAPACITY_MAX 700 /* max. capacity selectable */ 140 140 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 141 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 141 + 142 142 143 143 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 144 144
+1 -1
firmware/export/config/gogearhdd6330.h
··· 143 143 #define BATTERY_CAPACITY_MIN 600 /* min. capacity selectable */ 144 144 #define BATTERY_CAPACITY_MAX 900 /* max. capacity selectable */ 145 145 #define BATTERY_CAPACITY_INC 20 /* capacity increment */ 146 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 146 + 147 147 148 148 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 149 149
+1 -1
firmware/export/config/gogearsa9200.h
··· 126 126 #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ 127 127 #define BATTERY_CAPACITY_MAX 750 /* max. capacity selectable */ 128 128 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 129 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 129 + 130 130 131 131 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 132 132
+1 -1
firmware/export/config/hifietma8.h
··· 102 102 #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 103 103 #define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */ 104 104 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 105 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 105 + 106 106 107 107 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 108 108
+1 -1
firmware/export/config/hifietma8c.h
··· 102 102 #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 103 103 #define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */ 104 104 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 105 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 105 + 106 106 107 107 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 108 108
+1 -1
firmware/export/config/hifietma9.h
··· 102 102 #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 103 103 #define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */ 104 104 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 105 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 105 + 106 106 107 107 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 108 108
+1 -1
firmware/export/config/hifietma9c.h
··· 102 102 #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 103 103 #define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */ 104 104 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 105 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 105 + 106 106 107 107 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 108 108
+1 -1
firmware/export/config/hifimanhm60x.h
··· 128 128 #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 129 129 #define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */ 130 130 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 131 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 131 + 132 132 133 133 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 134 134
+1 -1
firmware/export/config/hifimanhm801.h
··· 116 116 #define BATTERY_CAPACITY_MIN 3000 /* min. capacity selectable */ 117 117 #define BATTERY_CAPACITY_MAX 4100 /* max. capacity selectable */ 118 118 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 119 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 119 + 120 120 121 121 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 122 122
+1 -1
firmware/export/config/iaudiom3.h
··· 110 110 #define BATTERY_CAPACITY_MIN 950 /* min. capacity selectable */ 111 111 #define BATTERY_CAPACITY_MAX 2250 /* max. capacity selectable */ 112 112 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 113 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 113 + 114 114 115 115 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 116 116
+1 -1
firmware/export/config/iaudiom5.h
··· 134 134 #define BATTERY_CAPACITY_MIN 950 /* min. capacity selectable */ 135 135 #define BATTERY_CAPACITY_MAX 2250 /* max. capacity selectable */ 136 136 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 137 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 137 + 138 138 139 139 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 140 140
+1 -1
firmware/export/config/iaudiox5.h
··· 140 140 #define BATTERY_CAPACITY_MIN 950 /* min. capacity selectable */ 141 141 #define BATTERY_CAPACITY_MAX 2250 /* max. capacity selectable */ 142 142 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 143 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 143 + 144 144 145 145 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 146 146
+1 -1
firmware/export/config/ibassodx50.h
··· 111 111 #define BATTERY_CAPACITY_MIN 1700 /* min. capacity selectable */ 112 112 #define BATTERY_CAPACITY_MAX 7300 /* max. capacity selectable */ 113 113 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 114 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 114 + 115 115 116 116 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 117 117 #define CONFIG_CHARGING CHARGING_MONITOR
+1 -1
firmware/export/config/ibassodx90.h
··· 110 110 #define BATTERY_CAPACITY_MIN 1700 /* min. capacity selectable */ 111 111 #define BATTERY_CAPACITY_MAX 7300 /* max. capacity selectable */ 112 112 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 113 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 113 + 114 114 115 115 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 116 116
+1 -1
firmware/export/config/ihifi760.h
··· 127 127 #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 128 128 #define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */ 129 129 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 130 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 130 + 131 131 132 132 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 133 133
+1 -1
firmware/export/config/ihifi770.h
··· 126 126 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 127 127 #define BATTERY_CAPACITY_MAX 1050 /* max. capacity selectable */ 128 128 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 129 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 129 + 130 130 131 131 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 132 132
+1 -1
firmware/export/config/ihifi770c.h
··· 126 126 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 127 127 #define BATTERY_CAPACITY_MAX 1050 /* max. capacity selectable */ 128 128 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 129 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 129 + 130 130 131 131 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 132 132
+1 -1
firmware/export/config/ihifi800.h
··· 127 127 #define BATTERY_CAPACITY_MIN 700 /* min. capacity selectable */ 128 128 #define BATTERY_CAPACITY_MAX 1400 /* max. capacity selectable */ 129 129 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 130 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 130 + 131 131 132 132 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 133 133
+1 -1
firmware/export/config/ihifi960.h
··· 128 128 #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 129 129 #define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */ 130 130 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 131 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 131 + 132 132 133 133 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 134 134
+1 -1
firmware/export/config/ipod1g2g.h
··· 127 127 #define BATTERY_CAPACITY_MIN 1200 /* min. capacity selectable */ 128 128 #define BATTERY_CAPACITY_MAX 1900 /* max. capacity selectable */ 129 129 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 130 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 130 + 131 131 132 132 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 133 133
+1 -1
firmware/export/config/ipod3g.h
··· 133 133 #define BATTERY_CAPACITY_MIN 630 /* min. capacity selectable */ 134 134 #define BATTERY_CAPACITY_MAX 1200 /* max. capacity selectable */ 135 135 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 136 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 136 + 137 137 138 138 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 139 139
+1 -1
firmware/export/config/ipod4g.h
··· 140 140 #define BATTERY_CAPACITY_MIN 630 /* min. capacity selectable */ 141 141 #define BATTERY_CAPACITY_MAX 1200 /* max. capacity selectable */ 142 142 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 143 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 143 + 144 144 145 145 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 146 146
+1 -1
firmware/export/config/ipod6g.h
··· 148 148 #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 149 149 #define BATTERY_CAPACITY_MAX 3000 /* max. capacity selectable */ 150 150 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 151 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 151 + 152 152 153 153 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 154 154
+1 -1
firmware/export/config/ipodcolor.h
··· 127 127 #define BATTERY_CAPACITY_MIN 700 /* min. capacity selectable */ 128 128 #define BATTERY_CAPACITY_MAX 1200 /* max. capacity selectable */ 129 129 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 130 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 130 + 131 131 132 132 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 133 133
+1 -1
firmware/export/config/ipodmini1g.h
··· 137 137 #define BATTERY_CAPACITY_MIN 400 /* min. capacity selectable */ 138 138 #define BATTERY_CAPACITY_MAX 1500 /* max. capacity selectable */ 139 139 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 140 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 140 + 141 141 142 142 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 143 143
+1 -1
firmware/export/config/ipodmini2g.h
··· 138 138 #define BATTERY_CAPACITY_MIN 400 /* min. capacity selectable */ 139 139 #define BATTERY_CAPACITY_MAX 1500 /* max. capacity selectable */ 140 140 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 141 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 141 + 142 142 143 143 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 144 144
+1 -1
firmware/export/config/ipodnano1g.h
··· 131 131 #define BATTERY_CAPACITY_MIN 200 /* min. capacity selectable */ 132 132 #define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */ 133 133 #define BATTERY_CAPACITY_INC 20 /* capacity increment */ 134 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 134 + 135 135 136 136 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 137 137
+1 -1
firmware/export/config/ipodnano2g.h
··· 144 144 #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 145 145 #define BATTERY_CAPACITY_MAX 500 /* max. capacity selectable */ 146 146 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 147 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 147 + 148 148 149 149 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 150 150
+1 -1
firmware/export/config/ipodvideo.h
··· 147 147 #define BATTERY_CAPACITY_MAX 3000 /* max. capacity selectable -- 148 148 3rd party batteries go this high */ 149 149 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 150 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 150 + 151 151 152 152 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 153 153
+1 -1
firmware/export/config/iriverh10.h
··· 119 119 #define BATTERY_CAPACITY_MIN 1500 /* min. capacity selectable */ 120 120 #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */ 121 121 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 122 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 122 + 123 123 124 124 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 125 125
+1 -1
firmware/export/config/iriverh100.h
··· 121 121 #define BATTERY_CAPACITY_MIN 1300 /* min. capacity selectable */ 122 122 #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */ 123 123 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 124 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 124 + 125 125 126 126 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 127 127
+1 -1
firmware/export/config/iriverh10_5gb.h
··· 105 105 #define BATTERY_CAPACITY_MIN 700 /* min. capacity selectable */ 106 106 #define BATTERY_CAPACITY_MAX 900 /* max. capacity selectable */ 107 107 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 108 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 108 + 109 109 110 110 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 111 111
+1 -1
firmware/export/config/iriverh120.h
··· 126 126 #define BATTERY_CAPACITY_MIN 1300 /* min. capacity selectable */ 127 127 #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */ 128 128 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 129 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 129 + 130 130 131 131 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 132 132
+1 -1
firmware/export/config/iriverh300.h
··· 130 130 #define BATTERY_CAPACITY_MIN 1300 /* min. capacity selectable */ 131 131 #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */ 132 132 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 133 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 133 + 134 134 135 135 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 136 136
+1 -1
firmware/export/config/lyreproto1.h
··· 83 83 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 84 84 #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ 85 85 #define BATTERY_CAPACITY_INC 100 /* capacity increment */ 86 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 86 + 87 87 88 88 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 89 89
+1 -1
firmware/export/config/meizum3.h
··· 115 115 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 116 116 #define BATTERY_CAPACITY_MAX 2250 /* max. capacity selectable */ 117 117 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 118 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 118 + 119 119 120 120 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 121 121
+1 -1
firmware/export/config/meizum6sl.h
··· 115 115 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 116 116 #define BATTERY_CAPACITY_MAX 2250 /* max. capacity selectable */ 117 117 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 118 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 118 + 119 119 120 120 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 121 121
+1 -1
firmware/export/config/meizum6sp.h
··· 121 121 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 122 122 #define BATTERY_CAPACITY_MAX 2250 /* max. capacity selectable */ 123 123 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 124 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 124 + 125 125 126 126 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 127 127
+1 -1
firmware/export/config/mini2440.h
··· 93 93 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 94 94 #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ 95 95 #define BATTERY_CAPACITY_INC 100 /* capacity increment */ 96 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 96 + 97 97 98 98 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 99 99
+1 -1
firmware/export/config/mpiohd200.h
··· 113 113 #define CODEC_SRCTRL_44100HZ (0x10 << 1) 114 114 #define CODEC_SRCTRL_88200HZ (0x1E << 1) 115 115 116 - #define BATTERY_TYPES_COUNT 1 116 + 117 117 118 118 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 119 119 #define BATTERY_CAPACITY_DEFAULT 850 /* this is wild guess */
+1 -1
firmware/export/config/mpiohd300.h
··· 116 116 #define CODEC_SRCTRL_44100HZ (0x10 << 1) 117 117 #define CODEC_SRCTRL_88200HZ (0x1E << 1) 118 118 119 - #define BATTERY_TYPES_COUNT 1 119 + 120 120 121 121 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 122 122 #define BATTERY_CAPACITY_DEFAULT 1200 /* this is wild guess */
+1 -1
firmware/export/config/mrobe100.h
··· 137 137 #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ 138 138 #define BATTERY_CAPACITY_MAX 750 /* max. capacity selectable */ 139 139 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 140 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 140 + 141 141 142 142 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 143 143
+1 -1
firmware/export/config/mrobe500.h
··· 188 188 #define BATTERY_CAPACITY_MIN 1000 /* min. capacity selectable */ 189 189 #define BATTERY_CAPACITY_MAX 2000 /* max. capacity selectable */ 190 190 #define BATTERY_CAPACITY_INC 100 /* capacity increment */ 191 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 191 + 192 192 193 193 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 194 194
+1 -1
firmware/export/config/ondavx747.h
··· 145 145 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 146 146 #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ 147 147 #define BATTERY_CAPACITY_INC 100 /* capacity increment */ 148 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 148 + 149 149 150 150 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 151 151
+1 -1
firmware/export/config/ondavx767.h
··· 128 128 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 129 129 #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ 130 130 #define BATTERY_CAPACITY_INC 100 /* capacity increment */ 131 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 131 + 132 132 133 133 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 134 134
+1 -1
firmware/export/config/ondavx777.h
··· 139 139 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 140 140 #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ 141 141 #define BATTERY_CAPACITY_INC 100 /* capacity increment */ 142 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 142 + 143 143 144 144 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 145 145
+1 -1
firmware/export/config/rk27generic.h
··· 136 136 #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 137 137 #define BATTERY_CAPACITY_MAX 500 /* max. capacity selectable */ 138 138 #define BATTERY_CAPACITY_INC 10 /* capacity increment */ 139 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 139 + 140 140 141 141 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 142 142
+1 -1
firmware/export/config/samsungyh820.h
··· 139 139 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 140 140 #define BATTERY_CAPACITY_MAX 800 /* max. capacity selectable */ 141 141 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 142 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 142 + 143 143 144 144 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 145 145
+1 -1
firmware/export/config/samsungyh920.h
··· 148 148 #define BATTERY_CAPACITY_MIN 900 /* min. capacity selectable */ 149 149 #define BATTERY_CAPACITY_MAX 1600 /* max. capacity selectable */ 150 150 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 151 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 151 + 152 152 153 153 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 154 154
+1 -1
firmware/export/config/samsungyh925.h
··· 146 146 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 147 147 #define BATTERY_CAPACITY_MAX 1150 /* max. capacity selectable */ 148 148 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 149 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 149 + 150 150 151 151 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 152 152
+1 -1
firmware/export/config/samsungypr0.h
··· 129 129 #define BATTERY_CAPACITY_MIN 600 /* min. capacity selectable */ 130 130 #define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */ 131 131 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 132 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 132 + 133 133 134 134 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 135 135
+1 -1
firmware/export/config/samsungypr1.h
··· 118 118 #define BATTERY_CAPACITY_MIN 600 /* min. capacity selectable */ 119 119 #define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */ 120 120 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 121 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 121 + 122 122 123 123 /* R1's fuel gauge max17040 can supply both kind of values */ 124 124 #define CONFIG_BATTERY_MEASURE PERCENTAGE_MEASURE
+1 -1
firmware/export/config/samsungyps3.h
··· 113 113 #define BATTERY_CAPACITY_MIN 580 /* min. capacity selectable */ 114 114 #define BATTERY_CAPACITY_MAX 580 /* max. capacity selectable */ 115 115 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 116 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 116 + 117 117 118 118 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 119 119
+1 -1
firmware/export/config/sansac200.h
··· 138 138 #define BATTERY_CAPACITY_MIN 530 /* min. capacity selectable */ 139 139 #define BATTERY_CAPACITY_MAX 530 /* max. capacity selectable */ 140 140 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 141 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 141 + 142 142 143 143 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 144 144
+1 -1
firmware/export/config/sansac200v2.h
··· 132 132 #define BATTERY_CAPACITY_MIN 530 /* min. capacity selectable */ 133 133 #define BATTERY_CAPACITY_MAX 530 /* max. capacity selectable */ 134 134 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 135 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 135 + 136 136 137 137 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 138 138
+1 -1
firmware/export/config/sansaclip.h
··· 135 135 #define BATTERY_CAPACITY_MIN 330 /* min. capacity selectable */ 136 136 #define BATTERY_CAPACITY_MAX 330 /* max. capacity selectable */ 137 137 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 138 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 138 + 139 139 140 140 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 141 141
+1 -1
firmware/export/config/sansaclipplus.h
··· 155 155 #define BATTERY_CAPACITY_MIN 290 /* min. capacity selectable */ 156 156 #define BATTERY_CAPACITY_MAX 290 /* max. capacity selectable */ 157 157 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 158 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 158 + 159 159 160 160 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 161 161
+1 -1
firmware/export/config/sansaclipv2.h
··· 142 142 #define BATTERY_CAPACITY_MIN 380 /* min. capacity selectable */ 143 143 #define BATTERY_CAPACITY_MAX 380 /* max. capacity selectable */ 144 144 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 145 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 145 + 146 146 147 147 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 148 148
+1 -1
firmware/export/config/sansaclipzip.h
··· 148 148 #define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 149 149 #define BATTERY_CAPACITY_MAX 300 /* max. capacity selectable */ 150 150 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 151 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 151 + 152 152 153 153 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 154 154
+1 -1
firmware/export/config/sansaconnect.h
··· 147 147 #define BATTERY_CAPACITY_MIN 700 /* min. capacity selectable */ 148 148 #define BATTERY_CAPACITY_MAX 1000 /* max. capacity selectable */ 149 149 #define BATTERY_CAPACITY_INC 100 /* capacity increment */ 150 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 150 + 151 151 152 152 /* bq27000 provides voltage, percentage and time measure. 153 153 * Voltage reading is available every 2.56 seconds and does not need filtering.
+1 -1
firmware/export/config/sansae200.h
··· 145 145 #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ 146 146 #define BATTERY_CAPACITY_MAX 750 /* max. capacity selectable */ 147 147 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 148 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 148 + 149 149 150 150 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 151 151
+1 -1
firmware/export/config/sansae200v2.h
··· 158 158 #define BATTERY_CAPACITY_MIN 730 /* min. capacity selectable */ 159 159 #define BATTERY_CAPACITY_MAX 730 /* max. capacity selectable */ 160 160 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 161 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 161 + 162 162 163 163 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 164 164
+1 -1
firmware/export/config/sansafuze.h
··· 158 158 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 159 159 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 160 160 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 161 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 161 + 162 162 163 163 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 164 164
+1 -1
firmware/export/config/sansafuzeplus.h
··· 151 151 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 152 152 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 153 153 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 154 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 154 + 155 155 156 156 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 157 157
+1 -1
firmware/export/config/sansafuzev2.h
··· 163 163 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 164 164 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 165 165 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 166 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 166 + 167 167 168 168 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 169 169
+1 -1
firmware/export/config/sansam200v4.h
··· 112 112 #define BATTERY_CAPACITY_MIN 1500 /* min. capacity selectable */ 113 113 #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */ 114 114 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 115 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 115 + 116 116 117 117 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 118 118
+1 -1
firmware/export/config/sansaview.h
··· 119 119 #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ 120 120 #define BATTERY_CAPACITY_MAX 750 /* max. capacity selectable */ 121 121 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 122 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 122 + 123 123 124 124 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 125 125
+1 -1
firmware/export/config/shanlingq1.h
··· 89 89 #define BATTERY_CAPACITY_MIN 1100 90 90 #define BATTERY_CAPACITY_MAX 1100 91 91 #define BATTERY_CAPACITY_INC 0 92 - #define BATTERY_TYPES_COUNT 1 92 + 93 93 94 94 /* Multiboot */ 95 95 #define HAVE_BOOTDATA
+1 -1
firmware/export/config/sonynwze360.h
··· 125 125 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 126 126 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 127 127 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 128 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 128 + 129 129 130 130 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 131 131
+1 -1
firmware/export/config/sonynwze370.h
··· 125 125 #define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */ 126 126 #define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */ 127 127 #define BATTERY_CAPACITY_INC 0 /* capacity increment */ 128 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 128 + 129 129 130 130 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 131 131
-3
firmware/export/config/sonynwzlinux.h
··· 117 117 #endif 118 118 #define HAVE_STORAGE_FLUSH 119 119 120 - /* Battery */ 121 - #define BATTERY_TYPES_COUNT 1 122 - 123 120 /* special define to be use in various places */ 124 121 #define SONY_NWZ_LINUX 125 122
+1 -1
firmware/export/config/vibe500.h
··· 119 119 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 120 120 #define BATTERY_CAPACITY_MAX 1500 /* max. capacity selectable */ 121 121 #define BATTERY_CAPACITY_INC 50 /* capacity increment */ 122 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 122 + 123 123 124 124 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 125 125
-3
firmware/export/config/xduoox20.h
··· 30 30 /* Define this to the CPU frequency */ 31 31 #define CPU_FREQ 1008000000 32 32 33 - /* Battery */ 34 - #define BATTERY_TYPES_COUNT 1 35 - 36 33 /* Audio codec */ 37 34 #define HAVE_XDUOO_LINUX_CODEC 38 35
+1 -1
firmware/export/config/xduoox3.h
··· 108 108 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 109 109 #define BATTERY_CAPACITY_MAX 2000 /* max. capacity selectable */ 110 110 #define BATTERY_CAPACITY_INC 100 /* capacity increment */ 111 - #define BATTERY_TYPES_COUNT 2 /* Two types (2000mAh and 1500mAh) */ 111 + 112 112 113 113 #define CURRENT_NORMAL 167 // 2.78mA * 60s 114 114 #define CURRENT_BACKLIGHT 180 // 15mA * 60s
-3
firmware/export/config/xduoox3ii.h
··· 31 31 /* Define this to the CPU frequency */ 32 32 #define CPU_FREQ 1008000000 33 33 34 - /* Battery */ 35 - #define BATTERY_TYPES_COUNT 1 36 - 37 34 /* Audio codec */ 38 35 #define HAVE_XDUOO_LINUX_CODEC 39 36
+1 -1
firmware/export/config/zenvision.h
··· 126 126 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 127 127 #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ 128 128 #define BATTERY_CAPACITY_INC 100 /* capacity increment */ 129 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 129 + 130 130 131 131 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 132 132
+1 -1
firmware/export/config/zenvisionm30gb.h
··· 127 127 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 128 128 #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ 129 129 #define BATTERY_CAPACITY_INC 100 /* capacity increment */ 130 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 130 + 131 131 132 132 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 133 133
+1 -1
firmware/export/config/zenvisionm60gb.h
··· 126 126 #define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ 127 127 #define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ 128 128 #define BATTERY_CAPACITY_INC 100 /* capacity increment */ 129 - #define BATTERY_TYPES_COUNT 1 /* only one type */ 129 + 130 130 131 131 #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE 132 132
-1
firmware/export/powermgmt.h
··· 161 161 void set_battery_capacity(int capacity); /* set local battery capacity value */ 162 162 #endif 163 163 int get_battery_capacity(void); /* get local battery capacity value */ 164 - void set_battery_type(int type); /* set local battery type */ 165 164 166 165 void set_sleeptimer_duration(int minutes); 167 166 bool get_sleep_timer_active(void);
+17 -36
firmware/powermgmt.c
··· 56 56 57 57 #if (BATTERY_CAPACITY_DEFAULT > 0) 58 58 extern unsigned short power_history[POWER_HISTORY_LEN]; 59 - extern unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT]; 60 - extern unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT]; 61 - extern unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11]; 59 + extern unsigned short battery_level_disksafe; 60 + extern unsigned short battery_level_shutoff; 61 + extern unsigned short percent_to_volt_discharge[11]; 62 62 #endif 63 63 #if CONFIG_CHARGING 64 64 extern unsigned short percent_to_volt_charge[11]; ··· 72 72 { 73 73 #if (BATTERY_CAPACITY_DEFAULT > 0) 74 74 .history = power_history, 75 - .disksafe = &battery_level_disksafe[0], 76 - .shutoff = &battery_level_shutoff[0], 77 - .discharge = percent_to_volt_discharge[0], 75 + .disksafe = &battery_level_disksafe, 76 + .shutoff = &battery_level_shutoff, 77 + .discharge = percent_to_volt_discharge, 78 78 #if CONFIG_CHARGING 79 79 .charge = percent_to_volt_charge, 80 80 #endif 81 - .elems = ARRAYLEN(percent_to_volt_discharge[0]), 81 + .elems = ARRAYLEN(percent_to_volt_discharge), 82 82 #endif 83 83 .isdefault = true, 84 84 }; ··· 117 117 # define battery_capacity BATTERY_CAPACITY_DEFAULT 118 118 #endif 119 119 120 - #if BATTERY_TYPES_COUNT > 1 121 - static int battery_type = 0; 122 - #else 123 - #define battery_type 0 124 - #endif 125 - 126 120 /* Power history: power_history[0] is the newest sample */ 127 121 unsigned short power_history[POWER_HISTORY_LEN] = {0}; 128 122 ··· 277 271 if(!charger_inserted()) 278 272 #endif 279 273 { 280 - voltage_now += (percent_to_volt_discharge[battery_type][6] - 281 - percent_to_volt_discharge[battery_type][5]) / 2; 274 + voltage_now += (percent_to_volt_discharge[6] - 275 + percent_to_volt_discharge[5]) / 2; 282 276 } 283 277 #endif /* HAVE_DISK_STORAGE */ 284 278 ··· 377 371 #endif /* CONFIG_CHARGING >= CHARGING_MONITOR */ 378 372 { 379 373 /* DISCHARGING or error state */ 380 - level = voltage_to_percent(millivolts, percent_to_volt_discharge[battery_type]); 374 + level = voltage_to_percent(millivolts, percent_to_volt_discharge); 381 375 } 382 376 383 377 return level; ··· 480 474 } 481 475 } 482 476 483 - #if BATTERY_TYPES_COUNT > 1 484 - void set_battery_type(int type) 485 - { 486 - if(type < 0 || type > BATTERY_TYPES_COUNT) 487 - type = 0; 488 - 489 - if (type != battery_type) { 490 - battery_type = type; 491 - battery_status_update(); /* recalculate the battery status */ 492 - } 493 - } 494 - #endif 495 - 496 477 #if BATTERY_CAPACITY_INC > 0 497 478 void set_battery_capacity(int capacity) 498 479 { ··· 519 500 #if defined(NO_LOW_BATTERY_SHUTDOWN) 520 501 return true; 521 502 #elif ((CONFIG_BATTERY_MEASURE & PERCENTAGE_MEASURE) && (CONFIG_BATTERY_MEASURE & VOLTAGE_MEASURE)) 522 - return voltage_now > battery_level_disksafe[battery_type]; 503 + return voltage_now > battery_level_disksafe; 523 504 #elif CONFIG_BATTERY_MEASURE & PERCENTAGE_MEASURE 524 505 return percent_now > 0; 525 506 #elif defined(HAVE_BATTERY_SWITCH) 526 507 /* Cannot rely upon the battery reading to be valid and the 527 508 * device could be powered externally. */ 528 - return input_millivolts() > battery_level_disksafe[battery_type]; 509 + return input_millivolts() > battery_level_disksafe; 529 510 #else 530 - return voltage_now > battery_level_disksafe[battery_type]; 511 + return voltage_now > battery_level_disksafe; 531 512 #endif 532 513 } 533 514 ··· 553 534 return false; 554 535 #elif ((CONFIG_BATTERY_MEASURE & PERCENTAGE_MEASURE) && (CONFIG_BATTERY_MEASURE & VOLTAGE_MEASURE)) 555 536 /* If we have both, prefer voltage */ 556 - return voltage_now < battery_level_shutoff[battery_type]; 537 + return voltage_now < battery_level_shutoff; 557 538 #elif CONFIG_BATTERY_MEASURE & PERCENTAGE_MEASURE 558 539 return percent_now == 0; 559 540 #elif defined(HAVE_BATTERY_SWITCH) 560 541 /* Cannot rely upon the battery reading to be valid and the 561 542 * device could be powered externally. */ 562 - return input_millivolts() < battery_level_shutoff[battery_type]; 543 + return input_millivolts() < battery_level_shutoff; 563 544 #else 564 - return voltage_now < battery_level_shutoff[battery_type]; 545 + return voltage_now < battery_level_shutoff; 565 546 #endif 566 547 } 567 548 ··· 905 886 { 906 887 #if (BATTERY_CAPACITY_DEFAULT > 0) && !defined(BOOTLOADER) 907 888 /* parse and load user battery levels file */ 908 - #define PWRELEMS (ARRAYLEN(percent_to_volt_discharge[0])) 889 + #define PWRELEMS (ARRAYLEN(percent_to_volt_discharge)) 909 890 910 891 911 892 unsigned short tmparr[PWRELEMS];
+8 -14
firmware/target/arm/as3525/sansa-c200v2/powermgmt-c200v2.c
··· 23 23 #include "config.h" 24 24 #include "powermgmt.h" 25 25 26 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 27 - { 28 - /* 29 - * about 10%, calibrated with C240v2 battery profile at 30 - * http://www.rockbox.org/wiki/bin/viewfile/Main/SansaRuntime?filename=c240v2_battery_bench_percent.png;rev=3 31 - */ 32 - 3600 33 - }; 26 + /* 27 + * about 10%, calibrated with C240v2 battery profile at 28 + * http://www.rockbox.org/wiki/bin/viewfile/Main/SansaRuntime?filename=c240v2_battery_bench_percent.png;rev=3 29 + */ 30 + unsigned short battery_level_disksafe = 3600; 34 31 35 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 36 - { 37 - 3300 38 - }; 32 + unsigned short battery_level_shutoff = 3300; 39 33 40 34 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 41 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 35 + unsigned short percent_to_volt_discharge[11] = 42 36 { 43 37 /* 44 38 * Below table is calibrated according to 45 39 * http://www.rockbox.org/wiki/bin/viewfile/Main/SansaRuntime?filename=c240v2_battery_bench_percent.png;rev=3 46 40 * OF seems to stop charging at 4150mV, so that's 100% here. 47 41 */ 48 - { 3300, 3597, 3674, 3719, 3745, 3776, 3825, 3890, 3954, 4035, 4150 } 42 + 3300, 3597, 3674, 3719, 3745, 3776, 3825, 3890, 3954, 4035, 4150 49 43 }; 50 44 51 45 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/as3525/sansa-clip/powermgmt-clip.c
··· 24 24 /* The battery manufacturer's website shows discharge curves down to 3.0V, 25 25 so 'disksafe' and 'shutoff' levels of 3.4V and 3.3V should be safe. 26 26 */ 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3400 30 - }; 27 + unsigned short battery_level_disksafe = 3400; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3300 35 - }; 29 + unsigned short battery_level_shutoff = 3300; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 - { 3300, 3653, 3701, 3735, 3768, 3790, 3833, 3900, 3966, 4056, 4140 } 34 + 3300, 3653, 3701, 3735, 3768, 3790, 3833, 3900, 3966, 4056, 4140 41 35 }; 42 36 43 37 #if CONFIG_CHARGING
+4 -10
firmware/target/arm/as3525/sansa-clipplus/powermgmt-clipplus.c
··· 24 24 /* The battery manufacturer's website shows discharge curves down to 3.0V, 25 25 so 'disksafe' and 'shutoff' levels of 3.4V and 3.3V should be safe. 26 26 */ 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3400 30 - }; 27 + unsigned short battery_level_disksafe = 3400; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3300 35 - }; 29 + unsigned short battery_level_shutoff = 3300; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 - { 3300, 3653, 3701, 3735, 3768, 3790, 3833, 3900, 3966, 4056, 4140 } 34 + 3300, 3653, 3701, 3735, 3768, 3790, 3833, 3900, 3966, 4056, 4140 41 35 }; 42 36 43 37 #if CONFIG_CHARGING
+4 -10
firmware/target/arm/as3525/sansa-clipv2/powermgmt-clipv2.c
··· 24 24 /* The battery manufacturer's website shows discharge curves down to 3.0V, 25 25 so 'disksafe' and 'shutoff' levels of 3.4V and 3.3V should be safe. 26 26 */ 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3400 30 - }; 27 + unsigned short battery_level_disksafe = 3400; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3300 35 - }; 29 + unsigned short battery_level_shutoff = 3300; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 - { 3300, 3692, 3740, 3772, 3798, 3828, 3876, 3943, 4013, 4094, 4194 } 34 + 3300, 3692, 3740, 3772, 3798, 3828, 3876, 3943, 4013, 4094, 4194 41 35 }; 42 36 43 37 #if CONFIG_CHARGING
+4 -10
firmware/target/arm/as3525/sansa-clipzip/powermgmt-clipzip.c
··· 24 24 /* The battery manufacturer's website shows discharge curves down to 3.0V, 25 25 so 'disksafe' and 'shutoff' levels of 3.4V and 3.3V should be safe. 26 26 */ 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3400 30 - }; 27 + unsigned short battery_level_disksafe = 3400; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3300 35 - }; 29 + unsigned short battery_level_shutoff = 3300; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 - { 3300, 3653, 3701, 3735, 3768, 3790, 3833, 3900, 3966, 4056, 4140 } 34 + 3300, 3653, 3701, 3735, 3768, 3790, 3833, 3900, 3966, 4056, 4140 41 35 }; 42 36 43 37 #if CONFIG_CHARGING
+4 -10
firmware/target/arm/as3525/sansa-e200v2/powermgmt-e200v2.c
··· 23 23 #include "config.h" 24 24 #include "powermgmt.h" 25 25 26 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 27 - { 28 - 3400 29 - }; 26 + unsigned short battery_level_disksafe = 3400; 30 27 31 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 32 - { 33 - 3300 34 - }; 28 + unsigned short battery_level_shutoff = 3300; 35 29 36 30 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 37 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 31 + unsigned short percent_to_volt_discharge[11] = 38 32 { 39 33 /* Sansa Li Ion 750mAH, FIXME copied from e200v1 */ 40 - { 3300, 3680, 3740, 3760, 3780, 3810, 3870, 3930, 3970, 4070, 4160 }, 34 + 3300, 3680, 3740, 3760, 3780, 3810, 3870, 3930, 3970, 4070, 4160 41 35 }; 42 36 43 37 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/as3525/sansa-fuze/powermgmt-fuze.c
··· 24 24 /* The battery manufacturer's website shows discharge curves down to 3.0V, 25 25 so 'disksafe' and 'shutoff' levels of 3.4V and 3.3V should be safe. 26 26 */ 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3400 30 - }; 27 + unsigned short battery_level_disksafe = 3400; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3300 35 - }; 29 + unsigned short battery_level_shutoff = 3300; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 - { 3300, 3676, 3715, 3749, 3783, 3812, 3850, 3918, 3982, 4065, 4148 } 34 + 3300, 3676, 3715, 3749, 3783, 3812, 3850, 3918, 3982, 4065, 4148 41 35 42 36 }; 43 37
+4 -10
firmware/target/arm/as3525/sansa-fuzev2/powermgmt-fuzev2.c
··· 24 24 /* The battery manufacturer's website shows discharge curves down to 3.0V, 25 25 so 'disksafe' and 'shutoff' levels of 3.4V and 3.3V should be safe. 26 26 */ 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3400 30 - }; 27 + unsigned short battery_level_disksafe = 3400; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3300 35 - }; 29 + unsigned short battery_level_shutoff = 3300; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 - { 3300, 3655, 3700, 3735, 3764, 3795, 3837, 3909, 3984, 4063, 4151 } 34 + 3300, 3655, 3700, 3735, 3764, 3795, 3837, 3909, 3984, 4063, 4151 41 35 }; 42 36 43 37 #if CONFIG_CHARGING
+5 -12
firmware/target/arm/as3525/sansa-m200v4/powermgmt-m200v4.c
··· 28 28 early uncalibrated values. But read-out value should be correct 29 29 */ 30 30 31 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 32 - { 33 - /* TODO: this is just an initial guess */ 34 - 900 35 - }; 31 + unsigned short battery_level_disksafe = 1000; /* TODO: this is just an initial guess */ 32 + 33 + unsigned short battery_level_shutoff = 900; /* TODO: this is just an initial guess */ 36 34 37 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 38 - { 39 - /* TODO: this is just an initial guess */ 40 - 1000 41 - }; 42 35 43 36 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 44 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 37 + unsigned short percent_to_volt_discharge[11] = 45 38 { 46 39 /* TODO: simple uncalibrated curve, linear except for first 10% */ 47 - { 1000, 1050, 1100, 1150, 1200, 1250, 1300, 1350, 1400, 1450, 1500 } 40 + 1000, 1050, 1100, 1150, 1200, 1250, 1300, 1350, 1400, 1450, 1500 48 41 }; 49 42 50 43 /* ADC should read 0x3ff=5.12V */
+4 -10
firmware/target/arm/imx233/creative-zen/powermgmt-zen.c
··· 22 22 #include "powermgmt-target.h" 23 23 #include "power-imx233.h" 24 24 25 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 26 - { 27 - 0 28 - }; 25 + unsigned short battery_level_disksafe = 0; 29 26 30 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 31 - { 32 - 0 33 - }; 27 + unsigned short battery_level_shutoff = 0; 34 28 35 29 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 36 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 30 + unsigned short percent_to_volt_discharge[11] = 37 31 { 38 32 /* Sansa Fuze+ Li Ion 600mAH figured from discharge curve */ 39 - { 3100, 3650, 3720, 3750, 3780, 3820, 3880, 4000, 4040, 4125, 4230 }, 33 + 3100, 3650, 3720, 3750, 3780, 3820, 3880, 4000, 4040, 4125, 4230 40 34 }; 41 35 42 36 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/imx233/creative-zenxfi2/powermgmt-zenxfi2.c
··· 21 21 #include "config.h" 22 22 #include "powermgmt-target.h" 23 23 24 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 25 - { 26 - 3659 27 - }; 24 + unsigned short battery_level_disksafe = 3659; 28 25 29 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 30 - { 31 - 3630 32 - }; 26 + unsigned short battery_level_shutoff = 3630; 33 27 34 28 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 35 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 29 + unsigned short percent_to_volt_discharge[11] = 36 30 { 37 31 /* Toshiba Gigabeat S Li Ion 700mAH figured from discharge curve */ 38 - { 3659, 3719, 3745, 3761, 3785, 3813, 3856, 3926, 3984, 4040, 4121 }, 32 + 3659, 3719, 3745, 3761, 3785, 3813, 3856, 3926, 3984, 4040, 4121 39 33 }; 40 34 41 35 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/imx233/creative-zenxfi3/powermgmt-zenxfi3.c
··· 21 21 #include "config.h" 22 22 #include "powermgmt-target.h" 23 23 24 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 25 - { 26 - 3659 27 - }; 24 + unsigned short battery_level_disksafe = 3659; 28 25 29 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 30 - { 31 - 3630 32 - }; 26 + unsigned short battery_level_shutoff = 3630; 33 27 34 28 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 35 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 29 + unsigned short percent_to_volt_discharge[11] = 36 30 { 37 31 /* figured from discharge curve */ 38 - { 3631, 3697, 3762, 3784, 3805, 3838, 3902, 3961, 4016, 4091, 4178 }, 32 + 3631, 3697, 3762, 3784, 3805, 3838, 3902, 3961, 4016, 4091, 4178 39 33 }; 40 34 41 35 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/imx233/sansa-fuzeplus/powermgmt-fuzeplus.c
··· 21 21 #include "config.h" 22 22 #include "powermgmt-target.h" 23 23 24 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 25 - { 26 - 3400 27 - }; 24 + unsigned short battery_level_disksafe = 3400; 28 25 29 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 30 - { 31 - 3300 32 - }; 26 + unsigned short battery_level_shutoff = 3300; 33 27 34 28 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 35 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 29 + unsigned short percent_to_volt_discharge[11] = 36 30 { 37 31 /* Sansa Fuze+ Li Ion 600mAH figured from discharge curve */ 38 - { 3100, 3650, 3720, 3750, 3780, 3820, 3880, 4000, 4040, 4125, 4230 }, 32 + 3100, 3650, 3720, 3750, 3780, 3820, 3880, 4000, 4040, 4125, 4230 39 33 }; 40 34 41 35 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/imx233/sony-nwz/powermgmt-nwze360.c
··· 21 21 #include "config.h" 22 22 #include "powermgmt-target.h" 23 23 24 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 25 - { 26 - 3660 27 - }; 24 + unsigned short battery_level_disksafe = 3660; 28 25 29 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 30 - { 31 - 3630 32 - }; 26 + unsigned short battery_level_shutoff = 3630; 33 27 34 28 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 35 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 29 + unsigned short percent_to_volt_discharge[11] = 36 30 { 37 31 /* figured from discharge curve */ 38 - { 3630, 3720, 3770, 3800, 3816, 3845, 3888, 3950, 4010, 4070, 4150 }, 32 + 3630, 3720, 3770, 3800, 3816, 3845, 3888, 3950, 4010, 4070, 4150 39 33 }; 40 34 41 35 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/imx233/sony-nwz/powermgmt-nwze370.c
··· 21 21 #include "config.h" 22 22 #include "powermgmt-target.h" 23 23 24 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 25 - { 26 - 3660 27 - }; 24 + unsigned short battery_level_disksafe = 3660; 28 25 29 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 30 - { 31 - 3630 32 - }; 26 + unsigned short battery_level_shutoff = 3630; 33 27 34 28 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 35 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 29 + unsigned short percent_to_volt_discharge[11] = 36 30 { 37 31 /* figured from discharge curve */ 38 - { 3630, 3700, 3745, 3775, 3800, 3830, 3880, 3940, 4000, 4070, 4140 }, 32 + 3630, 3700, 3745, 3775, 3800, 3830, 3880, 3940, 4000, 4070, 4140 39 33 }; 40 34 41 35 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c
··· 30 30 #include "power.h" 31 31 #include "power-gigabeat-s.h" 32 32 33 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 34 - { 35 - 3659 36 - }; 33 + unsigned short battery_level_disksafe = 3659; 37 34 38 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 39 - { 40 - 3630 41 - }; 35 + unsigned short battery_level_shutoff = 3630; 42 36 43 37 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 44 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 38 + unsigned short percent_to_volt_discharge[11] = 45 39 { 46 40 /* Toshiba Gigabeat S Li Ion 700mAH figured from discharge curve */ 47 - { 3659, 3719, 3745, 3761, 3785, 3813, 3856, 3926, 3984, 4040, 4121 }, 41 + 3659, 3719, 3745, 3761, 3785, 3813, 3856, 3926, 3984, 4040, 4121 48 42 }; 49 43 50 44 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/ipod/1g2g/powermgmt-1g2g.c
··· 28 28 /* FIXME: Properly calibrate values. Current values "inherited" from 29 29 * iriver H100 */ 30 30 31 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 32 - { 33 - 3380 34 - }; 31 + unsigned short battery_level_disksafe = 3380; 35 32 36 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 37 - { 38 - 3020 39 - }; 33 + unsigned short battery_level_shutoff = 3020; 40 34 41 35 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 42 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 36 + unsigned short percent_to_volt_discharge[11] = 43 37 { 44 - { 3370, 3650, 3700, 3740, 3780, 3820, 3870, 3930, 4000, 4080, 4160 } 38 + 3370, 3650, 3700, 3740, 3780, 3820, 3870, 3930, 4000, 4080, 4160 45 39 }; 46 40 47 41 #if CONFIG_CHARGING
+18 -22
firmware/target/arm/ipod/powermgmt-ipod-pcf.c
··· 27 27 #include "pcf50605.h" 28 28 #include "audiohw.h" 29 29 30 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 31 - { 30 + unsigned short battery_level_disksafe = 32 31 #if defined(IPOD_NANO) 33 - 3330 32 + 3330; 34 33 #elif defined(IPOD_VIDEO) 35 - 3500 34 + 3500; 36 35 #elif defined(IPOD_COLOR) 37 - 3300 36 + 3300; 38 37 #elif defined(IPOD_3G) 39 - 3700 38 + 3700; 40 39 #else 41 40 /* FIXME: calibrate value for other iPods */ 42 - 3300 41 + 3300; 43 42 #endif 44 - }; 45 43 46 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 47 - { 44 + unsigned short battery_level_shutoff = 48 45 #if defined(IPOD_NANO) 49 - 3230 46 + 3230; 50 47 #elif defined(IPOD_VIDEO) 51 - 3300 48 + 3300; 52 49 #elif defined(IPOD_COLOR) 53 - 3300 50 + 3300; 54 51 #elif defined(IPOD_3G) 55 - 3500 52 + 3500; 56 53 #else 57 54 /* FIXME: calibrate value for other iPods */ 58 - 3000 55 + 3000; 59 56 #endif 60 - }; 61 57 62 58 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 63 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 59 + unsigned short percent_to_volt_discharge[11] = 64 60 { 65 61 #if defined(IPOD_NANO) 66 62 /* measured values */ 67 - { 3230, 3620, 3700, 3730, 3750, 3780, 3830, 3890, 3950, 4030, 4160 }, 63 + 3230, 3620, 3700, 3730, 3750, 3780, 3830, 3890, 3950, 4030, 4160 68 64 #elif defined(IPOD_VIDEO) 69 65 /* iPod Video 30GB Li-Ion 400mAh */ 70 - { 3600, 3720, 3750, 3780, 3810, 3840, 3880, 3950, 4020, 4100, 4180 }, 66 + 3600, 3720, 3750, 3780, 3810, 3840, 3880, 3950, 4020, 4100, 4180 71 67 #elif defined(IPOD_COLOR) 72 68 /* iPod Photo 30GB, see FS#9072 */ 73 - { 3450, 3660, 3700, 3730, 3750, 3770, 3820, 3870, 3920, 4040, 4170 }, 69 + 3450, 3660, 3700, 3730, 3750, 3770, 3820, 3870, 3920, 4040, 4170 74 70 #elif defined(IPOD_3G) 75 71 /* iPod 3G 40GB, first approach based upon measurements */ 76 - { 3720, 3740, 3760, 3780, 3830, 3870, 3910, 3970, 4020, 4060, 4090 }, 72 + 3720, 3740, 3760, 3780, 3830, 3870, 3910, 3970, 4020, 4060, 4090 77 73 #else 78 74 /* FIXME: calibrate value for other iPods */ 79 75 /* Table is "provisional" from IPOD_COLOR */ 80 - { 3450, 3660, 3700, 3730, 3750, 3770, 3820, 3870, 3920, 4040, 4170 } 76 + 3450, 3660, 3700, 3730, 3750, 3770, 3820, 3870, 3920, 4040, 4170 81 77 #endif 82 78 }; 83 79
+6 -9
firmware/target/arm/iriver/h10/powermgmt-h10.c
··· 24 24 #include "adc.h" 25 25 #include "powermgmt.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 27 #if defined(IRIVER_H10) 30 - 3733 28 + unsigned short battery_level_disksafe = 3733; 31 29 #elif defined(IRIVER_H10_5GB) 32 - 3700 30 + unsigned short battery_level_disksafe = 3700; 33 31 #endif 34 - }; 35 32 36 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 + unsigned short battery_level_shutoff = 37 34 { 38 35 #if defined(IRIVER_H10) 39 36 3627 ··· 43 40 }; 44 41 45 42 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 46 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 43 + unsigned short percent_to_volt_discharge[11] = 47 44 { 48 45 #if defined(IRIVER_H10) 49 - { 3733, 3772, 3821, 3840, 3869, 3917, 3985, 4034, 4072, 4140, 4198 } 46 + 3733, 3772, 3821, 3840, 3869, 3917, 3985, 4034, 4072, 4140, 4198 50 47 #elif defined(IRIVER_H10_5GB) 51 - { 3700, 3800, 3850, 3880, 3910, 3960, 4000, 4070, 4120, 4210, 4280 } 48 + 3700, 3800, 3850, 3880, 3910, 3960, 4000, 4070, 4120, 4210, 4280 52 49 #endif 53 50 }; 54 51
+4 -10
firmware/target/arm/olympus/mrobe-100/powermgmt-mr100.c
··· 24 24 #include "adc.h" 25 25 #include "powermgmt.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3450 30 - }; 27 + unsigned short battery_level_disksafe = 3450; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3400 35 - }; 29 + unsigned short battery_level_shutoff = 3400; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 - { 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 }, 34 + 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 41 35 }; 42 36 43 37 #if CONFIG_CHARGING
+4 -10
firmware/target/arm/pbell/vibe500/powermgmt-vibe500.c
··· 25 25 #include "adc.h" 26 26 #include "powermgmt.h" 27 27 28 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 29 - { 30 - 3515 31 - }; 28 + unsigned short battery_level_disksafe = 3515; 32 29 33 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 34 - { 35 - 3486 36 - }; 30 + unsigned short battery_level_shutoff = 3486; 37 31 38 32 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 39 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 33 + unsigned short percent_to_volt_discharge[11] = 40 34 { 41 - { 3474, 3515, 3556, 3597, 3638, 3679, 3720, 3761, 3802, 3843, 3884 } 35 + 3474, 3515, 3556, 3597, 3638, 3679, 3720, 3761, 3802, 3843, 3884 42 36 }; 43 37 44 38 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/philips/hdd1630/powermgmt-hdd1630.c
··· 24 24 #include "adc.h" 25 25 #include "powermgmt.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3500 30 - }; 27 + unsigned short battery_level_disksafe = 3500; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3400 35 - }; 29 + unsigned short battery_level_shutoff = 3400; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 - { 3400, 3550, 3630, 3690 ,3730, 3770, 3810, 3850, 3890, 3930, 3980 }, 34 + 3400, 3550, 3630, 3690 ,3730, 3770, 3810, 3850, 3890, 3930, 3980 41 35 }; 42 36 43 37 #if CONFIG_CHARGING
+4 -10
firmware/target/arm/philips/hdd6330/powermgmt-hdd6330.c
··· 24 24 #include "adc.h" 25 25 #include "powermgmt.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3500 30 - }; 27 + unsigned short battery_level_disksafe = 3500; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3400 35 - }; 29 + unsigned short battery_level_shutoff = 3400; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 - { 3400, 3550, 3630, 3690 ,3730, 3770, 3810, 3850, 3890, 3930, 3980 }, 34 + 3400, 3550, 3630, 3690 ,3730, 3770, 3810, 3850, 3890, 3930, 3980 41 35 }; 42 36 43 37 #if CONFIG_CHARGING
+4 -10
firmware/target/arm/philips/sa9200/powermgmt-sa9200.c
··· 24 24 #include "adc.h" 25 25 #include "powermgmt.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3400 30 - }; 27 + unsigned short battery_level_disksafe = 3400; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3300 35 - }; 29 + unsigned short battery_level_shutoff = 3300; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 34 /* Sansa Li Ion 750mAH, took from battery benchs */ 41 - { 3300, 3680, 3740, 3760, 3780, 3810, 3870, 3930, 3970, 4070, 4160 }, 35 + 3300, 3680, 3740, 3760, 3780, 3810, 3870, 3930, 3970, 4070, 4160 42 36 }; 43 37 44 38 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -11
firmware/target/arm/rk27xx/hm60x/powermgmt-hm60x.c
··· 32 32 Charge curve have not been calibrated yet. 33 33 */ 34 34 35 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 36 - { 37 - /* TODO: this is just an initial guess */ 38 - 3350 39 - }; 35 + unsigned short battery_level_disksafe = 3350; /* TODO: this is just an initial guess */ 40 36 41 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 42 - { 43 - 3300 44 - }; 37 + unsigned short battery_level_shutoff = 3300; 45 38 46 39 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 47 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 40 + unsigned short percent_to_volt_discharge[11] = 48 41 { 49 42 /* Calibrated curve */ 50 - { 3300, 3468, 3521, 3562, 3609, 3644, 3691, 3767, 3837, 3919, 4100 } 43 + 3300, 3468, 3521, 3562, 3609, 3644, 3691, 3767, 3837, 3919, 4100 51 44 }; 52 45 53 46 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -11
firmware/target/arm/rk27xx/hm801/powermgmt-hm801.c
··· 31 31 Discharge and charge curves have not been calibrated yet. 32 32 */ 33 33 34 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 35 - { 36 - /* OF power off device when this value reached */ 37 - 430 38 - }; 34 + unsigned short battery_level_disksafe = 430; 39 35 40 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 41 - { 42 - 425 43 - }; 36 + unsigned short battery_level_shutoff = 425; /* OF power off device when this value reached */ 44 37 45 38 /* adc values of 0%, 10%, ... 100% when charging disabled */ 46 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 39 + unsigned short percent_to_volt_discharge[11] = 47 40 { 48 41 /* TODO: simple uncalibrated curve */ 49 - { 425, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520 } 42 + 425, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520 50 43 }; 51 44 52 45 /* adc values of 0%, 10%, ... 100% when charging enabled */
+4 -11
firmware/target/arm/rk27xx/ihifi/powermgmt-ihifi760.c
··· 32 32 Charge curve have not been calibrated yet. 33 33 */ 34 34 35 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 36 - { 37 - /* TODO: this is just an initial guess */ 38 - 3350, 39 - }; 35 + unsigned short battery_level_disksafe = 3350; /* TODO: this is just an initial guess */ 40 36 41 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 42 - { 43 - 3300, 44 - }; 37 + unsigned short battery_level_shutoff = 3300; 45 38 46 39 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 47 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 40 + unsigned short percent_to_volt_discharge[11] = 48 41 { 49 42 /* FIXME: Uncalibrated curve */ 50 - { 3300, 3350, 3433, 3516, 3600, 3683, 3767, 3850, 3933, 4017, 4100 } 43 + 3300, 3350, 3433, 3516, 3600, 3683, 3767, 3850, 3933, 4017, 4100 51 44 }; 52 45 53 46 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -11
firmware/target/arm/rk27xx/ihifi/powermgmt-ihifi960.c
··· 32 32 Charge curve have not been calibrated yet. 33 33 */ 34 34 35 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 36 - { 37 - /* TODO: this is just an initial guess */ 38 - 7050, 39 - }; 35 + unsigned short battery_level_disksafe = 7050; /* TODO: this is just an initial guess */ 40 36 41 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 42 - { 43 - 7000, 44 - }; 37 + unsigned short battery_level_shutoff = 7000; 45 38 46 39 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 47 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 40 + unsigned short percent_to_volt_discharge[11] = 48 41 { 49 42 /* FIXME: Uncalibrated curve */ 50 - { 7000, 7050, 7100, 7150, 7200, 7250, 7300, 7350, 7400, 7450, 7500 } 43 + 7000, 7050, 7100, 7150, 7200, 7250, 7300, 7350, 7400, 7450, 7500 51 44 }; 52 45 53 46 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -12
firmware/target/arm/rk27xx/ihifi2/powermgmt-ihifi770.c
··· 32 32 Charge curve have not been calibrated yet. 33 33 */ 34 34 35 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 36 - { 37 - /* 5% */ 38 - 3500, 39 - }; 35 + unsigned short battery_level_disksafe = 3500; /* 5% */ 40 36 41 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 42 - { 43 - /* 0% */ 44 - 3300, 45 - }; 37 + unsigned short battery_level_shutoff = 3300; /* 0% */ 46 38 47 39 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 48 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 40 + unsigned short percent_to_volt_discharge[11] = 49 41 { 50 - { 3300, 3570, 3660, 3696, 3712, 3742, 3798, 3865, 3935, 4020, 4130 } 42 + 3300, 3570, 3660, 3696, 3712, 3742, 3798, 3865, 3935, 4020, 4130 51 43 }; 52 44 53 45 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -12
firmware/target/arm/rk27xx/ihifi2/powermgmt-ihifi770c.c
··· 32 32 Charge curve have not been calibrated yet. 33 33 */ 34 34 35 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 36 - { 37 - /* 5% */ 38 - 3500, 39 - }; 35 + unsigned short battery_level_disksafe = 3500; /* 5% */ 40 36 41 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 42 - { 43 - /* 0% */ 44 - 3300, 45 - }; 37 + unsigned short battery_level_shutoff = 3300; /* 0% */ 46 38 47 39 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 48 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 40 + unsigned short percent_to_volt_discharge[11] = 49 41 { 50 - { 3300, 3570, 3660, 3696, 3712, 3742, 3798, 3865, 3935, 4020, 4130 } 42 + 3300, 3570, 3660, 3696, 3712, 3742, 3798, 3865, 3935, 4020, 4130 51 43 }; 52 44 53 45 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -12
firmware/target/arm/rk27xx/ihifi2/powermgmt-ihifi800.c
··· 32 32 Charge curve have not been calibrated yet. 33 33 */ 34 34 35 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 36 - { 37 - /* 5% */ 38 - 3628, 39 - }; 35 + unsigned short battery_level_disksafe = 3628; /* 5% */ 40 36 41 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 42 - { 43 - /* 0% */ 44 - 3300, 45 - }; 37 + unsigned short battery_level_shutoff = 3300; /* 0% */ 46 38 47 39 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 48 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 40 + unsigned short percent_to_volt_discharge[11] = 49 41 { 50 - { 3300, 3649, 3701, 3726, 3745, 3778, 3831, 3904, 3965, 4056, 4160 } 42 + 3300, 3649, 3701, 3726, 3745, 3778, 3831, 3904, 3965, 4056, 4160 51 43 }; 52 44 53 45 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -11
firmware/target/arm/rk27xx/ma/powermgmt-ma.c
··· 28 28 * Battery voltage calculation and discharge/charge curves for the HiFi E.T MA9. 29 29 */ 30 30 31 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 32 - { 33 - /* TODO: this is just an initial guess */ 34 - 6700 35 - }; 31 + unsigned short battery_level_disksafe = 6700; /* TODO: this is just an initial guess */ 36 32 37 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 38 - { 39 - 6600 40 - }; 33 + unsigned short battery_level_shutoff = 6600; 41 34 42 35 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 43 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 36 + unsigned short percent_to_volt_discharge[11] = 44 37 { 45 38 /* Uncalibrated curve */ 46 - { 6600, 6936, 7042, 7124, 7218, 7288, 7382, 7534, 7674, 7838, 8200 } 39 + 6600, 6936, 7042, 7124, 7218, 7288, 7382, 7534, 7674, 7838, 8200 47 40 }; 48 41 49 42 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -12
firmware/target/arm/rk27xx/rk27generic/powermgmt-rk27generic.c
··· 32 32 Discharge and charge curves have not been calibrated yet. 33 33 */ 34 34 35 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 36 - { 37 - /* TODO: this is just an initial guess */ 38 - 3400 39 - }; 35 + unsigned short battery_level_disksafe = 3400; /* TODO: this is just an initial guess */ 40 36 41 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 42 - { 43 - /* TODO: this is just an initial guess */ 44 - 3300 45 - }; 37 + unsigned short battery_level_shutoff = 3300; /* TODO: this is just an initial guess */ 46 38 47 39 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 48 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 40 + unsigned short percent_to_volt_discharge[11] = 49 41 { 50 42 /* TODO: simple uncalibrated curve, linear except for first 10% */ 51 - { 3300, 3600, 3665, 3730, 3795, 3860, 3925, 3990, 4055, 4120, 4185 } 43 + 3300, 3600, 3665, 3730, 3795, 3860, 3925, 3990, 4055, 4120, 4185 52 44 }; 53 45 54 46 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/s3c2440/gigabeat-fx/powermgmt-meg-fx.c
··· 25 25 #include "power.h" 26 26 #include "powermgmt.h" 27 27 28 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 29 - { 30 - 3450 31 - }; 28 + unsigned short battery_level_disksafe = 3450; 32 29 33 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 34 - { 35 - 3400 36 - }; 30 + unsigned short battery_level_shutoff = 3400; 37 31 38 32 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 39 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 33 + unsigned short percent_to_volt_discharge[11] = 40 34 { 41 35 /* Toshiba Gigabeat Li Ion 830mAH figured from discharge curve */ 42 - { 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 }, 36 + 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 43 37 }; 44 38 45 39 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/s3c2440/mini2440/powermgmt-mini2440.c
··· 25 25 #include "powermgmt.h" 26 26 27 27 /* The following constants are dummy values since there is no battery */ 28 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 29 - { 30 - 3450 31 - }; 28 + unsigned short battery_level_disksafe = 3450; 32 29 33 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 34 - { 35 - 3400 36 - }; 30 + unsigned short battery_level_shutoff = 3400; 37 31 38 32 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 39 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 33 + unsigned short percent_to_volt_discharge[11] = 40 34 { 41 35 /* Typical Li Ion 830mAH */ 42 - { 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 }, 36 + 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 43 37 }; 44 38 45 39 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/s5l8700/ipodnano2g/powermgmt-nano2g.c
··· 25 25 #include "power.h" 26 26 #include "audiohw.h" 27 27 28 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 29 - { 30 - 3600 31 - }; 28 + unsigned short battery_level_disksafe = 3600; 32 29 33 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 34 - { 35 - 3350 36 - }; 30 + unsigned short battery_level_shutoff = 3350; 37 31 38 32 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 39 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 33 + unsigned short percent_to_volt_discharge[11] = 40 34 { 41 - { 3550, 3783, 3830, 3882, 3911, 3949, 3996, 4067, 4148, 4228, 4310 } 35 + 3550, 3783, 3830, 3882, 3911, 3949, 3996, 4067, 4148, 4228, 4310 42 36 }; 43 37 44 38 #if CONFIG_CHARGING
+4 -12
firmware/target/arm/s5l8700/meizu-m3/powermgmt-m3.c
··· 32 32 Discharge and charge curves have not been calibrated yet. 33 33 */ 34 34 35 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 36 - { 37 - /* TODO: this is just an initial guess */ 38 - 3400 39 - }; 35 + unsigned short battery_level_disksafe = 3400; /* TODO: this is just an initial guess */ 40 36 41 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 42 - { 43 - /* TODO: this is just an initial guess */ 44 - 3300 45 - }; 37 + unsigned short battery_level_shutoff = 3300; /* TODO: this is just an initial guess */ 46 38 47 39 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 48 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 40 + unsigned short percent_to_volt_discharge[11] = 49 41 { 50 42 /* TODO: simple uncalibrated curve, linear except for first 10% */ 51 - { 3300, 3600, 3665, 3730, 3795, 3860, 3925, 3990, 4055, 4120, 4185 } 43 + 3300, 3600, 3665, 3730, 3795, 3860, 3925, 3990, 4055, 4120, 4185 52 44 }; 53 45 54 46 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -12
firmware/target/arm/s5l8700/meizu-m6sp/powermgmt-m6sp.c
··· 24 24 #include "adc.h" 25 25 #include "adc-target.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - /* TODO: this is just an initial guess */ 30 - 3400 31 - }; 27 + unsigned short battery_level_disksafe = 3400;/* TODO: this is just an initial guess */ 32 28 33 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 34 - { 35 - /* TODO: this is just an initial guess */ 36 - 3300 37 - }; 29 + unsigned short battery_level_shutoff = 3300; /* TODO: this is just an initial guess */ 38 30 39 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 40 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 41 33 { 42 34 /* TODO: simple uncalibrated curve, linear except for first 10% */ 43 - { 3300, 3390, 3480, 3570, 3660, 3750, 3840, 3930, 4020, 4110, 4200 } 35 + 3300, 3390, 3480, 3570, 3660, 3750, 3840, 3930, 4020, 4110, 4200 44 36 }; 45 37 46 38 #if CONFIG_CHARGING
+4 -10
firmware/target/arm/s5l8702/ipod6g/powermgmt-6g.c
··· 26 26 #include "audiohw.h" 27 27 #include "adc-target.h" 28 28 29 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 30 - { 31 - 3500 32 - }; 29 + unsigned short battery_level_disksafe = 3500; 33 30 34 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 35 - { 36 - 3300 37 - }; 31 + unsigned short battery_level_shutoff = 3300; 38 32 39 33 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 40 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 34 + unsigned short percent_to_volt_discharge[11] = 41 35 { 42 - { 3500, 3670, 3720, 3750, 3770, 3800, 3860, 3920, 3980, 4070, 4170 } 36 + 3500, 3670, 3720, 3750, 3770, 3800, 3860, 3920, 3980, 4070, 4170 43 37 }; 44 38 45 39 #if CONFIG_CHARGING
+4 -10
firmware/target/arm/samsung/yh820/powermgmt-yh820.c
··· 24 24 #include "adc.h" 25 25 #include "powermgmt.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3400 30 - }; 27 + unsigned short battery_level_disksafe = 3400; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3199 35 - }; 29 + unsigned short battery_level_shutoff = 3199; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 32 /* NOTE: readout clips at around 4000mV */ 39 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 33 + unsigned short percent_to_volt_discharge[11] = 40 34 { 41 - { 3199, 3492, 3543, 3601, 3626, 3651, 3702, 3769, 3794, 3865, 3995 } 35 + 3199, 3492, 3543, 3601, 3626, 3651, 3702, 3769, 3794, 3865, 3995 42 36 }; 43 37 44 38 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/samsung/yh920/powermgmt-yh920.c
··· 24 24 #include "adc.h" 25 25 #include "powermgmt.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3523 /* 5% */ 30 - }; 27 + unsigned short battery_level_disksafe = 3523; /* 5% */ 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3507 /* 3% */ 35 - }; 29 + unsigned short battery_level_shutoff = 3507; /* 3% */ 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 - { 3486, 3557, 3628, 3699, 3770, 3841, 3912, 3983, 4054, 4125, 4196 } 34 + 3486, 3557, 3628, 3699, 3770, 3841, 3912, 3983, 4054, 4125, 4196 41 35 }; 42 36 43 37 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/samsung/yh925/powermgmt-yh925.c
··· 24 24 #include "adc.h" 25 25 #include "powermgmt.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3659 30 - }; 27 + unsigned short battery_level_disksafe = 3659; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3609 35 - }; 29 + unsigned short battery_level_shutoff = 3609; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 - { 3609, 3731, 3789, 3818, 3855, 3885, 3933, 3995, 4050, 4132, 4216 } 34 + 3609, 3731, 3789, 3818, 3855, 3885, 3933, 3995, 4050, 4132, 4216 41 35 }; 42 36 43 37 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/sandisk/sansa-c200/powermgmt-c200.c
··· 23 23 #include "config.h" 24 24 #include "powermgmt.h" 25 25 26 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 27 - { 28 - 3400 29 - }; 26 + unsigned short battery_level_disksafe = 3400; 30 27 31 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 32 - { 33 - 3300 34 - }; 28 + unsigned short battery_level_shutoff = 3300; 35 29 36 30 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 37 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 31 + unsigned short percent_to_volt_discharge[11] = 38 32 { 39 33 40 34 /* Taken from BertrikSikken's bench on 2008-09-22 */ 41 - { 3400, 3689, 3744, 3773, 3798, 3831, 3886, 3947, 4005, 4102, 4220 }, 35 + 3400, 3689, 3744, 3773, 3798, 3831, 3886, 3947, 4005, 4102, 4220 42 36 }; 43 37 44 38 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/sandisk/sansa-e200/powermgmt-e200.c
··· 23 23 #include "config.h" 24 24 #include "powermgmt.h" 25 25 26 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 27 - { 28 - 3400 29 - }; 26 + unsigned short battery_level_disksafe = 3400; 30 27 31 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 32 - { 33 - 3300 34 - }; 28 + unsigned short battery_level_shutoff = 3300; 35 29 36 30 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 37 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 31 + unsigned short percent_to_volt_discharge[11] = 38 32 { 39 33 /* Sansa Li Ion 750mAH, took from battery benchs */ 40 - { 3300, 3680, 3740, 3760, 3780, 3810, 3870, 3930, 3970, 4070, 4160 }, 34 + 3300, 3680, 3740, 3760, 3780, 3810, 3870, 3930, 3970, 4070, 4160 41 35 }; 42 36 43 37 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/sandisk/sansa-view/powermgmt-view.c
··· 30 30 31 31 /* FIXME - next 4 functions taken from e200 - last 2 will need 32 32 to be updated */ 33 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 34 - { 35 - 3400 36 - }; 33 + unsigned short battery_level_disksafe = 3400; 37 34 38 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 39 - { 40 - 3300 41 - }; 35 + unsigned short battery_level_shutoff = 3300; 42 36 43 37 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 44 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 38 + unsigned short percent_to_volt_discharge[11] = 45 39 { 46 40 /* Sansa Li Ion 750mAH FIXME */ 47 - { 3300, 3680, 3740, 3760, 3780, 3810, 3870, 3930, 3970, 4070, 4160 }, 41 + 3300, 3680, 3740, 3760, 3780, 3810, 3870, 3930, 3970, 4070, 4160 48 42 }; 49 43 50 44 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/arm/tcc780x/cowond2/powermgmt-cowond2.c
··· 29 29 30 30 unsigned short current_voltage = 3910; 31 31 32 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 33 - { 34 - 3380 35 - }; 32 + unsigned short battery_level_disksafe = 3380; 36 33 37 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 38 - { 39 - 3300 40 - }; 34 + unsigned short battery_level_shutoff = 3300; 41 35 42 36 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 43 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 37 + unsigned short percent_to_volt_discharge[11] = 44 38 { 45 39 /* Standard D2 internal battery */ 46 - { 3370, 3690, 3750, 3775, 3790, 3820, 3880, 3940, 3980, 4090, 4170 } 40 + 3370, 3690, 3750, 3775, 3790, 3820, 3880, 3940, 3980, 4090, 4170 47 41 48 42 /* TODO: DIY replacements eg. Nokia BP-4L ? */ 49 43 };
+4 -10
firmware/target/arm/tms320dm320/creative-zvm/powermgmt-creativezvm.c
··· 27 27 /* THIS CONTAINS CURRENTLY DUMMY CODE! */ 28 28 29 29 static const unsigned short current_voltage = 3910; 30 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 31 - { 32 - 0 33 - }; 30 + unsigned short battery_level_disksafe = 0 34 31 35 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 36 - { 37 - 0 38 - }; 32 + unsigned short battery_level_shutoff = 0 39 33 40 34 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 41 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 35 + unsigned short percent_to_volt_discharge[11] = 42 36 { 43 - { 100, 300, 400, 500, 600, 700, 800, 900, 1000, 1200, 1320 }, 37 + 100, 300, 400, 500, 600, 700, 800, 900, 1000, 1200, 1320 44 38 }; 45 39 46 40 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+5 -11
firmware/target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c
··· 30 30 static unsigned short current_voltage = 4100; 31 31 32 32 /* This specifies the battery level that writes are still safe */ 33 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 34 - { 35 - 3600 36 - }; 33 + unsigned short battery_level_disksafe = 3600; 37 34 38 35 /* Below this the player cannot be considered to operate reliably */ 39 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 40 - { 41 - 3580 42 - }; 36 + unsigned short battery_level_shutoff = 3580; 43 37 44 38 /* Right now these are linear translations, it would be good to model them 45 39 * appropriate to the actual battery curve. ··· 48 42 /* 6.10 format */ 49 43 50 44 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 51 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 45 + unsigned short percent_to_volt_discharge[11] = 52 46 { 53 - { 3600, 3650, 3700, 3750, 3800, 3850, 3900, 3950, 4000, 4090, 4150 }, 47 + 3600, 3650, 3700, 3750, 3800, 3850, 3900, 3950, 4000, 4090, 4150 54 48 }; 55 49 56 50 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ 57 51 unsigned short percent_to_volt_charge[11] = 58 52 { 59 - 4000, 4105, 4210, 4315, 4420, 4525, 4630, 4735, 4840, 4945, 5050, 53 + 4000, 4105, 4210, 4315, 4420, 4525, 4630, 4735, 4840, 4945, 5050 60 54 }; 61 55 62 56 /* Returns battery voltage from ADC [millivolts] */
+4 -10
firmware/target/arm/tms320dm320/sansa-connect/power-sansaconnect.c
··· 32 32 #include "logf.h" 33 33 34 34 35 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 36 - { 37 - 3450 38 - }; 35 + unsigned short battery_level_disksafe = 3450; 39 36 40 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 41 - { 42 - 3400 43 - }; 37 + unsigned short battery_level_shutoff = 3400; 44 38 45 39 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 46 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 40 + unsigned short percent_to_volt_discharge[11] = 47 41 { 48 - { 3400, 3508, 3630, 3703, 3727, 3750, 3803, 3870, 3941, 4026, 4142 } 42 + 3400, 3508, 3630, 3703, 3727, 3750, 3803, 3870, 3941, 4026, 4142 49 43 }; 50 44 51 45 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/coldfire/iaudio/m3/powermgmt-m3.c
··· 23 23 #include "adc.h" 24 24 #include "powermgmt.h" 25 25 26 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 27 - { 28 - 3540 29 - }; 26 + unsigned short battery_level_disksafe = 3540; 30 27 31 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 32 - { 33 - 3500 34 - }; 28 + unsigned short battery_level_shutoff = 3500; 35 29 36 30 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 37 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 31 + unsigned short percent_to_volt_discharge[11] = 38 32 { 39 33 /* average measured values from X5 and M5L */ 40 - { 3500, 3650, 3720, 3740, 3760, 3790, 3840, 3900, 3950, 4040, 4120 } 34 + 3500, 3650, 3720, 3740, 3760, 3790, 3840, 3900, 3950, 4040, 4120 41 35 }; 42 36 43 37 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/coldfire/iaudio/powermgmt-iaudio.c
··· 24 24 #include "adc.h" 25 25 #include "powermgmt.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3540 30 - }; 27 + unsigned short battery_level_disksafe = 3540; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3500 35 - }; 29 + unsigned short battery_level_shutoff = 3500; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 34 /* average measured values from X5 and M5L */ 41 - { 3500, 3650, 3720, 3740, 3760, 3790, 3840, 3900, 3950, 4040, 4120 } 35 + 3500, 3650, 3720, 3740, 3760, 3790, 3840, 3900, 3950, 4040, 4120 42 36 }; 43 37 44 38 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/coldfire/iriver/h100/powermgmt-h100.c
··· 24 24 #include "adc.h" 25 25 #include "powermgmt.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3380 30 - }; 27 + unsigned short battery_level_disksafe = 3380; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3020 35 - }; 29 + unsigned short battery_level_shutoff = 3020; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 34 /* Below 3370 the backlight starts flickering during HD access */ 41 - { 3370, 3650, 3700, 3740, 3780, 3820, 3870, 3930, 4000, 4080, 4160 } 35 + 3370, 3650, 3700, 3740, 3780, 3820, 3870, 3930, 4000, 4080, 4160 42 36 }; 43 37 44 38 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/coldfire/iriver/h300/powermgmt-h300.c
··· 24 24 #include "adc.h" 25 25 #include "powermgmt.h" 26 26 27 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 28 - { 29 - 3380 30 - }; 27 + unsigned short battery_level_disksafe = 3380; 31 28 32 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 33 - { 34 - 3020 35 - }; 29 + unsigned short battery_level_shutoff = 3020; 36 30 37 31 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 38 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 32 + unsigned short percent_to_volt_discharge[11] = 39 33 { 40 34 /* Below 3370 the backlight starts flickering during HD access */ 41 - { 3370, 3650, 3700, 3740, 3780, 3820, 3870, 3930, 4000, 4080, 4160 } 35 + 3370, 3650, 3700, 3740, 3780, 3820, 3870, 3930, 4000, 4080, 4160 42 36 }; 43 37 44 38 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/coldfire/mpio/hd200/powermgmt-hd200.c
··· 23 23 #include "adc.h" 24 24 #include "powermgmt.h" 25 25 26 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 27 - { 28 - 3600 29 - }; 26 + unsigned short battery_level_disksafe = 3600; 30 27 31 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 32 - { 33 - 3500 34 - }; 28 + unsigned short battery_level_shutoff = 3500; 35 29 36 30 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 37 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 31 + unsigned short percent_to_volt_discharge[11] = 38 32 { 39 - { 3500, 3566, 3597, 3619, 3644, 3676, 3732, 3806, 3868, 3937, 4004 } 33 + 3500, 3566, 3597, 3619, 3644, 3676, 3732, 3806, 3868, 3937, 4004 40 34 }; 41 35 42 36 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/coldfire/mpio/hd300/powermgmt-hd300.c
··· 23 23 #include "adc.h" 24 24 #include "powermgmt.h" 25 25 26 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 27 - { 28 - 3600 29 - }; 26 + unsigned short battery_level_disksafe = 3600; 30 27 31 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 32 - { 33 - 3500 34 - }; 28 + unsigned short battery_level_shutoff = 3500; 35 29 36 30 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 37 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 31 + unsigned short percent_to_volt_discharge[11] = 38 32 { 39 - { 3500, 3583, 3603, 3620, 3656, 3694, 3747, 3800, 3855, 3934, 4007 } 33 + 3500, 3583, 3603, 3620, 3656, 3694, 3747, 3800, 3855, 3934, 4007 40 34 }; 41 35 42 36 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/hosted/agptek/powermgmt-agptek.c
··· 21 21 #include "power.h" 22 22 #include "power-agptek.h" 23 23 24 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 25 - { 26 - 3470 27 - }; 24 + unsigned short battery_level_disksafe = 3470; 28 25 29 26 /* the OF shuts down at this voltage */ 30 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 31 - { 32 - 3400 33 - }; 27 + unsigned short battery_level_shutoff = 3400; 34 28 35 29 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 36 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 30 + unsigned short percent_to_volt_discharge[11] = 37 31 { 38 - { 3400, 3675, 3715, 3750, 3775, 3810, 3850, 3915, 3985, 4060, 4155 } 32 + 3400, 3675, 3715, 3750, 3775, 3810, 3850, 3915, 3985, 4060, 4155 39 33 }; 40 34 41 35 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/hosted/aigo/powermgmt-erosq.c
··· 21 21 #include "power.h" 22 22 #include "power-erosq.h" 23 23 24 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 25 - { 26 - 3435 27 - }; 24 + unsigned short battery_level_disksafe = 3435; 28 25 29 26 /* the OF shuts down at this voltage */ 30 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 31 - { 32 - 3400 33 - }; 27 + unsigned short battery_level_shutoff = 3400; 34 28 35 29 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 36 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 30 + unsigned short percent_to_volt_discharge[11] = 37 31 { 38 32 /* ErosQ's 1300mAh battery */ 39 - { 3400, 3478, 3547, 3581, 3618, 3654, 3725, 3820, 3909, 3999, 4159 } 33 + 3400, 3478, 3547, 3581, 3618, 3654, 3725, 3820, 3909, 3999, 4159 40 34 }; 41 35 42 36 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/hosted/fiio/powermgmt-fiio.c
··· 21 21 #include "power.h" 22 22 #include "power-fiio.h" 23 23 24 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 25 - { 26 - 3470 27 - }; 24 + unsigned short battery_level_disksafe = 3470; 28 25 29 26 /* the OF shuts down at this voltage */ 30 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 31 - { 32 - 3400 33 - }; 27 + unsigned short battery_level_shutoff = 3400; 34 28 35 29 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 36 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 30 + unsigned short percent_to_volt_discharge[11] = 37 31 { 38 - { 3400, 3639, 3697, 3723, 3757, 3786, 3836, 3906, 3980, 4050, 4159 } 32 + 3400, 3639, 3697, 3723, 3757, 3786, 3836, 3906, 3980, 4050, 4159 39 33 }; 40 34 41 35 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -12
firmware/target/hosted/ibasso/powermgmt-ibasso.c
··· 35 35 /* Based on batterymonitor with PISEN and Samsung SIII battery. */ 36 36 37 37 38 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 39 - { 40 - 3600 41 - }; 42 - 43 - 44 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 45 - { 46 - 3500 47 - }; 38 + unsigned short battery_level_disksafe = 3600; 48 39 40 + unsigned short battery_level_shutoff = 3500; 49 41 50 42 /* 51 43 Averages at percent of running time from five measuremnts with PISEN and Samsung SIII battery ··· 55 47 < 3660 (0%), < 3730 (1% - 10%), < 3780 (11% - 20%), < 3830 (21% - 40%), < 3950 (41% - 60%), 56 48 < 4080 (61% - 80%), > 4081 (81% - 100%) 57 49 */ 58 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 50 + unsigned short percent_to_volt_discharge[11] = 59 51 { 60 - { 3522, 3660, 3720, 3752, 3784, 3827, 3896, 3978, 4072, 4168, 4255 } 52 + 3522, 3660, 3720, 3752, 3784, 3827, 3896, 3978, 4072, 4168, 4255 61 53 }; 62 54 63 55
+4 -10
firmware/target/hosted/samsungypr/ypr0/powermgmt-ypr0.c
··· 37 37 static int power_status = CHARGER_NOT_CONNECTED; 38 38 static int charging_status = BATT_NOT_CHARGING; 39 39 40 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 41 - { 42 - 3470 43 - }; 40 + unsigned short battery_level_disksafe = 3470; 44 41 45 42 /* the OF shuts down at this voltage */ 46 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 47 - { 48 - 3450 49 - }; 43 + unsigned short battery_level_shutoff = 3450; 50 44 51 45 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 52 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 46 + unsigned short percent_to_volt_discharge[11] = 53 47 { 54 - { 3450, 3502, 3550, 3587, 3623, 3669, 3742, 3836, 3926, 4026, 4200 } 48 + 3450, 3502, 3550, 3587, 3623, 3669, 3742, 3836, 3926, 4026, 4200 55 49 }; 56 50 57 51 #if CONFIG_CHARGING
+7 -18
firmware/target/hosted/samsungypr/ypr1/powermgmt-ypr1.c
··· 56 56 } 57 57 58 58 #if (CONFIG_BATTERY_MEASURE & VOLTAGE_MEASURE) == VOLTAGE_MEASURE 59 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 60 - { 61 - 3470 62 - }; 59 + unsigned short battery_level_disksafe = 3470; 63 60 64 61 /* the OF shuts down at this voltage */ 65 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 66 - { 67 - 3450 68 - }; 62 + unsigned short battery_level_shutoff = 3450; 69 63 70 64 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 71 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 65 + unsigned short percent_to_volt_discharge[11] = 72 66 { 73 - { 3450, 3502, 3550, 3587, 3623, 3669, 3742, 3836, 3926, 4026, 4200 } 67 + 3450, 3502, 3550, 3587, 3623, 3669, 3742, 3836, 3926, 4026, 4200 74 68 }; 75 69 #else /* FIX ME what level should disksafe be?*/ 76 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 77 - { 78 - }; 70 + unsigned short battery_level_disksafe = 0; 79 71 80 - /* the OF shuts down at this voltage */ 81 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 82 - { 83 - }; 72 + unsigned short battery_level_shutoff = 0; 84 73 85 74 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 86 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 75 + unsigned short percent_to_volt_discharge[11] = 87 76 { 88 77 }; 89 78 #endif
+4 -10
firmware/target/hosted/sonynwz/powermgmt-nwz.c
··· 21 21 #include "power.h" 22 22 #include "power-nwz.h" 23 23 24 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 25 - { 26 - 3470 27 - }; 24 + unsigned short battery_level_disksafe = 3470; 28 25 29 26 /* the OF shuts down at this voltage */ 30 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 31 - { 32 - 3450 33 - }; 27 + unsigned short battery_level_shutoff = 3450; 34 28 35 29 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 36 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 30 + unsigned short percent_to_volt_discharge[11] = 37 31 { 38 - { 3450, 3698, 3746, 3781, 3792, 3827, 3882, 3934, 3994, 4060, 4180 } 32 + 3450, 3698, 3746, 3781, 3792, 3827, 3882, 3934, 3994, 4060, 4180 39 33 }; 40 34 41 35 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/hosted/xduoo/powermgmt-xduoo.c
··· 21 21 #include "power.h" 22 22 #include "power-xduoo.h" 23 23 24 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 25 - { 26 - 3443 /* 5% */ 27 - }; 24 + unsigned short battery_level_disksafe = 3443; /* 5% */ 28 25 29 26 /* the OF shuts down at this voltage */ 30 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 31 - { 32 - 3400 33 - }; 27 + unsigned short battery_level_shutoff = 3400; /* 0% */ 34 28 35 29 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 36 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 30 + unsigned short percent_to_volt_discharge[11] = 37 31 { 38 - { 3400, 3498, 3560, 3592, 3624, 3672, 3753, 3840, 3937, 4047, 4189 } 32 + 3400, 3498, 3560, 3592, 3624, 3672, 3753, 3840, 3937, 4047, 4189 39 33 }; 40 34 41 35 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -11
firmware/target/mips/ingenic_jz47xx/onda_vx747/sadc-onda_vx747.c
··· 76 76 static struct mutex battery_mtx; 77 77 static struct semaphore battery_done; 78 78 79 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 80 - { 81 - 1600 82 - }; 79 + unsigned short battery_level_disksafe = 1600; 83 80 84 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 85 - { 86 - 1550 87 - }; 81 + unsigned short battery_level_shutoff = 1550; 88 82 89 83 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 90 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 84 + unsigned short percent_to_volt_discharge[11] = 91 85 { 92 - { 1550, 1790, 1810, 1825, 1855, 1865, 1875, 1900, 1930, 1985, 2200 }, 86 + 1550, 1790, 1810, 1825, 1855, 1865, 1875, 1900, 1930, 1985, 2200 93 87 }; 94 - 95 88 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ 96 89 unsigned short percent_to_volt_charge[11] = 97 90 {
+5 -14
firmware/target/mips/ingenic_jz47xx/onda_vx767/sadc-onda_vx767.c
··· 37 37 static volatile unsigned short bat_val; 38 38 static struct mutex battery_mtx; 39 39 40 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 41 - { 42 - /* TODO */ 43 - 1000 44 - }; 40 + unsigned short battery_level_disksafe = 1000; /* TODO */ 45 41 46 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 47 - { 48 - /* TODO */ 49 - 900 50 - }; 42 + unsigned short battery_level_shutoff = 900; /* TODO */ 51 43 52 44 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 53 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 45 + unsigned short percent_to_volt_discharge[11] = 54 46 { 55 - /* TODO */ 56 - { 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000 }, 47 + /* TODO */ 48 + 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000 57 49 }; 58 - 59 50 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ 60 51 unsigned short percent_to_volt_charge[11] = 61 52 {
+4 -16
firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c
··· 199 199 200 200 */ 201 201 202 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 203 - { 204 - /* 5% */ 205 - 3414, 3634 206 - }; 207 - 208 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 209 - { 210 - /* 0% */ 211 - 3307, 3307 212 - }; 202 + unsigned short battery_level_disksafe = 3634; /* 5% */ 203 + unsigned short battery_level_shutoff = 3307; 213 204 214 205 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 215 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 216 - { 217 - { 3307, 3459, 3530, 3575, 3608, 3648, 3723, 3819, 3918, 4022, 4162 }, 218 - { 3300, 3652, 3704, 3730, 3753, 3786, 3836, 3906, 3973, 4061, 4160 } 219 - }; 206 + unsigned short percent_to_volt_discharge[11] = 207 + { 3300, 3652, 3704, 3730, 3753, 3786, 3836, 3906, 3973, 4061, 4160 }; 220 208 221 209 #if CONFIG_CHARGING 222 210 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/mips/ingenic_x1000/erosqnative/power-erosqnative.c
··· 33 33 #include "i2c-x1000.h" 34 34 #include "devicedata.h" 35 35 36 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 37 - { 38 - 3470 39 - }; 36 + unsigned short battery_level_disksafe = 3470; 40 37 41 38 /* The OF shuts down at this voltage */ 42 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 43 - { 44 - 3400 45 - }; 39 + unsigned short battery_level_shutoff = 3400; 46 40 47 41 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 48 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 42 + unsigned short percent_to_volt_discharge[11] = 49 43 { 50 - { 3400, 3477, 3540, 3578, 3617, 3674, 3771, 3856, 3936, 4016, 4117 } 44 + 3400, 3477, 3540, 3578, 3617, 3674, 3771, 3856, 3936, 4016, 4117 51 45 }; 52 46 53 47 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c
··· 29 29 #include "axp-pmu.h" 30 30 #include "i2c-x1000.h" 31 31 32 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 33 - { 34 - 3470 35 - }; 32 + unsigned short battery_level_disksafe = 3470; 36 33 37 34 /* the OF shuts down at this voltage */ 38 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 39 - { 40 - 3400 41 - }; 35 + unsigned short battery_level_shutoff = 3400; 42 36 43 37 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 44 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 38 + unsigned short percent_to_volt_discharge[11] = 45 39 { 46 - { 3400, 3639, 3697, 3723, 3757, 3786, 3836, 3906, 3980, 4050, 4159 } 40 + 3400, 3639, 3697, 3723, 3757, 3786, 3836, 3906, 3980, 4050, 4159 47 41 }; 48 42 49 43 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
+4 -10
firmware/target/mips/ingenic_x1000/shanlingq1/power-shanlingq1.c
··· 47 47 * devices is getting confused. 48 48 */ 49 49 50 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = 51 - { 52 - 3470 53 - }; 50 + unsigned short battery_level_disksafe = 3470; 54 51 55 52 /* the OF shuts down at this voltage */ 56 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 57 - { 58 - 3400 59 - }; 53 + unsigned short battery_level_shutoff = 3400; 60 54 61 55 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 62 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 56 + unsigned short percent_to_volt_discharge[11] = 63 57 { 64 - { 3400, 3639, 3697, 3723, 3757, 3786, 3836, 3906, 3980, 4050, 4159 } 58 + 3400, 3639, 3697, 3723, 3757, 3786, 3836, 3906, 3980, 4050, 4159 65 59 }; 66 60 67 61 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
-3
manual/appendix/config_file_options.tex
··· 87 87 brightness & \fixme{devise a way to get ranges from config-*.h} & N/A\\ 88 88 disk spindown & 3 to 254 & s\\ 89 89 battery capacity & \fixme{devise a way to get ranges from config-*.h} & mAh\\ 90 - \opt{battery_types}{ 91 - battery type & alkaline, nimh & N/A\\ 92 - } 93 90 \opt{HAVE_CAR_ADAPTER_MODE}{ 94 91 car adapter mode & on, off & N/A\\ 95 92 }
-7
manual/configure_rockbox/system_options.tex
··· 44 44 \opt{ipod,sansa}{This value is fairly meaningless in the \playerman{} 45 45 family at present, and work is on-going into finding a better way to 46 46 determine battery life.} 47 - 48 - \opt{battery_types}{ 49 - \item [Battery Type.] This setting tells Rockbox which type of battery 50 - is currently used in the \dap{}. 51 - \nopt{xduoox3}{The two supported battery types are ``Alkaline'' or ``NiMH''.} 52 - \opt{xduoox3}{Older \playerman{} \playertype{} units shipped with a 1500mAh battery, while newer units ships with a 2000mAh battery. If you are not sure which type you have, older units have a button marked ``ESC''.} 53 - } 54 47 } 55 48 56 49 \opt{usb_charging_enable}{
+4 -4
uisimulator/common/powermgmt-sim.c
··· 102 102 batt_current = charging ? BATT_CHARGE_STEP : BATT_DISCHARGE_STEP; 103 103 } 104 104 105 - unsigned short battery_level_disksafe[BATTERY_TYPES_COUNT] = { 3200 }; 106 - unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = { 3200 }; 105 + unsigned short battery_level_disksafe = 3200; 106 + unsigned short battery_level_shutoff = 3200; 107 107 108 108 /* make the simulated curve nicely linear */ 109 - unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 110 - { { 3300, 3400, 3500, 3600, 3700, 3800, 3900, 4000, 4100, 4200, 4300 } }; 109 + unsigned short percent_to_volt_discharge[11] = 110 + { 3300, 3400, 3500, 3600, 3700, 3800, 3900, 4000, 4100, 4200, 4300 }; 111 111 unsigned short percent_to_volt_charge[11] = 112 112 { 3300, 3400, 3500, 3600, 3700, 3800, 3900, 4000, 4100, 4200, 4300 }; 113 113