Merge branch 'main' into pressure-wrapper

This commit is contained in:
Vasily Davydov 2022-10-17 14:47:52 +03:00 committed by GitHub
commit fc013f8dd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 429 additions and 46 deletions

268
SwitchController/.cproject Normal file
View File

@ -0,0 +1,268 @@
<?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.crt.advproject.config.lib.debug.635589349">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.lib.debug.635589349" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/SwitchController"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/SwitchController/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="SwitchController" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GNU_ELF" 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="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="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="Debug build" errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.lib.debug.635589349" name="Debug" parent="com.crt.advproject.config.lib.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;lib${BuildArtifactFileName}&quot; ; # arm-none-eabi-objdump -h -S &quot;lib${BuildArtifactFileName}&quot; &gt;&quot;${BuildArtifactFileBaseName}.lss&quot;">
<folderInfo id="com.crt.advproject.config.lib.debug.635589349." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.lib.debug.2140760951" name="NXP MCU Tools" superClass="com.crt.advproject.toolchain.lib.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.lib.debug.196257978" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.lib.debug"/>
<builder buildPath="${workspace_loc:/SwitchController}/Debug" id="com.crt.advproject.builder.lib.debug.1193962071" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.lib.debug"/>
<tool id="com.crt.advproject.cpp.lib.debug.1578552365" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.lib.debug">
<option id="com.crt.advproject.cpp.thumb.42808972" name="Thumb mode" superClass="com.crt.advproject.cpp.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.crt.advproject.cpp.specs.1719869092" name="Specs" superClass="com.crt.advproject.cpp.specs" useByScannerDiscovery="false" value="com.crt.advproject.cpp.specs.newlib" valueType="enumerated"/>
<option id="com.crt.advproject.cpp.arch.1842204631" name="Architecture" superClass="com.crt.advproject.cpp.arch" useByScannerDiscovery="true" value="com.crt.advproject.cpp.target.cm3" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.compiler.option.preprocessor.def.35080570" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
<listOptionValue builtIn="false" value="__NEWLIB__"/>
<listOptionValue builtIn="false" value="CORE_M3"/>
<listOptionValue builtIn="false" value="__USE_LPCOPEN"/>
<listOptionValue builtIn="false" value="__LPC15XX__"/>
</option>
<option id="gnu.cpp.compiler.option.other.other.1245317167" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions" valueType="string"/>
<option id="gnu.cpp.compiler.option.optimization.flags.2081311291" name="Other optimization flags" superClass="gnu.cpp.compiler.option.optimization.flags" useByScannerDiscovery="false" value="-fno-common" valueType="string"/>
<option id="com.crt.advproject.cpp.hdrlib.1685627813" name="Library headers" superClass="com.crt.advproject.cpp.hdrlib" useByScannerDiscovery="false" value="Newlib" valueType="enumerated"/>
<option id="com.crt.advproject.cpp.fpu.147933061" name="Floating point" superClass="com.crt.advproject.cpp.fpu" useByScannerDiscovery="true"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.compiler.option.include.paths.2143294611" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1549/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_15xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc://inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/DigitalIoPin/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LiquidCrystal/inc}&quot;"/>
</option>
<option id="com.crt.advproject.cpp.misc.dialect.1439270310" name="Language standard" superClass="com.crt.advproject.cpp.misc.dialect" useByScannerDiscovery="true" value="com.crt.advproject.misc.dialect.c++11" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.cpp.input.1836081321" superClass="com.crt.advproject.compiler.cpp.input"/>
</tool>
<tool id="com.crt.advproject.gcc.lib.debug.259312642" name="MCU C Compiler" superClass="com.crt.advproject.gcc.lib.debug">
<option id="com.crt.advproject.gcc.thumb.514647179" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.crt.advproject.gcc.arch.1879582437" name="Architecture" superClass="com.crt.advproject.gcc.arch" useByScannerDiscovery="true" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.preprocessor.def.symbols.552213767" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
<listOptionValue builtIn="false" value="CORE_M3"/>
<listOptionValue builtIn="false" value="__USE_LPCOPEN"/>
<listOptionValue builtIn="false" value="__LPC15XX__"/>
<listOptionValue builtIn="false" value="__NEWLIB__"/>
</option>
<option id="gnu.c.compiler.option.misc.other.755130431" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="gnu.c.compiler.option.optimization.flags.1689384638" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" useByScannerDiscovery="false" value="-fno-common" valueType="string"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.include.paths.120577390" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1549/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_15xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc://inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/DigitalIoPin/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LiquidCrystal/inc}&quot;"/>
</option>
<option id="com.crt.advproject.c.misc.dialect.1562701315" name="Language standard" superClass="com.crt.advproject.c.misc.dialect" useByScannerDiscovery="true" value="com.crt.advproject.misc.dialect.c11" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.hdrlib.1858206733" name="Library headers" superClass="com.crt.advproject.gcc.hdrlib" useByScannerDiscovery="false" value="Newlib" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.specs.509811958" name="Specs" superClass="com.crt.advproject.gcc.specs" useByScannerDiscovery="false" value="com.crt.advproject.gcc.specs.newlib" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.input.2112036038" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool id="com.crt.advproject.gas.lib.debug.931630343" name="MCU Assembler" superClass="com.crt.advproject.gas.lib.debug">
<option id="com.crt.advproject.gas.thumb.2115778133" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="com.crt.advproject.gas.arch.1339408441" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/>
<option id="gnu.both.asm.option.flags.crt.952745785" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -DDEBUG -D__CODE_RED -DCORE_M3 -D__USE_LPCOPEN -D__LPC15XX__ -D__NEWLIB__" valueType="string"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.31861287" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1549/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_15xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc://inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/DigitalIoPin/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LiquidCrystal/inc}&quot;"/>
</option>
<option id="com.crt.advproject.gas.hdrlib.679003420" name="Library headers" superClass="com.crt.advproject.gas.hdrlib" value="Newlib" valueType="enumerated"/>
<option id="com.crt.advproject.gas.specs.658181602" name="Specs" superClass="com.crt.advproject.gas.specs" value="com.crt.advproject.gas.specs.newlib" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2139380937" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="com.crt.advproject.assembler.input.1892693440" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
</tool>
<tool id="com.crt.advproject.ar.lib.debug.1620867410" name="MCU Archiver" superClass="com.crt.advproject.ar.lib.debug"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.crt.advproject.config.lib.release.1997903078">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.lib.release.1997903078" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/SwitchController"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/SwitchController/Release"/>
<entry flags="RESOLVED" kind="libraryFile" name="SwitchController" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GNU_ELF" 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="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="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="Release build" errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.lib.release.1997903078" name="Release" parent="com.crt.advproject.config.lib.release" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;lib${BuildArtifactFileName}&quot; ; # arm-none-eabi-objdump -h -S &quot;lib${BuildArtifactFileName}&quot; &gt;&quot;${BuildArtifactFileBaseName}.lss&quot;">
<folderInfo id="com.crt.advproject.config.lib.release.1997903078." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.lib.release.341038737" name="NXP MCU Tools" superClass="com.crt.advproject.toolchain.lib.release">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.lib.release.416522589" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.lib.release"/>
<builder buildPath="${workspace_loc:/SwitchController}/Release" id="com.crt.advproject.builder.lib.release.679219730" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.lib.release"/>
<tool id="com.crt.advproject.cpp.lib.release.1312591124" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.lib.release">
<option id="com.crt.advproject.cpp.thumb.771613122" name="Thumb mode" superClass="com.crt.advproject.cpp.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.crt.advproject.cpp.specs.1053608950" name="Specs" superClass="com.crt.advproject.cpp.specs" useByScannerDiscovery="false" value="com.crt.advproject.cpp.specs.newlib" valueType="enumerated"/>
<option id="com.crt.advproject.cpp.arch.1997590441" name="Architecture" superClass="com.crt.advproject.cpp.arch" useByScannerDiscovery="true" value="com.crt.advproject.cpp.target.cm3" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.compiler.option.preprocessor.def.1787439783" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="NDEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
<listOptionValue builtIn="false" value="__NEWLIB__"/>
<listOptionValue builtIn="false" value="CORE_M3"/>
<listOptionValue builtIn="false" value="__USE_LPCOPEN"/>
<listOptionValue builtIn="false" value="__LPC15XX__"/>
</option>
<option id="gnu.cpp.compiler.option.other.other.1481480731" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions" valueType="string"/>
<option id="gnu.cpp.compiler.option.optimization.flags.2082809325" name="Other optimization flags" superClass="gnu.cpp.compiler.option.optimization.flags" useByScannerDiscovery="false" value="-fno-common -Os" valueType="string"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.compiler.option.include.paths.37758451" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1549/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_15xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc://inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/DigitalIoPin/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LiquidCrystal/inc}&quot;"/>
</option>
<option id="com.crt.advproject.cpp.misc.dialect.637944562" name="Language standard" superClass="com.crt.advproject.cpp.misc.dialect" useByScannerDiscovery="true" value="com.crt.advproject.misc.dialect.c++11" valueType="enumerated"/>
<option id="com.crt.advproject.cpp.hdrlib.538882538" name="Library headers" superClass="com.crt.advproject.cpp.hdrlib" useByScannerDiscovery="false" value="Newlib" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.cpp.input.957918401" superClass="com.crt.advproject.compiler.cpp.input"/>
</tool>
<tool id="com.crt.advproject.gcc.lib.release.1056379631" name="MCU C Compiler" superClass="com.crt.advproject.gcc.lib.release">
<option id="com.crt.advproject.gcc.thumb.855040891" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.crt.advproject.gcc.arch.826134437" name="Architecture" superClass="com.crt.advproject.gcc.arch" useByScannerDiscovery="true" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.preprocessor.def.symbols.1138392333" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="NDEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
<listOptionValue builtIn="false" value="CORE_M3"/>
<listOptionValue builtIn="false" value="__USE_LPCOPEN"/>
<listOptionValue builtIn="false" value="__LPC15XX__"/>
<listOptionValue builtIn="false" value="__NEWLIB__"/>
</option>
<option id="gnu.c.compiler.option.misc.other.1233567268" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="gnu.c.compiler.option.optimization.flags.331103464" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" useByScannerDiscovery="false" value="-fno-common" valueType="string"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.include.paths.1614125517" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1549/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_15xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc://inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/DigitalIoPin/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LiquidCrystal/inc}&quot;"/>
</option>
<option id="com.crt.advproject.c.misc.dialect.1049661750" name="Language standard" superClass="com.crt.advproject.c.misc.dialect" useByScannerDiscovery="true" value="com.crt.advproject.misc.dialect.c11" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.hdrlib.334400252" name="Library headers" superClass="com.crt.advproject.gcc.hdrlib" useByScannerDiscovery="false" value="Newlib" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.specs.261101461" name="Specs" superClass="com.crt.advproject.gcc.specs" useByScannerDiscovery="false" value="com.crt.advproject.gcc.specs.newlib" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.input.210987689" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool id="com.crt.advproject.gas.lib.release.871760532" name="MCU Assembler" superClass="com.crt.advproject.gas.lib.release">
<option id="com.crt.advproject.gas.thumb.377715166" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="com.crt.advproject.gas.arch.1731966612" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/>
<option id="gnu.both.asm.option.flags.crt.157705469" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -DNDEBUG -D__CODE_RED -DCORE_M3 -D__USE_LPCOPEN -D__LPC15XX__ -D__NEWLIB__" valueType="string"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.804668342" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1549/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_15xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc://inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/DigitalIoPin/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/LiquidCrystal/inc}&quot;"/>
</option>
<option id="com.crt.advproject.gas.hdrlib.280079471" name="Library headers" superClass="com.crt.advproject.gas.hdrlib" value="Newlib" valueType="enumerated"/>
<option id="com.crt.advproject.gas.specs.284770140" name="Specs" superClass="com.crt.advproject.gas.specs" value="com.crt.advproject.gas.specs.newlib" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2009272380" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="com.crt.advproject.assembler.input.1067911307" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
</tool>
<tool id="com.crt.advproject.ar.lib.release.471677686" name="MCU Archiver" superClass="com.crt.advproject.ar.lib.release"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="SwitchController.com.crt.advproject.projecttype.lib.222385444" name="Static Library" projectType="com.crt.advproject.projecttype.lib"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="com.crt.config">
<projectStorage>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;TargetConfig&gt;
&lt;Properties property_2="LPC15xx_256K.cfx" property_3="NXP" property_4="LPC1549" property_count="5" version="100300"/&gt;
&lt;infoList vendor="NXP"&gt;
&lt;info chip="LPC1549" connectscript="LPC15RunBootRomConnect.scp" flash_driver="LPC15xx_256K.cfx" match_id="0x0" name="LPC1549" resetscript="LPC15RunBootRomReset.scp" stub="crt_emu_cm3_gen"&gt;
&lt;chip&gt;
&lt;name&gt;LPC1549&lt;/name&gt;
&lt;family&gt;LPC15xx&lt;/family&gt;
&lt;vendor&gt;NXP (formerly Philips)&lt;/vendor&gt;
&lt;reset board="None" core="Real" sys="Real"/&gt;
&lt;clock changeable="TRUE" freq="12MHz" is_accurate="TRUE"/&gt;
&lt;memory can_program="true" id="Flash" is_ro="true" type="Flash"/&gt;
&lt;memory id="RAM" type="RAM"/&gt;
&lt;memory id="Periph" is_volatile="true" type="Peripheral"/&gt;
&lt;memoryInstance derived_from="Flash" id="MFlash256" location="0x0" size="0x40000"/&gt;
&lt;memoryInstance derived_from="RAM" id="Ram0_16" location="0x2000000" size="0x4000"/&gt;
&lt;memoryInstance derived_from="RAM" id="Ram1_16" location="0x2004000" size="0x4000"/&gt;
&lt;memoryInstance derived_from="RAM" id="Ram2_4" location="0x2008000" size="0x1000"/&gt;
&lt;/chip&gt;
&lt;processor&gt;
&lt;name gcc_name="cortex-m3"&gt;Cortex-M3&lt;/name&gt;
&lt;family&gt;Cortex-M&lt;/family&gt;
&lt;/processor&gt;
&lt;/info&gt;
&lt;/infoList&gt;
&lt;/TargetConfig&gt;</projectStorage>
</storageModule>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="com.crt.advproject">
<boardId>LPCXpresso1549</boardId>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject>

