ArmSys Support
ArmsysApi  0.12.18

#include <BSdio.h>

Inheritance diagram for BSdio:
BBlockDevice

Public Types

enum  ResponseType { ResponseNone = 0x00, ResponseShort = 0x40, ResponseLong = 0xC0 }
 

Public Member Functions

 BSdio ()
 
BError init (BUInt8 sysdev, BUInt speedKHz=400)
 Initialise the device. More...
 
BError getInfo (BUInt32 dev, BUInt32 &nBlocks, BUInt32 &blockSize, BUInt32 &eraseBlockSize)
 
BError read (BUInt32 dev, BUInt32 blockNumber, void *data, BUInt32 nBlocks)
 Read data from card. More...
 
BError write (BUInt32 dev, BUInt32 blockNumber, const void *data, BUInt32 nBlocks)
 Write data to card. More...
 
BError trim (BUInt32 dev, BUInt32 blockNumber, BUInt32 num)
 Mark blocks as free. More...
 
BError erase (BUInt32 dev, BUInt32 blockNumber, BUInt32 num, Bool now)
 Erase blocks. More...
 
BSdioDevice::CardType getCardType (BUInt32 dev)
 returns the card type More...
 
BError backgroundEnable (BUInt32 dev, Bool on)
 
BError sync (BUInt32 dev)
 
void printStatus ()
 Debug print of status. More...
 
void interrupt ()
 
- Public Member Functions inherited from BBlockDevice
 BBlockDevice ()
 
virtual ~BBlockDevice ()
 
virtual BError init ()
 
virtual BError close ()
 
virtual BUInt32 numDevices ()
 
virtual BError status (BUInt32 dev)
 
virtual BError erase (BUInt32 dev, BUInt32 block, BUInt32 nBlocks)
 

Protected Member Functions

BError cardInit ()
 
BError busFullSpeed ()
 
BError select (BUInt dev)
 Select a particular card. More...
 
BError getStatus (BUInt32 &status)
 
BError sendCmd (BUInt cmd, BUInt32 arg, ResponseType rType, Bool cpsm, Bool wait, BUInt32 *response)
 

Protected Attributes

BMutex olock
 Lock for multi-threadded access. More...
 
SDIO_TypeDef * osdmmc
 The SDMMC device. More...
 
BUInt ospeed
 Clockrate of interface. More...
 
BDma odma
 The DMAB. More...
 
BSemaphore oend
 End of transaction semaphore. More...
 
BSdioDevice ocards [2]
 
int ocard
 
- Protected Attributes inherited from BBlockDevice
BUInt onumDevices
 The number of devices. More...
 

Member Enumeration Documentation

◆ ResponseType

Enumerator
ResponseNone 
ResponseShort 
ResponseLong 

Constructor & Destructor Documentation

◆ BSdio()

BSdio::BSdio ( )

Member Function Documentation

◆ backgroundEnable()

BError BSdio::backgroundEnable ( BUInt32  dev,
Bool  on 
)

◆ busFullSpeed()

BError BSdio::busFullSpeed ( )
protected

◆ cardInit()

BError BSdio::cardInit ( )
protected

◆ erase()

BError BSdio::erase ( BUInt32  dev,
BUInt32  blockNumber,
BUInt32  num,
Bool  now 
)

Erase blocks.

◆ getCardType()

BSdioDevice::CardType BSdio::getCardType ( BUInt32  dev)

returns the card type

◆ getInfo()

BError BSdio::getInfo ( BUInt32  dev,
BUInt32 nBlocks,
BUInt32 blockSize,
BUInt32 eraseBlockSize 
)
virtual

Implements BBlockDevice.

◆ getStatus()

BError BSdio::getStatus ( BUInt32 status)
protected

◆ init()

BError BSdio::init ( BUInt8  sysdev,
BUInt  speedKHz = 400 
)

Initialise the device.

◆ interrupt()

void BSdio::interrupt ( )

◆ printStatus()

void BSdio::printStatus ( )

Debug print of status.

◆ read()

BError BSdio::read ( BUInt32  dev,
BUInt32  blockNumber,
void *  data,
BUInt32  nBlocks 
)
virtual

Read data from card.

Implements BBlockDevice.

◆ select()

BError BSdio::select ( BUInt  dev)
protected

Select a particular card.

◆ sendCmd()

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

◆ sync()

BError BSdio::sync ( BUInt32  dev)

◆ trim()

BError BSdio::trim ( BUInt32  dev,
BUInt32  blockNumber,
BUInt32  num 
)
virtual

Mark blocks as free.

Reimplemented from BBlockDevice.

◆ write()

BError BSdio::write ( BUInt32  dev,
BUInt32  blockNumber,
const void *  data,
BUInt32  nBlocks 
)
virtual

Write data to card.

Implements BBlockDevice.

Member Data Documentation

◆ ocard

int BSdio::ocard
protected

◆ ocards

BSdioDevice BSdio::ocards[2]
protected

◆ odma

BDma BSdio::odma
protected

The DMAB.

◆ oend

BSemaphore BSdio::oend
protected

End of transaction semaphore.

◆ olock

BMutex BSdio::olock
protected

Lock for multi-threadded access.

◆ osdmmc

SDIO_TypeDef* BSdio::osdmmc
protected

The SDMMC device.

◆ ospeed

BUInt BSdio::ospeed
protected

Clockrate of interface.


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