add some fils

master
Ondřej Hruška 7 years ago
parent d0048dcfb2
commit 2cad6ccf4d
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 99
      .cproject
  2. 0
      .gitignore
  3. 0
      .mxproject
  4. 0
      .project
  5. 4
      .settings/language.settings.xml
  6. 0
      .settings/org.eclipse.cdt.codan.core.prefs
  7. 28
      Bees3 Debug.cfg
  8. 0
      CMakeLists.txt
  9. 0
      Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l073xx.h
  10. 0
      Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l0xx.h
  11. 0
      Drivers/CMSIS/Device/ST/STM32L0xx/Include/system_stm32l0xx.h
  12. 0
      Drivers/CMSIS/Include/arm_common_tables.h
  13. 0
      Drivers/CMSIS/Include/arm_const_structs.h
  14. 0
      Drivers/CMSIS/Include/arm_math.h
  15. 0
      Drivers/CMSIS/Include/cmsis_armcc.h
  16. 0
      Drivers/CMSIS/Include/cmsis_armcc_V6.h
  17. 0
      Drivers/CMSIS/Include/cmsis_gcc.h
  18. 0
      Drivers/CMSIS/Include/core_cm0.h
  19. 0
      Drivers/CMSIS/Include/core_cm0plus.h
  20. 0
      Drivers/CMSIS/Include/core_cm3.h
  21. 0
      Drivers/CMSIS/Include/core_cm4.h
  22. 0
      Drivers/CMSIS/Include/core_cm7.h
  23. 0
      Drivers/CMSIS/Include/core_cmFunc.h
  24. 0
      Drivers/CMSIS/Include/core_cmInstr.h
  25. 0
      Drivers/CMSIS/Include/core_cmSimd.h
  26. 0
      Drivers/CMSIS/Include/core_sc000.h
  27. 0
      Drivers/CMSIS/Include/core_sc300.h
  28. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
  29. 73
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32_assert_template-h
  30. 4
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal.h
  31. 1137
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_adc.h
  32. 229
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_adc_ex.h
  33. 683
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_comp.h
  34. 89
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_comp_ex.h
  35. 314
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_conf_template.h
  36. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_cortex.h
  37. 382
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_crc.h
  38. 174
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_crc_ex.h
  39. 427
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_cryp.h
  40. 97
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_cryp_ex.h
  41. 441
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_dac.h
  42. 183
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_dac_ex.h
  43. 2
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_def.h
  44. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_dma.h
  45. 384
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_firewall.h
  46. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_flash.h
  47. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_flash_ex.h
  48. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_flash_ramfunc.h
  49. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_gpio.h
  50. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_gpio_ex.h
  51. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_i2c.h
  52. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_i2c_ex.h
  53. 479
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_i2s.h
  54. 843
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_irda.h
  55. 209
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_irda_ex.h
  56. 255
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_iwdg.h
  57. 804
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_lcd.h
  58. 743
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_lptim.h
  59. 133
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_lptim_ex.h
  60. 808
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pcd.h
  61. 115
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pcd_ex.h
  62. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pwr.h
  63. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pwr_ex.h
  64. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rcc.h
  65. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rcc_ex.h
  66. 308
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rng.h
  67. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rtc.h
  68. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rtc_ex.h
  69. 1095
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_smartcard.h
  70. 188
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_smartcard_ex.h
  71. 699
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_smbus.h
  72. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_spi.h
  73. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_tim.h
  74. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_tim_ex.h
  75. 659
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_tsc.h
  76. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_uart.h
  77. 0
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_uart_ex.h
  78. 710
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_usart.h
  79. 297
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_usart_ex.h
  80. 283
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_wwdg.h
  81. 4049
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_adc.h
  82. 1187
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_bus.h
  83. 721
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_comp.h
  84. 606
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_cortex.h
  85. 477
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_crc.h
  86. 814
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_crs.h
  87. 1434
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_dac.h
  88. 2153
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_dma.h
  89. 1032
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_exti.h
  90. 959
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_gpio.h
  91. 2244
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_i2c.h
  92. 361
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_iwdg.h
  93. 1380
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_lptim.h
  94. 2153
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_lpuart.h
  95. 759
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_pwr.h
  96. 2514
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_rcc.h
  97. 353
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_rng.h
  98. 3860
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_rtc.h
  99. 2036
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_spi.h
  100. 1108
      Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_ll_system.h
  101. Some files were not shown because too many files have changed in this diff Show More

