ChibiOS/HAL  6.1.0
MMC over SPI Driver

Generic MMC driver. More...

Collaboration diagram for MMC over SPI Driver:

Detailed Description

Generic MMC driver.

This module implements a portable MMC/SD driver that uses a SPI driver as physical layer. Hot plugging and removal are supported through kernel events.

Precondition
In order to use the MMC_SPI driver the HAL_USE_MMC_SPI and HAL_USE_SPI options must be enabled in halconf.h.

Driver State Machine

This driver implements a state machine internally, see the Abstract I/O Block Device module documentation for details.

Driver Operations

This driver allows to read or write single or multiple 512 bytes blocks on a SD Card.

Macros

#define _mmc_driver_methods   _mmcsd_block_device_methods
 MMCDriver specific methods. More...
 

MMC_SPI configuration options

#define MMC_NICE_WAITING   TRUE
 Delays insertions. More...
 

Macro Functions

#define mmcIsCardInserted(mmcp)   mmc_lld_is_card_inserted(mmcp)
 Returns the card insertion status. More...
 
#define mmcIsWriteProtected(mmcp)   mmc_lld_is_write_protected(mmcp)
 Returns the write protect status. More...
 

Data Structures

struct  MMCConfig
 MMC/SD over SPI driver configuration structure. More...
 
struct  MMCDriverVMT
 MMCDriver virtual methods table. More...
 
struct  MMCDriver
 Structure representing a MMC/SD over SPI driver. More...
 

Functions

static uint8_t crc7 (uint8_t crc, const uint8_t *buffer, size_t len)
 Calculate the MMC standard CRC-7 based on a lookup table. More...
 
static void wait (MMCDriver *mmcp)
 Waits an idle condition. More...
 
static void send_hdr (MMCDriver *mmcp, uint8_t cmd, uint32_t arg)
 Sends a command header. More...
 
static uint8_t recvr1 (MMCDriver *mmcp)
 Receives a single byte response. More...
 
static uint8_t recvr3 (MMCDriver *mmcp, uint8_t *buffer)
 Receives a three byte response. More...
 
static uint8_t send_command_R1 (MMCDriver *mmcp, uint8_t cmd, uint32_t arg)
 Sends a command an returns a single byte response. More...
 
static uint8_t send_command_R3 (MMCDriver *mmcp, uint8_t cmd, uint32_t arg, uint8_t *response)
 Sends a command which returns a five bytes response (R3). More...
 
static bool read_CxD (MMCDriver *mmcp, uint8_t cmd, uint32_t cxd[4])
 Reads the CSD. More...
 
static void sync (MMCDriver *mmcp)
 Waits that the card reaches an idle state. More...
 
void mmcInit (void)
 MMC over SPI driver initialization. More...
 
void mmcObjectInit (MMCDriver *mmcp)
 Initializes an instance. More...
 
void mmcStart (MMCDriver *mmcp, const MMCConfig *config)
 Configures and activates the MMC peripheral. More...
 
void mmcStop (MMCDriver *mmcp)
 Disables the MMC peripheral. More...
 
bool mmcConnect (MMCDriver *mmcp)
 Performs the initialization procedure on the inserted card. More...
 
bool mmcDisconnect (MMCDriver *mmcp)
 Brings the driver in a state safe for card removal. More...
 
bool mmcStartSequentialRead (MMCDriver *mmcp, uint32_t startblk)
 Starts a sequential read. More...
 
bool mmcSequentialRead (MMCDriver *mmcp, uint8_t *buffer)
 Reads a block within a sequential read operation. More...
 
bool mmcStopSequentialRead (MMCDriver *mmcp)
 Stops a sequential read gracefully. More...
 
bool mmcStartSequentialWrite (MMCDriver *mmcp, uint32_t startblk)
 Starts a sequential write. More...
 
bool mmcSequentialWrite (MMCDriver *mmcp, const uint8_t *buffer)
 Writes a block within a sequential write operation. More...
 
bool mmcStopSequentialWrite (MMCDriver *mmcp)
 Stops a sequential write gracefully. More...
 
