package
0.0.0-20211205205814-168ccc21e67c
Repository: https://github.com/ziutek/emgo.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
Package sdmc implements access to Secure Digital Memory Cards.

# Functions

ACMD41 (SD_SEND_OP_COND, R3) starts initialization/identification process.
ACMD42 (SET_CLR_CARD_DETECT, R1) enables/disables pull-up resistor on D3/CD.
ACMD51 (SEND_SCR, R1) reads SD Configuration Register.
ACMD6 (SET_BUS_WIDTH, R1) sets the data bus width.
BlockMode returns bits of DataMode that correspond to block data transfer with block size equal 1<<exp.
CMD0 (GO_IDLE_STATE) performs software reset and sets the card into Idle State.
CMD12 (STOP_TRANSMISSION, R1b) forces the card to stop transmission in Multiple Block Read Operation.
CMD13 (SEND_STATUS/SEND_TASK_STATUS, R1) reads Status or TaskStatus register.
CMD16 (SET_BLOCKLEN, R1) sets the block length (in bytes) for block commands.
CMD17 (READ_SINGLE_BLOCK, R1) reads a block of the size selected by CMD16.
CMD18 (READ_MULTIPLE_BLOCK, R1) works like CMD17 but does not stop the transmision after first data block.
CMD2 (ALL_SEND_CID, R2) gets Card Identification Data.
CMD24 (WRITE_BLOCK, R1) writes a block of the size selected by CMD16.
CMD25 (WRITE_MULTIPLE_BLOCK, R1) works like CMD24 but allows to transmit multiple block to the card until.
CMD3 (SEND_RELATIVE_ADDR, R6) asks the card to publishets a new Relative Card Address (RCA) and Card Status bits 23,22,19,12:0.
 CMD5 (IO_SEND_OP_COND, R4) inquires about the voltage range needed by the I/O card.
CMD52 (IO_RW_DIRECT, R5).
CMD53 (IO_RW_EXTENDED, R5).
CMD55 (APP_CMD, R1) indicates to the card that the next command is an application specific command.
CMD6 (SWITCH_FUNC, R1) switches or expands memory card functions.
CMD7 (SELECT_CARD/DESELECT_CARD, R1b) selects card with rca address (puts into Transfer State) and deselects all other (puts into Stand-by State).
CMD8 (SEND_IF_COND, R7) initializes SD Memory Cards compliant to the Physical Layer Specification Version 2.00 or later.
CMD9 (SEND_CSD, R2) reads Card Specific Data from card indentified by rca.
MakeDataBlocks allocates and initializes Data object that can store n 512-byte blocks.
MakeDataBytes allocates and initializes Data object that can store n bytes.

# Constants

Access mode (keep current).
No description provided by the author
No description provided by the author
Application command (hint, APP_CMD required).
No description provided by the author
No description provided by the author
Block mode (CMD53).
No description provided by the author
Block data transfer, block size: 1 B.
Block data transfer, block size: 128 B.
Block data transfer, block size: 16 B.
Block data transfer, block size: 16 KiB.
Block data transfer, block size: 1 KiB.
Block data transfer, block size: 2 B.
Block data transfer, block size: 256 B.
Block data transfer, block size: 2 KiB.
Block data transfer, block size: 32 B.
Block data transfer, block size: 4 B.
Block data transfer, block size: 4 KiB.
Block data transfer, block size: 512 B.
Block data transfer, block size: 64 B.
Block data transfer, block size: 8 B.
Block data transfer, block size: 8 KiB.
CMD53 only.
To iterate over block sizes.
CMD53 only.
1-lane SD data bus.
4-lane SD data bus.
8-lane SD data bus.
Command can set D0 low to signal busy state.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Command index.
No description provided by the author
Command system (keep current).
No description provided by the author
No description provided by the author
DDR50.
Default limit: 720 mW.
Default Speed or SDR12.
Default Command System.
Default Type B driver.
DOS FAT (floppy-like) without partition table.
UHS-I driver strength (keep current).
Dual Voltage Card (SDMC).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Hard disk-like file system with partition table.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Response expected.
Card Capacity Status (set fot SDHC, SDXC).
High Speed or SDR25.
No description provided by the author
OP Code (CMD53).
SDIO specific operation.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Long response.
No description provided by the author
Checks switchable function.
Switch card function.
No description provided by the author
Other/unknown.
No description provided by the author
No description provided by the author
Limit: 1440 mW.
Limit: 1800 mW.
Limit: 2160 mW.
Limit: 2880 mW.
Power limit (keep current).
Card in power up state (^Busy).
All Command constants are defined to be friendly to use with ARM PrimeCell Multimedia Card Interface (used by STM32, LPC and probably more MCUs).
All Command constants are defined to be friendly to use with ARM PrimeCell Multimedia Card Interface (used by STM32, LPC and probably more MCUs).
All Command constants are defined to be friendly to use with ARM PrimeCell Multimedia Card Interface (used by STM32, LPC and probably more MCUs).
All Command constants are defined to be friendly to use with ARM PrimeCell Multimedia Card Interface (used by STM32, LPC and probably more MCUs).
All Command constants are defined to be friendly to use with ARM PrimeCell Multimedia Card Interface (used by STM32, LPC and probably more MCUs).
All Command constants are defined to be friendly to use with ARM PrimeCell Multimedia Card Interface (used by STM32, LPC and probably more MCUs).
All Command constants are defined to be friendly to use with ARM PrimeCell Multimedia Card Interface (used by STM32, LPC and probably more MCUs).
Read after write (CMD52).
Read data (CMD52, CMD53).
No description provided by the author
Receive data from a card.
Response index.
Response types.
Read wait control using CK instead od D2.
Read wait start.
Read wait stop.
Switching to 1.8V.
No description provided by the author
No description provided by the author
SDR104.
SDR50.
No description provided by the author
Version 2.00.
Version 1.01.
Version 3.xx.
Send data to a card.
Invalid, used by Host to report SPI bus.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Stream or SDIO multibyte data transfer.
No description provided by the author
Type A driver.
Type C driver.
Type D driver.
Universal File Format.
UHS-II Card Status.
2.0-2.1 V (SDIO).
2.1-2.2 V (SDIO).
2.2-2.3 V (SDIO).
2.3-2.4 V (SDIO).
2.4-2.5 V (SDIO).
2.5-2.6 V (SDIO).
2.6-2.7 V (SDIO).
No description provided by the author
2.7-2.8 V.
2.8-2.9 V.
2.9-3.0 V.
3.0-3.1 V.
3.1-3.2 V.
3.2-3.3 V.
3.3-3.4 V.
3.4-3.5 V.
3.5-3.6 V.
No description provided by the author
No description provided by the author
No description provided by the author
Write data (CMD52, CMD53).
CMD52 only.
SDXC maximum performance.

# Variables

ErrBusyTimeout is returned by Host if it waited 1s for end of card busy state and for that reason it could not start a data transfer.
ErrCmdTimeout is returned by Host in case of command response timeout.

# Interfaces

No description provided by the author

# Type aliases

BusWidth describes SD data bus width.
No description provided by the author
No description provided by the author
CID - Card Identification Register.
No description provided by the author
No description provided by the author
CSD - Card Specific Data register.
Data can be used to access bytes sent/received using SD card data transfers.
DataMode describes data transfer mode.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SCR (SD CARD Configuration Register) is 8 byte register that can be read using ACMD51 and 8-byte block data transfer (it is not returned in response).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author