Newer
Older
tree-os / src / include / hardDrive.h
#ifndef HARD_DRIVE_H
#define HARD_DRIVE_H

#include <list.h>
#include <pci.h>
#include <stdint.h>

typedef struct HardDrive {
    char *model;
    uint32_t sectorCount;
    uint32_t sectorSize;
    void *interface;
    void (*access)(struct HardDrive *, uint64_t, void *, uint16_t, uint8_t);
    // todo: mount point
} HardDrive;

extern void initializeIdeController(PciDevice *, ListElement **);
extern void initializeSataController(PciDevice *, ListElement **);

extern void scanHardDrives();

#endif