PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
spi_sdcard_driver_config.h
1#ifndef __SPI_SDCARD_DRIVER_CONFIG_H__
2#define __SPI_SDCARD_DRIVER_CONFIG_H__
3
4/* Includes ------------------------------------------------------------------*/
5
6#include <stdio.h>
7#include <stdint.h>
8
9#define SPISD_ASSERT(cond) \
10 while (!cond) {};
11
12
13
14#define SD_CRC7_MODE_ROM_TABLE 1 /* Table in ROM, no need to generate it */
15#define SD_CRC7_MODE_RAM_TABLE 2 /* if you have no free 256B ROM or ROM is slow. Use crc7_generate_table() to init table */
16#define SD_CRC7_MODE_RUNTIME 3 /* if you have no free ROM and RAM, but it is slow */
17
18
19#if BUILD_BOOTLOADER == 1U
20#define SD_CRC7_MODE (SD_CRC7_MODE_RUNTIME)
21#else
22#define SD_CRC7_MODE (SD_CRC7_MODE_RAM_TABLE)
23#endif
24
25#endif //__SPI_SDCARD_DRIVER_CONFIG_H__