Merge pull request #31 from vas-dav/pressure-wrapper

Pressure wrapper
This commit is contained in:
Evgenii Meshcheriakov 2022-10-18 12:27:41 +03:00 committed by GitHub
commit cf21bacbf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 509 additions and 14 deletions

243
PressureWrapper/.cproject Normal file
View File

@ -0,0 +1,243 @@
<?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.543912468">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.lib.debug.543912468" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/PressureWrapper"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/PressureWrapper/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="PressureWrapper" 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.543912468" 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.543912468." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.lib.debug.652754992" 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.1363551640" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.lib.debug"/>
<builder buildPath="${workspace_loc:/PressureWrapper}/Debug" id="com.crt.advproject.builder.lib.debug.333170491" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.lib.debug"/>
<tool id="com.crt.advproject.cpp.lib.debug.403617202" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.lib.debug">
<option id="com.crt.advproject.cpp.thumb.2115646861" name="Thumb mode" superClass="com.crt.advproject.cpp.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.crt.advproject.cpp.specs.1896635513" 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.1621104929" 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.215527340" 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.1357560721" 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.1051385834" 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.348153378" name="Library headers" superClass="com.crt.advproject.cpp.hdrlib" useByScannerDiscovery="false" value="Newlib" valueType="enumerated"/>
<option id="com.crt.advproject.cpp.fpu.93622861" 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.515369203" superClass="gnu.cpp.compiler.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;"/>
</option>
<option id="com.crt.advproject.cpp.misc.dialect.1923153469" superClass="com.crt.advproject.cpp.misc.dialect" value="com.crt.advproject.misc.dialect.c++11" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.cpp.input.164407064" superClass="com.crt.advproject.compiler.cpp.input"/>
</tool>
<tool id="com.crt.advproject.gcc.lib.debug.886448396" name="MCU C Compiler" superClass="com.crt.advproject.gcc.lib.debug">
<option id="com.crt.advproject.gcc.thumb.272404886" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.crt.advproject.gcc.arch.2140077347" 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.232352226" 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.522780961" 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.1991214161" 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.2034347678" superClass="gnu.c.compiler.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;"/>
</option>
<option id="com.crt.advproject.c.misc.dialect.1815267799" superClass="com.crt.advproject.c.misc.dialect" value="com.crt.advproject.misc.dialect.c11" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.hdrlib.695948885" superClass="com.crt.advproject.gcc.hdrlib" value="Newlib" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.specs.487172030" superClass="com.crt.advproject.gcc.specs" value="com.crt.advproject.gcc.specs.newlib" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.input.916893122" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool id="com.crt.advproject.gas.lib.debug.292370234" name="MCU Assembler" superClass="com.crt.advproject.gas.lib.debug">
<option id="com.crt.advproject.gas.thumb.496544588" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="com.crt.advproject.gas.arch.1774346916" 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.79392156" 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.1629080159" 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;"/>
</option>
<option id="com.crt.advproject.gas.hdrlib.1904162749" superClass="com.crt.advproject.gas.hdrlib" value="Newlib" valueType="enumerated"/>
<option id="com.crt.advproject.gas.specs.983998124" superClass="com.crt.advproject.gas.specs" value="com.crt.advproject.gas.specs.newlib" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.992070919" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="com.crt.advproject.assembler.input.1755669039" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
</tool>
<tool id="com.crt.advproject.ar.lib.debug.1343842102" 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.901231306">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.lib.release.901231306" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/PressureWrapper"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/PressureWrapper/Release"/>
<entry flags="RESOLVED" kind="libraryFile" name="PressureWrapper" 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.901231306" 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.901231306." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.lib.release.1600149439" 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.1511748992" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.lib.release"/>
<builder buildPath="${workspace_loc:/PressureWrapper}/Release" id="com.crt.advproject.builder.lib.release.803648347" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.lib.release"/>
<tool id="com.crt.advproject.cpp.lib.release.351932364" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.lib.release">
<option id="com.crt.advproject.cpp.thumb.1379684321" name="Thumb mode" superClass="com.crt.advproject.cpp.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.crt.advproject.cpp.specs.1888522439" 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.2025566513" 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.2091657069" 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.1774517979" 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.669653913" 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.428860195" superClass="gnu.cpp.compiler.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;"/>
</option>
<option id="com.crt.advproject.cpp.misc.dialect.733538287" superClass="com.crt.advproject.cpp.misc.dialect" value="com.crt.advproject.misc.dialect.c++11" valueType="enumerated"/>
<option id="com.crt.advproject.cpp.hdrlib.1694200794" superClass="com.crt.advproject.cpp.hdrlib" value="Newlib" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.cpp.input.2068166795" superClass="com.crt.advproject.compiler.cpp.input"/>
</tool>
<tool id="com.crt.advproject.gcc.lib.release.724549237" name="MCU C Compiler" superClass="com.crt.advproject.gcc.lib.release">
<option id="com.crt.advproject.gcc.thumb.1994438852" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.crt.advproject.gcc.arch.1410949420" 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.1298634363" 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.1497440472" 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.502357323" 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.1361403646" superClass="gnu.c.compiler.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;"/>
</option>
<option id="com.crt.advproject.c.misc.dialect.518476738" superClass="com.crt.advproject.c.misc.dialect" value="com.crt.advproject.misc.dialect.c11" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.hdrlib.264094283" superClass="com.crt.advproject.gcc.hdrlib" value="Newlib" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.specs.1397538967" superClass="com.crt.advproject.gcc.specs" value="com.crt.advproject.gcc.specs.newlib" valueType="enumerated"/>
<inputType id="com.crt.advproject.compiler.input.1432692338" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool id="com.crt.advproject.gas.lib.release.1020974918" name="MCU Assembler" superClass="com.crt.advproject.gas.lib.release">
<option id="com.crt.advproject.gas.thumb.858787062" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="com.crt.advproject.gas.arch.1696875009" 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.6508313" 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.1943558080" 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;"/>
</option>
<option id="com.crt.advproject.gas.hdrlib.1310058002" superClass="com.crt.advproject.gas.hdrlib" value="Newlib" valueType="enumerated"/>
<option id="com.crt.advproject.gas.specs.1543656455" superClass="com.crt.advproject.gas.specs" value="com.crt.advproject.gas.specs.newlib" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1199418080" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="com.crt.advproject.assembler.input.1457430942" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
</tool>
<tool id="com.crt.advproject.ar.lib.release.953011998" 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="PressureWrapper.com.crt.advproject.projecttype.lib.2060295894" 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>
</cproject>

