Module proto

Source
Expand description

Constants from the SD Specifications

Based on SdFat, under the following terms:

Copyright (c) 2011-2018 Bill Greiman This file is part of the SdFat library for SD memory cards.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Structs§

CsdV1
Card Specific Data, version 1
CsdV2
Card Specific Data, version 2

Enums§

Csd
Card Specific Data

Constants§

ACMD23
Pre-erased before writing
ACMD41
SD_SEND_OP_COMD - Sends host capacity support information and activates the card’s initialization process
CMD0
GO_IDLE_STATE - init card in spi mode if CS low
CMD8
SEND_IF_COND - verify SD Memory Card interface operating condition.*/
CMD9
SEND_CSD - read the Card Specific Data (CSD register)
CMD12
STOP_TRANSMISSION - end multiple block read sequence
CMD13
SEND_STATUS - read the card status register
CMD17
READ_SINGLE_BLOCK - read a single data block from the card
CMD18
READ_MULTIPLE_BLOCK - read a multiple data blocks from the card
CMD24
WRITE_BLOCK - write a single data block to the card
CMD25
WRITE_MULTIPLE_BLOCK - write blocks of data until a STOP_TRANSMISSION
CMD55
APP_CMD - escape for application specific command
CMD58
READ_OCR - read the OCR register of a card
CMD59
CRC_ON_OFF - enable or disable CRC checking
DATA_RES_ACCEPTED
write data accepted token
DATA_RES_MASK
mask for data response tokens after a write block operation
DATA_START_BLOCK
start data token for read or write single block*/
ERROR_OK
Card indicates last operation was a success
R1_IDLE_STATE
status for card in the idle state
R1_ILLEGAL_COMMAND
status bit for illegal command
R1_READY_STATE
status for card in the ready state
STOP_TRAN_TOKEN
stop token for write multiple blocks*/
WRITE_MULTIPLE_TOKEN
start data token for write multiple blocks*/

Functions§

crc7
Perform the 7-bit CRC used on the SD card
crc16
Perform the X25 CRC calculation, as used for data blocks.