First working code
This commit is contained in:
parent
3bd65d37a5
commit
81c4eb79c4
172
.cproject
172
.cproject
@ -1,172 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
|
||||||
<cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1821865840">
|
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1821865840" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
|
||||||
<externalSettings/>
|
|
||||||
<extensions>
|
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.CWDLocator" 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="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1821865840" name="Debug" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug">
|
|
||||||
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1821865840." name="/" resourcePath="">
|
|
||||||
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.529690668" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.861102589" name="MCU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32F103CBTx" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.891630441" name="CPU" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.310127843" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1835888161" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.573980621" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32F103CBTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | /Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Inc | /Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | /Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Device/ST/STM32F1xx/Include | /Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32F103xB || || Drivers | Core/Startup | Core || || || ${workspace_loc:/${ProjName}/STM32F103CBTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1465019175" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="64" valueType="string"/>
|
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.441253672" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
|
||||||
<builder buildPath="${workspace_loc:/ow-dash-cube}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.444734604" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1663523395" name="MCU/MPU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.1977270518" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g3" valueType="enumerated"/>
|
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols.1887244381" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.definedsymbols" valueType="definedSymbols">
|
|
||||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
|
||||||
</option>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.1978100953" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1799147452" name="MCU/MPU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.850502918" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.747506577" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
|
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1452128330" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
|
||||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
|
||||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
|
||||||
<listOptionValue builtIn="false" value="STM32F103xB"/>
|
|
||||||
</option>
|
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.1499336158" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
|
||||||
<listOptionValue builtIn="false" value="../Core/Inc"/>
|
|
||||||
<listOptionValue builtIn="false" value="/Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Inc"/>
|
|
||||||
<listOptionValue builtIn="false" value="/Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy"/>
|
|
||||||
<listOptionValue builtIn="false" value="/Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Device/ST/STM32F1xx/Include"/>
|
|
||||||
<listOptionValue builtIn="false" value="/Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Include"/>
|
|
||||||
</option>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1891004943" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.1517066764" name="MCU/MPU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.1913963669" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.608231053" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.1214492932" name="MCU/MPU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.304169078" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F103CBTX_FLASH.ld}" valueType="string"/>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.683350683" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
|
|
||||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
|
||||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
|
||||||
</inputType>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.597457176" name="MCU/MPU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1703947996" name="MCU/MPU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.878736823" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.610869226" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.741455124" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.624084106" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.1397945404" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.972084510" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.421839353" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
|
|
||||||
</toolChain>
|
|
||||||
</folderInfo>
|
|
||||||
<sourceEntries>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
|
|
||||||
</sourceEntries>
|
|
||||||
</configuration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
||||||
</cconfiguration>
|
|
||||||
<cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1974040388">
|
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1974040388" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
|
||||||
<externalSettings/>
|
|
||||||
<extensions>
|
|
||||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.CWDLocator" 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="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1974040388" name="Release" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release">
|
|
||||||
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1974040388." name="/" resourcePath="">
|
|
||||||
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.833149544" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.1365929310" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32F103CBTx" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1165830862" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.606083872" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.1972852022" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.719111498" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.6 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32F103CBTx || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Core/Inc | /Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Inc | /Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | /Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Device/ST/STM32F1xx/Include | /Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32F103xB || || Drivers | Core/Startup | Core || || || ${workspace_loc:/${ProjName}/STM32F103CBTX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || || || " valueType="string"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.debug.option.cpuclock.1969272266" superClass="com.st.stm32cube.ide.mcu.debug.option.cpuclock" useByScannerDiscovery="false" value="64" valueType="string"/>
|
|
||||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.907427999" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
|
||||||
<builder buildPath="${workspace_loc:/ow-dash-cube}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1349053535" managedBuildOn="true" name="Gnu Make Builder.Release" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1654558311" name="MCU/MPU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.951775557" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g0" valueType="enumerated"/>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.1286865296" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1164461866" name="MCU/MPU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.1157848243" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g0" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.1667076134" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.value.os" valueType="enumerated"/>
|
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.771695578" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
|
||||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
|
||||||
<listOptionValue builtIn="false" value="STM32F103xB"/>
|
|
||||||
</option>
|
|
||||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.1284785611" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
|
||||||
<listOptionValue builtIn="false" value="../Core/Inc"/>
|
|
||||||
<listOptionValue builtIn="false" value="/Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Inc"/>
|
|
||||||
<listOptionValue builtIn="false" value="/Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy"/>
|
|
||||||
<listOptionValue builtIn="false" value="/Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Device/ST/STM32F1xx/Include"/>
|
|
||||||
<listOptionValue builtIn="false" value="/Users/clement/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Include"/>
|
|
||||||
</option>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.612795553" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.715089023" name="MCU/MPU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.997891598" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g0" valueType="enumerated"/>
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.147440488" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.value.os" valueType="enumerated"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.1214934395" name="MCU/MPU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker">
|
|
||||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.1896984968" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F103CBTX_FLASH.ld}" valueType="string"/>
|
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.984287439" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
|
|
||||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
|
||||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
|
||||||
</inputType>
|
|
||||||
</tool>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1997808190" name="MCU/MPU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.667445140" name="MCU/MPU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.35947907" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.342634487" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.1909358854" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.1849102802" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.1464348598" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.1707093927" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/>
|
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.479508826" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
|
|
||||||
</toolChain>
|
|
||||||
</folderInfo>
|
|
||||||
<sourceEntries>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
|
|
||||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
|
|
||||||
</sourceEntries>
|
|
||||||
</configuration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
||||||
</cconfiguration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
|
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
||||||
<project id="ow-dash-cube.null.1250130553" name="ow-dash-cube"/>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
|
||||||
<storageModule moduleId="scannerConfiguration">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1974040388;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1974040388.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1164461866;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.612795553">
|
|
||||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1821865840;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1821865840.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1799147452;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1891004943">
|
|
||||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
</storageModule>
|
|
||||||
</cproject>
|
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -1 +1,5 @@
|
|||||||
./cmake-build-debug
|
./cmake-build-debug
|
||||||
|
.idea/
|
||||||
|
Debug/
|
||||||
|
ow-dash-cube Debug.cfg
|
||||||
|
ow-dash-cube Debug.launch
|
||||||
|
|||||||
2
.settings/com.st.stm32cube.ide.mcu.sfrview.prefs
Normal file
2
.settings/com.st.stm32cube.ide.mcu.sfrview.prefs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}}
|
||||||
@ -1,2 +1,3 @@
|
|||||||
|
8DF89ED150041C4CBC7CB9A9CAA90856=98134B4CE4EB15EA43C2EF3374F30686
|
||||||
DC22A860405A8BF2F2C095E5B6529F12=98134B4CE4EB15EA43C2EF3374F30686
|
DC22A860405A8BF2F2C095E5B6529F12=98134B4CE4EB15EA43C2EF3374F30686
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
//@formatter:off
|
|
||||||
/* USER CODE END Header */
|
/* USER CODE END Header */
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
@ -32,34 +31,30 @@ extern "C" {
|
|||||||
|
|
||||||
/* Private includes ----------------------------------------------------------*/
|
/* Private includes ----------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN Includes */
|
/* USER CODE BEGIN Includes */
|
||||||
//@formatter:on
|
#include "LCD_driver.h"
|
||||||
//@formatter:off
|
|
||||||
/* USER CODE END Includes */
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN ET */
|
/* USER CODE BEGIN ET */
|
||||||
//@formatter:on
|
|
||||||
//@formatter:off
|
|
||||||
/* USER CODE END ET */
|
/* USER CODE END ET */
|
||||||
|
|
||||||
/* Exported constants --------------------------------------------------------*/
|
/* Exported constants --------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN EC */
|
/* USER CODE BEGIN EC */
|
||||||
//@formatter:on
|
|
||||||
//@formatter:off
|
|
||||||
/* USER CODE END EC */
|
/* USER CODE END EC */
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN EM */
|
/* USER CODE BEGIN EM */
|
||||||
//@formatter:on
|
|
||||||
//@formatter:off
|
|
||||||
/* USER CODE END EM */
|
/* USER CODE END EM */
|
||||||
|
|
||||||
/* Exported functions prototypes ---------------------------------------------*/
|
/* Exported functions prototypes ---------------------------------------------*/
|
||||||
void Error_Handler(void);
|
void Error_Handler(void);
|
||||||
|
|
||||||
/* USER CODE BEGIN EFP */
|
/* USER CODE BEGIN EFP */
|
||||||
//@formatter:on
|
|
||||||
//@formatter:off
|
|
||||||
/* USER CODE END EFP */
|
/* USER CODE END EFP */
|
||||||
|
|
||||||
/* Private defines -----------------------------------------------------------*/
|
/* Private defines -----------------------------------------------------------*/
|
||||||
@ -105,14 +100,17 @@ void Error_Handler(void);
|
|||||||
#define IM1_GPIO_Port GPIOA
|
#define IM1_GPIO_Port GPIOA
|
||||||
#define PB14_Pin GPIO_PIN_10
|
#define PB14_Pin GPIO_PIN_10
|
||||||
#define PB14_GPIO_Port GPIOA
|
#define PB14_GPIO_Port GPIOA
|
||||||
|
#define A11_Pin GPIO_PIN_11
|
||||||
|
#define A11_GPIO_Port GPIOA
|
||||||
|
#define A12_Pin GPIO_PIN_12
|
||||||
|
#define A12_GPIO_Port GPIOA
|
||||||
#define DRDX_Pin GPIO_PIN_5
|
#define DRDX_Pin GPIO_PIN_5
|
||||||
#define DRDX_GPIO_Port GPIOB
|
#define DRDX_GPIO_Port GPIOB
|
||||||
#define DB12_Pin GPIO_PIN_9
|
#define DB12_Pin GPIO_PIN_9
|
||||||
#define DB12_GPIO_Port GPIOB
|
#define DB12_GPIO_Port GPIOB
|
||||||
|
|
||||||
/* USER CODE BEGIN Private defines */
|
/* USER CODE BEGIN Private defines */
|
||||||
//@formatter:on
|
|
||||||
//@formatter:off
|
|
||||||
/* USER CODE END Private defines */
|
/* USER CODE END Private defines */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@ -33,57 +33,66 @@ volatile uint16_t LCD_HEIGHT = LCD_SCREEN_HEIGHT;
|
|||||||
volatile uint16_t LCD_WIDTH = LCD_SCREEN_WIDTH;
|
volatile uint16_t LCD_WIDTH = LCD_SCREEN_WIDTH;
|
||||||
|
|
||||||
/* SPI3 & GPIOs init function */
|
/* SPI3 & GPIOs init function */
|
||||||
void LCD_SPI_Init(void) {
|
//void LCD_SPI_Init(void) {
|
||||||
//__HAL_RCC_SPI3_CLK_ENABLE();
|
////__HAL_RCC_SPI3_CLK_ENABLE();
|
||||||
RCC->APB1ENR1 |= RCC_APB1ENR1_SPI3EN;// SPI3 clock enable
|
// RCC->APB1ENR1 |= RCC_APB1ENR1_SPI3EN;// SPI3 clock enable
|
||||||
RCC->AHB2ENR |= RCC_AHB2ENR_GPIOCEN;// GPIOC clock enable
|
// RCC->AHB2ENR |= RCC_AHB2ENR_GPIOCEN;// GPIOC clock enable
|
||||||
|
//
|
||||||
/** CS & DC GPIO signals configuration
|
// /** CS & DC GPIO signals configuration
|
||||||
PC8 ------> LCD_CS_PIN
|
// PC8 ------> LCD_CS_PIN
|
||||||
PC11 ------> LCD_DC_PIN
|
// PC11 ------> LCD_DC_PIN
|
||||||
*/
|
// */
|
||||||
GPIOC->BSRR = LCD_CS_PIN | (LCD_DC_PIN << 16);//CS à 1 et DC à 0
|
// GPIOC->BSRR = LCD_CS_PIN | (LCD_DC_PIN << 16);//CS à 1 et DC à 0
|
||||||
GPIOC->MODER |= (1 << 16) | (1 << 22);//GPIO out
|
// GPIOC->MODER |= (1 << 16) | (1 << 22);//GPIO out
|
||||||
GPIOC->MODER &= ~((1 << 17) | (1 << 23));//mise à 0
|
// GPIOC->MODER &= ~((1 << 17) | (1 << 23));//mise à 0
|
||||||
GPIOC->OTYPER &= (GPIO_OTYPER_OT8 | GPIO_OTYPER_OT11);//PC8 & 11 en PP
|
// GPIOC->OTYPER &= (GPIO_OTYPER_OT8 | GPIO_OTYPER_OT11);//PC8 & 11 en PP
|
||||||
GPIOC->OSPEEDR |= (3 << 16) | (3 << 22);//High speed
|
// GPIOC->OSPEEDR |= (3 << 16) | (3 << 22);//High speed
|
||||||
|
//
|
||||||
/**SPI3 GPIO Configuration
|
// /**SPI3 GPIO Configuration
|
||||||
PC10 ------> SPI3_SCK
|
// PC10 ------> SPI3_SCK
|
||||||
PC12 ------> SPI3_MOSI */
|
// PC12 ------> SPI3_MOSI */
|
||||||
GPIOC->AFR[1] |= (6 << 8) | (6 << 16);//PC10 en AF6 : SPI3_SCK, PC12 en AF6 : SPI3_MOSI
|
// GPIOC->AFR[1] |= (6 << 8) | (6 << 16);//PC10 en AF6 : SPI3_SCK, PC12 en AF6 : SPI3_MOSI
|
||||||
GPIOC->AFR[1] &= 0xFFF6F6FF;//Mise à 0
|
// GPIOC->AFR[1] &= 0xFFF6F6FF;//Mise à 0
|
||||||
GPIOC->MODER |= (2 << 20) | (2 << 24);//MODE AF
|
// GPIOC->MODER |= (2 << 20) | (2 << 24);//MODE AF
|
||||||
GPIOC->MODER &= 0xFEEFFFFF;//Mise à 0
|
// GPIOC->MODER &= 0xFEEFFFFF;//Mise à 0
|
||||||
GPIOC->OTYPER &= (GPIO_OTYPER_OT10 | GPIO_OTYPER_OT12);//PC10 & 12 en PP
|
// GPIOC->OTYPER &= (GPIO_OTYPER_OT10 | GPIO_OTYPER_OT12);//PC10 & 12 en PP
|
||||||
GPIOC->OSPEEDR |= (3 << 24) | (3 << 20);//High speed
|
// GPIOC->OSPEEDR |= (3 << 24) | (3 << 20);//High speed
|
||||||
|
//
|
||||||
/*Configure module SPI3*/
|
// /*Configure module SPI3*/
|
||||||
SPI3->CR1 = SPI_CR1_SSM | SPI_CR1_SSI;//CS soft, SSI à 1 sinon decl. mode fault
|
// SPI3->CR1 = SPI_CR1_SSM | SPI_CR1_SSI;//CS soft, SSI à 1 sinon decl. mode fault
|
||||||
SPI3->CR1 |= SPI_CR1_MSTR;// 0 sauf SPE et mode Master, BR = 0 => /2=> Fsck=40M
|
// SPI3->CR1 |= SPI_CR1_MSTR;// 0 sauf SPE et mode Master, BR = 0 => /2=> Fsck=40M
|
||||||
SPI3->CR2 = 0x0700 | SPI_CR2_FRXTH;// | SPI_CR2_NSSP; //mode 8 bits, ITs disabled, no DMA, FRXTH doit être à 1 en 8 bits
|
// SPI3->CR2 = 0x0700 | SPI_CR2_FRXTH;// | SPI_CR2_NSSP; //mode 8 bits, ITs disabled, no DMA, FRXTH doit être à 1 en 8 bits
|
||||||
SPI3->CR1 |= SPI_CR1_SPE;
|
// SPI3->CR1 |= SPI_CR1_SPE;
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|
||||||
/* Send command (char) to LCD via SPI bus */
|
/* Send command (char) to LCD via SPI bus */
|
||||||
void LCD_Write_Command(uint8_t Command) {
|
void LCD_Write_Command(uint8_t Command) {
|
||||||
CMD
|
CMD
|
||||||
;
|
;
|
||||||
//CS_ON;
|
//CS_ON;
|
||||||
while ((SPI1->SR & SPI_SR_TXE) != 0);// Waiting for TX register to be available.
|
while ((SPI1->SR & SPI_SR_TXE) == 0);// Waiting for TX register to be available.
|
||||||
*(uint8_t*) (SPI1_DR_ADR) = Command;// Cast sur pointeur, pour ecriture 8 bits. Sinon l'acces 16 bits provoque un tfert 16 bits
|
SPI1->DR = Command;// Cast sur pointeur, pour ecriture 8 bits. Sinon l'acces 16 bits provoque un tfert 16 bits
|
||||||
//while ((SPI1->SR & SPI_SR_BSY) != 0); //Attendre fin envoi trame (cf RM P1289)
|
//while ((SPI1->SR & SPI_SR_BSY) != 0); //Attendre fin envoi trame (cf RM P1289)
|
||||||
//CS_OFF;
|
//CS_OFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send Data (char) to LCD via SPI bus */
|
/* Send Data (char) to LCD via SPI bus */
|
||||||
void LCD_Write_Data(uint8_t Data) {
|
void LCD_Write_Data(uint8_t Data) {
|
||||||
DATA
|
DATA
|
||||||
;
|
;
|
||||||
//CS_ON;
|
//CS_ON;
|
||||||
while ((SPI1->SR & SPI_SR_TXE) != 0);// Waiting for TX register to be available.
|
while ((SPI1->SR & SPI_SR_TXE) == 0);// Waiting for TX register to be available.
|
||||||
*(uint8_t*) (SPI1_DR_ADR) = Data;
|
SPI1->DR = Data;
|
||||||
|
//while ((SPI1->SR & SPI_SR_BSY) != 0); //Attendre fin envoi trame (cf RM P1289)
|
||||||
|
//CS_OFF;
|
||||||
|
}
|
||||||
|
/* Send Data (char) to LCD via SPI bus */
|
||||||
|
void LCD_Write_Data16(uint16_t Data) {
|
||||||
|
DATA
|
||||||
|
;
|
||||||
|
//CS_ON;
|
||||||
|
while ((SPI1->SR & SPI_SR_TXE) == 0);// Waiting for TX register to be available.
|
||||||
|
SPI1->DR = Data;
|
||||||
//while ((SPI1->SR & SPI_SR_BSY) != 0); //Attendre fin envoi trame (cf RM P1289)
|
//while ((SPI1->SR & SPI_SR_BSY) != 0); //Attendre fin envoi trame (cf RM P1289)
|
||||||
//CS_OFF;
|
//CS_OFF;
|
||||||
}
|
}
|
||||||
@ -91,209 +100,89 @@ void LCD_Write_Data(uint8_t Data) {
|
|||||||
/* Set the frame to draw into and sends a write into frame command */
|
/* Set the frame to draw into and sends a write into frame command */
|
||||||
void LCD_Set_Address(uint16_t X1, uint16_t Y1, uint16_t X2, uint16_t Y2) {
|
void LCD_Set_Address(uint16_t X1, uint16_t Y1, uint16_t X2, uint16_t Y2) {
|
||||||
LCD_Write_Command(0x2A);
|
LCD_Write_Command(0x2A);
|
||||||
LCD_Write_Data(X1 >> 8);
|
|
||||||
LCD_Write_Data(X1);
|
LCD_Write_Data(X1);
|
||||||
LCD_Write_Data(X2 >> 8);
|
|
||||||
LCD_Write_Data(X2);
|
LCD_Write_Data(X2);
|
||||||
|
|
||||||
LCD_Write_Command(0x2B);
|
LCD_Write_Command(0x2B);
|
||||||
LCD_Write_Data(Y1 >> 8);
|
|
||||||
LCD_Write_Data(Y1);
|
LCD_Write_Data(Y1);
|
||||||
LCD_Write_Data(Y2 >> 8);
|
|
||||||
LCD_Write_Data(Y2);
|
LCD_Write_Data(Y2);
|
||||||
|
|
||||||
LCD_Write_Command(0x2C);
|
LCD_Write_Command(0x2C);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*HARDWARE RESET*/
|
//void LCD_Set_Rotation(uint8_t Rotation) {
|
||||||
//Reset n'est pas cable sur aff ADA1983
|
//
|
||||||
// void LCD_Reset(void)
|
// uint8_t screen_rotation = Rotation;
|
||||||
// {
|
//
|
||||||
// HAL_GPIO_WritePin(LCD_RST_PORT, LCD_RST_PIN, GPIO_PIN_SET);
|
// LCD_Write_Command(0x36);
|
||||||
// HAL_Delay(200);
|
//
|
||||||
// CS_ON;
|
// switch (screen_rotation)
|
||||||
// HAL_Delay(200);
|
// case SCREEN_VERTICAL_1:
|
||||||
// HAL_GPIO_WritePin(LCD_RST_PORT, LCD_RST_PIN, GPIO_PIN_SET);
|
// LCD_Write_Data(0x40 | 0x08);
|
||||||
// }
|
// LCD_WIDTH = 240;
|
||||||
/*Ser rotation of the screen - changes x0 and y0*/
|
// LCD_HEIGHT = 320;
|
||||||
void LCD_Set_Rotation(uint8_t Rotation) {
|
// break;
|
||||||
|
// case SCREEN_HORIZONTAL_1:
|
||||||
|
// LCD_Write_Data(0x20 | 0x08);
|
||||||
|
// LCD_WIDTH = 320;
|
||||||
|
// LCD_HEIGHT = 240;
|
||||||
|
// break;
|
||||||
|
// case SCREEN_VERTICAL_2:
|
||||||
|
// LCD_Write_Data(0x80 | 0x08);
|
||||||
|
// LCD_WIDTH = 240;
|
||||||
|
// LCD_HEIGHT = 320;
|
||||||
|
// break;
|
||||||
|
// case SCREEN_HORIZONTAL_2:
|
||||||
|
// LCD_Write_Data(0x40 | 0x80 | 0x20 | 0x08);
|
||||||
|
// LCD_WIDTH = 320;
|
||||||
|
// LCD_HEIGHT = 240;
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// break;
|
||||||
|
//}
|
||||||
|
|
||||||
uint8_t screen_rotation = Rotation;
|
void LCD_HardwareReset() {
|
||||||
|
HAL_GPIO_WritePin(DRESET_GPIO_Port, DRESET_Pin, GPIO_PIN_SET);
|
||||||
LCD_Write_Command(0x36);
|
HAL_Delay(1);
|
||||||
for (volatile uint32_t i = 0; i < TEMPO1MS_80M; i++);//~1ms attente
|
HAL_GPIO_WritePin(DRESET_GPIO_Port, DRESET_Pin, GPIO_PIN_RESET);
|
||||||
|
HAL_Delay(20);
|
||||||
switch (screen_rotation) {
|
HAL_GPIO_WritePin(DRESET_GPIO_Port, DRESET_Pin, GPIO_PIN_SET);
|
||||||
case SCREEN_VERTICAL_1:
|
HAL_Delay(150);
|
||||||
LCD_Write_Data(0x40 | 0x08);
|
|
||||||
LCD_WIDTH = 240;
|
|
||||||
LCD_HEIGHT = 320;
|
|
||||||
break;
|
|
||||||
case SCREEN_HORIZONTAL_1:
|
|
||||||
LCD_Write_Data(0x20 | 0x08);
|
|
||||||
LCD_WIDTH = 320;
|
|
||||||
LCD_HEIGHT = 240;
|
|
||||||
break;
|
|
||||||
case SCREEN_VERTICAL_2:
|
|
||||||
LCD_Write_Data(0x80 | 0x08);
|
|
||||||
LCD_WIDTH = 240;
|
|
||||||
LCD_HEIGHT = 320;
|
|
||||||
break;
|
|
||||||
case SCREEN_HORIZONTAL_2:
|
|
||||||
LCD_Write_Data(0x40 | 0x80 | 0x20 | 0x08);
|
|
||||||
LCD_WIDTH = 320;
|
|
||||||
LCD_HEIGHT = 240;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
//EXIT IF SCREEN ROTATION NOT VALID!
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Enable LCD display*/
|
|
||||||
//Reset n'est pas cable sur aff ADA1983
|
|
||||||
// void LCD_Enable(void)
|
|
||||||
// {
|
|
||||||
// HAL_GPIO_WritePin(LCD_RST_PORT, LCD_RST_PIN, GPIO_PIN_SET);
|
|
||||||
// }
|
|
||||||
/*Initialize LCD display*/
|
|
||||||
void LCD_Init(void) {
|
void LCD_Init(void) {
|
||||||
volatile uint32_t i;//Boucle att
|
|
||||||
|
|
||||||
//Reset n'est pas cable sur aff ADA1983
|
//LCD_SPI_Init();
|
||||||
//LCD_Enable();
|
|
||||||
LCD_SPI_Init();
|
|
||||||
//LCD_Reset();
|
|
||||||
|
|
||||||
//SOFTWARE RESET
|
LCD_HardwareReset();
|
||||||
|
|
||||||
|
// enable spi1
|
||||||
|
SPI1->CR1 |= SPI_CR1_SPE; // NSS (CS) pin is automatically pulled low
|
||||||
|
HAL_Delay(300);
|
||||||
|
|
||||||
|
// Software reset
|
||||||
LCD_Write_Command(0x01);
|
LCD_Write_Command(0x01);
|
||||||
for (i = 0; i < (1000 * TEMPO1MS_80M); i++);// ~1s sleep @80M
|
HAL_Delay(150);
|
||||||
|
|
||||||
//POWER CONTROL A -- command not existing
|
// Color mode: 16bit/pixels
|
||||||
// LCD_Write_Command(0xCB);
|
|
||||||
// LCD_Write_Data(0x39);
|
|
||||||
// LCD_Write_Data(0x2C);
|
|
||||||
// LCD_Write_Data(0x00);
|
|
||||||
// LCD_Write_Data(0x34);
|
|
||||||
// LCD_Write_Data(0x02);
|
|
||||||
|
|
||||||
//POWER CONTROL B -- command not existing
|
|
||||||
// LCD_Write_Command(0xCF);
|
|
||||||
// LCD_Write_Data(0x00);
|
|
||||||
// LCD_Write_Data(0xC1);
|
|
||||||
// LCD_Write_Data(0x30);
|
|
||||||
|
|
||||||
//DRIVER TIMING CONTROL A -- Display Output Ctrl Adjust
|
|
||||||
LCD_Write_Command(0xE8);
|
|
||||||
LCD_Write_Data(0x85);
|
|
||||||
LCD_Write_Data(0x00);
|
|
||||||
LCD_Write_Data(0x78);
|
|
||||||
|
|
||||||
//DRIVER TIMING CONTROL B -- command not existing
|
|
||||||
// LCD_Write_Command(0xEA);
|
|
||||||
// LCD_Write_Data(0x00);
|
|
||||||
// LCD_Write_Data(0x00);
|
|
||||||
|
|
||||||
//POWER ON SEQUENCE CONTROL -- command not existing
|
|
||||||
// LCD_Write_Command(0xED);
|
|
||||||
// LCD_Write_Data(0x64);
|
|
||||||
// LCD_Write_Data(0x03);
|
|
||||||
// LCD_Write_Data(0x12);
|
|
||||||
// LCD_Write_Data(0x81);
|
|
||||||
|
|
||||||
//PUMP RATIO CONTROL -- command not existing
|
|
||||||
// LCD_Write_Command(0xF7);
|
|
||||||
// LCD_Write_Data(0x20);
|
|
||||||
|
|
||||||
//POWER CONTROL,VRH[5:0] -- Power Control 1
|
|
||||||
LCD_Write_Command(0xC0);
|
|
||||||
LCD_Write_Data(0x23);
|
|
||||||
|
|
||||||
//POWER CONTROL,SAP[2:0];BT[3:0] -- Power Control 2
|
|
||||||
LCD_Write_Command(0xC1);
|
|
||||||
LCD_Write_Data(0x10);
|
|
||||||
|
|
||||||
//VCM CONTROL -- VCOM Control
|
|
||||||
LCD_Write_Command(0xC5);
|
|
||||||
LCD_Write_Data(0x3E);
|
|
||||||
LCD_Write_Data(0x28);
|
|
||||||
|
|
||||||
//VCM CONTROL 2
|
|
||||||
LCD_Write_Command(0xC7);
|
|
||||||
LCD_Write_Data(0x86);
|
|
||||||
|
|
||||||
//MEMORY ACCESS CONTROL
|
|
||||||
LCD_Write_Command(0x36);
|
|
||||||
LCD_Write_Data(0x48);
|
|
||||||
|
|
||||||
//PIXEL FORMAT
|
|
||||||
LCD_Write_Command(0x3A);
|
LCD_Write_Command(0x3A);
|
||||||
LCD_Write_Data(0x55);
|
LCD_Write_Data(0x55);
|
||||||
|
HAL_Delay(150);
|
||||||
|
|
||||||
//FRAME RATIO CONTROL, STANDARD RGB COLOR
|
// Exit sleep
|
||||||
LCD_Write_Command(0xB1);
|
|
||||||
LCD_Write_Data(0x00);
|
|
||||||
LCD_Write_Data(0x18);
|
|
||||||
|
|
||||||
//DISPLAY FUNCTION CONTROL
|
|
||||||
LCD_Write_Command(0xB6);
|
|
||||||
LCD_Write_Data(0x08);
|
|
||||||
LCD_Write_Data(0x82);
|
|
||||||
LCD_Write_Data(0x27);
|
|
||||||
|
|
||||||
//3GAMMA FUNCTION DISABLE
|
|
||||||
LCD_Write_Command(0xF2);
|
|
||||||
LCD_Write_Data(0x00);
|
|
||||||
|
|
||||||
//GAMMA CURVE SELECTED
|
|
||||||
LCD_Write_Command(0x26);
|
|
||||||
LCD_Write_Data(0x01);
|
|
||||||
|
|
||||||
//POSITIVE GAMMA CORRECTION
|
|
||||||
LCD_Write_Command(0xE0);
|
|
||||||
LCD_Write_Data(0x0F);
|
|
||||||
LCD_Write_Data(0x31);
|
|
||||||
LCD_Write_Data(0x2B);
|
|
||||||
LCD_Write_Data(0x0C);
|
|
||||||
LCD_Write_Data(0x0E);
|
|
||||||
LCD_Write_Data(0x08);
|
|
||||||
LCD_Write_Data(0x4E);
|
|
||||||
LCD_Write_Data(0xF1);
|
|
||||||
LCD_Write_Data(0x37);
|
|
||||||
LCD_Write_Data(0x07);
|
|
||||||
LCD_Write_Data(0x10);
|
|
||||||
LCD_Write_Data(0x03);
|
|
||||||
LCD_Write_Data(0x0E);
|
|
||||||
LCD_Write_Data(0x09);
|
|
||||||
LCD_Write_Data(0x00);
|
|
||||||
|
|
||||||
//NEGATIVE GAMMA CORRECTION
|
|
||||||
LCD_Write_Command(0xE1);
|
|
||||||
LCD_Write_Data(0x00);
|
|
||||||
LCD_Write_Data(0x0E);
|
|
||||||
LCD_Write_Data(0x14);
|
|
||||||
LCD_Write_Data(0x03);
|
|
||||||
LCD_Write_Data(0x11);
|
|
||||||
LCD_Write_Data(0x07);
|
|
||||||
LCD_Write_Data(0x31);
|
|
||||||
LCD_Write_Data(0xC1);
|
|
||||||
LCD_Write_Data(0x48);
|
|
||||||
LCD_Write_Data(0x08);
|
|
||||||
LCD_Write_Data(0x0F);
|
|
||||||
LCD_Write_Data(0x0C);
|
|
||||||
LCD_Write_Data(0x31);
|
|
||||||
LCD_Write_Data(0x36);
|
|
||||||
LCD_Write_Data(0x0F);
|
|
||||||
|
|
||||||
//EXIT SLEEP
|
|
||||||
LCD_Write_Command(0x11);
|
LCD_Write_Command(0x11);
|
||||||
for (i = 0; i < (120 / TEMPO1MS_80M); i++); // ~120ms sleep
|
HAL_Delay(150);
|
||||||
|
|
||||||
//TURN ON DISPLAY
|
// Turn on display
|
||||||
LCD_Write_Command(0x29);
|
LCD_Write_Command(0x29);
|
||||||
|
HAL_Delay(400);
|
||||||
|
|
||||||
//STARTING ROTATION
|
LCD_Fill_Screen(WHITE);
|
||||||
LCD_Set_Rotation(SCREEN_HORIZONTAL_1);
|
|
||||||
|
//LCD_Draw_Rectangle(0, 0, 10, 10, RED);
|
||||||
|
|
||||||
|
// STARTING ROTATION
|
||||||
|
//LCD_Set_Rotation(SCREEN_HORIZONTAL_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//INTERNAL FUNCTION OF LIBRARY
|
//INTERNAL FUNCTION OF LIBRARY
|
||||||
@ -305,13 +194,14 @@ void LCD_Draw_Colour_Burst(uint16_t Colour, uint32_t Size) {
|
|||||||
bufColour |= Colour << 8;// en mode 8 bits, il faut inverser les octets MSB/LSB
|
bufColour |= Colour << 8;// en mode 8 bits, il faut inverser les octets MSB/LSB
|
||||||
DATA
|
DATA
|
||||||
;
|
;
|
||||||
CS_ON;
|
//CS_ON;
|
||||||
for (uint32_t j = 0; j < Size; j++) {
|
for (uint32_t j = 0; j < Size; j++) {
|
||||||
while ((SPI3->SR & SPI_SR_TXE) == 0);//Si FIFO full (TX buffer Empty=0), on attend
|
while ((SPI1->SR & SPI_SR_TXE) == 0);// Waiting for TX register to be available.
|
||||||
SPI3->DR = bufColour;
|
//while ((SPI3->SR & SPI_SR_TXE) == 0);//Si FIFO full (TX buffer Empty=0), on attend
|
||||||
|
SPI1->DR = Colour; //bufColour;
|
||||||
}
|
}
|
||||||
while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
//while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
||||||
CS_OFF;
|
//CS_OFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
//FILL THE ENTIRE SCREEN WITH SELECTED COLOUR (either #define-d ones or custom 16bit)
|
//FILL THE ENTIRE SCREEN WITH SELECTED COLOUR (either #define-d ones or custom 16bit)
|
||||||
@ -327,45 +217,45 @@ void LCD_Fill_Screen(uint16_t Colour) {
|
|||||||
//Using pixels to draw big simple structures is not recommended as it is really slow
|
//Using pixels to draw big simple structures is not recommended as it is really slow
|
||||||
//Try using either rectangles or lines if possible
|
//Try using either rectangles or lines if possible
|
||||||
//
|
//
|
||||||
void LCD_Draw_Pixel(uint16_t X, uint16_t Y, uint16_t Colour) {
|
//void LCD_Draw_Pixel(uint16_t X, uint16_t Y, uint16_t Colour) {
|
||||||
if ((X >= LCD_WIDTH) || (Y >= LCD_HEIGHT)) return;//OUT OF BOUNDS!
|
// if ((X >= LCD_WIDTH) || (Y >= LCD_HEIGHT)) return;//OUT OF BOUNDS!
|
||||||
|
//
|
||||||
//ADDRESS
|
////ADDRESS
|
||||||
LCD_Write_Command(0x2A);
|
// LCD_Write_Command(0x2A);
|
||||||
|
//
|
||||||
//XDATA
|
////XDATA
|
||||||
DATA
|
// DATA
|
||||||
;
|
// ;
|
||||||
CS_ON;
|
// CS_ON;
|
||||||
SPI3->DR = (X >> 8) | (X << 8);//inversion MSB / LSB pour envoi des 2 mots 8 bits en 1W 16bits
|
// SPI3->DR = (X >> 8) | (X << 8);//inversion MSB / LSB pour envoi des 2 mots 8 bits en 1W 16bits
|
||||||
//Pas d'att si FIFO full (TX buffer Empty=0) car juste 2 écriture 16 bits tiennent dans FIFO
|
////Pas d'att si FIFO full (TX buffer Empty=0) car juste 2 écriture 16 bits tiennent dans FIFO
|
||||||
SPI3->DR = ((X + 1) >> 8) | ((X + 1) << 8);
|
// SPI3->DR = ((X + 1) >> 8) | ((X + 1) << 8);
|
||||||
while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
// while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
||||||
CS_OFF;
|
// CS_OFF;
|
||||||
|
//
|
||||||
//ADDRESS
|
////ADDRESS
|
||||||
LCD_Write_Command(0x2B);
|
// LCD_Write_Command(0x2B);
|
||||||
|
//
|
||||||
//YDATA
|
////YDATA
|
||||||
DATA
|
// DATA
|
||||||
;
|
// ;
|
||||||
CS_ON;
|
// CS_ON;
|
||||||
SPI3->DR = (Y >> 8) | (Y << 8);
|
// SPI3->DR = (Y >> 8) | (Y << 8);
|
||||||
SPI3->DR = ((Y + 1) >> 8) | ((Y + 1) << 8);
|
// SPI3->DR = ((Y + 1) >> 8) | ((Y + 1) << 8);
|
||||||
while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
// while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
||||||
CS_OFF;
|
// CS_OFF;
|
||||||
|
//
|
||||||
//ADDRESS
|
////ADDRESS
|
||||||
LCD_Write_Command(0x2C);
|
// LCD_Write_Command(0x2C);
|
||||||
|
//
|
||||||
//COLOUR
|
////COLOUR
|
||||||
DATA
|
// DATA
|
||||||
;
|
// ;
|
||||||
CS_ON;
|
// CS_ON;
|
||||||
SPI3->DR = (Colour >> 8) | (Colour << 8);
|
// SPI3->DR = (Colour >> 8) | (Colour << 8);
|
||||||
while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
// while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
||||||
CS_OFF;
|
// CS_OFF;
|
||||||
}
|
//}
|
||||||
|
|
||||||
//DRAW RECTANGLE OF SET SIZE AND HEIGTH AT X and Y POSITION WITH CUSTOM COLOUR
|
//DRAW RECTANGLE OF SET SIZE AND HEIGTH AT X and Y POSITION WITH CUSTOM COLOUR
|
||||||
//
|
//
|
||||||
@ -639,67 +529,67 @@ void LCD_Draw_Text(
|
|||||||
/*Dessine une image dans une zone de l'ecran, aux coordonnées X et Y*/
|
/*Dessine une image dans une zone de l'ecran, aux coordonnées X et Y*/
|
||||||
//CONVERTISSEUR: http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
//CONVERTISSEUR: http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
||||||
//65K colour (2Bytes / Pixel)
|
//65K colour (2Bytes / Pixel)
|
||||||
void LCD_Draw_Image_XY(
|
//void LCD_Draw_Image_XY(
|
||||||
const char *Image_Array,
|
// const char *Image_Array,
|
||||||
uint16_t X,
|
// uint16_t X,
|
||||||
uint16_t Y,
|
// uint16_t Y,
|
||||||
uint16_t Width,
|
// uint16_t Width,
|
||||||
uint16_t Height) {
|
// uint16_t Height) {
|
||||||
LCD_Set_Address(X, Y, X + Width - 1, Y + Height - 1);
|
// LCD_Set_Address(X, Y, X + Width - 1, Y + Height - 1);
|
||||||
|
//
|
||||||
DATA
|
// DATA
|
||||||
;
|
// ;
|
||||||
CS_ON;
|
// CS_ON;
|
||||||
|
//
|
||||||
for (uint32_t i = 0; i < Width * Height * 2; i += 2) {
|
// for (uint32_t i = 0; i < Width * Height * 2; i += 2) {
|
||||||
while ((SPI3->SR & SPI_SR_TXE) == 0);//Si FIFO full (TX buffer Empty=0), on attend
|
// while ((SPI3->SR & SPI_SR_TXE) == 0);//Si FIFO full (TX buffer Empty=0), on attend
|
||||||
// on utilise l'ecriture 16 bits dans DR, pour des envois 8 bits
|
//// on utilise l'ecriture 16 bits dans DR, pour des envois 8 bits
|
||||||
// Le LSB doit etre place ds le MSB :
|
//// Le LSB doit etre place ds le MSB :
|
||||||
SPI3->DR = ((short) Image_Array[i + 1]) << 8 | Image_Array[i];
|
// SPI3->DR = ((short) Image_Array[i + 1]) << 8 | Image_Array[i];
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
// while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
||||||
CS_OFF;
|
// CS_OFF;
|
||||||
}
|
//}
|
||||||
|
|
||||||
/*Draws a full screen picture from flash. Image converted from RGB .jpeg/other to C array using online converter*/
|
/*Draws a full screen picture from flash. Image converted from RGB .jpeg/other to C array using online converter*/
|
||||||
//USING CONVERTER: http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
//USING CONVERTER: http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
||||||
//65K colour (2Bytes / Pixel)
|
//65K colour (2Bytes / Pixel)
|
||||||
void LCD_Draw_Image_Full(const char *Image_Array, uint8_t Orientation) {
|
//void LCD_Draw_Image_Full(const char *Image_Array, uint8_t Orientation) {
|
||||||
switch (Orientation) {
|
// switch (Orientation) {
|
||||||
case SCREEN_HORIZONTAL_1:
|
// case SCREEN_HORIZONTAL_1:
|
||||||
LCD_Set_Rotation(SCREEN_HORIZONTAL_1);
|
// LCD_Set_Rotation(SCREEN_HORIZONTAL_1);
|
||||||
LCD_Set_Address(0, 0, LCD_SCREEN_WIDTH, LCD_SCREEN_HEIGHT);
|
// LCD_Set_Address(0, 0, LCD_SCREEN_WIDTH, LCD_SCREEN_HEIGHT);
|
||||||
break;
|
// break;
|
||||||
|
//
|
||||||
case SCREEN_HORIZONTAL_2:
|
// case SCREEN_HORIZONTAL_2:
|
||||||
LCD_Set_Rotation(SCREEN_HORIZONTAL_2);
|
// LCD_Set_Rotation(SCREEN_HORIZONTAL_2);
|
||||||
LCD_Set_Address(0, 0, LCD_SCREEN_WIDTH, LCD_SCREEN_HEIGHT);
|
// LCD_Set_Address(0, 0, LCD_SCREEN_WIDTH, LCD_SCREEN_HEIGHT);
|
||||||
break;
|
// break;
|
||||||
|
//
|
||||||
case SCREEN_VERTICAL_1:
|
// case SCREEN_VERTICAL_1:
|
||||||
LCD_Set_Rotation(SCREEN_VERTICAL_1);
|
// LCD_Set_Rotation(SCREEN_VERTICAL_1);
|
||||||
LCD_Set_Address(0, 0, LCD_SCREEN_HEIGHT, LCD_SCREEN_WIDTH);
|
// LCD_Set_Address(0, 0, LCD_SCREEN_HEIGHT, LCD_SCREEN_WIDTH);
|
||||||
break;
|
// break;
|
||||||
|
//
|
||||||
case SCREEN_VERTICAL_2:
|
// case SCREEN_VERTICAL_2:
|
||||||
LCD_Set_Rotation(SCREEN_VERTICAL_2);
|
// LCD_Set_Rotation(SCREEN_VERTICAL_2);
|
||||||
LCD_Set_Address(0, 0, LCD_SCREEN_HEIGHT, LCD_SCREEN_WIDTH);
|
// LCD_Set_Address(0, 0, LCD_SCREEN_HEIGHT, LCD_SCREEN_WIDTH);
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
DATA
|
// DATA
|
||||||
;
|
// ;
|
||||||
CS_ON;
|
// CS_ON;
|
||||||
|
//
|
||||||
for (uint32_t i = 0; i < LCD_SCREEN_WIDTH * LCD_SCREEN_HEIGHT * 2; i += 2) {
|
// for (uint32_t i = 0; i < LCD_SCREEN_WIDTH * LCD_SCREEN_HEIGHT * 2; i += 2) {
|
||||||
while ((SPI3->SR & SPI_SR_TXE) == 0);//Si FIFO full (TX buffer Empty=0), on attend
|
// while ((SPI3->SR & SPI_SR_TXE) == 0);//Si FIFO full (TX buffer Empty=0), on attend
|
||||||
// on utilise l'ecriture 16 bits dans DR, pour des envois 8 bits
|
//// on utilise l'ecriture 16 bits dans DR, pour des envois 8 bits
|
||||||
// Le LSB doit etre place ds le MSB :
|
//// Le LSB doit etre place ds le MSB :
|
||||||
SPI3->DR = ((short) Image_Array[i + 1]) << 8 | Image_Array[i];
|
// SPI3->DR = ((short) Image_Array[i + 1]) << 8 | Image_Array[i];
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
// while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
|
||||||
CS_OFF;
|
// CS_OFF;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|||||||
158
Core/Src/main.c
158
Core/Src/main.c
@ -1,4 +1,4 @@
|
|||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Header */
|
||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file : main.c
|
* @file : main.c
|
||||||
@ -15,55 +15,54 @@
|
|||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
/* USER CODE END */
|
/* USER CODE END Header */
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
|
/* Private includes ----------------------------------------------------------*/
|
||||||
|
/* USER CODE BEGIN Includes */
|
||||||
#include "LCD_driver.h"
|
#include "LCD_driver.h"
|
||||||
#include "5x5_font.h"
|
#include "5x5_font.h"
|
||||||
#include "LogoIUT.h"
|
#include "LogoIUT.h"
|
||||||
|
/* USER CODE END Includes */
|
||||||
/* Private includes ----------------------------------------------------------*/
|
|
||||||
/* USER CODE BEGIN */
|
|
||||||
|
|
||||||
/* USER CODE END */
|
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PTD */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PTD */
|
||||||
|
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* Private define ------------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PD */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PD */
|
||||||
|
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* Private macro -------------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PM */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PM */
|
||||||
|
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
SPI_HandleTypeDef hspi1;
|
SPI_HandleTypeDef hspi1;
|
||||||
|
|
||||||
UART_HandleTypeDef huart1;
|
UART_HandleTypeDef huart1;
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PV */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PV */
|
||||||
|
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
void SystemClock_Config(void);
|
void SystemClock_Config(void);
|
||||||
static void MX_GPIO_Init(void);
|
static void MX_GPIO_Init(void);
|
||||||
static void MX_SPI1_Init(void);
|
static void MX_SPI1_Init(void);
|
||||||
static void MX_USART1_UART_Init(void);
|
static void MX_USART1_UART_Init(void);
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PFP */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PFP */
|
||||||
|
|
||||||
/* Private user code ---------------------------------------------------------*/
|
/* Private user code ---------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The application entry point.
|
* @brief The application entry point.
|
||||||
@ -72,48 +71,47 @@ static void MX_USART1_UART_Init(void);
|
|||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END 1 */
|
||||||
|
|
||||||
/* MCU Configuration--------------------------------------------------------*/
|
/* MCU Configuration--------------------------------------------------------*/
|
||||||
|
|
||||||
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
|
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
|
||||||
HAL_Init();
|
HAL_Init();
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Init */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END Init */
|
||||||
|
|
||||||
/* Configure the system clock */
|
/* Configure the system clock */
|
||||||
SystemClock_Config();
|
SystemClock_Config();
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN SysInit */
|
||||||
/* USER CODE END */
|
|
||||||
|
/* USER CODE END SysInit */
|
||||||
|
|
||||||
/* Initialize all configured peripherals */
|
/* Initialize all configured peripherals */
|
||||||
MX_GPIO_Init();
|
MX_GPIO_Init();
|
||||||
MX_SPI1_Init();
|
MX_SPI1_Init();
|
||||||
MX_USART1_UART_Init();
|
MX_USART1_UART_Init();
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 2 */
|
||||||
|
|
||||||
LCD_Init();
|
LCD_Init();
|
||||||
LCD_Fill_Screen(PURPLE);
|
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN WHILE */
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
||||||
/* USER CODE END */
|
HAL_Delay(1000);
|
||||||
|
LCD_Init();
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE END WHILE */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 3 */
|
||||||
}
|
}
|
||||||
|
/* USER CODE END 3 */
|
||||||
/* USER CODE END */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -162,22 +160,22 @@ void SystemClock_Config(void)
|
|||||||
static void MX_SPI1_Init(void)
|
static void MX_SPI1_Init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN SPI1_Init 0 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END SPI1_Init 0 */
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN SPI1_Init 1 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END SPI1_Init 1 */
|
||||||
/* SPI1 parameter configuration*/
|
/* SPI1 parameter configuration*/
|
||||||
hspi1.Instance = SPI1;
|
hspi1.Instance = SPI1;
|
||||||
hspi1.Init.Mode = SPI_MODE_MASTER;
|
hspi1.Init.Mode = SPI_MODE_MASTER;
|
||||||
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
|
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
|
||||||
hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
|
hspi1.Init.DataSize = SPI_DATASIZE_16BIT;
|
||||||
hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
|
hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
|
||||||
hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
|
hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
|
||||||
hspi1.Init.NSS = SPI_NSS_HARD_OUTPUT;
|
hspi1.Init.NSS = SPI_NSS_HARD_OUTPUT;
|
||||||
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4;
|
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_16;
|
||||||
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
|
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
|
||||||
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
|
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
|
||||||
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
|
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
|
||||||
@ -186,9 +184,9 @@ static void MX_SPI1_Init(void)
|
|||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN SPI1_Init 2 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END SPI1_Init 2 */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,13 +198,13 @@ static void MX_SPI1_Init(void)
|
|||||||
static void MX_USART1_UART_Init(void)
|
static void MX_USART1_UART_Init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN USART1_Init 0 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END USART1_Init 0 */
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN USART1_Init 1 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END USART1_Init 1 */
|
||||||
huart1.Instance = USART1;
|
huart1.Instance = USART1;
|
||||||
huart1.Init.BaudRate = 115200;
|
huart1.Init.BaudRate = 115200;
|
||||||
huart1.Init.WordLength = UART_WORDLENGTH_8B;
|
huart1.Init.WordLength = UART_WORDLENGTH_8B;
|
||||||
@ -219,9 +217,9 @@ static void MX_USART1_UART_Init(void)
|
|||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN USART1_Init 2 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END USART1_Init 2 */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,9 +231,9 @@ static void MX_USART1_UART_Init(void)
|
|||||||
static void MX_GPIO_Init(void)
|
static void MX_GPIO_Init(void)
|
||||||
{
|
{
|
||||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN MX_GPIO_Init_1 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END MX_GPIO_Init_1 */
|
||||||
|
|
||||||
/* GPIO Ports Clock Enable */
|
/* GPIO Ports Clock Enable */
|
||||||
__HAL_RCC_GPIOC_CLK_ENABLE();
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
@ -250,13 +248,18 @@ static void MX_GPIO_Init(void)
|
|||||||
HAL_GPIO_WritePin(GPIOD, DB4_Pin|DB2_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(GPIOD, DB4_Pin|DB2_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(GPIOA, DB0_Pin|DRESET_Pin|DCX_Pin|IM2_Pin
|
HAL_GPIO_WritePin(GPIOA, DB0_Pin|DRESET_Pin|DCX_Pin|PB14_Pin, GPIO_PIN_RESET);
|
||||||
|IM1_Pin|PB14_Pin, GPIO_PIN_RESET);
|
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(GPIOB, DB1_Pin|DB3_Pin|DB5_Pin|DB7_Pin
|
HAL_GPIO_WritePin(GPIOB, DB1_Pin|DB3_Pin|DB5_Pin|DB7_Pin
|
||||||
|DB9_Pin|DB11_Pin|DB13_Pin|DB15_Pin
|
|DB9_Pin|DB11_Pin|DB13_Pin|DB15_Pin
|
||||||
|IM0_Pin|DRDX_Pin|DB12_Pin, GPIO_PIN_RESET);
|
|DRDX_Pin|DB12_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(IM0_GPIO_Port, IM0_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(GPIOA, IM2_Pin|IM1_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
/*Configure GPIO pins : DB10_Pin DB8_Pin DB6_Pin */
|
/*Configure GPIO pins : DB10_Pin DB8_Pin DB6_Pin */
|
||||||
GPIO_InitStruct.Pin = DB10_Pin|DB8_Pin|DB6_Pin;
|
GPIO_InitStruct.Pin = DB10_Pin|DB8_Pin|DB6_Pin;
|
||||||
@ -273,19 +276,19 @@ static void MX_GPIO_Init(void)
|
|||||||
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : DB0_Pin DRESET_Pin DCX_Pin IM2_Pin
|
/*Configure GPIO pins : DB0_Pin DRESET_Pin DCX_Pin IM2_Pin
|
||||||
PB14_Pin */
|
IM1_Pin PB14_Pin */
|
||||||
GPIO_InitStruct.Pin = DB0_Pin|DRESET_Pin|DCX_Pin|IM2_Pin
|
GPIO_InitStruct.Pin = DB0_Pin|DRESET_Pin|DCX_Pin|IM2_Pin
|
||||||
|PB14_Pin;
|
|IM1_Pin|PB14_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pin : DTE_Pin */
|
/*Configure GPIO pins : DTE_Pin A11_Pin A12_Pin */
|
||||||
GPIO_InitStruct.Pin = DTE_Pin;
|
GPIO_InitStruct.Pin = DTE_Pin|A11_Pin|A12_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
HAL_GPIO_Init(DTE_GPIO_Port, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : DB1_Pin DB3_Pin DB5_Pin DB7_Pin
|
/*Configure GPIO pins : DB1_Pin DB3_Pin DB5_Pin DB7_Pin
|
||||||
DB9_Pin DB11_Pin DB13_Pin DB15_Pin
|
DB9_Pin DB11_Pin DB13_Pin DB15_Pin
|
||||||
@ -298,36 +301,17 @@ static void MX_GPIO_Init(void)
|
|||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pin : IM1_Pin */
|
|
||||||
GPIO_InitStruct.Pin = IM1_Pin;
|
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
|
||||||
HAL_GPIO_Init(IM1_GPIO_Port, &GPIO_InitStruct);
|
|
||||||
|
|
||||||
/*Configure GPIO pin : PA11 */
|
|
||||||
GPIO_InitStruct.Pin = GPIO_PIN_11;
|
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
|
||||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
|
||||||
|
|
||||||
/*Configure GPIO pin : PA12 */
|
|
||||||
GPIO_InitStruct.Pin = GPIO_PIN_12;
|
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
|
||||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
|
||||||
|
|
||||||
/*Configure peripheral I/O remapping */
|
/*Configure peripheral I/O remapping */
|
||||||
__HAL_AFIO_REMAP_PD01_ENABLE();
|
__HAL_AFIO_REMAP_PD01_ENABLE();
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN MX_GPIO_Init_2 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END MX_GPIO_Init_2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 4 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END 4 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function is executed in case of error occurrence.
|
* @brief This function is executed in case of error occurrence.
|
||||||
@ -335,12 +319,12 @@ static void MX_GPIO_Init(void)
|
|||||||
*/
|
*/
|
||||||
void Error_Handler(void)
|
void Error_Handler(void)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Error_Handler_Debug */
|
||||||
/* User can add his own implementation to report the HAL error return state */
|
/* User can add his own implementation to report the HAL error return state */
|
||||||
__disable_irq();
|
__disable_irq();
|
||||||
while (1) {
|
while (1) {
|
||||||
}
|
}
|
||||||
/* USER CODE END */
|
/* USER CODE END Error_Handler_Debug */
|
||||||
}
|
}
|
||||||
#ifdef USE_FULL_ASSERT
|
#ifdef USE_FULL_ASSERT
|
||||||
/**
|
/**
|
||||||
@ -350,11 +334,11 @@ void Error_Handler(void)
|
|||||||
* @param line: assert_param error line source number
|
* @param line: assert_param error line source number
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void assert_failed( uint8_t * file , uint32_t line)
|
void assert_failed(uint8_t *file, uint32_t line)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 6 */
|
||||||
/* User can add his own implementation to report the file name and line number,
|
/* User can add his own implementation to report the file name and line number,
|
||||||
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
|
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
|
||||||
/* USER CODE END */
|
/* USER CODE END 6 */
|
||||||
}
|
}
|
||||||
#endif /* USE_FULL_ASSERT */
|
#endif /* USE_FULL_ASSERT */
|
||||||
|
|||||||
@ -74,7 +74,7 @@ void HAL_MspInit(void)
|
|||||||
|
|
||||||
/** DISABLE: JTAG-DP Disabled and SW-DP Disabled
|
/** DISABLE: JTAG-DP Disabled and SW-DP Disabled
|
||||||
*/
|
*/
|
||||||
__HAL_AFIO_REMAP_SWJ_DISABLE();
|
//__HAL_AFIO_REMAP_SWJ_DISABLE();
|
||||||
|
|
||||||
/* USER CODE BEGIN MspInit 1 */
|
/* USER CODE BEGIN MspInit 1 */
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#MicroXplorer Configuration settings - do not modify
|
#MicroXplorer Configuration settings - do not modify
|
||||||
CAD.formats=
|
CAD.formats=[]
|
||||||
CAD.pinconfig=
|
CAD.pinconfig=Dual
|
||||||
CAD.provider=
|
CAD.provider=
|
||||||
File.Version=6
|
File.Version=6
|
||||||
GPIO.groupedBy=Group By Peripherals
|
GPIO.groupedBy=Group By Peripherals
|
||||||
@ -80,10 +80,14 @@ PA10.GPIOParameters=GPIO_Label
|
|||||||
PA10.GPIO_Label=PB14
|
PA10.GPIO_Label=PB14
|
||||||
PA10.Locked=true
|
PA10.Locked=true
|
||||||
PA10.Signal=GPIO_Output
|
PA10.Signal=GPIO_Output
|
||||||
|
PA11.GPIOParameters=GPIO_Label
|
||||||
|
PA11.GPIO_Label=A11
|
||||||
PA11.Locked=true
|
PA11.Locked=true
|
||||||
PA11.Signal=CAN_RX
|
PA11.Signal=GPIO_Input
|
||||||
|
PA12.GPIOParameters=GPIO_Label
|
||||||
|
PA12.GPIO_Label=A12
|
||||||
PA12.Locked=true
|
PA12.Locked=true
|
||||||
PA12.Signal=CAN_TX
|
PA12.Signal=GPIO_Input
|
||||||
PA13.Locked=true
|
PA13.Locked=true
|
||||||
PA13.Signal=SYS_JTMS-SWDIO
|
PA13.Signal=SYS_JTMS-SWDIO
|
||||||
PA14.Locked=true
|
PA14.Locked=true
|
||||||
@ -108,15 +112,17 @@ PA6.Signal=SPI1_MISO
|
|||||||
PA7.Locked=true
|
PA7.Locked=true
|
||||||
PA7.Mode=Full_Duplex_Master
|
PA7.Mode=Full_Duplex_Master
|
||||||
PA7.Signal=SPI1_MOSI
|
PA7.Signal=SPI1_MOSI
|
||||||
PA8.GPIOParameters=GPIO_Speed,GPIO_Label
|
PA8.GPIOParameters=GPIO_Speed,PinState,GPIO_Label
|
||||||
PA8.GPIO_Label=IM2
|
PA8.GPIO_Label=IM2
|
||||||
PA8.GPIO_Speed=GPIO_SPEED_FREQ_LOW
|
PA8.GPIO_Speed=GPIO_SPEED_FREQ_LOW
|
||||||
PA8.Locked=true
|
PA8.Locked=true
|
||||||
|
PA8.PinState=GPIO_PIN_SET
|
||||||
PA8.Signal=GPIO_Output
|
PA8.Signal=GPIO_Output
|
||||||
PA9.GPIOParameters=GPIO_Speed,GPIO_Label
|
PA9.GPIOParameters=GPIO_Speed,PinState,GPIO_Label
|
||||||
PA9.GPIO_Label=IM1
|
PA9.GPIO_Label=IM1
|
||||||
PA9.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
PA9.GPIO_Speed=GPIO_SPEED_FREQ_LOW
|
||||||
PA9.Locked=true
|
PA9.Locked=true
|
||||||
|
PA9.PinState=GPIO_PIN_SET
|
||||||
PA9.Signal=GPIO_Output
|
PA9.Signal=GPIO_Output
|
||||||
PB0.GPIOParameters=GPIO_Label
|
PB0.GPIOParameters=GPIO_Label
|
||||||
PB0.GPIO_Label=DB1
|
PB0.GPIO_Label=DB1
|
||||||
@ -146,9 +152,10 @@ PB14.GPIOParameters=GPIO_Label
|
|||||||
PB14.GPIO_Label=DB15
|
PB14.GPIO_Label=DB15
|
||||||
PB14.Locked=true
|
PB14.Locked=true
|
||||||
PB14.Signal=GPIO_Output
|
PB14.Signal=GPIO_Output
|
||||||
PB15.GPIOParameters=GPIO_Label
|
PB15.GPIOParameters=PinState,GPIO_Label
|
||||||
PB15.GPIO_Label=IM0
|
PB15.GPIO_Label=IM0
|
||||||
PB15.Locked=true
|
PB15.Locked=true
|
||||||
|
PB15.PinState=GPIO_PIN_SET
|
||||||
PB15.Signal=GPIO_Output
|
PB15.Signal=GPIO_Output
|
||||||
PB2.GPIOParameters=GPIO_Label
|
PB2.GPIOParameters=GPIO_Label
|
||||||
PB2.GPIO_Label=DB5
|
PB2.GPIO_Label=DB5
|
||||||
@ -222,7 +229,7 @@ ProjectManager.ToolChainLocation=
|
|||||||
ProjectManager.UAScriptAfterPath=
|
ProjectManager.UAScriptAfterPath=
|
||||||
ProjectManager.UAScriptBeforePath=
|
ProjectManager.UAScriptBeforePath=
|
||||||
ProjectManager.UnderRoot=true
|
ProjectManager.UnderRoot=true
|
||||||
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_CRC_Init-CRC-false-HAL-true,4-MX_SPI1_Init-SPI1-false-HAL-true,5-MX_USART1_UART_Init-USART1-false-HAL-true
|
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_SPI1_Init-SPI1-false-HAL-true,4-MX_USART1_UART_Init-USART1-false-HAL-true
|
||||||
RCC.ADCFreqValue=32000000
|
RCC.ADCFreqValue=32000000
|
||||||
RCC.AHBFreq_Value=64000000
|
RCC.AHBFreq_Value=64000000
|
||||||
RCC.APB1CLKDivider=RCC_HCLK_DIV2
|
RCC.APB1CLKDivider=RCC_HCLK_DIV2
|
||||||
@ -242,10 +249,11 @@ RCC.SYSCLKFreq_VALUE=64000000
|
|||||||
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
|
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
|
||||||
RCC.TimSysFreq_Value=64000000
|
RCC.TimSysFreq_Value=64000000
|
||||||
RCC.USBFreq_Value=64000000
|
RCC.USBFreq_Value=64000000
|
||||||
SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_4
|
SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_16
|
||||||
SPI1.CalculateBaudRate=16.0 MBits/s
|
SPI1.CalculateBaudRate=4.0 MBits/s
|
||||||
|
SPI1.DataSize=SPI_DATASIZE_16BIT
|
||||||
SPI1.Direction=SPI_DIRECTION_2LINES
|
SPI1.Direction=SPI_DIRECTION_2LINES
|
||||||
SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,VirtualNSS,BaudRatePrescaler
|
SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,VirtualNSS,BaudRatePrescaler,DataSize
|
||||||
SPI1.Mode=SPI_MODE_MASTER
|
SPI1.Mode=SPI_MODE_MASTER
|
||||||
SPI1.VirtualNSS=VM_NSSHARD
|
SPI1.VirtualNSS=VM_NSSHARD
|
||||||
SPI1.VirtualType=VM_MASTER
|
SPI1.VirtualType=VM_MASTER
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user