1
SwitchController/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/Debug/

32
SwitchController/.project Normal file
View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>SwitchController</name>
<comment></comment>
<projects>
<project>lpc_chip_15xx</project>
<project>DigitalIoPin</project>
<project>Timer</project>
<project>StateHandler</project>
<project>LiquidCrystal</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,33 @@
/*
* SwitchController.h
*
* Created on: Oct 17, 2022
* Author: tylen
*/
#ifndef SWITCHCONTROLLER_H_
#define SWITCHCONTROLLER_H_
#include "DigitalIoPin.h"
#include "StateHandler.h"
#include "Timer.h"
class SwitchController
{
public:
SwitchController (DigitalIoPin *button, Timer *timer, StateHandler *handler,
int button_mode);
virtual ~SwitchController ();
/** Listen to switch button
*/
void listen ();
private:
DigitalIoPin *b;
Timer *t;
StateHandler *h;
bool b_state;
int b_mode;
};
#endif /* SWITCHCONTROLLER_H_ */

View File

@ -0,0 +1,32 @@
<!-- liblinks.xml
NXP LPCXpresso IDE "Smart update wizard" script file
When executed on a particular application project, will
add appropriate links to the specified library project.
Note that this script assumes that the application project
contains the standard 'Debug' and 'Release' build
configurations.
-->
<project name="" update="true">
<setting id="all.compiler.inc">
<value>${MacroStart}workspace_loc:/${ProjName}/inc${MacroEnd}</value>
</setting>
<setting id="assembler.inc">
<value>${MacroStart}workspace_loc:/${ProjName}/inc${MacroEnd}</value>
</setting>
<setting id="linker.libs">
<value>${ProjName}</value>
</setting>
<setting id="linker.paths" buildType="Debug">
<value>${MacroStart}workspace_loc:/${ProjName}/Debug${MacroEnd}</value>
</setting>
<setting id="linker.paths" buildType="Release">
<value>${MacroStart}workspace_loc:/${ProjName}/Release${MacroEnd}</value>
</setting>
<requires msg="Library project `${ProjName}` not found">
<value>${ProjName}</value>
</requires>
</project>

