diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/config-fmrecorder.h | 8 | ||||
-rw-r--r-- | firmware/export/config-h100.h | 5 | ||||
-rw-r--r-- | firmware/export/config-ondiofm.h | 3 | ||||
-rw-r--r-- | firmware/export/config-ondiosp.h | 3 | ||||
-rw-r--r-- | firmware/export/config-player.h | 5 | ||||
-rw-r--r-- | firmware/export/config-recorder.h | 5 | ||||
-rw-r--r-- | firmware/export/config-recorderv2.h | 8 | ||||
-rw-r--r-- | firmware/export/config.h | 5 | ||||
-rw-r--r-- | firmware/export/powermgmt.h | 4 |
9 files changed, 33 insertions, 13 deletions
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index af7ca91315..8d3f1a1051 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h | |||
@@ -25,9 +25,6 @@ | |||
25 | /* Define this if you have a FM Recorder key system */ | 25 | /* Define this if you have a FM Recorder key system */ |
26 | #define HAVE_FMADC 1 | 26 | #define HAVE_FMADC 1 |
27 | 27 | ||
28 | /* Define this if you have a LiIon battery */ | ||
29 | #define HAVE_LIION | ||
30 | |||
31 | /* Define this if you need to power on ATA */ | 28 | /* Define this if you need to power on ATA */ |
32 | #define NEEDS_ATA_POWER_ON | 29 | #define NEEDS_ATA_POWER_ON |
33 | 30 | ||
@@ -37,6 +34,9 @@ | |||
37 | /* Define this to the CPU frequency */ | 34 | /* Define this to the CPU frequency */ |
38 | #define CPU_FREQ 11059200 | 35 | #define CPU_FREQ 11059200 |
39 | 36 | ||
37 | /* Type of mobile power */ | ||
38 | #define CONFIG_BATTERY BATT_LIION2200 | ||
39 | |||
40 | /* Battery scale factor (guessed, seems to be 1,25 * value from recorder) */ | 40 | /* Battery scale factor (guessed, seems to be 1,25 * value from recorder) */ |
41 | #define BATTERY_SCALE_FACTOR 8081 | 41 | #define BATTERY_SCALE_FACTOR 8081 |
42 | 42 | ||
@@ -61,7 +61,7 @@ | |||
61 | /* How to detect USB */ | 61 | /* How to detect USB */ |
62 | #define USB_FMRECORDERSTYLE 1 | 62 | #define USB_FMRECORDERSTYLE 1 |
63 | 63 | ||
64 | /* Define this if the platform has batteries */ | 64 | /* Define this if the platform can charge batteries */ |
65 | #define HAVE_BATTERIES 1 | 65 | #define HAVE_BATTERIES 1 |
66 | 66 | ||
67 | /* The start address index for ROM builds */ | 67 | /* The start address index for ROM builds */ |
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h index 343fc89b42..a3e982a062 100644 --- a/firmware/export/config-h100.h +++ b/firmware/export/config-h100.h | |||
@@ -16,7 +16,10 @@ | |||
16 | /* Define this if you have a Motorola SCF5249 */ | 16 | /* Define this if you have a Motorola SCF5249 */ |
17 | #define CONFIG_CPU MCF5249 | 17 | #define CONFIG_CPU MCF5249 |
18 | 18 | ||
19 | /* Define this if the platform has batteries */ | 19 | /* Type of mobile power, FIXME: probably different, make new type */ |
20 | #define CONFIG_BATTERY BATT_LIION2200 | ||
21 | |||
22 | /* Define this if the platform can charge batteries */ | ||
20 | #define HAVE_BATTERIES 1 | 23 | #define HAVE_BATTERIES 1 |
21 | 24 | ||
22 | /* The start address index for ROM builds */ | 25 | /* The start address index for ROM builds */ |
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h index f7d9a8f33f..f7cff94f5e 100644 --- a/firmware/export/config-ondiofm.h +++ b/firmware/export/config-ondiofm.h | |||
@@ -22,6 +22,9 @@ | |||
22 | /* Define this to the CPU frequency */ | 22 | /* Define this to the CPU frequency */ |
23 | #define CPU_FREQ 12000000 | 23 | #define CPU_FREQ 12000000 |
24 | 24 | ||
25 | /* Type of mobile power */ | ||
26 | #define CONFIG_BATTERY BATT_3AAA_ALKALINE | ||
27 | |||
25 | /* Battery scale factor (measured from Jörg's FM) */ | 28 | /* Battery scale factor (measured from Jörg's FM) */ |
26 | #define BATTERY_SCALE_FACTOR 4785 /* 4.890V read as 0x3FE */ | 29 | #define BATTERY_SCALE_FACTOR 4785 /* 4.890V read as 0x3FE */ |
27 | 30 | ||
diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h index b4c9f0d572..111787ffc9 100644 --- a/firmware/export/config-ondiosp.h +++ b/firmware/export/config-ondiosp.h | |||
@@ -19,6 +19,9 @@ | |||
19 | /* Define this to the CPU frequency */ | 19 | /* Define this to the CPU frequency */ |
20 | #define CPU_FREQ 12000000 | 20 | #define CPU_FREQ 12000000 |
21 | 21 | ||
22 | /* Type of mobile power */ | ||
23 | #define CONFIG_BATTERY BATT_3AAA_ALKALINE | ||
24 | |||
22 | /* Battery scale factor (measured from Jörg's FM) */ | 25 | /* Battery scale factor (measured from Jörg's FM) */ |
23 | #define BATTERY_SCALE_FACTOR 4785 /* 4.890V read as 0x3FE */ | 26 | #define BATTERY_SCALE_FACTOR 4785 /* 4.890V read as 0x3FE */ |
24 | 27 | ||
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index 8bd63c42e6..d457ef40fd 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h | |||
@@ -22,6 +22,9 @@ | |||
22 | /* Define this to the CPU frequency */ | 22 | /* Define this to the CPU frequency */ |
23 | #define CPU_FREQ 12000000 /* cycle time ~83.3ns */ | 23 | #define CPU_FREQ 12000000 /* cycle time ~83.3ns */ |
24 | 24 | ||
25 | /* Type of mobile power */ | ||
26 | #define CONFIG_BATTERY BATT_4AA_NIMH | ||
27 | |||
25 | /* Battery scale factor (?) */ | 28 | /* Battery scale factor (?) */ |
26 | #define BATTERY_SCALE_FACTOR 6546 | 29 | #define BATTERY_SCALE_FACTOR 6546 |
27 | 30 | ||
@@ -44,7 +47,7 @@ | |||
44 | /* How to detect USB */ | 47 | /* How to detect USB */ |
45 | #define USB_PLAYERSTYLE 1 | 48 | #define USB_PLAYERSTYLE 1 |
46 | 49 | ||
47 | /* Define this if the platform has batteries */ | 50 | /* Define this if the platform can charge batteries */ |
48 | #define HAVE_BATTERIES 1 | 51 | #define HAVE_BATTERIES 1 |
49 | 52 | ||
50 | /* Define this for programmable LED available */ | 53 | /* Define this for programmable LED available */ |
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index 89e19f32f6..1e90a05248 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h | |||
@@ -34,6 +34,9 @@ | |||
34 | /* Define this to the CPU frequency */ | 34 | /* Define this to the CPU frequency */ |
35 | #define CPU_FREQ 11059200 | 35 | #define CPU_FREQ 11059200 |
36 | 36 | ||
37 | /* Type of mobile power */ | ||
38 | #define CONFIG_BATTERY BATT_4AA_NIMH | ||
39 | |||
37 | /* Battery scale factor (?) */ | 40 | /* Battery scale factor (?) */ |
38 | #define BATTERY_SCALE_FACTOR 6465 | 41 | #define BATTERY_SCALE_FACTOR 6465 |
39 | 42 | ||
@@ -52,7 +55,7 @@ | |||
52 | /* How to detect USB */ | 55 | /* How to detect USB */ |
53 | #define USB_RECORDERSTYLE 1 | 56 | #define USB_RECORDERSTYLE 1 |
54 | 57 | ||
55 | /* Define this if the platform has batteries */ | 58 | /* Define this if the platform can charge batteries */ |
56 | #define HAVE_BATTERIES 1 | 59 | #define HAVE_BATTERIES 1 |
57 | 60 | ||
58 | /* The start address index for ROM builds */ | 61 | /* The start address index for ROM builds */ |
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index 56967cfa10..b676a180ed 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h | |||
@@ -25,9 +25,6 @@ | |||
25 | /* Define this if you have a FM Recorder key system */ | 25 | /* Define this if you have a FM Recorder key system */ |
26 | #define HAVE_FMADC 1 | 26 | #define HAVE_FMADC 1 |
27 | 27 | ||
28 | /* Define this if you have a LiIon battery */ | ||
29 | #define HAVE_LIION | ||
30 | |||
31 | /* Define this if you need to power on ATA */ | 28 | /* Define this if you need to power on ATA */ |
32 | #define NEEDS_ATA_POWER_ON | 29 | #define NEEDS_ATA_POWER_ON |
33 | 30 | ||
@@ -37,6 +34,9 @@ | |||
37 | /* Define this to the CPU frequency */ | 34 | /* Define this to the CPU frequency */ |
38 | #define CPU_FREQ 11059200 | 35 | #define CPU_FREQ 11059200 |
39 | 36 | ||
37 | /* Type of mobile power */ | ||
38 | #define CONFIG_BATTERY BATT_LIION2200 | ||
39 | |||
40 | /* Battery scale factor (guessed, seems to be 1,25 * value from recorder) */ | 40 | /* Battery scale factor (guessed, seems to be 1,25 * value from recorder) */ |
41 | #define BATTERY_SCALE_FACTOR 8081 | 41 | #define BATTERY_SCALE_FACTOR 8081 |
42 | 42 | ||
@@ -61,7 +61,7 @@ | |||
61 | /* How to detect USB */ | 61 | /* How to detect USB */ |
62 | #define USB_FMRECORDERSTYLE 1 | 62 | #define USB_FMRECORDERSTYLE 1 |
63 | 63 | ||
64 | /* Define this if the platform has batteries */ | 64 | /* Define this if the platform can charge batteries */ |
65 | #define HAVE_BATTERIES 1 | 65 | #define HAVE_BATTERIES 1 |
66 | 66 | ||
67 | /* The start address index for ROM builds */ | 67 | /* The start address index for ROM builds */ |
diff --git a/firmware/export/config.h b/firmware/export/config.h index fd757b1ab1..76a2bd9316 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -40,6 +40,11 @@ | |||
40 | #define RECORDER_PAD 1 | 40 | #define RECORDER_PAD 1 |
41 | #define ONDIO_PAD 2 | 41 | #define ONDIO_PAD 2 |
42 | 42 | ||
43 | /* CONFIG_BATTERY */ | ||
44 | #define BATT_LIION2200 2200 /* FM/V2 recorder type */ | ||
45 | #define BATT_4AA_NIMH 1500 | ||
46 | #define BATT_3AAA_ALKALINE 1000 | ||
47 | |||
43 | /* now go and pick yours */ | 48 | /* now go and pick yours */ |
44 | #if defined(ARCHOS_PLAYER) | 49 | #if defined(ARCHOS_PLAYER) |
45 | #include "config-player.h" | 50 | #include "config-player.h" |
diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h index eb0ba29f28..1a54006a7d 100644 --- a/firmware/export/powermgmt.h +++ b/firmware/export/powermgmt.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #ifndef _POWERMGMT_H_ | 19 | #ifndef _POWERMGMT_H_ |
20 | #define _POWERMGMT_H_ | 20 | #define _POWERMGMT_H_ |
21 | 21 | ||
22 | #ifdef HAVE_LIION /* FM Recorder, LiIon */ | 22 | #if CONFIG_BATTERY == BATT_LIION2200 /* FM Recorder, LiIon */ |
23 | #define BATTERY_LEVEL_SHUTDOWN 260 /* 2.60V */ | 23 | #define BATTERY_LEVEL_SHUTDOWN 260 /* 2.60V */ |
24 | #define BATTERY_LEVEL_EMPTY 265 /* 2.65V */ | 24 | #define BATTERY_LEVEL_EMPTY 265 /* 2.65V */ |
25 | #define BATTERY_LEVEL_DANGEROUS 280 /* 2.80V */ | 25 | #define BATTERY_LEVEL_DANGEROUS 280 /* 2.80V */ |
@@ -71,7 +71,7 @@ extern int trickle_sec; /* trickle charge: How many seconds per minute | |||
71 | 71 | ||
72 | #endif /* HAVE_CHARGE_CTRL */ | 72 | #endif /* HAVE_CHARGE_CTRL */ |
73 | 73 | ||
74 | #if defined(HAVE_CHARGE_CTRL) || defined(HAVE_LIION) | 74 | #if defined(HAVE_CHARGE_CTRL) || CONFIG_BATTERY == BATT_LIION2200 |
75 | extern int charge_state; /* tells what the charger is doing (for info display): 0: decharging/charger off, 1: charge, 2: top-off, 3: trickle */ | 75 | extern int charge_state; /* tells what the charger is doing (for info display): 0: decharging/charger off, 1: charge, 2: top-off, 3: trickle */ |
76 | #endif | 76 | #endif |
77 | 77 | ||