Primitie listing rootdir of FAT16 filesystem
This commit is contained in:
@ -128,7 +128,7 @@ void ATA_DEVICE::Read(uint16_t DEVICE_CHANNEL, DEVICE_DRIVE drive, uint32_t LBA
|
||||
return ;
|
||||
}
|
||||
|
||||
printf("Read LBA: 0x%x\n", LBA);
|
||||
//printf("Read LBA: 0x%x\n", LBA);
|
||||
// Send 0xE0 for the "master" or 0xF0 for the "slave", ORed with the highest 4 bits of the LBA to port 0x1F6: outb(0x1F6, 0xE0 | (slavebit << 4) | ((LBA >> 24) & 0x0F))
|
||||
outb(DEVICE_CHANNEL | 6 , ( 0xE0 | (LBA >>28) ) );
|
||||
// Send a NULL byte to port 0x1F1, if you like (it is ignored and wastes lots of CPU time): outb(0x1F1, 0x00)
|
||||
@ -156,7 +156,7 @@ void ATA_DEVICE::Read(uint16_t DEVICE_CHANNEL, DEVICE_DRIVE drive, uint32_t LBA
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Status: %x\n", status);
|
||||
//printf("Status: %x\n", status);
|
||||
// Check if busy!
|
||||
while((status & 0x80) == 0x80){
|
||||
printf("Reading....\r");
|
||||
|
@ -10,7 +10,6 @@
|
||||
* This first driver wil make use of IO ports.
|
||||
* Doing so means reading or writing from disk is going
|
||||
* to be very cpu intensive.
|
||||
*
|
||||
*/
|
||||
|
||||
enum DEVICE_DRIVE{
|
||||
@ -18,9 +17,6 @@ enum DEVICE_DRIVE{
|
||||
SLAVE = 0xB0
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
namespace ATA_DEVICE{
|
||||
void Identify(uint16_t, DEVICE_DRIVE);
|
||||
void Read (uint16_t, DEVICE_DRIVE, uint32_t, uint16_t*);
|
||||
|
Reference in New Issue
Block a user