mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-26 00:52:50 +00:00
Initial commit: SUB-OS 64-Bit Production Monolithic Operating System with LazyBox userland suite
This commit is contained in:
commit
cd9c786d14
88 files changed
+7132
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#ifndef _DRIVERS_ATA_H
|
||||
#define _DRIVERS_ATA_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define ATA_SECTOR_SIZE 512
|
||||
|
||||
#define ATA_PRIMARY_IO 0x1F0
|
||||
#define ATA_PRIMARY_CTRL 0x3F6
|
||||
#define ATA_SECONDARY_IO 0x170
|
||||
#define ATA_SECONDARY_CTRL 0x376
|
||||
|
||||
typedef struct {
|
||||
bool present;
|
||||
bool is_master;
|
||||
uint32_t sector_count;
|
||||
char model[41];
|
||||
char serial[21];
|
||||
} ata_device_t;
|
||||
|
||||
bool ata_init(void);
|
||||
bool ata_read_sectors(uint32_t lba, uint8_t count, void* buffer);
|
||||
bool ata_write_sectors(uint32_t lba, uint8_t count, const void* buffer);
|
||||
const ata_device_t* ata_get_primary_master(void);
|
||||
|
||||
#endif // _DRIVERS_ATA_H
|
||||
Reference in new issue
Block a user