File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 11# uefi - [ Unreleased]
22
33## Added
4+ - Added ` proto::ata::AtaRequestBuilder::read_pio() ` .
45
56## Changed
67
Original file line number Diff line number Diff line change @@ -87,6 +87,36 @@ impl<'a> AtaRequestBuilder<'a> {
8787 } )
8888 }
8989
90+ // # PIO
91+ // ########################################################################
92+
93+ /// Creates a builder for a PIO write operation.
94+ ///
95+ /// Since the ATA specification mandates the support for PIO mode for all
96+ /// compliant drives and controllers, this is the protocol variant with the
97+ /// highest compatibility in the field.
98+ /// So probing, (sending ATA IDENTIFY commands to device ports to find out
99+ /// whether there is actually a device connected to it) should probably be
100+ /// done using this method most of the time.
101+ /// This applies for both PATA and SATA.
102+ /// If this errors with Status "UNSUPPORTED", try UDMA next.
103+ ///
104+ /// # Arguments
105+ /// - `io_align`: The I/O buffer alignment required for the ATA controller.
106+ /// - `command`: The ATA command byte specifying the write operation.
107+ ///
108+ /// # Returns
109+ /// `Result<Self, LayoutError>` indicating success or memory allocation failure.
110+ ///
111+ /// # Errors
112+ /// This method can fail due to alignment or memory allocation issues.
113+ pub fn read_pio ( io_align : u32 , command : u8 ) -> Result < Self , LayoutError > {
114+ Self :: new ( io_align, command, AtaPassThruCommandProtocol :: PIO_DATA_IN )
115+ }
116+
117+ // # UDMA
118+ // ########################################################################
119+
90120 /// Creates a builder for a UDMA read operation.
91121 ///
92122 /// # Arguments
You can’t perform that action at this time.
0 commit comments