@ -38,12 +38,20 @@
<listOptionValue builtIn="false" value="../Drivers/STM32L0xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32L0xx/Include"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Core"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Crypto"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Mac"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Phy"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Utilities"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Mac/region"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.248526217" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__weak=&quot;__attribute__((weak))&quot;"/>
<listOptionValue builtIn="false" value="__packed=&quot;__attribute__((__packed__))&quot;"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32L073xx"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER=1"/>
<listOptionValue builtIn="false" value="STM32L073xx=1"/>
<listOptionValue builtIn="false" value="ARM_MATH_CM0=1"/>
<listOptionValue builtIn="false" value="REGION_EU868=1"/>
</option>
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.misc.other.193137038" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-fmessage-length=0" valueType="string"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.336960885" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
@ -72,11 +80,90 @@
</tool>
</toolChain>
</folderInfo>
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1636346117.1680818898" name="/" resourcePath="Drivers/BSP/Components/sx1272">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.1085503164" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug" unusedChildren="">
<option id="fr.ac6.managedbuild.option.gnu.cross.prefix.791131379.1458908717" name="Prefix" superClass="fr.ac6.managedbuild.option.gnu.cross.prefix.791131379"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.2087208385.87840295" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu.2087208385"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.465889387.915431321" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board.465889387"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.instructionSet.1756422888.2056861028" name="Instruction Set" superClass="fr.ac6.managedbuild.option.gnu.cross.instructionSet.1756422888"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.429835822.751588825" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu.429835822"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.1613299758.1358594047" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi.1613299758"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.682286040" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.377147677">
<option id="gnu.c.compiler.option.include.paths.1407158377" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32L0xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32L0xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32L0xx/Include"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Core"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Crypto"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Mac"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Phy"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Utilities"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Mac/region"/>
<listOptionValue builtIn="false" value="../Drivers/BSP/Components/sx1272"/>
<listOptionValue builtIn="false" value="../Drivers/BSP/sx1272mb2das/"/>
</option>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1786322897" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.2069713447" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.23580943" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1942740107"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1985391927" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1585341127"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.753463299" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.996257263"/>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.1425870723" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver.883778798"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.1532531737" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.471130259">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.789657598" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1125779733" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<fileInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1636346117.1230981831" name="sx1272mb2das.c" rcbsApplicability="disable" resourcePath="Drivers/BSP/sx1272mb2das/sx1272mb2das.c" toolsToInvoke="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.377147677.890206082">
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.377147677.890206082" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.377147677">
<option id="gnu.c.compiler.option.include.paths.1630368414" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32L0xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32L0xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32L0xx/Include"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Core"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Crypto"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Mac"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Phy"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Utilities"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/Lora/Mac/region"/>
<listOptionValue builtIn="false" value="../Drivers/BSP/Components/sx1272"/>
<listOptionValue builtIn="false" value="../Drivers/BSP/sx1272mb2das"/>
</option>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1713066265" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1095488994" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
</fileInfo>
<fileInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1636346117.891745609" name="low_power.c" rcbsApplicability="disable" resourcePath="Middlewares/Third_Party/Lora/Utilities/low_power.c" toolsToInvoke="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.377147677.463780228">
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.377147677.463780228" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.377147677">
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1938548990" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__weak=&quot;__attribute__((weak))&quot;"/>
<listOptionValue builtIn="false" value="__packed=&quot;__attribute__((__packed__))&quot;"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER=1"/>
<listOptionValue builtIn="false" value="STM32L073xx=1"/>
<listOptionValue builtIn="false" value="ARM_MATH_CM0=1"/>
<listOptionValue builtIn="false" value="REGION_EU868=1"/>
<listOptionValue builtIn="false" value="DEBUG=1"/>
</option>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.998724722" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1992215065" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
</fileInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="startup"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Inc"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Middlewares/Third_Party/Lora/Core"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Middlewares/Third_Party/Lora/Crypto"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Middlewares/Third_Party/Lora/Mac"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Middlewares/Third_Party/Lora/Phy"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Middlewares/Third_Party/Lora/Utilities"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="startup"/>
</sourceEntries>
</configuration>
</storageModule>
@ -154,10 +241,10 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="startup"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Inc"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="startup"/>
</sourceEntries>
</configuration>
</storageModule>

@ -6,7 +6,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1176636128779449975" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1807606491226787064" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@ -18,7 +18,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1176636128779449975" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1807606491226787064" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

@ -0,0 +1,28 @@
# This is an NUCLEO-L073RZ board with a single STM32L073RZTx chip
#
# Generated by System Workbench for STM32
# Take care that such file, as generated, may be overridden without any early notice. Please have a look to debug launch configuration setup(s)
source [find interface/stlink.cfg]
set WORKAREASIZE 0x5000
transport select "hla_swd"
set CHIPNAME STM32L073RZTx
# Enable debug when in low power modes
set ENABLE_LOW_POWER 1
# Stop Watchdog counters when halt
set STOP_WATCHDOG 1
# STlink Debug clock frequency
set CLOCK_FREQ 4000
# use hardware reset, connect under reset
# connect_assert_srst needed if low power mode application running (WFI...)
reset_config srst_only srst_nogate connect_assert_srst
set CONNECT_UNDER_RESET 1
source [find target/stm32l0x.cfg]

@ -0,0 +1,73 @@
/**
******************************************************************************
* @file stm32_assert.h
* @author MCD Application Team
* @brief STM32 assert template file.
* This file should be copied to the application folder and renamed
* to stm32_assert.h.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32_ASSERT_H
#define __STM32_ASSERT_H
#ifdef __cplusplus
extern "C" {
#endif
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Includes ------------------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function
* which reports the name of the source file and the source
* line number of the call that failed.
* If expr is true, it returns no value.
* @retval None
*/
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t* file, uint32_t line);
#else
#define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */
#ifdef __cplusplus
}
#endif
#endif /* __STM32_ASSERT_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

