DoxigAlpha

initialize

Resets a network adapter and allocates the transmit and receive buffers required by the network interface.

Function parameters

Parameters

#
self:*SimpleNetwork
extra_rx_buffer_size:usize
extra_tx_buffer_size:usize

Type definitions in this namespace

Types

#

Source

Implementation

#
pub fn initialize(
    self: *SimpleNetwork,
    extra_rx_buffer_size: usize,
    extra_tx_buffer_size: usize,
) InitializeError!void {
    switch (self._initialize(self, extra_rx_buffer_size, extra_tx_buffer_size)) {
        .success => {},
        .not_started => return Error.NotStarted,
        .out_of_resources => return Error.OutOfResources,
        .invalid_parameter => return Error.InvalidParameter,
        .device_error => return Error.DeviceError,
        .unsupported => return Error.Unsupported,
        else => |status| return uefi.unexpectedStatus(status),
    }
}