Чт мар 08, 2018 11:31:27
Чт мар 08, 2018 14:44:55
Чт мар 08, 2018 15:17:33
Вс апр 01, 2018 08:51:50
DSTATUS disk_initialize (BYTE);
DSTATUS disk_status (BYTE);
DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
DRESULT disk_write(BYTE, const BYTE*, DWORD, BYTE);
DRESULT disk_ioctl (BYTE, BYTE, void*);
DRESULT disk_read (
BYTE pdrv, /* Physical drive nmuber to identify the drive */
BYTE *buff, /* Data buffer to store read data */
DWORD sector, /* Start sector in LBA */
UINT count /* Number of sectors to read */
)
SD_ReadSector(uint32_t BlockNumb,uint8_t *buff)
DRESULT disk_read (
BYTE pdrv, /* Physical drive nmuber to identify the drive */
BYTE *buff, /* Data buffer to store read data */
DWORD sector, /* Start sector in LBA */
UINT count /* Number of sectors to read */
)
{
DRESULT res;
res = SD_ReadSector(sector, buff);
return res;
}
Ср май 02, 2018 18:11:17
Чт июл 12, 2018 02:47:32
FATFS mynewdiskFatFs; /* File system object for User logical drive */
FIL MyFile; /* File object */
char mynewdiskPath[4]; /* User logical drive path */
UINT wbytes; /* File write counts */
uint8_t wtext[] = "1123456789ABCDEF"; /* File write buffer */
if(FATFS_LinkDriver(&USER_Driver, mynewdiskPath) == 0)
{
if(f_mount(&mynewdiskFatFs, (TCHAR const*)mynewdiskPath, 0) == FR_OK)
{
if (f_mkfs((TCHAR const*)mynewdiskPath,0,512) == FR_OK)
if(f_open(&MyFile, "STM32.TXT", FA_CREATE_ALWAYS | FA_WRITE) == FR_OK)
{
if(f_write(&MyFile, wtext, sizeof(wtext), &wbytes) == FR_OK);
{
if (f_close(&MyFile) != FR_OK)
while (1);
}
}
}
}
FATFS_UnLinkDriver(mynewdiskPath);
uint8_t wtext[] = "123456789ABCDEF";
Пт июл 13, 2018 04:28:00
0x8002276 BLX R3
LDR R3, [R3, #0x10]
LDR R3, [R3, #0x0С]
Пт июл 13, 2018 07:44:56
/*----------/
/ System Configurations
/----------*/
#define _WORD_ACCESS 0
/* The _WORD_ACCESS option is an only platform dependent option. It defines
/ which access method is used to the word data on the FAT volume.
/
/ 0: Byte-by-byte access. Always compatible with all platforms.
/ 1: Word access. Do not choose this unless under both the following conditions.
/
/ * Address misaligned memory access is always allowed for ALL instructions.
/ * Byte order on the memory is little-endian.
/
/ If it is the case, _WORD_ACCESS can also be set to 1 to improve performance and
/ reduce code size. Following table shows an example of some processor types.
/
/ ARM7TDMI 0 ColdFire 0 V850E 0
/ Cortex-M3 0 Z80 0/1 V850ES 0/1
/ Cortex-M0 0 RX600(LE) 0/1 TLCS-870 0/1
/ AVR 0/1 RX600(BE) 0 TLCS-900 0/1
/ AVR32 0 RL78 0 R32C 0
/ PIC18 0/1 SH-2 0 M16C 0/1
/ PIC24 0 H8S 0 MSP430 0
/ PIC32 0 H8/300H 0 x86 0/1
*/
Пт июл 13, 2018 07:55:04
Чт авг 09, 2018 15:33:04
Пт сен 07, 2018 07:20:25
Сб сен 08, 2018 08:34:32
Вс сен 23, 2018 04:18:01