TMIO ARM7 module.
More...
#include <assert.h>
#include <stddef.h>
|
bool | TMIO_cardDetected (void) |
| Checks if a MMC/SD card is inserted.
|
|
bool | TMIO_cardWritable (void) |
| Checks if the write protect slider is set to locked.
|
|
void | TMIO_deinit (void) |
| Deinitializes the tmio driver.
|
|
void | TMIO_init (void) |
| Initializes the tmio driver.
|
|
void | TMIO_initPort (TmioPort *const port, const u8 portNum) |
| Initializes a tmio port to defaults.
|
|
void | TMIO_powerupSequence (TmioPort *const port) |
| Handles the device specific powerup sequence including the 74 clocks.
|
|
u32 | TMIO_sendCommand (TmioPort *const port, const u16 cmd, const u32 arg) |
| Sends a command.
|
|
static void | TMIO_setBlockLen (TmioPort *const port, u16 blockLen) |
| Sets the transfer block length for a tmio port.
|
|
static void | TMIO_setBuffer (TmioPort *const port, void *buf, const u16 blocks) |
| Sets a transfer buffer for a tmio port.
|
|
static void | TMIO_setBusWidth (TmioPort *const port, const u8 width) |
| Sets the bus width for a tmio port.
|
|
static void | TMIO_setClock (TmioPort *const port, const u32 clk) |
| Sets the clock for a tmio port.
|
|
◆ TMIO_cardDetected()
bool TMIO_cardDetected |
( |
void |
| ) |
|
Checks if a MMC/SD card is inserted.
- Returns
- Returns true if a card is inserted.
◆ TMIO_cardWritable()
bool TMIO_cardWritable |
( |
void |
| ) |
|
Checks if the write protect slider is set to locked.
- Returns
- Returns true if the card is unlocked.
◆ TMIO_initPort()
void TMIO_initPort |
( |
TmioPort *const |
port, |
|
|
const u8 |
portNum |
|
) |
| |
Initializes a tmio port to defaults.
- Parameters
-
| port | A pointer to the port struct. |
[in] | portNum | The port number. |
◆ TMIO_powerupSequence()
void TMIO_powerupSequence |
( |
TmioPort *const |
port | ) |
|
Handles the device specific powerup sequence including the 74 clocks.
- Parameters
-
port | A pointer to the port struct. |
◆ TMIO_sendCommand()
u32 TMIO_sendCommand |
( |
TmioPort *const |
port, |
|
|
const u16 |
cmd, |
|
|
const u32 |
arg |
|
) |
| |
Sends a command.
- Parameters
-
| port | A pointer to the port struct. |
[in] | cmd | The command. |
[in] | arg | The argument for the command. |
- Returns
- Returns 0 on success otherwise see REG_SD_STATUS1/2 bits.
◆ TMIO_setBlockLen()
static void TMIO_setBlockLen |
( |
TmioPort *const |
port, |
|
|
u16 |
blockLen |
|
) |
| |
|
inlinestatic |
Sets the transfer block length for a tmio port.
- Parameters
-
| port | A pointer to the port struct. |
[in] | blockLen | The block length. Caution: Provide a buffer with multiple of 4 size regardless of block length. |
◆ TMIO_setBuffer()
static void TMIO_setBuffer |
( |
TmioPort *const |
port, |
|
|
void * |
buf, |
|
|
const u16 |
blocks |
|
) |
| |
|
inlinestatic |
Sets a transfer buffer for a tmio port.
- Parameters
-
| port | A pointer to the port struct. |
| buf | The buffer pointer. |
[in] | blocks | The number of blocks to transfer. |
◆ TMIO_setBusWidth()
static void TMIO_setBusWidth |
( |
TmioPort *const |
port, |
|
|
const u8 |
width |
|
) |
| |
|
inlinestatic |
Sets the bus width for a tmio port.
- Parameters
-
| port | A pointer to the port struct. |
[in] | width | The bus width. |
◆ TMIO_setClock()
static void TMIO_setClock |
( |
TmioPort *const |
port, |
|
|
const u32 |
clk |
|
) |
| |
|
inlinestatic |
Sets the clock for a tmio port.
- Parameters
-
| port | A pointer to the port struct. |
[in] | clk | The target clock in Hz. |