bool mmcSync (MMCDriver *mmcp)
 Waits for card idle condition. More...
 
bool mmcGetInfo (MMCDriver *mmcp, BlockDeviceInfo *bdip)
 Returns the media info. More...
 
bool mmcErase (MMCDriver *mmcp, uint32_t startblk, uint32_t endblk)
 Erases blocks. More...
 

Variables

static const struct MMCDriverVMT mmc_vmt
 Virtual methods table. More...
 
static const uint8_t crc7_lookup_table [256]
 Lookup table for CRC-7 ( based on polynomial x^7 + x^3 + 1). More...
 

Macro Definition Documentation

#define MMC_NICE_WAITING   TRUE

Delays insertions.

If enabled this options inserts delays into the MMC waiting routines releasing some extra CPU time for the threads with lower priority, this may slow down the driver a bit however. This option is recommended also if the SPI driver does not use a DMA channel and heavily loads the CPU.

Definition at line 56 of file hal_mmc_spi.h.

#define _mmc_driver_methods   _mmcsd_block_device_methods

MMCDriver specific methods.

Definition at line 93 of file hal_mmc_spi.h.

#define mmcIsCardInserted (   mmcp)    mmc_lld_is_card_inserted(mmcp)

Returns the card insertion status.

Note
This macro wraps a low level function named sdc_lld_is_card_inserted(), this function must be provided by the application because it is not part of the SDC driver.
Parameters
[in]mmcppointer to the MMCDriver object
Returns
The card state.
Return values
falsecard not inserted.
truecard inserted.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 148 of file hal_mmc_spi.h.

#define mmcIsWriteProtected (   mmcp)    mmc_lld_is_write_protected(mmcp)

Returns the write protect status.

Parameters
[in]mmcppointer to the MMCDriver object
Returns
The card state.
Return values
falsecard not inserted.
truecard inserted.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 160 of file hal_mmc_spi.h.

Function Documentation

static uint8_t crc7 ( uint8_t  crc,
const uint8_t *  buffer,
size_t  len 
)
static

Calculate the MMC standard CRC-7 based on a lookup table.

Parameters
[in]crcstart value for CRC
[in]bufferpointer to data buffer
[in]lenlength of data
Returns
Calculated CRC

Definition at line 149 of file hal_mmc_spi.c.

References crc7_lookup_table.

Referenced by send_hdr().

static void wait ( MMCDriver mmcp)
static

Waits an idle condition.

Parameters
[in]mmcppointer to the MMCDriver object
Function Class:Not an API, this function is for internal use only.

Definition at line 165 of file hal_mmc_spi.c.

References MMCDriver::config, osalThreadSleepMilliseconds, MMCConfig::spip, and spiReceive().

Referenced by mmcSequentialWrite(), and send_hdr().

Here is the call graph for this function:

static void send_hdr ( MMCDriver mmcp,
uint8_t  cmd,
uint32_t  arg 
)
static

Sends a command header.

Parameters
[in]mmcppointer to the MMCDriver object
[in]cmdthe command id
[in]argthe command argument
Function Class:Not an API, this function is for internal use only.

Definition at line 197 of file hal_mmc_spi.c.

References MMCDriver::config, crc7(), MMCConfig::spip, spiSend(), and wait().

Referenced by mmcStartSequentialRead(), mmcStartSequentialWrite(), read_CxD(), send_command_R1(), and send_command_R3().

Here is the call graph for this function:

static uint8_t recvr1 ( MMCDriver mmcp)
static

Receives a single byte response.

Parameters
[in]mmcppointer to the MMCDriver object
Returns
The response as an uint8_t value.
Return values
0xFFtimed out.
Function Class:Not an API, this function is for internal use only.

Definition at line 223 of file hal_mmc_spi.c.

References MMCDriver::config, MMCConfig::spip, and spiReceive().

Referenced by mmcStartSequentialRead(), mmcStartSequentialWrite(), mmcStopSequentialRead(), read_CxD(), recvr3(), and send_command_R1().

Here is the call graph for this function:

static uint8_t recvr3 ( MMCDriver mmcp,
uint8_t *  buffer 
)
static

Receives a three byte response.

Parameters
[in]mmcppointer to the MMCDriver object
[out]bufferpointer to four bytes wide buffer
Returns
First response byte as an uint8_t value.
Return values
0xFFtimed out.
Function Class:Not an API, this function is for internal use only.

Definition at line 246 of file hal_mmc_spi.c.

References MMCDriver::config, recvr1(), MMCConfig::spip, and spiReceive().

Referenced by send_command_R3().

Here is the call graph for this function:

static uint8_t send_command_R1 ( MMCDriver mmcp,
uint8_t  cmd,
uint32_t  arg 
)
static

Sends a command an returns a single byte response.

Parameters
[in]mmcppointer to the MMCDriver object
[in]cmdthe command id
[in]argthe command argument
Returns
The response as an uint8_t value.
Return values
0xFFtimed out.
Function Class:Not an API, this function is for internal use only.

Definition at line 266 of file hal_mmc_spi.c.

References MMCDriver::config, recvr1(), send_hdr(), MMCConfig::spip, spiSelect(), and spiUnselect().

Referenced by mmcConnect(), and mmcErase().

Here is the call graph for this function:

static uint8_t send_command_R3 ( MMCDriver mmcp,
uint8_t  cmd,
uint32_t  arg,
uint8_t *  response 
)
static

Sends a command which returns a five bytes response (R3).

Parameters
[in]mmcppointer to the MMCDriver object
[in]cmdthe command id
[in]argthe command argument
[out]responsepointer to four bytes wide uint8_t buffer
Returns
The first byte of the response (R1) as an uint8_t value.
Return values
0xFFtimed out.
Function Class:Not an API, this function is for internal use only.

Definition at line 289 of file hal_mmc_spi.c.

References MMCDriver::config, recvr3(), send_hdr(), MMCConfig::spip, spiSelect(), and spiUnselect().

Referenced by mmcConnect().

Here is the call graph for this function:

static bool read_CxD ( MMCDriver mmcp,
uint8_t  cmd,
uint32_t  cxd[4] 
)
static

Reads the CSD.

Parameters
[in]mmcppointer to the MMCDriver object
[out]cmdcommand
[out]cxdpointer to the CSD/CID buffer
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded.
HAL_FAILEDthe operation failed.
Function Class:Not an API, this function is for internal use only.

Definition at line 313 of file hal_mmc_spi.c.

References MMCDriver::config, recvr1(), send_hdr(), spiIgnore(), MMCConfig::spip, spiReceive(), spiSelect(), and spiUnselect().

Referenced by mmcConnect().

Here is the call graph for this function:

static void sync ( MMCDriver mmcp)
static

Waits that the card reaches an idle state.

Parameters
[in]mmcppointer to the MMCDriver object
Function Class:Not an API, this function is for internal use only.

Definition at line 355 of file hal_mmc_spi.c.

References MMCDriver::config, osalThreadSleepMilliseconds, MMCConfig::spip, spiReceive(), spiSelect(), and spiUnselect().

Referenced by mmcDisconnect(), and mmcSync().

Here is the call graph for this function:

void mmcInit ( void  )

MMC over SPI driver initialization.

Note
This function is implicitly invoked by halInit(), there is no need to explicitly initialize the driver.
Function Class:Initializer, this function just initializes an object and can be invoked before the kernel is initialized.

Definition at line 383 of file hal_mmc_spi.c.

Referenced by halInit().

void mmcObjectInit ( MMCDriver mmcp)

Initializes an instance.

Parameters
[out]mmcppointer to the MMCDriver object
Function Class:Initializer, this function just initializes an object and can be invoked before the kernel is initialized.

Definition at line 394 of file hal_mmc_spi.c.

References BLK_STOP, MMCDriver::config, mmc_vmt, and MMCDriver::vmt.

void mmcStart ( MMCDriver mmcp,
const MMCConfig config 
)

Configures and activates the MMC peripheral.

