diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/adc.h | 6 | ||||
-rw-r--r-- | firmware/drivers/i2c.c | 4 | ||||
-rw-r--r-- | firmware/drivers/mas.h | 2 | ||||
-rw-r--r-- | firmware/drivers/power.c | 4 |
4 files changed, 5 insertions, 11 deletions
diff --git a/firmware/drivers/adc.h b/firmware/drivers/adc.h index 9c90cb08a7..f04ab4466d 100644 --- a/firmware/drivers/adc.h +++ b/firmware/drivers/adc.h | |||
@@ -38,12 +38,6 @@ | |||
38 | #define ADC_UNREG_POWER 6 /* Battery voltage with a better scaling */ | 38 | #define ADC_UNREG_POWER 6 /* Battery voltage with a better scaling */ |
39 | #define ADC_EXT_POWER 7 /* The external power voltage, V=X*0.0148 */ | 39 | #define ADC_EXT_POWER 7 /* The external power voltage, V=X*0.0148 */ |
40 | 40 | ||
41 | #ifdef ARCHOS_RECORDER | ||
42 | #define BATTERY_SCALE_FACTOR 6465 | ||
43 | #else | ||
44 | #define BATTERY_SCALE_FACTOR 6546 | ||
45 | #endif | ||
46 | |||
47 | #define EXT_SCALE_FACTOR 14800 | 41 | #define EXT_SCALE_FACTOR 14800 |
48 | 42 | ||
49 | unsigned short adc_read(int channel); | 43 | unsigned short adc_read(int channel); |
diff --git a/firmware/drivers/i2c.c b/firmware/drivers/i2c.c index ccd11e01de..97d7a511e1 100644 --- a/firmware/drivers/i2c.c +++ b/firmware/drivers/i2c.c | |||
@@ -124,7 +124,7 @@ int i2c_getack(void) | |||
124 | low until it is ready. We need to poll the clock line until it goes | 124 | low until it is ready. We need to poll the clock line until it goes |
125 | high before we read the ack. */ | 125 | high before we read the ack. */ |
126 | 126 | ||
127 | #ifndef ARCHOS_RECORDER | 127 | #ifdef HAVE_I2C_LOW_FIRST |
128 | SDA_LO; /* First, discharge the data line */ | 128 | SDA_LO; /* First, discharge the data line */ |
129 | #endif | 129 | #endif |
130 | SDA_INPUT; /* And set to input */ | 130 | SDA_INPUT; /* And set to input */ |
@@ -167,7 +167,7 @@ unsigned char i2c_inb(int ack) | |||
167 | 167 | ||
168 | /* clock in each bit, MSB first */ | 168 | /* clock in each bit, MSB first */ |
169 | for ( i=0x80; i; i>>=1 ) { | 169 | for ( i=0x80; i; i>>=1 ) { |
170 | #ifndef ARCHOS_RECORDER | 170 | #ifdef HAVE_I2C_LOW_FIRST |
171 | /* Tricky business. Here we discharge the data line by driving it low | 171 | /* Tricky business. Here we discharge the data line by driving it low |
172 | and then set it to input to see if it stays low or goes high */ | 172 | and then set it to input to see if it stays low or goes high */ |
173 | SDA_LO; /* First, discharge the data line */ | 173 | SDA_LO; /* First, discharge the data line */ |
diff --git a/firmware/drivers/mas.h b/firmware/drivers/mas.h index fec0c36ed7..573b9b6b37 100644 --- a/firmware/drivers/mas.h +++ b/firmware/drivers/mas.h | |||
@@ -27,7 +27,7 @@ | |||
27 | /* | 27 | /* |
28 | MAS I2C defs | 28 | MAS I2C defs |
29 | */ | 29 | */ |
30 | #ifdef ARCHOS_RECORDER | 30 | #ifdef HAVE_MAS3587F |
31 | #define MAS_ADR 0x3c | 31 | #define MAS_ADR 0x3c |
32 | #define MAS_DEV_WRITE (MAS_ADR | 0x00) | 32 | #define MAS_DEV_WRITE (MAS_ADR | 0x00) |
33 | #define MAS_DEV_READ (MAS_ADR | 0x01) | 33 | #define MAS_DEV_READ (MAS_ADR | 0x01) |
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c index bb0ec80942..4d8b1cabb8 100644 --- a/firmware/drivers/power.c +++ b/firmware/drivers/power.c | |||
@@ -59,7 +59,7 @@ void charger_enable(bool on) | |||
59 | 59 | ||
60 | void ide_power_enable(bool on) | 60 | void ide_power_enable(bool on) |
61 | { | 61 | { |
62 | #ifdef ARCHOS_RECORDER | 62 | #ifdef HAVE_ATA_POWER_OFF |
63 | if(on) | 63 | if(on) |
64 | PADR |= 0x20; | 64 | PADR |= 0x20; |
65 | else | 65 | else |
@@ -72,7 +72,7 @@ void ide_power_enable(bool on) | |||
72 | void power_off(void) | 72 | void power_off(void) |
73 | { | 73 | { |
74 | set_irq_level(15); | 74 | set_irq_level(15); |
75 | #ifdef ARCHOS_RECORDER | 75 | #ifdef HAVE_POWEROFF_ON_PBDR |
76 | PBDR &= ~PBDR_BTN_OFF; | 76 | PBDR &= ~PBDR_BTN_OFF; |
77 | PBIOR |= PBDR_BTN_OFF; | 77 | PBIOR |= PBDR_BTN_OFF; |
78 | #else | 78 | #else |