28
PressureWrapper/.project Normal file
View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>PressureWrapper</name>
<comment></comment>
<projects>
<project>lpc_chip_15xx</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,78 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
-include ../makefile.init
RM := rm -rf
# All of the sources participating in the build are defined here
-include sources.mk
-include src/subdir.mk
-include subdir.mk
-include objects.mk
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif
-include ../makefile.defs
OPTIONAL_TOOL_DEPS := \
$(wildcard ../makefile.defs) \
$(wildcard ../makefile.init) \
$(wildcard ../makefile.targets) \
BUILD_ARTIFACT_NAME := PressureWrapper
BUILD_ARTIFACT_EXTENSION := a
BUILD_ARTIFACT_PREFIX := lib
BUILD_ARTIFACT := $(BUILD_ARTIFACT_PREFIX)$(BUILD_ARTIFACT_NAME)$(if $(BUILD_ARTIFACT_EXTENSION),.$(BUILD_ARTIFACT_EXTENSION),)
# Add inputs and outputs from these tool invocations to the build variables
# All Target
all:
+@$(MAKE) --no-print-directory main-build && $(MAKE) --no-print-directory post-build
# Main-build Target
main-build: libPressureWrapper.a
# Tool invocations
libPressureWrapper.a: $(OBJS) $(USER_OBJS) makefile objects.mk $(OPTIONAL_TOOL_DEPS)
@echo 'Building target: $@'
@echo 'Invoking: MCU Archiver'
arm-none-eabi-ar -r "libPressureWrapper.a" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
# Other Targets
clean:
-$(RM) $(CC_DEPS)$(C++_DEPS)$(C_UPPER_DEPS)$(CXX_DEPS)$(OBJS)$(ARCHIVES)$(CPP_DEPS)$(C_DEPS) libPressureWrapper.a
-@echo ' '
post-build:
-@echo 'Performing post-build steps'
-arm-none-eabi-size "libPressureWrapper.a" ; # arm-none-eabi-objdump -h -S "libPressureWrapper.a" >"libPressureWrapper.lss"
-@echo ' '
.PHONY: all clean dependents post-build
-include ../makefile.targets

View File

@ -0,0 +1,8 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
USER_OBJS :=
LIBS :=

View File

@ -0,0 +1,28 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
C_UPPER_SRCS :=
CXX_SRCS :=
C++_SRCS :=
OBJ_SRCS :=
S_SRCS :=
CC_SRCS :=
ASM_SRCS :=
CPP_SRCS :=
C_SRCS :=
S_UPPER_SRCS :=
O_SRCS :=
CC_DEPS :=
C++_DEPS :=
C_UPPER_DEPS :=
CXX_DEPS :=
OBJS :=
ARCHIVES :=
CPP_DEPS :=
C_DEPS :=
# Every subdirectory with source files must be described here
SUBDIRS := \
src \

