From 2cf3b5dfd6abb92cddde6a0025b6f4557201f091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Sat, 27 Apr 2002 20:14:01 +0000 Subject: Adapted to changed led API git-svn-id: svn://svn.rockbox.org/rockbox/trunk@272 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/ata.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'firmware/drivers') 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; -- cgit v1.2.3