Nut/OS  4.10.3
API Reference
sbimmc.c File Reference
#include <cfg/arch.h>
#include <cfg/arch/gpio.h>
#include <sys/event.h>
#include <dev/irqreg.h>
#include <dev/mmcard.h>
#include <dev/sbimmc.h>
Include dependency graph for sbimmc.c:

Go to the source code of this file.

Data Structures

struct  _MMCDCB
 Private data of NPL card interface. More...

Defines

#define SPI0_CS_BIT   6
 Port bit for SPI chip select.
#define SPI0_CLK_BIT   4
 Port bit for SPI clock.
#define SPI0_MOSI_BIT   5
 Port bit for SPI MOSI line.
#define SPI0_MISO_BIT   3
 Port bit for SPI MISO line.
#define MMC0_CLR_BIT(n)   outr(SPI0_SOD_REG, inr(SPI0_SOD_REG) & ~_BV(n))
#define MMC0_SET_BIT(n)   outr(SPI0_SOD_REG, inr(SPI0_SOD_REG) | _BV(n))
#define MMC0_IS_BIT_SET(n)   ((inr(SPI0_SOD_REG) & _BV(n)) == _BV(n))
#define MMC0_TST_BIT(n)   ((inr(SPI0_PDS_REG) & _BV(n)) == _BV(n))
 Query status of a specified MMC input.

Typedefs

typedef struct _MMCDCB MMCDCB
 Private data of NPL card interface.

Functions

int SbiMmCard0Avail (void)
 Check if card is available in slot 0.
int SbiMmCard0WrProt (void)
 Check if card in slot 0 is write protected.

Variables

NUTDEVICE devSbiMmc0
 Multimedia card device information structure.