View File

@ -0,0 +1,14 @@
/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/lpc_chip_15xx/inc/iocon_15xx.h:95:20:void Chip_IOCON_PinMuxSet(LPC_IOCON_T*, uint8_t, uint8_t, uint32_t) 24 static
/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/lpc_chip_15xx/inc/i2c_common_15xx.h:238:20:void Chip_I2C_SetClockDiv(LPC_I2C_T*, uint32_t) 16 static
/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/lpc_chip_15xx/inc/i2cm_15xx.h:126:20:void Chip_I2CM_Enable(LPC_I2C_T*) 16 static
/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/lpc_chip_15xx/inc/i2cm_15xx.h:160:20:void Chip_I2CM_ClearStatus(LPC_I2C_T*, uint32_t) 16 static
/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/lpc_chip_15xx/inc/i2cm_15xx.h:172:20:bool Chip_I2CM_IsMasterPending(LPC_I2C_T*) 16 static
/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/lpc_chip_15xx/inc/i2cm_15xx.h:197:20:void Chip_I2CM_SendStart(LPC_I2C_T*) 16 static
/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/lpc_chip_15xx/inc/i2cm_15xx.h:237:20:void Chip_I2CM_WriteByte(LPC_I2C_T*, uint8_t) 16 static
../src/I2C.cpp:43:1:I2C::I2C(const I2C_config&) 16 static
../src/I2C.cpp:72:1:I2C::~I2C() 16 static
../src/I2C.cpp:72:1:virtual I2C::~I2C() 16 static
../src/I2C.cpp:76:6:bool I2C::write(uint8_t, uint8_t*, uint16_t) 32 static
../src/I2C.cpp:81:6:bool I2C::read(uint8_t, uint8_t*, uint16_t) 32 static
../src/I2C.cpp:87:6:bool I2C::transaction(uint8_t, uint8_t*, uint16_t, uint8_t*, uint16_t) 40 static
../src/I2C.cpp:118:10:static uint32_t I2C::I2CM_XferBlocking(LPC_I2C_T*, I2CM_XFER_T*) 24 static

View File

@ -0,0 +1,8 @@
/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/lpc_chip_15xx/inc/core_cm3.h:1335:22:void NVIC_DisableIRQ(IRQn_Type) 16 static
/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/PressureWrapper/inc/I2C.h:18:2:I2C_config::I2C_config() 16 static
../src/PressureWrapper.cpp:10:16:uint8_t crc8(uint8_t*, size_t) 24 static
../src/PressureWrapper.cpp:24:1:PressureWrapper::PressureWrapper() 40 static
../src/PressureWrapper.cpp:32:1:PressureWrapper::~PressureWrapper() 16 static
../src/PressureWrapper.cpp:32:1:virtual PressureWrapper::~PressureWrapper() 16 static
../src/PressureWrapper.cpp:37:5:int PressureWrapper::getPressure() 16 static
../src/PressureWrapper.cpp:41:16:PRESSURE_DATA* PressureWrapper::getRawPressure() 32 static

View File

@ -0,0 +1,27 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
../src/I2C.cpp \
../src/PressureWrapper.cpp
OBJS += \
./src/I2C.o \
./src/PressureWrapper.o
CPP_DEPS += \
./src/I2C.d \
./src/PressureWrapper.d
# Each subdirectory must supply rules for building sources it contributes
src/%.o: ../src/%.cpp src/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: MCU C++ Compiler'
arm-none-eabi-c++ -DDEBUG -D__CODE_RED -D__NEWLIB__ -DCORE_M3 -D__USE_LPCOPEN -D__LPC15XX__ -I"/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/PressureWrapper/inc" -I"/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/lpc_board_nxp_lpcxpresso_1549/inc" -I"/home/tylen/Desktop/Programming/Projects_Metropolia/ESP-Ventilation/lpc_chip_15xx/inc" -O0 -fno-common -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fmerge-constants -fmacro-prefix-map="$(<D)/"= -mcpu=cortex-m3 -mthumb -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

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

