diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-04-27 20:14:01 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-04-27 20:14:01 +0000 |
commit | 2cf3b5dfd6abb92cddde6a0025b6f4557201f091 (patch) | |
tree | 98b54ac9ef93996b11005436ec9ea638e0acda0f | |
parent | 0ea9f3772ae6d398225bd17ce115a9452e888773 (diff) | |
download | rockbox-2cf3b5dfd6abb92cddde6a0025b6f4557201f091.tar.gz rockbox-2cf3b5dfd6abb92cddde6a0025b6f4557201f091.zip |
Adapted to changed led API
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@272 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/drivers/ata.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 24abecdb5c..fa51259d99 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include "ata.h" | 19 | #include "ata.h" |
20 | #include "kernel.h" | 20 | #include "kernel.h" |
21 | #include "led.h" | 21 | #include "led.h" |
22 | #include "sh7034.h" | ||
23 | #include "system.h" | ||
22 | 24 | ||
23 | #define ATA_DATA (*((volatile unsigned short*)0x06104100)) | 25 | #define ATA_DATA (*((volatile unsigned short*)0x06104100)) |
24 | #define ATA_ERROR (*((volatile unsigned char*)0x06100101)) | 26 | #define ATA_ERROR (*((volatile unsigned char*)0x06100101)) |
@@ -92,7 +94,7 @@ int ata_read_sectors(unsigned long start, | |||
92 | if (!wait_for_rdy()) | 94 | if (!wait_for_rdy()) |
93 | return 0; | 95 | return 0; |
94 | 96 | ||
95 | led_turn_on(); | 97 | led(TRUE); |
96 | 98 | ||
97 | ATA_NSECTOR = count; | 99 | ATA_NSECTOR = count; |
98 | ATA_SECTOR = start & 0xff; | 100 | ATA_SECTOR = start & 0xff; |
@@ -115,11 +117,12 @@ int ata_read_sectors(unsigned long start, | |||
115 | #endif | 117 | #endif |
116 | } | 118 | } |
117 | 119 | ||
118 | led_turn_off(); | 120 | led(FALSE); |
119 | 121 | ||
120 | return wait_for_end_of_transfer(); | 122 | return wait_for_end_of_transfer(); |
121 | } | 123 | } |
122 | 124 | ||
125 | #ifdef DISK_WRITE | ||
123 | int ata_write_sectors(unsigned long start, | 126 | int ata_write_sectors(unsigned long start, |
124 | unsigned char count, | 127 | unsigned char count, |
125 | void* buf) | 128 | void* buf) |
@@ -129,7 +132,7 @@ int ata_write_sectors(unsigned long start, | |||
129 | if (!wait_for_rdy()) | 132 | if (!wait_for_rdy()) |
130 | return 0; | 133 | return 0; |
131 | 134 | ||
132 | led_turn_on (); | 135 | led(TRUE); |
133 | 136 | ||
134 | ATA_NSECTOR = count; | 137 | ATA_NSECTOR = count; |
135 | ATA_SECTOR = start & 0xff; | 138 | ATA_SECTOR = start & 0xff; |
@@ -152,10 +155,11 @@ int ata_write_sectors(unsigned long start, | |||
152 | #endif | 155 | #endif |
153 | } | 156 | } |
154 | 157 | ||
155 | led_turn_off (); | 158 | led(FALSE); |
156 | 159 | ||
157 | return wait_for_end_of_transfer(); | 160 | return wait_for_end_of_transfer(); |
158 | } | 161 | } |
162 | #endif | ||
159 | 163 | ||
160 | static int check_registers(void) | 164 | static int check_registers(void) |
161 | { | 165 | { |
@@ -250,7 +254,7 @@ int ata_soft_reset(void) | |||
250 | 254 | ||
251 | int ata_init(void) | 255 | int ata_init(void) |
252 | { | 256 | { |
253 | led_turn_off(); | 257 | led(FALSE); |
254 | 258 | ||
255 | /* activate ATA */ | 259 | /* activate ATA */ |
256 | PADR |= 0x80; | 260 | PADR |= 0x80; |