Parameters
[in]mmcppointer to the MMCDriver object
[in]configpointer to the MMCConfig object.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 410 of file hal_mmc_spi.c.

References BLK_ACTIVE, BLK_STOP, MMCDriver::config, osalDbgAssert, and osalDbgCheck.

void mmcStop ( MMCDriver mmcp)

Disables the MMC peripheral.

Parameters
[in]mmcppointer to the MMCDriver object
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 427 of file hal_mmc_spi.c.

References BLK_ACTIVE, BLK_STOP, MMCDriver::config, osalDbgAssert, osalDbgCheck, MMCConfig::spip, and spiStop().

Here is the call graph for this function:

bool mmcConnect ( MMCDriver mmcp)

Performs the initialization procedure on the inserted card.

This function should be invoked when a card is inserted and brings the driver in the MMC_READY state where it is possible to perform read and write operations.

Note
It is possible to invoke this function from the insertion event handler.
Parameters
[in]mmcppointer to the MMCDriver object
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded and the driver is now in the MMC_READY state.
HAL_FAILEDthe operation failed.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 455 of file hal_mmc_spi.c.

References _mmcsd_get_capacity(), BLK_ACTIVE, BLK_CONNECTING, BLK_READY, MMCDriver::config, MMCConfig::hscfg, MMCConfig::lscfg, MMCSD_BLOCK_SIZE, MMCSD_CMD8_PATTERN, osalDbgAssert, osalDbgCheck, osalThreadSleepMilliseconds, read_CxD(), send_command_R1(), send_command_R3(), spiIgnore(), MMCConfig::spip, spiStart(), and spiStop().

Here is the call graph for this function:

bool mmcDisconnect ( MMCDriver mmcp)

Brings the driver in a state safe for card removal.

Parameters
[in]mmcppointer to the MMCDriver object
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded and the driver is now in the MMC_INSERTED state.
HAL_FAILEDthe operation failed.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 577 of file hal_mmc_spi.c.

References BLK_ACTIVE, BLK_DISCONNECTING, BLK_READY, MMCDriver::config, MMCConfig::hscfg, osalDbgAssert, osalDbgCheck, osalSysLock(), osalSysUnlock(), MMCConfig::spip, spiStart(), spiStop(), and sync().

Here is the call graph for this function:

bool mmcStartSequentialRead ( MMCDriver mmcp,
uint32_t  startblk 
)

Starts a sequential read.

Parameters
[in]mmcppointer to the MMCDriver object
[in]startblkfirst block to read
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded.
HAL_FAILEDthe operation failed.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 612 of file hal_mmc_spi.c.

References BLK_READING, BLK_READY, MMCDriver::config, MMCConfig::hscfg, MMCSD_BLOCK_SIZE, osalDbgAssert, osalDbgCheck, recvr1(), send_hdr(), MMCConfig::spip, spiSelect(), spiStart(), and spiStop().

Here is the call graph for this function:

bool mmcSequentialRead ( MMCDriver mmcp,
uint8_t *  buffer 
)

Reads a block within a sequential read operation.

Parameters
[in]mmcppointer to the MMCDriver object
[out]bufferpointer to the read buffer
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded.
HAL_FAILEDthe operation failed.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 652 of file hal_mmc_spi.c.

References BLK_READING, BLK_READY, MMCDriver::config, MMCSD_BLOCK_SIZE, osalDbgCheck, spiIgnore(), MMCConfig::spip, spiReceive(), spiStop(), and spiUnselect().

Here is the call graph for this function:

bool mmcStopSequentialRead ( MMCDriver mmcp)

Stops a sequential read gracefully.

Parameters
[in]mmcppointer to the MMCDriver object
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded.
HAL_FAILEDthe operation failed.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 688 of file hal_mmc_spi.c.

References BLK_READING, BLK_READY, MMCDriver::config, osalDbgCheck, recvr1(), MMCConfig::spip, spiSend(), and spiUnselect().

Here is the call graph for this function:

bool mmcStartSequentialWrite ( MMCDriver mmcp,
uint32_t  startblk 
)

