CardSight 0.1.0
C API reference for the CardSight firmware and application
Loading...
Searching...
No Matches
host.h File Reference

The cards of the board. More...

#include <hal/mmc/card.h>

Go to the source code of this file.

Functions

struct mmc_host * mmc_host_get (uint32_t index)
 Return the host at an index.
struct mmc_card * mmc_host_card_get (struct mmc_host *host)
 Return the card in a host with a reference.

Detailed Description

The cards of the board.

The host is a singleton here: CardSight has one SD slot, index 0.

Function Documentation

◆ mmc_host_card_get()

struct mmc_card * mmc_host_card_get ( struct mmc_host * host)

Return the card in a host with a reference.

Parameters
[in]hostHost to query.
Returns
The card, which the caller releases with put_device(&card->dev), or NULL when the slot is empty.

◆ mmc_host_get()

struct mmc_host * mmc_host_get ( uint32_t index)

Return the host at an index.

Parameters
[in]indexHost index; the board has only index 0.
Returns
The host, or NULL when the board has none at index.