ReactOS 0.4.16-dev-1078-g21d3e29
hwide.h
Go to the documentation of this file.
1/*
2 * PROJECT: FreeLoader
3 * LICENSE: MIT (https://spdx.org/licenses/MIT)
4 * PURPOSE: ATA/ATAPI programmed I/O driver header file.
5 * COPYRIGHT: Copyright 2019-2025 Dmitry Borisov (di.sean@protonmail.com)
6 */
7
8#pragma once
9
11typedef struct _DEVICE_UNIT
12{
15
18
21
24
27
30#define ATA_DEVICE_ATAPI 0x00000001
31#define ATA_DEVICE_LBA 0x00000002
32#define ATA_DEVICE_LBA48 0x00000004
33#define ATA_DEVICE_IS_NEC_CDR260 0x00000008
34#define ATA_DEVICE_FLAG_IO32 0x00000010
36
37/* FUNCTIONS ******************************************************************/
38
41 _Out_ PUCHAR DetectedCount);
42
45 _In_ UCHAR UnitNumber);
46
49 _In_ PDEVICE_UNIT DeviceUnit,
50 _In_ ULONG64 SectorNumber,
52 _Out_writes_bytes_all_(SectorCount * DeviceUnit->SectorSize) PVOID Buffer);
unsigned char BOOLEAN
Definition: bufpool.h:45
PDEVICE_UNIT AtaGetDevice(_In_ UCHAR UnitNumber)
Definition: hwide.c:1254
struct _DEVICE_UNIT * PDEVICE_UNIT
struct _DEVICE_UNIT DEVICE_UNIT
Data structure for the ATA device.
BOOLEAN AtaInit(_Out_ PUCHAR DetectedCount)
Definition: hwide.c:1264
BOOLEAN AtaReadLogicalSectors(_In_ PDEVICE_UNIT DeviceUnit, _In_ ULONG64 SectorNumber, _In_ ULONG SectorCount, _Out_writes_bytes_all_(SectorCount *DeviceUnit->SectorSize) PVOID Buffer)
Definition: hwide.c:1215
unsigned __int64 ULONG64
Definition: imports.h:198
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _Out_writes_bytes_all_(s)
Definition: no_sal2.h:194
ULONG SectorCount
Definition: part_xbox.c:31
Data structure for the ATA device.
Definition: hwide.h:12
ULONG Cylinders
Definition: hwide.h:14
ULONG SectorSize
Definition: hwide.h:23
ULONG SectorsPerTrack
Definition: hwide.h:20
ULONG64 TotalSectors
Definition: hwide.h:26
ULONG Flags
Definition: hwide.h:29
ULONG Heads
Definition: hwide.h:17
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
unsigned char UCHAR
Definition: xmlstorage.h:181