Starts a sequential write.

Parameters
[in]mmcppointer to the MMCDriver object
[in]startblkfirst block to write
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded.
HAL_FAILEDthe operation failed.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 722 of file hal_mmc_spi.c.

References BLK_READY, BLK_WRITING, MMCDriver::config, MMCConfig::hscfg, MMCSD_BLOCK_SIZE, osalDbgAssert, osalDbgCheck, recvr1(), send_hdr(), MMCConfig::spip, spiSelect(), spiStart(), and spiStop().

Here is the call graph for this function:

bool mmcSequentialWrite ( MMCDriver mmcp,
const uint8_t *  buffer 
)

Writes a block within a sequential write operation.

Parameters
[in]mmcppointer to the MMCDriver object
[out]bufferpointer to the write buffer
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded.
HAL_FAILEDthe operation failed.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 760 of file hal_mmc_spi.c.

References BLK_READY, BLK_WRITING, MMCDriver::config, MMCSD_BLOCK_SIZE, osalDbgCheck, spiIgnore(), MMCConfig::spip, spiReceive(), spiSend(), spiStop(), spiUnselect(), and wait().

Here is the call graph for this function:

bool mmcStopSequentialWrite ( MMCDriver mmcp)

Stops a sequential write gracefully.

Parameters
[in]mmcppointer to the MMCDriver object
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded.
HAL_FAILEDthe operation failed.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 797 of file hal_mmc_spi.c.

References BLK_READY, BLK_WRITING, MMCDriver::config, osalDbgCheck, MMCConfig::spip, spiSend(), and spiUnselect().

Here is the call graph for this function:

bool mmcSync ( MMCDriver mmcp)

Waits for card idle condition.

Parameters
[in]mmcppointer to the MMCDriver object
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded.
HAL_FAILEDthe operation failed.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 825 of file hal_mmc_spi.c.

References BLK_READY, BLK_SYNCING, MMCDriver::config, MMCConfig::hscfg, osalDbgCheck, MMCConfig::spip, spiStart(), and sync().

Here is the call graph for this function:

bool mmcGetInfo ( MMCDriver mmcp,
BlockDeviceInfo bdip 
)

Returns the media info.

Parameters
[in]mmcppointer to the MMCDriver object
[out]bdippointer to a BlockDeviceInfo structure
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded.
HAL_FAILEDthe operation failed.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 856 of file hal_mmc_spi.c.

References BlockDeviceInfo::blk_num, BLK_READY, BlockDeviceInfo::blk_size, MMCSD_BLOCK_SIZE, and osalDbgCheck.

bool mmcErase ( MMCDriver mmcp,
uint32_t  startblk,
uint32_t  endblk 
)

Erases blocks.

Parameters
[in]mmcppointer to the MMCDriver object
[in]startblkstarting block number
[in]endblkending block number
Returns
The operation status.
Return values
HAL_SUCCESSthe operation succeeded.
HAL_FAILEDthe operation failed.
Function Class:Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 883 of file hal_mmc_spi.c.

References BLK_READY, BLK_WRITING, MMCDriver::config, MMCSD_BLOCK_SIZE, osalDbgCheck, send_command_R1(), MMCConfig::spip, and spiStop().

Here is the call graph for this function:

Variable Documentation

const struct MMCDriverVMT mmc_vmt
static
Initial value:
= {
(size_t)0,
(bool (*)(void *))mmc_lld_is_card_inserted,
(bool (*)(void *))mmc_lld_is_write_protected,
(bool (*)(void *))mmcConnect,
(bool (*)(void *))mmcDisconnect,
mmc_read,
mmc_write,
(bool (*)(void *))mmcSync,
(bool (*)(void *, BlockDeviceInfo *))mmcGetInfo
}
bool mmcConnect(MMCDriver *mmcp)
Performs the initialization procedure on the inserted card.
Definition: hal_mmc_spi.c:455
bool mmcGetInfo(MMCDriver *mmcp, BlockDeviceInfo *bdip)
Returns the media info.
Definition: hal_mmc_spi.c:856
bool mmcSync(MMCDriver *mmcp)
Waits for card idle condition.
Definition: hal_mmc_spi.c:825
Block device info.
Definition: hal_ioblock.h:55
bool mmcDisconnect(MMCDriver *mmcp)
Brings the driver in a state safe for card removal.
Definition: hal_mmc_spi.c:577

Virtual methods table.

Definition at line 55 of file hal_mmc_spi.c.

Referenced by mmcObjectInit().

const uint8_t crc7_lookup_table[256]
static
Initial value:
= {
0x00, 0x09, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53,
0x6c, 0x65, 0x7e, 0x77, 0x19, 0x10, 0x0b, 0x02, 0x3d, 0x34, 0x2f, 0x26,
0x51, 0x58, 0x43, 0x4a, 0x75, 0x7c, 0x67, 0x6e, 0x32, 0x3b, 0x20, 0x29,
0x16, 0x1f, 0x04, 0x0d, 0x7a, 0x73, 0x68, 0x61, 0x5e, 0x57, 0x4c, 0x45,
0x2b, 0x22, 0x39, 0x30, 0x0f, 0x06, 0x1d, 0x14, 0x63, 0x6a, 0x71, 0x78,
0x47, 0x4e, 0x55, 0x5c, 0x64, 0x6d, 0x76, 0x7f, 0x40, 0x49, 0x52, 0x5b,
0x2c, 0x25, 0x3e, 0x37, 0x08, 0x01, 0x1a, 0x13, 0x7d, 0x74, 0x6f, 0x66,
0x59, 0x50, 0x4b, 0x42, 0x35, 0x3c, 0x27, 0x2e, 0x11, 0x18, 0x03, 0x0a,
0x56, 0x5f, 0x44, 0x4d, 0x72, 0x7b, 0x60, 0x69, 0x1e, 0x17, 0x0c, 0x05,
0x3a, 0x33, 0x28, 0x21, 0x4f, 0x46, 0x5d, 0x54, 0x6b, 0x62, 0x79, 0x70,
0x07, 0x0e, 0x15, 0x1c, 0x23, 0x2a, 0x31, 0x38, 0x41, 0x48, 0x53, 0x5a,
0x65, 0x6c, 0x77, 0x7e, 0x09, 0x00, 0x1b, 0x12, 0x2d, 0x24, 0x3f, 0x36,
0x58, 0x51, 0x4a, 0x43, 0x7c, 0x75, 0x6e, 0x67, 0x10, 0x19, 0x02, 0x0b,
0x34, 0x3d, 0x26, 0x2f, 0x73, 0x7a, 0x61, 0x68, 0x57, 0x5e, 0x45, 0x4c,
0x3b, 0x32, 0x29, 0x20, 0x1f, 0x16, 0x0d, 0x04, 0x6a, 0x63, 0x78, 0x71,
0x4e, 0x47, 0x5c, 0x55, 0x22, 0x2b, 0x30, 0x39, 0x06, 0x0f, 0x14, 0x1d,
0x25, 0x2c, 0x37, 0x3e, 0x01, 0x08, 0x13, 0x1a, 0x6d, 0x64, 0x7f, 0x76,
0x49, 0x40, 0x5b, 0x52, 0x3c, 0x35, 0x2e, 0x27, 0x18, 0x11, 0x0a, 0x03,
0x74, 0x7d, 0x66, 0x6f, 0x50, 0x59, 0x42, 0x4b, 0x17, 0x1e, 0x05, 0x0c,
0x33, 0x3a, 0x21, 0x28, 0x5f, 0x56, 0x4d, 0x44, 0x7b, 0x72, 0x69, 0x60,
0x0e, 0x07, 0x1c, 0x15, 0x2a, 0x23, 0x38, 0x31, 0x46, 0x4f, 0x54, 0x5d,
0x62, 0x6b, 0x70, 0x79
}

Lookup table for CRC-7 ( based on polynomial x^7 + x^3 + 1).

Definition at line 70 of file hal_mmc_spi.c.

Referenced by crc7().