⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sd_raw_config.h

📁 AVR单片机上跑的MMC卡加FAT16文件系统的例程
💻 H
字号:
#ifndef SD_RAW_CONFIG_H#define SD_RAW_CONFIG_H/** * \addtogroup sd_raw * * @{ *//** * \file * MMC/SD support configuration. *//** * \ingroup sd_raw_config * Controls MMC/SD write support. * * Set to 1 to enable MMC/SD write support, set to 0 to disable it. */#define SD_RAW_WRITE_SUPPORT 0/** * \ingroup sd_raw_config * Controls MMC/SD access buffering. *  * Set to 1 to save static RAM, but be aware that you will * lose performance. * * \note When SD_RAW_WRITE_SUPPORT is 1, SD_RAW_SAVE_RAM will *       be reset to 0. */#define SD_RAW_SAVE_RAM 1/* defines for customisation of sd/mmc port access */
/*#define configure_pin_available() DDRC &= ~(1 << DDC4)#define configure_pin_locked() DDRC &= ~(1 << DDC5)#define configure_pin_mosi() DDRB |= (1 << DDB3)#define configure_pin_sck() DDRB |= (1 << DDB5)#define configure_pin_ss() DDRB |= (1 << DDB2)#define configure_pin_miso() DDRB &= ~(1 << DDB4)#define get_pin_available() ((PINC >> PC4) & 0x01)#define get_pin_locked() ((PINC >> PC5) & 0x01)#define select_card() PORTC &= ~(1 << PB2)#define unselect_card() PORTC |= (1 << PB2)
*/

#define configure_pin_available() DDRB &= ~(1 << DDB2)#define configure_pin_locked() DDRB &= ~(1 << DDB3)#define configure_pin_mosi() DDRB |= (1 << DDB5)#define configure_pin_sck() DDRB |= (1 << DDB7)#define configure_pin_ss() DDRB |= (1 << DDB4)#define configure_pin_miso() DDRB &= ~(1 << DDB6)#define get_pin_available() ((PINB >> PB2) & 0x01)#define get_pin_locked() ((PINB >> PB3) & 0x01)#define select_card() PORTB &= ~(1 << PB4)#define unselect_card() PORTB |= (1 << PB4)/** * @} *//* configuration checks */#if SD_RAW_WRITE_SUPPORT#undef SD_RAW_SAVE_RAM#define SD_RAW_SAVE_RAM 0#endif#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -