ArmSys Support
ArmsysApi  0.12.18

#include <BSdio1.h>

Public Types

enum  CardType { CardTypeNone, CardTypeSD, CardTypeSDHC, CardTypeEMMC }
 
enum  ResponseType { ResponseNone = 0x00, ResponseShort = 0x40, ResponseLong = 0xC0 }
 

Public Member Functions

 BSdio1 ()
 
BError init (BUInt8 dev, BUInt speedKHz=400)
 
CardType getCardType ()
 
BUInt32 numBlocks ()
 
BError getStatus (BUInt32 &status)
 
BError readBlocks (BUInt32 blockNumber, void *data, BUInt num)
 Read data from card. More...
 
BError writeBlocks (BUInt32 blockNumber, void *data, BUInt num)
 Write data to card. More...
 
BError trim (BUInt32 blockNumber, BUInt32 num)
 Mark blocks as free. More...
 
BError erase (BUInt32 blockNumber, BUInt32 num, Bool now)
 Erase blocks. More...
 
void backgroundEnable (Bool on)
 
void sync ()
 
BError sendCmd (BUInt cmd, BUInt32 arg, ResponseType rType, Bool cpsm, Bool wait, BUInt32 *response)
 
void interrupt ()
 

Protected Member Functions

BError cardInit ()
 
BError cardFullSpeed ()
 

Protected Attributes

BMutex olock
 Lock for multi-threadded access. More...
 
SDIO_TypeDef * osdmmc
 The SDMMC device. More...
 
BUInt ospeed
 Clockrate of interface. More...
 
CardType ocardType
 The card type. More...
 
BUInt32 onumBlocks
 The number of 512 byte blocks. More...
 
BUInt orca
 Cards relative address. More...
 
BDma odma
 The DMAB. More...
 
BUInt32 ostatus
 Interrupt status. More...
 
BSemaphore oint
 Interrupt. More...
 
BSemaphore oend
 End of transaction semaphore. More...
 

Member Enumeration Documentation

◆ CardType

Enumerator
CardTypeNone 
CardTypeSD 
CardTypeSDHC 
CardTypeEMMC 

◆ ResponseType

Enumerator
ResponseNone 
ResponseShort 
ResponseLong 

Constructor & Destructor Documentation

◆ BSdio1()

BSdio1::BSdio1 ( )

Member Function Documentation

◆ backgroundEnable()

void BSdio1::backgroundEnable ( Bool  on)

◆ cardFullSpeed()

BError BSdio1::cardFullSpeed ( )
protected

◆ cardInit()

BError BSdio1::cardInit ( )
protected

◆ erase()

BError BSdio1::erase ( BUInt32  blockNumber,
BUInt32  num,
Bool  now 
)

Erase blocks.

◆ getCardType()

BSdio1::CardType BSdio1::getCardType ( )

◆ getStatus()

BError BSdio1::getStatus ( BUInt32 status)

◆ init()

BError BSdio1::init ( BUInt8  dev,
BUInt  speedKHz = 400 
)

◆ interrupt()

void BSdio1::interrupt ( )

◆ numBlocks()

BUInt32 BSdio1::numBlocks ( )

◆ readBlocks()

BError BSdio1::readBlocks ( BUInt32  blockNumber,
void *  data,
BUInt  num 
)

Read data from card.

◆ sendCmd()

BError BSdio1::sendCmd ( BUInt  cmd,
BUInt32  arg,
ResponseType  rType,
Bool  cpsm,
Bool  wait,
BUInt32 response 
)

◆ sync()

void BSdio1::sync ( )

◆ trim()

BError BSdio1::trim ( BUInt32  blockNumber,
BUInt32  num 
)

Mark blocks as free.

◆ writeBlocks()

BError BSdio1::writeBlocks ( BUInt32  blockNumber,
void *  data,
BUInt  num 
)

Write data to card.

Member Data Documentation

◆ ocardType

CardType BSdio1::ocardType
protected

The card type.

◆ odma

BDma BSdio1::odma
protected

The DMAB.

◆ oend

BSemaphore BSdio1::oend
protected

End of transaction semaphore.

◆ oint

BSemaphore BSdio1::oint
protected

Interrupt.

◆ olock

BMutex BSdio1::olock
protected

Lock for multi-threadded access.

◆ onumBlocks

BUInt32 BSdio1::onumBlocks
protected

The number of 512 byte blocks.

◆ orca

BUInt BSdio1::orca
protected

Cards relative address.

◆ osdmmc

SDIO_TypeDef* BSdio1::osdmmc
protected

The SDMMC device.

◆ ospeed

BUInt BSdio1::ospeed
protected

Clockrate of interface.

◆ ostatus

BUInt32 BSdio1::ostatus
protected

Interrupt status.


The documentation for this class was generated from the following files: