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 <tamtypes.h>
8
9typedef u8 uint8_t;
10typedef u16 uint16_t;
11typedef u32 uint32_t;
12
13typedef s8 int8_t;
14typedef s16 int16_t;
15typedef s32 int32_t;
16
17#define SPISD_ASSERT(cond) \
18 while (!cond) {};
19
20
21
22#define SD_CRC7_MODE_ROM_TABLE 1 /* Table in ROM, no need to generate it */
23#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 */
24#define SD_CRC7_MODE_RUNTIME 3 /* if you have no free ROM and RAM, but it is slow */
25
26
27#if BUILD_BOOTLOADER == 1U
28#define SD_CRC7_MODE (SD_CRC7_MODE_RUNTIME)
29#else
30#define SD_CRC7_MODE (SD_CRC7_MODE_RAM_TABLE)
31#endif
32
33#endif //__SPI_SDCARD_DRIVER_CONFIG_H__