View File

@ -0,0 +1,37 @@
/*
* SwitchController.cpp
*
* Created on: Oct 17, 2022
* Author: tylen
*/
#include <SwitchController.h>
SwitchController::SwitchController (DigitalIoPin *button, Timer *timer,
StateHandler *handler, int button_mode)
{
b = button;
t = timer;
h = handler;
b_state = false;
b_mode = button_mode;
}
SwitchController::~SwitchController ()
{
// TODO Auto-generated destructor stub
}
void
SwitchController::listen ()
{
if (b->read ())
{
b_state = true;
}
if (!b->read () && b_state)
{
h->HandleState (Event (Event::eKey, b_mode));
b_state = false;
}
}

View File

@ -46,7 +46,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/I2C/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
</option>
<option id="com.crt.advproject.cpp.misc.dialect.1893636131" name="Language standard" superClass="com.crt.advproject.cpp.misc.dialect" useByScannerDiscovery="true" value="com.crt.advproject.misc.dialect.c++11" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.cpp.input.1024506123" superClass="com.crt.advproject.compiler.cpp.input"/>
@ -76,7 +76,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/I2C/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
</option>
<option id="com.crt.advproject.c.misc.dialect.1885316467" name="Language standard" superClass="com.crt.advproject.c.misc.dialect" useByScannerDiscovery="true" value="com.crt.advproject.misc.dialect.c11" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.input.1491212950" superClass="com.crt.advproject.compiler.input"/>
@ -96,7 +96,8 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/I2C/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.486566022" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="com.crt.advproject.assembler.input.255980151" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
@ -129,7 +130,7 @@
<listOptionValue builtIn="false" value="I2C"/>
<listOptionValue builtIn="false" value="StateHandler"/>
<listOptionValue builtIn="false" value="Timer"/>
<listOptionValue builtIn="false" value="PressureWrapper"/>
<listOptionValue builtIn="false" value="SwitchController"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.paths.804461696" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1549/Debug}&quot;"/>
@ -139,7 +140,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/I2C/Debug}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/Debug}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/Debug}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/Debug}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/Debug}&quot;"/>
</option>
<option id="com.crt.advproject.link.cpp.crpenable.8641361" name="Enable automatic placement of Code Read Protection field in image" superClass="com.crt.advproject.link.cpp.crpenable"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.849613399" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
@ -205,7 +206,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/I2C/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
</option>
<option id="com.crt.advproject.cpp.misc.dialect.1640449237" name="Language standard" superClass="com.crt.advproject.cpp.misc.dialect" useByScannerDiscovery="true" value="com.crt.advproject.misc.dialect.c++11" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.cpp.input.812988440" superClass="com.crt.advproject.compiler.cpp.input"/>
@ -235,7 +236,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/I2C/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
</option>
<option id="com.crt.advproject.c.misc.dialect.1383624929" name="Language standard" superClass="com.crt.advproject.c.misc.dialect" useByScannerDiscovery="true" value="com.crt.advproject.misc.dialect.c11" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.input.391538574" superClass="com.crt.advproject.compiler.input"/>
@ -255,7 +256,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/I2C/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1169670567" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="com.crt.advproject.assembler.input.956763731" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
@ -288,7 +289,7 @@
<listOptionValue builtIn="false" value="I2C"/>
<listOptionValue builtIn="false" value="StateHandler"/>
<listOptionValue builtIn="false" value="Timer"/>
<listOptionValue builtIn="false" value="PressureWrapper"/>
<listOptionValue builtIn="false" value="SwitchController"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.link.option.paths.245096214" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1549/Release}&quot;"/>
@ -298,7 +299,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/I2C/Release}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/Release}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Timer/Release}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/Release}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/Release}&quot;"/>
</option>
<option id="com.crt.advproject.link.cpp.crpenable.209534913" name="Enable automatic placement of Code Read Protection field in image" superClass="com.crt.advproject.link.cpp.crpenable"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1513506142" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">

