mci_os_select_device

Select a device and initialize it.

int32_t mci_os_select_device(
    struct mci_os_desc *const desc,
    uint8_t slot,
    uint32_t clock,
    uint8_t bus_width,
    bool high_speed
)

Parameters

desc

Type: struct mci_os_desc Struct *const

Mci os descriptor

slot

Type: uint8_t

Selected slot

clock

Type: uint32_t

Maximum clock to use (Hz)

bus_width

Type: uint8_t

Bus width to use (1, 4 or 8)

high_speed

Type: bool

true, to enable high speed mode

Returns

Type: int32_t

Operation status.

0

Success.

<0

Error code.