Updated driver API

This commit is contained in:
Alex
2022-11-01 03:59:32 +02:00
parent 917e000f6c
commit e166338295
2 changed files with 20 additions and 2 deletions

View File

@ -68,6 +68,16 @@ struct KernelAPI
void (*SendPacket)(unsigned int DriverID, unsigned char *Data, unsigned short Size);
void (*ReceivePacket)(unsigned int DriverID, unsigned char *Data, unsigned short Size);
} Network;
/** @brief Connects to the disk manager */
struct
{
struct
{
void (*ReadSector)(unsigned int DriverID, unsigned long Sector, unsigned char *Data, unsigned int SectorCount, unsigned char Port);
void (*WriteSector)(unsigned int DriverID, unsigned long Sector, unsigned char *Data, unsigned int SectorCount, unsigned char Port);
} AHCI;
} Disk;
} Commmand;
} __attribute__((packed));
@ -98,6 +108,14 @@ struct KernelCallback
unsigned long Length;
} NetworkCallback;
/** @brief When the kernel wants to write to disk. */
struct
{
unsigned long Sector;
unsigned long SectorCount;
unsigned char Port;
unsigned char *Data;
} DiskCallback;
} __attribute__((packed));
#endif // !__FENNIX_DRIVER_API_H__