summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-04-27 20:14:01 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-04-27 20:14:01 +0000
commit2cf3b5dfd6abb92cddde6a0025b6f4557201f091 (patch)
tree98b54ac9ef93996b11005436ec9ea638e0acda0f /firmware/drivers
parent0ea9f3772ae6d398225bd17ce115a9452e888773 (diff)
Adapted to changed led API
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@272 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/ata.c14
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 @@
#include "ata.h"
#include "kernel.h"
#include "led.h"
+#include "sh7034.h"
+#include "system.h"
#define ATA_DATA (*((volatile unsigned short*)0x06104100))
#define ATA_ERROR (*((volatile unsigned char*)0x06100101))
@@ -92,7 +94,7 @@ int ata_read_sectors(unsigned long start,
if (!wait_for_rdy())
return 0;
- led_turn_on();
+ led(TRUE);
ATA_NSECTOR = count;
ATA_SECTOR = start & 0xff;
@@ -115,11 +117,12 @@ int ata_read_sectors(unsigned long start,
#endif
}
- led_turn_off();
+ led(FALSE);
return wait_for_end_of_transfer();
}
+#ifdef DISK_WRITE
int ata_write_sectors(unsigned long start,
unsigned char count,
void* buf)
@@ -129,7 +132,7 @@ int ata_write_sectors(unsigned long start,
if (!wait_for_rdy())
return 0;
- led_turn_on ();
+ led(TRUE);
ATA_NSECTOR = count;
ATA_SECTOR = start & 0xff;
@@ -152,10 +155,11 @@ int ata_write_sectors(unsigned long start,
#endif
}
- led_turn_off ();
+ led(FALSE);
return wait_for_end_of_transfer();
}
+#endif
static int check_registers(void)
{
@@ -250,7 +254,7 @@ int ata_soft_reset(void)
int ata_init(void)
{
- led_turn_off();
+ led(FALSE);
/* activate ATA */
PADR |= 0x80;