<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<IP DBVersion="V4.0" Name="FATFS" Version="STM32Cube_FW_G0_V0.7.0" RootFolder="Middlewares/Third_Party/FatFs/" CodeTemplate="fatfs_c_new.ftl;fatfs_h.ftl"
    IncludeFile="ff.h;ff_gen_drv.h"
    xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance"
    ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/IP_Configs.xsd"
    xmlns="http://mcd.rou.st.com/modules.php?name=mcu">

    <!-- Useless modes removed (for G0, keep only FATFS_USER_DEFINED_Init) -->
   
    <RefConfig Name="FATFS_USER_DEFINED_Init" Comment="USER">  <!-- The only one valid on G0 (right now) -->
        <Component Name="Middleware:FATFS:GENERIC"/>
        <Component Name="Middleware:FATFS:CODE_PAGE:$VIRTUAL_CODE_PAGE"/>
        <ConfigFile Name="FF_CONF"/>
        <ConfigFile Name="USER_DISKIO_C"/>
        <ConfigFile Name="USER_DISKIO_H"/>
        <ConfigFile Name="FATFS_INIT"/>
        <ConfigFile Name="FATFS_HEADER"/>
    </RefConfig>
    
    <RefComponent Cclass="Middleware" Cgroup="FATFS" Cversion="0.1.0">
        <!-- <File Name="src/*.h" Category="header"/>  -->
        <File Name="src/diskio.h" Category="header"/>
        <File Name="src/ff.h" Category="header"/>
        <File Name="src/ff_gen_drv.h" Category="header"/>
        <File Name="src/integer.h" Category="header"/>
        
        <!--  <File Name="src/*.c" Category="source"/> -->
        <File Name="src/diskio.c" Category="source"/>
        <File Name="src/ff.c" Category="source"/>
        <File Name="src/ff_gen_drv.c" Category="source"/>

        <File Name="src/option/syscall.c" Category="source"/>

        <SubComponent Csub="CODE_PAGE" Cvariant="932" >
            <File Name="src/option/cc932.c" Category="source"/>
        </SubComponent>
        <SubComponent Csub="CODE_PAGE" Cvariant="936" >
            <File Name="src/option/cc936.c" Category="source"/>
        </SubComponent>
        <SubComponent Csub="CODE_PAGE" Cvariant="949" >
            <File Name="src/option/cc949.c" Category="source"/>
        </SubComponent>
        <SubComponent Csub="CODE_PAGE" Cvariant="950" >
            <File Name="src/option/cc950.c" Category="source"/>
        </SubComponent>
        <SubComponent Csub="CODE_PAGE" Cvariant="850" >
            <File Name="src/option/ccsbcs.c" Category="source"/>
        </SubComponent>
    </RefComponent>

    <!-- use specific template file "fatfs_conf_R12c.ftl" to generate header file containing #define -->
    <RefConfigFile Name="FF_CONF" Description="Header file for #define" Template="fatfs_conf_R12c - new tag.ftl">   <!-- BZ 79246 -->
        <File Name="Target/ffconf.h" Category="header" Version="R0.12" Condition="all"/>
        <!-- Parameters for Function and Buffer Configurations -->
        <Argument Name="_FS_TINY" GenericType="simple" Comment="0:Normal or 1:Tiny"/>
        <Argument Name="_FS_READONLY" GenericType="simple" Comment="0:Read/Write or 1:Read only"/>
        <Argument Name="_FS_MINIMIZE" GenericType="simple" Comment="0 to 3"/>
        <Argument Name="_USE_STRFUNC" GenericType="simple" Comment="0:Disable or 1-2:Enable"/>
        <Argument Name="_USE_FIND" GenericType="simple" Comment="0:Disable or 1:Enable"/>                  <!-- New in R0.11 --> 
        <Argument Name="_USE_MKFS" GenericType="simple" Comment="0:Disable or 1:Enable"/>
        <Argument Name="_USE_FORWARD" GenericType="simple" Comment="0:Disable or 1:Enable"/>
        <Argument Name="_USE_LABEL" GenericType="simple" Comment="0:Disable or 1:Enable"/>
        <Argument Name="_USE_FASTSEEK" GenericType="simple" Comment="0:Disable or 1:Enable"/>
        <!-- Parameters for Locale and Namespace Configurations -->
        <Argument Name="_CODE_PAGE" GenericType="simple" Comment="The _CODE_PAGE specifies the OEM code page to be used on the target system"/>
        <Argument Name="_USE_LFN" GenericType="simple" Comment="0 to 3"/>
        <Argument Name="_MAX_LFN" GenericType="simple" Comment="Maximum LFN length to handle (12 to 255)"/>
        <Argument Name="_LFN_UNICODE" GenericType="simple" Comment="0:ANSI/OEM or 1:Unicode"/>
        <Argument Name="_STRF_ENCODE" GenericType="simple" Comment="0:ANSI/OEM, 1:UTF-16LE, 2:UTF-16BE, 3:UTF-8"/>
        <Argument Name="_FS_RPATH" GenericType="simple" Comment="0 to 2"/>	
        <!-- Parameters for Physical Drive Configurations  -->
        <Argument Name="_VOLUMES" GenericType="simple" Comment="Number of volumes (logical drives) to be used"/>
        <Argument Name="_MAX_SS" GenericType="simple" Comment="512, 1024, 2048 or 4096"/>
        <Argument Name="_MIN_SS" GenericType="simple" Comment="512, 1024, 2048 or 4096"/>
        <Argument Name="_MULTI_PARTITION" GenericType="simple" Comment="0:Single partition, 1:Enable multiple partition"/>
        <Argument Name="_USE_TRIM" GenericType="simple" Comment="0:Disable or 1:Enable"/>                  <!-- Renamed in R0.11 --> 
        <Argument Name="_FS_NOFSINFO" GenericType="simple" Comment="0: Load all informations in the FSINFO if available, 1: Do not trust free cluster count in the FSINFO"/>
        <!-- Parameters for System Configurations   -->
        <Argument Name="_FS_NORTC" GenericType="simple" Comment="0 or 1"/>                                 <!-- New in R0.11 -->  
        <Argument Name="_NORTC_YEAR" GenericType="simple" Comment="1980..2107"/>                           <!-- New in R0.11 -->  
        <Argument Name="_NORTC_MON" GenericType="simple" Comment="1..12"/>                                 <!-- New in R0.11 -->  
        <Argument Name="_NORTC_MDAY" GenericType="simple" Comment="1..31"/>                                <!-- New in R0.11 -->  
        <Argument Name="_WORD_ACCESS" GenericType="simple" Comment="0 or 1"/>
        <Argument Name="_FS_REENTRANT" GenericType="simple" Comment="0:Disable or 1:Enable"/>
        <Argument Name="_FS_TIMEOUT" GenericType="simple" Comment="Timeout period in unit of time ticks"/>
        <Argument Name="_SYNC_t" GenericType="simple" Comment="O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.."/>		
        <Argument Name="_FS_LOCK" GenericType="simple" Comment="0:Disable or >=1:Enable"/>        
        <!-- Internal: for detecting enabled modes and include the right files -->
        <Argument Name="_FS_FATFS_SDIO" GenericType="simple" Comment="0:Disable or >=1:Enable"/> 
        <Argument Name="_FS_FATFS_SDRAM" GenericType="simple" Comment="0:Disable or >=1:Enable"/> 
        <Argument Name="_FS_FATFS_SRAM" GenericType="simple" Comment="0:Disable or >=1:Enable"/> 
        <Argument Name="_FS_FATFS_USB" GenericType="simple" Comment="0:Disable or >=1:Enable"/> 
        <!-- To get the right handle for USBH (FS or HS) -->
        <Argument Name="_HUSBH" GenericType="simple" Comment=""/>
        <!-- R0.12 -->
        <Argument Name="_USE_EXPAND" GenericType="simple" Comment=""/>
        <Argument Name="_USE_CHMOD" GenericType="simple" Comment=""/>
        <Argument Name="_FS_EXFAT" GenericType="simple" Comment=""/>
        <!-- To better support CMSIS-RTOS v2 with updated FatFS syscall.c -->
        <Argument Name="_USE_MUTEX" GenericType="simple" Comment="FatFS synchronization object"/>
    </RefConfigFile> 


    <!-- Generate a generic diskio C driver file (user_diskio.c file)  -->
    <RefConfigFile Name="USER_DISKIO_C" Description="GENERIC C diskio driver file" Template="fatfs_user_diskio_c.ftl">       
        <File Name="Target/user_diskio.c" Category="source" Version="R0.12" Condition="!USER_SD_DISKIO"/>    
        <Argument Name="NEW_DISKIO_API" GenericType="simple" Comment=""/>
    </RefConfigFile>
    
    <!-- Generate a generic diskio H driver file (user_diskio.h file -->
    <RefConfigFile Name="USER_DISKIO_H" Description="GENERIC H driver file" Template="fatfs_user_diskio_h.ftl">       
        <File Name="Target/user_diskio.h" Category="header" Version="R0.12" Condition="!USER_SD_DISKIO"/>                    
    </RefConfigFile>
    
    <!-- Generate the sd.diskio.c driver file (if user selects in advanced tab the "SD" choice) -->
    <RefConfigFile Name="USER_DISKIO_C" Description="SD C diskio driver file" Template="fatfs_user_sd_diskio_c_g0.ftl">       
        <File Name="Target/sd_diskio.c" Category="source" Version="R0.12" Condition="USER_SD_DISKIO"/>    
    </RefConfigFile>
    
    <!-- Generate the sd_diskio.h driver file (if user selects in advanced tab the "SD" choice) -->
    <RefConfigFile Name="USER_DISKIO_H" Description="SD H driver file" Template="fatfs_user_sd_diskio_h_g0.ftl">       
        <File Name="Target/sd_diskio.h" Category="header" Version="R0.12" Condition="USER_SD_DISKIO"/>   
        <Argument Name="BOARD_NAME" GenericType="simple" Comment=""/>                 
    </RefConfigFile>    


    <!-- Generate a init code file (app_fatfs.c) -->
    <RefConfigFile Name="FATFS_INIT" Description="FATFS Init code file" Template="fatfs_init_g0_wb.ftl">       
        <File Name="App/app_fatfs.c" Category="source" Version="R0.12" Condition="all"/>        
        <Argument Name="_FS_NORTC" GenericType="simple" Comment="0 or 1"/>                           <!-- New in R0.11 -->                  
        <Argument Name="_MULTI_PARTITION" GenericType="simple" Comment="0 or 1"/>
        <Argument Name="DISKIO_CODE" GenericType="simple" Comment=""/>
    </RefConfigFile>
    
    <!-- Generate header for the init code file (app_fatfs.h) -->
    <RefConfigFile Name="FATFS_HEADER" Description="FATFS header file" Template="fatfs_header_g0_wb.ftl">       
        <File Name="App/app_fatfs.h" Category="source" Version="R0.12" Condition="all"/>
        <Argument Name="DISKIO_CODE" GenericType="simple" Comment=""/>
    </RefConfigFile>

    <!-- Code for BSP (SDIO mode) -->
    <!--  
    <RefBspComponent Name="Detect_SDIO" BspIpName="GPIO" BspModeName="Input">       
        <File Category="template" Name="fatfs_platform_h.ftl"/>
        <File Category="template" Name="fatfs_platform_c.ftl"/>
    </RefBspComponent>
    -->

</IP>