@ -43,10 +43,6 @@
#endif
/* Includes ------------------------------------------------------------------*/
// added
#include <stm32l073xx.h>
#include "stm32l0xx_hal_conf.h"
/** @addtogroup STM32L0xx_HAL_Driver

File diff suppressed because it is too large Load Diff

@ -0,0 +1,229 @@
/**
******************************************************************************
* @file stm32l0xx_hal_adc_ex.h
* @author MCD Application Team
* @brief Header file of ADC HAL extended module.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32L0xx_HAL_ADC_EX_H
#define __STM32L0xx_HAL_ADC_EX_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32l0xx_hal_def.h"
/** @addtogroup STM32L0xx_HAL_Driver
* @{
*/
/** @addtogroup ADCEx
* @{
*/
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/** @defgroup ADCEx_Exported_Constants ADC Extended Exported Constants
* @{
*/
/** @defgroup ADCEx_Channel_Mode ADC Single Ended
* @{
*/
#define ADC_SINGLE_ENDED (uint32_t)0x00000000U /* dummy value */
/**
* @}
*/
/** @defgroup ADC_regular_external_trigger_source ADC External Trigger Source
* @{
*/
#define ADC_EXTERNALTRIGCONV_T6_TRGO ((uint32_t)0x00000000U)
#define ADC_EXTERNALTRIGCONV_T21_CC2 (ADC_CFGR1_EXTSEL_0)
#define ADC_EXTERNALTRIGCONV_T2_TRGO (ADC_CFGR1_EXTSEL_1)
#define ADC_EXTERNALTRIGCONV_T2_CC4 (ADC_CFGR1_EXTSEL_1 | ADC_CFGR1_EXTSEL_0)
#define ADC_EXTERNALTRIGCONV_T22_TRGO (ADC_CFGR1_EXTSEL_2)
#define ADC_EXTERNALTRIGCONV_T3_TRGO (ADC_CFGR1_EXTSEL_2 | ADC_CFGR1_EXTSEL_1)
#define ADC_EXTERNALTRIGCONV_EXT_IT11 (ADC_CFGR1_EXTSEL_2 | ADC_CFGR1_EXTSEL_1 | ADC_CFGR1_EXTSEL_0)
#define ADC_SOFTWARE_START (ADC_CFGR1_EXTSEL + (uint32_t)1)
/* ADC group regular external trigger TIM21_TRGO available only on */
/* STM32L0 devices categories: Cat.2, Cat.3, Cat.5 */
#if defined (STM32L031xx) || defined (STM32L041xx) || \
defined (STM32L051xx) || defined (STM32L052xx) || defined (STM32L053xx) || \
defined (STM32L061xx) || defined (STM32L062xx) || defined (STM32L063xx) || \
defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) || \
defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define ADC_EXTERNALTRIGCONV_T21_TRGO (ADC_EXTERNALTRIGCONV_T22_TRGO)
#endif
/* ADC group regular external trigger TIM2_CC3 available only on */
/* STM32L0 devices categories: Cat.1, Cat.2, Cat.5 */
#if defined (STM32L011xx) || defined (STM32L021xx) || \
defined (STM32L031xx) || defined (STM32L041xx) || \
defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) || \
defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define ADC_EXTERNALTRIGCONV_T2_CC3 (ADC_CFGR1_EXTSEL_2 | ADC_CFGR1_EXTSEL_0)
#endif
/**
* @}
*/
/** @defgroup ADC_SYSCFG_internal_paths_flags_definition ADC SYSCFG internal paths Flags Definition
* @{
*/
#define ADC_FLAG_SENSOR SYSCFG_CFGR3_VREFINT_RDYF
#define ADC_FLAG_VREFINT SYSCFG_VREFINT_ADC_RDYF
/**
* @}
*/
/**
* @}
*/
/* Private macros ------------------------------------------------------------*/
/** @defgroup ADCEx_Private_Macros ADCEx Private Macros
* @{
*/
#define IS_ADC_SINGLE_DIFFERENTIAL(SING_DIFF) ((SING_DIFF) == ADC_SINGLE_ENDED)
/** @defgroup ADCEx_calibration_factor_length_verification ADC Calibration Factor Length Verification
* @{
*/
/**
* @brief Calibration factor length verification (7 bits maximum)
* @param _Calibration_Factor_: Calibration factor value
* @retval None
*/
#define IS_ADC_CALFACT(_Calibration_Factor_) ((_Calibration_Factor_) <= ((uint32_t)0x7FU))
/**
* @}
*/
/** @defgroup ADC_External_trigger_Source ADC External Trigger Source
* @{
*/
#if defined (STM32L031xx) || defined (STM32L041xx) || \
defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) || \
defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx)
#define IS_ADC_EXTTRIG(CONV) (((CONV) == ADC_EXTERNALTRIGCONV_T6_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T21_CC2 ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T2_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T2_CC4 ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T22_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T21_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T2_CC3 ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T3_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_EXT_IT11 ) || \
((CONV) == ADC_SOFTWARE_START))
#elif defined (STM32L011xx) || defined (STM32L021xx)
#define IS_ADC_EXTTRIG(CONV) (((CONV) == ADC_EXTERNALTRIGCONV_T6_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T21_CC2 ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T2_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T2_CC4 ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T22_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T2_CC3 ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T3_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_EXT_IT11 ) || \
((CONV) == ADC_SOFTWARE_START))
#elif defined (STM32L051xx) || defined (STM32L052xx) || defined (STM32L053xx) || \
defined (STM32L061xx) || defined (STM32L062xx) || defined (STM32L063xx)
#define IS_ADC_EXTTRIG(CONV) (((CONV) == ADC_EXTERNALTRIGCONV_T6_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T21_CC2 ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T2_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T2_CC4 ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T22_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T21_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_T3_TRGO ) || \
((CONV) == ADC_EXTERNALTRIGCONV_EXT_IT11 ) || \
((CONV) == ADC_SOFTWARE_START))
#endif
/**
* @}
*/
/**
* @}
*/
/* Exported functions --------------------------------------------------------*/
/** @addtogroup ADCEx_Exported_Functions
* @{
*/
/** @addtogroup ADCEx_Exported_Functions_Group1
* @{
*/
/* IO operation functions *****************************************************/
/* ADC calibration */
HAL_StatusTypeDef HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef* hadc, uint32_t SingleDiff);
uint32_t HAL_ADCEx_Calibration_GetValue(ADC_HandleTypeDef* hadc, uint32_t SingleDiff);
HAL_StatusTypeDef HAL_ADCEx_Calibration_SetValue(ADC_HandleTypeDef* hadc, uint32_t SingleDiff, uint32_t CalibrationFactor);
/* ADC VrefInt and Temperature sensor functions specific to this STM32 serie */
HAL_StatusTypeDef HAL_ADCEx_EnableVREFINT(void);
void HAL_ADCEx_DisableVREFINT(void);
HAL_StatusTypeDef HAL_ADCEx_EnableVREFINTTempSensor(void);
void HAL_ADCEx_DisableVREFINTTempSensor(void);
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /*__STM32L0xx_HAL_ADC_EX_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

@ -0,0 +1,683 @@
/**
******************************************************************************
* @file stm32l0xx_hal_comp.h
* @author MCD Application Team
* @brief Header file of COMP HAL module.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32L0xx_HAL_COMP_H
#define __STM32L0xx_HAL_COMP_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32l0xx_hal_def.h"
/** @addtogroup STM32L0xx_HAL_Driver
* @{
*/
/** @addtogroup COMP
* @{
*/
/* Exported types ------------------------------------------------------------*/
/** @defgroup COMP_Exported_Types COMP Exported Types
* @{
*/
/**
* @brief COMP Init structure definition
*/
typedef struct
{
uint32_t WindowMode; /*!< Set window mode of a pair of comparators instances
(2 consecutive instances odd and even COMP<x> and COMP<x+1>).
Note: HAL COMP driver allows to set window mode from any COMP instance of the pair of COMP instances composing window mode.
This parameter can be a value of @ref COMP_WindowMode */
uint32_t Mode; /*!< Set comparator operating mode to adjust power and speed.
Note: For the characteritics of comparator power modes
(propagation delay and power consumption), refer to device datasheet.
This parameter can be a value of @ref COMP_PowerMode */
uint32_t NonInvertingInput; /*!< Set comparator input plus (non-inverting input).
This parameter can be a value of @ref COMP_InputPlus */
uint32_t InvertingInput; /*!< Set comparator input minus (inverting input).
This parameter can be a value of @ref COMP_InputMinus */
uint32_t OutputPol; /*!< Set comparator output polarity.
This parameter can be a value of @ref COMP_OutputPolarity */
uint32_t LPTIMConnection; /*!< Set comparator output connection to LPTIM peripheral.
This parameter can be a value of @ref COMP_LPTIMConnection */
uint32_t TriggerMode; /*!< Set the comparator output triggering External Interrupt Line (EXTI).
This parameter can be a value of @ref COMP_EXTI_TriggerMode */
}COMP_InitTypeDef;
/**
* @brief HAL COMP state machine: HAL COMP states definition
*/
#define COMP_STATE_BITFIELD_LOCK ((uint32_t)0x10)
typedef enum
{
HAL_COMP_STATE_RESET = 0x00U, /*!< COMP not yet initialized */
HAL_COMP_STATE_RESET_LOCKED = (HAL_COMP_STATE_RESET | COMP_STATE_BITFIELD_LOCK), /*!< COMP not yet initialized and configuration is locked */
HAL_COMP_STATE_READY = 0x01U, /*!< COMP initialized and ready for use */
HAL_COMP_STATE_READY_LOCKED = (HAL_COMP_STATE_READY | COMP_STATE_BITFIELD_LOCK), /*!< COMP initialized but configuration is locked */
HAL_COMP_STATE_BUSY = 0x02U, /*!< COMP is running */
HAL_COMP_STATE_BUSY_LOCKED = (HAL_COMP_STATE_BUSY | COMP_STATE_BITFIELD_LOCK) /*!< COMP is running and configuration is locked */
}HAL_COMP_StateTypeDef;
/**
* @brief COMP Handle Structure definition
*/
typedef struct
{
COMP_TypeDef *Instance; /*!< Register base address */
COMP_InitTypeDef Init; /*!< COMP required parameters */
HAL_LockTypeDef Lock; /*!< Locking object */
__IO HAL_COMP_StateTypeDef State; /*!< COMP communication state */
} COMP_HandleTypeDef;
/**
* @}
*/
/* Exported constants --------------------------------------------------------*/
/** @defgroup COMP_Exported_Constants COMP Exported Constants
* @{
*/
/** @defgroup COMP_WindowMode COMP Window Mode
* @{
*/
#define COMP_WINDOWMODE_DISABLE ((uint32_t)0x00000000U) /*!< Window mode disable: Comparators instances pair COMP1 and COMP2 are independent */
#define COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP_CSR_COMP1WM) /*!< Window mode enable: Comparators instances pair COMP1 and COMP2 have their input plus connected together. The common input is COMP1 input plus (COMP2 input plus is no more accessible). */
/**
* @}
*/
/** @defgroup COMP_PowerMode COMP power mode
* @{
*/
/* Note: For the characteritics of comparator power modes */
/* (propagation delay and power consumption), */
/* refer to device datasheet. */
#define COMP_POWERMODE_MEDIUMSPEED (COMP_CSR_COMP2SPEED) /*!< COMP power mode to low power (indicated as "high speed" in reference manual) (only for COMP instance: COMP2) */
#define COMP_POWERMODE_ULTRALOWPOWER ((uint32_t)0x00000000U) /*!< COMP power mode to ultra low power (indicated as "low speed" in reference manual) (only for COMP instance: COMP2) */
/**
* @}
*/
/** @defgroup COMP_InputPlus COMP input plus (non-inverting input)
* @{
*/
#define COMP_INPUT_PLUS_IO1 ((uint32_t)0x00000000U) /*!< Comparator input plus connected to IO1 (pin PA1 for COMP1, pin PA3 for COMP2) */
#define COMP_INPUT_PLUS_IO2 (COMP_CSR_COMP2INPSEL_0) /*!< Comparator input plus connected to IO2 (pin PB4 for COMP2) (only for COMP instance: COMP2) */
#define COMP_INPUT_PLUS_IO3 (COMP_CSR_COMP2INPSEL_1) /*!< Comparator input plus connected to IO3 (pin PA5 for COMP2) (only for COMP instance: COMP2) */
#define COMP_INPUT_PLUS_IO4 (COMP_CSR_COMP2INPSEL_0 | COMP_CSR_COMP2INPSEL_1) /*!< Comparator input plus connected to IO4 (pin PB6 for COMP2) (only for COMP instance: COMP2) */
#define COMP_INPUT_PLUS_IO5 (COMP_CSR_COMP2INPSEL_2) /*!< Comparator input plus connected to IO5 (pin PB7 for COMP2) (only for COMP instance: COMP2) */
#if defined (STM32L011xx) || defined (STM32L021xx)
#define COMP_INPUT_PLUS_IO6 (COMP_CSR_COMP2INPSEL_2 | COMP_CSR_COMP2INPSEL_0) /*!< Comparator input plus connected to IO6 (pin PA7 for COMP2) (only for COMP instance: COMP2) (Available only on devices STM32L0 category 1) */
#endif
/**
* @}
*/
/** @defgroup COMP_InputMinus COMP input minus (inverting input)
* @{
*/
#define COMP_INPUT_MINUS_1_4VREFINT (COMP_CSR_COMP2INNSEL_2 ) /*!< Comparator input minus connected to 1/4 VREFINT (only for COMP instance: COMP2) */
#define COMP_INPUT_MINUS_1_2VREFINT (COMP_CSR_COMP2INNSEL_2 | COMP_CSR_COMP2INNSEL_0) /*!< Comparator input minus connected to 1/2 VREFINT (only for COMP instance: COMP2) */
#define COMP_INPUT_MINUS_3_4VREFINT (COMP_CSR_COMP2INNSEL_2 | COMP_CSR_COMP2INNSEL_1 ) /*!< Comparator input minus connected to 3/4 VREFINT (only for COMP instance: COMP2) */
#define COMP_INPUT_MINUS_VREFINT ((uint32_t)0x00000000U) /*!< Comparator input minus connected to VrefInt */
#define COMP_INPUT_MINUS_DAC1_CH1 ( COMP_CSR_COMP2INNSEL_1 ) /*!< Comparator input minus connected to DAC1 channel 1 (DAC_OUT1) */
#define COMP_INPUT_MINUS_DAC1_CH2 ( COMP_CSR_COMP2INNSEL_1 | COMP_CSR_COMP2INNSEL_0) /*!< Comparator input minus connected to DAC1 channel 2 (DAC_OUT2) */
#define COMP_INPUT_MINUS_IO1 ( COMP_CSR_COMP2INNSEL_0) /*!< Comparator input minus connected to IO1 (pin PA0 for COMP1, pin PA2 for COMP2) */
#define COMP_INPUT_MINUS_IO2 (COMP_CSR_COMP2INNSEL_2 | COMP_CSR_COMP2INNSEL_1 | COMP_CSR_COMP2INNSEL_0) /*!< Comparator input minus connected to IO2 (pin PB3 for COMP2) (only for COMP instance: COMP2) */
/**
* @}
*/
/** @defgroup COMP_LPTIMConnection COMP Low power timer connection definition
* @{
*/
#define COMP_LPTIMCONNECTION_DISABLED ((uint32_t)0x00000000U) /*!< COMPx signal is gated */
#define COMP_LPTIMCONNECTION_IN1_ENABLED ((uint32_t)0x00000001U) /*!< COMPx signal is connected to LPTIM input 1 */
#define COMP_LPTIMCONNECTION_IN2_ENABLED ((uint32_t)0x00000002U) /*!< COMPx signal is connected to LPTIM input 2 */
/**
* @}
*/
/** @defgroup COMP_OutputPolarity COMP output Polarity
* @{
*/
#define COMP_OUTPUTPOL_NONINVERTED ((uint32_t)0x00000000U) /*!< COMP output on GPIO isn't inverted */
#define COMP_OUTPUTPOL_INVERTED COMP_CSR_COMPxPOLARITY /*!< COMP output on GPIO is inverted */
/**
* @}
*/
/** @defgroup COMP_OutputLevel COMP Output Level
* @{
*/
/* Note: Comparator output level values are fixed to "0" and "1", */
/* corresponding COMP register bit is managed by HAL function to match */
/* with these values (independently of bit position in register). */
/* When output polarity is not inverted, comparator output is low when
the input plus is at a lower voltage than the input minus */
#define COMP_OUTPUT_LEVEL_LOW ((uint32_t)0x00000000U)
/* When output polarity is not inverted, comparator output is high when
the input plus is at a higher voltage than the input minus */
#define COMP_OUTPUT_LEVEL_HIGH ((uint32_t)0x00000001U)
/**
* @}
*/
/** @defgroup COMP_EXTI_TriggerMode COMP output to EXTI
* @{
*/
#define COMP_TRIGGERMODE_NONE ((uint32_t)0x00000000U) /*!< Comparator output triggering no External Interrupt Line */
#define COMP_TRIGGERMODE_IT_RISING (COMP_EXTI_IT | COMP_EXTI_RISING) /*!< Comparator output triggering External Interrupt Line event with interruption, on rising edge */
#define COMP_TRIGGERMODE_IT_FALLING (COMP_EXTI_IT | COMP_EXTI_FALLING) /*!< Comparator output triggering External Interrupt Line event with interruption, on falling edge */
#define COMP_TRIGGERMODE_IT_RISING_FALLING (COMP_EXTI_IT | COMP_EXTI_RISING | COMP_EXTI_FALLING) /*!< Comparator output triggering External Interrupt Line event with interruption, on both rising and falling edges */
#define COMP_TRIGGERMODE_EVENT_RISING (COMP_EXTI_EVENT | COMP_EXTI_RISING) /*!< Comparator output triggering External Interrupt Line event only (without interruption), on rising edge */
#define COMP_TRIGGERMODE_EVENT_FALLING (COMP_EXTI_EVENT | COMP_EXTI_FALLING) /*!< Comparator output triggering External Interrupt Line event only (without interruption), on falling edge */
#define COMP_TRIGGERMODE_EVENT_RISING_FALLING (COMP_EXTI_EVENT | COMP_EXTI_RISING | COMP_EXTI_FALLING) /*!< Comparator output triggering External Interrupt Line event only (without interruption), on both rising and falling edges */
/**
* @}
*/
/**
* @}
*/
/* Exported macro ------------------------------------------------------------*/
/** @defgroup COMP_Exported_Macros COMP Exported Macros
* @{
*/
/** @defgroup COMP_Handle_Management COMP Handle Management
* @{
*/
/** @brief Reset COMP handle state.
* @param __HANDLE__ COMP handle
* @retval None
*/
#define __HAL_COMP_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_COMP_STATE_RESET)
/**
* @brief Enable the specified comparator.
* @param __HANDLE__ COMP handle
* @retval None
*/
#define __HAL_COMP_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_COMPxEN)
/**
* @brief Disable the specified comparator.
* @param __HANDLE__ COMP handle
* @retval None
*/
#define __HAL_COMP_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_COMPxEN)
/**
* @brief Lock the specified comparator configuration.
* @note Using this macro induce HAL COMP handle state machine being no
* more in line with COMP instance state.
* To keep HAL COMP handle state machine updated, it is recommended
* to use function "HAL_COMP_Lock')".
* @param __HANDLE__ COMP handle
* @retval None
*/
#define __HAL_COMP_LOCK(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_COMPxLOCK)
/**
* @brief Check whether the specified comparator is locked.
* @param __HANDLE__ COMP handle
* @retval Value 0 if COMP instance is not locked, value 1 if COMP instance is locked
*/
#define __HAL_COMP_IS_LOCKED(__HANDLE__) (READ_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_COMPxLOCK) == COMP_CSR_COMPxLOCK)
/**
* @}
*/
/** @defgroup COMP_Exti_Management COMP external interrupt line management
* @{
*/
/**
* @brief Enable the COMP1 EXTI line rising edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR, COMP_EXTI_LINE_COMP1)
/**
* @brief Disable the COMP1 EXTI line rising edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR, COMP_EXTI_LINE_COMP1)
/**
* @brief Enable the COMP1 EXTI line falling edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR, COMP_EXTI_LINE_COMP1)
/**
* @brief Disable the COMP1 EXTI line falling edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR, COMP_EXTI_LINE_COMP1)
/**
* @brief Enable the COMP1 EXTI line rising & falling edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
__HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE(); \
__HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE(); \
} while(0)
/**
* @brief Disable the COMP1 EXTI line rising & falling edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
__HAL_COMP_COMP1_EXTI_DISABLE_RISING_EDGE(); \
__HAL_COMP_COMP1_EXTI_DISABLE_FALLING_EDGE(); \
} while(0)
/**
* @brief Enable the COMP1 EXTI line in interrupt mode.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR, COMP_EXTI_LINE_COMP1)
/**
* @brief Disable the COMP1 EXTI line in interrupt mode.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR, COMP_EXTI_LINE_COMP1)
/**
* @brief Generate a software interrupt on the COMP1 EXTI line.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER, COMP_EXTI_LINE_COMP1)
/**
* @brief Enable the COMP1 EXTI line in event mode.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR, COMP_EXTI_LINE_COMP1)
/**
* @brief Disable the COMP1 EXTI line in event mode.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR, COMP_EXTI_LINE_COMP1)
/**
* @brief Check whether the COMP1 EXTI line flag is set.
* @retval RESET or SET
*/
#define __HAL_COMP_COMP1_EXTI_GET_FLAG() READ_BIT(EXTI->PR, COMP_EXTI_LINE_COMP1)
/**
* @brief Clear the COMP1 EXTI flag.
* @retval None
*/
#define __HAL_COMP_COMP1_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR, COMP_EXTI_LINE_COMP1)
/**
* @brief Enable the COMP2 EXTI line rising edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR, COMP_EXTI_LINE_COMP2)
/**
* @brief Disable the COMP2 EXTI line rising edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR, COMP_EXTI_LINE_COMP2)
/**
* @brief Enable the COMP2 EXTI line falling edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR, COMP_EXTI_LINE_COMP2)
/**
* @brief Disable the COMP2 EXTI line falling edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR, COMP_EXTI_LINE_COMP2)
/**
* @brief Enable the COMP2 EXTI line rising & falling edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
__HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE(); \
__HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE(); \
} while(0)
/**
* @brief Disable the COMP2 EXTI line rising & falling edge trigger.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
__HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE(); \
__HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE(); \
} while(0)
/**
* @brief Enable the COMP2 EXTI line in interrupt mode.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR, COMP_EXTI_LINE_COMP2)
/**
* @brief Disable the COMP2 EXTI line in interrupt mode.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR, COMP_EXTI_LINE_COMP2)
/**
* @brief Generate a software interrupt on the COMP2 EXTI line.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER, COMP_EXTI_LINE_COMP2)
/**
* @brief Enable the COMP2 EXTI line in event mode.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR, COMP_EXTI_LINE_COMP2)
/**
* @brief Disable the COMP2 EXTI line in event mode.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR, COMP_EXTI_LINE_COMP2)
/**
* @brief Check whether the COMP2 EXTI line flag is set.
* @retval RESET or SET
*/
#define __HAL_COMP_COMP2_EXTI_GET_FLAG() READ_BIT(EXTI->PR, COMP_EXTI_LINE_COMP2)
/**
* @brief Clear the COMP2 EXTI flag.
* @retval None
*/
#define __HAL_COMP_COMP2_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR, COMP_EXTI_LINE_COMP2)
/**
* @}
*/
/**
* @}
*/
/* Private types -------------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/** @defgroup COMP_Private_Constants COMP Private Constants
* @{
*/
/** @defgroup COMP_ExtiLine COMP EXTI Lines
* @{
*/
#define COMP_EXTI_LINE_COMP1 (EXTI_IMR_IM21) /*!< EXTI line 21 connected to COMP1 output */
#define COMP_EXTI_LINE_COMP2 (EXTI_IMR_IM22) /*!< EXTI line 22 connected to COMP2 output */
/**
* @}
*/
/** @defgroup COMP_ExtiLine COMP EXTI Lines
* @{
*/
#define COMP_EXTI_IT ((uint32_t) 0x01U) /*!< EXTI line event with interruption */
#define COMP_EXTI_EVENT ((uint32_t) 0x02U) /*!< EXTI line event only (without interruption) */
#define COMP_EXTI_RISING ((uint32_t) 0x10U) /*!< EXTI line event on rising edge */
#define COMP_EXTI_FALLING ((uint32_t) 0x20U) /*!< EXTI line event on falling edge */
/**
* @}
*/
/**
* @}
*/
/* Private macros ------------------------------------------------------------*/
/** @defgroup COMP_Private_Macros COMP Private Macros
* @{
*/
/** @defgroup COMP_GET_EXTI_LINE COMP private macros to get EXTI line associated with comparators
* @{
*/
/**
* @brief Get the specified EXTI line for a comparator instance.
* @param __INSTANCE__ specifies the COMP instance.
* @retval value of @ref COMP_ExtiLine
*/
#define COMP_GET_EXTI_LINE(__INSTANCE__) (((__INSTANCE__) == COMP1) ? \
COMP_EXTI_LINE_COMP1 : COMP_EXTI_LINE_COMP2)
/**
* @}
*/
/** @defgroup COMP_IS_COMP_Definitions COMP private macros to check input parameters
* @{
*/
#define IS_COMP_WINDOWMODE(__WINDOWMODE__) (((__WINDOWMODE__) == COMP_WINDOWMODE_DISABLE) || \
((__WINDOWMODE__) == COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON) )
#define IS_COMP_POWERMODE(__POWERMODE__) (((__POWERMODE__) == COMP_POWERMODE_MEDIUMSPEED) || \
((__POWERMODE__) == COMP_POWERMODE_ULTRALOWPOWER) )
#define IS_COMP_WINDOWMODE_INSTANCE(INSTANCE) ((INSTANCE) == COMP1)
#if defined (STM32L011xx) || defined (STM32L021xx)
#define IS_COMP_INPUT_PLUS(__COMP_INSTANCE__, __INPUT_PLUS__) \
(((__COMP_INSTANCE__) == COMP1) \
? ( \
(__INPUT_PLUS__) == COMP_INPUT_PLUS_IO1 \
) \
: \
( \
((__INPUT_PLUS__) == COMP_INPUT_PLUS_IO1) \
|| ((__INPUT_PLUS__) == COMP_INPUT_PLUS_IO2) \
|| ((__INPUT_PLUS__) == COMP_INPUT_PLUS_IO3) \
|| ((__INPUT_PLUS__) == COMP_INPUT_PLUS_IO4) \
|| ((__INPUT_PLUS__) == COMP_INPUT_PLUS_IO5) \
|| ((__INPUT_PLUS__) == COMP_INPUT_PLUS_IO6) \
) \
)
#else
#define IS_COMP_INPUT_PLUS(__COMP_INSTANCE__, __INPUT_PLUS__) \
(((__COMP_INSTANCE__) == COMP1) \
? ( \
(__INPUT_PLUS__) == COMP_INPUT_PLUS_IO1 \
) \
: \
( \
((__INPUT_PLUS__) == COMP_INPUT_PLUS_IO1) \
|| ((__INPUT_PLUS__) == COMP_INPUT_PLUS_IO2) \
|| ((__INPUT_PLUS__) == COMP_INPUT_PLUS_IO3) \
|| ((__INPUT_PLUS__) == COMP_INPUT_PLUS_IO4) \
|| ((__INPUT_PLUS__) == COMP_INPUT_PLUS_IO5) \
) \
)
#endif
#define IS_COMP_INPUT_MINUS(__COMP_INSTANCE__, __INPUT_MINUS__) \
(((__COMP_INSTANCE__) == COMP1) \
? ( \
((__INPUT_MINUS__) == COMP_INPUT_MINUS_VREFINT) \
|| ((__INPUT_MINUS__) == COMP_INPUT_MINUS_DAC1_CH1) \
|| ((__INPUT_MINUS__) == COMP_INPUT_MINUS_DAC1_CH2) \
|| ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO1) \
) \
: \
( \
((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_4VREFINT) \
|| ((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_2VREFINT) \
|| ((__INPUT_MINUS__) == COMP_INPUT_MINUS_3_4VREFINT) \
|| ((__INPUT_MINUS__) == COMP_INPUT_MINUS_VREFINT) \
|| ((__INPUT_MINUS__) == COMP_INPUT_MINUS_DAC1_CH1) \
|| ((__INPUT_MINUS__) == COMP_INPUT_MINUS_DAC1_CH2) \
|| ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO1) \
|| ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO2) \
) \
)
#define IS_COMP1_LPTIMCONNECTION(LPTIMCONNECTION) (((LPTIMCONNECTION) == COMP_LPTIMCONNECTION_DISABLED) || \
((LPTIMCONNECTION) == COMP_LPTIMCONNECTION_IN1_ENABLED))
#define IS_COMP2_LPTIMCONNECTION(LPTIMCONNECTION) (((LPTIMCONNECTION) == COMP_LPTIMCONNECTION_DISABLED) || \
((LPTIMCONNECTION) == COMP_LPTIMCONNECTION_IN1_ENABLED) || \
((LPTIMCONNECTION) == COMP_LPTIMCONNECTION_IN2_ENABLED))
#define IS_COMP2_LPTIMCONNECTION_RESTRICTED(LPTIMCONNECTION) (((LPTIMCONNECTION) == COMP_LPTIMCONNECTION_DISABLED) || \
((LPTIMCONNECTION) == COMP_LPTIMCONNECTION_IN1_ENABLED))
#define IS_COMP_OUTPUTPOL(POL) (((POL) == COMP_OUTPUTPOL_NONINVERTED) || \
((POL) == COMP_OUTPUTPOL_INVERTED))
#define IS_COMP_TRIGGERMODE(__TRIGGERMODE__) (((__TRIGGERMODE__) == COMP_TRIGGERMODE_NONE) || \
((__TRIGGERMODE__) == COMP_TRIGGERMODE_IT_RISING) || \
((__TRIGGERMODE__) == COMP_TRIGGERMODE_IT_FALLING) || \
((__TRIGGERMODE__) == COMP_TRIGGERMODE_IT_RISING_FALLING) || \
((__TRIGGERMODE__) == COMP_TRIGGERMODE_EVENT_RISING) || \
((__TRIGGERMODE__) == COMP_TRIGGERMODE_EVENT_FALLING) || \
((__TRIGGERMODE__) == COMP_TRIGGERMODE_EVENT_RISING_FALLING) )
#define IS_COMP_OUTPUT_LEVEL(__OUTPUT_LEVEL__) (((__OUTPUT_LEVEL__) == COMP_OUTPUT_LEVEL_LOW) || \
((__OUTPUT_LEVEL__) == COMP_OUTPUT_LEVEL_HIGH))
/**
* @}
*/
/**
* @}
*/
/* Include COMP HAL Extended module */
#include "stm32l0xx_hal_comp_ex.h"
/* Exported functions --------------------------------------------------------*/
/** @addtogroup COMP_Exported_Functions
* @{
*/
/** @addtogroup COMP_Exported_Functions_Group1
* @{
*/
/* Initialization and de-initialization functions **********************************/
HAL_StatusTypeDef HAL_COMP_Init(COMP_HandleTypeDef *hcomp);
HAL_StatusTypeDef HAL_COMP_DeInit (COMP_HandleTypeDef *hcomp);
void HAL_COMP_MspInit(COMP_HandleTypeDef *hcomp);
void HAL_COMP_MspDeInit(COMP_HandleTypeDef *hcomp);
/**
* @}
*/
/* IO operation functions *****************************************************/
/** @addtogroup COMP_Exported_Functions_Group2
* @{
*/
HAL_StatusTypeDef HAL_COMP_Start(COMP_HandleTypeDef *hcomp);
HAL_StatusTypeDef HAL_COMP_Stop(COMP_HandleTypeDef *hcomp);
void HAL_COMP_IRQHandler(COMP_HandleTypeDef *hcomp);
/**
* @}
*/
/* Peripheral Control functions ************************************************/
/** @addtogroup COMP_Exported_Functions_Group3
* @{
*/
HAL_StatusTypeDef HAL_COMP_Lock(COMP_HandleTypeDef *hcomp);
uint32_t HAL_COMP_GetOutputLevel(COMP_HandleTypeDef *hcomp);
/* Callback in interrupt mode */
void HAL_COMP_TriggerCallback(COMP_HandleTypeDef *hcomp);
/**
* @}
*/
/* Peripheral State functions **************************************************/
/** @addtogroup COMP_Exported_Functions_Group4
* @{
*/
HAL_COMP_StateTypeDef HAL_COMP_GetState(COMP_HandleTypeDef *hcomp);
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __STM32L0xx_HAL_COMP_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

@ -0,0 +1,89 @@
/**
******************************************************************************
* @file stm32l0xx_hal_comp_ex.h
* @author MCD Application Team
* @brief Header file of COMP HAL Extended module.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32L0xx_HAL_COMP_EX_H
#define __STM32L0xx_HAL_COMP_EX_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32l0xx_hal_def.h"
/** @addtogroup STM32L0xx_HAL_Driver
* @{
*/
/** @defgroup COMPEx COMPEx
* @{
*/
/* Exported functions --------------------------------------------------------*/
/** @defgroup COMPEx_Exported_Functions COMPEx Exported Functions
* @{
*/
/** @defgroup COMPEx_Exported_Functions_Group1 Extended COMP VREFINT setup functions
* @{
*/
/* COMP specific functions to manage VREFINT *************************************/
void HAL_COMPEx_EnableVREFINT(void);
void HAL_COMPEx_DisableVREFINT(void);
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __STM32L0xx_HAL_COMP_EX_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/