View File

@ -10,7 +10,7 @@
<project>I2C</project>
<project>StateHandler</project>
<project>Timer</project>
<project>PressureWrapper</project>
<project>SwitchController</project>
</projects>
<buildSpec>
<buildCommand>

View File

@ -19,6 +19,7 @@
#include "DigitalIoPin.h"
#include "LiquidCrystal.h"
#include "StateHandler.h"
#include "SwitchController.h"
#include "Timer.h"
#include "PressureWrapper.h"
#include "I2C.h"
@ -46,6 +47,7 @@ main (void)
#endif
/** Lcd & stateHandler */
Chip_RIT_Init (LPC_RITIMER);
Timer glob_time;
DigitalIoPin rs (0, 29, false, true, false);
DigitalIoPin en (0, 9, false, true, false);
DigitalIoPin d4 (0, 10, false, true, false);
@ -60,11 +62,15 @@ main (void)
/** Common pins */
DigitalIoPin b_up (0, 7, true, true, true); // A5
bool b_up_state = false;
SwitchController sw_up (&b_up, &glob_time, &ventMachine, BUTTON_CONTROL_UP);
DigitalIoPin b_down (0, 6, true, true, true); // A4
bool b_down_state = false;
SwitchController sw_down (&b_down, &glob_time, &ventMachine,
BUTTON_CONTROL_DOWN);
DigitalIoPin b_toggle (0, 5, true, true, true); // A3
bool b_toggle_state = false;
SwitchController sw_toggle (&b_toggle, &glob_time, &ventMachine,
BUTTON_CONTROL_TOG_MODE);
// NVIC_DisableIRQ(I2C0_IRQn);
@ -75,45 +81,18 @@ main (void)
PRESSURE_DATA *pressure;
pressure = sens.getPressure();
Timer glob_time;
while (1)
{
if (b_up.read ())
{
b_up_state = true;
}
if (!b_up.read () && b_up_state)
{
ventMachine.HandleState (Event (Event::eKey, BUTTON_CONTROL_UP));
b_up_state = false;
}
if (b_down.read ())
{
b_down_state = true;
}
if (!b_down.read () && b_down_state)
{
ventMachine.HandleState (Event (Event::eKey, BUTTON_CONTROL_DOWN));
b_down_state = false;
}
if (b_toggle.read ())
{
b_toggle_state = true;
}
if (!b_toggle.read () && b_toggle_state)
{
ventMachine.HandleState (
Event (Event::eKey, BUTTON_CONTROL_TOG_MODE));
b_toggle_state = false;
}
sw_up.listen ();
sw_down.listen ();
sw_toggle.listen ();
/**
* TODO:
* - Update current pressure to eTick
*/
ventMachine.HandleState (Event (Event::eTick, pressure->rBuffer[1]));
glob_time.tickCounter(1);
ventMachine.HandleState (Event (Event::eTick, pressure));
glob_time.tickCounter (1);
}
return 0;