@ -47,6 +47,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/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:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
</option> </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"/> <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"/> <inputType id="com.crt.advproject.compiler.cpp.input.1024506123" superClass="com.crt.advproject.compiler.cpp.input"/>
@ -77,6 +78,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/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:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
</option> </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"/> <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"/> <inputType id="com.crt.advproject.compiler.input.1491212950" superClass="com.crt.advproject.compiler.input"/>
@ -97,7 +99,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/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:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.486566022" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> <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"/> <inputType id="com.crt.advproject.assembler.input.255980151" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
@ -131,6 +133,7 @@
<listOptionValue builtIn="false" value="StateHandler"/> <listOptionValue builtIn="false" value="StateHandler"/>
<listOptionValue builtIn="false" value="Timer"/> <listOptionValue builtIn="false" value="Timer"/>
<listOptionValue builtIn="false" value="SwitchController"/> <listOptionValue builtIn="false" value="SwitchController"/>
<listOptionValue builtIn="false" value="PressureWrapper"/>
</option> </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"> <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;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1549/Debug}&quot;"/>
@ -141,6 +144,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/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:/Timer/Debug}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/Debug}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/Debug}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/Debug}&quot;"/>
</option> </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"/> <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"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.849613399" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
@ -207,6 +211,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/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:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
</option> </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"/> <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"/> <inputType id="com.crt.advproject.compiler.cpp.input.812988440" superClass="com.crt.advproject.compiler.cpp.input"/>
@ -237,6 +242,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/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:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
</option> </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"/> <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"/> <inputType id="com.crt.advproject.compiler.input.391538574" superClass="com.crt.advproject.compiler.input"/>
@ -257,6 +263,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/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:/Timer/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/inc}&quot;"/>
</option> </option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1169670567" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> <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"/> <inputType id="com.crt.advproject.assembler.input.956763731" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
@ -290,6 +297,7 @@
<listOptionValue builtIn="false" value="StateHandler"/> <listOptionValue builtIn="false" value="StateHandler"/>
<listOptionValue builtIn="false" value="Timer"/> <listOptionValue builtIn="false" value="Timer"/>
<listOptionValue builtIn="false" value="SwitchController"/> <listOptionValue builtIn="false" value="SwitchController"/>
<listOptionValue builtIn="false" value="PressureWrapper"/>
</option> </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"> <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;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1549/Release}&quot;"/>
@ -300,6 +308,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/StateHandler/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:/Timer/Release}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/Release}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/SwitchController/Release}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/PressureWrapper/Release}&quot;"/>
</option> </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"/> <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"> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1513506142" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">

View File

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

View File

@ -37,7 +37,7 @@
* this code. * this code.
*/ */
#include "../inc/I2C.h" #include "I2C.h"
I2C::I2C(const I2C_config &cfg): device(nullptr) { I2C::I2C(const I2C_config &cfg): device(nullptr) {

View File

@ -36,13 +36,26 @@ PressureWrapper::~PressureWrapper ()
} }
int PressureWrapper::getPressure() { int PressureWrapper::getPressure() {
int16_t pressure = 0;
if(!getRawPressure ()) {
unsigned int i = 0;
while(i<7200000) i++;
getRawPressure ();
i = 0;
}
if(crc8(data.rBuffer, 2) != data.crc){
pressure = data.rBuffer[0];
pressure = pressure << 8;
pressure |= data.rBuffer[1];
float result = (float) pressure * 0.95 / 240;
return (int) result;
}
return -255;
} }
PRESSURE_DATA* PressureWrapper::getRawPressure () { bool PressureWrapper::getRawPressure () {
uint8_t getMeasurementComm = 0xF1; uint8_t getMeasurementComm = 0xF1;
i2c->transaction(0x40, &getMeasurementComm, 1, data.rBuffer, 3); return (i2c->transaction(ADDRESS, &getMeasurementComm, 1, data.rBuffer, 3));
return &data;
} }

View File

@ -9,10 +9,15 @@
#define PRESSUREWRAPPER_H_ #define PRESSUREWRAPPER_H_
#include "I2C.h" #include "I2C.h"
#include <cstdio>
#define ADDRESS 0x40 #define ADDRESS 0x40
#define READADD 0x81
#define WRITEADD 0x80
/**
* @brief structure to hold a raw data from
* the pressure sensor
*/
typedef struct _PRESSURE{ typedef struct _PRESSURE{
uint8_t rBuffer[2]; uint8_t rBuffer[2];
@ -23,11 +28,8 @@ class PressureWrapper
{ {
public: public:
PressureWrapper (); PressureWrapper ();
/** /*
* @brief Get the Status object * @return pressure in Pascal
*
* @return true
* @return false
*/ */
int getPressure (); int getPressure ();
@ -36,7 +38,11 @@ public:
private: private:
I2C *i2c; I2C *i2c;
PRESSURE_DATA data = {{0, 0}, 0}; PRESSURE_DATA data = {{0, 0}, 0};
PRESSURE_DATA* getRawPressure (); /*
* @return struct with pressure data in
* rBuffer and CRC check in crc
*/
bool getRawPressure ();
}; };
#endif /* PRESSUREWRAPPER_H_ */ #endif /* PRESSUREWRAPPER_H_ */