feat: add matlab code to display soc
parent
4a623a0def
commit
ab99333dad
171
.cproject
171
.cproject
|
|
@ -28,17 +28,17 @@
|
|||
<listOptionValue builtIn="false" value="PRODUCT_MACRO_IMPORTS={"MSPM0-SDK":["${COM_TI_MSPM0_SDK_INCLUDE_PATH}","${COM_TI_MSPM0_SDK_LIBRARY_PATH}","${COM_TI_MSPM0_SDK_LIBRARIES}","${COM_TI_MSPM0_SDK_SYMBOLS}","${COM_TI_MSPM0_SDK_SYSCONFIG_MANIFEST}"],"sysconfig":["${SYSCONFIG_TOOL_INCLUDE_PATH}","${SYSCONFIG_TOOL_LIBRARY_PATH}","${SYSCONFIG_TOOL_LIBRARIES}","${SYSCONFIG_TOOL_SYMBOLS}","${SYSCONFIG_TOOL_SYSCONFIG_MANIFEST}"]}"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1441869120" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="TICLANG_3.2.2.LTS" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1441869120" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="TICLANG_3.2.2.LTS" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.targetPlatformDebug.282527312" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.builderDebug.1680394270" name="GNU Make.Debug" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.builderDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.builderDebug.1680394270" keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.compilerDebug.1319185687" name="Arm Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MARCH.1386291173" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MARCH" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MARCH.thumbv6m" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MCPU.1308209781" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MCPU" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MCPU.cortex-m0plus" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MFLOAT_ABI.1861285084" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MFLOAT_ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MFLOAT_ABI.soft" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.ENDIAN_NESS__BIG_LITTLE.1313851796" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.ENDIAN_NESS__BIG_LITTLE" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.ENDIAN_NESS__BIG_LITTLE.MLITTLE_ENDIAN" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB.1615507823" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB.MTHUMB" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.OPT_LEVEL.981750919" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.OPT_LEVEL.2" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.INCLUDE_PATH.990394533" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MARCH.1386291173" name="Select ARM architecture variant (-march)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MARCH" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MARCH.thumbv6m" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MCPU.1308209781" name="Select ARM processor variant (-mcpu)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MCPU" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MCPU.cortex-m0plus" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MFLOAT_ABI.1861285084" name="Select assumed floating-point ABI (-mfloat-abi)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MFLOAT_ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MFLOAT_ABI.soft" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.ENDIAN_NESS__BIG_LITTLE.1313851796" name="Endian-ness (big/little) [See 'General' page to edit]" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.ENDIAN_NESS__BIG_LITTLE" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.ENDIAN_NESS__BIG_LITTLE.MLITTLE_ENDIAN" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB.1615507823" name="Select processor mode (arm/thumb)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB.MTHUMB" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.OPT_LEVEL.981750919" name="Select optimization paradigm/level (-O)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.OPT_LEVEL.2" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.INCLUDE_PATH.990394533" name="Add dir to #include search path (-I)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_INCLUDE_PATH}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_INCLUDE_PATH}"/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/mspm0g3507_mcal/NOR_FLASH}"/>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source/third_party/CMSIS/Core/Include"/>
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.DEFINE.1671923118" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.DEFINE.1671923118" name="Pre-define NAME (-D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_SYMBOLS}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_SYMBOLS}"/>
|
||||
<listOptionValue builtIn="false" value="TIMER_INPUTCAPTURE_CONFIG_N"/>
|
||||
|
|
@ -59,10 +59,10 @@
|
|||
<listOptionValue builtIn="false" value="ADC_DMA_CONFIG_N"/>
|
||||
<listOptionValue builtIn="false" value="SYSTIC_CONFIG"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.GENERATE_DWARF_DEBUG.152000460" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.GENERATE_DWARF_DEBUG" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.GENERATE_DWARF_DEBUG.GDWARF_3" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_C.2037145871" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_C" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_C.c11" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_CPP.195987648" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_CPP" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_CPP.c++11" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.CMD_FILE.1999771119" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.CMD_FILE" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.GENERATE_DWARF_DEBUG.152000460" name="Generate DWARF debug" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.GENERATE_DWARF_DEBUG" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.GENERATE_DWARF_DEBUG.GDWARF_3" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_C.2037145871" name="Select assumed C language standard (-std)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_C" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_C.c11" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_CPP.195987648" name="Select assumed C++ language standard (-std)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_CPP" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_CPP.c++11" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.CMD_FILE.1999771119" name="Read options from specified file (@)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.CMD_FILE" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="syscfg/device.opt"/>
|
||||
</option>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__C_SRCS.1390775283" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__C_SRCS"/>
|
||||
|
|
@ -71,15 +71,15 @@
|
|||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__ASM2_SRCS.156756422" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__ASM2_SRCS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.linkerDebug.585440518" name="Arm Linker" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.linkerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.MAP_FILE.1296545298" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.MAP_FILE" value="${ProjName}.map" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.OUTPUT_FILE.1594995317" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.LIBRARY.1562370862" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.LIBRARY" valueType="libs">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.MAP_FILE.1296545298" name="Link information (map) listed into <file> (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.MAP_FILE" value="${ProjName}.map" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.OUTPUT_FILE.1594995317" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.LIBRARY.1562370862" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.LIBRARY" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_LIBRARIES}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_LIBRARIES}"/>
|
||||
<listOptionValue builtIn="false" value="device.cmd.genlibs"/>
|
||||
<listOptionValue builtIn="false" value="libc.a"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.SEARCH_PATH.393206716" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.SEARCH_PATH.393206716" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_LIBRARY_PATH}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_LIBRARY_PATH}"/>
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source"/>
|
||||
|
|
@ -87,28 +87,149 @@
|
|||
<listOptionValue builtIn="false" value="${PROJECT_BUILD_DIR}/syscfg"/>
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/lib"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.REREAD_LIBS.275052127" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.REREAD_LIBS" value="false" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DIAG_WRAP.1044045666" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DISPLAY_ERROR_NUMBER.1652798618" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.XML_LINK_INFO.1513763569" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.XML_LINK_INFO" value="${ProjName}_linkInfo.xml" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.REREAD_LIBS.275052127" name="Reread libraries; resolve backward references (--reread_libs, -x)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.REREAD_LIBS" value="false" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DIAG_WRAP.1044045666" name="Wrap diagnostic messages (--diag_wrap) [deprecated]" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DISPLAY_ERROR_NUMBER.1652798618" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.XML_LINK_INFO.1513763569" name="Detailed link information data-base into <file> (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.XML_LINK_INFO" value="${ProjName}_linkInfo.xml" valueType="string"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__CMD_SRCS.1956473094" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__CMD_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__CMD2_SRCS.1609943516" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__CMD2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__GEN_CMDS.234148369" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__GEN_CMDS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.1617833651" name="Arm Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.TOOL_ENABLE.279107637" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.TOOL_ENABLE" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT.458870988" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT.INTEL" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.TOOL_ENABLE.279107637" name="Enable tool" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.TOOL_ENABLE" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT.458870988" name="Output format" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT.INTEL" valueType="enumerated"/>
|
||||
<outputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.outputType__BIN.23424406" name="Binary File" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.outputType__BIN"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.objcopy.1262868733" name="Arm Objcopy Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.objcopy"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.sysConfig.2123989182" name="SysConfig" superClass="com.ti.ccstudio.buildDefinitions.sysConfig">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS.211488039" superClass="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS" valueType="stringList">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS.211488039" name="Root system config meta data file in a product or SDK (-s, --product)" superClass="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_SYSCONFIG_MANIFEST}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_SYSCONFIG_MANIFEST}"/>
|
||||
</option>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="mspm0g3507.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.40547792.728101280">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.40547792.728101280" moduleId="org.eclipse.cdt.core.settings" name="AAR">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.SysConfigErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.40547792.728101280" name="AAR" parent="com.ti.ccstudio.buildDefinitions.TMS470.Debug">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.40547792.728101280." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.DebugToolchain.628117857" name="TI Build Tools" secondaryOutputs="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.outputType__BIN.805220429" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.linkerDebug.1688408508">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.315840291" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=Cortex M.MSPM0G3507"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_CORE_ID=CORTEX_M0P"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
|
||||
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY="/>
|
||||
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=6.1.3"/>
|
||||
<listOptionValue builtIn="false" value="PRODUCTS=MSPM0-SDK:1.20.1.06;sysconfig:1.18.0;"/>
|
||||
<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE=mspm0g3507.cmd"/>
|
||||
<listOptionValue builtIn="false" value="PRODUCT_MACRO_IMPORTS={"MSPM0-SDK":["${COM_TI_MSPM0_SDK_INCLUDE_PATH}","${COM_TI_MSPM0_SDK_LIBRARY_PATH}","${COM_TI_MSPM0_SDK_LIBRARIES}","${COM_TI_MSPM0_SDK_SYMBOLS}","${COM_TI_MSPM0_SDK_SYSCONFIG_MANIFEST}"],"sysconfig":["${SYSCONFIG_TOOL_INCLUDE_PATH}","${SYSCONFIG_TOOL_LIBRARY_PATH}","${SYSCONFIG_TOOL_LIBRARIES}","${SYSCONFIG_TOOL_SYMBOLS}","${SYSCONFIG_TOOL_SYSCONFIG_MANIFEST}"]}"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.727925986" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="TICLANG_3.2.2.LTS" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.targetPlatformDebug.576434557" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.builderDebug.1469502118" keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.compilerDebug.1802200223" name="Arm Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MARCH.1806156358" name="Select ARM architecture variant (-march)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MARCH" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MARCH.thumbv6m" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MCPU.330445047" name="Select ARM processor variant (-mcpu)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MCPU" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MCPU.cortex-m0plus" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MFLOAT_ABI.1263356892" name="Select assumed floating-point ABI (-mfloat-abi)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MFLOAT_ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.MFLOAT_ABI.soft" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.ENDIAN_NESS__BIG_LITTLE.916146006" name="Endian-ness (big/little) [See 'General' page to edit]" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.ENDIAN_NESS__BIG_LITTLE" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.ENDIAN_NESS__BIG_LITTLE.MLITTLE_ENDIAN" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB.1123563537" name="Select processor mode (arm/thumb)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB.MTHUMB" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.OPT_LEVEL.1650513103" name="Select optimization paradigm/level (-O)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.OPT_LEVEL.2" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.INCLUDE_PATH.1013793506" name="Add dir to #include search path (-I)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.INCLUDE_PATH" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_INCLUDE_PATH}"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ivec_RTE/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ivec_APP/inc}""/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_INCLUDE_PATH}"/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/mspm0g3507_mcal/NOR_FLASH}"/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/mspm0g3507_mcal/NOR_FLASH/platform}"/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc:/mspm0g3507_mcal/NOR_FLASH/SDK}"/>
|
||||
<listOptionValue builtIn="false" value="${PROJECT_ROOT}"/>
|
||||
<listOptionValue builtIn="false" value="${PROJECT_ROOT}/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source/third_party/CMSIS/Core/Include"/>
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.DEFINE.1603334522" name="Pre-define NAME (-D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_SYMBOLS}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_SYMBOLS}"/>
|
||||
<listOptionValue builtIn="false" value="TIMER_INPUTCAPTURE_CONFIG_N"/>
|
||||
<listOptionValue builtIn="false" value="TIMER_PWM_CONFIG_N"/>
|
||||
<listOptionValue builtIn="false" value="ADC_CONFIG_N"/>
|
||||
<listOptionValue builtIn="false" value="TIMER_CONFIG_N"/>
|
||||
<listOptionValue builtIn="false" value="ADC_DMA_CONFIG_N"/>
|
||||
<listOptionValue builtIn="false" value="SYSTIC_CONFIG"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.GENERATE_DWARF_DEBUG.2067919225" name="Generate DWARF debug" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.GENERATE_DWARF_DEBUG" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.GENERATE_DWARF_DEBUG.GDWARF_3" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_C.638461944" name="Select assumed C language standard (-std)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_C" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_C.c11" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_CPP.554926226" name="Select assumed C++ language standard (-std)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_CPP" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.STD_CPP.c++11" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.CMD_FILE.415400464" name="Read options from specified file (@)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compilerID.CMD_FILE" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="syscfg/device.opt"/>
|
||||
</option>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__C_SRCS.2114295762" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__CPP_SRCS.750954817" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__ASM_SRCS.535467427" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__ASM2_SRCS.1971216966" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.compiler.inputType__ASM2_SRCS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.linkerDebug.1688408508" name="Arm Linker" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exe.linkerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.MAP_FILE.1334792167" name="Link information (map) listed into <file> (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.MAP_FILE" value="${ProjName}.map" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.OUTPUT_FILE.1984758550" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.LIBRARY.1526938562" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.LIBRARY" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_LIBRARIES}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_LIBRARIES}"/>
|
||||
<listOptionValue builtIn="false" value="device.cmd.genlibs"/>
|
||||
<listOptionValue builtIn="false" value="libc.a"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.SEARCH_PATH.323885802" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_LIBRARY_PATH}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_LIBRARY_PATH}"/>
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source"/>
|
||||
<listOptionValue builtIn="false" value="${PROJECT_ROOT}"/>
|
||||
<listOptionValue builtIn="false" value="${PROJECT_BUILD_DIR}/syscfg"/>
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/lib"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.REREAD_LIBS.48885400" name="Reread libraries; resolve backward references (--reread_libs, -x)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.REREAD_LIBS" value="false" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DIAG_WRAP.381671417" name="Wrap diagnostic messages (--diag_wrap) [deprecated]" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DISPLAY_ERROR_NUMBER.1770505532" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.XML_LINK_INFO.1624353162" name="Detailed link information data-base into <file> (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.linkerID.XML_LINK_INFO" value="${ProjName}_linkInfo.xml" valueType="string"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__CMD_SRCS.2066296059" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__CMD_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__CMD2_SRCS.251671814" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__CMD2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__GEN_CMDS.531791455" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.exeLinker.inputType__GEN_CMDS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.2121214488" name="Arm Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.TOOL_ENABLE.780713038" name="Enable tool" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.TOOL_ENABLE" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT.802141661" name="Output format" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.OUTPUT_FORMAT.INTEL" valueType="enumerated"/>
|
||||
<outputType id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.outputType__BIN.805220429" name="Binary File" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.hex.outputType__BIN"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.objcopy.556702777" name="Arm Objcopy Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_3.2.objcopy"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.sysConfig.293665288" name="SysConfig" superClass="com.ti.ccstudio.buildDefinitions.sysConfig">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS.431413943" name="Root system config meta data file in a product or SDK (-s, --product)" superClass="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_MSPM0_SDK_SYSCONFIG_MANIFEST}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_SYSCONFIG_MANIFEST}"/>
|
||||
</option>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="bs_touchAndLcd|mspm0g3507.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@
|
|||
/Debug/
|
||||
/dvt/
|
||||
/.jxbrowser.userdata
|
||||
/AAR/
|
||||
|
|
|
|||
|
|
@ -1,8 +1,31 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding//Debug/Core/Source/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/Core/Source/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/Generated\ Codes/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/Generated\ Codes/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/Core/Source/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/Core/Source/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/Generated\ Codes/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/Generated\ Codes/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/TM1650_SDK/src/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/TM1650_SDK/src/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/bs_touchAndLcd/socTouchDisplay_ert_rtw/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/bs_touchAndLcd/socTouchDisplay_ert_rtw/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/bs_touchAndLcd/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/bs_touchAndLcd/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/ivec_APP/src/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/ivec_APP/src/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/ivec_ECU/ivec_ecu_can/src/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/ivec_ECU/ivec_ecu_can/src/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/ivec_ECU/ivec_ecu_common/src/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/ivec_ECU/ivec_ecu_common/src/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/ivec_ECU/ivec_ecu_uart/src/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/ivec_ECU/ivec_ecu_uart/src/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/ivec_RTE/src/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/ivec_RTE/src/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/makefile=UTF-8
|
||||
encoding//AAR/objects.mk=UTF-8
|
||||
encoding//AAR/sources.mk=UTF-8
|
||||
encoding//AAR/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/subdir_vars.mk=UTF-8
|
||||
encoding//AAR/utils/subdir_rules.mk=UTF-8
|
||||
encoding//AAR/utils/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/LCD_1604/interface/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/LCD_1604/interface/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/LCD_1604/subdir_rules.mk=UTF-8
|
||||
|
|
@ -13,18 +36,5 @@ encoding//Debug/NOR_FLASH/platform/subdir_rules.mk=UTF-8
|
|||
encoding//Debug/NOR_FLASH/platform/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/SDK/drivers/Src/timers/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/SDK/drivers/Src/timers/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/ivec_ECU/ivec_ecu_can/src/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/ivec_ECU/ivec_ecu_can/src/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/ivec_ECU/ivec_ecu_common/src/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/ivec_ECU/ivec_ecu_common/src/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/ivec_ECU/ivec_ecu_uart/src/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/ivec_ECU/ivec_ecu_uart/src/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/ivec_cmplx_gptimer/src/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/ivec_cmplx_gptimer/src/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/makefile=UTF-8
|
||||
encoding//Debug/objects.mk=UTF-8
|
||||
encoding//Debug/sources.mk=UTF-8
|
||||
encoding//Debug/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/utils/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/utils/subdir_vars.mk=UTF-8
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* ivec_mcal_gpio.h
|
||||
*
|
||||
* Created on: 22-Jan-2024
|
||||
* Author: saar
|
||||
*/
|
||||
|
||||
#ifndef CORE_INCLUDE_IVEC_MCAL_GPIO_H_
|
||||
#define CORE_INCLUDE_IVEC_MCAL_GPIO_H_
|
||||
|
||||
//#include <../Core/Include/ivec_utils.h>
|
||||
#include "ti_msp_dl_config.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define TM1650_PORT (GPIOA)
|
||||
#define TM1650_SDA_PIN_PIN (DL_GPIO_PIN_9)
|
||||
#define TM1650_SDA_PIN_IOMUX (IOMUX_PINCM20)
|
||||
#define TM1650_SCL_PIN_PIN (DL_GPIO_PIN_8)
|
||||
#define TM1650_SCL_PIN_IOMUX (IOMUX_PINCM19)
|
||||
|
||||
int8_t u8MCAL_gpioInit(void);
|
||||
int8_t u8MCAL_gpioDeInit(GPIO_Regs *GPIOx, uint32_t GPIO_Pin);
|
||||
void vMCAL_gpioWrite(void* port, uint32_t pin, uint32_t state);
|
||||
uint32_t u32MCAL_gpioRead(void* port, uint32_t pin);
|
||||
void vMCAL_gpioToggle(void *port, uint32_t pin);
|
||||
void vMCAL_set_gpioDirection(uint32_t pincmIndex, bool direction);
|
||||
|
||||
#endif /* CORE_INCLUDE_IVEC_MCAL_GPIO_H_ */
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* ivec_mcal_gpio.c
|
||||
*
|
||||
* Created on: 22-Jan-2024
|
||||
* Author: saar
|
||||
*/
|
||||
|
||||
#include "../Include/ivec_mcal_gpio.h"
|
||||
|
||||
|
||||
/*=======================================================================================PRIVATE_MEMBERS======================================================================================*/
|
||||
|
||||
static uint32_t GPIOInitCounter = 0;
|
||||
|
||||
/*=============================================================================================================================================================================================
|
||||
API
|
||||
==============================================================================================================================================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Initializes all the GPIO pins.
|
||||
*
|
||||
* @returns 0 on success, -1 on failure.
|
||||
*/
|
||||
int8_t u8MCAL_gpioInit(void)
|
||||
{
|
||||
if (GPIOInitCounter == 0)
|
||||
{
|
||||
GPIOInitCounter = 1;
|
||||
//#define TOUCH_BUTTON_PORT (GPIOB)
|
||||
//#define TOUCH_BUTTON_PIN_17_PIN (DL_GPIO_PIN_17)
|
||||
//#define TOUCH_BUTTON_PIN_17_IOMUX (IOMUX_PINCM43)
|
||||
// DL_GPIO_initDigitalInput(IOMUX_PINCM43);
|
||||
// DL_GPIO_initDigitalInputFeatures(IOMUX_PINCM43, DL_GPIO_INVERSION_DISABLE, \
|
||||
// DL_GPIO_RESISTOR_NONE, DL_GPIO_HYSTERESIS_DISABLE, DL_GPIO_WAKEUP_DISABLE);
|
||||
DL_GPIO_initDigitalOutput(TM1650_SDA_PIN_IOMUX);
|
||||
DL_GPIO_initDigitalOutput(TM1650_SCL_PIN_IOMUX);
|
||||
DL_GPIO_setPins(TM1650_PORT, TM1650_SDA_PIN_PIN | TM1650_SCL_PIN_PIN);
|
||||
DL_GPIO_enableOutput(TM1650_PORT, TM1650_SDA_PIN_PIN | TM1650_SCL_PIN_PIN);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief De-initializes the GPIO pins.
|
||||
*
|
||||
* @param GPIOx The GPIO port to de-initialize.
|
||||
* @param GPIO_Pin param is void.
|
||||
*
|
||||
* @returns 0 on success -1 on failure.
|
||||
*/
|
||||
int8_t u8MCAL_gpioDeInit(GPIO_Regs *GPIOx, uint32_t GPIO_Pin)
|
||||
{
|
||||
if (GPIOInitCounter == 1)
|
||||
{
|
||||
GPIOInitCounter = 0;
|
||||
(void) GPIO_Pin;
|
||||
DL_GPIO_disablePower(GPIOx);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Writes a value to a GPIO pin.
|
||||
*
|
||||
* @param port The GPIO port to write to.
|
||||
* @param pin The pin to write to.
|
||||
* @param state The value to write to the pin.
|
||||
*
|
||||
* @returns None
|
||||
*/
|
||||
void vMCAL_gpioWrite(void* port, uint32_t pin, uint32_t state)
|
||||
{
|
||||
if(state)
|
||||
{
|
||||
DL_GPIO_setPins(port, pin);
|
||||
}
|
||||
else
|
||||
{
|
||||
DL_GPIO_clearPins(port, pin);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reads the value of a GPIO pin.
|
||||
*
|
||||
* @param port The port of the pin to read.
|
||||
* @param pin The pin to read.
|
||||
*
|
||||
* @returns The value of the pin.
|
||||
*/
|
||||
uint32_t u32MCAL_gpioRead(void* port, uint32_t pin)
|
||||
{
|
||||
return (DL_GPIO_readPins(port, pin));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Toggles a GPIO pin.
|
||||
*
|
||||
* @param port The GPIO port to toggle.
|
||||
* @param pin The GPIO pin to toggle.
|
||||
*
|
||||
* @returns None
|
||||
*/
|
||||
void vMCAL_gpioToggle(void *port, uint32_t pin)
|
||||
{
|
||||
DL_GPIO_togglePins(port, pin);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Sets the direction of a GPIO pin.
|
||||
*
|
||||
* @param port The port of the GPIO pin.
|
||||
* @param pin The pin number of the GPIO pin.
|
||||
* @param direction The direction of the GPIO pin. direction -> 0 = GPIO_IN, 1 = GPIO_OUT
|
||||
*
|
||||
* @returns None
|
||||
*/
|
||||
void vMCAL_set_gpioDirection(uint32_t pincmIndex, bool direction)
|
||||
{
|
||||
|
||||
if(direction)
|
||||
{
|
||||
DL_GPIO_initDigitalOutput(pincmIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
DL_GPIO_initDigitalInput(pincmIndex);
|
||||
}
|
||||
}
|
||||
|
||||
/*____________________________________________________________________________________________________________________________________________________________________________________________*/
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ uint8_t g_CanData[8];
|
|||
volatile DL_MCAN_ProtocolStatus HeaderStat;
|
||||
#define MCAN_FILTER_SIZE 4u
|
||||
|
||||
extern uint16_t g_canSpeed;
|
||||
extern uint16_t g_u16CanSpeed;
|
||||
|
||||
|
||||
/*REQUIRED MCAN CONFIGS*/
|
||||
|
|
@ -359,15 +359,15 @@ void CANFD0_IRQHandler(void)
|
|||
|
||||
if (HeaderStat.lastErrCode != 3){
|
||||
int status = -1;
|
||||
printf("Attempting recovery...\n");
|
||||
status = xECU_CanReInit(CANFD0 , g_canSpeed);
|
||||
//printf("Attempting recovery...\n");
|
||||
status = xECU_CanReInit(CANFD0 , g_u16CanSpeed);
|
||||
if(status == 0)
|
||||
{
|
||||
printf("done\n");
|
||||
//printf("done\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
printf("tx ack err...\n");
|
||||
// else
|
||||
//printf("tx ack err...\n");
|
||||
}
|
||||
|
||||
if (IntrStatus & DL_MCAN_INTERRUPT_TC){
|
||||
|
|
@ -612,7 +612,7 @@ IVEC_McalStatus_e xMCAL_MCANTx(MCAN_Regs *MCAN, DL_MCAN_TxBufElement *TxMsg ,uin
|
|||
}
|
||||
else
|
||||
{
|
||||
printf("tx pending\n");
|
||||
//printf("tx pending\n");
|
||||
//return IVEC_MCAL_STATUS_BUSY;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,6 +85,11 @@ static const DL_TimerG_PWMConfig gPWM_0Config = {
|
|||
};
|
||||
|
||||
|
||||
__attribute__((weak)) void vMCAL_TimerCallback(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Initlization Periodic timer
|
||||
|
|
@ -416,6 +421,14 @@ void _prv_timAcallback()
|
|||
*/
|
||||
void TIMA0_IRQHandler()
|
||||
{
|
||||
_prv_timAcallback();
|
||||
// _prv_timAcallback();
|
||||
switch( DL_TimerA_getPendingInterrupt(TIMA0) )
|
||||
{
|
||||
case DL_TIMER_IIDX_ZERO:
|
||||
vMCAL_TimerCallback();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ void UART_ReadCallback(UART_Regs *uart, uint8_t *buf, bool status)
|
|||
}
|
||||
}
|
||||
|
||||
void _prv_vrxcallback()
|
||||
void _prv_vrxcallback(UART_Regs *pxUartInstance, uint32_t event)
|
||||
{
|
||||
switch (DL_UART_Main_getPendingInterrupt(UART0))
|
||||
switch (event)
|
||||
{
|
||||
case DL_UART_MAIN_IIDX_RX:
|
||||
{
|
||||
|
|
@ -40,118 +40,34 @@ void _prv_vrxcallback()
|
|||
uint32_t bytesRead;
|
||||
|
||||
// Drain the RX FIFO and store the data in buffer
|
||||
bytesRead = DL_UART_drainRXFIFO(UART0, l_pu8Buffer, sizeof(l_pu8Buffer));
|
||||
DL_UART_clearInterruptStatus(UART0, DL_UART_MAIN_IIDX_RX);
|
||||
bytesRead = DL_UART_drainRXFIFO(pxUartInstance, l_pu8Buffer, sizeof(l_pu8Buffer));
|
||||
DL_UART_clearInterruptStatus(pxUartInstance, DL_UART_MAIN_IIDX_RX);
|
||||
for( int ijk = 0; ijk < bytesRead; ijk++ )
|
||||
UART_ReadCallback(UART0, &l_pu8Buffer[ijk], true);
|
||||
UART_ReadCallback(pxUartInstance, &l_pu8Buffer[ijk], true);
|
||||
break;
|
||||
}
|
||||
case DL_UART_MAIN_IIDX_OVERRUN_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_OVERRUN_ERROR);
|
||||
DL_UART_clearInterruptStatus(pxUartInstance, DL_UART_MAIN_IIDX_OVERRUN_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_BREAK_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_BREAK_ERROR);
|
||||
DL_UART_clearInterruptStatus(pxUartInstance, DL_UART_MAIN_IIDX_BREAK_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_PARITY_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_PARITY_ERROR);
|
||||
DL_UART_clearInterruptStatus(pxUartInstance, DL_UART_MAIN_IIDX_PARITY_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_FRAMING_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_FRAMING_ERROR);
|
||||
DL_UART_clearInterruptStatus(pxUartInstance, DL_UART_MAIN_IIDX_FRAMING_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_RX_TIMEOUT_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_RX_TIMEOUT_ERROR);
|
||||
DL_UART_clearInterruptStatus(pxUartInstance, DL_UART_MAIN_IIDX_RX_TIMEOUT_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_NOISE_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_NOISE_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (DL_UART_Main_getPendingInterrupt(UART1))
|
||||
{
|
||||
case DL_UART_MAIN_IIDX_RX:
|
||||
{
|
||||
bool status = 0;
|
||||
uint8_t l_pu8Buffer[8] = {0}; // Adjust size as needed
|
||||
uint32_t bytesRead;
|
||||
|
||||
// Drain the RX FIFO and store the data in buffer
|
||||
bytesRead = DL_UART_drainRXFIFO(UART1, l_pu8Buffer, sizeof(l_pu8Buffer));
|
||||
DL_UART_clearInterruptStatus(UART1, DL_UART_MAIN_IIDX_RX);
|
||||
for( int ijk = 0; ijk < bytesRead; ijk++ )
|
||||
UART_ReadCallback(UART1, &l_pu8Buffer[ijk], true);
|
||||
break;
|
||||
}
|
||||
case DL_UART_MAIN_IIDX_OVERRUN_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_OVERRUN_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_BREAK_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_BREAK_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_PARITY_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_PARITY_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_FRAMING_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_FRAMING_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_RX_TIMEOUT_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_RX_TIMEOUT_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_NOISE_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_NOISE_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (DL_UART_Main_getPendingInterrupt(UART2))
|
||||
{
|
||||
case DL_UART_MAIN_IIDX_RX:
|
||||
{
|
||||
bool status = 0;
|
||||
uint8_t l_pu8Buffer[8] = {0}; // Adjust size as needed
|
||||
uint32_t bytesRead;
|
||||
|
||||
// Drain the RX FIFO and store the data in buffer
|
||||
bytesRead = DL_UART_drainRXFIFO(UART2, l_pu8Buffer, sizeof(l_pu8Buffer));
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_RX);
|
||||
for( int ijk = 0; ijk < bytesRead; ijk++ )
|
||||
UART_ReadCallback(UART2, &l_pu8Buffer[ijk], true);
|
||||
break;
|
||||
}
|
||||
case DL_UART_MAIN_IIDX_OVERRUN_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_OVERRUN_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_BREAK_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_BREAK_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_PARITY_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_PARITY_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_FRAMING_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_FRAMING_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_RX_TIMEOUT_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_RX_TIMEOUT_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
case DL_UART_MAIN_IIDX_NOISE_ERROR:
|
||||
DL_UART_clearInterruptStatus(UART2, DL_UART_MAIN_IIDX_NOISE_ERROR);
|
||||
DL_UART_clearInterruptStatus(pxUartInstance, DL_UART_MAIN_IIDX_NOISE_ERROR);
|
||||
__asm("nop");
|
||||
break;
|
||||
default:
|
||||
|
|
@ -162,17 +78,17 @@ void _prv_vrxcallback()
|
|||
|
||||
void UART0_IRQHandler()
|
||||
{
|
||||
_prv_vrxcallback();
|
||||
_prv_vrxcallback(UART0, DL_UART_Main_getPendingInterrupt(UART0));
|
||||
}
|
||||
|
||||
void UART1_IRQHandler()
|
||||
{
|
||||
_prv_vrxcallback();
|
||||
_prv_vrxcallback(UART1, DL_UART_Main_getPendingInterrupt(UART1));
|
||||
}
|
||||
|
||||
void UART2_IRQHandler()
|
||||
{
|
||||
_prv_vrxcallback();
|
||||
_prv_vrxcallback(UART2, DL_UART_Main_getPendingInterrupt(UART2));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -191,41 +107,7 @@ static UART_Regs* GetUartInstance(McalUartPortNumber_e eUartPortNumber)
|
|||
return NULL; // Invalid UART port
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////DEINIT/////////////////////////////////////////////////////////
|
||||
//static xCoreStatus_t uart_deinit(McalUartHandle_s* pxUartHandle)
|
||||
//{
|
||||
//// assert(b_UART1_init_flag == 1 || b_UART3_init_flag == 1);
|
||||
//// assert(uart_inst == UART1 || uart_inst == UART3);
|
||||
//
|
||||
// UART_Regs* uart_inst = GetUartInstance(pxUartHandle->eUartPortNumber);
|
||||
//
|
||||
// // Check if the UART instance is valid
|
||||
// if (uart_inst == NULL)
|
||||
// {
|
||||
// return STATUS_ERROR;
|
||||
// }
|
||||
//
|
||||
// if(uart_inst==UART0)
|
||||
// {
|
||||
// NVIC_DisableIRQ(UART0_INT_IRQn);
|
||||
// DL_UART_disablePower(uart_inst);
|
||||
// //b_UART1_init_flag=0;
|
||||
// }
|
||||
// else if(uart_inst==UART1)
|
||||
// {
|
||||
// NVIC_DisableIRQ(UART1_INT_IRQn);
|
||||
// DL_UART_disablePower(uart_inst);
|
||||
// //b_UART1_init_flag=0;
|
||||
// }
|
||||
// else if(uart_inst==UART2)
|
||||
// {
|
||||
// NVIC_DisableIRQ(UART2_INT_IRQn);
|
||||
// DL_UART_disablePower(uart_inst);
|
||||
// //b_UART3_init_flag=0;
|
||||
// }
|
||||
// return STATUS_SUCCESS;
|
||||
//}
|
||||
|
||||
|
||||
static xCoreStatus_t uart_deinit(McalUartHandle_s* pxUartHandle)
|
||||
{
|
||||
|
|
@ -309,52 +191,6 @@ exit:
|
|||
|
||||
|
||||
|
||||
//static xCoreStatus_t uart_read(McalUartHandle_s* pxUartHandle, unsigned char* pucData, unsigned int len)
|
||||
//{
|
||||
// uint16_t ijk = 0;
|
||||
// while((!u8CMPLX_FifoQueueEmpty(&__gprv_MyEcuCANResponseQueue)) && ijk < len )
|
||||
// {
|
||||
// if( u8CMPLX_FifoDequeue(&__gprv_MyEcuCANResponseQueue, &pucData[ijk], &len, 1) == 1 )
|
||||
// ijk++;
|
||||
// }
|
||||
// if (ijk == len)
|
||||
// return STATUS_SUCCESS;
|
||||
//
|
||||
// return STATUS_ERROR;
|
||||
//
|
||||
//}
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * @brief Function to Read data at from UART Port
|
||||
// * @pre UART should be initilized first.
|
||||
// * @param [in] pxUartHandle pointer to \link McalUartHandle_s \endlink
|
||||
// * @param [in] pucData pointer to unsigned char. Used to read data from UART.
|
||||
// * @param [in] u32DataLength Length of the data to read.
|
||||
// * @return \link IVEC_McalCommonErr_e \endlink returns a status based on the success or failure of the UART Read operation.
|
||||
// */
|
||||
//IVEC_McalCommonErr_e xMCAL_UartRead(McalUartHandle_s* pxUartHandle, unsigned char* pucData, unsigned int u32DataLength)
|
||||
//{
|
||||
// int l_i32Ret;
|
||||
// IVEC_MCAL_FUNC_ENTRY(LOG_STRING);
|
||||
// IVEC_McalCommonErr_e l_xFuncStatus = commonMCAL_SUCCESS;
|
||||
// if (pxUartHandle == NULL)
|
||||
// {
|
||||
// l_xFuncStatus = commonMCAL_INVALID_PARAM;
|
||||
// goto exit;
|
||||
// }
|
||||
// l_i32Ret = uart_read(pxUartHandle, pucData, u32DataLength);
|
||||
// IVEC_MCAL_LOG(LOG_STRING, "Reading UART status %d", l_i32Ret);
|
||||
// if (l_i32Ret == STATUS_ERROR)
|
||||
// {
|
||||
// l_xFuncStatus = commonMCAL_READ_FAIL;
|
||||
// goto exit;
|
||||
// }
|
||||
//exit:
|
||||
// IVEC_MCAL_FUNC_EXIT(LOG_STRING);
|
||||
// return l_xFuncStatus;
|
||||
//}
|
||||
|
||||
static xCoreStatus_t uart_read(McalUartHandle_s* pxUartHandle, unsigned char* pucData)
|
||||
{
|
||||
// Get the UART instance based on the port number in the handle
|
||||
|
|
@ -481,9 +317,8 @@ exit:
|
|||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
static xCoreStatus_t uart_init(McalUartHandle_s* pxUartHandle, McalUartBaudRate_e xBaud)
|
||||
{
|
||||
// DL_GPIO_initPeripheralOutputFunction(IOMUX_PINCM32, IOMUX_PINCM32_PF_UART2_TX);
|
||||
// DL_GPIO_initPeripheralInputFunction(IOMUX_PINCM33, IOMUX_PINCM33_PF_UART2_RX);
|
||||
|
||||
DL_GPIO_initPeripheralOutputFunction(IOMUX_PINCM32, IOMUX_PINCM32_PF_UART2_TX);
|
||||
DL_GPIO_initPeripheralInputFunction(IOMUX_PINCM33, IOMUX_PINCM33_PF_UART2_RX);
|
||||
// Get the UART instance based on the port number in the handle
|
||||
UART_Regs* uart_inst = GetUartInstance(pxUartHandle->eUartPortNumber);
|
||||
|
||||
|
|
@ -534,17 +369,8 @@ static xCoreStatus_t uart_init(McalUartHandle_s* pxUartHandle, McalUartBaudRate_
|
|||
xprvUartConfig.parity = DL_UART_PARITY_EVEN;
|
||||
}
|
||||
|
||||
//xprvUartConfig.flowControl = pxUartHandle->xUartConfig.eUartFlowCtrl;
|
||||
xprvUartConfig.flowControl = DL_UART_FLOW_CONTROL_NONE;
|
||||
// uint8_t flowcontrolmode = pxUartHandle->xUartConfig.eUartFlowCtrl;
|
||||
// if(flowcontrolmode == mcalUART_FC_NONE)
|
||||
// {
|
||||
// xprvUartConfig.flowControl = DL_UART_FLOW_CONTROL_NONE;
|
||||
// }
|
||||
// else if(flowcontrolmode == mcalUARTFC_HW)
|
||||
// {
|
||||
// xprvUartConfig.flowControl = ;
|
||||
// }
|
||||
|
||||
|
||||
DL_UART_ClockConfig gUART_0ClockConfig ={0};
|
||||
gUART_0ClockConfig.clockSel = DL_UART_CLOCK_BUSCLK;
|
||||
|
|
@ -625,30 +451,6 @@ static xCoreStatus_t uart_init(McalUartHandle_s* pxUartHandle, McalUartBaudRate_
|
|||
*/
|
||||
DL_UART_Main_setBaudRateDivisor(uart_inst, 13, 1);
|
||||
}
|
||||
// else if(xBaud==1843200)
|
||||
// {
|
||||
// DL_UART_Main_setBaudRateDivisor(uart_inst, 156, 16);
|
||||
// }
|
||||
// else if(xBaud==2000000)
|
||||
// {
|
||||
// DL_UART_Main_setBaudRateDivisor(uart_inst, 156, 16);
|
||||
// }
|
||||
// else if(xBaud==2100000)
|
||||
// {
|
||||
// DL_UART_Main_setBaudRateDivisor(uart_inst, 156, 16);
|
||||
// }
|
||||
// else if(xBaud==3686400)
|
||||
// {
|
||||
// DL_UART_Main_setBaudRateDivisor(uart_inst, 156, 16);
|
||||
// }
|
||||
// else if(xBaud==4000000)
|
||||
// {
|
||||
// DL_UART_Main_setBaudRateDivisor(uart_inst, 156, 16);
|
||||
// }
|
||||
// else if(xBaud==4468750)
|
||||
// {
|
||||
// DL_UART_Main_setBaudRateDivisor(uart_inst, 156, 16);
|
||||
// }
|
||||
|
||||
/* Configure Interrupts */
|
||||
|
||||
|
|
@ -731,43 +533,6 @@ static xCoreStatus_t uart_init(McalUartHandle_s* pxUartHandle, McalUartBaudRate_
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
IVEC_McalCommonErr_e _prvMCAL_UartPinInit(McalUartHandle_s *pxUartHandle)
|
||||
{
|
||||
int l_i32Ret;
|
||||
IVEC_MCAL_FUNC_ENTRY(LOG_STRING);
|
||||
McalCommonErr_e l_xFuncStatus = commonMCAL_SUCCESS;
|
||||
if (pxUartHandle == NULL)
|
||||
{
|
||||
l_xFuncStatus = commonMCAL_INVALID_PARAM;
|
||||
goto exit;
|
||||
}
|
||||
if(pxUartHandle->eUartPortNumber == mcalUART_PORT1)
|
||||
goto exit;
|
||||
else if(pxUartHandle->eUartPortNumber == mcalUART_PORT2)
|
||||
{
|
||||
l_i32Ret = ql_pin_set_func(pxUartHandle->u8UartTxPin, 3);
|
||||
l_i32Ret = ql_pin_set_func(pxUartHandle->u8UartRxPin, 3);
|
||||
if (l_i32Ret != QL_UART_SUCCESS)
|
||||
{
|
||||
l_xFuncStatus = commonMCAL_INIT_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
else if(pxUartHandle->eUartPortNumber == mcalUART_PORT3)
|
||||
{
|
||||
l_i32Ret = ql_pin_set_func(pxUartHandle->u8UartTxPin, 4);
|
||||
l_i32Ret = ql_pin_set_func(pxUartHandle->u8UartRxPin, 4);
|
||||
if (l_i32Ret != QL_UART_SUCCESS)
|
||||
{
|
||||
l_xFuncStatus = commonMCAL_INIT_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
exit:
|
||||
IVEC_MCAL_FUNC_EXIT(LOG_STRING);
|
||||
return l_xFuncStatus;
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @brief Function to trigger the UART interrupt that is configured in the function pointer pvUartRecvCallback in \link McalUartHandle_s \endlink handle.
|
||||
|
|
|
|||
2779
NOR_FLASH/Doxyfile
2779
NOR_FLASH/Doxyfile
File diff suppressed because it is too large
Load Diff
|
|
@ -1,109 +0,0 @@
|
|||
/*
|
||||
* flash_types.h
|
||||
*
|
||||
* Created on: 28-Jan-2023
|
||||
* Author: Vecmocon Technology
|
||||
*/
|
||||
#include "stdint.h"
|
||||
#include "stdbool.h"
|
||||
|
||||
#ifndef INC_FLASH_TYPES_H_
|
||||
#define INC_FLASH_TYPES_H_
|
||||
|
||||
#define BLOCK_COUNT 64
|
||||
#define SECTORS 512
|
||||
#define PAGES_PER_SECTOR 16
|
||||
|
||||
|
||||
#define PAGES (PAGES_PER_SECTOR*SECTORS)
|
||||
|
||||
#define SECTOR_SIZE 4096
|
||||
#define PAGE_SIZE 256
|
||||
|
||||
#define FLASH_START_ADDRESS 0
|
||||
#define FLASH_LAST_ADDRESS 0x1FFFFF
|
||||
|
||||
|
||||
#define PAGE_NUMBER(address) (uint32_t)(address/PAGE_SIZE)
|
||||
|
||||
#define PAGE_ADDR_FROM_NUM(pNumber) (uint32_t)(pNumber*PAGE_SIZE)
|
||||
|
||||
#define PAGE_ADDRESS(address) ((PAGE_NUMBER(address))*PAGE_SIZE)
|
||||
|
||||
#define SECTOR_NUMBER(address) ((uint32_t)(address/4096))
|
||||
|
||||
#define SECTOR_ADDR(sector_number) ((uint32_t)(sector_number*4096))
|
||||
|
||||
#if BLOCK_COUNT == 128
|
||||
#define BLOCK_NUMBER(address) ((uint32_t)(address/65536))
|
||||
#elif BLOCK_COUNT == 64
|
||||
#define BLOCK_NUMBER(address) ((uint32_T)(address/32768))
|
||||
#endif
|
||||
|
||||
#define WriteEnable 0x06
|
||||
#define WriteDisable 0x04
|
||||
|
||||
#define ReadData 0x03
|
||||
|
||||
#define PageProgram 0x02
|
||||
|
||||
#define PageErase 0x81
|
||||
#define SectorErase 0x20
|
||||
|
||||
#if BLOCK_COUNT == 128
|
||||
#define BlockErase 0x52
|
||||
# elif BLOCK_COUNT == 64
|
||||
#define BlockErase 0xD8
|
||||
#else
|
||||
#error "No Valid Block Size defined"
|
||||
#endif
|
||||
|
||||
#define ChipErase 0xC7 /* 60H / C7H */
|
||||
|
||||
#define DEVICE_ID 0x90 //MANUFACTURER_ID
|
||||
|
||||
#define UID 0x4B
|
||||
|
||||
#define READ_ID 0x9F
|
||||
|
||||
#define STAT_REG_1 0x05
|
||||
#define STAT_REG_2 0x35
|
||||
|
||||
|
||||
typedef enum{
|
||||
FLASH_STATUS_ERROR = -1,
|
||||
FLASH_STATUS_OK = 0,
|
||||
FLASH_STATUS_WRITE_ALLOWED = 1,
|
||||
FLASH_STATUS_WRITE_BLOCKED = 2,
|
||||
FLASH_BUSY_IN_OPERATION = 3,
|
||||
}flashStatus_t;
|
||||
|
||||
typedef enum{
|
||||
FLASH_PAGE_ERASE = PageErase,
|
||||
FLASH_SECTOR_ERASE = SectorErase,
|
||||
FLASH_BLOCK_ERASE = BlockErase,
|
||||
FLASH_CHIP_ERASE = ChipErase,
|
||||
}flash_eraseCmds;
|
||||
|
||||
typedef struct{
|
||||
/*Byte 0*/
|
||||
uint8_t WIP : 1;
|
||||
uint8_t WEL : 1;
|
||||
uint8_t BP0 : 1;
|
||||
uint8_t BP1 : 1;
|
||||
uint8_t BP2 : 1;
|
||||
uint8_t BP3 : 1;
|
||||
uint8_t BP4 : 1;
|
||||
uint8_t SRP0 : 1;
|
||||
/*Byte 1*/
|
||||
uint8_t SRP1 : 1;
|
||||
uint8_t QE : 1;
|
||||
uint8_t SUS2 : 1;
|
||||
uint8_t LB1 : 1;
|
||||
uint8_t LB2 : 1;
|
||||
uint8_t LB3 : 1;
|
||||
uint8_t CMP : 1;
|
||||
uint8_t SUS1 : 1;
|
||||
}flash_statusReg_Struct;
|
||||
|
||||
#endif /* INC_FLASH_TYPES_H_ */
|
||||
|
|
@ -1,466 +0,0 @@
|
|||
/*
|
||||
* nor_flash.c
|
||||
*
|
||||
* Created on: 16-Jan-2023
|
||||
* Author: Vecmocon Technology
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "../../nor_flash.h"
|
||||
#include "../../platform/flash_interface.h"
|
||||
|
||||
#define NOR_TIMEOUT 50
|
||||
#define ERASE_TIMEOUT 400
|
||||
|
||||
static flashStatus_t flash_wEnable(void);
|
||||
static flashStatus_t flash_wDisable(void);
|
||||
static flashStatus_t flash_readStatusReg1(flash_statusReg_Struct* statusReg);
|
||||
static flashStatus_t flash_writeSetup(void);
|
||||
static flashStatus_t flash_readWIP(bool* WIP);
|
||||
static flashStatus_t flash_writeToPage(uint8_t* txBuff, uint8_t* rxBuff, uint16_t length);
|
||||
//static flashStatus_t flash_eraseCommands(uint32_t address, flash_eraseCmds command);
|
||||
|
||||
|
||||
/**
|
||||
* Send write enable command to NOR Flash
|
||||
*
|
||||
* @returns A status code indicating the result of the operation.
|
||||
*/
|
||||
static flashStatus_t flash_wEnable(void){
|
||||
uint8_t rxBuff[1] = {0};
|
||||
uint8_t txBuff[1] = {0};
|
||||
txBuff[0] = WriteEnable;
|
||||
flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
retStat = flash_sendData(txBuff, rxBuff, 1);
|
||||
|
||||
/*Variable to check Write in progress bit*/
|
||||
bool wip = 0;
|
||||
|
||||
/*Do while loop as WIP is to be read at-least once*/
|
||||
uint32_t startTime = flash_msTick();
|
||||
do{
|
||||
/*Read WIP bit*/
|
||||
retStat = flash_readWIP(&wip);
|
||||
if(retStat != FLASH_STATUS_OK){
|
||||
break;
|
||||
}
|
||||
if((flash_msTick() - startTime) > NOR_TIMEOUT){
|
||||
__asm("nop");
|
||||
retStat = FLASH_STATUS_WRITE_BLOCKED;
|
||||
break;
|
||||
}
|
||||
}while(wip != 0 );
|
||||
|
||||
__asm("nop");
|
||||
return retStat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send write disable command to NOR Flash.
|
||||
*
|
||||
* @returns A status code indicating the result of the operation.
|
||||
*/
|
||||
static flashStatus_t flash_wDisable(void){
|
||||
uint8_t rxBuff[1] = {0};
|
||||
uint8_t txBuff[1] = {0};
|
||||
txBuff[0] = WriteDisable;
|
||||
flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
retStat = flash_sendData(txBuff, rxBuff, 1);
|
||||
return retStat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the status register 1 of the flash.
|
||||
*
|
||||
* @returns The status register 1 of the flash.
|
||||
*/
|
||||
static flashStatus_t flash_readStatusReg1(flash_statusReg_Struct* statusReg){
|
||||
uint8_t rxBuff[2] = {0};
|
||||
uint8_t txBuff[2] = {0};
|
||||
|
||||
txBuff[0] = STAT_REG_1;
|
||||
flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
retStat = flash_sendData(txBuff, rxBuff, 2);
|
||||
__asm("nop");
|
||||
if(retStat == FLASH_STATUS_OK){
|
||||
memcpy(statusReg, &rxBuff[1], sizeof(uint8_t));
|
||||
}
|
||||
return retStat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup the NOR Flash for a write/erase.
|
||||
*
|
||||
* @returns A status code indicating the success of the function call.
|
||||
*/
|
||||
static flashStatus_t flash_writeSetup(void){
|
||||
/*Temporary structure for status register*/
|
||||
flash_statusReg_Struct tmp_flash_statusRegister = {0};
|
||||
|
||||
/*Variable for transaction status check*/
|
||||
flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
|
||||
/*Send write enable command*/
|
||||
retStat = flash_wEnable();
|
||||
|
||||
/*If all transactions are successful*/
|
||||
if(retStat == FLASH_STATUS_OK){
|
||||
/*Read status register 1, as status register 2 is not of importance here*/
|
||||
retStat = flash_readStatusReg1(&tmp_flash_statusRegister);
|
||||
if(retStat == FLASH_STATUS_OK){
|
||||
if(tmp_flash_statusRegister.WEL == 1) /*Write Enable Latch Bit is set i.e write is allowed*/
|
||||
return FLASH_STATUS_WRITE_ALLOWED;
|
||||
else
|
||||
return FLASH_STATUS_WRITE_BLOCKED;
|
||||
}
|
||||
}
|
||||
return retStat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the Write in progress bit of status register 1
|
||||
*
|
||||
* @param statusRegister The status register of the flash.
|
||||
*
|
||||
* @returns The status of the operation.
|
||||
*/
|
||||
static flashStatus_t flash_readWIP(bool* WIP){
|
||||
/*Temporary structure for status register*/
|
||||
flash_statusReg_Struct tmp_flash_statusRegister = {0};
|
||||
|
||||
/*Variable for transaction status check*/
|
||||
flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
|
||||
/*Read status register 1, as status register 2 is not of importance here*/
|
||||
retStat = flash_readStatusReg1(&tmp_flash_statusRegister);
|
||||
|
||||
/*If all transactions are successful*/
|
||||
if(retStat == FLASH_STATUS_OK){
|
||||
*WIP = (bool)tmp_flash_statusRegister.WIP;
|
||||
}
|
||||
return retStat;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Writes data to the flash memory.
|
||||
*
|
||||
* @param txBuff The buffer containing the data to be written.
|
||||
* @param rxBuff The buffer to receive the data.
|
||||
* @param length The number of bytes to be written.
|
||||
*
|
||||
* @returns The status of the write operation.
|
||||
*/
|
||||
static flashStatus_t flash_writeToPage(uint8_t* txBuff, uint8_t* rxBuff, uint16_t length){
|
||||
/*Variable for transaction status*/
|
||||
flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
|
||||
/*setup write before Page Erase*/
|
||||
retStat = flash_writeSetup();
|
||||
|
||||
if(retStat == FLASH_STATUS_WRITE_ALLOWED){
|
||||
__asm("nop");
|
||||
retStat = flash_sendData(txBuff, rxBuff, length);
|
||||
if(retStat != FLASH_STATUS_OK){
|
||||
__asm("nop");
|
||||
return retStat;
|
||||
}
|
||||
|
||||
/*Variable to check Write in progress bit*/
|
||||
bool wip = 0;
|
||||
|
||||
/*Do while loop as WIP is to be read at-least once*/
|
||||
uint32_t startTime = flash_msTick();
|
||||
do{
|
||||
/*Read WIP bit*/
|
||||
retStat = flash_readWIP(&wip);
|
||||
if(retStat != FLASH_STATUS_OK){
|
||||
break;
|
||||
}
|
||||
if((flash_msTick() - startTime) > NOR_TIMEOUT){
|
||||
__asm("nop");
|
||||
retStat = FLASH_STATUS_WRITE_BLOCKED;
|
||||
break;
|
||||
}
|
||||
}while(wip != 0);
|
||||
|
||||
}
|
||||
return retStat;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------*/
|
||||
/*________________________________________________API_________________________________________________*/
|
||||
/*----------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Erases the flash memory.
|
||||
*
|
||||
* @param address The address to start erasing.
|
||||
* @param command The erase command to use.
|
||||
*
|
||||
* @returns The status of the erase operation.
|
||||
*/
|
||||
flashStatus_t flash_eraseCommands(uint32_t address, flash_eraseCmds command){
|
||||
/*Variable for transaction status*/
|
||||
flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
|
||||
/*Do while loop as WIP is to be read at-least once*/
|
||||
static volatile uint32_t startTime = 0;
|
||||
static volatile uint32_t timeNow = 0;
|
||||
|
||||
/*setup write before Page Erase*/
|
||||
retStat = flash_writeSetup();
|
||||
|
||||
/*If write is allowed*/
|
||||
if(retStat == FLASH_STATUS_WRITE_ALLOWED){
|
||||
uint8_t txBuff[4] = {0};
|
||||
uint8_t rxBuff[4] = {0};
|
||||
|
||||
/*Fill the Tx buffer*/
|
||||
txBuff[0] = command; /*Erase Command*/
|
||||
txBuff[1] = (address >> 16) & 0xFF; /*MSB of address*/
|
||||
txBuff[2] = (address >> 8) & 0xFF; /*Mid part of address*/
|
||||
txBuff[3] = (address >> 0) & 0xFF; /*LSB of address*/
|
||||
__asm("nop");
|
||||
/*SPI Transaction*/
|
||||
retStat = flash_sendData(txBuff, rxBuff, 4);
|
||||
if(retStat != FLASH_STATUS_OK){
|
||||
__asm("nop");
|
||||
return retStat;
|
||||
}
|
||||
|
||||
/*Variable to check Write in progress bit*/
|
||||
bool wip = 0;
|
||||
|
||||
startTime = flash_msTick();
|
||||
|
||||
do{
|
||||
/*Read WIP bit*/
|
||||
retStat = flash_readWIP(&wip);
|
||||
if(retStat != FLASH_STATUS_OK){
|
||||
break;
|
||||
}
|
||||
timeNow = flash_msTick();
|
||||
if((timeNow - startTime) > ERASE_TIMEOUT){
|
||||
|
||||
__asm("nop");
|
||||
retStat = FLASH_STATUS_WRITE_BLOCKED;
|
||||
break;
|
||||
}
|
||||
}while(wip != 0 );
|
||||
}
|
||||
|
||||
timeNow++;
|
||||
startTime++;
|
||||
|
||||
__asm("nop");
|
||||
|
||||
return retStat;
|
||||
}
|
||||
|
||||
/********************************************************************************************************************/
|
||||
/**
|
||||
* Reads the unique ID of the flash chip.
|
||||
*
|
||||
* @param uID The unique ID of the flash chip.
|
||||
*
|
||||
* @returns The status of the operation.
|
||||
*/
|
||||
flashStatus_t flash_getUID(uint8_t* uID){
|
||||
uint8_t rxBuff[21] = {0};
|
||||
uint8_t txBuff[21] = {0};
|
||||
txBuff[0] = UID;
|
||||
|
||||
volatile flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
retStat = flash_sendData(txBuff, rxBuff, 21);
|
||||
__asm("nop");
|
||||
if(retStat == FLASH_STATUS_OK){
|
||||
memcpy(uID, &rxBuff[5], 16*sizeof(uint8_t));
|
||||
}
|
||||
return retStat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the manufacturer ID and device ID of the flash.
|
||||
*
|
||||
* @param mID The manufacturer ID.
|
||||
* @param dID The device ID.
|
||||
*
|
||||
* @returns The status of the operation.
|
||||
*/
|
||||
flashStatus_t flash_getMID(uint8_t* mID, uint8_t* dID){
|
||||
uint8_t rxBuff[6] = {0};
|
||||
uint8_t txBuff[6] = {0};
|
||||
|
||||
txBuff[0] = DEVICE_ID;
|
||||
txBuff[1] = 0xFF;
|
||||
txBuff[2] = 0xFF;
|
||||
txBuff[3] = 0;
|
||||
|
||||
flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
retStat = flash_sendData(txBuff, rxBuff, 6);
|
||||
if(retStat == FLASH_STATUS_OK){
|
||||
memcpy(mID, &rxBuff[4], sizeof(uint8_t));
|
||||
memcpy(dID, &rxBuff[5], sizeof(uint8_t));
|
||||
}
|
||||
return retStat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the Manufacturer ID, and ID of the flash (???)
|
||||
*
|
||||
* @param mID The manufacturer ID.
|
||||
* @param id The device ID.
|
||||
*
|
||||
* @returns The status of the operation.
|
||||
*/
|
||||
flashStatus_t flash_getRID(uint8_t* mID, uint16_t* id){
|
||||
|
||||
#define l_BUFF_SIZE 4
|
||||
|
||||
uint8_t rxBuff[l_BUFF_SIZE] = {0};
|
||||
uint8_t txBuff[l_BUFF_SIZE] = {0};
|
||||
|
||||
txBuff[0] = READ_ID;
|
||||
|
||||
flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
retStat = flash_sendData(txBuff, rxBuff, l_BUFF_SIZE);
|
||||
if(retStat == FLASH_STATUS_OK){
|
||||
memcpy(mID, &rxBuff[1], sizeof(uint8_t));
|
||||
uint8_t tempBuff[2] = {0};
|
||||
for (int ijk = 0; ijk < (l_BUFF_SIZE-2); ijk++){
|
||||
memcpy((tempBuff + ijk), &rxBuff[(l_BUFF_SIZE - 1) - ijk], 1);
|
||||
}
|
||||
memcpy(id, tempBuff, sizeof(tempBuff));
|
||||
}
|
||||
|
||||
#undef l_BUFF_SIZE
|
||||
|
||||
return retStat;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Writes data to a page of flash.
|
||||
*
|
||||
* @param address The address of the page to write to.
|
||||
* @param data The data to write to the page.
|
||||
* @param length The length of the data to write.
|
||||
*
|
||||
* @returns The status of the write operation.
|
||||
*/
|
||||
flashStatus_t flash_programPage(uint32_t address, const uint8_t *data, uint16_t length){
|
||||
/*Variable for transaction status*/
|
||||
flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
|
||||
if(length > MAX_RW_ALLOWED){
|
||||
return FLASH_STATUS_ERROR;
|
||||
}
|
||||
|
||||
uint8_t txBuff[MAX_RW_ALLOWED + 4] = {0};
|
||||
// uint8_t rxBuff[MAX_RW_ALLOWED + 4] = {0};
|
||||
|
||||
uint32_t pageStart = PAGE_ADDRESS(address);
|
||||
uint32_t pageEnd = pageStart + 0xFF;
|
||||
|
||||
if((address + length) <= pageEnd+1)
|
||||
{
|
||||
|
||||
/*Fill the Tx buffer*/
|
||||
txBuff[0] = PageProgram; /*Page program command*/
|
||||
txBuff[1] = (address >> 16) & 0xFF; /*MSB of address*/
|
||||
txBuff[2] = (address >> 8) & 0xFF; /*Mid part of address*/
|
||||
txBuff[3] = (address >> 0) & 0xFF; /*LSB of address*/
|
||||
memcpy(&txBuff[4], data, length); /*Data bytes to program*/
|
||||
|
||||
/*SPI Transaction*/
|
||||
__asm("nop");
|
||||
retStat = flash_writeToPage(txBuff, NULL, length + 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
__asm("nop");
|
||||
uint8_t breakLength = (pageEnd - address) + 1;
|
||||
/*Fill the Tx buffer*/
|
||||
txBuff[0] = PageProgram; /*Page program command*/
|
||||
txBuff[1] = (address >> 16) & 0xFF; /*MSB of address*/
|
||||
txBuff[2] = (address >> 8) & 0xFF; /*Mid part of address*/
|
||||
txBuff[3] = (address >> 0) & 0xFF; /*LSB of address*/
|
||||
memcpy(&txBuff[4], data, breakLength); /*Data bytes to program*/
|
||||
|
||||
/*SPI Transaction*/
|
||||
__asm("nop");
|
||||
retStat = flash_writeToPage(txBuff, NULL, breakLength + 4);
|
||||
|
||||
/*Fill the Tx buffer*/
|
||||
txBuff[0] = PageProgram; /*Page program command*/
|
||||
txBuff[1] = ((pageEnd+1) >> 16) & 0xFF; /*MSB of address*/
|
||||
txBuff[2] = ((pageEnd+1) >> 8) & 0xFF; /*Mid part of address*/
|
||||
txBuff[3] = ((pageEnd+1) >> 0) & 0xFF; /*LSB of address*/
|
||||
memcpy(&txBuff[4], (uint8_t*)&data[breakLength], length - breakLength); /*Data bytes to program*/
|
||||
|
||||
/*SPI Transaction*/
|
||||
__asm("nop");
|
||||
retStat |= flash_writeToPage(txBuff, NULL, (length - breakLength) + 4);
|
||||
|
||||
}
|
||||
|
||||
if(retStat != FLASH_STATUS_OK){
|
||||
__asm("nop");
|
||||
}
|
||||
return retStat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads data from the flash.
|
||||
*
|
||||
* @param address The address to read from.
|
||||
* @param data The data read from the flash.
|
||||
* @param length The length of the data to read.
|
||||
*
|
||||
* @returns The status of the read operation.
|
||||
*/
|
||||
flashStatus_t flash_readData(uint32_t address, uint8_t *data, uint16_t length){
|
||||
/*Variable for transaction status*/
|
||||
flashStatus_t retStat = FLASH_STATUS_ERROR;
|
||||
|
||||
if(length > MAX_RW_ALLOWED){
|
||||
return FLASH_STATUS_ERROR;
|
||||
}
|
||||
|
||||
/*Variable to check Write in progress bit*/
|
||||
bool wip = 0;
|
||||
|
||||
/*Do while loop as WIP is to be read at-least once*/
|
||||
uint32_t startTime = flash_msTick();
|
||||
do{
|
||||
/*Read WIP bit*/
|
||||
retStat = flash_readWIP(&wip);
|
||||
if(retStat != FLASH_STATUS_OK){
|
||||
break;
|
||||
}
|
||||
if((flash_msTick() - startTime) > NOR_TIMEOUT){
|
||||
retStat = FLASH_BUSY_IN_OPERATION;
|
||||
break;
|
||||
}
|
||||
}while(wip != 0 );
|
||||
|
||||
__asm("nop");
|
||||
|
||||
uint8_t txBuff[MAX_RW_ALLOWED + 4] = {0};
|
||||
uint8_t rxBuff[MAX_RW_ALLOWED + 4] = {0};
|
||||
|
||||
/*Fill the Tx buffer*/
|
||||
txBuff[0] = ReadData;
|
||||
txBuff[1] = (address >> 16) & 0xFF;
|
||||
txBuff[2] = (address >> 8 ) & 0xFF;
|
||||
txBuff[3] = (address >> 0 ) & 0xFF;
|
||||
|
||||
retStat = flash_sendData(txBuff, rxBuff, length+4);
|
||||
__asm("nop");
|
||||
memcpy(data, &rxBuff[4], length);
|
||||
return retStat;
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* nor_flash.h
|
||||
*
|
||||
* Created on: 16-Jan-2023
|
||||
* Author: Vecmocon Technology
|
||||
*/
|
||||
|
||||
#ifndef INC_NOR_FLASH_H_
|
||||
#define INC_NOR_FLASH_H_
|
||||
|
||||
#include "SDK/inc/flash_types.h"
|
||||
|
||||
#define EEPROM_PARTITION 13 //In sectors
|
||||
|
||||
#define MAX_RW_ALLOWED PAGE_SIZE //In Bytes
|
||||
|
||||
flashStatus_t flash_eraseCommands(uint32_t address, flash_eraseCmds command);
|
||||
flashStatus_t flash_programPage(uint32_t address, const uint8_t *data, uint16_t length);
|
||||
flashStatus_t flash_readData(uint32_t address, uint8_t *data, uint16_t length);
|
||||
|
||||
flashStatus_t flash_getUID(uint8_t* uID);
|
||||
flashStatus_t flash_getMID(uint8_t* mID, uint8_t* dID);
|
||||
flashStatus_t flash_getRID(uint8_t* mID, uint16_t* id);
|
||||
|
||||
#define flashPageErase(address) flash_eraseCommands(address, FLASH_PAGE_ERASE)
|
||||
#define flashSectorErase(address) flash_eraseCommands(address, FLASH_SECTOR_ERASE)
|
||||
#define flashBlockErase(address) flash_eraseCommands(address, FLASH_BLOCK_ERASE)
|
||||
#define flashChipErase(address) flash_eraseCommands(address, FLASH_CHIP_ERASE)
|
||||
|
||||
|
||||
#endif /* INC_NOR_FLASH_H_ */
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* flash_interface.c
|
||||
*
|
||||
* Created on: 16-Jan-2023
|
||||
* Author: Vecmocon Technology
|
||||
*/
|
||||
|
||||
#include "flash_interface.h"
|
||||
|
||||
/**
|
||||
* Transmits data over the SPI bus.
|
||||
*
|
||||
* @param txBuffer The buffer containing the data to transmit.
|
||||
* @param rxBuffer The buffer to store the received data.
|
||||
* @param numberOfFrames The number of frames to transmit.
|
||||
*
|
||||
* @returns The number of frames received.
|
||||
*/
|
||||
int8_t flash_sendData(void* txBuffer, uint8_t* rxBuffer, uint32_t numberOfFrames)
|
||||
{
|
||||
return xMCAL_SPI_TxData(SPI0, txBuffer, rxBuffer, numberOfFrames);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Current ticks in MS from SYSTICK
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
* @returns Current TICK in MS.
|
||||
*/
|
||||
uint32_t flash_msTick(void)
|
||||
{
|
||||
return i32MCAL_getTicks();
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
/*
|
||||
* flash_interface.h
|
||||
*
|
||||
* Created on: 16-Jan-2023
|
||||
* Author: Vecmocon Technology
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_FLASH_INTERFACE_H_
|
||||
#define PLATFORM_FLASH_INTERFACE_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "Core/Include/ivec_mcal_spi.h"
|
||||
#include "../utils/utils.h"
|
||||
|
||||
int8_t flash_sendData(void* txBuffer, uint8_t* rxBuffer, uint32_t numberOfFrames);
|
||||
uint32_t flash_msTick(void);
|
||||
|
||||
#endif /* PLATFORM_FLASH_INTERFACE_H_ */
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* ivec_TM1650.h
|
||||
*
|
||||
* Created on: 16-Jul-2024
|
||||
* Author: Vecmocon Technology
|
||||
*/
|
||||
|
||||
#ifndef IVEC_TM1650_H_
|
||||
#define IVEC_TM1650_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if SEV_SEG_DB == 1
|
||||
#define NUM_OF_DIGITS 3
|
||||
#endif
|
||||
/***********************Data Command Settings enumerations***********************/
|
||||
typedef enum{
|
||||
TM_1650_SYSTEM_CMD = 0x48,
|
||||
TM_1650_READ_KEY_CMD = 0x4F,
|
||||
}TM_1650_DataCommandSettings_t;
|
||||
/********************************************************************************/
|
||||
|
||||
|
||||
/***********************System parameter setting enumerations***********************/
|
||||
typedef enum {
|
||||
TM_1650_BRIGHT_1 = 0x10,
|
||||
TM_1650_BRIGHT_2 = 0x20,
|
||||
TM_1650_BRIGHT_3 = 0x30,
|
||||
TM_1650_BRIGHT_4 = 0x40,
|
||||
TM_1650_BRIGHT_5 = 0x50,
|
||||
TM_1650_BRIGHT_6 = 0x60,
|
||||
TM_1650_BRIGHT_7 = 0x70,
|
||||
TM_1650_BRIGHT_8 = 0x00,
|
||||
}TM_1650_Brightness_t;
|
||||
|
||||
typedef enum {
|
||||
TM_1650_Segment_8 = 0x00,
|
||||
TM_1650_Segment_7 = 0x08,
|
||||
}TM_1650_Segement_t;
|
||||
|
||||
typedef enum {
|
||||
TM_1650_Normal_Mode = 0x00,
|
||||
TM_1650_Standby_Mode = 0x04,
|
||||
}TM_1650_OperatingMode_t;
|
||||
|
||||
typedef enum {
|
||||
TM_1650_Screen_OFF = 0x00,
|
||||
TM_1650_Screen_ON = 0x01,
|
||||
}TM_1650_SwitchMode_t;
|
||||
/***********************************************************************************/
|
||||
|
||||
/****************************Memory address enumerations****************************/
|
||||
typedef enum {
|
||||
TM_1650_DIG_1 = 0x68,
|
||||
TM_1650_DIG_2 = 0x6A,
|
||||
TM_1650_DIG_3 = 0x6C,
|
||||
TM_1650_DIG_4 = 0x6E,
|
||||
}TM_1650_Digit_t;
|
||||
|
||||
typedef enum {
|
||||
TM_1650_DISPLAY_0 = 0x3F,
|
||||
TM_1650_DISPLAY_1 = 0x06,
|
||||
}TM_1650_DisplayVal_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
TM_1650_Brightness_t brightness;
|
||||
TM_1650_Segement_t segment;
|
||||
TM_1650_OperatingMode_t opMode;
|
||||
TM_1650_SwitchMode_t switchMode;
|
||||
TM_1650_Digit_t digitsToUse;
|
||||
void (*dat_set_fn)(uint8_t state);
|
||||
void (*clk_set_fn)(uint8_t state);
|
||||
uint8_t (*read_data_fn)(void);
|
||||
} tm1650_drv_t;
|
||||
|
||||
typedef enum{
|
||||
TM1650_SUCCESS = 0,
|
||||
TM1650_ERROR = 1,
|
||||
TM1650_OUT_OF_BOUNDS = 2,
|
||||
}TM1650_Status_T;
|
||||
|
||||
/******************************__________API__________******************************/
|
||||
TM1650_Status_T tm1650_Init(TM_1650_Brightness_t brightness, TM_1650_Segement_t segment, \
|
||||
TM_1650_OperatingMode_t opMode, TM_1650_SwitchMode_t switchMode, \
|
||||
TM_1650_Digit_t digits, void (*dataPin)(), void (*clkPin)(), uint8_t (*readData)());
|
||||
|
||||
TM1650_Status_T tm1650_changeBrightness(TM_1650_Brightness_t brightness);
|
||||
|
||||
TM1650_Status_T tm1650_changeOPMode(TM_1650_OperatingMode_t opMode);
|
||||
|
||||
TM1650_Status_T tm1650_changeSegmentMode(TM_1650_Segement_t segment);
|
||||
|
||||
TM1650_Status_T tm1650_displaySwitch(TM_1650_SwitchMode_t switchMode);
|
||||
|
||||
TM1650_Status_T tm1650_showNum(TM_1650_Digit_t digit, uint8_t num);
|
||||
|
||||
TM1650_Status_T tm1650_showAlphabet(TM_1650_Digit_t digit, char * alpha);
|
||||
|
||||
TM1650_Status_T tm1650_showDot(TM_1650_Digit_t digit, bool dotFlag);
|
||||
|
||||
TM1650_Status_T tm1650_removeDot(TM_1650_Digit_t digit);
|
||||
/***********************************************************************************/
|
||||
|
||||
#endif /* IVEC_TM1650_H_ */
|
||||
|
|
@ -0,0 +1,332 @@
|
|||
/*
|
||||
* TM1650.c
|
||||
*
|
||||
* Created on: 09-Jan-2023
|
||||
* Author: Vecmocon Technology
|
||||
*/
|
||||
|
||||
#include "../TM1650_SDK/inc/ivec_TM1650.h"
|
||||
|
||||
#define NUM_OF_DIGITS 4
|
||||
|
||||
static tm1650_drv_t tm1650_drv = {0};
|
||||
|
||||
static uint8_t numericDisplayArray[10] = { 0x3F, 0x06, 0x5B, 0x4F, 0x66, \
|
||||
0x6D, 0x7D, 0x07, 0x7F, 0x6F
|
||||
};
|
||||
|
||||
#define NS 0x2D
|
||||
|
||||
|
||||
static uint8_t alphabetDisplayArray[26] = { 0x77, 0x7C, 0x39, 0x5E, 0x79, \
|
||||
0x71, 0x3D, 0x76, 0x30, 0x1E, \
|
||||
NS , 0x38, NS , NS , 0x3F, \
|
||||
0x73, NS , NS , 0x6D, NS , \
|
||||
0x3E, NS , NS , NS , NS , \
|
||||
NS
|
||||
};
|
||||
|
||||
static uint8_t currentNum[NUM_OF_DIGITS] = {0};
|
||||
|
||||
static volatile uint8_t digitDot[NUM_OF_DIGITS] = {0};
|
||||
|
||||
static void TM1650_Start(tm1650_drv_t *drv);
|
||||
static void TM1650_End(tm1650_drv_t *drv);
|
||||
static TM1650_Status_T TM1650_SendByte(tm1650_drv_t *drv, uint8_t byte);
|
||||
|
||||
static TM1650_Status_T tm1650_Configure(void);
|
||||
|
||||
/************************************Static_functions_START************************************/
|
||||
static void TM1650_Free(tm1650_drv_t *drv){
|
||||
drv->clk_set_fn(1);
|
||||
drv->dat_set_fn(1);
|
||||
}
|
||||
|
||||
static void TM1650_Start(tm1650_drv_t *drv){
|
||||
drv->clk_set_fn(1);
|
||||
drv->dat_set_fn(0);
|
||||
drv->clk_set_fn(0);
|
||||
}
|
||||
|
||||
static void TM1650_End(tm1650_drv_t *drv){
|
||||
drv->clk_set_fn(1);
|
||||
drv->dat_set_fn(1);
|
||||
// drv->clk_set_fn(0);
|
||||
}
|
||||
|
||||
|
||||
// uint8_t bitTosendArr[8] = {0};
|
||||
/**
|
||||
* Sends a byte to the TM1650.
|
||||
*
|
||||
* @param drv The TM1650 driver.
|
||||
* @param byte The byte to send.
|
||||
*
|
||||
* @returns The status of the operation.
|
||||
*/
|
||||
static TM1650_Status_T TM1650_SendByte(tm1650_drv_t *drv, uint8_t byte)
|
||||
{
|
||||
drv->clk_set_fn(0);
|
||||
uint8_t mask = 0x80;
|
||||
for(int32_t i = 7; i >= 0; i--, mask >>= 1) {
|
||||
uint8_t bitTosend = 0;
|
||||
bitTosend = (mask & byte) >> i;
|
||||
// bitTosendArr[7-i] = bitTosend;
|
||||
|
||||
drv->dat_set_fn(bitTosend);
|
||||
drv->clk_set_fn(1);
|
||||
drv->clk_set_fn(0);
|
||||
drv->dat_set_fn(0);
|
||||
}
|
||||
|
||||
TM1650_Status_T ackBuff = TM1650_ERROR;
|
||||
drv->clk_set_fn(1);
|
||||
ackBuff = (TM1650_Status_T)drv->read_data_fn();
|
||||
drv->clk_set_fn(0);
|
||||
|
||||
return ackBuff;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the TM1650 display.
|
||||
*
|
||||
* @returns None
|
||||
*/
|
||||
static TM1650_Status_T tm1650_Configure(void){
|
||||
uint8_t txBuff = 0;
|
||||
TM1650_Status_T retVal = TM1650_ERROR;
|
||||
|
||||
txBuff = tm1650_drv.brightness + \
|
||||
tm1650_drv.segment + \
|
||||
tm1650_drv.opMode + \
|
||||
tm1650_drv.switchMode;
|
||||
|
||||
TM1650_Free(&tm1650_drv);
|
||||
TM1650_Start(&tm1650_drv);
|
||||
retVal = (TM1650_Status_T)TM1650_SendByte(&tm1650_drv, TM_1650_SYSTEM_CMD);
|
||||
if(retVal == TM1650_SUCCESS){
|
||||
retVal = TM1650_SendByte(&tm1650_drv, txBuff);
|
||||
}
|
||||
TM1650_End(&tm1650_drv);
|
||||
return retVal;
|
||||
}
|
||||
/************************************Static_functions_END************************************/
|
||||
|
||||
|
||||
/**
|
||||
* Initializes the TM1650 driver.
|
||||
*
|
||||
* @param brightness The brightness of the display.
|
||||
* @param segment The segment of the display to use.
|
||||
* @param opMode The operating mode of the display.
|
||||
* @param switchMode The switch mode of the display.
|
||||
* @param digits The number of digits to use.
|
||||
* @param dataPin The function to use for the data line.
|
||||
* @param clkPin The function to use for the clock line.
|
||||
* @param readData The function to use to read the data line.
|
||||
*
|
||||
* @returns The status of the initialization.
|
||||
*/
|
||||
TM1650_Status_T tm1650_Init(TM_1650_Brightness_t brightness, TM_1650_Segement_t segment, \
|
||||
TM_1650_OperatingMode_t opMode, TM_1650_SwitchMode_t switchMode, \
|
||||
TM_1650_Digit_t digits, void (*dataPin)(), void (*clkPin)(), uint8_t (*readData)()){
|
||||
|
||||
tm1650_drv.brightness = brightness;
|
||||
tm1650_drv.segment = segment;
|
||||
tm1650_drv.switchMode = switchMode;
|
||||
tm1650_drv.opMode = opMode;
|
||||
tm1650_drv.digitsToUse = digits;
|
||||
tm1650_drv.dat_set_fn = (void *)dataPin;
|
||||
tm1650_drv.clk_set_fn = (void *)clkPin;
|
||||
tm1650_drv.read_data_fn = readData;
|
||||
|
||||
|
||||
return tm1650_Configure();
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the brightness of the display.
|
||||
*
|
||||
* @param brightness The brightness of the display.
|
||||
*
|
||||
* @returns None
|
||||
*/
|
||||
TM1650_Status_T tm1650_changeBrightness(TM_1650_Brightness_t brightness){
|
||||
tm1650_drv.brightness = brightness;
|
||||
return tm1650_Configure();
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the operating mode of the TM1650.
|
||||
*
|
||||
* @param opMode The new operating mode.
|
||||
*
|
||||
* @returns The status of the operation.
|
||||
*/
|
||||
TM1650_Status_T tm1650_changeOPMode(TM_1650_OperatingMode_t opMode){
|
||||
tm1650_drv.opMode = opMode;
|
||||
return tm1650_Configure();
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the segment mode of the TM1650.
|
||||
*
|
||||
* @param segment The new segment mode.
|
||||
*
|
||||
* @returns The status of the operation.
|
||||
*/
|
||||
TM1650_Status_T tm1650_changeSegmentMode(TM_1650_Segement_t segment){
|
||||
tm1650_drv.segment = segment;
|
||||
return tm1650_Configure();
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the switchMode of the display.
|
||||
*
|
||||
* @param switchMode The desired mode.
|
||||
*
|
||||
* @returns The status of the operation.
|
||||
*/
|
||||
TM1650_Status_T tm1650_displaySwitch(TM_1650_SwitchMode_t switchMode){
|
||||
tm1650_drv.switchMode = switchMode;
|
||||
return tm1650_Configure();
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a number on the TM1650 LED display.
|
||||
*
|
||||
* @param digit The digit to display the number on.
|
||||
* @param num The number to display.
|
||||
*
|
||||
* @returns TM1650_SUCCESS if the number was successfully displayed.
|
||||
*/
|
||||
TM1650_Status_T tm1650_showNum(TM_1650_Digit_t digit, uint8_t num)
|
||||
{
|
||||
TM1650_Status_T retVal = TM1650_ERROR;
|
||||
if(num > 9)
|
||||
return TM1650_OUT_OF_BOUNDS;
|
||||
TM1650_Free(&tm1650_drv);
|
||||
TM1650_Start(&tm1650_drv);
|
||||
retVal = TM1650_SendByte(&tm1650_drv, digit);
|
||||
if(retVal == 0)
|
||||
{
|
||||
retVal = TM1650_SendByte(&tm1650_drv, numericDisplayArray[num] | digitDot[(digit - TM_1650_DIG_1)/2] );
|
||||
}
|
||||
// | digitDot[(digit - TM_1650_DIG_1)/2]
|
||||
TM1650_End(&tm1650_drv);
|
||||
if(retVal == TM1650_SUCCESS)
|
||||
{
|
||||
currentNum[digit - TM_1650_DIG_1] = digit;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Displays an alphabet on the TM1650 LED display.
|
||||
*
|
||||
* @param digit The digit to display the alphabet on.
|
||||
* @param alpha The alphabet to display.
|
||||
*
|
||||
* @returns TM1650_SUCCESS if the operation was successful.
|
||||
*/
|
||||
TM1650_Status_T tm1650_showAlphabet(TM_1650_Digit_t digit, char * alpha)
|
||||
{
|
||||
TM1650_Status_T retVal = TM1650_ERROR;
|
||||
uint8_t index = 0;
|
||||
index = (*alpha);
|
||||
if((uint8_t)(*alpha) > 90 || (uint8_t)(*alpha) < 65)
|
||||
return TM1650_OUT_OF_BOUNDS;
|
||||
TM1650_Free(&tm1650_drv);
|
||||
TM1650_Start(&tm1650_drv);
|
||||
retVal = TM1650_SendByte(&tm1650_drv, digit);
|
||||
if(retVal == 0)
|
||||
{
|
||||
index -= 65;
|
||||
retVal = TM1650_SendByte(&tm1650_drv, alphabetDisplayArray[index]);
|
||||
}
|
||||
|
||||
// | digitDot[(digit - TM_1650_DIG_1)/2]
|
||||
|
||||
TM1650_End(&tm1650_drv);
|
||||
if(retVal == TM1650_SUCCESS)
|
||||
{
|
||||
currentNum[digit - TM_1650_DIG_1] = digit;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Displays and Removes the dot on a specific digit on TM1650 LED display.
|
||||
*
|
||||
* @param digit The digit to display on.
|
||||
* @param dotFlag To Turn the Dot ON or OFF
|
||||
*
|
||||
* @returns None
|
||||
*/
|
||||
TM1650_Status_T tm1650_showDot(TM_1650_Digit_t digit, bool dotFlag)
|
||||
{
|
||||
switch(digit)
|
||||
{
|
||||
case TM_1650_DIG_1:
|
||||
|
||||
if(dotFlag == true)
|
||||
digitDot[(digit - TM_1650_DIG_1)/2] = 0x80;
|
||||
else
|
||||
digitDot[(digit - TM_1650_DIG_1)/2] = 0x00;
|
||||
break;
|
||||
|
||||
case TM_1650_DIG_2:
|
||||
|
||||
if(dotFlag == true)
|
||||
digitDot[(digit - TM_1650_DIG_1)/2] = 0x80;
|
||||
else
|
||||
digitDot[(digit - TM_1650_DIG_1)/2] = 0x00;
|
||||
|
||||
break;
|
||||
|
||||
case TM_1650_DIG_3:
|
||||
|
||||
if(dotFlag == true)
|
||||
digitDot[(digit - TM_1650_DIG_1)/2] = 0x80;
|
||||
else
|
||||
digitDot[(digit - TM_1650_DIG_1)/2] = 0x00;
|
||||
|
||||
break;
|
||||
|
||||
case TM_1650_DIG_4:
|
||||
|
||||
if(dotFlag == true)
|
||||
digitDot[(digit - TM_1650_DIG_1)/2] = 0x80;
|
||||
else
|
||||
digitDot[(digit - TM_1650_DIG_1)/2] = 0x00;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* *********************************************************FUNCTION DISCONTINUED***************************************************************************************
|
||||
* Removes the dot from a specific digit.
|
||||
*
|
||||
* @param digit The digit to remove the dot from.
|
||||
*
|
||||
* @returns None
|
||||
*/
|
||||
TM1650_Status_T tm1650_removeDot(TM_1650_Digit_t digit)
|
||||
{
|
||||
TM1650_Status_T retVal = TM1650_ERROR;
|
||||
TM1650_Free(&tm1650_drv);
|
||||
TM1650_Start(&tm1650_drv);
|
||||
retVal = TM1650_SendByte(&tm1650_drv, digit);
|
||||
if(retVal == 0)
|
||||
{
|
||||
retVal = TM1650_SendByte(&tm1650_drv, numericDisplayArray[currentNum[digit]]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
|
@ -0,0 +1,132 @@
|
|||
VERSION ""
|
||||
|
||||
|
||||
NS_ :
|
||||
NS_DESC_
|
||||
CM_
|
||||
BA_DEF_
|
||||
BA_
|
||||
VAL_
|
||||
CAT_DEF_
|
||||
CAT_
|
||||
FILTER
|
||||
BA_DEF_DEF_
|
||||
EV_DATA_
|
||||
ENVVAR_DATA_
|
||||
SGTYPE_
|
||||
SGTYPE_VAL_
|
||||
BA_DEF_SGTYPE_
|
||||
BA_SGTYPE_
|
||||
SIG_TYPE_REF_
|
||||
VAL_TABLE_
|
||||
SIG_GROUP_
|
||||
SIG_VALTYPE_
|
||||
SIGTYPE_VALTYPE_
|
||||
BO_TX_BU_
|
||||
BA_DEF_REL_
|
||||
BA_REL_
|
||||
BA_DEF_DEF_REL_
|
||||
BU_SG_REL_
|
||||
BU_EV_REL_
|
||||
BU_BO_REL_
|
||||
SG_MUL_VAL_
|
||||
|
||||
BS_:
|
||||
|
||||
BU_:
|
||||
|
||||
|
||||
BO_ 8 New_Message_10: 8 Vector__XXX
|
||||
SG_ New_Signal_67 : 8|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 7 New_Message_9: 8 Vector__XXX
|
||||
SG_ New_Signal_66 : 8|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 6 New_Message_8: 8 Vector__XXX
|
||||
SG_ New_Signal_65 : 8|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 5 New_Message_7: 8 Vector__XXX
|
||||
SG_ New_Signal_64 : 8|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 4 New_Message_6: 8 Vector__XXX
|
||||
SG_ New_Signal_63 : 8|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 3 New_Message_5: 8 Vector__XXX
|
||||
SG_ New_Signal_62 : 8|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 2 New_Message_4: 8 Vector__XXX
|
||||
SG_ New_Signal_61 : 8|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 1 New_Message_3: 8 Vector__XXX
|
||||
SG_ New_Signal_60 : 8|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 0 New_Message_2: 8 Vector__XXX
|
||||
SG_ New_Signal_59 : 0|8@1+ (1,0) [0|0] "" Vector__XXX
|
||||
|
||||
BO_ 2368323178 superMaxxMsg: 8 Vector__XXX
|
||||
SG_ mosfetTemp m7 : 23|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ ambientSensor m7 : 15|8@0+ (1,0) [0|255] "" Vector__XXX
|
||||
SG_ underTemp m8 : 12|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ soh m2 : 15|8@0+ (1,0) [0|255] "%" Vector__XXX
|
||||
SG_ soc m2 : 23|8@0+ (1,0) [0|255] "%" Vector__XXX
|
||||
SG_ shortCircuitProtection m8 : 15|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ PKT_Nb M : 7|8@0+ (1,0) [0|0] "" Vector__XXX
|
||||
SG_ pack_UV m8 : 14|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ pack_OV m8 : 13|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ overTemp m8 : 11|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ overCurrent m8 : 10|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ NTC_9 m5 : 23|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_8 m5 : 15|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_7 m4 : 63|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_6 m4 : 55|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_5 m4 : 47|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_4 m4 : 39|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_3 m4 : 31|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_2 m4 : 23|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_16 m6 : 23|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_15 m6 : 15|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_14 m5 : 63|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_13 m5 : 55|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_12 m5 : 47|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_11 m5 : 39|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_10 m5 : 31|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ NTC_1 m4 : 15|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ dischargingMosfet m3 : 8|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ chargingMosfet m3 : 9|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ chargingCycle m2 : 31|16@0+ (1,0) [0|65535] "" Vector__XXX
|
||||
SG_ cellVoltage_9 m11 : 47|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_8 m11 : 31|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_7 m11 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_6 m10 : 47|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_5 m10 : 31|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_4 m10 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_3 m9 : 47|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_2 m9 : 31|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_16 m14 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_15 m13 : 47|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_14 m13 : 31|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_13 m13 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_12 m12 : 47|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_11 m12 : 31|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_10 m12 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellVoltage_1 m9 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ cellUnderVoltage m8 : 9|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ cellOverVoltage m8 : 8|1@0+ (1,0) [0|1] "" Vector__XXX
|
||||
SG_ bmsId_4 m0 : 47|8@0+ (1,0) [0|255] "" Vector__XXX
|
||||
SG_ bmsId_3 m0 : 39|8@0+ (1,0) [0|255] "" Vector__XXX
|
||||
SG_ bmsId_2 m0 : 31|8@0+ (1,0) [0|255] "" Vector__XXX
|
||||
SG_ bmsId_1 m0 : 23|8@0+ (1,0) [0|255] "" Vector__XXX
|
||||
SG_ bmsId_0 m0 : 15|8@0+ (1,0) [0|255] "" Vector__XXX
|
||||
SG_ battVoltage m1 : 15|16@0+ (1,0) [0|65535] "mV" Vector__XXX
|
||||
SG_ battTemperature m1 : 47|8@0- (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ battLoadStatus m1 : 55|8@0+ (1,0) [-128|127] "" Vector__XXX
|
||||
SG_ battCurrent m1 : 31|16@0- (1,0) [-32768|32767] "mA" Vector__XXX
|
||||
SG_ battCapacity m2 : 47|16@0+ (1,0) [0|65535] "" Vector__XXX
|
||||
|
||||
|
||||
|
||||
BA_DEF_ "MultiplexExtEnabled" ENUM "No","Yes";
|
||||
BA_DEF_ "BusType" STRING ;
|
||||
BA_DEF_DEF_ "MultiplexExtEnabled" "No";
|
||||
BA_DEF_DEF_ "BusType" "CAN";
|
||||
|
||||
|
|
@ -0,0 +1,530 @@
|
|||
/*
|
||||
* File: canReceive.c
|
||||
*
|
||||
*
|
||||
* --- THIS FILE GENERATED BY S-FUNCTION BUILDER: 3.0 ---
|
||||
*
|
||||
* This file is an S-function produced by the S-Function
|
||||
* Builder which only recognizes certain fields. Changes made
|
||||
* outside these fields will be lost the next time the block is
|
||||
* used to load, edit, and resave this file. This file will be overwritten
|
||||
* by the S-function Builder block. If you want to edit this file by hand,
|
||||
* you must change it only in the area defined as:
|
||||
*
|
||||
* %%%-SFUNWIZ_defines_Changes_BEGIN
|
||||
* #define NAME 'replacement text'
|
||||
* %%% SFUNWIZ_defines_Changes_END
|
||||
*
|
||||
* DO NOT change NAME--Change the 'replacement text' only.
|
||||
*
|
||||
* For better compatibility with the Simulink Coder, the
|
||||
* "wrapper" S-function technique is used. This is discussed
|
||||
* in the Simulink Coder's Manual in the Chapter titled,
|
||||
* "Wrapper S-functions".
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
* | See matlabroot/simulink/src/sfuntmpl_doc.c for a more detailed template |
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Created: Mon Oct 28 13:36:38 2024
|
||||
*/
|
||||
|
||||
#define S_FUNCTION_LEVEL 2
|
||||
#define S_FUNCTION_NAME canReceive
|
||||
|
||||
/*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
|
||||
/* %%%-SFUNWIZ_defines_Changes_BEGIN --- EDIT HERE TO _END */
|
||||
#define NUM_INPUTS 3
|
||||
|
||||
/* Input Port 0 */
|
||||
#define IN_PORT_0_NAME id
|
||||
#define INPUT_0_DIMS_ND {1,1}
|
||||
#define INPUT_0_NUM_ELEMS 1
|
||||
#define INPUT_0_WIDTH 1
|
||||
#define INPUT_DIMS_0_COL 1
|
||||
#define INPUT_0_DTYPE uint32_T
|
||||
#define INPUT_0_COMPLEX COMPLEX_NO
|
||||
#define IN_0_BUS_BASED 0
|
||||
#define IN_0_BUS_NAME
|
||||
#define IN_0_DIMS 1-D
|
||||
#define INPUT_0_FEEDTHROUGH 1
|
||||
#define IN_0_ISSIGNED 0
|
||||
#define IN_0_WORDLENGTH 8
|
||||
#define IN_0_FIXPOINTSCALING 1
|
||||
#define IN_0_FRACTIONLENGTH 9
|
||||
#define IN_0_BIAS 0
|
||||
#define IN_0_SLOPE 0.125
|
||||
|
||||
/* Input Port 1 */
|
||||
#define IN_PORT_1_NAME dlc
|
||||
#define INPUT_1_DIMS_ND {1,1}
|
||||
#define INPUT_1_NUM_ELEMS 1
|
||||
#define INPUT_1_WIDTH 1
|
||||
#define INPUT_DIMS_1_COL 1
|
||||
#define INPUT_1_DTYPE uint8_T
|
||||
#define INPUT_1_COMPLEX COMPLEX_NO
|
||||
#define IN_1_BUS_BASED 0
|
||||
#define IN_1_BUS_NAME
|
||||
#define IN_1_DIMS 1-D
|
||||
#define INPUT_1_FEEDTHROUGH 1
|
||||
#define IN_1_ISSIGNED 0
|
||||
#define IN_1_WORDLENGTH 8
|
||||
#define IN_1_FIXPOINTSCALING 1
|
||||
#define IN_1_FRACTIONLENGTH 9
|
||||
#define IN_1_BIAS 0
|
||||
#define IN_1_SLOPE 0.125
|
||||
|
||||
/* Input Port 2 */
|
||||
#define IN_PORT_2_NAME data
|
||||
#define INPUT_2_DIMS_ND {8,1}
|
||||
#define INPUT_2_NUM_ELEMS 8
|
||||
#define INPUT_2_WIDTH 8
|
||||
#define INPUT_DIMS_2_COL 1
|
||||
#define INPUT_2_DTYPE uint8_T
|
||||
#define INPUT_2_COMPLEX COMPLEX_NO
|
||||
#define IN_2_BUS_BASED 0
|
||||
#define IN_2_BUS_NAME
|
||||
#define IN_2_DIMS 2-D
|
||||
#define INPUT_2_FEEDTHROUGH 1
|
||||
#define IN_2_ISSIGNED 0
|
||||
#define IN_2_WORDLENGTH 8
|
||||
#define IN_2_FIXPOINTSCALING 1
|
||||
#define IN_2_FRACTIONLENGTH 9
|
||||
#define IN_2_BIAS 0
|
||||
#define IN_2_SLOPE 0.125
|
||||
#define NUM_OUTPUTS 1
|
||||
|
||||
/* Output Port 0 */
|
||||
#define OUT_PORT_0_NAME canFrame
|
||||
#define OUTPUT_0_DIMS_ND {1,1}
|
||||
#define OUTPUT_0_NUM_ELEMS 1
|
||||
#define OUTPUT_0_WIDTH 1
|
||||
#define OUTPUT_DIMS_0_COL 1
|
||||
#define OUTPUT_0_DTYPE uint8_T
|
||||
#define OUTPUT_0_COMPLEX COMPLEX_NO
|
||||
#define OUT_0_BUS_BASED 1
|
||||
#define OUT_0_BUS_NAME CAN_MESSAGE_BUS
|
||||
#define OUT_0_DIMS 1-D
|
||||
#define OUT_0_ISSIGNED 1
|
||||
#define OUT_0_WORDLENGTH 8
|
||||
#define OUT_0_FIXPOINTSCALING 1
|
||||
#define OUT_0_FRACTIONLENGTH 3
|
||||
#define OUT_0_BIAS 0
|
||||
#define OUT_0_SLOPE 0.125
|
||||
#define NPARAMS 0
|
||||
#define SAMPLE_TIME_0 INHERITED_SAMPLE_TIME
|
||||
#define NUM_DISC_STATES 0
|
||||
#define DISC_STATES_IC [0]
|
||||
#define NUM_CONT_STATES 0
|
||||
#define CONT_STATES_IC [0]
|
||||
#define SFUNWIZ_GENERATE_TLC 1
|
||||
#define SOURCEFILES "__SFB__"
|
||||
#define PANELINDEX N/A
|
||||
#define USE_SIMSTRUCT 0
|
||||
#define SHOW_COMPILE_STEPS 0
|
||||
#define CREATE_DEBUG_MEXFILE 0
|
||||
#define SAVE_CODE_ONLY 0
|
||||
#define SFUNWIZ_REVISION 3.0
|
||||
|
||||
/* %%%-SFUNWIZ_defines_Changes_END --- EDIT HERE TO _BEGIN */
|
||||
/*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
|
||||
#include "simstruc.h"
|
||||
#include "canReceive_bus.h"
|
||||
|
||||
/*
|
||||
* Code Generation Environment flag (simulation or standalone target).
|
||||
*/
|
||||
static int_T isSimulationTarget;
|
||||
|
||||
/* Utility function prototypes. */
|
||||
static int_T GetRTWEnvironmentMode(SimStruct *S);
|
||||
|
||||
/* Macro used to check if Simulation mode is set to accelerator */
|
||||
#define isBusDWorkPresent ( ( ( !ssRTWGenIsCodeGen(S) || isSimulationTarget ) && !ssIsExternalSim(S) ) || ssIsRapidAcceleratorActive(S) )
|
||||
|
||||
typedef struct {
|
||||
int_T offset;
|
||||
int_T elemSize;
|
||||
int_T numElems;
|
||||
} busInfoStruct;
|
||||
|
||||
extern void canReceive_Outputs_wrapper(const uint32_T *id,
|
||||
const uint8_T *dlc,
|
||||
const uint8_T *data,
|
||||
CAN_MESSAGE_BUS *canFrame);
|
||||
|
||||
/*====================*
|
||||
* S-function methods *
|
||||
*====================*/
|
||||
/* Function: mdlInitializeSizes ===============================================
|
||||
* Abstract:
|
||||
* Setup sizes of the various vectors.
|
||||
*/
|
||||
static void mdlInitializeSizes(SimStruct *S)
|
||||
{
|
||||
DECL_AND_INIT_DIMSINFO(inputDimsInfo);
|
||||
ssSetNumSFcnParams(S, NPARAMS);
|
||||
if (ssGetNumSFcnParams(S) != ssGetSFcnParamsCount(S)) {
|
||||
return; /* Parameter mismatch will be reported by Simulink */
|
||||
}
|
||||
|
||||
ssSetArrayLayoutForCodeGen(S, SS_COLUMN_MAJOR);
|
||||
ssSetOperatingPointCompliance(S, USE_DEFAULT_OPERATING_POINT);
|
||||
ssSetNumContStates(S, NUM_CONT_STATES);
|
||||
ssSetNumDiscStates(S, NUM_DISC_STATES);
|
||||
if (!ssSetNumInputPorts(S, NUM_INPUTS))
|
||||
return;
|
||||
|
||||
/* Input Port 0 */
|
||||
ssSetInputPortWidth(S, 0, INPUT_0_NUM_ELEMS);
|
||||
ssSetInputPortDataType(S, 0, SS_UINT32);
|
||||
ssSetInputPortComplexSignal(S, 0, INPUT_0_COMPLEX);
|
||||
ssSetInputPortDirectFeedThrough(S, 0, INPUT_0_FEEDTHROUGH);
|
||||
ssSetInputPortRequiredContiguous(S, 0, 1);/*direct input signal access*/
|
||||
|
||||
/* Input Port 1 */
|
||||
ssSetInputPortWidth(S, 1, INPUT_1_NUM_ELEMS);
|
||||
ssSetInputPortDataType(S, 1, SS_UINT8);
|
||||
ssSetInputPortComplexSignal(S, 1, INPUT_1_COMPLEX);
|
||||
ssSetInputPortDirectFeedThrough(S, 1, INPUT_1_FEEDTHROUGH);
|
||||
ssSetInputPortRequiredContiguous(S, 1, 1);/*direct input signal access*/
|
||||
|
||||
/* Input Port 2 */
|
||||
ssAllowSignalsWithMoreThan2D(S);
|
||||
inputDimsInfo.numDims = 2;
|
||||
inputDimsInfo.width = INPUT_2_NUM_ELEMS;
|
||||
int_T in2Dims[] = INPUT_2_DIMS_ND;
|
||||
inputDimsInfo.dims = in2Dims;
|
||||
ssSetInputPortDimensionInfo(S, 2, &inputDimsInfo);
|
||||
ssSetInputPortDataType(S, 2, SS_UINT8);
|
||||
ssSetInputPortComplexSignal(S, 2, INPUT_2_COMPLEX);
|
||||
ssSetInputPortDirectFeedThrough(S, 2, INPUT_2_FEEDTHROUGH);
|
||||
ssSetInputPortRequiredContiguous(S, 2, 1);/*direct input signal access*/
|
||||
if (!ssSetNumOutputPorts(S, NUM_OUTPUTS))
|
||||
return;
|
||||
|
||||
/* Output Port 0 */
|
||||
|
||||
/* Register CAN_MESSAGE_BUS datatype for Output port 0 */
|
||||
#if defined(MATLAB_MEX_FILE)
|
||||
|
||||
if (ssGetSimMode(S) != SS_SIMMODE_SIZES_CALL_ONLY) {
|
||||
DTypeId dataTypeIdReg;
|
||||
ssRegisterTypeFromNamedObject(S, "CAN_MESSAGE_BUS", &dataTypeIdReg);
|
||||
if (dataTypeIdReg == INVALID_DTYPE_ID)
|
||||
return;
|
||||
ssSetOutputPortDataType(S, 0, dataTypeIdReg);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
ssSetOutputPortWidth(S, 0, OUTPUT_0_NUM_ELEMS);
|
||||
ssSetBusOutputObjectName(S, 0, (void *) "CAN_MESSAGE_BUS");
|
||||
ssSetOutputPortComplexSignal(S, 0, OUTPUT_0_COMPLEX);
|
||||
ssSetBusOutputAsStruct(S, 0,OUT_0_BUS_BASED);
|
||||
ssSetOutputPortBusMode(S, 0, SL_BUS_MODE);
|
||||
if (ssRTWGenIsCodeGen(S)) {
|
||||
isSimulationTarget = GetRTWEnvironmentMode(S);
|
||||
if (isSimulationTarget == -1) {
|
||||
ssSetLocalErrorStatus(S,
|
||||
" Unable to determine a valid code generation environment mode");
|
||||
return;
|
||||
}
|
||||
|
||||
isSimulationTarget |= ssRTWGenIsModelReferenceSimTarget(S);
|
||||
}
|
||||
|
||||
/* Set the number of dworks */
|
||||
if (!ssSetNumDWork(S, 1))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Configure the dwork 0 (canFrameBUS)
|
||||
*/
|
||||
#if defined(MATLAB_MEX_FILE)
|
||||
|
||||
if (ssGetSimMode(S) != SS_SIMMODE_SIZES_CALL_ONLY) {
|
||||
DTypeId dataTypeIdReg;
|
||||
ssRegisterTypeFromNamedObject(S, "CAN_MESSAGE_BUS", &dataTypeIdReg);
|
||||
if (dataTypeIdReg == INVALID_DTYPE_ID)
|
||||
return;
|
||||
if (isBusDWorkPresent) {
|
||||
ssSetDWorkDataType(S, 0, dataTypeIdReg);
|
||||
} else {
|
||||
ssSetDWorkDataType(S, 0, SS_POINTER);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
ssSetDWorkUsageType(S, 0, SS_DWORK_USED_AS_DWORK);
|
||||
ssSetDWorkName(S, 0, "canFrameBUS");
|
||||
ssSetDWorkWidth(S, 0, DYNAMICALLY_SIZED);
|
||||
ssSetDWorkComplexSignal(S, 0, COMPLEX_NO);
|
||||
ssSetNumPWork(S, 0);
|
||||
ssSetNumSampleTimes(S, 1);
|
||||
ssSetNumRWork(S, 0);
|
||||
ssSetNumIWork(S, 0);
|
||||
ssSetNumModes(S, 0);
|
||||
ssSetNumNonsampledZCs(S, 0);
|
||||
ssSetSimulinkVersionGeneratedIn(S, "23.2");
|
||||
|
||||
/* Take care when specifying exception free code - see sfuntmpl_doc.c */
|
||||
ssSetRuntimeThreadSafetyCompliance(S, RUNTIME_THREAD_SAFETY_COMPLIANCE_FALSE);
|
||||
ssSetOptions(S, (SS_OPTION_EXCEPTION_FREE_CODE |
|
||||
SS_OPTION_USE_TLC_WITH_ACCELERATOR |
|
||||
SS_OPTION_WORKS_WITH_CODE_REUSE));
|
||||
}
|
||||
|
||||
#if defined(MATLAB_MEX_FILE)
|
||||
#define MDL_SET_INPUT_PORT_DIMENSION_INFO
|
||||
|
||||
static void mdlSetInputPortDimensionInfo(SimStruct *S,
|
||||
int_T port,
|
||||
const DimsInfo_T *dimsInfo)
|
||||
{
|
||||
if (!ssSetInputPortDimensionInfo(S, port, dimsInfo))
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#define MDL_SET_OUTPUT_PORT_DIMENSION_INFO
|
||||
#if defined(MDL_SET_OUTPUT_PORT_DIMENSION_INFO)
|
||||
|
||||
static void mdlSetOutputPortDimensionInfo(SimStruct *S,
|
||||
int_T port,
|
||||
const DimsInfo_T *dimsInfo)
|
||||
{
|
||||
if (!ssSetOutputPortDimensionInfo(S, port, dimsInfo))
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#define MDL_SET_DEFAULT_PORT_DIMENSION_INFO
|
||||
|
||||
static void mdlSetDefaultPortDimensionInfo(SimStruct *S)
|
||||
{
|
||||
DECL_AND_INIT_DIMSINFO(portDimsInfo);
|
||||
int_T dims[2];
|
||||
|
||||
/* Setting default dimensions for input port 2 */
|
||||
portDimsInfo.width = INPUT_2_NUM_ELEMS;
|
||||
dims[0] = INPUT_2_NUM_ELEMS;
|
||||
dims[1] = 1;
|
||||
portDimsInfo.dims = dims;
|
||||
portDimsInfo.numDims = 2;
|
||||
if (ssGetInputPortWidth(S, 2) == DYNAMICALLY_SIZED) {
|
||||
ssSetInputPortMatrixDimensions(S, 2, 1 , 1);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Function: mdlInitializeSampleTimes =========================================
|
||||
* Abstract:
|
||||
* Specifiy the sample time.
|
||||
*/
|
||||
static void mdlInitializeSampleTimes(SimStruct *S)
|
||||
{
|
||||
ssSetSampleTime(S, 0, SAMPLE_TIME_0);
|
||||
ssSetModelReferenceSampleTimeDefaultInheritance(S);
|
||||
ssSetOffsetTime(S, 0, 0.0);
|
||||
}
|
||||
|
||||
#define MDL_SET_INPUT_PORT_DATA_TYPE
|
||||
|
||||
static void mdlSetInputPortDataType(SimStruct *S, int port, DTypeId dType)
|
||||
{
|
||||
ssSetInputPortDataType(S, 0, dType);
|
||||
}
|
||||
|
||||
#define MDL_SET_OUTPUT_PORT_DATA_TYPE
|
||||
|
||||
static void mdlSetOutputPortDataType(SimStruct *S, int port, DTypeId dType)
|
||||
{
|
||||
ssSetOutputPortDataType(S, 0, dType);
|
||||
}
|
||||
|
||||
#define MDL_SET_DEFAULT_PORT_DATA_TYPES
|
||||
|
||||
static void mdlSetDefaultPortDataTypes(SimStruct *S)
|
||||
{
|
||||
ssSetInputPortDataType(S, 0, SS_DOUBLE);
|
||||
ssSetOutputPortDataType(S, 0, SS_DOUBLE);
|
||||
}
|
||||
|
||||
#define MDL_SET_WORK_WIDTHS
|
||||
#if defined(MDL_SET_WORK_WIDTHS) && defined(MATLAB_MEX_FILE)
|
||||
|
||||
static void mdlSetWorkWidths(SimStruct *S)
|
||||
{
|
||||
/* Set the width of DWork(s) used for marshalling the IOs */
|
||||
if (isBusDWorkPresent) {
|
||||
/* Update dwork 0 */
|
||||
ssSetDWorkWidth(S, 0, ssGetOutputPortWidth(S, 0));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#define MDL_START /* Change to #undef to remove function */
|
||||
#if defined(MDL_START)
|
||||
|
||||
/* Function: mdlStart =======================================================
|
||||
* Abstract:
|
||||
* This function is called once at start of model execution. If you
|
||||
* have states that should be initialized once, this is the place
|
||||
* to do it.
|
||||
*/
|
||||
static void mdlStart(SimStruct *S)
|
||||
{
|
||||
/* Bus Information */
|
||||
slDataTypeAccess *dta = ssGetDataTypeAccess(S);
|
||||
const char *bpath = ssGetPath(S);
|
||||
DTypeId CAN_MESSAGE_BUSId = ssGetDataTypeId(S,"CAN_MESSAGE_BUS");
|
||||
busInfoStruct *busInfo = (busInfoStruct *)malloc(8*sizeof(busInfoStruct));
|
||||
if (busInfo==NULL) {
|
||||
ssSetLocalErrorStatus(S, "Memory allocation failure");
|
||||
return;
|
||||
}
|
||||
|
||||
/*offsets info for all unique bus structures*/
|
||||
busInfo[0].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId,
|
||||
0);
|
||||
busInfo[0].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT8);
|
||||
busInfo[0].numElems = 1;
|
||||
busInfo[1].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId,
|
||||
1);
|
||||
busInfo[1].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT8);
|
||||
busInfo[1].numElems = 1;
|
||||
busInfo[2].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId,
|
||||
2);
|
||||
busInfo[2].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT8);
|
||||
busInfo[2].numElems = 1;
|
||||
busInfo[3].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId,
|
||||
3);
|
||||
busInfo[3].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT8);
|
||||
busInfo[3].numElems = 1;
|
||||
busInfo[4].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId,
|
||||
4);
|
||||
busInfo[4].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT32);
|
||||
busInfo[4].numElems = 1;
|
||||
busInfo[5].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId,
|
||||
5);
|
||||
busInfo[5].elemSize = dtaGetDataTypeSize(dta, bpath, SS_DOUBLE);
|
||||
busInfo[5].numElems = 1;
|
||||
busInfo[6].offset = dtaGetDataTypeElementOffset(dta, bpath, CAN_MESSAGE_BUSId,
|
||||
6);
|
||||
busInfo[6].elemSize = dtaGetDataTypeSize(dta, bpath, SS_UINT8);
|
||||
busInfo[6].numElems = 8;
|
||||
busInfo[7].elemSize = dtaGetDataTypeSize(dta, bpath, CAN_MESSAGE_BUSId);
|
||||
busInfo[7].numElems = ssGetOutputPortWidth(S, 0);
|
||||
ssSetUserData(S, busInfo);
|
||||
|
||||
/* Allocate memory for arrays or nested arrays of buses DWork pointers */
|
||||
}
|
||||
|
||||
#endif /* MDL_START */
|
||||
|
||||
/* Function: mdlOutputs =======================================================
|
||||
*
|
||||
*/
|
||||
static void mdlOutputs(SimStruct *S, int_T tid)
|
||||
{
|
||||
const uint32_T *id = (uint32_T *) ssGetInputPortRealSignal(S, 0);
|
||||
const uint8_T *dlc = (uint8_T *) ssGetInputPortRealSignal(S, 1);
|
||||
const uint8_T *data = (uint8_T *) ssGetInputPortRealSignal(S, 2);
|
||||
char *canFrame = (char *) ssGetOutputPortSignal(S, 0);
|
||||
busInfoStruct* busInfo = (busInfoStruct *) ssGetUserData(S);
|
||||
|
||||
/* Temporary bus copy declarations */
|
||||
CAN_MESSAGE_BUS _canFrameBUS;
|
||||
slDataTypeAccess *dta = ssGetDataTypeAccess(S);
|
||||
const char *bpath = ssGetPath(S);
|
||||
|
||||
/*Copy from Simulink to bus structure*/
|
||||
canReceive_Outputs_wrapper(id, dlc, data, &_canFrameBUS);
|
||||
|
||||
/*Copy from bus structure to Simulink*/
|
||||
|
||||
/*Copy from _canFrameBUS to Simulink for Output port 0*/
|
||||
*((uint8_T*)((char *) canFrame + busInfo[0].offset)) = (_canFrameBUS).Extended;
|
||||
*((uint8_T*)((char *) canFrame + busInfo[1].offset)) = (_canFrameBUS).Length;
|
||||
*((uint8_T*)((char *) canFrame + busInfo[2].offset)) = (_canFrameBUS).Remote;
|
||||
*((uint8_T*)((char *) canFrame + busInfo[3].offset)) = (_canFrameBUS).Error;
|
||||
*((uint32_T*)((char *) canFrame + busInfo[4].offset)) = (_canFrameBUS).ID;
|
||||
*((real_T*)((char *) canFrame + busInfo[5].offset)) = (_canFrameBUS).Timestamp;
|
||||
(void) memcpy((char *) canFrame + busInfo[6].offset, (_canFrameBUS).Data, 8*
|
||||
busInfo[6].elemSize);
|
||||
}
|
||||
|
||||
/* Function: mdlTerminate =====================================================
|
||||
* Abstract:
|
||||
* In this function, you should perform any actions that are necessary
|
||||
* at the termination of a simulation. For example, if memory was
|
||||
* allocated in mdlStart, this is the place to free it.
|
||||
*/
|
||||
static void mdlTerminate(SimStruct *S)
|
||||
{
|
||||
/* Free stored bus information */
|
||||
busInfoStruct *busInfo = (busInfoStruct *) ssGetUserData(S);
|
||||
if (busInfo != NULL) {
|
||||
free(busInfo);
|
||||
}
|
||||
|
||||
if (!isBusDWorkPresent) {
|
||||
}
|
||||
}
|
||||
|
||||
static int_T GetRTWEnvironmentMode(SimStruct *S)
|
||||
{
|
||||
int_T status = -1;
|
||||
mxArray *plhs[1];
|
||||
mxArray *prhs[1];
|
||||
mxArray * err;
|
||||
|
||||
/*
|
||||
* Get the name of the Simulink block diagram
|
||||
*/
|
||||
prhs[0] = mxCreateString(ssGetBlockDiagramName(S));
|
||||
plhs[0] = NULL;
|
||||
|
||||
/*
|
||||
* Call "isSimulationTarget = rtwenvironmentmode(modelName)" in MATLAB
|
||||
*/
|
||||
err = mexCallMATLABWithTrap(1, plhs, 1, prhs, "rtwenvironmentmode");
|
||||
mxDestroyArray(prhs[0]);
|
||||
|
||||
/*
|
||||
* Set the error status if an error occurred
|
||||
*/
|
||||
if (err) {
|
||||
if (plhs[0]) {
|
||||
mxDestroyArray(plhs[0]);
|
||||
plhs[0] = NULL;
|
||||
}
|
||||
|
||||
ssSetLocalErrorStatus(S,
|
||||
"Unknown error during call to 'rtwenvironmentmode'.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the value returned by rtwenvironmentmode(modelName)
|
||||
*/
|
||||
if (plhs[0]) {
|
||||
status = (int_T) (mxGetScalar(plhs[0]) != 0);
|
||||
mxDestroyArray(plhs[0]);
|
||||
plhs[0] = NULL;
|
||||
}
|
||||
|
||||
return (status);
|
||||
}
|
||||
|
||||
#ifdef MATLAB_MEX_FILE /* Is this file being compiled as a MEX-file? */
|
||||
#include "simulink.c" /* MEX-file interface mechanism */
|
||||
#else
|
||||
#include "cg_sfun.h" /* Code generation registration function */
|
||||
#endif
|
||||
Binary file not shown.
|
|
@ -0,0 +1,142 @@
|
|||
%% File : canReceive.tlc
|
||||
%% Created : Mon Oct 28 13:36:38 2024
|
||||
%%
|
||||
%% Description:
|
||||
%% Simulink Coder wrapper functions interface generated for
|
||||
%% S-function "canReceive.c".
|
||||
%%
|
||||
%% File generated by S-function Builder Block
|
||||
%%
|
||||
%% For more information on using the Target Language with the
|
||||
%% Simulink Coder, see the Target Language Compiler manual
|
||||
%% (under Simulink Coder) in the "Inlining S-Functions"
|
||||
%% chapter under the section and subsection:
|
||||
%% "Writing Block Target Files to Inline S-Functions",
|
||||
%% "Function-Based or Wrappered Code".
|
||||
%%
|
||||
%implements canReceive "C"
|
||||
%% Function: BlockTypeSetup ===================================================
|
||||
%%
|
||||
%% Purpose:
|
||||
%% Set up external references for wrapper functions in the
|
||||
%% generated code.
|
||||
%%
|
||||
%function BlockTypeSetup(block, system) Output
|
||||
%assign uint32Type = LibGetDataTypeNameFromId(::CompiledModel.tSS_UINT32)
|
||||
%assign charType = LibGetDataTypeNameFromId(::CompiledModel.tSS_CHAR)
|
||||
%assign uint8Type = LibGetDataTypeNameFromId(::CompiledModel.tSS_UINT8)
|
||||
|
||||
%if IsModelReferenceSimTarget() || CodeFormat == "S-Function" || ::isRAccel
|
||||
%assign hFileName = "canReceive_accel_wrapper"
|
||||
%assign hFileNameMacro = FEVAL("upper", hFileName)
|
||||
%openfile hFile = "%<hFileName>.h"
|
||||
%selectfile hFile
|
||||
#ifndef _%<hFileNameMacro>_H_
|
||||
#define _%<hFileNameMacro>_H_
|
||||
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
#include "tmwtypes.h"
|
||||
#else
|
||||
%<LibEmitPlatformTypeIncludes()>
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
#define SFB_EXTERN_C extern "C"
|
||||
#else
|
||||
#define SFB_EXTERN_C extern
|
||||
#endif
|
||||
SFB_EXTERN_C void canReceive_Outputs_wrapper_accel(const %<uint32Type> *id,
|
||||
const %<uint8Type> *dlc,
|
||||
const %<uint8Type> *data,
|
||||
void *canFrame, void *__canFrameBUS);
|
||||
#undef SFB_EXTERN_C
|
||||
#endif
|
||||
%closefile hFile
|
||||
|
||||
%assign cFileName = "canReceive_accel_wrapper"
|
||||
%openfile cFile = "%<cFileName>.c"
|
||||
%selectfile cFile
|
||||
#include <string.h>
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
#include "tmwtypes.h"
|
||||
#else
|
||||
%<LibEmitPlatformTypeIncludes()>
|
||||
#endif
|
||||
#include "%<hFileName>.h"
|
||||
#include "canReceive_bus.h"
|
||||
|
||||
|
||||
extern void canReceive_Start_wrapper(void);
|
||||
extern void canReceive_Outputs_wrapper(const %<uint32Type> *id,
|
||||
const %<uint8Type> *dlc,
|
||||
const %<uint8Type> *data,
|
||||
CAN_MESSAGE_BUS *canFrame);
|
||||
extern void canReceive_Terminate_wrapper(void);
|
||||
void canReceive_Outputs_wrapper_accel(const %<uint32Type> *id,
|
||||
const %<uint8Type> *dlc,
|
||||
const %<uint8Type> *data,
|
||||
void *canFrame, void *__canFrameBUS){
|
||||
canReceive_Outputs_wrapper(id,
|
||||
dlc,
|
||||
data,
|
||||
(CAN_MESSAGE_BUS *) __canFrameBUS);
|
||||
|
||||
%assign dTypeId = LibBlockOutputSignalDataTypeId(0)
|
||||
%<SLibAssignUserStructToSLStruct(dTypeId, "(%<charType> *) canFrame", "(*(CAN_MESSAGE_BUS *) __canFrameBUS)", 0)>
|
||||
}
|
||||
|
||||
%closefile cFile
|
||||
|
||||
%<LibAddToCommonIncludes("%<hFileName>.h")>
|
||||
|
||||
%else
|
||||
%openfile externs
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define SFB_EXTERN_C extern "C"
|
||||
#else
|
||||
#define SFB_EXTERN_C extern
|
||||
#endif
|
||||
|
||||
SFB_EXTERN_C void canReceive_Start_wrapper(void);
|
||||
|
||||
SFB_EXTERN_C void canReceive_Outputs_wrapper(const %<uint32Type> *id,
|
||||
const %<uint8Type> *dlc,
|
||||
const %<uint8Type> *data,
|
||||
CAN_MESSAGE_BUS *canFrame);
|
||||
|
||||
SFB_EXTERN_C void canReceive_Terminate_wrapper(void);
|
||||
|
||||
#undef SFB_EXTERN_C
|
||||
%closefile externs
|
||||
%<LibCacheExtern(externs)>
|
||||
|
||||
%endif
|
||||
%%
|
||||
%endfunction
|
||||
|
||||
|
||||
%% Function: Outputs ==========================================================
|
||||
%%
|
||||
%% Purpose:
|
||||
%% Code generation rules for mdlOutputs function.
|
||||
%%
|
||||
%function Outputs(block, system) Output
|
||||
%%
|
||||
%assign pu0 = LibBlockInputSignalAddr(0, "", "", 0)
|
||||
%assign pu1 = LibBlockInputSignalAddr(1, "", "", 0)
|
||||
%assign pu2 = LibBlockInputSignalAddr(2, "", "", 0)
|
||||
%assign py0 = LibBlockOutputSignalAddr(0, "", "", 0)
|
||||
|
||||
%if IsModelReferenceSimTarget() || CodeFormat == "S-Function" || ::isRAccel
|
||||
%assign canFrameBUS_ptr = LibBlockDWorkAddr(canFrameBUS, "", "", 0)
|
||||
canReceive_Outputs_wrapper_accel(%<pu0>, %<pu1>, %<pu2>, %<py0>, %<canFrameBUS_ptr>);
|
||||
%else
|
||||
canReceive_Outputs_wrapper(%<pu0>, %<pu1>, %<pu2>, %<py0>);
|
||||
%endif
|
||||
|
||||
%%
|
||||
%endfunction
|
||||
|
||||
|
||||
%% [EOF] canReceive.tlc
|
||||
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/* Generated by S-function Builder */
|
||||
#ifndef _CANRECEIVE_BUS_H_
|
||||
#define _CANRECEIVE_BUS_H_
|
||||
/* Read only - STARTS */
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
#include "tmwtypes.h"
|
||||
#else
|
||||
#include "rtwtypes.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_
|
||||
#define DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_
|
||||
typedef struct {
|
||||
uint8_T Extended;
|
||||
uint8_T Length;
|
||||
uint8_T Remote;
|
||||
uint8_T Error;
|
||||
uint32_T ID;
|
||||
real_T Timestamp;
|
||||
uint8_T Data[8];
|
||||
} CAN_MESSAGE_BUS;
|
||||
#endif
|
||||
|
||||
/* Read only - ENDS */
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
|
||||
/*
|
||||
* Include Files
|
||||
*
|
||||
*/
|
||||
#if defined(MATLAB_MEX_FILE)
|
||||
#include "tmwtypes.h"
|
||||
#include "simstruc_types.h"
|
||||
#else
|
||||
#define SIMPLIFIED_RTWTYPES_COMPATIBILITY
|
||||
#include "rtwtypes.h"
|
||||
#undef SIMPLIFIED_RTWTYPES_COMPATIBILITY
|
||||
#endif
|
||||
|
||||
#include "canReceive_bus.h"
|
||||
|
||||
/* %%%-SFUNWIZ_wrapper_includes_Changes_BEGIN --- EDIT HERE TO _END */
|
||||
#include <math.h>
|
||||
/* %%%-SFUNWIZ_wrapper_includes_Changes_END --- EDIT HERE TO _BEGIN */
|
||||
#define u_width 1
|
||||
#define u_1_width 1
|
||||
#define u_2_width 8
|
||||
#define y_width 1
|
||||
|
||||
/*
|
||||
* Create external references here.
|
||||
*
|
||||
*/
|
||||
/* %%%-SFUNWIZ_wrapper_externs_Changes_BEGIN --- EDIT HERE TO _END */
|
||||
/* extern double func(double a); */
|
||||
/* %%%-SFUNWIZ_wrapper_externs_Changes_END --- EDIT HERE TO _BEGIN */
|
||||
|
||||
/*
|
||||
* Output function
|
||||
*
|
||||
*/
|
||||
void canReceive_Outputs_wrapper(const uint32_T *id,
|
||||
const uint8_T *dlc,
|
||||
const uint8_T *data,
|
||||
CAN_MESSAGE_BUS *canFrame)
|
||||
{
|
||||
/* %%%-SFUNWIZ_wrapper_Outputs_Changes_BEGIN --- EDIT HERE TO _END */
|
||||
/* This sample sets the output equal to the input
|
||||
y0[0] = u0[0];
|
||||
For complex signals use: y0[0].re = u0[0].re;
|
||||
y0[0].im = u0[0].im;
|
||||
y1[0].re = u1[0].re;
|
||||
y1[0].im = u1[0].im;
|
||||
*/
|
||||
canFrame->ID = *(id);
|
||||
canFrame->Length = *(dlc);
|
||||
for(int ijk = 0; ijk < (*dlc); ijk++)
|
||||
canFrame->Data[ijk] = data[ijk];
|
||||
if( canFrame->ID > 0x7FF )
|
||||
canFrame->Extended = 1;
|
||||
else
|
||||
canFrame->Extended = 0;
|
||||
|
||||
// memcpy(canFrame->Data, data, *(dlc));
|
||||
/* %%%-SFUNWIZ_wrapper_Outputs_Changes_END --- EDIT HERE TO _BEGIN */
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
function makeInfo=rtwmakecfg()
|
||||
%RTWMAKECFG.m adds include and source directories to rtw make files.
|
||||
% makeInfo=RTWMAKECFG returns a structured array containing
|
||||
% following field:
|
||||
% makeInfo.includePath - cell array containing additional include
|
||||
% directories. Those directories will be
|
||||
% expanded into include instructions of Simulink
|
||||
% Coder generated make files.
|
||||
%
|
||||
% makeInfo.sourcePath - cell array containing additional source
|
||||
% directories. Those directories will be
|
||||
% expanded into rules of Simulink Coder generated
|
||||
% make files.
|
||||
makeInfo.includePath = {};
|
||||
makeInfo.sourcePath = {};
|
||||
makeInfo.linkLibsObjs = {};
|
||||
|
||||
%<Generated by S-Function Builder 3.0. DO NOT REMOVE>
|
||||
|
||||
sfBuilderBlocksByMaskType = find_system(bdroot,'FollowLinks','on','LookUnderMasks','on','MaskType','S-Function Builder');
|
||||
sfBuilderBlocksByCallback = find_system(bdroot,'OpenFcn','sfunctionwizard(gcbh)');
|
||||
sfBuilderBlocksDeployed = find_system(bdroot,'BlockType','S-Function','SFunctionDeploymentMode','on');
|
||||
sfBuilderBlocks = {sfBuilderBlocksByMaskType{:} sfBuilderBlocksByCallback{:} sfBuilderBlocksDeployed{:}};
|
||||
sfBuilderBlocks = unique(sfBuilderBlocks);
|
||||
if isempty(sfBuilderBlocks)
|
||||
return;
|
||||
end
|
||||
sfBuilderBlockNameMATFile = cell(1, length(sfBuilderBlocks));
|
||||
for idx = 1:length(sfBuilderBlocks)
|
||||
sfBuilderBlockNameMATFile{idx} = get_param(sfBuilderBlocks{idx},'FunctionName');
|
||||
sfBuilderBlockNameMATFile{idx} = ['.' filesep 'SFB__' char(sfBuilderBlockNameMATFile{idx}) '__SFB.mat'];
|
||||
end
|
||||
sfBuilderBlockNameMATFile = unique(sfBuilderBlockNameMATFile);
|
||||
for idx = 1:length(sfBuilderBlockNameMATFile)
|
||||
if exist(sfBuilderBlockNameMATFile{idx}, 'file')
|
||||
loadedData = load(sfBuilderBlockNameMATFile{idx});
|
||||
if isfield(loadedData,'SFBInfoStruct')
|
||||
makeInfo = UpdateMakeInfo(makeInfo,loadedData.SFBInfoStruct);
|
||||
clear loadedData;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function updatedMakeInfo = UpdateMakeInfo(makeInfo,SFBInfoStruct)
|
||||
updatedMakeInfo = {};
|
||||
if isfield(makeInfo,'includePath')
|
||||
if isfield(SFBInfoStruct,'includePath')
|
||||
updatedMakeInfo.includePath = {makeInfo.includePath{:} SFBInfoStruct.includePath{:}};
|
||||
else
|
||||
updatedMakeInfo.includePath = {makeInfo.includePath{:}};
|
||||
end
|
||||
end
|
||||
if isfield(makeInfo,'sourcePath')
|
||||
if isfield(SFBInfoStruct,'sourcePath')
|
||||
updatedMakeInfo.sourcePath = {makeInfo.sourcePath{:} SFBInfoStruct.sourcePath{:}};
|
||||
else
|
||||
updatedMakeInfo.sourcePath = {makeInfo.sourcePath{:}};
|
||||
end
|
||||
end
|
||||
if isfield(makeInfo,'linkLibsObjs')
|
||||
if isfield(SFBInfoStruct,'additionalLibraries')
|
||||
updatedMakeInfo.linkLibsObjs = {makeInfo.linkLibsObjs{:} SFBInfoStruct.additionalLibraries{:}};
|
||||
else
|
||||
updatedMakeInfo.linkLibsObjs = {makeInfo.linkLibsObjs{:}};
|
||||
end
|
||||
end
|
||||
Binary file not shown.
|
|
@ -0,0 +1,39 @@
|
|||
%implements "chartSource" "C"
|
||||
%function ChartConfig(block, system) void
|
||||
%createrecord chartConfiguration { ...
|
||||
executeAtInitialization 0 ...
|
||||
}
|
||||
%return chartConfiguration
|
||||
%endfunction
|
||||
%function ChartDataMap(block, system) void
|
||||
%createrecord ChartDataElements {\
|
||||
NumChartData 3 \
|
||||
ChartDataDefaults {\
|
||||
RecordType "ChartData"\
|
||||
Dimensions []\
|
||||
IsTestPoint 0\
|
||||
}\
|
||||
ChartData {\
|
||||
Name "is_active_c1_socTouchDisplay"\
|
||||
Description "StateIsActive"\
|
||||
SFName ""\
|
||||
Path ""\
|
||||
SrcLocation ""\
|
||||
}\
|
||||
ChartData {\
|
||||
Name "is_c1_socTouchDisplay"\
|
||||
Description "StateActiveChild"\
|
||||
SFName ""\
|
||||
Path ""\
|
||||
SrcLocation ""\
|
||||
}\
|
||||
ChartData {\
|
||||
Name "durationCounter_1"\
|
||||
Description ""\
|
||||
SFName ""\
|
||||
Path "bmsPresent"\
|
||||
SrcLocation ""\
|
||||
}\
|
||||
}
|
||||
%return ChartDataElements
|
||||
%endfunction
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
%implements "chartSource" "C"
|
||||
%function ChartConfig(block, system) void
|
||||
%createrecord chartConfiguration { ...
|
||||
executeAtInitialization 0 ...
|
||||
}
|
||||
%return chartConfiguration
|
||||
%endfunction
|
||||
%function ChartDataMap(block, system) void
|
||||
%createrecord ChartDataElements {\
|
||||
NumChartData 5 \
|
||||
ChartDataDefaults {\
|
||||
RecordType "ChartData"\
|
||||
Dimensions []\
|
||||
IsTestPoint 0\
|
||||
}\
|
||||
ChartData {\
|
||||
Name "is_active_c3_socTouchDisplay"\
|
||||
Description "StateIsActive"\
|
||||
SFName ""\
|
||||
Path ""\
|
||||
SrcLocation ""\
|
||||
}\
|
||||
ChartData {\
|
||||
Name "is_c3_socTouchDisplay"\
|
||||
Description "StateActiveChild"\
|
||||
SFName ""\
|
||||
Path ""\
|
||||
SrcLocation ""\
|
||||
}\
|
||||
ChartData {\
|
||||
Name "temporalCounter_i1"\
|
||||
Description "TemporalCounter"\
|
||||
SFName ""\
|
||||
Path ""\
|
||||
SrcLocation ""\
|
||||
}\
|
||||
ChartData {\
|
||||
Name "durationCounter_1"\
|
||||
Description ""\
|
||||
SFName ""\
|
||||
Path "touchNotDetected"\
|
||||
SrcLocation ""\
|
||||
}\
|
||||
ChartData {\
|
||||
Name "durationCounter_2"\
|
||||
Description ""\
|
||||
SFName ""\
|
||||
Path "touchNotDetected"\
|
||||
SrcLocation ""\
|
||||
}\
|
||||
}
|
||||
%return ChartDataElements
|
||||
%endfunction
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
%implements "machineSource" "C"
|
||||
%function CacheMachineDefinitions(block,system) void
|
||||
%openfile tmpFcnBuf
|
||||
%closefile tmpFcnBuf
|
||||
%<SLibCacheCodeToFile("sf_machine_data_defn",tmpFcnBuf)>\
|
||||
|
||||
%endfunction
|
||||
%function DumpMachineInitializer(block) Output
|
||||
|
||||
%openfile tmpFcnBuf
|
||||
|
||||
%closefile tmpFcnBuf
|
||||
%if !WHITE_SPACE(tmpFcnBuf)
|
||||
|
||||
/* Machine initializer */
|
||||
%<tmpFcnBuf>\
|
||||
%endif
|
||||
%endfunction
|
||||
%function GlobalMachineInitializer(block) void
|
||||
%openfile tmpFcnBuf
|
||||
%<DumpMachineInitializer(block)>\
|
||||
%closefile tmpFcnBuf
|
||||
%return tmpFcnBuf
|
||||
%endfunction %% GlobalMachineInitializer
|
||||
|
||||
%function DumpMachineTerminator(block) Output
|
||||
%openfile tmpFcnBuf
|
||||
|
||||
%closefile tmpFcnBuf
|
||||
%if !WHITE_SPACE(tmpFcnBuf)
|
||||
|
||||
/* Machine initializer */
|
||||
%<tmpFcnBuf>\
|
||||
%endif
|
||||
%endfunction
|
||||
%function GlobalMachineTerminator(block) void
|
||||
%openfile tmpFcnBuf
|
||||
%<DumpMachineTerminator(block)>\
|
||||
%closefile tmpFcnBuf
|
||||
%return tmpFcnBuf
|
||||
%endfunction %% GlobalMachineTerminator
|
||||
|
||||
%function CacheMachineFunctions(block,system) void
|
||||
%openfile tmpFcnBuf
|
||||
|
||||
|
||||
%closefile tmpFcnBuf
|
||||
%<SLibCacheCodeToFile("sf_machine_fcn_defn",tmpFcnBuf)>
|
||||
%endfunction
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
%implements "machineHeader" "C"
|
||||
%function CacheOutputs(block,system) void
|
||||
%assign srcFileName = SLibGetFullFileNameForSystemCode("sys_src_incl", system.SystemIdx)
|
||||
%assign isWithinReusableSubsys = (LibSystemIsReusedLibraryFcn(System[system.SystemIdx]) || LibSystemIsReusedLibraryFcn(System[System[system.SystemIdx].NonInlinedParentSystemIdx]))
|
||||
%openfile typedefsBuf
|
||||
|
||||
%closefile typedefsBuf
|
||||
%<SLibCacheCodeToFile("sf_machine_typedef",typedefsBuf)>
|
||||
%if !isWithinReusableSubsys && !WHITE_SPACE(typedefsBuf)
|
||||
%<SLibUpdateHeadersNeededByFile(srcFileName, SLibGetFullFileNameForCode("sf_machine_typedef"))>
|
||||
%endif
|
||||
%openfile definesBuf
|
||||
%closefile definesBuf
|
||||
%<SLibCacheCodeToFile("sf_machine_data_define",definesBuf)>
|
||||
%if !isWithinReusableSubsys && !WHITE_SPACE(definesBuf)
|
||||
%<SLibUpdateHeadersNeededByFile(srcFileName, SLibGetFullFileNameForCode("sf_machine_data_define"))>
|
||||
%endif
|
||||
%openfile externDataBuf
|
||||
%closefile externDataBuf
|
||||
%<SLibCacheCodeToFile("sf_machine_extern_data_decl",externDataBuf)>
|
||||
%if !isWithinReusableSubsys && !WHITE_SPACE(externDataBuf)
|
||||
%<SLibUpdateHeadersNeededByFile(srcFileName, SLibGetFullFileNameForCode("sf_machine_extern_data_decl"))>
|
||||
%endif
|
||||
%openfile externDataBuf
|
||||
%closefile externDataBuf
|
||||
%<SLibCacheCodeToFile("sf_machine_public_extern_data_decl",externDataBuf)>
|
||||
%if !isWithinReusableSubsys && !WHITE_SPACE(externDataBuf)
|
||||
%<SLibUpdateHeadersNeededByFile(srcFileName, SLibGetFullFileNameForCode("sf_machine_public_extern_data_decl"))>
|
||||
%endif
|
||||
%openfile externDataBuf
|
||||
|
||||
|
||||
|
||||
%closefile externDataBuf
|
||||
%<SLibCacheCodeToFile("sf_machine_extern_fcn_decl",externDataBuf)>
|
||||
%if !isWithinReusableSubsys && !WHITE_SPACE(externDataBuf)
|
||||
%<SLibUpdateHeadersNeededByFile(srcFileName, SLibGetFullFileNameForCode("sf_machine_extern_fcn_decl"))>
|
||||
%endif
|
||||
%endfunction %% CacheOutputs
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,601 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MF0 version="1.1" packageUris="http://schema.mathworks.com/mf0/ci/19700101 http://schema.mathworks.com/mf0/sl_data_duplicateandconsistencycheck/R2022b http://schema.mathworks.com/mf0/sl_modelref_info/R2023b http://schema.mathworks.com/mf0/slexec_mm_sto/R2023a_202208151321 http://schema.mathworks.com/mf0/sltp_mm/R2023a_202209151115">
|
||||
<ModelRefInfoRepo.ModelRefInfoRoot type="ModelRefInfoRepo.ModelRefInfoRoot" uuid="c423a4c2-c42e-4d68-a7d6-3c68c762f110">
|
||||
<JITEngines>sJSjS2nhFB3Qcky7Q7UDQFE</JITEngines>
|
||||
<JITEngines>sKuRTaq5s8EZI5Gj28zXs2E</JITEngines>
|
||||
<calibrationData type="ModelRefInfoRepo.CalibrationData" uuid="dff40f17-bcdf-4c37-95af-e03e67c08781">
|
||||
<InternalData>[{"Name":"","Profile":""}]</InternalData>
|
||||
<ModelName>socTouchDisplay</ModelName>
|
||||
<RootIOData>[{"Name":"in_bTouchDetected","Profile":""},{"Name":"ip_u32TouchDuration_msec","Profile":""},{"Name":"ip_u32DisplayDuration_msec","Profile":""},{"Name":"Input","Profile":""},{"Name":"op_bDisplayStatus","Profile":""},{"Name":"op_bErrorStatus","Profile":""},{"Name":"op_u8HundredsPlace","Profile":""},{"Name":"op_u8TensPlace","Profile":""},{"Name":"op_u8OnesPlace","Profile":""}]</RootIOData>
|
||||
</calibrationData>
|
||||
<childModelRefInfo type="ModelRefInfoRepo.ChildModelRefInfo" uuid="48754e11-5d0e-458a-b67a-bdb64b45170d">
|
||||
<modelName>socTouchDisplay</modelName>
|
||||
<modelPath>socTouchDisplay</modelPath>
|
||||
</childModelRefInfo>
|
||||
<compiledTFinal>100.0</compiledTFinal>
|
||||
<dataDictionary>socTouchDisplay.sldd</dataDictionary>
|
||||
<dataDictionarySet>socTouchDisplay.sldd</dataDictionarySet>
|
||||
<dataDictionarySetForDataTypeCheck>socTouchDisplay.sldd</dataDictionarySetForDataTypeCheck>
|
||||
<dataSourceInfo type="ModelRefInfoRepo.DataSourceInfo" uuid="d0392e51-1d2b-483b-adf9-04d1f7dc1fd0">
|
||||
<dataSources type="ModelRefInfoRepo.SourceInfo" uuid="04471474-cf64-48c8-8a61-61c3fb3cdfc0">
|
||||
<includeAllSections>true</includeAllSections>
|
||||
<sourceName>socTouchDisplay.sldd</sourceName>
|
||||
<type>DataDictionary</type>
|
||||
</dataSources>
|
||||
<dataSources type="ModelRefInfoRepo.SourceInfo" uuid="1ba4548b-b166-4a96-9479-a131e4340a86">
|
||||
<includeAllSections>true</includeAllSections>
|
||||
<sourceName>base workspace</sourceName>
|
||||
<type>BaseWorkspace</type>
|
||||
</dataSources>
|
||||
<modelName>socTouchDisplay</modelName>
|
||||
</dataSourceInfo>
|
||||
<dataTransferInfos>AAFJTQAAAAAOAAAAOAAAAAYAAAAIAAAAAgAAAAAAAAAFAAAACAAAAAAAAAABAAAAAQAAAAAAAAAFAAQAAQAAAAEAAAAAAAAA</dataTransferInfos>
|
||||
<defaultsCMapping>{"Inports":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","Outports":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","ParameterArguments":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","LocalParameters":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","GlobalParameters":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","InternalData":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","SharedLocalDataStores":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","GlobalDataStores":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","Constants":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","DataTransfers":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","ModelData":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","InitializeTerminate":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","Execution":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}","SharedUtility":"{\"Name\":\"Default\",\"Checksum\":\"Default\",\"PerInstancePropertiesChecksum\":\"\",\"MemorySectionName\":\"None\",\"MemorySectionChecksum\":\"None\"}"}</defaultsCMapping>
|
||||
<fastestNoncontSigFeedingDerivPorts>-1.0</fastestNoncontSigFeedingDerivPorts>
|
||||
<fundamentalSampleTimePeriod>.1</fundamentalSampleTimePeriod>
|
||||
<globalVariables>#CAN_MESSAGE_BUS#socTouchDisplay.sldd#</globalVariables>
|
||||
<globalVariables>#MAX_CAN_MESSAGE_INSTANCE#socTouchDisplay.sldd#</globalVariables>
|
||||
<hasBlockWithPeriodicDiscreteSampleTime>true</hasBlockWithPeriodicDiscreteSampleTime>
|
||||
<hasBwsAccessed>true</hasBwsAccessed>
|
||||
<hasBwsAccessedByAnyModel>true</hasBwsAccessedByAnyModel>
|
||||
<hasNonVirtualConstantTs>true</hasNonVirtualConstantTs>
|
||||
<hasStatesModifiedInOutputUpdate>true</hasStatesModifiedInOutputUpdate>
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="0da382bb-d9b8-4a6e-8024-f54ce44c3905">
|
||||
<isNotDerivPort>true</isNotDerivPort>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<indexType>2</indexType>
|
||||
<rateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
<compiled>true</compiled>
|
||||
<nonFcnCallPartitionName>D1</nonFcnCallPartitionName>
|
||||
<period>.1</period>
|
||||
<priority>40</priority>
|
||||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="c6e11a6f-85f9-472a-8c4f-04932b0e4040"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="1d76ece0-98aa-4aef-b697-d7d77c35f72d"/>
|
||||
</inports>
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="91652b38-7362-4fb1-8e80-180f8c57a19e">
|
||||
<isNotDerivPort>true</isNotDerivPort>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<indexType>2</indexType>
|
||||
<originalPortNumber>1</originalPortNumber>
|
||||
<rateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
<compiled>true</compiled>
|
||||
<nonFcnCallPartitionName>D1</nonFcnCallPartitionName>
|
||||
<period>.1</period>
|
||||
<priority>40</priority>
|
||||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="06f459e4-ee47-42dd-86fe-788d6be67841"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="44e21e7b-b349-4b37-b488-2badadc45f69"/>
|
||||
</inports>
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="69aef273-7467-4a72-be4e-9942e407dce2">
|
||||
<isNotDerivPort>true</isNotDerivPort>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<indexType>2</indexType>
|
||||
<originalPortNumber>2</originalPortNumber>
|
||||
<rateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
<compiled>true</compiled>
|
||||
<nonFcnCallPartitionName>D1</nonFcnCallPartitionName>
|
||||
<period>.1</period>
|
||||
<priority>40</priority>
|
||||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="c69dd893-dc7b-4580-9019-c5a33c033cf0"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="65f49605-3848-4e57-805b-649ead2bc58a"/>
|
||||
</inports>
|
||||
<inports type="ModelRefInfoRepo.InportInformation" uuid="f2ca55ba-3ebf-45f2-a441-2f06cc1a598f">
|
||||
<isNotDerivPort>true</isNotDerivPort>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<indexType>2</indexType>
|
||||
<originalPortNumber>3</originalPortNumber>
|
||||
<rateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
<compiled>true</compiled>
|
||||
<nonFcnCallPartitionName>D1</nonFcnCallPartitionName>
|
||||
<period>.1</period>
|
||||
<priority>40</priority>
|
||||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.InputExecutionInterface" uuid="845b2d7f-8b9e-41f7-b61a-31a1a3051e97"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="9ee09362-f869-4a00-ab26-70c5c4520638"/>
|
||||
</inports>
|
||||
<isBdInSimModeForSimCodegenVariants>false</isBdInSimModeForSimCodegenVariants>
|
||||
<isInlineParamsOn>true</isInlineParamsOn>
|
||||
<isOrigInportVirtualBus>false</isOrigInportVirtualBus>
|
||||
<isOrigInportVirtualBus>false</isOrigInportVirtualBus>
|
||||
<isOrigInportVirtualBus>false</isOrigInportVirtualBus>
|
||||
<isOrigInportVirtualBus>false</isOrigInportVirtualBus>
|
||||
<isOrigOutportVirtualBus>false</isOrigOutportVirtualBus>
|
||||
<isOrigOutportVirtualBus>false</isOrigOutportVirtualBus>
|
||||
<isOrigOutportVirtualBus>false</isOrigOutportVirtualBus>
|
||||
<isOrigOutportVirtualBus>false</isOrigOutportVirtualBus>
|
||||
<isOrigOutportVirtualBus>false</isOrigOutportVirtualBus>
|
||||
<loggingSaveFormat>2</loggingSaveFormat>
|
||||
<maxFreqHz>-1.0</maxFreqHz>
|
||||
<numDataInputPorts>4</numDataInputPorts>
|
||||
<numLoggableJacobianDStates>0</numLoggableJacobianDStates>
|
||||
<origInportBusType></origInportBusType>
|
||||
<origInportBusType></origInportBusType>
|
||||
<origInportBusType></origInportBusType>
|
||||
<origInportBusType></origInportBusType>
|
||||
<origOutportBusOutputAsStruct>false</origOutportBusOutputAsStruct>
|
||||
<origOutportBusOutputAsStruct>false</origOutportBusOutputAsStruct>
|
||||
<origOutportBusOutputAsStruct>false</origOutportBusOutputAsStruct>
|
||||
<origOutportBusOutputAsStruct>false</origOutportBusOutputAsStruct>
|
||||
<origOutportBusOutputAsStruct>false</origOutportBusOutputAsStruct>
|
||||
<origOutportBusType></origOutportBusType>
|
||||
<origOutportBusType></origOutportBusType>
|
||||
<origOutportBusType></origOutportBusType>
|
||||
<origOutportBusType></origOutportBusType>
|
||||
<origOutportBusType></origOutportBusType>
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="91427711-c988-42c7-941e-5fa2285ee3bb">
|
||||
<hasSystemInitMethod>true</hasSystemInitMethod>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<rateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
<compiled>true</compiled>
|
||||
<nonFcnCallPartitionName>D1</nonFcnCallPartitionName>
|
||||
<period>.1</period>
|
||||
<priority>40</priority>
|
||||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="e62a5e9b-58d4-4231-830d-3d90ba27cfad"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="9b940b83-17ca-471e-b395-a6326f912463"/>
|
||||
</outports>
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="6b9e9057-adb2-4896-9d70-0dd9579b94d9">
|
||||
<hasSystemInitMethod>true</hasSystemInitMethod>
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<originalPortNumber>1</originalPortNumber>
|
||||
<rateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
<compiled>true</compiled>
|
||||
<nonFcnCallPartitionName>D1</nonFcnCallPartitionName>
|
||||
<period>.1</period>
|
||||
<priority>40</priority>
|
||||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="cb46f534-f936-4c5b-bb91-bb8351c76476"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="2338d864-4100-4233-a487-7ce855432e38"/>
|
||||
</outports>
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="3a9dcd48-ab47-42f0-8e42-1f1c06b60098">
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<originalPortNumber>2</originalPortNumber>
|
||||
<rateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
<compiled>true</compiled>
|
||||
<nonFcnCallPartitionName>D1</nonFcnCallPartitionName>
|
||||
<period>.1</period>
|
||||
<priority>40</priority>
|
||||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="2a458600-29a7-47e6-90b2-238c22446509"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="5a1bc24b-ad47-4fad-9428-9c857f9d8d9c"/>
|
||||
</outports>
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="5e204093-ee38-45b8-bd46-438d3765cda1">
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<originalPortNumber>3</originalPortNumber>
|
||||
<rateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
<compiled>true</compiled>
|
||||
<nonFcnCallPartitionName>D1</nonFcnCallPartitionName>
|
||||
<period>.1</period>
|
||||
<priority>40</priority>
|
||||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="b56e9fea-84a2-4900-a41f-946714f917dc"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="1379f7e3-4f83-48b3-b50c-aabb9733533d"/>
|
||||
</outports>
|
||||
<outports type="ModelRefInfoRepo.OutportInformation" uuid="d3b8e248-f5a5-4ce1-ab09-458243094cb1">
|
||||
<designMax>inf</designMax>
|
||||
<designMin>-inf</designMin>
|
||||
<originalPortNumber>4</originalPortNumber>
|
||||
<rateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
<compiled>true</compiled>
|
||||
<nonFcnCallPartitionName>D1</nonFcnCallPartitionName>
|
||||
<period>.1</period>
|
||||
<priority>40</priority>
|
||||
<rateIdx>0</rateIdx>
|
||||
</rateInfos>
|
||||
<resolvedSignalObject></resolvedSignalObject>
|
||||
<executionInterface type="ModelRefInfoRepo.OutputExecutionInterface" uuid="b7fc6574-a5da-442c-b659-e759138c0e4b"/>
|
||||
<sigNameToEMVCEMap type="ModelRefInfoRepo.SigNameEMVCEInfo" uuid="adbc514c-a22b-492a-ac4b-741a413439b0"/>
|
||||
</outports>
|
||||
<removeResetFunc>true</removeResetFunc>
|
||||
<runtimeNonFcnCallRateInfos type="ModelRefInfoRepo.RateInfo">
|
||||
<compiled>true</compiled>
|
||||
<nonFcnCallPartitionName>D1</nonFcnCallPartitionName>
|
||||
<period>.1</period>
|
||||
<priority>40</priority>
|
||||
<rateIdx>0</rateIdx>
|
||||
</runtimeNonFcnCallRateInfos>
|
||||
<sampleTimeInheritanceRule>2</sampleTimeInheritanceRule>
|
||||
<solverStatusFlags>323</solverStatusFlags>
|
||||
<timingAndTaskingRegistry><?xml version="1.0"?>
|
||||
<slexec_sto version="1.1" packageUris="http://schema.mathworks.com/mf0/slexec_mm_sto/R2023a_202208151321">
|
||||
<sto.Registry type="sto.Registry" uuid="3a3d3d52-cd9c-47c0-a0c8-32e7580def99">
|
||||
<executionSpec>Undetermined</executionSpec>
|
||||
<identifier>socTouchDisplay</identifier>
|
||||
<clockRegistry type="sto.ClockRegistry" uuid="926692e5-6e1d-44ce-95bd-ec062455c3dd">
|
||||
<clocks type="sto.Timer" uuid="b6a56536-b6c2-4e08-a692-5478eb83994e">
|
||||
<clockTickConstraint>PeriodicWithFixedResolution</clockTickConstraint>
|
||||
<computedFundamentalDiscretePeriod>.1</computedFundamentalDiscretePeriod>
|
||||
<fastestDiscreteRate type="sto.ClassicPeriodicDiscreteRate" uuid="b24d7f8a-e80b-4bf6-a138-35e053d007e1"/>
|
||||
<isDefaultTimer>true</isDefaultTimer>
|
||||
<resolution>.1</resolution>
|
||||
<timeAdvanceMode>FixedStep</timeAdvanceMode>
|
||||
<identifier>socTouchDisplay::defaultTimer</identifier>
|
||||
<rates type="sto.ClassicPeriodicDiscreteRate" uuid="b24d7f8a-e80b-4bf6-a138-35e053d007e1">
|
||||
<annotation>D1</annotation>
|
||||
<clockId>socTouchDisplay::defaultTimer</clockId>
|
||||
<description>Discrete 1</description>
|
||||
<taskId>_task0</taskId>
|
||||
<rateSpec type="sto.RateSpec" uuid="04741580-1702-4d99-a71f-5c59fff197c6">
|
||||
<period>.1</period>
|
||||
<rateType>ClassicPeriodicDiscrete</rateType>
|
||||
</rateSpec>
|
||||
</rates>
|
||||
<baseRate type="sto.ClassicPeriodicDiscreteRate" uuid="66637882-0267-41e0-a267-d06135e27d03">
|
||||
<annotation>D1</annotation>
|
||||
<clockId>socTouchDisplay::defaultTimer</clockId>
|
||||
<description>Discrete 1</description>
|
||||
<taskId>_task0</taskId>
|
||||
<rateSpec type="sto.RateSpec" uuid="a1392d16-b148-4f54-a21b-6f8b08d0035f">
|
||||
<period>.1</period>
|
||||
<rateType>ClassicPeriodicDiscrete</rateType>
|
||||
</rateSpec>
|
||||
</baseRate>
|
||||
</clocks>
|
||||
<clocks type="sto.Event" uuid="e41a78c8-b216-4f36-9dee-4f997b4b1c11">
|
||||
<eventType>PARAMETER_CHANGE_EVENT</eventType>
|
||||
<cNum>1</cNum>
|
||||
<clockType>Event</clockType>
|
||||
<identifier>ParameterChangeEvent</identifier>
|
||||
<rates type="sto.ModelWideEventRate" uuid="90d6839c-de09-4d36-8a0c-4a5a598feba9">
|
||||
<clockId>ParameterChangeEvent</clockId>
|
||||
<rateIdx>-1</rateIdx>
|
||||
<taskId>ModelWideParameterChangeEvent</taskId>
|
||||
<useForExecution>NotForExecution</useForExecution>
|
||||
<rateSpec type="sto.RateSpec" uuid="1ff799ef-cf4a-4029-870d-05c901611246">
|
||||
<period>inf</period>
|
||||
<rateType>ModelWideParameterChangeEvent</rateType>
|
||||
</rateSpec>
|
||||
</rates>
|
||||
</clocks>
|
||||
<timeAdvanceMode>FixedStep</timeAdvanceMode>
|
||||
</clockRegistry>
|
||||
<taskRegistry type="sto.TaskRegistry" uuid="51c7559b-0d95-45c2-89b5-e8ca1b1a2a36">
|
||||
<rootTaskHierarchyElements type="sto.Task" uuid="83d195cc-1e47-4c1f-bf41-cf7515d90315">
|
||||
<isExplicit>true</isExplicit>
|
||||
<rates type="sto.ModelWideEventRate" uuid="ddbb3b2c-a7d0-41a7-9985-12f1dbe63b55">
|
||||
<clockId>ParameterChangeEvent</clockId>
|
||||
<rateIdx>-1</rateIdx>
|
||||
<taskId>ModelWideParameterChangeEvent</taskId>
|
||||
<useForExecution>NotForExecution</useForExecution>
|
||||
<rateSpec type="sto.RateSpec" uuid="9773adec-69fb-499f-b3d5-c885d4c27f15">
|
||||
<period>inf</period>
|
||||
<rateType>ModelWideParameterChangeEvent</rateType>
|
||||
</rateSpec>
|
||||
</rates>
|
||||
<schedulingClockId>ParameterChangeEvent</schedulingClockId>
|
||||
<timeKeeperClockId>socTouchDisplay::defaultTimer</timeKeeperClockId>
|
||||
<elementType>Task</elementType>
|
||||
<identifier>ModelWideParameterChangeEvent</identifier>
|
||||
<priority>-1</priority>
|
||||
</rootTaskHierarchyElements>
|
||||
<rootTaskHierarchyElements type="sto.Task" uuid="8d35a7a1-6a0f-4104-8229-9f1d048673ef">
|
||||
<isExecutable>true</isExecutable>
|
||||
<orderIndex>1</orderIndex>
|
||||
<rates type="sto.ClassicPeriodicDiscreteRate" uuid="cc569252-814e-451a-b975-9d4d66331c6d">
|
||||
<annotation>D1</annotation>
|
||||
<clockId>socTouchDisplay::defaultTimer</clockId>
|
||||
<description>Discrete 1</description>
|
||||
<taskId>_task0</taskId>
|
||||
<rateSpec type="sto.RateSpec" uuid="b90a1e82-5f37-4e57-8497-d7a2efda69c7">
|
||||
<period>.1</period>
|
||||
<rateType>ClassicPeriodicDiscrete</rateType>
|
||||
</rateSpec>
|
||||
</rates>
|
||||
<schedulingClockId>socTouchDisplay::defaultTimer</schedulingClockId>
|
||||
<timeKeeperClockId>socTouchDisplay::defaultTimer</timeKeeperClockId>
|
||||
<elementType>Task</elementType>
|
||||
<identifier>_task0</identifier>
|
||||
<priority>40</priority>
|
||||
</rootTaskHierarchyElements>
|
||||
<taskDependencyGraph type="sto.SerializedTaskConnectionList" uuid="2e3cd3f0-1e21-43b0-9c9c-83e394120168">
|
||||
<clockIdentifier>socTouchDisplay::defaultTimer</clockIdentifier>
|
||||
<taskIdentifier>_task0</taskIdentifier>
|
||||
</taskDependencyGraph>
|
||||
<taskDependencyGraph type="sto.SerializedTaskConnectionList" uuid="dd557f49-849f-47e0-be4f-d57d5f19b2d6">
|
||||
<clockIdentifier>ParameterChangeEvent</clockIdentifier>
|
||||
<taskIdentifier>ModelWideParameterChangeEvent</taskIdentifier>
|
||||
</taskDependencyGraph>
|
||||
<taskPriorityDirection>HighNumberLast</taskPriorityDirection>
|
||||
</taskRegistry>
|
||||
</sto.Registry>
|
||||
</slexec_sto></timingAndTaskingRegistry>
|
||||
<zeroInternalMemoryAtStartupUnchecked>true</zeroInternalMemoryAtStartupUnchecked>
|
||||
<FMUBlockMap type="ModelRefInfoRepo.FMUBlockInfo" uuid="69cbfdd1-86ba-47e6-b23f-a357ee66437a"/>
|
||||
<codeGenInfo type="ModelRefInfoRepo.CodeGenInformation" uuid="dede7188-05e5-44b5-8df7-bb027da4bc9f"/>
|
||||
<compiledVariantInfos type="ModelRefInfoRepo.CompiledVariantInfoMap" uuid="44e63a7b-6c81-4d60-b7d2-92443f03274a"/>
|
||||
<configSettingsForConsistencyChecks type="ModelRefInfoRepo.ConfigSettingsForConsistencyChecks" uuid="ec71486b-3f4d-4d70-a1ce-6034e5c16e5c">
|
||||
<consistentOutportInitialization>true</consistentOutportInitialization>
|
||||
<fixedStepSize>.1</fixedStepSize>
|
||||
<frameDiagnosticSetting>2</frameDiagnosticSetting>
|
||||
<hasHybridSampleTime>true</hasHybridSampleTime>
|
||||
<optimizedInitCode>true</optimizedInitCode>
|
||||
<signalLoggingSaveFormat>2</signalLoggingSaveFormat>
|
||||
<simSIMDOptimization>1</simSIMDOptimization>
|
||||
<solverName>FixedStepDiscrete</solverName>
|
||||
<solverType>SOLVER_TYPE_FIXEDSTEP</solverType>
|
||||
<hardwareSettings type="ModelRefInfoRepo.HardwareSettings" uuid="767f4170-c31a-4d8b-a9c6-b3f27c3c07da">
|
||||
<prodBitPerChar>8</prodBitPerChar>
|
||||
<prodBitPerDouble>64</prodBitPerDouble>
|
||||
<prodBitPerFloat>32</prodBitPerFloat>
|
||||
<prodBitPerInt>32</prodBitPerInt>
|
||||
<prodBitPerLong>32</prodBitPerLong>
|
||||
<prodBitPerLongLong>64</prodBitPerLongLong>
|
||||
<prodBitPerPointer>64</prodBitPerPointer>
|
||||
<prodBitPerPtrDiffT>64</prodBitPerPtrDiffT>
|
||||
<prodBitPerShort>16</prodBitPerShort>
|
||||
<prodBitPerSizeT>64</prodBitPerSizeT>
|
||||
<prodEndianess>1</prodEndianess>
|
||||
<prodShiftRight>true</prodShiftRight>
|
||||
<prodWordSize>64</prodWordSize>
|
||||
</hardwareSettings>
|
||||
</configSettingsForConsistencyChecks>
|
||||
<controllableInputRatesMap type="ModelRefInfoRepo.VarTsUIDMap" uuid="7651d61a-d0b0-4e02-bc29-92248e48de24"/>
|
||||
<controllableOutputRatesMap type="ModelRefInfoRepo.VarTsUIDMap" uuid="ced402d5-0110-476d-9f88-0d9ce97906f8"/>
|
||||
<dataPortGroup type="ModelRefInfoRepo.DataPortGroup" uuid="6df60948-ecf5-41a0-a997-438d13f0e9bc">
|
||||
<compDataInputPorts>0</compDataInputPorts>
|
||||
<compDataInputPorts>1</compDataInputPorts>
|
||||
<compDataInputPorts>2</compDataInputPorts>
|
||||
<compDataInputPorts>3</compDataInputPorts>
|
||||
<compDataOutputPorts>0</compDataOutputPorts>
|
||||
<compDataOutputPorts>1</compDataOutputPorts>
|
||||
<compDataOutputPorts>2</compDataOutputPorts>
|
||||
<compDataOutputPorts>3</compDataOutputPorts>
|
||||
<compDataOutputPorts>4</compDataOutputPorts>
|
||||
<dataInputPorts>0</dataInputPorts>
|
||||
<dataInputPorts>1</dataInputPorts>
|
||||
<dataInputPorts>2</dataInputPorts>
|
||||
<dataInputPorts>3</dataInputPorts>
|
||||
<dataOutputPorts>0</dataOutputPorts>
|
||||
<dataOutputPorts>1</dataOutputPorts>
|
||||
<dataOutputPorts>2</dataOutputPorts>
|
||||
<dataOutputPorts>3</dataOutputPorts>
|
||||
<dataOutputPorts>4</dataOutputPorts>
|
||||
</dataPortGroup>
|
||||
<expFcnUnconnectedDataPortGroup type="ModelRefInfoRepo.DataPortGroup" uuid="d59044c4-b0ef-4623-9710-bed667db30b0"/>
|
||||
<interfaceParameterInfo type="ModelRefInfoRepo.InterfaceParameterInfo" uuid="f67248e8-d518-4835-9bcd-0d8d2cb6ae59"/>
|
||||
<messageInfo type="ModelRefInfoRepo.MessageInformation" uuid="f9e594a2-0b38-40e7-83b6-6c60055c4b8a"/>
|
||||
<methodInfo type="ModelRefInfoRepo.MethodExistenceInfo" uuid="7129bfef-595c-412a-bcf2-448a8a3d1a38">
|
||||
<hasEnableMethod>true</hasEnableMethod>
|
||||
<hasSystemInitializeMethod>true</hasSystemInitializeMethod>
|
||||
<hasSystemResetMethod>true</hasSystemResetMethod>
|
||||
<hasTerminateMethod>true</hasTerminateMethod>
|
||||
<hasUpdateMethod>true</hasUpdateMethod>
|
||||
</methodInfo>
|
||||
<periodicEventPortUnsupportedBlockInfo type="ModelRefInfoRepo.PeriodicEventPortUnsupportedBlockInfo" uuid="5ce766fa-e0cd-47d6-a3db-554509f826c7"/>
|
||||
<portGroupsRequireSameRate type="ModelRefInfoRepo.PortGroupsRequireSameRate" uuid="2bc83336-826c-4245-89c8-f506be71f9b2">
|
||||
<DSMPortGroups type="ModelRefInfoRepo.NameToPortGroupIdxVectMap" uuid="383ebe57-9cd5-4789-b1fe-5e9ff9ce2ec0"/>
|
||||
<GlobalDSMPortGroups type="ModelRefInfoRepo.NameToPortGroupIdxVectMap" uuid="10b75860-edff-4a5a-82fa-90bd3debdb59"/>
|
||||
<mergedPortGroups type="ModelRefInfoRepo.NameToPortGroupIdxVectMap" uuid="1d725e25-8ced-4deb-bcf2-09e4f08bd6e2"/>
|
||||
</portGroupsRequireSameRate>
|
||||
<rateBasedMdlGlobalDSMRateSpec type="ModelRefInfoRepo.GlobalDSMRateSpecMap" uuid="0dcb5c09-7687-489b-9215-59557e94f89d"/>
|
||||
<rateSpecOfGlobalDSMAccessedByDescExpFcnMdlMap type="ModelRefInfoRepo.GlobalDSMRateSpecMap" uuid="18204780-05a6-47df-85a7-32adb2fa5988"/>
|
||||
<rootBlockDiagramInterface type="ci.Model" uuid="54e390f9-b2e4-435c-b43b-57734de58ae5">
|
||||
<p_RootComponentInterface type="ci.ComponentInterface" uuid="129c9357-1e43-4cde-870a-483e5f06ca82">
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="84833d01-b9da-401e-a7fa-4190816cd995">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_Name>in_bTouchDetected</p_Name>
|
||||
</p_InputPorts>
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="c195fde1-00dc-4ccc-8e3b-b60ff524bca5">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_Name>ip_u32TouchDuration_msec</p_Name>
|
||||
</p_InputPorts>
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="16377543-358e-4a08-8d57-7eabf48849d4">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_Name>ip_u32DisplayDuration_msec</p_Name>
|
||||
</p_InputPorts>
|
||||
<p_InputPorts type="ci.SignalInterface" uuid="f9b5f34e-f0d1-4091-ace0-c918d7f7914b">
|
||||
<p_ComputedNumericDimensions>10.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>CAN_MESSAGE_BUS</p_ComputedType>
|
||||
<p_Name>Input</p_Name>
|
||||
</p_InputPorts>
|
||||
<p_Name>socTouchDisplay</p_Name>
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="4ea5d474-2a0a-4120-a8bc-d6a8454d4c72">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>boolean</p_ComputedType>
|
||||
<p_Name>op_bDisplayStatus</p_Name>
|
||||
</p_OutputPorts>
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="bbbee058-9d0b-40e7-b09c-ae5535e94752">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>boolean</p_ComputedType>
|
||||
<p_Name>op_bErrorStatus</p_Name>
|
||||
</p_OutputPorts>
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="873224f0-c19f-4069-b929-897a6e7e903b">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>uint8</p_ComputedType>
|
||||
<p_Name>op_u8HundredsPlace</p_Name>
|
||||
</p_OutputPorts>
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="60b84ff1-b8ab-4abf-9a7f-82eb57be56c0">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>uint8</p_ComputedType>
|
||||
<p_Name>op_u8TensPlace</p_Name>
|
||||
</p_OutputPorts>
|
||||
<p_OutputPorts type="ci.SignalInterface" uuid="e6ac93cd-5bfa-47fb-b521-fb99fee3c438">
|
||||
<p_ComputedNumericDimensions>1.0</p_ComputedNumericDimensions>
|
||||
<p_ComputedSampleTime>.1</p_ComputedSampleTime>
|
||||
<p_ComputedSampleTime>0.0</p_ComputedSampleTime>
|
||||
<p_ComputedType>uint8</p_ComputedType>
|
||||
<p_Name>op_u8OnesPlace</p_Name>
|
||||
</p_OutputPorts>
|
||||
<p_Type>ROOT</p_Type>
|
||||
</p_RootComponentInterface>
|
||||
</rootBlockDiagramInterface>
|
||||
<simulinkFunctions type="ModelRefInfoRepo.SimulinkFunctions" uuid="577f9e88-4dd7-4d20-b733-c4f902f7e705">
|
||||
<compSimulinkFunctionCatalog></compSimulinkFunctionCatalog>
|
||||
</simulinkFunctions>
|
||||
<sltpContext type="sltp.mm.core.Context" uuid="9163d92d-0590-41fc-b13d-3bf36253804b">
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="42611fd8-e3a2-4dc0-89c8-8e4153b92cfd">
|
||||
<dataName>portInput</dataName>
|
||||
<type>RootInport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="41c82017-f51b-468b-9ae5-dbd4907744db">
|
||||
<dataName>portOutput</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="b231d36b-b68c-41ef-af57-0f468fc22682">
|
||||
<dataName>portcanMsg</dataName>
|
||||
<type>RootInport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="b2397954-3496-4a8d-9ff2-fae2f9cdf143">
|
||||
<dataName>portin_bTouchDetected</dataName>
|
||||
<type>RootInport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="6896bf39-3cf5-460f-a776-1b3153a19172">
|
||||
<dataName>portip_u32DisplayDuration_msec</dataName>
|
||||
<type>RootInport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="3ea6aa04-741f-4a7c-a1ff-4bdd4cb11a4e">
|
||||
<dataName>portip_u32TouchDuration_msec</dataName>
|
||||
<type>RootInport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="77d0d2a5-4fc8-4b05-8e88-88c7d9f48503">
|
||||
<dataName>portop_bDisplayStatus</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="6f7a122b-0e66-4db4-85e0-4b17b9fa028c">
|
||||
<dataName>portop_bErrorStatus</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="89ab29d0-c2ab-420c-8b8f-dfc119e8a504">
|
||||
<dataName>portop_bFotaTriggerFromBms</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="099f7a9a-8dc5-426a-9a28-eca6891dd3a3">
|
||||
<dataName>portop_bFotaTriggerFromBms1</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="1943db94-10b9-4089-9ea3-2c833da80784">
|
||||
<dataName>portop_chErrHundIdx</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="dadbbfdc-0f0d-4df0-a8a2-6587a8b95d7b">
|
||||
<dataName>portop_chErrOnesIdx</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="3cc5f9a1-ea69-481d-9422-38ec73fe2a6e">
|
||||
<dataName>portop_chErrTensIdx</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="d546afbb-3db5-4cd2-b410-4e9015e6e751">
|
||||
<dataName>portop_errIdx0</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="501449b7-6b75-492a-872d-e3a63843a7f8">
|
||||
<dataName>portop_errIdx1</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="3f449a97-a627-4bed-939b-7d9561156d3d">
|
||||
<dataName>portop_errIdx2</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="cd5b1921-0b7a-4c16-ab48-98459e908506">
|
||||
<dataName>portop_u8HundredsPlace</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="5cf9abe9-eebe-47bd-8b29-3d33b6d7ddc2">
|
||||
<dataName>portop_u8OnesPlace</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<globalData type="sltp.mm.core.GlobalData" uuid="1270f267-892b-4df5-8522-f5dfc42e3760">
|
||||
<dataName>portop_u8TensPlace</dataName>
|
||||
<type>RootOutport</type>
|
||||
</globalData>
|
||||
<priorityDirection>HighNumberLast</priorityDirection>
|
||||
<defaultEventBehavior type="sltp.mm.core.EventBehavior" uuid="20acfb17-c6b5-4a78-9c36-261814a06c6d"/>
|
||||
<editorState type="sltp.mm.core.EditorState" uuid="ef1cfea2-484a-420d-ae76-3d2ab30b0402">
|
||||
<isSynchronized>true</isSynchronized>
|
||||
<panelState type="sltp.mm.core.EditorPanelState" uuid="0bb34eb9-3f07-403c-a299-ffd7020be893"/>
|
||||
</editorState>
|
||||
<rootTask type="sltp.mm.core.Task" uuid="59365742-cebd-49a8-88f4-2a1a60c73799">
|
||||
<context type="sltp.mm.core.Context" uuid="9163d92d-0590-41fc-b13d-3bf36253804b"/>
|
||||
<explicit>false</explicit>
|
||||
<name>Default</name>
|
||||
<priority>-2147483648</priority>
|
||||
<subgraph type="sltp.mm.core.Graph" uuid="8211f6f3-6456-4fdd-9fdd-6db8c05fb759">
|
||||
<tasks type="sltp.mm.core.Task" uuid="24568a26-1283-42aa-8b86-8a1958dad40b">
|
||||
<context type="sltp.mm.core.Context" uuid="9163d92d-0590-41fc-b13d-3bf36253804b"/>
|
||||
<explicit>false</explicit>
|
||||
<id>1</id>
|
||||
<isTimed>true</isTimed>
|
||||
<name>D1</name>
|
||||
<priority>40</priority>
|
||||
<rates type="sltp.mm.core.Rate" uuid="beb9f6f0-2ae0-4fca-8dd3-e473f2873d06">
|
||||
<annotation>D1</annotation>
|
||||
<color>-12240129</color>
|
||||
<hasBlocks>true</hasBlocks>
|
||||
<identifier>ClassicPeriodicDiscrete0.10</identifier>
|
||||
<rateIndex>0</rateIndex>
|
||||
<rateSpec type="sltp.mm.core.RateSpec">
|
||||
<period>.1</period>
|
||||
</rateSpec>
|
||||
<sti>0</sti>
|
||||
</rates>
|
||||
</tasks>
|
||||
</subgraph>
|
||||
</rootTask>
|
||||
</sltpContext>
|
||||
<stateWriterToOwnerMap type="ModelRefInfoRepo.StateWriterInfo" uuid="22a8b72c-4272-4705-b437-629711bebca9"/>
|
||||
<stoClientDataRegistry type="sto.ClientDataRegistry" uuid="5d8158e7-81e6-41d7-aab9-eb91fcaa7ff5">
|
||||
<dataSets type="sto.ClientClockNamedDataSet" uuid="5bd5964e-9d18-49f3-9232-f95682fa9fc2">
|
||||
<tag>sltpEvents</tag>
|
||||
</dataSets>
|
||||
<dataSets type="sto.ClientTaskHierarchyElementNamedDataSet" uuid="edf2c48f-5baa-46f9-8bff-1e8f0afa3fd0">
|
||||
<tag>sltpTaskGroups</tag>
|
||||
</dataSets>
|
||||
<dataSets type="sto.ClientTaskHierarchyElementNamedDataSet" uuid="cb57e322-4a7b-43a5-941d-7ef176e52203">
|
||||
<dSet type="ModelRefInfoRepo.SltpTaskData" uuid="b784d6cd-de7c-4b5e-9098-c7cdc8228345"/>
|
||||
<tSet type="ModelRefInfoRepo.SltpTaskData" uuid="b784d6cd-de7c-4b5e-9098-c7cdc8228345">
|
||||
<dataName>D1</dataName>
|
||||
<linkedSet type="sto.ClientTaskHierarchyElementNamedDataSet" uuid="cb57e322-4a7b-43a5-941d-7ef176e52203"/>
|
||||
<id type="sto.TaskHierarchyElementId">
|
||||
<clockId>socTouchDisplay::defaultTimer</clockId>
|
||||
<id>_task0</id>
|
||||
</id>
|
||||
</tSet>
|
||||
<tag>sltpTasks</tag>
|
||||
</dataSets>
|
||||
</stoClientDataRegistry>
|
||||
<varTsUIDMap type="ModelRefInfoRepo.VarTsUIDMap" uuid="dea2d909-c171-4d7c-a17e-56fed8709aeb"/>
|
||||
</ModelRefInfoRepo.ModelRefInfoRoot>
|
||||
</MF0>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,2 @@
|
|||
Simulink Coder project marker file. Please don't change it.
|
||||
slprjVersion: 23.2_091
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
* File: ert_main.c
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h> /* This example main program uses printf/fflush */
|
||||
#include "socTouchDisplay.h" /* Model header file */
|
||||
|
||||
/*
|
||||
* Associating rt_OneStep with a real-time clock or interrupt service routine
|
||||
* is what makes the generated code "real-time". The function rt_OneStep is
|
||||
* always associated with the base rate of the model. Subrates are managed
|
||||
* by the base rate from inside the generated code. Enabling/disabling
|
||||
* interrupts and floating point context switches are target specific. This
|
||||
* example code indicates where these should take place relative to executing
|
||||
* the generated code step function. Overrun behavior should be tailored to
|
||||
* your application needs. This example simply sets an error status in the
|
||||
* real-time model and returns from rt_OneStep.
|
||||
*/
|
||||
void rt_OneStep(void);
|
||||
void rt_OneStep(void)
|
||||
{
|
||||
static boolean_T OverrunFlag = false;
|
||||
|
||||
/* Disable interrupts here */
|
||||
|
||||
/* Check for overrun */
|
||||
if (OverrunFlag) {
|
||||
rtmSetErrorStatus(socTouchDisplay_M, "Overrun");
|
||||
return;
|
||||
}
|
||||
|
||||
OverrunFlag = true;
|
||||
|
||||
/* Save FPU context here (if necessary) */
|
||||
/* Re-enable timer or interrupt here */
|
||||
/* Set model inputs here */
|
||||
|
||||
/* Step the model */
|
||||
socTouchDisplay_step();
|
||||
|
||||
/* Get model outputs here */
|
||||
|
||||
/* Indicate task complete */
|
||||
OverrunFlag = false;
|
||||
|
||||
/* Disable interrupts here */
|
||||
/* Restore FPU context here (if necessary) */
|
||||
/* Enable interrupts here */
|
||||
}
|
||||
|
||||
/*
|
||||
* The example main function illustrates what is required by your
|
||||
* application code to initialize, execute, and terminate the generated code.
|
||||
* Attaching rt_OneStep to a real-time clock is target specific. This example
|
||||
* illustrates how you do this relative to initializing the model.
|
||||
*/
|
||||
int_T main(int_T argc, const char *argv[])
|
||||
{
|
||||
/* Unused arguments */
|
||||
(void)(argc);
|
||||
(void)(argv);
|
||||
|
||||
/* Initialize model */
|
||||
socTouchDisplay_initialize();
|
||||
|
||||
/* Attach rt_OneStep to a timer or interrupt service routine with
|
||||
* period 0.1 seconds (base rate of the model) here.
|
||||
* The call syntax for rt_OneStep is
|
||||
*
|
||||
* rt_OneStep();
|
||||
*/
|
||||
printf("Warning: The simulation will run forever. "
|
||||
"Generated ERT main won't simulate model step behavior. "
|
||||
"To change this behavior select the 'MAT-file logging' option.\n");
|
||||
fflush((NULL));
|
||||
while (rtmGetErrorStatus(socTouchDisplay_M) == (NULL)) {
|
||||
/* Perform application tasks here */
|
||||
}
|
||||
|
||||
/* Terminate model */
|
||||
socTouchDisplay_terminate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* File: rtGetInf.c
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#include "rtwtypes.h"
|
||||
#include "rtGetInf.h"
|
||||
#include <stddef.h>
|
||||
#include "rt_nonfinite.h"
|
||||
#define NumBitsPerChar 8U
|
||||
|
||||
/*
|
||||
* Initialize rtInf needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real_T rtGetInf(void)
|
||||
{
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
real_T inf = 0.0;
|
||||
if (bitsPerReal == 32U) {
|
||||
inf = rtGetInfF();
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.bitVal.words.wordH = 0x7FF00000U;
|
||||
tmpVal.bitVal.words.wordL = 0x00000000U;
|
||||
inf = tmpVal.fltVal;
|
||||
}
|
||||
|
||||
return inf;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtInfF needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real32_T rtGetInfF(void)
|
||||
{
|
||||
IEEESingle infF;
|
||||
infF.wordL.wordLuint = 0x7F800000U;
|
||||
return infF.wordL.wordLreal;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtMinusInf needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real_T rtGetMinusInf(void)
|
||||
{
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
real_T minf = 0.0;
|
||||
if (bitsPerReal == 32U) {
|
||||
minf = rtGetMinusInfF();
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.bitVal.words.wordH = 0xFFF00000U;
|
||||
tmpVal.bitVal.words.wordL = 0x00000000U;
|
||||
minf = tmpVal.fltVal;
|
||||
}
|
||||
|
||||
return minf;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtMinusInfF needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real32_T rtGetMinusInfF(void)
|
||||
{
|
||||
IEEESingle minfF;
|
||||
minfF.wordL.wordLuint = 0xFF800000U;
|
||||
return minfF.wordL.wordLreal;
|
||||
}
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* File: rtGetInf.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_rtGetInf_h_
|
||||
#define RTW_HEADER_rtGetInf_h_
|
||||
#include "rt_nonfinite.h"
|
||||
#include "rtwtypes.h"
|
||||
|
||||
extern real_T rtGetInf(void);
|
||||
extern real32_T rtGetInfF(void);
|
||||
extern real_T rtGetMinusInf(void);
|
||||
extern real32_T rtGetMinusInfF(void);
|
||||
|
||||
#endif /* RTW_HEADER_rtGetInf_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* File: rtGetNaN.c
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#include "rtwtypes.h"
|
||||
#include "rtGetNaN.h"
|
||||
#include <stddef.h>
|
||||
#include "rt_nonfinite.h"
|
||||
#define NumBitsPerChar 8U
|
||||
|
||||
/*
|
||||
* Initialize rtNaN needed by the generated code.
|
||||
* NaN is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real_T rtGetNaN(void)
|
||||
{
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
real_T nan = 0.0;
|
||||
if (bitsPerReal == 32U) {
|
||||
nan = rtGetNaNF();
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.bitVal.words.wordH = 0xFFF80000U;
|
||||
tmpVal.bitVal.words.wordL = 0x00000000U;
|
||||
nan = tmpVal.fltVal;
|
||||
}
|
||||
|
||||
return nan;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtNaNF needed by the generated code.
|
||||
* NaN is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real32_T rtGetNaNF(void)
|
||||
{
|
||||
IEEESingle nanF = { { 0.0F } };
|
||||
|
||||
nanF.wordL.wordLuint = 0xFFC00000U;
|
||||
return nanF.wordL.wordLreal;
|
||||
}
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* File: rtGetNaN.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_rtGetNaN_h_
|
||||
#define RTW_HEADER_rtGetNaN_h_
|
||||
#include "rt_nonfinite.h"
|
||||
#include "rtwtypes.h"
|
||||
|
||||
extern real_T rtGetNaN(void);
|
||||
extern real32_T rtGetNaNF(void);
|
||||
|
||||
#endif /* RTW_HEADER_rtGetNaN_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* File: rt_nonfinite.c
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#include "rtGetNaN.h"
|
||||
#include "rtGetInf.h"
|
||||
#include <stddef.h>
|
||||
#include "rtwtypes.h"
|
||||
#include "rt_nonfinite.h"
|
||||
#define NumBitsPerChar 8U
|
||||
|
||||
real_T rtInf;
|
||||
real_T rtMinusInf;
|
||||
real_T rtNaN;
|
||||
real32_T rtInfF;
|
||||
real32_T rtMinusInfF;
|
||||
real32_T rtNaNF;
|
||||
|
||||
/*
|
||||
* Initialize the rtInf, rtMinusInf, and rtNaN needed by the
|
||||
* generated code. NaN is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
void rt_InitInfAndNaN(size_t realSize)
|
||||
{
|
||||
(void) (realSize);
|
||||
rtNaN = rtGetNaN();
|
||||
rtNaNF = rtGetNaNF();
|
||||
rtInf = rtGetInf();
|
||||
rtInfF = rtGetInfF();
|
||||
rtMinusInf = rtGetMinusInf();
|
||||
rtMinusInfF = rtGetMinusInfF();
|
||||
}
|
||||
|
||||
/* Test if value is infinite */
|
||||
boolean_T rtIsInf(real_T value)
|
||||
{
|
||||
return (boolean_T)((value==rtInf || value==rtMinusInf) ? 1U : 0U);
|
||||
}
|
||||
|
||||
/* Test if single-precision value is infinite */
|
||||
boolean_T rtIsInfF(real32_T value)
|
||||
{
|
||||
return (boolean_T)(((value)==rtInfF || (value)==rtMinusInfF) ? 1U : 0U);
|
||||
}
|
||||
|
||||
/* Test if value is not a number */
|
||||
boolean_T rtIsNaN(real_T value)
|
||||
{
|
||||
boolean_T result = (boolean_T) 0;
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
if (bitsPerReal == 32U) {
|
||||
result = rtIsNaNF((real32_T)value);
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.fltVal = value;
|
||||
result = (boolean_T)((tmpVal.bitVal.words.wordH & 0x7FF00000) == 0x7FF00000 &&
|
||||
( (tmpVal.bitVal.words.wordH & 0x000FFFFF) != 0 ||
|
||||
(tmpVal.bitVal.words.wordL != 0) ));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Test if single-precision value is not a number */
|
||||
boolean_T rtIsNaNF(real32_T value)
|
||||
{
|
||||
IEEESingle tmp;
|
||||
tmp.wordL.wordLreal = value;
|
||||
return (boolean_T)( (tmp.wordL.wordLuint & 0x7F800000) == 0x7F800000 &&
|
||||
(tmp.wordL.wordLuint & 0x007FFFFF) != 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* File: rt_nonfinite.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_rt_nonfinite_h_
|
||||
#define RTW_HEADER_rt_nonfinite_h_
|
||||
#include <stddef.h>
|
||||
#include "rtwtypes.h"
|
||||
#define NOT_USING_NONFINITE_LITERALS 1
|
||||
|
||||
extern real_T rtInf;
|
||||
extern real_T rtMinusInf;
|
||||
extern real_T rtNaN;
|
||||
extern real32_T rtInfF;
|
||||
extern real32_T rtMinusInfF;
|
||||
extern real32_T rtNaNF;
|
||||
extern void rt_InitInfAndNaN(size_t realSize);
|
||||
extern boolean_T rtIsInf(real_T value);
|
||||
extern boolean_T rtIsInfF(real32_T value);
|
||||
extern boolean_T rtIsNaN(real_T value);
|
||||
extern boolean_T rtIsNaNF(real32_T value);
|
||||
typedef struct {
|
||||
struct {
|
||||
uint32_T wordH;
|
||||
uint32_T wordL;
|
||||
} words;
|
||||
} BigEndianIEEEDouble;
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
uint32_T wordL;
|
||||
uint32_T wordH;
|
||||
} words;
|
||||
} LittleEndianIEEEDouble;
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
real32_T wordLreal;
|
||||
uint32_T wordLuint;
|
||||
} wordL;
|
||||
} IEEESingle;
|
||||
|
||||
#endif /* RTW_HEADER_rt_nonfinite_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
Simulink Coder project for socTouchDisplay using . MATLAB root = C:\Program Files\MATLAB\R2023b. SimStruct date: 02-Aug-2023 01:53:32
|
||||
This file is generated by Simulink Coder for use by the make utility
|
||||
to determine when to rebuild objects when the name of the current Simulink Coder project changes.
|
||||
The rtwinfomat located at: ..\slprj\ert\socTouchDisplay\tmwinternal\binfo.mat
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
* File: rtwtypes.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTWTYPES_H
|
||||
#define RTWTYPES_H
|
||||
|
||||
/* Logical type definitions */
|
||||
#if (!defined(__cplusplus))
|
||||
#ifndef false
|
||||
#define false (0U)
|
||||
#endif
|
||||
|
||||
#ifndef true
|
||||
#define true (1U)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*=======================================================================*
|
||||
* Target hardware information
|
||||
* Device type: Intel->x86-64 (Windows64)
|
||||
* Number of bits: char: 8 short: 16 int: 32
|
||||
* long: 32
|
||||
* native word size: 64
|
||||
* Byte ordering: LittleEndian
|
||||
* Signed integer division rounds to: Zero
|
||||
* Shift right on a signed integer as arithmetic shift: on
|
||||
*=======================================================================*/
|
||||
|
||||
/*=======================================================================*
|
||||
* Fixed width word size data types: *
|
||||
* int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
|
||||
* uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
|
||||
* real32_T, real64_T - 32 and 64 bit floating point numbers *
|
||||
*=======================================================================*/
|
||||
typedef signed char int8_T;
|
||||
typedef unsigned char uint8_T;
|
||||
typedef short int16_T;
|
||||
typedef unsigned short uint16_T;
|
||||
typedef int int32_T;
|
||||
typedef unsigned int uint32_T;
|
||||
typedef float real32_T;
|
||||
typedef double real64_T;
|
||||
|
||||
/*===========================================================================*
|
||||
* Generic type definitions: boolean_T, char_T, byte_T, int_T, uint_T, *
|
||||
* real_T, time_T, ulong_T. *
|
||||
*===========================================================================*/
|
||||
typedef double real_T;
|
||||
typedef double time_T;
|
||||
typedef unsigned char boolean_T;
|
||||
typedef int int_T;
|
||||
typedef unsigned int uint_T;
|
||||
typedef unsigned long ulong_T;
|
||||
typedef char char_T;
|
||||
typedef unsigned char uchar_T;
|
||||
typedef char_T byte_T;
|
||||
|
||||
/*===========================================================================*
|
||||
* Complex number type definitions *
|
||||
*===========================================================================*/
|
||||
#define CREAL_T
|
||||
|
||||
typedef struct {
|
||||
real32_T re;
|
||||
real32_T im;
|
||||
} creal32_T;
|
||||
|
||||
typedef struct {
|
||||
real64_T re;
|
||||
real64_T im;
|
||||
} creal64_T;
|
||||
|
||||
typedef struct {
|
||||
real_T re;
|
||||
real_T im;
|
||||
} creal_T;
|
||||
|
||||
#define CINT8_T
|
||||
|
||||
typedef struct {
|
||||
int8_T re;
|
||||
int8_T im;
|
||||
} cint8_T;
|
||||
|
||||
#define CUINT8_T
|
||||
|
||||
typedef struct {
|
||||
uint8_T re;
|
||||
uint8_T im;
|
||||
} cuint8_T;
|
||||
|
||||
#define CINT16_T
|
||||
|
||||
typedef struct {
|
||||
int16_T re;
|
||||
int16_T im;
|
||||
} cint16_T;
|
||||
|
||||
#define CUINT16_T
|
||||
|
||||
typedef struct {
|
||||
uint16_T re;
|
||||
uint16_T im;
|
||||
} cuint16_T;
|
||||
|
||||
#define CINT32_T
|
||||
|
||||
typedef struct {
|
||||
int32_T re;
|
||||
int32_T im;
|
||||
} cint32_T;
|
||||
|
||||
#define CUINT32_T
|
||||
|
||||
typedef struct {
|
||||
uint32_T re;
|
||||
uint32_T im;
|
||||
} cuint32_T;
|
||||
|
||||
/*=======================================================================*
|
||||
* Min and Max: *
|
||||
* int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
|
||||
* uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
|
||||
*=======================================================================*/
|
||||
#define MAX_int8_T ((int8_T)(127))
|
||||
#define MIN_int8_T ((int8_T)(-128))
|
||||
#define MAX_uint8_T ((uint8_T)(255U))
|
||||
#define MAX_int16_T ((int16_T)(32767))
|
||||
#define MIN_int16_T ((int16_T)(-32768))
|
||||
#define MAX_uint16_T ((uint16_T)(65535U))
|
||||
#define MAX_int32_T ((int32_T)(2147483647))
|
||||
#define MIN_int32_T ((int32_T)(-2147483647-1))
|
||||
#define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU))
|
||||
|
||||
/* Block D-Work pointer type */
|
||||
typedef void * pointer_T;
|
||||
|
||||
#endif /* RTWTYPES_H */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
Binary file not shown.
|
|
@ -0,0 +1,2 @@
|
|||
set "MINGW_ROOT=C:\PROGRA~3\MATLAB\SUPPOR~1\R2023b\3P778C~1.INS\MINGW_~1.INS\bin"
|
||||
@set "PATH=%PATH%;%MINGW_ROOT%"
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
call "setup_mingw.bat"
|
||||
|
||||
cd .
|
||||
|
||||
if "%1"=="" ("%MINGW_ROOT%\mingw32-make.exe" -f socTouchDisplay.mk all) else ("%MINGW_ROOT%\mingw32-make.exe" -f socTouchDisplay.mk %1)
|
||||
@if errorlevel 1 goto error_exit
|
||||
|
||||
exit /B 0
|
||||
|
||||
:error_exit
|
||||
echo The make command returned an error of %errorlevel%
|
||||
exit /B 1
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,192 @@
|
|||
/*
|
||||
* File: socTouchDisplay.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_socTouchDisplay_h_
|
||||
#define RTW_HEADER_socTouchDisplay_h_
|
||||
#ifndef socTouchDisplay_COMMON_INCLUDES_
|
||||
#define socTouchDisplay_COMMON_INCLUDES_
|
||||
#include "rtwtypes.h"
|
||||
#include "can_message.h"
|
||||
#endif /* socTouchDisplay_COMMON_INCLUDES_ */
|
||||
|
||||
#include "socTouchDisplay_types.h"
|
||||
#include "rt_nonfinite.h"
|
||||
#include "ivec_rte_dummy.h"
|
||||
|
||||
/* Macros for accessing real-time model data structure */
|
||||
#ifndef rtmGetErrorStatus
|
||||
#define rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
|
||||
#endif
|
||||
|
||||
#ifndef rtmSetErrorStatus
|
||||
#define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
|
||||
#endif
|
||||
|
||||
/* Block signals (default storage) */
|
||||
typedef struct {
|
||||
CAN_MESSAGE_BUS Selector; /* '<S3>/Selector' */
|
||||
CAN_MESSAGE_BUS SFunction; /* '<S3>/S-Function' */
|
||||
real_T CANUnpack_o1; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o2; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o3; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o4; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o5; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o6; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o7; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o8; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o9; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o10; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o11; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o12; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o13; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o14; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o15; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o16; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o17; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o18; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o19; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o20; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o21; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o22; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o23; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o24; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o25; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o26; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o27; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o28; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o29; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o30; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o31; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o32; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o33; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o34; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o35; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o36; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o37; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o38; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o39; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o40; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o41; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o42; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o43; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o44; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o45; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o46; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o47; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o48; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o49; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o50; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o51; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o52; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o53; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o54; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o55; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o56; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o57; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o58; /* '<S3>/CAN Unpack' */
|
||||
} B_socTouchDisplay_T;
|
||||
|
||||
/* Block states (default storage) for system '<Root>' */
|
||||
typedef struct {
|
||||
void* SFunction_canFrameBUS; /* '<S3>/S-Function' */
|
||||
uint32_T durationCounter_1; /* '<Root>/Chart1' */
|
||||
uint32_T temporalCounter_i1; /* '<Root>/Chart' */
|
||||
uint32_T durationCounter_1_g; /* '<Root>/Chart' */
|
||||
uint32_T durationCounter_2; /* '<Root>/Chart' */
|
||||
int_T CANUnpack_ModeSignalID; /* '<S3>/CAN Unpack' */
|
||||
int_T CANUnpack_StatusPortID; /* '<S3>/CAN Unpack' */
|
||||
uint8_T is_active_c1_socTouchDisplay;/* '<Root>/Chart1' */
|
||||
uint8_T is_c1_socTouchDisplay; /* '<Root>/Chart1' */
|
||||
uint8_T is_active_c3_socTouchDisplay;/* '<Root>/Chart' */
|
||||
uint8_T is_c3_socTouchDisplay; /* '<Root>/Chart' */
|
||||
} DW_socTouchDisplay_T;
|
||||
|
||||
/* External inputs (root inport signals with default storage) */
|
||||
typedef struct {
|
||||
real_T in_bTouchDetected; /* '<Root>/in_bTouchDetected' */
|
||||
real_T ip_u32TouchDuration_msec; /* '<Root>/ip_u32TouchDuration_msec' */
|
||||
real_T ip_u32DisplayDuration_msec; /* '<Root>/ip_u32DisplayDuration_msec' */
|
||||
CAN_MESSAGE_BUS Input[MAX_CAN_MESSAGE_INSTANCE];/* '<Root>/Input' */
|
||||
} ExtU_socTouchDisplay_T;
|
||||
|
||||
/* External outputs (root outports fed by signals with default storage) */
|
||||
typedef struct {
|
||||
boolean_T op_bDisplayStatus; /* '<Root>/op_bDisplayStatus' */
|
||||
boolean_T op_bErrorStatus; /* '<Root>/op_bErrorStatus' */
|
||||
uint8_T op_u8HundredsPlace; /* '<Root>/op_u8HundredsPlace' */
|
||||
uint8_T op_u8TensPlace; /* '<Root>/op_u8TensPlace' */
|
||||
uint8_T op_u8OnesPlace; /* '<Root>/op_u8OnesPlace' */
|
||||
} ExtY_socTouchDisplay_T;
|
||||
|
||||
/* Real-time Model Data Structure */
|
||||
struct tag_RTM_socTouchDisplay_T {
|
||||
const char_T * volatile errorStatus;
|
||||
};
|
||||
|
||||
/* Block signals (default storage) */
|
||||
extern B_socTouchDisplay_T socTouchDisplay_B;
|
||||
|
||||
/* Block states (default storage) */
|
||||
extern DW_socTouchDisplay_T socTouchDisplay_DW;
|
||||
|
||||
/* External inputs (root inport signals with default storage) */
|
||||
extern ExtU_socTouchDisplay_T socTouchDisplay_U;
|
||||
|
||||
/* External outputs (root outports fed by signals with default storage) */
|
||||
extern ExtY_socTouchDisplay_T socTouchDisplay_Y;
|
||||
|
||||
/* Model entry point functions */
|
||||
extern void socTouchDisplay_initialize(void);
|
||||
extern void socTouchDisplay_step(void);
|
||||
extern void socTouchDisplay_terminate(void);
|
||||
|
||||
/* Real-time Model object */
|
||||
extern RT_MODEL_socTouchDisplay_T *const socTouchDisplay_M;
|
||||
|
||||
/*-
|
||||
* These blocks were eliminated from the model due to optimizations:
|
||||
*
|
||||
* Block '<S4>/Cast' : Eliminate redundant data type conversion
|
||||
* Block '<S4>/Cast1' : Eliminate redundant data type conversion
|
||||
* Block '<S4>/Cast2' : Eliminate redundant data type conversion
|
||||
*/
|
||||
|
||||
/*-
|
||||
* The generated code includes comments that allow you to trace directly
|
||||
* back to the appropriate location in the model. The basic format
|
||||
* is <system>/block_name, where system is the system number (uniquely
|
||||
* assigned by Simulink) and block_name is the name of the block.
|
||||
*
|
||||
* Use the MATLAB hilite_system command to trace the generated code back
|
||||
* to the model. For example,
|
||||
*
|
||||
* hilite_system('<S3>') - opens system 3
|
||||
* hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
|
||||
*
|
||||
* Here is the system hierarchy for this model
|
||||
*
|
||||
* '<Root>' : 'socTouchDisplay'
|
||||
* '<S1>' : 'socTouchDisplay/Chart'
|
||||
* '<S2>' : 'socTouchDisplay/Chart1'
|
||||
* '<S3>' : 'socTouchDisplay/canMsgDecode'
|
||||
* '<S4>' : 'socTouchDisplay/displayData'
|
||||
*/
|
||||
#endif /* RTW_HEADER_socTouchDisplay_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,579 @@
|
|||
###########################################################################
|
||||
## Makefile generated for component 'socTouchDisplay'.
|
||||
##
|
||||
## Makefile : socTouchDisplay.mk
|
||||
## Generated on : Mon Oct 28 16:04:26 2024
|
||||
## Final product: $(RELATIVE_PATH_TO_ANCHOR)/socTouchDisplay.exe
|
||||
## Product type : executable
|
||||
##
|
||||
###########################################################################
|
||||
|
||||
###########################################################################
|
||||
## MACROS
|
||||
###########################################################################
|
||||
|
||||
# Macro Descriptions:
|
||||
# PRODUCT_NAME Name of the system to build
|
||||
# MAKEFILE Name of this makefile
|
||||
# COMPILER_COMMAND_FILE Compiler command listing model reference header paths
|
||||
# CMD_FILE Command file
|
||||
|
||||
PRODUCT_NAME = socTouchDisplay
|
||||
MAKEFILE = socTouchDisplay.mk
|
||||
MATLAB_ROOT = C:/PROGRA~1/MATLAB/R2023b
|
||||
MATLAB_BIN = C:/PROGRA~1/MATLAB/R2023b/bin
|
||||
MATLAB_ARCH_BIN = $(MATLAB_BIN)/win64
|
||||
START_DIR = D:/MATLAB/bs_touchAndLcd
|
||||
SOLVER =
|
||||
SOLVER_OBJ =
|
||||
CLASSIC_INTERFACE = 0
|
||||
TGT_FCN_LIB = ISO_C
|
||||
MODEL_HAS_DYNAMICALLY_LOADED_SFCNS = 0
|
||||
RELATIVE_PATH_TO_ANCHOR = ..
|
||||
COMPILER_COMMAND_FILE = socTouchDisplay_comp.rsp
|
||||
CMD_FILE = socTouchDisplay.rsp
|
||||
C_STANDARD_OPTS = -fwrapv
|
||||
CPP_STANDARD_OPTS = -fwrapv
|
||||
|
||||
###########################################################################
|
||||
## TOOLCHAIN SPECIFICATIONS
|
||||
###########################################################################
|
||||
|
||||
# Toolchain Name: MinGW64 | gmake (64-bit Windows)
|
||||
# Supported Version(s): 8.x
|
||||
# ToolchainInfo Version: 2023b
|
||||
# Specification Revision: 1.0
|
||||
#
|
||||
#-------------------------------------------
|
||||
# Macros assumed to be defined elsewhere
|
||||
#-------------------------------------------
|
||||
|
||||
# C_STANDARD_OPTS
|
||||
# CPP_STANDARD_OPTS
|
||||
# MINGW_ROOT
|
||||
# MINGW_C_STANDARD_OPTS
|
||||
|
||||
#-----------
|
||||
# MACROS
|
||||
#-----------
|
||||
|
||||
WARN_FLAGS = -Wall -W -Wwrite-strings -Winline -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Wcast-align
|
||||
WARN_FLAGS_MAX = $(WARN_FLAGS) -Wcast-qual -Wshadow
|
||||
CPP_WARN_FLAGS = -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align
|
||||
CPP_WARN_FLAGS_MAX = $(CPP_WARN_FLAGS) -Wcast-qual -Wshadow
|
||||
MW_EXTERNLIB_DIR = $(MATLAB_ROOT)/extern/lib/win64/mingw64
|
||||
SHELL = %SystemRoot%/system32/cmd.exe
|
||||
|
||||
TOOLCHAIN_SRCS =
|
||||
TOOLCHAIN_INCS =
|
||||
TOOLCHAIN_LIBS = -lws2_32
|
||||
|
||||
#------------------------
|
||||
# BUILD TOOL COMMANDS
|
||||
#------------------------
|
||||
|
||||
# C Compiler: GNU C Compiler
|
||||
CC_PATH = $(MINGW_ROOT)
|
||||
CC = "$(CC_PATH)/gcc"
|
||||
|
||||
# Linker: GNU Linker
|
||||
LD_PATH = $(MINGW_ROOT)
|
||||
LD = "$(LD_PATH)/g++"
|
||||
|
||||
# C++ Compiler: GNU C++ Compiler
|
||||
CPP_PATH = $(MINGW_ROOT)
|
||||
CPP = "$(CPP_PATH)/g++"
|
||||
|
||||
# C++ Linker: GNU C++ Linker
|
||||
CPP_LD_PATH = $(MINGW_ROOT)
|
||||
CPP_LD = "$(CPP_LD_PATH)/g++"
|
||||
|
||||
# Archiver: GNU Archiver
|
||||
AR_PATH = $(MINGW_ROOT)
|
||||
AR = "$(AR_PATH)/ar"
|
||||
|
||||
# MEX Tool: MEX Tool
|
||||
MEX_PATH = $(MATLAB_ARCH_BIN)
|
||||
MEX = "$(MEX_PATH)/mex"
|
||||
|
||||
# Download: Download
|
||||
DOWNLOAD =
|
||||
|
||||
# Execute: Execute
|
||||
EXECUTE = $(PRODUCT)
|
||||
|
||||
# Builder: GMAKE Utility
|
||||
MAKE_PATH = $(MINGW_ROOT)
|
||||
MAKE = "$(MAKE_PATH)/mingw32-make.exe"
|
||||
|
||||
|
||||
#-------------------------
|
||||
# Directives/Utilities
|
||||
#-------------------------
|
||||
|
||||
CDEBUG = -g
|
||||
C_OUTPUT_FLAG = -o
|
||||
LDDEBUG = -g
|
||||
OUTPUT_FLAG = -o
|
||||
CPPDEBUG = -g
|
||||
CPP_OUTPUT_FLAG = -o
|
||||
CPPLDDEBUG = -g
|
||||
OUTPUT_FLAG = -o
|
||||
ARDEBUG =
|
||||
STATICLIB_OUTPUT_FLAG =
|
||||
MEX_DEBUG = -g
|
||||
RM = @del
|
||||
ECHO = @echo
|
||||
MV = @move
|
||||
RUN =
|
||||
|
||||
#----------------------------------------
|
||||
# "Faster Builds" Build Configuration
|
||||
#----------------------------------------
|
||||
|
||||
ARFLAGS = ruvs
|
||||
CFLAGS = -c $(MINGW_C_STANDARD_OPTS) -m64 \
|
||||
-O0
|
||||
CPPFLAGS = -c $(CPP_STANDARD_OPTS) -m64 \
|
||||
-O0
|
||||
CPP_LDFLAGS = -static -m64
|
||||
CPP_SHAREDLIB_LDFLAGS = -shared -Wl,--no-undefined \
|
||||
-Wl,--out-implib,$(notdir $(basename $(PRODUCT))).lib
|
||||
DOWNLOAD_FLAGS =
|
||||
EXECUTE_FLAGS =
|
||||
LDFLAGS = -static -m64
|
||||
MEX_CPPFLAGS =
|
||||
MEX_CPPLDFLAGS =
|
||||
MEX_CFLAGS =
|
||||
MEX_LDFLAGS =
|
||||
MAKE_FLAGS = -f $(MAKEFILE)
|
||||
SHAREDLIB_LDFLAGS = -shared -Wl,--no-undefined \
|
||||
-Wl,--out-implib,$(notdir $(basename $(PRODUCT))).lib
|
||||
|
||||
|
||||
|
||||
###########################################################################
|
||||
## OUTPUT INFO
|
||||
###########################################################################
|
||||
|
||||
PRODUCT = $(RELATIVE_PATH_TO_ANCHOR)/socTouchDisplay.exe
|
||||
PRODUCT_TYPE = "executable"
|
||||
BUILD_TYPE = "Top-Level Standalone Executable"
|
||||
|
||||
###########################################################################
|
||||
## INCLUDE PATHS
|
||||
###########################################################################
|
||||
|
||||
INCLUDES_BUILDINFO =
|
||||
|
||||
INCLUDES = $(INCLUDES_BUILDINFO)
|
||||
|
||||
###########################################################################
|
||||
## DEFINES
|
||||
###########################################################################
|
||||
|
||||
DEFINES_BUILD_ARGS = -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0
|
||||
DEFINES_CUSTOM =
|
||||
DEFINES_OPTS = -DTID01EQ=0
|
||||
DEFINES_STANDARD = -DMODEL=socTouchDisplay -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0
|
||||
|
||||
DEFINES = $(DEFINES_BUILD_ARGS) $(DEFINES_CUSTOM) $(DEFINES_OPTS) $(DEFINES_STANDARD)
|
||||
|
||||
###########################################################################
|
||||
## SOURCE FILES
|
||||
###########################################################################
|
||||
|
||||
SRCS = $(START_DIR)/socTouchDisplay_ert_rtw/rtGetInf.c $(START_DIR)/socTouchDisplay_ert_rtw/rtGetNaN.c $(START_DIR)/socTouchDisplay_ert_rtw/rt_nonfinite.c $(START_DIR)/socTouchDisplay_ert_rtw/socTouchDisplay.c
|
||||
|
||||
MAIN_SRC = $(START_DIR)/socTouchDisplay_ert_rtw/ert_main.c
|
||||
|
||||
ALL_SRCS = $(SRCS) $(MAIN_SRC)
|
||||
|
||||
###########################################################################
|
||||
## OBJECTS
|
||||
###########################################################################
|
||||
|
||||
OBJS = rtGetInf.obj rtGetNaN.obj rt_nonfinite.obj socTouchDisplay.obj
|
||||
|
||||
MAIN_OBJ = ert_main.obj
|
||||
|
||||
ALL_OBJS = $(OBJS) $(MAIN_OBJ)
|
||||
|
||||
###########################################################################
|
||||
## PREBUILT OBJECT FILES
|
||||
###########################################################################
|
||||
|
||||
PREBUILT_OBJS =
|
||||
|
||||
###########################################################################
|
||||
## LIBRARIES
|
||||
###########################################################################
|
||||
|
||||
LIBS =
|
||||
|
||||
###########################################################################
|
||||
## SYSTEM LIBRARIES
|
||||
###########################################################################
|
||||
|
||||
SYSTEM_LIBS =
|
||||
|
||||
###########################################################################
|
||||
## ADDITIONAL TOOLCHAIN FLAGS
|
||||
###########################################################################
|
||||
|
||||
#---------------
|
||||
# C Compiler
|
||||
#---------------
|
||||
|
||||
CFLAGS_TFL = -msse2
|
||||
CFLAGS_BASIC = $(DEFINES) $(INCLUDES) @$(COMPILER_COMMAND_FILE)
|
||||
|
||||
CFLAGS += $(CFLAGS_TFL) $(CFLAGS_BASIC)
|
||||
|
||||
#-----------------
|
||||
# C++ Compiler
|
||||
#-----------------
|
||||
|
||||
CPPFLAGS_TFL = -msse2
|
||||
CPPFLAGS_BASIC = $(DEFINES) $(INCLUDES) @$(COMPILER_COMMAND_FILE)
|
||||
|
||||
CPPFLAGS += $(CPPFLAGS_TFL) $(CPPFLAGS_BASIC)
|
||||
|
||||
#---------------------
|
||||
# MEX C++ Compiler
|
||||
#---------------------
|
||||
|
||||
MEX_CPP_Compiler_BASIC = @$(COMPILER_COMMAND_FILE)
|
||||
|
||||
MEX_CPPFLAGS += $(MEX_CPP_Compiler_BASIC)
|
||||
|
||||
#-----------------
|
||||
# MEX Compiler
|
||||
#-----------------
|
||||
|
||||
MEX_Compiler_BASIC = @$(COMPILER_COMMAND_FILE)
|
||||
|
||||
MEX_CFLAGS += $(MEX_Compiler_BASIC)
|
||||
|
||||
###########################################################################
|
||||
## INLINED COMMANDS
|
||||
###########################################################################
|
||||
|
||||
|
||||
MINGW_C_STANDARD_OPTS = $(C_STANDARD_OPTS)
|
||||
|
||||
|
||||
###########################################################################
|
||||
## PHONY TARGETS
|
||||
###########################################################################
|
||||
|
||||
.PHONY : all build buildobj clean info prebuild download execute
|
||||
|
||||
|
||||
all : build
|
||||
@echo "### Successfully generated all binary outputs."
|
||||
|
||||
|
||||
build : prebuild $(PRODUCT)
|
||||
|
||||
|
||||
buildobj : prebuild $(OBJS) $(PREBUILT_OBJS)
|
||||
@echo "### Successfully generated all binary outputs."
|
||||
|
||||
|
||||
prebuild :
|
||||
|
||||
|
||||
download : $(PRODUCT)
|
||||
|
||||
|
||||
execute : download
|
||||
@echo "### Invoking postbuild tool "Execute" ..."
|
||||
$(EXECUTE) $(EXECUTE_FLAGS)
|
||||
@echo "### Done invoking postbuild tool."
|
||||
|
||||
|
||||
###########################################################################
|
||||
## FINAL TARGET
|
||||
###########################################################################
|
||||
|
||||
#-------------------------------------------
|
||||
# Create a standalone executable
|
||||
#-------------------------------------------
|
||||
|
||||
$(PRODUCT) : $(OBJS) $(PREBUILT_OBJS) $(MAIN_OBJ)
|
||||
@echo "### Creating standalone executable "$(PRODUCT)" ..."
|
||||
$(LD) $(LDFLAGS) -o $(PRODUCT) @$(CMD_FILE) $(SYSTEM_LIBS) $(TOOLCHAIN_LIBS)
|
||||
@echo "### Created: $(PRODUCT)"
|
||||
|
||||
|
||||
###########################################################################
|
||||
## INTERMEDIATE TARGETS
|
||||
###########################################################################
|
||||
|
||||
#---------------------
|
||||
# SOURCE-TO-OBJECT
|
||||
#---------------------
|
||||
|
||||
%.obj : %.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : %.cpp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : %.cc
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : %.cp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : %.cxx
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : %.CPP
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : %.c++
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.cpp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.cc
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.cp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.cxx
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.CPP
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(RELATIVE_PATH_TO_ANCHOR)/%.c++
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/%.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/%.cpp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/%.cc
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/%.cp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/%.cxx
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/%.CPP
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/%.c++
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.cpp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.cc
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.cp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.cxx
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.CPP
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(START_DIR)/socTouchDisplay_ert_rtw/%.c++
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/rtw/c/src/%.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/rtw/c/src/%.cpp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/rtw/c/src/%.cc
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/rtw/c/src/%.cp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/rtw/c/src/%.cxx
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/rtw/c/src/%.CPP
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/rtw/c/src/%.c++
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/simulink/src/%.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/simulink/src/%.cpp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/simulink/src/%.cc
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/simulink/src/%.cp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/simulink/src/%.cxx
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/simulink/src/%.CPP
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/simulink/src/%.c++
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.cpp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.cc
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.cp
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.cxx
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.CPP
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
%.obj : $(MATLAB_ROOT)/toolbox/simulink/blocks/src/%.c++
|
||||
$(CPP) $(CPPFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
ert_main.obj : $(START_DIR)/socTouchDisplay_ert_rtw/ert_main.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
rtGetInf.obj : $(START_DIR)/socTouchDisplay_ert_rtw/rtGetInf.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
rtGetNaN.obj : $(START_DIR)/socTouchDisplay_ert_rtw/rtGetNaN.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
rt_nonfinite.obj : $(START_DIR)/socTouchDisplay_ert_rtw/rt_nonfinite.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
socTouchDisplay.obj : $(START_DIR)/socTouchDisplay_ert_rtw/socTouchDisplay.c
|
||||
$(CC) $(CFLAGS) -o "$@" "$<"
|
||||
|
||||
|
||||
###########################################################################
|
||||
## DEPENDENCIES
|
||||
###########################################################################
|
||||
|
||||
$(ALL_OBJS) : rtw_proj.tmw $(COMPILER_COMMAND_FILE) $(MAKEFILE)
|
||||
|
||||
|
||||
###########################################################################
|
||||
## MISCELLANEOUS TARGETS
|
||||
###########################################################################
|
||||
|
||||
info :
|
||||
@echo "### PRODUCT = $(PRODUCT)"
|
||||
@echo "### PRODUCT_TYPE = $(PRODUCT_TYPE)"
|
||||
@echo "### BUILD_TYPE = $(BUILD_TYPE)"
|
||||
@echo "### INCLUDES = $(INCLUDES)"
|
||||
@echo "### DEFINES = $(DEFINES)"
|
||||
@echo "### ALL_SRCS = $(ALL_SRCS)"
|
||||
@echo "### ALL_OBJS = $(ALL_OBJS)"
|
||||
@echo "### LIBS = $(LIBS)"
|
||||
@echo "### MODELREF_LIBS = $(MODELREF_LIBS)"
|
||||
@echo "### SYSTEM_LIBS = $(SYSTEM_LIBS)"
|
||||
@echo "### TOOLCHAIN_LIBS = $(TOOLCHAIN_LIBS)"
|
||||
@echo "### CFLAGS = $(CFLAGS)"
|
||||
@echo "### LDFLAGS = $(LDFLAGS)"
|
||||
@echo "### SHAREDLIB_LDFLAGS = $(SHAREDLIB_LDFLAGS)"
|
||||
@echo "### CPPFLAGS = $(CPPFLAGS)"
|
||||
@echo "### CPP_LDFLAGS = $(CPP_LDFLAGS)"
|
||||
@echo "### CPP_SHAREDLIB_LDFLAGS = $(CPP_SHAREDLIB_LDFLAGS)"
|
||||
@echo "### ARFLAGS = $(ARFLAGS)"
|
||||
@echo "### MEX_CFLAGS = $(MEX_CFLAGS)"
|
||||
@echo "### MEX_CPPFLAGS = $(MEX_CPPFLAGS)"
|
||||
@echo "### MEX_LDFLAGS = $(MEX_LDFLAGS)"
|
||||
@echo "### MEX_CPPLDFLAGS = $(MEX_CPPLDFLAGS)"
|
||||
@echo "### DOWNLOAD_FLAGS = $(DOWNLOAD_FLAGS)"
|
||||
@echo "### EXECUTE_FLAGS = $(EXECUTE_FLAGS)"
|
||||
@echo "### MAKE_FLAGS = $(MAKE_FLAGS)"
|
||||
|
||||
|
||||
clean :
|
||||
$(ECHO) "### Deleting all derived files ..."
|
||||
$(RM) $(subst /,\,$(PRODUCT))
|
||||
$(RM) $(subst /,\,$(ALL_OBJS))
|
||||
$(ECHO) "### Deleted all derived files."
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
ert_main.obj
|
||||
rtGetInf.obj
|
||||
rtGetNaN.obj
|
||||
rt_nonfinite.obj
|
||||
socTouchDisplay.obj
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
-ID:/MATLAB/bs_touchAndLcd
|
||||
-ID:/MATLAB/bs_touchAndLcd/socTouchDisplay_ert_rtw
|
||||
-IC:/Program\ Files/MATLAB/R2023b/extern/include
|
||||
-IC:/Program\ Files/MATLAB/R2023b/simulink/include
|
||||
-IC:/Program\ Files/MATLAB/R2023b/rtw/c/src
|
||||
-IC:/Program\ Files/MATLAB/R2023b/rtw/c/src/ext_mode/common
|
||||
-IC:/Program\ Files/MATLAB/R2023b/rtw/c/ert
|
||||
-IC:/Program\ Files/MATLAB/R2023b/toolbox/shared/can/src/scanutil
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* File: socTouchDisplay_private.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_socTouchDisplay_private_h_
|
||||
#define RTW_HEADER_socTouchDisplay_private_h_
|
||||
#include "rtwtypes.h"
|
||||
#include "socTouchDisplay_types.h"
|
||||
#ifdef __cplusplus
|
||||
#define SFB_EXTERN_C extern "C"
|
||||
#else
|
||||
#define SFB_EXTERN_C extern
|
||||
#endif
|
||||
|
||||
SFB_EXTERN_C void canReceive_Start_wrapper(void);
|
||||
SFB_EXTERN_C void canReceive_Outputs_wrapper(const uint32_T *id,
|
||||
const uint8_T *dlc,
|
||||
const uint8_T *data,
|
||||
CAN_MESSAGE_BUS *canFrame);
|
||||
SFB_EXTERN_C void canReceive_Terminate_wrapper(void);
|
||||
|
||||
#undef SFB_EXTERN_C
|
||||
#endif /* RTW_HEADER_socTouchDisplay_private_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* File: socTouchDisplay_types.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_socTouchDisplay_types_h_
|
||||
#define RTW_HEADER_socTouchDisplay_types_h_
|
||||
#include "rtwtypes.h"
|
||||
|
||||
/* Includes for objects with custom storage classes */
|
||||
#include "ivec_rte_dummy.h"
|
||||
|
||||
/*
|
||||
* Check that imported macros with storage class "ImportedDefine" are defined
|
||||
*/
|
||||
#ifndef MAX_CAN_MESSAGE_INSTANCE
|
||||
#error The value of parameter "MAX_CAN_MESSAGE_INSTANCE" is not defined
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Registered constraints for dimension variants
|
||||
*/
|
||||
/* Constraint 'MAX_CAN_MESSAGE_INSTANCE == 10' registered by:
|
||||
* '<S3>/ip_xCanMsg'
|
||||
*/
|
||||
#if MAX_CAN_MESSAGE_INSTANCE != 10
|
||||
# error "The preprocessor definition 'MAX_CAN_MESSAGE_INSTANCE' must be equal to '10'"
|
||||
#endif
|
||||
|
||||
#ifndef DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_
|
||||
#define DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_
|
||||
|
||||
typedef struct {
|
||||
uint8_T Extended;
|
||||
uint8_T Length;
|
||||
uint8_T Remote;
|
||||
uint8_T Error;
|
||||
uint32_T ID;
|
||||
real_T Timestamp;
|
||||
uint8_T Data[8];
|
||||
} CAN_MESSAGE_BUS;
|
||||
|
||||
#endif
|
||||
|
||||
/* Forward declaration for rtModel */
|
||||
typedef struct tag_RTM_socTouchDisplay_T RT_MODEL_socTouchDisplay_T;
|
||||
|
||||
#endif /* RTW_HEADER_socTouchDisplay_types_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MF0 version="1.1" packageUris="http://schema.mathworks.com/mf0/SlCache/19700101">
|
||||
<slcache.FileAttributes type="slcache.FileAttributes" uuid="50ee8ca7-b352-4bb2-8e74-a29811f62669">
|
||||
<checksum>2oxCrrkWYAfYsid2BKElsqmUm/b9blgB8ROjvTY5kkSHI15WRdu5OidAq6Boxegx/r4DqPRAm5D7oEE/jWVWyQ==</checksum>
|
||||
</slcache.FileAttributes>
|
||||
</MF0>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,30 @@
|
|||
/* Generated by S-function Builder */
|
||||
#ifndef _CANRECEIVE_BUS_H_
|
||||
#define _CANRECEIVE_BUS_H_
|
||||
/* Read only - STARTS */
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
#include "tmwtypes.h"
|
||||
#else
|
||||
#include "rtwtypes.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_
|
||||
#define DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_
|
||||
typedef struct {
|
||||
uint8_T Extended;
|
||||
uint8_T Length;
|
||||
uint8_T Remote;
|
||||
uint8_T Error;
|
||||
uint32_T ID;
|
||||
real_T Timestamp;
|
||||
uint8_T Data[8];
|
||||
} CAN_MESSAGE_BUS;
|
||||
#endif
|
||||
|
||||
/* Read only - ENDS */
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/* Copyright 2008-2021 The MathWorks, Inc. */
|
||||
/**
|
||||
* @file: can_message.h
|
||||
*
|
||||
* Purpose: Declare custom and register CAN datatype.
|
||||
*
|
||||
* $Authors: Shankar Subramanian $
|
||||
*
|
||||
* $Copyright: 2008-2019 The MathWorks, Inc.$
|
||||
*
|
||||
*/
|
||||
#ifndef __CANMESSAGE__HEADER__
|
||||
#define __CANMESSAGE__HEADER__
|
||||
|
||||
/* Use tmwtypes.h for non-codegen targets */
|
||||
#if defined(MATLAB_MEX_FILE) || defined(SIMULINK_REAL_TIME)
|
||||
#include "tmwtypes.h"
|
||||
#else
|
||||
#include <ivec_APP/inc/rtwtypes.h>
|
||||
#endif
|
||||
/* @DO NOT REMOVE: The following typedef is required for targets (FM5, C166 etc.) to actually
|
||||
use it for their code generation TLC file. Since their datatype is being
|
||||
discarded, this is being defined in our header which they will be referencing.*/
|
||||
typedef enum {CAN_MESSAGE_STANDARD, CAN_MESSAGE_EXTENDED} CanFrameType;
|
||||
|
||||
/* Define invalid CAN Identifier value. This can be used to specify invalid CAN Message
|
||||
This represents a uint32_T value */
|
||||
#define INVALID_CAN_ID 0xFFFFFFFFU
|
||||
|
||||
/*
|
||||
The CAN_DATATYPE structure has been structured so that it is tightly packed.
|
||||
Size of structure (without timestamp field) :16 bytes
|
||||
Size of structure (with timestamp field) :24 bytes
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
|
||||
/* Is Extended frame */
|
||||
uint8_T Extended;
|
||||
|
||||
/* Length */
|
||||
uint8_T Length;
|
||||
|
||||
/* RTR */
|
||||
uint8_T Remote;
|
||||
|
||||
/* Error */
|
||||
uint8_T Error;
|
||||
|
||||
/* CAN ID */
|
||||
uint32_T ID;
|
||||
|
||||
/*
|
||||
TIMESTAMP_NOT_REQUIRED is a macro that will be defined by Target teams
|
||||
PIL, C166, FM5, xPC if they do not require the timestamp field during code
|
||||
generation. By default, timestamp is defined. If the targets do not require
|
||||
the timestamp field, they should define the macro TIMESTAMP_NOT_REQUIRED before
|
||||
including this header file for code generation.
|
||||
*/
|
||||
#ifndef TIMESTAMP_NOT_REQUIRED
|
||||
/* Timestamp */
|
||||
double Timestamp;
|
||||
#endif
|
||||
|
||||
/* Data field */
|
||||
uint8_T Data[8];
|
||||
|
||||
} CAN_MESSAGE;
|
||||
|
||||
typedef CAN_MESSAGE CAN_DATATYPE;
|
||||
|
||||
/**
|
||||
* Initialize a CAN message.
|
||||
*
|
||||
* @param CAN_DATATYPE: CAN Message structure
|
||||
*/
|
||||
void initializeCANMessage(CAN_DATATYPE* canmsg, uint8_T Extended);
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* File: rtGetInf.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_rtGetInf_h_
|
||||
#define RTW_HEADER_rtGetInf_h_
|
||||
#include "rt_nonfinite.h"
|
||||
#include "rtwtypes.h"
|
||||
|
||||
extern real_T rtGetInf(void);
|
||||
extern real32_T rtGetInfF(void);
|
||||
extern real_T rtGetMinusInf(void);
|
||||
extern real32_T rtGetMinusInfF(void);
|
||||
|
||||
#endif /* RTW_HEADER_rtGetInf_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* File: rtGetNaN.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_rtGetNaN_h_
|
||||
#define RTW_HEADER_rtGetNaN_h_
|
||||
#include "rt_nonfinite.h"
|
||||
#include "rtwtypes.h"
|
||||
|
||||
extern real_T rtGetNaN(void);
|
||||
extern real32_T rtGetNaNF(void);
|
||||
|
||||
#endif /* RTW_HEADER_rtGetNaN_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* File: rt_nonfinite.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_rt_nonfinite_h_
|
||||
#define RTW_HEADER_rt_nonfinite_h_
|
||||
#include <stddef.h>
|
||||
#include "rtwtypes.h"
|
||||
#define NOT_USING_NONFINITE_LITERALS 1
|
||||
|
||||
extern real_T rtInf;
|
||||
extern real_T rtMinusInf;
|
||||
extern real_T rtNaN;
|
||||
extern real32_T rtInfF;
|
||||
extern real32_T rtMinusInfF;
|
||||
extern real32_T rtNaNF;
|
||||
extern void rt_InitInfAndNaN(size_t realSize);
|
||||
extern boolean_T rtIsInf(real_T value);
|
||||
extern boolean_T rtIsInfF(real32_T value);
|
||||
extern boolean_T rtIsNaN(real_T value);
|
||||
extern boolean_T rtIsNaNF(real32_T value);
|
||||
typedef struct {
|
||||
struct {
|
||||
uint32_T wordH;
|
||||
uint32_T wordL;
|
||||
} words;
|
||||
} BigEndianIEEEDouble;
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
uint32_T wordL;
|
||||
uint32_T wordH;
|
||||
} words;
|
||||
} LittleEndianIEEEDouble;
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
real32_T wordLreal;
|
||||
uint32_T wordLuint;
|
||||
} wordL;
|
||||
} IEEESingle;
|
||||
|
||||
#endif /* RTW_HEADER_rt_nonfinite_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
* File: rtwtypes.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTWTYPES_H
|
||||
#define RTWTYPES_H
|
||||
|
||||
/* Logical type definitions */
|
||||
#if (!defined(__cplusplus))
|
||||
#ifndef false
|
||||
#define false (0U)
|
||||
#endif
|
||||
|
||||
#ifndef true
|
||||
#define true (1U)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*=======================================================================*
|
||||
* Target hardware information
|
||||
* Device type: Intel->x86-64 (Windows64)
|
||||
* Number of bits: char: 8 short: 16 int: 32
|
||||
* long: 32
|
||||
* native word size: 64
|
||||
* Byte ordering: LittleEndian
|
||||
* Signed integer division rounds to: Zero
|
||||
* Shift right on a signed integer as arithmetic shift: on
|
||||
*=======================================================================*/
|
||||
|
||||
/*=======================================================================*
|
||||
* Fixed width word size data types: *
|
||||
* int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
|
||||
* uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
|
||||
* real32_T, real64_T - 32 and 64 bit floating point numbers *
|
||||
*=======================================================================*/
|
||||
typedef signed char int8_T;
|
||||
typedef unsigned char uint8_T;
|
||||
typedef short int16_T;
|
||||
typedef unsigned short uint16_T;
|
||||
typedef int int32_T;
|
||||
typedef unsigned int uint32_T;
|
||||
typedef float real32_T;
|
||||
typedef double real64_T;
|
||||
|
||||
/*===========================================================================*
|
||||
* Generic type definitions: boolean_T, char_T, byte_T, int_T, uint_T, *
|
||||
* real_T, time_T, ulong_T. *
|
||||
*===========================================================================*/
|
||||
typedef double real_T;
|
||||
typedef double time_T;
|
||||
typedef unsigned char boolean_T;
|
||||
typedef int int_T;
|
||||
typedef unsigned int uint_T;
|
||||
typedef unsigned long ulong_T;
|
||||
typedef char char_T;
|
||||
typedef unsigned char uchar_T;
|
||||
typedef char_T byte_T;
|
||||
|
||||
/*===========================================================================*
|
||||
* Complex number type definitions *
|
||||
*===========================================================================*/
|
||||
#define CREAL_T
|
||||
|
||||
typedef struct {
|
||||
real32_T re;
|
||||
real32_T im;
|
||||
} creal32_T;
|
||||
|
||||
typedef struct {
|
||||
real64_T re;
|
||||
real64_T im;
|
||||
} creal64_T;
|
||||
|
||||
typedef struct {
|
||||
real_T re;
|
||||
real_T im;
|
||||
} creal_T;
|
||||
|
||||
#define CINT8_T
|
||||
|
||||
typedef struct {
|
||||
int8_T re;
|
||||
int8_T im;
|
||||
} cint8_T;
|
||||
|
||||
#define CUINT8_T
|
||||
|
||||
typedef struct {
|
||||
uint8_T re;
|
||||
uint8_T im;
|
||||
} cuint8_T;
|
||||
|
||||
#define CINT16_T
|
||||
|
||||
typedef struct {
|
||||
int16_T re;
|
||||
int16_T im;
|
||||
} cint16_T;
|
||||
|
||||
#define CUINT16_T
|
||||
|
||||
typedef struct {
|
||||
uint16_T re;
|
||||
uint16_T im;
|
||||
} cuint16_T;
|
||||
|
||||
#define CINT32_T
|
||||
|
||||
typedef struct {
|
||||
int32_T re;
|
||||
int32_T im;
|
||||
} cint32_T;
|
||||
|
||||
#define CUINT32_T
|
||||
|
||||
typedef struct {
|
||||
uint32_T re;
|
||||
uint32_T im;
|
||||
} cuint32_T;
|
||||
|
||||
/*=======================================================================*
|
||||
* Min and Max: *
|
||||
* int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
|
||||
* uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
|
||||
*=======================================================================*/
|
||||
#define MAX_int8_T ((int8_T)(127))
|
||||
#define MIN_int8_T ((int8_T)(-128))
|
||||
#define MAX_uint8_T ((uint8_T)(255U))
|
||||
#define MAX_int16_T ((int16_T)(32767))
|
||||
#define MIN_int16_T ((int16_T)(-32768))
|
||||
#define MAX_uint16_T ((uint16_T)(65535U))
|
||||
#define MAX_int32_T ((int32_T)(2147483647))
|
||||
#define MIN_int32_T ((int32_T)(-2147483647-1))
|
||||
#define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU))
|
||||
|
||||
/* Block D-Work pointer type */
|
||||
typedef void * pointer_T;
|
||||
|
||||
#endif /* RTWTYPES_H */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
/*
|
||||
* File: socTouchDisplay.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_socTouchDisplay_h_
|
||||
#define RTW_HEADER_socTouchDisplay_h_
|
||||
#ifndef socTouchDisplay_COMMON_INCLUDES_
|
||||
#define socTouchDisplay_COMMON_INCLUDES_
|
||||
#include "rtwtypes.h"
|
||||
#include "can_message.h"
|
||||
#endif /* socTouchDisplay_COMMON_INCLUDES_ */
|
||||
|
||||
#include "socTouchDisplay_types.h"
|
||||
#include "rt_nonfinite.h"
|
||||
#include "ivec_rte_dummy.h"
|
||||
|
||||
/* Macros for accessing real-time model data structure */
|
||||
#ifndef rtmGetErrorStatus
|
||||
#define rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
|
||||
#endif
|
||||
|
||||
#ifndef rtmSetErrorStatus
|
||||
#define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
|
||||
#endif
|
||||
|
||||
/* Block signals (default storage) */
|
||||
typedef struct {
|
||||
CAN_MESSAGE_BUS Selector; /* '<S3>/Selector' */
|
||||
CAN_MESSAGE_BUS SFunction; /* '<S3>/S-Function' */
|
||||
real_T CANUnpack_o1; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o2; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o3; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o4; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o5; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o6; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o7; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o8; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o9; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o10; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o11; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o12; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o13; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o14; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o15; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o16; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o17; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o18; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o19; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o20; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o21; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o22; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o23; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o24; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o25; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o26; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o27; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o28; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o29; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o30; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o31; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o32; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o33; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o34; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o35; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o36; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o37; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o38; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o39; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o40; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o41; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o42; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o43; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o44; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o45; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o46; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o47; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o48; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o49; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o50; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o51; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o52; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o53; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o54; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o55; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o56; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o57; /* '<S3>/CAN Unpack' */
|
||||
real_T CANUnpack_o58; /* '<S3>/CAN Unpack' */
|
||||
} B_socTouchDisplay_T;
|
||||
|
||||
/* Block states (default storage) for system '<Root>' */
|
||||
typedef struct {
|
||||
void* SFunction_canFrameBUS; /* '<S3>/S-Function' */
|
||||
uint32_T durationCounter_1; /* '<Root>/Chart1' */
|
||||
uint32_T temporalCounter_i1; /* '<Root>/Chart' */
|
||||
uint32_T durationCounter_1_g; /* '<Root>/Chart' */
|
||||
uint32_T durationCounter_2; /* '<Root>/Chart' */
|
||||
int_T CANUnpack_ModeSignalID; /* '<S3>/CAN Unpack' */
|
||||
int_T CANUnpack_StatusPortID; /* '<S3>/CAN Unpack' */
|
||||
uint8_T is_active_c1_socTouchDisplay;/* '<Root>/Chart1' */
|
||||
uint8_T is_c1_socTouchDisplay; /* '<Root>/Chart1' */
|
||||
uint8_T is_active_c3_socTouchDisplay;/* '<Root>/Chart' */
|
||||
uint8_T is_c3_socTouchDisplay; /* '<Root>/Chart' */
|
||||
} DW_socTouchDisplay_T;
|
||||
|
||||
/* External inputs (root inport signals with default storage) */
|
||||
typedef struct {
|
||||
real_T in_bTouchDetected; /* '<Root>/in_bTouchDetected' */
|
||||
real_T ip_u32TouchDuration_msec; /* '<Root>/ip_u32TouchDuration_msec' */
|
||||
real_T ip_u32DisplayDuration_msec; /* '<Root>/ip_u32DisplayDuration_msec' */
|
||||
CAN_MESSAGE_BUS Input[MAX_CAN_MESSAGE_INSTANCE];/* '<Root>/Input' */
|
||||
} ExtU_socTouchDisplay_T;
|
||||
|
||||
/* External outputs (root outports fed by signals with default storage) */
|
||||
typedef struct {
|
||||
boolean_T op_bDisplayStatus; /* '<Root>/op_bDisplayStatus' */
|
||||
boolean_T op_bErrorStatus; /* '<Root>/op_bErrorStatus' */
|
||||
uint8_T op_u8HundredsPlace; /* '<Root>/op_u8HundredsPlace' */
|
||||
uint8_T op_u8TensPlace; /* '<Root>/op_u8TensPlace' */
|
||||
uint8_T op_u8OnesPlace; /* '<Root>/op_u8OnesPlace' */
|
||||
} ExtY_socTouchDisplay_T;
|
||||
|
||||
/* Real-time Model Data Structure */
|
||||
struct tag_RTM_socTouchDisplay_T {
|
||||
const char_T * volatile errorStatus;
|
||||
};
|
||||
|
||||
/* Block signals (default storage) */
|
||||
extern B_socTouchDisplay_T socTouchDisplay_B;
|
||||
|
||||
/* Block states (default storage) */
|
||||
extern DW_socTouchDisplay_T socTouchDisplay_DW;
|
||||
|
||||
/* External inputs (root inport signals with default storage) */
|
||||
extern ExtU_socTouchDisplay_T socTouchDisplay_U;
|
||||
|
||||
/* External outputs (root outports fed by signals with default storage) */
|
||||
extern ExtY_socTouchDisplay_T socTouchDisplay_Y;
|
||||
|
||||
/* Model entry point functions */
|
||||
extern void socTouchDisplay_initialize(void);
|
||||
extern void socTouchDisplay_step(void);
|
||||
extern void socTouchDisplay_terminate(void);
|
||||
|
||||
/* Real-time Model object */
|
||||
extern RT_MODEL_socTouchDisplay_T *const socTouchDisplay_M;
|
||||
|
||||
/*-
|
||||
* These blocks were eliminated from the model due to optimizations:
|
||||
*
|
||||
* Block '<S4>/Cast' : Eliminate redundant data type conversion
|
||||
* Block '<S4>/Cast1' : Eliminate redundant data type conversion
|
||||
* Block '<S4>/Cast2' : Eliminate redundant data type conversion
|
||||
*/
|
||||
|
||||
/*-
|
||||
* The generated code includes comments that allow you to trace directly
|
||||
* back to the appropriate location in the model. The basic format
|
||||
* is <system>/block_name, where system is the system number (uniquely
|
||||
* assigned by Simulink) and block_name is the name of the block.
|
||||
*
|
||||
* Use the MATLAB hilite_system command to trace the generated code back
|
||||
* to the model. For example,
|
||||
*
|
||||
* hilite_system('<S3>') - opens system 3
|
||||
* hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
|
||||
*
|
||||
* Here is the system hierarchy for this model
|
||||
*
|
||||
* '<Root>' : 'socTouchDisplay'
|
||||
* '<S1>' : 'socTouchDisplay/Chart'
|
||||
* '<S2>' : 'socTouchDisplay/Chart1'
|
||||
* '<S3>' : 'socTouchDisplay/canMsgDecode'
|
||||
* '<S4>' : 'socTouchDisplay/displayData'
|
||||
*/
|
||||
#endif /* RTW_HEADER_socTouchDisplay_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* File: socTouchDisplay_private.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_socTouchDisplay_private_h_
|
||||
#define RTW_HEADER_socTouchDisplay_private_h_
|
||||
#include "rtwtypes.h"
|
||||
#include "socTouchDisplay_types.h"
|
||||
#ifdef __cplusplus
|
||||
#define SFB_EXTERN_C extern "C"
|
||||
#else
|
||||
#define SFB_EXTERN_C extern
|
||||
#endif
|
||||
|
||||
SFB_EXTERN_C void canReceive_Start_wrapper(void);
|
||||
SFB_EXTERN_C void canReceive_Outputs_wrapper(const uint32_T *id,
|
||||
const uint8_T *dlc,
|
||||
const uint8_T *data,
|
||||
CAN_MESSAGE_BUS *canFrame);
|
||||
SFB_EXTERN_C void canReceive_Terminate_wrapper(void);
|
||||
|
||||
#undef SFB_EXTERN_C
|
||||
#endif /* RTW_HEADER_socTouchDisplay_private_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* File: socTouchDisplay_types.h
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#ifndef RTW_HEADER_socTouchDisplay_types_h_
|
||||
#define RTW_HEADER_socTouchDisplay_types_h_
|
||||
#include "rtwtypes.h"
|
||||
|
||||
/* Includes for objects with custom storage classes */
|
||||
#include "ivec_rte_dummy.h"
|
||||
|
||||
/*
|
||||
* Check that imported macros with storage class "ImportedDefine" are defined
|
||||
*/
|
||||
#ifndef MAX_CAN_MESSAGE_INSTANCE
|
||||
#error The value of parameter "MAX_CAN_MESSAGE_INSTANCE" is not defined
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Registered constraints for dimension variants
|
||||
*/
|
||||
/* Constraint 'MAX_CAN_MESSAGE_INSTANCE == 10' registered by:
|
||||
* '<S3>/ip_xCanMsg'
|
||||
*/
|
||||
#if MAX_CAN_MESSAGE_INSTANCE != 10
|
||||
# error "The preprocessor definition 'MAX_CAN_MESSAGE_INSTANCE' must be equal to '10'"
|
||||
#endif
|
||||
|
||||
#ifndef DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_
|
||||
#define DEFINED_TYPEDEF_FOR_CAN_MESSAGE_BUS_
|
||||
|
||||
typedef struct {
|
||||
uint8_T Extended;
|
||||
uint8_T Length;
|
||||
uint8_T Remote;
|
||||
uint8_T Error;
|
||||
uint32_T ID;
|
||||
real_T Timestamp;
|
||||
uint8_T Data[8];
|
||||
} CAN_MESSAGE_BUS;
|
||||
|
||||
#endif
|
||||
|
||||
/* Forward declaration for rtModel */
|
||||
typedef struct tag_RTM_socTouchDisplay_T RT_MODEL_socTouchDisplay_T;
|
||||
|
||||
#endif /* RTW_HEADER_socTouchDisplay_types_h_ */
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
|
||||
/*
|
||||
* Include Files
|
||||
*
|
||||
*/
|
||||
#if defined(MATLAB_MEX_FILE)
|
||||
#include "tmwtypes.h"
|
||||
#include "simstruc_types.h"
|
||||
#else
|
||||
#define SIMPLIFIED_RTWTYPES_COMPATIBILITY
|
||||
#include "rtwtypes.h"
|
||||
#undef SIMPLIFIED_RTWTYPES_COMPATIBILITY
|
||||
#endif
|
||||
|
||||
#include "canReceive_bus.h"
|
||||
|
||||
/* %%%-SFUNWIZ_wrapper_includes_Changes_BEGIN --- EDIT HERE TO _END */
|
||||
#include <math.h>
|
||||
/* %%%-SFUNWIZ_wrapper_includes_Changes_END --- EDIT HERE TO _BEGIN */
|
||||
#define u_width 1
|
||||
#define u_1_width 1
|
||||
#define u_2_width 8
|
||||
#define y_width 1
|
||||
|
||||
/*
|
||||
* Create external references here.
|
||||
*
|
||||
*/
|
||||
/* %%%-SFUNWIZ_wrapper_externs_Changes_BEGIN --- EDIT HERE TO _END */
|
||||
/* extern double func(double a); */
|
||||
/* %%%-SFUNWIZ_wrapper_externs_Changes_END --- EDIT HERE TO _BEGIN */
|
||||
|
||||
/*
|
||||
* Output function
|
||||
*
|
||||
*/
|
||||
void canReceive_Outputs_wrapper(const uint32_T *id,
|
||||
const uint8_T *dlc,
|
||||
const uint8_T *data,
|
||||
CAN_MESSAGE_BUS *canFrame)
|
||||
{
|
||||
/* %%%-SFUNWIZ_wrapper_Outputs_Changes_BEGIN --- EDIT HERE TO _END */
|
||||
/* This sample sets the output equal to the input
|
||||
y0[0] = u0[0];
|
||||
For complex signals use: y0[0].re = u0[0].re;
|
||||
y0[0].im = u0[0].im;
|
||||
y1[0].re = u1[0].re;
|
||||
y1[0].im = u1[0].im;
|
||||
*/
|
||||
canFrame->ID = *(id);
|
||||
canFrame->Length = *(dlc);
|
||||
for(int ijk = 0; ijk < (*dlc); ijk++)
|
||||
canFrame->Data[ijk] = data[ijk];
|
||||
if( canFrame->ID > 0x7FF )
|
||||
canFrame->Extended = 1;
|
||||
else
|
||||
canFrame->Extended = 0;
|
||||
// memcpy(canFrame->Data, data, *(dlc));
|
||||
/* %%%-SFUNWIZ_wrapper_Outputs_Changes_END --- EDIT HERE TO _BEGIN */
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* File: rtGetInf.c
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#include "rtwtypes.h"
|
||||
#include "rtGetInf.h"
|
||||
#include <stddef.h>
|
||||
#include "rt_nonfinite.h"
|
||||
#define NumBitsPerChar 8U
|
||||
|
||||
/*
|
||||
* Initialize rtInf needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real_T rtGetInf(void)
|
||||
{
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
real_T inf = 0.0;
|
||||
if (bitsPerReal == 32U) {
|
||||
inf = rtGetInfF();
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.bitVal.words.wordH = 0x7FF00000U;
|
||||
tmpVal.bitVal.words.wordL = 0x00000000U;
|
||||
inf = tmpVal.fltVal;
|
||||
}
|
||||
|
||||
return inf;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtInfF needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real32_T rtGetInfF(void)
|
||||
{
|
||||
IEEESingle infF;
|
||||
infF.wordL.wordLuint = 0x7F800000U;
|
||||
return infF.wordL.wordLreal;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtMinusInf needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real_T rtGetMinusInf(void)
|
||||
{
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
real_T minf = 0.0;
|
||||
if (bitsPerReal == 32U) {
|
||||
minf = rtGetMinusInfF();
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.bitVal.words.wordH = 0xFFF00000U;
|
||||
tmpVal.bitVal.words.wordL = 0x00000000U;
|
||||
minf = tmpVal.fltVal;
|
||||
}
|
||||
|
||||
return minf;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtMinusInfF needed by the generated code.
|
||||
* Inf is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real32_T rtGetMinusInfF(void)
|
||||
{
|
||||
IEEESingle minfF;
|
||||
minfF.wordL.wordLuint = 0xFF800000U;
|
||||
return minfF.wordL.wordLreal;
|
||||
}
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* File: rtGetNaN.c
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#include "rtwtypes.h"
|
||||
#include "rtGetNaN.h"
|
||||
#include <stddef.h>
|
||||
#include "rt_nonfinite.h"
|
||||
#define NumBitsPerChar 8U
|
||||
|
||||
/*
|
||||
* Initialize rtNaN needed by the generated code.
|
||||
* NaN is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real_T rtGetNaN(void)
|
||||
{
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
real_T nan = 0.0;
|
||||
if (bitsPerReal == 32U) {
|
||||
nan = rtGetNaNF();
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.bitVal.words.wordH = 0xFFF80000U;
|
||||
tmpVal.bitVal.words.wordL = 0x00000000U;
|
||||
nan = tmpVal.fltVal;
|
||||
}
|
||||
|
||||
return nan;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize rtNaNF needed by the generated code.
|
||||
* NaN is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
real32_T rtGetNaNF(void)
|
||||
{
|
||||
IEEESingle nanF = { { 0.0F } };
|
||||
|
||||
nanF.wordL.wordLuint = 0xFFC00000U;
|
||||
return nanF.wordL.wordLreal;
|
||||
}
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* File: rt_nonfinite.c
|
||||
*
|
||||
* Code generated for Simulink model 'socTouchDisplay'.
|
||||
*
|
||||
* Model version : 1.104
|
||||
* Simulink Coder version : 23.2 (R2023b) 01-Aug-2023
|
||||
* C/C++ source code generated on : Mon Oct 28 16:04:13 2024
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: Intel->x86-64 (Windows64)
|
||||
* Code generation objectives: Unspecified
|
||||
* Validation result: Not run
|
||||
*/
|
||||
|
||||
#include "rtGetNaN.h"
|
||||
#include "rtGetInf.h"
|
||||
#include <stddef.h>
|
||||
#include "rtwtypes.h"
|
||||
#include "rt_nonfinite.h"
|
||||
#define NumBitsPerChar 8U
|
||||
|
||||
real_T rtInf;
|
||||
real_T rtMinusInf;
|
||||
real_T rtNaN;
|
||||
real32_T rtInfF;
|
||||
real32_T rtMinusInfF;
|
||||
real32_T rtNaNF;
|
||||
|
||||
/*
|
||||
* Initialize the rtInf, rtMinusInf, and rtNaN needed by the
|
||||
* generated code. NaN is initialized as non-signaling. Assumes IEEE.
|
||||
*/
|
||||
void rt_InitInfAndNaN(size_t realSize)
|
||||
{
|
||||
(void) (realSize);
|
||||
rtNaN = rtGetNaN();
|
||||
rtNaNF = rtGetNaNF();
|
||||
rtInf = rtGetInf();
|
||||
rtInfF = rtGetInfF();
|
||||
rtMinusInf = rtGetMinusInf();
|
||||
rtMinusInfF = rtGetMinusInfF();
|
||||
}
|
||||
|
||||
/* Test if value is infinite */
|
||||
boolean_T rtIsInf(real_T value)
|
||||
{
|
||||
return (boolean_T)((value==rtInf || value==rtMinusInf) ? 1U : 0U);
|
||||
}
|
||||
|
||||
/* Test if single-precision value is infinite */
|
||||
boolean_T rtIsInfF(real32_T value)
|
||||
{
|
||||
return (boolean_T)(((value)==rtInfF || (value)==rtMinusInfF) ? 1U : 0U);
|
||||
}
|
||||
|
||||
/* Test if value is not a number */
|
||||
boolean_T rtIsNaN(real_T value)
|
||||
{
|
||||
boolean_T result = (boolean_T) 0;
|
||||
size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
|
||||
if (bitsPerReal == 32U) {
|
||||
result = rtIsNaNF((real32_T)value);
|
||||
} else {
|
||||
union {
|
||||
LittleEndianIEEEDouble bitVal;
|
||||
real_T fltVal;
|
||||
} tmpVal;
|
||||
|
||||
tmpVal.fltVal = value;
|
||||
result = (boolean_T)((tmpVal.bitVal.words.wordH & 0x7FF00000) == 0x7FF00000 &&
|
||||
( (tmpVal.bitVal.words.wordH & 0x000FFFFF) != 0 ||
|
||||
(tmpVal.bitVal.words.wordL != 0) ));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Test if single-precision value is not a number */
|
||||
boolean_T rtIsNaNF(real32_T value)
|
||||
{
|
||||
IEEESingle tmp;
|
||||
tmp.wordL.wordLreal = value;
|
||||
return (boolean_T)( (tmp.wordL.wordLuint & 0x7F800000) == 0x7F800000 &&
|
||||
(tmp.wordL.wordLuint & 0x007FFFFF) != 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* File trailer for generated code.
|
||||
*
|
||||
* [EOF]
|
||||
*/
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -87,7 +87,7 @@ IVEC_EcuCommonErr_e xECU_UARTInit(McalUartHandle_s* prvUartHandle, uint32_t spee
|
|||
}
|
||||
|
||||
IVEC_ECU_LOG(LOG_STRING, "Initilising UART");
|
||||
prvUartHandle->eUartPortNumber = mcalUART_PORT2;
|
||||
prvUartHandle->eUartPortNumber = mcalUART_PORT3;
|
||||
prvUartHandle->pvUartRecvCallback = __prv_vEcu_CANOverUartMsgCallback;
|
||||
prvUartHandle->xUartConfig.eUartBaudrate = speed;
|
||||
prvUartHandle->xUartConfig.eUartFlowCtrl = mcalUART_FC_NONE;
|
||||
|
|
@ -161,49 +161,6 @@ IVEC_EcuCommonErr_e xECU_UARTTransmit(McalUartHandle_s *prvUartHandle, uint8_t*
|
|||
}
|
||||
|
||||
|
||||
|
||||
//IVEC_EcuCommonErr_e xECU_UARTGetData(McalUartHandle_s *prvUartHandle, uint8_t* pucBuffer, uint16_t len, uint16_t timeout)
|
||||
//{
|
||||
// IVEC_ECU_FUNC_ENTRY(LOG_STRING);
|
||||
//
|
||||
// uint8_t l_i32Ret;
|
||||
// IVEC_EcuCommonErr_e l_xFuncStatus = commonECU_SUCCESS;
|
||||
// if (prvUartHandle == NULL)
|
||||
// {
|
||||
// l_xFuncStatus = commonECU_INVALID_PARAM;
|
||||
// goto exit;
|
||||
// }
|
||||
//
|
||||
// int length = 2;
|
||||
// uint8_t ijk = 0;
|
||||
//
|
||||
// uint32_t startCount; // Variable to store the initial timer count
|
||||
//
|
||||
//
|
||||
// xMCAL_TimersetLoadValue(TIMG0, timeout + 1, &startCount); // Set the timeout value
|
||||
// xMCAL_TimerstartCounter(); // Start the timer
|
||||
//
|
||||
// while(!xMCAL_TimergetCount(&startCount) && (ijk < len))
|
||||
// {
|
||||
// if(!u8CMPLX_FifoQueueEmpty(&__gprv_MyEcuUARTResponseQueue)){
|
||||
// if( u8CMPLX_FifoDequeue(&__gprv_MyEcuUARTResponseQueue, &pucBuffer[ijk], &length, 0) == 1 )
|
||||
// ijk++;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// xMCAL_TimerstopCounter(); // Stop the timer
|
||||
//
|
||||
// if (ijk != len)
|
||||
// {
|
||||
// l_xFuncStatus = commonECU_READ_FAIL;
|
||||
// goto exit;
|
||||
// }
|
||||
//
|
||||
// exit:
|
||||
// IVEC_ECU_FUNC_EXIT(LOG_STRING, 0);
|
||||
// return l_xFuncStatus;
|
||||
//}
|
||||
|
||||
IVEC_EcuCommonErr_e xECU_UARTGetData(McalUartHandle_s *prvUartHandle, uint8_t* pucBuffer, uint16_t len, uint16_t timeout)
|
||||
{
|
||||
IVEC_ECU_FUNC_ENTRY(LOG_STRING);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* ivec_rte.h
|
||||
*
|
||||
* Created on: 28-Oct-2024
|
||||
* Author: altam
|
||||
*/
|
||||
|
||||
#ifndef IVEC_RTE_INC_IVEC_RTE_H_
|
||||
#define IVEC_RTE_INC_IVEC_RTE_H_
|
||||
|
||||
#include "string.h"
|
||||
#include "stdint.h"
|
||||
#include "ti_msp_dl_config.h"
|
||||
|
||||
|
||||
void vRTE_MatlabInit(void);
|
||||
void vRTE_MatlabRun(void);
|
||||
void vRTE_InitUARTCANEcho(void);
|
||||
void vRTE_UARTDataProcess(void);
|
||||
void vRTE_CANDataProcess(void);
|
||||
|
||||
#endif /* IVEC_RTE_INC_IVEC_RTE_H_ */
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
#ifndef __H_IVEC_RTE_DUMMY_H__
|
||||
#define __H_IVEC_RTE_DUMMY_H__
|
||||
|
||||
#include "stdint.h"
|
||||
#include "string.h"
|
||||
#include "stdbool.h"
|
||||
|
||||
#define MAX_WAIT_FOR_RESCAN 3000
|
||||
#define MAX_SCAN_INSTANCE 2
|
||||
#define MAX_CAN_MESSAGE_INSTANCE 10
|
||||
#define MAX_BLE_DATA_LEN 128
|
||||
#define MAX_BLE_CONN_DEV_NB 2
|
||||
#define MAX_BLE_CONNECT_DISTANCE 2
|
||||
#define MAX_BLE_SCAN_TIME_SEC 20
|
||||
#define IVEC_CAN_ID_TX 0x501
|
||||
#define IVEC_CAN_ID_RX 0x500
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
double rssi;
|
||||
double txPower;
|
||||
double pathLoss;
|
||||
uint8_t address[16];
|
||||
bool connected;
|
||||
} IVEC_BLE_SCAN_DATA_s;
|
||||
|
||||
IVEC_BLE_SCAN_DATA_s *ip_xBleData;/* '<Root>/ip_xBleData' */
|
||||
uint8_t *ip_pu8BleData; /* '<Root>/ip_pu8BleData' */
|
||||
|
||||
void vRTE_Print(char *pcData, ...);
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,188 @@
|
|||
/*
|
||||
* ivec_rte.c
|
||||
*
|
||||
* Created on: 28-Oct-2024
|
||||
* Author: altam
|
||||
*/
|
||||
#include "ivec_rte.h"
|
||||
|
||||
#include "ivec_cmplx_queue.h"
|
||||
#include "../ivec_ECU/ivec_ecu_uart/inc/ivec_ecu_uart.h"
|
||||
#include "../ivec_ECU/ivec_ecu_can/inc/ivec_ecu_can.h"
|
||||
#include "../../Core/Include/ivec_mcal_gpio.h"
|
||||
#include "socTouchDisplay.h"
|
||||
#include "../../TM1650_SDK/inc/ivec_TM1650.h"
|
||||
|
||||
|
||||
McalUartHandle_s g_xUartHandle;
|
||||
uint32_t g_u32UartSpeed = 0;
|
||||
uint16_t g_u16CanSpeed = 0;
|
||||
|
||||
static uint8_t __gprv_u8Idx = 0;
|
||||
|
||||
extern ExtU_socTouchDisplay_T socTouchDisplay_U;
|
||||
extern ExtY_socTouchDisplay_T socTouchDisplay_Y;
|
||||
|
||||
/**
|
||||
* @brief Function to use SDA pin of TM1650
|
||||
*
|
||||
* @param state the value to write on SDA pin (0 or 1)
|
||||
* @returns none
|
||||
*/
|
||||
void mcu_tempDataPin(uint8_t state)
|
||||
{
|
||||
if(state == 0){
|
||||
vMCAL_gpioWrite(TM1650_PORT, TM1650_SDA_PIN_PIN, 0);
|
||||
}
|
||||
else if(state == 1){
|
||||
vMCAL_gpioWrite(TM1650_PORT, TM1650_SDA_PIN_PIN, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Function to use SCL pin of TM1650
|
||||
*
|
||||
* @param state the value to write on SDA pin (0 or 1)
|
||||
* @returns none
|
||||
*/
|
||||
void mcu_tempClkPin(uint8_t state){
|
||||
if(state == 0){
|
||||
vMCAL_gpioWrite(TM1650_PORT, TM1650_SCL_PIN_PIN, 0);
|
||||
}
|
||||
else if(state == 1){
|
||||
vMCAL_gpioWrite(TM1650_PORT, TM1650_SCL_PIN_PIN, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Function to read SDA pin of TM1650
|
||||
*
|
||||
* @param none
|
||||
* @returns Value of GPIO (0 or 1)
|
||||
*/
|
||||
uint8_t mcu_tempDataReadPin(void){
|
||||
uint8_t readBuff = 0;
|
||||
vMCAL_set_gpioDirection(TM1650_SDA_PIN_IOMUX,false);
|
||||
readBuff = u32MCAL_gpioRead(TM1650_PORT, TM1650_SDA_PIN_PIN);
|
||||
vMCAL_set_gpioDirection(TM1650_SDA_PIN_IOMUX,true);
|
||||
return readBuff;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* #define TOUCH_BUTTON_PORT (GPIOB)
|
||||
#define TOUCH_BUTTON_PIN_17_PIN (DL_GPIO_PIN_17)
|
||||
#define TOUCH_BUTTON_PIN_17_IOMUX (IOMUX_PINCM43)
|
||||
*/
|
||||
void vRTE_MatlabInit(void)
|
||||
{
|
||||
u8MCAL_gpioInit();
|
||||
tm1650_Init(TM_1650_BRIGHT_8, TM_1650_Segment_8, TM_1650_Normal_Mode, TM_1650_Screen_ON, TM_1650_DIG_3, (void*)&mcu_tempDataPin , (void*)&mcu_tempClkPin , &mcu_tempDataReadPin);
|
||||
tm1650_displaySwitch(TM_1650_Screen_OFF);
|
||||
vMCAL_DelayTicks(500);
|
||||
tm1650_showDot(TM_1650_DIG_1,false);
|
||||
tm1650_showDot(TM_1650_DIG_2,false);
|
||||
tm1650_showDot(TM_1650_DIG_3,false);
|
||||
socTouchDisplay_initialize();
|
||||
}
|
||||
|
||||
void vRTE_MatlabRun(void)
|
||||
{
|
||||
socTouchDisplay_U.in_bTouchDetected = (u32MCAL_gpioRead(GPIOB, DL_GPIO_PIN_17) == DL_GPIO_PIN_17) ? 1 : 0;
|
||||
socTouchDisplay_U.ip_u32DisplayDuration_msec = 2000;
|
||||
socTouchDisplay_U.ip_u32TouchDuration_msec = 100;
|
||||
|
||||
socTouchDisplay_step();
|
||||
|
||||
memset(&socTouchDisplay_U.Input[0], 0, sizeof(CAN_MESSAGE_BUS)*MAX_CAN_MESSAGE_INSTANCE);
|
||||
__gprv_u8Idx = 0;
|
||||
|
||||
if( socTouchDisplay_Y.op_bDisplayStatus )
|
||||
{
|
||||
tm1650_displaySwitch(TM_1650_Screen_ON);
|
||||
tm1650_showDot(TM_1650_DIG_1,false);
|
||||
tm1650_showDot(TM_1650_DIG_2,false);
|
||||
// tm1650_showDot(TM_1650_DIG_3,false);
|
||||
|
||||
tm1650_showNum(TM_1650_DIG_3, socTouchDisplay_Y.op_u8OnesPlace);
|
||||
tm1650_showNum(TM_1650_DIG_2, socTouchDisplay_Y.op_u8TensPlace);
|
||||
// tm1650_showNum(TM_1650_DIG_1, socTouchDisplay_Y.op_u8HundredsPlace);
|
||||
}
|
||||
if( socTouchDisplay_Y.op_bErrorStatus )
|
||||
{
|
||||
tm1650_displaySwitch(TM_1650_Screen_ON);
|
||||
tm1650_showDot(TM_1650_DIG_1,false);
|
||||
tm1650_showDot(TM_1650_DIG_2,false);
|
||||
// tm1650_showDot(TM_1650_DIG_3,false);
|
||||
|
||||
char l_cData = 'R';
|
||||
l_cData = 'C';
|
||||
tm1650_showAlphabet(TM_1650_DIG_2, (char*)&l_cData);
|
||||
l_cData = 'E';
|
||||
tm1650_showAlphabet(TM_1650_DIG_3, (char*)&l_cData);
|
||||
}
|
||||
if( !socTouchDisplay_Y.op_bDisplayStatus && !socTouchDisplay_Y.op_bErrorStatus )
|
||||
{
|
||||
tm1650_displaySwitch(TM_1650_Screen_OFF);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void vRTE_InitUARTCANEcho(void)
|
||||
{
|
||||
g_u32UartSpeed = mcalUART_BAUD_115200;
|
||||
g_u16CanSpeed = BAUD_500;
|
||||
xECU_UARTInit(&g_xUartHandle, g_u32UartSpeed);
|
||||
xECU_CANInit(CANFD0,g_u16CanSpeed);
|
||||
}
|
||||
|
||||
void vRTE_UARTDataProcess(void)
|
||||
{
|
||||
PacketRetCode_t retCode = PACKET_FAIL;
|
||||
uint8_t pucBuf[MAX_PACKET_LENGTH] = {0};
|
||||
uint32_t ulId = 0xffffffff;
|
||||
|
||||
retCode= xECU_ReadCANDataOverUART(&g_xUartHandle,pucBuf,&ulId);
|
||||
if(retCode > -1)
|
||||
{
|
||||
if(ulId == 0x00)
|
||||
{
|
||||
//vECU_InitiateUartToCanTransmit(&g_xUartHandle, ulId, pucBuf, 0);
|
||||
|
||||
uint32_t baudrate = 0;
|
||||
uint8_t mode = pucBuf[PKT_HEADER];
|
||||
memcpy(&baudrate, &pucBuf[PKT_HEADER+1], (uint32_t)retCode);
|
||||
vECU_InitiateUartToCanTransmit(&g_xUartHandle, ulId, pucBuf, 0);
|
||||
if( mode == 0 )
|
||||
{
|
||||
g_u32UartSpeed = baudrate;
|
||||
xECU_UARTReInit(&g_xUartHandle, g_u32UartSpeed);
|
||||
}
|
||||
else if( mode == 1 )
|
||||
{
|
||||
g_u16CanSpeed = (uint16_t)baudrate;
|
||||
xECU_CanReInit(CANFD0, g_u16CanSpeed);
|
||||
}
|
||||
}
|
||||
else{
|
||||
xECU_WriteDataOverCAN(pucBuf, ulId, retCode, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
void vRTE_CANDataProcess(void)
|
||||
{
|
||||
IVEC_EcuCommonErr_e retCode = commonECU_FAIL;
|
||||
can_buff_t xBuff = { 0x00 };
|
||||
|
||||
|
||||
retCode = xECU_CANGetData(&xBuff);
|
||||
if(retCode == commonECU_SUCCESS)
|
||||
{
|
||||
vECU_InitiateUartToCanTransmit(&g_xUartHandle, (uint32_t)xBuff.id, (uint8_t*)&xBuff.data[0], (uint8_t)xBuff.length);
|
||||
socTouchDisplay_U.Input[__gprv_u8Idx].ID = xBuff.id;
|
||||
socTouchDisplay_U.Input[__gprv_u8Idx].Length = xBuff.length;
|
||||
memcpy(&socTouchDisplay_U.Input[__gprv_u8Idx].Data[0], &xBuff.data[0], 8);
|
||||
__gprv_u8Idx = (__gprv_u8Idx + 1) % MAX_CAN_MESSAGE_INSTANCE;
|
||||
}
|
||||
}
|
||||
85
main.c
85
main.c
|
|
@ -14,93 +14,42 @@
|
|||
#include "../Core/Include/ivec_mcal_spi.h"
|
||||
#include "../Core/Include/ivec_mcal_i2c.h"
|
||||
#include "../Core/Include/ivec_mcal_uart.h"
|
||||
#include "NOR_FLASH/nor_flash.h"
|
||||
#include "ti_msp_dl_config.h"
|
||||
#include "string.h"
|
||||
#include "ivec_cmplx_queue.h"
|
||||
|
||||
|
||||
#include "../ivec_ECU/ivec_ecu_uart/inc/ivec_ecu_uart.h"
|
||||
#include "../ivec_ECU/ivec_ecu_can/inc/ivec_ecu_can.h"
|
||||
#include "ivec_rte.h"
|
||||
|
||||
|
||||
|
||||
#define BUFFER_SIZE 100U
|
||||
|
||||
unsigned char pucData;
|
||||
xCoreStatus_t xStatus1;
|
||||
DL_MCAN_RxBufElement RxMsg;
|
||||
flashStatus_t ret_UID,ret_MID;
|
||||
|
||||
uint8_t RxData;
|
||||
McalUartHandle_s prvUartHandle;
|
||||
static volatile int count = 0;
|
||||
uint32_t g_uartSpeed = 0;
|
||||
uint16_t g_canSpeed = 0;
|
||||
|
||||
void UARTDataProcess()
|
||||
void vMCAL_TimerCallback(void)
|
||||
{
|
||||
PacketRetCode_t retCode = PACKET_FAIL;
|
||||
uint8_t pucBuf[MAX_PACKET_LENGTH] = {0};
|
||||
uint32_t ulId = 0xffffffff;
|
||||
|
||||
retCode= xECU_ReadCANDataOverUART(&prvUartHandle,pucBuf,&ulId);
|
||||
if(retCode > -1)
|
||||
{
|
||||
if(ulId == 0x00)
|
||||
{
|
||||
//vECU_InitiateUartToCanTransmit(&prvUartHandle, ulId, pucBuf, 0);
|
||||
|
||||
uint32_t baudrate = 0;
|
||||
uint8_t mode = pucBuf[PKT_HEADER];
|
||||
memcpy(&baudrate, &pucBuf[PKT_HEADER+1], (uint32_t)retCode);
|
||||
vECU_InitiateUartToCanTransmit(&prvUartHandle, ulId, pucBuf, 0);
|
||||
if( mode == 0 )
|
||||
{
|
||||
g_uartSpeed = baudrate;
|
||||
xECU_UARTReInit(&prvUartHandle, g_uartSpeed);
|
||||
}
|
||||
else if( mode == 1 )
|
||||
{
|
||||
g_canSpeed = (uint16_t)baudrate;
|
||||
xECU_CanReInit(CANFD0, g_canSpeed);
|
||||
}
|
||||
}
|
||||
else{
|
||||
xECU_WriteDataOverCAN(pucBuf, ulId, retCode, 0);
|
||||
}
|
||||
vRTE_MatlabRun();
|
||||
DL_TimerA_clearInterruptStatus(TIMER_1_INST, GPTIMER_CPU_INT_IMASK_Z_SET);
|
||||
}
|
||||
|
||||
}
|
||||
void CANDataProcess()
|
||||
static void __prv_TimerConfig(void)
|
||||
{
|
||||
IVEC_EcuCommonErr_e retCode = commonECU_FAIL;
|
||||
can_buff_t xBuff = { 0x00 };
|
||||
|
||||
|
||||
retCode = xECU_CANGetData(&xBuff);
|
||||
if(retCode == commonECU_SUCCESS)
|
||||
{
|
||||
vECU_InitiateUartToCanTransmit(&prvUartHandle, (uint32_t)xBuff.id, (uint8_t*)&xBuff.data[0], (uint8_t)xBuff.length);
|
||||
}
|
||||
SYSCFG_DL_TIMER_1_init();
|
||||
DL_TimerA_startCounter(TIMER_1_INST);
|
||||
DL_TimerA_enableInterrupt(TIMER_1_INST , GPTIMER_CPU_INT_IMASK_Z_SET);
|
||||
NVIC_ClearPendingIRQ(TIMA0_INT_IRQn);
|
||||
NVIC_EnableIRQ(TIMA0_INT_IRQn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
xMCAL_McuInit();
|
||||
xMCAL_SYSCTL_INIT(HFXT,STANDBY0);
|
||||
xMCAL_SYSCTL_INIT(HFXT,SLEEP0);
|
||||
xMCAL_SYSTICK_INIT(Period_1ms);
|
||||
__prv_TimerConfig();
|
||||
|
||||
g_uartSpeed = mcalUART_BAUD_115200;
|
||||
g_canSpeed = BAUD_500;
|
||||
xECU_UARTInit(&prvUartHandle, g_uartSpeed);
|
||||
xECU_CANInit(CANFD0,g_canSpeed);
|
||||
|
||||
vRTE_MatlabInit();
|
||||
vRTE_InitUARTCANEcho();
|
||||
while(1)
|
||||
{
|
||||
UARTDataProcess();
|
||||
CANDataProcess();
|
||||
vRTE_UARTDataProcess();
|
||||
vRTE_CANDataProcess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
Neither the name of Texas Instruments Incorporated nor the names of
|
||||
its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*****************************************************************************/
|
||||
-uinterruptVectors
|
||||
--stack_size=512
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (RX) : origin = 0x00000000, length = 0x00020000
|
||||
SRAM (RWX) : origin = 0x20200000, length = 0x00008000
|
||||
BCR_CONFIG (R) : origin = 0x41C00000, length = 0x00000080
|
||||
BSL_CONFIG (R) : origin = 0x41C00100, length = 0x00000080
|
||||
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.intvecs: > 0x00000000
|
||||
.text : palign(8) {} > FLASH
|
||||
.const : palign(8) {} > FLASH
|
||||
.cinit : palign(8) {} > FLASH
|
||||
.pinit : palign(8) {} > FLASH
|
||||
.rodata : palign(8) {} > FLASH
|
||||
.ARM.exidx : palign(8) {} > FLASH
|
||||
.init_array : palign(8) {} > FLASH
|
||||
.binit : palign(8) {} > FLASH
|
||||
.TI.ramfunc : load = FLASH, palign(8), run=SRAM, table(BINIT)
|
||||
|
||||
.vtable : > SRAM
|
||||
.args : > SRAM
|
||||
.data : > SRAM
|
||||
.bss : > SRAM
|
||||
.sysmem : > SRAM
|
||||
.stack : > SRAM (HIGH)
|
||||
|
||||
.BCRConfig : {} > BCR_CONFIG
|
||||
.BSLConfig : {} > BSL_CONFIG
|
||||
}
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
/**
|
||||
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||
* @cliArgs --device "MSPM0G350X" --package "VQFN-48(RGZ)" --part "Default" --product "mspm0_sdk@2.01.00.03"
|
||||
* @versions {"tool":"1.19.0+3426"}
|
||||
* @cliArgs --device "MSPM0G350X" --part "Default" --package "VQFN-48(RGZ)" --product "mspm0_sdk@2.02.00.05"
|
||||
* @v2CliArgs --device "MSPM0G3507" --package "VQFN-48(RGZ)" --product "mspm0_sdk@2.02.00.05"
|
||||
* @versions {"tool":"1.21.0+3721"}
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -12,18 +13,12 @@ const CAPTURE = scripting.addModule("/ti/driverlib/CAPTURE", {}, false);
|
|||
const CAPTURE1 = CAPTURE.addInstance();
|
||||
const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
|
||||
const GPIO1 = GPIO.addInstance();
|
||||
const GPIO2 = GPIO.addInstance();
|
||||
const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
|
||||
const I2C1 = I2C.addInstance();
|
||||
const MCAN = scripting.addModule("/ti/driverlib/MCAN", {}, false);
|
||||
const MCAN1 = MCAN.addInstance();
|
||||
const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
|
||||
const PWM1 = PWM.addInstance();
|
||||
const SPI = scripting.addModule("/ti/driverlib/SPI", {}, false);
|
||||
const SPI1 = SPI.addInstance();
|
||||
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
|
||||
const TIMER = scripting.addModule("/ti/driverlib/TIMER", {}, false);
|
||||
const TIMER1 = TIMER.addInstance();
|
||||
const TIMER2 = TIMER.addInstance();
|
||||
const UART = scripting.addModule("/ti/driverlib/UART", {}, false);
|
||||
const UART1 = UART.addInstance();
|
||||
const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
|
||||
|
|
@ -50,12 +45,6 @@ pinFunction4.HFCLKMonitor = true;
|
|||
pinFunction4.enable = true;
|
||||
|
||||
CAPTURE1.$name = "CAPTURE_0";
|
||||
CAPTURE1.timerClkPrescale = 32;
|
||||
CAPTURE1.timerPeriod = "64.0 ms";
|
||||
CAPTURE1.captMode = "COMBINED";
|
||||
CAPTURE1.interrupts = ["CC1_DN","ZERO"];
|
||||
CAPTURE1.peripheral.$assign = "TIMA0";
|
||||
CAPTURE1.peripheral.ccp0Pin.$assign = "PB8";
|
||||
CAPTURE1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
||||
|
||||
const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
|
||||
|
|
@ -63,34 +52,12 @@ Board.peripheral.$assign = "DEBUGSS";
|
|||
Board.peripheral.swclkPin.$assign = "PA20";
|
||||
Board.peripheral.swdioPin.$assign = "PA19";
|
||||
|
||||
GPIO1.$name = "GPIO_SPI_CS";
|
||||
GPIO1.$name = "GPIO_GRP_0";
|
||||
GPIO1.port = "PORTB";
|
||||
GPIO1.associatedPins[0].$name = "SPI_CS";
|
||||
GPIO1.associatedPins[0].initialValue = "SET";
|
||||
GPIO1.associatedPins[0].ioStructure = "SD";
|
||||
GPIO1.associatedPins[0].assignedPin = "20";
|
||||
GPIO1.associatedPins[0].assignedPortSegment = "Upper";
|
||||
GPIO1.associatedPins[0].pin.$assign = "PB20";
|
||||
|
||||
GPIO2.$name = "GPIO_CAN_EN";
|
||||
GPIO2.port = "PORTB";
|
||||
GPIO2.associatedPins[0].$name = "CAN_EN";
|
||||
GPIO2.associatedPins[0].ioStructure = "SD";
|
||||
GPIO2.associatedPins[0].assignedPortSegment = "Lower";
|
||||
GPIO2.associatedPins[0].assignedPin = "2";
|
||||
GPIO2.associatedPins[0].initialValue = "SET";
|
||||
GPIO2.associatedPins[0].pin.$assign = "PB2";
|
||||
|
||||
I2C1.$name = "I2C_0";
|
||||
I2C1.basicEnableController = true;
|
||||
I2C1.advAnalogGlitchFilter = "DISABLED";
|
||||
I2C1.advControllerTXFIFOTRIG = "BYTES_1";
|
||||
I2C1.intController = ["ARBITRATION_LOST","NACK","RXFIFO_TRIGGER","RX_DONE","TX_DONE"];
|
||||
I2C1.peripheral.$assign = "I2C0";
|
||||
I2C1.peripheral.sdaPin.$assign = "PA10";
|
||||
I2C1.peripheral.sclPin.$assign = "PA11";
|
||||
I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric7";
|
||||
I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric8";
|
||||
GPIO1.portSegment = "Upper";
|
||||
GPIO1.associatedPins[0].$name = "PIN_0";
|
||||
GPIO1.associatedPins[0].direction = "INPUT";
|
||||
GPIO1.associatedPins[0].pin.$assign = "PB17";
|
||||
|
||||
MCAN1.$name = "MCAN0";
|
||||
MCAN1.fdMode = false;
|
||||
|
|
@ -99,31 +66,6 @@ MCAN1.peripheral.txPin.$assign = "PA26";
|
|||
MCAN1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
|
||||
MCAN1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
|
||||
|
||||
PWM1.$name = "PWM_0";
|
||||
PWM1.clockPrescale = 23;
|
||||
PWM1.ccIndex = [0];
|
||||
PWM1.peripheral.$assign = "TIMG7";
|
||||
PWM1.peripheral.ccp0Pin.$assign = "PA28";
|
||||
PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
|
||||
PWM1.PWM_CHANNEL_0.dutyCycle = 50;
|
||||
PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
|
||||
|
||||
SPI1.$name = "SPI_0";
|
||||
SPI1.frameFormat = "MOTO3";
|
||||
SPI1.targetBitRate = 1000000;
|
||||
SPI1.enabledInterrupts = ["PARITY_ERROR","RX","RX_FULL","RX_OVERFLOW","RX_TIMEOUT","TX_UNDERFLOW"];
|
||||
SPI1.rxFifoThreshold = "DL_SPI_RX_FIFO_LEVEL_ONE_FRAME";
|
||||
SPI1.txFifoThreshold = "DL_SPI_TX_FIFO_LEVEL_EMPTY";
|
||||
SPI1.polarity = "1";
|
||||
SPI1.phase = "1";
|
||||
SPI1.peripheral.$assign = "SPI0";
|
||||
SPI1.peripheral.sclkPin.$assign = "PB18";
|
||||
SPI1.peripheral.mosiPin.$assign = "PB17";
|
||||
SPI1.peripheral.misoPin.$assign = "PB19";
|
||||
SPI1.sclkPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric9";
|
||||
SPI1.mosiPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric10";
|
||||
SPI1.misoPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric11";
|
||||
|
||||
SYSCTL.forceDefaultClkConfig = true;
|
||||
SYSCTL.clockTreeEn = true;
|
||||
SYSCTL.HFCLK_Freq = 24000000;
|
||||
|
|
@ -137,28 +79,24 @@ TIMER1.$name = "TIMER_0";
|
|||
TIMER1.timerClkSrc = "LFCLK";
|
||||
TIMER1.timerClkPrescale = 33;
|
||||
TIMER1.timerMode = "PERIODIC";
|
||||
TIMER1.timerPeriod = "500 ms";
|
||||
TIMER1.interrupts = ["ZERO"];
|
||||
TIMER1.timerPeriod = "500 ms";
|
||||
TIMER1.peripheral.$assign = "TIMG0";
|
||||
|
||||
UART1.$name = "UART_1";
|
||||
UART1.enabledInterrupts = ["BREAK_ERROR","FRAMING_ERROR","NOISE_ERROR","OVERRUN_ERROR","PARITY_ERROR","RX","RX_TIMEOUT_ERROR"];
|
||||
UART1.enableFIFO = true;
|
||||
UART1.rxFifoThreshold = "DL_UART_RX_FIFO_LEVEL_ONE_ENTRY";
|
||||
TIMER2.$name = "TIMER_1";
|
||||
TIMER2.timerMode = "PERIODIC";
|
||||
TIMER2.interrupts = ["ZERO"];
|
||||
TIMER2.timerPeriod = "100 ms";
|
||||
TIMER2.interruptPriority = "1";
|
||||
TIMER2.timerClkSrc = "LFCLK";
|
||||
TIMER2.timerClkDiv = 3;
|
||||
|
||||
UART1.$name = "UART_0";
|
||||
UART1.targetBaudRate = 115200;
|
||||
UART1.interruptPriority = "0";
|
||||
UART1.peripheral.$assign = "UART1";
|
||||
UART1.peripheral.rxPin.$assign = "PA9";
|
||||
UART1.peripheral.txPin.$assign = "PA8";
|
||||
UART1.txPinConfig.direction = scripting.forceWrite("OUTPUT");
|
||||
UART1.txPinConfig.hideOutputInversion = scripting.forceWrite(false);
|
||||
UART1.txPinConfig.onlyInternalResistor = scripting.forceWrite(false);
|
||||
UART1.txPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
||||
UART1.peripheral.rxPin.$assign = "PB16";
|
||||
UART1.peripheral.txPin.$assign = "PB15";
|
||||
UART1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2";
|
||||
UART1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric12";
|
||||
UART1.rxPinConfig.hideOutputInversion = scripting.forceWrite(false);
|
||||
UART1.rxPinConfig.onlyInternalResistor = scripting.forceWrite(false);
|
||||
UART1.rxPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
||||
UART1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
|
||||
|
||||
ProjectConfig.deviceSpin = "MSPM0G3507";
|
||||
|
||||
|
|
@ -170,4 +108,8 @@ ProjectConfig.deviceSpin = "MSPM0G3507";
|
|||
pinFunction4.peripheral.$suggestSolution = "SYSCTL";
|
||||
pinFunction4.peripheral.hfxInPin.$suggestSolution = "PA5";
|
||||
pinFunction4.peripheral.hfxOutPin.$suggestSolution = "PA6";
|
||||
CAPTURE1.peripheral.$suggestSolution = "TIMA1";
|
||||
CAPTURE1.peripheral.ccp0Pin.$suggestSolution = "PA10";
|
||||
MCAN1.peripheral.$suggestSolution = "CANFD0";
|
||||
TIMER2.peripheral.$suggestSolution = "TIMA0";
|
||||
UART1.peripheral.$suggestSolution = "UART2";
|
||||
|
|
|
|||
|
|
@ -231,77 +231,13 @@ void vMCAL_DelayTicks(int i32Delay_ms)
|
|||
return;
|
||||
}
|
||||
|
||||
//void delay (uint32_t us)
|
||||
//{
|
||||
// delay_cycles((40*us));
|
||||
//}
|
||||
|
||||
|
||||
|
||||
void xMCAL_McuInit()
|
||||
{
|
||||
// DL_initPower();
|
||||
// DL_init();
|
||||
// DL_SYSCTL_init();
|
||||
// xMCAL_VrefInit();
|
||||
SYSCFG_DL_initPower();
|
||||
// DL_UART_Main_reset(UART2);
|
||||
// DL_UART_Main_enablePower(UART2);
|
||||
SYSCFG_DL_GPIO_init();
|
||||
}
|
||||
|
||||
//void vMCAL_GPIO_init(void)
|
||||
//{
|
||||
//
|
||||
// DL_GPIO_initPeripheralOutputFunction(GPIO_PWM_0_C0_IOMUX,GPIO_PWM_0_C0_IOMUX_FUNC);
|
||||
// DL_GPIO_enableOutput(GPIO_PWM_0_C0_PORT, GPIO_PWM_0_C0_PIN);
|
||||
//
|
||||
// DL_GPIO_initPeripheralInputFunction(GPIO_CAPTURE_0_C0_IOMUX,GPIO_CAPTURE_0_C0_IOMUX_FUNC);
|
||||
//
|
||||
// DL_GPIO_initPeripheralInputFunctionFeatures(GPIO_I2C_0_IOMUX_SDA,
|
||||
// GPIO_I2C_0_IOMUX_SDA_FUNC, DL_GPIO_INVERSION_DISABLE,
|
||||
// DL_GPIO_RESISTOR_NONE, DL_GPIO_HYSTERESIS_DISABLE,
|
||||
// DL_GPIO_WAKEUP_DISABLE);
|
||||
// DL_GPIO_initPeripheralInputFunctionFeatures(GPIO_I2C_0_IOMUX_SCL,
|
||||
// GPIO_I2C_0_IOMUX_SCL_FUNC, DL_GPIO_INVERSION_DISABLE,
|
||||
// DL_GPIO_RESISTOR_NONE, DL_GPIO_HYSTERESIS_DISABLE,
|
||||
// DL_GPIO_WAKEUP_DISABLE);
|
||||
// DL_GPIO_enableHiZ(GPIO_I2C_0_IOMUX_SDA);
|
||||
// DL_GPIO_enableHiZ(GPIO_I2C_0_IOMUX_SCL);
|
||||
//
|
||||
// DL_GPIO_initPeripheralOutputFunction(
|
||||
// GPIO_UART_0_IOMUX_TX, GPIO_UART_0_IOMUX_TX_FUNC);
|
||||
// DL_GPIO_initPeripheralInputFunction(
|
||||
// GPIO_UART_0_IOMUX_RX, GPIO_UART_0_IOMUX_RX_FUNC);
|
||||
// DL_GPIO_initPeripheralOutputFunction(
|
||||
// GPIO_UART_1_IOMUX_TX, GPIO_UART_1_IOMUX_TX_FUNC);
|
||||
// DL_GPIO_initPeripheralInputFunction(
|
||||
// GPIO_UART_1_IOMUX_RX, GPIO_UART_1_IOMUX_RX_FUNC);
|
||||
//
|
||||
// DL_GPIO_initPeripheralOutputFunction(
|
||||
// GPIO_SPI_0_IOMUX_SCLK, GPIO_SPI_0_IOMUX_SCLK_FUNC);
|
||||
// DL_GPIO_initPeripheralOutputFunction(
|
||||
// GPIO_SPI_0_IOMUX_PICO, GPIO_SPI_0_IOMUX_PICO_FUNC);
|
||||
// DL_GPIO_initPeripheralInputFunction(
|
||||
// GPIO_SPI_0_IOMUX_POCI, GPIO_SPI_0_IOMUX_POCI_FUNC);
|
||||
//
|
||||
// DL_GPIO_initDigitalOutput(GPIO_LCD_A_PIN_DB4_IOMUX);
|
||||
//
|
||||
// DL_GPIO_initDigitalOutput(GPIO_SPI_CS_SPI_CS_IOMUX);
|
||||
//
|
||||
// DL_GPIO_clearPins(GPIO_LCD_A_PORT, GPIO_LCD_A_PIN_DB4_PIN);
|
||||
// DL_GPIO_enableOutput(GPIO_LCD_A_PORT, GPIO_LCD_A_PIN_DB4_PIN);
|
||||
// DL_GPIO_setPins(GPIO_SPI_CS_PORT, GPIO_SPI_CS_SPI_CS_PIN);
|
||||
// DL_GPIO_enableOutput(GPIO_SPI_CS_PORT, GPIO_SPI_CS_SPI_CS_PIN);
|
||||
//
|
||||
// DL_GPIO_initPeripheralOutputFunction(
|
||||
// GPIO_MCAN0_IOMUX_CAN_TX, GPIO_MCAN0_IOMUX_CAN_TX_FUNC);
|
||||
// DL_GPIO_initPeripheralInputFunction(
|
||||
// GPIO_MCAN0_IOMUX_CAN_RX, GPIO_MCAN0_IOMUX_CAN_RX_FUNC);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
void delay(uint32_t us)
|
||||
{
|
||||
delay_cycles((32*us));
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ typedef enum
|
|||
typedef enum
|
||||
{
|
||||
/*SysTick Period Options*/
|
||||
Period_1ms = 40000, /*!< sets period of SysTick to 1ms */
|
||||
Period_1ms = 24000, /*!< sets period of SysTick to 1ms */
|
||||
}xTicks_t;
|
||||
|
||||
typedef enum
|
||||
|
|
|
|||
Loading…
Reference in New Issue