disk_defines.h
Go to the documentation of this file.
1 #ifndef _DISK_DEFINES
2 #define _DISK_DEFINES
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 
8 
9 /* Command code for disk_ioctrl() */
10 /* Generic command (used by FatFs) */
11 #define CTRL_SYNC 0 /* Flush disk cache (for write functions) */
12 #define GET_SECTOR_COUNT 1 /* Get media size (for only f_mkfs()) */
13 #define GET_SECTOR_SIZE 2 /* Get sector size (for multiple sector size (_MAX_SS >= 1024)) */
14 #define GET_BLOCK_SIZE 3 /* Get erase block size (for only f_mkfs()) */
15 #define CTRL_ERASE_SECTOR 4 /* Force erased a block of sectors (for only _USE_ERASE) */
16 
17 /* Generic command (not used by FatFs) */
18 #define CTRL_POWER 5 /* Get/Set power status */
19 #define CTRL_LOCK 6 /* Lock/Unlock media removal */
20 #define CTRL_EJECT 7 /* Eject media */
21 #define CTRL_FORMAT 8 /* Create physical format on the media */
22 
23 /* Disk Status Bits (DSTATUS) */
24 #define STA_NOINIT 0x01 /* Drive not initialized */
25 #define STA_NODISK 0x02 /* No medium in the drive */
26 #define STA_PROTECT 0x04 /* Write protected */
27 
28 
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 #endif