yaxing.chen 5 lat temu
rodzic
commit
a6ad84f997
100 zmienionych plików z 0 dodań i 30472 usunięć
  1. 0 1
      .platformio/packages/framework-stm32cube/.piopm
  2. 0 182
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Adafruit_Shield/Release_Notes.html
  3. 0 1060
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Adafruit_Shield/stm32_adafruit_lcd.c
  4. 0 197
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Adafruit_Shield/stm32_adafruit_lcd.h
  5. 0 1030
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Adafruit_Shield/stm32_adafruit_sd.c
  6. 0 240
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Adafruit_Shield/stm32_adafruit_sd.h
  7. 0 233
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/Release_Notes.html
  8. 0 143
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/accelero.h
  9. 0 122
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/audio.h
  10. 0 141
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/camera.h
  11. 0 115
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/epd.h
  12. 0 145
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/gyro.h
  13. 0 168
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/idd.h
  14. 0 150
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/io.h
  15. 0 114
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/lcd.h
  16. 0 125
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/magneto.h
  17. 0 107
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/ts.h
  18. 0 118
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/tsensor.h
  19. 0 175
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/hx8347d/Release_Notes.html
  20. 0 506
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/hx8347d/hx8347d.c
  21. 0 278
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/hx8347d/hx8347d.h
  22. 0 461
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/l3gd20/Release_Notes.html
  23. 0 416
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/l3gd20/l3gd20.c
  24. 0 324
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/l3gd20/l3gd20.h
  25. 0 178
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/spfd5408/Release_Notes.html
  26. 0 496
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/spfd5408/spfd5408.c
  27. 0 278
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/spfd5408/spfd5408.h
  28. 0 307
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/st7735/Release_Notes.html
  29. 0 471
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/st7735/st7735.c
  30. 0 214
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/st7735/st7735.h
  31. 0 181
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/stlm75/Release_Notes.html
  32. 0 198
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/stlm75/stlm75.c
  33. 0 144
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/stlm75/stlm75.h
  34. 0 583
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/Release_Notes.html
  35. 0 1394
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval.c
  36. 0 518
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval.h
  37. 0 495
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_eeprom.c
  38. 0 146
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_eeprom.h
  39. 0 932
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_lcd.c
  40. 0 203
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_lcd.h
  41. 0 1040
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_sd.c
  42. 0 244
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_sd.h
  43. 0 184
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_tsensor.c
  44. 0 121
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_tsensor.h
  45. 0 589
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/Release_Notes.html
  46. 0 1374
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval.c
  47. 0 527
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval.h
  48. 0 495
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_eeprom.c
  49. 0 153
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_eeprom.h
  50. 0 928
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_lcd.c
  51. 0 233
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_lcd.h
  52. 0 1032
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_sd.c
  53. 0 261
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_sd.h
  54. 0 178
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_tsensor.c
  55. 0 135
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_tsensor.h
  56. 0 181
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0308-Discovery/Release_Notes.html
  57. 0 238
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0308-Discovery/stm32f0308_discovery.c
  58. 0 185
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0308-Discovery/stm32f0308_discovery.h
  59. 0 419
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/Release_Notes.html
  60. 0 808
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery.c
  61. 0 311
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery.h
  62. 0 535
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery_eeprom.c
  63. 0 127
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery_eeprom.h
  64. 0 229
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery_gyroscope.c
  65. 0 112
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery_gyroscope.h
  66. 0 165
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx-Nucleo/Release_Notes.html
  67. 0 932
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx-Nucleo/stm32f0xx_nucleo.c
  68. 0 292
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx-Nucleo/stm32f0xx_nucleo.h
  69. 0 182
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx_Nucleo_32/Release_Notes.html
  70. 0 461
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx_Nucleo_32/stm32f0xx_nucleo_32.c
  71. 0 204
      .platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx_Nucleo_32/stm32f0xx_nucleo_32.h
  72. 0 4
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_class_marks_example/ARM/Abstract.txt
  73. 0 211
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_class_marks_example/ARM/arm_class_marks_example_f32.c
  74. 0 4
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_class_marks_example/GCC/Abstract.txt
  75. 0 211
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_class_marks_example/GCC/arm_class_marks_example_f32.c
  76. 0 4
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/ARM/Abstract.txt
  77. 0 247
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/ARM/arm_convolution_example_f32.c
  78. 0 458
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/ARM/math_helper.c
  79. 0 63
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/ARM/math_helper.h
  80. 0 4
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/GCC/Abstract.txt
  81. 0 247
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/GCC/arm_convolution_example_f32.c
  82. 0 458
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/GCC/math_helper.c
  83. 0 63
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/GCC/math_helper.h
  84. 0 4
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_dotproduct_example/ARM/Abstract.txt
  85. 0 178
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_dotproduct_example/ARM/arm_dotproduct_example_f32.c
  86. 0 4
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_dotproduct_example/GCC/Abstract.txt
  87. 0 178
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_dotproduct_example/GCC/arm_dotproduct_example_f32.c
  88. 0 4
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/ARM/Abstract.txt
  89. 0 308
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/ARM/arm_fft_bin_data.c
  90. 0 158
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/ARM/arm_fft_bin_example_f32.c
  91. 0 4
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/GCC/Abstract.txt
  92. 0 308
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/GCC/arm_fft_bin_data.c
  93. 0 158
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/GCC/arm_fft_bin_example_f32.c
  94. 0 4
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fir_example/ARM/Abstract.txt
  95. 0 134
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fir_example/ARM/arm_fir_data.c
  96. 0 233
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fir_example/ARM/arm_fir_example_f32.c
  97. 0 458
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fir_example/ARM/math_helper.c
  98. 0 63
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fir_example/ARM/math_helper.h
  99. 0 4
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_graphic_equalizer_example/ARM/Abstract.txt
  100. 0 134
      .platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_graphic_equalizer_example/ARM/arm_graphic_equalizer_data.c

+ 0 - 1
.platformio/packages/framework-stm32cube/.piopm

@@ -1 +0,0 @@
-{"type": "tool", "name": "framework-stm32cube", "version": "2.0.200813", "spec": {"owner": "platformio", "id": 8114, "name": "framework-stm32cube", "requirements": null, "url": null}}

+ 0 - 182
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Adafruit_Shield/Release_Notes.html

@@ -1,182 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-
-
-
-
-
-
-
-
-
-
-
-  
-  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
-  
-  <link rel="File-List" href="Library_files/filelist.xml">
-
-  
-  <link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><title>Release Notes for Adafruit_Shield Drivers</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]-->
-
-
-  
-
-  
-
-  
-  <style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-  </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-  <meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-  <tbody>
-    <tr>
-      <td style="padding: 0cm;" valign="top">
-      <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-        <tbody>
-          <tr>
-            <td style="vertical-align: top;">
-            <p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-            </td>
-          </tr>
-          <tr style="">
-            <td style="padding: 1.5pt;">
-            <h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for Adafruit_Shield&nbsp;&nbsp;Drivers</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2015 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-      <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" width="900">
-        <tbody>
-          <tr style="">
-            <td style="padding: 0cm;" valign="top">
-            <span style="font-family: &quot;Times New Roman&quot;;">
-            </span>
-            <h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2>
-            <h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.1 / 04-November-2015</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-            
-            <ul style="margin-top: 0cm;" type="square"><li><span style="font-size: 10pt; font-family: Verdana;">Fix GNU GCC warning on missing break instruction in <span style="font-style: italic;">SD_GetDataResponse()</span></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.0 / 10-September-2015</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-            
-            <ul style="margin-top: 0cm;" type="square"><li><span style="font-size: 10pt; font-family: Verdana;">Improve SD over SPI protocol implementation<span style="font-style: italic;"></span></span></li><li><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic;">Note:</span> This new implementation requires to increase Heap_Size by 0x200&nbsp;</span></li><li><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic;">Note:</span> This driver version needs BSP Nucleo&nbsp;driver V2.0.0 and later</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.1.0 / 22-July-2014</span></h3>
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-            
-            <ul style="margin-top: 0cm;" type="square">
-              <li><span style="font-size: 10pt; font-family: Verdana;">Add new user API <span style="font-style: italic;">BSP_LCD_DrawBitmap()</span> to draw a bitmap picture loaded in the STM32 MCU internal memory</span></li>
-              <li><span style="font-size: 10pt; font-family: Verdana;">Add new static API <span style="font-style: italic;">SetDisplayWindow()</span>, needed by </span><span style="font-size: 10pt; font-family: Verdana;"> BSP_LCD_DrawBitmap() </span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic;"></span><br>
-                </span></li>
-              <li><span style="font-size: 10pt; font-family: Verdana;">Update static API <span style="font-style: italic;">DrawChar()</span></span></li>
-              <li><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic;">Note:</span> This driver version needs ST7735 component driver V1.1.0 and later.<span style="font-style: italic;"><br>
-                </span></span></li>
-
-            </ul>
-<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0 / 22-April-2014</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            <ul style="margin-top: 0cm;" type="square"><li><span style="font-size: 10pt; font-family: Verdana;">First official release.</span></li></ul><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"></span><h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span></h2>
-            <div style="text-align: justify;">
-            <div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-            </font>
-            <ol><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived </span><br>
-                </font>
-              </li></ol>
-            <font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from this software without specific prior written permission.</span><br>
-            <span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-            <span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></font>
-            
-            </div>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></div>
-<span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black;"></span> <b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-            
-            <div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-            <hr align="center" size="2" width="100%"></span></div>
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: Verdana; color: black;">For
-complete documentation on </span><span style="font-size: 10pt; font-family: Verdana;">STM32<span style="color: black;">&nbsp;Microcontrollers
-visit </span><u><span style="color: blue;"><a href="http://www.st.com/internet/mcu/class/1734.jsp" target="_blank">www.st.com/STM32</a></span></u></span><span style="font-size: 10pt; font-family: Verdana;"><a target="_blank" href="http://www.st.com/internet/mcu/family/141.jsp"><u><span style="color: blue;"></span></u></a></span><span style="font-size: 10pt; font-family: Verdana;"><u><span style="color: blue;"></span></u></span><span style="color: black;"><o:p></o:p></span></p>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-      </td>
-    </tr>
-  </tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-
-</body></html>

+ 0 - 1060
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Adafruit_Shield/stm32_adafruit_lcd.c

@@ -1,1060 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32_adafruit_lcd.c
-  * @author  MCD Application Team
-  * @version V2.0.1
-  * @date    04-November-2015
-  * @brief   This file includes the driver for Liquid Crystal Display (LCD) module
-  *          mounted on the Adafruit 1.8" TFT LCD shield (reference ID 802), 
-  *          that is used with the STM32 Nucleo board through SPI interface.     
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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.
-  *
-  ******************************************************************************
-  */ 
-
-/* File Info : -----------------------------------------------------------------
-                                   User NOTES
-1. How To use this driver:
---------------------------
-   - The LCD st7735 component driver MUST be included with this driver.  
-
-2. Driver description:
----------------------
-  + Initialization steps:
-     o Initialize the LCD using the BSP_LCD_Init() function.
-  
-  + Display on LCD
-     o Clear the whole LCD using the BSP_LCD_Clear() function or only one specified 
-       string line using the BSP_LCD_ClearStringLine() function.
-     o Display a character on the specified line and column using the BSP_LCD_DisplayChar()
-       function or a complete string line using the BSP_LCD_DisplayStringAtLine() function.
-     o Display a string line on the specified position (x,y in pixel) and align mode
-       using the BSP_LCD_DisplayStringAtLine() function.          
-     o Draw and fill a basic shapes (dot, line, rectangle, circle, ellipse, ..) 
-       on LCD using a set of functions.    
- 
-------------------------------------------------------------------------------*/
-    
-/* Includes ------------------------------------------------------------------*/
-#include "stm32_adafruit_lcd.h"
-#include "../../../Utilities/Fonts/fonts.h"
-#include "../../../Utilities/Fonts/font24.c"
-#include "../../../Utilities/Fonts/font20.c"
-#include "../../../Utilities/Fonts/font16.c"
-#include "../../../Utilities/Fonts/font12.c"
-#include "../../../Utilities/Fonts/font8.c"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32_ADAFRUIT
-  * @{
-  */
-    
-/** @addtogroup STM32_ADAFRUIT_LCD
-  * @{
-  */ 
-
-/** @defgroup STM32_ADAFRUIT_LCD_Private_TypesDefinitions
-  * @{
-  */ 
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32_ADAFRUIT_LCD_Private_Defines
-  * @{
-  */
-#define POLY_X(Z)             ((int32_t)((Points + (Z))->X))
-#define POLY_Y(Z)             ((int32_t)((Points + (Z))->Y))
-#define NULL                  (void *)0
-
-#define MAX_HEIGHT_FONT         17
-#define MAX_WIDTH_FONT          24
-#define OFFSET_BITMAP           54
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32_ADAFRUIT_LCD_Private_Macros
-  * @{
-  */
-#define ABS(X) ((X) > 0 ? (X) : -(X)) 
-
-/**
-  * @}
-  */ 
-    
-/** @defgroup STM32_ADAFRUIT_LCD_Private_Variables
-  * @{
-  */ 
-LCD_DrawPropTypeDef DrawProp;
-
-static LCD_DrvTypeDef  *lcd_drv; 
-
-/* Max size of bitmap will based on a font24 (17x24) */
-static uint8_t bitmap[MAX_HEIGHT_FONT*MAX_WIDTH_FONT*2+OFFSET_BITMAP] = {0};
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32_ADAFRUIT_LCD_Private_FunctionPrototypes
-  * @{
-  */ 
-static void DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *c);
-static void FillTriangle(uint16_t x1, uint16_t x2, uint16_t x3, uint16_t y1, uint16_t y2, uint16_t y3);
-static void SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-/**
-  * @}
-  */ 
-
-
-/** @defgroup STM32_ADAFRUIT_LCD_Private_Functions
-  * @{
-  */
-  
-/**
-  * @brief  Initializes the LCD.
-  * @param  None
-  * @retval LCD state
-  */
-uint8_t BSP_LCD_Init(void)
-{ 
-  uint8_t ret = LCD_ERROR;
-  
-  /* Default value for draw propriety */
-  DrawProp.BackColor = 0xFFFF;
-  DrawProp.pFont     = &Font24;
-  DrawProp.TextColor = 0x0000;
-  
-  lcd_drv = &st7735_drv;
-  
-  /* LCD Init */   
-  lcd_drv->Init();
-  
-  /* Clear the LCD screen */
-  BSP_LCD_Clear(LCD_COLOR_WHITE);
-  
-  /* Initialize the font */
-  BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
-  
-  ret = LCD_OK;
-  
-  return ret;
-}
-
-/**
-  * @brief  Gets the LCD X size.
-  * @param  None    
-  * @retval Used LCD X size
-  */
-uint32_t BSP_LCD_GetXSize(void)
-{
-  return(lcd_drv->GetLcdPixelWidth());
-}
-
-/**
-  * @brief  Gets the LCD Y size.
-  * @param  None   
-  * @retval Used LCD Y size
-  */
-uint32_t BSP_LCD_GetYSize(void)
-{
-  return(lcd_drv->GetLcdPixelHeight());
-}
-
-/**
-  * @brief  Gets the LCD text color.
-  * @param  None 
-  * @retval Used text color.
-  */
-uint16_t BSP_LCD_GetTextColor(void)
-{
-  return DrawProp.TextColor;
-}
-
-/**
-  * @brief  Gets the LCD background color.
-  * @param  None
-  * @retval Used background color
-  */
-uint16_t BSP_LCD_GetBackColor(void)
-{
-  return DrawProp.BackColor;
-}
-
-/**
-  * @brief  Sets the LCD text color.
-  * @param  Color: Text color code RGB(5-6-5)
-  * @retval None
-  */
-void BSP_LCD_SetTextColor(uint16_t Color)
-{
-  DrawProp.TextColor = Color;
-}
-
-/**
-  * @brief  Sets the LCD background color.
-  * @param  Color: Background color code RGB(5-6-5)
-  * @retval None
-  */
-void BSP_LCD_SetBackColor(uint16_t Color)
-{
-  DrawProp.BackColor = Color;
-}
-
-/**
-  * @brief  Sets the LCD text font.
-  * @param  fonts: Font to be used
-  * @retval None
-  */
-void BSP_LCD_SetFont(sFONT *pFonts)
-{
-  DrawProp.pFont = pFonts;
-}
-
-/**
-  * @brief  Gets the LCD text font.
-  * @param  None
-  * @retval Used font
-  */
-sFONT *BSP_LCD_GetFont(void)
-{
-  return DrawProp.pFont;
-}
-
-/**
-  * @brief  Clears the hole LCD.
-  * @param  Color: Color of the background
-  * @retval None
-  */
-void BSP_LCD_Clear(uint16_t Color)
-{ 
-  uint32_t counter = 0;
-  uint32_t color_backup = DrawProp.TextColor; 
-  DrawProp.TextColor = Color;
-  
-  for(counter = 0; counter < BSP_LCD_GetYSize(); counter++)
-  {
-    BSP_LCD_DrawHLine(0, counter, BSP_LCD_GetXSize());
-  }
-  DrawProp.TextColor = color_backup; 
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-}
-
-/**
-  * @brief  Clears the selected line.
-  * @param  Line: Line to be cleared
-  *          This parameter can be one of the following values:
-  *            @arg  0..9: if the Current fonts is Font16x24
-  *            @arg  0..19: if the Current fonts is Font12x12 or Font8x12
-  *            @arg  0..29: if the Current fonts is Font8x8
-  * @retval None
-  */
-void BSP_LCD_ClearStringLine(uint16_t Line)
-{ 
-  uint32_t color_backup = DrawProp.TextColor; 
-  DrawProp.TextColor = DrawProp.BackColor;;
-    
-  /* Draw a rectangle with background color */
-  BSP_LCD_FillRect(0, (Line * DrawProp.pFont->Height), BSP_LCD_GetXSize(), DrawProp.pFont->Height);
-  
-  DrawProp.TextColor = color_backup;
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-}
-
-/**
-  * @brief  Displays one character.
-  * @param  Xpos: Start column address
-  * @param  Ypos: Line where to display the character shape.
-  * @param  Ascii: Character ascii code
-  *           This parameter must be a number between Min_Data = 0x20 and Max_Data = 0x7E 
-  * @retval None
-  */
-void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii)
-{
-  DrawChar(Xpos, Ypos, &DrawProp.pFont->table[(Ascii-' ') *\
-    DrawProp.pFont->Height * ((DrawProp.pFont->Width + 7) / 8)]);
-}
-
-/**
-  * @brief  Displays characters on the LCD.
-  * @param  Xpos: X position (in pixel)
-  * @param  Ypos: Y position (in pixel)   
-  * @param  Text: Pointer to string to display on LCD
-  * @param  Mode: Display mode
-  *          This parameter can be one of the following values:
-  *            @arg  CENTER_MODE
-  *            @arg  RIGHT_MODE
-  *            @arg  LEFT_MODE   
-  * @retval None
-  */
-void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Line_ModeTypdef Mode)
-{
-  uint16_t refcolumn = 1, i = 0;
-  uint32_t size = 0, xsize = 0; 
-  uint8_t  *ptr = Text;
-  
-  /* Get the text size */
-  while (*ptr++) size ++ ;
-  
-  /* Characters number per line */
-  xsize = (BSP_LCD_GetXSize()/DrawProp.pFont->Width);
-  
-  switch (Mode)
-  {
-  case CENTER_MODE:
-    {
-      refcolumn = Xpos + ((xsize - size)* DrawProp.pFont->Width) / 2;
-      break;
-    }
-  case LEFT_MODE:
-    {
-      refcolumn = Xpos;
-      break;
-    }
-  case RIGHT_MODE:
-    {
-      refcolumn =  - Xpos + ((xsize - size)*DrawProp.pFont->Width);
-      break;
-    }    
-  default:
-    {
-      refcolumn = Xpos;
-      break;
-    }
-  }
-  
-  /* Send the string character by character on lCD */
-  while ((*Text != 0) & (((BSP_LCD_GetXSize() - (i*DrawProp.pFont->Width)) & 0xFFFF) >= DrawProp.pFont->Width))
-  {
-    /* Display one character on LCD */
-    BSP_LCD_DisplayChar(refcolumn, Ypos, *Text);
-    /* Decrement the column position by 16 */
-    refcolumn += DrawProp.pFont->Width;
-    /* Point on the next character */
-    Text++;
-    i++;
-  }
-}
-
-/**
-  * @brief  Displays a character on the LCD.
-  * @param  Line: Line where to display the character shape
-  *          This parameter can be one of the following values:
-  *            @arg  0..19: if the Current fonts is Font8
-  *            @arg  0..12: if the Current fonts is Font12
-  *            @arg  0...9: if the Current fonts is Font16
-  *            @arg  0...7: if the Current fonts is Font20
-  *            @arg  0...5: if the Current fonts is Font24
-  * @param  ptr: Pointer to string to display on LCD
-  * @retval None
-  */
-void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr)
-{
-  BSP_LCD_DisplayStringAt(0, LINE(Line), ptr, LEFT_MODE);
-}
-
-/**
-  * @brief  Draws a pixel on LCD.
-  * @param  Xpos: X position 
-  * @param  Ypos: Y position
-  * @param  RGB_Code: Pixel color in RGB mode (5-6-5)  
-  * @retval None
-  */
-void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGB_Code)
-{
-  if(lcd_drv->WritePixel != NULL)
-  {
-    lcd_drv->WritePixel(Xpos, Ypos, RGB_Code);
-  }
-}
-  
-/**
-  * @brief  Draws an horizontal line.
-  * @param  Xpos: X position
-  * @param  Ypos: Y position
-  * @param  Length: Line length
-  * @retval None
-  */
-void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint32_t index = 0;
-  
-  if(lcd_drv->DrawHLine != NULL)
-  {
-    lcd_drv->DrawHLine(DrawProp.TextColor, Xpos, Ypos, Length);
-  }
-  else
-  {
-    for(index = 0; index < Length; index++)
-    {
-      BSP_LCD_DrawPixel((Xpos + index), Ypos, DrawProp.TextColor);
-    }
-  }
-}
-
-/**
-  * @brief  Draws a vertical line.
-  * @param  Xpos: X position
-  * @param  Ypos: Y position
-  * @param  Length: Line length
-  * @retval None
-  */
-void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint32_t index = 0;
-  
-  if(lcd_drv->DrawVLine != NULL)
-  {
-    lcd_drv->DrawVLine(DrawProp.TextColor, Xpos, Ypos, Length);
-  }
-  else
-  {
-    for(index = 0; index < Length; index++)
-    {
-      BSP_LCD_DrawPixel(Xpos, Ypos + index, DrawProp.TextColor);
-    }
-  }
-}
-
-/**
-  * @brief  Draws an uni-line (between two points).
-  * @param  x1: Point 1 X position
-  * @param  y1: Point 1 Y position
-  * @param  x2: Point 2 X position
-  * @param  y2: Point 2 Y position
-  * @retval None
-  */
-void BSP_LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
-{
-  int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0, 
-  yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0, 
-  curpixel = 0;
-  
-  deltax = ABS(x2 - x1);        /* The difference between the x's */
-  deltay = ABS(y2 - y1);        /* The difference between the y's */
-  x = x1;                       /* Start x off at the first pixel */
-  y = y1;                       /* Start y off at the first pixel */
-  
-  if (x2 >= x1)                 /* The x-values are increasing */
-  {
-    xinc1 = 1;
-    xinc2 = 1;
-  }
-  else                          /* The x-values are decreasing */
-  {
-    xinc1 = -1;
-    xinc2 = -1;
-  }
-  
-  if (y2 >= y1)                 /* The y-values are increasing */
-  {
-    yinc1 = 1;
-    yinc2 = 1;
-  }
-  else                          /* The y-values are decreasing */
-  {
-    yinc1 = -1;
-    yinc2 = -1;
-  }
-  
-  if (deltax >= deltay)         /* There is at least one x-value for every y-value */
-  {
-    xinc1 = 0;                  /* Don't change the x when numerator >= denominator */
-    yinc2 = 0;                  /* Don't change the y for every iteration */
-    den = deltax;
-    num = deltax / 2;
-    numadd = deltay;
-    numpixels = deltax;         /* There are more x-values than y-values */
-  }
-  else                          /* There is at least one y-value for every x-value */
-  {
-    xinc2 = 0;                  /* Don't change the x for every iteration */
-    yinc1 = 0;                  /* Don't change the y when numerator >= denominator */
-    den = deltay;
-    num = deltay / 2;
-    numadd = deltax;
-    numpixels = deltay;         /* There are more y-values than x-values */
-  }
-  
-  for (curpixel = 0; curpixel <= numpixels; curpixel++)
-  {
-    BSP_LCD_DrawPixel(x, y, DrawProp.TextColor);  /* Draw the current pixel */
-    num += numadd;                            /* Increase the numerator by the top of the fraction */
-    if (num >= den)                           /* Check if numerator >= denominator */
-    {
-      num -= den;                             /* Calculate the new numerator value */
-      x += xinc1;                             /* Change the x as appropriate */
-      y += yinc1;                             /* Change the y as appropriate */
-    }
-    x += xinc2;                               /* Change the x as appropriate */
-    y += yinc2;                               /* Change the y as appropriate */
-  }
-}
-
-/**
-  * @brief  Draws a rectangle.
-  * @param  Xpos: X position
-  * @param  Ypos: Y position
-  * @param  Width: Rectangle width  
-  * @param  Height: Rectangle height
-  * @retval None
-  */
-void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  /* Draw horizontal lines */
-  BSP_LCD_DrawHLine(Xpos, Ypos, Width);
-  BSP_LCD_DrawHLine(Xpos, (Ypos+ Height), Width);
-  
-  /* Draw vertical lines */
-  BSP_LCD_DrawVLine(Xpos, Ypos, Height);
-  BSP_LCD_DrawVLine((Xpos + Width), Ypos, Height);
-}
-                            
-/**
-  * @brief  Draws a circle.
-  * @param  Xpos: X position
-  * @param  Ypos: Y position
-  * @param  Radius: Circle radius
-  * @retval None
-  */
-void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
-{
-  int32_t  D;       /* Decision Variable */ 
-  uint32_t  CurX;   /* Current X Value */
-  uint32_t  CurY;   /* Current Y Value */ 
-  
-  D = 3 - (Radius << 1);
-  CurX = 0;
-  CurY = Radius;
-  
-  while (CurX <= CurY)
-  {
-    BSP_LCD_DrawPixel((Xpos + CurX), (Ypos - CurY), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Xpos - CurX), (Ypos - CurY), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Xpos + CurY), (Ypos - CurX), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Xpos - CurY), (Ypos - CurX), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Xpos + CurX), (Ypos + CurY), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Xpos - CurX), (Ypos + CurY), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Xpos + CurY), (Ypos + CurX), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Xpos - CurY), (Ypos + CurX), DrawProp.TextColor);   
-
-    /* Initialize the font */
-    BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
-
-    if (D < 0)
-    { 
-      D += (CurX << 2) + 6;
-    }
-    else
-    {
-      D += ((CurX - CurY) << 2) + 10;
-      CurY--;
-    }
-    CurX++;
-  } 
-}
-
-/**
-  * @brief  Draws an poly-line (between many points).
-  * @param  Points: Pointer to the points array
-  * @param  PointCount: Number of points
-  * @retval None
-  */
-void BSP_LCD_DrawPolygon(pPoint Points, uint16_t PointCount)
-{
-  int16_t X = 0, Y = 0;
-
-  if(PointCount < 2)
-  {
-    return;
-  }
-
-  BSP_LCD_DrawLine(Points->X, Points->Y, (Points+PointCount-1)->X, (Points+PointCount-1)->Y);
-  
-  while(--PointCount)
-  {
-    X = Points->X;
-    Y = Points->Y;
-    Points++;
-    BSP_LCD_DrawLine(X, Y, Points->X, Points->Y);
-  }
-}
-
-/**
-  * @brief  Draws an ellipse on LCD.
-  * @param  Xpos: X position
-  * @param  Ypos: Y position
-  * @param  XRadius: Ellipse X radius
-  * @param  YRadius: Ellipse Y radius
-  * @retval None
-  */
-void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius)
-{
-  int x = 0, y = -YRadius, err = 2-2*XRadius, e2;
-  float K = 0, rad1 = 0, rad2 = 0;
-  
-  rad1 = XRadius;
-  rad2 = YRadius;
-  
-  K = (float)(rad2/rad1);
-  
-  do {      
-    BSP_LCD_DrawPixel((Xpos-(uint16_t)(x/K)), (Ypos+y), DrawProp.TextColor);
-    BSP_LCD_DrawPixel((Xpos+(uint16_t)(x/K)), (Ypos+y), DrawProp.TextColor);
-    BSP_LCD_DrawPixel((Xpos+(uint16_t)(x/K)), (Ypos-y), DrawProp.TextColor);
-    BSP_LCD_DrawPixel((Xpos-(uint16_t)(x/K)), (Ypos-y), DrawProp.TextColor);      
-    
-    e2 = err;
-    if (e2 <= x) {
-      err += ++x*2+1;
-      if (-y == x && e2 <= y) e2 = 0;
-    }
-    if (e2 > y) err += ++y*2+1;     
-  }
-  while (y <= 0);
-}
-
-/**
-  * @brief  Draws a bitmap picture loaded in the STM32 MCU internal memory.
-  * @param  Xpos: Bmp X position in the LCD
-  * @param  Ypos: Bmp Y position in the LCD
-  * @param  pBmp: Pointer to Bmp picture address
-  * @retval None
-  */
-void BSP_LCD_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pBmp)
-{
-  uint32_t height = 0, width  = 0;
-  
-  /* Read bitmap width */
-  width = *(uint16_t *) (pBmp + 18);
-  width |= (*(uint16_t *) (pBmp + 20)) << 16;
-  
-  /* Read bitmap height */
-  height = *(uint16_t *) (pBmp + 22);
-  height |= (*(uint16_t *) (pBmp + 24)) << 16; 
-  
-  /* Remap Ypos, st7735 works with inverted X in case of bitmap */
-  /* X = 0, cursor is on Top corner */
-  if(lcd_drv == &st7735_drv)
-  {
-    Ypos = BSP_LCD_GetYSize() - Ypos - height;
-  }
-  
-  SetDisplayWindow(Xpos, Ypos, width, height);
-  
-  if(lcd_drv->DrawBitmap != NULL)
-  {
-    lcd_drv->DrawBitmap(Xpos, Ypos, pBmp);
-  } 
-  SetDisplayWindow(0, 0, BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
-}
-
-/**
-  * @brief  Draws a full rectangle.
-  * @param  Xpos: X position
-  * @param  Ypos: Y position
-  * @param  Width: Rectangle width  
-  * @param  Height: Rectangle height
-  * @retval None
-  */
-void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-  do
-  {
-    BSP_LCD_DrawHLine(Xpos, Ypos++, Width);    
-  }
-  while(Height--);
-}
-
-/**
-  * @brief  Draws a full circle.
-  * @param  Xpos: X position
-  * @param  Ypos: Y position
-  * @param  Radius: Circle radius
-  * @retval None
-  */
-void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
-{
-  int32_t  D;        /* Decision Variable */ 
-  uint32_t  CurX;    /* Current X Value */
-  uint32_t  CurY;    /* Current Y Value */ 
-  
-  D = 3 - (Radius << 1);
-
-  CurX = 0;
-  CurY = Radius;
-  
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-
-  while (CurX <= CurY)
-  {
-    if(CurY > 0) 
-    {
-      BSP_LCD_DrawHLine(Xpos - CurY, Ypos + CurX, 2*CurY);
-      BSP_LCD_DrawHLine(Xpos - CurY, Ypos - CurX, 2*CurY);
-    }
-
-    if(CurX > 0) 
-    {
-      BSP_LCD_DrawHLine(Xpos - CurX, Ypos - CurY, 2*CurX);
-      BSP_LCD_DrawHLine(Xpos - CurX, Ypos + CurY, 2*CurX);
-    }
-    if (D < 0)
-    { 
-      D += (CurX << 2) + 6;
-    }
-    else
-    {
-      D += ((CurX - CurY) << 2) + 10;
-      CurY--;
-    }
-    CurX++;
-  }
-
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-  BSP_LCD_DrawCircle(Xpos, Ypos, Radius);
-}
-
-/**
-  * @brief  Draws a full poly-line (between many points).
-  * @param  Points: Pointer to the points array
-  * @param  PointCount: Number of points
-  * @retval None
-  */
-void BSP_LCD_FillPolygon(pPoint Points, uint16_t PointCount)
-{
-  int16_t X = 0, Y = 0, X2 = 0, Y2 = 0, X_center = 0, Y_center = 0, X_first = 0, Y_first = 0, pixelX = 0, pixelY = 0, counter = 0;
-  uint16_t  IMAGE_LEFT = 0, IMAGE_RIGHT = 0, IMAGE_TOP = 0, IMAGE_BOTTOM = 0;  
-  
-  IMAGE_LEFT = IMAGE_RIGHT = Points->X;
-  IMAGE_TOP= IMAGE_BOTTOM = Points->Y;
-  
-  for(counter = 1; counter < PointCount; counter++)
-  {
-    pixelX = POLY_X(counter);
-    if(pixelX < IMAGE_LEFT)
-    {
-      IMAGE_LEFT = pixelX;
-    }
-    if(pixelX > IMAGE_RIGHT)
-    {
-      IMAGE_RIGHT = pixelX;
-    }
-    
-    pixelY = POLY_Y(counter);
-    if(pixelY < IMAGE_TOP)
-    {
-      IMAGE_TOP = pixelY;
-    }
-    if(pixelY > IMAGE_BOTTOM)
-    {
-      IMAGE_BOTTOM = pixelY;
-    }
-  }  
-  
-  if(PointCount < 2)
-  {
-    return;
-  }
-  
-  X_center = (IMAGE_LEFT + IMAGE_RIGHT)/2;
-  Y_center = (IMAGE_BOTTOM + IMAGE_TOP)/2;
-  
-  X_first = Points->X;
-  Y_first = Points->Y;
-  
-  while(--PointCount)
-  {
-    X = Points->X;
-    Y = Points->Y;
-    Points++;
-    X2 = Points->X;
-    Y2 = Points->Y;    
-    
-    FillTriangle(X, X2, X_center, Y, Y2, Y_center);
-    FillTriangle(X, X_center, X2, Y, Y_center, Y2);
-    FillTriangle(X_center, X2, X, Y_center, Y2, Y);   
-  }
-  
-  FillTriangle(X_first, X2, X_center, Y_first, Y2, Y_center);
-  FillTriangle(X_first, X_center, X2, Y_first, Y_center, Y2);
-  FillTriangle(X_center, X2, X_first, Y_center, Y2, Y_first);   
-}
-
-/**
-  * @brief  Draws a full ellipse.
-  * @param  Xpos: X position
-  * @param  Ypos: Y position
-  * @param  XRadius: Ellipse X radius
-  * @param  YRadius: Ellipse Y radius  
-  * @retval None
-  */
-void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius)
-{
-  int x = 0, y = -YRadius, err = 2-2*XRadius, e2;
-  float K = 0, rad1 = 0, rad2 = 0;
-  
-  rad1 = XRadius;
-  rad2 = YRadius;
-  
-  K = (float)(rad2/rad1);    
-  
-  do 
-  { 
-    BSP_LCD_DrawHLine((Xpos-(uint16_t)(x/K)), (Ypos+y), (2*(uint16_t)(x/K) + 1));
-    BSP_LCD_DrawHLine((Xpos-(uint16_t)(x/K)), (Ypos-y), (2*(uint16_t)(x/K) + 1));
-    
-    e2 = err;
-    if (e2 <= x) 
-    {
-      err += ++x*2+1;
-      if (-y == x && e2 <= y) e2 = 0;
-    }
-    if (e2 > y) err += ++y*2+1;
-  }
-  while (y <= 0);
-}
-
-/**
-  * @brief  Enables the display.
-  * @param  None
-  * @retval None
-  */
-void BSP_LCD_DisplayOn(void)
-{
-  lcd_drv->DisplayOn();
-}
-
-/**
-  * @brief  Disables the display.
-  * @param  None
-  * @retval None
-  */
-void BSP_LCD_DisplayOff(void)
-{
-  lcd_drv->DisplayOff();
-}
-
-/*******************************************************************************
-                            Static Functions
-*******************************************************************************/
-
-/**
-  * @brief  Draws a character on LCD.
-  * @param  Xpos: Line where to display the character shape
-  * @param  Ypos: Start column address
-  * @param  pChar: Pointer to the character data
-  * @retval None
-  */
-static void DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *pChar)
-{
-  uint32_t counterh = 0, counterw = 0, index = 0;
-  uint16_t height = 0, width = 0;
-  uint8_t offset = 0;
-  uint8_t *pchar = NULL;
-  uint32_t line = 0;
-  
-  height = DrawProp.pFont->Height;
-  width  = DrawProp.pFont->Width;
-  
-  /* Fill bitmap header*/
-  *(uint16_t *) (bitmap + 2) = (uint16_t)(height*width*2+OFFSET_BITMAP);
-  *(uint16_t *) (bitmap + 4) = (uint16_t)((height*width*2+OFFSET_BITMAP)>>16);
-  *(uint16_t *) (bitmap + 10) = OFFSET_BITMAP;
-  *(uint16_t *) (bitmap + 18) = (uint16_t)(width);
-  *(uint16_t *) (bitmap + 20) = (uint16_t)((width)>>16);
-  *(uint16_t *) (bitmap + 22) = (uint16_t)(height);
-  *(uint16_t *) (bitmap + 24) = (uint16_t)((height)>>16);
-  
-  offset =  8 *((width + 7)/8) - width ;
-  
-  for(counterh = 0; counterh < height; counterh++)
-  {
-    pchar = ((uint8_t *)pChar + (width + 7)/8 * counterh);
-    
-    if(((width + 7)/8) == 3)
-    {
-      line =  (pchar[0]<< 16) | (pchar[1]<< 8) | pchar[2];
-    }
-    
-    if(((width + 7)/8) == 2)
-    {
-      line =  (pchar[0]<< 8) | pchar[1];
-    }
-    
-    if(((width + 7)/8) == 1)
-    {
-      line =  pchar[0];
-    }    
-    
-    for (counterw = 0; counterw < width; counterw++)
-    {
-      /* Image in the bitmap is written from the bottom to the top */
-      /* Need to invert image in the bitmap */
-      index = (((height-counterh-1)*width)+(counterw))*2+OFFSET_BITMAP;
-      if(line & (1 << (width- counterw + offset- 1))) 
-      {
-        bitmap[index] = (uint8_t)DrawProp.TextColor;
-        bitmap[index+1] = (uint8_t)(DrawProp.TextColor >> 8);
-      }
-      else
-      {
-        bitmap[index] = (uint8_t)DrawProp.BackColor;
-        bitmap[index+1] = (uint8_t)(DrawProp.BackColor >> 8);
-      } 
-    }
-  }
-  
-  BSP_LCD_DrawBitmap(Xpos, Ypos, bitmap);
-}
-
-/**
-  * @brief  Fills a triangle (between 3 points).
-  * @param  Points: Pointer to the points array
-  * @param  x1: Point 1 X position
-  * @param  y1: Point 1 Y position
-  * @param  x2: Point 2 X position
-  * @param  y2: Point 2 Y position
-  * @param  x3: Point 3 X position
-  * @param  y3: Point 3 Y position
-  * @retval None
-  */
-static void FillTriangle(uint16_t x1, uint16_t x2, uint16_t x3, uint16_t y1, uint16_t y2, uint16_t y3)
-{ 
-  int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0, 
-  yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0, 
-  curpixel = 0;
-  
-  deltax = ABS(x2 - x1);        /* The difference between the x's */
-  deltay = ABS(y2 - y1);        /* The difference between the y's */
-  x = x1;                       /* Start x off at the first pixel */
-  y = y1;                       /* Start y off at the first pixel */
-  
-  if (x2 >= x1)                 /* The x-values are increasing */
-  {
-    xinc1 = 1;
-    xinc2 = 1;
-  }
-  else                          /* The x-values are decreasing */
-  {
-    xinc1 = -1;
-    xinc2 = -1;
-  }
-  
-  if (y2 >= y1)                 /* The y-values are increasing */
-  {
-    yinc1 = 1;
-    yinc2 = 1;
-  }
-  else                          /* The y-values are decreasing */
-  {
-    yinc1 = -1;
-    yinc2 = -1;
-  }
-  
-  if (deltax >= deltay)         /* There is at least one x-value for every y-value */
-  {
-    xinc1 = 0;                  /* Don't change the x when numerator >= denominator */
-    yinc2 = 0;                  /* Don't change the y for every iteration */
-    den = deltax;
-    num = deltax / 2;
-    numadd = deltay;
-    numpixels = deltax;         /* There are more x-values than y-values */
-  }
-  else                          /* There is at least one y-value for every x-value */
-  {
-    xinc2 = 0;                  /* Don't change the x for every iteration */
-    yinc1 = 0;                  /* Don't change the y when numerator >= denominator */
-    den = deltay;
-    num = deltay / 2;
-    numadd = deltax;
-    numpixels = deltay;         /* There are more y-values than x-values */
-  }
-  
-  for (curpixel = 0; curpixel <= numpixels; curpixel++)
-  {
-    BSP_LCD_DrawLine(x, y, x3, y3);
-    
-    num += numadd;              /* Increase the numerator by the top of the fraction */
-    if (num >= den)             /* Check if numerator >= denominator */
-    {
-      num -= den;               /* Calculate the new numerator value */
-      x += xinc1;               /* Change the x as appropriate */
-      y += yinc1;               /* Change the y as appropriate */
-    }
-    x += xinc2;                 /* Change the x as appropriate */
-    y += yinc2;                 /* Change the y as appropriate */
-  } 
-}
-
-/**
-  * @brief  Sets display window.
-  * @param  LayerIndex: layer index
-  * @param  Xpos: LCD X position
-  * @param  Ypos: LCD Y position
-  * @param  Width: LCD window width
-  * @param  Height: LCD window height  
-  * @retval None
-  */
-static void SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  if(lcd_drv->SetDisplayWindow != NULL)
-  {
-    lcd_drv->SetDisplayWindow(Xpos, Ypos, Width, Height);
-  }  
-}
-
-/**
-  * @}
-  */  
-  
-/**
-  * @}
-  */ 
-  
-/**
-  * @}
-  */     
-
-/**
-  * @}
-  */  
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 197
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Adafruit_Shield/stm32_adafruit_lcd.h

@@ -1,197 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32_adafruit_lcd.h
-  * @author  MCD Application Team
-  * @version V2.0.1
-  * @date    04-November-2015
-  * @brief   This file contains the common defines and functions prototypes for
-  *          the stm32_adafruit_lcd.c driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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_ADAFRUIT_LCD_H
-#define __STM32_ADAFRUIT_LCD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif 
-
-/* Includes ------------------------------------------------------------------*/
-#include "../Components/st7735/st7735.h"
-#include "../../../Utilities/Fonts/fonts.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32_ADAFRUIT
-  * @{
-  */
- 
-/** @addtogroup STM32_ADAFRUIT_LCD
-  * @{
-  */ 
-
-
-/** @defgroup STM32_ADAFRUIT_LCD_Exported_Types
-  * @{
-  */
-   
-/** 
-  * @brief  Draw Properties structures definition
-  */ 
-typedef struct 
-{ 
-  uint32_t TextColor;
-  uint32_t BackColor;
-  sFONT    *pFont; 
-
-}LCD_DrawPropTypeDef;
-
-/** 
-  * @brief  Point structures definition
-  */ 
-typedef struct 
-{
-  int16_t X;
-  int16_t Y;
-
-}Point, * pPoint;
-
-/** 
-  * @brief  Line mode structures definition
-  */ 
-typedef enum
-{
-  CENTER_MODE             = 0x01,    /*!< Center mode */
-  RIGHT_MODE              = 0x02,    /*!< Right mode  */
-  LEFT_MODE               = 0x03     /*!< Left mode   */
-
-}Line_ModeTypdef;
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32_ADAFRUIT_LCD_Exported_Constants
-  * @{
-  */
-  
-#define __IO    volatile  
-
-/** 
-  * @brief  LCD status structure definition  
-  */     
-#define LCD_OK         0x00
-#define LCD_ERROR      0x01
-#define LCD_TIMEOUT    0x02
-
-/** 
-  * @brief  LCD color  
-  */
-#define LCD_COLOR_BLACK         0x0000
-#define LCD_COLOR_GREY          0xF7DE          
-#define LCD_COLOR_BLUE          0x001F
-#define LCD_COLOR_RED           0xF800
-#define LCD_COLOR_GREEN         0x07E0
-#define LCD_COLOR_CYAN          0x07FF
-#define LCD_COLOR_MAGENTA       0xF81F
-#define LCD_COLOR_YELLOW        0xFFE0
-#define LCD_COLOR_WHITE         0xFFFF
-
-/** 
-  * @brief LCD default font 
-  */ 
-#define LCD_DEFAULT_FONT         Font8
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32_ADAFRUIT_LCD_Exported_Functions
-  * @{
-  */   
-uint8_t  BSP_LCD_Init(void);
-uint32_t BSP_LCD_GetXSize(void);
-uint32_t BSP_LCD_GetYSize(void);
- 
-uint16_t BSP_LCD_GetTextColor(void);
-uint16_t BSP_LCD_GetBackColor(void);
-void     BSP_LCD_SetTextColor(__IO uint16_t Color);
-void     BSP_LCD_SetBackColor(__IO uint16_t Color);
-void     BSP_LCD_SetFont(sFONT *fonts);
-sFONT    *BSP_LCD_GetFont(void);
-
-void     BSP_LCD_Clear(uint16_t Color);
-void     BSP_LCD_ClearStringLine(uint16_t Line);
-void     BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr);
-void     BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Line_ModeTypdef Mode);
-void     BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii);
-
-void     BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGB_Code);
-void     BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void     BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void     BSP_LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
-void     BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-void     BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
-void     BSP_LCD_DrawPolygon(pPoint Points, uint16_t PointCount);
-void     BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
-void     BSP_LCD_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pBmp);
-void     BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-void     BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
-void     BSP_LCD_FillPolygon(pPoint Points, uint16_t PointCount);
-void     BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
-
-void     BSP_LCD_DisplayOff(void);
-void     BSP_LCD_DisplayOn(void);
-
-/**
-  * @}
-  */
-  
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32_ADAFRUIT_LCD_H */
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 1030
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Adafruit_Shield/stm32_adafruit_sd.c

@@ -1,1030 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32_adafruit_sd.c
-  * @author  MCD Application Team
-  * @version V2.0.1
-  * @date    04-November-2015
-  * @brief   This file provides a set of functions needed to manage the SD card
-  *          mounted on the Adafruit 1.8" TFT LCD shield (reference ID 802),
-  *          that is used with the STM32 Nucleo board through SPI interface.
-  *          It implements a high level communication layer for read and write 
-  *          from/to this memory. The needed STM32XXxx hardware resources (SPI and 
-  *          GPIO) are defined in stm32XXxx_nucleo.h file, and the initialization is 
-  *          performed in SD_IO_Init() function declared in stm32XXxx_nucleo.c 
-  *          file.
-  *          You can easily tailor this driver to any other development board, 
-  *          by just adapting the defines for hardware resources and 
-  *          SD_IO_Init() function.
-  *            
-  *          +-------------------------------------------------------+
-  *          |                     Pin assignment                    |
-  *          +-------------------------+---------------+-------------+
-  *          |  STM32XXxx SPI Pins     |     SD        |    Pin      |
-  *          +-------------------------+---------------+-------------+
-  *          | SD_SPI_CS_PIN           |   ChipSelect  |    1        |
-  *          | SD_SPI_MOSI_PIN / MOSI  |   DataIn      |    2        |
-  *          |                         |   GND         |    3 (0 V)  |
-  *          |                         |   VDD         |    4 (3.3 V)|
-  *          | SD_SPI_SCK_PIN / SCLK   |   Clock       |    5        |
-  *          |                         |   GND         |    6 (0 V)  |
-  *          | SD_SPI_MISO_PIN / MISO  |   DataOut     |    7        |
-  *          +-------------------------+---------------+-------------+
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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.
-  *
-  ******************************************************************************
-  */ 
-
-/* File Info : -----------------------------------------------------------------
-                                   User NOTES
-1. How to use this driver:
---------------------------
-   - This driver does not need a specific component driver for the micro SD device
-     to be included with.
-
-2. Driver description:
----------------------
-  + Initialization steps:
-     o Initialize the micro SD card using the BSP_SD_Init() function. 
-     o Checking the SD card presence is not managed because SD detection pin is
-       not physically mapped on the Adafruit shield.
-     o The function BSP_SD_GetCardInfo() is used to get the micro SD card information 
-       which is stored in the structure "SD_CardInfo".
-  
-  + Micro SD card operations
-     o The micro SD card can be accessed with read/write block(s) operations once 
-       it is ready for access. The access can be performed in polling 
-       mode by calling the functions BSP_SD_ReadBlocks()/BSP_SD_WriteBlocks()
-       
-     o The SD erase block(s) is performed using the function BSP_SD_Erase() with 
-       specifying the number of blocks to erase.
-     o The SD runtime status is returned when calling the function BSP_SD_GetStatus().
-     
-------------------------------------------------------------------------------*/ 
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32_adafruit_sd.h"
-#include "stdlib.h"
-#include "string.h"
-#include "stdio.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32_ADAFRUIT
-  * @{
-  */ 
-  
-/** @defgroup STM32_ADAFRUIT_SD
-  * @{
-  */ 
-  
-/* Private typedef -----------------------------------------------------------*/
-
-/** @defgroup STM32_ADAFRUIT_SD_Private_Types_Definitions
-  * @{
-  */ 
-typedef struct {
-  uint8_t r1;
-  uint8_t r2;
-  uint8_t r3;
-  uint8_t r4;
-  uint8_t r5;
-} SD_CmdAnswer_typedef;
-  
-/**
-  * @}
-  */
-  
-/* Private define ------------------------------------------------------------*/
-
-/** @defgroup STM32_ADAFRUIT_SD_Private_Defines
-  * @{
-  */
-#define SD_DUMMY_BYTE            0xFF
-
-#define SD_MAX_FRAME_LENGTH        17    /* Lenght = 16 + 1 */
-#define SD_CMD_LENGTH               6
-
-#define SD_MAX_TRY                100    /* Number of try */
-
-#define SD_CSD_STRUCT_V1          0x2    /* CSD struct version V1 */
-#define SD_CSD_STRUCT_V2          0x1    /* CSD struct version V2 */
-
-
-/**
-  * @brief  SD ansewer format
-  */ 
-typedef enum {
- SD_ANSWER_R1_EXPECTED,
- SD_ANSWER_R1B_EXPECTED,
- SD_ANSWER_R2_EXPECTED,
- SD_ANSWER_R3_EXPECTED,
- SD_ANSWER_R4R5_EXPECTED,
- SD_ANSWER_R7_EXPECTED,
-}SD_Answer_type;
-
-/**
-  * @brief  Start Data tokens:
-  *         Tokens (necessary because at nop/idle (and CS active) only 0xff is 
-  *         on the data/command line)  
-  */ 
-#define SD_TOKEN_START_DATA_SINGLE_BLOCK_READ    0xFE  /* Data token start byte, Start Single Block Read */
-#define SD_TOKEN_START_DATA_MULTIPLE_BLOCK_READ  0xFE  /* Data token start byte, Start Multiple Block Read */
-#define SD_TOKEN_START_DATA_SINGLE_BLOCK_WRITE   0xFE  /* Data token start byte, Start Single Block Write */
-#define SD_TOKEN_START_DATA_MULTIPLE_BLOCK_WRITE 0xFD  /* Data token start byte, Start Multiple Block Write */
-#define SD_TOKEN_STOP_DATA_MULTIPLE_BLOCK_WRITE  0xFD  /* Data toke stop byte, Stop Multiple Block Write */
-
-/**
-  * @brief  Commands: CMDxx = CMD-number | 0x40
-  */
-#define SD_CMD_GO_IDLE_STATE          0   /* CMD0 = 0x40  */
-#define SD_CMD_SEND_OP_COND           1   /* CMD1 = 0x41  */
-#define SD_CMD_SEND_IF_COND           8   /* CMD8 = 0x48  */
-#define SD_CMD_SEND_CSD               9   /* CMD9 = 0x49  */
-#define SD_CMD_SEND_CID               10  /* CMD10 = 0x4A */
-#define SD_CMD_STOP_TRANSMISSION      12  /* CMD12 = 0x4C */
-#define SD_CMD_SEND_STATUS            13  /* CMD13 = 0x4D */
-#define SD_CMD_SET_BLOCKLEN           16  /* CMD16 = 0x50 */
-#define SD_CMD_READ_SINGLE_BLOCK      17  /* CMD17 = 0x51 */
-#define SD_CMD_READ_MULT_BLOCK        18  /* CMD18 = 0x52 */
-#define SD_CMD_SET_BLOCK_COUNT        23  /* CMD23 = 0x57 */
-#define SD_CMD_WRITE_SINGLE_BLOCK     24  /* CMD24 = 0x58 */
-#define SD_CMD_WRITE_MULT_BLOCK       25  /* CMD25 = 0x59 */
-#define SD_CMD_PROG_CSD               27  /* CMD27 = 0x5B */
-#define SD_CMD_SET_WRITE_PROT         28  /* CMD28 = 0x5C */
-#define SD_CMD_CLR_WRITE_PROT         29  /* CMD29 = 0x5D */
-#define SD_CMD_SEND_WRITE_PROT        30  /* CMD30 = 0x5E */
-#define SD_CMD_SD_ERASE_GRP_START     32  /* CMD32 = 0x60 */
-#define SD_CMD_SD_ERASE_GRP_END       33  /* CMD33 = 0x61 */
-#define SD_CMD_UNTAG_SECTOR           34  /* CMD34 = 0x62 */
-#define SD_CMD_ERASE_GRP_START        35  /* CMD35 = 0x63 */
-#define SD_CMD_ERASE_GRP_END          36  /* CMD36 = 0x64 */
-#define SD_CMD_UNTAG_ERASE_GROUP      37  /* CMD37 = 0x65 */
-#define SD_CMD_ERASE                  38  /* CMD38 = 0x66 */
-#define SD_CMD_SD_APP_OP_COND         41  /* CMD41 = 0x69 */
-#define SD_CMD_APP_CMD                55  /* CMD55 = 0x77 */
-#define SD_CMD_READ_OCR               58  /* CMD55 = 0x79 */
-
-/**
-  * @brief  SD reponses and error flags
-  */
-typedef enum
-{
-/* R1 answer value */  
-  SD_R1_NO_ERROR            = (0x00),
-  SD_R1_IN_IDLE_STATE       = (0x01),
-  SD_R1_ERASE_RESET         = (0x02),
-  SD_R1_ILLEGAL_COMMAND     = (0x04),
-  SD_R1_COM_CRC_ERROR       = (0x08),
-  SD_R1_ERASE_SEQUENCE_ERROR= (0x10),
-  SD_R1_ADDRESS_ERROR       = (0x20),
-  SD_R1_PARAMETER_ERROR     = (0x40),
-
-/* R2 answer value */
-  SD_R2_NO_ERROR            = 0x00,
-  SD_R2_CARD_LOCKED         = 0x01,
-  SD_R2_LOCKUNLOCK_ERROR    = 0x02,
-  SD_R2_ERROR               = 0x04,
-  SD_R2_CC_ERROR            = 0x08,
-  SD_R2_CARD_ECC_FAILED     = 0x10,
-  SD_R2_WP_VIOLATION        = 0x20,
-  SD_R2_ERASE_PARAM         = 0x40,
-  SD_R2_OUTOFRANGE          = 0x80,
-  
-/**
-  * @brief  Data response error
-  */
-  SD_DATA_OK                = (0x05),
-  SD_DATA_CRC_ERROR         = (0x0B),
-  SD_DATA_WRITE_ERROR       = (0x0D),
-  SD_DATA_OTHER_ERROR       = (0xFF)
-} SD_Error;
-
-/**
-  * @}
-  */
-  
-/* Private macro -------------------------------------------------------------*/
-
-/** @defgroup STM32_ADAFRUIT_SD_Private_Macros
-  * @{
-  */  
-
-/**
-  * @}
-  */
-  
-/* Private variables ---------------------------------------------------------*/
-
-/** @defgroup STM32_ADAFRUIT_SD_Private_Variables
-  * @{
-  */       
-__IO uint8_t SdStatus = SD_NOT_PRESENT;
-
-/* flag_SDHC :
-      0 :  Standard capacity
-      1 : High capacity
-*/
-uint16_t flag_SDHC = 0; 
-
-/**
-  * @}
-  */ 
-
-/* Private function prototypes -----------------------------------------------*/
-static uint8_t SD_GetCIDRegister(SD_CID* Cid);
-static uint8_t SD_GetCSDRegister(SD_CSD* Csd);
-static uint8_t SD_GetDataResponse(void);
-static uint8_t SD_GoIdleState(void);
-static SD_CmdAnswer_typedef SD_SendCmd(uint8_t Cmd, uint32_t Arg, uint8_t Crc, uint8_t Answer);
-static uint8_t SD_WaitData(uint8_t data);
-static uint8_t SD_ReadData(void);
-/** @defgroup STM32_ADAFRUIT_SD_Private_Function_Prototypes
-  * @{
-  */ 
-/**
-  * @}
-  */
- 
-/* Private functions ---------------------------------------------------------*/
-    
-/** @defgroup STM32_ADAFRUIT_SD_Private_Functions
-  * @{
-  */ 
-  
-/**
-  * @brief  Initializes the SD/SD communication.
-  * @param  None
-  * @retval The SD Response: 
-  *         - MSD_ERROR: Sequence failed
-  *         - MSD_OK: Sequence succeed
-  */
-uint8_t BSP_SD_Init(void)
-{ 
-  /* Configure IO functionalities for SD pin */
-  SD_IO_Init();
-
-  /* SD detection pin is not physically mapped on the Adafruit shield */
-  SdStatus = SD_PRESENT;
-  
-  /* SD initialized and set to SPI mode properly */
-  return SD_GoIdleState();
-}
-
-/**
-  * @brief  Returns information about specific card.
-  * @param  pCardInfo: Pointer to a SD_CardInfo structure that contains all SD 
-  *         card information.
-  * @retval The SD Response:
-  *         - MSD_ERROR: Sequence failed
-  *         - MSD_OK: Sequence succeed
-  */
-uint8_t BSP_SD_GetCardInfo(SD_CardInfo *pCardInfo)
-{
-  uint8_t status;
-
-  status = SD_GetCSDRegister(&(pCardInfo->Csd));
-  status|= SD_GetCIDRegister(&(pCardInfo->Cid));
-  if(flag_SDHC == 1 )
-  {
-    pCardInfo->CardBlockSize = 512;
-    pCardInfo->CardCapacity = (pCardInfo->Csd.version.v2.DeviceSize + 1) * pCardInfo->CardBlockSize;
-  }
-  else
-  {
-    pCardInfo->CardCapacity = (pCardInfo->Csd.version.v1.DeviceSize + 1) ;
-    pCardInfo->CardCapacity *= (1 << (pCardInfo->Csd.version.v1.DeviceSizeMul + 2));
-    pCardInfo->CardBlockSize = 1 << (pCardInfo->Csd.RdBlockLen);
-    pCardInfo->CardCapacity *= pCardInfo->CardBlockSize;
-  }
-  
-  return status;
-}
-
-/**
-  * @brief  Reads block(s) from a specified address in the SD card, in polling mode. 
-  * @param  pData: Pointer to the buffer that will contain the data to transmit
-  * @param  ReadAddr: Address from where data is to be read  
-  * @param  BlockSize: SD card data block size, that should be 512
-  * @param  NumOfBlocks: Number of SD blocks to read 
-  * @retval SD status
-  */
-uint8_t BSP_SD_ReadBlocks(uint32_t* pData, uint32_t ReadAddr, uint16_t BlockSize, uint32_t NumberOfBlocks)
-{
-  uint32_t offset = 0;
-  uint8_t retr = BSP_SD_ERROR;
-  uint8_t *ptr = NULL;
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD16 (SD_CMD_SET_BLOCKLEN) to set the size of the block and 
-     Check if the SD acknowledged the set block length command: R1 response (0x00: no errors) */
-  response = SD_SendCmd(SD_CMD_SET_BLOCKLEN, BlockSize, 0xFF, SD_ANSWER_R1_EXPECTED);
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if ( response.r1 != SD_R1_NO_ERROR)
-  {
-     goto error;
-  }
-  
-  ptr = malloc(sizeof(uint8_t)*BlockSize);
-  if( ptr == NULL )
-  {
-     goto error;
-  }
-  memset(ptr, SD_DUMMY_BYTE, sizeof(uint8_t)*BlockSize);
-
-  /* Data transfer */
-  while (NumberOfBlocks--)
-  {
-    /* Send CMD17 (SD_CMD_READ_SINGLE_BLOCK) to read one block */
-    /* Check if the SD acknowledged the read block command: R1 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_READ_SINGLE_BLOCK, (ReadAddr + offset)/(flag_SDHC == 1 ?BlockSize: 1), 0xFF, SD_ANSWER_R1_EXPECTED);
-    if ( response.r1 != SD_R1_NO_ERROR)
-    {
-      goto error;
-    }
-
-    /* Now look for the data token to signify the start of the data */
-    if (SD_WaitData(SD_TOKEN_START_DATA_SINGLE_BLOCK_READ) == BSP_SD_OK)
-    {
-      /* Read the SD block data : read NumByteToRead data */
-      SD_IO_WriteReadData(ptr, (uint8_t*)pData + offset, BlockSize);
-
-      /* Set next read address*/
-      offset += BlockSize;
-      /* get CRC bytes (not really needed by us, but required by SD) */
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);      
-    }
-    else
-    {
-      goto error;
-    }
-    
-    /* End the command data read cycle */
-    SD_IO_CSState(1);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-  }
-  
-  retr = BSP_SD_OK;
-  
-error :  
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if(ptr != NULL) free(ptr);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Writes block(s) to a specified address in the SD card, in polling mode. 
-  * @param  pData: Pointer to the buffer that will contain the data to transmit
-  * @param  WriteAddr: Address from where data is to be written  
-  * @param  BlockSize: SD card data block size, that should be 512
-  * @param  NumOfBlocks: Number of SD blocks to write
-  * @retval SD status
-  */
-uint8_t BSP_SD_WriteBlocks(uint32_t* pData, uint32_t WriteAddr, uint16_t BlockSize, uint32_t NumberOfBlocks)
-{
-  uint32_t offset = 0;
-  uint8_t retr = BSP_SD_ERROR;
-  uint8_t *ptr = NULL;
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD16 (SD_CMD_SET_BLOCKLEN) to set the size of the block and 
-     Check if the SD acknowledged the set block length command: R1 response (0x00: no errors) */
-  response = SD_SendCmd(SD_CMD_SET_BLOCKLEN, BlockSize, 0xFF, SD_ANSWER_R1_EXPECTED);
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if ( response.r1 != SD_R1_NO_ERROR)
-  {
-    goto error;
-  }
-  
-  ptr = malloc(sizeof(uint8_t)*BlockSize);
-  if (ptr == NULL)
-  {
-    goto error;
-  }
-  
-  /* Data transfer */
-  while (NumberOfBlocks--)
-  {
-    /* Send CMD24 (SD_CMD_WRITE_SINGLE_BLOCK) to write blocks  and
-       Check if the SD acknowledged the write block command: R1 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_WRITE_SINGLE_BLOCK, (WriteAddr + offset)/(flag_SDHC == 1 ? BlockSize: 1), 0xFF, SD_ANSWER_R1_EXPECTED);
-    if (response.r1 != SD_R1_NO_ERROR)
-    {
-      goto error;
-    }
-    
-    /* Send dummy byte for NWR timing : one byte between CMDWRITE and TOKEN */
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-
-    /* Send the data token to signify the start of the data */
-    SD_IO_WriteByte(SD_TOKEN_START_DATA_SINGLE_BLOCK_WRITE);
-
-    /* Write the block data to SD */
-    SD_IO_WriteReadData((uint8_t*)pData + offset, ptr, BlockSize);
-    
-    /* Set next write address */
-    offset += BlockSize;
-
-    /* Put CRC bytes (not really needed by us, but required by SD) */
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-
-    /* Read data response */
-    if (SD_GetDataResponse() != SD_DATA_OK)
-    {
-      /* Set response value to failure */
-      goto error;
-    }
-
-    SD_IO_CSState(1);    
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-  }
-  retr = BSP_SD_OK;
-  
-error :
-  if(ptr != NULL) free(ptr);
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);    
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Erases the specified memory area of the given SD card. 
-  * @param  StartAddr: Start byte address
-  * @param  EndAddr: End byte address
-  * @retval SD status
-  */
-uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr)
-{
-  uint8_t retr = BSP_SD_ERROR;
-  SD_CmdAnswer_typedef response;
-
-  /* Send CMD32 (Erase group start) and check if the SD acknowledged the erase command: R1 response (0x00: no errors) */
-  response = SD_SendCmd(SD_CMD_SD_ERASE_GRP_START, StartAddr, 0xFF, SD_ANSWER_R1_EXPECTED);
-  SD_IO_CSState(1);    
-  SD_IO_WriteByte(SD_DUMMY_BYTE);  if (response.r1 == SD_R1_NO_ERROR)
-  {
-    /* Send CMD33 (Erase group end) and Check if the SD acknowledged the erase command: R1 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_SD_ERASE_GRP_END, EndAddr, 0xFF, SD_ANSWER_R1_EXPECTED);
-    SD_IO_CSState(1);    
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    if (response.r1 == SD_R1_NO_ERROR)
-    {
-      /* Send CMD38 (Erase) and Check if the SD acknowledged the erase command: R1 response (0x00: no errors) */
-      response = SD_SendCmd(SD_CMD_ERASE, 0, 0xFF, SD_ANSWER_R1B_EXPECTED);
-      if (response.r1 == SD_R1_NO_ERROR)
-      {
-        retr = BSP_SD_OK;
-      }
-      SD_IO_CSState(1);    
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-    }
-  }
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Returns the SD status.
-  * @param  None
-  * @retval The SD status.
-  */
-uint8_t BSP_SD_GetStatus(void)
-{
-  SD_CmdAnswer_typedef retr;
-  
-  /* Send CMD13 (SD_SEND_STATUS) to get SD status */
-  retr = SD_SendCmd(SD_CMD_SEND_STATUS, 0, 0xFF, SD_ANSWER_R2_EXPECTED);
-  SD_IO_CSState(1);    
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Find SD status according to card state */
-  if(( retr.r1 == SD_R1_NO_ERROR) && ( retr.r2 == SD_R2_NO_ERROR))
-  {
-    return BSP_SD_OK;
-  }
-
-  return BSP_SD_ERROR;
-}
-
-/**
-  * @brief  Reads the SD card SCD register.
-  *         Reading the contents of the CSD register in SPI mode is a simple 
-  *         read-block transaction.
-  * @param  Csd: pointer on an SCD register structure
-  * @retval SD status
-  */
-uint8_t SD_GetCSDRegister(SD_CSD* Csd)
-{
-  uint16_t counter = 0;
-  uint8_t CSD_Tab[16];
-  uint8_t retr = BSP_SD_ERROR;
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD9 (CSD register) or CMD10(CSD register) and Wait for response in the R1 format (0x00 is no errors) */
-  response = SD_SendCmd(SD_CMD_SEND_CSD, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-  if(response.r1 == SD_R1_NO_ERROR)
-  {
-    if (SD_WaitData(SD_TOKEN_START_DATA_SINGLE_BLOCK_READ) == BSP_SD_OK)
-    {
-      for (counter = 0; counter < 16; counter++)
-      {
-        /* Store CSD register value on CSD_Tab */
-        CSD_Tab[counter] = SD_IO_WriteByte(SD_DUMMY_BYTE);
-      }
-      
-      /* Get CRC bytes (not really needed by us, but required by SD) */
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-
-      /*************************************************************************
-        CSD header decoding 
-      *************************************************************************/
-      
-      /* Byte 0 */
-      Csd->CSDStruct = (CSD_Tab[0] & 0xC0) >> 6;
-      Csd->Reserved1 =  CSD_Tab[0] & 0x3F;
-      
-      /* Byte 1 */
-      Csd->TAAC = CSD_Tab[1];
-      
-      /* Byte 2 */
-      Csd->NSAC = CSD_Tab[2];
-      
-      /* Byte 3 */
-      Csd->MaxBusClkFrec = CSD_Tab[3];
-      
-      /* Byte 4/5 */
-      Csd->CardComdClasses = (CSD_Tab[4] << 4) | ((CSD_Tab[5] & 0xF0) >> 4);
-      Csd->RdBlockLen = CSD_Tab[5] & 0x0F;
-      
-      /* Byte 6 */
-      Csd->PartBlockRead   = (CSD_Tab[6] & 0x80) >> 7;
-      Csd->WrBlockMisalign = (CSD_Tab[6] & 0x40) >> 6;
-      Csd->RdBlockMisalign = (CSD_Tab[6] & 0x20) >> 5;
-      Csd->DSRImpl         = (CSD_Tab[6] & 0x10) >> 4;
-
-      /*************************************************************************
-        CSD v1/v2 decoding  
-      *************************************************************************/
-     
-      if(flag_SDHC == 0)
-      {
-        Csd->version.v1.Reserved1 = ((CSD_Tab[6] & 0x0C) >> 2);
-        
-        Csd->version.v1.DeviceSize =  ((CSD_Tab[6] & 0x03) << 10) 
-                                    |  (CSD_Tab[7] << 2)
-                                    | ((CSD_Tab[8] & 0xC0) >> 6);
-        Csd->version.v1.MaxRdCurrentVDDMin = (CSD_Tab[8] & 0x38) >> 3;
-        Csd->version.v1.MaxRdCurrentVDDMax = (CSD_Tab[8] & 0x07);
-        Csd->version.v1.MaxWrCurrentVDDMin = (CSD_Tab[9] & 0xE0) >> 5;
-        Csd->version.v1.MaxWrCurrentVDDMax = (CSD_Tab[9] & 0x1C) >> 2;
-        Csd->version.v1.DeviceSizeMul = ((CSD_Tab[9] & 0x03) << 1)
-                                       |((CSD_Tab[10] & 0x80) >> 7);
-      }
-      else
-      {
-        Csd->version.v2.Reserved1 = ((CSD_Tab[6] & 0x0F) << 2) | ((CSD_Tab[7] & 0xC0) >> 6);
-        Csd->version.v2.DeviceSize= ((CSD_Tab[7] & 0x3F) << 16) | (CSD_Tab[8] << 8) | CSD_Tab[9];    
-        Csd->version.v2.Reserved2 = ((CSD_Tab[10] & 0x80) >> 8);
-      }    
-            
-      Csd->EraseSingleBlockEnable = (CSD_Tab[10] & 0x40) >> 6;
-      Csd->EraseSectorSize   = ((CSD_Tab[10] & 0x3F) << 1)
-                              |((CSD_Tab[11] & 0x80) >> 7);
-      Csd->WrProtectGrSize   = (CSD_Tab[11] & 0x7F);
-      Csd->WrProtectGrEnable = (CSD_Tab[12] & 0x80) >> 7;
-      Csd->Reserved2         = (CSD_Tab[12] & 0x60) >> 5;
-      Csd->WrSpeedFact       = (CSD_Tab[12] & 0x1C) >> 2;
-      Csd->MaxWrBlockLen     = ((CSD_Tab[12] & 0x03) << 2)
-                              |((CSD_Tab[13] & 0xC0) >> 6);
-      Csd->WriteBlockPartial = (CSD_Tab[13] & 0x20) >> 5;
-      Csd->Reserved3         = (CSD_Tab[13] & 0x1F);
-      Csd->FileFormatGrouop  = (CSD_Tab[14] & 0x80) >> 7;
-      Csd->CopyFlag          = (CSD_Tab[14] & 0x40) >> 6;
-      Csd->PermWrProtect     = (CSD_Tab[14] & 0x20) >> 5;
-      Csd->TempWrProtect     = (CSD_Tab[14] & 0x10) >> 4;
-      Csd->FileFormat        = (CSD_Tab[14] & 0x0C) >> 2;
-      Csd->Reserved4         = (CSD_Tab[14] & 0x03);
-      Csd->crc               = (CSD_Tab[15] & 0xFE) >> 1;
-      Csd->Reserved5         = (CSD_Tab[15] & 0x01);
-      
-      retr = BSP_SD_OK;
-    }
-  }
-  
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Reads the SD card CID register.
-  *         Reading the contents of the CID register in SPI mode is a simple 
-  *         read-block transaction.
-  * @param  Cid: pointer on an CID register structure
-  * @retval SD status
-  */
-uint8_t SD_GetCIDRegister(SD_CID* Cid)
-{
-  uint32_t counter = 0;
-  uint8_t retr = BSP_SD_ERROR;
-  uint8_t CID_Tab[16];
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD10 (CID register) and Wait for response in the R1 format (0x00 is no errors) */
-  response = SD_SendCmd(SD_CMD_SEND_CID, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-  if(response.r1 == SD_R1_NO_ERROR)
-  {
-    if(SD_WaitData(SD_TOKEN_START_DATA_SINGLE_BLOCK_READ) == BSP_SD_OK)
-    {
-      /* Store CID register value on CID_Tab */
-      for (counter = 0; counter < 16; counter++)
-      {
-        CID_Tab[counter] = SD_IO_WriteByte(SD_DUMMY_BYTE);
-      }
-      
-      /* Get CRC bytes (not really needed by us, but required by SD) */
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      
-      /* Byte 0 */
-      Cid->ManufacturerID = CID_Tab[0];
-      
-      /* Byte 1 */
-      Cid->OEM_AppliID = CID_Tab[1] << 8;
-      
-      /* Byte 2 */
-      Cid->OEM_AppliID |= CID_Tab[2];
-      
-      /* Byte 3 */
-      Cid->ProdName1 = CID_Tab[3] << 24;
-      
-      /* Byte 4 */
-      Cid->ProdName1 |= CID_Tab[4] << 16;
-      
-      /* Byte 5 */
-      Cid->ProdName1 |= CID_Tab[5] << 8;
-      
-      /* Byte 6 */
-      Cid->ProdName1 |= CID_Tab[6];
-      
-      /* Byte 7 */
-      Cid->ProdName2 = CID_Tab[7];
-      
-      /* Byte 8 */
-      Cid->ProdRev = CID_Tab[8];
-      
-      /* Byte 9 */
-      Cid->ProdSN = CID_Tab[9] << 24;
-      
-      /* Byte 10 */
-      Cid->ProdSN |= CID_Tab[10] << 16;
-      
-      /* Byte 11 */
-      Cid->ProdSN |= CID_Tab[11] << 8;
-      
-      /* Byte 12 */
-      Cid->ProdSN |= CID_Tab[12];
-      
-      /* Byte 13 */
-      Cid->Reserved1 |= (CID_Tab[13] & 0xF0) >> 4;
-      Cid->ManufactDate = (CID_Tab[13] & 0x0F) << 8;
-      
-      /* Byte 14 */
-      Cid->ManufactDate |= CID_Tab[14];
-      
-      /* Byte 15 */
-      Cid->CID_CRC = (CID_Tab[15] & 0xFE) >> 1;
-      Cid->Reserved2 = 1;
-
-      retr = BSP_SD_OK;
-    }
-  }
-  
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Sends 5 bytes command to the SD card and get response
-  * @param  Cmd: The user expected command to send to SD card.
-  * @param  Arg: The command argument.
-  * @param  Crc: The CRC.
-  * @param  Answer: SD_ANSWER_NOT_EXPECTED or SD_ANSWER_EXPECTED
-  * @retval SD status
-  */
-SD_CmdAnswer_typedef SD_SendCmd(uint8_t Cmd, uint32_t Arg, uint8_t Crc, uint8_t Answer)
-{
-  uint8_t frame[SD_CMD_LENGTH], frameout[SD_CMD_LENGTH];
-  SD_CmdAnswer_typedef retr = {0xFF, 0xFF , 0xFF, 0xFF, 0xFF};
-
-  /* R1 Lenght = NCS(0)+ 6 Bytes command + NCR(min1 max8) + 1 Bytes answer + NEC(0) = 15bytes */
-  /* R1b identical to R1 + Busy information                                                   */
-  /* R2 Lenght = NCS(0)+ 6 Bytes command + NCR(min1 max8) + 2 Bytes answer + NEC(0) = 16bytes */
-  
-  /* Prepare Frame to send */
-  frame[0] = (Cmd | 0x40);         /* Construct byte 1 */
-  frame[1] = (uint8_t)(Arg >> 24); /* Construct byte 2 */
-  frame[2] = (uint8_t)(Arg >> 16); /* Construct byte 3 */
-  frame[3] = (uint8_t)(Arg >> 8);  /* Construct byte 4 */
-  frame[4] = (uint8_t)(Arg);       /* Construct byte 5 */
-  frame[5] = (Crc | 0x01);         /* Construct byte 6 */
-    
-  /* Send the command */
-  SD_IO_CSState(0);
-  SD_IO_WriteReadData(frame, frameout, SD_CMD_LENGTH); /* Send the Cmd bytes */
-  
-  switch(Answer)
-  {
-  case SD_ANSWER_R1_EXPECTED :
-    retr.r1 = SD_ReadData();
-    break;
-  case SD_ANSWER_R1B_EXPECTED :
-    retr.r1 = SD_ReadData();
-    retr.r2 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    /* Set CS High */
-    SD_IO_CSState(1);
-    HAL_Delay(1);
-    /* Set CS Low */
-    SD_IO_CSState(0);
-    
-    /* Wait IO line return 0xFF */
-    while (SD_IO_WriteByte(SD_DUMMY_BYTE) != 0xFF); 
-    break;
-  case SD_ANSWER_R2_EXPECTED :
-    retr.r1 = SD_ReadData();
-    retr.r2 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    break;
-  case SD_ANSWER_R3_EXPECTED :
-  case SD_ANSWER_R7_EXPECTED :
-    retr.r1 = SD_ReadData();
-    retr.r2 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    retr.r3 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    retr.r4 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    retr.r5 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    break;
-  default :
-    break;
-  }  
-  return retr;
-}
-
-/**
-  * @brief  Gets the SD card data response and check the busy flag.
-  * @param  None
-  * @retval The SD status: Read data response xxx0<status>1
-  *         - status 010: Data accecpted
-  *         - status 101: Data rejected due to a crc error
-  *         - status 110: Data rejected due to a Write error.
-  *         - status 111: Data rejected due to other error.
-  */
-uint8_t SD_GetDataResponse(void)
-{
-  uint8_t dataresponse;
-  uint8_t rvalue = SD_DATA_OTHER_ERROR;
-  
-  dataresponse = SD_IO_WriteByte(SD_DUMMY_BYTE);
-  SD_IO_WriteByte(SD_DUMMY_BYTE); /* read the busy response byte*/
- 
-  /* Mask unused bits */
-  switch (dataresponse & 0x1F)
-  {
-  case SD_DATA_OK:
-    rvalue = SD_DATA_OK;
-    
-    /* Set CS High */
-    SD_IO_CSState(1);
-    /* Set CS Low */
-    SD_IO_CSState(0);
-
-    /* Wait IO line return 0xFF */
-    while (SD_IO_WriteByte(SD_DUMMY_BYTE) != 0xFF);
-    break;
-  case SD_DATA_CRC_ERROR:
-    rvalue =  SD_DATA_CRC_ERROR;
-    break;
-  case SD_DATA_WRITE_ERROR:
-    rvalue = SD_DATA_WRITE_ERROR;
-    break;
-  default:
-    break;
-  }
-  
-  /* Return response */
-  return rvalue;
-}
-
-
-/**
-  * @brief  Put the SD in Idle state.
-  * @param  None
-  * @retval SD status
-  */
-uint8_t SD_GoIdleState(void)
-{
-  SD_CmdAnswer_typedef response;
-  __IO uint8_t counter = 0;
-  /* Send CMD0 (SD_CMD_GO_IDLE_STATE) to put SD in SPI mode and 
-     wait for In Idle State Response (R1 Format) equal to 0x01 */
-  do{
-    counter++;
-    response = SD_SendCmd(SD_CMD_GO_IDLE_STATE, 0, 0x95, SD_ANSWER_R1_EXPECTED);
-    SD_IO_CSState(1);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    if(counter >= SD_MAX_TRY)
-    {
-      return BSP_SD_ERROR;
-    }
-  }
-  while(response.r1 != SD_R1_IN_IDLE_STATE);
-  
-    
-  /* Send CMD8 (SD_CMD_SEND_IF_COND) to check the power supply status 
-     and wait until response (R7 Format) equal to 0xAA and */
-  response = SD_SendCmd(SD_CMD_SEND_IF_COND, 0x1AA, 0x87, SD_ANSWER_R7_EXPECTED);
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if((response.r1  & SD_R1_ILLEGAL_COMMAND) == SD_R1_ILLEGAL_COMMAND)
-  {
-    /* initialise card V1 */
-    do
-    {
-      /* initialise card V1 */
-      /* Send CMD55 (SD_CMD_APP_CMD) before any ACMD command: R1 response (0x00: no errors) */ 
-      response = SD_SendCmd(SD_CMD_APP_CMD, 0x00000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      
-      /* Send ACMD41 (SD_CMD_SD_APP_OP_COND) to initialize SDHC or SDXC cards: R1 response (0x00: no errors) */
-      response = SD_SendCmd(SD_CMD_SD_APP_OP_COND, 0x00000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-    }
-    while(response.r1 == SD_R1_IN_IDLE_STATE);
-    flag_SDHC = 0;
-  } 
-  else if(response.r1 == SD_R1_IN_IDLE_STATE)
-  {
-      /* initialise card V2 */
-    do {
-      
-      /* Send CMD55 (SD_CMD_APP_CMD) before any ACMD command: R1 response (0x00: no errors) */ 
-      response = SD_SendCmd(SD_CMD_APP_CMD, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      
-      /* Send ACMD41 (SD_CMD_SD_APP_OP_COND) to initialize SDHC or SDXC cards: R1 response (0x00: no errors) */
-      response = SD_SendCmd(SD_CMD_SD_APP_OP_COND, 0x40000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-    }
-    while(response.r1 == SD_R1_IN_IDLE_STATE);
-    
-    if((response.r1 & SD_R1_ILLEGAL_COMMAND) == SD_R1_ILLEGAL_COMMAND)
-    {
-      do {
-        /* Send CMD55 (SD_CMD_APP_CMD) before any ACMD command: R1 response (0x00: no errors) */ 
-        response = SD_SendCmd(SD_CMD_APP_CMD, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-        SD_IO_CSState(1);
-        SD_IO_WriteByte(SD_DUMMY_BYTE);
-        if(response.r1 != SD_R1_IN_IDLE_STATE)
-        {
-          return BSP_SD_ERROR;
-        }
-        /* Send ACMD41 (SD_CMD_SD_APP_OP_COND) to initialize SDHC or SDXC cards: R1 response (0x00: no errors) */
-        response = SD_SendCmd(SD_CMD_SD_APP_OP_COND, 0x00000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-        SD_IO_CSState(1);
-        SD_IO_WriteByte(SD_DUMMY_BYTE);
-      }
-      while(response.r1 == SD_R1_IN_IDLE_STATE);        
-    }  
-    
-    /* Send CMD58 (SD_CMD_READ_OCR) to initialize SDHC or SDXC cards: R3 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_READ_OCR, 0x00000000, 0xFF, SD_ANSWER_R3_EXPECTED);
-    SD_IO_CSState(1);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    if(response.r1 != SD_R1_NO_ERROR)
-    {
-      return BSP_SD_ERROR;
-    } 
-    flag_SDHC = (response.r2 & 0x40) >> 6;
-  }
-  else
-  {
-    return BSP_SD_ERROR;
-  }
-  
-  return BSP_SD_OK; 
-}
-
-/**
-  * @brief  Waits a data until a value different from SD_DUMMY_BITE
-  * @param  None
-  * @retval the value read
-  */
-uint8_t SD_ReadData(void)
-{
-  uint8_t timeout = 0x08;
-  uint8_t readvalue;
- 
-  /* Check if response is got or a timeout is happen */
-  do {
-    readvalue = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    timeout--;
-    
-  }while ((readvalue == SD_DUMMY_BYTE) && timeout);
-
-  /* Right response got */
-  return readvalue;
-}
-
-/**
-  * @brief  Waits a data from the SD card
-  * @param  data : Expected data from the SD card
-  * @retval BSP_SD_OK or BSP_SD_TIMEOUT
-  */
-uint8_t SD_WaitData(uint8_t data)
-{
-  uint16_t timeout = 0xFFFF;
-  uint8_t readvalue;
-  
-  /* Check if response is got or a timeout is happen */
-  
-  do {
-    readvalue = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    timeout--;
-  }while ((readvalue != data) && timeout);
-
-  if (timeout == 0)
-  {
-    /* After time out */
-    return BSP_SD_TIMEOUT;
-  }
-
-  /* Right response got */
-  return BSP_SD_OK;
-}
-
-/**
-  * @}
-  */  
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 240
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Adafruit_Shield/stm32_adafruit_sd.h

@@ -1,240 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32_adafruit_sd.h
-  * @author  MCD Application Team
-  * @version V2.0.1
-  * @date    04-November-2015
-  * @brief   This file contains the common defines and functions prototypes for
-  *          the stm32_adafruit_sd.c driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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_ADAFRUIT_SD_H
-#define __STM32_ADAFRUIT_SD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif 
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-
-/** @addtogroup BSP
-  * @{
-  */ 
-#define __IO    volatile   
-   
-/** @addtogroup STM32_ADAFRUIT
-  * @{
-  */
-    
-/** @defgroup STM32_ADAFRUIT_SD
-  * @{
-  */    
-
-/** @defgroup STM32_ADAFRUIT_SD_Exported_Types
-  * @{
-  */
-   
-/** 
-  * @brief  SD status structure definition  
-  */     
-enum {    
-      BSP_SD_OK = 0x00,      
-      MSD_OK = 0x00,
-      BSP_SD_ERROR = 0x01,
-      BSP_SD_TIMEOUT
-};
-   
-typedef struct              
-{
-  uint8_t  Reserved1:2;               /* Reserved */
-  uint16_t DeviceSize:12;             /* Device Size */
-  uint8_t  MaxRdCurrentVDDMin:3;      /* Max. read current @ VDD min */
-  uint8_t  MaxRdCurrentVDDMax:3;      /* Max. read current @ VDD max */
-  uint8_t  MaxWrCurrentVDDMin:3;      /* Max. write current @ VDD min */
-  uint8_t  MaxWrCurrentVDDMax:3;      /* Max. write current @ VDD max */
-  uint8_t  DeviceSizeMul:3;           /* Device size multiplier */
-} struct_v1;
-
-
-typedef struct              
-{
-  uint8_t  Reserved1:6;               /* Reserved */
-  uint32_t DeviceSize:22;             /* Device Size */
-  uint8_t  Reserved2:1;               /* Reserved */
-} struct_v2;
-
-/** 
-  * @brief  Card Specific Data: CSD Register
-  */ 
-typedef struct
-{
-  /* Header part */
-  uint8_t  CSDStruct:2;            /* CSD structure */
-  uint8_t  Reserved1:6;            /* Reserved */
-  uint8_t  TAAC:8;                 /* Data read access-time 1 */
-  uint8_t  NSAC:8;                 /* Data read access-time 2 in CLK cycles */
-  uint8_t  MaxBusClkFrec:8;        /* Max. bus clock frequency */
-  uint16_t CardComdClasses:12;      /* Card command classes */
-  uint8_t  RdBlockLen:4;           /* Max. read data block length */
-  uint8_t  PartBlockRead:1;        /* Partial blocks for read allowed */
-  uint8_t  WrBlockMisalign:1;      /* Write block misalignment */
-  uint8_t  RdBlockMisalign:1;      /* Read block misalignment */
-  uint8_t  DSRImpl:1;              /* DSR implemented */
-  
-  /* v1 or v2 struct */
-  union csd_version {
-    struct_v1 v1;
-    struct_v2 v2;
-  } version;
-  
-  uint8_t  EraseSingleBlockEnable:1;  /* Erase single block enable */
-  uint8_t  EraseSectorSize:7;         /* Erase group size multiplier */
-  uint8_t  WrProtectGrSize:7;         /* Write protect group size */
-  uint8_t  WrProtectGrEnable:1;       /* Write protect group enable */
-  uint8_t  Reserved2:2;               /* Reserved */
-  uint8_t  WrSpeedFact:3;             /* Write speed factor */
-  uint8_t  MaxWrBlockLen:4;           /* Max. write data block length */
-  uint8_t  WriteBlockPartial:1;       /* Partial blocks for write allowed */
-  uint8_t  Reserved3:5;               /* Reserved */
-  uint8_t  FileFormatGrouop:1;        /* File format group */
-  uint8_t  CopyFlag:1;                /* Copy flag (OTP) */
-  uint8_t  PermWrProtect:1;           /* Permanent write protection */
-  uint8_t  TempWrProtect:1;           /* Temporary write protection */
-  uint8_t  FileFormat:2;              /* File Format */
-  uint8_t  Reserved4:2;               /* Reserved */
-  uint8_t  crc:7;                     /* Reserved */
-  uint8_t  Reserved5:1;               /* always 1*/
-  
-} SD_CSD;
-
-/** 
-  * @brief  Card Identification Data: CID Register   
-  */
-typedef struct
-{
-  __IO uint8_t  ManufacturerID;       /* ManufacturerID */
-  __IO uint16_t OEM_AppliID;          /* OEM/Application ID */
-  __IO uint32_t ProdName1;            /* Product Name part1 */
-  __IO uint8_t  ProdName2;            /* Product Name part2*/
-  __IO uint8_t  ProdRev;              /* Product Revision */
-  __IO uint32_t ProdSN;               /* Product Serial Number */
-  __IO uint8_t  Reserved1;            /* Reserved1 */
-  __IO uint16_t ManufactDate;         /* Manufacturing Date */
-  __IO uint8_t  CID_CRC;              /* CID CRC */
-  __IO uint8_t  Reserved2;            /* always 1 */
-} SD_CID;
-
-/** 
-  * @brief SD Card information 
-  */
-typedef struct
-{
-  SD_CSD Csd;
-  SD_CID Cid;
-  uint32_t CardCapacity;  /* Card Capacity */
-  uint32_t CardBlockSize; /* Card Block Size */
-} SD_CardInfo;
-
-/**
-  * @}
-  */
-  
-/** @defgroup STM32_ADAFRUIT_SPI_SD_Exported_Constants
-  * @{
-  */ 
-  
-/**
-  * @brief  Block Size
-  */
-#define SD_BLOCK_SIZE    0x200
-
-/**
-  * @brief  SD detection on its memory slot
-  */
-#define SD_PRESENT               ((uint8_t)0x01)
-#define SD_NOT_PRESENT           ((uint8_t)0x00)
-   
-/**
-  * @}
-  */
-  
-/** @defgroup STM32_ADAFRUIT_SD_Exported_Macro
-  * @{
-  */ 
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32_ADAFRUIT_SD_Exported_Functions
-  * @{
-  */   
-uint8_t BSP_SD_Init(void);
-uint8_t BSP_SD_ReadBlocks(uint32_t *pData, uint32_t ReadAddr, uint16_t BlockSize, uint32_t NumberOfBlocks);
-uint8_t BSP_SD_WriteBlocks(uint32_t *pData, uint32_t WriteAddr, uint16_t BlockSize, uint32_t NumberOfBlocks);
-uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr);
-uint8_t BSP_SD_GetStatus(void);
-uint8_t BSP_SD_GetCardInfo(SD_CardInfo *pCardInfo);
-   
-/* Link functions for SD Card peripheral*/
-void    SD_IO_Init(void);
-void    SD_IO_CSState(uint8_t state);
-void    SD_IO_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength);
-uint8_t SD_IO_WriteByte(uint8_t Data);
-
-/* Link function for HAL delay */
-void HAL_Delay(__IO uint32_t Delay);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32_ADAFRUIT_SD_H */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

Plik diff jest za duży
+ 0 - 233
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/Release_Notes.html


+ 0 - 143
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/accelero.h

@@ -1,143 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    accelero.h
-  * @author  MCD Application Team
-  * @version V4.0.1
-  * @date    21-July-2015
-  * @brief   This header file contains the functions prototypes for the Accelerometer driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __ACCELERO_H
-#define __ACCELERO_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-    
-/** @addtogroup ACCELERO
-  * @{
-  */
-
-/** @defgroup ACCELERO_Exported_Types
-  * @{
-  */ 
-
-/** @defgroup ACCELERO_Driver_structure  Accelerometer Driver structure
-  * @{
-  */
-typedef struct
-{  
-  void      (*Init)(uint16_t);
-  void      (*DeInit)(void); 
-  uint8_t   (*ReadID)(void);
-  void      (*Reset)(void);
-  void      (*LowPower)(void);
-  void      (*ConfigIT)(void);
-  void      (*EnableIT)(uint8_t);
-  void      (*DisableIT)(uint8_t);
-  uint8_t   (*ITStatus)(uint16_t);
-  void      (*ClearIT)(void);
-  void      (*FilterConfig)(uint8_t);
-  void      (*FilterCmd)(uint8_t);
-  void      (*GetXYZ)(int16_t *);
-}ACCELERO_DrvTypeDef;
-/**
-  * @}
-  */
-
-/** @defgroup ACCELERO_Configuration_structure  Accelerometer Configuration structure
-  * @{
-  */
-
-/* ACCELERO struct */
-typedef struct
-{
-  uint8_t Power_Mode;                         /* Power-down/Normal Mode */
-  uint8_t AccOutput_DataRate;                 /* OUT data rate */
-  uint8_t Axes_Enable;                        /* Axes enable */
-  uint8_t High_Resolution;                    /* High Resolution enabling/disabling */
-  uint8_t BlockData_Update;                   /* Block Data Update */
-  uint8_t Endianness;                         /* Endian Data selection */
-  uint8_t AccFull_Scale;                      /* Full Scale selection */
-  uint8_t Communication_Mode;
-}ACCELERO_InitTypeDef;
-
-/* ACCELERO High Pass Filter struct */
-typedef struct
-{
-  uint8_t HighPassFilter_Mode_Selection;      /* Internal filter mode */
-  uint8_t HighPassFilter_CutOff_Frequency;    /* High pass filter cut-off frequency */
-  uint8_t HighPassFilter_AOI1;                /* HPF_enabling/disabling for AOI function on interrupt 1 */
-  uint8_t HighPassFilter_AOI2;                /* HPF_enabling/disabling for AOI function on interrupt 2 */
-  uint8_t HighPassFilter_Data_Sel;
-  uint8_t HighPassFilter_Stat;
-}ACCELERO_FilterConfigTypeDef;
-
-/**
-  * @}
-  */
-
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ACCELERO_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 122
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/audio.h

@@ -1,122 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    audio.h
-  * @author  MCD Application Team
-  * @version V4.0.1
-  * @date    21-July-2015
-  * @brief   This header file contains the common defines and functions prototypes
-  *          for the Audio driver.  
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __AUDIO_H
-#define __AUDIO_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-    
-/** @addtogroup AUDIO
-  * @{
-  */
-
-/** @defgroup AUDIO_Exported_Constants
-  * @{
-  */
-
-/* Codec audio Standards */
-#define CODEC_STANDARD                0x04
-#define I2S_STANDARD                  I2S_STANDARD_PHILIPS
-
-/**
-  * @}
-  */
-
-/** @defgroup AUDIO_Exported_Types
-  * @{
-  */
-
-/** @defgroup AUDIO_Driver_structure  Audio Driver structure
-  * @{
-  */
-typedef struct
-{
-  uint32_t  (*Init)(uint16_t, uint16_t, uint8_t, uint32_t);
-  void      (*DeInit)(void);
-  uint32_t  (*ReadID)(uint16_t);
-  uint32_t  (*Play)(uint16_t, uint16_t*, uint16_t);
-  uint32_t  (*Pause)(uint16_t);
-  uint32_t  (*Resume)(uint16_t);
-  uint32_t  (*Stop)(uint16_t, uint32_t);
-  uint32_t  (*SetFrequency)(uint16_t, uint32_t);
-  uint32_t  (*SetVolume)(uint16_t, uint8_t);
-  uint32_t  (*SetMute)(uint16_t, uint32_t);
-  uint32_t  (*SetOutputMode)(uint16_t, uint8_t);
-  uint32_t  (*Reset)(uint16_t);
-}AUDIO_DrvTypeDef;
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __AUDIO_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 141
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/camera.h

@@ -1,141 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    camera.h
-  * @author  MCD Application Team
-  * @version V4.0.1
-  * @date    21-July-2015
-  * @brief   This header file contains the common defines and functions prototypes
-  *          for the camera driver.   
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __CAMERA_H
-#define __CAMERA_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif 
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-    
-/** @addtogroup CAMERA
-  * @{
-  */
-
-
-/** @defgroup CAMERA_Exported_Types
-  * @{
-  */ 
-
-/** @defgroup CAMERA_Driver_structure  Camera Driver structure
-  * @{
-  */
-typedef struct
-{
-  void     (*Init)(uint16_t, uint32_t);
-  uint16_t (*ReadID)(uint16_t);  
-  void     (*Config)(uint16_t, uint32_t, uint32_t, uint32_t);
-}CAMERA_DrvTypeDef;
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/** @defgroup CAMERA_Exported_Constants
-  * @{
-  */
-#define CAMERA_R160x120                 0x00   /* QQVGA Resolution                     */
-#define CAMERA_R320x240                 0x01   /* QVGA Resolution                      */
-#define CAMERA_R480x272                 0x02   /* 480x272 Resolution                   */
-#define CAMERA_R640x480                 0x03   /* VGA Resolution                       */  
-
-#define CAMERA_CONTRAST_BRIGHTNESS      0x00   /* Camera contrast brightness features  */
-#define CAMERA_BLACK_WHITE              0x01   /* Camera black white feature           */
-#define CAMERA_COLOR_EFFECT             0x03   /* Camera color effect feature          */
-
-#define CAMERA_BRIGHTNESS_LEVEL0        0x00   /* Brightness level -2         */
-#define CAMERA_BRIGHTNESS_LEVEL1        0x01   /* Brightness level -1         */
-#define CAMERA_BRIGHTNESS_LEVEL2        0x02   /* Brightness level 0          */
-#define CAMERA_BRIGHTNESS_LEVEL3        0x03   /* Brightness level +1         */
-#define CAMERA_BRIGHTNESS_LEVEL4        0x04   /* Brightness level +2         */
-
-#define CAMERA_CONTRAST_LEVEL0          0x05   /* Contrast level -2           */
-#define CAMERA_CONTRAST_LEVEL1          0x06   /* Contrast level -1           */
-#define CAMERA_CONTRAST_LEVEL2          0x07   /* Contrast level  0           */
-#define CAMERA_CONTRAST_LEVEL3          0x08   /* Contrast level +1           */
-#define CAMERA_CONTRAST_LEVEL4          0x09   /* Contrast level +2           */    
-    
-#define CAMERA_BLACK_WHITE_BW           0x00   /* Black and white effect      */
-#define CAMERA_BLACK_WHITE_NEGATIVE     0x01   /* Negative effect             */
-#define CAMERA_BLACK_WHITE_BW_NEGATIVE  0x02   /* BW and Negative effect      */
-#define CAMERA_BLACK_WHITE_NORMAL       0x03   /* Normal effect               */
-                                        
-#define CAMERA_COLOR_EFFECT_NONE        0x00   /* No effects                  */
-#define CAMERA_COLOR_EFFECT_BLUE        0x01   /* Blue effect                 */
-#define CAMERA_COLOR_EFFECT_GREEN       0x02   /* Green effect                */
-#define CAMERA_COLOR_EFFECT_RED         0x03   /* Red effect                  */
-#define CAMERA_COLOR_EFFECT_ANTIQUE     0x04   /* Antique effect              */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __CAMERA_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 115
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/epd.h

@@ -1,115 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    epd.h
-  * @author  MCD Application Team
-  * @version V4.0.1
-  * @date    21-July-2015
-  * @brief   This file contains all the functions prototypes for the 
-  *          EPD (E Paper Display) driver.   
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __EPD_H
-#define __EPD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-  
-/** @addtogroup Common
-  * @{
-  */
-
-/** @addtogroup EPD
-  * @{
-  */
-
-/** @defgroup EPD_Exported_Types
-  * @{
-  */
-
-/** @defgroup EPD_Driver_structure  E Paper Display Driver structure
-  * @{
-  */
-typedef struct
-{
-  void     (*Init)(void);
-  void     (*WritePixel)(uint8_t);
-
-  /* Optimized operation */
-  void     (*SetDisplayWindow)(uint16_t, uint16_t, uint16_t, uint16_t);
-  void     (*RefreshDisplay)(void);
-  void     (*CloseChargePump)(void);
-
-  uint16_t (*GetEpdPixelWidth)(void);
-  uint16_t (*GetEpdPixelHeight)(void);
-  void     (*DrawImage)(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t*);
-}
-EPD_DrvTypeDef;
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* EPD_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 145
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/gyro.h

@@ -1,145 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    gyro.h
-  * @author  MCD Application Team
-  * @version V4.0.1
-  * @date    21-July-2015
-  * @brief   This header file contains the functions prototypes for the gyroscope driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __GYRO_H
-#define __GYRO_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-    
-/** @addtogroup GYRO
-  * @{
-  */
-
-/** @defgroup GYRO_Exported_Types
-  * @{
-  */
-
-/** @defgroup GYRO_Driver_structure  Gyroscope Driver structure
-  * @{
-  */
-typedef struct
-{  
-  void       (*Init)(uint16_t);
-  void       (*DeInit)(void); 
-  uint8_t    (*ReadID)(void);
-  void       (*Reset)(void);
-  void       (*LowPower)(uint16_t);   
-  void       (*ConfigIT)(uint16_t); 
-  void       (*EnableIT)(uint8_t);
-  void       (*DisableIT)(uint8_t);  
-  uint8_t    (*ITStatus)(uint16_t, uint16_t);   
-  void       (*ClearIT)(uint16_t, uint16_t); 
-  void       (*FilterConfig)(uint8_t);  
-  void       (*FilterCmd)(uint8_t);  
-  void       (*GetXYZ)(float *);
-}GYRO_DrvTypeDef;
-/**
-  * @}
-  */
-
-/** @defgroup GYRO_Config_structure  Gyroscope Configuration structure
-  * @{
-  */
-
-typedef struct
-{
-  uint8_t Power_Mode;                         /* Power-down/Sleep/Normal Mode */
-  uint8_t Output_DataRate;                    /* OUT data rate */
-  uint8_t Axes_Enable;                        /* Axes enable */
-  uint8_t Band_Width;                         /* Bandwidth selection */
-  uint8_t BlockData_Update;                   /* Block Data Update */
-  uint8_t Endianness;                         /* Endian Data selection */
-  uint8_t Full_Scale;                         /* Full Scale selection */
-}GYRO_InitTypeDef;
-
-/* GYRO High Pass Filter struct */
-typedef struct
-{
-  uint8_t HighPassFilter_Mode_Selection;      /* Internal filter mode */
-  uint8_t HighPassFilter_CutOff_Frequency;    /* High pass filter cut-off frequency */
-}GYRO_FilterConfigTypeDef;
-
-/*GYRO Interrupt struct */
-typedef struct
-{
-  uint8_t Latch_Request;                      /* Latch interrupt request into CLICK_SRC register */
-  uint8_t Interrupt_Axes;                     /* X, Y, Z Axes Interrupts */ 
-  uint8_t Interrupt_ActiveEdge;               /* Interrupt Active edge */
-}GYRO_InterruptConfigTypeDef;  
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __GYRO_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 168
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/idd.h

@@ -1,168 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    idd.h
-  * @author  MCD Application Team
-  * @version V4.0.1
-  * @date    21-July-2015
-  * @brief   This file contains all the functions prototypes for the IDD driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __IDD_H
-#define __IDD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-    
-/** @addtogroup IDD
-  * @{
-  */
-
-/** @defgroup IDD_Exported_Types IDD Exported Types
-  * @{
-  */
-
-/** @defgroup IDD_Config_structure  IDD Configuration structure
-  * @{
-  */
-typedef struct
-{
-  uint16_t AmpliGain;       /*!< Specifies ampli gain value
-                                 */
-  uint16_t VddMin;          /*!< Specifies minimum MCU VDD can reach to protect MCU from reset
-                                  */
-  uint16_t Shunt0Value;     /*!< Specifies value of Shunt 0 if existing
-                                 */
-  uint16_t Shunt1Value;     /*!< Specifies value of Shunt 1 if existing
-                                 */
-  uint16_t Shunt2Value;     /*!< Specifies value of Shunt 2 if existing
-                                 */
-  uint16_t Shunt3Value;     /*!< Specifies value of Shunt 3 if existing
-                                 */
-  uint16_t Shunt4Value;     /*!< Specifies value of Shunt 4 if existing
-                                  */
-  uint16_t Shunt0StabDelay; /*!< Specifies delay of Shunt 0 stabilization if existing
-                                  */
-  uint16_t Shunt1StabDelay; /*!< Specifies delay of Shunt 1 stabilization if existing
-                                  */
-  uint16_t Shunt2StabDelay; /*!< Specifies delay of Shunt 2 stabilization if existing
-                                  */
-  uint16_t Shunt3StabDelay; /*!< Specifies delay of Shunt 3 stabilization if existing
-                                  */
-  uint16_t Shunt4StabDelay; /*!< Specifies delay of Shunt 4 stabilization if existing
-                                  */
-  uint8_t ShuntNbOnBoard;   /*!< Specifies number of shunts that are present on board
-                                 This parameter can be a value of @ref IDD_shunt_number */
-  uint8_t ShuntNbUsed;      /*!< Specifies number of shunts used for measurement
-                                 This parameter can be a value of @ref IDD_shunt_number */
-  uint8_t VrefMeasurement;  /*!< Specifies if Vref is automatically measured before each Idd measurement
-                                 This parameter can be a value of @ref IDD_Vref_Measurement */
-  uint8_t Calibration;      /*!< Specifies if calibration is done before each Idd measurement
-                                  */
-  uint8_t PreDelayUnit;     /*!< Specifies Pre delay unit 
-                                 This parameter can be a value of @ref IDD_PreDelay */
-  uint8_t PreDelayValue;    /*!< Specifies Pre delay value in selected unit
-                                  */
-  uint8_t MeasureNb;        /*!< Specifies number of Measure to be performed 
-                                 This parameter can be a value between 1 and 256 */
-  uint8_t DeltaDelayUnit;   /*!< Specifies Delta delay unit
-                                  This parameter can be a value of @ref IDD_DeltaDelay */
-  uint8_t DeltaDelayValue;  /*!< Specifies Delta delay between 2 measures
-                                  value can be between 1 and 128 */
-}IDD_ConfigTypeDef;
-/**
-  * @}
-  */
-
-/** @defgroup IDD_Driver_structure  IDD Driver structure
-  * @{
-  */
-typedef struct
-{
-  void       (*Init)(uint16_t);
-  void       (*DeInit)(uint16_t);
-  uint16_t   (*ReadID)(uint16_t);
-  void       (*Reset)(uint16_t);
-  void       (*LowPower)(uint16_t);
-  void       (*WakeUp)(uint16_t);
-  void       (*Start)(uint16_t);
-  void       (*Config)(uint16_t,IDD_ConfigTypeDef);
-  void       (*GetValue)(uint16_t, uint32_t *);
-  void       (*EnableIT)(uint16_t);
-  void       (*ClearIT)(uint16_t);
-  uint8_t    (*GetITStatus)(uint16_t);
-  void       (*DisableIT)(uint16_t);
-  void       (*ErrorEnableIT)(uint16_t);
-  void       (*ErrorClearIT)(uint16_t);
-  uint8_t    (*ErrorGetITStatus)(uint16_t);
-  void       (*ErrorDisableIT)(uint16_t);
-  uint8_t    (*ErrorGetSrc)(uint16_t);
-  uint8_t    (*ErrorGetCode)(uint16_t);
-}IDD_DrvTypeDef;
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __IDD_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 150
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/io.h

@@ -1,150 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    io.h
-  * @author  MCD Application Team
-  * @version V4.0.1
-  * @date    21-July-2015
-  * @brief   This file contains all the functions prototypes for the IO driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __IO_H
-#define __IO_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-    
-/** @addtogroup IO
-  * @{
-  */
-
-/** @defgroup IO_Exported_Types
-  * @{
-  */
-
-/**
-  * @brief  IO Bit SET and Bit RESET enumeration
-  */
-typedef enum
-{
-  IO_PIN_RESET = 0,
-  IO_PIN_SET
-}IO_PinState;
-
-typedef enum
-{
-   IO_MODE_INPUT = 0,   /* input floating */
-   IO_MODE_OUTPUT,      /* output Push Pull */
-   IO_MODE_IT_RISING_EDGE,   /* float input - irq detect on rising edge */
-   IO_MODE_IT_FALLING_EDGE,  /* float input - irq detect on falling edge */
-   IO_MODE_IT_LOW_LEVEL,     /* float input - irq detect on low level */
-   IO_MODE_IT_HIGH_LEVEL,    /* float input - irq detect on high level */
-   /* following modes only available on MFX*/
-   IO_MODE_ANALOG,           /* analog mode */
-   IO_MODE_OFF,              /* when pin isn't used*/
-   IO_MODE_INPUT_PU,         /* input with internal pull up resistor */
-   IO_MODE_INPUT_PD,         /* input with internal pull down resistor */
-   IO_MODE_OUTPUT_OD,          /* Open Drain output without internal resistor */
-   IO_MODE_OUTPUT_OD_PU,       /* Open Drain output with  internal pullup resistor */
-   IO_MODE_OUTPUT_OD_PD,       /* Open Drain output with  internal pulldown resistor */
-   IO_MODE_OUTPUT_PP,          /* PushPull output without internal resistor */
-   IO_MODE_OUTPUT_PP_PU,       /* PushPull output with  internal pullup resistor */
-   IO_MODE_OUTPUT_PP_PD,       /* PushPull output with  internal pulldown resistor */
-   IO_MODE_IT_RISING_EDGE_PU,   /* push up resistor input - irq on rising edge  */
-   IO_MODE_IT_RISING_EDGE_PD,   /* push dw resistor input - irq on rising edge  */
-   IO_MODE_IT_FALLING_EDGE_PU,  /* push up resistor input - irq on falling edge */
-   IO_MODE_IT_FALLING_EDGE_PD,  /* push dw resistor input - irq on falling edge */
-   IO_MODE_IT_LOW_LEVEL_PU,     /* push up resistor input - irq detect on low level */
-   IO_MODE_IT_LOW_LEVEL_PD,     /* push dw resistor input - irq detect on low level */
-   IO_MODE_IT_HIGH_LEVEL_PU,    /* push up resistor input - irq detect on high level */
-   IO_MODE_IT_HIGH_LEVEL_PD,    /* push dw resistor input - irq detect on high level */
-
-}IO_ModeTypedef;
-
-/** @defgroup IO_Driver_structure  IO Driver structure
-  * @{
-  */
-typedef struct
-{  
-  void       (*Init)(uint16_t);
-  uint16_t   (*ReadID)(uint16_t);
-  void       (*Reset)(uint16_t);
-  
-  void       (*Start)(uint16_t, uint32_t);
-  uint8_t    (*Config)(uint16_t, uint32_t, IO_ModeTypedef);
-  void       (*WritePin)(uint16_t, uint32_t, uint8_t);
-  uint32_t   (*ReadPin)(uint16_t, uint32_t);
-  
-  void       (*EnableIT)(uint16_t);
-  void       (*DisableIT)(uint16_t);
-  uint32_t    (*ITStatus)(uint16_t, uint32_t);
-  void       (*ClearIT)(uint16_t, uint32_t);
-    
-}IO_DrvTypeDef;
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __IO_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 114
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/lcd.h

@@ -1,114 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    lcd.h
-  * @author  MCD Application Team
-  * @version V4.0.1
-  * @date    21-July-2015
-  * @brief   This file contains all the functions prototypes for the LCD driver.   
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __LCD_H
-#define __LCD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif 
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-   
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-
-/** @addtogroup LCD
-  * @{
-  */
- 
-/** @defgroup LCD_Exported_Types
-  * @{
-  */
-
-/** @defgroup LCD_Driver_structure  LCD Driver structure
-  * @{
-  */
-typedef struct
-{
-  void     (*Init)(void);
-  uint16_t (*ReadID)(void);
-  void     (*DisplayOn)(void);
-  void     (*DisplayOff)(void);
-  void     (*SetCursor)(uint16_t, uint16_t);
-  void     (*WritePixel)(uint16_t, uint16_t, uint16_t);
-  uint16_t (*ReadPixel)(uint16_t, uint16_t);
-  
-   /* Optimized operation */
-  void     (*SetDisplayWindow)(uint16_t, uint16_t, uint16_t, uint16_t);
-  void     (*DrawHLine)(uint16_t, uint16_t, uint16_t, uint16_t);
-  void     (*DrawVLine)(uint16_t, uint16_t, uint16_t, uint16_t);
-  
-  uint16_t (*GetLcdPixelWidth)(void);
-  uint16_t (*GetLcdPixelHeight)(void);
-  void     (*DrawBitmap)(uint16_t, uint16_t, uint8_t*);
-  void     (*DrawRGBImage)(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t*);
-}LCD_DrvTypeDef;    
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LCD_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 125
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/magneto.h

@@ -1,125 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    magneto.h
-  * @author  MCD Application Team
-  * @version V4.0.1
-  * @date    21-July-2015
-  * @brief   This header file contains the functions prototypes for the MAGNETO driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __MAGNETO_H
-#define __MAGNETO_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-    
-/** @addtogroup MAGNETO
-  * @{
-  */
-
-/** @defgroup MAGNETO_Exported_Types
-  * @{
-  */ 
-
-/** @defgroup MAGNETO_Config_structure  Magnetometer Configuration structure
-  * @{
-  */
-typedef struct
-{
-  uint8_t Register1;
-  uint8_t Register2;
-  uint8_t Register3;
-  uint8_t Register4;
-  uint8_t Register5;
-}MAGNETO_InitTypeDef;
-/**
-  * @}
-  */
-
-/** @defgroup MAGNETO_Driver_structure  Magnetometer Driver structure
-  * @{
-  */
-typedef struct
-{  
-  void      (*Init)(MAGNETO_InitTypeDef);
-  void      (*DeInit)(void); 
-  uint8_t   (*ReadID)(void);
-  void      (*Reset)(void);
-  void      (*LowPower)(void);
-  void      (*ConfigIT)(void);
-  void      (*EnableIT)(uint8_t);
-  void      (*DisableIT)(uint8_t);
-  uint8_t   (*ITStatus)(uint16_t);
-  void      (*ClearIT)(void);
-  void      (*FilterConfig)(uint8_t);
-  void      (*FilterCmd)(uint8_t);
-  void      (*GetXYZ)(int16_t *);
-}MAGNETO_DrvTypeDef;
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MAGNETO_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 107
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/ts.h

@@ -1,107 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    ts.h
-  * @author  MCD Application Team
-  * @version V4.0.1
-  * @date    21-July-2015
-  * @brief   This file contains all the functions prototypes for the Touch Screen driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __TS_H
-#define __TS_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h> 
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-    
-/** @addtogroup TS
-  * @{
-  */
-
-/** @defgroup TS_Exported_Types
-  * @{
-  */
-
-/** @defgroup TS_Driver_structure  Touch Sensor Driver structure
-  * @{
-  */
-typedef struct
-{  
-  void       (*Init)(uint16_t);
-  uint16_t   (*ReadID)(uint16_t);
-  void       (*Reset)(uint16_t);
-  void       (*Start)(uint16_t);
-  uint8_t    (*DetectTouch)(uint16_t);
-  void       (*GetXY)(uint16_t, uint16_t*, uint16_t*);
-  void       (*EnableIT)(uint16_t);
-  void       (*ClearIT)(uint16_t);
-  uint8_t    (*GetITStatus)(uint16_t);
-  void       (*DisableIT)(uint16_t);
-}TS_DrvTypeDef;
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TS_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 118
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/Common/tsensor.h

@@ -1,118 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    tsensor.h
-  * @author  MCD Application Team
-  * @version V4.0.1
-  * @date    21-July-2015
-  * @brief   This header file contains the functions prototypes for the
-  *          Temperature Sensor driver. 
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __TSENSOR_H
-#define __TSENSOR_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include <stdint.h>
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-    
-/** @addtogroup TSENSOR
-  * @{
-  */
-
-/** @defgroup TSENSOR_Exported_Types
-  * @{
-  */ 
-
-/** @defgroup TSENSOR_Config_structure  Temperature Sensor Configuration structure
-  * @{
-  */
-typedef struct
-{
-  uint8_t AlertMode;            /* Alert Mode Temperature out of range*/
-  uint8_t ConversionMode;       /* Continuous/One Shot Mode */
-  uint8_t ConversionResolution; /* Temperature Resolution */
-  uint8_t ConversionRate;       /* Number of measure per second */
-  uint8_t TemperatureLimitHigh; /* High Temperature Limit Range */
-  uint8_t TemperatureLimitLow;  /* Low Temperature Limit Range */
-}TSENSOR_InitTypeDef;
-/**
-  * @}
-  */
-
-/** @defgroup TSENSOR_Driver_structure  Temperature Sensor Driver structure
-  * @{
-  */
-typedef struct
-{  
-  void       (*Init)(uint16_t, TSENSOR_InitTypeDef *);
-  uint8_t    (*IsReady)(uint16_t, uint32_t);
-  uint8_t    (*ReadStatus)(uint16_t);
-  uint16_t   (*ReadTemp)(uint16_t); 
-}TSENSOR_DrvTypeDef;
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TSENSOR_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 175
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/hx8347d/Release_Notes.html

@@ -1,175 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-
-
-
-
-
-
-  
-  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
-  
-  <link rel="File-List" href="Library_files/filelist.xml">
-
-  
-  <link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><title>Release Notes for STM32 BSP Components Drivers</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]-->
-
-
-  
-
-  
-
-  
-  <style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-  </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-  <meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-  <tbody>
-    <tr>
-      <td style="padding: 0cm;" valign="top">
-      <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-        <tbody>
-          <tr>
-            <td style="vertical-align: top;">
-            <p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-            </td>
-          </tr>
-          <tr style="">
-            <td style="padding: 1.5pt;">
-            <h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for HX8347D Component Driver</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2014 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-      <table style="width: 675pt;" class="MsoNormalTable" border="0" cellpadding="0" width="900">
-        <tbody>
-          <tr style="">
-            <td style="padding: 0cm;" valign="top"><span style="font-size: 10pt; font-family: Verdana;"></span><h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.1.1
-/ 24-November-2014 <o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;">hx8347d.h: change </span><span style="font-family: Verdana; font-size: 10pt;">"\" by</span><span style="font-family: Verdana; font-size: 10pt;"> "/"&nbsp;</span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;">in the</span><span style="font-family: Verdana; font-size: 10pt;"> include path to fix compilation issue with Linux</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 180px; margin-right: 500pt;"><span style="font-family: Arial; color: white; font-size: 10pt;">V1.1.0 / 11-July-2014 
-<o:p></o:p></span></h3>
-<p style="margin: 4.5pt 0cm 4.5pt 18pt;" class="MsoNormal"><b><u><span style="font-family: Verdana; color: black; font-size: 10pt;">Main 
-Changes<o:p></o:p></span></u></b></p><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span>
-<ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana;"></span><span style="font-family: Verdana; font-size: 10pt;">Beta release of </span><span style="font-family: Verdana; font-size: 10pt;">HX8347D LCD Component</span><span style="font-family: Verdana; font-size: 10pt;"> driver in order to harmonize all 
-LCD controllers Link usage (Change LCD_IO_WriteData to 
-LCD_IO_WriteMultipleData) </span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0
-/ 06-May-2014 <o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<ul style="list-style-type: square;"><li><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;">First official release of </span><span style="font-size: 10pt; font-family: Verdana;">HX8347D LCD Component</span><span style="font-size: 10pt; font-family: Verdana;"> driver</span></li></ul><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"></span><h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span><br></h2><div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-            </font>
-            <ol><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived </span><br>
-                </font>
-              </li></ol>
-            <font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from this software without specific prior written permission.</span><br>
-            <span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-            <span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></font>
-            
-            </div>
-<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black;"><o:p></o:p></span></p>
-<b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-            
-            <div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-            <hr align="center" size="2" width="100%"></span></div>
-            <div style="margin-left: 120px;"><span style="font-size: 10pt; font-family: Verdana; color: black;">For
-complete documentation on </span><span style="font-size: 10pt; font-family: Verdana;">STM32<span style="color: black;">&nbsp;Microcontrollers
-visit </span><u><span style="color: blue;"><a href="http://www.st.com/internet/mcu/class/1734.jsp" target="_blank">www.st.com/STM32</a></span></u></span></div>
-            </td>
-          </tr>
-        <tr><td style="padding: 0cm;" valign="top"></td></tr></tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-      </td>
-    </tr>
-  </tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-
-</body></html>

+ 0 - 506
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/hx8347d/hx8347d.c

@@ -1,506 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    hx8347d.c
-  * @author  MCD Application Team
-  * @version V1.1.1
-  * @date    24-November-2014
-  * @brief   This file includes the LCD driver for HX8347D LCD.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2014 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.
-  *
-  ******************************************************************************
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "hx8347d.h"
-
-/** @addtogroup BSP
-* @{
-*/ 
-
-/** @addtogroup Components
-* @{
-*/ 
-
-/** @addtogroup HX8347D
-* @brief     This file provides a set of functions needed to drive the
-*            HX8347D LCD.
-* @{
-*/
-
-/** @defgroup HX8347D_Private_TypesDefinitions
-* @{
-*/ 
-
-/**
-* @}
-*/ 
-
-/** @defgroup HX8347D_Private_Defines
-* @{
-*/
-
-/**
-* @}
-*/ 
-
-/** @defgroup HX8347D_Private_Macros
-* @{
-*/
-
-/**
-* @}
-*/  
-
-/** @defgroup HX8347D_Private_Variables
-* @{
-*/ 
-LCD_DrvTypeDef   hx8347d_drv = 
-{
-  hx8347d_Init,
-  hx8347d_ReadID,
-  hx8347d_DisplayOn,
-  hx8347d_DisplayOff,
-  hx8347d_SetCursor,
-  hx8347d_WritePixel,
-  hx8347d_ReadPixel,
-  hx8347d_SetDisplayWindow,
-  hx8347d_DrawHLine,
-  hx8347d_DrawVLine,
-  hx8347d_GetLcdPixelWidth,
-  hx8347d_GetLcdPixelHeight,
-  hx8347d_DrawBitmap,  
-};
-
-static uint8_t Is_hx8347d_Initialized = 0;
-static uint16_t ArrayRGB[320] = {0};
-
-
-/**
-* @}
-*/ 
-
-/** @defgroup HX8347D_Private_FunctionPrototypes
-* @{
-*/
-
-/**
-* @}
-*/ 
-
-/** @defgroup HX8347D_Private_Functions
-* @{
-*/   
-
-/**
-* @brief  Initialise the HX8347D LCD Component.
-* @param  None
-* @retval None
-*/
-void hx8347d_Init(void)
-{  
-  if(Is_hx8347d_Initialized == 0)
-  {
-    Is_hx8347d_Initialized = 1;
-    /* Initialise HX8347D low level bus layer --------------------------------*/
-    LCD_IO_Init();
-    
-    /* Driving ability setting */
-    hx8347d_WriteReg(LCD_REG_234, 0x00);
-    hx8347d_WriteReg(LCD_REG_235, 0x20);
-    hx8347d_WriteReg(LCD_REG_236, 0x0C);
-    hx8347d_WriteReg(LCD_REG_237, 0xC4);
-    hx8347d_WriteReg(LCD_REG_232, 0x40);
-    hx8347d_WriteReg(LCD_REG_233, 0x38);
-    hx8347d_WriteReg(LCD_REG_241, 0x01);
-    hx8347d_WriteReg(LCD_REG_242, 0x10);
-    hx8347d_WriteReg(LCD_REG_39,  0xA3);
-    
-    /* Adjust the Gamma Curve */
-    hx8347d_WriteReg(LCD_REG_64, 0x01);
-    hx8347d_WriteReg(LCD_REG_65, 0x00);
-    hx8347d_WriteReg(LCD_REG_66, 0x00);
-    hx8347d_WriteReg(LCD_REG_67, 0x10);
-    hx8347d_WriteReg(LCD_REG_68, 0x0E);
-    hx8347d_WriteReg(LCD_REG_69, 0x24);
-    hx8347d_WriteReg(LCD_REG_70, 0x04);
-    hx8347d_WriteReg(LCD_REG_71, 0x50);
-    hx8347d_WriteReg(LCD_REG_72, 0x02);
-    hx8347d_WriteReg(LCD_REG_73, 0x13);
-    hx8347d_WriteReg(LCD_REG_74, 0x19);
-    hx8347d_WriteReg(LCD_REG_75, 0x19);
-    hx8347d_WriteReg(LCD_REG_76, 0x16);
-    hx8347d_WriteReg(LCD_REG_80, 0x1B);
-    hx8347d_WriteReg(LCD_REG_81, 0x31);
-    hx8347d_WriteReg(LCD_REG_82, 0x2F);
-    hx8347d_WriteReg(LCD_REG_83, 0x3F);
-    hx8347d_WriteReg(LCD_REG_84, 0x3F);
-    hx8347d_WriteReg(LCD_REG_85, 0x3E);
-    hx8347d_WriteReg(LCD_REG_86, 0x2F);
-    hx8347d_WriteReg(LCD_REG_87, 0x7B);
-    hx8347d_WriteReg(LCD_REG_88, 0x09);
-    hx8347d_WriteReg(LCD_REG_89, 0x06);
-    hx8347d_WriteReg(LCD_REG_90, 0x06);
-    hx8347d_WriteReg(LCD_REG_91, 0x0C);
-    hx8347d_WriteReg(LCD_REG_92, 0x1D);
-    hx8347d_WriteReg(LCD_REG_93, 0xCC);
-    
-    /* Power voltage setting */
-    hx8347d_WriteReg(LCD_REG_27, 0x1B);
-    hx8347d_WriteReg(LCD_REG_26, 0x01);
-    hx8347d_WriteReg(LCD_REG_36, 0x2F);
-    hx8347d_WriteReg(LCD_REG_37, 0x57);
-    /*****VCOM offset ****/
-    hx8347d_WriteReg(LCD_REG_35, 0x86);
-    
-    /* Power on setting up flow */
-    hx8347d_WriteReg(LCD_REG_24, 0x36); /* Display frame rate = 70Hz RADJ = '0110' */
-    hx8347d_WriteReg(LCD_REG_25, 0x01); /* OSC_EN = 1 */
-    hx8347d_WriteReg(LCD_REG_28, 0x06); /* AP[2:0] = 111 */
-    hx8347d_WriteReg(LCD_REG_29, 0x06); /* AP[2:0] = 111 */
-    hx8347d_WriteReg(LCD_REG_31,0x90); /* GAS=1, VOMG=00, PON=1, DK=0, XDK=0, DVDH_TRI=0, STB=0*/
-    hx8347d_WriteReg(LCD_REG_39, 1); /* REF = 1 */
-    
-    LCD_Delay(10);
-    /* 262k/65k color selection */
-    hx8347d_WriteReg(LCD_REG_23, 0x05); /* default 0x06 262k color,  0x05 65k color */
-    /* SET PANEL */
-    hx8347d_WriteReg(LCD_REG_54, 0x09); /* SS_PANEL = 1, GS_PANEL = 0,REV_PANEL = 0, BGR_PANEL = 1 */
-    
-    /* Display ON flow */
-    hx8347d_WriteReg(LCD_REG_40, 0x38); /* GON=1, DTE=1, D=10 */
-    LCD_Delay(60);
-    hx8347d_WriteReg(LCD_REG_40, 0x3C); /* GON=1, DTE=1, D=11 */
-    
-    /* Set GRAM Area - Partial Display Control */
-    hx8347d_WriteReg(LCD_REG_1, 0x00); /* DP_STB = 0, DP_STB_S = 0, SCROLL = 0, */
-    hx8347d_WriteReg(LCD_REG_2, 0x00); /* Column address start 2 */
-    hx8347d_WriteReg(LCD_REG_3, 0x00); /* Column address start 1 */
-    hx8347d_WriteReg(LCD_REG_4, 0x01); /* Column address end 2 */
-    hx8347d_WriteReg(LCD_REG_5, 0x3F); /* Column address end 1 */
-    hx8347d_WriteReg(LCD_REG_6, 0x00); /* Row address start 2 */
-    hx8347d_WriteReg(LCD_REG_7, 0x00); /* Row address start 2 */
-    hx8347d_WriteReg(LCD_REG_8, 0x00); /* Row address end 2 */
-    hx8347d_WriteReg(LCD_REG_9, 0xEF); /* Row address end 1 */
-    hx8347d_WriteReg(LCD_REG_22, 0xE0); /* Memory access control: MY = 1, MX = 0, MV = 1, ML = 0 */
-  }
-  /* Set the Cursor */ 
-  hx8347d_SetCursor(0, 0);
-  
-  /* Prepare to write GRAM */
-  LCD_IO_WriteReg(LCD_REG_34);
-}
-
-/**
-* @brief  Enables the Display.
-* @param  None
-* @retval None
-*/
-void hx8347d_DisplayOn(void)
-{
-  /* Power On sequence ---------------------------------------------------------*/
-  hx8347d_WriteReg(LCD_REG_24, 0x36); /* Display frame rate = 70Hz RADJ = '0110' */
-  hx8347d_WriteReg(LCD_REG_25, 0x01); /* OSC_EN = 1 */
-  hx8347d_WriteReg(LCD_REG_28, 0x06); /* AP[2:0] = 111 */
-  hx8347d_WriteReg(LCD_REG_31,0x90); /* GAS=1, VOMG=00, PON=1, DK=0, XDK=0, DVDH_TRI=0, STB=0*/
-  LCD_Delay(10);
-  /* 262k/65k color selection */
-  hx8347d_WriteReg(LCD_REG_23, 0x05); /* default 0x06 262k color,  0x05 65k color */
-  /* SET PANEL */
-  hx8347d_WriteReg(LCD_REG_54, 0x09); /* SS_PANEL = 1, GS_PANEL = 0,REV_PANEL = 0, BGR_PANEL = 1 */
-  
-  /* Display On */
-  hx8347d_WriteReg(LCD_REG_40, 0x38);
-  LCD_Delay(60);
-  hx8347d_WriteReg(LCD_REG_40, 0x3C);
-}
-
-/**
-* @brief  Disables the Display.
-* @param  None
-* @retval None
-*/
-void hx8347d_DisplayOff(void)
-{
-  /* Power Off sequence ---------------------------------------------------------*/
-  hx8347d_WriteReg(LCD_REG_23, 0x0000); /* default 0x06 262k color,  0x05 65k color */
-  hx8347d_WriteReg(LCD_REG_24, 0x0000); /* Display frame rate = 70Hz RADJ = '0110' */
-  hx8347d_WriteReg(LCD_REG_25, 0x0000); /* OSC_EN = 1 */
-  hx8347d_WriteReg(LCD_REG_28, 0x0000); /* AP[2:0] = 111 */
-  hx8347d_WriteReg(LCD_REG_31, 0x0000); /* GAS=1, VOMG=00, PON=1, DK=0, XDK=0, DVDH_TRI=0, STB=0*/
-  hx8347d_WriteReg(LCD_REG_54, 0x0000); /* SS_PANEL = 1, GS_PANEL = 0,REV_PANEL = 0, BGR_PANEL = 1 */
-  
-  /* Display Off */
-  hx8347d_WriteReg(LCD_REG_40, 0x38);
-  LCD_Delay(60);
-  hx8347d_WriteReg(LCD_REG_40, 0x04);
-}
-
-/**
-* @brief  Get the LCD pixel Width.
-* @param  None
-* @retval The Lcd Pixel Width
-*/
-uint16_t hx8347d_GetLcdPixelWidth(void)
-{
-  return (uint16_t)HX8347D_LCD_PIXEL_WIDTH;
-}
-
-/**
-* @brief  Get the LCD pixel Height.
-* @param  None
-* @retval The Lcd Pixel Height
-*/
-uint16_t hx8347d_GetLcdPixelHeight(void)
-{
-  return (uint16_t)HX8347D_LCD_PIXEL_HEIGHT;
-}
-
-/**
-* @brief  Get the HX8347D ID.
-* @param  None
-* @retval The HX8347D ID 
-*/
-uint16_t hx8347d_ReadID(void)
-{
-  if(Is_hx8347d_Initialized == 0)
-  {
-    hx8347d_Init();
-    Is_hx8347d_Initialized = 1;    
-  }
-  return (hx8347d_ReadReg(0x00));
-}
-
-/**
-* @brief  Set Cursor position.
-* @param  Xpos: specifies the X position.
-* @param  Ypos: specifies the Y position.
-* @retval None
-*/
-void hx8347d_SetCursor(uint16_t Xpos, uint16_t Ypos)
-{
-  hx8347d_WriteReg(LCD_REG_6, 0x00);
-  hx8347d_WriteReg(LCD_REG_7, Xpos);
-  hx8347d_WriteReg(LCD_REG_2, Ypos >> 8);
-  hx8347d_WriteReg(LCD_REG_3, Ypos & 0xFF);
-}
-
-/**
-* @brief  Write pixel.   
-* @param  Xpos: specifies the X position.
-* @param  Ypos: specifies the Y position.
-* @param  RGBCode: the RGB pixel color
-* @retval None
-*/
-void hx8347d_WritePixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGBCode)
-{
-  /* Set Cursor */
-  hx8347d_SetCursor(Xpos, Ypos);
-  
-  /* Prepare to write GRAM */
-  LCD_IO_WriteReg(LCD_REG_34);
-
-  /* Write 16-bit GRAM Reg */
-  LCD_IO_WriteMultipleData((uint8_t*)&RGBCode, 2);
-}
-
-/**
-* @brief  Read pixel.
-* @param  None
-* @retval the RGB pixel color
-*/
-uint16_t hx8347d_ReadPixel(uint16_t Xpos, uint16_t Ypos)
-{
-  /* Set Cursor */
-  hx8347d_SetCursor(Xpos, Ypos);
-  
-  /* Dummy read */
-  LCD_IO_ReadData(LCD_REG_34);
-  
-  /* Read 16-bit Reg */
-  return (LCD_IO_ReadData(LCD_REG_34));
-}
-
-/**
-* @brief  Writes to the selected LCD register.
-* @param  LCDReg:      address of the selected register.
-* @param  LCDRegValue: value to write to the selected register.
-* @retval None
-*/
-void hx8347d_WriteReg(uint8_t LCDReg, uint16_t LCDRegValue)
-{
-  LCD_IO_WriteReg(LCDReg);
-  
-  /* Write 16-bit GRAM Reg */
-  LCD_IO_WriteMultipleData((uint8_t*)&LCDRegValue, 2);
-}
-
-/**
-* @brief  Reads the selected LCD Register.
-* @param  LCDReg: address of the selected register.
-* @retval LCD Register Value.
-*/
-uint16_t hx8347d_ReadReg(uint8_t LCDReg)
-{
-  /* Read 16-bit Reg */
-  return (LCD_IO_ReadData(LCDReg));
-}
-
-/**
-* @brief  Sets a display window
-* @param  Xpos:   specifies the X bottom left position.
-* @param  Ypos:   specifies the Y bottom left position.
-* @param  Height: display window height.
-* @param  Width:  display window width.
-* @retval None
-*/
-void hx8347d_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  /* Horizontal GRAM Start Address */
-  hx8347d_WriteReg(LCD_REG_6, (Xpos) >> 8); /* SP */
-  hx8347d_WriteReg(LCD_REG_7, (Xpos) & 0xFF); /* SP */
-  
-  /* Horizontal GRAM End Address */
-  hx8347d_WriteReg(LCD_REG_8, (Xpos + Height - 1) >> 8); /* EP */
-  hx8347d_WriteReg(LCD_REG_9, (Xpos + Height - 1) & 0xFF); /* EP */
-  
-  /* Vertical GRAM Start Address */
-  hx8347d_WriteReg(LCD_REG_2, (Ypos) >> 8); /* SC */
-  hx8347d_WriteReg(LCD_REG_3, (Ypos) & 0xFF); /* SC */
-  
-  /* Vertical GRAM End Address */
-  hx8347d_WriteReg(LCD_REG_4, (Ypos + Width - 1) >> 8); /* EC */
-  hx8347d_WriteReg(LCD_REG_5, (Ypos + Width - 1) & 0xFF); /* EC */
-}
-
-/**
-* @brief  Draw vertical line.
-* @param  RGBCode: Specifies the RGB color   
-* @param  Xpos:     specifies the X position.
-* @param  Ypos:     specifies the Y position.
-* @param  Length:   specifies the Line length.  
-* @retval None
-*/
-void hx8347d_DrawHLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint32_t i = 0;
-  
-  /* Set Cursor */
-  hx8347d_SetCursor(Xpos, Ypos); 
-  
-  /* Prepare to write GRAM */
-  LCD_IO_WriteReg(LCD_REG_34);
-  
-  
-  /* Sent a complete line */
-  for(i = 0; i < Length; i++)
-  {
-    ArrayRGB[i] = RGBCode;
-  }  
-
-  LCD_IO_WriteMultipleData((uint8_t*)&ArrayRGB[0], Length * 2);
-}
-
-/**
-* @brief  Draw vertical line.
-* @param  RGBCode: Specifies the RGB color    
-* @param  Xpos:     specifies the X position.
-* @param  Ypos:     specifies the Y position.
-* @param  Length:   specifies the Line length.  
-* @retval None
-*/
-void hx8347d_DrawVLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint16_t counter = 0;
-  
-  /* Set Cursor */
-  hx8347d_SetCursor(Xpos, Ypos);
-  /* Prepare to write GRAM */
-  LCD_IO_WriteReg(LCD_REG_34);
-  
-  /* Fill a complete vertical line */
-  for(counter = 0; counter < Length; counter++)
-  {
-    ArrayRGB[counter] = RGBCode;
-  }
-  
-  /* Write 16-bit GRAM Reg */
-  LCD_IO_WriteMultipleData((uint8_t*)&ArrayRGB[0], Length * 2);
-}
-
-/**
-* @brief  Displays a bitmap picture loaded in the internal Flash.
-* @param  BmpAddress: Bmp picture address in the internal Flash.
-* @retval None
-*/
-void hx8347d_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp)
-{
-  uint32_t index = 0, size = 0;
-  
-  /* Read bitmap size */
-  size = *(volatile uint16_t *) (pbmp + 2);
-  size |= (*(volatile uint16_t *) (pbmp + 4)) << 16;
-  /* Get bitmap data address offset */
-  index = *(volatile uint16_t *) (pbmp + 10);
-  index |= (*(volatile uint16_t *) (pbmp + 12)) << 16;
-  size = (size - index)/2;
-  pbmp += index;
-  
-  /* Set GRAM write direction and BGR = 0 */
-  /* Memory access control: MY = 1, MX = 0, MV = 1, ML = 0 */
-  hx8347d_WriteReg(LCD_REG_22, 0xA0);
-  
-  /* Set Cursor */
-  hx8347d_SetCursor(Xpos, Ypos);  
-  
-  /* Prepare to write GRAM */
-  LCD_IO_WriteReg(LCD_REG_34);
-  
-  LCD_IO_WriteMultipleData((uint8_t*)pbmp, size*2);
-  
-  /* Set GRAM write direction and BGR = 0 */
-  /* Memory access control: MY = 1, MX = 1, MV = 1, ML = 0 */
-  hx8347d_WriteReg(LCD_REG_22, 0xE0);
-}
-
-/**
-* @}
-*/ 
-
-/**
-* @}
-*/ 
-
-/**
-* @}
-*/ 
-
-/**
-* @}
-*/
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 278
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/hx8347d/hx8347d.h

@@ -1,278 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    hx8347d.h
-  * @author  MCD Application Team
-  * @version V1.1.1
-  * @date    24-November-2014
-  * @brief   This file contains all the functions prototypes for the hx8347d.c
-  *          driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2014 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 __HX8347D_H
-#define __HX8347D_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif 
-
-/* Includes ------------------------------------------------------------------*/
-#include "../Common/lcd.h"
-
-/** @addtogroup BSP
-  * @{
-  */ 
-
-/** @addtogroup Components
-  * @{
-  */ 
-  
-/** @addtogroup HX8347D
-  * @{
-  */
-
-/** @defgroup HX8347D_Exported_Types
-  * @{
-  */
-   
-/**
-  * @}
-  */ 
-
-/** @defgroup HX8347D_Exported_Constants
-  * @{
-  */
-/** 
-  * @brief  HX8347D ID  
-  */  
-#define  HX8347D_ID    0x0047
-   
-/** 
-  * @brief  HX8347D Size  
-  */  
-#define  HX8347D_LCD_PIXEL_WIDTH    ((uint16_t)320)
-#define  HX8347D_LCD_PIXEL_HEIGHT   ((uint16_t)240)
-   
-/** 
-  * @brief  HX8347D Registers  
-  */ 
-#define LCD_REG_0             0x00
-#define LCD_REG_1             0x01
-#define LCD_REG_2             0x02
-#define LCD_REG_3             0x03
-#define LCD_REG_4             0x04
-#define LCD_REG_5             0x05
-#define LCD_REG_6             0x06
-#define LCD_REG_7             0x07
-#define LCD_REG_8             0x08
-#define LCD_REG_9             0x09
-#define LCD_REG_10            0x0A
-#define LCD_REG_12            0x0C
-#define LCD_REG_13            0x0D
-#define LCD_REG_14            0x0E
-#define LCD_REG_15            0x0F
-#define LCD_REG_16            0x10
-#define LCD_REG_17            0x11
-#define LCD_REG_18            0x12
-#define LCD_REG_19            0x13
-#define LCD_REG_20            0x14
-#define LCD_REG_21            0x15
-#define LCD_REG_22            0x16
-#define LCD_REG_23            0x17
-#define LCD_REG_24            0x18
-#define LCD_REG_25            0x19
-#define LCD_REG_26            0x1A
-#define LCD_REG_27            0x1B
-#define LCD_REG_28            0x1C
-#define LCD_REG_29            0x1D
-#define LCD_REG_30            0x1E
-#define LCD_REG_31            0x1F
-#define LCD_REG_32            0x20
-#define LCD_REG_33            0x21
-#define LCD_REG_34            0x22
-#define LCD_REG_35            0x23
-#define LCD_REG_36            0x24
-#define LCD_REG_37            0x25
-#define LCD_REG_39            0x27
-#define LCD_REG_40            0x28
-#define LCD_REG_41            0x29
-#define LCD_REG_43            0x2B
-#define LCD_REG_45            0x2D
-#define LCD_REG_48            0x30
-#define LCD_REG_49            0x31
-#define LCD_REG_50            0x32
-#define LCD_REG_51            0x33
-#define LCD_REG_52            0x34
-#define LCD_REG_53            0x35
-#define LCD_REG_54            0x36
-#define LCD_REG_55            0x37
-#define LCD_REG_56            0x38
-#define LCD_REG_57            0x39
-#define LCD_REG_59            0x3B
-#define LCD_REG_60            0x3C
-#define LCD_REG_61            0x3D
-#define LCD_REG_62            0x3E
-#define LCD_REG_63            0x3F
-#define LCD_REG_64            0x40
-#define LCD_REG_65            0x41
-#define LCD_REG_66            0x42
-#define LCD_REG_67            0x43
-#define LCD_REG_68            0x44
-#define LCD_REG_69            0x45
-#define LCD_REG_70            0x46
-#define LCD_REG_71            0x47
-#define LCD_REG_72            0x48
-#define LCD_REG_73            0x49
-#define LCD_REG_74            0x4A
-#define LCD_REG_75            0x4B
-#define LCD_REG_76            0x4C
-#define LCD_REG_77            0x4D
-#define LCD_REG_78            0x4E
-#define LCD_REG_79            0x4F
-#define LCD_REG_80            0x50
-#define LCD_REG_81            0x51
-#define LCD_REG_82            0x52
-#define LCD_REG_83            0x53
-#define LCD_REG_84            0x54
-#define LCD_REG_85            0x55
-#define LCD_REG_86            0x56
-#define LCD_REG_87            0x57
-#define LCD_REG_88            0x58
-#define LCD_REG_89            0x59
-#define LCD_REG_90            0x5A
-#define LCD_REG_91            0x5B
-#define LCD_REG_92            0x5C
-#define LCD_REG_93            0x5D
-#define LCD_REG_96            0x60
-#define LCD_REG_97            0x61
-#define LCD_REG_106           0x6A
-#define LCD_REG_118           0x76
-#define LCD_REG_128           0x80
-#define LCD_REG_129           0x81
-#define LCD_REG_130           0x82
-#define LCD_REG_131           0x83
-#define LCD_REG_132           0x84
-#define LCD_REG_133           0x85
-#define LCD_REG_134           0x86
-#define LCD_REG_135           0x87
-#define LCD_REG_136           0x88
-#define LCD_REG_137           0x89
-#define LCD_REG_139           0x8B
-#define LCD_REG_140           0x8C
-#define LCD_REG_141           0x8D
-#define LCD_REG_143           0x8F
-#define LCD_REG_144           0x90
-#define LCD_REG_145           0x91
-#define LCD_REG_146           0x92
-#define LCD_REG_147           0x93
-#define LCD_REG_148           0x94
-#define LCD_REG_149           0x95
-#define LCD_REG_150           0x96
-#define LCD_REG_151           0x97
-#define LCD_REG_152           0x98
-#define LCD_REG_153           0x99
-#define LCD_REG_154           0x9A
-#define LCD_REG_157           0x9D
-#define LCD_REG_192           0xC0
-#define LCD_REG_193           0xC1
-#define LCD_REG_227           0xE3
-#define LCD_REG_229           0xE5
-#define LCD_REG_231           0xE7
-#define LCD_REG_239           0xEF
-#define LCD_REG_232           0xE8
-#define LCD_REG_233           0xE9
-#define LCD_REG_234           0xEA
-#define LCD_REG_235           0xEB
-#define LCD_REG_236           0xEC
-#define LCD_REG_237           0xED
-#define LCD_REG_241           0xF1
-#define LCD_REG_242           0xF2
-
-/**
-  * @}
-  */
-  
-/** @defgroup HX8347D_Exported_Functions
-  * @{
-  */ 
-void     hx8347d_Init(void);
-uint16_t hx8347d_ReadID(void);
-void     hx8347d_WriteReg(uint8_t LCDReg, uint16_t LCDRegValue);
-uint16_t hx8347d_ReadReg(uint8_t LCDReg);
-
-void     hx8347d_DisplayOn(void);
-void     hx8347d_DisplayOff(void);
-void     hx8347d_SetCursor(uint16_t Xpos, uint16_t Ypos);
-void     hx8347d_WritePixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGBCode);
-uint16_t hx8347d_ReadPixel(uint16_t Xpos, uint16_t Ypos);
-
-void     hx8347d_DrawHLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void     hx8347d_DrawVLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void     hx8347d_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp);
-
-void     hx8347d_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-
-
-uint16_t hx8347d_GetLcdPixelWidth(void);
-uint16_t hx8347d_GetLcdPixelHeight(void);
-
-/* LCD driver structure */
-extern LCD_DrvTypeDef   hx8347d_drv;
-
-/* LCD IO functions */
-void     LCD_IO_Init(void);
-void     LCD_IO_WriteMultipleData(uint8_t *pData, uint32_t Size);
-void     LCD_IO_WriteReg(uint8_t Reg);
-uint16_t LCD_IO_ReadData(uint16_t Reg);
-void     LCD_Delay (uint32_t delay);
-/**
-  * @}
-  */ 
-      
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __HX8347D_H */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-  
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 461
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/l3gd20/Release_Notes.html

@@ -1,461 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-
-
-
-
-
-
-
-
-
-
-  
-  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
-  
-  <link rel="File-List" href="Library_files/filelist.xml">
-
-  
-  <link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><title>Release Notes for L3GD20 Component Driver</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]-->
-
-
-  
-
-  
-
-  
-  <style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-  </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-  <meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-  <tbody>
-    <tr>
-      <td style="padding: 0cm;" valign="top">
-      <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-        <tbody>
-          <tr>
-            <td style="vertical-align: top;">
-            <p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-            </td>
-          </tr>
-          <tr style="">
-            <td style="padding: 1.5pt;">
-            <h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for L3GD20 Component Driver</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2015 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-      <table style="width: 675pt;" class="MsoNormalTable" border="0" cellpadding="0" width="900">
-        <tbody>
-          <tr style="">
-            <td style="padding: 0cm;" valign="top"><span style="font-size: 10pt; font-family: Verdana;"></span><h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2>
-            <h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.0 / 24-June-2015 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-
-
-
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-size: 10pt; font-family: Verdana;">l3gd20.h/.c:&nbsp;</span></li><ul><li><span style="font-size: 10pt; font-family: Verdana;">Add gyroscope de-initialization function: L3GD20_DeInit()</span></li><li><span style="font-size: 10pt; font-family: Verdana;">Add gyroscope low power configuration</span><span style="font-size: 10pt; font-family: Verdana;"> function:&nbsp;</span><span style="font-size: 10pt; font-family: Verdana;">L3GD20_LowPower</span><span style="font-size: 10pt; font-family: Verdana;">()</span></li><li><span style="font-family: Verdana; font-size: 10pt;"><span style="font-weight: bold;">NOTE:</span> This release must be used with BSP Common 
-driver V4.0.0 or later</span></li></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.1.1 / 27-November-2014 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-
-
-
-            
-            
-            <ul style="list-style-type: square;">
-<li><span style="font-size: 10pt; font-family: Verdana;">l3gd20.h: change "\" by "/" in the include path to fix compilation issue under Linux</span><br>
-                <span style="font-size: 10pt; font-family: Verdana;"></span></li><li><span style="font-size: 10pt; font-family: Verdana;">Miscellaneous formatting and comments update</span></li>
-            </ul>
-
-            <h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.1.0 / 10-June-2014 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-
-
-            
-            <ul style="list-style-type: square;">
-              <li><span style="font-size: 10pt; font-family: Verdana;">Update to support new revision of L3GD20 component having new device ID 0xD5 (new define added: I_AM_L3GD20_TR)</span></li>
-            </ul>
-
-            <h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0 / 18-February-2014 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">First official release of L3GD20 gyroscope </span><span style="font-size: 10pt; font-family: Verdana;"></span></li></ul><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"></span><h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span><br></h2><div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-            </font>
-            <ol><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived </span><br>
-                </font>
-              </li></ol>
-            <font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from this software without specific prior written permission.</span><br>
-            <span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-            <span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></font>
-            
-            </div>
-<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black;"><o:p></o:p></span></p>
-<b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-            
-            <div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-            <hr align="center" size="2" width="100%"></span></div>
-            <div style="margin-left: 120px;"><span style="font-size: 10pt; font-family: Verdana; color: black;">For
-complete documentation on </span><span style="font-size: 10pt; font-family: Verdana;">STM32<span style="color: black;">&nbsp;Microcontrollers
-visit </span><u><span style="color: blue;"><a href="http://www.st.com/internet/mcu/class/1734.jsp" target="_blank">www.st.com/STM32</a></span></u></span></div>
-            </td>
-          </tr>
-        <tr><td style="padding: 0cm;" valign="top"><br>
-</td></tr></tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-      </td>
-    </tr>
-  </tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-
-</body></html>

+ 0 - 416
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/l3gd20/l3gd20.c

@@ -1,416 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    l3gd20.c
-  * @author  MCD Application Team
-  * @version V2.0.0
-  * @date    26-June-2015
-  * @brief   This file provides a set of functions needed to manage the L3GD20,
-  *          ST MEMS motion sensor, 3-axis digital output gyroscope.  
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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.
-  *
-  ******************************************************************************
-  */
-/* Includes ------------------------------------------------------------------*/
-#include "l3gd20.h"
-
-/** @addtogroup BSP
-  * @{
-  */ 
-
-/** @addtogroup Components
-  * @{
-  */ 
-
-/** @addtogroup L3GD20
-  * @{
-  */
-
-/** @defgroup L3GD20_Private_TypesDefinitions
-  * @{
-  */
-  
-/**
-  * @}
-  */
-
-/** @defgroup L3GD20_Private_Defines
-  * @{
-  */
-
-/**
-  * @}
-  */
-
-/** @defgroup L3GD20_Private_Macros
-  * @{
-  */
-
-/**
-  * @}
-  */ 
-  
-/** @defgroup L3GD20_Private_Variables
-  * @{
-  */ 
-GYRO_DrvTypeDef L3gd20Drv =
-{
-  L3GD20_Init,
-  L3GD20_DeInit,
-  L3GD20_ReadID,
-  L3GD20_RebootCmd,
-  L3GD20_LowPower,
-  L3GD20_INT1InterruptConfig,
-  L3GD20_EnableIT,
-  L3GD20_DisableIT,
-  0,
-  0,
-  L3GD20_FilterConfig,
-  L3GD20_FilterCmd,
-  L3GD20_ReadXYZAngRate
-};
-
-/**
-  * @}
-  */
-
-/** @defgroup L3GD20_Private_FunctionPrototypes
-  * @{
-  */
-
-/**
-  * @}
-  */
-
-/** @defgroup L3GD20_Private_Functions
-  * @{
-  */
-
-/**
-  * @brief  Set L3GD20 Initialization.
-  * @param  L3GD20_InitStruct: pointer to a L3GD20_InitTypeDef structure 
-  *         that contains the configuration setting for the L3GD20.
-  * @retval None
-  */
-void L3GD20_Init(uint16_t InitStruct)
-{  
-  uint8_t ctrl = 0x00;
-  
-  /* Configure the low level interface */
-  GYRO_IO_Init();
-  
-  /* Write value to MEMS CTRL_REG1 register */
-  ctrl = (uint8_t) InitStruct;
-  GYRO_IO_Write(&ctrl, L3GD20_CTRL_REG1_ADDR, 1);
-  
-  /* Write value to MEMS CTRL_REG4 register */  
-  ctrl = (uint8_t) (InitStruct >> 8);
-  GYRO_IO_Write(&ctrl, L3GD20_CTRL_REG4_ADDR, 1);
-}
-
-
-
-/**
-  * @brief L3GD20 De-initialization
-  * @param  None
-  * @retval None
-  */
-void L3GD20_DeInit(void)
-{
-}
-
-/**
-  * @brief  Read ID address of L3GD20
-  * @param  None
-  * @retval ID name
-  */
-uint8_t L3GD20_ReadID(void)
-{
-  uint8_t tmp;
-  
-  /* Configure the low level interface */
-  GYRO_IO_Init();
-  
-  /* Read WHO I AM register */
-  GYRO_IO_Read(&tmp, L3GD20_WHO_AM_I_ADDR, 1);
-  
-  /* Return the ID */
-  return (uint8_t)tmp;
-}
-
-/**
-  * @brief  Reboot memory content of L3GD20
-  * @param  None
-  * @retval None
-  */
-void L3GD20_RebootCmd(void)
-{
-  uint8_t tmpreg;
-  
-  /* Read CTRL_REG5 register */
-  GYRO_IO_Read(&tmpreg, L3GD20_CTRL_REG5_ADDR, 1);
-  
-  /* Enable or Disable the reboot memory */
-  tmpreg |= L3GD20_BOOT_REBOOTMEMORY;
-  
-  /* Write value to MEMS CTRL_REG5 register */
-  GYRO_IO_Write(&tmpreg, L3GD20_CTRL_REG5_ADDR, 1);
-}
-
-/**
-  * @brief Set L3GD20 in low-power mode
-  * @param 
-  * @retval  None
-  */
-void L3GD20_LowPower(uint16_t InitStruct)
-{  
-  uint8_t ctrl = 0x00;
-
-  /* Write value to MEMS CTRL_REG1 register */
-  ctrl = (uint8_t) InitStruct;
-  GYRO_IO_Write(&ctrl, L3GD20_CTRL_REG1_ADDR, 1);
-}
-
-/**
-  * @brief  Set L3GD20 Interrupt INT1 configuration
-  * @param  Int1Config: the configuration setting for the L3GD20 Interrupt.
-  * @retval None
-  */
-void L3GD20_INT1InterruptConfig(uint16_t Int1Config)
-{
-  uint8_t ctrl_cfr = 0x00, ctrl3 = 0x00;
-  
-  /* Read INT1_CFG register */
-  GYRO_IO_Read(&ctrl_cfr, L3GD20_INT1_CFG_ADDR, 1);
-  
-  /* Read CTRL_REG3 register */
-  GYRO_IO_Read(&ctrl3, L3GD20_CTRL_REG3_ADDR, 1);
-  
-  ctrl_cfr &= 0x80;
-  ctrl_cfr |= ((uint8_t) Int1Config >> 8);
-  
-  ctrl3 &= 0xDF;
-  ctrl3 |= ((uint8_t) Int1Config);   
-  
-  /* Write value to MEMS INT1_CFG register */
-  GYRO_IO_Write(&ctrl_cfr, L3GD20_INT1_CFG_ADDR, 1);
-  
-  /* Write value to MEMS CTRL_REG3 register */
-  GYRO_IO_Write(&ctrl3, L3GD20_CTRL_REG3_ADDR, 1);
-}
-
-/**
-  * @brief  Enable INT1 or INT2 interrupt
-  * @param  IntSel: choice of INT1 or INT2 
-  *      This parameter can be: 
-  *        @arg L3GD20_INT1
-  *        @arg L3GD20_INT2   
-  * @retval None
-  */
-void L3GD20_EnableIT(uint8_t IntSel)
-{  
-  uint8_t tmpreg;
-  
-  /* Read CTRL_REG3 register */
-  GYRO_IO_Read(&tmpreg, L3GD20_CTRL_REG3_ADDR, 1);
-  
-  if(IntSel == L3GD20_INT1)
-  {
-    tmpreg &= 0x7F;	
-    tmpreg |= L3GD20_INT1INTERRUPT_ENABLE;
-  }
-  else if(IntSel == L3GD20_INT2)
-  {
-    tmpreg &= 0xF7;
-    tmpreg |= L3GD20_INT2INTERRUPT_ENABLE;
-  }
-  
-  /* Write value to MEMS CTRL_REG3 register */
-  GYRO_IO_Write(&tmpreg, L3GD20_CTRL_REG3_ADDR, 1);
-}
-
-/**
-  * @brief  Disable  INT1 or INT2 interrupt
-  * @param  IntSel: choice of INT1 or INT2 
-  *      This parameter can be: 
-  *        @arg L3GD20_INT1
-  *        @arg L3GD20_INT2   
-  * @retval None
-  */
-void L3GD20_DisableIT(uint8_t IntSel)
-{  
-  uint8_t tmpreg;
-  
-  /* Read CTRL_REG3 register */
-  GYRO_IO_Read(&tmpreg, L3GD20_CTRL_REG3_ADDR, 1);
-  
-  if(IntSel == L3GD20_INT1)
-  {
-    tmpreg &= 0x7F;	
-    tmpreg |= L3GD20_INT1INTERRUPT_DISABLE;
-  }
-  else if(IntSel == L3GD20_INT2)
-  {
-    tmpreg &= 0xF7;
-    tmpreg |= L3GD20_INT2INTERRUPT_DISABLE;
-  }
-  
-  /* Write value to MEMS CTRL_REG3 register */
-  GYRO_IO_Write(&tmpreg, L3GD20_CTRL_REG3_ADDR, 1);
-}
-
-/**
-  * @brief  Set High Pass Filter Modality
-  * @param  FilterStruct: contains the configuration setting for the L3GD20.        
-  * @retval None
-  */
-void L3GD20_FilterConfig(uint8_t FilterStruct) 
-{
-  uint8_t tmpreg;
-  
-  /* Read CTRL_REG2 register */
-  GYRO_IO_Read(&tmpreg, L3GD20_CTRL_REG2_ADDR, 1);
-  
-  tmpreg &= 0xC0;
-  
-  /* Configure MEMS: mode and cutoff frequency */
-  tmpreg |= FilterStruct;
-  
-  /* Write value to MEMS CTRL_REG2 register */
-  GYRO_IO_Write(&tmpreg, L3GD20_CTRL_REG2_ADDR, 1);
-}
-
-/**
-  * @brief  Enable or Disable High Pass Filter
-  * @param  HighPassFilterState: new state of the High Pass Filter feature.
-  *      This parameter can be: 
-  *         @arg: L3GD20_HIGHPASSFILTER_DISABLE 
-  *         @arg: L3GD20_HIGHPASSFILTER_ENABLE          
-  * @retval None
-  */
-void L3GD20_FilterCmd(uint8_t HighPassFilterState)
-{
-  uint8_t tmpreg;
-  
-  /* Read CTRL_REG5 register */
-  GYRO_IO_Read(&tmpreg, L3GD20_CTRL_REG5_ADDR, 1);
-  
-  tmpreg &= 0xEF;
-  
-  tmpreg |= HighPassFilterState;
-  
-  /* Write value to MEMS CTRL_REG5 register */
-  GYRO_IO_Write(&tmpreg, L3GD20_CTRL_REG5_ADDR, 1);
-}
-
-/**
-  * @brief  Get status for L3GD20 data
-  * @param  None         
-  * @retval Data status in a L3GD20 Data
-  */
-uint8_t L3GD20_GetDataStatus(void)
-{
-  uint8_t tmpreg;
-  
-  /* Read STATUS_REG register */
-  GYRO_IO_Read(&tmpreg, L3GD20_STATUS_REG_ADDR, 1);
-  
-  return tmpreg;
-}
-
-/**
-* @brief  Calculate the L3GD20 angular data.
-* @param  pfData: Data out pointer
-* @retval None
-*/
-void L3GD20_ReadXYZAngRate(float *pfData)
-{
-  uint8_t tmpbuffer[6] ={0};
-  int16_t RawData[3] = {0};
-  uint8_t tmpreg = 0;
-  float sensitivity = 0;
-  int i =0;
-  
-  GYRO_IO_Read(&tmpreg,L3GD20_CTRL_REG4_ADDR,1);
-  
-  GYRO_IO_Read(tmpbuffer,L3GD20_OUT_X_L_ADDR,6);
-  
-  /* check in the control register 4 the data alignment (Big Endian or Little Endian)*/
-  if(!(tmpreg & L3GD20_BLE_MSB))
-  {
-    for(i=0; i<3; i++)
-    {
-      RawData[i]=(int16_t)(((uint16_t)tmpbuffer[2*i+1] << 8) + tmpbuffer[2*i]);
-    }
-  }
-  else
-  {
-    for(i=0; i<3; i++)
-    {
-      RawData[i]=(int16_t)(((uint16_t)tmpbuffer[2*i] << 8) + tmpbuffer[2*i+1]);
-    }
-  }
-  
-  /* Switch the sensitivity value set in the CRTL4 */
-  switch(tmpreg & L3GD20_FULLSCALE_SELECTION)
-  {
-  case L3GD20_FULLSCALE_250:
-    sensitivity=L3GD20_SENSITIVITY_250DPS;
-    break;
-    
-  case L3GD20_FULLSCALE_500:
-    sensitivity=L3GD20_SENSITIVITY_500DPS;
-    break;
-    
-  case L3GD20_FULLSCALE_2000:
-    sensitivity=L3GD20_SENSITIVITY_2000DPS;
-    break;
-  }
-  /* Divide by sensitivity */
-  for(i=0; i<3; i++)
-  {
-    pfData[i]=(float)(RawData[i] * sensitivity);
-  }
-}
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/     

+ 0 - 324
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/l3gd20/l3gd20.h

@@ -1,324 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    l3gd20.h
-  * @author  MCD Application Team
-  * @version V2.0.0
-  * @date    26-June-2015
-  * @brief   This file contains all the functions prototypes for the l3gd20.c driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 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 __L3GD20_H
-#define __L3GD20_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "../Common/gyro.h"
-
-/** @addtogroup BSP
-  * @{
-  */ 
-
-/** @addtogroup Components
-  * @{
-  */ 
-
-/** @addtogroup L3GD20
-  * @{
-  */
-  
-/** @defgroup L3GD20_Exported_Constants
-  * @{
-  */
-
-/******************************************************************************/
-/*************************** START REGISTER MAPPING  **************************/
-/******************************************************************************/
-#define L3GD20_WHO_AM_I_ADDR          0x0F  /* device identification register */
-#define L3GD20_CTRL_REG1_ADDR         0x20  /* Control register 1 */
-#define L3GD20_CTRL_REG2_ADDR         0x21  /* Control register 2 */
-#define L3GD20_CTRL_REG3_ADDR         0x22  /* Control register 3 */
-#define L3GD20_CTRL_REG4_ADDR         0x23  /* Control register 4 */
-#define L3GD20_CTRL_REG5_ADDR         0x24  /* Control register 5 */
-#define L3GD20_REFERENCE_REG_ADDR     0x25  /* Reference register */
-#define L3GD20_OUT_TEMP_ADDR          0x26  /* Out temp register */
-#define L3GD20_STATUS_REG_ADDR        0x27  /* Status register */
-#define L3GD20_OUT_X_L_ADDR           0x28  /* Output Register X */
-#define L3GD20_OUT_X_H_ADDR           0x29  /* Output Register X */
-#define L3GD20_OUT_Y_L_ADDR           0x2A  /* Output Register Y */
-#define L3GD20_OUT_Y_H_ADDR           0x2B  /* Output Register Y */
-#define L3GD20_OUT_Z_L_ADDR           0x2C  /* Output Register Z */
-#define L3GD20_OUT_Z_H_ADDR           0x2D  /* Output Register Z */ 
-#define L3GD20_FIFO_CTRL_REG_ADDR     0x2E  /* Fifo control Register */
-#define L3GD20_FIFO_SRC_REG_ADDR      0x2F  /* Fifo src Register */
-
-#define L3GD20_INT1_CFG_ADDR          0x30  /* Interrupt 1 configuration Register */
-#define L3GD20_INT1_SRC_ADDR          0x31  /* Interrupt 1 source Register */
-#define L3GD20_INT1_TSH_XH_ADDR       0x32  /* Interrupt 1 Threshold X register */
-#define L3GD20_INT1_TSH_XL_ADDR       0x33  /* Interrupt 1 Threshold X register */
-#define L3GD20_INT1_TSH_YH_ADDR       0x34  /* Interrupt 1 Threshold Y register */
-#define L3GD20_INT1_TSH_YL_ADDR       0x35  /* Interrupt 1 Threshold Y register */
-#define L3GD20_INT1_TSH_ZH_ADDR       0x36  /* Interrupt 1 Threshold Z register */
-#define L3GD20_INT1_TSH_ZL_ADDR       0x37  /* Interrupt 1 Threshold Z register */
-#define L3GD20_INT1_DURATION_ADDR     0x38  /* Interrupt 1 DURATION register */
-
-/******************************************************************************/
-/**************************** END REGISTER MAPPING  ***************************/
-/******************************************************************************/
-
-#define I_AM_L3GD20                 ((uint8_t)0xD4)
-#define I_AM_L3GD20_TR              ((uint8_t)0xD5)
-
-/** @defgroup Power_Mode_selection 
-  * @{
-  */
-#define L3GD20_MODE_POWERDOWN       ((uint8_t)0x00)
-#define L3GD20_MODE_ACTIVE          ((uint8_t)0x08)
-/**
-  * @}
-  */
-
-/** @defgroup OutPut_DataRate_Selection 
-  * @{
-  */
-#define L3GD20_OUTPUT_DATARATE_1    ((uint8_t)0x00)
-#define L3GD20_OUTPUT_DATARATE_2    ((uint8_t)0x40)
-#define L3GD20_OUTPUT_DATARATE_3    ((uint8_t)0x80)
-#define L3GD20_OUTPUT_DATARATE_4    ((uint8_t)0xC0)
-/**
-  * @}
-  */
-
-/** @defgroup Axes_Selection 
-  * @{
-  */
-#define L3GD20_X_ENABLE            ((uint8_t)0x02)
-#define L3GD20_Y_ENABLE            ((uint8_t)0x01)
-#define L3GD20_Z_ENABLE            ((uint8_t)0x04)
-#define L3GD20_AXES_ENABLE         ((uint8_t)0x07)
-#define L3GD20_AXES_DISABLE        ((uint8_t)0x00)
-/**
-  * @}
-  */
-
-/** @defgroup Bandwidth_Selection 
-  * @{
-  */
-#define L3GD20_BANDWIDTH_1         ((uint8_t)0x00)
-#define L3GD20_BANDWIDTH_2         ((uint8_t)0x10)
-#define L3GD20_BANDWIDTH_3         ((uint8_t)0x20)
-#define L3GD20_BANDWIDTH_4         ((uint8_t)0x30)
-/**
-  * @}
-  */
-
-/** @defgroup Full_Scale_Selection 
-  * @{
-  */
-#define L3GD20_FULLSCALE_250       ((uint8_t)0x00)
-#define L3GD20_FULLSCALE_500       ((uint8_t)0x10)
-#define L3GD20_FULLSCALE_2000      ((uint8_t)0x20) 
-#define L3GD20_FULLSCALE_SELECTION ((uint8_t)0x30)
-/**
-  * @}
-  */
-
-/** @defgroup Full_Scale_Sensitivity 
-  * @{
-  */
-#define L3GD20_SENSITIVITY_250DPS  ((float)8.75f)         /*!< gyroscope sensitivity with 250 dps full scale [DPS/LSB]  */
-#define L3GD20_SENSITIVITY_500DPS  ((float)17.50f)        /*!< gyroscope sensitivity with 500 dps full scale [DPS/LSB]  */
-#define L3GD20_SENSITIVITY_2000DPS ((float)70.00f)        /*!< gyroscope sensitivity with 2000 dps full scale [DPS/LSB] */
-/**
-  * @}
-  */
-
-  
-/** @defgroup Block_Data_Update 
-  * @{
-  */  
-#define L3GD20_BlockDataUpdate_Continous   ((uint8_t)0x00)
-#define L3GD20_BlockDataUpdate_Single      ((uint8_t)0x80)
-/**
-  * @}
-  */
-  
-/** @defgroup Endian_Data_selection
-  * @{
-  */  
-#define L3GD20_BLE_LSB                     ((uint8_t)0x00)
-#define L3GD20_BLE_MSB	                   ((uint8_t)0x40)
-/**
-  * @}
-  */
-  
-/** @defgroup High_Pass_Filter_status 
-  * @{
-  */   
-#define L3GD20_HIGHPASSFILTER_DISABLE      ((uint8_t)0x00)
-#define L3GD20_HIGHPASSFILTER_ENABLE	     ((uint8_t)0x10)
-/**
-  * @}
-  */
-
-/** @defgroup INT1_INT2_selection 
-  * @{
-  */   
-#define L3GD20_INT1                        ((uint8_t)0x00)
-#define L3GD20_INT2                        ((uint8_t)0x01)
-/**
-  * @}
-  */
-
-/** @defgroup INT1_Interrupt_status 
-  * @{
-  */   
-#define L3GD20_INT1INTERRUPT_DISABLE       ((uint8_t)0x00)
-#define L3GD20_INT1INTERRUPT_ENABLE        ((uint8_t)0x80)
-/**
-  * @}
-  */
-
-/** @defgroup INT2_Interrupt_status 
-  * @{
-  */   
-#define L3GD20_INT2INTERRUPT_DISABLE       ((uint8_t)0x00)
-#define L3GD20_INT2INTERRUPT_ENABLE        ((uint8_t)0x08)
-/**
-  * @}
-  */
-
-/** @defgroup INT1_Interrupt_ActiveEdge 
-  * @{
-  */   
-#define L3GD20_INT1INTERRUPT_LOW_EDGE      ((uint8_t)0x20)
-#define L3GD20_INT1INTERRUPT_HIGH_EDGE     ((uint8_t)0x00)
-/**
-  * @}
-  */
-  
-/** @defgroup Boot_Mode_selection 
-  * @{
-  */
-#define L3GD20_BOOT_NORMALMODE             ((uint8_t)0x00)
-#define L3GD20_BOOT_REBOOTMEMORY           ((uint8_t)0x80)
-/**
-  * @}
-  */  
- 
-/** @defgroup High_Pass_Filter_Mode 
-  * @{
-  */   
-#define L3GD20_HPM_NORMAL_MODE_RES         ((uint8_t)0x00)
-#define L3GD20_HPM_REF_SIGNAL              ((uint8_t)0x10)
-#define L3GD20_HPM_NORMAL_MODE             ((uint8_t)0x20)
-#define L3GD20_HPM_AUTORESET_INT           ((uint8_t)0x30)
-/**
-  * @}
-  */
-
-/** @defgroup High_Pass_CUT OFF_Frequency 
-  * @{
-  */   
-#define L3GD20_HPFCF_0              0x00
-#define L3GD20_HPFCF_1              0x01
-#define L3GD20_HPFCF_2              0x02
-#define L3GD20_HPFCF_3              0x03
-#define L3GD20_HPFCF_4              0x04
-#define L3GD20_HPFCF_5              0x05
-#define L3GD20_HPFCF_6              0x06
-#define L3GD20_HPFCF_7              0x07
-#define L3GD20_HPFCF_8              0x08
-#define L3GD20_HPFCF_9              0x09
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-/** @defgroup L3GD20_Exported_Functions
-  * @{
-  */
-/* Sensor Configuration Functions */ 
-void    L3GD20_Init(uint16_t InitStruct);
-void    L3GD20_DeInit(void);
-void    L3GD20_LowPower(uint16_t InitStruct);
-uint8_t L3GD20_ReadID(void);
-void    L3GD20_RebootCmd(void);
-
-/* Interrupt Configuration Functions */
-void    L3GD20_INT1InterruptConfig(uint16_t Int1Config);
-void    L3GD20_EnableIT(uint8_t IntSel);
-void    L3GD20_DisableIT(uint8_t IntSel);
-
-/* High Pass Filter Configuration Functions */
-void    L3GD20_FilterConfig(uint8_t FilterStruct);
-void    L3GD20_FilterCmd(uint8_t HighPassFilterState);
-void    L3GD20_ReadXYZAngRate(float *pfData);
-uint8_t L3GD20_GetDataStatus(void);
-
-/* Gyroscope IO functions */
-void    GYRO_IO_Init(void);
-void    GYRO_IO_DeInit(void);
-void    GYRO_IO_Write(uint8_t *pBuffer, uint8_t WriteAddr, uint16_t NumByteToWrite);
-void    GYRO_IO_Read(uint8_t *pBuffer, uint8_t ReadAddr, uint16_t NumByteToRead);
-
-/* Gyroscope driver structure */
-extern GYRO_DrvTypeDef L3gd20Drv;
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-  
-/**
-  * @}
-  */ 
-
-#ifdef __cplusplus
-  }
-#endif
-  
-#endif /* __L3GD20_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 

+ 0 - 178
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/spfd5408/Release_Notes.html

@@ -1,178 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-
-
-
-
-
-
-  
-  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
-  
-  <link rel="File-List" href="Library_files/filelist.xml">
-
-  
-  <link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><title>Release Notes for STM32 BSP Components Drivers</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]-->
-
-
-  
-
-  
-
-  
-  <style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-  </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-  <meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-  <tbody>
-    <tr>
-      <td style="padding: 0cm;" valign="top">
-      <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-        <tbody>
-          <tr>
-            <td style="vertical-align: top;">
-            <p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-            </td>
-          </tr>
-          <tr style="">
-            <td style="padding: 1.5pt;">
-            <h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for SPFD5408 Component Driver</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2014 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-      <table style="width: 675pt;" class="MsoNormalTable" border="0" cellpadding="0" width="900">
-        <tbody>
-          <tr style="">
-            <td style="padding: 0cm;" valign="top"><span style="font-size: 10pt; font-family: Verdana;"></span><h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.1.1
-/ 26-November-2014 <o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<ul style="list-style-type: square;"><li><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;">spfd5408.h</span><span style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;">: change "\" by "/" in the include
-path to fix compilation issues under Linux</span><span style="font-size: 10pt; font-family: Verdana;"></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; width: 180px; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt;"><span style="font-family: Arial; color: white; font-size: 10pt;">V1.1.0 / 11-July-2014 
-<o:p></o:p></span></h3>
-<p style="margin: 4.5pt 0cm 4.5pt 18pt;" class="MsoNormal"><b><u><span style="font-family: Verdana; color: black; font-size: 10pt;">Main 
-Changes<o:p></o:p></span></u></b></p><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"></span>
-<ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana;"></span><span style="font-family: Verdana; font-size: 10pt;">Beta release of 
-SPFD5408</span><span style="font-family: Verdana; font-size: 10pt;"> LCD 
-Component</span><span style="font-family: Verdana; font-size: 10pt;"> driver in 
-order to harmonize all LCD controllers Link usage (Change LCD_IO_WriteData to 
-LCD_IO_WriteMultipleData) </span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0
-/ 06-May-2014 <o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<ul style="list-style-type: square;"><li><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;">First official release of&nbsp;</span><span style="font-size: 10pt; font-family: Verdana;">SPFD5408 LCD Component</span><span style="font-size: 10pt; font-family: Verdana;"> driver</span></li></ul><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"></span><h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span><br></h2><div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-            </font>
-            <ol><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived </span><br>
-                </font>
-              </li></ol>
-            <font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from this software without specific prior written permission.</span><br>
-            <span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-            <span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></font>
-            
-            </div>
-<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black;"><o:p></o:p></span></p>
-<b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-            
-            <div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-            <hr align="center" size="2" width="100%"></span></div>
-            <div style="margin-left: 120px;"><span style="font-size: 10pt; font-family: Verdana; color: black;">For
-complete documentation on </span><span style="font-size: 10pt; font-family: Verdana;">STM32<span style="color: black;">&nbsp;Microcontrollers
-visit </span><u><span style="color: blue;"><a href="http://www.st.com/internet/mcu/class/1734.jsp" target="_blank">www.st.com/STM32</a></span></u></span></div>
-            </td>
-          </tr>
-        <tr><td style="padding: 0cm;" valign="top"></td></tr></tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-      </td>
-    </tr>
-  </tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-
-</body></html>

+ 0 - 496
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/spfd5408/spfd5408.c

@@ -1,496 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    spfd5408.c
-  * @author  MCD Application Team
-  * @version V1.1.1
-  * @date    26-November-2014
-  * @brief   This file includes the LCD driver for SPFD5408 LCD.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2014 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.
-  *
-  ******************************************************************************
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "spfd5408.h"
-
-/** @addtogroup BSP
-  * @{
-  */ 
-
-/** @addtogroup Components
-  * @{
-  */ 
-  
-/** @defgroup SPFD5408
-  * @brief     This file provides a set of functions needed to drive the 
-  *            SPFD5408 LCD.
-  * @{
-  */
-
-/** @defgroup SPFD5408_Private_TypesDefinitions
-  * @{
-  */ 
-
-/**
-  * @}
-  */ 
-
-/** @defgroup SPFD5408_Private_Defines
-  * @{
-  */
-
-/**
-  * @}
-  */ 
-  
-/** @defgroup SPFD5408_Private_Macros
-  * @{
-  */
-     
-/**
-  * @}
-  */  
-
-/** @defgroup SPFD5408_Private_Variables
-  * @{
-  */ 
-LCD_DrvTypeDef   spfd5408_drv = 
-{
-  spfd5408_Init,
-  spfd5408_ReadID,
-  spfd5408_DisplayOn,
-  spfd5408_DisplayOff,
-  spfd5408_SetCursor,
-  spfd5408_WritePixel,
-  spfd5408_ReadPixel,
-  spfd5408_SetDisplayWindow,
-  spfd5408_DrawHLine,
-  spfd5408_DrawVLine,
-  spfd5408_GetLcdPixelWidth,
-  spfd5408_GetLcdPixelHeight,
-  spfd5408_DrawBitmap,  
-};
-
-static uint8_t Is_spfd5408_Initialized = 0;
-static uint16_t ArrayRGB[320] = {0};
-
-/**
-  * @}
-  */ 
-  
-/** @defgroup SPFD5408_Private_FunctionPrototypes
-  * @{
-  */
-
-/**
-  * @}
-  */ 
-  
-/** @defgroup SPFD5408_Private_Functions
-  * @{
-  */   
-
-/**
-  * @brief  Initialise the SPFD5408 LCD Component.
-  * @param  None
-  * @retval None
-  */
-void spfd5408_Init(void)
-{  
-  if(Is_spfd5408_Initialized == 0)
-  {
-    Is_spfd5408_Initialized = 1;
-    /* Initialise SPFD5408 low level bus layer --------------------------------*/
-    LCD_IO_Init();
-   
-    /* Start Initial Sequence --------------------------------------------------*/
-    spfd5408_WriteReg(LCD_REG_227, 0x3008); /* Set internal timing */
-    spfd5408_WriteReg(LCD_REG_231, 0x0012); /* Set internal timing */
-    spfd5408_WriteReg(LCD_REG_239, 0x1231); /* Set internal timing */
-    spfd5408_WriteReg(LCD_REG_1, 0x0100);   /* Set SS and SM bit */
-    spfd5408_WriteReg(LCD_REG_2, 0x0700);   /* Set 1 line inversion */
-    spfd5408_WriteReg(LCD_REG_3, 0x1030);   /* Set GRAM write direction and BGR=1. */
-    spfd5408_WriteReg(LCD_REG_4, 0x0000);   /* Resize register */
-    spfd5408_WriteReg(LCD_REG_8, 0x0202);   /* Set the back porch and front porch */
-    spfd5408_WriteReg(LCD_REG_9, 0x0000);   /* Set non-display area refresh cycle ISC[3:0] */
-    spfd5408_WriteReg(LCD_REG_10, 0x0000);  /* FMARK function */
-    spfd5408_WriteReg(LCD_REG_12, 0x0000);  /* RGB interface setting */
-    spfd5408_WriteReg(LCD_REG_13, 0x0000);  /* Frame marker Position */
-    spfd5408_WriteReg(LCD_REG_15, 0x0000);  /* RGB interface polarity */
-    /* Power On sequence -------------------------------------------------------*/
-    spfd5408_WriteReg(LCD_REG_16, 0x0000);  /* SAP, BT[3:0], AP, DSTB, SLP, STB */
-    spfd5408_WriteReg(LCD_REG_17, 0x0000);  /* DC1[2:0], DC0[2:0], VC[2:0] */
-    spfd5408_WriteReg(LCD_REG_18, 0x0000);  /* VREG1OUT voltage */
-    spfd5408_WriteReg(LCD_REG_19, 0x0000);  /* VDV[4:0] for VCOM amplitude */
-    LCD_Delay(200);                /* Dis-charge capacitor power voltage (200ms) */  
-    spfd5408_WriteReg(LCD_REG_17, 0x0007);  /* DC1[2:0], DC0[2:0], VC[2:0] */
-    LCD_Delay(50);                 /* Delay 50 ms */
-    spfd5408_WriteReg(LCD_REG_16, 0x12B0);  /* SAP, BT[3:0], AP, DSTB, SLP, STB */
-    LCD_Delay(50);                  /* Delay 50 ms */
-    spfd5408_WriteReg(LCD_REG_18, 0x01BD);  /* External reference voltage= Vci */
-    LCD_Delay(50);                 /* Delay 50 ms */ 
-    spfd5408_WriteReg(LCD_REG_19, 0x1400);       /* VDV[4:0] for VCOM amplitude */
-    spfd5408_WriteReg(LCD_REG_41, 0x000E);  /* VCM[4:0] for VCOMH */
-    LCD_Delay(50);                 /* Delay 50 ms */
-    spfd5408_WriteReg(LCD_REG_32, 0x0000);  /* GRAM horizontal Address */
-    spfd5408_WriteReg(LCD_REG_33, 0x013F);  /* GRAM Vertical Address */
-    /* Adjust the Gamma Curve --------------------------------------------------*/
-    spfd5408_WriteReg(LCD_REG_48, 0x0007);
-    spfd5408_WriteReg(LCD_REG_49, 0x0302);
-    spfd5408_WriteReg(LCD_REG_50, 0x0105);
-    spfd5408_WriteReg(LCD_REG_53, 0x0206);
-    spfd5408_WriteReg(LCD_REG_54, 0x0808);
-    spfd5408_WriteReg(LCD_REG_55, 0x0206);
-    spfd5408_WriteReg(LCD_REG_56, 0x0504);
-    spfd5408_WriteReg(LCD_REG_57, 0x0007);
-    spfd5408_WriteReg(LCD_REG_60, 0x0105);
-    spfd5408_WriteReg(LCD_REG_61, 0x0808);
-    /* Set GRAM area -----------------------------------------------------------*/
-    spfd5408_WriteReg(LCD_REG_80, 0x0000);  /* Horizontal GRAM Start Address */
-    spfd5408_WriteReg(LCD_REG_81, 0x00EF);  /* Horizontal GRAM End Address */
-    spfd5408_WriteReg(LCD_REG_82, 0x0000);  /* Vertical GRAM Start Address */
-    spfd5408_WriteReg(LCD_REG_83, 0x013F);  /* Vertical GRAM End Address */
-    spfd5408_WriteReg(LCD_REG_96,  0xA700); /* Gate Scan Line */
-    spfd5408_WriteReg(LCD_REG_97,  0x0001); /* NDL,VLE, REV */
-    spfd5408_WriteReg(LCD_REG_106, 0x0000); /* Set scrolling line */
-    /* Partial Display Control -------------------------------------------------*/
-    spfd5408_WriteReg(LCD_REG_128, 0x0000);
-    spfd5408_WriteReg(LCD_REG_129, 0x0000);
-    spfd5408_WriteReg(LCD_REG_130, 0x0000);
-    spfd5408_WriteReg(LCD_REG_131, 0x0000);
-    spfd5408_WriteReg(LCD_REG_132, 0x0000);
-    spfd5408_WriteReg(LCD_REG_133, 0x0000);
-    /* Panel Control -----------------------------------------------------------*/
-    spfd5408_WriteReg(LCD_REG_144, 0x0010);
-    spfd5408_WriteReg(LCD_REG_146, 0x0000);
-    spfd5408_WriteReg(LCD_REG_147, 0x0003);
-    spfd5408_WriteReg(LCD_REG_149, 0x0110);
-    spfd5408_WriteReg(LCD_REG_151, 0x0000);
-    spfd5408_WriteReg(LCD_REG_152, 0x0000);
-    /* Set GRAM write direction and BGR = 1
-       I/D=01 (Horizontal : increment, Vertical : decrement)
-       AM=1 (address is updated in vertical writing direction) */
-    spfd5408_WriteReg(LCD_REG_3, 0x1018);
-    spfd5408_WriteReg(LCD_REG_7, 0x0112);   /* 262K color and display ON */
-  }
-
-  /* Set the Cursor */ 
-  spfd5408_SetCursor(0, 0);
-    
-  /* Prepare to write GRAM */
-  LCD_IO_WriteReg(LCD_REG_34);
-}
-
-/**
-  * @brief  Enables the Display.
-  * @param  None
-  * @retval None
-  */
-void spfd5408_DisplayOn(void)
-{
-  /* Power On sequence ---------------------------------------------------------*/
-  spfd5408_WriteReg(LCD_REG_24, 0x36); /* Display frame rate = 70Hz RADJ = '0110' */
-  spfd5408_WriteReg(LCD_REG_25, 0x01); /* OSC_EN = 1 */
-  spfd5408_WriteReg(LCD_REG_28, 0x06); /* AP[2:0] = 111 */
-  spfd5408_WriteReg(LCD_REG_31,0x90); /* GAS=1, VOMG=00, PON=1, DK=0, XDK=0, DVDH_TRI=0, STB=0*/
-  LCD_Delay(10);
-  /* 262k/65k color selection */
-  spfd5408_WriteReg(LCD_REG_23, 0x05); /* default 0x06 262k color,  0x05 65k color */
-  /* SET PANEL */
-  spfd5408_WriteReg(LCD_REG_54, 0x09); /* SS_PANEL = 1, GS_PANEL = 0,REV_PANEL = 0, BGR_PANEL = 1 */
- 
-  /* Display On */
-  spfd5408_WriteReg(LCD_REG_40, 0x38);
-  LCD_Delay(60);
-  spfd5408_WriteReg(LCD_REG_40, 0x3C);
-}
-
-/**
-  * @brief  Disables the Display.
-  * @param  None
-  * @retval None
-  */
-void spfd5408_DisplayOff(void)
-{
-  /* Power Off sequence ---------------------------------------------------------*/
-  spfd5408_WriteReg(LCD_REG_23, 0x0000); /* default 0x06 262k color,  0x05 65k color */
-  spfd5408_WriteReg(LCD_REG_24, 0x0000); /* Display frame rate = 70Hz RADJ = '0110' */
-  spfd5408_WriteReg(LCD_REG_25, 0x0000); /* OSC_EN = 1 */
-  spfd5408_WriteReg(LCD_REG_28, 0x0000); /* AP[2:0] = 111 */
-  spfd5408_WriteReg(LCD_REG_31, 0x0000); /* GAS=1, VOMG=00, PON=1, DK=0, XDK=0, DVDH_TRI=0, STB=0*/
-  spfd5408_WriteReg(LCD_REG_54, 0x0000); /* SS_PANEL = 1, GS_PANEL = 0,REV_PANEL = 0, BGR_PANEL = 1 */
-
-  /* Display Off */
-  spfd5408_WriteReg(LCD_REG_40, 0x38);
-  LCD_Delay(60);
-  spfd5408_WriteReg(LCD_REG_40, 0x04);
-}
-
-/**
-  * @brief  Get the LCD pixel Width.
-  * @param  None
-  * @retval The Lcd Pixel Width
-  */
-uint16_t spfd5408_GetLcdPixelWidth(void)
-{
- return (uint16_t)SPFD5408_LCD_PIXEL_WIDTH;
-}
-
-/**
-  * @brief  Get the LCD pixel Height.
-  * @param  None
-  * @retval The Lcd Pixel Height
-  */
-uint16_t spfd5408_GetLcdPixelHeight(void)
-{
- return (uint16_t)SPFD5408_LCD_PIXEL_HEIGHT;
-}
-
-/**
-  * @brief  Get the SPFD5408 ID.
-  * @param  None
-  * @retval The SPFD5408 ID 
-  */
-uint16_t spfd5408_ReadID(void)
-{
-  LCD_IO_Init();
-  
-  return (spfd5408_ReadReg(0x00));
-}
-
-/**
-  * @brief  Set Cursor position.
-  * @param  Xpos: specifies the X position.
-  * @param  Ypos: specifies the Y position.
-  * @retval None
-  */
-void spfd5408_SetCursor(uint16_t Xpos, uint16_t Ypos)
-{
-  spfd5408_WriteReg(LCD_REG_32, Xpos);
-  spfd5408_WriteReg(LCD_REG_33, 319-Ypos);
-}
-
-/**
-  * @brief  Write pixel.   
-  * @param  Xpos: specifies the X position.
-  * @param  Ypos: specifies the Y position.
-  * @param  RGBCode: the RGB pixel color
-  * @retval None
-  */
-void spfd5408_WritePixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGBCode)
-{
-  /* Set Cursor */
-  spfd5408_SetCursor(Xpos, Ypos);
-  
-  /* Prepare to write GRAM */
-  LCD_IO_WriteReg(LCD_REG_34);
-
-  /* Write 16-bit GRAM Reg */
-  LCD_IO_WriteMultipleData((uint8_t*)&RGBCode, 2);
-}
-
-/**
-  * @brief  Read pixel.
-  * @param  None
-  * @retval the RGB pixel color
-  */
-uint16_t spfd5408_ReadPixel(uint16_t Xpos, uint16_t Ypos)
-{
-  /* Set Cursor */
-  spfd5408_SetCursor(Xpos, Ypos);
-  
-  /* Dummy read */
-  LCD_IO_ReadData(LCD_REG_34);
-  
-  /* Read 16-bit Reg */
-  return (LCD_IO_ReadData(LCD_REG_34));
-}
-
-/**
-  * @brief  Writes to the selected LCD register.
-  * @param  LCDReg:      address of the selected register.
-  * @param  LCDRegValue: value to write to the selected register.
-  * @retval None
-  */
-void spfd5408_WriteReg(uint8_t LCDReg, uint16_t LCDRegValue)
-{
-  LCD_IO_WriteReg(LCDReg);
-  
-  /* Write 16-bit GRAM Reg */
-  LCD_IO_WriteMultipleData((uint8_t*)&LCDRegValue, 2);
-}
-
-/**
-  * @brief  Reads the selected LCD Register.
-  * @param  LCDReg: address of the selected register.
-  * @retval LCD Register Value.
-  */
-uint16_t spfd5408_ReadReg(uint8_t LCDReg)
-{
-  /* Read 16-bit Reg */
-  return (LCD_IO_ReadData(LCDReg));
-}
-
-/**
-  * @brief  Sets a display window
-  * @param  Xpos:   specifies the X bottom left position.
-  * @param  Ypos:   specifies the Y bottom left position.
-  * @param  Height: display window height.
-  * @param  Width:  display window width.
-  * @retval None
-  */
-void spfd5408_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  /* Horizontal GRAM Start Address */
-  spfd5408_WriteReg(LCD_REG_80, Xpos);
-  /* Horizontal GRAM End Address */
-  spfd5408_WriteReg(LCD_REG_81, Xpos + Height - 1);
-  
-  /* Vertical GRAM Start Address */
-  spfd5408_WriteReg(LCD_REG_82, (SPFD5408_LCD_PIXEL_WIDTH - Ypos - Width));
-  /* Vertical GRAM End Address */
-  spfd5408_WriteReg(LCD_REG_83, (SPFD5408_LCD_PIXEL_WIDTH - Ypos - 1));  
-}
-
-/**
-  * @brief  Draw vertical line.
-  * @param  RGBCode: Specifies the RGB color   
-  * @param  Xpos:     specifies the X position.
-  * @param  Ypos:     specifies the Y position.
-  * @param  Length:   specifies the Line length.  
-  * @retval None
-  */
-void spfd5408_DrawHLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint32_t i = 0;
-  
-  /* Set Cursor */
-  spfd5408_SetCursor(Xpos, Ypos); 
-  
-  /* Prepare to write GRAM */
-  LCD_IO_WriteReg(LCD_REG_34);
-
-  
-  /* Sent a complete line */
-  for(i = 0; i < Length; i++)
-  {
-    ArrayRGB[i] = RGBCode;
-  }  
-
-  LCD_IO_WriteMultipleData((uint8_t*)&ArrayRGB[0], Length * 2);
-}
-
-/**
-  * @brief  Draw vertical line.
-  * @param  RGBCode: Specifies the RGB color    
-  * @param  Xpos:     specifies the X position.
-  * @param  Ypos:     specifies the Y position.
-  * @param  Length:   specifies the Line length.  
-  * @retval None
-  */
-void spfd5408_DrawVLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint16_t counter = 0;
-
-  /* set GRAM write direction and BGR = 1 */
-  /* I/D=00 (Horizontal : increment, Vertical : decrement) */
-  /* AM=1 (address is updated in vertical writing direction) */
-  spfd5408_WriteReg(LCD_REG_3, 0x1010);
-  
-  /* Set Cursor */
-  spfd5408_SetCursor(Xpos, Ypos);
-  /* Prepare to write GRAM */
-  LCD_IO_WriteReg(LCD_REG_34);
-
-  /* Fill a complete vertical line */
-  for(counter = 0; counter < Length; counter++)
-  {
-    ArrayRGB[counter] = RGBCode;
-  }
-  
-  /* Write 16-bit GRAM Reg */
-  LCD_IO_WriteMultipleData((uint8_t*)&ArrayRGB[0], Length * 2);
-
-  /* set GRAM write direction and BGR = 1 */
-  /* I/D=00 (Horizontal : increment, Vertical : decrement) */
-  /* AM=1 (address is updated in vertical writing direction) */
-  spfd5408_WriteReg(LCD_REG_3, 0x1018);  
-}
-
-/**
-  * @brief  Displays a bitmap picture loaded in the internal Flash.
-  * @param  BmpAddress: Bmp picture address in the internal Flash.
-  * @retval None
-  */
-void spfd5408_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp)
-{
-  uint32_t index = 0, size = 0;
-  /* Read bitmap size */
-  size = *(volatile uint16_t *) (pbmp + 2);
-  size |= (*(volatile uint16_t *) (pbmp + 4)) << 16;
-  /* Get bitmap data address offset */
-  index = *(volatile uint16_t *) (pbmp + 10);
-  index |= (*(volatile uint16_t *) (pbmp + 12)) << 16;
-  size = (size - index)/2;
-  pbmp += index;
-  /* Set GRAM write direction and BGR = 1 */
-  /* I/D=00 (Horizontal : decrement, Vertical : decrement) */
-  /* AM=1 (address is updated in vertical writing direction) */
-  spfd5408_WriteReg(LCD_REG_3, 0x1008);
-
-  /* Set Cursor */
-  spfd5408_SetCursor(Xpos, Ypos);  
-
-  /* Prepare to write GRAM */
-  LCD_IO_WriteReg(LCD_REG_34);
-   
-  LCD_IO_WriteMultipleData((uint8_t*)pbmp, size*2);
- 
-  /* Set GRAM write direction and BGR = 1 */
-  /* I/D = 01 (Horizontal : increment, Vertical : decrement) */
-  /* AM = 1 (address is updated in vertical writing direction) */
-  spfd5408_WriteReg(LCD_REG_3, 0x1018);
-}
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-  
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-  
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 278
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/spfd5408/spfd5408.h

@@ -1,278 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    spfd5408.h
-  * @author  MCD Application Team
-  * @version V1.1.1
-  * @date    26-November-2014
-  * @brief   This file contains all the functions prototypes for the spfd5408.c
-  *          driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2014 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 __SPFD5408_H
-#define __SPFD5408_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif 
-
-/* Includes ------------------------------------------------------------------*/
-#include "../Common/lcd.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-
-/** @addtogroup SPFD5408
-  * @{
-  */
-
-/** @defgroup SPFD5408_Exported_Types
-  * @{
-  */
-   
-/**
-  * @}
-  */ 
-
-/** @defgroup SPFD5408_Exported_Constants
-  * @{
-  */
-/** 
-  * @brief  SPFD5408 ID  
-  */  
-#define  SPFD5408_ID    0x5408
-   
-/** 
-  * @brief  SPFD5408 Size  
-  */  
-#define  SPFD5408_LCD_PIXEL_WIDTH    ((uint16_t)320)
-#define  SPFD5408_LCD_PIXEL_HEIGHT   ((uint16_t)240)
-   
-/** 
-  * @brief  SPFD5408 Registers  
-  */ 
-#define LCD_REG_0             0x00
-#define LCD_REG_1             0x01
-#define LCD_REG_2             0x02
-#define LCD_REG_3             0x03
-#define LCD_REG_4             0x04
-#define LCD_REG_5             0x05
-#define LCD_REG_6             0x06
-#define LCD_REG_7             0x07
-#define LCD_REG_8             0x08
-#define LCD_REG_9             0x09
-#define LCD_REG_10            0x0A
-#define LCD_REG_12            0x0C
-#define LCD_REG_13            0x0D
-#define LCD_REG_14            0x0E
-#define LCD_REG_15            0x0F
-#define LCD_REG_16            0x10
-#define LCD_REG_17            0x11
-#define LCD_REG_18            0x12
-#define LCD_REG_19            0x13
-#define LCD_REG_20            0x14
-#define LCD_REG_21            0x15
-#define LCD_REG_22            0x16
-#define LCD_REG_23            0x17
-#define LCD_REG_24            0x18
-#define LCD_REG_25            0x19
-#define LCD_REG_26            0x1A
-#define LCD_REG_27            0x1B
-#define LCD_REG_28            0x1C
-#define LCD_REG_29            0x1D
-#define LCD_REG_30            0x1E
-#define LCD_REG_31            0x1F
-#define LCD_REG_32            0x20
-#define LCD_REG_33            0x21
-#define LCD_REG_34            0x22
-#define LCD_REG_35            0x23
-#define LCD_REG_36            0x24
-#define LCD_REG_37            0x25
-#define LCD_REG_39            0x27
-#define LCD_REG_40            0x28
-#define LCD_REG_41            0x29
-#define LCD_REG_43            0x2B
-#define LCD_REG_45            0x2D
-#define LCD_REG_48            0x30
-#define LCD_REG_49            0x31
-#define LCD_REG_50            0x32
-#define LCD_REG_51            0x33
-#define LCD_REG_52            0x34
-#define LCD_REG_53            0x35
-#define LCD_REG_54            0x36
-#define LCD_REG_55            0x37
-#define LCD_REG_56            0x38
-#define LCD_REG_57            0x39
-#define LCD_REG_59            0x3B
-#define LCD_REG_60            0x3C
-#define LCD_REG_61            0x3D
-#define LCD_REG_62            0x3E
-#define LCD_REG_63            0x3F
-#define LCD_REG_64            0x40
-#define LCD_REG_65            0x41
-#define LCD_REG_66            0x42
-#define LCD_REG_67            0x43
-#define LCD_REG_68            0x44
-#define LCD_REG_69            0x45
-#define LCD_REG_70            0x46
-#define LCD_REG_71            0x47
-#define LCD_REG_72            0x48
-#define LCD_REG_73            0x49
-#define LCD_REG_74            0x4A
-#define LCD_REG_75            0x4B
-#define LCD_REG_76            0x4C
-#define LCD_REG_77            0x4D
-#define LCD_REG_78            0x4E
-#define LCD_REG_79            0x4F
-#define LCD_REG_80            0x50
-#define LCD_REG_81            0x51
-#define LCD_REG_82            0x52
-#define LCD_REG_83            0x53
-#define LCD_REG_84            0x54
-#define LCD_REG_85            0x55
-#define LCD_REG_86            0x56
-#define LCD_REG_87            0x57
-#define LCD_REG_88            0x58
-#define LCD_REG_89            0x59
-#define LCD_REG_90            0x5A
-#define LCD_REG_91            0x5B
-#define LCD_REG_92            0x5C
-#define LCD_REG_93            0x5D
-#define LCD_REG_96            0x60
-#define LCD_REG_97            0x61
-#define LCD_REG_106           0x6A
-#define LCD_REG_118           0x76
-#define LCD_REG_128           0x80
-#define LCD_REG_129           0x81
-#define LCD_REG_130           0x82
-#define LCD_REG_131           0x83
-#define LCD_REG_132           0x84
-#define LCD_REG_133           0x85
-#define LCD_REG_134           0x86
-#define LCD_REG_135           0x87
-#define LCD_REG_136           0x88
-#define LCD_REG_137           0x89
-#define LCD_REG_139           0x8B
-#define LCD_REG_140           0x8C
-#define LCD_REG_141           0x8D
-#define LCD_REG_143           0x8F
-#define LCD_REG_144           0x90
-#define LCD_REG_145           0x91
-#define LCD_REG_146           0x92
-#define LCD_REG_147           0x93
-#define LCD_REG_148           0x94
-#define LCD_REG_149           0x95
-#define LCD_REG_150           0x96
-#define LCD_REG_151           0x97
-#define LCD_REG_152           0x98
-#define LCD_REG_153           0x99
-#define LCD_REG_154           0x9A
-#define LCD_REG_157           0x9D
-#define LCD_REG_192           0xC0
-#define LCD_REG_193           0xC1
-#define LCD_REG_227           0xE3
-#define LCD_REG_229           0xE5
-#define LCD_REG_231           0xE7
-#define LCD_REG_239           0xEF
-#define LCD_REG_232           0xE8
-#define LCD_REG_233           0xE9
-#define LCD_REG_234           0xEA
-#define LCD_REG_235           0xEB
-#define LCD_REG_236           0xEC
-#define LCD_REG_237           0xED
-#define LCD_REG_241           0xF1
-#define LCD_REG_242           0xF2
-
-/**
-  * @}
-  */
-  
-/** @defgroup SPFD5408_Exported_Functions
-  * @{
-  */ 
-void     spfd5408_Init(void);
-uint16_t spfd5408_ReadID(void);
-void     spfd5408_WriteReg(uint8_t LCDReg, uint16_t LCDRegValue);
-uint16_t spfd5408_ReadReg(uint8_t LCDReg);
-
-void     spfd5408_DisplayOn(void);
-void     spfd5408_DisplayOff(void);
-void     spfd5408_SetCursor(uint16_t Xpos, uint16_t Ypos);
-void     spfd5408_WritePixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGBCode);
-uint16_t spfd5408_ReadPixel(uint16_t Xpos, uint16_t Ypos);
-
-void     spfd5408_DrawHLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void     spfd5408_DrawVLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void     spfd5408_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp);
-
-void     spfd5408_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-
-
-uint16_t spfd5408_GetLcdPixelWidth(void);
-uint16_t spfd5408_GetLcdPixelHeight(void);
-
-/* LCD driver structure */
-extern LCD_DrvTypeDef   spfd5408_drv;
-
-/* LCD IO functions */
-void     LCD_IO_Init(void);
-void     LCD_IO_WriteMultipleData(uint8_t *pData, uint32_t Size);
-void     LCD_IO_WriteReg(uint8_t Reg);
-uint16_t LCD_IO_ReadData(uint16_t Reg);
-void     LCD_Delay (uint32_t delay);
-/**
-  * @}
-  */ 
-      
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SPFD5408_H */
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-
-/**
-  * @}
-  */ 
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 307
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/st7735/Release_Notes.html

@@ -1,307 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-
-
-
-
-
-
-
-
-
-  
-  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
-  
-  <link rel="File-List" href="Library_files/filelist.xml">
-
-  
-  <link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><title>Release Notes for ST7735 Component Drivers</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]-->
-
-
-  
-
-  
-
-  
-  <style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-  </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-  <meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-  <tbody>
-    <tr>
-      <td style="padding: 0cm;" valign="top">
-      <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-        <tbody>
-          <tr>
-            <td style="vertical-align: top;">
-            <p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-            </td>
-          </tr>
-          <tr style="">
-            <td style="padding: 1.5pt;">
-            
-            <h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for ST7735 Component Drivers</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2014 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-      <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" width="900">
-        <tbody>
-          <tr style="">
-            <td style="padding: 0cm;" valign="top">
-            <span style="font-family: &quot;Times New Roman&quot;;">
-            </span>
-            <h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2><span style="font-size: 10pt; font-family: Verdana;"></span><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.1.1/ 24-November-2014 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b><span style="font-size: 10pt; font-family: Verdana;"><br></span></p><ul><li><span style="font-family: Verdana; font-size: 10pt;">st7735.h: change </span><span style="font-family: Verdana; font-size: 10pt;">"\" by&nbsp;</span><span style="font-family: Verdana; font-size: 10pt;">"/" in the </span><span style="font-family: Verdana; font-size: 10pt;">include path</span><span style="font-family: Verdana; font-size: 10pt;"></span><span style="font-family: Verdana; font-size: 10pt;"> to fix </span><span style="font-family: Verdana; font-size: 10pt;">compilation issues </span><span style="font-family: Verdana; font-size: 10pt;">under 
-Linux.</span><span style="font-family: Verdana; font-size: 10pt;"></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.1.0/ 22-July-2014 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b><span style="font-size: 10pt; font-family: Verdana;"><br></span></p><ul><li><span style="font-size: 10pt; font-family: Verdana;">LCD Component</span><span style="font-size: 10pt; font-family: Verdana;"> driver update in order to harmonize all LCD controllers Link usage (Change LCD_IO_WriteData to LCD_IO_WriteMultipleData)&nbsp;</span></li></ul>
-
-
-
-
-
-
-
-
-
-            
-
-
-            
-            
-
-
-            
-            
-
-
-
-
-
-
-            
-            
-            
-
-
-
-
-
-
-            
-            
-            
-
-
-
-
-
-            
-            
-            
-
-
-
-
-            
-            
-            
-
-            
-            
-
-
-            <h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0/ 22-April-2014 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes</span></u></b></p><ul><li><span style="font-size: 10pt; font-family: Verdana;">First official release.</span></li></ul><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"></span><h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span><br></h2>
-            <div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-            </font>
-            <ol><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived </span><br>
-                </font>
-              </li></ol>
-            <font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from this software without specific prior written permission.</span><br>
-            <span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-            <span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></font>
-            
-            </div>
-<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black;"><font size="-1"></font><o:p></o:p></span></p>
-<b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-            
-            <div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-            <hr align="center" size="2" width="100%"></span></div>
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: Verdana; color: black;">For
-complete documentation on </span><span style="font-size: 10pt; font-family: Verdana;">STM32<span style="color: black;">&nbsp;Microcontrollers
-visit </span><u><span style="color: blue;"><a href="http://www.st.com/internet/mcu/class/1734.jsp" target="_blank">www.st.com/STM32</a></span></u></span><span style="font-size: 10pt; font-family: Verdana;"><a target="_blank" href="http://www.st.com/internet/mcu/family/141.jsp"><u><span style="color: blue;"></span></u></a></span><span style="font-size: 10pt; font-family: Verdana;"><u><span style="color: blue;"></span></u></span><span style="color: black;"><o:p></o:p></span></p>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-      </td>
-    </tr>
-  </tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-
-</body></html>

+ 0 - 471
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/st7735/st7735.c

@@ -1,471 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    st7735.c
-  * @author  MCD Application Team
-  * @version V1.1.1
-  * @date    24-November-2014
-  * @brief   This file includes the driver for ST7735 LCD mounted on the Adafruit
-  *          1.8" TFT LCD shield (reference ID 802).
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2014 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.
-  *
-  ******************************************************************************
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "st7735.h"
-
-/** @addtogroup BSP
-  * @{
-  */ 
-
-/** @addtogroup Components
-  * @{
-  */ 
-
-/** @addtogroup ST7735
-  * @brief      This file provides a set of functions needed to drive the
-  *             ST7735 LCD.
-  * @{
-  */
-
-/** @defgroup ST7735_Private_TypesDefinitions
-  * @{
-  */ 
-
-/**
-  * @}
-  */ 
-
-/** @defgroup ST7735_Private_Defines
-  * @{
-  */
-
-/**
-  * @}
-  */ 
-
-/** @defgroup ST7735_Private_Macros
-  * @{
-  */
-
-/**
-  * @}
-  */  
-
-/** @defgroup ST7735_Private_Variables
-  * @{
-  */ 
-
-
-LCD_DrvTypeDef   st7735_drv = 
-{
-  st7735_Init,
-  0,
-  st7735_DisplayOn,
-  st7735_DisplayOff,
-  st7735_SetCursor,
-  st7735_WritePixel,
-  0,
-  st7735_SetDisplayWindow,
-  st7735_DrawHLine,
-  st7735_DrawVLine,
-  st7735_GetLcdPixelWidth,
-  st7735_GetLcdPixelHeight,
-  st7735_DrawBitmap,
-};
-
-static uint16_t ArrayRGB[320] = {0};
-
-/**
-* @}
-*/ 
-
-/** @defgroup ST7735_Private_FunctionPrototypes
-  * @{
-  */
-
-/**
-* @}
-*/ 
-
-/** @defgroup ST7735_Private_Functions
-  * @{
-  */
-
-/**
-  * @brief  Initialize the ST7735 LCD Component.
-  * @param  None
-  * @retval None
-  */
-void st7735_Init(void)
-{    
-  uint8_t data = 0;
-  
-  /* Initialize ST7735 low level bus layer -----------------------------------*/
-  LCD_IO_Init();
-  /* Out of sleep mode, 0 args, no delay */
-  st7735_WriteReg(LCD_REG_17, 0x00); 
-  /* Frame rate ctrl - normal mode, 3 args:Rate = fosc/(1x2+40) * (LINE+2C+2D)*/
-  LCD_IO_WriteReg(LCD_REG_177);
-  data = 0x01;
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = 0x2C;
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = 0x2D;
-  LCD_IO_WriteMultipleData(&data, 1);
-  /* Frame rate control - idle mode, 3 args:Rate = fosc/(1x2+40) * (LINE+2C+2D) */    
-  st7735_WriteReg(LCD_REG_178, 0x01);
-  st7735_WriteReg(LCD_REG_178, 0x2C);
-  st7735_WriteReg(LCD_REG_178, 0x2D);
-  /* Frame rate ctrl - partial mode, 6 args: Dot inversion mode, Line inversion mode */ 
-  st7735_WriteReg(LCD_REG_179, 0x01);
-  st7735_WriteReg(LCD_REG_179, 0x2C);
-  st7735_WriteReg(LCD_REG_179, 0x2D);
-  st7735_WriteReg(LCD_REG_179, 0x01);
-  st7735_WriteReg(LCD_REG_179, 0x2C);
-  st7735_WriteReg(LCD_REG_179, 0x2D);
-  /* Display inversion ctrl, 1 arg, no delay: No inversion */
-  st7735_WriteReg(LCD_REG_180, 0x07);
-  /* Power control, 3 args, no delay: -4.6V , AUTO mode */
-  st7735_WriteReg(LCD_REG_192, 0xA2);
-  st7735_WriteReg(LCD_REG_192, 0x02);
-  st7735_WriteReg(LCD_REG_192, 0x84);
-  /* Power control, 1 arg, no delay: VGH25 = 2.4C VGSEL = -10 VGH = 3 * AVDD */
-  st7735_WriteReg(LCD_REG_193, 0xC5);
-  /* Power control, 2 args, no delay: Opamp current small, Boost frequency */ 
-  st7735_WriteReg(LCD_REG_194, 0x0A);
-  st7735_WriteReg(LCD_REG_194, 0x00);
-  /* Power control, 2 args, no delay: BCLK/2, Opamp current small & Medium low */  
-  st7735_WriteReg(LCD_REG_195, 0x8A);
-  st7735_WriteReg(LCD_REG_195, 0x2A);
-  /* Power control, 2 args, no delay */
-  st7735_WriteReg(LCD_REG_196, 0x8A);
-  st7735_WriteReg(LCD_REG_196, 0xEE);
-  /* Power control, 1 arg, no delay */
-  st7735_WriteReg(LCD_REG_197, 0x0E);
-  /* Don't invert display, no args, no delay */
-  LCD_IO_WriteReg(LCD_REG_32);
-  /* Set color mode, 1 arg, no delay: 16-bit color */
-  st7735_WriteReg(LCD_REG_58, 0x05);
-  /* Column addr set, 4 args, no delay: XSTART = 0, XEND = 127 */
-  LCD_IO_WriteReg(LCD_REG_42);
-  data = 0x00;
-  LCD_IO_WriteMultipleData(&data, 1);
-  LCD_IO_WriteMultipleData(&data, 1);
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = 0x7F;
-  LCD_IO_WriteMultipleData(&data, 1);
-  /* Row addr set, 4 args, no delay: YSTART = 0, YEND = 159 */
-  LCD_IO_WriteReg(LCD_REG_43);
-  data = 0x00;
-  LCD_IO_WriteMultipleData(&data, 1);
-  LCD_IO_WriteMultipleData(&data, 1);
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = 0x9F;
-  LCD_IO_WriteMultipleData(&data, 1);
-  /* Magical unicorn dust, 16 args, no delay */
-  st7735_WriteReg(LCD_REG_224, 0x02); 
-  st7735_WriteReg(LCD_REG_224, 0x1c);  
-  st7735_WriteReg(LCD_REG_224, 0x07); 
-  st7735_WriteReg(LCD_REG_224, 0x12);
-  st7735_WriteReg(LCD_REG_224, 0x37);  
-  st7735_WriteReg(LCD_REG_224, 0x32);  
-  st7735_WriteReg(LCD_REG_224, 0x29);  
-  st7735_WriteReg(LCD_REG_224, 0x2d);
-  st7735_WriteReg(LCD_REG_224, 0x29);  
-  st7735_WriteReg(LCD_REG_224, 0x25);  
-  st7735_WriteReg(LCD_REG_224, 0x2B);  
-  st7735_WriteReg(LCD_REG_224, 0x39);  
-  st7735_WriteReg(LCD_REG_224, 0x00);  
-  st7735_WriteReg(LCD_REG_224, 0x01);  
-  st7735_WriteReg(LCD_REG_224, 0x03);  
-  st7735_WriteReg(LCD_REG_224, 0x10);
-  /* Sparkles and rainbows, 16 args, no delay */
-  st7735_WriteReg(LCD_REG_225, 0x03);
-  st7735_WriteReg(LCD_REG_225, 0x1d);  
-  st7735_WriteReg(LCD_REG_225, 0x07);  
-  st7735_WriteReg(LCD_REG_225, 0x06);
-  st7735_WriteReg(LCD_REG_225, 0x2E);  
-  st7735_WriteReg(LCD_REG_225, 0x2C);  
-  st7735_WriteReg(LCD_REG_225, 0x29);  
-  st7735_WriteReg(LCD_REG_225, 0x2D);
-  st7735_WriteReg(LCD_REG_225, 0x2E);  
-  st7735_WriteReg(LCD_REG_225, 0x2E);  
-  st7735_WriteReg(LCD_REG_225, 0x37);  
-  st7735_WriteReg(LCD_REG_225, 0x3F);  
-  st7735_WriteReg(LCD_REG_225, 0x00);  
-  st7735_WriteReg(LCD_REG_225, 0x00);  
-  st7735_WriteReg(LCD_REG_225, 0x02);  
-  st7735_WriteReg(LCD_REG_225, 0x10);
-  /* Normal display on, no args, no delay */
-  st7735_WriteReg(LCD_REG_19, 0x00);
-  /* Main screen turn on, no delay */
-  st7735_WriteReg(LCD_REG_41, 0x00);
-  /* Memory access control: MY = 1, MX = 1, MV = 0, ML = 0 */
-  st7735_WriteReg(LCD_REG_54, 0xC0);
-}
-
-/**
-  * @brief  Enables the Display.
-  * @param  None
-  * @retval None
-  */
-void st7735_DisplayOn(void)
-{
-  uint8_t data = 0;
-  LCD_IO_WriteReg(LCD_REG_19);
-  LCD_Delay(10);
-  LCD_IO_WriteReg(LCD_REG_41);
-  LCD_Delay(10);
-  LCD_IO_WriteReg(LCD_REG_54);
-  data = 0xC0;
-  LCD_IO_WriteMultipleData(&data, 1);
-}
-
-/**
-  * @brief  Disables the Display.
-  * @param  None
-  * @retval None
-  */
-void st7735_DisplayOff(void)
-{
-  uint8_t data = 0;
-  LCD_IO_WriteReg(LCD_REG_19);
-  LCD_Delay(10);
-  LCD_IO_WriteReg(LCD_REG_40);
-  LCD_Delay(10);
-  LCD_IO_WriteReg(LCD_REG_54);
-  data = 0xC0;
-  LCD_IO_WriteMultipleData(&data, 1);
-}
-
-/**
-  * @brief  Sets Cursor position.
-  * @param  Xpos: specifies the X position.
-  * @param  Ypos: specifies the Y position.
-  * @retval None
-  */
-void st7735_SetCursor(uint16_t Xpos, uint16_t Ypos)
-{
-  uint8_t data = 0;
-  LCD_IO_WriteReg(LCD_REG_42);
-  data = (Xpos) >> 8;
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = (Xpos) & 0xFF;
-  LCD_IO_WriteMultipleData(&data, 1);
-  LCD_IO_WriteReg(LCD_REG_43); 
-  data = (Ypos) >> 8;
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = (Ypos) & 0xFF;
-  LCD_IO_WriteMultipleData(&data, 1);
-  LCD_IO_WriteReg(LCD_REG_44);
-}
-
-/**
-  * @brief  Writes pixel.   
-  * @param  Xpos: specifies the X position.
-  * @param  Ypos: specifies the Y position.
-  * @param  RGBCode: the RGB pixel color
-  * @retval None
-  */
-void st7735_WritePixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGBCode)
-{
-  uint8_t data = 0;
-  if((Xpos >= ST7735_LCD_PIXEL_WIDTH) || (Ypos >= ST7735_LCD_PIXEL_HEIGHT)) 
-  {
-    return;
-  }
-  
-  /* Set Cursor */
-  st7735_SetCursor(Xpos, Ypos);
-  
-  data = RGBCode >> 8;
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = RGBCode;
-  LCD_IO_WriteMultipleData(&data, 1);
-}  
-
-
-/**
-  * @brief  Writes to the selected LCD register.
-  * @param  LCDReg: Address of the selected register.
-  * @param  LCDRegValue: value to write to the selected register.
-  * @retval None
-  */
-void st7735_WriteReg(uint8_t LCDReg, uint8_t LCDRegValue)
-{
-  LCD_IO_WriteReg(LCDReg);
-  LCD_IO_WriteMultipleData(&LCDRegValue, 1);
-}
-
-/**
-  * @brief  Sets a display window
-  * @param  Xpos:   specifies the X bottom left position.
-  * @param  Ypos:   specifies the Y bottom left position.
-  * @param  Height: display window height.
-  * @param  Width:  display window width.
-  * @retval None
-  */
-void st7735_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  uint8_t data = 0;
-  /* Column addr set, 4 args, no delay: XSTART = Xpos, XEND = (Xpos + Width - 1) */
-  LCD_IO_WriteReg(LCD_REG_42);
-  data = (Xpos) >> 8;
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = (Xpos) & 0xFF;
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = (Xpos + Width - 1) >> 8;
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = (Xpos + Width - 1) & 0xFF;
-  LCD_IO_WriteMultipleData(&data, 1);
-  /* Row addr set, 4 args, no delay: YSTART = Ypos, YEND = (Ypos + Height - 1) */
-  LCD_IO_WriteReg(LCD_REG_43);
-  data = (Ypos) >> 8;
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = (Ypos) & 0xFF;
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = (Ypos + Height - 1) >> 8;
-  LCD_IO_WriteMultipleData(&data, 1);
-  data = (Ypos + Height - 1) & 0xFF;
-  LCD_IO_WriteMultipleData(&data, 1);
-}
-
-/**
-  * @brief  Draws horizontal line.
-  * @param  RGBCode: Specifies the RGB color   
-  * @param  Xpos: specifies the X position.
-  * @param  Ypos: specifies the Y position.
-  * @param  Length: specifies the line length.  
-  * @retval None
-  */
-void st7735_DrawHLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint8_t counter = 0;
-  
-  if(Xpos + Length > ST7735_LCD_PIXEL_WIDTH) return;
-  
-  /* Set Cursor */
-  st7735_SetCursor(Xpos, Ypos);
-  
-  for(counter = 0; counter < Length; counter++)
-  {
-    ArrayRGB[counter] = RGBCode;
-  }
-  LCD_IO_WriteMultipleData((uint8_t*)&ArrayRGB[0], Length * 2);
-}
-
-/**
-  * @brief  Draws vertical line.
-  * @param  RGBCode: Specifies the RGB color   
-  * @param  Xpos: specifies the X position.
-  * @param  Ypos: specifies the Y position.
-  * @param  Length: specifies the line length.  
-  * @retval None
-  */
-void st7735_DrawVLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint8_t counter = 0;
-  
-  if(Ypos + Length > ST7735_LCD_PIXEL_HEIGHT) return;
-  for(counter = 0; counter < Length; counter++)
-  {
-    st7735_WritePixel(Xpos, Ypos + counter, RGBCode);
-  }   
-}
-
-/**
-  * @brief  Gets the LCD pixel Width.
-  * @param  None
-  * @retval The Lcd Pixel Width
-  */
-uint16_t st7735_GetLcdPixelWidth(void)
-{
-  return ST7735_LCD_PIXEL_WIDTH;
-}
-
-/**
-  * @brief  Gets the LCD pixel Height.
-  * @param  None
-  * @retval The Lcd Pixel Height
-  */
-uint16_t st7735_GetLcdPixelHeight(void)
-{                          
-  return ST7735_LCD_PIXEL_HEIGHT;
-}
-
-/**
-  * @brief  Displays a bitmap picture loaded in the internal Flash.
-  * @param  BmpAddress: Bmp picture address in the internal Flash.
-  * @retval None
-  */
-void st7735_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp)
-{
-  uint32_t index = 0, size = 0;
-  
-  /* Read bitmap size */
-  size = *(volatile uint16_t *) (pbmp + 2);
-  size |= (*(volatile uint16_t *) (pbmp + 4)) << 16;
-  /* Get bitmap data address offset */
-  index = *(volatile uint16_t *) (pbmp + 10);
-  index |= (*(volatile uint16_t *) (pbmp + 12)) << 16;
-  size = (size - index)/2;
-  pbmp += index;
-  
-  /* Set GRAM write direction and BGR = 0 */
-  /* Memory access control: MY = 0, MX = 1, MV = 0, ML = 0 */
-  st7735_WriteReg(LCD_REG_54, 0x40);
-
-  /* Set Cursor */
-  st7735_SetCursor(Xpos, Ypos);  
- 
-  LCD_IO_WriteMultipleData((uint8_t*)pbmp, size*2);
- 
-  /* Set GRAM write direction and BGR = 0 */
-  /* Memory access control: MY = 1, MX = 1, MV = 0, ML = 0 */
-  st7735_WriteReg(LCD_REG_54, 0xC0);
-}
-
-/**
-* @}
-*/ 
-
-/**
-* @}
-*/ 
-
-/**
-* @}
-*/ 
-
-/**
-* @}
-*/
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
-

+ 0 - 214
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/st7735/st7735.h

@@ -1,214 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    st7735.h
-  * @author  MCD Application Team
-  * @version V1.1.1
-  * @date    24-November-2014
-  * @brief   This file contains all the functions prototypes for the st7735.c
-  *          driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2014 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 __ST7735_H
-#define __ST7735_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif 
-
-/* Includes ------------------------------------------------------------------*/
-#include "../Common/lcd.h"
-
-/** @addtogroup BSP
-  * @{
-  */ 
-
-/** @addtogroup Components
-  * @{
-  */ 
-  
-/** @addtogroup ST7735
-  * @{
-  */
-
-/** @defgroup ST7735_Exported_Types
-  * @{
-  */
-   
-/**
-  * @}
-  */ 
-
-/** @defgroup ST7735_Exported_Constants
-  * @{
-  */
-      
-/** 
-  * @brief  ST7735 Size  
-  */  
-#define  ST7735_LCD_PIXEL_WIDTH    ((uint16_t)128)
-#define  ST7735_LCD_PIXEL_HEIGHT   ((uint16_t)160)
-
-/** 
-  * @brief  ST7735 Registers  
-  */ 
-#define  LCD_REG_0               0x00 /* No Operation: NOP */
-#define  LCD_REG_1               0x01 /* Software reset: SWRESET */
-#define  LCD_REG_4               0x04 /* Read Display ID: RDDID */
-#define  LCD_REG_9               0x09 /* Read Display Statu: RDDST */
-#define  LCD_REG_10              0x0A /* Read Display Power: RDDPM */
-#define  LCD_REG_11              0x0B /* Read Display: RDDMADCTL */
-#define  LCD_REG_12              0x0C /* Read Display Pixel: RDDCOLMOD */  
-#define  LCD_REG_13              0x0D /* Read Display Image: RDDIM */
-#define  LCD_REG_14              0x0E /* Read Display Signal: RDDSM */                           
-#define  LCD_REG_16              0x10 /* Sleep in & booster off: SLPIN */ 
-#define  LCD_REG_17              0x11 /* Sleep out & booster on: SLPOUT */
-#define  LCD_REG_18              0x12 /* Partial mode on: PTLON */ 
-#define  LCD_REG_19              0x13 /* Partial off (Normal): NORON */
-#define  LCD_REG_32              0x20 /* Display inversion off: INVOFF */
-#define  LCD_REG_33              0x21 /* Display inversion on: INVON */
-#define  LCD_REG_38              0x26 /* Gamma curve select: GAMSET */
-#define  LCD_REG_40              0x28 /* Display off: DISPOFF */
-#define  LCD_REG_41              0x29 /* Display on: DISPON */
-#define  LCD_REG_42              0x2A /* Column address set: CASET */ 
-#define  LCD_REG_43              0x2B /* Row address set: RASET */
-#define  LCD_REG_44              0x2C /* Memory write: RAMWR */  
-#define  LCD_REG_45              0x2D /* LUT for 4k,65k,262k color: RGBSET */
-#define  LCD_REG_46              0x2E /* Memory read: RAMRD*/
-#define  LCD_REG_48              0x30 /* Partial start/end address set: PTLAR */ 
-#define  LCD_REG_52              0x34 /* Tearing effect line off: TEOFF */ 
-#define  LCD_REG_53              0x35 /* Tearing effect mode set & on: TEON */ 
-#define  LCD_REG_54              0x36 /* Memory data access control: MADCTL */ 
-#define  LCD_REG_56              0x38 /* Idle mode off: IDMOFF */ 
-#define  LCD_REG_57              0x39 /* Idle mode on: IDMON */ 
-#define  LCD_REG_58              0x3A /* Interface pixel format: COLMOD */
-#define  LCD_REG_177             0xB1 /* In normal mode (Full colors): FRMCTR1 */
-#define  LCD_REG_178             0xB2 /* In Idle mode (8-colors): FRMCTR2 */   
-#define  LCD_REG_179             0xB3 /* In partial mode + Full colors: FRMCTR3 */ 
-#define  LCD_REG_180             0xB4 /* Display inversion control: INVCTR */
-#define  LCD_REG_192             0xC0 /* Power control setting: PWCTR1 */ 
-#define  LCD_REG_193             0xC1 /* Power control setting: PWCTR2 */ 
-#define  LCD_REG_194             0xC2 /* In normal mode (Full colors): PWCTR3 */
-#define  LCD_REG_195             0xC3 /* In Idle mode (8-colors): PWCTR4 */ 
-#define  LCD_REG_196             0xC4 /* In partial mode + Full colors: PWCTR5 */ 
-#define  LCD_REG_197             0xC5 /* VCOM control 1: VMCTR1 */ 
-#define  LCD_REG_199             0xC7 /* Set VCOM offset control: VMOFCTR */ 
-#define  LCD_REG_209             0xD1 /* Set LCM version code: WRID2 */ 
-#define  LCD_REG_210             0xD2 /* Customer Project code: WRID3 */ 
-#define  LCD_REG_217             0xD9 /* NVM control status: NVCTR1 */
-#define  LCD_REG_218             0xDA /* Read ID1: RDID1 */ 
-#define  LCD_REG_219             0xDB /* Read ID2: RDID2 */ 
-#define  LCD_REG_220             0xDC /* Read ID3: RDID3 */ 
-#define  LCD_REG_222             0xDE /* NVM Read Command: NVCTR2 */ 
-#define  LCD_REG_223             0xDF /* NVM Write Command: NVCTR3 */
-#define  LCD_REG_224             0xE0 /* Set Gamma adjustment (+ polarity): GAMCTRP1 */                          
-#define  LCD_REG_225             0xE1 /* Set Gamma adjustment (- polarity): GAMCTRN1 */ 
-
-/** 
-  * @brief  LCD Lines depending on the chosen fonts.  
-  */
-#define LCD_LINE_0               LINE(0)
-#define LCD_LINE_1               LINE(1)
-#define LCD_LINE_2               LINE(2)
-#define LCD_LINE_3               LINE(3)
-#define LCD_LINE_4               LINE(4)
-#define LCD_LINE_5               LINE(5)
-#define LCD_LINE_6               LINE(6)
-#define LCD_LINE_7               LINE(7)
-#define LCD_LINE_8               LINE(8)
-#define LCD_LINE_9               LINE(9)
-#define LCD_LINE_10              LINE(10)
-#define LCD_LINE_11              LINE(11)
-#define LCD_LINE_12              LINE(12)
-#define LCD_LINE_13              LINE(13)
-#define LCD_LINE_14              LINE(14)
-#define LCD_LINE_15              LINE(15)
-#define LCD_LINE_16              LINE(16)
-#define LCD_LINE_17              LINE(17)
-#define LCD_LINE_18              LINE(18)
-#define LCD_LINE_19              LINE(19) 
-   
-/**
-  * @}
-  */
-
-/** @defgroup ADAFRUIT_SPI_LCD_Exported_Functions
-  * @{
-  */ 
-void     st7735_Init(void);
-uint16_t st7735_ReadID(void);
-
-void     st7735_DisplayOn(void);
-void     st7735_DisplayOff(void);
-void     st7735_SetCursor(uint16_t Xpos, uint16_t Ypos);
-void     st7735_WritePixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGBCode);
-void     st7735_WriteReg(uint8_t LCDReg, uint8_t LCDRegValue);
-uint8_t  st7735_ReadReg(uint8_t LCDReg);
-
-void     st7735_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-void     st7735_DrawHLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void     st7735_DrawVLine(uint16_t RGBCode, uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-
-uint16_t st7735_GetLcdPixelWidth(void);
-uint16_t st7735_GetLcdPixelHeight(void);
-void     st7735_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp);
-
-/* LCD driver structure */
-extern LCD_DrvTypeDef   st7735_drv;
-
-/* LCD IO functions */
-void     LCD_IO_Init(void);
-void     LCD_IO_WriteMultipleData(uint8_t *pData, uint32_t Size);
-void     LCD_IO_WriteReg(uint8_t Reg);
-void     LCD_Delay(uint32_t delay);
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ST7735_H */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 181
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/stlm75/Release_Notes.html

@@ -1,181 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="File-List" href="Library_files/filelist.xml">
-<link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]-->
-
-
-
-<title>Release Notes for STM32 STLM75 Components Drivers</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-</style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-<meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="padding: 0cm;" valign="top">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="vertical-align: top;">
-<p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-</td>
-</tr>
-<tr style="">
-<td style="padding: 1.5pt;">
-<h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for STLM75 Component Driver</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2014 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-<table style="width: 675pt;" class="MsoNormalTable" border="0" cellpadding="0" width="900">
-<tbody>
-<tr style="">
-<td style="padding: 0cm;" valign="top"><span style="font-size: 10pt; font-family: Verdana;"></span>
-<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2>
-<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.1
-/ 24-November-2014 <o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;">stlm75.h: change&nbsp;</span><span style="font-family: Verdana; font-size: 10pt;">"\" by&nbsp;</span><span style="font-family: Verdana; font-size: 10pt;">"/" in the include path to fix compilation issue under Linux</span><span style="font-family: Verdana; font-size: 10pt;"></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0
-/ 06-May-2014 <o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<ul style="list-style-type: square;"><li><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;">First official release of STLM75 Temperature Sensor Component driver</span></li></ul><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span><br>
-</h2>
-<div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistribution
-and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-</font>
-<ol>
-<li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-of source code must retain the above copyright notice, this list of
-conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li>
-<li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the
-documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li>
-<li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the
-name of STMicroelectronics nor the names of its contributors may be
-used to endorse or promote products derived </span><br>
-</font> </li>
-</ol>
-<font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-from this software without specific prior written permission.</span><br>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS
-SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGE.</span></font> </div>
-<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black;"><o:p></o:p></span></p>
-<b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-<div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-<hr align="center" size="2" width="100%"></span></div>
-<div style="margin-left: 120px;"><span style="font-size: 10pt; font-family: Verdana; color: black;">For
-complete documentation on </span><span style="font-size: 10pt; font-family: Verdana;">STM32<span style="color: black;">&nbsp;Microcontrollers
-visit </span><u><span style="color: blue;"><a href="http://www.st.com/internet/mcu/class/1734.jsp" target="_blank">www.st.com/STM32</a></span></u></span></div>
-</td>
-</tr>
-<tr>
-<td style="padding: 0cm;" valign="top"></td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-</body></html>

+ 0 - 198
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/stlm75/stlm75.c

@@ -1,198 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stlm75.c
-  * @author  MCD Application Team
-  * @version V1.0.1
-  * @date    24-November-2014
-  * @brief   This file provides a set of functions needed to manage the STLM75
-  *          Temperature Sensor.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2014 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.
-  *
-  ******************************************************************************
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stlm75.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-
-/** @defgroup STLM75
-  * @brief     This file provides a set of functions needed to drive the 
-  *            STLM75 Temperature Sensor.
-  * @{
-  */
-
-/** @defgroup STLM75_Private_TypesDefinitions
-  * @{
-  */
-
-/**
-  * @}
-  */
-
-/** @defgroup STLM75_Private_Defines
-  * @{
-  */
-
-/**
-  * @}
-  */
-
-/** @defgroup STLM75_Private_Macros
-  * @{
-  */
-
-/**
-  * @}
-  */
-
-/** @defgroup STLM75_Private_Variables
-  * @{
-  */ 
-TSENSOR_DrvTypeDef Stlm75Drv =
-{
-  STLM75_Init,
-  STLM75_IsReady,
-  STLM75_ReadStatus,
-  STLM75_ReadTemp,
-};
-
-/**
-  * @}
-  */
-
-/** @defgroup STLM75_Private_FunctionPrototypes
-  * @{
-  */
-
-/**
-  * @}
-  */
-
-/** @defgroup STLM75_Private_Functions
-  * @{
-  */
-
-/**
-  * @brief  Set STLM75 Initialization.
-  * @param  DeviceAddr : Device ID address.
-  * @param  pInitStruct: pointer to a STLM75_InitTypeDef structure 
-  *         that contains the configuration setting for the STLM75.
-  * @retval None
-  */
-void STLM75_Init(uint16_t DeviceAddr, TSENSOR_InitTypeDef *pInitStruct)
-{  
-  uint8_t confreg = 0;
-  uint16_t tempreg = 0;
-
-  /* Set the Configuration Register */
-  confreg = (uint8_t)(pInitStruct->AlertMode | pInitStruct->ConversionMode);
-  TSENSOR_IO_Write(DeviceAddr, &confreg, LM75_REG_CONF, 1);
-
-  /* Set the Temperature Registers */
-  /* Keep the sign bit and shift the temperature value (as given value is integer, the 0.5 digit is not set) */
-  tempreg = (((pInitStruct->TemperatureLimitHigh & 0x007F) << 8) | (pInitStruct->TemperatureLimitHigh & 0x8000));
-  TSENSOR_IO_Write(DeviceAddr, (uint8_t*)(&tempreg), LM75_REG_TOS, 2);
-
-  tempreg = (((pInitStruct->TemperatureLimitLow & 0x007F) << 8) | (pInitStruct->TemperatureLimitLow & 0x8000));
-  TSENSOR_IO_Write(DeviceAddr, (uint8_t*)(&tempreg), LM75_REG_THYS, 2);
-}
-
-/**
-  * @brief  Read ID address of STLM75
-  * @param  DeviceAddr : Device ID address.
-  * @param  Trials: Number of trials
-  * @retval ID name
-  */
-uint8_t STLM75_IsReady(uint16_t DeviceAddr, uint32_t Trials)
-{
-  /* Configure the low level interface ---------------------------------------*/
-  TSENSOR_IO_Init();
-  
-  /* Check is Temperature Sensor is Ready to use */
-  return TSENSOR_IO_IsDeviceReady(DeviceAddr, Trials);
-}
-
-/**
-  * @brief  Read The Temperature Sensor Status
-  * @param  DeviceAddr : Device ID address.
-  * @retval Status
-  */
-uint8_t STLM75_ReadStatus(uint16_t DeviceAddr)
-{
-  uint8_t tmp = 0;
-
-  /* Read Status register */
-  TSENSOR_IO_Read(DeviceAddr, &tmp, LM75_REG_CONF, 1);
-
-  /* Return Temperature Sensor Status */
-  return (uint8_t)(tmp);
-}
-
-/**
-  * @brief  Read ID address of STLM75
-  * @param  DeviceAddr : Device ID address.
-  * @retval ID name
-  */
-uint16_t STLM75_ReadTemp(uint16_t DeviceAddr)
-{
-  uint16_t tempreg = 0;
-  uint16_t tmp = 0;
-
-  /* Read Temperature registers */
-  TSENSOR_IO_Read(DeviceAddr, (uint8_t*)(&tempreg), LM75_REG_TEMP, 2);
-  
-  tmp = ((tempreg & 0x00FF) << 8) | ((tempreg & 0xFF00) >> 8);
-  tempreg = (((tmp & 0x7F80) >> 7) | (tmp & 0x8000));
-
-  /* Return Temperature value */
-  return (tempreg);
-}
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/     

+ 0 - 144
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/Components/stlm75/stlm75.h

@@ -1,144 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stlm75.h
-  * @author  MCD Application Team
-  * @version V1.0.1
-  * @date    24-November-2014
-  * @brief   This file contains all the functions prototypes for the stlm75.c
-  *          temperature sensor driver.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2014 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 __STLM75_H
-#define __STLM75_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "../Common/tsensor.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup Components
-  * @{
-  */
-
-/** @addtogroup STLM75
-  * @{
-  */
-  
-/** @defgroup STLM75_Exported_Constants
-  * @{
-  */
-/******************************************************************************/
-/*************************** START REGISTER MAPPING  **************************/
-/******************************************************************************/
-
-/***************************** Read Access Only *******************************/
-#define LM75_REG_TEMP       0x00  /*!< Temperature Register of LM75 */
-
-/***************************** Read/Write Access ******************************/
-#define LM75_REG_CONF       0x01  /*!< Configuration Register of LM75 */
-#define LM75_REG_THYS       0x02  /*!< Temperature Register of LM75 */
-#define LM75_REG_TOS        0x03  /*!< Over-temp Shutdown threshold Register of LM75 */
-
-/******************************************************************************/
-/**************************** END REGISTER MAPPING  ***************************/
-/******************************************************************************/
-/** @defgroup Conversion_Mode_Selection 
-  * @{
-  */
-#define STLM75_CONTINUOUS_MODE                  ((uint8_t)0x00)
-#define STLM75_ONE_SHOT_MODE                    ((uint8_t)0x01)
-/**
-  * @}
-  */
-
-/** @defgroup Operation_Mode 
-  * @{
-  */
-#define STLM75_COMPARATOR_MODE                  ((uint8_t)0x00)
-#define STLM75_INTERRUPT_MODE                   ((uint8_t)0x02)
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
- 
-/** @defgroup STLM75_Exported_Functions
-  * @{
-  */
-/* Sensor Configuration Functions */ 
-void                      STLM75_Init(uint16_t DeviceAddr, TSENSOR_InitTypeDef *pInitStruct);
-uint8_t                   STLM75_IsReady(uint16_t DeviceAddr, uint32_t Trials);
-/* Sensor Request Functions */
-uint8_t                   STLM75_ReadStatus(uint16_t DeviceAddr);
-uint16_t                  STLM75_ReadTemp(uint16_t DeviceAddr);
-
-/* Temperature Sensor driver structure */
-extern TSENSOR_DrvTypeDef Stlm75Drv;
-
-/* Temperature Sensor IO functions */
-void                      TSENSOR_IO_Init(void);
-void                      TSENSOR_IO_Write(uint16_t DevAddress, uint8_t* pBuffer, uint8_t WriteAddr, uint16_t Length);
-void                      TSENSOR_IO_Read(uint16_t DevAddress, uint8_t* pBuffer, uint8_t ReadAddr, uint16_t Length);
-uint16_t                  TSENSOR_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
- }
-#endif
-  
-#endif /* __STTS751_H */
-
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 

+ 0 - 583
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/Release_Notes.html

@@ -1,583 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="File-List" href="Library_files/filelist.xml">
-<link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]-->
-
-
-
-<title>Release Notes for STM323072B_EVAL Evaluation Board Drivers</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-</style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-<meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="padding: 0cm;" valign="top">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="vertical-align: top;">
-<p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-</td>
-</tr>
-<tr style="">
-<td style="padding: 1.5pt;">
-<h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for STM32072B-EVAL Evaluation Board Drivers</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2016 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" width="900">
-<tbody>
-<tr style="">
-<td style="padding: 0cm;" valign="top">
-<span style="font-family: &quot;Times New Roman&quot;;">
-</span>
-<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.8 / 25-August-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-family: Verdana,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13.33px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline ! important; white-space: normal; widows: 1;">Minor updates in STM32072B_EVAL_BSP_User_Manual.chm documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.7 / 7-April-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Updated BSP driver documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.6 / 04-November-2016 <o:p></o:p></span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes</span></u></b></p>
-<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Removed BSP/CEC driver : refer to HAL driver for CEC.</span><span style="font-size: 10pt; font-family: Verdana;"></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.5 / 27-May-2016 <o:p></o:p></span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes</span></u></b></p>
-<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Aligned BSP drivers to use latest BSP components</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li><li class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">Updated BSP driver to fix issue with SD card 128MB.<br></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.4 / 29-January-2016 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;">Updated GPIO Output Speed literals naming to ensure HAL full compatibility.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.3 / 26-June-2015 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;">Update CHM User Manual for BSP/STM32072B_EVAL.</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Complete HAL API alignment (renaming).</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Replace HAL_CEC_ErrorTypeDef by uint32_t.<br></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.1 / 26-Sept-2014</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;">light update to correct compilation warning</span> under TRUE Studio<span style="font-family: Verdana; font-size: 10pt;"> </span>
-</li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.0 / 01-Aug-2014 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;">Compatibility with LCD 
-Component</span><span style="font-family: Verdana; font-size: 10pt;"> driver 
-update: </span>
-</li><ul><li><span style="font-family: Verdana; font-size: 10pt;">Change LCD_IO_WriteData 
-to LCD_IO_WriteMultipleData</span>
-</li><li><small><span style="font-family: Verdana;">LCD IO needs to treat also 1 
-byte.</span></small></li></ul></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.0 / 20-May-2014 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-size: 10pt; font-family: Verdana;">Major update
-based on STM32Cube specification: drivers architecture and APIs
-modified vs. V1.0.0 and thus the 2 versions are not compatible.<br>
-</span></li><li style="font-weight: bold;"><span style="font-size: 10pt; font-family: Verdana;">This version has to be used only with </span><span style="font-size: 10pt; font-family: Verdana;">STM32CubeF0</span><span style="font-size: 10pt; font-family: Verdana;"> based development</span></li></ul><ul style="margin-top: 0cm;" type="square">
-<ul>
-</ul>
-</ul>
-<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 167px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0
-/ 16-January-2014<o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<ul style="margin-top: 0cm;" type="square">
-<li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-family: Verdana; font-size: 10pt;">First
-official version of the STM32072B-EVAL evaluation board drivers.</span></li>
-</ul>
-<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span></h2>
-<div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistribution
-and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-</font>
-<ol><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-of source code must retain the above copyright notice, this list of
-conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the
-documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the
-name of STMicroelectronics nor the names of its contributors may be
-used to endorse or promote products derived</span></font><small><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> from this software without specific prior written permission.</span></small><br></li></ol><font size="-1">
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font> </div>
-<span style="font-size: 10pt; color: black; font-family: 'Verdana','sans-serif';"></span><b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-<div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-<hr align="center" size="2" width="100%"></span></div>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt; text-align: center;" align="center"><span style="font-size: 10pt; color: black; font-family: 'Verdana','sans-serif';">For
-complete documentation on </span><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';">STM32<span style="color: black;"> Microcontrollers visit&nbsp;</span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><u><span style="color: blue;"></span></u></span><u><a href="http://www.st.com/STM32" target="_blank">www.st.com/STM32</a></u><span style="font-size: 10pt; font-family: Verdana;"><a href="http://www.st.com/internet/mcu/family/141.jsp" target="_blank"><u><span style="color: blue;"></span></u></a></span><span style="color: black;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-</body></html>

+ 0 - 1394
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval.c

@@ -1,1394 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32072b_eval.c
-  * @author  MCD Application Team
-  * @brief   This file provides: a set of firmware functions to manage Leds,
-  *          push-button and COM ports
-  ******************************************************************************
-  * @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.
-  *
-  ******************************************************************************
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32072b_eval.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32072B_EVAL
-  * @{
-  */
-
-/** @addtogroup STM32072B_EVAL_Common 
-  * @brief This file provides firmware functions to manage Leds, push-buttons, 
-  *        COM ports, SD card on SPI and temperature sensor (LM75) available on 
-  *        STM32072B-EVAL evaluation board from STMicroelectronics.
-  * @{
-  */ 
-
-/** @defgroup STM32072B_EVAL_Private_Constants Private Constants
-  * @{
-  */ 
-/* LINK LCD */
-#define START_BYTE         0x70
-#define SET_INDEX          0x00
-#define READ_STATUS        0x01
-#define LCD_WRITE_REG      0x02
-#define LCD_READ_REG       0x03
-
-/* LINK SD Card */
-#define SD_DUMMY_BYTE      0xFF    
-#define SD_NO_RESPONSE_EXPECTED  0x80
-
-/**
-  * @brief STM32072B EVAL BSP Driver version number V2.1.8
-  */
-#define __STM32072B_EVAL_BSP_VERSION_MAIN   (0x02) /*!< [31:24] main version */
-#define __STM32072B_EVAL_BSP_VERSION_SUB1   (0x01) /*!< [23:16] sub1 version */
-#define __STM32072B_EVAL_BSP_VERSION_SUB2   (0x08) /*!< [15:8]  sub2 version */
-#define __STM32072B_EVAL_BSP_VERSION_RC     (0x00) /*!< [7:0]  release candidate */ 
-#define __STM32072B_EVAL_BSP_VERSION         ((__STM32072B_EVAL_BSP_VERSION_MAIN << 24)\
-                                             |(__STM32072B_EVAL_BSP_VERSION_SUB1 << 16)\
-                                             |(__STM32072B_EVAL_BSP_VERSION_SUB2 << 8 )\
-                                             |(__STM32072B_EVAL_BSP_VERSION_RC))
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32072B_EVAL_Private_Variables Private Variables
-  * @{
-  */
-/**
-  * @brief LED variables
-  */
-GPIO_TypeDef* LED_PORT[LEDn] = {LED1_GPIO_PORT,
-                                LED2_GPIO_PORT,
-                                LED3_GPIO_PORT,
-                                LED4_GPIO_PORT};
-
-const uint16_t LED_PIN[LEDn] = {LED1_PIN,
-                                LED2_PIN,
-                                LED3_PIN,
-                                LED4_PIN};
-/**
-  * @brief BUTTON variables
-  */
-GPIO_TypeDef* BUTTON_PORT[BUTTONn] = {TAMPER_BUTTON_GPIO_PORT};
-const uint16_t BUTTON_PIN[BUTTONn] = {TAMPER_BUTTON_PIN};
-const uint8_t BUTTON_IRQn[BUTTONn] = {TAMPER_BUTTON_EXTI_IRQn};
-
-/**
-  * @brief JOYSTICK variables
-  */
-GPIO_TypeDef* JOY_PORT[JOYn] = {SEL_JOY_GPIO_PORT,
-                                DOWN_JOY_GPIO_PORT,
-                                LEFT_JOY_GPIO_PORT,
-                                RIGHT_JOY_GPIO_PORT,
-                                UP_JOY_GPIO_PORT};
-
-const uint16_t JOY_PIN[JOYn] = {SEL_JOY_PIN,
-                                DOWN_JOY_PIN,
-                                LEFT_JOY_PIN,
-                                RIGHT_JOY_PIN,
-                                UP_JOY_PIN};
-
-const uint8_t JOY_IRQn[JOYn] = {SEL_JOY_EXTI_IRQn,
-                                DOWN_JOY_EXTI_IRQn,
-                                LEFT_JOY_EXTI_IRQn,
-                                RIGHT_JOY_EXTI_IRQn,
-                                UP_JOY_EXTI_IRQn};
-
-/**
-  * @brief COM variables
-  */
-#ifdef HAL_UART_MODULE_ENABLED
-USART_TypeDef* COM_USART[COMn]  = {EVAL_COM1}; 
-
-GPIO_TypeDef* COM_TX_PORT[COMn] = {EVAL_COM1_TX_GPIO_PORT};
- 
-GPIO_TypeDef* COM_RX_PORT[COMn] = {EVAL_COM1_RX_GPIO_PORT};
-
-const uint16_t COM_TX_PIN[COMn] = {EVAL_COM1_TX_PIN};
-
-const uint16_t COM_RX_PIN[COMn] = {EVAL_COM1_RX_PIN};
-
-const uint16_t COM_TX_AF[COMn]  = {EVAL_COM1_TX_AF};
-
-const uint16_t COM_RX_AF[COMn]  = {EVAL_COM1_RX_AF};
-
-#endif /*HAL_UART_MODULE_ENABLED*/
-
-/**
- * @brief BUS variables
- */
-#if defined(HAL_I2C_MODULE_ENABLED)
-uint32_t I2c1Timeout = EVAL_I2C1_TIMEOUT_MAX;    /*<! Value of Timeout when I2C1 communication fails */
-uint32_t I2c2Timeout = EVAL_I2C2_TIMEOUT_MAX;    /*<! Value of Timeout when I2C2 communication fails */
-I2C_HandleTypeDef heval_I2c1;
-I2C_HandleTypeDef heval_I2c2;
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-uint32_t SpixTimeout = EVAL_SPIx_TIMEOUT_MAX;    /*<! Value of Timeout when SPI communication fails */
-static SPI_HandleTypeDef heval_Spi;
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32072B_EVAL_BUS_Operations_Functions BUS Operations Functions
-  * @{
-  */
-#if defined(HAL_I2C_MODULE_ENABLED)
-/* I2Cx bus function */
-/* Link function for I2C EEPROM, TSENSOR & HDMI_SOURCE peripherals */
-static void               I2C1_Init(void);
-static void               I2C1_Error (void);
-static void               I2C1_MspInit(I2C_HandleTypeDef *hi2c);  
-/* Link function for I2C EEPROM & TSENSOR peripherals */
-static HAL_StatusTypeDef  I2C1_WriteBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length);
-static HAL_StatusTypeDef  I2C1_ReadBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length);
-static HAL_StatusTypeDef  I2C1_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-/* Link function for HDMI_SOURCE peripheral */
-static HAL_StatusTypeDef I2C1_TransmitData(uint8_t *pBuffer, uint16_t Length);
-
-/* Link function for I2C HDMI_SINK peripherals */
-static void              I2C2_Init(void);
-static void              I2C2_Error(void);
-static void              I2C2_MspInit(I2C_HandleTypeDef *hi2c);
-/* Link function for HDMI_SINK peripheral */
-static HAL_StatusTypeDef I2C2_ReceiveData(uint16_t Addr, uint8_t * pBuffer, uint16_t Length);
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_LINK_Operations_Functions LINK Operations Functions
-  * @{
-  */
-
-/* Link functions for EEPROM peripheral */
-void                     EEPROM_IO_Init(void);
-HAL_StatusTypeDef        EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef        EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef        EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-
-/* Link functions for Temperature Sensor peripheral */
-void                     TSENSOR_IO_Init(void);
-void                     TSENSOR_IO_Write(uint16_t DevAddress, uint8_t* pBuffer, uint8_t WriteAddr, uint16_t Length);
-void                     TSENSOR_IO_Read(uint16_t DevAddress, uint8_t* pBuffer, uint8_t ReadAddr, uint16_t Length);
-uint16_t                 TSENSOR_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-
-/* Link functions for CEC peripheral */
-void                     HDMI_CEC_IO_Init(void);
-HAL_StatusTypeDef        HDMI_CEC_IO_WriteData(uint8_t * pBuffer, uint16_t BufferSize);
-HAL_StatusTypeDef        HDMI_CEC_IO_ReadData(uint16_t DevAddress, uint8_t * pBuffer, uint16_t BufferSize);
-#endif /* HAL_I2C_MODULE_ENABLED */
-/**
-  * @}
-  */
-
-/** @addtogroup STM32072B_EVAL_BUS_Operations_Functions
-  * @{
-  */
-  
-#if defined(HAL_SPI_MODULE_ENABLED)
-/* SPIx bus function */
-static void              SPIx_Init(void);
-static void              SPIx_Write(uint8_t Value);
-static void               SPIx_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLegnth);
-static void               SPIx_FlushFifo(void);
-static uint32_t          SPIx_Read(void);
-static void              SPIx_Error (void);
-static void              SPIx_MspInit(SPI_HandleTypeDef *hspi);
-/**
-  * @}
-  */
-
-/** @addtogroup STM32072B_EVAL_LINK_Operations_Functions
-  * @{
-  */  
-/* Link functions for LCD peripheral */
-void                     LCD_IO_Init(void);
-void                     LCD_IO_WriteMultipleData(uint8_t *pData, uint32_t Size);
-void                     LCD_IO_WriteReg(uint8_t Reg);
-uint16_t                 LCD_IO_ReadData(uint16_t RegValue);
-void                     LCD_Delay(uint32_t delay);
-
-/* Link functions for SD Card peripheral */
-void                     SD_IO_Init(void); 
-void                     SD_IO_CSState(uint8_t state);
-void                     SD_IO_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength);
-uint8_t                  SD_IO_WriteByte(uint8_t Data);
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32072B_EVAL_Exported_Functions
-  * @{
-  */ 
-
-/**
-  * @brief  This method returns the STM32F072B EVAL BSP Driver revision
-  * @retval version : 0xXYZR (8bits for each decimal, R for RC)
-  */
-uint32_t BSP_GetVersion(void)
-{
-  return __STM32072B_EVAL_BSP_VERSION;
-}
-
-/**
-  * @brief  Configures LED GPIO.
-  * @param  Led Specifies the Led to be configured. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED1
-  *     @arg LED2
-  *     @arg LED3
-  *     @arg LED4
-  * @retval None
-  */
-void BSP_LED_Init(Led_TypeDef Led)
-{
-  GPIO_InitTypeDef  GPIO_InitStruct;
-  
-  /* Enable the GPIO_LED clock */
-  LEDx_GPIO_CLK_ENABLE(Led);
-
-  /* Configure the GPIO_LED pin */
-  GPIO_InitStruct.Pin = LED_PIN[Led];
-  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStruct.Pull = GPIO_PULLUP;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  
-  HAL_GPIO_Init(LED_PORT[Led], &GPIO_InitStruct);
-  
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_SET);
-}
-
-/**
-  * @brief  Turns selected LED On.
-  * @param  Led Specifies the Led to be set on. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED1
-  *     @arg LED2
-  *     @arg LED3
-  *     @arg LED4  
-  * @retval None
-  */
-void BSP_LED_On(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET);
-}
-
-/**
-  * @brief  Turns selected LED Off.
-  * @param  Led Specifies the Led to be set off. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED1
-  *     @arg LED2
-  *     @arg LED3
-  *     @arg LED4 
-  * @retval None
-  */
-void BSP_LED_Off(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_SET);
-}
-
-/**
-  * @brief  Toggles the selected LED.
-  * @param  Led Specifies the Led to be toggled. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED1
-  *     @arg LED2
-  *     @arg LED3
-  *     @arg LED4  
-  * @retval None
-  */
-void BSP_LED_Toggle(Led_TypeDef Led)
-{
-  HAL_GPIO_TogglePin(LED_PORT[Led], LED_PIN[Led]);
-}
-
-/**
-  * @brief  Configures Tamper Button GPIO or EXTI Line.
-  * @param  Button Button to be configured
-  *   This parameter can be one of the following values:
-  *     @arg BUTTON_TAMPER: Tamper Push Button 
-  * @param  Mode Button mode
-  *   This parameter can be one of the following values:
-  *     @arg BUTTON_MODE_GPIO: Button will be used as simple IO 
-  *     @arg BUTTON_MODE_EXTI: Button will be connected to EXTI line
-  *                            with interrupt generation capability
-  * @retval None
-  */
-void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Mode)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-
-  /* Enable the Tamper Clock */
-  TAMPERx_GPIO_CLK_ENABLE(Button);
-
-  GPIO_InitStruct.Pin = BUTTON_PIN[Button];
-  GPIO_InitStruct.Pull = GPIO_PULLDOWN;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-
-  if (Mode == BUTTON_MODE_GPIO)
-  {
-    /* Configure Button pin as input */
-    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-
-    HAL_GPIO_Init(BUTTON_PORT[Button], &GPIO_InitStruct);
-  }
-
-  if (Mode == BUTTON_MODE_EXTI)
-  {
-    /* Configure Button pin as input with External interrupt */
-    GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
-    HAL_GPIO_Init(BUTTON_PORT[Button], &GPIO_InitStruct);
-
-    /* Enable and set Button EXTI Interrupt to the lowest priority */
-    HAL_NVIC_SetPriority((IRQn_Type)(BUTTON_IRQn[Button]), 0x03, 0x00);
-    HAL_NVIC_EnableIRQ((IRQn_Type)(BUTTON_IRQn[Button]));
-  }
-}
-
-/**
-  * @brief  Returns the selected button state.
-  * @param  Button Button to be checked.
-  *   This parameter can be one of the following values:
-  *     @arg BUTTON_TAMPER: Tamper Push Button
-  * @retval The Button GPIO pin value
-  */
-uint32_t BSP_PB_GetState(Button_TypeDef Button)
-{
-  return HAL_GPIO_ReadPin(BUTTON_PORT[Button], BUTTON_PIN[Button]);
-}
-
-/**
-  * @brief  Configures joystick GPIO and EXTI modes.
-  * @param  Joy_Mode Button mode.
-  *    This parameter can be one of the following values:
-  *      @arg  JOY_MODE_GPIO: Joystick pins will be used as simple IOs
-  *      @arg  JOY_MODE_EXTI: Joystick pins will be connected to EXTI line 
-  *                                 with interrupt generation capability  
-  * @retval HAL_OK: if all initializations are OK. Other value if error.
-  */
-uint8_t BSP_JOY_Init(JOYMode_TypeDef Joy_Mode)
-{
-  JOYState_TypeDef joykey;
-  GPIO_InitTypeDef GPIO_InitStruct;
-
-  /* Initialized the Joystick. */
-  for(joykey = JOY_SEL; joykey < (JOY_SEL+JOYn) ; joykey++)
-  {
-    /* Enable the JOY clock */
-    JOYx_GPIO_CLK_ENABLE(joykey);
-
-    GPIO_InitStruct.Pin = JOY_PIN[joykey];
-    GPIO_InitStruct.Pull = GPIO_PULLDOWN;
-    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-
-    if (Joy_Mode == JOY_MODE_GPIO)
-    {
-      /* Configure Joy pin as input */
-      GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-      HAL_GPIO_Init(JOY_PORT[joykey], &GPIO_InitStruct);
-    }
-
-    if (Joy_Mode == JOY_MODE_EXTI)
-    {
-      /* Configure Joy pin as input with External interrupt */
-      GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
-      HAL_GPIO_Init(JOY_PORT[joykey], &GPIO_InitStruct);
-
-      /* Enable and set Joy EXTI Interrupt to the lowest priority */
-      HAL_NVIC_SetPriority((IRQn_Type)(JOY_IRQn[joykey]), 0x03, 0x00);
-      HAL_NVIC_EnableIRQ((IRQn_Type)(JOY_IRQn[joykey]));
-    }
-  }
-  
-  return HAL_OK;
-}
-
-/**
-  * @brief  Returns the current joystick status.
-  * @retval Code of the joystick key pressed
-  *          This code can be one of the following values:
-  *            @arg  JOY_NONE
-  *            @arg  JOY_SEL
-  *            @arg  JOY_DOWN
-  *            @arg  JOY_LEFT
-  *            @arg  JOY_RIGHT
-  *            @arg  JOY_UP
-  */
-JOYState_TypeDef BSP_JOY_GetState(void)
-{
-  JOYState_TypeDef joykey;
-
-  for (joykey = JOY_SEL; joykey < (JOY_SEL + JOYn) ; joykey++)
-  {
-    if (HAL_GPIO_ReadPin(JOY_PORT[joykey], JOY_PIN[joykey]) == GPIO_PIN_SET)
-    {
-      /* Return Code Joystick key pressed */
-      return joykey;
-    }
-  }
-  
-  /* No Joystick key pressed */
-  return JOY_NONE;
-}
-
-#if defined(HAL_UART_MODULE_ENABLED)
-/**
-  * @brief  Configures COM port.
-  * @param  COM Specifies the COM port to be configured.
-  *   This parameter can be one of following parameters:    
-  *     @arg COM1  
-  * @param  huart pointer to a UART_HandleTypeDef structure that
-  *   contains the configuration information for the specified UART peripheral.
-  * @retval None
-  */
-void BSP_COM_Init(COM_TypeDef COM, UART_HandleTypeDef* huart)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-
-  /* Enable GPIO clock */
-  COMx_TX_GPIO_CLK_ENABLE(COM);
-  COMx_RX_GPIO_CLK_ENABLE(COM);
-
-  /* Enable USART clock */
-  COMx_CLK_ENABLE(COM);
-
-  /* Configure USART Tx as alternate function push-pull */
-  GPIO_InitStruct.Pin = COM_TX_PIN[COM];
-  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Pull = GPIO_PULLUP;
-  GPIO_InitStruct.Alternate = COM_TX_AF[COM];
-  HAL_GPIO_Init(COM_TX_PORT[COM], &GPIO_InitStruct);
-    
-  /* Configure USART Rx as alternate function push-pull */
-  GPIO_InitStruct.Pin = COM_RX_PIN[COM];
-  GPIO_InitStruct.Alternate = COM_RX_AF[COM];
-  HAL_GPIO_Init(COM_RX_PORT[COM], &GPIO_InitStruct);
-
-  /* USART configuration */
-  huart->Instance = COM_USART[COM];
-  HAL_UART_Init(huart);
-}
-#endif /* HAL_UART_MODULE_ENABLED */
-
-/**
-  * @}
-  */
-
-/** @addtogroup STM32072B_EVAL_BUS_Operations_Functions
-  * @{
-  */  
-
-/*******************************************************************************
-                            BUS OPERATIONS
-*******************************************************************************/
-#if defined(HAL_I2C_MODULE_ENABLED)
-/******************************* I2C Routines *********************************/
-
-/**
-  * @brief I2C Bus initialization
-  * @retval None
-  */
-static void I2C1_Init(void)
-{
-  if(HAL_I2C_GetState(&heval_I2c1) == HAL_I2C_STATE_RESET)
-  {
-    heval_I2c1.Instance              = EVAL_I2C1;
-    heval_I2c1.Init.Timing           = I2C1_TIMING;
-    heval_I2c1.Init.OwnAddress1      = 0;
-    heval_I2c1.Init.AddressingMode   = I2C_ADDRESSINGMODE_7BIT;
-    heval_I2c1.Init.DualAddressMode  = I2C_DUALADDRESS_DISABLE;
-    heval_I2c1.Init.OwnAddress2      = 0;
-    heval_I2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
-    heval_I2c1.Init.GeneralCallMode  = I2C_GENERALCALL_DISABLE;
-    heval_I2c1.Init.NoStretchMode    = I2C_NOSTRETCH_DISABLE;  
-
-    /* Init the I2C */
-    I2C1_MspInit(&heval_I2c1);
-    HAL_I2C_Init(&heval_I2c1);
-  }
-}
-
-/**
-  * @brief  Reads multiple data on the BUS.
-  * @param  Addr   I2C Address
-  * @param  Reg    Reg Address 
-  * @param  RegSize  The target register size (can be 8BIT or 16BIT)
-  * @param  pBuffer  pointer to read data buffer
-  * @param  Length  length of the data
-  * @retval 0 if no problems to read multiple data
-  */
-static HAL_StatusTypeDef I2C1_ReadBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Mem_Read(&heval_I2c1, Addr, Reg, RegSize, pBuffer, Length, I2c1Timeout);
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Re-Initiaize the BUS */
-    I2C1_Error();
-  }
-  return status;
-}
-
-/**
-  * @brief  Checks if target device is ready for communication. 
-  * @note   This function is used with Memory devices
-  * @param  DevAddress Target device address
-  * @param  Trials Number of trials
-  * @retval HAL status
-  */
-static HAL_StatusTypeDef I2C1_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
-{ 
-  return (HAL_I2C_IsDeviceReady(&heval_I2c1, DevAddress, Trials, I2c1Timeout));
-}
-
-/**
-  * @brief  Write a value in a register of the device through BUS.
-  * @param  Addr Device address on BUS Bus.  
-  * @param  Reg The target register address to write
-  * @param  RegSize The target register size (can be 8BIT or 16BIT)
-  * @param  pBuffer The target register value to be written 
-  * @param  Length buffer size to be written
-  * @retval None
-  */
-static HAL_StatusTypeDef I2C1_WriteBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Mem_Write(&heval_I2c1, Addr, Reg, RegSize, pBuffer, Length, I2c1Timeout); 
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Re-Initiaize the BUS */
-    I2C1_Error();
-  }        
-  return status;
-}
-
-/**
-  * @brief  Write buffer through I2C.
-  * @param  pBuffer The address of the data to be written 
-  * @param  Length buffer size to be written
-  * @retval None
-  */
-static HAL_StatusTypeDef I2C1_TransmitData(uint8_t *pBuffer, uint16_t Length)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Slave_Transmit(&heval_I2c1, pBuffer, Length, I2c1Timeout);
-
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    I2C1_Error();
-    return HAL_ERROR;
-  }        
-  return HAL_OK;
-}
-
-/**
-  * @brief  Manages error callback by re-initializing I2C.
-  * @retval None
-  */
-static void I2C1_Error(void)
-{
-  /* De-initialize the I2C communication BUS */
-  HAL_I2C_DeInit(&heval_I2c1);
-  
-  /* Re-Initiaize the I2C communication BUS */
-  I2C1_Init();
-}
-
-/**
-  * @brief I2C MSP Initialization
-  * @param hi2c I2C handle
-  * @retval None
-  */
-static void I2C1_MspInit(I2C_HandleTypeDef *hi2c)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-  RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct;
-
-  /*##-1- Set source clock to SYSCLK for I2C1 ################################################*/  
-  RCC_PeriphCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2C1;
-  RCC_PeriphCLKInitStruct.I2c1ClockSelection = RCC_I2C1CLKSOURCE_SYSCLK;
-  HAL_RCCEx_PeriphCLKConfig(&RCC_PeriphCLKInitStruct);
-
-  /*##-2- Configure the GPIOs ################################################*/  
-  
-  /* Enable GPIO clock */
-  EVAL_I2C1_GPIO_CLK_ENABLE();
-
-  /* Configure I2C SCL & SDA as alternate function  */
-  GPIO_InitStruct.Pin       = (EVAL_I2C1_SCL_PIN| EVAL_I2C1_SDA_PIN);
-  GPIO_InitStruct.Mode      = GPIO_MODE_AF_OD;
-  GPIO_InitStruct.Pull      = GPIO_NOPULL;
-  GPIO_InitStruct.Speed     = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Alternate = EVAL_I2C1_SCL_SDA_AF;
-  HAL_GPIO_Init(EVAL_I2C1_GPIO_PORT, &GPIO_InitStruct);
-
-  /*##-3- Configure the Eval I2C peripheral #######################################*/ 
-  /* Enable I2C clock */
-  EVAL_I2C1_CLK_ENABLE();
-
-  /* Force the I2C peripheral clock reset */
-  EVAL_I2C1_FORCE_RESET();
-
-  /* Release the I2C peripheral clock reset */
-  EVAL_I2C1_RELEASE_RESET();
-}
-
-/**
-  * @brief I2C Bus initialization
-  * @retval None
-  */
-static void I2C2_Init(void)
-{
-  if(HAL_I2C_GetState(&heval_I2c2) == HAL_I2C_STATE_RESET)
-  {
-    heval_I2c2.Instance              = EVAL_I2C2;
-    heval_I2c2.Init.Timing           = I2C2_TIMING;
-    heval_I2c2.Init.OwnAddress1      = 0;
-    heval_I2c2.Init.AddressingMode   = I2C_ADDRESSINGMODE_7BIT;
-    heval_I2c2.Init.DualAddressMode  = I2C_DUALADDRESS_DISABLE;
-    heval_I2c2.Init.OwnAddress2      = 0;
-    heval_I2c2.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
-    heval_I2c2.Init.GeneralCallMode  = I2C_GENERALCALL_DISABLE;
-    heval_I2c2.Init.NoStretchMode    = I2C_NOSTRETCH_DISABLE;  
-      
-    /* Init the I2C */
-    I2C2_MspInit(&heval_I2c2);
-    HAL_I2C_Init(&heval_I2c2);
-  }
-}
-
-/**
-  * @brief  Read a register of the device through I2C.
-  * @param  Addr Device address on I2C Bus.  
-  * @param  pBuffer The address to store the read data 
-  * @param  Length buffer size to be read
-  * @retval None
-  */
-static HAL_StatusTypeDef I2C2_ReceiveData(uint16_t Addr, uint8_t * pBuffer, uint16_t Length)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Master_Receive(&heval_I2c2, Addr, pBuffer, Length, I2c2Timeout); 
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    I2C2_Error();
-  }
-  return status;
-}
-
-/**
-  * @brief Discovery I2C2 error treatment function
-  * @retval None
-  */
-static void I2C2_Error(void)
-{
-  /* De-initialize the I2C communication BUS */
-  HAL_I2C_DeInit(&heval_I2c2);
-  
-  /* Re-Initiaize the I2C communication BUS */
-  I2C2_Init();
-}
-
-/**
-  * @brief I2C MSP Initialization
-  * @param hi2c I2C handle
-  * @retval None
-  */
-static void I2C2_MspInit(I2C_HandleTypeDef *hi2c)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-  /* Enable GPIO clock */
-  EVAL_I2C2_GPIO_CLK_ENABLE();
-  
-  /* Configure I2C SCL and SDA as alternate function  */
-  GPIO_InitStruct.Pin = (EVAL_I2C2_SCL_PIN | EVAL_I2C2_SDA_PIN);
-  GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
-  GPIO_InitStruct.Pull = GPIO_NOPULL;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Alternate = EVAL_I2C2_AF;
-  HAL_GPIO_Init(EVAL_I2C2_GPIO_PORT, &GPIO_InitStruct);
-
-  /* Enable I2C clock */
-  EVAL_I2C2_CLK_ENABLE();
-
-  /* Force the I2C peripheral clock reset */
-  EVAL_I2C2_FORCE_RESET();
-
-  /* Release the I2C peripheral clock reset */
-  EVAL_I2C2_RELEASE_RESET();
-}
-#endif /*HAL_I2C_MODULE_ENABLED*/
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-/******************************* SPI Routines *********************************/
-
-/**
-  * @brief SPIx Bus initialization
-  * @retval None
-  */
-static void SPIx_Init(void)
-{
-  if(HAL_SPI_GetState(&heval_Spi) == HAL_SPI_STATE_RESET)
-  {
-    /* SPI Config */
-    heval_Spi.Instance = EVAL_SPIx;
-    /* SPI baudrate is set to 12 MHz (PCLK1/SPI_BaudRatePrescaler = 48/4 = 12 MHz) 
-    to verify these constraints:
-    HX8347D LCD SPI interface max baudrate is  50MHz for write and 6.66MHz for read
-    PCLK1 frequency is set to 48 MHz 
-    - SD card SPI interface max baudrate is 25MHz for write/read
-    */
-    heval_Spi.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4;
-    heval_Spi.Init.Direction = SPI_DIRECTION_2LINES;
-    heval_Spi.Init.CLKPhase = SPI_PHASE_2EDGE;
-    heval_Spi.Init.CLKPolarity = SPI_POLARITY_HIGH;
-    heval_Spi.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
-    heval_Spi.Init.CRCPolynomial = 7;
-    heval_Spi.Init.DataSize = SPI_DATASIZE_8BIT;
-    heval_Spi.Init.FirstBit = SPI_FIRSTBIT_MSB;
-    heval_Spi.Init.NSS = SPI_NSS_SOFT;
-    heval_Spi.Init.TIMode = SPI_TIMODE_DISABLE;
-    heval_Spi.Init.Mode = SPI_MODE_MASTER;
-    
-    SPIx_MspInit(&heval_Spi);
-    HAL_SPI_Init(&heval_Spi);
-  }
-}
-
-/**
-  * @brief SPI Read 4 bytes from device
-  * @retval Read data
-  */
-static uint32_t SPIx_Read(void)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  uint32_t readvalue = 0x0;
-  uint32_t writevalue = 0xFFFFFFFF;
-  
-  status = HAL_SPI_TransmitReceive(&heval_Spi, (uint8_t*) &writevalue, (uint8_t*) &readvalue, 1, SpixTimeout);
-
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    SPIx_Error();
-  }
-
-  return readvalue;
-}
-
-/**
-  * @brief SPI Write a byte to device
-  * @param DataIn value to be written
-  * @param DataOut read value
-  * @param DataLegnth data length
-  * @retval None
-  */
-static void SPIx_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLegnth)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-
-  status = HAL_SPI_TransmitReceive(&heval_Spi, (uint8_t*) DataIn, DataOut, DataLegnth, SpixTimeout);
-    
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    SPIx_Error();
-  }
-}
-
-/**
-  * @brief SPI Write a byte to device
-  * @param Value value to be written
-  * @retval None
-  */
-static void SPIx_Write(uint8_t Value)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  uint8_t data;
-
-  status = HAL_SPI_TransmitReceive(&heval_Spi, (uint8_t*) &Value, &data, 1, SpixTimeout);
-
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    SPIx_Error();
-  }
-}
-
-/**
-  * @brief  SPIx_FlushFifo
-  * @retval None
-  */
-static void SPIx_FlushFifo(void)
-{
-  HAL_SPIEx_FlushRxFifo(&heval_Spi);
-}
-
-/**
-  * @brief SPI error treatment function
-  * @retval None
-  */
-static void SPIx_Error (void)
-{
-  /* De-initialize the SPI communication BUS */
-  HAL_SPI_DeInit(&heval_Spi);
-  
-  /* Re- Initiaize the SPI communication BUS */
-  SPIx_Init();
-}
-
-/**
-  * @brief SPI MSP Init
-  * @param hspi SPI handle
-  * @retval None
-  */
-static void SPIx_MspInit(SPI_HandleTypeDef *hspi)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-
-  /* Enable SPI clock  */
-  EVAL_SPIx_CLK_ENABLE();
-  
-  /* enable EVAL_SPI gpio clocks */
-  EVAL_SPIx_SCK_GPIO_CLK_ENABLE();
-  EVAL_SPIx_MISO_GPIO_CLK_ENABLE();
-  EVAL_SPIx_MOSI_GPIO_CLK_ENABLE();
-  EVAL_SPIx_MOSI_DIR_GPIO_CLK_ENABLE();  
-  
-  /* configure SPI SCK */
-  GPIO_InitStruct.Pin       = EVAL_SPIx_SCK_PIN;
-  GPIO_InitStruct.Mode      = GPIO_MODE_AF_PP;
-  GPIO_InitStruct.Pull      = GPIO_NOPULL;
-  GPIO_InitStruct.Speed     = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Alternate = EVAL_SPIx_SCK_AF;
-  HAL_GPIO_Init(EVAL_SPIx_SCK_GPIO_PORT, &GPIO_InitStruct);
-  
-  /* configure SPI MOSI */
-  GPIO_InitStruct.Pin       = EVAL_SPIx_MOSI_PIN;
-  GPIO_InitStruct.Alternate = EVAL_SPIx_MOSI_AF;
-  HAL_GPIO_Init(EVAL_SPIx_MOSI_GPIO_PORT, &GPIO_InitStruct);
-  
-  /* configure SPI MISO  */
-  GPIO_InitStruct.Pin       = EVAL_SPIx_MISO_PIN;
-  GPIO_InitStruct.Alternate = EVAL_SPIx_MISO_AF;
-  HAL_GPIO_Init(EVAL_SPIx_MISO_GPIO_PORT, &GPIO_InitStruct);
-  
-  /* Set PB.2 as Out PP, as direction pin for MOSI */
-  GPIO_InitStruct.Pin       = EVAL_SPIx_MOSI_DIR_PIN;
-  GPIO_InitStruct.Speed     = GPIO_SPEED_FREQ_MEDIUM;
-  GPIO_InitStruct.Mode      = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStruct.Pull      = GPIO_NOPULL;  
-  HAL_GPIO_Init(EVAL_SPIx_MOSI_DIR_GPIO_PORT, &GPIO_InitStruct);
-  
-  /* MOSI DIRECTION as output */
-  HAL_GPIO_WritePin(EVAL_SPIx_MOSI_DIR_GPIO_PORT, EVAL_SPIx_MOSI_DIR_PIN, GPIO_PIN_SET);
-  
-  /* Force the SPI peripheral clock reset */
-  EVAL_SPIx_FORCE_RESET();
-
-  /* Release the SPI peripheral clock reset */
-  EVAL_SPIx_RELEASE_RESET();
-}
-
-#endif /*HAL_SPI_MODULE_ENABLED*/
-
-/**
-  * @}
-  */
-
-/** @addtogroup STM32072B_EVAL_LINK_Operations_Functions
-  * @{
-  */  
-
-/******************************************************************************
-LINK OPERATIONS
-*******************************************************************************/
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-/********************************* LINK LCD ***********************************/
-
-/**
-  * @brief  Configures the LCD_SPI interface.
-  * @retval None
-  */
-void LCD_IO_Init(void)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-
-  /* Configure the LCD Control pins ------------------------------------------*/
-  LCD_NCS_GPIO_CLK_ENABLE();
-    
-  /* Configure NCS in Output Push-Pull mode */
-  GPIO_InitStruct.Pin     = LCD_NCS_PIN;
-  GPIO_InitStruct.Mode    = GPIO_MODE_OUTPUT_OD;
-  GPIO_InitStruct.Pull    = GPIO_NOPULL;
-  GPIO_InitStruct.Speed   = GPIO_SPEED_FREQ_LOW;
-  HAL_GPIO_Init(LCD_NCS_GPIO_PORT, &GPIO_InitStruct);
-    
-  /* Set or Reset the control line */
-  LCD_CS_LOW();
-  LCD_CS_HIGH();
-
-  SPIx_Init();
-}
-
-/**
-  * @brief  Write register value.
-  * @param  pData Pointer on the register value
-  * @param  Size Size of byte to transmit to the register
-  * @retval None
-  */
-void LCD_IO_WriteMultipleData(uint8_t *pData, uint32_t Size)
-{
-  uint32_t counter = 0;
-
-  /* Reset LCD control line(/CS) and Send data */  
-  LCD_CS_LOW();
-
-  /* Send Start Byte */
-  SPIx_Write(START_BYTE | LCD_WRITE_REG);
-
-  if (Size == 1)
-  {
-    /* Only 1 byte to be sent to LCD - general interface can be used */
-    /* Send Data */
-    SPIx_Write(*pData);
-  }
-  else
-  {
-    for (counter = Size; counter != 0; counter--)
-    {
-      while(((heval_Spi.Instance->SR) & SPI_FLAG_TXE) != SPI_FLAG_TXE)
-      {
-      }  
-      /* Need to invert bytes for LCD*/
-      *((__IO uint8_t*)&heval_Spi.Instance->DR) = *(pData+1);
-    
-      while(((heval_Spi.Instance->SR) & SPI_FLAG_TXE) != SPI_FLAG_TXE)
-      {
-      }  
-      *((__IO uint8_t*)&heval_Spi.Instance->DR) = *pData;
-      counter--;
-      pData += 2;
-    }
-    
-    /* Wait until the bus is ready before releasing Chip select */ 
-    while(((heval_Spi.Instance->SR) & SPI_FLAG_BSY) != RESET)
-    {
-    }
-  }
-
-  /* Empty the Rx fifo */
-  SPIx_FlushFifo();
-
-  /* Reset LCD control line(/CS) and Send data */  
-  LCD_CS_HIGH();
-}
-
-/**
-* @brief  Writes address on LCD register.
-* @param  Reg Register to be written
-  * @retval None
-  */
-void LCD_IO_WriteReg(uint8_t Reg) 
-{
-  /* Reset LCD control line(/CS) and Send command */
-  LCD_CS_LOW();
-  
-  /* Send Start Byte */
-  SPIx_Write(START_BYTE | SET_INDEX);
-  
-  /* Write 16-bit Reg Index (High Byte is 0) */
-  SPIx_Write(0x00);
-  SPIx_Write(Reg);
-  
-  /* Deselect : Chip Select high */
-  LCD_CS_HIGH();
-}
-
-/**
-* @brief  Read data from LCD data register.
-* @param  Reg Regsiter to be read
-* @retval readvalue
-  */
-uint16_t LCD_IO_ReadData(uint16_t Reg) 
-{
-  uint32_t readvalue = 0;
-
-  /* Send Reg value to Read */
-  LCD_IO_WriteReg(Reg);
-
-  /* Reset LCD control line(/CS) and Send command */
-  LCD_CS_LOW();
-  
-  /* Send Start Byte */
-  SPIx_Write(START_BYTE | LCD_READ_REG);
-
-  /* Read Upper Byte */
-  SPIx_Write(0xFF);
-  readvalue = SPIx_Read();
-  readvalue = readvalue << 8;
-  readvalue |= SPIx_Read();
-  
-  HAL_Delay(10);
-
-  /* Deselect : Chip Select high */
-  LCD_CS_HIGH();
-  return readvalue;
-}
-
-/**
-  * @brief  Wait for loop in ms.
-  * @param  Delay in ms.
-  */
-void LCD_Delay (uint32_t Delay)
-{
-  HAL_Delay(Delay);
-}
-
-/******************************** LINK SD Card ********************************/
-
-/**
-  * @brief  Initializes the SD Card and put it into StandBy State (Ready for 
-  *         data transfer).
-  * @retval None
-  */
-void SD_IO_Init(void)
-{
-  GPIO_InitTypeDef  GPIO_InitStruct;
-  uint8_t counter;
-
-  /* SD_CS_GPIO and SD_DETECT_GPIO Periph clock enable */
-  SD_CS_GPIO_CLK_ENABLE();
-  SD_DETECT_GPIO_CLK_ENABLE();
-
-  /* Configure SD_CS_PIN pin: SD Card CS pin */
-  GPIO_InitStruct.Pin = SD_CS_PIN;
-  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
-  GPIO_InitStruct.Pull = GPIO_PULLUP;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
-  HAL_GPIO_Init(SD_CS_GPIO_PORT, &GPIO_InitStruct);
-
-  /* Configure SD_DETECT_PIN pin: SD Card detect pin */
-  GPIO_InitStruct.Pin = SD_DETECT_PIN;
-  GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING;
-  GPIO_InitStruct.Pull = GPIO_PULLUP;
-  HAL_GPIO_Init(SD_DETECT_GPIO_PORT, &GPIO_InitStruct);
-
-  /* Configure LCD_CS_PIN pin: LCD Card CS pin */
-  GPIO_InitStruct.Pin   = LCD_NCS_PIN;
-  GPIO_InitStruct.Mode  = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStruct.Pull  = GPIO_NOPULL;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
-  HAL_GPIO_Init(LCD_NCS_GPIO_PORT, &GPIO_InitStruct);
-  LCD_CS_HIGH();
-
-  /* Enable and set SD EXTI Interrupt to the lowest priority */
-  HAL_NVIC_SetPriority(SD_DETECT_EXTI_IRQn, 0x03, 0);
-  HAL_NVIC_EnableIRQ(SD_DETECT_EXTI_IRQn);
-
-  /*------------Put SD in SPI mode--------------*/
-  /* SD SPI Config */
-  SPIx_Init();
-
-  /* SD chip select high */
-  SD_CS_HIGH();
-  
-  /* Send dummy byte 0xFF, 10 times with CS high */
-  /* Rise CS and MOSI for 80 clocks cycles */
-  for (counter = 0; counter <= 9; counter++)
-  {
-    /* Send dummy byte 0xFF */
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-  }
-}
-
-
-void SD_IO_CSState(uint8_t val)
-{
-  if(val == 1) 
-  {
-    SD_CS_HIGH();
-  }
-  else
-  {
-    SD_CS_LOW();
-  }
-}
-
-/**
-  * @brief  Write a byte on the SD.
-  * @param  DataIn byte to send.
-  * @param  DataOut read byte.
-  * @param  DataLength data length.
-  * @retval None
-  */
-void SD_IO_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength)
-  {
-  /* Send the byte */
-  SPIx_WriteReadData(DataIn, DataOut, DataLength);
-}
-
-/**
-  * @brief  Writes a byte on the SD.
-  * @param  Data byte to send.
-  * @retval None
-  */
-uint8_t SD_IO_WriteByte(uint8_t Data)
-{
-  uint8_t tmp;
-
-  /* Send the byte */
-  SPIx_WriteReadData(&Data,&tmp,1);
-  return tmp;
-}
-
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-#if defined(HAL_I2C_MODULE_ENABLED)
-/********************************* LINK I2C EEPROM *****************************/
-/**
-  * @brief  Initializes peripherals used by the I2C EEPROM driver.
-  * @retval None
-  */
-void EEPROM_IO_Init(void)
-{
-  I2C1_Init();
-}
-
-/**
-  * @brief  Write data to I2C EEPROM driver
-  * @param  DevAddress Target device address
-  * @param  MemAddress Internal memory address
-  * @param  pBuffer Pointer to data buffer
-  * @param  BufferSize Amount of data to be sent
-  * @retval HAL status
-  */
-HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize)
-{
-  return (I2C1_WriteBuffer(DevAddress, MemAddress, I2C_MEMADD_SIZE_16BIT, pBuffer, BufferSize));
-}
-
-/**
-  * @brief  Read data from I2C EEPROM driver
-  * @param  DevAddress Target device address
-  * @param  MemAddress Internal memory address
-  * @param  pBuffer Pointer to data buffer
-  * @param  BufferSize Amount of data to be read
-  * @retval HAL status
-  */
-HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize)
-{
-  return (I2C1_ReadBuffer(DevAddress, MemAddress, I2C_MEMADD_SIZE_16BIT, pBuffer, BufferSize));
-}
-
-/**
-  * @brief  Checks if target device is ready for communication. 
-  * @note   This function is used with Memory devices
-  * @param  DevAddress Target device address
-  * @param  Trials Number of trials
-  * @retval HAL status
-  */
-HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
-{ 
-  return (I2C1_IsDeviceReady(DevAddress, Trials));
-}
-
-/********************************* LINK I2C TEMPERATURE SENSOR *****************************/
-/**
-  * @brief  Initializes peripherals used by the I2C Temperature Sensor driver.
-  * @retval None
-  */
-void TSENSOR_IO_Init(void)
-{
-  I2C1_Init();
-}
-
-/**
-  * @brief  Writes one byte to the TSENSOR.
-  * @param  DevAddress Target device address
-  * @param  pBuffer Pointer to data buffer
-  * @param  WriteAddr TSENSOR's internal address to write to.
-  * @param  Length Number of data to write
-  * @retval None
-  */
-void TSENSOR_IO_Write(uint16_t DevAddress, uint8_t* pBuffer, uint8_t WriteAddr, uint16_t Length)
-{
-  I2C1_WriteBuffer(DevAddress, WriteAddr, I2C_MEMADD_SIZE_8BIT, pBuffer, Length);
-}
-
-/**
-  * @brief  Reads one byte from the TSENSOR.
-  * @param  DevAddress Target device address
-  * @param  pBuffer  pointer to the buffer that receives the data read from the TSENSOR.
-  * @param  ReadAddr  TSENSOR's internal address to read from.
-  * @param  Length Number of data to read
-  * @retval None
-  */
-void TSENSOR_IO_Read(uint16_t DevAddress, uint8_t* pBuffer, uint8_t ReadAddr, uint16_t Length)
-{
-  I2C1_ReadBuffer(DevAddress, ReadAddr, I2C_MEMADD_SIZE_8BIT, pBuffer, Length);
-}
-
-/**
-  * @brief  Checks if Temperature Sensor is ready for communication. 
-  * @param  DevAddress Target device address
-  * @param  Trials Number of trials
-  * @retval HAL status
-  */
-uint16_t TSENSOR_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
-{ 
-  return (I2C1_IsDeviceReady(DevAddress, Trials));
-}
-
-/****************************** LINK HDMI CEC *********************************/
-/**
-  * @brief  Initializes CEC low level.
-  * @retval None
-  */
-void HDMI_CEC_IO_Init (void) 
-{
-  GPIO_InitTypeDef  GPIO_InitStruct;
-
-  /* Enable CEC clock */
-  __HAL_RCC_CEC_CLK_ENABLE();
-  
-  /* Enable CEC LINE GPIO clock */
-  HDMI_CEC_LINE_CLK_ENABLE();
-
-  /* Configure CEC LINE GPIO as alternate function open drain */
-  GPIO_InitStruct.Pin = HDMI_CEC_LINE_PIN; 
-  GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Pull  = GPIO_NOPULL;
-  GPIO_InitStruct.Alternate = HDMI_CEC_LINE_AF;
-  HAL_GPIO_Init(HDMI_CEC_LINE_GPIO_PORT, &GPIO_InitStruct);    
-
-  /* CEC IRQ Channel configuration */
-  HAL_NVIC_SetPriority((IRQn_Type)HDMI_CEC_IRQn, 0x3, 0x0);
-  HAL_NVIC_EnableIRQ((IRQn_Type)HDMI_CEC_IRQn); 
-
-  /* Enable CEC HPD SINK GPIO clock */
-  HDMI_CEC_HPD_SINK_CLK_ENABLE();
-  
-  /* Configure CEC HPD SINK GPIO as output push pull */
-  GPIO_InitStruct.Pin = HDMI_CEC_HPD_SINK_PIN; 
-  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
-  GPIO_InitStruct.Pull  = GPIO_PULLDOWN;
-  HAL_GPIO_Init(HDMI_CEC_HPD_SINK_GPIO_PORT, &GPIO_InitStruct); 
-  
-  I2C1_Init();
-
-  /* Enable CEC HPD SOURCE GPIO clock */
-  HDMI_CEC_HPD_SOURCE_CLK_ENABLE();
-
-  /* Configure CEC HPD SOURCE GPIO as output push pull */
-  GPIO_InitStruct.Pin = HDMI_CEC_HPD_SOURCE_PIN; 
-  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
-  GPIO_InitStruct.Pull  = GPIO_PULLDOWN;
-  HAL_GPIO_Init(HDMI_CEC_HPD_SOURCE_GPIO_PORT, &GPIO_InitStruct); 
-  
-  I2C2_Init();
-}
-
-/**
-  * @brief  Write data to I2C HDMI CEC driver
-  * @param  pBuffer Pointer to data buffer
-  * @param  BufferSize Amount of data to be sent
-  * @retval HAL status
-  */
-HAL_StatusTypeDef HDMI_CEC_IO_WriteData(uint8_t * pBuffer, uint16_t BufferSize)
-{
-  return (I2C1_TransmitData(pBuffer, BufferSize));
-}
-
-/**
-  * @brief  Read data to I2C HDMI CEC driver
-  * @param  DevAddress Target device address
-  * @param  pBuffer Pointer to data buffer
-  * @param  BufferSize Amount of data to be sent
-  * @retval HAL status
-  */
-HAL_StatusTypeDef HDMI_CEC_IO_ReadData(uint16_t DevAddress, uint8_t * pBuffer, uint16_t BufferSize)
-{
-  return (I2C2_ReceiveData(DevAddress, pBuffer, BufferSize));
-}
-
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-    
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 518
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval.h

@@ -1,518 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32072b_eval.h
-  * @author  MCD Application Team
-  * @brief   This file contains definitions for STM32072B_EVAL's Leds, push-buttons
-  *          and COM port hardware resources.
-  ******************************************************************************
-  * @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 __STM32072B_EVAL_H
-#define __STM32072B_EVAL_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f0xx_hal.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL STM32072B_EVAL
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_Common STM32072B_EVAL Common
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_Exported_Types Exported Types
-  * @{
-  */
-
-/**
- * @brief LED Types Definition
- */
-typedef enum
-{
-  LED1 = 0,
-  LED2 = 1,
-  LED3 = 2,
-  LED4 = 3,
-  /* Color led aliases */
-  LED_GREEN  = LED1,
-  LED_ORANGE = LED2,
-  LED_RED    = LED3,
-  LED_BLUE   = LED4
-}Led_TypeDef;
-
-/**
- * @brief BUTTON Types Definition
- */
-typedef enum 
-{
-  BUTTON_TAMPER = 0
-}Button_TypeDef;
-
-typedef enum 
-{  
-  BUTTON_MODE_GPIO = 0,
-  BUTTON_MODE_EXTI = 1
-}ButtonMode_TypeDef;
-
-/**
- * @brief JOYSTICK Types Definition
- */
-typedef enum 
-{ 
-  JOY_SEL   = 0,
-  JOY_DOWN  = 1,
-  JOY_LEFT  = 2,
-  JOY_RIGHT = 3,
-  JOY_UP    = 4,
-  JOY_NONE  = 5
-}JOYState_TypeDef;
-
-typedef enum 
-{  
-  JOY_MODE_GPIO = 0,
-  JOY_MODE_EXTI = 1
-}JOYMode_TypeDef;
-
-/**
- * @brief COM Types Definition
- */
-typedef enum 
-{
-  COM1 = 0
-}COM_TypeDef;
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32072B_EVAL_Exported_Constants Exported Constants
-  * @{
-  */ 
-
-/** 
-  * @brief  Define for STM32072B_EVAL board  
-  */ 
-#if !defined (USE_STM32072B_EVAL)
- #define USE_STM32072B_EVAL
-#endif
-
-/** @defgroup STM32072B_EVAL_LED STM32072B_EVAL LED
-  * @{
-  */
-#define LEDn                             4
-
-#define LED1_PIN                         GPIO_PIN_8
-#define LED1_GPIO_PORT                   GPIOD
-#define LED1_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOD_CLK_ENABLE()
-#define LED1_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOD_CLK_DISABLE()
-  
-#define LED2_PIN                         GPIO_PIN_9
-#define LED2_GPIO_PORT                   GPIOD
-#define LED2_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOD_CLK_ENABLE()
-#define LED2_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOD_CLK_DISABLE()
-  
-#define LED3_PIN                         GPIO_PIN_10
-#define LED3_GPIO_PORT                   GPIOD
-#define LED3_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOD_CLK_ENABLE()
-#define LED3_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOD_CLK_DISABLE()
-  
-#define LED4_PIN                         GPIO_PIN_11
-#define LED4_GPIO_PORT                   GPIOD
-#define LED4_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOD_CLK_ENABLE()
-#define LED4_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOD_CLK_DISABLE()
-
-#define LEDx_GPIO_CLK_ENABLE(__LED__)    do { if((__LED__) == LED1) LED1_GPIO_CLK_ENABLE(); else \
-                                          if((__LED__) == LED2) LED2_GPIO_CLK_ENABLE(); else \
-                                          if((__LED__) == LED3) LED3_GPIO_CLK_ENABLE(); else \
-                                          if((__LED__) == LED4) LED4_GPIO_CLK_ENABLE();} while(0)
-
-#define LEDx_GPIO_CLK_DISABLE(__LED__)   (((__LED__) == LED1) ? LED1_GPIO_CLK_DISABLE() :\
-                                          ((__LED__) == LED2) ? LED2_GPIO_CLK_DISABLE() :\
-                                          ((__LED__) == LED3) ? LED3_GPIO_CLK_DISABLE() :\
-                                          ((__LED__) == LED4) ? LED4_GPIO_CLK_DISABLE() : 0 )
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32072B_EVAL_BUTTON STM32072B_EVAL BUTTON
-  * @{
-  */  
-#define JOYn                             5
-#define BUTTONn                          1
-
-/**
- * @brief Tamper push-button
- */
-#define TAMPER_BUTTON_PIN                GPIO_PIN_13
-#define TAMPER_BUTTON_GPIO_PORT          GPIOC
-#define TAMPER_BUTTON_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOC_CLK_ENABLE()
-#define TAMPER_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
-#define TAMPER_BUTTON_EXTI_IRQn          EXTI4_15_IRQn
-
-#define TAMPERx_GPIO_CLK_ENABLE(__BUTTON__)    do { if((__BUTTON__) == BUTTON_TAMPER) TAMPER_BUTTON_GPIO_CLK_ENABLE();} while(0)
-
-#define TAMPERx_GPIO_CLK_DISABLE(__BUTTON__)   (((__BUTTON__) == BUTTON_TAMPER) ? TAMPER_BUTTON_GPIO_CLK_DISABLE(): 0 )
-
-/**
- * @brief Joystick Right push-button
- */
-#define RIGHT_JOY_PIN                    GPIO_PIN_3
-#define RIGHT_JOY_GPIO_PORT              GPIOE
-#define RIGHT_JOY_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOE_CLK_ENABLE()
-#define RIGHT_JOY_GPIO_CLK_DISABLE()     __HAL_RCC_GPIOE_CLK_DISABLE()
-#define RIGHT_JOY_EXTI_IRQn              EXTI2_3_IRQn
-
-/**
- * @brief Joystick Left push-button
- */
-#define LEFT_JOY_PIN                     GPIO_PIN_2
-#define LEFT_JOY_GPIO_PORT               GPIOE
-#define LEFT_JOY_GPIO_CLK_ENABLE()       __HAL_RCC_GPIOE_CLK_ENABLE()
-#define LEFT_JOY_GPIO_CLK_DISABLE()      __HAL_RCC_GPIOE_CLK_DISABLE()
-#define LEFT_JOY_EXTI_IRQn               EXTI2_3_IRQn  
-
-/**
- * @brief Joystick Up push-button
- */
-#define UP_JOY_PIN                       GPIO_PIN_9
-#define UP_JOY_GPIO_PORT                 GPIOF
-#define UP_JOY_GPIO_CLK_ENABLE()         __HAL_RCC_GPIOF_CLK_ENABLE()
-#define UP_JOY_GPIO_CLK_DISABLE()        __HAL_RCC_GPIOF_CLK_DISABLE()
-#define UP_JOY_EXTI_IRQn                 EXTI4_15_IRQn
-
-/**
- * @brief Joystick Down push-button
- */  
-#define DOWN_JOY_PIN                     GPIO_PIN_10
-#define DOWN_JOY_GPIO_PORT               GPIOF
-#define DOWN_JOY_GPIO_CLK_ENABLE()       __HAL_RCC_GPIOF_CLK_ENABLE()
-#define DOWN_JOY_GPIO_CLK_DISABLE()      __HAL_RCC_GPIOF_CLK_DISABLE()
-#define DOWN_JOY_EXTI_IRQn               EXTI4_15_IRQn
-
-/**
- * @brief Joystick Sel push-button
- */
-#define SEL_JOY_PIN                      GPIO_PIN_0
-#define SEL_JOY_GPIO_PORT                GPIOA
-#define SEL_JOY_GPIO_CLK_ENABLE()        __HAL_RCC_GPIOA_CLK_ENABLE()
-#define SEL_JOY_GPIO_CLK_DISABLE()       __HAL_RCC_GPIOA_CLK_DISABLE()
-#define SEL_JOY_EXTI_IRQn                EXTI0_1_IRQn 
-
-#define JOYx_GPIO_CLK_ENABLE(__JOY__)    do { if((__JOY__) == JOY_SEL) SEL_JOY_GPIO_CLK_ENABLE(); else \
-                                          if((__JOY__) == JOY_DOWN) DOWN_JOY_GPIO_CLK_ENABLE(); else \
-                                          if((__JOY__) == JOY_LEFT) LEFT_JOY_GPIO_CLK_ENABLE(); else \
-                                          if((__JOY__) == JOY_RIGHT) RIGHT_JOY_GPIO_CLK_ENABLE(); else \
-                                          if((__JOY__) == JOY_UP) UP_JOY_GPIO_CLK_ENABLE();} while(0)
-
-#define JOYx_GPIO_CLK_DISABLE(__JOY__)   (((__JOY__) == JOY_SEL) ? SEL_JOY_GPIO_CLK_DISABLE() :\
-                                          ((__JOY__) == JOY_DOWN) ? DOWN_JOY_GPIO_CLK_DISABLE() :\
-                                          ((__JOY__) == JOY_LEFT) ? LEFT_JOY_GPIO_CLK_DISABLE() :\
-                                          ((__JOY__) == JOY_RIGHT) ? RIGHT_JOY_GPIO_CLK_DISABLE() :\
-                                          ((__JOY__) == JOY_UP) ? UP_JOY_GPIO_CLK_DISABLE() : 0 )
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_COM STM32072B_EVAL COM
-  * @{
-  */
-#define COMn                            1
-
-/**
- * @brief Definition for COM port1, connected to USART2
- */ 
-#define EVAL_COM1                       USART2
-#define EVAL_COM1_CLK_ENABLE()          __HAL_RCC_USART2_CLK_ENABLE()
-#define EVAL_COM1_CLK_DISABLE()         __HAL_RCC_USART2_CLK_DISABLE()
-
-#define EVAL_COM1_TX_PIN                GPIO_PIN_5
-#define EVAL_COM1_TX_GPIO_PORT          GPIOD
-#define EVAL_COM1_TX_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOD_CLK_ENABLE()
-#define EVAL_COM1_TX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
-#define EVAL_COM1_TX_AF                 GPIO_AF0_USART2
-
-#define EVAL_COM1_RX_PIN                GPIO_PIN_6
-#define EVAL_COM1_RX_GPIO_PORT          GPIOD
-#define EVAL_COM1_RX_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOD_CLK_ENABLE()
-#define EVAL_COM1_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
-#define EVAL_COM1_RX_AF                 GPIO_AF0_USART2
-
-#define EVAL_COM1_CTS_PIN               GPIO_PIN_3
-#define EVAL_COM1_CTS_GPIO_PORT         GPIOD
-#define EVAL_COM1_CTS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
-#define EVAL_COM1_CTS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
-#define EVAL_COM1_CTS_AF                GPIO_AF0_USART2
-
-#define EVAL_COM1_RTS_PIN               GPIO_PIN_4
-#define EVAL_COM1_RTS_GPIO_PORT         GPIOD
-#define EVAL_COM1_RTS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
-#define EVAL_COM1_RTS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
-#define EVAL_COM1_RTS_AF                GPIO_AF0_USART2
-   
-#define EVAL_COM1_IRQn                  USART2_IRQn
-
-#define COMx_CLK_ENABLE(__COM__)        do { if((__COM__) == COM1) EVAL_COM1_CLK_ENABLE();} while(0)
-#define COMx_CLK_DISABLE(__COM__)       (((__COM__) == COM1) ? EVAL_COM1_CLK_DISABLE() : 0)
-
-#define COMx_TX_GPIO_CLK_ENABLE(__COM__) do { if((__COM__) == COM1) EVAL_COM1_TX_GPIO_CLK_ENABLE();} while(0)
-#define COMx_TX_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_TX_GPIO_CLK_DISABLE() : 0)
-
-#define COMx_RX_GPIO_CLK_ENABLE(__COM__) do { if((__COM__) == COM1) EVAL_COM1_RX_GPIO_CLK_ENABLE();} while(0)
-#define COMx_RX_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_RX_GPIO_CLK_DISABLE() : 0)
-
-#define COMx_CTS_GPIO_CLK_ENABLE(__COM__) do { if((__COM__) == COM1) EVAL_COM1_CTS_GPIO_CLK_ENABLE();} while(0)
-#define COMx_CTS_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_CTS_GPIO_CLK_DISABLE() : 0)
-
-#define COMx_RTS_GPIO_CLK_ENABLE(__COM__) do { if((__COM__) == COM1) EVAL_COM1_RTS_GPIO_CLK_ENABLE();} while(0)
-#define COMx_RTS_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_RTS_GPIO_CLK_DISABLE() : 0)
-/**
-  * @}
-  */
-
-/** @addtogroup STM32072B_EVAL_BUS STM32072B_EVAL BUS
-  * @{
-  */
-#if defined(HAL_I2C_MODULE_ENABLED)
-/*##################### I2C2 ###################################*/
-/* User can use this section to tailor I2Cx instance used and associated resources */
-/* Definition for I2C1 Pins */
-#define EVAL_I2C1                        I2C1
-#define EVAL_I2C1_CLK_ENABLE()           __HAL_RCC_I2C1_CLK_ENABLE()
-#define EVAL_I2C1_CLK_DISABLE()          __HAL_RCC_I2C1_CLK_DISABLE()
-#define EVAL_I2C1_FORCE_RESET()          __HAL_RCC_I2C1_FORCE_RESET()
-#define EVAL_I2C1_RELEASE_RESET()        __HAL_RCC_I2C1_RELEASE_RESET()  
-
-#define EVAL_I2C1_SCL_PIN                GPIO_PIN_6		/* PB.6 */
-#define EVAL_I2C1_SDA_PIN                GPIO_PIN_7		/* PB.7 */
-
-#define EVAL_I2C1_GPIO_PORT		 GPIOB			/* GPIOB */
-#define EVAL_I2C1_GPIO_CLK_ENABLE()    	 __HAL_RCC_GPIOB_CLK_ENABLE()
-#define EVAL_I2C1_GPIO_CLK_DISABLE()     __HAL_RCC_GPIOB_CLK_DISABLE() 
-#define EVAL_I2C1_SCL_SDA_AF		 GPIO_AF1_I2C1
-
-/* Definition for I2C2 Pins */
-#define EVAL_I2C2                        I2C2
-#define EVAL_I2C2_CLK_ENABLE()           __HAL_RCC_I2C2_CLK_ENABLE()
-#define EVAL_I2C2_CLK_DISABLE()          __HAL_RCC_I2C2_CLK_DISABLE()
-#define EVAL_I2C2_FORCE_RESET()          __HAL_RCC_I2C2_FORCE_RESET()
-#define EVAL_I2C2_RELEASE_RESET()        __HAL_RCC_I2C2_RELEASE_RESET()
-
-#define EVAL_I2C2_SCL_PIN                GPIO_PIN_13		/* PB.13 */
-#define EVAL_I2C2_SDA_PIN                GPIO_PIN_14		/* PB.14 */
-
-#define EVAL_I2C2_GPIO_PORT           	 GPIOB                   /* GPIOB */
-#define EVAL_I2C2_GPIO_CLK_ENABLE()    	 __HAL_RCC_GPIOB_CLK_ENABLE()
-#define EVAL_I2C2_GPIO_CLK_DISABLE()     __HAL_RCC_GPIOB_CLK_DISABLE()
-#define EVAL_I2C2_AF                     GPIO_AF5_I2C2
-
-/* Definition for I2C2 NVIC */
-#define EVAL_I2C2_IRQn                   I2C2_IRQn
-  
-/* Maximum Timeout values for flags waiting loops. These timeouts are not based
-   on accurate values, they just guarantee that the application will not remain
-   stuck if the I2C communication is corrupted.
-   You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
-#define EVAL_I2C1_TIMEOUT_MAX            1000
-#define EVAL_I2C2_TIMEOUT_MAX            1000
-
-/* I2C TIMING is calculated in case of the I2C Clock source is the SYSCLK = 48 MHz */
-/* Set TIMING to 0x00E0D3FF to reach 100 KHz speed (Rise time = 50ns, Fall time = 10ns) */
-#define I2C2_TIMING                      0x00E0D3FF
-#define I2C1_TIMING                      0x00E0D3FF
-
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-/**
-  * @brief  Definition for SPI Interface pins (SPI1 used)
-  */
-#define EVAL_SPIx                        SPI1
-#define EVAL_SPIx_CLK_ENABLE()           __HAL_RCC_SPI1_CLK_ENABLE()
-#define EVAL_SPIx_CLK_DISABLE()          __HAL_RCC_SPI1_CLK_DISABLE()
-#define EVAL_SPIx_FORCE_RESET()          __HAL_RCC_SPI1_FORCE_RESET()
-#define EVAL_SPIx_RELEASE_RESET()        __HAL_RCC_SPI1_RELEASE_RESET()
-
-#define EVAL_SPIx_SCK_PIN                GPIO_PIN_3              /* PB.03 */
-#define EVAL_SPIx_SCK_GPIO_PORT          GPIOB                   /* GPIOB */
-#define EVAL_SPIx_SCK_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOB_CLK_ENABLE()
-#define EVAL_SPIx_SCK_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
-#define EVAL_SPIx_SCK_AF                 GPIO_AF0_SPI1
-
-#define EVAL_SPIx_MISO_PIN               GPIO_PIN_14             /* PE.14 */
-#define EVAL_SPIx_MISO_GPIO_PORT         GPIOE                   /* GPIOE */
-#define EVAL_SPIx_MISO_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE()
-#define EVAL_SPIx_MISO_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE()
-#define EVAL_SPIx_MISO_AF                GPIO_AF1_SPI1
-
-#define EVAL_SPIx_MOSI_PIN               GPIO_PIN_15             /* PE.15 */
-#define EVAL_SPIx_MOSI_GPIO_PORT         GPIOE                   /* GPIOE */
-#define EVAL_SPIx_MOSI_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE()
-#define EVAL_SPIx_MOSI_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE()
-#define EVAL_SPIx_MOSI_AF                GPIO_AF1_SPI1
-
-#define EVAL_SPIx_MOSI_DIR_PIN           GPIO_PIN_2             /* PB.02 */
-#define EVAL_SPIx_MOSI_DIR_GPIO_PORT     GPIOB                   /* GPIOB */
-#define EVAL_SPIx_MOSI_DIR_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
-#define EVAL_SPIx_MOSI_DIR_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
-
-/* Maximum Timeout values for flags waiting loops. These timeouts are not based
-   on accurate values, they just guarantee that the application will not remain
-   stuck if the SPI communication is corrupted.
-   You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
-#define EVAL_SPIx_TIMEOUT_MAX                 1000
-
-#endif /* HAL_SPI_MODULE_ENABLED */
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_COMPONENT STM32072B_EVAL COMPONENT
-  * @{
-  */
-/*##################### LCD ###################################*/
-/* Chip Select macro definition */
-#define LCD_CS_LOW()                    HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_RESET)
-#define LCD_CS_HIGH()                   HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_SET)
-/** 
-  * @brief  LCD Control pins 
-  */ 
-#define LCD_NCS_PIN                     GPIO_PIN_6		/* PE. 06*/
-#define LCD_NCS_GPIO_PORT               GPIOE			/* GPIOE */
-#define LCD_NCS_GPIO_CLK_ENABLE()       __HAL_RCC_GPIOE_CLK_ENABLE()
-#define LCD_NCS_GPIO_CLK_DISABLE()      __HAL_RCC_GPIOE_CLK_DISABLE()  
-
-
-/*##################### SD ###################################*/  
-/* Chip Select macro definition */
-#define SD_CS_LOW()                     HAL_GPIO_WritePin(SD_CS_GPIO_PORT, SD_CS_PIN, GPIO_PIN_RESET)
-#define SD_CS_HIGH()                    HAL_GPIO_WritePin(SD_CS_GPIO_PORT, SD_CS_PIN, GPIO_PIN_SET)  
-/**
-  * @brief SD card Control pin  
-  */
-#define SD_CS_PIN                       GPIO_PIN_2              /* PF.2 */
-#define SD_CS_GPIO_PORT                 GPIOF                   /* GPIOF */
-#define SD_CS_GPIO_CLK_ENABLE()         __HAL_RCC_GPIOF_CLK_ENABLE()
-#define SD_CS_GPIO_CLK_DISABLE()        __HAL_RCC_GPIOF_CLK_DISABLE()
-
-/**
-  * @brief  SD Detect Interface pins
-  */
-#define SD_DETECT_PIN                   GPIO_PIN_15             /* PB.15 */
-#define SD_DETECT_GPIO_PORT             GPIOB                   /* GPIOB */
-#define SD_DETECT_GPIO_CLK_ENABLE()     __HAL_RCC_GPIOB_CLK_ENABLE()
-#define SD_DETECT_GPIO_CLK_DISABLE()    __HAL_RCC_GPIOB_CLK_DISABLE()
-#define SD_DETECT_EXTI_IRQn             EXTI4_15_IRQn
-
-  
-/*##################### HDMI-CEC ###################################*/
-/**
-  * @brief  I2C HDMI CEC Interface pins
-  */
-#define HDMI_CEC_HPD_SINK_PIN             GPIO_PIN_15  /* PD.15 */
-#define HDMI_CEC_HPD_SINK_GPIO_PORT       GPIOD
-#define HDMI_CEC_HPD_SINK_CLK_ENABLE()    __HAL_RCC_GPIOD_CLK_ENABLE()
-#define HDMI_CEC_HPD_SINK_CLK_DISABLE()   __HAL_RCC_GPIOD_CLK_DISABLE()
-  
-#define HDMI_CEC_HPD_SOURCE_PIN           GPIO_PIN_0  /* PE.0 */
-#define HDMI_CEC_HPD_SOURCE_GPIO_PORT     GPIOE
-#define HDMI_CEC_HPD_SOURCE_CLK_ENABLE()  __HAL_RCC_GPIOE_CLK_ENABLE()
-#define HDMI_CEC_HPD_SOURCE_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE()
-
-#define HDMI_CEC_LINE_PIN                 GPIO_PIN_8  /* PB.8 */
-#define HDMI_CEC_LINE_GPIO_PORT           GPIOB
-#define HDMI_CEC_LINE_CLK_ENABLE()        __HAL_RCC_GPIOB_CLK_ENABLE()
-#define HDMI_CEC_LINE_CLK_DISABLE()       __HAL_RCC_GPIOB_CLK_DISABLE()
-#define HDMI_CEC_LINE_AF                  GPIO_AF0_CEC
-#define HDMI_CEC_IRQn                     CEC_CAN_IRQn
-
-/* HDMI-CEC hardware I2C address */ 
-#define HDMI_CEC_I2C_ADDRESS              0xA0
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_Exported_Functions Exported Functions
-  * @{
-  */
-uint32_t          BSP_GetVersion(void);
-void              BSP_LED_Init(Led_TypeDef Led);
-void              BSP_LED_On(Led_TypeDef Led);
-void              BSP_LED_Off(Led_TypeDef Led);
-void              BSP_LED_Toggle(Led_TypeDef Led);
-void              BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode);
-uint32_t          BSP_PB_GetState(Button_TypeDef Button);
-uint8_t           BSP_JOY_Init(JOYMode_TypeDef Joy_Mode);
-JOYState_TypeDef  BSP_JOY_GetState(void);
-#if defined(HAL_UART_MODULE_ENABLED)
-void              BSP_COM_Init(COM_TypeDef COM, UART_HandleTypeDef* huart);
-#endif /* HAL_UART_MODULE_ENABLED */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32072B_EVAL_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 495
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_eeprom.c

@@ -1,495 +0,0 @@
-/**
-******************************************************************************
-* @file    stm32072b_eval_eeprom.c
-* @author  MCD Application Team
-* @brief   This file provides a set of functions needed to manage a M24LR64 
-*          I2C EEPROM memory.
-*          
-*          =================================================================== 
-*          Notes:
-*           - This driver is intended for STM32F0xx families devices only.     
-*           - The I2C EEPROM memory (M24LR64) is available on separate daughter 
-*             board ANT7-M24LR-A, which is provided with the STM32072B 
-*             EVAL board.
-*             To use this driver with M24LR64, you have to connect
-*             the ANT7-M24LR-A to CN2 connector of STM32072B EVAL board.
-*          ===================================================================
-*              
-*          It implements a high level communication layer for read and write 
-*          from/to this memory. The needed STM32F0xx hardware resources (I2C
-*          and GPIO) are defined in stm32072b_eval.h file,
-*          and the initialization is performed depending of EEPROMs
-*          in EEPROM_IO_Init() function declared in stm32072b_eval.c file.
-*          You can easily tailor this driver to any other development board, 
-*          by just adapting the defines for hardware resources and 
-*          EEPROM_IO_Init() function. 
-*             
-*          @note In this driver, basic read and write functions
-*          (BSP_EEPROM_ReadBuffer() and BSP_EEPROM_WriteBuffer())
-*          use Polling mode to perform the data transfer to/from EEPROM memories.
-
-*     +-----------------------------------------------------------------+
-*     |               Pin assignment for M24LR64 EEPROM                 |
-*     +---------------------------------------+-----------+-------------+
-*     |  STM32F0xx I2C Pins                   |   EEPROM  |   Pin       |
-*     +---------------------------------------+-----------+-------------+
-*     | EEPROM_I2C_SDA_PIN (PB7)/ SDA         |   SDA     |    1        |
-*     | .                                     |   NC      |    2        |
-*     | EEPROM_I2C_SCL_PIN/ SCL               |   SCL     |    3        |
-*     | EX_RESET(PD7)                         |   RESET   |    4        |
-*     | .                                     |   VDD     |    5        |
-*     | .                                     |   NC      |    6        |
-*     | .                                     |   GND     |    7        |
-*     | .                                     |   NC      |    8        |
-*     +---------------------------------------+-----------+-------------+
-*
-******************************************************************************
-* @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.
-*
-******************************************************************************
-*/
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32072b_eval_eeprom.h"
-
-/** @addtogroup BSP
-* @{
-*/
-
-/** @addtogroup STM32072B_EVAL
-  * @{
-  */
-
-/** @addtogroup STM32072B_EVAL_EEPROM
-  * @brief      This file includes the I2C EEPROM driver 
-  *             of STM32072B-EVAL board.
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_EEPROM_Private_Variables Private Variables
-  * @{
-  */
-__IO uint16_t  EEPROMAddress = 0;
-__IO uint16_t  EEPROMPageSize = 0;
-__IO uint16_t  EEPROMDataRead;
-__IO uint8_t   EEPROMDataWrite;
-
-static EEPROM_DrvTypeDef *EEPROM_SelectedDevice = 0;
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32072B_EVAL_EEPROM_Private_Functions Private Functions
-  * @{
-  */
-static uint32_t EEPROM_I2C_Init(void);
-static uint32_t EEPROM_I2C_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint32_t* NumByteToRead);
-static uint32_t EEPROM_I2C_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint32_t* NumByteToWrite);
-static uint32_t EEPROM_I2C_WaitEepromStandbyState(void);
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32072B_EVAL_EEPROM_Private_Types Private Types
-  * @{
-  */
-/* EEPROM I2C driver typedef */
-EEPROM_DrvTypeDef EEPROM_I2C_Drv =
-{
-  EEPROM_I2C_Init,
-  EEPROM_I2C_ReadBuffer,
-  EEPROM_I2C_WritePage
-};
-/**
-  * @}
-  */
-
-/** @addtogroup STM32072B_EVAL_EEPROM_Exported_Functions
-  * @{
-  */
-
-/**
-  * @brief  Initializes peripherals used by the I2C EEPROM driver.
-  * 
-  * @note There are 2 different versions of M24LR64 (A01 & A02).
-  *             Then try to connect on 1st one (EEPROM_I2C_ADDRESS_A01) 
-  *             and if problem, check the 2nd one (EEPROM_I2C_ADDRESS_A02)
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0)
-  */
-uint32_t BSP_EEPROM_Init(void)
-{ 
-  EEPROM_SelectedDevice = &EEPROM_I2C_Drv;
-  if(EEPROM_SelectedDevice->Init != 0)
-  {
-    return (EEPROM_SelectedDevice->Init());
-  }
-  else
-  {
-    return EEPROM_FAIL;
-  }
-}
-
-/**
-  * @brief  Reads a block of data from the EEPROM device selected.
-  * @param  pBuffer  pointer to the buffer that receives the data read from 
-  *         the EEPROM.
-  * @param  ReadAddr  EEPROM's internal address to start reading from.
-  * @param  NumByteToRead  pointer to the variable holding number of bytes to 
-  *         be read from the EEPROM.
-  * 
-  *        @note The variable pointed by NumByteToRead is reset to 0 when all the 
-  *              data are read from the EEPROM. Application should monitor this 
-  *              variable in order know when the transfer is complete.
-  * 
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-uint32_t BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint32_t* NumByteToRead)
-{
-  if(EEPROM_SelectedDevice->ReadBuffer != 0)
-  {
-    return (EEPROM_SelectedDevice->ReadBuffer(pBuffer, ReadAddr, NumByteToRead));
-  }
-  else
-  {
-    return EEPROM_FAIL;
-  }
-}
-
-/**
-  * @brief  Writes buffer of data to the EEPROM device selected.
-  * @param  pBuffer  pointer to the buffer  containing the data to be written 
-  *         to the EEPROM.
-  * @param  WriteAddr  EEPROM's internal address to write to.
-  * @param  NumByteToWrite  number of bytes to write to the EEPROM.
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-uint32_t BSP_EEPROM_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint32_t NumByteToWrite)
-{
-  uint16_t numofpage = 0, numofsingle = 0, count = 0;
-  uint16_t addr = 0;
-  uint32_t dataindex = 0;
-  uint32_t status = EEPROM_OK;
-
-  addr = WriteAddr % EEPROMPageSize;
-  count = EEPROMPageSize - addr;
-  numofpage =  NumByteToWrite / EEPROMPageSize;
-  numofsingle = NumByteToWrite % EEPROMPageSize;
-
-  if(EEPROM_SelectedDevice->WritePage == 0)
-  {
-    return EEPROM_FAIL;
-  }
-  
-  /*!< If WriteAddr is EEPROM_PAGESIZE aligned  */
-  if(addr == 0) 
-  {
-    /*!< If NumByteToWrite < EEPROM_PAGESIZE */
-    if(numofpage == 0) 
-    {
-      /* Store the number of data to be written */
-      dataindex = numofsingle;
-      /* Start writing data */
-      status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-      if (status != EEPROM_OK)
-      {
-        return status;
-      }
-    }
-    /*!< If NumByteToWrite > EEPROM_PAGESIZE */
-    else  
-    {
-      while(numofpage--)
-      {
-        /* Store the number of data to be written */
-        dataindex = EEPROMPageSize;        
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-        
-        WriteAddr +=  EEPROMPageSize;
-        pBuffer += EEPROMPageSize;
-      }
-
-      if(numofsingle!=0)
-      {
-        /* Store the number of data to be written */
-        dataindex = numofsingle;          
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-      }
-    }
-  }
-  /*!< If WriteAddr is not EEPROM_PAGESIZE aligned  */
-  else 
-  {
-    /*!< If NumByteToWrite < EEPROM_PAGESIZE */
-    if(numofpage== 0) 
-    {
-      /*!< If the number of data to be written is more than the remaining space 
-      in the current page: */
-      if (NumByteToWrite > count)
-      {
-        /* Store the number of data to be written */
-        dataindex = count;        
-        /*!< Write the data contained in same page */
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-        
-        /* Store the number of data to be written */
-        dataindex = (NumByteToWrite - count);          
-        /*!< Write the remaining data in the following page */
-        status = EEPROM_SelectedDevice->WritePage((uint8_t*)(pBuffer + count), (WriteAddr + count), (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-      }
-      else      
-      {
-        /* Store the number of data to be written */
-        dataindex = numofsingle;         
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-      }
-    }
-    /*!< If NumByteToWrite > EEPROM_PAGESIZE */
-    else
-    {
-      NumByteToWrite -= count;
-      numofpage =  NumByteToWrite / EEPROMPageSize;
-      numofsingle = NumByteToWrite % EEPROMPageSize;
-      
-      if(count != 0)
-      {  
-        /* Store the number of data to be written */
-        dataindex = count;         
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-        WriteAddr += count;
-        pBuffer += count;
-      } 
-      
-      while(numofpage--)
-      {
-        /* Store the number of data to be written */
-        dataindex = EEPROMPageSize;          
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-        WriteAddr +=  EEPROMPageSize;
-        pBuffer += EEPROMPageSize;  
-      }
-      if(numofsingle != 0)
-      {
-        /* Store the number of data to be written */
-        dataindex = numofsingle;           
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-      }
-    }
-  }
-  
-  /* If all operations OK, return EEPROM_OK (0) */
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Basic management of the timeout situation.
-  * @retval None.
-  */
-__weak void BSP_EEPROM_TIMEOUT_UserCallback(void)
-{
-}
-/**
-  * @}
-  */
-
-/** @addtogroup STM32072B_EVAL_EEPROM_Private_Functions
-  * @{
-  */ 
-
-/**
-  * @brief  Initializes peripherals used by the I2C EEPROM driver.
-  * 
-  * @note There are 2 different versions of M24LR64 (A01 & A02).
-  *             Then try to connect on 1st one (EEPROM_I2C_ADDRESS_A01) 
-  *             and if problem, check the 2nd one (EEPROM_I2C_ADDRESS_A02)
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0)
-  */
-static uint32_t EEPROM_I2C_Init(void)
-{
-  EEPROM_IO_Init();
-
-  /*Select the EEPROM address for M24LR64 A02 and check if OK*/
-  EEPROMAddress = EEPROM_ADDRESS_M24LR64_A01;
-  EEPROMPageSize = EEPROM_PAGESIZE_M24LR64;
-  if (EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK) 
-  {
-    /*Select the EEPROM address for M24LR64 A01 and check if OK*/
-    EEPROMAddress = EEPROM_ADDRESS_M24LR64_A02;
-    EEPROMPageSize = EEPROM_PAGESIZE_M24LR64;
-    if (EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK) 
-    {
-      return EEPROM_FAIL;
-    }
-  }
-
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Reads a block of data from the I2C EEPROM.
-  * @param  pBuffer  pointer to the buffer that receives the data read from 
-  *         the EEPROM.
-  * @param  ReadAddr  EEPROM's internal address to start reading from.
-  * @param  NumByteToRead  pointer to the variable holding number of bytes to 
-  *         be read from the EEPROM.
-  * 
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-static uint32_t EEPROM_I2C_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint32_t* NumByteToRead)
-{  
-  uint32_t buffersize = *NumByteToRead;
-  
-  if (EEPROM_IO_ReadData(EEPROMAddress, ReadAddr, pBuffer, buffersize) != HAL_OK)
-  {
-    return EEPROM_FAIL;
-  }
-  
-  /* If all operations OK, return EEPROM_OK (0) */
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Writes more than one byte to the EEPROM with a single WRITE cycle.
-  *
-  * @note   The number of bytes (combined to write start address) must not 
-  *         cross the EEPROM page boundary. This function can only write into
-  *         the boundaries of an EEPROM page.
-  *         This function doesn't check on boundaries condition (in this driver 
-  *         the function BSP_EEPROM_WriteBuffer() which calls EEPROM_WritePage() is 
-  *         responsible of checking on Page boundaries).
-  * 
-  * @param  pBuffer  pointer to the buffer containing the data to be written to 
-  *         the EEPROM.
-  * @param  WriteAddr  EEPROM's internal address to write to.
-  * @param  NumByteToWrite  pointer to the variable holding number of bytes to 
-  *         be written into the EEPROM. 
-  * 
-  *        @note The variable pointed by NumByteToWrite is reset to 0 when all the 
-  *              data are written to the EEPROM. Application should monitor this 
-  *              variable in order know when the transfer is complete.
-  * 
-  * 
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-static uint32_t EEPROM_I2C_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint32_t* NumByteToWrite)
-{ 
-  uint32_t buffersize = *NumByteToWrite;
-
-  if (EEPROM_IO_WriteData(EEPROMAddress, WriteAddr, pBuffer, buffersize) != HAL_OK)
-  {
-    return EEPROM_FAIL;
-  }
-  
-  /* Wait for EEPROM Standby state */
-  if (EEPROM_I2C_WaitEepromStandbyState() != EEPROM_OK) 
-  {
-    return EEPROM_FAIL;
-  }
-  
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Wait for EEPROM I2C Standby state.
-  * 
-  * @note  This function allows to wait and check that EEPROM has finished the 
-  *        last operation. It is mostly used after Write operation: after receiving
-  *        the buffer to be written, the EEPROM may need additional time to actually
-  *        perform the write operation. During this time, it doesn't answer to
-  *        I2C packets addressed to it. Once the write operation is complete
-  *        the EEPROM responds to its address.
-  * 
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-static uint32_t EEPROM_I2C_WaitEepromStandbyState(void)  
-{
-  /* Check if the maximum allowed number of trials has bee reached */
-  if (EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK)
-  {
-    /* If the maximum number of trials has been reached, exit the function */
-    BSP_EEPROM_TIMEOUT_UserCallback();
-    return EEPROM_TIMEOUT;
-  }
-  return EEPROM_OK;
-}
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */  
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 146
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_eeprom.h

@@ -1,146 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32072b_eval_eeprom.h
-  * @author  MCD Application Team
-  * @brief   This file contains all the functions prototypes for 
-  *          the stm32072b_eval_eeprom.c firmware driver.
-  ******************************************************************************
-  * @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 __STM32072B_EVAL_EEPROM_H
-#define __STM32072B_EVAL_EEPROM_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32072b_eval.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32072B_EVAL
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_EEPROM STM32072B_EVAL EEPROM
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_EEPROM_Exported_Types Exported Types
-  * @{
-  */ 
-typedef struct
-{
-  uint32_t  (*Init)(void);
-  uint32_t  (*ReadBuffer)(uint8_t* , uint16_t , uint32_t* );
-  uint32_t  (*WritePage)(uint8_t* , uint16_t , uint32_t* );
-}EEPROM_DrvTypeDef;
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_EEPROM_Exported_Constants Exported Constants
-  * @{
-  */
-/* EEPROMs hardware address and page size */ 
-#define EEPROM_ADDRESS_M24LR64_A01      0xA0    /* RF EEPROM ANT7-M24LR-A01 used */
-#define EEPROM_ADDRESS_M24LR64_A02      0xA6    /* RF EEPROM ANT7-M24LR-A02 used */
-
-#define EEPROM_PAGESIZE_M24LR64         4       /* RF EEPROM ANT7-M24LR-A used */
-      
-/* EEPROM BSP return values */
-#define EEPROM_OK                       0
-#define EEPROM_FAIL                     1   
-#define EEPROM_TIMEOUT                  2   
- 
-/* EEPROM BSP devices definition list supported */
-#define BSP_EEPROM_M24LR64              1       /* RF I2C EEPROM M24LR64 */
-
-/* Maximum number of trials for EEPROM_I2C_WaitEepromStandbyState() function */
-#define EEPROM_MAX_TRIALS               300
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_EEPROM_Exported_Functions Exported Functions
-  * @{
-  */
-uint32_t          BSP_EEPROM_Init(void);
-uint32_t          BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint32_t* NumByteToRead);
-uint32_t          BSP_EEPROM_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint32_t NumByteToWrite);
-
-/* USER Callbacks: This function is declared as __weak in EEPROM driver and 
-   should be implemented into user application.  
-   BSP_EEPROM_TIMEOUT_UserCallback() function is called whenever a timeout condition 
-   occure during communication (waiting on an event that doesn't occur, bus 
-   errors, busy devices ...). */
-void              BSP_EEPROM_TIMEOUT_UserCallback(void);
-
-/**
-  * @}
-  */
-  
-/** @defgroup STM32072B_EVAL_EEPROM_LINK_Operations_Functions LINK Operations Functions
-  * @{
-  */  
-
-/* Link functions for I2C EEPROM peripheral */
-void              EEPROM_IO_Init(void);
-HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32072B_EVAL_EEPROM_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 932
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_lcd.c

@@ -1,932 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32072b_eval_lcd.c
-  * @author  MCD Application Team
-  * @brief   This file includes the driver for Liquid Crystal Display modules
-  *          mounted on STM32072B-EVAL evaluation board.
-  ******************************************************************************
-  * @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.
-  *
-  ******************************************************************************
-  */ 
-
-/* File Info : -----------------------------------------------------------------
-                                   User NOTES
-1. How To use this driver:
---------------------------
-   - This driver is used to drive indirectly an LCD TFT.
-   - This driver supports the AM-240320LDTNQW00H (SPFD5408D) and 
-     AM240320LGTNQW00H (HX8347D) LCD mounted on MB895 daughter board 
-   - The SPFD5408D and HX8347D components driver MUST be included with this driver.  
-
-2. Driver description:
----------------------
-  + Initialization steps:
-     o Initialize the LCD using the LCD_Init() function.
-  
-  + Display on LCD
-     o Clear the hole LCD using yhe LCD_Clear() function or only one specified 
-       string line using the LCD_ClearStringLine() function.
-     o Display a character on the specified line and column using the LCD_DisplayChar()
-       function or a complete string line using the LCD_DisplayStringAtLine() function.
-     o Display a string line on the specified position (x,y in pixel) and align mode
-       using the LCD_DisplayStringAtLine() function.          
-     o Draw and fill a basic shapes (dot, line, rectangle, circle, ellipse, .. bitmap) 
-       on LCD using a set of functions.    
- 
-------------------------------------------------------------------------------*/
-    
-/* Includes ------------------------------------------------------------------*/
-#include "stm32072b_eval_lcd.h"
-#include "../../../Utilities/Fonts/fonts.h"
-#include "../../../Utilities/Fonts/font24.c"
-#include "../../../Utilities/Fonts/font20.c"
-#include "../../../Utilities/Fonts/font16.c"
-#include "../../../Utilities/Fonts/font12.c"
-#include "../../../Utilities/Fonts/font8.c"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32072B_EVAL
-  * @{
-  */
-    
-/** @addtogroup STM32072B_EVAL_LCD
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_LCD_Private_Constants Private Constants
-  * @{
-  */
-#define POLY_X(Z)               ((int32_t)((pPoints + (Z))->X))
-#define POLY_Y(Z)               ((int32_t)((pPoints + (Z))->Y))
-
-#define MAX_HEIGHT_FONT         17
-#define MAX_WIDTH_FONT          24
-#define OFFSET_BITMAP           54
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32072B_EVAL_LCD_Private_Macros Private Macros
-  * @{
-  */
-#define ABS(X)  ((X) > 0 ? (X) : -(X)) 
-
-/**
-  * @}
-  */ 
-    
-/** @defgroup STM32072B_EVAL_LCD_Private_Variables Private Variables
-  * @{
-  */ 
-LCD_DrawPropTypeDef DrawProp;
-
-static LCD_DrvTypeDef  *lcd_drv;
-
-/* Max size of bitmap will based on a font24 (17x24) */
-static uint8_t bitmap[MAX_HEIGHT_FONT*MAX_WIDTH_FONT*2+OFFSET_BITMAP] = {0};
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32072B_EVAL_LCD_Private_Functions Private Functions
-  * @{
-  */ 
-static void LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGBCode);
-static void LCD_DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *pChar);
-static void LCD_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32072B_EVAL_LCD_Exported_Functions
-  * @{
-  */ 
-
-/**
-  * @brief  Initializes the LCD.
-  * @retval LCD state
-  */
-uint8_t BSP_LCD_Init(void)
-{ 
-  uint8_t ret = LCD_ERROR;
-  
-  /* Default value for draw propriety */
-  DrawProp.BackColor = 0xFFFF;
-  DrawProp.pFont     = &Font24;
-  DrawProp.TextColor = 0x0000;
-  
-  if(spfd5408_drv.ReadID() == SPFD5408_ID)
-  {
-    lcd_drv = &spfd5408_drv;
-    ret = LCD_OK;
-  }
-  else
-  {
-    /*HX8347D_ID connected*/
-  lcd_drv = &hx8347d_drv;
-  ret = LCD_OK;
-  }
-
-  if(ret != LCD_ERROR)
-  {
-    /* LCD Init */   
-    lcd_drv->Init();
-    
-    /* Initialize the font */
-    BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
-  }
-  
-  return ret;
-}
-
-/**
-  * @brief  Gets the LCD X size.  
-  * @retval Used LCD X size
-  */
-uint32_t BSP_LCD_GetXSize(void)
-{
-  return(lcd_drv->GetLcdPixelWidth());
-}
-
-/**
-  * @brief  Gets the LCD Y size.  
-  * @retval Used LCD Y size
-  */
-uint32_t BSP_LCD_GetYSize(void)
-{
-  return(lcd_drv->GetLcdPixelHeight());
-}
-
-/**
-  * @brief  Gets the LCD text color.
-  * @retval Used text color.
-  */
-uint16_t BSP_LCD_GetTextColor(void)
-{
-  return DrawProp.TextColor;
-}
-
-/**
-  * @brief  Gets the LCD background color.
-  * @retval Used background color
-  */
-uint16_t BSP_LCD_GetBackColor(void)
-{
-  return DrawProp.BackColor;
-}
-
-/**
-  * @brief  Sets the LCD text color.
-  * @param  Color Text color code RGB(5-6-5)
-  * @retval None
-  */
-void BSP_LCD_SetTextColor(uint16_t Color)
-{
-  DrawProp.TextColor = Color;
-}
-
-/**
-  * @brief  Sets the LCD background color.
-  * @param  Color Background color code RGB(5-6-5)
-  * @retval None
-  */
-void BSP_LCD_SetBackColor(uint16_t Color)
-{
-  DrawProp.BackColor = Color;
-}
-
-/**
-  * @brief  Sets the LCD text font.
-  * @param  pFonts Font to be used
-  * @retval None
-  */
-void BSP_LCD_SetFont(sFONT *pFonts)
-{
-  DrawProp.pFont = pFonts;
-}
-
-/**
-  * @brief  Gets the LCD text font.
-  * @retval Used font
-  */
-sFONT *BSP_LCD_GetFont(void)
-{
-  return DrawProp.pFont;
-}
-
-/**
-  * @brief  Clears the hole LCD.
-  * @param  Color Color of the background
-  * @retval None
-  */
-void BSP_LCD_Clear(uint16_t Color)
-{ 
-  uint32_t counter = 0;
-  
-  uint32_t color_backup = DrawProp.TextColor; 
-  DrawProp.TextColor = Color;
-  
-  for(counter = 0; counter < BSP_LCD_GetYSize(); counter++)
-  {
-    BSP_LCD_DrawHLine(0, counter, BSP_LCD_GetXSize());
-  }
-
-  DrawProp.TextColor = color_backup; 
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-}
-
-/**
-  * @brief  Clears the selected line.
-  * @param  Line Line to be cleared
-  *          This parameter can be one of the following values:
-  *            @arg  0..9: if the Current fonts is Font16x24
-  *            @arg  0..19: if the Current fonts is Font12x12 or Font8x12
-  *            @arg  0..29: if the Current fonts is Font8x8
-  * @retval None
-  */
-void BSP_LCD_ClearStringLine(uint16_t Line)
-{ 
-  uint32_t colorbackup = DrawProp.TextColor; 
-  DrawProp.TextColor = DrawProp.BackColor;;
-    
-  /* Draw a rectangle with background color */
-  BSP_LCD_FillRect(0, (Line * DrawProp.pFont->Height), BSP_LCD_GetXSize(), DrawProp.pFont->Height);
-  
-  DrawProp.TextColor = colorbackup;
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-}
-
-/**
-  * @brief  Displays one character.
-  * @param  Xpos Start column address
-  * @param  Ypos Line where to display the character shape.
-  * @param  Ascii Character ascii code
-  *           This parameter must be a number between Min_Data = 0x20 and Max_Data = 0x7E 
-  * @retval None
-  */
-void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii)
-{
-  LCD_DrawChar(Ypos, Xpos, &DrawProp.pFont->table[(Ascii-' ') *\
-    DrawProp.pFont->Height * ((DrawProp.pFont->Width + 7) / 8)]);
-}
-
-/**
-  * @brief  Displays characters on the LCD.
-  * @param  Xpos X position (in pixel)
-  * @param  Ypos Y position (in pixel)   
-  * @param  pText Pointer to string to display on LCD
-  * @param  Mode Display mode
-  *          This parameter can be one of the following values:
-  *            @arg  CENTER_MODE
-  *            @arg  RIGHT_MODE
-  *            @arg  LEFT_MODE   
-  * @retval None
-  */
-void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *pText, Line_ModeTypdef Mode)
-{
-  uint16_t refcolumn = 1, counter = 0;
-  uint32_t size = 0, ysize = 0; 
-  uint8_t  *ptr = pText;
-
-  /* Get the text size */
-  while (*ptr++) size ++ ;
-  
-  /* Characters number per line */
-  ysize = (BSP_LCD_GetXSize()/DrawProp.pFont->Width);
-  
-  switch (Mode)
-  {
-  case CENTER_MODE:
-    {
-      refcolumn = Xpos + ((ysize - size)* DrawProp.pFont->Width) / 2;
-      break;
-    }
-  case LEFT_MODE:
-    {
-      refcolumn = Xpos;
-      break;
-    }
-  case RIGHT_MODE:
-    {
-      refcolumn = Xpos + ((ysize - size)*DrawProp.pFont->Width);
-      break;
-    }    
-  default:
-    {
-      refcolumn = Xpos;
-      break;
-    }
-  }
-  
-  /* Send the string character by character on lCD */
-  while ((*pText != 0) & (((BSP_LCD_GetXSize() - (counter*DrawProp.pFont->Width)) & 0xFFFF) >= DrawProp.pFont->Width))
-  {
-    /* Display one character on LCD */
-    BSP_LCD_DisplayChar(refcolumn, Ypos, *pText);
-    /* Decrement the column position by 16 */
-    refcolumn += DrawProp.pFont->Width;
-    /* Point on the next character */
-    pText++;
-    counter++;
-  }
-}
-
-/**
-  * @brief  Displays a character on the LCD.
-  * @param  Line Line where to display the character shape
-  *          This parameter can be one of the following values:
-  *            @arg  0..9: if the Current fonts is Font16x24  
-  *            @arg  0..19: if the Current fonts is Font12x12 or Font8x12
-  *            @arg  0..29: if the Current fonts is Font8x8
-  * @param  pText Pointer to string to display on LCD
-  * @retval None
-  */
-void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *pText)
-{
-  BSP_LCD_DisplayStringAt(0, LINE(Line),pText, LEFT_MODE);
-}
-
-/**
-  * @brief  Reads an LCD pixel.
-  * @param  Xpos X position 
-  * @param  Ypos Y position 
-  * @retval RGB pixel color
-  */
-uint16_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos)
-{
-  uint16_t ret = 0;
-  
-  if(lcd_drv->ReadPixel != NULL)
-  {
-    ret = lcd_drv->ReadPixel(Xpos, Ypos);
-  }
-    
-  return ret;
-}
-
-/**
-  * @brief  Draws an horizontal line.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Length Line length
-  * @retval None
-  */
-void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint32_t index = 0;
-  
-  if(lcd_drv->DrawHLine != NULL)
-  {
-    lcd_drv->DrawHLine(DrawProp.TextColor, Ypos, Xpos, Length);
-  }
-  else
-  {
-    for(index = 0; index < Length; index++)
-    {
-      LCD_DrawPixel((Ypos + index), Xpos, DrawProp.TextColor);
-    }
-  }
-}
-
-/**
-  * @brief  Draws a vertical line.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Length Line length
-  * @retval None
-  */
-void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint32_t index = 0;
-  
-  if(lcd_drv->DrawVLine != NULL)
-  {
-    LCD_SetDisplayWindow(Ypos, Xpos, 1, Length);
-    lcd_drv->DrawVLine(DrawProp.TextColor, Ypos, Xpos, Length);
-    LCD_SetDisplayWindow(0, 0, BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
-  }
-  else
-  {
-    for(index = 0; index < Length; index++)
-    {
-      LCD_DrawPixel(Ypos, Xpos + index, DrawProp.TextColor);
-    }
-  }
-}
-
-/**
-  * @brief  Draws an uni-line (between two points).
-  * @param  X1 Point 1 X position
-  * @param  Y1 Point 1 Y position
-  * @param  X2 Point 2 X position
-  * @param  Y2 Point 2 Y position
-  * @retval None
-  */
-void BSP_LCD_DrawLine(uint16_t X1, uint16_t Y1, uint16_t X2, uint16_t Y2)
-{
-  int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0, 
-  yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0, 
-  curpixel = 0;
-
-  deltax = ABS(Y2 - Y1);        /* The difference between the x's */
-  deltay = ABS(X2 - X1);        /* The difference between the y's */
-  x = Y1;                       /* Start x off at the first pixel */
-  y = X1;                       /* Start y off at the first pixel */
-  
-  if (Y2 >= Y1)                 /* The x-values are increasing */
-  {
-    xinc1 = 1;
-    xinc2 = 1;
-  }
-  else                          /* The x-values are decreasing */
-  {
-    xinc1 = -1;
-    xinc2 = -1;
-  }
-  
-  if (X2 >= X1)                 /* The y-values are increasing */
-  {
-    yinc1 = 1;
-    yinc2 = 1;
-  }
-  else                          /* The y-values are decreasing */
-  {
-    yinc1 = -1;
-    yinc2 = -1;
-  }
-  
-  if (deltax >= deltay)         /* There is at least one x-value for every y-value */
-  {
-    xinc1 = 0;                  /* Don't change the x when numerator >= denominator */
-    yinc2 = 0;                  /* Don't change the y for every iteration */
-    den = deltax;
-    num = deltax / 2;
-    numadd = deltay;
-    numpixels = deltax;         /* There are more x-values than y-values */
-  }
-  else                          /* There is at least one y-value for every x-value */
-  {
-    xinc2 = 0;                  /* Don't change the x for every iteration */
-    yinc1 = 0;                  /* Don't change the y when numerator >= denominator */
-    den = deltay;
-    num = deltay / 2;
-    numadd = deltax;
-    numpixels = deltay;         /* There are more y-values than x-values */
-  }
-  
-  for (curpixel = 0; curpixel <= numpixels; curpixel++)
-  {
-    LCD_DrawPixel(x, y, DrawProp.TextColor);  /* Draw the current pixel */
-    num += numadd;                            /* Increase the numerator by the top of the fraction */
-    if (num >= den)                           /* Check if numerator >= denominator */
-    {
-      num -= den;                             /* Calculate the new numerator value */
-      x += xinc1;                             /* Change the x as appropriate */
-      y += yinc1;                             /* Change the y as appropriate */
-    }
-    x += xinc2;                               /* Change the x as appropriate */
-    y += yinc2;                               /* Change the y as appropriate */
-  }
-}
-
-/**
-  * @brief  Draws a rectangle.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Width Rectangle width  
-  * @param  Height Rectangle height
-  * @retval None
-  */
-void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  /* Draw horizontal lines */
-  BSP_LCD_DrawHLine(Xpos, Ypos, Width);
-  BSP_LCD_DrawHLine(Xpos, (Ypos+ Height), Width);
-  
-  /* Draw vertical lines */
-  BSP_LCD_DrawVLine(Xpos, Ypos, Height);
-  BSP_LCD_DrawVLine((Xpos + Width), Ypos, Height);
-}
-                            
-/**
-  * @brief  Draws a circle.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Radius Circle radius
-  * @retval None
-  */
-void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
-{
-  int32_t  decision;       /* Decision Variable */ 
-  uint32_t  curx;   /* Current X Value */
-  uint32_t  cury;   /* Current Y Value */ 
-
-  decision = 3 - (Radius << 1);
-  curx = 0;
-  cury = Radius;
-  
-  while (curx <= cury)
-  {
-    LCD_DrawPixel((Ypos + curx), (Xpos - cury), DrawProp.TextColor);
-
-    LCD_DrawPixel((Ypos - curx), (Xpos - cury), DrawProp.TextColor);
-
-    LCD_DrawPixel((Ypos + cury), (Xpos - curx), DrawProp.TextColor);
-
-    LCD_DrawPixel((Ypos - cury), (Xpos - curx), DrawProp.TextColor);
-
-    LCD_DrawPixel((Ypos + curx), (Xpos + cury), DrawProp.TextColor);
-
-    LCD_DrawPixel((Ypos - curx), (Xpos + cury), DrawProp.TextColor);
-
-    LCD_DrawPixel((Ypos + cury), (Xpos + curx), DrawProp.TextColor);
-
-    LCD_DrawPixel((Ypos - cury), (Xpos + curx), DrawProp.TextColor);   
-
-    /* Initialize the font */
-    BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
-
-    if (decision < 0)
-    { 
-      decision += (curx << 2) + 6;
-    }
-    else
-    {
-      decision += ((curx - cury) << 2) + 10;
-      cury--;
-    }
-    curx++;
-  } 
-}
-
-/**
-  * @brief  Draws an poly-line (between many points).
-  * @param  pPoints Pointer to the points array
-  * @param  PointCount Number of points
-  * @retval None
-  */
-void BSP_LCD_DrawPolygon(pPoint pPoints, uint16_t PointCount)
-{
-  int16_t x = 0, y = 0;
-
-  if(PointCount < 2)
-  {
-    return;
-  }
-
-  BSP_LCD_DrawLine(pPoints->X, pPoints->Y, (pPoints+PointCount-1)->X, (pPoints+PointCount-1)->Y);
-  
-  while(--PointCount)
-  {
-    x = pPoints->X;
-    y = pPoints->Y;
-    pPoints++;
-    BSP_LCD_DrawLine(x, y, pPoints->X, pPoints->Y);
-  }
-  
-}
-
-/**
-  * @brief  Draws an ellipse on LCD.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  XRadius Ellipse X radius
-  * @param  YRadius Ellipse Y radius
-  * @retval None
-  */
-void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius)
-{
-  int x = 0, y = -XRadius, err = 2-2*YRadius, e2;
-  float k = 0, rad1 = 0, rad2 = 0;
-
-  rad1 = YRadius;
-  rad2 = XRadius;
-  
-  k = (float)(rad2/rad1);
-  
-  do {      
-    LCD_DrawPixel((Ypos-(uint16_t)(x/k)), (Xpos+y), DrawProp.TextColor);
-    LCD_DrawPixel((Ypos+(uint16_t)(x/k)), (Xpos+y), DrawProp.TextColor);
-    LCD_DrawPixel((Ypos+(uint16_t)(x/k)), (Xpos-y), DrawProp.TextColor);
-    LCD_DrawPixel((Ypos-(uint16_t)(x/k)), (Xpos-y), DrawProp.TextColor);      
-    
-    e2 = err;
-    if (e2 <= x) {
-      err += ++x*2+1;
-      if (-y == x && e2 <= y) e2 = 0;
-    }
-    if (e2 > y) err += ++y*2+1;     
-  }
-  while (y <= 0);
-}
-
-/**
-  * @brief  Draws a bitmap picture loaded in the internal Flash (32 bpp).
-  * @param  Xpos Bmp X position in the LCD
-  * @param  Ypos Bmp Y position in the LCD
-  * @param  pBmp Pointer to Bmp picture address in the internal Flash
-  * @retval None
-  */
-void BSP_LCD_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pBmp)
-{
-  uint32_t height = 0, width  = 0;
-  
-  /* Read bitmap width */
-  width = *(uint16_t *) (pBmp + 18);
-  width |= (*(uint16_t *) (pBmp + 20)) << 16;
-  
-  /* Read bitmap height */
-  height = *(uint16_t *) (pBmp + 22);
-  height |= (*(uint16_t *) (pBmp + 24)) << 16; 
-  
-  /* Remap Ypos, hx8347d works with inverted X in case of bitmap */
-  /* X = 0, cursor is on Bottom corner */
-  if(lcd_drv == &hx8347d_drv)
-  {
-    Ypos = BSP_LCD_GetYSize() - Ypos - height;
-  }
-  
-  LCD_SetDisplayWindow(Ypos, Xpos, width, height);
-  
-  if(lcd_drv->DrawBitmap != NULL)
-  {
-    lcd_drv->DrawBitmap(Ypos, Xpos, pBmp);
-  } 
-  LCD_SetDisplayWindow(0, 0, BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
-}
-
-/**
-  * @brief  Draws a full rectangle.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Width Rectangle width  
-  * @param  Height Rectangle height
-  * @retval None
-  */
-void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-  do
-  {
-    BSP_LCD_DrawHLine(Xpos, Ypos++, Width);    
-  }
-  while(Height--);
-}
-
-/**
-  * @brief  Draws a full circle.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Radius Circle radius
-  * @retval None
-  */
-void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
-{
-  int32_t  decision;        /* Decision Variable */ 
-  uint32_t  curx;    /* Current X Value */
-  uint32_t  cury;    /* Current Y Value */ 
-
-  decision = 3 - (Radius << 1);
-
-  curx = 0;
-  cury = Radius;
-  
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-
-  while (curx <= cury)
-  {
-    if(cury > 0) 
-    {
-      BSP_LCD_DrawVLine(Xpos + curx, Ypos - cury, 2*cury);
-      BSP_LCD_DrawVLine(Xpos - curx, Ypos - cury, 2*cury);
-    }
-
-    if(curx > 0) 
-    {
-      BSP_LCD_DrawVLine(Xpos - cury, Ypos - curx, 2*curx);
-      BSP_LCD_DrawVLine(Xpos + cury, Ypos - curx, 2*curx);
-    }
-    if (decision < 0)
-    { 
-      decision += (curx << 2) + 6;
-    }
-    else
-    {
-      decision += ((curx - cury) << 2) + 10;
-      cury--;
-    }
-    curx++;
-  }
-
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-  BSP_LCD_DrawCircle(Xpos, Ypos, Radius);
-}
-
-/**
-  * @brief  Draws a full ellipse.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  XRadius Ellipse X radius
-  * @param  YRadius Ellipse Y radius  
-  * @retval None
-  */
-void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius)
-{
-  int x = 0, y = -XRadius, err = 2-2*YRadius, e2;
-  float k = 0, rad1 = 0, rad2 = 0;
-
-  rad1 = YRadius;
-  rad2 = XRadius;
-  
-  k = (float)(rad2/rad1);    
-  
-  do 
-  { 
-    BSP_LCD_DrawVLine((Xpos+y), (Ypos-(uint16_t)(x/k)), (2*(uint16_t)(x/k) + 1));
-    BSP_LCD_DrawVLine((Xpos-y), (Ypos-(uint16_t)(x/k)), (2*(uint16_t)(x/k) + 1));
-    
-    e2 = err;
-    if (e2 <= x) 
-    {
-      err += ++x*2+1;
-      if (-y == x && e2 <= y) e2 = 0;
-    }
-    if (e2 > y) err += ++y*2+1;
-  }
-  while (y <= 0);
-}
-
-/**
-  * @brief  Enables the display.
-  * @retval None
-  */
-void BSP_LCD_DisplayOn(void)
-{
-  lcd_drv->DisplayOn();
-}
-
-/**
-  * @brief  Disables the display.
-  * @retval None
-  */
-void BSP_LCD_DisplayOff(void)
-{
-  lcd_drv->DisplayOff();
-}
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_LCD_Private_Functions Private Functions
-  * @{
-  */
-/******************************************************************************
-                            Static Function
-*******************************************************************************/
-/**
-  * @brief  Draws a pixel on LCD.
-  * @param  Xpos X position 
-  * @param  Ypos Y position
-  * @param  RGBCode Pixel color in RGB mode (5-6-5)  
-  * @retval None
-  */
-static void LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGBCode)
-{
-  if(lcd_drv->WritePixel != NULL)
-  {
-    lcd_drv->WritePixel(Xpos, Ypos, RGBCode);
-  }
-}
-
-/**
-  * @brief  Draws a character on LCD.
-  * @param  Xpos Line where to display the character shape
-  * @param  Ypos Start column address
-  * @param  pChar Pointer to the character data
-  * @retval None
-  */
-static void LCD_DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *pChar)
-{
-  uint32_t counterh = 0, counterw = 0, index = 0;
-  uint16_t height = 0, width = 0;
-  uint8_t offset = 0;
-  uint8_t *pchar = NULL;
-  uint32_t line = 0;
-
-  height = DrawProp.pFont->Height;
-  width  = DrawProp.pFont->Width;
-  
-  /* Fill bitmap header*/
-  *(uint16_t *) (bitmap + 2) = (uint16_t)(height*width*2+OFFSET_BITMAP);
-  *(uint16_t *) (bitmap + 4) = (uint16_t)((height*width*2+OFFSET_BITMAP)>>16);
-  *(uint16_t *) (bitmap + 10) = OFFSET_BITMAP;
-  *(uint16_t *) (bitmap + 18) = (uint16_t)(width);
-  *(uint16_t *) (bitmap + 20) = (uint16_t)((width)>>16);
-  *(uint16_t *) (bitmap + 22) = (uint16_t)(height);
-  *(uint16_t *) (bitmap + 24) = (uint16_t)((height)>>16);
-
-  offset =  8 *((width + 7)/8) -  width ;
-
-  for(counterh = 0; counterh < height; counterh++)
-  {
-    pchar = ((uint8_t *)pChar + (width + 7)/8 * counterh);
-    
-    if(((width + 7)/8) == 3)
-    {
-      line =  (pchar[0]<< 16) | (pchar[1]<< 8) | pchar[2];
-    }
-    
-    if(((width + 7)/8) == 2)
-    {
-      line =  (pchar[0]<< 8) | pchar[1];
-    }
-    
-    if(((width + 7)/8) == 1)
-    {
-      line =  pchar[0];
-    }    
-    
-    for (counterw = 0; counterw < width; counterw++)
-    {
-      /* Image in the bitmap is written from the bottom to the top */
-      /* Need to invert image in the bitmap */
-      index = (((height-counterh-1)*width)+(counterw))*2+OFFSET_BITMAP;
-      if(line & (1 << (width- counterw + offset- 1))) 
-      {
-        bitmap[index] = (uint8_t)DrawProp.TextColor;
-        bitmap[index+1] = (uint8_t)(DrawProp.TextColor >> 8);
-      }
-      else
-      {
-        bitmap[index] = (uint8_t)DrawProp.BackColor;
-        bitmap[index+1] = (uint8_t)(DrawProp.BackColor >> 8);
-      } 
-    }
-  }
-
-  BSP_LCD_DrawBitmap(Ypos, Xpos, bitmap);
-}
-
-/**
-  * @brief  Sets display window.
-  * @param  Xpos LCD X position
-  * @param  Ypos LCD Y position
-  * @param  Width LCD window width
-  * @param  Height LCD window height  
-  * @retval None
-  */
-static void LCD_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  if(lcd_drv->SetDisplayWindow != NULL)
-  {
-    lcd_drv->SetDisplayWindow(Xpos, Ypos, Width, Height);
-  }  
-}
-
-/**
-  * @}
-  */  
-  
-/**
-  * @}
-  */ 
-  
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 203
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_lcd.h

@@ -1,203 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32072b_eval_lcd.h
-  * @author  MCD Application Team
-  * @brief   This file contains all the functions prototypes for the 
-  *          stm32072b_eval_lcd.c driver.
-  ******************************************************************************
-  * @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 __STM32072B_EVAL_LCD_H
-#define __STM32072B_EVAL_LCD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif 
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32072b_eval.h" 
-/* Include LCD component Driver */
-#include "../Components/hx8347d/hx8347d.h"   
-#include "../Components/spfd5408/spfd5408.h"   
-#include "../../../Utilities/Fonts/fonts.h"   
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32072B_EVAL
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_LCD STM32072B_EVAL LCD
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_LCD_Exported_Types Exported Types
-  * @{
-  */
-typedef struct 
-{ 
-  uint32_t TextColor; 
-  uint32_t BackColor;  
-  sFONT    *pFont; 
-
-}LCD_DrawPropTypeDef;   
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32072B_EVAL_LCD_Exported_Constants Exported Constants
-  * @{
-  */
-/** 
-  * @brief  LCD status structure definition  
-  */     
-#define   LCD_OK         0x00
-#define   LCD_ERROR      0x01
-#define   LCD_TIMEOUT    0x02
-    
-typedef struct 
-{
-  int16_t X;
-  int16_t Y;
-
-}Point, * pPoint; 
-
-/** 
-  * @brief  Line mode structures definition  
-  */ 
-typedef enum
-{
-  CENTER_MODE             = 0x01,    /*!< Center mode */
-  RIGHT_MODE              = 0x02,    /*!< Right mode  */     
-  LEFT_MODE               = 0x03     /*!< Left mode   */                                                                              
-
-}Line_ModeTypdef;
-
-/** 
-  * @brief  LCD color  
-  */ 
-#define LCD_COLOR_BLUE          0x001F
-#define LCD_COLOR_GREEN         0x07E0
-#define LCD_COLOR_RED           0xF800
-#define LCD_COLOR_CYAN          0x07FF
-#define LCD_COLOR_MAGENTA       0xF81F
-#define LCD_COLOR_YELLOW        0xFFE0
-#define LCD_COLOR_LIGHTBLUE     0x841F
-#define LCD_COLOR_LIGHTGREEN    0x87F0
-#define LCD_COLOR_LIGHTRED      0xFC10
-#define LCD_COLOR_LIGHTCYAN     0x87FF
-#define LCD_COLOR_LIGHTMAGENTA  0xFC1F
-#define LCD_COLOR_LIGHTYELLOW   0xFFF0
-#define LCD_COLOR_DARKBLUE      0x0010
-#define LCD_COLOR_DARKGREEN     0x0400
-#define LCD_COLOR_DARKRED       0x8000
-#define LCD_COLOR_DARKCYAN      0x0410
-#define LCD_COLOR_DARKMAGENTA   0x8010
-#define LCD_COLOR_DARKYELLOW    0x8400
-#define LCD_COLOR_WHITE         0xFFFF
-#define LCD_COLOR_LIGHTGRAY     0xD69A
-#define LCD_COLOR_GRAY          0x8410
-#define LCD_COLOR_DARKGRAY      0x4208
-#define LCD_COLOR_BLACK         0x0000
-#define LCD_COLOR_BROWN         0xA145
-#define LCD_COLOR_ORANGE        0xFD20
-
-/** 
-  * @brief LCD default font 
-  */ 
-#define LCD_DEFAULT_FONT         Font24
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_LCD_Exported_Functions Exported Functions
-  * @{
-  */   
-uint8_t  BSP_LCD_Init(void);
-uint32_t BSP_LCD_GetXSize(void);
-uint32_t BSP_LCD_GetYSize(void);
- 
-uint16_t BSP_LCD_GetTextColor(void);
-uint16_t BSP_LCD_GetBackColor(void);
-void     BSP_LCD_SetTextColor(__IO uint16_t Color);
-void     BSP_LCD_SetBackColor(__IO uint16_t Color);
-void     BSP_LCD_SetFont(sFONT *pFonts);
-sFONT    *BSP_LCD_GetFont(void);
-
-void     BSP_LCD_Clear(uint16_t Color);
-void     BSP_LCD_ClearStringLine(uint16_t Line);
-void     BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *pText);
-void     BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *pText, Line_ModeTypdef Mode);
-void     BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii);
-
-uint16_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos);
-void     BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void     BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void     BSP_LCD_DrawLine(uint16_t X1, uint16_t Y1, uint16_t X2, uint16_t Y2);
-void     BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-void     BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
-void     BSP_LCD_DrawPolygon(pPoint pPoints, uint16_t PointCount);
-void     BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
-void     BSP_LCD_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pBmp);
-
-void     BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-void     BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
-void     BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
-
-void     BSP_LCD_DisplayOff(void);
-void     BSP_LCD_DisplayOn(void);
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32072B_EVAL_LCD_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 1040
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_sd.c

@@ -1,1040 +0,0 @@
-/**
-******************************************************************************
-* @file    stm32072b_eval_sd.c
-* @author  MCD Application Team
-* @brief   This file provides a set of functions needed to manage the SPI SD 
-*          Card memory mounted on STM32072B-EVAL board.
-*          It implements a high level communication layer for read and write 
-*          from/to this memory. The needed STM32F0xx hardware resources (SPI and 
-*          GPIO) are defined in stm32072b_eval.h file, and the initialization is 
-*          performed in SD_IO_Init() function declared in stm32072b_eval.c 
-*          file.
-*          You can easily tailor this driver to any other development board, 
-*          by just adapting the defines for hardware resources and 
-*          SD_IO_Init() function.
-*            
-*          +-------------------------------------------------------+
-*          |                     Pin assignment                    |
-*          +-------------------------+---------------+-------------+
-*          |  STM32F0xx SPI Pins     |     SD        |    Pin      |
-*          +-------------------------+---------------+-------------+
-*          | SD_SPI_CS_PIN           |   ChipSelect  |    1        |
-*          | SD_SPI_MOSI_PIN / MOSI  |   DataIn      |    2        |
-*          |                         |   GND         |    3 (0 V)  |
-*          |                         |   VDD         |    4 (3.3 V)|
-*          | SD_SPI_SCK_PIN / SCLK   |   Clock       |    5        |
-*          |                         |   GND         |    6 (0 V)  |
-*          | SD_SPI_MISO_PIN / MISO  |   DataOut     |    7        |
-*          +-------------------------+---------------+-------------+
-******************************************************************************
-* @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.
-*
-******************************************************************************
-@verbatim
-  ==============================================================================
-                     ##### How to use this driver #####
-  ==============================================================================
-  [..] 
-   (#) This driver is used to drive the micro SD external card mounted on STM32072B-EVAL 
-       evaluation board.
-   (#) This driver does not need a specific component driver for the micro SD device
-       to be included with.
-
-   (#) Initialization steps:
-       (++) Initialize the micro SD card using the SD_Init() function. 
-       (++) To check the SD card presence you can use the function BSP_SD_IsDetected() which 
-            returns the detection status 
-       (++) The function BSP_SD_GetCardInfo() is used to get the micro SD card information 
-            which is stored in the structure "SD_CardInfo".
-
-   (#) Micro SD card operations
-       (++) The micro SD card can be accessed with read/write block(s) operations once 
-            it is reay for access. The access cand be performed in polling 
-            mode by calling the functions SD_ReadBlocks()/SD_WriteBlocks()
-       (++) The SD erase block(s) is performed using the function BSP_SD_Erase() with 
-            specifying the number of blocks to erase.
-       (++) The SD runtime status is returned when calling the function BSP_SD_GetStatus().
-
-  @endverbatim
-*/
-
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32072b_eval_sd.h"
-#include "stm32f0xx_hal.h"
-#include "stdlib.h"
-#include "string.h"
-#include "stdio.h"
-
-/** @addtogroup BSP
-* @{
-*/
-
-/** @addtogroup STM32072B_EVAL
-* @{
-*/ 
-
-/** @addtogroup STM32072B_EVAL_SD
-* @{
-*/ 
-
-/* Private typedef -----------------------------------------------------------*/
-
-/** @defgroup STM32072BEVAL_SD_Private_Types_Definitions Types Definitions
-  * @{
-  */ 
-typedef struct {
-  uint8_t r1;
-  uint8_t r2;
-  uint8_t r3;
-  uint8_t r4;
-  uint8_t r5;
-} SD_CmdAnswer_typedef;
-  
-/**
-  * @}
-  */
-
-/* Private define ------------------------------------------------------------*/
-
-/** @defgroup STM32072B_EVAL_SD_Private_Constants Private Constants
-* @{
-*/
-#define SD_DUMMY_BYTE            0xFF
-
-#define SD_MAX_FRAME_LENGTH        17    /* Lenght = 16 + 1 */
-#define SD_CMD_LENGTH               6
-
-#define SD_MAX_TRY                100    /* Number of try */
-
-#define SD_CSD_STRUCT_V1          0x2    /* CSD struct version V1 */
-#define SD_CSD_STRUCT_V2          0x1    /* CSD struct version V2 */
-
-
-/**
-  * @brief  SD ansewer format
-  */ 
-typedef enum {
- SD_ANSWER_R1_EXPECTED,
- SD_ANSWER_R1B_EXPECTED,
- SD_ANSWER_R2_EXPECTED,
- SD_ANSWER_R3_EXPECTED,
- SD_ANSWER_R4R5_EXPECTED,
- SD_ANSWER_R7_EXPECTED,
-}SD_Answer_type;
-
-/**
-  * @brief  Start Data tokens:
-  *         Tokens (necessary because at nop/idle (and CS active) only 0xff is 
-  *         on the data/command line)  
-  */ 
-#define SD_TOKEN_START_DATA_SINGLE_BLOCK_READ    0xFE  /* Data token start byte, Start Single Block Read */
-#define SD_TOKEN_START_DATA_MULTIPLE_BLOCK_READ  0xFE  /* Data token start byte, Start Multiple Block Read */
-#define SD_TOKEN_START_DATA_SINGLE_BLOCK_WRITE   0xFE  /* Data token start byte, Start Single Block Write */
-#define SD_TOKEN_START_DATA_MULTIPLE_BLOCK_WRITE 0xFD  /* Data token start byte, Start Multiple Block Write */
-#define SD_TOKEN_STOP_DATA_MULTIPLE_BLOCK_WRITE  0xFD  /* Data toke stop byte, Stop Multiple Block Write */
-
-/**
-  * @brief  Commands: CMDxx = CMD-number | 0x40
-  */
-#define SD_CMD_GO_IDLE_STATE          0   /* CMD0 = 0x40  */
-#define SD_CMD_SEND_OP_COND           1   /* CMD1 = 0x41  */
-#define SD_CMD_SEND_IF_COND           8   /* CMD8 = 0x48  */
-#define SD_CMD_SEND_CSD               9   /* CMD9 = 0x49  */
-#define SD_CMD_SEND_CID               10  /* CMD10 = 0x4A */
-#define SD_CMD_STOP_TRANSMISSION      12  /* CMD12 = 0x4C */
-#define SD_CMD_SEND_STATUS            13  /* CMD13 = 0x4D */
-#define SD_CMD_SET_BLOCKLEN           16  /* CMD16 = 0x50 */
-#define SD_CMD_READ_SINGLE_BLOCK      17  /* CMD17 = 0x51 */
-#define SD_CMD_READ_MULT_BLOCK        18  /* CMD18 = 0x52 */
-#define SD_CMD_SET_BLOCK_COUNT        23  /* CMD23 = 0x57 */
-#define SD_CMD_WRITE_SINGLE_BLOCK     24  /* CMD24 = 0x58 */
-#define SD_CMD_WRITE_MULT_BLOCK       25  /* CMD25 = 0x59 */
-#define SD_CMD_PROG_CSD               27  /* CMD27 = 0x5B */
-#define SD_CMD_SET_WRITE_PROT         28  /* CMD28 = 0x5C */
-#define SD_CMD_CLR_WRITE_PROT         29  /* CMD29 = 0x5D */
-#define SD_CMD_SEND_WRITE_PROT        30  /* CMD30 = 0x5E */
-#define SD_CMD_SD_ERASE_GRP_START     32  /* CMD32 = 0x60 */
-#define SD_CMD_SD_ERASE_GRP_END       33  /* CMD33 = 0x61 */
-#define SD_CMD_UNTAG_SECTOR           34  /* CMD34 = 0x62 */
-#define SD_CMD_ERASE_GRP_START        35  /* CMD35 = 0x63 */
-#define SD_CMD_ERASE_GRP_END          36  /* CMD36 = 0x64 */
-#define SD_CMD_UNTAG_ERASE_GROUP      37  /* CMD37 = 0x65 */
-#define SD_CMD_ERASE                  38  /* CMD38 = 0x66 */
-#define SD_CMD_SD_APP_OP_COND         41  /* CMD41 = 0x69 */
-#define SD_CMD_APP_CMD                55  /* CMD55 = 0x77 */
-#define SD_CMD_READ_OCR               58  /* CMD55 = 0x79 */
-
-/**
-  * @brief  SD reponses and error flags
-  */
-typedef enum
-{
-/* R1 answer value */  
-  SD_R1_NO_ERROR            = (0x00),
-  SD_R1_IN_IDLE_STATE       = (0x01),
-  SD_R1_ERASE_RESET         = (0x02),
-  SD_R1_ILLEGAL_COMMAND     = (0x04),
-  SD_R1_COM_CRC_ERROR       = (0x08),
-  SD_R1_ERASE_SEQUENCE_ERROR= (0x10),
-  SD_R1_ADDRESS_ERROR       = (0x20),
-  SD_R1_PARAMETER_ERROR     = (0x40),
-
-/* R2 answer value */
-  SD_R2_NO_ERROR            = 0x00,
-  SD_R2_CARD_LOCKED         = 0x01,
-  SD_R2_LOCKUNLOCK_ERROR    = 0x02,
-  SD_R2_ERROR               = 0x04,
-  SD_R2_CC_ERROR            = 0x08,
-  SD_R2_CARD_ECC_FAILED     = 0x10,
-  SD_R2_WP_VIOLATION        = 0x20,
-  SD_R2_ERASE_PARAM         = 0x40,
-  SD_R2_OUTOFRANGE          = 0x80,
-  
-/**
-  * @brief  Data response error
-  */
-  SD_DATA_OK                = (0x05),
-  SD_DATA_CRC_ERROR         = (0x0B),
-  SD_DATA_WRITE_ERROR       = (0x0D),
-  SD_DATA_OTHER_ERROR       = (0xFF)
-} SD_Error;
-
-/**
-* @}
-*/
-
-/* Private macro -------------------------------------------------------------*/
-
-/* Private variables ---------------------------------------------------------*/
-
-/** @defgroup STM32072B_EVAL_SD_Private_Variables Private Variables
-* @{
-*/       
-__IO uint8_t SdStatus = SD_NOT_PRESENT;
-
-/* flag_SDHC :
-      0 :  Standard capacity
-      1 : High capacity
-*/
-uint16_t flag_SDHC = 0; 
-
-/**
-* @}
-*/ 
-
-/* Private function prototypes -----------------------------------------------*/
-/** @defgroup STM32072B_EVAL_SD_Private_Functions Private Functions
-* @{
-*/ 
-static uint8_t SD_GetCIDRegister(SD_CID* Cid);
-static uint8_t SD_GetCSDRegister(SD_CSD* Csd);
-static uint8_t SD_GetDataResponse(void);
-static uint8_t SD_GoIdleState(void);
-static SD_CmdAnswer_typedef SD_SendCmd(uint8_t Cmd, uint32_t Arg, uint8_t Crc, uint8_t Answer);
-static uint8_t SD_WaitData(uint8_t data);
-static uint8_t SD_ReadData(void);
-/**
-* @}
-*/
-
-/* Exported functions ---------------------------------------------------------*/
-
-/** @addtogroup STM32072B_EVAL_SD_Exported_Functions
-* @{
-*/ 
-
-/**
-  * @brief  Initializes the SD/SD communication.
-  * @retval The SD Response: 
-  *         - MSD_ERROR: Sequence failed
-  *         - MSD_OK: Sequence succeed
-  */
-uint8_t BSP_SD_Init(void)
-{ 
-  /* Configure IO functionalities for SD pin */
-  SD_IO_Init();
-
-  /* Check SD card detect pin */
-  if(BSP_SD_IsDetected()==SD_NOT_PRESENT) 
-  {
-    SdStatus = SD_NOT_PRESENT;
-    return MSD_ERROR;
-  }
-  else
-  {
-    SdStatus = SD_PRESENT;
-  }
-
-  /* SD initialized and set to SPI mode properly */
-  return (SD_GoIdleState());
-}
-
-/**
- * @brief  Detects if SD card is correctly plugged in the memory slot or not.
- * @retval Returns if SD is detected or not
- */
-uint8_t BSP_SD_IsDetected(void)
-{
-  __IO uint8_t status = SD_PRESENT;
-
-  /* Check SD card detect pin */
-  if(HAL_GPIO_ReadPin(SD_DETECT_GPIO_PORT, SD_DETECT_PIN) != GPIO_PIN_RESET)
-  {
-    status = SD_NOT_PRESENT;
-  }
-  
-  return status;
-}
-
-/**
-  * @brief  Returns information about specific card.
-  * @param  pCardInfo Pointer to a SD_CardInfo structure that contains all SD 
-  *         card information.
-  * @retval The SD Response:
-  *         - MSD_ERROR: Sequence failed
-  *         - MSD_OK: Sequence succeed
-  */
-uint8_t BSP_SD_GetCardInfo(SD_CardInfo *pCardInfo)
-{
-  uint8_t status;
-
-  status = SD_GetCSDRegister(&(pCardInfo->Csd));
-  status|= SD_GetCIDRegister(&(pCardInfo->Cid));
-  if(flag_SDHC == 1 )
-  {
-    pCardInfo->CardBlockSize = 512;
-    pCardInfo->CardCapacity = (pCardInfo->Csd.version.v2.DeviceSize + 1) * pCardInfo->CardBlockSize;
-  }
-  else
-  {
-    pCardInfo->CardCapacity = (pCardInfo->Csd.version.v1.DeviceSize + 1) ;
-    pCardInfo->CardCapacity *= (1 << (pCardInfo->Csd.version.v1.DeviceSizeMul + 2));
-    pCardInfo->CardBlockSize = 1 << (pCardInfo->Csd.RdBlockLen);
-    pCardInfo->CardCapacity *= pCardInfo->CardBlockSize;
-  }
-  
-  return status;
-}
-
-/**
-  * @brief  Reads block(s) from a specified address in the SD card, in polling mode. 
-  * @param  pData Pointer to the buffer that will contain the data to transmit
-  * @param  ReadAddr Address from where data is to be read  
-  * @param  BlockSize SD card data block size, that should be 512
-  * @param  NumberOfBlocks Number of SD blocks to read 
-  * @retval SD status
-  */
-uint8_t BSP_SD_ReadBlocks(uint32_t* pData, uint32_t ReadAddr, uint16_t BlockSize, uint32_t NumberOfBlocks)
-{
-  uint32_t offset = 0;
-  uint8_t retr = BSP_SD_ERROR;
-  uint8_t *ptr = NULL;
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD16 (SD_CMD_SET_BLOCKLEN) to set the size of the block and 
-     Check if the SD acknowledged the set block length command: R1 response (0x00: no errors) */
-  response = SD_SendCmd(SD_CMD_SET_BLOCKLEN, BlockSize, 0xFF, SD_ANSWER_R1_EXPECTED);
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if ( response.r1 != SD_R1_NO_ERROR)
-  {
-     goto error;
-  }
-  
-  ptr = malloc(sizeof(uint8_t)*BlockSize);
-  if( ptr == NULL )
-  {
-     goto error;
-  }
-  memset(ptr, SD_DUMMY_BYTE, sizeof(uint8_t)*BlockSize);
-
-  /* Data transfer */
-  while (NumberOfBlocks--)
-  {
-    /* Send CMD17 (SD_CMD_READ_SINGLE_BLOCK) to read one block */
-    /* Check if the SD acknowledged the read block command: R1 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_READ_SINGLE_BLOCK, (ReadAddr + offset)/(flag_SDHC == 1 ?BlockSize: 1), 0xFF, SD_ANSWER_R1_EXPECTED);
-    if ( response.r1 != SD_R1_NO_ERROR)
-    {
-      goto error;
-    }
-
-    /* Now look for the data token to signify the start of the data */
-    if (SD_WaitData(SD_TOKEN_START_DATA_SINGLE_BLOCK_READ) == BSP_SD_OK)
-    {
-      /* Read the SD block data : read NumByteToRead data */
-      SD_IO_WriteReadData(ptr, (uint8_t*)pData + offset, BlockSize);
-
-      /* Set next read address*/
-      offset += BlockSize;
-      /* get CRC bytes (not really needed by us, but required by SD) */
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);      
-    }
-    else
-    {
-      goto error;
-    }
-    
-    /* End the command data read cycle */
-    SD_IO_CSState(1);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-  }
-  
-  retr = BSP_SD_OK;
-  
-error :  
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if(ptr != NULL) free(ptr);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Writes block(s) to a specified address in the SD card, in polling mode. 
-  * @param  pData Pointer to the buffer that will contain the data to transmit
-  * @param  WriteAddr Address from where data is to be written  
-  * @param  BlockSize SD card data block size, that should be 512
-  * @param  NumberOfBlocks Number of SD blocks to write
-  * @retval SD status
-  */
-uint8_t BSP_SD_WriteBlocks(uint32_t* pData, uint32_t WriteAddr, uint16_t BlockSize, uint32_t NumberOfBlocks)
-{
-  uint32_t offset = 0;
-  uint8_t retr = BSP_SD_ERROR;
-  uint8_t *ptr = NULL;
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD16 (SD_CMD_SET_BLOCKLEN) to set the size of the block and 
-     Check if the SD acknowledged the set block length command: R1 response (0x00: no errors) */
-  response = SD_SendCmd(SD_CMD_SET_BLOCKLEN, BlockSize, 0xFF, SD_ANSWER_R1_EXPECTED);
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if ( response.r1 != SD_R1_NO_ERROR)
-  {
-    goto error;
-  }
-  
-  ptr = malloc(sizeof(uint8_t)*BlockSize);
-  if (ptr == NULL)
-  {
-    goto error;
-  }
-  
-  /* Data transfer */
-  while (NumberOfBlocks--)
-  {
-    /* Send CMD24 (SD_CMD_WRITE_SINGLE_BLOCK) to write blocks  and
-       Check if the SD acknowledged the write block command: R1 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_WRITE_SINGLE_BLOCK, (WriteAddr + offset)/(flag_SDHC == 1 ? BlockSize: 1), 0xFF, SD_ANSWER_R1_EXPECTED);
-    if (response.r1 != SD_R1_NO_ERROR)
-    {
-      goto error;
-    }
-    
-    /* Send dummy byte for NWR timing : one byte between CMDWRITE and TOKEN */
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-
-    /* Send the data token to signify the start of the data */
-    SD_IO_WriteByte(SD_TOKEN_START_DATA_SINGLE_BLOCK_WRITE);
-
-    /* Write the block data to SD */
-    SD_IO_WriteReadData((uint8_t*)pData + offset, ptr, BlockSize);
-    
-    /* Set next write address */
-    offset += BlockSize;
-
-    /* Put CRC bytes (not really needed by us, but required by SD) */
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-
-    /* Read data response */
-    if (SD_GetDataResponse() != SD_DATA_OK)
-    {
-      /* Set response value to failure */
-      goto error;
-    }
-
-    SD_IO_CSState(1);    
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-  }
-  retr = BSP_SD_OK;
-  
-error :
-  if(ptr != NULL) free(ptr);
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);    
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Erases the specified memory area of the given SD card. 
-  * @param  StartAddr Start byte address
-  * @param  EndAddr End byte address
-  * @retval SD status
-  */
-uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr)
-{
-  uint8_t retr = BSP_SD_ERROR;
-  SD_CmdAnswer_typedef response;
-
-  /* Send CMD32 (Erase group start) and check if the SD acknowledged the erase command: R1 response (0x00: no errors) */
-  response = SD_SendCmd(SD_CMD_SD_ERASE_GRP_START, StartAddr, 0xFF, SD_ANSWER_R1_EXPECTED);
-  SD_IO_CSState(1);    
-  SD_IO_WriteByte(SD_DUMMY_BYTE);  if (response.r1 == SD_R1_NO_ERROR)
-  {
-    /* Send CMD33 (Erase group end) and Check if the SD acknowledged the erase command: R1 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_SD_ERASE_GRP_END, EndAddr, 0xFF, SD_ANSWER_R1_EXPECTED);
-    SD_IO_CSState(1);    
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    if (response.r1 == SD_R1_NO_ERROR)
-    {
-      /* Send CMD38 (Erase) and Check if the SD acknowledged the erase command: R1 response (0x00: no errors) */
-      response = SD_SendCmd(SD_CMD_ERASE, 0, 0xFF, SD_ANSWER_R1B_EXPECTED);
-      if (response.r1 == SD_R1_NO_ERROR)
-      {
-        retr = BSP_SD_OK;
-      }
-      SD_IO_CSState(1);    
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-    }
-  }
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Returns the SD status.
-  * @retval The SD status.
-  */
-uint8_t BSP_SD_GetStatus(void)
-{
-  SD_CmdAnswer_typedef retr;
-  
-  /* Send CMD13 (SD_SEND_STATUS) to get SD status */
-  retr = SD_SendCmd(SD_CMD_SEND_STATUS, 0, 0xFF, SD_ANSWER_R2_EXPECTED);
-  SD_IO_CSState(1);    
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Find SD status according to card state */
-  if(( retr.r1 == SD_R1_NO_ERROR) && ( retr.r2 == SD_R2_NO_ERROR))
-  {
-    return BSP_SD_OK;
-  }
-
-  return BSP_SD_ERROR;
-}
-
-/**
-  * @brief  Reads the SD card SCD register.
-  *         Reading the contents of the CSD register in SPI mode is a simple 
-  *         read-block transaction.
-  * @param  Csd pointer on an SCD register structure
-  * @retval SD status
-  */
-uint8_t SD_GetCSDRegister(SD_CSD* Csd)
-{
-  uint16_t counter = 0;
-  uint8_t CSD_Tab[16];
-  uint8_t retr = BSP_SD_ERROR;
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD9 (CSD register) or CMD10(CSD register) and Wait for response in the R1 format (0x00 is no errors) */
-  response = SD_SendCmd(SD_CMD_SEND_CSD, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-  if(response.r1 == SD_R1_NO_ERROR)
-  {
-    if (SD_WaitData(SD_TOKEN_START_DATA_SINGLE_BLOCK_READ) == BSP_SD_OK)
-    {
-      for (counter = 0; counter < 16; counter++)
-      {
-        /* Store CSD register value on CSD_Tab */
-        CSD_Tab[counter] = SD_IO_WriteByte(SD_DUMMY_BYTE);
-      }
-      
-      /* Get CRC bytes (not really needed by us, but required by SD) */
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-
-      /*************************************************************************
-        CSD header decoding 
-      *************************************************************************/
-      
-      /* Byte 0 */
-      Csd->CSDStruct = (CSD_Tab[0] & 0xC0) >> 6;
-      Csd->Reserved1 =  CSD_Tab[0] & 0x3F;
-      
-      /* Byte 1 */
-      Csd->TAAC = CSD_Tab[1];
-      
-      /* Byte 2 */
-      Csd->NSAC = CSD_Tab[2];
-      
-      /* Byte 3 */
-      Csd->MaxBusClkFrec = CSD_Tab[3];
-      
-      /* Byte 4/5 */
-      Csd->CardComdClasses = (CSD_Tab[4] << 4) | ((CSD_Tab[5] & 0xF0) >> 4);
-      Csd->RdBlockLen = CSD_Tab[5] & 0x0F;
-      
-      /* Byte 6 */
-      Csd->PartBlockRead   = (CSD_Tab[6] & 0x80) >> 7;
-      Csd->WrBlockMisalign = (CSD_Tab[6] & 0x40) >> 6;
-      Csd->RdBlockMisalign = (CSD_Tab[6] & 0x20) >> 5;
-      Csd->DSRImpl         = (CSD_Tab[6] & 0x10) >> 4;
-
-      /*************************************************************************
-        CSD v1/v2 decoding  
-      *************************************************************************/
-     
-      if(flag_SDHC == 0)
-      {
-        Csd->version.v1.Reserved1 = ((CSD_Tab[6] & 0x0C) >> 2);
-        
-        Csd->version.v1.DeviceSize =  ((CSD_Tab[6] & 0x03) << 10) 
-                                    |  (CSD_Tab[7] << 2)
-                                    | ((CSD_Tab[8] & 0xC0) >> 6);
-        Csd->version.v1.MaxRdCurrentVDDMin = (CSD_Tab[8] & 0x38) >> 3;
-        Csd->version.v1.MaxRdCurrentVDDMax = (CSD_Tab[8] & 0x07);
-        Csd->version.v1.MaxWrCurrentVDDMin = (CSD_Tab[9] & 0xE0) >> 5;
-        Csd->version.v1.MaxWrCurrentVDDMax = (CSD_Tab[9] & 0x1C) >> 2;
-        Csd->version.v1.DeviceSizeMul = ((CSD_Tab[9] & 0x03) << 1)
-                                       |((CSD_Tab[10] & 0x80) >> 7);
-      }
-      else
-      {
-        Csd->version.v2.Reserved1 = ((CSD_Tab[6] & 0x0F) << 2) | ((CSD_Tab[7] & 0xC0) >> 6);
-        Csd->version.v2.DeviceSize= ((CSD_Tab[7] & 0x3F) << 16) | (CSD_Tab[8] << 8) | CSD_Tab[9];    
-        Csd->version.v2.Reserved2 = ((CSD_Tab[10] & 0x80) >> 8);
-      }    
-            
-      Csd->EraseSingleBlockEnable = (CSD_Tab[10] & 0x40) >> 6;
-      Csd->EraseSectorSize   = ((CSD_Tab[10] & 0x3F) << 1)
-                              |((CSD_Tab[11] & 0x80) >> 7);
-      Csd->WrProtectGrSize   = (CSD_Tab[11] & 0x7F);
-      Csd->WrProtectGrEnable = (CSD_Tab[12] & 0x80) >> 7;
-      Csd->Reserved2         = (CSD_Tab[12] & 0x60) >> 5;
-      Csd->WrSpeedFact       = (CSD_Tab[12] & 0x1C) >> 2;
-      Csd->MaxWrBlockLen     = ((CSD_Tab[12] & 0x03) << 2)
-                              |((CSD_Tab[13] & 0xC0) >> 6);
-      Csd->WriteBlockPartial = (CSD_Tab[13] & 0x20) >> 5;
-      Csd->Reserved3         = (CSD_Tab[13] & 0x1F);
-      Csd->FileFormatGrouop  = (CSD_Tab[14] & 0x80) >> 7;
-      Csd->CopyFlag          = (CSD_Tab[14] & 0x40) >> 6;
-      Csd->PermWrProtect     = (CSD_Tab[14] & 0x20) >> 5;
-      Csd->TempWrProtect     = (CSD_Tab[14] & 0x10) >> 4;
-      Csd->FileFormat        = (CSD_Tab[14] & 0x0C) >> 2;
-      Csd->Reserved4         = (CSD_Tab[14] & 0x03);
-      Csd->crc               = (CSD_Tab[15] & 0xFE) >> 1;
-      Csd->Reserved5         = (CSD_Tab[15] & 0x01);
-      
-      retr = BSP_SD_OK;
-    }
-  }
-  
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Reads the SD card CID register.
-  *         Reading the contents of the CID register in SPI mode is a simple 
-  *         read-block transaction.
-  * @param  Cid pointer on an CID register structure
-  * @retval SD status
-  */
-uint8_t SD_GetCIDRegister(SD_CID* Cid)
-{
-  uint32_t counter = 0;
-  uint8_t retr = BSP_SD_ERROR;
-  uint8_t CID_Tab[16];
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD10 (CID register) and Wait for response in the R1 format (0x00 is no errors) */
-  response = SD_SendCmd(SD_CMD_SEND_CID, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-  if(response.r1 == SD_R1_NO_ERROR)
-  {
-    if(SD_WaitData(SD_TOKEN_START_DATA_SINGLE_BLOCK_READ) == BSP_SD_OK)
-    {
-      /* Store CID register value on CID_Tab */
-      for (counter = 0; counter < 16; counter++)
-      {
-        CID_Tab[counter] = SD_IO_WriteByte(SD_DUMMY_BYTE);
-      }
-      
-      /* Get CRC bytes (not really needed by us, but required by SD) */
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      
-      /* Byte 0 */
-      Cid->ManufacturerID = CID_Tab[0];
-      
-      /* Byte 1 */
-      Cid->OEM_AppliID = CID_Tab[1] << 8;
-      
-      /* Byte 2 */
-      Cid->OEM_AppliID |= CID_Tab[2];
-      
-      /* Byte 3 */
-      Cid->ProdName1 = CID_Tab[3] << 24;
-      
-      /* Byte 4 */
-      Cid->ProdName1 |= CID_Tab[4] << 16;
-      
-      /* Byte 5 */
-      Cid->ProdName1 |= CID_Tab[5] << 8;
-      
-      /* Byte 6 */
-      Cid->ProdName1 |= CID_Tab[6];
-      
-      /* Byte 7 */
-      Cid->ProdName2 = CID_Tab[7];
-      
-      /* Byte 8 */
-      Cid->ProdRev = CID_Tab[8];
-      
-      /* Byte 9 */
-      Cid->ProdSN = CID_Tab[9] << 24;
-      
-      /* Byte 10 */
-      Cid->ProdSN |= CID_Tab[10] << 16;
-      
-      /* Byte 11 */
-      Cid->ProdSN |= CID_Tab[11] << 8;
-      
-      /* Byte 12 */
-      Cid->ProdSN |= CID_Tab[12];
-      
-      /* Byte 13 */
-      Cid->Reserved1 |= (CID_Tab[13] & 0xF0) >> 4;
-      Cid->ManufactDate = (CID_Tab[13] & 0x0F) << 8;
-      
-      /* Byte 14 */
-      Cid->ManufactDate |= CID_Tab[14];
-      
-      /* Byte 15 */
-      Cid->CID_CRC = (CID_Tab[15] & 0xFE) >> 1;
-      Cid->Reserved2 = 1;
-
-      retr = BSP_SD_OK;
-    }
-  }
-  
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Send 5 bytes command to the SD card and get response
-  * @param  Cmd The user expected command to send to SD card.
-  * @param  Arg The command argument.
-  * @param  Crc The CRC.
-  * @param  Answer SD_ANSWER_NOT_EXPECTED or SD_ANSWER_EXPECTED
-  * @retval SD status
-  */
-SD_CmdAnswer_typedef SD_SendCmd(uint8_t Cmd, uint32_t Arg, uint8_t Crc, uint8_t Answer)
-{
-  uint8_t frame[SD_CMD_LENGTH], frameout[SD_CMD_LENGTH];
-  SD_CmdAnswer_typedef retr = {0xFF, 0xFF , 0xFF, 0xFF, 0xFF};
-
-  /* R1 Lenght = NCS(0)+ 6 Bytes command + NCR(min1 max8) + 1 Bytes answer + NEC(0) = 15bytes */
-  /* R1b identical to R1 + Busy information                                                   */
-  /* R2 Lenght = NCS(0)+ 6 Bytes command + NCR(min1 max8) + 2 Bytes answer + NEC(0) = 16bytes */
-  
-  /* Prepare Frame to send */
-  frame[0] = (Cmd | 0x40);         /* Construct byte 1 */
-  frame[1] = (uint8_t)(Arg >> 24); /* Construct byte 2 */
-  frame[2] = (uint8_t)(Arg >> 16); /* Construct byte 3 */
-  frame[3] = (uint8_t)(Arg >> 8);  /* Construct byte 4 */
-  frame[4] = (uint8_t)(Arg);       /* Construct byte 5 */
-  frame[5] = (Crc | 0x01);         /* Construct byte 6 */
-    
-  /* Send the command */
-  SD_IO_CSState(0);
-  SD_IO_WriteReadData(frame, frameout, SD_CMD_LENGTH); /* Send the Cmd bytes */
-  
-  switch(Answer)
-  {
-  case SD_ANSWER_R1_EXPECTED :
-    retr.r1 = SD_ReadData();
-    break;
-  case SD_ANSWER_R1B_EXPECTED :
-    retr.r1 = SD_ReadData();
-    retr.r2 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    /* Set CS High */
-    SD_IO_CSState(1);
-    HAL_Delay(1);
-    /* Set CS Low */
-    SD_IO_CSState(0);
-    
-    /* Wait IO line return 0xFF */
-    while (SD_IO_WriteByte(SD_DUMMY_BYTE) != 0xFF); 
-    break;
-  case SD_ANSWER_R2_EXPECTED :
-    retr.r1 = SD_ReadData();
-    retr.r2 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    break;
-  case SD_ANSWER_R3_EXPECTED :
-  case SD_ANSWER_R7_EXPECTED :
-    retr.r1 = SD_ReadData();
-    retr.r2 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    retr.r3 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    retr.r4 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    retr.r5 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    break;
-  default :
-    break;
-  }  
-  return retr;
-}
-
-/**
-  * @brief  Gets the SD card data response and check the busy flag.
-  * @retval The SD status: Read data response xxx0<status>1
-  *         - status 010: Data accecpted
-  *         - status 101: Data rejected due to a crc error
-  *         - status 110: Data rejected due to a Write error.
-  *         - status 111: Data rejected due to other error.
-  */
-uint8_t SD_GetDataResponse(void)
-{
-  uint8_t dataresponse;
-  uint8_t rvalue = SD_DATA_OTHER_ERROR;
-  
-  dataresponse = SD_IO_WriteByte(SD_DUMMY_BYTE);
-  SD_IO_WriteByte(SD_DUMMY_BYTE); /* read the busy response byte*/
- 
-  /* Mask unused bits */
-  switch (dataresponse & 0x1F)
-  {
-  case SD_DATA_OK:
-    rvalue = SD_DATA_OK;
-    
-    /* Set CS High */
-    SD_IO_CSState(1);
-    /* Set CS Low */
-    SD_IO_CSState(0);
-
-    /* Wait IO line return 0xFF */
-    while (SD_IO_WriteByte(SD_DUMMY_BYTE) != 0xFF);
-    break;
-  case SD_DATA_CRC_ERROR:
-    rvalue =  SD_DATA_CRC_ERROR;
-    break;
-  case SD_DATA_WRITE_ERROR:
-    rvalue = SD_DATA_WRITE_ERROR;
-    break;
-  default:
-    break;
-  }
-  
-  /* Return response */
-  return rvalue;
-}
-
-
-/**
-  * @brief  Put the SD in Idle state.
-  * @retval SD status
-  */
-uint8_t SD_GoIdleState(void)
-{
-  SD_CmdAnswer_typedef response;
-  __IO uint8_t counter = 0;
-  /* Send CMD0 (SD_CMD_GO_IDLE_STATE) to put SD in SPI mode and 
-     wait for In Idle State Response (R1 Format) equal to 0x01 */
-  do{
-    counter++;
-    response = SD_SendCmd(SD_CMD_GO_IDLE_STATE, 0, 0x95, SD_ANSWER_R1_EXPECTED);
-    SD_IO_CSState(1);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    if(counter >= SD_MAX_TRY)
-    {
-      return BSP_SD_ERROR;
-    }
-  }
-  while(response.r1 != SD_R1_IN_IDLE_STATE);
-  
-    
-  /* Send CMD8 (SD_CMD_SEND_IF_COND) to check the power supply status 
-     and wait until response (R7 Format) equal to 0xAA and */
-  response = SD_SendCmd(SD_CMD_SEND_IF_COND, 0x1AA, 0x87, SD_ANSWER_R7_EXPECTED);
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if((response.r1  & SD_R1_ILLEGAL_COMMAND) == SD_R1_ILLEGAL_COMMAND)
-  {
-    /* initialise card V1 */
-    do
-    {
-      /* initialise card V1 */
-      /* Send CMD55 (SD_CMD_APP_CMD) before any ACMD command: R1 response (0x00: no errors) */ 
-      response = SD_SendCmd(SD_CMD_APP_CMD, 0x00000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      
-      /* Send ACMD41 (SD_CMD_SD_APP_OP_COND) to initialize SDHC or SDXC cards: R1 response (0x00: no errors) */
-      response = SD_SendCmd(SD_CMD_SD_APP_OP_COND, 0x00000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-    }
-    while(response.r1 == SD_R1_IN_IDLE_STATE);
-    flag_SDHC = 0;
-  } 
-  else if(response.r1 == SD_R1_IN_IDLE_STATE)
-  {
-      /* initialise card V2 */
-    do {
-      
-      /* Send CMD55 (SD_CMD_APP_CMD) before any ACMD command: R1 response (0x00: no errors) */ 
-      response = SD_SendCmd(SD_CMD_APP_CMD, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      
-      /* Send ACMD41 (SD_CMD_SD_APP_OP_COND) to initialize SDHC or SDXC cards: R1 response (0x00: no errors) */
-      response = SD_SendCmd(SD_CMD_SD_APP_OP_COND, 0x40000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-    }
-    while(response.r1 == SD_R1_IN_IDLE_STATE);
-    
-    if((response.r1 & SD_R1_ILLEGAL_COMMAND) == SD_R1_ILLEGAL_COMMAND)
-    {
-      do {
-        /* Send CMD55 (SD_CMD_APP_CMD) before any ACMD command: R1 response (0x00: no errors) */ 
-        response = SD_SendCmd(SD_CMD_APP_CMD, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-        SD_IO_CSState(1);
-        SD_IO_WriteByte(SD_DUMMY_BYTE);
-        if(response.r1 != SD_R1_IN_IDLE_STATE)
-        {
-          return BSP_SD_ERROR;
-        }
-        /* Send ACMD41 (SD_CMD_SD_APP_OP_COND) to initialize SDHC or SDXC cards: R1 response (0x00: no errors) */
-        response = SD_SendCmd(SD_CMD_SD_APP_OP_COND, 0x00000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-        SD_IO_CSState(1);
-        SD_IO_WriteByte(SD_DUMMY_BYTE);
-      }
-      while(response.r1 == SD_R1_IN_IDLE_STATE);        
-    }  
-    
-    /* Send CMD58 (SD_CMD_READ_OCR) to initialize SDHC or SDXC cards: R3 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_READ_OCR, 0x00000000, 0xFF, SD_ANSWER_R3_EXPECTED);
-    SD_IO_CSState(1);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    if(response.r1 != SD_R1_NO_ERROR)
-    {
-      return BSP_SD_ERROR;
-    } 
-    flag_SDHC = (response.r2 & 0x40) >> 6;
-  }
-  else
-  {
-    return BSP_SD_ERROR;
-  }
-  
-  return BSP_SD_OK; 
-}
-
-/**
-  * @brief  Waits a data until a value different from SD_DUMMY_BITE
-  * @retval the value read
-  */
-uint8_t SD_ReadData(void)
-{
-  uint8_t timeout = 0x08;
-  uint8_t readvalue;
- 
-  /* Check if response is got or a timeout is happen */
-  do {
-    readvalue = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    timeout--;
-    
-  }while ((readvalue == SD_DUMMY_BYTE) && timeout);
-
-  /* Right response got */
-  return readvalue;
-}
-
-/**
-  * @brief  Waits a data from the SD card
-  * @param  data  Expected data from the SD card
-  * @retval BSP_SD_OK or BSP_SD_TIMEOUT
-  */
-uint8_t SD_WaitData(uint8_t data)
-{
-  uint16_t timeout = 0xFFFF;
-  uint8_t readvalue;
-  
-  /* Check if response is got or a timeout is happen */
-  
-  do {
-    readvalue = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    timeout--;
-  }while ((readvalue != data) && timeout);
-
-  if (timeout == 0)
-  {
-    /* After time out */
-    return BSP_SD_TIMEOUT;
-  }
-
-  /* Right response got */
-  return BSP_SD_OK;
-}
-
-/**
-  * @}
-  */  
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 244
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_sd.h

@@ -1,244 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32072b_eval_sd.h
-  * @author  MCD Application Team
-  * @brief   This file contains the common defines and functions prototypes for
-  *          the stm32072b_eval_sd.c driver.
-  ******************************************************************************
-  * @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 __STM32072B_EVAL_SD_H
-#define __STM32072B_EVAL_SD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32072b_eval.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32072B_EVAL
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_SD STM32072B_EVAL SD
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_SD_Exported_Types Exported Types
-  * @{
-  */
-
-/** 
-  * @brief  SD status structure definition  
-  */     
-enum {    
-      BSP_SD_OK = 0x00,      
-      MSD_OK = 0x00,
-      BSP_SD_ERROR = 0x01,
-      MSD_ERROR    = 0x01,
-      BSP_SD_TIMEOUT
-};
-
-typedef struct              
-{
-  uint8_t  Reserved1:2;               /* Reserved */
-  uint16_t DeviceSize:12;             /* Device Size */
-  uint8_t  MaxRdCurrentVDDMin:3;      /* Max. read current @ VDD min */
-  uint8_t  MaxRdCurrentVDDMax:3;      /* Max. read current @ VDD max */
-  uint8_t  MaxWrCurrentVDDMin:3;      /* Max. write current @ VDD min */
-  uint8_t  MaxWrCurrentVDDMax:3;      /* Max. write current @ VDD max */
-  uint8_t  DeviceSizeMul:3;           /* Device size multiplier */
-} struct_v1;
-
-
-typedef struct              
-{
-  uint8_t  Reserved1:6;               /* Reserved */
-  uint32_t DeviceSize:22;             /* Device Size */
-  uint8_t  Reserved2:1;               /* Reserved */
-} struct_v2;
-
-/** 
-  * @brief  Card Specific Data: CSD Register
-  */ 
-typedef struct
-{
-  /* Header part */
-  uint8_t  CSDStruct:2;            /* CSD structure */
-  uint8_t  Reserved1:6;            /* Reserved */
-  uint8_t  TAAC:8;                 /* Data read access-time 1 */
-  uint8_t  NSAC:8;                 /* Data read access-time 2 in CLK cycles */
-  uint8_t  MaxBusClkFrec:8;        /* Max. bus clock frequency */
-  uint16_t CardComdClasses:12;      /* Card command classes */
-  uint8_t  RdBlockLen:4;           /* Max. read data block length */
-  uint8_t  PartBlockRead:1;        /* Partial blocks for read allowed */
-  uint8_t  WrBlockMisalign:1;      /* Write block misalignment */
-  uint8_t  RdBlockMisalign:1;      /* Read block misalignment */
-  uint8_t  DSRImpl:1;              /* DSR implemented */
-  
-  /* v1 or v2 struct */
-  union csd_version {
-    struct_v1 v1;
-    struct_v2 v2;
-  } version;
-  
-  uint8_t  EraseSingleBlockEnable:1;  /* Erase single block enable */
-  uint8_t  EraseSectorSize:7;         /* Erase group size multiplier */
-  uint8_t  WrProtectGrSize:7;         /* Write protect group size */
-  uint8_t  WrProtectGrEnable:1;       /* Write protect group enable */
-  uint8_t  Reserved2:2;               /* Reserved */
-  uint8_t  WrSpeedFact:3;             /* Write speed factor */
-  uint8_t  MaxWrBlockLen:4;           /* Max. write data block length */
-  uint8_t  WriteBlockPartial:1;       /* Partial blocks for write allowed */
-  uint8_t  Reserved3:5;               /* Reserved */
-  uint8_t  FileFormatGrouop:1;        /* File format group */
-  uint8_t  CopyFlag:1;                /* Copy flag (OTP) */
-  uint8_t  PermWrProtect:1;           /* Permanent write protection */
-  uint8_t  TempWrProtect:1;           /* Temporary write protection */
-  uint8_t  FileFormat:2;              /* File Format */
-  uint8_t  Reserved4:2;               /* Reserved */
-  uint8_t  crc:7;                     /* Reserved */
-  uint8_t  Reserved5:1;               /* always 1*/
-  
-} SD_CSD;
-
-/** 
-  * @brief  Card Identification Data: CID Register   
-  */
-typedef struct
-{
-  __IO uint8_t  ManufacturerID;       /* ManufacturerID */
-  __IO uint16_t OEM_AppliID;          /* OEM/Application ID */
-  __IO uint32_t ProdName1;            /* Product Name part1 */
-  __IO uint8_t  ProdName2;            /* Product Name part2*/
-  __IO uint8_t  ProdRev;              /* Product Revision */
-  __IO uint32_t ProdSN;               /* Product Serial Number */
-  __IO uint8_t  Reserved1;            /* Reserved1 */
-  __IO uint16_t ManufactDate;         /* Manufacturing Date */
-  __IO uint8_t  CID_CRC;              /* CID CRC */
-  __IO uint8_t  Reserved2;            /* always 1 */
-} SD_CID;
-
-/** 
-  * @brief SD Card information 
-  */
-typedef struct
-{
-  SD_CSD Csd;
-  SD_CID Cid;
-  uint32_t CardCapacity;  /* Card Capacity */
-  uint32_t CardBlockSize; /* Card Block Size */
-} SD_CardInfo;
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_SPI_SD_Exported_Constants Exported Constants
-  * @{
-  */ 
-
-/**
-  * @brief  Block Size
-  */
-#define SD_BLOCK_SIZE    0x200
-
-/**
-  * @brief  SD detection on its memory slot
-  */
-#define SD_PRESENT               ((uint8_t)0x01)
-#define SD_NOT_PRESENT           ((uint8_t)0x00)
-   
-/**
-  * @}
-  */
-  
-/** @defgroup STM32091C_EVAL_SD_Exported_Macro Exported Macro
-  * @{
-  */ 
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_SD_Exported_Functions Exported Functions
-  * @{
-  */   
-uint8_t BSP_SD_Init(void);
-uint8_t BSP_SD_IsDetected(void);
-uint8_t BSP_SD_ReadBlocks(uint32_t *pData, uint32_t ReadAddr, uint16_t BlockSize, uint32_t NumberOfBlocks);
-uint8_t BSP_SD_WriteBlocks(uint32_t *pData, uint32_t WriteAddr, uint16_t BlockSize, uint32_t NumberOfBlocks);
-uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr);
-uint8_t BSP_SD_GetStatus(void);
-uint8_t BSP_SD_GetCardInfo(SD_CardInfo *pCardInfo);
-   
-/* Link functions for SD Card peripheral */
-void    SD_IO_Init(void);
-void    SD_IO_CSState(uint8_t state);
-void    SD_IO_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength);
-uint8_t SD_IO_WriteByte(uint8_t Data);
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_SD_LINK_Operations_Functions LINK Operations Functions
-  * @{
-  */ 
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32072B_EVAL_SD_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 184
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_tsensor.c

@@ -1,184 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32072b_eval_tsensor.c
-  * @author  MCD Application Team
-  * @brief   This file provides a set of functions needed to manage the I2C STLM75 
-  *          temperature sensor mounted on STM32072B-EVAL board . 
-  *          It implements a high level communication layer for read and write 
-  *          from/to this sensor. The needed STM32F0xx hardware resources (I2C and 
-  *          GPIO) are defined in stm32072b_eval.h file, and the initialization is 
-  *          performed in TSENSOR_IO_Init() function declared in stm32072b_eval.c 
-  *          file.
-  *          You can easily tailor this driver to any other development board, 
-  *          by just adapting the defines for hardware resources and 
-  *          TSENSOR_IO_Init() function. 
-  *
-  *     +-----------------------------------------------------------------+
-  *     |                        Pin assignment                           |
-  *     +---------------------------------------+-----------+-------------+
-  *     |  STM32F0xx I2C Pins                   |   STLM75  |   Pin       |
-  *     +---------------------------------------+-----------+-------------+
-  *     | STLM75_I2C_SDA_PIN/ SDA               |   SDA     |    1        |
-  *     | STLM75_I2C_SCL_PIN/ SCL               |   SCL     |    2        |
-  *     | STLM75_I2C_SMBUSALERT_PIN/ SMBUS ALERT|   OS/INT  |    3        |
-  *     | .                                     |   GND     |    4  (0V)  |
-  *     | .                                    |   GND     |    5  (0V)  |
-  *     | .                                     |   GND     |    6  (0V)  |
-  *     | .                                     |   GND     |    7  (0V)  |
-  *     | .                                    |   VDD     |    8  (3.3V)|
-  *     +---------------------------------------+-----------+-------------+
-  ******************************************************************************
-  * @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.
-  *
-  ******************************************************************************
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32072b_eval_tsensor.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32072B_EVAL
-  * @{
-  */
-
-/** @addtogroup STM32072B_EVAL_TSENSOR
-  * @brief      This file includes the STLM75 Temperature Sensor driver of 
-  *             STM32072B-EVAL boards.
-  * @{
-  */ 
-
-/** @defgroup STM32072B_EVAL_TSENSOR_Private_Variables Private Variables
-  * @{
-  */ 
-static TSENSOR_DrvTypeDef  *tsensor_drv; 
-__IO uint16_t  TSENSORAddress = 0;
-
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32072B_EVAL_TSENSOR_Exported_Functions
-  * @{
-  */ 
-
-/**
-  * @brief  Initializes peripherals used by the I2C Temperature Sensor driver.
-  * @retval TSENSOR status
-  */
-uint32_t BSP_TSENSOR_Init(void)
-{ 
-  uint8_t ret = TSENSOR_ERROR;
-  TSENSOR_InitTypeDef STLM75_InitStructure;
-
-  /* Temperature Sensor Initialization */
-  if(Stlm75Drv.IsReady(TSENSOR_I2C_ADDRESS_A01, TSENSOR_MAX_TRIALS) == HAL_OK)
-  {
-    /* Initialize the temperature sensor driver structure */
-    TSENSORAddress = TSENSOR_I2C_ADDRESS_A01;
-    tsensor_drv = &Stlm75Drv;
-
-    ret = TSENSOR_OK;
-  }
-  else
-  {
-    if(Stlm75Drv.IsReady(TSENSOR_I2C_ADDRESS_A02, TSENSOR_MAX_TRIALS) == HAL_OK)
-    {
-      /* Initialize the temperature sensor driver structure */
-      TSENSORAddress = TSENSOR_I2C_ADDRESS_A02;
-      tsensor_drv = &Stlm75Drv;
-
-      ret = TSENSOR_OK;
-    }
-    else
-    {
-      ret = TSENSOR_ERROR;
-    }
-  }
-
-  if (ret == TSENSOR_OK)
-  {
-    /* Configure Temperature Sensor : Conversion 9 bits in continuous mode */
-    /* Alert outside range Limit Temperature 12° <-> 24°c */
-    STLM75_InitStructure.AlertMode             = STLM75_INTERRUPT_MODE;
-    STLM75_InitStructure.ConversionMode        = STLM75_CONTINUOUS_MODE;
-    STLM75_InitStructure.TemperatureLimitHigh  = 24;
-    STLM75_InitStructure.TemperatureLimitLow   = 12;
-        
-    /* TSENSOR Init */   
-    tsensor_drv->Init(TSENSORAddress, &STLM75_InitStructure);
-
-    ret = TSENSOR_OK;
-  }
-  
-  return ret;
-}
-
-/**
-  * @brief  Returns the Temperature Sensor status.
-  * @retval The Temperature Sensor status.
-  */
-uint8_t BSP_TSENSOR_ReadStatus(void)
-{
-  return (tsensor_drv->ReadStatus(TSENSORAddress));
-}
-
-/**
-  * @brief  Read Temperature register of STLM75.
-  * @retval STLM75 measured temperature value.
-  */
-uint16_t BSP_TSENSOR_ReadTemp(void)
-{ 
-  return tsensor_drv->ReadTemp(TSENSORAddress);
-
-}
-
-/**
-  * @}
-  */
-
-
-/**
-  * @}
-  */
-
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 121
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32072B_EVAL/stm32072b_eval_tsensor.h

@@ -1,121 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32072b_eval_tsensor.h
-  * @author  MCD Application Team
-  * @brief   This file contains all the functions prototypes for the 
-  *          stm32072b_eval_tsensor.c firmware driver.
-  ******************************************************************************
-  * @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 __STM32072B_EVAL_TSENSOR_H
-#define __STM32072B_EVAL_TSENSOR_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32072b_eval.h"
-#include "../Components/stlm75/stlm75.h"   
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32072B_EVAL
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_TSENSOR STM32072B_EVAL TSENSOR
-  * @{
-  */
-
-/** @defgroup STM32072B_EVAL_TSENSOR_Exported_Types Exported Types
-  * @{
-  */
-
-/** 
-  * @brief  TSENSOR Status  
-  */ 
-typedef enum
-{
-  TSENSOR_OK = 0,
-  TSENSOR_ERROR
-}TSENSOR_Status_TypDef;
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_TSENSOR_Exported_Constants Exported Constants
-  * @{
-  */
-/* Temperature Sensor hardware I2C address */ 
-#define TSENSOR_I2C_ADDRESS_A01 0x90
-#define TSENSOR_I2C_ADDRESS_A02 0x92
-
-/* Maximum number of trials use for STTS751_IsReady function */
-#define TSENSOR_MAX_TRIALS      50
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32072B_EVAL_TSENSOR_Exported_Functions Exported Functions
-  * @{
-  */
-uint32_t BSP_TSENSOR_Init(void);
-uint8_t  BSP_TSENSOR_ReadStatus(void);
-uint16_t BSP_TSENSOR_ReadTemp(void);
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32072B_EVAL_TSENSOR_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 589
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/Release_Notes.html

@@ -1,589 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="File-List" href="Library_files/filelist.xml">
-<link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]-->
-
-
-
-<title>Release Notes for STM32091C_EVAL Evaluation Board Drivers</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-</style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-<meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="padding: 0cm;" valign="top">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="vertical-align: top;">
-<p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-</td>
-</tr>
-<tr style="">
-<td style="padding: 1.5pt;">
-<h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for STM32091C-EVAL Evaluation Board Drivers</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2016 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" width="900">
-<tbody>
-<tr style="">
-<td style="padding: 0cm;" valign="top">
-<span style="font-family: &quot;Times New Roman&quot;;">
-</span>
-<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.7 / 25-August-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-family: Verdana,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13.33px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline ! important; white-space: normal; widows: 1;">Minor updates in STM32091C_EVAL_BSP_User_Manual.chm documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.6 /&nbsp;7-April-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Updated BSP driver documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.5 / 04-November-2016 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes</span></u></b></p>
-<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Removed BSP/CEC driver : refer to to HAL for CEC.</span><span style="font-size: 10pt; font-family: Verdana;"></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.4 / 27-May-2016 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes</span></u></b></p>
-<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Aligned BSP drivers to use latest BSP components</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.3 / 29-January-2016 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;">Updated GPIO Output Speed literals naming to ensure HAL full compatibility.</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Added new services for SD management over SPI.</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Added RX Fifo Flush&nbsp;at end of LCD_IO_WriteMultipleData().<br></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.2 / 26-June-2015 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;">Complete HAL API alignment (renaming).</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Replace HAL_CEC_ErrorTypeDef by uint32_t.</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Add CHM User Manual for BSP/STM32091C_EVAL board.</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Implement workaround to cover RCC limitation regarding peripheral enable delay.</span><span style="font-family: Verdana; font-size: 10pt;"></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.0 / 03-Oct-2014 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;">Correct compilation warning&nbsp;</span><span style="font-family: Verdana; font-size: 10pt;">with&nbsp;TrueSTUDIO </span><span style="font-family: Verdana; font-size: 10pt;"> &amp; typo in defgroup in stm32091c_eval_cec.c/.h</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.0RC1 / 01-Aug-2014 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-family: Verdana; font-size: 10pt;">First&nbsp;version of the STM32091C-EVAL evaluation board drivers.</span></li><li style="font-weight: bold;"><span style="font-size: 10pt; font-family: Verdana;">This version has to be used only with </span><span style="font-size: 10pt; font-family: Verdana;">STM32CubeF0</span><span style="font-size: 10pt; font-family: Verdana;"> based development</span></li></ul><ul style="margin-top: 0cm;" type="square">
-<ul>
-</ul>
-</ul><h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span></h2>
-<div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistribution
-and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-</font>
-<ol><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-of source code must retain the above copyright notice, this list of
-conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the
-documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the
-name of STMicroelectronics nor the names of its contributors may be
-used to endorse or promote products derived</span></font><small><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> from this software without specific prior written permission.</span></small><br></li></ol><font size="-1">
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font> </div>
-<span style="font-size: 10pt; color: black; font-family: 'Verdana','sans-serif';"></span><b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-<div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-<hr align="center" size="2" width="100%"></span></div>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt; text-align: center;" align="center"><span style="font-size: 10pt; color: black; font-family: 'Verdana','sans-serif';">For
-complete documentation on </span><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';">STM32<span style="color: black;"> Microcontrollers visit&nbsp;</span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><u><span style="color: blue;"></span></u></span><u><a href="http://www.st.com/STM32" target="_blank">www.st.com/STM32</a></u><span style="font-size: 10pt; font-family: Verdana;"><a href="http://www.st.com/internet/mcu/family/141.jsp" target="_blank"><u><span style="color: blue;"></span></u></a></span><span style="color: black;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-</body></html>

+ 0 - 1374
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval.c

@@ -1,1374 +0,0 @@
-/**
-******************************************************************************
-* @file    stm32091c_eval.c
-* @author  MCD Application Team
-* @brief   This file provides: a set of firmware functions to manage Leds,
-*          push-button and COM ports
-******************************************************************************
-* @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.
-*
-******************************************************************************
-*/
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32091c_eval.h"
-
-/** @addtogroup BSP
-* @{
-*/ 
-
-/** @addtogroup STM32091C_EVAL
- * @brief This file provides firmware functions to manage Leds, push-buttons,  
- *        COM ports, SD card on SPI and temperature sensor (LM75) available on 
- *        STM32091C-EVAL evaluation board from STMicroelectronics.
- * @{
- */ 
-
-/** @addtogroup STM32091C_EVAL_Common
-  * @{
-  */ 
-
-/** @addtogroup STM32091C_EVAL_Private_Constants
- * @{
- */ 
-/* LINK LCD */
-#define START_BYTE         0x70
-#define SET_INDEX          0x00
-#define READ_STATUS        0x01
-#define LCD_WRITE_REG      0x02
-#define LCD_READ_REG       0x03
-
-/* LINK SD Card */
-#define SD_DUMMY_BYTE      0xFF    
-#define SD_NO_RESPONSE_EXPECTED  0x80
-
-/**
-* @brief STM32091C EVAL BSP Driver version number V2.0.7
-*/
-#define __STM32091C_EVAL_BSP_VERSION_MAIN   (0x02) /*!< [31:24] main version */
-#define __STM32091C_EVAL_BSP_VERSION_SUB1   (0x00) /*!< [23:16] sub1 version */
-#define __STM32091C_EVAL_BSP_VERSION_SUB2   (0x07) /*!< [15:8]  sub2 version */
-#define __STM32091C_EVAL_BSP_VERSION_RC     (0x00) /*!< [7:0]  release candidate */ 
-#define __STM32091C_EVAL_BSP_VERSION         ((__STM32091C_EVAL_BSP_VERSION_MAIN << 24)\
-|(__STM32091C_EVAL_BSP_VERSION_SUB1 << 16)\
-  |(__STM32091C_EVAL_BSP_VERSION_SUB2 << 8 )\
-    |(__STM32091C_EVAL_BSP_VERSION_RC))
-/**
-* @}
-*/ 
-
-/** @addtogroup STM32091C_EVAL_Private_Variables
-* @{
-*/
-/**
-* @brief LED variables
-*/ 
-GPIO_TypeDef* LED_PORT[LEDn] = {LED1_GPIO_PORT, 
-LED2_GPIO_PORT, 
-LED3_GPIO_PORT,
-LED4_GPIO_PORT};
-
-const uint16_t LED_PIN[LEDn] = {LED1_PIN, 
-LED2_PIN, 
-LED3_PIN,
-LED4_PIN};
-
-/**
-* @brief BUTTON variables
-*/
-GPIO_TypeDef* BUTTON_PORT[BUTTONn] = {TAMPER_BUTTON_GPIO_PORT}; 
-const uint16_t BUTTON_PIN[BUTTONn] = {TAMPER_BUTTON_PIN}; 
-const uint8_t BUTTON_IRQn[BUTTONn] = {TAMPER_BUTTON_EXTI_IRQn};
-
-/**
-* @brief JOYSTICK variables
-*/
-GPIO_TypeDef* JOY_PORT[JOYn] = {SEL_JOY_GPIO_PORT,
-DOWN_JOY_GPIO_PORT, 
-LEFT_JOY_GPIO_PORT, 
-RIGHT_JOY_GPIO_PORT, 
-UP_JOY_GPIO_PORT}; 
-
-const uint16_t JOY_PIN[JOYn] = {SEL_JOY_PIN, 
-DOWN_JOY_PIN,
-LEFT_JOY_PIN, 
-RIGHT_JOY_PIN, 
-UP_JOY_PIN}; 
-
-const uint8_t JOY_IRQn[JOYn] = {SEL_JOY_EXTI_IRQn, 
-DOWN_JOY_EXTI_IRQn, 
-LEFT_JOY_EXTI_IRQn, 
-RIGHT_JOY_EXTI_IRQn, 
-UP_JOY_EXTI_IRQn};
-
-/**
-* @brief COM variables
-*/
-#ifdef HAL_UART_MODULE_ENABLED
-USART_TypeDef* COM_USART[COMn]  = {EVAL_COM1}; 
-
-GPIO_TypeDef* COM_TX_PORT[COMn] = {EVAL_COM1_TX_GPIO_PORT};
- 
-GPIO_TypeDef* COM_RX_PORT[COMn] = {EVAL_COM1_RX_GPIO_PORT};
-
-const uint16_t COM_TX_PIN[COMn] = {EVAL_COM1_TX_PIN};
-
-const uint16_t COM_RX_PIN[COMn] = {EVAL_COM1_RX_PIN};
-
-const uint16_t COM_TX_AF[COMn] = {EVAL_COM1_TX_AF};
-
-const uint16_t COM_RX_AF[COMn] = {EVAL_COM1_RX_AF};
-
-#endif /*HAL_UART_MODULE_ENABLED*/
-
-/**
- * @brief BUS variables
- */
-#if defined(HAL_I2C_MODULE_ENABLED)
-uint32_t I2c1Timeout = EVAL_I2C1_TIMEOUT_MAX;        /*<! Value of Timeout when I2C1 communication fails */
-uint32_t I2c2Timeout = EVAL_I2C2_TIMEOUT_MAX;        /*<! Value of Timeout when I2C2 communication fails */
-I2C_HandleTypeDef heval_I2c1;
-I2C_HandleTypeDef heval_I2c2;
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-uint32_t SpixTimeout = EVAL_SPIx_TIMEOUT_MAX;    /*<! Value of Timeout when SPI communication fails */
-static SPI_HandleTypeDef heval_Spi;
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-/**
-* @}
-*/ 
-
-/** @defgroup STM32091C_EVAL_BUS Bus Operation functions
-* @{
-*/
-#if defined(HAL_I2C_MODULE_ENABLED)
-/* I2Cx bus function */
-/* Link function for I2C EEPROM, TSENSOR & HDMI_SOURCE peripherals */
-static void               I2C1_Init(void);
-static void               I2C1_Error (void);
-static void               I2C1_MspInit(I2C_HandleTypeDef *hi2c);  
-/* Link function for I2C EEPROM & TSENSOR peripherals */
-static HAL_StatusTypeDef  I2C1_WriteBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length);
-static HAL_StatusTypeDef  I2C1_ReadBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length);
-static HAL_StatusTypeDef  I2C1_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-/* Link function for HDMI_SOURCE peripheral */
-static HAL_StatusTypeDef I2C1_TransmitData(uint8_t *pBuffer, uint16_t Length);
-
-/* Link function for I2C HDMI_SINK peripherals */
-static void               I2C2_Init(void);
-static void               I2C2_Error(void);
-static void               I2C2_MspInit(I2C_HandleTypeDef *hi2c);
-/* Link function for HDMI_SINK peripheral */
-static HAL_StatusTypeDef I2C2_ReceiveData(uint16_t Addr, uint8_t * pBuffer, uint16_t Length);
-
-/* Link functions for EEPROM peripheral */
-void                      EEPROM_IO_Init(void);
-HAL_StatusTypeDef         EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef         EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef         EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-
-/* Link functions for Temperature Sensor peripheral */
-void                     TSENSOR_IO_Init(void);
-void                     TSENSOR_IO_Write(uint16_t DevAddress, uint8_t* pBuffer, uint8_t WriteAddr, uint16_t Length);
-void                     TSENSOR_IO_Read(uint16_t DevAddress, uint8_t* pBuffer, uint8_t ReadAddr, uint16_t Length);
-uint16_t                 TSENSOR_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-
-/* Link functions for CEC peripheral */
-void                     HDMI_CEC_IO_Init(void);
-HAL_StatusTypeDef        HDMI_CEC_IO_WriteData(uint8_t * pBuffer, uint16_t BufferSize);
-HAL_StatusTypeDef        HDMI_CEC_IO_ReadData(uint16_t DevAddress, uint8_t * pBuffer, uint16_t BufferSize);
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-/* SPIx bus function */
-static void               SPIx_Init(void);
-static void               SPIx_Write(uint8_t Value);
-static void               SPIx_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLegnth);
-static void               SPIx_FlushFifo(void);
-static uint32_t           SPIx_Read(void);
-static void               SPIx_Error (void);
-static void               SPIx_MspInit(SPI_HandleTypeDef *hspi);
-
-/* Link function for LCD peripheral over SPI */
-void                      LCD_IO_Init(void);
-void                      LCD_IO_WriteMultipleData(uint8_t *pData, uint32_t Size);
-void                      LCD_IO_WriteReg(uint8_t Reg);
-uint16_t                  LCD_IO_ReadData(uint16_t RegValue);
-void                      LCD_Delay (uint32_t delay);
-
-/* Link functions for SD Card peripheral */
-void                     SD_IO_Init(void); 
-void                     SD_IO_CSState(uint8_t state);
-void                     SD_IO_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength);
-uint8_t                  SD_IO_WriteByte(uint8_t Data);
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-/**
-* @}
-*/ 
-
-/** @addtogroup STM32091C_EVAL_Exported_Functions
-  * @{
-  */ 
-
-/**
-* @brief  This method returns the STM32F091C EVAL BSP Driver revision
-* @retval version : 0xXYZR (8bits for each decimal, R for RC)
-*/
-uint32_t BSP_GetVersion(void)
-{
-  return __STM32091C_EVAL_BSP_VERSION;
-}
-
-/**
-* @brief  Configures LED GPIO.
-* @param  Led Specifies the Led to be configured. 
-*   This parameter can be one of following parameters:
-*     @arg LED1
-*     @arg LED2
-*     @arg LED3
-*     @arg LED4
-* @retval None
-*/
-void BSP_LED_Init(Led_TypeDef Led)
-{
-  GPIO_InitTypeDef  GPIO_InitStruct;
-  
-  /* Enable the GPIO_LED clock */
-  LEDx_GPIO_CLK_ENABLE(Led);
-  
-  /* Configure the GPIO_LED pin */
-  GPIO_InitStruct.Pin = LED_PIN[Led];
-  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStruct.Pull = GPIO_PULLUP;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  
-  HAL_GPIO_Init(LED_PORT[Led], &GPIO_InitStruct);
-  
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_SET); 
-}
-
-/**
-* @brief  Turns selected LED On.
-* @param  Led Specifies the Led to be set on. 
-*   This parameter can be one of following parameters:
-*     @arg LED1
-*     @arg LED2
-*     @arg LED3
-*     @arg LED4  
-* @retval None
-*/
-void BSP_LED_On(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET);
-}
-
-/**
-* @brief  Turns selected LED Off.
-* @param  Led Specifies the Led to be set off. 
-*   This parameter can be one of following parameters:
-*     @arg LED1
-*     @arg LED2
-*     @arg LED3
-*     @arg LED4 
-* @retval None
-*/
-void BSP_LED_Off(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_SET);
-}
-
-/**
-* @brief  Toggles the selected LED.
-* @param  Led Specifies the Led to be toggled. 
-*   This parameter can be one of following parameters:
-*     @arg LED1
-*     @arg LED2
-*     @arg LED3
-*     @arg LED4  
-* @retval None
-*/
-void BSP_LED_Toggle(Led_TypeDef Led)
-{
-  HAL_GPIO_TogglePin(LED_PORT[Led], LED_PIN[Led]);
-}
-
-/**
-* @brief  Configures Tamper Button GPIO or EXTI Line.
-* @param  Button Button to be configured
-*   This parameter can be one of the following values:
-*     @arg BUTTON_TAMPER: Tamper Push Button 
-* @param  Mode Button mode
-*   This parameter can be one of the following values:
-*     @arg BUTTON_MODE_GPIO: Button will be used as simple IO 
-*     @arg BUTTON_MODE_EXTI: Button will be connected to EXTI line
-*                            with interrupt generation capability
-* @retval None
-*/
-void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Mode)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-  
-  /* Enable the Tamper Clock */
-  TAMPERx_GPIO_CLK_ENABLE(Button);
-  
-  GPIO_InitStruct.Pin = BUTTON_PIN[Button];
-  GPIO_InitStruct.Pull = GPIO_PULLDOWN;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  
-  if (Mode == BUTTON_MODE_GPIO)
-  {
-    /* Configure Button pin as input */
-    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-    
-    HAL_GPIO_Init(BUTTON_PORT[Button], &GPIO_InitStruct);
-  }
-  
-  if (Mode == BUTTON_MODE_EXTI)
-  {
-    /* Configure Button pin as input with External interrupt */
-      GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
-    HAL_GPIO_Init(BUTTON_PORT[Button], &GPIO_InitStruct);
-    
-    /* Enable and set Button EXTI Interrupt to the lowest priority */
-    HAL_NVIC_SetPriority((IRQn_Type)(BUTTON_IRQn[Button]), 0x03, 0x00);
-    HAL_NVIC_EnableIRQ((IRQn_Type)(BUTTON_IRQn[Button]));
-  }
-}
-
-/**
-* @brief  Returns the selected button state.
-* @param  Button Button to be checked.
-*   This parameter can be one of the following values:
-*     @arg BUTTON_TAMPER: Tamper Push Button
-* @retval The Button GPIO pin value
-*/
-uint32_t BSP_PB_GetState(Button_TypeDef Button)
-{
-  return HAL_GPIO_ReadPin(BUTTON_PORT[Button], BUTTON_PIN[Button]);
-}
-
-/**
-* @brief  Configures joystick GPIO and EXTI modes.
-  * @param  Joy_Mode Button mode.
-*          This parameter can be one of the following values:
-*            @arg  JOY_MODE_GPIO: Joystick pins will be used as simple IOs
-*            @arg  JOY_MODE_EXTI: Joystick pins will be connected to EXTI line 
-*                                 with interrupt generation capability  
-  * @retval HAL_OK: if all initializations are OK. Other value if error.
-*/
-uint8_t BSP_JOY_Init(JOYMode_TypeDef Joy_Mode)
-{
-  JOYState_TypeDef joykey;
-  GPIO_InitTypeDef GPIO_InitStruct;
-  
-  /* Initialized the Joystick. */
-  for(joykey = JOY_SEL; joykey < (JOY_SEL + JOYn) ; joykey++)
-  {
-    /* Enable the JOY clock */
-    JOYx_GPIO_CLK_ENABLE(joykey);
-    
-    GPIO_InitStruct.Pin = JOY_PIN[joykey];
-    GPIO_InitStruct.Pull = GPIO_PULLDOWN;
-    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-    
-    if (Joy_Mode == JOY_MODE_GPIO)
-    {
-      /* Configure Joy pin as input */
-      GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-      HAL_GPIO_Init(JOY_PORT[joykey], &GPIO_InitStruct);
-    }
-    
-    if (Joy_Mode == JOY_MODE_EXTI)
-    {
-      /* Configure Joy pin as input with External interrupt */
-      GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
-      HAL_GPIO_Init(JOY_PORT[joykey], &GPIO_InitStruct);
-      
-      /* Enable and set Joy EXTI Interrupt to the lowest priority */
-      HAL_NVIC_SetPriority((IRQn_Type)(JOY_IRQn[joykey]), 0x03, 0x00);
-      HAL_NVIC_EnableIRQ((IRQn_Type)(JOY_IRQn[joykey]));
-    }
-  }
-  
-  return HAL_OK;
-}
-
-/**
-* @brief  Returns the current joystick status.
-* @retval Code of the joystick key pressed
-*          This code can be one of the following values:
-*            @arg  JOY_NONE
-*            @arg  JOY_SEL
-*            @arg  JOY_DOWN
-*            @arg  JOY_LEFT
-*            @arg  JOY_RIGHT
-*            @arg  JOY_UP
-*/
-JOYState_TypeDef BSP_JOY_GetState(void)
-{
-  JOYState_TypeDef joykey;
-  
-  for (joykey = JOY_SEL; joykey < (JOY_SEL + JOYn) ; joykey++)
-  {
-    if (HAL_GPIO_ReadPin(JOY_PORT[joykey], JOY_PIN[joykey]) == GPIO_PIN_SET)
-    {
-      /* Return Code Joystick key pressed */
-      return joykey;
-    }
-  }
-  
-  /* No Joystick key pressed */
-  return JOY_NONE;
-}
-
-#if defined (HAL_UART_MODULE_ENABLED)
-/**
-* @brief  Configures COM port.
-* @param  COM Specifies the COM port to be configured.
-*   This parameter can be one of following parameters:    
-*     @arg COM1  
-* @param  huart pointer to a UART_HandleTypeDef structure that
-*   contains the configuration information for the specified UART peripheral.
-* @retval None
-*/
-void BSP_COM_Init(COM_TypeDef COM, UART_HandleTypeDef* huart)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-  
-  /* Enable GPIO clock */
-  COMx_TX_GPIO_CLK_ENABLE(COM);
-  COMx_RX_GPIO_CLK_ENABLE(COM);
-  
-  /* Enable USART clock */
-  COMx_CLK_ENABLE(COM);
-  
-  /* Configure USART Tx as alternate function push-pull */
-  GPIO_InitStruct.Pin = COM_TX_PIN[COM];
-  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Pull = GPIO_PULLUP;
-  GPIO_InitStruct.Alternate = COM_TX_AF[COM];
-  HAL_GPIO_Init(COM_TX_PORT[COM], &GPIO_InitStruct);
-  
-  /* Configure USART Rx as alternate function push-pull */
-  GPIO_InitStruct.Pin = COM_RX_PIN[COM];
-  GPIO_InitStruct.Alternate = COM_RX_AF[COM];
-  HAL_GPIO_Init(COM_RX_PORT[COM], &GPIO_InitStruct);
-  
-  /* USART configuration */
-  huart->Instance = COM_USART[COM];
-  HAL_UART_Init(huart);
-}
-#endif /* HAL_UART_MODULE_ENABLED*/
-
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32091C_EVAL_BUS
-  * @{
-  */ 
-
-/*******************************************************************************
-BUS OPERATIONS
-*******************************************************************************/
-#if defined(HAL_I2C_MODULE_ENABLED)
-/******************************* I2C Routines *********************************/
-
-/**
- * @brief I2C Bus initialization
- * @retval None
- */
-static void I2C1_Init(void)
-{
-  if(HAL_I2C_GetState(&heval_I2c1) == HAL_I2C_STATE_RESET)
-  {
-    heval_I2c1.Instance              = EVAL_I2C1;
-    heval_I2c1.Init.Timing           = I2C1_TIMING;
-    heval_I2c1.Init.OwnAddress1      = 0;
-    heval_I2c1.Init.AddressingMode   = I2C_ADDRESSINGMODE_7BIT;
-    heval_I2c1.Init.DualAddressMode  = I2C_DUALADDRESS_DISABLE;
-    heval_I2c1.Init.OwnAddress2      = 0;
-    heval_I2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
-    heval_I2c1.Init.GeneralCallMode  = I2C_GENERALCALL_DISABLE;
-    heval_I2c1.Init.NoStretchMode    = I2C_NOSTRETCH_DISABLE;  
-    
-    /* Init the I2C */
-    I2C1_MspInit(&heval_I2c1);
-    HAL_I2C_Init(&heval_I2c1);
-  }
-}
-
-/**
-* @brief  Reads multiple data on the BUS.
-* @param  Addr   I2C Address
-* @param  Reg    Reg Address 
-* @param  RegSize  The target register size (can be 8BIT or 16BIT)
-* @param  pBuffer  pointer to read data buffer
-* @param  Length  length of the data
-* @retval 0 if no problems to read multiple data
-*/
-static HAL_StatusTypeDef I2C1_ReadBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Mem_Read(&heval_I2c1, Addr, Reg, RegSize, pBuffer, Length, I2c1Timeout);
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Re-Initiaize the BUS */
-    I2C1_Error();
-  }
-  return status;
-}
-
-/**
-* @brief  Checks if target device is ready for communication. 
-* @note   This function is used with Memory devices
-* @param  DevAddress Target device address
-* @param  Trials Number of trials
-* @retval HAL status
-*/
-static HAL_StatusTypeDef I2C1_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
-{ 
-  return (HAL_I2C_IsDeviceReady(&heval_I2c1, DevAddress, Trials, I2c1Timeout));
-}
-
-/**
-* @brief  Write a value in a register of the device through BUS.
-* @param  Addr Device address on BUS Bus.  
-* @param  Reg The target register address to write
-* @param  RegSize The target register size (can be 8BIT or 16BIT)
-* @param  pBuffer The target register value to be written 
-* @param  Length buffer size to be written
-* @retval None
-*/
-static HAL_StatusTypeDef I2C1_WriteBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Mem_Write(&heval_I2c1, Addr, Reg, RegSize, pBuffer, Length, I2c1Timeout); 
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Re-Initiaize the BUS */
-    I2C1_Error();
-  }        
-  return status;
-}
-
-/**
-* @brief  Write buffer through I2C.
-* @param  pBuffer The address of the data to be written 
-* @param  Length buffer size to be written
-* @retval None
-*/
-static HAL_StatusTypeDef I2C1_TransmitData(uint8_t *pBuffer, uint16_t Length)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Slave_Transmit(&heval_I2c1, pBuffer, Length, I2c1Timeout);
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    I2C1_Error();
-    return HAL_ERROR;
-  }        
-  return HAL_OK;
-}
-
-/**
- * @brief  Manages error callback by re-initializing I2C.
- * @retval None
- */
-static void I2C1_Error(void)
-{
-  /* De-initialize the I2C communication BUS */
-  HAL_I2C_DeInit(&heval_I2c1);
-  
-  /* Re-Initiaize the I2C communication BUS */
-  I2C1_Init();
-}
-
-/**
-  * @brief I2C MSP Initialization
-* @param hi2c I2C handle
-* @retval None
-*/
-static void I2C1_MspInit(I2C_HandleTypeDef *hi2c)
-{
-  GPIO_InitTypeDef  GPIO_InitStruct;  
-  RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct;
-  
-  /*##-1- Set source clock to SYSCLK for I2C1 ################################################*/  
-  RCC_PeriphCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2C1;
-  RCC_PeriphCLKInitStruct.I2c1ClockSelection = RCC_I2C1CLKSOURCE_SYSCLK;
-  HAL_RCCEx_PeriphCLKConfig(&RCC_PeriphCLKInitStruct);
-  
-  /*##-2- Configure the GPIOs ################################################*/  
-  
-  /* Enable GPIO clock */
-  EVAL_I2C1_GPIO_CLK_ENABLE();
-  
-  /* Configure I2C SCL & SDA as alternate function  */
-  GPIO_InitStruct.Pin       = (EVAL_I2C1_SCL_PIN| EVAL_I2C1_SDA_PIN);
-  GPIO_InitStruct.Mode      = GPIO_MODE_AF_OD;
-  GPIO_InitStruct.Pull      = GPIO_NOPULL;
-  GPIO_InitStruct.Speed     = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Alternate = EVAL_I2C1_SCL_SDA_AF;
-  HAL_GPIO_Init(EVAL_I2C1_GPIO_PORT, &GPIO_InitStruct);
-  
-  /*##-3- Configure the Eval I2C peripheral #######################################*/ 
-  /* Enable I2C clock */
-  EVAL_I2C1_CLK_ENABLE();
-  
-  /* Force the I2C peripheral clock reset */
-  EVAL_I2C1_FORCE_RESET();
-  
-  /* Release the I2C peripheral clock reset */
-  EVAL_I2C1_RELEASE_RESET();
-}
-
-/**
- * @brief I2C Bus initialization
- * @retval None
- */
-static void I2C2_Init(void)
-{
-  if(HAL_I2C_GetState(&heval_I2c2) == HAL_I2C_STATE_RESET)
-  {   
-    heval_I2c2.Instance              = EVAL_I2C2;
-    heval_I2c2.Init.Timing           = I2C2_TIMING;
-    heval_I2c2.Init.OwnAddress1      = 0;
-    heval_I2c2.Init.AddressingMode   = I2C_ADDRESSINGMODE_7BIT;
-    heval_I2c2.Init.DualAddressMode  = I2C_DUALADDRESS_DISABLE;
-    heval_I2c2.Init.OwnAddress2      = 0;
-    heval_I2c2.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
-    heval_I2c2.Init.GeneralCallMode  = I2C_GENERALCALL_DISABLE;
-    heval_I2c2.Init.NoStretchMode    = I2C_NOSTRETCH_DISABLE;  
-    
-    /* Init the I2C */
-    I2C2_MspInit(&heval_I2c2);
-    HAL_I2C_Init(&heval_I2c2);
-  }
-}
-
-/**
-* @brief  Read a register of the device through I2C.
-* @param  Addr Device address on I2C Bus.  
-* @param  pBuffer The address to store the read data 
-* @param  Length buffer size to be read
-* @retval None
-*/
-static HAL_StatusTypeDef I2C2_ReceiveData(uint16_t Addr, uint8_t * pBuffer, uint16_t Length)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Master_Receive(&heval_I2c2, Addr, pBuffer, Length, I2c2Timeout); 
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    I2C2_Error();
-  }        
-  return status;
-}
-
-/**
- * @brief Discovery I2C2 error treatment function
- * @retval None
- */
-static void I2C2_Error(void)
-{
-  /* De-initialize the I2C communication BUS */
-  HAL_I2C_DeInit(&heval_I2c2);
-  
-  /* Re-Initiaize the I2C communication BUS */
-  I2C2_Init();
-}
-
-/**
-* @brief I2C MSP Initialization
-* @param hi2c I2C handle
-* @retval None
-*/
-static void I2C2_MspInit(I2C_HandleTypeDef *hi2c)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-  /* Enable GPIO clock */
-  EVAL_I2C2_GPIO_CLK_ENABLE();
-  
-  /* Configure I2C SCL and SDA as alternate function  */
-  GPIO_InitStruct.Pin = (EVAL_I2C2_SCL_PIN | EVAL_I2C2_SDA_PIN);
-  GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
-  GPIO_InitStruct.Pull = GPIO_NOPULL;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Alternate = EVAL_I2C2_AF;
-  HAL_GPIO_Init(EVAL_I2C2_GPIO_PORT, &GPIO_InitStruct);
-  
-  /* Enable I2C clock */
-  EVAL_I2C2_CLK_ENABLE();
-  
-  /* Force the I2C peripheral clock reset */
-  EVAL_I2C2_FORCE_RESET();
-  
-  /* Release the I2C peripheral clock reset */
-  EVAL_I2C2_RELEASE_RESET();
-}
-#endif /*HAL_I2C_MODULE_ENABLED*/
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-/******************************* SPI Routines *********************************/
-
-/**
-  * @brief SPIx Bus initialization
-  * @retval None
-  */
-static void SPIx_Init(void)
-{
-  if(HAL_SPI_GetState(&heval_Spi) == HAL_SPI_STATE_RESET)
-  {
-    /* SPI Config */
-    heval_Spi.Instance = EVAL_SPIx;
-    /* SPI baudrate is set to 12 MHz (PCLK1/SPI_BaudRatePrescaler = 48/4 = 12 MHz) 
-    to verify these constraints:
-    HX8347D LCD SPI interface max baudrate is  50MHz for write and 6.66MHz for read
-    PCLK1 frequency is set to 48 MHz 
-    - SD card SPI interface max baudrate is 25MHz for write/read
-    */
-    heval_Spi.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4;
-    heval_Spi.Init.Direction = SPI_DIRECTION_2LINES;
-    heval_Spi.Init.CLKPhase = SPI_PHASE_2EDGE;
-    heval_Spi.Init.CLKPolarity = SPI_POLARITY_HIGH;
-    heval_Spi.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
-    heval_Spi.Init.CRCPolynomial = 7;
-    heval_Spi.Init.DataSize = SPI_DATASIZE_8BIT;
-    heval_Spi.Init.FirstBit = SPI_FIRSTBIT_MSB;
-    heval_Spi.Init.NSS = SPI_NSS_SOFT;
-    heval_Spi.Init.TIMode = SPI_TIMODE_DISABLE;
-    heval_Spi.Init.Mode = SPI_MODE_MASTER;
-    
-    SPIx_MspInit(&heval_Spi);
-    HAL_SPI_Init(&heval_Spi);
-  }
-}
-
-/**
-  * @brief SPI Read 4 bytes from device
-  * @retval Read data
-  */
-static uint32_t SPIx_Read(void)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  uint32_t readvalue = 0x0;
-  uint32_t writevalue = 0xFFFFFFFF;
-  
-  status = HAL_SPI_TransmitReceive(&heval_Spi, (uint8_t*) &writevalue, (uint8_t*) &readvalue, 1, SpixTimeout);
-
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    SPIx_Error();
-  }
-
-  return readvalue;
-}
-
-/**
-  * @brief  SPI Write a byte to device
-  * @param  DataIn value to be written
-  * @param  DataOut read value to be written
-  * @param  DataLegnth data length
-  */
-static void SPIx_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLegnth)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-
-  status = HAL_SPI_TransmitReceive(&heval_Spi, (uint8_t*) DataIn, DataOut, DataLegnth, SpixTimeout);
-    
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    SPIx_Error();
-  }
-}
-
-/**
-  * @brief SPI Write a byte to device
-  * @param Value value to be written
-  * @retval None
-  */
-static void SPIx_Write(uint8_t Value)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  uint8_t data;
-
-  status = HAL_SPI_TransmitReceive(&heval_Spi, (uint8_t*) &Value, &data, 1, SpixTimeout);
-
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    SPIx_Error();
-  }
-}
-
-/**
-  * @brief  SPIx_FlushFifo
-  * @retval None
-  */
-static void SPIx_FlushFifo(void)
-{
-  HAL_SPIEx_FlushRxFifo(&heval_Spi);
-}
-
-/**
-  * @brief SPI error treatment function
-  * @retval None
-  */
-static void SPIx_Error (void)
-{
-  /* De-initialize the SPI communication BUS */
-  HAL_SPI_DeInit(&heval_Spi);
-  
-  /* Re- Initiaize the SPI communication BUS */
-  SPIx_Init();
-}
-
-/**
-  * @brief SPI MSP Init
-  * @param hspi SPI handle
-  * @retval None
-  */
-static void SPIx_MspInit(SPI_HandleTypeDef *hspi)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-
-  /* Enable SPI clock  */
-  EVAL_SPIx_CLK_ENABLE();
-  
-  /* enable EVAL_SPI gpio clocks */
-  EVAL_SPIx_SCK_GPIO_CLK_ENABLE();
-  EVAL_SPIx_MISO_GPIO_CLK_ENABLE();
-  EVAL_SPIx_MOSI_GPIO_CLK_ENABLE();
-  EVAL_SPIx_MOSI_DIR_GPIO_CLK_ENABLE();  
-  
-  /* configure SPI SCK */
-  GPIO_InitStruct.Pin       = EVAL_SPIx_SCK_PIN;
-  GPIO_InitStruct.Mode      = GPIO_MODE_AF_PP;
-  GPIO_InitStruct.Pull      = GPIO_NOPULL;
-  GPIO_InitStruct.Speed     = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Alternate = EVAL_SPIx_SCK_AF;
-  HAL_GPIO_Init(EVAL_SPIx_SCK_GPIO_PORT, &GPIO_InitStruct);
-  
-  /* configure SPI MOSI */
-  GPIO_InitStruct.Pin       = EVAL_SPIx_MOSI_PIN;
-  GPIO_InitStruct.Alternate = EVAL_SPIx_MOSI_AF;
-  HAL_GPIO_Init(EVAL_SPIx_MOSI_GPIO_PORT, &GPIO_InitStruct);
-  
-  /* configure SPI MISO  */
-  GPIO_InitStruct.Pin       = EVAL_SPIx_MISO_PIN;
-  GPIO_InitStruct.Alternate = EVAL_SPIx_MISO_AF;
-  HAL_GPIO_Init(EVAL_SPIx_MISO_GPIO_PORT, &GPIO_InitStruct);
-  
-  /* Set PB.2 as Out PP, as direction pin for MOSI */
-  GPIO_InitStruct.Pin       = EVAL_SPIx_MOSI_DIR_PIN;
-  GPIO_InitStruct.Speed     = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Mode      = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStruct.Pull      = GPIO_NOPULL;  
-  HAL_GPIO_Init(EVAL_SPIx_MOSI_DIR_GPIO_PORT, &GPIO_InitStruct);
-  
-  /* MOSI DIRECTION as output */
-  HAL_GPIO_WritePin(EVAL_SPIx_MOSI_DIR_GPIO_PORT, EVAL_SPIx_MOSI_DIR_PIN, GPIO_PIN_SET);
-  
-  /* Force the SPI peripheral clock reset */
-  EVAL_SPIx_FORCE_RESET();
-
-  /* Release the SPI peripheral clock reset */
-  EVAL_SPIx_RELEASE_RESET();
-}
-
-#endif /*HAL_SPI_MODULE_ENABLED*/
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32091C_EVAL_LINK_OPERATIONS Link Operation functions
-  * @{
-  */ 
-
-/******************************************************************************
-LINK OPERATIONS
-*******************************************************************************/
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-/********************************* LINK LCD ***********************************/
-
-/**
-* @brief  Configures the LCD_SPI interface.
-* @retval None
-*/
-void LCD_IO_Init(void)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-  
-  /* Configure the LCD Control pins ------------------------------------------*/
-  LCD_NCS_GPIO_CLK_ENABLE();
-  
-  /* Configure NCS in Output Push-Pull mode */
-  GPIO_InitStruct.Pin     = LCD_NCS_PIN;
-  GPIO_InitStruct.Mode    = GPIO_MODE_OUTPUT_OD;
-  GPIO_InitStruct.Pull    = GPIO_NOPULL;
-  GPIO_InitStruct.Speed   = GPIO_SPEED_FREQ_LOW;
-  HAL_GPIO_Init(LCD_NCS_GPIO_PORT, &GPIO_InitStruct);
-  
-  /* Set or Reset the control line */
-  LCD_CS_LOW();
-  LCD_CS_HIGH();
-  
-  SPIx_Init();
-}
-
-/**
-* @brief  Write register value.
-* @param  pData Pointer on the register value
-* @param  Size Size of byte to transmit to the register
-* @retval None
-*/
-void LCD_IO_WriteMultipleData(uint8_t *pData, uint32_t Size)
-{
-  uint32_t counter = 0;
-  
-  /* Reset LCD control line(/CS) and Send data */  
-  LCD_CS_LOW();
-  
-  /* Send Start Byte */
-  SPIx_Write(START_BYTE | LCD_WRITE_REG);
-
-  if (Size == 1)
-  {
-    /* Only 1 byte to be sent to LCD - general interface can be used */
-    /* Send Data */
-    SPIx_Write(*pData);
-  }
-  else
-  {
-    for (counter = Size; counter != 0; counter--)
-    {
-      while(((heval_Spi.Instance->SR) & SPI_FLAG_TXE) != SPI_FLAG_TXE)
-      {
-      }  
-      /* Need to invert bytes for LCD*/
-      *((__IO uint8_t*)&heval_Spi.Instance->DR) = *(pData+1);
-      
-      while(((heval_Spi.Instance->SR) & SPI_FLAG_TXE) != SPI_FLAG_TXE)
-      {
-      }  
-      *((__IO uint8_t*)&heval_Spi.Instance->DR) = *pData;
-      counter--;
-      pData += 2;
-    }
-    
-    /* Wait until the bus is ready before releasing Chip select */
-    while(((heval_Spi.Instance->SR) & SPI_FLAG_BSY) != RESET)
-    {
-    }
-  }
-
-  /* Empty the Rx fifo */
-  SPIx_FlushFifo();
-
-  /* Reset LCD control line(/CS) and Send data */  
-  LCD_CS_HIGH();
-}
-
-/**
-* @brief  Writes address on LCD register.
-* @param  Reg Register to be written
-* @retval None
-*/
-void LCD_IO_WriteReg(uint8_t Reg) 
-{
-  /* Reset LCD control line(/CS) and Send command */
-  LCD_CS_LOW();
-  
-  /* Send Start Byte */
-  SPIx_Write(START_BYTE | SET_INDEX);
-  
-  /* Write 16-bit Reg Index (High Byte is 0) */
-  SPIx_Write(0x00);
-  SPIx_Write(Reg);
-  
-  /* Deselect : Chip Select high */
-  LCD_CS_HIGH();
-}
-
-/**
-* @brief  Read data from LCD data register.
-* @param  Reg Regsiter to be read
-* @retval readvalue
-*/
-uint16_t LCD_IO_ReadData(uint16_t Reg) 
-{
-  uint32_t readvalue = 0;
-  
-  /* Send Reg value to Read */
-  LCD_IO_WriteReg(Reg);
-  
-  /* Reset LCD control line(/CS) and Send command */
-  LCD_CS_LOW();
-  
-  /* Send Start Byte */
-  SPIx_Write(START_BYTE | LCD_READ_REG);
-  
-  /* Read Upper Byte */
-  SPIx_Write(0xFF);
-  readvalue = SPIx_Read();
-  readvalue = readvalue << 8;
-  readvalue |= SPIx_Read();
-  
-  HAL_Delay(10);
-  
-  /* Deselect : Chip Select high */
-  LCD_CS_HIGH();
-  return readvalue;
-}
-
-/**
-* @brief  Wait for loop in ms.
-* @param  Delay in ms.
-* @retval None
-*/
-void LCD_Delay (uint32_t Delay)
-{
-  HAL_Delay (Delay);
-}
-
-/******************************** LINK SD Card ********************************/
-
-/**
-  * @brief  Initializes the SD Card and put it into StandBy State (Ready for 
-  *         data transfer).
-  * @retval None
-  */
-void SD_IO_Init(void)
-{
-  GPIO_InitTypeDef  GPIO_InitStruct;
-  uint8_t counter;
-
-  /* SD_CS_GPIO and SD_DETECT_GPIO Periph clock enable */
-  SD_CS_GPIO_CLK_ENABLE();
-  SD_DETECT_GPIO_CLK_ENABLE();
- 
-  /* Configure SD_CS_PIN pin: SD Card CS pin */
-  GPIO_InitStruct.Pin = SD_CS_PIN;
-  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
-  GPIO_InitStruct.Pull = GPIO_PULLUP;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
-  HAL_GPIO_Init(SD_CS_GPIO_PORT, &GPIO_InitStruct);
-
-  /* Configure SD_DETECT_PIN pin: SD Card detect pin */
-  GPIO_InitStruct.Pin = SD_DETECT_PIN;
-  GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING;
-  GPIO_InitStruct.Pull = GPIO_PULLUP;
-  HAL_GPIO_Init(SD_DETECT_GPIO_PORT, &GPIO_InitStruct);
-  
-  /* Configure LCD_CS_PIN pin: LCD Card CS pin */
-  GPIO_InitStruct.Pin   = LCD_NCS_PIN;
-  GPIO_InitStruct.Mode  = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStruct.Pull  = GPIO_NOPULL;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
-  HAL_GPIO_Init(LCD_NCS_GPIO_PORT, &GPIO_InitStruct);
-  LCD_CS_HIGH();
-
-  /* Enable and set SD EXTI Interrupt to the lowest priority */
-  HAL_NVIC_SetPriority(SD_DETECT_EXTI_IRQn, 0x03, 0);
-  HAL_NVIC_EnableIRQ(SD_DETECT_EXTI_IRQn);
-
-  /*------------Put SD in SPI mode--------------*/
-  /* SD SPI Config */
-  SPIx_Init();
-
-  /* SD chip select high */
-  SD_CS_HIGH();
-  
-  /* Send dummy byte 0xFF, 10 times with CS high */
-  /* Rise CS and MOSI for 80 clocks cycles */
-  for (counter = 0; counter <= 9; counter++)
-  {
-    /* Send dummy byte 0xFF */
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-  }
-}
-
-
-void SD_IO_CSState(uint8_t val)
-{
-  if(val == 1) 
-  {
-    SD_CS_HIGH();
-  }
-  else
-  {
-    SD_CS_LOW();
-  }
-}
-
-/**
-  * @brief  Write a byte on the SD.
-  * @param  DataIn byte to send.
-  * @param  DataOut read byte.
-  * @param  DataLength data length.
-  * @retval None
-  */
-void SD_IO_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength)
-{
-//  /* SD chip select low */
-//  SD_CS_LOW();
-  /* Send the byte */
-  SPIx_WriteReadData(DataIn, DataOut, DataLength);
-}
-
-/**
-  * @brief  Writes a byte on the SD.
-  * @param  Data byte to send.
-  * @retval None
-  */
-uint8_t SD_IO_WriteByte(uint8_t Data)
-{
-  uint8_t tmp;
-//  /* SD chip select low */
-//  SD_CS_LOW();
-//    
-  /* Send the byte */
-  SPIx_WriteReadData(&Data,&tmp,1);
-  return tmp;
-}
-
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-#if defined(HAL_I2C_MODULE_ENABLED)
-/********************************* LINK I2C EEPROM *****************************/
-/**
-* @brief  Initializes peripherals used by the I2C EEPROM driver.
-* @retval None
-*/
-void EEPROM_IO_Init(void)
-{
-  I2C1_Init();
-}
-
-/**
-* @brief  Write data to I2C EEPROM driver
-* @param  DevAddress Target device address
-* @param  MemAddress Internal memory address
-* @param  pBuffer Pointer to data buffer
-* @param  BufferSize Amount of data to be sent
-* @retval HAL status
-*/
-HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize)
-{
-  return (I2C1_WriteBuffer(DevAddress, MemAddress, I2C_MEMADD_SIZE_16BIT, pBuffer, BufferSize));
-}
-
-/**
-* @brief  Read data from I2C EEPROM driver
-* @param  DevAddress Target device address
-* @param  MemAddress Internal memory address
-* @param  pBuffer Pointer to data buffer
-* @param  BufferSize Amount of data to be read
-* @retval HAL status
-*/
-HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize)
-{
-  return (I2C1_ReadBuffer(DevAddress, MemAddress, I2C_MEMADD_SIZE_16BIT, pBuffer, BufferSize));
-}
-
-/**
-* @brief  Checks if target device is ready for communication. 
-* @note   This function is used with Memory devices
-* @param  DevAddress Target device address
-* @param  Trials Number of trials
-* @retval HAL status
-*/
-HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
-{ 
-  return (I2C1_IsDeviceReady(DevAddress, Trials));
-}
-
-/********************************* LINK I2C TEMPERATURE SENSOR *****************************/
-/**
-* @brief  Initializes peripherals used by the I2C Temperature Sensor driver.
-* @retval None
-*/
-void TSENSOR_IO_Init(void)
-{
-  I2C1_Init();
-}
-
-/**
-* @brief  Writes one byte to the TSENSOR.
-* @param  DevAddress Target device address
-* @param  pBuffer Pointer to data buffer
-* @param  WriteAddr TSENSOR's internal address to write to.
-* @param  Length Number of data to write
-* @retval None
-*/
-void TSENSOR_IO_Write(uint16_t DevAddress, uint8_t* pBuffer, uint8_t WriteAddr, uint16_t Length)
-{
-  I2C1_WriteBuffer(DevAddress, WriteAddr, I2C_MEMADD_SIZE_8BIT, pBuffer, Length);
-}
-
-/**
-* @brief  Reads one byte from the TSENSOR.
-* @param  DevAddress Target device address
-* @param  pBuffer  pointer to the buffer that receives the data read from the TSENSOR.
-* @param  ReadAddr  TSENSOR's internal address to read from.
-* @param  Length Number of data to read
-* @retval None
-*/
-void TSENSOR_IO_Read(uint16_t DevAddress, uint8_t* pBuffer, uint8_t ReadAddr, uint16_t Length)
-{
-  I2C1_ReadBuffer(DevAddress, ReadAddr, I2C_MEMADD_SIZE_8BIT, pBuffer, Length);
-}
-
-/**
-* @brief  Checks if Temperature Sensor is ready for communication. 
-* @param  DevAddress Target device address
-* @param  Trials Number of trials
-* @retval HAL status
-*/
-uint16_t TSENSOR_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
-{ 
-  return (I2C1_IsDeviceReady(DevAddress, Trials));
-}
-
-/****************************** LINK HDMI CEC *********************************/
-/**
-* @brief  Initializes CEC low level.
-* @retval None
-*/
-void HDMI_CEC_IO_Init (void) 
-{
-  GPIO_InitTypeDef  GPIO_InitStruct;
-  
-  /* Enable CEC clock */
-  __HAL_RCC_CEC_CLK_ENABLE();
-  
-  /* Enable CEC LINE GPIO clock */
-  HDMI_CEC_LINE_CLK_ENABLE();
-  
-  /* Configure CEC LINE GPIO as alternate function open drain */
-  GPIO_InitStruct.Pin = HDMI_CEC_LINE_PIN; 
-  GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Pull  = GPIO_NOPULL;
-  GPIO_InitStruct.Alternate = HDMI_CEC_LINE_AF;
-  HAL_GPIO_Init(HDMI_CEC_LINE_GPIO_PORT, &GPIO_InitStruct);    
-  
-  /* CEC IRQ Channel configuration */
-  HAL_NVIC_SetPriority((IRQn_Type)HDMI_CEC_IRQn, 0x3, 0x0);
-  HAL_NVIC_EnableIRQ((IRQn_Type)HDMI_CEC_IRQn); 
-  
-  /* Enable CEC HPD SINK GPIO clock */
-  HDMI_CEC_HPD_SINK_CLK_ENABLE();
-  
-  /* Configure CEC HPD SINK GPIO as output push pull */
-  GPIO_InitStruct.Pin = HDMI_CEC_HPD_SINK_PIN; 
-  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
-  GPIO_InitStruct.Pull  = GPIO_PULLDOWN;
-  HAL_GPIO_Init(HDMI_CEC_HPD_SINK_GPIO_PORT, &GPIO_InitStruct); 
-  
-  I2C1_Init();
-  
-  /* Enable CEC HPD SOURCE GPIO clock */
-  HDMI_CEC_HPD_SOURCE_CLK_ENABLE();
-  
-  /* Configure CEC HPD SOURCE GPIO as output push pull */
-  GPIO_InitStruct.Pin = HDMI_CEC_HPD_SOURCE_PIN; 
-  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
-  GPIO_InitStruct.Pull  = GPIO_PULLDOWN;
-  HAL_GPIO_Init(HDMI_CEC_HPD_SOURCE_GPIO_PORT, &GPIO_InitStruct); 
-  
-  I2C2_Init();
-}
-
-/**
-* @brief  Write data to I2C HDMI CEC driver
-* @param  pBuffer Pointer to data buffer
-* @param  BufferSize Amount of data to be sent
-* @retval HAL status
-*/
-HAL_StatusTypeDef HDMI_CEC_IO_WriteData(uint8_t * pBuffer, uint16_t BufferSize)
-{
-  return (I2C1_TransmitData(pBuffer, BufferSize));
-}
-
-/**
-* @brief  Read data to I2C HDMI CEC driver
-* @param  DevAddress Target device address
-* @param  pBuffer Pointer to data buffer
-* @param  BufferSize Amount of data to be sent
-* @retval HAL status
-*/
-HAL_StatusTypeDef HDMI_CEC_IO_ReadData(uint16_t DevAddress, uint8_t * pBuffer, uint16_t BufferSize)
-{
-  return (I2C2_ReceiveData(DevAddress, pBuffer, BufferSize));
-}
-
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 527
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval.h

@@ -1,527 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32091c_eval.h
-  * @author  MCD Application Team
-  * @brief   This file contains definitions for STM32091C_EVAL's Leds, push-buttons
-  *          and COM port hardware resources.
-  ******************************************************************************
-  * @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 __STM32091C_EVAL_H
-#define __STM32091C_EVAL_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @defgroup STM32091C_EVAL STM32091C-EVAL
-  * @{
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f0xx_hal.h"
-
-/** @defgroup STM32091C_EVAL_Common STM32091C-EVAL Common
-  * @{
-  */ 
-
-/** @defgroup STM32091C_EVAL_Private_Constants Private Constants
- * @{
- */
-/**
-* @}
-*/        
-
-/** @defgroup STM32091C_EVAL_Private_Variables Private Variables
- * @{
- */
-/**
-* @}
-*/
-
-/** @defgroup STM32091C_EVAL_Exported_Types Exported Types
-  * @{
-  */ 
-
-/**
- * @brief LED Types Definition
- */
-typedef enum 
-{
-  LED1 = 0,
-  LED2 = 1,
-  LED3 = 2,
-  LED4 = 3,
-  /* Color led aliases */
-  LED_GREEN  = LED1,
-  LED_ORANGE = LED2,
-  LED_RED    = LED3,
-  LED_BLUE   = LED4
-} Led_TypeDef;
-
-/**
- * @brief BUTTON Types Definition
- */
-typedef enum 
-{
-  BUTTON_TAMPER = 0
-} Button_TypeDef;
-
-typedef enum 
-{  
-  BUTTON_MODE_GPIO = 0,
-  BUTTON_MODE_EXTI = 1
-} ButtonMode_TypeDef;
-
-/**
- * @brief JOYSTICK Types Definition
- */
-typedef enum 
-{ 
-  JOY_SEL = 0,
-  JOY_DOWN = 1,
-  JOY_LEFT = 2,
-  JOY_RIGHT = 3,
-  JOY_UP = 4,
-  JOY_NONE = 5
-} JOYState_TypeDef;
-
-typedef enum 
-{  
-  JOY_MODE_GPIO = 0,
-  JOY_MODE_EXTI = 1
-} JOYMode_TypeDef;
-
-/**
- * @brief COM Types Definition
- */
-typedef enum 
-{
-  COM1 = 0
-} COM_TypeDef;   
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32091C_EVAL_Exported_Constants Exported Constants
-  * @{
-  */ 
-
-/** 
-  * @brief  Define for STM32091C_EVAL board  
-  */ 
-#if !defined (USE_STM32091C_EVAL)
- #define USE_STM32091C_EVAL
-#endif
-
-/** @defgroup STM32091C_EVAL_LED STM32091C-EVAL LED
-  * @{
-  */
-#define LEDn                             4
-
-#define LED1_PIN                         GPIO_PIN_0  /* PE.00 */
-#define LED1_GPIO_PORT                   GPIOE
-#define LED1_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOE_CLK_ENABLE()
-#define LED1_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOE_CLK_DISABLE()
-  
-#define LED2_PIN                         GPIO_PIN_1  /* PE.01 */
-#define LED2_GPIO_PORT                   GPIOE
-#define LED2_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOE_CLK_ENABLE()
-#define LED2_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOE_CLK_DISABLE()
-  
-#define LED3_PIN                         GPIO_PIN_7  /* PE.07 */
-#define LED3_GPIO_PORT                   GPIOE
-#define LED3_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOE_CLK_ENABLE()
-#define LED3_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOE_CLK_DISABLE()
-  
-#define LED4_PIN                         GPIO_PIN_8  /* PE.08 */
-#define LED4_GPIO_PORT                   GPIOE
-#define LED4_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOE_CLK_ENABLE()
-#define LED4_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOE_CLK_DISABLE()
-
-#define LEDx_GPIO_CLK_ENABLE(__LED__)    do { if((__LED__) == LED1) LED1_GPIO_CLK_ENABLE(); else \
-                                          if((__LED__) == LED2) LED2_GPIO_CLK_ENABLE(); else \
-                                          if((__LED__) == LED3) LED3_GPIO_CLK_ENABLE(); else \
-                                          if((__LED__) == LED4) LED4_GPIO_CLK_ENABLE();} while(0)
-
-#define LEDx_GPIO_CLK_DISABLE(__LED__)   (((__LED__) == LED1) ? LED1_GPIO_CLK_DISABLE() :\
-                                          ((__LED__) == LED2) ? LED2_GPIO_CLK_DISABLE() :\
-                                          ((__LED__) == LED3) ? LED3_GPIO_CLK_DISABLE() :\
-                                          ((__LED__) == LED4) ? LED4_GPIO_CLK_DISABLE() : 0 )
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32091C_EVAL_BUTTON STM32091C-EVAL BUTTON
-  * @{
-  */  
-#define JOYn                             5
-#define BUTTONn                          1
-
-/**
- * @brief Tamper push-button
- */
-#define TAMPER_BUTTON_PIN                   GPIO_PIN_13  /* PC.13 */
-#define TAMPER_BUTTON_GPIO_PORT             GPIOC
-#define TAMPER_BUTTON_GPIO_CLK_ENABLE()     __HAL_RCC_GPIOC_CLK_ENABLE()
-#define TAMPER_BUTTON_GPIO_CLK_DISABLE()    __HAL_RCC_GPIOC_CLK_DISABLE()
-#define TAMPER_BUTTON_EXTI_IRQn             EXTI4_15_IRQn
-
-#define TAMPERx_GPIO_CLK_ENABLE(__BUTTON__)    do { if((__BUTTON__) == BUTTON_TAMPER) TAMPER_BUTTON_GPIO_CLK_ENABLE();} while(0)
-
-#define TAMPERx_GPIO_CLK_DISABLE(__BUTTON__)   (((__BUTTON__) == BUTTON_TAMPER) ? TAMPER_BUTTON_GPIO_CLK_DISABLE(): 0 )
-
-/**
- * @brief Joystick Right push-button
- */
-#define RIGHT_JOY_PIN                 GPIO_PIN_3  /* PE.03 */
-#define RIGHT_JOY_GPIO_PORT           GPIOE
-#define RIGHT_JOY_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOE_CLK_ENABLE()
-#define RIGHT_JOY_GPIO_CLK_DISABLE()  __HAL_RCC_GPIOE_CLK_DISABLE()
-#define RIGHT_JOY_EXTI_IRQn           EXTI2_3_IRQn
-
-/**
- * @brief Joystick Left push-button
- */
-#define LEFT_JOY_PIN                  GPIO_PIN_2  /* PE.02 */
-#define LEFT_JOY_GPIO_PORT            GPIOE
-#define LEFT_JOY_GPIO_CLK_ENABLE()    __HAL_RCC_GPIOE_CLK_ENABLE()
-#define LEFT_JOY_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOE_CLK_DISABLE()
-#define LEFT_JOY_EXTI_IRQn            EXTI2_3_IRQn  
-
-/**
- * @brief Joystick Up push-button
- */
-#define UP_JOY_PIN                    GPIO_PIN_4  /* PE.04 */
-#define UP_JOY_GPIO_PORT              GPIOE
-#define UP_JOY_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOE_CLK_ENABLE()
-#define UP_JOY_GPIO_CLK_DISABLE()     __HAL_RCC_GPIOE_CLK_DISABLE()
-#define UP_JOY_EXTI_IRQn              EXTI4_15_IRQn
-
-/**
- * @brief Joystick Down push-button
- */  
-#define DOWN_JOY_PIN                  GPIO_PIN_5   /* PE.05 */
-#define DOWN_JOY_GPIO_PORT            GPIOE
-#define DOWN_JOY_GPIO_CLK_ENABLE()    __HAL_RCC_GPIOE_CLK_ENABLE()
-#define DOWN_JOY_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOE_CLK_DISABLE()
-#define DOWN_JOY_EXTI_IRQn            EXTI4_15_IRQn
-
-/**
- * @brief Joystick Sel push-button
- */
-#define SEL_JOY_PIN                   GPIO_PIN_0   /* PA.00 */
-#define SEL_JOY_GPIO_PORT             GPIOA
-#define SEL_JOY_GPIO_CLK_ENABLE()     __HAL_RCC_GPIOA_CLK_ENABLE()
-#define SEL_JOY_GPIO_CLK_DISABLE()    __HAL_RCC_GPIOA_CLK_DISABLE()
-#define SEL_JOY_EXTI_IRQn             EXTI0_1_IRQn 
-
-#define JOYx_GPIO_CLK_ENABLE(__JOY__)    do { if((__JOY__) == JOY_SEL) SEL_JOY_GPIO_CLK_ENABLE(); else \
-                                          if((__JOY__) == JOY_DOWN) DOWN_JOY_GPIO_CLK_ENABLE(); else \
-                                          if((__JOY__) == JOY_LEFT) LEFT_JOY_GPIO_CLK_ENABLE(); else \
-                                          if((__JOY__) == JOY_RIGHT) RIGHT_JOY_GPIO_CLK_ENABLE(); else \
-                                          if((__JOY__) == JOY_UP) UP_JOY_GPIO_CLK_ENABLE();} while(0)
-
-#define JOYx_GPIO_CLK_DISABLE(__JOY__)   (((__JOY__) == JOY_SEL) ? SEL_JOY_GPIO_CLK_DISABLE() :\
-                                          ((__JOY__) == JOY_DOWN) ? DOWN_JOY_GPIO_CLK_DISABLE() :\
-                                          ((__JOY__) == JOY_LEFT) ? LEFT_JOY_GPIO_CLK_DISABLE() :\
-                                          ((__JOY__) == JOY_RIGHT) ? RIGHT_JOY_GPIO_CLK_DISABLE() :\
-                                          ((__JOY__) == JOY_UP) ? UP_JOY_GPIO_CLK_DISABLE() : 0 )
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_COM STM32091C-EVAL COM
-  * @{
-  */
-#define COMn                            1
-
-/**
- * @brief Definition for COM port1, connected to USART1
- */ 
-#define EVAL_COM1                       USART1
-#define EVAL_COM1_CLK_ENABLE()          __HAL_RCC_USART1_CLK_ENABLE()
-#define EVAL_COM1_CLK_DISABLE()         __HAL_RCC_USART1_CLK_DISABLE()
-
-#define EVAL_COM1_TX_PIN                GPIO_PIN_9 /* PA.09 */
-#define EVAL_COM1_TX_GPIO_PORT          GPIOA
-#define EVAL_COM1_TX_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOA_CLK_ENABLE()
-#define EVAL_COM1_TX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
-#define EVAL_COM1_TX_AF                 GPIO_AF1_USART1
-
-#define EVAL_COM1_RX_PIN                GPIO_PIN_10 /* PA.10 */
-#define EVAL_COM1_RX_GPIO_PORT          GPIOA
-#define EVAL_COM1_RX_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOA_CLK_ENABLE()
-#define EVAL_COM1_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
-#define EVAL_COM1_RX_AF                 GPIO_AF1_USART1
-
-#define EVAL_COM1_CTS_PIN               GPIO_PIN_11 /* PA.11 */
-#define EVAL_COM1_CTS_GPIO_PORT         GPIOA
-#define EVAL_COM1_CTS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
-#define EVAL_COM1_CTS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
-#define EVAL_COM1_CTS_AF                GPIO_AF1_USART1
-
-#define EVAL_COM1_RTS_PIN               GPIO_PIN_12 /* PA.12 */
-#define EVAL_COM1_RTS_GPIO_PORT         GPIOA
-#define EVAL_COM1_RTS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
-#define EVAL_COM1_RTS_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
-#define EVAL_COM1_RTS_AF                GPIO_AF1_USART1
-   
-#define EVAL_COM1_IRQn                  USART1_IRQn
-
-#define COMx_CLK_ENABLE(__COM__)        do { if((__COM__) == COM1) EVAL_COM1_CLK_ENABLE();} while(0)
-#define COMx_CLK_DISABLE(__COM__)       (((__COM__) == COM1) ? EVAL_COM1_CLK_DISABLE() : 0)
-
-#define COMx_TX_GPIO_CLK_ENABLE(__COM__) do { if((__COM__) == COM1) EVAL_COM1_TX_GPIO_CLK_ENABLE();} while(0)
-#define COMx_TX_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_TX_GPIO_CLK_DISABLE() : 0)
-
-#define COMx_RX_GPIO_CLK_ENABLE(__COM__) do { if((__COM__) == COM1) EVAL_COM1_RX_GPIO_CLK_ENABLE();} while(0)
-#define COMx_RX_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_RX_GPIO_CLK_DISABLE() : 0)
-
-#define COMx_CTS_GPIO_CLK_ENABLE(__COM__) do { if((__COM__) == COM1) EVAL_COM1_CTS_GPIO_CLK_ENABLE();} while(0)
-#define COMx_CTS_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_CTS_GPIO_CLK_DISABLE() : 0)
-
-#define COMx_RTS_GPIO_CLK_ENABLE(__COM__) do { if((__COM__) == COM1) EVAL_COM1_RTS_GPIO_CLK_ENABLE();} while(0)
-#define COMx_RTS_GPIO_CLK_DISABLE(__COM__) (((__COM__) == COM1) ? EVAL_COM1_RTS_GPIO_CLK_DISABLE() : 0)
-
-#if defined(HAL_I2C_MODULE_ENABLED)
-/*##################### I2Cx ###################################*/
-/* User can use this section to tailor I2Cx instance used and associated resources */
-/* Definition for I2C1 Pins */
-#define EVAL_I2C1                        I2C1
-#define EVAL_I2C1_CLK_ENABLE()           __HAL_RCC_I2C1_CLK_ENABLE()
-#define EVAL_I2C1_CLK_DISABLE()          __HAL_RCC_I2C1_CLK_DISABLE()
-#define EVAL_I2C1_FORCE_RESET()          __HAL_RCC_I2C1_FORCE_RESET()
-#define EVAL_I2C1_RELEASE_RESET()        __HAL_RCC_I2C1_RELEASE_RESET()  
-
-#define EVAL_I2C1_SCL_PIN                GPIO_PIN_6		/* PB.6 */
-#define EVAL_I2C1_SDA_PIN                GPIO_PIN_7		/* PB.7 */
-
-#define EVAL_I2C1_GPIO_PORT		 GPIOB			/* GPIOB */
-#define EVAL_I2C1_GPIO_CLK_ENABLE()    	 __HAL_RCC_GPIOB_CLK_ENABLE()
-#define EVAL_I2C1_GPIO_CLK_DISABLE()     __HAL_RCC_GPIOB_CLK_DISABLE() 
-#define EVAL_I2C1_SCL_SDA_AF		 GPIO_AF1_I2C1
-
-/* Definition for I2C2 Pins */
-#define EVAL_I2C2                       I2C2
-#define EVAL_I2C2_CLK_ENABLE()          __HAL_RCC_I2C2_CLK_ENABLE()
-#define EVAL_I2C2_CLK_DISABLE()         __HAL_RCC_I2C2_CLK_DISABLE()
-#define EVAL_I2C2_FORCE_RESET()         __HAL_RCC_I2C2_FORCE_RESET()
-#define EVAL_I2C2_RELEASE_RESET()       __HAL_RCC_I2C2_RELEASE_RESET()
-
-#define EVAL_I2C2_SCL_PIN               GPIO_PIN_13		/* PB.13 */
-#define EVAL_I2C2_SDA_PIN               GPIO_PIN_14		/* PB.14 */
-
-#define EVAL_I2C2_GPIO_PORT           	GPIOB                   /* GPIOB */
-#define EVAL_I2C2_GPIO_CLK_ENABLE()    	__HAL_RCC_GPIOB_CLK_ENABLE()
-#define EVAL_I2C2_GPIO_CLK_DISABLE()    __HAL_RCC_GPIOB_CLK_DISABLE()
-#define EVAL_I2C2_AF                    GPIO_AF5_I2C2
-
-/* Definition for I2C2 NVIC */
-#define EVAL_I2C2_IRQn                  I2C2_IRQn
-  
-/* Maximum Timeout values for flags waiting loops. These timeouts are not based
-   on accurate values, they just guarantee that the application will not remain
-   stuck if the I2C communication is corrupted.
-   You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
-#define EVAL_I2C1_TIMEOUT_MAX            1000
-#define EVAL_I2C2_TIMEOUT_MAX            1000
-
-/* I2C TIMING is calculated in case of the I2C Clock source is the SYSCLK = 48 MHz */
-/* Set TIMING to 0x00E0D3FF to reach 100 KHz speed (Rise time = 50ns, Fall time = 10ns) */
-#define I2C2_TIMING                      0x00E0D3FF
-#define I2C1_TIMING                      0x00E0D3FF
-
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-/**
-  * @brief  Definition for SPI Interface pins (SPI1 used)
-  */
-#define EVAL_SPIx                       SPI1
-#define EVAL_SPIx_CLK_ENABLE()          __HAL_RCC_SPI1_CLK_ENABLE()
-#define EVAL_SPIx_CLK_DISABLE()         __HAL_RCC_SPI1_CLK_DISABLE()
-#define EVAL_SPIx_FORCE_RESET()          __HAL_RCC_SPI1_FORCE_RESET()
-#define EVAL_SPIx_RELEASE_RESET()        __HAL_RCC_SPI1_RELEASE_RESET()
-
-#define EVAL_SPIx_SCK_PIN                 GPIO_PIN_13             /* PE.13 */
-#define EVAL_SPIx_SCK_GPIO_PORT           GPIOE                   /* GPIOE */
-#define EVAL_SPIx_SCK_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOE_CLK_ENABLE()
-#define EVAL_SPIx_SCK_GPIO_CLK_DISABLE()  __HAL_RCC_GPIOE_CLK_DISABLE()
-#define EVAL_SPIx_SCK_AF                  GPIO_AF1_SPI1
-
-#define EVAL_SPIx_MISO_PIN              GPIO_PIN_14             /* PE.14 */
-#define EVAL_SPIx_MISO_GPIO_PORT        GPIOE                   /* GPIOE */
-#define EVAL_SPIx_MISO_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE()
-#define EVAL_SPIx_MISO_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE()
-#define EVAL_SPIx_MISO_AF               GPIO_AF1_SPI1
-
-#define EVAL_SPIx_MOSI_PIN              GPIO_PIN_15             /* PE.15 */
-#define EVAL_SPIx_MOSI_GPIO_PORT        GPIOE                   /* GPIOE */
-#define EVAL_SPIx_MOSI_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE()
-#define EVAL_SPIx_MOSI_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE()
-#define EVAL_SPIx_MOSI_AF               GPIO_AF1_SPI1
-
-#define EVAL_SPIx_MOSI_DIR_PIN            GPIO_PIN_9             /* PE.09 */
-#define EVAL_SPIx_MOSI_DIR_GPIO_PORT      GPIOE                  /* GPIOE */
-#define EVAL_SPIx_MOSI_DIR_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOE_CLK_ENABLE()
-#define EVAL_SPIx_MOSI_DIR_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE()
-
-/* Maximum Timeout values for flags waiting loops. These timeouts are not based
-   on accurate values, they just guarantee that the application will not remain
-   stuck if the SPI communication is corrupted.
-   You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
-#define EVAL_SPIx_TIMEOUT_MAX                 1000
-
-#endif /* HAL_SPI_MODULE_ENABLED */
-/**
-  * @}
-  */
-
-
-/** @defgroup STM32091C_EVAL_COMPONENT STM32091C-EVAL COMPONENT
-  * @{
-  */
-/*##################### LCD ###################################*/  
-/* Chip Select macro definition */
-#define LCD_CS_LOW()                    HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_RESET)
-#define LCD_CS_HIGH()                   HAL_GPIO_WritePin(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, GPIO_PIN_SET)
-/** 
-  * @brief  LCD Control pins 
-  */ 
-#define LCD_NCS_PIN                     GPIO_PIN_10		/* PE. 10*/
-#define LCD_NCS_GPIO_PORT               GPIOE			/* GPIOE */
-#define LCD_NCS_GPIO_CLK_ENABLE()       __HAL_RCC_GPIOE_CLK_ENABLE()
-#define LCD_NCS_GPIO_CLK_DISABLE()      __HAL_RCC_GPIOE_CLK_DISABLE()  
-
-
-/*##################### SD ###################################*/  
-/* Chip Select macro definition */
-#define SD_CS_LOW()                     HAL_GPIO_WritePin(SD_CS_GPIO_PORT, SD_CS_PIN, GPIO_PIN_RESET)
-#define SD_CS_HIGH()                    HAL_GPIO_WritePin(SD_CS_GPIO_PORT, SD_CS_PIN, GPIO_PIN_SET)  
-/**
-  * @brief SD card Control pin  
-  */
-#define SD_CS_PIN                       GPIO_PIN_12             /* PE.12 */
-#define SD_CS_GPIO_PORT                 GPIOE                   /* GPIOE */
-#define SD_CS_GPIO_CLK_ENABLE()         __HAL_RCC_GPIOE_CLK_ENABLE()
-#define SD_CS_GPIO_CLK_DISABLE()        __HAL_RCC_GPIOE_CLK_DISABLE()
-
-/**
-  * @brief  SD Detect Interface pins
-  */
-#define SD_DETECT_PIN                   GPIO_PIN_11             /* PE.11 */
-#define SD_DETECT_GPIO_PORT             GPIOE                   /* GPIOE */
-#define SD_DETECT_GPIO_CLK_ENABLE()     __HAL_RCC_GPIOE_CLK_ENABLE()
-#define SD_DETECT_GPIO_CLK_DISABLE()    __HAL_RCC_GPIOE_CLK_DISABLE()
-#define SD_DETECT_EXTI_IRQn             EXTI4_15_IRQn
-
-
-/*##################### HDMI-CEC ###################################*/
-/**
-  * @brief  I2C HDMI CEC Interface pins
-  */
-#define HDMI_CEC_HPD_SINK_PIN		  GPIO_PIN_11		/* PD.11*/
-#define HDMI_CEC_HPD_SINK_GPIO_PORT       GPIOD
-#define HDMI_CEC_HPD_SINK_CLK_ENABLE()    __HAL_RCC_GPIOD_CLK_ENABLE()
-#define HDMI_CEC_HPD_SINK_CLK_DISABLE()   __HAL_RCC_GPIOD_CLK_DISABLE()
-  
-#define HDMI_CEC_HPD_SOURCE_PIN           GPIO_PIN_10  /* PD.10 */
-#define HDMI_CEC_HPD_SOURCE_GPIO_PORT     GPIOD        /* GPIOD */
-#define HDMI_CEC_HPD_SOURCE_CLK_ENABLE()  __HAL_RCC_GPIOD_CLK_ENABLE()
-#define HDMI_CEC_HPD_SOURCE_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
-
-#define HDMI_CEC_LINE_PIN                 GPIO_PIN_10		/* PB.10*/
-#define HDMI_CEC_LINE_GPIO_PORT           GPIOB
-#define HDMI_CEC_LINE_CLK_ENABLE()        __HAL_RCC_GPIOB_CLK_ENABLE()
-#define HDMI_CEC_LINE_CLK_DISABLE() 	  __HAL_RCC_GPIOB_CLK_DISABLE()
-#define HDMI_CEC_LINE_AF                  GPIO_AF0_CEC   
-#define HDMI_CEC_IRQn                     CEC_CAN_IRQn  
-
-/* HDMI-CEC hardware I2C address */ 
-#define HDMI_CEC_I2C_ADDRESS              0xA0 /* TBC */
-
-/**
-  * @}
-  */  
-
-/**
-  * @}
-  */  
- 
-/** @defgroup STM32091C_EVAL_Exported_Functions Exported Functions
-  * @{
-  */
-uint32_t                BSP_GetVersion(void);
-void                    BSP_LED_Init(Led_TypeDef Led);
-void                    BSP_LED_On(Led_TypeDef Led);
-void                    BSP_LED_Off(Led_TypeDef Led);
-void                    BSP_LED_Toggle(Led_TypeDef Led);
-void                    BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode);
-uint32_t                BSP_PB_GetState(Button_TypeDef Button);
-uint8_t           BSP_JOY_Init(JOYMode_TypeDef Joy_Mode);
-JOYState_TypeDef  BSP_JOY_GetState(void);
-#if defined(HAL_UART_MODULE_ENABLED)
-void                    BSP_COM_Init(COM_TypeDef COM, UART_HandleTypeDef* huart); 
-#endif /* HAL_UART_MODULE_ENABLED */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-  
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32091C_EVAL_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 495
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_eeprom.c

@@ -1,495 +0,0 @@
-/**
-******************************************************************************
-* @file    stm32091c_eval_eeprom.c
-* @author  MCD Application Team
-* @brief   This file provides a set of functions needed to manage a M24LR64 
-*          I2C EEPROM memory.
-*          
-*          =================================================================== 
-*          Notes:
-*           - This driver is intended for STM32F0xx families devices only.     
-*           - The I2C EEPROM memory (M24LR64) is available on separate daughter 
-*             board ANT7-M24LR-A, which is provided with the STM32091C 
-*             EVAL board.
-*             To use this driver with M24LR64, you have to connect
-*             the ANT7-M24LR-A to CN2 connector of STM32091C EVAL board.
-*          ===================================================================
-*              
-*          It implements a high level communication layer for read and write 
-*          from/to this memory. The needed STM32F0xx hardware resources (I2C
-*          and GPIO) are defined in stm32091c_eval.h file,
-*          and the initialization is performed depending of EEPROMs
-*          in EEPROM_IO_Init() function declared in stm32091c_eval.c file.
-*          You can easily tailor this driver to any other development board, 
-*          by just adapting the defines for hardware resources and 
-*          EEPROM_IO_Init() function. 
-*             
-*          @note In this driver, basic read and write functions
-*          (BSP_EEPROM_ReadBuffer() and BSP_EEPROM_WriteBuffer())
-*          use Polling mode to perform the data transfer to/from EEPROM memories.
-
-*     +-----------------------------------------------------------------+
-*     |               Pin assignment for M24LR64 EEPROM                 |
-*     +---------------------------------------+-----------+-------------+
-*     |  STM32F0xx I2C Pins                   |   EEPROM  |   Pin       |
-*     +---------------------------------------+-----------+-------------+
-*     | EEPROM_I2C_SDA_PIN (PB7)/ SDA         |   SDA     |    1        |
-*     | .                                     |   NC      |    2        |
-*     | EEPROM_I2C_SCL_PIN/ SCL               |   SCL     |    3        |
-*     | EX_RESET(PD7)                         |   RESET   |    4        |
-*     | .                                     |   VDD     |    5        |
-*     | .                                     |   NC      |    6        |
-*     | .                                     |   GND     |    7        |
-*     | .                                     |   NC      |    8        |
-*     +---------------------------------------+-----------+-------------+
-*
-******************************************************************************
-* @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.
-*
-******************************************************************************
-*/
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32091c_eval_eeprom.h"
-
-/** @addtogroup BSP
-* @{
-*/
-
-/** @addtogroup STM32091C_EVAL
-  * @{
-  */
-
-/** @addtogroup STM32091C_EVAL_EEPROM
-  * @brief      This file includes the I2C EEPROM driver 
-  *             of STM32091C-EVAL board.
-  * @{
-  */
-
-/** @addtogroup STM32091C_EVAL_EEPROM_Private_Variables
-  * @{
-  */
-__IO uint16_t  EEPROMAddress = 0;
-__IO uint16_t  EEPROMPageSize = 0;
-__IO uint16_t  EEPROMDataRead;
-__IO uint8_t   EEPROMDataWrite;
-
-static EEPROM_DrvTypeDef *EEPROM_SelectedDevice = 0;
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32091C_EVAL_EEPROM_Private_Functions
-  * @{
-  */
-static uint32_t EEPROM_I2C_Init(void);
-static uint32_t EEPROM_I2C_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint32_t* NumByteToRead);
-static uint32_t EEPROM_I2C_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint32_t* NumByteToWrite);
-static uint32_t EEPROM_I2C_WaitEepromStandbyState(void);
-/**
-  * @}
-  */
-  
-/** @defgroup STM32091C_EVAL_EEPROM_Private_Types Private Types
-  * @{
-  */
-
-/* EEPROM I2C driver typedef */
-EEPROM_DrvTypeDef EEPROM_I2C_Drv =
-{
-  EEPROM_I2C_Init,
-  EEPROM_I2C_ReadBuffer,
-  EEPROM_I2C_WritePage
-};
-/**
-  * @}
-  */
-
-/** @addtogroup STM32091C_EVAL_EEPROM_Exported_Functions
-  * @{
-  */
-
-/**
-  * @brief  Initializes peripherals used by the I2C EEPROM driver.
-  * 
-  * @note There are 2 different versions of M24LR64 (A01 & A02).
-  *             Then try to connect on 1st one (EEPROM_I2C_ADDRESS_A01) 
-  *             and if problem, check the 2nd one (EEPROM_I2C_ADDRESS_A02)
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0)
-  */
-uint32_t BSP_EEPROM_Init(void)
-{ 
-  EEPROM_SelectedDevice = &EEPROM_I2C_Drv;
-  if(EEPROM_SelectedDevice->Init != 0)
-  {
-    return (EEPROM_SelectedDevice->Init());
-  }
-  else
-  {
-    return EEPROM_FAIL;
-  }
-}
-
-/**
-  * @brief  Reads a block of data from the EEPROM device selected.
-  * @param  pBuffer  pointer to the buffer that receives the data read from 
-  *         the EEPROM.
-  * @param  ReadAddr  EEPROM's internal address to start reading from.
-  * @param  NumByteToRead  pointer to the variable holding number of bytes to 
-  *         be read from the EEPROM.
-  * 
-  *        @note The variable pointed by NumByteToRead is reset to 0 when all the 
-  *              data are read from the EEPROM. Application should monitor this 
-  *              variable in order know when the transfer is complete.
-  * 
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-uint32_t BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint32_t* NumByteToRead)
-{
-  if(EEPROM_SelectedDevice->ReadBuffer != 0)
-  {
-    return (EEPROM_SelectedDevice->ReadBuffer(pBuffer, ReadAddr, NumByteToRead));
-  }
-  else
-  {
-    return EEPROM_FAIL;
-  }
-}
-
-/**
-  * @brief  Writes buffer of data to the EEPROM device selected.
-  * @param  pBuffer  pointer to the buffer  containing the data to be written 
-  *         to the EEPROM.
-  * @param  WriteAddr  EEPROM's internal address to write to.
-  * @param  NumByteToWrite  number of bytes to write to the EEPROM.
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-uint32_t BSP_EEPROM_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint32_t NumByteToWrite)
-{
-  uint16_t numofpage = 0, numofsingle = 0, count = 0;
-  uint16_t addr = 0;
-  uint32_t dataindex = 0;
-  uint32_t status = EEPROM_OK;
-
-  addr = WriteAddr % EEPROMPageSize;
-  count = EEPROMPageSize - addr;
-  numofpage =  NumByteToWrite / EEPROMPageSize;
-  numofsingle = NumByteToWrite % EEPROMPageSize;
-
-  if(EEPROM_SelectedDevice->WritePage == 0)
-  {
-    return EEPROM_FAIL;
-  }
-  
-  /*!< If WriteAddr is EEPROM_PAGESIZE aligned  */
-  if(addr == 0) 
-  {
-    /*!< If NumByteToWrite < EEPROM_PAGESIZE */
-    if(numofpage == 0) 
-    {
-      /* Store the number of data to be written */
-      dataindex = numofsingle;
-      /* Start writing data */
-      status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-      if (status != EEPROM_OK)
-      {
-        return status;
-      }
-    }
-    /*!< If NumByteToWrite > EEPROM_PAGESIZE */
-    else  
-    {
-      while(numofpage--)
-      {
-        /* Store the number of data to be written */
-        dataindex = EEPROMPageSize;        
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-        
-        WriteAddr +=  EEPROMPageSize;
-        pBuffer += EEPROMPageSize;
-      }
-
-      if(numofsingle!=0)
-      {
-        /* Store the number of data to be written */
-        dataindex = numofsingle;          
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-      }
-    }
-  }
-  /*!< If WriteAddr is not EEPROM_PAGESIZE aligned  */
-  else 
-  {
-    /*!< If NumByteToWrite < EEPROM_PAGESIZE */
-    if(numofpage== 0) 
-    {
-      /*!< If the number of data to be written is more than the remaining space 
-      in the current page: */
-      if (NumByteToWrite > count)
-      {
-        /* Store the number of data to be written */
-        dataindex = count;        
-        /*!< Write the data contained in same page */
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-        
-        /* Store the number of data to be written */
-        dataindex = (NumByteToWrite - count);          
-        /*!< Write the remaining data in the following page */
-        status = EEPROM_SelectedDevice->WritePage((uint8_t*)(pBuffer + count), (WriteAddr + count), (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-      }
-      else      
-      {
-        /* Store the number of data to be written */
-        dataindex = numofsingle;         
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-      }
-    }
-    /*!< If NumByteToWrite > EEPROM_PAGESIZE */
-    else
-    {
-      NumByteToWrite -= count;
-      numofpage =  NumByteToWrite / EEPROMPageSize;
-      numofsingle = NumByteToWrite % EEPROMPageSize;
-      
-      if(count != 0)
-      {  
-        /* Store the number of data to be written */
-        dataindex = count;         
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-        WriteAddr += count;
-        pBuffer += count;
-      } 
-      
-      while(numofpage--)
-      {
-        /* Store the number of data to be written */
-        dataindex = EEPROMPageSize;          
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-        WriteAddr +=  EEPROMPageSize;
-        pBuffer += EEPROMPageSize;  
-      }
-      if(numofsingle != 0)
-      {
-        /* Store the number of data to be written */
-        dataindex = numofsingle;           
-        status = EEPROM_SelectedDevice->WritePage(pBuffer, WriteAddr, (uint32_t*)(&dataindex));
-        if (status != EEPROM_OK)
-        {
-          return status;
-        }
-      }
-    }
-  }
-  
-  /* If all operations OK, return EEPROM_OK (0) */
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Basic management of the timeout situation.
-  * @retval None
-  */
-__weak void BSP_EEPROM_TIMEOUT_UserCallback(void)
-{
-}
-/**
-  * @}
-  */
-
-/** @addtogroup STM32091C_EVAL_EEPROM_Private_Functions
-  * @{
-  */ 
-
-/**
-  * @brief  Initializes peripherals used by the I2C EEPROM driver.
-  * 
-  * @note There are 2 different versions of M24LR64 (A01 & A02).
-  *             Then try to connect on 1st one (EEPROM_I2C_ADDRESS_A01) 
-  *             and if problem, check the 2nd one (EEPROM_I2C_ADDRESS_A02)
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0)
-  */
-static uint32_t EEPROM_I2C_Init(void)
-{
-  EEPROM_IO_Init();
-
-  /*Select the EEPROM address for M24LR64 A02 and check if OK*/
-  EEPROMAddress = EEPROM_ADDRESS_M24LR64_A01;
-  EEPROMPageSize = EEPROM_PAGESIZE_M24LR64;
-  if (EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK) 
-  {
-    /*Select the EEPROM address for M24LR64 A01 and check if OK*/
-    EEPROMAddress = EEPROM_ADDRESS_M24LR64_A02;
-    EEPROMPageSize = EEPROM_PAGESIZE_M24LR64;
-    if (EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK) 
-    {
-      return EEPROM_FAIL;
-    }
-  }
-
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Reads a block of data from the I2C EEPROM.
-  * @param  pBuffer  pointer to the buffer that receives the data read from 
-  *         the EEPROM.
-  * @param  ReadAddr  EEPROM's internal address to start reading from.
-  * @param  NumByteToRead  pointer to the variable holding number of bytes to 
-  *         be read from the EEPROM.
-  * 
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-static uint32_t EEPROM_I2C_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint32_t* NumByteToRead)
-{  
-  uint32_t buffersize = *NumByteToRead;
-  
-  if (EEPROM_IO_ReadData(EEPROMAddress, ReadAddr, pBuffer, buffersize) != HAL_OK)
-  {
-    return EEPROM_FAIL;
-  }
-  
-  /* If all operations OK, return EEPROM_OK (0) */
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Writes more than one byte to the EEPROM with a single WRITE cycle.
-  *
-  * @note   The number of bytes (combined to write start address) must not 
-  *         cross the EEPROM page boundary. This function can only write into
-  *         the boundaries of an EEPROM page.
-  *         This function doesn't check on boundaries condition (in this driver 
-  *         the function BSP_EEPROM_WriteBuffer() which calls EEPROM_WritePage() is 
-  *         responsible of checking on Page boundaries).
-  * 
-  * @param  pBuffer  pointer to the buffer containing the data to be written to 
-  *         the EEPROM.
-  * @param  WriteAddr  EEPROM's internal address to write to.
-  * @param  NumByteToWrite  pointer to the variable holding number of bytes to 
-  *         be written into the EEPROM. 
-  * 
-  *        @note The variable pointed by NumByteToWrite is reset to 0 when all the 
-  *              data are written to the EEPROM. Application should monitor this 
-  *              variable in order know when the transfer is complete.
-  * 
-  * 
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-static uint32_t EEPROM_I2C_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint32_t* NumByteToWrite)
-{ 
-  uint32_t buffersize = *NumByteToWrite;
-
-  if (EEPROM_IO_WriteData(EEPROMAddress, WriteAddr, pBuffer, buffersize) != HAL_OK)
-  {
-    return EEPROM_FAIL;
-  }
-  
-  /* Wait for EEPROM Standby state */
-  if (EEPROM_I2C_WaitEepromStandbyState() != EEPROM_OK) 
-  {
-    return EEPROM_FAIL;
-  }
-  
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Wait for EEPROM I2C Standby state.
-  * 
-  * @note  This function allows to wait and check that EEPROM has finished the 
-  *        last operation. It is mostly used after Write operation: after receiving
-  *        the buffer to be written, the EEPROM may need additional time to actually
-  *        perform the write operation. During this time, it doesn't answer to
-  *        I2C packets addressed to it. Once the write operation is complete
-  *        the EEPROM responds to its address.
-  * 
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-static uint32_t EEPROM_I2C_WaitEepromStandbyState(void)  
-{
-  /* Check if the maximum allowed number of trials has bee reached */
-  if (EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS) != HAL_OK)
-  {
-    /* If the maximum number of trials has been reached, exit the function */
-    BSP_EEPROM_TIMEOUT_UserCallback();
-    return EEPROM_TIMEOUT;
-  }
-  return EEPROM_OK;
-}
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */  
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 153
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_eeprom.h

@@ -1,153 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32091c_eval_eeprom.h
-  * @author  MCD Application Team
-  * @brief   This file contains all the functions prototypes for 
-  *          the stm32091c_eval_eeprom.c firmware driver.
-  ******************************************************************************
-  * @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 __STM32091C_EVAL_EEPROM_H
-#define __STM32091C_EVAL_EEPROM_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32091c_eval.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32091C_EVAL
-  * @{
-  */
-
-/** @defgroup STM32091C_EVAL_EEPROM STM32091C-EVAL EEPROM
-  * @{
-  */
-
-/** @defgroup STM32091C_EVAL_EEPROM_Private_Variables Private Variables
-  * @{
-  */ 
-/**
-  * @}
-  */ 
-  
-/** @defgroup STM32091C_EVAL_EEPROM_Exported_Types Exported Types
-  * @{
-  */ 
-typedef struct
-{
-  uint32_t  (*Init)(void);
-  uint32_t  (*ReadBuffer)(uint8_t* , uint16_t , uint32_t* );
-  uint32_t  (*WritePage)(uint8_t* , uint16_t , uint32_t* );
-}EEPROM_DrvTypeDef;
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_EEPROM_Exported_Constants Exported Constants
-  * @{
-  */
-/* EEPROMs hardware address and page size */ 
-#define EEPROM_ADDRESS_M24LR64_A01      0xA0    /* RF EEPROM ANT7-M24LR-A01 used */
-#define EEPROM_ADDRESS_M24LR64_A02      0xA6    /* RF EEPROM ANT7-M24LR-A02 used */
-
-#define EEPROM_PAGESIZE_M24LR64         4       /* RF EEPROM ANT7-M24LR-A used */
-      
-/* EEPROM BSP return values */
-#define EEPROM_OK                       0
-#define EEPROM_FAIL                     1   
-#define EEPROM_TIMEOUT                  2   
- 
-/* EEPROM BSP devices definition list supported */
-#define BSP_EEPROM_M24LR64              1       /* RF I2C EEPROM M24LR64 */
-
-/* Maximum number of trials for EEPROM_I2C_WaitEepromStandbyState() function */
-#define EEPROM_MAX_TRIALS               300
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_EEPROM_Exported_Functions Exported Functions
-  * @{
-  */
-uint32_t          BSP_EEPROM_Init(void);
-uint32_t          BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint32_t* NumByteToRead);
-uint32_t          BSP_EEPROM_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint32_t NumByteToWrite);
-
-/* USER Callbacks: This function is declared as __weak in EEPROM driver and 
-   should be implemented into user application.  
-   BSP_EEPROM_TIMEOUT_UserCallback() function is called whenever a timeout condition 
-   occure during communication (waiting on an event that doesn't occur, bus 
-   errors, busy devices ...). */
-void              BSP_EEPROM_TIMEOUT_UserCallback(void);
-
-
-/* Link functions for I2C EEPROM peripheral */
-void              EEPROM_IO_Init(void);
-HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_EEPROM_Private_Functions Private Functions
-  * @{
-  */
-/**
-  * @}
-  */  
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32091C_EVAL_EEPROM_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 928
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_lcd.c

@@ -1,928 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32091c_eval_lcd.c
-  * @author  MCD Application Team
-  * @brief   This file includes the driver for Liquid Crystal Display modules
-  *          mounted on STM32091C-EVAL evaluation board.
-  ******************************************************************************
-  * @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.
-  *
-  ******************************************************************************
-@verbatim
-  ==============================================================================
-                     ##### How to use this driver #####
-  ==============================================================================  
-  [..] 
-   (#) This driver is used to drive indirectly an LCD TFT.
-   (#) This driver supports the AM-240320LDTNQW00H (SPFD5408D) and 
-       AM240320LGTNQW00H (HX8347D) LCD mounted on MB895 daughter board 
-   (#) The SPFD5408D and HX8347D components driver MUST be included with this driver.  
-
-   (#) Initialization steps:
-       (++) Initialize the LCD using the LCD_Init() function.
-  
-   (#) Display on LCD
-       (++) Clear the hole LCD using yhe LCD_Clear() function or only one specified 
-            string line using the LCD_ClearStringLine() function.
-       (++) Display a character on the specified line and column using the LCD_DisplayChar()
-            function or a complete string line using the LCD_DisplayStringAtLine() function.
-       (++) Display a string line on the specified position (x,y in pixel) and align mode
-            using the LCD_DisplayStringAtLine() function.          
-       (++) Draw and fill a basic shapes (dot, line, rectangle, circle, ellipse, .. bitmap) 
-            on LCD using a set of functions.    
-  @endverbatim
-  */
-
-    
-/* Includes ------------------------------------------------------------------*/
-#include "stm32091c_eval_lcd.h"
-#include "../../../Utilities/Fonts/fonts.h"
-#include "../../../Utilities/Fonts/font24.c"
-#include "../../../Utilities/Fonts/font20.c"
-#include "../../../Utilities/Fonts/font16.c"
-#include "../../../Utilities/Fonts/font12.c"
-#include "../../../Utilities/Fonts/font8.c"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32091C_EVAL
-  * @{
-  */
-    
-/** @addtogroup STM32091C_EVAL_LCD
-  * @{
-  */ 
-
-/** @addtogroup STM32091C_EVAL_LCD_Private_Defines
-  * @{
-  */
-#define POLY_X(Z)               ((int32_t)((pPoints + (Z))->X))
-#define POLY_Y(Z)               ((int32_t)((pPoints + (Z))->Y))
-
-#define MAX_HEIGHT_FONT         17
-#define MAX_WIDTH_FONT          24
-#define OFFSET_BITMAP           54
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32091C_EVAL_LCD_Private_Macros
-  * @{
-  */
-#define ABS(X)  ((X) > 0 ? (X) : -(X)) 
-
-/**
-  * @}
-  */ 
-    
-/** @addtogroup STM32091C_EVAL_LCD_Private_Variables STM32091C_EVAL_LCD_Private_Variables
-  * @{
-  */ 
-LCD_DrawPropTypeDef DrawProp;
-
-static LCD_DrvTypeDef  *lcd_drv;
-
-/* Max size of bitmap will based on a font24 (17x24) */
-static uint8_t bitmap[MAX_HEIGHT_FONT*MAX_WIDTH_FONT*2+OFFSET_BITMAP] = {0};
-
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32091C_EVAL_LCD_Private_Functions
-  * @{
-  */ 
-static void LCD_DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *pChar);
-static void LCD_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32091C_EVAL_LCD_Exported_Functions
-  * @{
-  */
-
-/**
-  * @brief  Initializes the LCD.
-  * @retval LCD state
-  */
-uint8_t BSP_LCD_Init(void)
-{ 
-  uint8_t ret = LCD_ERROR;
-  
-  /* Default value for draw propriety */
-  DrawProp.BackColor = 0xFFFF;
-  DrawProp.pFont     = &Font24;
-  DrawProp.TextColor = 0x0000;
-  
-  if(spfd5408_drv.ReadID() == SPFD5408_ID)
-  {
-    lcd_drv = &spfd5408_drv;
-    ret = LCD_OK;
-  }
-  else
-  {
-    /*HX8347D_ID connected*/
-  lcd_drv = &hx8347d_drv;
-  ret = LCD_OK;
-  }
-
-  if(ret != LCD_ERROR)
-  {
-    /* LCD Init */   
-    lcd_drv->Init();
-    
-    /* Initialize the font */
-    BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
-  }
-  
-  return ret;
-}
-
-/**
-  * @brief  Gets the LCD X size.
-  * @retval Used LCD X size
-  */
-uint32_t BSP_LCD_GetXSize(void)
-{
-  return(lcd_drv->GetLcdPixelWidth());
-}
-
-/**
-  * @brief  Gets the LCD Y size.
-  * @retval Used LCD Y size
-  */
-uint32_t BSP_LCD_GetYSize(void)
-{
-  return(lcd_drv->GetLcdPixelHeight());
-}
-
-/**
-  * @brief  Gets the LCD text color.
-  * @retval Used text color.
-  */
-uint16_t BSP_LCD_GetTextColor(void)
-{
-  return DrawProp.TextColor;
-}
-
-/**
-  * @brief  Gets the LCD background color.
-   * @retval Used background color
-  */
-uint16_t BSP_LCD_GetBackColor(void)
-{
-  return DrawProp.BackColor;
-}
-
-/**
-  * @brief  Sets the LCD text color.
-  * @param  Color Text color code RGB(5-6-5)
-  * @retval None
-  */
-void BSP_LCD_SetTextColor(uint16_t Color)
-{
-  DrawProp.TextColor = Color;
-}
-
-/**
-  * @brief  Sets the LCD background color.
-  * @param  Color Background color code RGB(5-6-5)
-  * @retval None
-  */
-void BSP_LCD_SetBackColor(uint16_t Color)
-{
-  DrawProp.BackColor = Color;
-}
-
-/**
-  * @brief  Sets the LCD text font.
-  * @param  pFonts Font to be used
-  * @retval None
-  */
-void BSP_LCD_SetFont(sFONT *pFonts)
-{
-  DrawProp.pFont = pFonts;
-}
-
-/**
-  * @brief  Gets the LCD text font.
-  * @retval Used font
-  */
-sFONT *BSP_LCD_GetFont(void)
-{
-  return DrawProp.pFont;
-}
-
-/**
-  * @brief  Clears the hole LCD.
-  * @param  Color Color of the background
-  * @retval None
-  */
-void BSP_LCD_Clear(uint16_t Color)
-{ 
-  uint32_t counter = 0;
-  
-  uint32_t color_backup = DrawProp.TextColor; 
-  DrawProp.TextColor = Color;
-  
-  for(counter = 0; counter < BSP_LCD_GetYSize(); counter++)
-  {
-    BSP_LCD_DrawHLine(0, counter, BSP_LCD_GetXSize());
-  }
-
-  DrawProp.TextColor = color_backup; 
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-}
-
-/**
-  * @brief  Clears the selected line.
-  * @param  Line Line to be cleared
-  *          This parameter can be one of the following values:
-  *            @arg  0..9: if the Current fonts is Font16x24
-  *            @arg  0..19: if the Current fonts is Font12x12 or Font8x12
-  *            @arg  0..29: if the Current fonts is Font8x8
-  * @retval None
-  */
-void BSP_LCD_ClearStringLine(uint16_t Line)
-{ 
-  uint32_t colorbackup = DrawProp.TextColor; 
-  DrawProp.TextColor = DrawProp.BackColor;;
-    
-  /* Draw a rectangle with background color */
-  BSP_LCD_FillRect(0, (Line * DrawProp.pFont->Height), BSP_LCD_GetXSize(), DrawProp.pFont->Height);
-  
-  DrawProp.TextColor = colorbackup;
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-}
-
-/**
-  * @brief  Displays one character.
-  * @param  Xpos Start column address
-  * @param  Ypos Line where to display the character shape.
-  * @param  Ascii Character ascii code
-  *           This parameter must be a number between Min_Data = 0x20 and Max_Data = 0x7E 
-  * @retval None
-  */
-void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii)
-{
-  LCD_DrawChar(Ypos, Xpos, &DrawProp.pFont->table[(Ascii-' ') *\
-    DrawProp.pFont->Height * ((DrawProp.pFont->Width + 7) / 8)]);
-}
-
-/**
-  * @brief  Displays characters on the LCD.
-  * @param  Xpos X position (in pixel)
-  * @param  Ypos Y position (in pixel)   
-  * @param  pText Pointer to string to display on LCD
-  * @param  Mode Display mode
-  *          This parameter can be one of the following values:
-  *            @arg  CENTER_MODE
-  *            @arg  RIGHT_MODE
-  *            @arg  LEFT_MODE   
-  * @retval None
-  */
-void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *pText, Line_ModeTypdef Mode)
-{
-  uint16_t refcolumn = 1, counter = 0;
-  uint32_t size = 0, ysize = 0; 
-  uint8_t  *ptr = pText;
-
-  /* Get the text size */
-  while (*ptr++) size ++ ;
-  
-  /* Characters number per line */
-  ysize = (BSP_LCD_GetXSize()/DrawProp.pFont->Width);
-  
-  switch (Mode)
-  {
-  case CENTER_MODE:
-    {
-      refcolumn = Xpos + ((ysize - size)* DrawProp.pFont->Width) / 2;
-      break;
-    }
-  case LEFT_MODE:
-    {
-      refcolumn = Xpos;
-      break;
-    }
-  case RIGHT_MODE:
-    {
-      refcolumn = Xpos + ((ysize - size)*DrawProp.pFont->Width);
-      break;
-    }    
-  default:
-    {
-      refcolumn = Xpos;
-      break;
-    }
-  }
-  
-  /* Send the string character by character on lCD */
-  while ((*pText != 0) & (((BSP_LCD_GetXSize() - (counter*DrawProp.pFont->Width)) & 0xFFFF) >= DrawProp.pFont->Width))
-  {
-    /* Display one character on LCD */
-    BSP_LCD_DisplayChar(refcolumn, Ypos, *pText);
-    /* Decrement the column position by 16 */
-    refcolumn += DrawProp.pFont->Width;
-    /* Point on the next character */
-    pText++;
-    counter++;
-  }
-}
-
-/**
-  * @brief  Displays a character on the LCD.
-  * @param  Line Line where to display the character shape
-  *          This parameter can be one of the following values:
-  *            @arg  0..9: if the Current fonts is Font16x24  
-  *            @arg  0..19: if the Current fonts is Font12x12 or Font8x12
-  *            @arg  0..29: if the Current fonts is Font8x8
-  * @param  pText Pointer to string to display on LCD
-  * @retval None
-  */
-void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *pText)
-{
-  BSP_LCD_DisplayStringAt(0, LINE(Line),pText, LEFT_MODE);
-}
-
-/**
-  * @brief  Reads an LCD pixel.
-  * @param  Xpos X position 
-  * @param  Ypos Y position 
-  * @retval RGB pixel color
-  */
-uint16_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos)
-{
-  uint16_t ret = 0;
-  
-  if(lcd_drv->ReadPixel != NULL)
-  {
-    ret = lcd_drv->ReadPixel(Xpos, Ypos);
-  }
-    
-  return ret;
-}
-
-/**
-  * @brief  Draws an horizontal line.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Length Line length
-  * @retval None
-  */
-void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint32_t index = 0;
-  
-  if(lcd_drv->DrawHLine != NULL)
-  {
-    lcd_drv->DrawHLine(DrawProp.TextColor, Ypos, Xpos, Length);
-  }
-  else
-  {
-    for(index = 0; index < Length; index++)
-    {
-      BSP_LCD_DrawPixel((Ypos + index), Xpos, DrawProp.TextColor);
-    }
-  }
-}
-
-/**
-  * @brief  Draws a vertical line.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Length Line length
-  * @retval None
-  */
-void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
-  uint32_t index = 0;
-  
-  if(lcd_drv->DrawVLine != NULL)
-  {
-    LCD_SetDisplayWindow(Ypos, Xpos, 1, Length);
-    lcd_drv->DrawVLine(DrawProp.TextColor, Ypos, Xpos, Length);
-    LCD_SetDisplayWindow(0, 0, BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
-  }
-  else
-  {
-    for(index = 0; index < Length; index++)
-    {
-      BSP_LCD_DrawPixel(Ypos, Xpos + index, DrawProp.TextColor);
-    }
-  }
-}
-
-/**
-  * @brief  Draws an uni-line (between two points).
-  * @param  X1 Point 1 X position
-  * @param  Y1 Point 1 Y position
-  * @param  X2 Point 2 X position
-  * @param  Y2 Point 2 Y position
-  * @retval None
-  */
-void BSP_LCD_DrawLine(uint16_t X1, uint16_t Y1, uint16_t X2, uint16_t Y2)
-{
-  int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0, 
-  yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0, 
-  curpixel = 0;
-
-  deltax = ABS(Y2 - Y1);        /* The difference between the x's */
-  deltay = ABS(X2 - X1);        /* The difference between the y's */
-  x = Y1;                       /* Start x off at the first pixel */
-  y = X1;                       /* Start y off at the first pixel */
-  
-  if (Y2 >= Y1)                 /* The x-values are increasing */
-  {
-    xinc1 = 1;
-    xinc2 = 1;
-  }
-  else                          /* The x-values are decreasing */
-  {
-    xinc1 = -1;
-    xinc2 = -1;
-  }
-  
-  if (X2 >= X1)                 /* The y-values are increasing */
-  {
-    yinc1 = 1;
-    yinc2 = 1;
-  }
-  else                          /* The y-values are decreasing */
-  {
-    yinc1 = -1;
-    yinc2 = -1;
-  }
-  
-  if (deltax >= deltay)         /* There is at least one x-value for every y-value */
-  {
-    xinc1 = 0;                  /* Don't change the x when numerator >= denominator */
-    yinc2 = 0;                  /* Don't change the y for every iteration */
-    den = deltax;
-    num = deltax / 2;
-    numadd = deltay;
-    numpixels = deltax;         /* There are more x-values than y-values */
-  }
-  else                          /* There is at least one y-value for every x-value */
-  {
-    xinc2 = 0;                  /* Don't change the x for every iteration */
-    yinc1 = 0;                  /* Don't change the y when numerator >= denominator */
-    den = deltay;
-    num = deltay / 2;
-    numadd = deltax;
-    numpixels = deltay;         /* There are more y-values than x-values */
-  }
-  
-  for (curpixel = 0; curpixel <= numpixels; curpixel++)
-  {
-    BSP_LCD_DrawPixel(x, y, DrawProp.TextColor);  /* Draw the current pixel */
-    num += numadd;                            /* Increase the numerator by the top of the fraction */
-    if (num >= den)                           /* Check if numerator >= denominator */
-    {
-      num -= den;                             /* Calculate the new numerator value */
-      x += xinc1;                             /* Change the x as appropriate */
-      y += yinc1;                             /* Change the y as appropriate */
-    }
-    x += xinc2;                               /* Change the x as appropriate */
-    y += yinc2;                               /* Change the y as appropriate */
-  }
-}
-
-/**
-  * @brief  Draws a rectangle.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Width Rectangle width  
-  * @param  Height Rectangle height
-  * @retval None
-  */
-void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  /* Draw horizontal lines */
-  BSP_LCD_DrawHLine(Xpos, Ypos, Width);
-  BSP_LCD_DrawHLine(Xpos, (Ypos+ Height), Width);
-  
-  /* Draw vertical lines */
-  BSP_LCD_DrawVLine(Xpos, Ypos, Height);
-  BSP_LCD_DrawVLine((Xpos + Width), Ypos, Height);
-}
-                            
-/**
-  * @brief  Draws a circle.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Radius Circle radius
-  * @retval None
-  */
-void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
-{
-  int32_t  decision;       /* Decision Variable */ 
-  uint32_t  curx;   /* Current X Value */
-  uint32_t  cury;   /* Current Y Value */ 
-
-  decision = 3 - (Radius << 1);
-  curx = 0;
-  cury = Radius;
-  
-  while (curx <= cury)
-  {
-    BSP_LCD_DrawPixel((Ypos + curx), (Xpos - cury), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Ypos - curx), (Xpos - cury), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Ypos + cury), (Xpos - curx), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Ypos - cury), (Xpos - curx), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Ypos + curx), (Xpos + cury), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Ypos - curx), (Xpos + cury), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Ypos + cury), (Xpos + curx), DrawProp.TextColor);
-
-    BSP_LCD_DrawPixel((Ypos - cury), (Xpos + curx), DrawProp.TextColor);   
-
-    /* Initialize the font */
-    BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
-
-    if (decision < 0)
-    { 
-      decision += (curx << 2) + 6;
-    }
-    else
-    {
-      decision += ((curx - cury) << 2) + 10;
-      cury--;
-    }
-    curx++;
-  } 
-}
-
-/**
-  * @brief  Draws an poly-line (between many points).
-  * @param  pPoints Pointer to the points array
-  * @param  PointCount Number of points
-  * @retval None
-  */
-void BSP_LCD_DrawPolygon(pPoint pPoints, uint16_t PointCount)
-{
-  int16_t x = 0, y = 0;
-
-  if(PointCount < 2)
-  {
-    return;
-  }
-
-  BSP_LCD_DrawLine(pPoints->X, pPoints->Y, (pPoints+PointCount-1)->X, (pPoints+PointCount-1)->Y);
-  
-  while(--PointCount)
-  {
-    x = pPoints->X;
-    y = pPoints->Y;
-    pPoints++;
-    BSP_LCD_DrawLine(x, y, pPoints->X, pPoints->Y);
-  }
-  
-}
-
-/**
-  * @brief  Draws an ellipse on LCD.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  XRadius Ellipse X radius
-  * @param  YRadius Ellipse Y radius
-  * @retval None
-  */
-void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius)
-{
-  int x = 0, y = -XRadius, err = 2-2*YRadius, e2;
-  float k = 0, rad1 = 0, rad2 = 0;
-
-  rad1 = YRadius;
-  rad2 = XRadius;
-  
-  k = (float)(rad2/rad1);
-  
-  do {      
-    BSP_LCD_DrawPixel((Ypos-(uint16_t)(x/k)), (Xpos+y), DrawProp.TextColor);
-    BSP_LCD_DrawPixel((Ypos+(uint16_t)(x/k)), (Xpos+y), DrawProp.TextColor);
-    BSP_LCD_DrawPixel((Ypos+(uint16_t)(x/k)), (Xpos-y), DrawProp.TextColor);
-    BSP_LCD_DrawPixel((Ypos-(uint16_t)(x/k)), (Xpos-y), DrawProp.TextColor);      
-    
-    e2 = err;
-    if (e2 <= x) {
-      err += ++x*2+1;
-      if (-y == x && e2 <= y) e2 = 0;
-    }
-    if (e2 > y) err += ++y*2+1;     
-  }
-  while (y <= 0);
-}
-
-/**
-  * @brief  Draws a bitmap picture loaded in the internal Flash (32 bpp).
-  * @param  Xpos Bmp X position in the LCD
-  * @param  Ypos Bmp Y position in the LCD
-  * @param  pBmp Pointer to Bmp picture address in the internal Flash
-  * @retval None
-  */
-void BSP_LCD_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pBmp)
-{
-  uint32_t height = 0, width  = 0;
-  
-  /* Read bitmap width */
-  width = *(uint16_t *) (pBmp + 18);
-  width |= (*(uint16_t *) (pBmp + 20)) << 16;
-  
-  /* Read bitmap height */
-  height = *(uint16_t *) (pBmp + 22);
-  height |= (*(uint16_t *) (pBmp + 24)) << 16; 
-  
-  /* Remap Ypos, hx8347d works with inverted X in case of bitmap */
-  /* X = 0, cursor is on Bottom corner */
-  if(lcd_drv == &hx8347d_drv)
-  {
-    Ypos = BSP_LCD_GetYSize() - Ypos - height;
-  }
-  
-  LCD_SetDisplayWindow(Ypos, Xpos, width, height);
-  
-  if(lcd_drv->DrawBitmap != NULL)
-  {
-    lcd_drv->DrawBitmap(Ypos, Xpos, pBmp);
-  } 
-  LCD_SetDisplayWindow(0, 0, BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
-}
-
-/**
-  * @brief  Draws a full rectangle.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Width Rectangle width  
-  * @param  Height Rectangle height
-  * @retval None
-  */
-void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-  do
-  {
-    BSP_LCD_DrawHLine(Xpos, Ypos++, Width);    
-  }
-  while(Height--);
-}
-
-/**
-  * @brief  Draws a full circle.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  Radius Circle radius
-  * @retval None
-  */
-void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
-{
-  int32_t  decision;        /* Decision Variable */ 
-  uint32_t  curx;    /* Current X Value */
-  uint32_t  cury;    /* Current Y Value */ 
-
-  decision = 3 - (Radius << 1);
-
-  curx = 0;
-  cury = Radius;
-  
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-
-  while (curx <= cury)
-  {
-    if(cury > 0) 
-    {
-      BSP_LCD_DrawVLine(Xpos + curx, Ypos - cury, 2*cury);
-      BSP_LCD_DrawVLine(Xpos - curx, Ypos - cury, 2*cury);
-    }
-
-    if(curx > 0) 
-    {
-      BSP_LCD_DrawVLine(Xpos - cury, Ypos - curx, 2*curx);
-      BSP_LCD_DrawVLine(Xpos + cury, Ypos - curx, 2*curx);
-    }
-    if (decision < 0)
-    { 
-      decision += (curx << 2) + 6;
-    }
-    else
-    {
-      decision += ((curx - cury) << 2) + 10;
-      cury--;
-    }
-    curx++;
-  }
-
-  BSP_LCD_SetTextColor(DrawProp.TextColor);
-  BSP_LCD_DrawCircle(Xpos, Ypos, Radius);
-}
-
-/**
-  * @brief  Draws a full ellipse.
-  * @param  Xpos X position
-  * @param  Ypos Y position
-  * @param  XRadius Ellipse X radius
-  * @param  YRadius Ellipse Y radius  
-  * @retval None
-  */
-void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius)
-{
-  int x = 0, y = -XRadius, err = 2-2*YRadius, e2;
-  float k = 0, rad1 = 0, rad2 = 0;
-
-  rad1 = YRadius;
-  rad2 = XRadius;
-  
-  k = (float)(rad2/rad1);    
-  
-  do 
-  { 
-    BSP_LCD_DrawVLine((Xpos+y), (Ypos-(uint16_t)(x/k)), (2*(uint16_t)(x/k) + 1));
-    BSP_LCD_DrawVLine((Xpos-y), (Ypos-(uint16_t)(x/k)), (2*(uint16_t)(x/k) + 1));
-    
-    e2 = err;
-    if (e2 <= x) 
-    {
-      err += ++x*2+1;
-      if (-y == x && e2 <= y) e2 = 0;
-    }
-    if (e2 > y) err += ++y*2+1;
-  }
-  while (y <= 0);
-}
-
-/**
-  * @brief  Enables the display.
-  * @retval None
-  */
-void BSP_LCD_DisplayOn(void)
-{
-  lcd_drv->DisplayOn();
-}
-
-/**
-  * @brief  Disables the display.
-  * @retval None
-  */
-void BSP_LCD_DisplayOff(void)
-{
-  lcd_drv->DisplayOff();
-}
-
-/**
-  * @brief  Draws a pixel on LCD.
-  * @param  Xpos X position 
-  * @param  Ypos Y position
-  * @param  RGBCode Pixel color in RGB mode (5-6-5)  
-  * @retval None
-  */
-void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGBCode)
-{
-  if(lcd_drv->WritePixel != NULL)
-  {
-    lcd_drv->WritePixel(Xpos, Ypos, RGBCode);
-  }
-}
-/**
-  * @}
-  */  
-
-/******************************************************************************
-                            Static Function
-*******************************************************************************/
-/** @addtogroup STM32091C_EVAL_LCD_Private_Functions
-  * @{
-  */ 
-
-/**
-  * @brief  Draws a character on LCD.
-  * @param  Xpos Line where to display the character shape
-  * @param  Ypos Start column address
-  * @param  pChar Pointer to the character data
-  * @retval None
-  */
-static void LCD_DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *pChar)
-{
-  uint32_t counterh = 0, counterw = 0, index = 0;
-  uint16_t height = 0, width = 0;
-  uint8_t offset = 0;
-  uint8_t *pchar = NULL;
-  uint32_t line = 0;
-
-  height = DrawProp.pFont->Height;
-  width  = DrawProp.pFont->Width;
-  
-  /* Fill bitmap header*/
-  *(uint16_t *) (bitmap + 2) = (uint16_t)(height*width*2+OFFSET_BITMAP);
-  *(uint16_t *) (bitmap + 4) = (uint16_t)((height*width*2+OFFSET_BITMAP)>>16);
-  *(uint16_t *) (bitmap + 10) = OFFSET_BITMAP;
-  *(uint16_t *) (bitmap + 18) = (uint16_t)(width);
-  *(uint16_t *) (bitmap + 20) = (uint16_t)((width)>>16);
-  *(uint16_t *) (bitmap + 22) = (uint16_t)(height);
-  *(uint16_t *) (bitmap + 24) = (uint16_t)((height)>>16);
-
-  offset =  8 *((width + 7)/8) -  width ;
-
-  for(counterh = 0; counterh < height; counterh++)
-  {
-    pchar = ((uint8_t *)pChar + (width + 7)/8 * counterh);
-    
-    if(((width + 7)/8) == 3)
-    {
-      line =  (pchar[0]<< 16) | (pchar[1]<< 8) | pchar[2];
-    }
-    
-    if(((width + 7)/8) == 2)
-    {
-      line =  (pchar[0]<< 8) | pchar[1];
-    }
-    
-    if(((width + 7)/8) == 1)
-    {
-      line =  pchar[0];
-    }    
-    
-    for (counterw = 0; counterw < width; counterw++)
-    {
-      /* Image in the bitmap is written from the bottom to the top */
-      /* Need to invert image in the bitmap */
-      index = (((height-counterh-1)*width)+(counterw))*2+OFFSET_BITMAP;
-      if(line & (1 << (width- counterw + offset- 1))) 
-      {
-        bitmap[index] = (uint8_t)DrawProp.TextColor;
-        bitmap[index+1] = (uint8_t)(DrawProp.TextColor >> 8);
-      }
-      else
-      {
-        bitmap[index] = (uint8_t)DrawProp.BackColor;
-        bitmap[index+1] = (uint8_t)(DrawProp.BackColor >> 8);
-      } 
-    }
-  }
-
-  BSP_LCD_DrawBitmap(Ypos, Xpos, bitmap);
-}
-
-/**
-  * @brief  Sets display window.
-  * @param  Xpos LCD X position
-  * @param  Ypos LCD Y position
-  * @param  Width LCD window width
-  * @param  Height LCD window height  
-  * @retval None
-  */
-static void LCD_SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
-  if(lcd_drv->SetDisplayWindow != NULL)
-  {
-    lcd_drv->SetDisplayWindow(Xpos, Ypos, Width, Height);
-  }  
-}
-/**
-  * @}
-  */  
-  
-/**
-  * @}
-  */ 
-  
-/**
-  * @}
-  */     
-
-/**
-  * @}
-  */  
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 233
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_lcd.h

@@ -1,233 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32091c_eval_lcd.h
-  * @author  MCD Application Team
-  * @brief   This file contains all the functions prototypes for the 
-  *          stm32091c_eval_lcd.c driver.
-  ******************************************************************************
-  * @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 __STM32091C_EVAL_LCD_H
-#define __STM32091C_EVAL_LCD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif 
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32091c_eval.h" 
-/* Include LCD component Driver */
-#include "../Components/hx8347d/hx8347d.h"   
-#include "../Components/spfd5408/spfd5408.h"   
-#include "../../../Utilities/Fonts/fonts.h"   
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32091C_EVAL
-  * @{
-  */
-
-/** @defgroup STM32091C_EVAL_LCD STM32091C-EVAL LCD
-  * @{
-  */
-
-/** @defgroup STM32091C_EVAL_LCD_Private_Defines Private Defines
-  * @{
-  */
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32091C_EVAL_LCD_Private_Macros Private Macros
-  * @{
-  */
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_LCD_Private_Variables Private Variables
-  * @{
-  */   
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_LCD_Private_Functions Private Functions
-  * @{
-  */
-/**
-  * @}
-  */  
-
-/** @defgroup STM32091C_EVAL_LCD_Exported_Types Exported Types
-  * @{
-  */
-typedef struct 
-{ 
-  uint32_t TextColor; 
-  uint32_t BackColor;  
-  sFONT    *pFont; 
-
-}LCD_DrawPropTypeDef;   
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32091C_EVAL_LCD_Exported_Constants Exported Constants
-  * @{
-  */
-/** 
-  * @brief  LCD status structure definition  
-  */     
-#define   LCD_OK         0x00
-#define   LCD_ERROR      0x01
-#define   LCD_TIMEOUT    0x02
-    
-typedef struct 
-{
-  int16_t X;
-  int16_t Y;
-
-}Point, * pPoint; 
-
-/** 
-  * @brief  Line mode structures definition  
-  */ 
-typedef enum
-{
-  CENTER_MODE             = 0x01,    /*!< Center mode */
-  RIGHT_MODE              = 0x02,    /*!< Right mode  */     
-  LEFT_MODE               = 0x03,    /*!< Left mode   */                                                                              
-  NO_MODE
-
-}Line_ModeTypdef;
-
-/** 
-  * @brief  LCD color  
-  */ 
-#define LCD_COLOR_BLUE          0x001F
-#define LCD_COLOR_GREEN         0x07E0
-#define LCD_COLOR_RED           0xF800
-#define LCD_COLOR_CYAN          0x07FF
-#define LCD_COLOR_MAGENTA       0xF81F
-#define LCD_COLOR_YELLOW        0xFFE0
-#define LCD_COLOR_LIGHTBLUE     0x841F
-#define LCD_COLOR_LIGHTGREEN    0x87F0
-#define LCD_COLOR_LIGHTRED      0xFC10
-#define LCD_COLOR_LIGHTCYAN     0x87FF
-#define LCD_COLOR_LIGHTMAGENTA  0xFC1F
-#define LCD_COLOR_LIGHTYELLOW   0xFFF0
-#define LCD_COLOR_DARKBLUE      0x0010
-#define LCD_COLOR_DARKGREEN     0x0400
-#define LCD_COLOR_DARKRED       0x8000
-#define LCD_COLOR_DARKCYAN      0x0410
-#define LCD_COLOR_DARKMAGENTA   0x8010
-#define LCD_COLOR_DARKYELLOW    0x8400
-#define LCD_COLOR_WHITE         0xFFFF
-#define LCD_COLOR_LIGHTGRAY     0xD69A
-#define LCD_COLOR_GRAY          0x8410
-#define LCD_COLOR_DARKGRAY      0x4208
-#define LCD_COLOR_BLACK         0x0000
-#define LCD_COLOR_BROWN         0xA145
-#define LCD_COLOR_ORANGE        0xFD20
-
-/** 
-  * @brief LCD default font 
-  */ 
-#define LCD_DEFAULT_FONT         Font24
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_LCD_Exported_Functions Exported Functions
-  * @{
-  */   
-uint8_t  BSP_LCD_Init(void);
-uint32_t BSP_LCD_GetXSize(void);
-uint32_t BSP_LCD_GetYSize(void);
- 
-uint16_t BSP_LCD_GetTextColor(void);
-uint16_t BSP_LCD_GetBackColor(void);
-void     BSP_LCD_SetTextColor(__IO uint16_t Color);
-void     BSP_LCD_SetBackColor(__IO uint16_t Color);
-void     BSP_LCD_SetFont(sFONT *pFonts);
-sFONT    *BSP_LCD_GetFont(void);
-
-void     BSP_LCD_Clear(uint16_t Color);
-void     BSP_LCD_ClearStringLine(uint16_t Line);
-void     BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *pText);
-void     BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *pText, Line_ModeTypdef Mode);
-void     BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii);
-void     BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGBCode);
-
-uint16_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos);
-void     BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void     BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void     BSP_LCD_DrawLine(uint16_t X1, uint16_t Y1, uint16_t X2, uint16_t Y2);
-void     BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-void     BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
-void     BSP_LCD_DrawPolygon(pPoint pPoints, uint16_t PointCount);
-void     BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
-void     BSP_LCD_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pBmp);
-
-void     BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-void     BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
-void     BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
-
-void     BSP_LCD_DisplayOff(void);
-void     BSP_LCD_DisplayOn(void);
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32091C_EVAL_LCD_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 1032
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_sd.c

@@ -1,1032 +0,0 @@
-/**
-******************************************************************************
-* @file    stm32091c_eval_sd.c
-* @author  MCD Application Team
-* @brief   This file provides a set of functions needed to manage the SPI SD 
-*          Card memory mounted on STM32091C-EVAL board.
-*          It implements a high level communication layer for read and write 
-*          from/to this memory. The needed STM32F0xx hardware resources (SPI and 
-*          GPIO) are defined in stm32091c_eval.h file, and the initialization is 
-*          performed in SD_IO_Init() function declared in stm32091c_eval.c 
-*          file.
-*          You can easily tailor this driver to any other development board, 
-*          by just adapting the defines for hardware resources and 
-*          SD_IO_Init() function.
-*            
-*          +-------------------------------------------------------+
-*          |                     Pin assignment                    |
-*          +-------------------------+---------------+-------------+
-*          |  STM32F0xx SPI Pins     |     SD        |    Pin      |
-*          +-------------------------+---------------+-------------+
-*          | SD_SPI_CS_PIN           |   ChipSelect  |    1        |
-*          | SD_SPI_MOSI_PIN / MOSI  |   DataIn      |    2        |
-*          |                         |   GND         |    3 (0 V)  |
-*          |                         |   VDD         |    4 (3.3 V)|
-*          | SD_SPI_SCK_PIN / SCLK   |   Clock       |    5        |
-*          |                         |   GND         |    6 (0 V)  |
-*          | SD_SPI_MISO_PIN / MISO  |   DataOut     |    7        |
-*          +-------------------------+---------------+-------------+
-******************************************************************************
-* @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.
-*
-******************************************************************************
-@verbatim
-  ==============================================================================
-                     ##### How to use this driver #####
-  ==============================================================================
-  [..] 
-   (#) This driver is used to drive the micro SD external card mounted on STM32091C-EVAL 
-       evaluation board.
-   (#) This driver does not need a specific component driver for the micro SD device
-       to be included with.
-
-   (#) Initialization steps:
-       (++) Initialize the micro SD card using the SD_Init() function. 
-       (++) To check the SD card presence you can use the function BSP_SD_IsDetected() which 
-            returns the detection status 
-       (++) The function BSP_SD_GetCardInfo() is used to get the micro SD card information 
-            which is stored in the structure "SD_CardInfo".
-
-   (#) Micro SD card operations
-       (++) The micro SD card can be accessed with read/write block(s) operations once 
-            it is reay for access. The access cand be performed in polling 
-            mode by calling the functions SD_ReadBlocks()/SD_WriteBlocks()
-       (++) The SD erase block(s) is performed using the function BSP_SD_Erase() with 
-            specifying the number of blocks to erase.
-       (++) The SD runtime status is returned when calling the function BSP_SD_GetStatus().
-
-  @endverbatim
-*/
-
-    
-/* Includes ------------------------------------------------------------------*/
-#include "stm32091c_eval_sd.h"
-#include "stm32f0xx_hal.h"
-#include "stdlib.h"
-#include "string.h"
-#include "stdio.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM32091C_EVAL
-  * @{
-  */ 
-
-/** @addtogroup STM32091C_EVAL_SD
-  * @{
-  */
-
-/* Private typedef -----------------------------------------------------------*/
-
-/** @defgroup STM32091C_EVAL_SD_Private_Types_Definitions Types Definitions
-  * @{
-  */ 
-typedef struct {
-  uint8_t r1;
-  uint8_t r2;
-  uint8_t r3;
-  uint8_t r4;
-  uint8_t r5;
-} SD_CmdAnswer_typedef;
-  
-/**
-  * @}
-  */
-  
-/* Private define ------------------------------------------------------------*/
-
-/** @addtogroup STM32091C_EVAL_SD_Private_Defines
-  * @{
-  */
-#define SD_DUMMY_BYTE            0xFF
-
-#define SD_MAX_FRAME_LENGTH        17    /* Lenght = 16 + 1 */
-#define SD_CMD_LENGTH               6
-
-#define SD_MAX_TRY                100    /* Number of try */
-
-#define SD_CSD_STRUCT_V1          0x2    /* CSD struct version V1 */
-#define SD_CSD_STRUCT_V2          0x1    /* CSD struct version V2 */
-
-
-/**
-  * @brief  SD ansewer format
-  */ 
-typedef enum {
- SD_ANSWER_R1_EXPECTED,
- SD_ANSWER_R1B_EXPECTED,
- SD_ANSWER_R2_EXPECTED,
- SD_ANSWER_R3_EXPECTED,
- SD_ANSWER_R4R5_EXPECTED,
- SD_ANSWER_R7_EXPECTED,
-}SD_Answer_type;
-
-/**
-  * @brief  Start Data tokens:
-  *         Tokens (necessary because at nop/idle (and CS active) only 0xff is 
-  *         on the data/command line)  
-  */ 
-#define SD_TOKEN_START_DATA_SINGLE_BLOCK_READ    0xFE  /* Data token start byte, Start Single Block Read */
-#define SD_TOKEN_START_DATA_MULTIPLE_BLOCK_READ  0xFE  /* Data token start byte, Start Multiple Block Read */
-#define SD_TOKEN_START_DATA_SINGLE_BLOCK_WRITE   0xFE  /* Data token start byte, Start Single Block Write */
-#define SD_TOKEN_START_DATA_MULTIPLE_BLOCK_WRITE 0xFD  /* Data token start byte, Start Multiple Block Write */
-#define SD_TOKEN_STOP_DATA_MULTIPLE_BLOCK_WRITE  0xFD  /* Data toke stop byte, Stop Multiple Block Write */
-
-/**
-  * @brief  Commands: CMDxx = CMD-number | 0x40
-  */
-#define SD_CMD_GO_IDLE_STATE          0   /* CMD0 = 0x40  */
-#define SD_CMD_SEND_OP_COND           1   /* CMD1 = 0x41  */
-#define SD_CMD_SEND_IF_COND           8   /* CMD8 = 0x48  */
-#define SD_CMD_SEND_CSD               9   /* CMD9 = 0x49  */
-#define SD_CMD_SEND_CID               10  /* CMD10 = 0x4A */
-#define SD_CMD_STOP_TRANSMISSION      12  /* CMD12 = 0x4C */
-#define SD_CMD_SEND_STATUS            13  /* CMD13 = 0x4D */
-#define SD_CMD_SET_BLOCKLEN           16  /* CMD16 = 0x50 */
-#define SD_CMD_READ_SINGLE_BLOCK      17  /* CMD17 = 0x51 */
-#define SD_CMD_READ_MULT_BLOCK        18  /* CMD18 = 0x52 */
-#define SD_CMD_SET_BLOCK_COUNT        23  /* CMD23 = 0x57 */
-#define SD_CMD_WRITE_SINGLE_BLOCK     24  /* CMD24 = 0x58 */
-#define SD_CMD_WRITE_MULT_BLOCK       25  /* CMD25 = 0x59 */
-#define SD_CMD_PROG_CSD               27  /* CMD27 = 0x5B */
-#define SD_CMD_SET_WRITE_PROT         28  /* CMD28 = 0x5C */
-#define SD_CMD_CLR_WRITE_PROT         29  /* CMD29 = 0x5D */
-#define SD_CMD_SEND_WRITE_PROT        30  /* CMD30 = 0x5E */
-#define SD_CMD_SD_ERASE_GRP_START     32  /* CMD32 = 0x60 */
-#define SD_CMD_SD_ERASE_GRP_END       33  /* CMD33 = 0x61 */
-#define SD_CMD_UNTAG_SECTOR           34  /* CMD34 = 0x62 */
-#define SD_CMD_ERASE_GRP_START        35  /* CMD35 = 0x63 */
-#define SD_CMD_ERASE_GRP_END          36  /* CMD36 = 0x64 */
-#define SD_CMD_UNTAG_ERASE_GROUP      37  /* CMD37 = 0x65 */
-#define SD_CMD_ERASE                  38  /* CMD38 = 0x66 */
-#define SD_CMD_SD_APP_OP_COND         41  /* CMD41 = 0x69 */
-#define SD_CMD_APP_CMD                55  /* CMD55 = 0x77 */
-#define SD_CMD_READ_OCR               58  /* CMD55 = 0x79 */
-
-/**
-  * @brief  SD reponses and error flags
-  */
-typedef enum
-{
-/* R1 answer value */  
-  SD_R1_NO_ERROR            = (0x00),
-  SD_R1_IN_IDLE_STATE       = (0x01),
-  SD_R1_ERASE_RESET         = (0x02),
-  SD_R1_ILLEGAL_COMMAND     = (0x04),
-  SD_R1_COM_CRC_ERROR       = (0x08),
-  SD_R1_ERASE_SEQUENCE_ERROR= (0x10),
-  SD_R1_ADDRESS_ERROR       = (0x20),
-  SD_R1_PARAMETER_ERROR     = (0x40),
-
-/* R2 answer value */
-  SD_R2_NO_ERROR            = 0x00,
-  SD_R2_CARD_LOCKED         = 0x01,
-  SD_R2_LOCKUNLOCK_ERROR    = 0x02,
-  SD_R2_ERROR               = 0x04,
-  SD_R2_CC_ERROR            = 0x08,
-  SD_R2_CARD_ECC_FAILED     = 0x10,
-  SD_R2_WP_VIOLATION        = 0x20,
-  SD_R2_ERASE_PARAM         = 0x40,
-  SD_R2_OUTOFRANGE          = 0x80,
-  
-/**
-  * @brief  Data response error
-  */
-  SD_DATA_OK                = (0x05),
-  SD_DATA_CRC_ERROR         = (0x0B),
-  SD_DATA_WRITE_ERROR       = (0x0D),
-  SD_DATA_OTHER_ERROR       = (0xFF)
-} SD_Error;
-
-/**
-  * @}
-  */
-  
-/* Private macro -------------------------------------------------------------*/
-
-/* Private variables ---------------------------------------------------------*/
-
-/** @addtogroup STM32091C_EVAL_SD_Private_Variables
- * @{
- */       
-__IO uint8_t SdStatus = SD_NOT_PRESENT;
-
-/* flag_SDHC :
-      0 :  Standard capacity
-      1 : High capacity
-*/
-uint16_t flag_SDHC = 0; 
-
-/**
-  * @}
-  */ 
-
-/* Private function prototypes -----------------------------------------------*/
-/** @addtogroup STM32091C_EVAL_SD_Private_Functions
- * @{
- */ 
-static uint8_t SD_GetCIDRegister(SD_CID* Cid);
-static uint8_t SD_GetCSDRegister(SD_CSD* Csd);
-static uint8_t SD_GetDataResponse(void);
-static uint8_t SD_GoIdleState(void);
-static SD_CmdAnswer_typedef SD_SendCmd(uint8_t Cmd, uint32_t Arg, uint8_t Crc, uint8_t Answer);
-static uint8_t SD_WaitData(uint8_t data);
-static uint8_t SD_ReadData(void);
-/* Private functions ---------------------------------------------------------*/
-
-/**
-  * @brief  Initializes the SD/SD communication.
-  * @retval The SD Response: 
-  *         - MSD_ERROR: Sequence failed
-  *         - MSD_OK: Sequence succeed
-  */
-uint8_t BSP_SD_Init(void)
-{ 
-  /* Configure IO functionalities for SD pin */
-  SD_IO_Init();
-
-  /* Check SD card detect pin */
-  if(BSP_SD_IsDetected()==SD_NOT_PRESENT) 
-  {
-    SdStatus = SD_NOT_PRESENT;
-    return MSD_ERROR;
-  }
-  else
-  {
-    SdStatus = SD_PRESENT;
-  }
-
-  /* SD initialized and set to SPI mode properly */
-  return (SD_GoIdleState());
-}
-
-/**
- * @brief  Detects if SD card is correctly plugged in the memory slot or not.
- * @retval Returns if SD is detected or not
- */
-uint8_t BSP_SD_IsDetected(void)
-{
-  __IO uint8_t status = SD_PRESENT;
-
-  /* Check SD card detect pin */
-  if(HAL_GPIO_ReadPin(SD_DETECT_GPIO_PORT, SD_DETECT_PIN) != GPIO_PIN_RESET)
-  {
-    status = SD_NOT_PRESENT;
-  }
-  
-  return status;
-}
-
-/**
-  * @brief  Returns information about specific card.
-  * @param  pCardInfo Pointer to a SD_CardInfo structure that contains all SD 
-  *         card information.
-  * @retval The SD Response:
-  *         - MSD_ERROR: Sequence failed
-  *         - MSD_OK: Sequence succeed
-  */
-uint8_t BSP_SD_GetCardInfo(SD_CardInfo *pCardInfo)
-{
-  uint8_t status;
-
-  status = SD_GetCSDRegister(&(pCardInfo->Csd));
-  status|= SD_GetCIDRegister(&(pCardInfo->Cid));
-  if(flag_SDHC == 1 )
-  {
-    pCardInfo->CardBlockSize = 512;
-    pCardInfo->CardCapacity = (pCardInfo->Csd.version.v2.DeviceSize + 1) * pCardInfo->CardBlockSize;
-  }
-  else
-  {
-    pCardInfo->CardCapacity = (pCardInfo->Csd.version.v1.DeviceSize + 1) ;
-    pCardInfo->CardCapacity *= (1 << (pCardInfo->Csd.version.v1.DeviceSizeMul + 2));
-    pCardInfo->CardBlockSize = 1 << (pCardInfo->Csd.RdBlockLen);
-    pCardInfo->CardCapacity *= pCardInfo->CardBlockSize;
-  }
-  
-  return status;
-}
-
-/**
-  * @brief  Reads block(s) from a specified address in the SD card, in polling mode. 
-  * @param  pData Pointer to the buffer that will contain the data to transmit
-  * @param  ReadAddr Address from where data is to be read  
-  * @param  BlockSize SD card data block size, that should be 512
-  * @param  NumberOfBlocks Number of SD blocks to read 
-  * @retval SD status
-  */
-uint8_t BSP_SD_ReadBlocks(uint32_t* pData, uint32_t ReadAddr, uint16_t BlockSize, uint32_t NumberOfBlocks)
-{
-  uint32_t offset = 0;
-  uint8_t retr = BSP_SD_ERROR;
-  uint8_t *ptr = NULL;
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD16 (SD_CMD_SET_BLOCKLEN) to set the size of the block and 
-     Check if the SD acknowledged the set block length command: R1 response (0x00: no errors) */
-  response = SD_SendCmd(SD_CMD_SET_BLOCKLEN, BlockSize, 0xFF, SD_ANSWER_R1_EXPECTED);
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if ( response.r1 != SD_R1_NO_ERROR)
-  {
-     goto error;
-  }
-  
-  ptr = malloc(sizeof(uint8_t)*BlockSize);
-  if( ptr == NULL )
-  {
-     goto error;
-  }
-  memset(ptr, SD_DUMMY_BYTE, sizeof(uint8_t)*BlockSize);
-
-  /* Data transfer */
-  while (NumberOfBlocks--)
-  {
-    /* Send CMD17 (SD_CMD_READ_SINGLE_BLOCK) to read one block */
-    /* Check if the SD acknowledged the read block command: R1 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_READ_SINGLE_BLOCK, (ReadAddr + offset)/(flag_SDHC == 1 ?BlockSize: 1), 0xFF, SD_ANSWER_R1_EXPECTED);
-    if ( response.r1 != SD_R1_NO_ERROR)
-    {
-      goto error;
-    }
-
-    /* Now look for the data token to signify the start of the data */
-    if (SD_WaitData(SD_TOKEN_START_DATA_SINGLE_BLOCK_READ) == BSP_SD_OK)
-    {
-      /* Read the SD block data : read NumByteToRead data */
-      SD_IO_WriteReadData(ptr, (uint8_t*)pData + offset, BlockSize);
-
-      /* Set next read address*/
-      offset += BlockSize;
-      /* get CRC bytes (not really needed by us, but required by SD) */
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);      
-    }
-    else
-    {
-      goto error;
-    }
-    
-    /* End the command data read cycle */
-    SD_IO_CSState(1);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-  }
-  
-  retr = BSP_SD_OK;
-  
-error :  
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if(ptr != NULL) free(ptr);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Writes block(s) to a specified address in the SD card, in polling mode. 
-  * @param  pData Pointer to the buffer that will contain the data to transmit
-  * @param  WriteAddr Address from where data is to be written  
-  * @param  BlockSize SD card data block size, that should be 512
-  * @param  NumberOfBlocks Number of SD blocks to write
-  * @retval SD status
-  */
-uint8_t BSP_SD_WriteBlocks(uint32_t* pData, uint32_t WriteAddr, uint16_t BlockSize, uint32_t NumberOfBlocks)
-{
-  uint32_t offset = 0;
-  uint8_t retr = BSP_SD_ERROR;
-  uint8_t *ptr = NULL;
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD16 (SD_CMD_SET_BLOCKLEN) to set the size of the block and 
-     Check if the SD acknowledged the set block length command: R1 response (0x00: no errors) */
-  response = SD_SendCmd(SD_CMD_SET_BLOCKLEN, BlockSize, 0xFF, SD_ANSWER_R1_EXPECTED);
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if ( response.r1 != SD_R1_NO_ERROR)
-  {
-    goto error;
-  }
-  
-  ptr = malloc(sizeof(uint8_t)*BlockSize);
-  if (ptr == NULL)
-  {
-    goto error;
-  }
-  
-  /* Data transfer */
-  while (NumberOfBlocks--)
-  {
-    /* Send CMD24 (SD_CMD_WRITE_SINGLE_BLOCK) to write blocks  and
-       Check if the SD acknowledged the write block command: R1 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_WRITE_SINGLE_BLOCK, (WriteAddr + offset)/(flag_SDHC == 1 ? BlockSize: 1), 0xFF, SD_ANSWER_R1_EXPECTED);
-    if (response.r1 != SD_R1_NO_ERROR)
-    {
-      goto error;
-    }
-    
-    /* Send dummy byte for NWR timing : one byte between CMDWRITE and TOKEN */
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-
-    /* Send the data token to signify the start of the data */
-    SD_IO_WriteByte(SD_TOKEN_START_DATA_SINGLE_BLOCK_WRITE);
-
-    /* Write the block data to SD */
-    SD_IO_WriteReadData((uint8_t*)pData + offset, ptr, BlockSize);
-    
-    /* Set next write address */
-    offset += BlockSize;
-
-    /* Put CRC bytes (not really needed by us, but required by SD) */
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-
-    /* Read data response */
-    if (SD_GetDataResponse() != SD_DATA_OK)
-    {
-      /* Set response value to failure */
-      goto error;
-    }
-
-    SD_IO_CSState(1);    
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-  }
-  retr = BSP_SD_OK;
-  
-error :
-  if(ptr != NULL) free(ptr);
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);    
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Erases the specified memory area of the given SD card. 
-  * @param  StartAddr Start byte address
-  * @param  EndAddr End byte address
-  * @retval SD status
-  */
-uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr)
-{
-  uint8_t retr = BSP_SD_ERROR;
-  SD_CmdAnswer_typedef response;
-
-  /* Send CMD32 (Erase group start) and check if the SD acknowledged the erase command: R1 response (0x00: no errors) */
-  response = SD_SendCmd(SD_CMD_SD_ERASE_GRP_START, StartAddr, 0xFF, SD_ANSWER_R1_EXPECTED);
-  SD_IO_CSState(1);    
-  SD_IO_WriteByte(SD_DUMMY_BYTE);  if (response.r1 == SD_R1_NO_ERROR)
-  {
-    /* Send CMD33 (Erase group end) and Check if the SD acknowledged the erase command: R1 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_SD_ERASE_GRP_END, EndAddr, 0xFF, SD_ANSWER_R1_EXPECTED);
-    SD_IO_CSState(1);    
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    if (response.r1 == SD_R1_NO_ERROR)
-    {
-      /* Send CMD38 (Erase) and Check if the SD acknowledged the erase command: R1 response (0x00: no errors) */
-      response = SD_SendCmd(SD_CMD_ERASE, 0, 0xFF, SD_ANSWER_R1B_EXPECTED);
-      if (response.r1 == SD_R1_NO_ERROR)
-      {
-        retr = BSP_SD_OK;
-      }
-      SD_IO_CSState(1);    
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-    }
-  }
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Returns the SD status.
-  * @retval The SD status.
-  */
-uint8_t BSP_SD_GetStatus(void)
-{
-  SD_CmdAnswer_typedef retr;
-  
-  /* Send CMD13 (SD_SEND_STATUS) to get SD status */
-  retr = SD_SendCmd(SD_CMD_SEND_STATUS, 0, 0xFF, SD_ANSWER_R2_EXPECTED);
-  SD_IO_CSState(1);    
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Find SD status according to card state */
-  if(( retr.r1 == SD_R1_NO_ERROR) && ( retr.r2 == SD_R2_NO_ERROR))
-  {
-    return BSP_SD_OK;
-  }
-
-  return BSP_SD_ERROR;
-}
-
-/**
-  * @brief  Reads the SD card SCD register.
-  *         Reading the contents of the CSD register in SPI mode is a simple 
-  *         read-block transaction.
-  * @param  Csd pointer on an SCD register structure
-  * @retval SD status
-  */
-uint8_t SD_GetCSDRegister(SD_CSD* Csd)
-{
-  uint16_t counter = 0;
-  uint8_t CSD_Tab[16];
-  uint8_t retr = BSP_SD_ERROR;
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD9 (CSD register) or CMD10(CSD register) and Wait for response in the R1 format (0x00 is no errors) */
-  response = SD_SendCmd(SD_CMD_SEND_CSD, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-  if(response.r1 == SD_R1_NO_ERROR)
-  {
-    if (SD_WaitData(SD_TOKEN_START_DATA_SINGLE_BLOCK_READ) == BSP_SD_OK)
-    {
-      for (counter = 0; counter < 16; counter++)
-      {
-        /* Store CSD register value on CSD_Tab */
-        CSD_Tab[counter] = SD_IO_WriteByte(SD_DUMMY_BYTE);
-      }
-      
-      /* Get CRC bytes (not really needed by us, but required by SD) */
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-
-      /*************************************************************************
-        CSD header decoding 
-      *************************************************************************/
-      
-      /* Byte 0 */
-      Csd->CSDStruct = (CSD_Tab[0] & 0xC0) >> 6;
-      Csd->Reserved1 =  CSD_Tab[0] & 0x3F;
-      
-      /* Byte 1 */
-      Csd->TAAC = CSD_Tab[1];
-      
-      /* Byte 2 */
-      Csd->NSAC = CSD_Tab[2];
-      
-      /* Byte 3 */
-      Csd->MaxBusClkFrec = CSD_Tab[3];
-      
-      /* Byte 4/5 */
-      Csd->CardComdClasses = (CSD_Tab[4] << 4) | ((CSD_Tab[5] & 0xF0) >> 4);
-      Csd->RdBlockLen = CSD_Tab[5] & 0x0F;
-      
-      /* Byte 6 */
-      Csd->PartBlockRead   = (CSD_Tab[6] & 0x80) >> 7;
-      Csd->WrBlockMisalign = (CSD_Tab[6] & 0x40) >> 6;
-      Csd->RdBlockMisalign = (CSD_Tab[6] & 0x20) >> 5;
-      Csd->DSRImpl         = (CSD_Tab[6] & 0x10) >> 4;
-
-      /*************************************************************************
-        CSD v1/v2 decoding  
-      *************************************************************************/
-     
-      if(flag_SDHC == 0)
-      {
-        Csd->version.v1.Reserved1 = ((CSD_Tab[6] & 0x0C) >> 2);
-        
-        Csd->version.v1.DeviceSize =  ((CSD_Tab[6] & 0x03) << 10) 
-                                    |  (CSD_Tab[7] << 2)
-                                    | ((CSD_Tab[8] & 0xC0) >> 6);
-        Csd->version.v1.MaxRdCurrentVDDMin = (CSD_Tab[8] & 0x38) >> 3;
-        Csd->version.v1.MaxRdCurrentVDDMax = (CSD_Tab[8] & 0x07);
-        Csd->version.v1.MaxWrCurrentVDDMin = (CSD_Tab[9] & 0xE0) >> 5;
-        Csd->version.v1.MaxWrCurrentVDDMax = (CSD_Tab[9] & 0x1C) >> 2;
-        Csd->version.v1.DeviceSizeMul = ((CSD_Tab[9] & 0x03) << 1)
-                                       |((CSD_Tab[10] & 0x80) >> 7);
-      }
-      else
-      {
-        Csd->version.v2.Reserved1 = ((CSD_Tab[6] & 0x0F) << 2) | ((CSD_Tab[7] & 0xC0) >> 6);
-        Csd->version.v2.DeviceSize= ((CSD_Tab[7] & 0x3F) << 16) | (CSD_Tab[8] << 8) | CSD_Tab[9];    
-        Csd->version.v2.Reserved2 = ((CSD_Tab[10] & 0x80) >> 8);
-      }    
-            
-      Csd->EraseSingleBlockEnable = (CSD_Tab[10] & 0x40) >> 6;
-      Csd->EraseSectorSize   = ((CSD_Tab[10] & 0x3F) << 1)
-                              |((CSD_Tab[11] & 0x80) >> 7);
-      Csd->WrProtectGrSize   = (CSD_Tab[11] & 0x7F);
-      Csd->WrProtectGrEnable = (CSD_Tab[12] & 0x80) >> 7;
-      Csd->Reserved2         = (CSD_Tab[12] & 0x60) >> 5;
-      Csd->WrSpeedFact       = (CSD_Tab[12] & 0x1C) >> 2;
-      Csd->MaxWrBlockLen     = ((CSD_Tab[12] & 0x03) << 2)
-                              |((CSD_Tab[13] & 0xC0) >> 6);
-      Csd->WriteBlockPartial = (CSD_Tab[13] & 0x20) >> 5;
-      Csd->Reserved3         = (CSD_Tab[13] & 0x1F);
-      Csd->FileFormatGrouop  = (CSD_Tab[14] & 0x80) >> 7;
-      Csd->CopyFlag          = (CSD_Tab[14] & 0x40) >> 6;
-      Csd->PermWrProtect     = (CSD_Tab[14] & 0x20) >> 5;
-      Csd->TempWrProtect     = (CSD_Tab[14] & 0x10) >> 4;
-      Csd->FileFormat        = (CSD_Tab[14] & 0x0C) >> 2;
-      Csd->Reserved4         = (CSD_Tab[14] & 0x03);
-      Csd->crc               = (CSD_Tab[15] & 0xFE) >> 1;
-      Csd->Reserved5         = (CSD_Tab[15] & 0x01);
-      
-      retr = BSP_SD_OK;
-    }
-  }
-  
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Reads the SD card CID register.
-  *         Reading the contents of the CID register in SPI mode is a simple 
-  *         read-block transaction.
-  * @param  Cid pointer on an CID register structure
-  * @retval SD status
-  */
-uint8_t SD_GetCIDRegister(SD_CID* Cid)
-{
-  uint32_t counter = 0;
-  uint8_t retr = BSP_SD_ERROR;
-  uint8_t CID_Tab[16];
-  SD_CmdAnswer_typedef response;
-  
-  /* Send CMD10 (CID register) and Wait for response in the R1 format (0x00 is no errors) */
-  response = SD_SendCmd(SD_CMD_SEND_CID, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-  if(response.r1 == SD_R1_NO_ERROR)
-  {
-    if(SD_WaitData(SD_TOKEN_START_DATA_SINGLE_BLOCK_READ) == BSP_SD_OK)
-    {
-      /* Store CID register value on CID_Tab */
-      for (counter = 0; counter < 16; counter++)
-      {
-        CID_Tab[counter] = SD_IO_WriteByte(SD_DUMMY_BYTE);
-      }
-      
-      /* Get CRC bytes (not really needed by us, but required by SD) */
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      
-      /* Byte 0 */
-      Cid->ManufacturerID = CID_Tab[0];
-      
-      /* Byte 1 */
-      Cid->OEM_AppliID = CID_Tab[1] << 8;
-      
-      /* Byte 2 */
-      Cid->OEM_AppliID |= CID_Tab[2];
-      
-      /* Byte 3 */
-      Cid->ProdName1 = CID_Tab[3] << 24;
-      
-      /* Byte 4 */
-      Cid->ProdName1 |= CID_Tab[4] << 16;
-      
-      /* Byte 5 */
-      Cid->ProdName1 |= CID_Tab[5] << 8;
-      
-      /* Byte 6 */
-      Cid->ProdName1 |= CID_Tab[6];
-      
-      /* Byte 7 */
-      Cid->ProdName2 = CID_Tab[7];
-      
-      /* Byte 8 */
-      Cid->ProdRev = CID_Tab[8];
-      
-      /* Byte 9 */
-      Cid->ProdSN = CID_Tab[9] << 24;
-      
-      /* Byte 10 */
-      Cid->ProdSN |= CID_Tab[10] << 16;
-      
-      /* Byte 11 */
-      Cid->ProdSN |= CID_Tab[11] << 8;
-      
-      /* Byte 12 */
-      Cid->ProdSN |= CID_Tab[12];
-      
-      /* Byte 13 */
-      Cid->Reserved1 |= (CID_Tab[13] & 0xF0) >> 4;
-      Cid->ManufactDate = (CID_Tab[13] & 0x0F) << 8;
-      
-      /* Byte 14 */
-      Cid->ManufactDate |= CID_Tab[14];
-      
-      /* Byte 15 */
-      Cid->CID_CRC = (CID_Tab[15] & 0xFE) >> 1;
-      Cid->Reserved2 = 1;
-
-      retr = BSP_SD_OK;
-    }
-  }
-  
-  /* Send dummy byte: 8 Clock pulses of delay */
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  
-  /* Return the reponse */
-  return retr;
-}
-
-/**
-  * @brief  Send 5 bytes command to the SD card and get response
-  * @param  Cmd The user expected command to send to SD card.
-  * @param  Arg The command argument.
-  * @param  Crc The CRC.
-  * @param  Answer SD_ANSWER_NOT_EXPECTED or SD_ANSWER_EXPECTED
-  * @retval SD status
-  */
-SD_CmdAnswer_typedef SD_SendCmd(uint8_t Cmd, uint32_t Arg, uint8_t Crc, uint8_t Answer)
-{
-  uint8_t frame[SD_CMD_LENGTH], frameout[SD_CMD_LENGTH];
-  SD_CmdAnswer_typedef retr = {0xFF, 0xFF , 0xFF, 0xFF, 0xFF};
-
-  /* R1 Lenght = NCS(0)+ 6 Bytes command + NCR(min1 max8) + 1 Bytes answer + NEC(0) = 15bytes */
-  /* R1b identical to R1 + Busy information                                                   */
-  /* R2 Lenght = NCS(0)+ 6 Bytes command + NCR(min1 max8) + 2 Bytes answer + NEC(0) = 16bytes */
-  
-  /* Prepare Frame to send */
-  frame[0] = (Cmd | 0x40);         /* Construct byte 1 */
-  frame[1] = (uint8_t)(Arg >> 24); /* Construct byte 2 */
-  frame[2] = (uint8_t)(Arg >> 16); /* Construct byte 3 */
-  frame[3] = (uint8_t)(Arg >> 8);  /* Construct byte 4 */
-  frame[4] = (uint8_t)(Arg);       /* Construct byte 5 */
-  frame[5] = (Crc | 0x01);         /* Construct byte 6 */
-    
-  /* Send the command */
-  SD_IO_CSState(0);
-  SD_IO_WriteReadData(frame, frameout, SD_CMD_LENGTH); /* Send the Cmd bytes */
-  
-  switch(Answer)
-  {
-  case SD_ANSWER_R1_EXPECTED :
-    retr.r1 = SD_ReadData();
-    break;
-  case SD_ANSWER_R1B_EXPECTED :
-    retr.r1 = SD_ReadData();
-    retr.r2 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    /* Set CS High */
-    SD_IO_CSState(1);
-    HAL_Delay(1);
-    /* Set CS Low */
-    SD_IO_CSState(0);
-    
-    /* Wait IO line return 0xFF */
-    while (SD_IO_WriteByte(SD_DUMMY_BYTE) != 0xFF); 
-    break;
-  case SD_ANSWER_R2_EXPECTED :
-    retr.r1 = SD_ReadData();
-    retr.r2 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    break;
-  case SD_ANSWER_R3_EXPECTED :
-  case SD_ANSWER_R7_EXPECTED :
-    retr.r1 = SD_ReadData();
-    retr.r2 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    retr.r3 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    retr.r4 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    retr.r5 = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    break;
-  default :
-    break;
-  }  
-  return retr;
-}
-
-/**
-  * @brief  Gets the SD card data response and check the busy flag.
-  * @retval The SD status: Read data response xxx0<status>1
-  *         - status 010: Data accecpted
-  *         - status 101: Data rejected due to a crc error
-  *         - status 110: Data rejected due to a Write error.
-  *         - status 111: Data rejected due to other error.
-  */
-uint8_t SD_GetDataResponse(void)
-{
-  uint8_t dataresponse;
-  uint8_t rvalue = SD_DATA_OTHER_ERROR;
-  
-  dataresponse = SD_IO_WriteByte(SD_DUMMY_BYTE);
-  SD_IO_WriteByte(SD_DUMMY_BYTE); /* read the busy response byte*/
- 
-  /* Mask unused bits */
-  switch (dataresponse & 0x1F)
-  {
-  case SD_DATA_OK:
-    rvalue = SD_DATA_OK;
-    
-    /* Set CS High */
-    SD_IO_CSState(1);
-    /* Set CS Low */
-    SD_IO_CSState(0);
-
-    /* Wait IO line return 0xFF */
-    while (SD_IO_WriteByte(SD_DUMMY_BYTE) != 0xFF);
-    break;
-  case SD_DATA_CRC_ERROR:
-    rvalue =  SD_DATA_CRC_ERROR;
-    break;
-  case SD_DATA_WRITE_ERROR:
-    rvalue = SD_DATA_WRITE_ERROR;
-    break;
-  default:
-    break;
-  }
-  
-  /* Return response */
-  return rvalue;
-}
-
-
-/**
-  * @brief  Put the SD in Idle state.
-  * @retval SD status
-  */
-uint8_t SD_GoIdleState(void)
-{
-  SD_CmdAnswer_typedef response;
-  __IO uint8_t counter = 0;
-  /* Send CMD0 (SD_CMD_GO_IDLE_STATE) to put SD in SPI mode and 
-     wait for In Idle State Response (R1 Format) equal to 0x01 */
-  do{
-    counter++;
-    response = SD_SendCmd(SD_CMD_GO_IDLE_STATE, 0, 0x95, SD_ANSWER_R1_EXPECTED);
-    SD_IO_CSState(1);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    if(counter >= SD_MAX_TRY)
-    {
-      return BSP_SD_ERROR;
-    }
-  }
-  while(response.r1 != SD_R1_IN_IDLE_STATE);
-  
-    
-  /* Send CMD8 (SD_CMD_SEND_IF_COND) to check the power supply status 
-     and wait until response (R7 Format) equal to 0xAA and */
-  response = SD_SendCmd(SD_CMD_SEND_IF_COND, 0x1AA, 0x87, SD_ANSWER_R7_EXPECTED);
-  SD_IO_CSState(1);
-  SD_IO_WriteByte(SD_DUMMY_BYTE);
-  if((response.r1  & SD_R1_ILLEGAL_COMMAND) == SD_R1_ILLEGAL_COMMAND)
-  {
-    /* initialise card V1 */
-    do
-    {
-      /* initialise card V1 */
-      /* Send CMD55 (SD_CMD_APP_CMD) before any ACMD command: R1 response (0x00: no errors) */ 
-      response = SD_SendCmd(SD_CMD_APP_CMD, 0x00000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      
-      /* Send ACMD41 (SD_CMD_SD_APP_OP_COND) to initialize SDHC or SDXC cards: R1 response (0x00: no errors) */
-      response = SD_SendCmd(SD_CMD_SD_APP_OP_COND, 0x00000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-    }
-    while(response.r1 == SD_R1_IN_IDLE_STATE);
-    flag_SDHC = 0;
-  } 
-  else if(response.r1 == SD_R1_IN_IDLE_STATE)
-  {
-      /* initialise card V2 */
-    do {
-      
-      /* Send CMD55 (SD_CMD_APP_CMD) before any ACMD command: R1 response (0x00: no errors) */ 
-      response = SD_SendCmd(SD_CMD_APP_CMD, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-      
-      /* Send ACMD41 (SD_CMD_SD_APP_OP_COND) to initialize SDHC or SDXC cards: R1 response (0x00: no errors) */
-      response = SD_SendCmd(SD_CMD_SD_APP_OP_COND, 0x40000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-      SD_IO_CSState(1);
-      SD_IO_WriteByte(SD_DUMMY_BYTE);
-    }
-    while(response.r1 == SD_R1_IN_IDLE_STATE);
-    
-    if((response.r1 & SD_R1_ILLEGAL_COMMAND) == SD_R1_ILLEGAL_COMMAND)
-    {
-      do {
-        /* Send CMD55 (SD_CMD_APP_CMD) before any ACMD command: R1 response (0x00: no errors) */ 
-        response = SD_SendCmd(SD_CMD_APP_CMD, 0, 0xFF, SD_ANSWER_R1_EXPECTED);
-        SD_IO_CSState(1);
-        SD_IO_WriteByte(SD_DUMMY_BYTE);
-        if(response.r1 != SD_R1_IN_IDLE_STATE)
-        {
-          return BSP_SD_ERROR;
-        }
-        /* Send ACMD41 (SD_CMD_SD_APP_OP_COND) to initialize SDHC or SDXC cards: R1 response (0x00: no errors) */
-        response = SD_SendCmd(SD_CMD_SD_APP_OP_COND, 0x00000000, 0xFF, SD_ANSWER_R1_EXPECTED);
-        SD_IO_CSState(1);
-        SD_IO_WriteByte(SD_DUMMY_BYTE);
-      }
-      while(response.r1 == SD_R1_IN_IDLE_STATE);        
-    }  
-    
-    /* Send CMD58 (SD_CMD_READ_OCR) to initialize SDHC or SDXC cards: R3 response (0x00: no errors) */
-    response = SD_SendCmd(SD_CMD_READ_OCR, 0x00000000, 0xFF, SD_ANSWER_R3_EXPECTED);
-    SD_IO_CSState(1);
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-    if(response.r1 != SD_R1_NO_ERROR)
-    {
-      return BSP_SD_ERROR;
-    } 
-    flag_SDHC = (response.r2 & 0x40) >> 6;
-  }
-  else
-  {
-    return BSP_SD_ERROR;
-  }
-  
-  return BSP_SD_OK; 
-}
-
-/**
-  * @brief  Waits a data until a value different from SD_DUMMY_BITE
-  * @retval the read value
-  */
-uint8_t SD_ReadData(void)
-{
-  uint8_t timeout = 0x08;
-  uint8_t readvalue;
- 
-  /* Check if response is got or a timeout is happen */
-  do {
-    readvalue = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    timeout--;
-    
-  }while ((readvalue == SD_DUMMY_BYTE) && timeout);
-
-  /* Right response got */
-  return readvalue;
-}
-
-/**
-  * @brief  Waits a data from the SD card
-  * @param  data  Expected data from the SD card
-  * @retval BSP_SD_OK or BSP_SD_TIMEOUT
-  */
-uint8_t SD_WaitData(uint8_t data)
-{
-  uint16_t timeout = 0xFFFF;
-  uint8_t readvalue;
-  
-  /* Check if response is got or a timeout is happen */
-  
-  do {
-    readvalue = SD_IO_WriteByte(SD_DUMMY_BYTE);
-    timeout--;
-  }while ((readvalue != data) && timeout);
-
-  if (timeout == 0)
-  {
-    /* After time out */
-    return BSP_SD_TIMEOUT;
-  }
-
-  /* Right response got */
-  return BSP_SD_OK;
-}
-
-/**
-  * @}
-  */  
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 261
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_sd.h

@@ -1,261 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32091c_eval_sd.h
-  * @author  MCD Application Team
-  * @brief   This file contains the common defines and functions prototypes for
-  *          the stm32091c_eval_sd.c driver.
-  ******************************************************************************
-  * @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 __STM32091C_EVAL_SD_H
-#define __STM32091C_EVAL_SD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32091c_eval.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32091C_EVAL
-  * @{
-  */
-
-/** @defgroup STM32091C_EVAL_SD STM32091C-EVAL SD
-  * @{
-  */
-
-/* Private define ------------------------------------------------------------*/
-
-/** @defgroup STM32091C_EVAL_SD_Private_Defines Private Constants
- * @{
- */
-/**
- * @}
- */
-/* Private variables ---------------------------------------------------------*/
-
-/** @defgroup STM32091C_EVAL_SD_Private_Variables Private Variables
- * @{
- */
-/**
- * @}
- */ 
- 
-/** @defgroup STM32091C_EVAL_SD_Exported_Types Exported Types
-  * @{
-  */
-
-/** 
-  * @brief  SD status structure definition  
-  */     
-enum {    
-      BSP_SD_OK = 0x00,      
-      MSD_OK = 0x00,
-      BSP_SD_ERROR = 0x01,
-      MSD_ERROR    = 0x01,
-      BSP_SD_TIMEOUT
-};
-
-typedef struct              
-{
-  uint8_t  Reserved1:2;               /* Reserved */
-  uint16_t DeviceSize:12;             /* Device Size */
-  uint8_t  MaxRdCurrentVDDMin:3;      /* Max. read current @ VDD min */
-  uint8_t  MaxRdCurrentVDDMax:3;      /* Max. read current @ VDD max */
-  uint8_t  MaxWrCurrentVDDMin:3;      /* Max. write current @ VDD min */
-  uint8_t  MaxWrCurrentVDDMax:3;      /* Max. write current @ VDD max */
-  uint8_t  DeviceSizeMul:3;           /* Device size multiplier */
-} struct_v1;
-
-
-typedef struct              
-{
-  uint8_t  Reserved1:6;               /* Reserved */
-  uint32_t DeviceSize:22;             /* Device Size */
-  uint8_t  Reserved2:1;               /* Reserved */
-} struct_v2;
-
-/** 
-  * @brief  Card Specific Data: CSD Register
-  */ 
-typedef struct
-{
-  /* Header part */
-  uint8_t  CSDStruct:2;            /* CSD structure */
-  uint8_t  Reserved1:6;            /* Reserved */
-  uint8_t  TAAC:8;                 /* Data read access-time 1 */
-  uint8_t  NSAC:8;                 /* Data read access-time 2 in CLK cycles */
-  uint8_t  MaxBusClkFrec:8;        /* Max. bus clock frequency */
-  uint16_t CardComdClasses:12;      /* Card command classes */
-  uint8_t  RdBlockLen:4;           /* Max. read data block length */
-  uint8_t  PartBlockRead:1;        /* Partial blocks for read allowed */
-  uint8_t  WrBlockMisalign:1;      /* Write block misalignment */
-  uint8_t  RdBlockMisalign:1;      /* Read block misalignment */
-  uint8_t  DSRImpl:1;              /* DSR implemented */
-  
-  /* v1 or v2 struct */
-  union csd_version {
-    struct_v1 v1;
-    struct_v2 v2;
-  } version;
-  
-  uint8_t  EraseSingleBlockEnable:1;  /* Erase single block enable */
-  uint8_t  EraseSectorSize:7;         /* Erase group size multiplier */
-  uint8_t  WrProtectGrSize:7;         /* Write protect group size */
-  uint8_t  WrProtectGrEnable:1;       /* Write protect group enable */
-  uint8_t  Reserved2:2;               /* Reserved */
-  uint8_t  WrSpeedFact:3;             /* Write speed factor */
-  uint8_t  MaxWrBlockLen:4;           /* Max. write data block length */
-  uint8_t  WriteBlockPartial:1;       /* Partial blocks for write allowed */
-  uint8_t  Reserved3:5;               /* Reserved */
-  uint8_t  FileFormatGrouop:1;        /* File format group */
-  uint8_t  CopyFlag:1;                /* Copy flag (OTP) */
-  uint8_t  PermWrProtect:1;           /* Permanent write protection */
-  uint8_t  TempWrProtect:1;           /* Temporary write protection */
-  uint8_t  FileFormat:2;              /* File Format */
-  uint8_t  Reserved4:2;               /* Reserved */
-  uint8_t  crc:7;                     /* Reserved */
-  uint8_t  Reserved5:1;               /* always 1*/
-  
-} SD_CSD;
-
-/** 
-  * @brief  Card Identification Data: CID Register   
-  */
-typedef struct
-{
-  __IO uint8_t  ManufacturerID;       /* ManufacturerID */
-  __IO uint16_t OEM_AppliID;          /* OEM/Application ID */
-  __IO uint32_t ProdName1;            /* Product Name part1 */
-  __IO uint8_t  ProdName2;            /* Product Name part2*/
-  __IO uint8_t  ProdRev;              /* Product Revision */
-  __IO uint32_t ProdSN;               /* Product Serial Number */
-  __IO uint8_t  Reserved1;            /* Reserved1 */
-  __IO uint16_t ManufactDate;         /* Manufacturing Date */
-  __IO uint8_t  CID_CRC;              /* CID CRC */
-  __IO uint8_t  Reserved2;            /* always 1 */
-} SD_CID;
-
-/** 
-  * @brief SD Card information 
-  */
-typedef struct
-{
-  SD_CSD Csd;
-  SD_CID Cid;
-  uint32_t CardCapacity;  /* Card Capacity */
-  uint32_t CardBlockSize; /* Card Block Size */
-} SD_CardInfo;
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_SD_Exported_Constants Exported Constants
-  * @{
-  */ 
-
-/**
-  * @brief  Block Size
-  */
-#define SD_BLOCK_SIZE    0x200
-
-/**
-  * @brief  SD detection on its memory slot
-  */
-#define SD_PRESENT               ((uint8_t)0x01)
-#define SD_NOT_PRESENT           ((uint8_t)0x00)
-   
-/**
-  * @}
-  */
-  
-/** @defgroup STM32091C_EVAL_SD_Exported_Macro Exported Macro
-  * @{
-  */ 
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_SD_Exported_Functions Exported Functions
-  * @{
-  */   
-uint8_t BSP_SD_Init(void);
-uint8_t BSP_SD_IsDetected(void);
-uint8_t BSP_SD_ReadBlocks(uint32_t *pData, uint32_t ReadAddr, uint16_t BlockSize, uint32_t NumberOfBlocks);
-uint8_t BSP_SD_WriteBlocks(uint32_t *pData, uint32_t WriteAddr, uint16_t BlockSize, uint32_t NumberOfBlocks);
-uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr);
-uint8_t BSP_SD_GetStatus(void);
-uint8_t BSP_SD_GetCardInfo(SD_CardInfo *pCardInfo);
-   
-/* Link functions for SD Card peripheral */
-void    SD_IO_Init(void);
-void    SD_IO_CSState(uint8_t state);
-void    SD_IO_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength);
-uint8_t SD_IO_WriteByte(uint8_t Data);
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_SD_Private_Functions Private Functions
-  * @{
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32091C_EVAL_SD_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 178
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_tsensor.c

@@ -1,178 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32091c_eval_tsensor.c
-  * @author  MCD Application Team
-  * @brief   This file provides a set of functions needed to manage the I2C STLM75 
-  *          temperature sensor mounted on STM32091C-EVAL board . 
-  *          It implements a high level communication layer for read and write 
-  *          from/to this sensor. The needed STM32F0xx hardware resources (I2C and 
-  *          GPIO) are defined in stm32091c_eval.h file, and the initialization is 
-  *          performed in TSENSOR_IO_Init() function declared in stm32091c_eval.c 
-  *          file.
-  *          You can easily tailor this driver to any other development board, 
-  *          by just adapting the defines for hardware resources and 
-  *          TSENSOR_IO_Init() function. 
-  *
-  *     +-----------------------------------------------------------------+
-  *     |                        Pin assignment                           |
-  *     +---------------------------------------+-----------+-------------+
-  *     |  STM32F0xx I2C Pins                   |   STLM75  |   Pin       |
-  *     +---------------------------------------+-----------+-------------+
-  *     | STLM75_I2C_SDA_PIN/ SDA               |   SDA     |    1        |
-  *     | STLM75_I2C_SCL_PIN/ SCL               |   SCL     |    2        |
-  *     | STLM75_I2C_SMBUSALERT_PIN/ SMBUS ALERT|   OS/INT  |    3        |
-  *     | .                                     |   GND     |    4  (0V)  |
-  *     | .                                    |   GND     |    5  (0V)  |
-  *     | .                                     |   GND     |    6  (0V)  |
-  *     | .                                     |   GND     |    7  (0V)  |
-  *     | .                                    |   VDD     |    8  (3.3V)|
-  *     +---------------------------------------+-----------+-------------+
-  ******************************************************************************
-  * @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.
-  *
-  ******************************************************************************
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32091c_eval_tsensor.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32091C_EVAL
-  * @{
-  */
-
-/** @addtogroup STM32091C_EVAL_TSENSOR
-  * @brief      This file includes the STLM75 Temperature Sensor driver of 
-  *             STM32091C-EVAL boards.
-  * @{
-  */ 
-
-/** @addtogroup STM32091C_EVAL_TSENSOR_Private_Variables
-  * @{
-  */ 
-static TSENSOR_DrvTypeDef  *tsensor_drv; 
-__IO uint16_t  TSENSORAddress = 0;
-
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32091C_EVAL_TSENSOR_Private_Functions
-  * @{
-  */ 
-
-/**
-  * @brief  Initializes peripherals used by the I2C Temperature Sensor driver.
-  * @retval TSENSOR status
-  */
-uint32_t BSP_TSENSOR_Init(void)
-{ 
-  uint8_t ret = TSENSOR_ERROR;
-  TSENSOR_InitTypeDef STLM75_InitStructure;
-
-  /* Temperature Sensor Initialization */
-  if(Stlm75Drv.IsReady(TSENSOR_I2C_ADDRESS_A01, TSENSOR_MAX_TRIALS) == HAL_OK)
-  {
-    /* Initialize the temperature sensor driver structure */
-    TSENSORAddress = TSENSOR_I2C_ADDRESS_A01;
-    tsensor_drv = &Stlm75Drv;
-
-    ret = TSENSOR_OK;
-  }
-  else
-  {
-    if(Stlm75Drv.IsReady(TSENSOR_I2C_ADDRESS_A02, TSENSOR_MAX_TRIALS) == HAL_OK)
-    {
-      /* Initialize the temperature sensor driver structure */
-      TSENSORAddress = TSENSOR_I2C_ADDRESS_A02;
-      tsensor_drv = &Stlm75Drv;
-
-      ret = TSENSOR_OK;
-    }
-    else
-    {
-      ret = TSENSOR_ERROR;
-    }
-  }
-
-  if (ret == TSENSOR_OK)
-  {
-    /* Configure Temperature Sensor : Conversion 9 bits in continuous mode */
-    /* Alert outside range Limit Temperature 12° <-> 24°c */
-    STLM75_InitStructure.AlertMode             = STLM75_INTERRUPT_MODE;
-    STLM75_InitStructure.ConversionMode        = STLM75_CONTINUOUS_MODE;
-    STLM75_InitStructure.TemperatureLimitHigh  = 24;
-    STLM75_InitStructure.TemperatureLimitLow   = 12;
-        
-    /* TSENSOR Init */   
-    tsensor_drv->Init(TSENSORAddress, &STLM75_InitStructure);
-
-    ret = TSENSOR_OK;
-  }
-  
-  return ret;
-}
-
-/**
-  * @brief  Returns the Temperature Sensor status.
-  * @retval The Temperature Sensor status.
-  */
-uint8_t BSP_TSENSOR_ReadStatus(void)
-{
-  return (tsensor_drv->ReadStatus(TSENSORAddress));
-}
-
-/**
-  * @brief  Read Temperature register of STLM75.
-  * @retval STLM75 measured temperature value.
-  */
-uint16_t BSP_TSENSOR_ReadTemp(void)
-{ 
-  return tsensor_drv->ReadTemp(TSENSORAddress);
-
-}
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 135
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32091C_EVAL/stm32091c_eval_tsensor.h

@@ -1,135 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32091c_eval_tsensor.h
-  * @author  MCD Application Team
-  * @brief   This file contains all the functions prototypes for the 
-  *          stm32091c_eval_tsensor.c firmware driver.
-  ******************************************************************************
-  * @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 __STM32091C_EVAL_TSENSOR_H
-#define __STM32091C_EVAL_TSENSOR_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32091c_eval.h"
-#include "../Components/stlm75/stlm75.h"   
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32091C_EVAL
-  * @{
-  */
-
-/** @addtogroup STM32091C_EVAL_TSENSOR STM32091C-EVAL TSENSOR
-  * @{
-  */
-
-/** @defgroup STM32091C_EVAL_TSENSOR_Private_Variables Private Variables
-  * @{
-  */
-/**
-  * @}
-  */   
-  
-/** @defgroup STM32091C_EVAL_TSENSOR_Exported_Types Exported Types
-  * @{
-  */
-
-/** 
-  * @brief  TSENSOR Status  
-  */ 
-typedef enum
-{
-  TSENSOR_OK = 0,
-  TSENSOR_ERROR
-}TSENSOR_Status_TypDef;
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_TSENSOR_Exported_Constants Exported Constants
-  * @{
-  */
-/* Temperature Sensor hardware I2C address */ 
-#define TSENSOR_I2C_ADDRESS_A01 0x90
-#define TSENSOR_I2C_ADDRESS_A02 0x92
-
-/* Maximum number of trials use for STTS751_IsReady function */
-#define TSENSOR_MAX_TRIALS      50
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_I2C_TSENSOR_Exported_Functions Exported Functions
-  * @{
-  */
-uint32_t BSP_TSENSOR_Init(void);
-uint8_t  BSP_TSENSOR_ReadStatus(void);
-uint16_t BSP_TSENSOR_ReadTemp(void);
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32091C_EVAL_TSENSOR_Private_Functions Private Functions
-  * @{
-  */
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32091C_EVAL_TSENSOR_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 181
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0308-Discovery/Release_Notes.html

@@ -1,181 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="File-List" href="Library_files/filelist.xml">
-<link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]-->
-
-
-
-<title>Release Notes for STM32F0308_Discovery board drivers</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-</style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-<meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="padding: 0cm;" valign="top">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="vertical-align: top;">
-<p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-</td>
-</tr>
-<tr style="">
-<td style="padding: 1.5pt;">
-<h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for STM32F0308-Discovery Board Drivers</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2016 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" width="900">
-<tbody>
-<tr style="">
-<td style="padding: 0cm;" valign="top">
-<span style="font-family: &quot;Times New Roman&quot;;"></span>
-<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2>
-<h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.5 / 25-August-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-family: Verdana,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13.33px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline ! important; white-space: normal; widows: 1;">Minor updates in STM32F0308-Discovery_BSP_User_Manual.chm documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.4 /&nbsp;7-April-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Updated BSP driver documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background-color: rgb(51, 102, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.3
-/ 27-May-2016<o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes</span></u></b></p>
-<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Aligned BSP drivers to use latest BSP components</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background-color: rgb(51, 102, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.2
-/ 29-January-2016<o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">Updated GPIO Output Speed literals naming to ensure HAL full compatibility.</span></li></ul><h3 style="background-color: rgb(51, 102, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.1
-/ 26-June-2015<o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<ul style="margin-top: 0cm;" type="square">
-<li class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">Update CHM User Manual for BSP/STM32F0308-Discovery.</span></li><li class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">Complete HAL API alignment (renaming).<br></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-weight: bold;"></span></span></li>
-<span style="font-family: &quot;Times New Roman&quot;;"></span></ul><h3 style="background-color: rgb(51, 102, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.0RC1
-/ 28-April-2014<o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">First release
-candidate version of the</span><span style="font-size: 10pt; font-family: Verdana;"> <span style="font-weight: bold; font-style: italic;">STM32F0308-Discovery</span>
-board RevA drivers for <span style="font-weight: bold;">STM32Cube_FW_F0
-project</span></span></li><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;">LEDs and </span><span style="font-size: 10pt; font-family: Verdana;">Push-Button
-BSP drivers (</span><span style="font-size: 10pt; font-family: Verdana;">stm32</span><span style="font-size: 10pt; font-family: Verdana;">f0308</span><span style="font-size: 10pt; font-family: Verdana;">_</span><span style="font-size: 10pt; font-family: Verdana;">discovery</span><span style="font-size: 10pt; font-family: Verdana;">.h/.c)</span></li><ul><li class="MsoNormal" style="color: black; margin-top: 4.5pt; margin-bottom: 4.5pt;"><span style="font-size: 10pt; font-family: Verdana;">See full API
-BSP_GetVersion(), BSP_LED</span><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;">_x() and
-BSP_PB_x() list in&nbsp;</span><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;">stm32</span><span style="font-size: 10pt; font-family: Verdana;">f0308</span><span style="font-size: 10pt; font-family: Verdana;">_</span><span style="font-size: 10pt; font-family: Verdana;">discovery</span><span style="font-size: 10pt; font-family: Verdana;">.h</span></li></ul></ul>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<ul style="margin-top: 0cm;" type="square">
-</ul>
-<h3 style="background-color: rgb(51, 102, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0
-/ 20-September-2013<o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<span style="font-size: 10pt; font-family: Verdana;"></span>
-<ul style="margin-top: 0cm;" type="square">
-<li class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">First
-official release</span><span style="font-size: 10pt; font-family: Verdana;"> </span><span style="font-size: 10pt; font-family: Verdana;">of the <span style="font-weight: bold; font-style: italic;">STM32F0308
-Discovery board drivers</span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-weight: bold;"></span></span></li>
-</ul>
-<span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span></h2>
-<div style="text-align: justify;">
-<div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistribution
-and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-</font>
-<ol><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-of source code must retain the above copyright notice, this list of
-conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the
-documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the
-name of STMicroelectronics nor the names of its contributors may be
-used to endorse or promote products derived</span></font><small><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> from this software without specific prior written permission.</span></small><br></li></ol><font size="-1">
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font> </div>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></div>
-<span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black;"></span>
-<b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-<div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-<hr align="center" size="2" width="100%"></span></div>
-<div style="text-align: center;"><span style="font-size: 10pt; font-family: Verdana; color: black;">For
-complete documentation on </span><span style="font-size: 10pt; font-family: Verdana;">STM32<span style="color: black;">&nbsp;Microcontrollers
-visit </span><u><span style="color: blue;"><a href="http://www.st.com/internet/mcu/class/1734.jsp" target="_blank">www.st.com/STM32</a></span></u></span></div>
-</td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-</body></html>

+ 0 - 238
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0308-Discovery/stm32f0308_discovery.c

@@ -1,238 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f0308_discovery.c
-  * @author  MCD Application Team
-  * @brief   This file provides set of firmware functions to manage Leds and
-  *          push-button available on STM32F0308-DISCOVERY Kit from STMicroelectronics.
-  ******************************************************************************
-  * @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.
-  *
-  ******************************************************************************
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f0308_discovery.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32F0308_DISCOVERY
-  * @{
-  */
-
-/** @addtogroup STM32F0308_DISCOVERY_Common
-  * @brief This file provides firmware functions to manage Leds and push-buttons, 
-  *        available on STM32F0308_DISCOVERY evaluation board from STMicroelectronics.
-  * @{
-  */ 
-
-/** @defgroup STM32F0308_DISCOVERY_Private_Constants Private Constants
-  * @{
-  */ 
-
-/**
-  * @brief STM32F0308 DISCO BSP Driver version number V2.0.5
-  */
-#define __STM32F0308_DISCO_BSP_VERSION_MAIN   (0x02) /*!< [31:24] main version */
-#define __STM32F0308_DISCO_BSP_VERSION_SUB1   (0x00) /*!< [23:16] sub1 version */
-#define __STM32F0308_DISCO_BSP_VERSION_SUB2   (0x05) /*!< [15:8]  sub2 version */
-#define __STM32F0308_DISCO_BSP_VERSION_RC     (0x00) /*!< [7:0]  release candidate */ 
-#define __STM32F0308_DISCO_BSP_VERSION        ((__STM32F0308_DISCO_BSP_VERSION_MAIN << 24)|\
-                                               (__STM32F0308_DISCO_BSP_VERSION_SUB1 << 16)|\
-                                               (__STM32F0308_DISCO_BSP_VERSION_SUB2 << 8 )|\
-                                               (__STM32F0308_DISCO_BSP_VERSION_RC))  
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0308_DISCOVERY_Private_Variables Private Variables
-  * @{
-  */
-GPIO_TypeDef* LED_PORT[LEDn] = {LED3_GPIO_PORT, LED4_GPIO_PORT};
-const uint16_t LED_PIN[LEDn] = {LED3_PIN, LED4_PIN};
-
-GPIO_TypeDef* BUTTON_PORT[BUTTONn] = {USER_BUTTON_GPIO_PORT}; 
-const uint16_t BUTTON_PIN[BUTTONn] = {USER_BUTTON_PIN}; 
-const uint8_t BUTTON_IRQn[BUTTONn] = {USER_BUTTON_EXTI_IRQn};
-
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32F0308_DISCOVERY_Exported_Functions
-  * @{
-  */ 
-
-/**
-  * @brief  This method returns the STM32F0308 DISCO BSP Driver revision
-  * @retval version : 0xXYZR (8bits for each decimal, R for RC)
-  */
-uint32_t BSP_GetVersion(void)
-{
-  return __STM32F0308_DISCO_BSP_VERSION;
-}
-
-/**
-  * @brief  Configures LED GPIO.
-  * @param  Led Specifies the Led to be configured. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED3
-  *     @arg LED4
-  * @retval None
-  */
-void BSP_LED_Init(Led_TypeDef Led)
-{
-  GPIO_InitTypeDef  GPIO_InitStruct;
-  
-  /* Enable the GPIO_LED clock */
-  LEDx_GPIO_CLK_ENABLE(Led);
-
-  /* Configure the GPIO_LED pin */
-  GPIO_InitStruct.Pin = LED_PIN[Led];
-  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStruct.Pull = GPIO_NOPULL;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  
-  HAL_GPIO_Init(LED_PORT[Led], &GPIO_InitStruct);
-  
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET); 
-}
-
-/**
-  * @brief  Turns selected LED On.
-  * @param  Led Specifies the Led to be set on. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED3
-  *     @arg LED4  
-  * @retval None
-  */
-void BSP_LED_On(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_SET);
-}
-
-/**
-  * @brief  Turns selected LED Off.
-  * @param  Led Specifies the Led to be set off. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED3
-  *     @arg LED4 
-  * @retval None
-  */
-void BSP_LED_Off(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET);
-}
-
-/**
-  * @brief  Toggles the selected LED.
-  * @param  Led Specifies the Led to be toggled. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED3
-  *     @arg LED4  
-  * @retval None
-  */
-void BSP_LED_Toggle(Led_TypeDef Led)
-{
-  HAL_GPIO_TogglePin(LED_PORT[Led], LED_PIN[Led]);
-}
-
-/**
-  * @brief  Configures Button GPIO and EXTI Line.
-  * @param  Button Specifies the Button to be configured.
-  *   This parameter should be: BUTTON_USER
-  * @param  Mode Specifies Button mode.
-  *   This parameter can be one of the following values:
-  *     @arg BUTTON_MODE_GPIO: Button will be used as simple IO 
-  *     @arg BUTTON_MODE_EXTI: Button will be connected to EXTI line
-  *                            with interrupt generation capability
-  * @retval None
-  */
-void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Mode)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-
-  /* Enable the BUTTON Clock */
-  BUTTONx_GPIO_CLK_ENABLE(Button);
-  __HAL_RCC_SYSCFG_CLK_ENABLE();
-
-  GPIO_InitStruct.Pin = BUTTON_PIN[Button];
-  GPIO_InitStruct.Pull = GPIO_NOPULL;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-
-  if(Mode == BUTTON_MODE_GPIO)
-  {
-    /* Configure Button pin as input */
-    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-    GPIO_InitStruct.Pull = GPIO_PULLDOWN;
-    HAL_GPIO_Init(BUTTON_PORT[Button], &GPIO_InitStruct);
-  }
-
-  if(Mode == BUTTON_MODE_EXTI)
-  {
-    /* Configure Button pin as input with External interrupt */
-    GPIO_InitStruct.Pull = GPIO_NOPULL;
-    GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
-    HAL_GPIO_Init(BUTTON_PORT[Button], &GPIO_InitStruct);
-
-    /* Enable and set Button EXTI Interrupt to the lowest priority */
-    HAL_NVIC_SetPriority((IRQn_Type)(BUTTON_IRQn[Button]), 0x03, 0x00);
-    HAL_NVIC_EnableIRQ((IRQn_Type)(BUTTON_IRQn[Button]));
-  }
-}
-
-
-/**
-  * @brief  Returns the selected Button state.
-  * @param  Button Specifies the Button to be checked.
-  *   This parameter should be: BUTTON_USER  
-  * @retval The Button GPIO pin value.
-  */
-uint32_t BSP_PB_GetState(Button_TypeDef Button)
-{
-  return HAL_GPIO_ReadPin(BUTTON_PORT[Button], BUTTON_PIN[Button]);
-}
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-    
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 185
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0308-Discovery/stm32f0308_discovery.h

@@ -1,185 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f0308_discovery.h
-  * @author  MCD Application Team
-  * @brief   This file contains definitions for STM32F0308-Discovery's Leds, push-
-  *          buttons hardware resources.
-  ******************************************************************************
-  * @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 __STM32F0308_DISCOVERY_H
-#define __STM32F0308_DISCOVERY_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f0xx_hal.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @defgroup STM32F0308_DISCOVERY STM32F0308_DISCOVERY
-  * @{
-  */
-
-/** @defgroup STM32F0308_DISCOVERY_Common STM32F0308_DISCOVERY Common
-  * @{
-  */
-
-/** @defgroup STM32F0308_DISCOVERY_Exported_Types Exported Types
-  * @{
-  */
-
-/**
- * @brief LED Types Definition
- */
-typedef enum
-{
-  LED3 = 0,
-  LED4 = 1,
-  /* Color led aliases */
-  LED_GREEN  = LED3,
-  LED_BLUE   = LED4
-}Led_TypeDef;
-
-/**
- * @brief BUTTON Types Definition
- */
-typedef enum 
-{
-  BUTTON_USER = 0
-}Button_TypeDef;
-
-typedef enum 
-{  
-  BUTTON_MODE_GPIO = 0,
-  BUTTON_MODE_EXTI = 1
-}ButtonMode_TypeDef;
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0308_DISCOVERY_Exported_Constants Exported Constants
-  * @{
-  */ 
-/** 
-* @brief  Define for STM32F0308_DISCOVERY board  
-*/ 
-#if !defined (USE_STM320308_DISCO)
- #define USE_STM320308_DISCO
-#endif
-
-/** @defgroup STM32F0308_DISCOVERY_LED STM32F0308_DISCOVERY LED
-  * @{
-  */
-#define LEDn                             2
-  
-#define LED3_PIN                         GPIO_PIN_9
-#define LED3_GPIO_PORT                   GPIOC
-#define LED3_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOC_CLK_ENABLE()
-#define LED3_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOC_CLK_DISABLE()
-  
-#define LED4_PIN                         GPIO_PIN_8
-#define LED4_GPIO_PORT                   GPIOC
-#define LED4_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOC_CLK_ENABLE()
-#define LED4_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOC_CLK_DISABLE()
-
-#define LEDx_GPIO_CLK_ENABLE(__LED__)   do { if((__LED__) == LED3) LED3_GPIO_CLK_ENABLE(); else \
-                                         if((__LED__) == LED4) LED4_GPIO_CLK_ENABLE();} while(0)
-
-#define LEDx_GPIO_CLK_DISABLE(__LED__)  (((__LED__) == LED3) ? LED3_GPIO_CLK_DISABLE() :\
-                                         ((__LED__) == LED4) ? LED4_GPIO_CLK_DISABLE() : 0 )
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0308_DISCOVERY_BUTTON STM32F0308_DISCOVERY BUTTON
-  * @{
-  */  
-#define BUTTONn                          1
-
-/**
- * @brief USER push-button
- */
-#define USER_BUTTON_PIN                GPIO_PIN_0                       /* PA0 */
-#define USER_BUTTON_GPIO_PORT          GPIOA
-#define USER_BUTTON_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOA_CLK_ENABLE()
-#define USER_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
-#define USER_BUTTON_EXTI_IRQn          EXTI0_1_IRQn 
-
-#define BUTTONx_GPIO_CLK_ENABLE(__BUTTON__)    do { if((__BUTTON__) == BUTTON_USER) USER_BUTTON_GPIO_CLK_ENABLE();} while(0)
-
-#define BUTTONx_GPIO_CLK_DISABLE(__BUTTON__)   (((__BUTTON__) == BUTTON_USER) ? USER_BUTTON_GPIO_CLK_DISABLE() : 0 )
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-  
-/** @defgroup STM32F0308_DISCOVERY_Exported_Functions Exported Functions
-  * @{
-  */
-uint32_t BSP_GetVersion(void);
-void     BSP_LED_Init(Led_TypeDef Led);
-void     BSP_LED_On(Led_TypeDef Led);
-void     BSP_LED_Off(Led_TypeDef Led);
-void     BSP_LED_Toggle(Led_TypeDef Led);
-void     BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Mode);
-uint32_t BSP_PB_GetState(Button_TypeDef Button);
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32F0308_DISCOVERY_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 419
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/Release_Notes.html

@@ -1,419 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="File-List" href="Library_files/filelist.xml">
-<link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]-->
-
-
-
-<title>Release Notes for STM32F072B_Discovery board drivers</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-</style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-<meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="padding: 0cm;" valign="top">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="vertical-align: top;">
-<p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-</td>
-</tr>
-<tr style="">
-<td style="padding: 1.5pt;">
-<h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for STM32F072B-Discovery Board Drivers</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2016 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" width="900">
-<tbody>
-<tr style="">
-<td style="padding: 0cm;" valign="top">
-<span style="font-family: &quot;Times New Roman&quot;;"></span>
-<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.6 / 25-August-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-family: Verdana,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13.33px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline ! important; white-space: normal; widows: 1;">Minor updates in STM32F072B-Discovery_BSP_User_Manual.chm documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.5 /&nbsp;7-April-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Updated BSP driver documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background-color: rgb(51, 102, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.4
-/ 27-May-2016<o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes</span></u></b></p>
-<ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;" lang="EN-US"></span><span style="font-size: 10pt; font-family: Verdana;"></span><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Aligned BSP drivers to use latest BSP components</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.3 / 29-January-2016 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-size: 10pt; font-family: Verdana;">Updated GPIO Output Speed literals naming to ensure HAL full compatibility.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.1.2 / 26-June-2015 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-size: 10pt; font-family: Verdana;">Update CHM User Manual for BSP/STM32F072B-Discovery.</span></li><li><span style="font-size: 10pt; font-family: Verdana;">Complete HAL API alignment (renaming).</span></li><li><span style="font-size: 10pt; font-family: Verdana;">Update LEDx_GPIO_CLK_ENABLE and BUTTONx_GPIO_CLK_ENABLE macros implementation.<br></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 180px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V2.0.0 / 20-May-2014 <o:p></o:p></span></h3>
-
-
-
-
-
-
-
-
-
-
-
-
-
-            
-            
-            
-            
-            
-            
-            
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-
-
-
-
-
-
-
-
-
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-
-
-
-            
-            
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-
-            <span style="font-size: 10pt; font-family: Verdana;"></span>
-            
-            
-            
-
-
-
-
-            
-            
-            
-            <ul style="list-style-type: square;"><li><span style="font-size: 10pt; font-family: Verdana;">Major update
-based on STM32Cube specification: drivers architecture and APIs
-modified vs. V1.0.0 and thus the 2 versions are not compatible.<br>
-</span></li><li style="font-weight: bold;"><span style="font-size: 10pt; font-family: Verdana;">This version has to be used only with </span><span style="font-size: 10pt; font-family: Verdana;">STM32CubeF0</span><span style="font-size: 10pt; font-family: Verdana;"> based development</span></li></ul><h3 style="background-color: rgb(51, 102, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0
-/ 27-December-2013<o:p></o:p></span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<span style="font-size: 10pt; font-family: Verdana;"></span><ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">First
-official release</span><span style="font-size: 10pt; font-family: Verdana;"> </span><span style="font-size: 10pt; font-family: Verdana;">of the <span style="font-weight: bold; font-style: italic;">STM32F072B
-Discovery board drivers</span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-weight: bold;"></span></span></li></ul><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span></h2>
-<div style="text-align: justify;">
-<div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistribution
-and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-</font>
-<ol><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-of source code must retain the above copyright notice, this list of
-conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the
-documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the
-name of STMicroelectronics nor the names of its contributors may be
-used to endorse or promote products derived</span></font><small><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> from this software without specific prior written permission.</span></small><br></li></ol><font size="-1">
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font> </div>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></div>
-<span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black;"></span>
-<b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-<div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-<hr align="center" size="2" width="100%"></span></div>
-<div style="text-align: center;"><span style="font-size: 10pt; font-family: Verdana; color: black;">For
-complete documentation on </span><span style="font-size: 10pt; font-family: Verdana;">STM32<span style="color: black;">&nbsp;Microcontrollers
-visit </span><u><span style="color: blue;"><a href="http://www.st.com/internet/mcu/class/1734.jsp" target="_blank">www.st.com/STM32</a></span></u></span></div>
-</td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-</body></html>

+ 0 - 808
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery.c

@@ -1,808 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f072b_discovery.c
-  * @author  MCD Application Team
-  * @brief   This file provides set of firmware functions to manage Leds, 
-  *          push-button available on STM32F072B-Discovery Kit from STMicroelectronics.
-  ******************************************************************************
-  * @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.
-  *
-  ******************************************************************************
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f072b_discovery.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32F072B_DISCOVERY
-  * @{
-  */
-
-/** @addtogroup STM32F072B_DISCOVERY_Common 
-  * @brief This file provides firmware functions to manage Leds, push-buttons, 
-  *        and temperature sensor (LM75) available on 
-  *        STM32F072B-DISCO evaluation board from STMicroelectronics.
-  * @{
-  */ 
-
-/** @defgroup STM32F072B_DISCOVERY_Private_Constants Private Constants
-  * @{
-  */ 
-
-/**
-  * @brief STM32F072B DISCO BSP Driver version number V2.1.6
-  */
-#define __STM32F072B_DISCO_BSP_VERSION_MAIN   (0x02) /*!< [31:24] main version */
-#define __STM32F072B_DISCO_BSP_VERSION_SUB1   (0x01) /*!< [23:16] sub1 version */
-#define __STM32F072B_DISCO_BSP_VERSION_SUB2   (0x06) /*!< [15:8]  sub2 version */
-#define __STM32F072B_DISCO_BSP_VERSION_RC     (0x00) /*!< [7:0]  release candidate */ 
-#define __STM32F072B_DISCO_BSP_VERSION         ((__STM32F072B_DISCO_BSP_VERSION_MAIN << 24)\
-                                               |(__STM32F072B_DISCO_BSP_VERSION_SUB1 << 16)\
-                                               |(__STM32F072B_DISCO_BSP_VERSION_SUB2 << 8 )\
-                                               |(__STM32F072B_DISCO_BSP_VERSION_RC))  
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F072B_DISCOVERY_Private_Variables Private Variables
-  * @{
-  */ 
-GPIO_TypeDef* LED_PORT[LEDn] = {LED3_GPIO_PORT,
-                                LED4_GPIO_PORT,
-                                LED5_GPIO_PORT,
-                                LED6_GPIO_PORT};
-
-const uint16_t LED_PIN[LEDn] = {LED3_PIN,
-                                LED4_PIN,
-                                LED5_PIN,
-                                LED6_PIN};
-
-GPIO_TypeDef* BUTTON_PORT[BUTTONn] = {USER_BUTTON_GPIO_PORT}; 
-const uint16_t BUTTON_PIN[BUTTONn] = {USER_BUTTON_PIN}; 
-const uint8_t BUTTON_IRQn[BUTTONn] = {USER_BUTTON_EXTI_IRQn};
-
-/**
- * @brief BUS variables
- */
-#if defined(HAL_I2C_MODULE_ENABLED)
-I2C_HandleTypeDef I2cHandle;
-#endif
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-uint32_t SpixTimeout = SPIx_TIMEOUT_MAX;    /*<! Value of Timeout when SPI communication fails */
-static SPI_HandleTypeDef SpiHandle;
-#endif
-
-/**
-  * @}
-  */ 
-
-
-/** @defgroup STM32F072B_DISCOVERY_BUS_Operations_Functions Bus Operations functions
-  * @{
-  */ 
-#if defined(HAL_I2C_MODULE_ENABLED)
-/* I2Cx bus function */
-static void     I2Cx_Init(void);
-static uint32_t I2Cx_WriteData(uint8_t Addr, uint16_t Reg, uint8_t Value);
-static uint32_t I2Cx_WriteBuffer(uint8_t Addr, uint16_t Reg,  uint8_t *pBuffer, uint16_t Length);
-static uint32_t I2Cx_ReadData(uint8_t Addr, uint16_t Reg, uint8_t *Value);
-static uint32_t I2Cx_ReadBuffer(uint8_t Addr, uint16_t Reg, uint8_t *pBuffer, uint16_t Length);
-static void     I2Cx_Error(uint8_t Addr);
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-/* SPIx bus function */
-static void     SPIx_Init(void);
-static uint8_t  SPIx_WriteRead(uint8_t byte);
-static void     SPIx_Error (void);
-static void     SPIx_MspInit(SPI_HandleTypeDef *hspi);
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F072B_DISCOVERY_LINK_Operations_Functions Link Operations functions
-  * @{
-  */
-  
-/* Link function for GYRO peripheral */
-void      GYRO_IO_Init(void);
-void      GYRO_IO_Write(uint8_t* pBuffer, uint8_t WriteAddr, uint16_t NumByteToWrite);
-void      GYRO_IO_Read(uint8_t* pBuffer, uint8_t ReadAddr, uint16_t NumByteToRead);
-#endif
-
-#if defined(HAL_I2C_MODULE_ENABLED)
-/* Link function for I2C EEPROM peripheral */
-void                      EEPROM_IO_Init(void);
-uint32_t                  EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint32_t pBuffer, uint32_t BufferSize);
-uint32_t                  EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint32_t pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef         EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32F072B_DISCOVERY_Exported_Functions
-  * @{
-  */ 
-
-/**
-  * @brief  This method returns the STM32F072B DISCO BSP Driver revision
-  * @retval version : 0xXYZR (8bits for each decimal, R for RC)
-  */
-uint32_t BSP_GetVersion(void)
-{
-  return __STM32F072B_DISCO_BSP_VERSION;
-}
-
-/**
-  * @brief  Configures LED GPIO.
-  * @param  Led Specifies the Led to be configured. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED3
-  *     @arg LED4
-  *     @arg LED5
-  *     @arg LED6
-  * @retval None
-  */
-void BSP_LED_Init(Led_TypeDef Led)
-{
-  GPIO_InitTypeDef  GPIO_InitStruct;
-  
-  /* Enable the GPIO_LED Clock */
-  LEDx_GPIO_CLK_ENABLE(Led);
-
-  /* Configure the GPIO_LED pin */
-  GPIO_InitStruct.Pin = LED_PIN[Led];
-  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStruct.Pull = GPIO_PULLUP; /* GPIO_PuPd_DOWN */
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  
-  HAL_GPIO_Init(LED_PORT[Led], &GPIO_InitStruct);
-  
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET); 
-}
-
-/**
-  * @brief  Turns selected LED On.
-  * @param  Led Specifies the Led to be set on. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED3
-  *     @arg LED4
-  *     @arg LED5
-  *     @arg LED6
-  * @retval None
-  */
-void BSP_LED_On(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_SET); 
-}
-
-/**
-  * @brief  Turns selected LED Off.
-  * @param  Led Specifies the Led to be set off. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED3
-  *     @arg LED4
-  *     @arg LED5
-  *     @arg LED6
-  * @retval None
-  */
-void BSP_LED_Off(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET); 
-}
-
-/**
-  * @brief  Toggles the selected LED.
-  * @param  Led Specifies the Led to be toggled. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED3
-  *     @arg LED4
-  *     @arg LED5
-  *     @arg LED6
-  * @retval None
-  */
-void BSP_LED_Toggle(Led_TypeDef Led)
-{
-  HAL_GPIO_TogglePin(LED_PORT[Led], LED_PIN[Led]);
-}
-
-/**
-  * @brief  Configures Button GPIO and EXTI Line.
-  * @param  Button Specifies the Button to be configured.
-  *   This parameter should be: BUTTON_USER
-  * @param  Mode Specifies Button mode.
-  *   This parameter can be one of following parameters:   
-  *     @arg BUTTON_MODE_GPIO: Button will be used as simple IO 
-  *     @arg BUTTON_MODE_EXTI: Button will be connected to EXTI line with interrupt
-  *                            generation capability  
-  * @retval None
-  */
-void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Mode)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-
-  /* Enable the BUTTON Clock */
-  BUTTONx_GPIO_CLK_ENABLE(Button);
-  __HAL_RCC_SYSCFG_CLK_ENABLE();
-
-  GPIO_InitStruct.Pin = BUTTON_PIN[Button];
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-
-  if(Mode == BUTTON_MODE_GPIO)
-  {
-    /* Configure Button pin as input */
-    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-    GPIO_InitStruct.Pull = GPIO_PULLDOWN;
-    HAL_GPIO_Init(BUTTON_PORT[Button], &GPIO_InitStruct);
-  }
-
-  if(Mode == BUTTON_MODE_EXTI)
-  {
-    /* Configure Button pin as input with External interrupt */
-    GPIO_InitStruct.Pull = GPIO_NOPULL;
-    GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; 
-    HAL_GPIO_Init(BUTTON_PORT[Button], &GPIO_InitStruct);
-
-    /* Enable and set Button EXTI Interrupt to the lowest priority */
-    HAL_NVIC_SetPriority((IRQn_Type)(BUTTON_IRQn[Button]), 0x03, 0x00);
-    HAL_NVIC_EnableIRQ((IRQn_Type)(BUTTON_IRQn[Button]));
-  }
-}
-
-/**
-  * @brief  Returns the selected Push Button state.
-  * @param  Button Specifies the Button to be checked.
-  *   This parameter should be: BUTTON_USER  
-  * @retval The Button GPIO pin value.
-  */
-uint32_t BSP_PB_GetState(Button_TypeDef Button)
-{
-  return HAL_GPIO_ReadPin(BUTTON_PORT[Button], BUTTON_PIN[Button]);
-}
-
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32F072B_DISCOVERY_BUS_Operations_Functions
-  * @{
-  */ 
-  
-/******************************************************************************
-                            BUS OPERATIONS
-*******************************************************************************/
-#if defined(HAL_I2C_MODULE_ENABLED)
-/******************************* I2C Routines**********************************/
-
-/**
-  * @brief Discovery I2Cx MSP Initialization
-  * @param hi2c I2C handle
-  * @retval None
-  */
-static void I2Cx_MspInit(I2C_HandleTypeDef *hi2c)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-  static DMA_HandleTypeDef hdma_tx;
-  static DMA_HandleTypeDef hdma_rx;
-
-  /* Enable GPIO clock */
-  DISCOVERY_I2Cx_GPIO_CLK_ENABLE();
-      
-  /* Configure I2C Tx and Rx as alternate function  */
-  GPIO_InitStruct.Pin = (DISCOVERY_I2Cx_SCL_PIN | DISCOVERY_I2Cx_SDA_PIN);
-  GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
-  GPIO_InitStruct.Pull = GPIO_NOPULL;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Alternate = DISCOVERY_I2Cx_AF;
-  HAL_GPIO_Init(DISCOVERY_I2Cx_GPIO_PORT, &GPIO_InitStruct);
-
-  /* Enable the DMA clock */
-  DISCOVERY_EEPROM_DMA_CLK_ENABLE();
-    
-  /* Configure the DMA channel for the EEPROM peripheral TX direction */
-  /* Configure the DMA channel */
-  hdma_tx.Instance                  = DISCOVERY_EEPROM_DMA_CHANNEL_TX;
-  /* Set the parameters to be configured */
-  hdma_tx.Init.Direction            = DMA_MEMORY_TO_PERIPH;
-  hdma_tx.Init.PeriphInc            = DMA_PINC_DISABLE;
-  hdma_tx.Init.MemInc               = DMA_MINC_ENABLE;
-  hdma_tx.Init.PeriphDataAlignment  = DMA_PDATAALIGN_BYTE;
-  hdma_tx.Init.MemDataAlignment     = DMA_MDATAALIGN_BYTE;
-  hdma_tx.Init.Mode                 = DMA_NORMAL;
-  hdma_tx.Init.Priority             = DMA_PRIORITY_VERY_HIGH;
-
-  /* Associate the initilalized hdma_rx handle to the the husart handle*/
-  __HAL_LINKDMA(hi2c, hdmatx, hdma_tx);
-    
-  /* Configure the DMA Stream */
-  HAL_DMA_Init(&hdma_tx);
-    
-  /* Configure and enable DMA TX Channel interrupt */
-  HAL_NVIC_SetPriority((IRQn_Type)(DISCOVERY_EEPROM_DMA_TX_IRQn), DISCOVERY_EEPROM_DMA_PREPRIO, DISCOVERY_EEPROM_DMA_SUBPRIO);
-  HAL_NVIC_EnableIRQ((IRQn_Type)(DISCOVERY_EEPROM_DMA_TX_IRQn));
-    
-  /* Configure the DMA channel for the EEPROM peripheral RX direction */
-  /* Configure the DMA channel */
-  hdma_rx.Instance                  = DISCOVERY_EEPROM_DMA_CHANNEL_RX;
-  /* Set the parameters to be configured */
-  hdma_rx.Init.Direction            = DMA_PERIPH_TO_MEMORY;
-  hdma_rx.Init.PeriphInc            = DMA_PINC_DISABLE;
-  hdma_rx.Init.MemInc               = DMA_MINC_ENABLE;
-  hdma_rx.Init.PeriphDataAlignment  = DMA_PDATAALIGN_BYTE;
-  hdma_rx.Init.MemDataAlignment     = DMA_MDATAALIGN_BYTE;
-  hdma_rx.Init.Mode                 = DMA_NORMAL;
-  hdma_rx.Init.Priority             = DMA_PRIORITY_VERY_HIGH;
-
-  /* Associate the initilalized hdma_rx handle to the the husart handle*/
-  __HAL_LINKDMA(hi2c, hdmarx, hdma_rx);
-    
-  /* Configure the DMA Stream */
-  HAL_DMA_Init(&hdma_rx);
-    
-  /* Configure and enable DMA RX Channel interrupt */
-  HAL_NVIC_SetPriority((IRQn_Type)(DISCOVERY_EEPROM_DMA_RX_IRQn), DISCOVERY_EEPROM_DMA_PREPRIO, DISCOVERY_EEPROM_DMA_SUBPRIO);
-  HAL_NVIC_EnableIRQ((IRQn_Type)(DISCOVERY_EEPROM_DMA_RX_IRQn));
-
-  /* Enable I2C clock */
-  DISCOVERY_I2Cx_CLK_ENABLE();
-}
-
-/**
-  * @brief Discovery I2Cx Bus initialization
-  * @retval None
-  */
-static void I2Cx_Init(void)
-{
-  if(HAL_I2C_GetState(&I2cHandle) == HAL_I2C_STATE_RESET)
-  {
-    I2cHandle.Instance              = DISCOVERY_I2Cx;
-    I2cHandle.Init.Timing           = DISCOVERY_I2Cx_TIMING;
-    I2cHandle.Init.OwnAddress1      = 0;
-    I2cHandle.Init.AddressingMode   = I2C_ADDRESSINGMODE_7BIT;
-    I2cHandle.Init.DualAddressMode  = I2C_DUALADDRESS_DISABLE;
-    I2cHandle.Init.OwnAddress2      = 0;
-    I2cHandle.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
-    I2cHandle.Init.GeneralCallMode  = I2C_GENERALCALL_DISABLE;
-    I2cHandle.Init.NoStretchMode    = I2C_NOSTRETCH_DISABLE;  
-      
-    /* Init the I2C */
-    I2Cx_MspInit(&I2cHandle);
-    HAL_I2C_Init(&I2cHandle);
-  }
-}
-
-/**
-  * @brief  Write a value in a register of the device through BUS.
-  * @param  Addr Device address on BUS Bus.  
-  * @param  Reg The target register address to write
-  * @param  Value The target register value to be written 
-  * @retval None 
-  */
-static uint32_t I2Cx_WriteData(uint8_t Addr, uint16_t Reg, uint8_t Value)
-  {
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Mem_Write(&I2cHandle, Addr, Reg, I2C_MEMADD_SIZE_16BIT, &Value, 1, I2Cx_TIMEOUT_MAX); 
-
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    I2Cx_Error(Addr);
-    return HAL_ERROR;
-  }        
-  return HAL_OK;      
-}
-
-/**
-  * @brief  Write a value in a register of the device through BUS.
-  * @param  Addr Device address on BUS Bus.  
-  * @param  Reg The target register address to write
-  * @param  pBuffer The target register value to be written 
-  * @param  Length buffer size to be written
-  * @retval None
-  */
-static uint32_t I2Cx_WriteBuffer(uint8_t Addr, uint16_t Reg,  uint8_t *pBuffer, uint16_t Length)
-  {
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Mem_Write_DMA(&I2cHandle, Addr, Reg, I2C_MEMADD_SIZE_16BIT, pBuffer, Length); 
-
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    I2Cx_Error(Addr);
-    return HAL_ERROR;
-  }        
-  return HAL_OK;      
-}
-
-/**
-  * @brief  Read a register of the device through BUS
-  * @param  Addr Device address on BUS
-  * @param  Reg The target register address to read
-  * @retval Value: read register value
-  */
-static uint32_t I2Cx_ReadData(uint8_t Addr, uint16_t Reg, uint8_t *Value)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Mem_Read(&I2cHandle, Addr, Reg, I2C_MEMADD_SIZE_16BIT, Value, 1, I2Cx_TIMEOUT_MAX);
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    I2Cx_Error(Addr);
-    return HAL_ERROR;
-  }
-  return HAL_OK;
-}
-
-/**
-  * @brief  Reads multiple data on the BUS.
-  * @param  Addr   I2C Address
-  * @param  Reg    Reg Address 
-  * @param  pBuffer  pointer to read data buffer
-  * @param  Length  length of the data
-  * @retval 0 if no problems to read multiple data
-  */
-static uint32_t I2Cx_ReadBuffer(uint8_t Addr, uint16_t Reg, uint8_t *pBuffer, uint16_t Length)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-
-  status = HAL_I2C_Mem_Read_DMA(&I2cHandle, Addr, Reg, I2C_MEMADD_SIZE_16BIT, pBuffer, Length);
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    I2Cx_Error(Addr);
-    return HAL_ERROR;
-  }
-  return HAL_OK;
-}
-
-/**
-  * @brief Discovery I2Cx error treatment function
-  * @retval None
-  */
-static void I2Cx_Error (uint8_t Addr)
-{
-  /* De-initialize the I2C comunication BUS */
-  HAL_I2C_DeInit(&I2cHandle);
-
-  /* Re- Initiaize the I2C comunication BUS */
-  I2Cx_Init();
-}
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-#if defined(HAL_SPI_MODULE_ENABLED)
-/******************************* SPI Routines**********************************/
-/**
-  * @brief SPI1 Bus initialization
-  * @retval None
-  */
-static void SPIx_Init(void)
-{
-  if(HAL_SPI_GetState(&SpiHandle) == HAL_SPI_STATE_RESET)
-  {
-    /* SPI Config */
-    SpiHandle.Instance = DISCOVERY_SPIx;
-    /* SPI baudrate is set to 5.6 MHz (PCLK2/SPI_BaudRatePrescaler = 90/16 = 5.625 MHz) 
-      to verify these constraints:
-      l3gd20 SPI interface max baudrate is 10MHz for write/read
-      PCLK2 frequency is set to 90 MHz 
-      */
-    SpiHandle.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_8;
-    SpiHandle.Init.Direction = SPI_DIRECTION_2LINES;
-    SpiHandle.Init.CLKPhase = SPI_PHASE_1EDGE;
-    SpiHandle.Init.CLKPolarity = SPI_POLARITY_LOW;
-    SpiHandle.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
-    SpiHandle.Init.CRCPolynomial = 7;
-    SpiHandle.Init.DataSize = SPI_DATASIZE_8BIT;
-    SpiHandle.Init.FirstBit = SPI_FIRSTBIT_MSB;
-    SpiHandle.Init.NSS = SPI_NSS_SOFT;
-    SpiHandle.Init.TIMode = SPI_TIMODE_DISABLE;
-    SpiHandle.Init.Mode = SPI_MODE_MASTER;
-
-    SPIx_MspInit(&SpiHandle);
-    HAL_SPI_Init(&SpiHandle);
-  }
-}
-
-/**
-  * @brief  Sends a Byte through the SPI interface and return the Byte received 
-  *         from the SPI bus.
-  * @param  Byte  Byte send.
-  * @retval The received byte value
-  */
-static uint8_t SPIx_WriteRead(uint8_t Byte)
-{
-
-  uint8_t receivedbyte = 0;
-  
-  /* Send a Byte through the SPI peripheral */
-  /* Read byte from the SPI bus */
-  if(HAL_SPI_TransmitReceive(&SpiHandle, (uint8_t*) &Byte, (uint8_t*) &receivedbyte, 1, SpixTimeout) != HAL_OK)
-  {
-    SPIx_Error();
-  }
-  
-  return receivedbyte;
-}
-
-
-/**
-  * @brief SPI1 error treatment function
-  * @retval None
-  */
-static void SPIx_Error (void)
-{
-  /* De-initialize the SPI comunication BUS */
-  HAL_SPI_DeInit(&SpiHandle);
-  
-  /* Re- Initiaize the SPI comunication BUS */
-  SPIx_Init();
-}
-
-
-/**
-  * @brief SPI MSP Init
-  * @param hspi SPI handle
-  * @retval None
-  */
-static void SPIx_MspInit(SPI_HandleTypeDef *hspi)
-{
-  GPIO_InitTypeDef   GPIO_InitStructure;
-
-  /* Enable SPI2 clock  */
-  DISCOVERY_SPIx_CLOCK_ENABLE();
-
-  /* enable SPI2 gpio clock */
-  DISCOVERY_SPIx_GPIO_CLK_ENABLE();
-
-  /* configure SPI5 SCK, MOSI and MISO */
-  GPIO_InitStructure.Pin = (DISCOVERY_SPIx_SCK_PIN | DISCOVERY_SPIx_MOSI_PIN | DISCOVERY_SPIx_MISO_PIN);
-  GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
-  GPIO_InitStructure.Pull  = GPIO_NOPULL; /*GPIO_PULLDOWN*/
-  GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStructure.Alternate = DISCOVERY_SPIx_AF;
-  HAL_GPIO_Init(DISCOVERY_SPIx_GPIO_PORT, &GPIO_InitStructure);
-}
-
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32F072B_DISCOVERY_LINK_Operations_Functions
-  * @{
-  */ 
-
-/******************************************************************************
-                            LINK OPERATIONS
-*******************************************************************************/
-
-/********************************* LINK GYRO *****************************/
-/**
-  * @brief  Configures the GYRO SPI interface.
-  * @retval None
-  */
-void GYRO_IO_Init(void)
-{
-  GPIO_InitTypeDef GPIO_InitStructure;
-  
-  /* Configure the Gyroscope Control pins ------------------------------------------*/
-  /* Enable CS GPIO clock and  Configure GPIO PIN for Gyroscope Chip select */  
-  GYRO_CS_GPIO_CLK_ENABLE();  
-  GPIO_InitStructure.Pin = GYRO_CS_PIN;
-  GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStructure.Pull  = GPIO_NOPULL;
-  GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_HIGH;
-  HAL_GPIO_Init(GYRO_CS_GPIO_PORT, &GPIO_InitStructure);
-
-  /* Deselect : Chip Select high */
-  GYRO_CS_HIGH();
-
-  /* Enable INT1, INT2 GPIO clock and Configure GPIO PINs to detect Interrupts */
-  GYRO_INT_GPIO_CLK_ENABLE();
-  GPIO_InitStructure.Pin = GYRO_INT1_PIN | GYRO_INT2_PIN;
-  GPIO_InitStructure.Mode = GPIO_MODE_INPUT;
-  GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStructure.Pull= GPIO_NOPULL;
-  HAL_GPIO_Init(GYRO_INT_GPIO_PORT, &GPIO_InitStructure);
-  
-  SPIx_Init();
-}
-
-/**
-  * @brief  Writes one byte to the GYRO.
-  * @param  pBuffer  pointer to the buffer  containing the data to be written to the GYRO.
-  * @param  WriteAddr  GYRO's internal address to write to.
-  * @param  NumByteToWrite Number of bytes to write.
-  * @retval None
-  */
-void GYRO_IO_Write(uint8_t* pBuffer, uint8_t WriteAddr, uint16_t NumByteToWrite)
-{
-  /* Configure the MS bit: 
-       - When 0, the address will remain unchanged in multiple read/write commands.
-       - When 1, the address will be auto incremented in multiple read/write commands.
-  */
-  if(NumByteToWrite > 0x01)
-  {
-    WriteAddr |= (uint8_t)MULTIPLEBYTE_CMD;
-  }
-  /* Set chip select Low at the start of the transmission */
-  GYRO_CS_LOW();
-  
-  /* Send the Address of the indexed register */
-  SPIx_WriteRead(WriteAddr);
-  
-  /* Send the data that will be written into the device (MSB First) */
-  while(NumByteToWrite >= 0x01)
-  {
-    SPIx_WriteRead(*pBuffer);
-    NumByteToWrite--;
-    pBuffer++;
-  }
-  
-  /* Set chip select High at the end of the transmission */ 
-  GYRO_CS_HIGH();
-}
-
-/**
-  * @brief  Reads a block of data from the GYROSCOPE.
-  * @param  pBuffer  pointer to the buffer that receives the data read from the GYROSCOPE.
-  * @param  ReadAddr  GYROSCOPE's internal address to read from.
-  * @param  NumByteToRead  number of bytes to read from the GYROSCOPE.
-  * @retval None
-  */
-void GYRO_IO_Read(uint8_t* pBuffer, uint8_t ReadAddr, uint16_t NumByteToRead)
-{  
-  if(NumByteToRead > 0x01)
-  {
-    ReadAddr |= (uint8_t)(READWRITE_CMD | MULTIPLEBYTE_CMD);
-  }
-  else
-  {
-    ReadAddr |= (uint8_t)READWRITE_CMD;
-  }
-  /* Set chip select Low at the start of the transmission */
-  GYRO_CS_LOW();
-  
-  /* Send the Address of the indexed register */
-  SPIx_WriteRead(ReadAddr);
-  
-  /* Receive the data that will be read from the device (MSB First) */
-  while(NumByteToRead > 0x00)
-  {
-    /* Send dummy byte (0x00) to generate the SPI clock to GYROSCOPE (Slave device) */
-    *pBuffer = SPIx_WriteRead(DUMMY_BYTE);
-    NumByteToRead--;
-    pBuffer++;
-  }
-  
-  /* Set chip select High at the end of the transmission */ 
-  GYRO_CS_HIGH();
-}  
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-#if defined(HAL_I2C_MODULE_ENABLED)
-/********************************* LINK I2C EEPROM *****************************/
-/**
-  * @brief  Initializes peripherals used by the I2C EEPROM driver.
-  * @retval None
-  */
-void EEPROM_IO_Init(void)
-{
-  I2Cx_Init();
-}
-
-/**
-  * @brief  Write data to I2C EEPROM driver in using DMA channel
-  * @param  DevAddress Target device address
-  * @param  MemAddress Internal memory address
-  * @param  pBuffer Pointer to data buffer
-  * @param  BufferSize Amount of data to be sent
-  * @retval HAL status
-  */
-uint32_t EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint32_t pBuffer, uint32_t BufferSize)
-{
-  if (BufferSize == 1)
-  {
-    return (I2Cx_WriteData(DevAddress, MemAddress, *((uint8_t*)pBuffer)));
-  }
-  else
-  {
-    return (I2Cx_WriteBuffer(DevAddress, MemAddress, (uint8_t*)pBuffer, (uint32_t)BufferSize));
-  }
-}
-
-/**
-  * @brief  Read data from I2C EEPROM driver in using DMA channel
-  * @param  DevAddress Target device address
-  * @param  MemAddress Internal memory address
-  * @param  pBuffer Pointer to data buffer
-  * @param  BufferSize Amount of data to be read
-  * @retval HAL status
-  */
-uint32_t EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint32_t pBuffer, uint32_t BufferSize)
-{
-  if (BufferSize == 1)
-  {
-    return (I2Cx_ReadData(DevAddress, MemAddress, (uint8_t*)pBuffer));
-  }
-  else
-  {
-    return (I2Cx_ReadBuffer(DevAddress, MemAddress, (uint8_t*)pBuffer, (uint32_t)BufferSize));
-  }
-}
-
-/**
-* @brief  Checks if target device is ready for communication. 
-* @note   This function is used with Memory devices
-* @param  DevAddress Target device address
-* @param  Trials Number of trials
-* @retval HAL status
-*/
-HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
-{ 
-  HAL_Delay(5);
-  return (HAL_I2C_IsDeviceReady(&I2cHandle, DevAddress, Trials, I2Cx_TIMEOUT_MAX));
-}
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 311
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery.h

@@ -1,311 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f072b_discovery.h
-  * @author  MCD Application Team
-  * @brief   This file contains definitions for STM32F072B-Discovery's Leds, push-
-  *          buttons hardware resources.
-  ******************************************************************************
-  * @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 __STM32F072B_DISCOVERY_H
-#define __STM32F072B_DISCOVERY_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f0xx_hal.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @defgroup STM32F072B_DISCOVERY STM32F072B_DISCOVERY
-  * @{
-  */
-      
-/** @defgroup STM32F072B_DISCOVERY_Common STM32F072B_DISCOVERY Common
-  * @{
-  */ 
-
-/** @defgroup STM32F072B_DISCOVERY_Exported_Types Exported Types
-  * @{
-  */
-
-/**
- * @brief LED Types Definition
- */
-typedef enum 
-{
-  LED3 = 0,
-  LED4 = 1,
-  LED5 = 2,
-  LED6 = 3,
-  /* Color led aliases */
-  LED_RED    = LED3,
-  LED_ORANGE = LED4,
-  LED_GREEN  = LED5,
-  LED_BLUE   = LED6
-}Led_TypeDef;
-
-/**
- * @brief BUTTON Types Definition
- */
-typedef enum 
-{
-  BUTTON_USER = 0
-}Button_TypeDef;
-
-typedef enum 
-{  
-  BUTTON_MODE_GPIO = 0,
-  BUTTON_MODE_EXTI = 1
-}ButtonMode_TypeDef;
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F072B_DISCOVERY_Exported_Constants Exported Constants
-  * @{
-  */ 
-/**
-  * @brief  Define for STM32F072B_DISCOVERY board  
-  */ 
-#if !defined (USE_STM32072B_DISCO)
- #define USE_STM32072B_DISCO
-#endif
-/** @defgroup STM32F072B_DISCOVERY_LED STM32F072B_DISCOVERY LED
-  * @{
-  */
-#define LEDn                             4
-
-#define LED3_PIN                         GPIO_PIN_6
-#define LED3_GPIO_PORT                   GPIOC
-#define LED3_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOC_CLK_ENABLE()  
-#define LED3_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOC_CLK_DISABLE() 
-
-#define LED4_PIN                         GPIO_PIN_8
-#define LED4_GPIO_PORT                   GPIOC
-#define LED4_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOC_CLK_ENABLE()  
-#define LED4_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOC_CLK_DISABLE() 
-  
-#define LED5_PIN                         GPIO_PIN_9
-#define LED5_GPIO_PORT                   GPIOC
-#define LED5_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOC_CLK_ENABLE()  
-#define LED5_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOC_CLK_DISABLE()  
-
-#define LED6_PIN                         GPIO_PIN_7
-#define LED6_GPIO_PORT                   GPIOC
-#define LED6_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOC_CLK_ENABLE()  
-#define LED6_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOC_CLK_DISABLE() 
-
-#define LEDx_GPIO_CLK_ENABLE(__LED__) do { if((__LED__) == LED3) LED3_GPIO_CLK_ENABLE(); else \
-                                           if((__LED__) == LED4) LED4_GPIO_CLK_ENABLE(); else \
-                                           if((__LED__) == LED5) LED5_GPIO_CLK_ENABLE(); else \
-                                           if((__LED__) == LED6) LED6_GPIO_CLK_ENABLE();} while(0)
-
-#define LEDx_GPIO_CLK_DISABLE(__LED__)  (((__LED__) == LED3) ? LED3_GPIO_CLK_DISABLE() :\
-                                         ((__LED__) == LED4) ? LED4_GPIO_CLK_DISABLE() :\
-                                         ((__LED__) == LED5) ? LED5_GPIO_CLK_DISABLE() : \
-                                         ((__LED__) == LED6) ? LED6_GPIO_CLK_DISABLE() : 0 )
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F072B_DISCOVERY_BUTTON STM32F072B_DISCOVERY BUTTON
-  * @{
-  */  
-#define BUTTONn                          1
-
-/**
- * @brief USER push-button
- */
-#define USER_BUTTON_PIN                GPIO_PIN_0                       /* PA0 */
-#define USER_BUTTON_GPIO_PORT          GPIOA
-#define USER_BUTTON_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOA_CLK_ENABLE()
-#define USER_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
-#define USER_BUTTON_EXTI_IRQn          EXTI0_1_IRQn
-
-#define BUTTONx_GPIO_CLK_ENABLE(__BUTTON__)    do { if((__BUTTON__) == BUTTON_USER) USER_BUTTON_GPIO_CLK_ENABLE();} while(0)
-
-#define BUTTONx_GPIO_CLK_DISABLE(__BUTTON__)   (((__BUTTON__) == BUTTON_USER) ? USER_BUTTON_GPIO_CLK_DISABLE() : 0 )
-/**
-  * @}
-  */
-
-/** @defgroup STM32F072B_DISCOVERY_BUS STM32F072B_DISCOVERY BUS
-  * @{
-  */  
-#if defined(HAL_SPI_MODULE_ENABLED)
-/*##################### SPI1 ###################################*/
-#define DISCOVERY_SPIx                        SPI2
-#define DISCOVERY_SPIx_CLOCK_ENABLE()         __HAL_RCC_SPI2_CLK_ENABLE()
-#define DISCOVERY_SPIx_GPIO_PORT              GPIOB                      /* GPIOB */
-#define DISCOVERY_SPIx_AF                     GPIO_AF0_SPI2
-#define DISCOVERY_SPIx_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOB_CLK_ENABLE()
-#define DISCOVERY_SPIx_GPIO_CLK_DISABLE()     __HAL_RCC_GPIOB_CLK_DISABLE()
-#define DISCOVERY_SPIx_SCK_PIN                GPIO_PIN_13                 /* PB.13 */
-#define DISCOVERY_SPIx_MISO_PIN               GPIO_PIN_14                 /* PB.14 */
-#define DISCOVERY_SPIx_MOSI_PIN               GPIO_PIN_15                 /* PB.15 */
-/* Maximum Timeout values for flags waiting loops. These timeouts are not based
-   on accurate values, they just guarantee that the application will not remain
-   stuck if the SPI communication is corrupted.
-   You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
-#define SPIx_TIMEOUT_MAX                      ((uint32_t)0x1000)
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-#if defined(HAL_I2C_MODULE_ENABLED)
-/*##################### I2C2 ###################################*/
-/**
-  * @brief  Definition for I2C Interface pins (I2C2 used)
-  */
-#define DISCOVERY_I2Cx                              I2C2
-#define DISCOVERY_I2Cx_CLK_ENABLE()                 __HAL_RCC_I2C2_CLK_ENABLE()
-#define DISCOVERY_I2Cx_CLK_DISABLE()                __HAL_RCC_I2C2_CLK_DISABLE()
-#define DISCOVERY_I2Cx_FORCE_RESET()                __HAL_RCC_I2C2_FORCE_RESET()
-#define DISCOVERY_I2Cx_RELEASE_RESET()              __HAL_RCC_I2C2_RELEASE_RESET()
-
-#define DISCOVERY_I2Cx_SCL_PIN                      GPIO_PIN_10                 /* PB.10 */
-#define DISCOVERY_I2Cx_SDA_PIN                      GPIO_PIN_11                 /* PB.11 */
-
-#define DISCOVERY_I2Cx_GPIO_PORT                    GPIOB                       /* GPIOB */
-#define DISCOVERY_I2Cx_GPIO_CLK_ENABLE()            __HAL_RCC_GPIOB_CLK_ENABLE()
-#define DISCOVERY_I2Cx_GPIO_CLK_DISABLE()           __HAL_RCC_GPIOB_CLK_DISABLE()
-#define DISCOVERY_I2Cx_AF                           GPIO_AF1_I2C2
-
-/* Maximum Timeout values for flags waiting loops. These timeouts are not based
-   on accurate values, they just guarantee that the application will not remain
-   stuck if the I2C communication is corrupted.
-   You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
-//#define I2Cx_TIMEOUT_MAX                  ((uint32_t)0xFFFF)
-#define I2Cx_TIMEOUT_MAX                  ((uint32_t)0x10000)
-
-#define DISCOVERY_I2Cx_TIMING                       0x40B32537
-
-#define DISCOVERY_EEPROM_I2C_ADDRESS_A01           0xA0  
-
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32F072B_DISCOVERY_COMPONENT STM32F072B_DISCOVERY COMPONENT
-  * @{
-  */
-/*##################### GYRO ##########################*/
-/* Read/Write command */
-#define READWRITE_CMD                         ((uint8_t)0x80) 
-/* Multiple byte read/write command */ 
-#define MULTIPLEBYTE_CMD                      ((uint8_t)0x40)
-/* Dummy Byte Send by the SPI Master device in order to generate the Clock to the Slave device */
-#define DUMMY_BYTE                            ((uint8_t)0x00)
-
-/* Chip Select macro definition */
-#define GYRO_CS_LOW()       HAL_GPIO_WritePin(GYRO_CS_GPIO_PORT, GYRO_CS_PIN, GPIO_PIN_RESET)
-#define GYRO_CS_HIGH()      HAL_GPIO_WritePin(GYRO_CS_GPIO_PORT, GYRO_CS_PIN, GPIO_PIN_SET)
-
-/**
-  * @brief  GYRO SPI Interface pins
-  */
-#define GYRO_CS_GPIO_PORT            GPIOC                       /* GPIOC */
-#define GYRO_CS_GPIO_CLK_ENABLE()    __HAL_RCC_GPIOC_CLK_ENABLE()
-#define GYRO_CS_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOC_CLK_DISABLE()
-#define GYRO_CS_PIN                  GPIO_PIN_0                  /* PC.00 */
-
-#define GYRO_INT_GPIO_PORT               GPIOC                       /* GPIOC */
-#define GYRO_INT_GPIO_CLK_ENABLE()       __HAL_RCC_GPIOC_CLK_ENABLE()
-#define GYRO_INT_GPIO_CLK_DISABLE()      __HAL_RCC_GPIOC_CLK_DISABLE()
-#define GYRO_INT1_PIN                    GPIO_PIN_1                  /* PC.01 */
-#define GYRO_INT1_EXTI_IRQn              EXTI0_1_IRQn 
-#define GYRO_INT2_PIN                    GPIO_PIN_2                  /* PC.02 */
-#define GYRO_INT2_EXTI_IRQn              EXTI2_3_IRQn 
-
-/*##################### EEPROM ##########################*/
-/**
-  * @brief  I2C EEPROM Interface pins
-  */
-#define DISCOVERY_EEPROM_DMA                       DMA1   
-#define DISCOVERY_EEPROM_DMA_CHANNEL_TX            DMA1_Channel4
-#define DISCOVERY_EEPROM_DMA_CHANNEL_RX            DMA1_Channel5
-#define DISCOVERY_EEPROM_DMA_CLK_ENABLE()          __HAL_RCC_DMA1_CLK_ENABLE()
-#define DISCOVERY_EEPROM_DMA_CLK_DISABLE()         __HAL_RCC_DMA1_CLK_DISABLE()
-   
-#define DISCOVERY_EEPROM_DMA_TX_IRQn               DMA1_Channel4_5_6_7_IRQn
-#define DISCOVERY_EEPROM_DMA_RX_IRQn               DMA1_Channel4_5_6_7_IRQn
-#define DISCOVERY_EEPROM_DMA_PREPRIO               0
-#define DISCOVERY_EEPROM_DMA_SUBPRIO               0
-
-/**
-  * @}
-  */  
-
-/**
-  * @}
-  */  
-
-/** @defgroup STM32F072B_DISCOVERY_Exported_Functions Exported Functions
-  * @{
-  */
-uint32_t BSP_GetVersion(void);
-void     BSP_LED_Init(Led_TypeDef Led);
-void     BSP_LED_On(Led_TypeDef Led);
-void     BSP_LED_Off(Led_TypeDef Led);
-void     BSP_LED_Toggle(Led_TypeDef Led);
-void     BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Mode);
-uint32_t BSP_PB_GetState(Button_TypeDef Button);
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32F072B_DISCOVERY_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 535
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery_eeprom.c

@@ -1,535 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f072b_discovery_eeprom.c
-  * @author  MCD Application Team
-  * @brief   This file provides a set of functions needed to manage an I2C M24LR64 
-  *          EEPROM memory.
-  *          
-  *          =================================================================== 
-  *          Notes:
-  *           - This driver is intended for stm32F0xx families devices only.
-  *           - The I2C EEPROM memory (M24LR64) is available on RF EEPROM daughter 
-  *             board (ANT7-M24LR-A) provided with the STM32F072B-Discovery board.
-  *             To use this driver you have to connect the ANT7-M24LR-A to CN3 connector.
-  *          ===================================================================
-  *              
-  *          It implements a high level communication layer for read and write 
-  *          from/to this memory. The needed STM32F0xx hardware resources (I2C and 
-  *          GPIO) are defined in stm32f072b_discovery.h file, and the initialization is 
-  *          performed in EEPROM_IO_Init() function declared in stm32f072b_discovery.c 
-  *          file.
-  *          You can easily tailor this driver to any other development board, 
-  *          by just adapting the defines for hardware resources and 
-  *          EEPROM_IO_Init() function. 
-  *        
-  *          @note In this driver, basic read and write functions (EEPROM_ReadBuffer() 
-  *                and EEPROM_WritePage()) use Polling mode to perform the data transfer 
-  *                to/from EEPROM memory.
-  *             
-  *     +-----------------------------------------------------------------+
-  *     |               Pin assignment for M24LR64 EEPROM                 |
-  *     +---------------------------------------+-----------+-------------+
-  *     |  STM32F0xx I2C Pins                   |   EEPROM     |   Pin       |
-  *     +---------------------------------------+-----------+-------------+
-  *     | .                                     |   E0(GND) |    1  (0V)  |
-  *     | .                                     |   AC0     |    2        |
-  *     | .                                     |   AC1     |    3        |
-  *     | .                                     |   VSS     |    4  (0V)  |
-  *     | EEPROM_I2Cx_SDA_PIN/ SDA              |   SDA     |    5        |
-  *     | EEPROM_I2Cx_SCL_PIN/ SCL              |   SCL     |    6        |
-  *     | .                                     |   E1(GND) |    7  (0V)  |
-  *     | .                                     |   VDD     |    8 (3.3V) |
-  *     +---------------------------------------+-----------+-------------+
-  *
-  ******************************************************************************
-  * @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.
-  *
-  ******************************************************************************
-  */
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f072b_discovery_eeprom.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32F072B_DISCOVERY
-  * @{
-  */
-  
-/** @addtogroup STM32F072B_DISCOVERY_EEPROM
-  * @brief      This file includes the I2C EEPROM driver of STM32072B-EVAL board.
-  * @{
-  */ 
-
-/** @defgroup STM32072B_DISCOVERY_EEPROM_Private_Variables Private Variables
-  * @{
-  */
-__IO uint16_t  EEPROMAddress = 0;
-__IO uint32_t  EEPROMTimeout = EEPROM_LONG_TIMEOUT;
-__IO uint16_t  EEPROMDataRead;
-__IO uint8_t*  EEPROMDataWritePointer;
-__IO uint8_t   EEPROMDataNum;
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32F072B_DISCOVERY_EEPROM_Exported_Functions
-  * @{
-  */
-
-/**
-  * @brief  Initializes peripherals used by the I2C EEPROM driver.
-  * 
-  * @note There are 2 different versions of M24LR64 (A01 & A02).
-  *             Then try to connect on 1st one (EEPROM_I2C_ADDRESS_A01) 
-  *             and if problem, check the 2nd one (EEPROM_I2C_ADDRESS_A02)
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0)
-  */
-uint32_t BSP_EEPROM_Init(void)
-{ 
-  /* I2C Initialization */
-  EEPROM_IO_Init();
-
-  /*Select the EEPROM address for A01 and check if OK*/
-  EEPROMAddress = DISCOVERY_EEPROM_I2C_ADDRESS_A01;
-  if (EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS_NUMBER) != HAL_OK) 
-  {
-      return EEPROM_FAIL;
-  }
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Reads a block of data from the EEPROM.
-  * @param  pBuffer  pointer to the buffer that receives the data read from 
-  *         the EEPROM.
-  * @param  ReadAddr  EEPROM's internal address to start reading from.
-  * @param  NumByteToRead  pointer to the variable holding number of bytes to 
-  *         be read from the EEPROM.
-  * 
-  *        @note The variable pointed by NumByteToRead is reset to 0 when all the 
-  *              data are read from the EEPROM. Application should monitor this 
-  *              variable in order know when the transfer is complete.
-  * 
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-uint32_t BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead)
-{  
-  uint32_t buffersize = *NumByteToRead;
-  
-  /* Set the pointer to the Number of data to be read. This pointer will be used 
-      by the DMA Transfer Completer interrupt Handler in order to reset the 
-      variable to 0. User should check on this variable in order to know if the 
-      DMA transfer has been complete or not. */
-  EEPROMDataRead = *NumByteToRead;
-  
-  if (EEPROM_IO_ReadData(EEPROMAddress, ReadAddr, (uint32_t) pBuffer, buffersize) != EEPROM_OK)
-  {
-    return EEPROM_FAIL;
-  }
-  
-  /* Wait transfer through DMA to be complete */
-  EEPROMTimeout = HAL_GetTick();
-  while (EEPROMDataRead > 0)
-  {
-    if((HAL_GetTick() - EEPROMTimeout) < EEPROM_LONG_TIMEOUT)
-    {      
-      BSP_EEPROM_TIMEOUT_UserCallback(); 
-      return EEPROM_TIMEOUT;
-    }
-  }
-
-  /* If all operations OK, return EEPROM_OK (0) */
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Writes more than one byte to the EEPROM with a single WRITE cycle.
-  *
-  * @note   The number of bytes (combined to write start address) must not 
-  *         cross the EEPROM page boundary. This function can only write into
-  *         the boundaries of an EEPROM page.
-  *         This function doesn't check on boundaries condition (in this driver 
-  *         the function BSP_EEPROM_WriteBuffer() which calls BSP_EEPROM_WritePage() is 
-  *         responsible of checking on Page boundaries).
-  * 
-  * @param  pBuffer  pointer to the buffer containing the data to be written to 
-  *         the EEPROM.
-  * @param  WriteAddr  EEPROM's internal address to write to.
-  * @param  NumByteToWrite  pointer to the variable holding number of bytes to 
-  *         be written into the EEPROM. 
-  * 
-  *        @note The variable pointed by NumByteToWrite is reset to 0 when all the 
-  *              data are written to the EEPROM. Application should monitor this 
-  *              variable in order know when the transfer is complete.
-  * 
-  * @note This function just configure the communication and enable the DMA 
-  *       channel to transfer data. Meanwhile, the user application may perform 
-  *       other tasks in parallel.
-  * 
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-uint32_t BSP_EEPROM_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite)
-{ 
-  uint32_t buffersize = *NumByteToWrite;
-  uint32_t status = EEPROM_OK;
-  /* Set the pointer to the Number of data to be written. This pointer will be used 
-      by the DMA Transfer Completer interrupt Handler in order to reset the 
-      variable to 0. User should check on this variable in order to know if the 
-      DMA transfer has been complete or not. */
-  EEPROMDataWritePointer = NumByteToWrite;  
-  
-  status = EEPROM_IO_WriteData(EEPROMAddress, WriteAddr, (uint32_t) pBuffer, buffersize);
-  
-  /* If all operations OK, return EEPROM_OK (0) */
-  return status;
-}
-
-/**
-  * @brief  Writes buffer of data to the I2C EEPROM.
-  * @param  pBuffer  pointer to the buffer  containing the data to be written 
-  *         to the EEPROM.
-  * @param  WriteAddr  EEPROM's internal address to write to.
-  * @param  NumByteToWrite  number of bytes to write to the EEPROM.
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-uint32_t BSP_EEPROM_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite)
-{
-  uint16_t numofpage = 0, numofsingle = 0, count = 0;
-  uint16_t addr = 0;
-
-  addr = WriteAddr % EEPROM_PAGESIZE;
-  count = EEPROM_PAGESIZE - addr;
-  numofpage =  NumByteToWrite / EEPROM_PAGESIZE;
-  numofsingle = NumByteToWrite % EEPROM_PAGESIZE;
- 
-  /*!< If WriteAddr is EEPROM_PAGESIZE aligned  */
-  if(addr == 0) 
-  {
-    /*!< If NumByteToWrite < EEPROM_PAGESIZE */
-    if(numofpage == 0) 
-    {
-      /* Store the number of data to be written */
-      EEPROMDataNum = numofsingle;
-      /* Start writing data */
-      if (BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&EEPROMDataNum)) != EEPROM_OK)
-      {
-        return EEPROM_FAIL;
-      }
-      /* Wait transfer through DMA to be complete */
-      EEPROMTimeout = HAL_GetTick();
-      while (EEPROMDataNum > 0)
-      {
-        if((HAL_GetTick() - EEPROMTimeout) < EEPROM_LONG_TIMEOUT) {
-          BSP_EEPROM_TIMEOUT_UserCallback(); 
-          return EEPROM_TIMEOUT;
-        }
-      }
-      if (BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK) return EEPROM_FAIL;
-    }
-    /*!< If NumByteToWrite > EEPROM_PAGESIZE */
-    else  
-    {
-      while(numofpage--)
-      {
-        /* Store the number of data to be written */
-        EEPROMDataNum = EEPROM_PAGESIZE;        
-        if (BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&EEPROMDataNum)) != EEPROM_OK) 
-        {
-          return EEPROM_FAIL;
-        }
-        /* Wait transfer through DMA to be complete */
-        EEPROMTimeout = HAL_GetTick();
-        while (EEPROMDataNum > 0)
-        {
-          if((HAL_GetTick() - EEPROMTimeout) < EEPROM_LONG_TIMEOUT) {
-            BSP_EEPROM_TIMEOUT_UserCallback(); 
-            return EEPROM_TIMEOUT;
-          }
-        }
-        if (BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK) return EEPROM_FAIL;
-        WriteAddr +=  EEPROM_PAGESIZE;
-        pBuffer += EEPROM_PAGESIZE;
-      }
-
-      if(numofsingle!=0)
-      {
-        /* Store the number of data to be written */
-        EEPROMDataNum = numofsingle;          
-        if (BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&EEPROMDataNum)) != EEPROM_OK)
-        {
-          return EEPROM_FAIL;
-        }
-        /* Wait transfer through DMA to be complete */
-        EEPROMTimeout = HAL_GetTick();
-        while (EEPROMDataNum > 0)
-        {
-          if((HAL_GetTick() - EEPROMTimeout) < EEPROM_LONG_TIMEOUT) {
-            BSP_EEPROM_TIMEOUT_UserCallback(); 
-            return EEPROM_TIMEOUT;
-          }
-        }
-        if (BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK) return EEPROM_FAIL;
-      }
-    }
-  }
-  /*!< If WriteAddr is not EEPROM_PAGESIZE aligned  */
-  else 
-  {
-    /*!< If NumByteToWrite < EEPROM_PAGESIZE */
-    if(numofpage== 0) 
-    {
-      /*!< If the number of data to be written is more than the remaining space 
-      in the current page: */
-      if (NumByteToWrite > count)
-      {
-        /* Store the number of data to be written */
-        EEPROMDataNum = count;        
-        /*!< Write the data contained in same page */
-        if (BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&EEPROMDataNum)) != EEPROM_OK)
-        {
-          return EEPROM_FAIL;
-        }
-        /* Wait transfer through DMA to be complete */
-        EEPROMTimeout = HAL_GetTick();
-        while (EEPROMDataNum > 0)
-        {
-          if((HAL_GetTick() - EEPROMTimeout) < EEPROM_LONG_TIMEOUT) {
-            BSP_EEPROM_TIMEOUT_UserCallback(); 
-            return EEPROM_TIMEOUT;
-          }
-          }
-        if (BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK) return EEPROM_FAIL;      
-        
-        /* Store the number of data to be written */
-        EEPROMDataNum = (NumByteToWrite - count);          
-        /*!< Write the remaining data in the following page */
-        if (BSP_EEPROM_WritePage((uint8_t*)(pBuffer + count), (WriteAddr + count), (uint8_t*)(&EEPROMDataNum)) != EEPROM_OK)
-        {
-          return EEPROM_FAIL;
-        }
-        /* Wait transfer through DMA to be complete */
-        EEPROMTimeout = HAL_GetTick();
-        while (EEPROMDataNum > 0)
-        {
-          if((HAL_GetTick() - EEPROMTimeout) < EEPROM_LONG_TIMEOUT) {
-            BSP_EEPROM_TIMEOUT_UserCallback(); 
-            return EEPROM_TIMEOUT;
-          }
-        }
-        if (BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK) return EEPROM_FAIL;        
-      }      
-      else      
-      {
-        /* Store the number of data to be written */
-        EEPROMDataNum = numofsingle;         
-        if (BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&EEPROMDataNum)) != EEPROM_OK)
-        {
-          return EEPROM_FAIL;
-        }
-        /* Wait transfer through DMA to be complete */
-        EEPROMTimeout = HAL_GetTick();
-        while (EEPROMDataNum > 0)
-        {
-          if((HAL_GetTick() - EEPROMTimeout) < EEPROM_LONG_TIMEOUT) {
-            BSP_EEPROM_TIMEOUT_UserCallback(); 
-            return EEPROM_TIMEOUT;
-          }
-        }
-        if (BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK) return EEPROM_FAIL;        
-          }
-        }
-    /*!< If NumByteToWrite > EEPROM_PAGESIZE */
-    else
-    {
-      NumByteToWrite -= count;
-      numofpage =  NumByteToWrite / EEPROM_PAGESIZE;
-      numofsingle = numofsingle % EEPROM_PAGESIZE;
-      
-      if(count != 0)
-      {  
-        /* Store the number of data to be written */
-        EEPROMDataNum = count;         
-        if (BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&EEPROMDataNum)) != EEPROM_OK)
-        {
-          return EEPROM_FAIL;
-        }
-        /* Wait transfer through DMA to be complete */
-        EEPROMTimeout = HAL_GetTick();
-        while (EEPROMDataNum > 0)
-        {
-          if((HAL_GetTick() - EEPROMTimeout) < EEPROM_LONG_TIMEOUT) {
-            BSP_EEPROM_TIMEOUT_UserCallback(); 
-            return EEPROM_TIMEOUT;
-          }
-        }
-        if (BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK) return EEPROM_FAIL;
-        WriteAddr += count;
-        pBuffer += count;
-      } 
-      
-      while(numofpage--)
-      {
-        /* Store the number of data to be written */
-        EEPROMDataNum = EEPROM_PAGESIZE;          
-        if (BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&EEPROMDataNum)) != EEPROM_OK)
-        {
-          return EEPROM_FAIL;
-        }
-        /* Wait transfer through DMA to be complete */
-        EEPROMTimeout = HAL_GetTick();
-        while (EEPROMDataNum > 0)
-        {
-          if((HAL_GetTick() - EEPROMTimeout) < EEPROM_LONG_TIMEOUT) {
-            BSP_EEPROM_TIMEOUT_UserCallback();
-            return EEPROM_TIMEOUT;
-          }
-        }
-        if (BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK) return EEPROM_FAIL;
-        WriteAddr +=  EEPROM_PAGESIZE;
-        pBuffer += EEPROM_PAGESIZE;  
-      }
-      if(numofsingle != 0)
-      {
-        /* Store the number of data to be written */
-        EEPROMDataNum = numofsingle;           
-        if (BSP_EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&EEPROMDataNum)) != EEPROM_OK) 
-        {
-          return EEPROM_FAIL;
-        }
-        /* Wait transfer through DMA to be complete */
-        EEPROMTimeout = HAL_GetTick();
-        while (EEPROMDataNum > 0)
-        {
-          if((HAL_GetTick() - EEPROMTimeout) < EEPROM_LONG_TIMEOUT) {
-            BSP_EEPROM_TIMEOUT_UserCallback(); 
-            return EEPROM_TIMEOUT;
-        }
-      }
-        if (BSP_EEPROM_WaitEepromStandbyState() != EEPROM_OK) return EEPROM_FAIL;
-      }
-    }
-  }  
-  
-  /* If all operations OK, return EEPROM_OK (0) */
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Wait for EEPROM Standby state.
-  * 
-  * @note  This function allows to wait and check that EEPROM has finished the 
-  *        last operation. It is mostly used after Write operation: after receiving
-  *        the buffer to be written, the EEPROM may need additional time to actually
-  *        perform the write operation. During this time, it doesn't answer to
-  *        I2C packets addressed to it. Once the write operation is complete
-  *        the EEPROM responds to its address.
-  * 
-  * @retval EEPROM_OK (0) if operation is correctly performed, else return value 
-  *         different from EEPROM_OK (0) or the timeout user callback.
-  */
-uint32_t BSP_EEPROM_WaitEepromStandbyState(void)      
-{
-  HAL_StatusTypeDef status;
-  
-  EEPROMTimeout = HAL_GetTick();
-
-  do
-  {
-    if((HAL_GetTick() - EEPROMTimeout) < EEPROM_LONG_TIMEOUT)
-    {
-      BSP_EEPROM_TIMEOUT_UserCallback(); 
-      return EEPROM_TIMEOUT;
-    }
-
-    status = EEPROM_IO_IsDeviceReady(EEPROMAddress, EEPROM_MAX_TRIALS_NUMBER);
-  }while (status == HAL_BUSY);
-
-  /* Check if the maximum allowed number of trials has bee reached */
-  if (status != HAL_OK)
-  {
-    /* If the maximum number of trials has been reached, exit the function */
-    BSP_EEPROM_TIMEOUT_UserCallback();
-    return EEPROM_FAIL;
-  }
-  return EEPROM_OK;
-}
-
-/**
-  * @brief  Memory Tx Transfer completed callbacks.
-  * @param  hi2c I2C handle
-  * @retval None
-  */
-void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c)
-{
-  *EEPROMDataWritePointer = 0;  
-}
-
-/**
-  * @brief  Memory Rx Transfer completed callbacks.
-  * @param  hi2c I2C handle
-  * @retval None
-  */
-void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c)
-{
-  EEPROMDataRead = 0;
-}
-
-/**
-  * @brief  Basic management of the timeout situation.
-  * @retval None
-  */
-__weak uint32_t BSP_EEPROM_TIMEOUT_UserCallback(void)
-{
-  /* Block communication and all processes */
-  while (1)
-  {   
-  }
-}
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */  
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 127
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery_eeprom.h

@@ -1,127 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f072b_discovery_eeprom.h
-  * @author  MCD Application Team
-  * @brief   This file contains all the functions prototypes for 
-  *          the stm32072b_discovery_eeprom.c firmware driver.
-  ******************************************************************************
-  * @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 __STM32072B_DISCOVERY_EEPROM_H
-#define __STM32072B_DISCOVERY_EEPROM_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f072b_discovery.h"
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @addtogroup STM32F072B_DISCOVERY
-  * @{
-  */
-
-/** @defgroup STM32F072B_DISCOVERY_EEPROM STM32F072B_DISCOVERY EEPROM
-  * @{
-  */  
-
-/** @defgroup STM32F072B_DISCOVERY_EEPROM_Exported_Constants Exported Constants
-  * @{
-  */
-  
-/* EEPROM hardware address and page size */ 
-#define EEPROM_PAGESIZE             4
-#define EEPROM_MAX_SIZE             0x2000 /* 64Kbit*/
-                                
-/* Maximum Timeout values for flags and events waiting loops. 
-This timeout is based on systick set to 1ms*/   
-#define EEPROM_LONG_TIMEOUT         ((uint32_t)(1000))
-
-/* Maximum number of trials for EEPROM_WaitEepromStandbyState() function */
-#define EEPROM_MAX_TRIALS_NUMBER     300
-      
-#define EEPROM_OK                    0
-#define EEPROM_FAIL                  1
-#define EEPROM_TIMEOUT               2
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F072B_DISCOVERY_EEPROM_Exported_Functions Exported Functions
-  * @{
-  */ 
-uint32_t          BSP_EEPROM_Init(void);
-uint32_t          BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead);
-uint32_t          BSP_EEPROM_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite);
-uint32_t          BSP_EEPROM_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite);
-uint32_t          BSP_EEPROM_WaitEepromStandbyState(void);
-
-/* USER Callbacks: This function is declared as __weak in EEPROM driver and 
-   should be implemented into user application.  
-   BSP_EEPROM_TIMEOUT_UserCallback() function is called whenever a timeout condition 
-   occure during communication (waiting on an event that doesn't occur, bus 
-   errors, busy devices ...). */
-__weak uint32_t   BSP_EEPROM_TIMEOUT_UserCallback(void);
-
-/* Link function for I2C EEPROM peripheral */
-void              EEPROM_IO_Init(void);
-uint32_t          EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint32_t pBuffer, uint32_t BufferSize);
-uint32_t          EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint32_t pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32072B_DISCOVERY_EEPROM_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 229
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery_gyroscope.c

@@ -1,229 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f072b_discovery_gyroscope.c
-  * @author  MCD Application Team
-  * @brief   This file provides a set of functions needed to manage the l3gd20
-  *          MEMS accelerometer available on STM32F072B-Discovery Kit.
-  ******************************************************************************
-  * @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.
-  *
-  ******************************************************************************
-  */
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f072b_discovery_gyroscope.h"
-
-/** @addtogroup BSP
-  * @{
-  */ 
-
-/** @addtogroup STM32F072B_DISCOVERY
-  * @{
-  */
-
-/** @addtogroup STM32F072B_DISCOVERY_GYRO
-  * @{
-  */
-
-/** @defgroup STM32F072B_DISCOVERY_GYRO_Private_Variables Private Variables
-  * @{
-  */ 
-static GYRO_DrvTypeDef *GyroscopeDrv;
-
-/**
-  * @}
-  */
-
-/** @addtogroup STM32F072B_DISCOVERY_GYRO_Exported_Functions
-  * @{
-  */
-
-/**
-  * @brief  Set GYRO Initialization.
-  * @retval GYRO_OK if no problem during initialization
-  */
-uint8_t BSP_GYRO_Init(void)
-{  
-  uint8_t ret = GYRO_ERROR;
-  uint16_t ctrl = 0x0000;
-  GYRO_InitTypeDef L3GD20_InitStructure;
-  GYRO_FilterConfigTypeDef L3GD20_FilterStructure={0,0};
-
-  if((L3gd20Drv.ReadID() == I_AM_L3GD20) || (L3gd20Drv.ReadID() == I_AM_L3GD20_TR))
-  {
-    /* Initialize the gyroscope driver structure */
-    GyroscopeDrv = &L3gd20Drv;
-
-    /* Configure Mems : data rate, power mode, full scale and axes */
-    L3GD20_InitStructure.Power_Mode = L3GD20_MODE_ACTIVE;
-    L3GD20_InitStructure.Output_DataRate = L3GD20_OUTPUT_DATARATE_1;
-    L3GD20_InitStructure.Axes_Enable = L3GD20_AXES_ENABLE;
-    L3GD20_InitStructure.Band_Width = L3GD20_BANDWIDTH_4;
-    L3GD20_InitStructure.BlockData_Update = L3GD20_BlockDataUpdate_Continous;
-    L3GD20_InitStructure.Endianness = L3GD20_BLE_LSB;
-    L3GD20_InitStructure.Full_Scale = L3GD20_FULLSCALE_500; 
-	
-    /* Configure MEMS: data rate, power mode, full scale and axes */
-    ctrl = (uint16_t) (L3GD20_InitStructure.Power_Mode | L3GD20_InitStructure.Output_DataRate | \
-                      L3GD20_InitStructure.Axes_Enable | L3GD20_InitStructure.Band_Width);
-	
-    ctrl |= (uint16_t) ((L3GD20_InitStructure.BlockData_Update | L3GD20_InitStructure.Endianness | \
-                        L3GD20_InitStructure.Full_Scale) << 8);
-
-    /* L3gd20 Init */	 
-    GyroscopeDrv->Init(ctrl);
-  
-    L3GD20_FilterStructure.HighPassFilter_Mode_Selection =L3GD20_HPM_NORMAL_MODE_RES;
-    L3GD20_FilterStructure.HighPassFilter_CutOff_Frequency = L3GD20_HPFCF_0;
-	
-    ctrl = (uint8_t) ((L3GD20_FilterStructure.HighPassFilter_Mode_Selection |\
-                       L3GD20_FilterStructure.HighPassFilter_CutOff_Frequency));		
-	
-    GyroscopeDrv->FilterConfig(ctrl) ;
-  
-    GyroscopeDrv->FilterCmd(L3GD20_HIGHPASSFILTER_ENABLE);
-	
-    ret = GYRO_OK;
-  }
-  else
-  {
-    ret = GYRO_ERROR;
-  }
-  
-  return ret;
-}
-
-/**
-  * @brief  Read ID of Gyroscope component
-  * @retval ID
-  */
-uint8_t BSP_GYRO_ReadID(void)
-{
-  uint8_t id = 0x00;
-
-  if(GyroscopeDrv->ReadID != NULL)
-  {
-    id = GyroscopeDrv->ReadID();
-  }  
-  return id;
-}
-
-/**
-  * @brief  Reboot memory content of GYRO
-  * @retval None
-  */
-void BSP_GYRO_Reset(void)
-{
-  if(GyroscopeDrv->Reset != NULL)
-  {
-    GyroscopeDrv->Reset();
-  }  
-}
-
-/**
-  * @brief  Configure INT1 interrupt
-  * @param  pIntConfig pointer to a L3GD20_InterruptConfig_TypeDef 
-  *         structure that contains the configuration setting for the L3GD20 Interrupt.
-  * @retval None
-  */
-void BSP_GYRO_ITConfig(GYRO_InterruptConfigTypeDef *pIntConfig)
-{  
-uint16_t interruptconfig = 0x0000;
-
-  if(GyroscopeDrv->ConfigIT != NULL)
-  {
-    /* Configure latch Interrupt request and axe interrupts */                   
-    interruptconfig |= ((uint8_t)(pIntConfig->Latch_Request| \
-                                  pIntConfig->Interrupt_Axes) << 8);
-                   
-    interruptconfig |= (uint8_t)(pIntConfig->Interrupt_ActiveEdge);
- 
-	GyroscopeDrv->ConfigIT(interruptconfig);
-  }  
-}
-
-/**
-  * @brief  Enable INT1 or INT2 interrupt
-  * @param  IntPin Interrupt pin 
-  *      This parameter can be: 
-  *        @arg L3GD20_INT1
-  *        @arg L3GD20_INT2
-  * @retval None
-  */
-void BSP_GYRO_EnableIT(uint8_t IntPin)
-{  
-  if(GyroscopeDrv->EnableIT != NULL)
-  {
-	GyroscopeDrv->EnableIT(IntPin);
-  }  
-}
-
-/**
-  * @brief  Disable INT1 or INT2 interrupt
-  * @param  IntPin Interrupt pin 
-  *      This parameter can be: 
-  *        @arg L3GD20_INT1
-  *        @arg L3GD20_INT2
-  * @retval None
-  */
-void BSP_GYRO_DisableIT(uint8_t IntPin)
-{  
-  if(GyroscopeDrv->DisableIT != NULL)
-  {
-    GyroscopeDrv->DisableIT(IntPin);
-  }  
-}
-
-/**
-  * @brief  Get XYZ angular acceleration
-  * @param pfData pointer on floating array         
-  * @retval None
-  */
-void BSP_GYRO_GetXYZ(float* pfData)
-{
-  if(GyroscopeDrv->GetXYZ!= NULL)
-  {
-	GyroscopeDrv->GetXYZ(pfData);
-  }  
-}
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-  
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/     

+ 0 - 112
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F072B-Discovery/stm32f072b_discovery_gyroscope.h

@@ -1,112 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f072b_discovery_gyroscope.h
-  * @author  MCD Application Team
-  * @brief   This file contains definitions for stm32f072b_discovery_gyroscope.c 
-  *          firmware driver.
-  ******************************************************************************
-  * @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 __STM32F072B_DISCOVERY_GYRO_H
-#define __STM32F072B_DISCOVERY_GYRO_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f072b_discovery.h"
-/* Include Gyroscope component driver */
-#include "../Components/l3gd20/l3gd20.h"   
-
-/** @addtogroup BSP
-  * @{
-  */
-  
-/** @addtogroup STM32F072B_DISCOVERY
-  * @{
-  */ 
-
-/** @defgroup STM32F072B_DISCOVERY_GYRO STM32F072B_DISCOVERY GYROSCOPE
-  * @{
-  */
-  
-/** @defgroup STM32F072B_DISCOVERY_GYRO_Exported_Types Exported Types
-  * @{
-  */
-typedef enum 
-{
-  GYRO_OK = 0,
-  GYRO_ERROR = 1,
-  GYRO_TIMEOUT = 2
-} 
-GYRO_StatusTypeDef;
-
-/**
-  * @}
-  */ 
- 
-/** @defgroup STM32F072B_DISCOVERY_GYRO_Exported_Functions Exported Functions
-  * @{
-  */
-/* Sensor Configuration Functions */ 
-uint8_t BSP_GYRO_Init(void);
-void    BSP_GYRO_Reset(void);
-uint8_t BSP_GYRO_ReadID(void);
-void    BSP_GYRO_ITConfig(GYRO_InterruptConfigTypeDef *pIntConfigStruct);
-void    BSP_GYRO_EnableIT(uint8_t IntPin);
-void    BSP_GYRO_DisableIT(uint8_t IntPin);
-void    BSP_GYRO_GetXYZ(float* pfData);
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32F072B_DISCOVERY_GYROSCOPE_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 

+ 0 - 165
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx-Nucleo/Release_Notes.html

@@ -1,165 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="File-List" href="Library_files/filelist.xml">
-<link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]-->
-
-
-
-<title>Release Notes for STM32F0xx-Nucleo Board Drivers</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-</style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-<meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="padding: 0cm;" valign="top">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-<tbody>
-<tr>
-<td style="vertical-align: top;">
-<p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-</td>
-</tr>
-<tr style="">
-<td style="padding: 1.5pt;">
-<h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for STM32F0xx-Nucleo&nbsp; Board Drivers</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2016 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-<p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" width="900">
-<tbody>
-<tr style="">
-<td style="padding: 0cm;" valign="top">
-<span style="font-family: &quot;Times New Roman&quot;;"></span>
-<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.1.6 / 25-August-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-family: Verdana,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13.33px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline ! important; white-space: normal; widows: 1;">Minor updates in STM32F0xx-Nucleo_BSP_User_Manual.chm documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.1.5 /&nbsp;7-April-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Updated BSP driver documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 200px; margin-right: 500pt;"><span style="font-family: Arial; color: white; font-size: 10pt;">V1.1.4 / 04-November-2016</span></h3><p style="margin: 4.5pt 0cm 4.5pt 18pt;" class="MsoNormal"><b><u><span style="font-family: Verdana; color: black; font-size: 10pt;">Main 
-Changes</span></u></b></p><ul><li><span style="font-family: Verdana; font-size: 10pt;">Update CHM User Manual for BSP/STM32F0xx_Nucleo.</span></li></ul><span style="font-family: Verdana; font-size: 10pt;"></span><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 200px; margin-right: 500pt;"><span style="font-family: Arial; color: white; font-size: 10pt;">V1.1.3 / 29-January-2016</span></h3><p style="margin: 4.5pt 0cm 4.5pt 18pt;" class="MsoNormal"><b><u><span style="font-family: Verdana; color: black; font-size: 10pt;">Main 
-Changes</span></u></b></p><ul><li><span style="font-family: Verdana; font-size: 10pt;">Updated GPIO Output Speed literals naming to ensure HAL full compatibility.</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Added new services for SD management, as required by updated version of Adafruit 1.8 component.</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Modified GPIO_LED configuration to NOPULL (to improve power consumption).</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Modified USER_BUTTON definitions to ensure compatibility between Nucleo boards.</span></li></ul><span style="font-family: Verdana; font-size: 10pt;"></span><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 200px; margin-right: 500pt;"><span style="font-family: Arial; color: white; font-size: 10pt;">V1.1.2 / 26-June-2015</span></h3><p style="margin: 4.5pt 0cm 4.5pt 18pt;" class="MsoNormal"><b><u><span style="font-family: Verdana; color: black; font-size: 10pt;">Main 
-Changes</span></u></b></p><ul><li><span style="font-family: Verdana; font-size: 10pt;">Update CHM User Manual for BSP/STM32F0xx_Nucleo.</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Complete HAL API alignment (renaming).<br></span></li><li><span style="font-family: Verdana; font-size: 10pt;">Add missing ADC calibration for JoyStick management.</span></li><li><span style="font-family: Verdana; font-size: 10pt;">Update ADC polling in Nucleo shield Adafruit joystick.<br></span></li><li><span style="font-family: Verdana; font-size: 10pt;">Implement workaround to cover RCC limitation regarding Peripheral enable delay.</span><span style="font-family: Verdana; font-size: 10pt;"></span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 200px; margin-right: 500pt;"><span style="font-family: Arial; color: white; font-size: 10pt;">V1.1.1 / 27-November-2014</span></h3><p style="margin: 4.5pt 0cm 4.5pt 18pt;" class="MsoNormal"><b><u><span style="font-family: Verdana; color: black; font-size: 10pt;">Main 
-Changes</span></u></b></p><ul><li><span style="font-family: Verdana; font-size: 10pt;">Case mismatch between #include typo &amp; effective file name generating compiler errors under Linux</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 200px; margin-right: 500pt;"><span style="font-family: Arial; color: white; font-size: 10pt;">V1.1.0 / 
-01-Aug-2014</span></h3>
-<p style="margin: 4.5pt 0cm 4.5pt 18pt;" class="MsoNormal"><b><u><span style="font-family: Verdana; color: black; font-size: 10pt;">Main 
-Changes</span></u></b></p>
-<ul><li><span style="font-family: Verdana; font-size: 10pt;">Compatibility with LCD 
-Component</span><span style="font-family: Verdana; font-size: 10pt;"> driver 
-update: </span>
-<ul><li><span style="font-family: Verdana; font-size: 10pt;">Change LCD_IO_WriteData 
-to LCD_IO_WriteMultipleData</span>
-</li><li><small><span style="font-family: Verdana;">LCD IO needs to treat also 1 
-byte.</span></small></li></ul>
-</li><li><span style="text-align: left; text-transform: none; text-indent: 0px; letter-spacing: normal; display: inline ! important; font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal; white-space: normal; float: none; color: rgb(0, 0, 0); word-spacing: 0px;">New 
-supported </span><span style="text-align: left; text-transform: none; text-indent: 0px; letter-spacing: normal; display: inline ! important; font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal; white-space: normal; float: none; color: rgb(0, 0, 0); word-spacing: 0px;">devices 
-are STM32F091RC.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0
-/ 20-May-2014</span></h3>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-<ul style="margin-top: 0cm;" type="square">
-<li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; display: inline ! important; float: none;">First
-official release dedicated to </span><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: Verdana; font-weight: bold;">STM32CubeF0 based development</span><span style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; display: inline ! important; float: none;">. Supported devices are STM32F072RB and STM32F030R8.</span><span style="font-size: 10pt; font-family: Verdana;"></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="font-weight: normal;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-weight: bold; font-style: italic;"></span></span></li></ul><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"></span>
-<h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span></h2>
-<div style="text-align: justify;">
-<div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistribution
-and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-</font>
-<ol><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-of source code must retain the above copyright notice, this list of
-conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the
-documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the
-name of STMicroelectronics nor the names of its contributors may be
-used to endorse or promote products derived</span></font><small><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> from this software without specific prior written permission.</span></small><br></li></ol><font size="-1">
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font> </div>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></div>
-<span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black;"></span>
-<b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-<div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-<hr align="center" size="2" width="100%"></span></div>
-<p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: Verdana; color: black;">For
-complete documentation on </span><span style="font-size: 10pt; font-family: Verdana;">STM32<span style="color: black;">&nbsp;Microcontrollers
-visit </span><u><span style="color: blue;"><a href="http://www.st.com/internet/mcu/class/1734.jsp" target="_blank">www.st.com/STM32</a></span></u></span><span style="font-size: 10pt; font-family: Verdana;"><a target="_blank" href="http://www.st.com/internet/mcu/family/141.jsp"><u><span style="color: blue;"></span></u></a></span><span style="font-size: 10pt; font-family: Verdana;"><u><span style="color: blue;"></span></u></span><span style="color: black;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-<p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-</td>
-</tr>
-</tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-</body></html>

+ 0 - 932
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx-Nucleo/stm32f0xx_nucleo.c

@@ -1,932 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f0xx_nucleo.c
-  * @author  MCD Application Team
-  * @brief   This file provides set of firmware functions to manage:
-  *          - LEDs and push-button available on STM32F0XX-Nucleo Kit 
-  *            from STMicroelectronics
-  *          - LCD, joystick and microSD available on Adafruit 1.8" TFT LCD 
-  *            shield (reference ID 802)
-  ******************************************************************************
-  * @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.
-  *
-  ******************************************************************************
-  */ 
-  
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f0xx_nucleo.h"
-
-/** @addtogroup BSP
-  * @{
-  */ 
-
-/** @addtogroup STM32F0XX_NUCLEO
-  * @{
-  */   
-
-/** @defgroup STM32F0XX_NUCLEO_Private_Defines Private Defines
-  * @{
-  */ 
-
-/**
-  * @brief STM32F0XX NUCLEO BSP Driver version number V1.1.6
-  */
-#define __STM32F0XX_NUCLEO_BSP_VERSION_MAIN   (0x01) /*!< [31:24] main version */
-#define __STM32F0XX_NUCLEO_BSP_VERSION_SUB1   (0x01) /*!< [23:16] sub1 version */
-#define __STM32F0XX_NUCLEO_BSP_VERSION_SUB2   (0x06) /*!< [15:8]  sub2 version */
-#define __STM32F0XX_NUCLEO_BSP_VERSION_RC     (0x00) /*!< [7:0]  release candidate */ 
-#define __STM32F0XX_NUCLEO_BSP_VERSION        ((__STM32F0XX_NUCLEO_BSP_VERSION_MAIN << 24)\
-                                              |(__STM32F0XX_NUCLEO_BSP_VERSION_SUB1 << 16)\
-                                              |(__STM32F0XX_NUCLEO_BSP_VERSION_SUB2 << 8 )\
-                                              |(__STM32F0XX_NUCLEO_BSP_VERSION_RC))
-
-/**
-  * @brief LINK SD Card
-  */
-#define SD_DUMMY_BYTE            0xFF    
-#define SD_NO_RESPONSE_EXPECTED  0x80
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0XX_NUCLEO_Private_Variables Private Variables
-  * @{
-  */ 
-GPIO_TypeDef*  LED_PORT[LEDn] = {LED2_GPIO_PORT};
-const uint16_t LED_PIN[LEDn] = {LED2_PIN};
-
-GPIO_TypeDef*  BUTTON_PORT[BUTTONn] = {USER_BUTTON_GPIO_PORT};
-const uint16_t BUTTON_PIN[BUTTONn] = {USER_BUTTON_PIN};
-const uint8_t  BUTTON_IRQn[BUTTONn] = {USER_BUTTON_EXTI_IRQn };
-
-/**
- * @brief BUS variables
- */
-
-#ifdef HAL_SPI_MODULE_ENABLED
-uint32_t SpixTimeout = NUCLEO_SPIx_TIMEOUT_MAX; /*<! Value of Timeout when SPI communication fails */
-static SPI_HandleTypeDef hnucleo_Spi;
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-#ifdef HAL_ADC_MODULE_ENABLED
-static ADC_HandleTypeDef hnucleo_Adc;
-/* ADC channel configuration structure declaration */
-static ADC_ChannelConfTypeDef sConfig;
-#endif /* HAL_ADC_MODULE_ENABLED */
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0XX_NUCLEO_Private_Functions Private Functions
-  * @{
-  */
-#ifdef HAL_SPI_MODULE_ENABLED
-static void       SPIx_Init(void);
-static void       SPIx_Write(uint8_t Value);
-static void       SPIx_WriteData(uint8_t *DataIn, uint16_t DataLength);
-static void       SPIx_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLegnth);
-static void       SPIx_FlushFifo(void);
-static void       SPIx_Error(void);
-static void       SPIx_MspInit(void);
-
-/* SD IO functions */
-void              SD_IO_Init(void);
-void              SD_IO_CSState(uint8_t state);
-void              SD_IO_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength);
-void              SD_IO_ReadData(uint8_t *DataOut, uint16_t DataLength);
-void              SD_IO_WriteData(const uint8_t *Data, uint16_t DataLength);
-uint8_t           SD_IO_WriteByte(uint8_t Data);
-uint8_t           SD_IO_ReadByte(void);
-
-/* LCD IO functions */
-void              LCD_IO_Init(void);
-void              LCD_IO_WriteData(uint8_t Data);
-void              LCD_IO_WriteMultipleData(uint8_t *pData, uint32_t Size);
-void              LCD_IO_WriteReg(uint8_t LCDReg);
-void              LCD_Delay(uint32_t delay);
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-#ifdef HAL_ADC_MODULE_ENABLED
-static HAL_StatusTypeDef  ADCx_Init(void);
-static void               ADCx_DeInit(void);
-static void               ADCx_MspInit(ADC_HandleTypeDef *hadc);
-static void               ADCx_MspDeInit(ADC_HandleTypeDef *hadc);
-#endif /* HAL_ADC_MODULE_ENABLED */
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0XX_NUCLEO_Exported_Functions Exported Functions
-  * @{
-  */ 
-
-/**
-  * @brief  This method returns the STM32F0XX NUCLEO BSP Driver revision
-  * @retval version : 0xXYZR (8bits for each decimal, R for RC)
-  */
-uint32_t BSP_GetVersion(void)
-{
-  return __STM32F0XX_NUCLEO_BSP_VERSION;
-}
-
-/** @addtogroup STM32F0XX_NUCLEO_LED_Functions
-  * @{
-  */ 
-
-/**
-  * @brief  Configures LED GPIO.
-  * @param  Led Led to be configured. 
-  *         This parameter can be one of the following values:
-  * @arg LED2
-  * @retval None
-  */
-void BSP_LED_Init(Led_TypeDef Led)
-{
-  GPIO_InitTypeDef  gpioinitstruct;
-  
-  /* Enable the GPIO_LED Clock */
-  LEDx_GPIO_CLK_ENABLE(Led);
-
-  /* Configure the GPIO_LED pin */
-  gpioinitstruct.Pin = LED_PIN[Led];
-  gpioinitstruct.Mode = GPIO_MODE_OUTPUT_PP;
-  gpioinitstruct.Pull = GPIO_NOPULL;
-  gpioinitstruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  
-  HAL_GPIO_Init(LED_PORT[Led], &gpioinitstruct);
-}
-
-/**
-  * @brief  DeInit LEDs.
-  * @param  Led LED to be de-init. 
-  *   This parameter can be one of the following values:
-  *     @arg  LED2
-  * @note Led DeInit does not disable the GPIO clock nor disable the Mfx 
-  * @retval None
-  */
-void BSP_LED_DeInit(Led_TypeDef Led)
-{
-  GPIO_InitTypeDef  gpio_init_structure;
-
-  /* Turn off LED */
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET);
-  /* DeInit the GPIO_LED pin */
-  gpio_init_structure.Pin = LED_PIN[Led];
-  HAL_GPIO_DeInit(LED_PORT[Led], gpio_init_structure.Pin);
-}
-
-/**
-  * @brief  Turns selected LED On.
-  * @param  Led Specifies the Led to be set on. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED2
-  * @retval None
-  */
-void BSP_LED_On(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_SET); 
-}
-
-/**
-  * @brief  Turns selected LED Off.
-  * @param  Led Specifies the Led to be set off. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED2
-  * @retval None
-  */
-void BSP_LED_Off(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET); 
-}
-
-/**
-  * @brief  Toggles the selected LED.
-  * @param  Led Specifies the Led to be toggled. 
-  *   This parameter can be one of following parameters:
-  *     @arg LED2
-  * @retval None
-  */
-void BSP_LED_Toggle(Led_TypeDef Led)
-{
-  HAL_GPIO_TogglePin(LED_PORT[Led], LED_PIN[Led]);
-}
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0XX_NUCLEO_BUTTON_Functions BUTTON Functions
-  * @{
-  */ 
-
-/**
-  * @brief  Configures Button GPIO and EXTI Line.
-  * @param  Button Specifies the Button to be configured.
-  *   This parameter should be: BUTTON_USER
-  * @param  ButtonMode Specifies Button mode.
-  *   This parameter can be one of following parameters:   
-  *     @arg BUTTON_MODE_GPIO: Button will be used as simple IO
-  *     @arg BUTTON_MODE_EXTI: Button will be connected to EXTI line with interrupt
-  *                            generation capability  
-  * @retval None
-  */
-void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
-{
-  GPIO_InitTypeDef gpioinitstruct;
-
-  /* Enable the BUTTON Clock */
-  BUTTONx_GPIO_CLK_ENABLE(Button);
-
-  gpioinitstruct.Pin = BUTTON_PIN[Button];
-  gpioinitstruct.Pull = GPIO_NOPULL;
-  gpioinitstruct.Speed = GPIO_SPEED_FREQ_HIGH;
-
-  if(ButtonMode == BUTTON_MODE_GPIO)
-  {
-    /* Configure Button pin as input */
-    gpioinitstruct.Mode = GPIO_MODE_INPUT;
-
-    HAL_GPIO_Init(BUTTON_PORT[Button], &gpioinitstruct);
-  }
-
-  if(ButtonMode == BUTTON_MODE_EXTI)
-  {
-    /* Configure Button pin as input with External interrupt */
-    gpioinitstruct.Mode = GPIO_MODE_IT_FALLING;
-
-    HAL_GPIO_Init(BUTTON_PORT[Button], &gpioinitstruct);
-
-    /* Enable and set Button EXTI Interrupt to the lowest priority */
-    HAL_NVIC_SetPriority((IRQn_Type)(BUTTON_IRQn[Button]), 0x03, 0x00);
-    HAL_NVIC_EnableIRQ((IRQn_Type)(BUTTON_IRQn[Button]));
-  }
-}
-
-/**
-  * @brief  Push Button DeInit.
-  * @param  Button Button to be configured
-  *   This parameter should be: BUTTON_USER
-  * @note PB DeInit does not disable the GPIO clock
-  * @retval None
-  */
-void BSP_PB_DeInit(Button_TypeDef Button)
-{
-  GPIO_InitTypeDef gpio_init_structure;
-
-  gpio_init_structure.Pin = BUTTON_PIN[Button];
-  HAL_NVIC_DisableIRQ((IRQn_Type)(BUTTON_IRQn[Button]));
-  HAL_GPIO_DeInit(BUTTON_PORT[Button], gpio_init_structure.Pin);
-}
-
-/**
-  * @brief  Returns the selected Button state.
-  * @param  Button Specifies the Button to be checked.
-  *   This parameter should be: BUTTON_USER
-  * @retval Button state.
-  */
-uint32_t BSP_PB_GetState(Button_TypeDef Button)
-{
-  return HAL_GPIO_ReadPin(BUTTON_PORT[Button], BUTTON_PIN[Button]);
-}
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/** @addtogroup STM32F0XX_NUCLEO_Private_Functions
-  * @{
-  */ 
-
-#ifdef HAL_SPI_MODULE_ENABLED
-/******************************************************************************
-                            BUS OPERATIONS
-*******************************************************************************/
-/**
-  * @brief  Initialize SPI MSP.
-  * @retval None
-  */
-static void SPIx_MspInit(void)
-{
-  GPIO_InitTypeDef  gpioinitstruct = {0};
-  
-  /*** Configure the GPIOs ***/  
-  /* Enable GPIO clock */
-  NUCLEO_SPIx_SCK_GPIO_CLK_ENABLE();
-  NUCLEO_SPIx_MISO_MOSI_GPIO_CLK_ENABLE();
-
-  /* Configure SPI SCK */
-  gpioinitstruct.Pin = NUCLEO_SPIx_SCK_PIN;
-  gpioinitstruct.Mode = GPIO_MODE_AF_PP;
-  gpioinitstruct.Pull  = GPIO_PULLUP;
-  gpioinitstruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  gpioinitstruct.Alternate = NUCLEO_SPIx_SCK_AF;
-  HAL_GPIO_Init(NUCLEO_SPIx_SCK_GPIO_PORT, &gpioinitstruct);
-
-  /* Configure SPI MISO and MOSI */ 
-  gpioinitstruct.Pin = NUCLEO_SPIx_MOSI_PIN;
-  gpioinitstruct.Alternate = NUCLEO_SPIx_MISO_MOSI_AF;
-  gpioinitstruct.Pull  = GPIO_PULLDOWN;
-  HAL_GPIO_Init(NUCLEO_SPIx_MISO_MOSI_GPIO_PORT, &gpioinitstruct);
-  
-  gpioinitstruct.Pin = NUCLEO_SPIx_MISO_PIN;
-  HAL_GPIO_Init(NUCLEO_SPIx_MISO_MOSI_GPIO_PORT, &gpioinitstruct);
-
-  /*** Configure the SPI peripheral ***/ 
-  /* Enable SPI clock */
-  NUCLEO_SPIx_CLK_ENABLE();
-}
-
-/**
-  * @brief  Initialize SPI HAL.
-  * @retval None
-  */
-static void SPIx_Init(void)
-{
-  if(HAL_SPI_GetState(&hnucleo_Spi) == HAL_SPI_STATE_RESET)
-  {
-    /* SPI Config */
-    hnucleo_Spi.Instance = NUCLEO_SPIx;
-      /* SPI baudrate is set to 12 MHz maximum (PCLK1/SPI_BaudRatePrescaler = 48/4 = 12 MHz) 
-       to verify these constraints:
-          - ST7735 LCD SPI interface max baudrate is 15MHz for write and 6.66MHz for read
-            Since the provided driver doesn't use read capability from LCD, only constraint 
-            on write baudrate is considered.
-          - SD card SPI interface max baudrate is 25MHz for write/read
-          - PCLK1 max frequency is 48 MHz 
-       */ 
-    hnucleo_Spi.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4;
-    hnucleo_Spi.Init.Direction = SPI_DIRECTION_2LINES;
-    hnucleo_Spi.Init.CLKPhase = SPI_PHASE_2EDGE;
-    hnucleo_Spi.Init.CLKPolarity = SPI_POLARITY_HIGH;
-    hnucleo_Spi.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
-    hnucleo_Spi.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE;
-    hnucleo_Spi.Init.CRCPolynomial = 7;
-    hnucleo_Spi.Init.DataSize = SPI_DATASIZE_8BIT;
-    hnucleo_Spi.Init.FirstBit = SPI_FIRSTBIT_MSB;
-    hnucleo_Spi.Init.NSS = SPI_NSS_SOFT;
-    hnucleo_Spi.Init.TIMode = SPI_TIMODE_DISABLE;
-    hnucleo_Spi.Init.NSSPMode = SPI_NSS_PULSE_DISABLE;
-    hnucleo_Spi.Init.Mode = SPI_MODE_MASTER;
-
-    SPIx_MspInit();
-    HAL_SPI_Init(&hnucleo_Spi);
-  }
-}
-
-/**
-  * @brief  SPI Write a byte to device
-  * @param  DataIn value to be written
-  * @param  DataOut read value
-  * @param  DataLength value data length
-  * @retval None
-  */
-static void SPIx_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-
-  status = HAL_SPI_TransmitReceive(&hnucleo_Spi, (uint8_t*) DataIn, DataOut, DataLength, SpixTimeout);
-
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    SPIx_Error();
-  }
-}
-
-/**
-  * @brief  SPI Write an amount of data to device
-  * @param  DataIn value to be written
-  * @param  DataLength number of bytes to write
-  * @retval None
-  */
-static void SPIx_WriteData(uint8_t *DataIn, uint16_t DataLength)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_SPI_Transmit(&hnucleo_Spi, DataIn, DataLength, SpixTimeout);
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    SPIx_Error();
-  }
-}
-
-/**
-  * @brief  SPI Write a byte to device
-  * @param  Value value to be written
-  * @retval None
-  */
-static void SPIx_Write(uint8_t Value)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  uint8_t data;
-
-  status = HAL_SPI_TransmitReceive(&hnucleo_Spi, (uint8_t*) &Value, &data, 1, SpixTimeout);
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    SPIx_Error();
-  }
-}
-
-/**
-  * @brief  SPIx_FlushFifo
-  * @retval None
-  */
-static void SPIx_FlushFifo(void)
-{
-
-  HAL_SPIEx_FlushRxFifo(&hnucleo_Spi);
-}
-
-/**
-  * @brief  SPI error treatment function
-  * @retval None
-  */
-static void SPIx_Error (void)
-{
-  /* De-initialize the SPI communication BUS */
-  HAL_SPI_DeInit(&hnucleo_Spi);
-
-  /* Re-Initiaize the SPI communication BUS */
-  SPIx_Init();
-}
-
-/******************************************************************************
-                            LINK OPERATIONS
-*******************************************************************************/
-
-/********************************* LINK SD ************************************/
-/**
-  * @brief  Initialize the SD Card and put it into StandBy State (Ready for 
-  *         data transfer).
-  * @retval None
-  */
-void SD_IO_Init(void)
-{
-  GPIO_InitTypeDef  gpioinitstruct = {0};
-  uint8_t counter = 0;
-
-  /* SD_CS_GPIO Periph clock enable */
-  SD_CS_GPIO_CLK_ENABLE();
-
-  /* Configure SD_CS_PIN pin: SD Card CS pin */
-  gpioinitstruct.Pin = SD_CS_PIN;
-  gpioinitstruct.Mode = GPIO_MODE_OUTPUT_PP;
-  gpioinitstruct.Pull = GPIO_PULLUP;
-  gpioinitstruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  HAL_GPIO_Init(SD_CS_GPIO_PORT, &gpioinitstruct);
-
-  /* Configure LCD_CS_PIN pin: LCD Card CS pin */
-  gpioinitstruct.Pin   = LCD_CS_PIN;
-  gpioinitstruct.Mode  = GPIO_MODE_OUTPUT_PP;
-  gpioinitstruct.Pull  = GPIO_NOPULL;
-  gpioinitstruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  HAL_GPIO_Init(SD_CS_GPIO_PORT, &gpioinitstruct);
-  LCD_CS_HIGH();
-
-  /*------------Put SD in SPI mode--------------*/
-  /* SD SPI Config */
-  SPIx_Init();
-
-  /* SD chip select high */
-  SD_CS_HIGH();
-  
-  /* Send dummy byte 0xFF, 10 times with CS high */
-  /* Rise CS and MOSI for 80 clocks cycles */
-  for (counter = 0; counter <= 9; counter++)
-  {
-    /* Send dummy byte 0xFF */
-    SD_IO_WriteByte(SD_DUMMY_BYTE);
-  }
-}
-
-/**
-  * @brief  Set the SD_CS pin.
-  * @param  val pin value.
-  * @retval None
-  */
-void SD_IO_CSState(uint8_t val)
-{
-  if(val == 1) 
-  {
-    SD_CS_HIGH();
-  }
-  else
-  {
-    SD_CS_LOW();
-  }
-}
-
-/**
-  * @brief  Write byte(s) on the SD
-  * @param  DataIn Pointer to data buffer to write
-  * @param  DataOut Pointer to data buffer for read data
-  * @param  DataLength number of bytes to write
-  * @retval None
-  */
-void SD_IO_WriteReadData(const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength)
-{
-  /* Send the byte */
-  SPIx_WriteReadData(DataIn, DataOut, DataLength);
-}
-
-/**
-  * @brief  Write a byte on the SD.
-  * @param  Data byte to send.
-  * @retval Data written
-  */
-uint8_t SD_IO_WriteByte(uint8_t Data)
-{
-  uint8_t tmp;
-
-  /* Send the byte */
-  SPIx_WriteReadData(&Data,&tmp,1);
-  return tmp;
-}
-
-/**
-  * @brief  Write an amount of data on the SD.
-  * @param  DataOut byte to send.
-  * @param  DataLength number of bytes to write
-  * @retval none
-  */
-void SD_IO_ReadData(uint8_t *DataOut, uint16_t DataLength)
-{
-  /* Send the byte */
-  SD_IO_WriteReadData(DataOut, DataOut, DataLength);
-}
-
-/**
-  * @brief  Write an amount of data on the SD.
-  * @param  Data byte to send.
-  * @param  DataLength number of bytes to write
-  * @retval none
-  */
-void SD_IO_WriteData(const uint8_t *Data, uint16_t DataLength)
-{
-  /* Send the byte */
-  SPIx_WriteData((uint8_t *)Data, DataLength);
-  SPIx_FlushFifo();
-}
-
-/********************************* LINK LCD ***********************************/
-/**
-  * @brief  Initialize the LCD
-  * @retval None
-  */
-void LCD_IO_Init(void)
-{
-  GPIO_InitTypeDef  gpioinitstruct;
-
-  /* LCD_CS_GPIO and LCD_DC_GPIO Periph clock enable */
-  LCD_CS_GPIO_CLK_ENABLE();
-  LCD_DC_GPIO_CLK_ENABLE();
-  
-  /* Configure LCD_CS_PIN pin: LCD Card CS pin */
-  gpioinitstruct.Pin    = LCD_CS_PIN;
-  gpioinitstruct.Mode   = GPIO_MODE_OUTPUT_PP;
-  gpioinitstruct.Pull   = GPIO_NOPULL;
-  gpioinitstruct.Speed  = GPIO_SPEED_FREQ_HIGH;
-  HAL_GPIO_Init(SD_CS_GPIO_PORT, &gpioinitstruct);
-
-  /* Configure LCD_DC_PIN pin: LCD Card DC pin */
-  gpioinitstruct.Pin    = LCD_DC_PIN;
-  HAL_GPIO_Init(LCD_DC_GPIO_PORT, &gpioinitstruct);
-
-  /* LCD chip select high */
-  LCD_CS_HIGH();
-  
-  /* LCD SPI Config */
-  SPIx_Init();
-}
-
-/**
-  * @brief  Write command to select the LCD register.
-  * @param  LCDReg Address of the selected register.
-  * @retval None
-  */
-void LCD_IO_WriteReg(uint8_t LCDReg)
-{
-  /* Reset LCD control line CS */
-  LCD_CS_LOW();
-  
-  /* Set LCD data/command line DC to Low */
-  LCD_DC_LOW();
-    
-  /* Send Command */
-  SPIx_Write(LCDReg);
-  
-  /* Deselect : Chip Select high */
-  LCD_CS_HIGH();
-}
-
-/**
-* @brief  Write register value.
-* @param  pData Pointer on the register value
-* @param  Size Size of byte to transmit to the register
-* @retval None
-*/
-void LCD_IO_WriteMultipleData(uint8_t *pData, uint32_t Size)
-{
-  uint32_t counter = 0;
-  
-  /* Reset LCD control line CS */
-  LCD_CS_LOW();
-  
-  /* Set LCD data/command line DC to High */
-  LCD_DC_HIGH();
-
-  if (Size == 1)
-  {
-    /* Only 1 byte to be sent to LCD - general interface can be used */
-    /* Send Data */
-    SPIx_Write(*pData);
-  }
-  else
-  {
-    /* Several data should be sent in a raw */
-    /* Direct SPI accesses for optimization */
-    for (counter = Size; counter != 0; counter--)
-    {
-      while(((hnucleo_Spi.Instance->SR) & SPI_FLAG_TXE) != SPI_FLAG_TXE)
-      {
-      }
-      /* Need to invert bytes for LCD*/
-      *((__IO uint8_t*)&hnucleo_Spi.Instance->DR) = *(pData+1);
-      
-      while(((hnucleo_Spi.Instance->SR) & SPI_FLAG_TXE) != SPI_FLAG_TXE)
-      {
-      }
-      *((__IO uint8_t*)&hnucleo_Spi.Instance->DR) = *pData;
-      counter--;
-      pData += 2;
-    }
-  
-    /* Wait until the bus is ready before releasing Chip select */ 
-    while(((hnucleo_Spi.Instance->SR) & SPI_FLAG_BSY) != RESET)
-    {
-    } 
-  } 
-
-  /* Empty the Rx fifo */
-  SPIx_FlushFifo();
-  
-  /* Deselect : Chip Select high */
-  LCD_CS_HIGH();
-}
-
-/**
-  * @brief  Wait for loop in ms.
-  * @param  Delay in ms.
-  * @retval None
-  */
-void LCD_Delay(uint32_t Delay)
-{
-  HAL_Delay(Delay);
-}
-
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-#ifdef HAL_ADC_MODULE_ENABLED
-/******************************* LINK JOYSTICK ********************************/
-/**
-  * @brief  Initialize ADC MSP.
-  * @retval None
-  */
-static void ADCx_MspInit(ADC_HandleTypeDef *hadc)
-{
-  GPIO_InitTypeDef  gpioinitstruct;
-  
-  /*** Configure the GPIOs ***/  
-  /* Enable GPIO clock */
-  NUCLEO_ADCx_GPIO_CLK_ENABLE();
-  
-  /* Configure ADC1 Channel8 as analog input */
-  gpioinitstruct.Pin = NUCLEO_ADCx_GPIO_PIN ;
-  gpioinitstruct.Mode = GPIO_MODE_ANALOG;
-  HAL_GPIO_Init(NUCLEO_ADCx_GPIO_PORT, &gpioinitstruct);
-
-  /*** Configure the ADC peripheral ***/ 
-  /* Enable ADC clock */
-  NUCLEO_ADCx_CLK_ENABLE();
-}
-
-/**
-  * @brief  DeInitializes ADC MSP.
-  * @note ADC DeInit does not disable the GPIO clock
-  * @retval None
-  */
-static void ADCx_MspDeInit(ADC_HandleTypeDef *hadc)
-{
-  GPIO_InitTypeDef  gpioinitstruct;
-
-  /*** DeInit the ADC peripheral ***/ 
-  /* Disable ADC clock */
-  NUCLEO_ADCx_CLK_DISABLE(); 
-
-  /* Configure the selected ADC Channel as analog input */
-  gpioinitstruct.Pin = NUCLEO_ADCx_GPIO_PIN ;
-  HAL_GPIO_DeInit(NUCLEO_ADCx_GPIO_PORT, gpioinitstruct.Pin);
-
-  /* Disable GPIO clock has to be done by the application*/
-  /* NUCLEO_ADCx_GPIO_CLK_DISABLE(); */
-}
-
-/**
-  * @brief  Initializes ADC HAL.
-  * @retval None
-  */
-static HAL_StatusTypeDef ADCx_Init(void)
-{
-  /* Set ADC instance */
-  hnucleo_Adc.Instance                   = NUCLEO_ADCx;
-  
-  if(HAL_ADC_GetState(&hnucleo_Adc) == HAL_ADC_STATE_RESET)
-  {
-    /* ADC Config */
-    hnucleo_Adc.Init.ClockPrescaler        = ADC_CLOCK_SYNC_PCLK_DIV4;      /* ADC clock of STM32F0 must not exceed 14MHz */
-    hnucleo_Adc.Init.Resolution            = ADC_RESOLUTION_12B;
-    hnucleo_Adc.Init.DataAlign             = ADC_DATAALIGN_RIGHT;
-    hnucleo_Adc.Init.ScanConvMode          = ADC_SCAN_DIRECTION_FORWARD;    /* Sequencer will convert the number of channels configured below, successively from the lowest to the highest channel number */
-    hnucleo_Adc.Init.EOCSelection          = ADC_EOC_SINGLE_CONV;
-    hnucleo_Adc.Init.LowPowerAutoWait      = DISABLE;
-    hnucleo_Adc.Init.LowPowerAutoPowerOff  = DISABLE;
-    hnucleo_Adc.Init.ContinuousConvMode    = DISABLE;                       /* Continuous mode disabled to have only 1 conversion at each conversion trig */
-    hnucleo_Adc.Init.DiscontinuousConvMode = DISABLE;                       /* Parameter discarded because sequencer is disabled */
-    hnucleo_Adc.Init.ExternalTrigConv      = ADC_SOFTWARE_START;            /* Software start to trig the 1st conversion manually, without external event */
-    hnucleo_Adc.Init.ExternalTrigConvEdge  = ADC_EXTERNALTRIGCONVEDGE_NONE; /* Parameter discarded because trig by software start */
-    hnucleo_Adc.Init.DMAContinuousRequests = DISABLE;
-    hnucleo_Adc.Init.Overrun               = ADC_OVR_DATA_OVERWRITTEN;
-    hnucleo_Adc.Init.SamplingTimeCommon    = ADC_SAMPLETIME_41CYCLES_5;
-    
-    /* Initialize MSP related to ADC */
-    ADCx_MspInit(&hnucleo_Adc);
-    
-    /* Initialize ADC */
-    if (HAL_ADC_Init(&hnucleo_Adc) != HAL_OK)
-    {
-      return HAL_ERROR;
-    }
-
-    /* Run ADC calibration */
-    if (HAL_ADCEx_Calibration_Start(&hnucleo_Adc) != HAL_OK)
-    {
-      return HAL_ERROR;
-    }
-  }
-  
-  return HAL_OK;
-}
-
-/**
-  * @brief  Initializes ADC HAL.
-  * @retval None
-  */
-static void ADCx_DeInit(void)
-{
-    hnucleo_Adc.Instance   = NUCLEO_ADCx;
-    
-    HAL_ADC_DeInit(&hnucleo_Adc);
-    ADCx_MspDeInit(&hnucleo_Adc);
-}
-
-/******************************* LINK JOYSTICK ********************************/
-
-/**
-  * @brief  Configures joystick available on adafruit 1.8" TFT shield 
-  *         managed through ADC to detect motion.
-  * @retval Joystickstatus (0=> success, 1=> fail) 
-  */
-uint8_t BSP_JOY_Init(void)
-{
-  if (ADCx_Init() != HAL_OK)
-  {
-    return (uint8_t) HAL_ERROR; 
-  }
-  
-  /* Select Channel 8 to be converted */
-  sConfig.Channel = ADC_CHANNEL_8;
-  sConfig.Rank    = ADC_RANK_CHANNEL_NUMBER;
-
-  /* Return Joystick initialization status */
-  return (uint8_t)HAL_ADC_ConfigChannel(&hnucleo_Adc, &sConfig);
-}
-
-/**
-  * @brief  DeInit joystick GPIOs.
-  * @note   JOY DeInit does not disable the Mfx, just set the Mfx pins in Off mode
-  * @retval None.
-  */
-void BSP_JOY_DeInit(void)
-{
-    ADCx_DeInit();
-}
-
-/**
-  * @brief  Returns the Joystick key pressed.
-  * @note   To know which Joystick key is pressed we need to detect the voltage
-  *         level on each key output
-  *           - None  : 3.3 V / 4095
-  *           - SEL   : 1.055 V / 1308
-  *           - DOWN  : 0.71 V / 88
-  *           - LEFT  : 3.0 V / 3720 
-  *           - RIGHT : 0.595 V / 737
-  *           - UP    : 1.65 V / 2046
-  * @retval JOYState_TypeDef: Code of the Joystick key pressed.
-  */
-JOYState_TypeDef BSP_JOY_GetState(void)
-{
-  JOYState_TypeDef state;
-  uint16_t  KeyConvertedValue = 0;
-  
- /* Start the conversion process */
-  HAL_ADC_Start(&hnucleo_Adc);
-  
-  /* Wait for the end of conversion */
-  if (HAL_ADC_PollForConversion(&hnucleo_Adc, 10) != HAL_TIMEOUT)
-  {
-    /* Get the converted value of regular channel */
-    KeyConvertedValue = HAL_ADC_GetValue(&hnucleo_Adc);
-  }
-  
-  if((KeyConvertedValue > 2010) && (KeyConvertedValue < 2090))
-  {
-    state = JOY_UP;
-  }
-  else if((KeyConvertedValue > 680) && (KeyConvertedValue < 780))
-  {
-    state = JOY_RIGHT;
-  }
-  else if((KeyConvertedValue > 1270) && (KeyConvertedValue < 1350))
-  {
-    state = JOY_SEL;
-  }
-  else if((KeyConvertedValue > 50) && (KeyConvertedValue < 130))
-  {
-    state = JOY_DOWN;
-  }
-  else if((KeyConvertedValue > 3680) && (KeyConvertedValue < 3760))
-  {
-    state = JOY_LEFT;
-  }
-  else
-  {
-    state = JOY_NONE;
-  }
-  
-  /* Return the code of the Joystick key pressed */
-  return state;
-}
-#endif /* HAL_ADC_MODULE_ENABLED */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */    
-
-/**
-  * @}
-  */ 
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 292
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx-Nucleo/stm32f0xx_nucleo.h

@@ -1,292 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f0xx_nucleo.h
-  * @author  MCD Application Team
-  * @brief   This file contains definitions for:
-  *          - LEDs and push-button available on STM32F0XX-Nucleo Kit 
-  *            from STMicroelectronics
-  *          - LCD, joystick and microSD available on Adafruit 1.8" TFT LCD 
-  *            shield (reference ID 802)
-  ******************************************************************************
-  * @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 __STM32F0XX_NUCLEO_H
-#define __STM32F0XX_NUCLEO_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @defgroup STM32F0XX_NUCLEO STM32F0XX-NUCLEO
-  * @{
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f0xx_hal.h"
-   
-
-/** @defgroup STM32F0XX_NUCLEO_Exported_Types Exported Types
-  * @{
-  */ 
-typedef enum 
-{
-  LED2 = 0,
-  LED_GREEN = LED2
-} Led_TypeDef;
-
-typedef enum 
-{  
-  BUTTON_USER = 0,
-  /* Alias */
-  BUTTON_KEY  = BUTTON_USER
-} Button_TypeDef;
-
-typedef enum 
-{  
-  BUTTON_MODE_GPIO = 0,
-  BUTTON_MODE_EXTI = 1
-} ButtonMode_TypeDef; 
-
-typedef enum 
-{ 
-  JOY_NONE  = 0,
-  JOY_SEL   = 1,
-  JOY_DOWN  = 2,
-  JOY_LEFT  = 3,
-  JOY_RIGHT = 4,
-  JOY_UP    = 5
-} JOYState_TypeDef;
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0XX_NUCLEO_Exported_Constants Exported Constants
-  * @{
-  */ 
-
-/** 
-* @brief	Define for STM32F0XX_NUCLEO board  
-  */ 
-#if !defined (USE_STM32F0XX_NUCLEO)
- #define USE_STM32F0XX_NUCLEO
-#endif
-
-/** @defgroup STM32F0XX_NUCLEO_LED LED Constants
-  * @{
-  */
-#define LEDn                               1
-
-#define LED2_PIN                           GPIO_PIN_5
-#define LED2_GPIO_PORT                     GPIOA
-#define LED2_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOA_CLK_ENABLE()  
-#define LED2_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOA_CLK_DISABLE()
-  
-#define LEDx_GPIO_CLK_ENABLE(__INDEX__)   do { if((__INDEX__) == 0) LED2_GPIO_CLK_ENABLE();} while(0)
-#define LEDx_GPIO_CLK_DISABLE(__INDEX__)  (((__INDEX__) == 0) ? LED2_GPIO_CLK_DISABLE() : 0)
-
-/**
-  * @}
-  */ 
-  
-/** @defgroup STM32F0XX_NUCLEO_BUTTON BUTTON Constants
-  * @{
-  */  
-#define BUTTONn                            1
-
-/**
-  * @brief User push-button
-  */
-#define USER_BUTTON_PIN                         GPIO_PIN_13
-#define USER_BUTTON_GPIO_PORT                   GPIOC
-#define USER_BUTTON_GPIO_CLK_ENABLE()         __HAL_RCC_GPIOC_CLK_ENABLE()   
-#define USER_BUTTON_GPIO_CLK_DISABLE()        __HAL_RCC_GPIOC_CLK_DISABLE()  
-#define USER_BUTTON_EXTI_LINE                   GPIO_PIN_13
-#define USER_BUTTON_EXTI_IRQn                   EXTI4_15_IRQn
-/* Aliases */
-#define KEY_BUTTON_PIN                        USER_BUTTON_PIN
-#define KEY_BUTTON_GPIO_PORT                  USER_BUTTON_GPIO_PORT
-#define KEY_BUTTON_GPIO_CLK_ENABLE()          USER_BUTTON_GPIO_CLK_ENABLE()
-#define KEY_BUTTON_GPIO_CLK_DISABLE()         USER_BUTTON_GPIO_CLK_DISABLE()
-#define KEY_BUTTON_EXTI_LINE                  USER_BUTTON_EXTI_LINE
-#define KEY_BUTTON_EXTI_IRQn                  USER_BUTTON_EXTI_IRQn
-
-#define BUTTONx_GPIO_CLK_ENABLE(__INDEX__)    do { if((__INDEX__) == 0) USER_BUTTON_GPIO_CLK_ENABLE();} while(0)
-#define BUTTONx_GPIO_CLK_DISABLE(__INDEX__)   (((__INDEX__) == 0) ? USER_BUTTON_GPIO_CLK_DISABLE() : 0)
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0XX_NUCLEO_BUS BUS Constants
-  * @{
-  */ 
-/*###################### SPI1 ###################################*/
-#define NUCLEO_SPIx                                 SPI1
-#define NUCLEO_SPIx_CLK_ENABLE()                  __HAL_RCC_SPI1_CLK_ENABLE()
-
-#define NUCLEO_SPIx_SCK_AF                          GPIO_AF0_SPI1
-#define NUCLEO_SPIx_SCK_GPIO_PORT                   GPIOA
-#define NUCLEO_SPIx_SCK_PIN                         GPIO_PIN_5
-#define NUCLEO_SPIx_SCK_GPIO_CLK_ENABLE()         __HAL_RCC_GPIOA_CLK_ENABLE()
-#define NUCLEO_SPIx_SCK_GPIO_CLK_DISABLE()        __HAL_RCC_GPIOA_CLK_DISABLE()
-
-#define NUCLEO_SPIx_MISO_MOSI_AF                    GPIO_AF0_SPI1
-#define NUCLEO_SPIx_MISO_MOSI_GPIO_PORT             GPIOA
-#define NUCLEO_SPIx_MISO_MOSI_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOA_CLK_ENABLE()
-#define NUCLEO_SPIx_MISO_MOSI_GPIO_CLK_DISABLE()  __HAL_RCC_GPIOA_CLK_DISABLE()
-#define NUCLEO_SPIx_MISO_PIN                        GPIO_PIN_6
-#define NUCLEO_SPIx_MOSI_PIN                        GPIO_PIN_7
-/* Maximum Timeout values for flags waiting loops. These timeouts are not based
-   on accurate values, they just guarantee that the application will not remain
-   stuck if the SPI communication is corrupted.
-   You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
-#define NUCLEO_SPIx_TIMEOUT_MAX                   1000
-
-
-/**
-  * @brief  SD Control Lines management
-  */
-#define SD_CS_LOW()       HAL_GPIO_WritePin(SD_CS_GPIO_PORT, SD_CS_PIN, GPIO_PIN_RESET)
-#define SD_CS_HIGH()      HAL_GPIO_WritePin(SD_CS_GPIO_PORT, SD_CS_PIN, GPIO_PIN_SET)
-
-/**
-  * @brief  LCD Control Lines management
-  */
-#define LCD_CS_LOW()      HAL_GPIO_WritePin(LCD_CS_GPIO_PORT, LCD_CS_PIN, GPIO_PIN_RESET)
-#define LCD_CS_HIGH()     HAL_GPIO_WritePin(LCD_CS_GPIO_PORT, LCD_CS_PIN, GPIO_PIN_SET)
-#define LCD_DC_LOW()      HAL_GPIO_WritePin(LCD_DC_GPIO_PORT, LCD_DC_PIN, GPIO_PIN_RESET)
-#define LCD_DC_HIGH()     HAL_GPIO_WritePin(LCD_DC_GPIO_PORT, LCD_DC_PIN, GPIO_PIN_SET)
-     
-/**
-  * @brief  SD Control Interface pins (shield D4)
-  */
-#define SD_CS_PIN                                 GPIO_PIN_5
-#define SD_CS_GPIO_PORT                           GPIOB
-#define SD_CS_GPIO_CLK_ENABLE()                 __HAL_RCC_GPIOB_CLK_ENABLE()
-#define SD_CS_GPIO_CLK_DISABLE()                __HAL_RCC_GPIOB_CLK_DISABLE()
-
-/**
-  * @brief  LCD Control Interface pins (shield D10)
-  */
-#define LCD_CS_PIN                                 GPIO_PIN_6
-#define LCD_CS_GPIO_PORT                           GPIOB
-#define LCD_CS_GPIO_CLK_ENABLE()                 __HAL_RCC_GPIOB_CLK_ENABLE()
-#define LCD_CS_GPIO_CLK_DISABLE()                __HAL_RCC_GPIOB_CLK_DISABLE()
-    
-/**
-  * @brief  LCD Data/Command Interface pins
-  */
-#define LCD_DC_PIN                                 GPIO_PIN_9
-#define LCD_DC_GPIO_PORT                           GPIOA
-#define LCD_DC_GPIO_CLK_ENABLE()                 __HAL_RCC_GPIOA_CLK_ENABLE()
-#define LCD_DC_GPIO_CLK_DISABLE()                __HAL_RCC_GPIOA_CLK_DISABLE()
-
-/*##################### ADC1 ###################################*/
-/**
-  * @brief  ADC Interface pins
-  *         used to detect motion of Joystick available on Adafruit 1.8" TFT shield
-  */
-#define NUCLEO_ADCx                                 ADC1
-#define NUCLEO_ADCx_CLK_ENABLE()                  __HAL_RCC_ADC1_CLK_ENABLE()
-#define NUCLEO_ADCx_CLK_DISABLE()                 __HAL_RCC_ADC1_CLK_DISABLE()
-
-#define NUCLEO_ADCx_GPIO_PORT                       GPIOB
-#define NUCLEO_ADCx_GPIO_PIN                        GPIO_PIN_0
-#define NUCLEO_ADCx_GPIO_CLK_ENABLE()             __HAL_RCC_GPIOB_CLK_ENABLE()
-#define NUCLEO_ADCx_GPIO_CLK_DISABLE()            __HAL_RCC_GPIOB_CLK_DISABLE()
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/** @defgroup STM32F0XX_NUCLEO_Exported_Functions Exported Functions
-  * @{
-  */
-uint32_t  BSP_GetVersion(void);
-/** @defgroup STM32F0XX_NUCLEO_LED_Functions  LED Functions
-  * @{
-  */ 
-void      BSP_LED_Init(Led_TypeDef Led);
-void      BSP_LED_DeInit(Led_TypeDef Led);
-void      BSP_LED_On(Led_TypeDef Led);
-void      BSP_LED_Off(Led_TypeDef Led);
-void      BSP_LED_Toggle(Led_TypeDef Led);
-/**
-  * @}
-  */ 
-
-/** @addtogroup STM32F0XX_NUCLEO_BUTTON_Functions
-  * @{
-  */                
-void      BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode);
-void      BSP_PB_DeInit(Button_TypeDef Button);
-uint32_t  BSP_PB_GetState(Button_TypeDef Button);
-#if defined(HAL_ADC_MODULE_ENABLED)
-uint8_t          BSP_JOY_Init(void);
-JOYState_TypeDef BSP_JOY_GetState(void);
-void             BSP_JOY_DeInit(void);
-#endif /* HAL_ADC_MODULE_ENABLED */
-
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32F0XX_NUCLEO_H */
-
-    
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
-

+ 0 - 182
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx_Nucleo_32/Release_Notes.html

@@ -1,182 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-
-
-
-
-
-
-
-
-
-  
-  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
-  
-  <link rel="File-List" href="Library_files/filelist.xml">
-
-  
-  <link rel="Edit-Time-Data" href="Library_files/editdata.mso"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><title>Release Notes for STM32F0xx_Nucleo_32 Board Drivers</title><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>STMicroelectronics</o:Author> <o:LastAuthor>STMicroelectronics</o:LastAuthor> <o:Revision>37</o:Revision> <o:TotalTime>136</o:TotalTime> <o:Created>2009-02-27T19:26:00Z</o:Created> <o:LastSaved>2009-03-01T17:56:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>522</o:Words> <o:Characters>2977</o:Characters> <o:Company>STMicroelectronics</o:Company> <o:Lines>24</o:Lines> <o:Paragraphs>6</o:Paragraphs> <o:CharactersWithSpaces>3493</o:CharactersWithSpaces> <o:Version>11.6568</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>110</w:Zoom> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]-->
-
-
-  
-
-  
-
-  
-  <style>
-<!--
-/* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-{mso-style-parent:"";
-margin:0in;
-margin-bottom:.0001pt;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-h2
-{mso-style-next:Normal;
-margin-top:12.0pt;
-margin-right:0in;
-margin-bottom:3.0pt;
-margin-left:0in;
-mso-pagination:widow-orphan;
-page-break-after:avoid;
-mso-outline-level:2;
-font-size:14.0pt;
-font-family:Arial;
-font-weight:bold;
-font-style:italic;}
-a:link, span.MsoHyperlink
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-{color:blue;
-text-decoration:underline;
-text-underline:single;}
-p
-{mso-margin-top-alt:auto;
-margin-right:0in;
-mso-margin-bottom-alt:auto;
-margin-left:0in;
-mso-pagination:widow-orphan;
-font-size:12.0pt;
-font-family:"Times New Roman";
-mso-fareast-font-family:"Times New Roman";}
-@page Section1
-{size:8.5in 11.0in;
-margin:1.0in 1.25in 1.0in 1.25in;
-mso-header-margin:.5in;
-mso-footer-margin:.5in;
-mso-paper-source:0;}
-div.Section1
-{page:Section1;}
--->
-  </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="5122"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
-  <meta content="MCD Application Team" name="author"></head>
-<body link="blue" vlink="blue">
-<div class="Section1">
-<p class="MsoNormal"><span style="font-family: Arial;"><o:p><br>
-</o:p></span></p>
-<div align="center">
-<table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-  <tbody>
-    <tr>
-      <td style="padding: 0cm;" valign="top">
-      <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" cellspacing="0" width="900">
-        <tbody>
-          <tr>
-            <td style="vertical-align: top;">
-            <p class="MsoNormal"><span style="font-size: 8pt; font-family: Arial; color: blue;"><a href="../../../Release_Notes.html">Back to Release page</a><o:p></o:p></span></p>
-            </td>
-          </tr>
-          <tr style="">
-            <td style="padding: 1.5pt;">
-            <h1 style="margin-bottom: 18pt; text-align: center;" align="center"><span style="font-size: 20pt; font-family: Verdana; color: rgb(51, 102, 255);">Release
-Notes for STM32F0xx_Nucleo_32&nbsp; Board Drivers</span><span style="font-size: 20pt; font-family: Verdana;"><o:p></o:p></span></h1>
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;">Copyright
-2016 STMicroelectronics</span><span style="color: black;"><u1:p></u1:p><o:p></o:p></span></p>
-            <p class="MsoNormal" style="text-align: center;" align="center"><span style="font-size: 10pt; font-family: Arial; color: black;"><img alt="" id="_x0000_i1025" src="../../../_htmresc/st_logo.png" style="border: 0px solid ; width: 86px; height: 65px;"></span><span style="font-size: 10pt;"><o:p></o:p></span></p>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-family: Arial; display: none;"><o:p>&nbsp;</o:p></span></p>
-      <table class="MsoNormalTable" style="width: 675pt;" border="0" cellpadding="0" width="900">
-        <tbody>
-          <tr style="">
-            <td style="padding: 0cm;" valign="top">
-            <span style="font-family: &quot;Times New Roman&quot;;">
-            </span>
-            <h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="History"></a><span style="font-size: 12pt; color: white;">Update History</span></h2><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.4 / 25-August-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-family: Verdana,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13.33px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline ! important; white-space: normal; widows: 1;">Minor updates in STM32F0xx_Nucleo_32_BSP_User_Manual.chm documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.3 /&nbsp;7-April-2017</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Updated BSP driver documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.2 / 27-May-2016</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="color: rgb(0, 0, 0); font-family: Verdana,sans-serif; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; display: inline ! important; float: none;">Updated BSP driver documentation</span><span style="font-size: 10pt; font-family: Verdana;">.</span></li></ul><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.1 / 29-January-2016</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">Updated GPIO Output Speed literals naming to ensure HAL full compatibility.</span></li><li class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">Modified GPIO_LED configuration to NOPULL (to improve power consumption).</span></li></ul><span style="font-size: 10pt; font-family: Verdana;"><span style="font-weight: bold; font-style: italic;"></span></span><h3 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; margin-right: 500pt; width: 200px;"><span style="font-size: 10pt; font-family: Arial; color: white;">V1.0.0 / 11-September-2015</span></h3><p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt;"><b style=""><u><span style="font-size: 10pt; font-family: Verdana; color: black;">Main
-Changes<o:p></o:p></span></u></b></p>
-
-            
-
-            <ul style="margin-top: 0cm;" type="square"><li class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">First&nbsp;Release<span style="font-weight: bold; font-style: italic;"> </span></span><span style="font-size: 10pt; font-family: Verdana;">for&nbsp;<span style="font-weight: bold; font-style: italic;">STM32F0xx_Nucleo_32</span> BSP. This BSP support STM32F042K6 Nucleo board and STM32F031K6 Nucleo board.<br>In particular, this BSP controls the unique LED available on the Nucleo32 Board.&nbsp;</span></li><li class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">The
-support of the Gravitech 7 segment display shield is provided as
-example in this BSP. It permits to initialise the I2C communication
-with the shield and propose an interface to display a 4 digits number
-on it.<br></span></li></ul><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"><span style="font-style: italic; font-weight: bold;"></span></span><span style="font-size: 10pt; font-family: Verdana;"></span><h2 style="background: rgb(51, 102, 255) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"><a name="License"></a><span style="font-size: 12pt; color: white;">License<o:p></o:p></span></h2>
-            <div style="text-align: justify;">
-            <div style="text-align: justify;"><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistribution
-and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</span><br>
-</font>
-<ol><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-of source code must retain the above copyright notice, this list of
-conditions and the following disclaimer.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Redistributions
-in binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">the
-documentation and/or other materials provided with the distribution.</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font></li><li><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Neither the
-name of STMicroelectronics nor the names of its contributors may be
-used to endorse or promote products derived</span></font><small><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> from this software without specific prior written permission.</span></small><br></li></ol><font size="-1">
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span><br>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR </span><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></font><font size="-1"><span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></font>
-            
-            </div>
-<span style="font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></div>
-<span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; color: black;"></span> <b><span style="font-size: 10pt; font-family: Verdana; color: black;"></span></b>
-            
-            <div class="MsoNormal" style="text-align: center;" align="center"><span style="color: black;">
-            <hr align="center" size="2" width="100%"></span></div>
-            <p class="MsoNormal" style="margin: 4.5pt 0cm 4.5pt 18pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: Verdana; color: black;">For
-complete documentation on </span><span style="font-size: 10pt; font-family: Verdana;">STM32<span style="color: black;">&nbsp;Microcontrollers
-visit </span><u><span style="color: blue;"><a href="http://www.st.com/internet/mcu/class/1734.jsp" target="_blank">www.st.com/STM32</a></span></u></span><span style="font-size: 10pt; font-family: Verdana;"><a target="_blank" href="http://www.st.com/internet/mcu/family/141.jsp"><u><span style="color: blue;"></span></u></a></span><span style="font-size: 10pt; font-family: Verdana;"><u><span style="color: blue;"></span></u></span><span style="color: black;"><o:p></o:p></span></p>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <p class="MsoNormal"><span style="font-size: 10pt;"><o:p></o:p></span></p>
-      </td>
-    </tr>
-  </tbody>
-</table>
-</div>
-<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
-</div>
-
-</body></html>

+ 0 - 461
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx_Nucleo_32/stm32f0xx_nucleo_32.c

@@ -1,461 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f0xx_nucleo_32.c
-  * @author  MCD Application Team
-  * @brief   This file provides set of firmware functions to manage:
-  *          - LED available on STM32F0XX-Nucleo Kit 
-  *            from STMicroelectronics.
-  *          - Gravitech 7segment shield available separatly.
-  ******************************************************************************
-  * @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.
-  *
-  ******************************************************************************
-  */ 
-  
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f0xx_nucleo_32.h"
-    
-/** @addtogroup BSP
-  * @{
-  */ 
-  
-/** @addtogroup STM32F0XX_NUCLEO_32 NUCLEO 32
-  * @{
-  */
-  
-/** @defgroup STM32F0XX_NUCLEO_32_Private_Constants Private Constants
-  * @{
-  */ 
-  
-/**
-  * @brief STM32F0XX NUCLEO BSP Driver version number V1.0.4
-  */
-#define __STM32F0XX_NUCLEO_32_BSP_VERSION_MAIN   (0x01) /*!< [31:24] main version */
-#define __STM32F0XX_NUCLEO_32_BSP_VERSION_SUB1   (0x00) /*!< [23:16] sub1 version */
-#define __STM32F0XX_NUCLEO_32_BSP_VERSION_SUB2   (0x04) /*!< [15:8]  sub2 version */
-#define __STM32F0XX_NUCLEO_32_BSP_VERSION_RC     (0x00) /*!< [7:0]  release candidate */
-#define __STM32F0XX_NUCLEO_32_BSP_VERSION         ((__STM32F0XX_NUCLEO_32_BSP_VERSION_MAIN << 24)\
-                                             |(__STM32F0XX_NUCLEO_32_BSP_VERSION_SUB1 << 16)\
-                                             |(__STM32F0XX_NUCLEO_32_BSP_VERSION_SUB2 << 8 )\
-                                             |(__STM32F0XX_NUCLEO_32_BSP_VERSION_RC))
-
-/** @defgroup STM32F0XX_NUCLEO_32_Private_Variables Private Variables
-  * @{
-  */ 
-GPIO_TypeDef* LED_PORT[LEDn] = {LED3_GPIO_PORT};
-const uint16_t LED_PIN[LEDn] = {LED3_PIN};
-                                
-
-/**
- * @brief BUS variables
- */
-#if defined(HAL_I2C_MODULE_ENABLED)
-uint32_t I2c1Timeout = BSP_I2C1_TIMEOUT_MAX;    /*<! Value of Timeout when I2C1 communication fails */
-I2C_HandleTypeDef nucleo32_I2c1;
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0XX_NUCLEO_32_Private_Function_Prototypes Private Function Prototypes
-  * @{
-  */ 
-
-#if defined(HAL_I2C_MODULE_ENABLED)
-/* I2C1 bus function */
-/* Link function for I2C peripherals */
-void               I2C1_Init(void);
-void               I2C1_Error (void);
-void               I2C1_MspInit(I2C_HandleTypeDef *hi2c);  
-void               I2C1_Write(uint8_t Addr, uint8_t Reg, uint8_t Value);
-uint8_t            I2C1_Read(uint8_t Addr, uint8_t Reg);
-HAL_StatusTypeDef  I2C1_WriteBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length);
-HAL_StatusTypeDef  I2C1_ReadBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length);
-HAL_StatusTypeDef  I2C1_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0XX_NUCLEO_32_Private_Functions Private Functions
-  * @{
-  */ 
-
-/**
-  * @brief  This method returns the STM32F0XX NUCLEO BSP Driver revision
-  * @retval version : 0xXYZR (8bits for each decimal, R for RC)
-  */
-uint32_t BSP_GetVersion(void)
-{
-  return __STM32F0XX_NUCLEO_32_BSP_VERSION;
-}
-
-/**
-  * @brief  Configures LED GPIO.
-  * @param  Led Specifies the Led to be configured. 
-  *   This parameter can be one of following parameters:
-  *            @arg  LED3
-  * @retval None
-  */
-void BSP_LED_Init(Led_TypeDef Led)
-{
-  GPIO_InitTypeDef  GPIO_InitStruct;
-  
-  /* Enable the GPIO_LED Clock */
-  LEDx_GPIO_CLK_ENABLE(Led);
-
-  /* Configure the GPIO_LED pin */
-  GPIO_InitStruct.Pin = LED_PIN[Led];
-  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-  GPIO_InitStruct.Pull = GPIO_NOPULL;
-  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-  
-  HAL_GPIO_Init(LED_PORT[Led], &GPIO_InitStruct);
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET); 
-}
-
-/**
-  * @brief  Turns selected LED On.
-  * @param  Led Specifies the Led to be set on. 
-  *   This parameter can be one of following parameters:
-  *            @arg  LED3
-  * @retval None
-  */
-void BSP_LED_On(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_SET); 
-}
-
-/**
-  * @brief  Turns selected LED Off. 
-  * @param  Led Specifies the Led to be set off. 
-  *   This parameter can be one of following parameters:
-  *            @arg  LED3
-  * @retval None
-  */
-void BSP_LED_Off(Led_TypeDef Led)
-{
-  HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET); 
-}
-
-/**
-  * @brief  Toggles the selected LED.
-  * @param  Led Specifies the Led to be toggled. 
-  *   This parameter can be one of following parameters:
-  *            @arg  LED3
-  * @retval None
-  */
-void BSP_LED_Toggle(Led_TypeDef Led)
-{
-  HAL_GPIO_TogglePin(LED_PORT[Led], LED_PIN[Led]);
-}
-
-/******************************************************************************
-                            BUS OPERATIONS
-*******************************************************************************/
-#if defined(HAL_I2C_MODULE_ENABLED)
-/******************************* I2C Routines *********************************/
-
-/**
-  * @brief I2C Bus initialization
-  * @retval None
-  */
-void I2C1_Init(void)
-{
-  if(HAL_I2C_GetState(&nucleo32_I2c1) == HAL_I2C_STATE_RESET)
-  {
-    nucleo32_I2c1.Instance              = BSP_I2C1;
-    nucleo32_I2c1.Init.Timing           = I2C1_TIMING;
-    nucleo32_I2c1.Init.OwnAddress1      = 0;
-    nucleo32_I2c1.Init.AddressingMode   = I2C_ADDRESSINGMODE_7BIT;
-    nucleo32_I2c1.Init.DualAddressMode  = I2C_DUALADDRESS_DISABLE;
-    nucleo32_I2c1.Init.OwnAddress2      = 0;
-    nucleo32_I2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK;
-    nucleo32_I2c1.Init.GeneralCallMode  = I2C_GENERALCALL_DISABLE;
-    nucleo32_I2c1.Init.NoStretchMode    = I2C_NOSTRETCH_DISABLE;  
-
-    /* Init the I2C */
-    I2C1_MspInit(&nucleo32_I2c1);
-    HAL_I2C_Init(&nucleo32_I2c1);
-  }
-}
-
-/**
-  * @brief  Writes a single data.
-  * @param  Addr I2C address
-  * @param  Reg Register address 
-  * @param  Value Data to be written
-  * @retval None
-  */
-void I2C1_Write(uint8_t Addr, uint8_t Reg, uint8_t Value)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-
-  status = HAL_I2C_Mem_Write(&nucleo32_I2c1, Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT, &Value, 1, 100); 
-
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    I2C1_Error();
-  }
-}
-
-/**
-  * @brief  Reads a single data.
-  * @param  Addr I2C address
-  * @param  Reg Register address 
-  * @retval Read data
-  */
-uint8_t I2C1_Read(uint8_t Addr, uint8_t Reg)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  uint8_t Value = 0;
-  
-  status = HAL_I2C_Mem_Read(&nucleo32_I2c1, Addr, Reg, I2C_MEMADD_SIZE_8BIT, &Value, 1, 1000);
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Execute user timeout callback */
-    I2C1_Error();
-  }
-  return Value;   
-}
-
-/**
-  * @brief  Reads multiple data on the BUS.
-  * @param  Addr   I2C Address
-  * @param  Reg    Reg Address 
-  * @param  RegSize  The target register size (can be 8BIT or 16BIT)
-  * @param  pBuffer  pointer to read data buffer
-  * @param  Length  length of the data
-  * @retval 0 if no problems to read multiple data
-  */
-HAL_StatusTypeDef I2C1_ReadBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Mem_Read(&nucleo32_I2c1, Addr, Reg, RegSize, pBuffer, Length, I2c1Timeout);
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Re-Initiaize the BUS */
-    I2C1_Error();
-  }
-  return status;
-}
-
-/**
-  * @brief  Checks if target device is ready for communication. 
-  * @note   This function is used with Memory devices
-  * @param  DevAddress Target device address
-  * @param  Trials Number of trials
-  * @retval HAL status
-  */
-HAL_StatusTypeDef I2C1_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
-{ 
-  return (HAL_I2C_IsDeviceReady(&nucleo32_I2c1, DevAddress, Trials, I2c1Timeout));
-}
-
-/**
-  * @brief  Write a value in a register of the device through BUS.
-  * @param  Addr Device address on BUS Bus.  
-  * @param  Reg The target register address to write
-  * @param  RegSize The target register size (can be 8BIT or 16BIT)
-  * @param  pBuffer The target register value to be written 
-  * @param  Length buffer size to be written
-  * @retval None
-  */
-HAL_StatusTypeDef I2C1_WriteBuffer(uint16_t Addr, uint8_t Reg, uint16_t RegSize, uint8_t *pBuffer, uint16_t Length)
-{
-  HAL_StatusTypeDef status = HAL_OK;
-  
-  status = HAL_I2C_Mem_Write(&nucleo32_I2c1, Addr, Reg, RegSize, pBuffer, Length, I2c1Timeout); 
-  
-  /* Check the communication status */
-  if(status != HAL_OK)
-  {
-    /* Re-Initiaize the BUS */
-    I2C1_Error();
-  }        
-  return status;
-}
-
-/**
-  * @brief  Manages error callback by re-initializing I2C.
-  * @retval None
-  */
-void I2C1_Error(void)
-{
-  /* De-initialize the I2C communication BUS */
-  HAL_I2C_DeInit(&nucleo32_I2c1);
-  
-  /* Re-Initiaize the I2C communication BUS */
-  I2C1_Init();
-}
-
-/**
-  * @brief I2C MSP Initialization
-  * @param hi2c I2C handle
-  * @retval None
-  */
-void I2C1_MspInit(I2C_HandleTypeDef *hi2c)
-{
-  GPIO_InitTypeDef GPIO_InitStruct;
-  RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct;
-
-  /*##-1- Set source clock to SYSCLK for I2C1 ################################################*/  
-  RCC_PeriphCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2C1;
-  RCC_PeriphCLKInitStruct.I2c1ClockSelection = RCC_I2C1CLKSOURCE_SYSCLK;
-  HAL_RCCEx_PeriphCLKConfig(&RCC_PeriphCLKInitStruct);
-
-  /*##-2- Configure the GPIOs ################################################*/  
-  
-  /* Enable GPIO clock */
-  BSP_I2C1_GPIO_CLK_ENABLE();
-
-  /* Configure I2C SCL & SDA as alternate function  */
-  GPIO_InitStruct.Pin       = (BSP_I2C1_SCL_PIN| BSP_I2C1_SDA_PIN);
-  GPIO_InitStruct.Mode      = GPIO_MODE_AF_OD;
-  GPIO_InitStruct.Pull      = GPIO_PULLUP;
-  GPIO_InitStruct.Speed     = GPIO_SPEED_FREQ_HIGH;
-  GPIO_InitStruct.Alternate = BSP_I2C1_SCL_SDA_AF;
-  HAL_GPIO_Init(BSP_I2C1_GPIO_PORT, &GPIO_InitStruct);
-
-  /*##-3- Configure the Eval I2C peripheral #######################################*/ 
-  /* Enable I2C clock */
-  BSP_I2C1_CLK_ENABLE();
-
-  /* Force the I2C peripheral clock reset */
-  BSP_I2C1_FORCE_RESET();
-
-  /* Release the I2C peripheral clock reset */
-  BSP_I2C1_RELEASE_RESET();
-}
-
-#endif /*HAL_I2C_MODULE_ENABLED*/
-
-/**
-  * @}
-  */
-  
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/** @addtogroup STM32F0XX_NUCLEO_32_GRAVITECH_4DIGITS
-  * @{
-  */
-  
-/** @addtogroup STM32_GRAVITECH_4DIGITS_Exported_Functions
-  * @{
-  */
-
-#if defined(HAL_I2C_MODULE_ENABLED)
-
-/**
-  * @brief  BSP of the 4 digits 7 Segment Display shield for Arduino Nano - Gravitech.
-            init
-  * @retval HAL_StatusTypeDef
-  */
-HAL_StatusTypeDef BSP_DIGIT4_SEG7_Init(void)
-{
-  uint8_t control[1] = {0x47};
-
-  /* Init I2C */
-  I2C1_Init();
-  
-  /* Configure the SAA1064 component */
-  return I2C1_WriteBuffer(0x70, 0, 1, control, sizeof(control));
-}
-
-/**
-  * @brief  BSP of the 4 digits 7 Segment Display shield for Arduino Nano - Gravitech.
-            Display the value if value belong to [0-9999]
-  * @param  Value A number between 0 and 9999 will be displayed on the screen.
-  *         DIGIT4_SEG7_RESET will reset the screen (any value above 9999 will reset the screen also)
-  * @retval HAL_StatusTypeDef
-  */
-HAL_StatusTypeDef BSP_DIGIT4_SEG7_Display(uint32_t Value)
-{
-  const uint8_t lookup[10] = {0x3F,0x06,0x5B,0x4F,0x66,
-                              0x6D,0x7D,0x07,0x7F,0x6F};
-                              
-  uint32_t thousands, hundreds, tens, base;
-  HAL_StatusTypeDef status = HAL_ERROR;
-  uint8_t d1d2d3d4[4];
-  
-  if (Value < 10000)
-  {
-    thousands = Value / 1000;
-    hundreds = (Value - (thousands * 1000)) / 100;
-    tens = (Value - ((thousands * 1000) + (hundreds * 100))) / 10;
-    base = Value - ((thousands * 1000) + (hundreds * 100) + (tens * 10));
-
-    d1d2d3d4[3] = lookup[thousands];
-    d1d2d3d4[2] = lookup[hundreds];
-    d1d2d3d4[1] = lookup[tens];
-    d1d2d3d4[0] = lookup[base];
-    
-  }
-  else
-  {
-    d1d2d3d4[3] = 0;
-    d1d2d3d4[2] = 0;
-    d1d2d3d4[1] = 0;
-    d1d2d3d4[0] = 0;
-  }
-  
-  /* Send the four digits to the SAA1064 component */
-  status = I2C1_WriteBuffer(0x70, 1, 1, d1d2d3d4, sizeof(d1d2d3d4));
-
-  return status;
-}
-  
-#endif /*HAL_I2C_MODULE_ENABLED*/
-
-/**
-  * @}
-  */ 
-  
-/**
-  * @}
-  */ 
-  
-/**
-  * @}
-  */ 
-    
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 204
.platformio/packages/framework-stm32cube/f0/Drivers/BSP/STM32F0xx_Nucleo_32/stm32f0xx_nucleo_32.h

@@ -1,204 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f0xx_nucleo_32.h
-  * @author  MCD Application Team
-  * @brief   This file contains definitions for:
-  *          - LED available on STM32F0xx-Nucleo_32 Kit from STMicroelectronics
-  *          - 7 segment display from Gravitech
-  ******************************************************************************
-  * @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 __STM32F0XX_NUCLEO_32_H
-#define __STM32F0XX_NUCLEO_32_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f0xx_hal.h"
-   
-
-/** @addtogroup BSP
-  * @{
-  */
-
-/** @defgroup STM32F0XX_NUCLEO_32 NUCLEO 32
-  * @brief This section contains the exported types, contants and functions
-  *        required to use the Nucleo 32 board.
-  * @{
-  */
-
-/** @defgroup STM32F0XX_NUCLEO_32_Exported_Types Exported Types
-  * @{
-  */ 
-   
-typedef enum 
-{
-  LED3 = 0,
-  LED_GREEN = LED3
-} Led_TypeDef;
-
-/**
-  * @}
-  */ 
-
-/** @defgroup STM32F0XX_NUCLEO_32_Exported_Constants Exported Constants 
-  * @brief Define for STM32F0XX_NUCLEO_32 board  
-  * @{
-  */ 
-
-#if !defined (USE_STM32F0XX_NUCLEO_32)
- #define USE_STM32F0XX_NUCLEO_32
-#endif
-
-/** @defgroup STM32F0XX_NUCLEO_LED LED Constants
-  * @{
-  */
-
-#define LEDn                               1
-
-#define LED3_PIN                           GPIO_PIN_3
-#define LED3_GPIO_PORT                     GPIOB
-#define LED3_GPIO_CLK_ENABLE()             __HAL_RCC_GPIOB_CLK_ENABLE()  
-#define LED3_GPIO_CLK_DISABLE()            __HAL_RCC_GPIOB_CLK_DISABLE()  
-
-#define LEDx_GPIO_CLK_ENABLE(__INDEX__)    do {LED3_GPIO_CLK_ENABLE(); } while(0)
-#define LEDx_GPIO_CLK_DISABLE(__INDEX__)   LED3_GPIO_CLK_DISABLE())
-
-/**
-  * @}
-  */ 
-  
-/** @defgroup STM32F0XX_NUCLEO_32_BUS BUS Constants
-  * @{
-  */ 
-
-#if defined(HAL_I2C_MODULE_ENABLED)
-/*##################### I2C2 ###################################*/
-/* User can use this section to tailor I2Cx instance used and associated resources */
-/* Definition for I2C1 Pins */
-#define BSP_I2C1                        I2C1
-#define BSP_I2C1_CLK_ENABLE()           __HAL_RCC_I2C1_CLK_ENABLE()
-#define BSP_I2C1_CLK_DISABLE()          __HAL_RCC_I2C1_CLK_DISABLE()
-#define BSP_I2C1_FORCE_RESET()          __HAL_RCC_I2C1_FORCE_RESET()
-#define BSP_I2C1_RELEASE_RESET()        __HAL_RCC_I2C1_RELEASE_RESET()  
-
-#define BSP_I2C1_SCL_PIN                GPIO_PIN_6    /* PB.6 add wire between D5 and A5 */
-#define BSP_I2C1_SDA_PIN                GPIO_PIN_7    /* PB.7 add wire between D4 and A4 */
-
-#define BSP_I2C1_GPIO_PORT              GPIOB      /* GPIOB */
-#define BSP_I2C1_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOB_CLK_ENABLE()
-#define BSP_I2C1_GPIO_CLK_DISABLE()     __HAL_RCC_GPIOB_CLK_DISABLE() 
-#define BSP_I2C1_SCL_SDA_AF             GPIO_AF1_I2C1
-  
-/* Maximum Timeout values for flags waiting loops. These timeouts are not based
-   on accurate values, they just guarantee that the application will not remain
-   stuck if the I2C communication is corrupted.
-   You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
-#define BSP_I2C1_TIMEOUT_MAX            1000
-
-/* I2C TIMING is calculated in case of the I2C Clock source is the SYSCLK = 32 MHz */
-/* Set TIMING to 0x009080B5 to reach 100 KHz speed (Rise time = 50ns, Fall time = 10ns) */
-//#define I2C1_TIMING                      0x009080B5
-#define I2C1_TIMING                      0xB0420F13
-
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-  
-/** @defgroup STM32F0XX_NUCLEO_32_Exported_Functions Exported Functions
-  * @{
-  */
-  
-uint32_t         BSP_GetVersion(void);
-void             BSP_LED_Init(Led_TypeDef Led);
-void             BSP_LED_On(Led_TypeDef Led);
-void             BSP_LED_Off(Led_TypeDef Led);
-void             BSP_LED_Toggle(Led_TypeDef Led);
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-  
-/** @defgroup STM32F0XX_NUCLEO_32_GRAVITECH_4DIGITS GRAVITECH 4 DIGITS
-  * @brief This section contains the exported functions
-  *        required to use Gravitech shield 7 Segment Display
-  * @{
-  */ 
-
-/** @defgroup STM32_GRAVITECH_4DIGITS_Exported_Constants Exported Constants
-  * @{
-  */
-
-#define DIGIT4_SEG7_RESET 10000
-/**
-  * @}
-  */
-
-/** @defgroup STM32_GRAVITECH_4DIGITS_Exported_Functions Exported Functions
-  * @{
-  */   
-  
-HAL_StatusTypeDef BSP_DIGIT4_SEG7_Init(void);
-HAL_StatusTypeDef BSP_DIGIT4_SEG7_Display(uint32_t Value);
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */ 
-
-/**
-  * @}
-  */ 
-    
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32F0XX_NUCLEO_32_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
-

+ 0 - 4
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_class_marks_example/ARM/Abstract.txt

@@ -1,4 +0,0 @@
-CMSIS DSP_Lib example arm_class_marks_example for
-  Cortex-M0, Cortex-M3 and Cortex-M4 with FPU
-
-The example is configured for uVision Simulator

+ 0 - 211
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_class_marks_example/ARM/arm_class_marks_example_f32.c

@@ -1,211 +0,0 @@
-/* ----------------------------------------------------------------------
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.
-*
-* $Date:         17. January 2013
-* $Revision:     V1.4.0
-*
-* Project:       CMSIS DSP Library
-* Title:         arm_class_marks_example_f32.c
-*
-* Description:   Example code to calculate Minimum, Maximum
-*                Mean, std and variance of marks obtained in a class
-*
-* Target Processor: Cortex-M4/Cortex-M3
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-* -------------------------------------------------------------------- */
-
-/**
- * @ingroup groupExamples
- */
-
-/**
- * @defgroup ClassMarks Class Marks Example
- *
- * \par Description:
- * \par
- * Demonstrates the use the Maximum, Minimum, Mean, Standard Deviation, Variance
- * and Matrix functions to calculate statistical values of marks obtained in a class.
- *
- * \note This example also demonstrates the usage of static initialization.
- *
- * \par Variables Description:
- * \par
- * \li \c testMarks_f32 points to the marks scored by 20 students in 4 subjects
- * \li \c max_marks     Maximum of all marks
- * \li \c min_marks     Minimum of all marks
- * \li \c mean          Mean of all marks
- * \li \c var           Variance of the marks
- * \li \c std           Standard deviation of the marks
- * \li \c numStudents   Total number of students in the class
- *
- * \par CMSIS DSP Software Library Functions Used:
- * \par
- * - arm_mat_init_f32()
- * - arm_mat_mult_f32()
- * - arm_max_f32()
- * - arm_min_f32()
- * - arm_mean_f32()
- * - arm_std_f32()
- * - arm_var_f32()
- *
- * <b> Refer  </b>
- * \link arm_class_marks_example_f32.c \endlink
- *
- */
-
-
-/** \example arm_class_marks_example_f32.c
-  */
-#include "arm_math.h"
-
-#define USE_STATIC_INIT
-
- /* ----------------------------------------------------------------------
-** Global defines
-** ------------------------------------------------------------------- */
-
-#define TEST_LENGTH_SAMPLES   (20*4)
-
-/* ----------------------------------------------------------------------
-** List of Marks scored by 20 students for 4 subjects
-** ------------------------------------------------------------------- */
-const float32_t testMarks_f32[TEST_LENGTH_SAMPLES] =
-{
-  42.000000,  37.000000,  81.000000,  28.000000,
-  83.000000,  72.000000,  36.000000,  38.000000,
-  32.000000,  51.000000,  63.000000,  64.000000,
-  97.000000,  82.000000,  95.000000,  90.000000,
-  66.000000,  51.000000,  54.000000,  42.000000,
-  67.000000,  56.000000,  45.000000,  57.000000,
-  67.000000,  69.000000,  35.000000,  52.000000,
-  29.000000,  81.000000,  58.000000,  47.000000,
-  38.000000,  76.000000, 100.000000,  29.000000,
-  33.000000,  47.000000,  29.000000,  50.000000,
-  34.000000,  41.000000,  61.000000,  46.000000,
-  52.000000,  50.000000,  48.000000,  36.000000,
-  47.000000,  55.000000,  44.000000,  40.000000,
- 100.000000,  94.000000,  84.000000,  37.000000,
-  32.000000,  71.000000,  47.000000,  77.000000,
-  31.000000,  50.000000,  49.000000,  35.000000,
-  63.000000,  67.000000,  40.000000,  31.000000,
-  29.000000,  68.000000,  61.000000,  38.000000,
-  31.000000,  28.000000,  28.000000,  76.000000,
-  55.000000,  33.000000,  29.000000,  39.000000
-};
-
-
-/* ----------------------------------------------------------------------
-* Number of subjects X 1
-* ------------------------------------------------------------------- */
-const float32_t testUnity_f32[4] =
-{
-  1.000,  1.000,   1.000,  1.000
-};
-
-
-/* ----------------------------------------------------------------------
-** f32 Output buffer
-** ------------------------------------------------------------------- */
-static float32_t testOutput[TEST_LENGTH_SAMPLES];
-
-
-/* ------------------------------------------------------------------
-* Global defines
-*------------------------------------------------------------------- */
-#define   NUMSTUDENTS  20
-#define     NUMSUBJECTS  4
-
-/* ------------------------------------------------------------------
-* Global variables
-*------------------------------------------------------------------- */
-
- uint32_t    numStudents = 20;
- uint32_t    numSubjects = 4;
-float32_t    max_marks, min_marks, mean, std, var;
- uint32_t    student_num;
-
-/* ----------------------------------------------------------------------------------
-* Main f32 test function.  It returns maximum marks secured and student number
-* ------------------------------------------------------------------------------- */
-
-int32_t main()
-{
-
-#ifndef  USE_STATIC_INIT
-
-  arm_matrix_instance_f32 srcA;
-  arm_matrix_instance_f32 srcB;
-  arm_matrix_instance_f32 dstC;
-
-  /* Input and output matrices initializations */
-  arm_mat_init_f32(&srcA, numStudents, numSubjects, (float32_t *)testMarks_f32);
-  arm_mat_init_f32(&srcB, numSubjects, 1, (float32_t *)testUnity_f32);
-  arm_mat_init_f32(&dstC, numStudents, 1, testOutput);
-
-#else
-
-  /* Static Initializations of Input and output matrix sizes and array */
-  arm_matrix_instance_f32 srcA = {NUMSTUDENTS, NUMSUBJECTS, (float32_t *)testMarks_f32};
-  arm_matrix_instance_f32 srcB = {NUMSUBJECTS, 1, (float32_t *)testUnity_f32};
-  arm_matrix_instance_f32 dstC = {NUMSTUDENTS, 1, testOutput};
-
-#endif
-
-
-  /* ----------------------------------------------------------------------
-  *Call the Matrix multiplication process function
-  * ------------------------------------------------------------------- */
-  arm_mat_mult_f32(&srcA, &srcB, &dstC);
-
-  /* ----------------------------------------------------------------------
-  ** Call the Max function to calculate max marks among numStudents
-  ** ------------------------------------------------------------------- */
-  arm_max_f32(testOutput, numStudents, &max_marks, &student_num);
-
-  /* ----------------------------------------------------------------------
-  ** Call the Min function to calculate min marks among numStudents
-  ** ------------------------------------------------------------------- */
-  arm_min_f32(testOutput, numStudents, &min_marks, &student_num);
-
-  /* ----------------------------------------------------------------------
-  ** Call the Mean function to calculate mean
-  ** ------------------------------------------------------------------- */
-  arm_mean_f32(testOutput, numStudents, &mean);
-
-  /* ----------------------------------------------------------------------
-  ** Call the std function to calculate standard deviation
-  ** ------------------------------------------------------------------- */
-  arm_std_f32(testOutput, numStudents, &std);
-
-  /* ----------------------------------------------------------------------
-  ** Call the var function to calculate variance
-  ** ------------------------------------------------------------------- */
-  arm_var_f32(testOutput, numStudents, &var);
-
-  while(1);                             /* main function does not return */
-}

+ 0 - 4
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_class_marks_example/GCC/Abstract.txt

@@ -1,4 +0,0 @@
-CMSIS DSP_Lib example arm_class_marks_example for
-  Cortex-M0, Cortex-M3 and Cortex-M4 with FPU
-
-The example is configured for uVision Simulator

+ 0 - 211
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_class_marks_example/GCC/arm_class_marks_example_f32.c

@@ -1,211 +0,0 @@
-/* ----------------------------------------------------------------------
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.
-*
-* $Date:         17. January 2013
-* $Revision:     V1.4.0
-*
-* Project:       CMSIS DSP Library
-* Title:         arm_class_marks_example_f32.c
-*
-* Description:   Example code to calculate Minimum, Maximum
-*                Mean, std and variance of marks obtained in a class
-*
-* Target Processor: Cortex-M4/Cortex-M3
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-* -------------------------------------------------------------------- */
-
-/**
- * @ingroup groupExamples
- */
-
-/**
- * @defgroup ClassMarks Class Marks Example
- *
- * \par Description:
- * \par
- * Demonstrates the use the Maximum, Minimum, Mean, Standard Deviation, Variance
- * and Matrix functions to calculate statistical values of marks obtained in a class.
- *
- * \note This example also demonstrates the usage of static initialization.
- *
- * \par Variables Description:
- * \par
- * \li \c testMarks_f32 points to the marks scored by 20 students in 4 subjects
- * \li \c max_marks     Maximum of all marks
- * \li \c min_marks     Minimum of all marks
- * \li \c mean          Mean of all marks
- * \li \c var           Variance of the marks
- * \li \c std           Standard deviation of the marks
- * \li \c numStudents   Total number of students in the class
- *
- * \par CMSIS DSP Software Library Functions Used:
- * \par
- * - arm_mat_init_f32()
- * - arm_mat_mult_f32()
- * - arm_max_f32()
- * - arm_min_f32()
- * - arm_mean_f32()
- * - arm_std_f32()
- * - arm_var_f32()
- *
- * <b> Refer  </b>
- * \link arm_class_marks_example_f32.c \endlink
- *
- */
-
-
-/** \example arm_class_marks_example_f32.c
-  */
-#include "arm_math.h"
-
-#define USE_STATIC_INIT
-
- /* ----------------------------------------------------------------------
-** Global defines
-** ------------------------------------------------------------------- */
-
-#define TEST_LENGTH_SAMPLES   (20*4)
-
-/* ----------------------------------------------------------------------
-** List of Marks scored by 20 students for 4 subjects
-** ------------------------------------------------------------------- */
-const float32_t testMarks_f32[TEST_LENGTH_SAMPLES] =
-{
-  42.000000,  37.000000,  81.000000,  28.000000,
-  83.000000,  72.000000,  36.000000,  38.000000,
-  32.000000,  51.000000,  63.000000,  64.000000,
-  97.000000,  82.000000,  95.000000,  90.000000,
-  66.000000,  51.000000,  54.000000,  42.000000,
-  67.000000,  56.000000,  45.000000,  57.000000,
-  67.000000,  69.000000,  35.000000,  52.000000,
-  29.000000,  81.000000,  58.000000,  47.000000,
-  38.000000,  76.000000, 100.000000,  29.000000,
-  33.000000,  47.000000,  29.000000,  50.000000,
-  34.000000,  41.000000,  61.000000,  46.000000,
-  52.000000,  50.000000,  48.000000,  36.000000,
-  47.000000,  55.000000,  44.000000,  40.000000,
- 100.000000,  94.000000,  84.000000,  37.000000,
-  32.000000,  71.000000,  47.000000,  77.000000,
-  31.000000,  50.000000,  49.000000,  35.000000,
-  63.000000,  67.000000,  40.000000,  31.000000,
-  29.000000,  68.000000,  61.000000,  38.000000,
-  31.000000,  28.000000,  28.000000,  76.000000,
-  55.000000,  33.000000,  29.000000,  39.000000
-};
-
-
-/* ----------------------------------------------------------------------
-* Number of subjects X 1
-* ------------------------------------------------------------------- */
-const float32_t testUnity_f32[4] =
-{
-  1.000,  1.000,   1.000,  1.000
-};
-
-
-/* ----------------------------------------------------------------------
-** f32 Output buffer
-** ------------------------------------------------------------------- */
-static float32_t testOutput[TEST_LENGTH_SAMPLES];
-
-
-/* ------------------------------------------------------------------
-* Global defines
-*------------------------------------------------------------------- */
-#define   NUMSTUDENTS  20
-#define     NUMSUBJECTS  4
-
-/* ------------------------------------------------------------------
-* Global variables
-*------------------------------------------------------------------- */
-
- uint32_t    numStudents = 20;
- uint32_t    numSubjects = 4;
-float32_t    max_marks, min_marks, mean, std, var;
- uint32_t    student_num;
-
-/* ----------------------------------------------------------------------------------
-* Main f32 test function.  It returns maximum marks secured and student number
-* ------------------------------------------------------------------------------- */
-
-int32_t main()
-{
-
-#ifndef  USE_STATIC_INIT
-
-  arm_matrix_instance_f32 srcA;
-  arm_matrix_instance_f32 srcB;
-  arm_matrix_instance_f32 dstC;
-
-  /* Input and output matrices initializations */
-  arm_mat_init_f32(&srcA, numStudents, numSubjects, (float32_t *)testMarks_f32);
-  arm_mat_init_f32(&srcB, numSubjects, 1, (float32_t *)testUnity_f32);
-  arm_mat_init_f32(&dstC, numStudents, 1, testOutput);
-
-#else
-
-  /* Static Initializations of Input and output matrix sizes and array */
-  arm_matrix_instance_f32 srcA = {NUMSTUDENTS, NUMSUBJECTS, (float32_t *)testMarks_f32};
-  arm_matrix_instance_f32 srcB = {NUMSUBJECTS, 1, (float32_t *)testUnity_f32};
-  arm_matrix_instance_f32 dstC = {NUMSTUDENTS, 1, testOutput};
-
-#endif
-
-
-  /* ----------------------------------------------------------------------
-  *Call the Matrix multiplication process function
-  * ------------------------------------------------------------------- */
-  arm_mat_mult_f32(&srcA, &srcB, &dstC);
-
-  /* ----------------------------------------------------------------------
-  ** Call the Max function to calculate max marks among numStudents
-  ** ------------------------------------------------------------------- */
-  arm_max_f32(testOutput, numStudents, &max_marks, &student_num);
-
-  /* ----------------------------------------------------------------------
-  ** Call the Min function to calculate min marks among numStudents
-  ** ------------------------------------------------------------------- */
-  arm_min_f32(testOutput, numStudents, &min_marks, &student_num);
-
-  /* ----------------------------------------------------------------------
-  ** Call the Mean function to calculate mean
-  ** ------------------------------------------------------------------- */
-  arm_mean_f32(testOutput, numStudents, &mean);
-
-  /* ----------------------------------------------------------------------
-  ** Call the std function to calculate standard deviation
-  ** ------------------------------------------------------------------- */
-  arm_std_f32(testOutput, numStudents, &std);
-
-  /* ----------------------------------------------------------------------
-  ** Call the var function to calculate variance
-  ** ------------------------------------------------------------------- */
-  arm_var_f32(testOutput, numStudents, &var);
-
-  while(1);                             /* main function does not return */
-}

+ 0 - 4
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/ARM/Abstract.txt

@@ -1,4 +0,0 @@
-CMSIS DSP_Lib example arm_convolution_example for
-  Cortex-M0, Cortex-M3 and Cortex-M4 with FPU
-
-The example is configured for uVision Simulator

+ 0 - 247
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/ARM/arm_convolution_example_f32.c

@@ -1,247 +0,0 @@
-/* ----------------------------------------------------------------------
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.
-*
-* $Date:         17. January 2013
-* $Revision:     V1.4.0
-*
-* Project:       CMSIS DSP Library
-* Title:         arm_convolution_example_f32.c
-*
-* Description:   Example code demonstrating Convolution of two input signals using fft.
-*
-* Target Processor: Cortex-M4/Cortex-M3
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-* -------------------------------------------------------------------- */
-
-/**
- * @ingroup groupExamples
- */
-
-/**
- * @defgroup ConvolutionExample Convolution Example
- *
- * \par Description:
- * \par
- * Demonstrates the convolution theorem with the use of the Complex FFT, Complex-by-Complex
- * Multiplication, and Support Functions.
- *
- * \par Algorithm:
- * \par
- * The convolution theorem states that convolution in the time domain corresponds to
- * multiplication in the frequency domain. Therefore, the Fourier transform of the convoution of
- * two signals is equal to the product of their individual Fourier transforms.
- * The Fourier transform of a signal can be evaluated efficiently using the Fast Fourier Transform (FFT).
- * \par
- * Two input signals, <code>a[n]</code> and <code>b[n]</code>, with lengths \c n1 and \c n2 respectively,
- * are zero padded so that their lengths become \c N, which is greater than or equal to <code>(n1+n2-1)</code>
- * and is a power of 4 as FFT implementation is radix-4.
- * The convolution of <code>a[n]</code> and <code>b[n]</code> is obtained by taking the FFT of the input
- * signals, multiplying the Fourier transforms of the two signals, and taking the inverse FFT of
- * the multiplied result.
- * \par
- * This is denoted by the following equations:
- * <pre> A[k] = FFT(a[n],N)
- * B[k] = FFT(b[n],N)
- * conv(a[n], b[n]) = IFFT(A[k] * B[k], N)</pre>
- * where <code>A[k]</code> and <code>B[k]</code> are the N-point FFTs of the signals <code>a[n]</code>
- * and <code>b[n]</code> respectively.
- * The length of the convolved signal is <code>(n1+n2-1)</code>.
- *
- * \par Block Diagram:
- * \par
- * \image html Convolution.gif
- *
- * \par Variables Description:
- * \par
- * \li \c testInputA_f32 points to the first input sequence
- * \li \c srcALen length of the first input sequence
- * \li \c testInputB_f32 points to the second input sequence
- * \li \c srcBLen length of the second input sequence
- * \li \c outLen length of convolution output sequence, <code>(srcALen + srcBLen - 1)</code>
- * \li \c AxB points to the output array where the product of individual FFTs of inputs is stored.
- *
- * \par CMSIS DSP Software Library Functions Used:
- * \par
- * - arm_fill_f32()
- * - arm_copy_f32()
- * - arm_cfft_radix4_init_f32()
- * - arm_cfft_radix4_f32()
- * - arm_cmplx_mult_cmplx_f32()
- *
- * <b> Refer  </b>
- * \link arm_convolution_example_f32.c \endlink
- *
- */
-
-
-/** \example arm_convolution_example_f32.c
-  */
-
-#include "arm_math.h"
-#include "math_helper.h"
-
-/* ----------------------------------------------------------------------
-* Defines each of the tests performed
-* ------------------------------------------------------------------- */
-#define MAX_BLOCKSIZE   128
-#define DELTA           (0.000001f)
-#define SNR_THRESHOLD   90
-
-/* ----------------------------------------------------------------------
-* Declare I/O buffers
-* ------------------------------------------------------------------- */
-float32_t Ak[MAX_BLOCKSIZE];        /* Input A */
-float32_t Bk[MAX_BLOCKSIZE];        /* Input B */
-float32_t AxB[MAX_BLOCKSIZE * 2];   /* Output */
-
-/* ----------------------------------------------------------------------
-* Test input data for Floating point Convolution example for 32-blockSize
-* Generated by the MATLAB randn() function
-* ------------------------------------------------------------------- */
-float32_t testInputA_f32[64] =
-{
-  -0.808920,   1.357369,   1.180861,  -0.504544,   1.762637,  -0.703285,
-   1.696966,   0.620571,  -0.151093,  -0.100235,  -0.872382,  -0.403579,
-  -0.860749,  -0.382648,  -1.052338,   0.128113,  -0.646269,   1.093377,
-  -2.209198,   0.471706,   0.408901,   1.266242,   0.598252,   1.176827,
-  -0.203421,   0.213596,  -0.851964,  -0.466958,   0.021841,  -0.698938,
-  -0.604107,   0.461778,  -0.318219,   0.942520,   0.577585,   0.417619,
-   0.614665,   0.563679,  -1.295073,  -0.764437,   0.952194,  -0.859222,
-  -0.618554,  -2.268542,  -1.210592,   1.655853,  -2.627219,  -0.994249,
-  -1.374704,   0.343799,   0.025619,   1.227481,  -0.708031,   0.069355,
-  -1.845228,  -1.570886,   1.010668,  -1.802084,   1.630088,   1.286090,
-  -0.161050,  -0.940794,   0.367961,   0.291907
-
-};
-
-float32_t testInputB_f32[64] =
-{
-   0.933724,   0.046881,   1.316470,   0.438345,   0.332682,   2.094885,
-   0.512081,   0.035546,   0.050894,  -2.320371,   0.168711,  -1.830493,
-  -0.444834,  -1.003242,  -0.531494,  -1.365600,  -0.155420,  -0.757692,
-  -0.431880,  -0.380021,   0.096243,  -0.695835,   0.558850,  -1.648962,
-   0.020369,  -0.363630,   0.887146,   0.845503,  -0.252864,  -0.330397,
-   1.269131,  -1.109295,  -1.027876,   0.135940,   0.116721,  -0.293399,
-  -1.349799,   0.166078,  -0.802201,   0.369367,  -0.964568,  -2.266011,
-   0.465178,   0.651222,  -0.325426,   0.320245,  -0.784178,  -0.579456,
-   0.093374,   0.604778,  -0.048225,   0.376297,  -0.394412,   0.578182,
-  -1.218141,  -1.387326,   0.692462,  -0.631297,   0.153137,  -0.638952,
-  0.635474,   -0.970468,   1.334057,  -0.111370
-};
-
-const float testRefOutput_f32[127] =
-{
-   -0.818943,    1.229484,  -0.533664,    1.016604,   0.341875,  -1.963656,
-    5.171476,    3.478033,   7.616361,    6.648384,   0.479069,   1.792012,
-   -1.295591,   -7.447818,   0.315830,  -10.657445,  -2.483469,  -6.524236,
-   -7.380591,   -3.739005,  -8.388957,    0.184147,  -1.554888,   3.786508,
-   -1.684421,    5.400610,  -1.578126,    7.403361,   8.315999,   2.080267,
-   11.077776,    2.749673,   7.138962,    2.748762,   0.660363,   0.981552,
-    1.442275,    0.552721,  -2.576892,    4.703989,   0.989156,   8.759344,
-   -0.564825,   -3.994680,   0.954710,   -5.014144,   6.592329,   1.599488,
-  -13.979146,   -0.391891,  -4.453369,   -2.311242,  -2.948764,   1.761415,
-   -0.138322,   10.433007,  -2.309103,    4.297153,   8.535523,   3.209462,
-    8.695819,    5.569919,   2.514304,    5.582029,   2.060199,   0.642280,
-    7.024616,    1.686615,  -6.481756,    1.343084,  -3.526451,   1.099073,
-   -2.965764,   -0.173723,  -4.111484,    6.528384,  -6.965658,   1.726291,
-    1.535172,   11.023435,   2.338401,   -4.690188,   1.298210,   3.943885,
-    8.407885,    5.168365,   0.684131,    1.559181,   1.859998,   2.852417,
-    8.574070,   -6.369078,   6.023458,   11.837963,  -6.027632,   4.469678,
-   -6.799093,   -2.674048,   6.250367,   -6.809971,  -3.459360,   9.112410,
-   -2.711621,   -1.336678,   1.564249,   -1.564297,  -1.296760,   8.904013,
-   -3.230109,    6.878013,  -7.819823,    3.369909,  -1.657410,  -2.007358,
-   -4.112825,    1.370685,  -3.420525,   -6.276605,   3.244873,  -3.352638,
-    1.545372,    0.902211,   0.197489,   -1.408732,   0.523390,   0.348440, 0
-};
-
-
-/* ----------------------------------------------------------------------
-* Declare Global variables
-* ------------------------------------------------------------------- */
-uint32_t srcALen = 64;   /* Length of Input A */
-uint32_t srcBLen = 64;   /* Length of Input B */
-uint32_t outLen;         /* Length of convolution output */
-float32_t snr;           /* output SNR */
-
-int32_t main(void)
-{
-  arm_status status;                           /* Status of the example */
-  arm_cfft_radix4_instance_f32 cfft_instance;  /* CFFT Structure instance */
-
-  /* CFFT Structure instance pointer */
-  arm_cfft_radix4_instance_f32 *cfft_instance_ptr =
-      (arm_cfft_radix4_instance_f32*) &cfft_instance;
-
-  /* output length of convolution */
-  outLen = srcALen + srcBLen - 1;
-
-  /* Initialise the fft input buffers with all zeros */
-  arm_fill_f32(0.0,  Ak, MAX_BLOCKSIZE);
-  arm_fill_f32(0.0,  Bk, MAX_BLOCKSIZE);
-
-  /* Copy the input values to the fft input buffers */
-  arm_copy_f32(testInputA_f32,  Ak, MAX_BLOCKSIZE/2);
-  arm_copy_f32(testInputB_f32,  Bk, MAX_BLOCKSIZE/2);
-
-  /* Initialize the CFFT function to compute 64 point fft */
-  status = arm_cfft_radix4_init_f32(cfft_instance_ptr, 64, 0, 1);
-
-  /* Transform input a[n] from time domain to frequency domain A[k] */
-  arm_cfft_radix4_f32(cfft_instance_ptr, Ak);
-  /* Transform input b[n] from time domain to frequency domain B[k] */
-  arm_cfft_radix4_f32(cfft_instance_ptr, Bk);
-
-  /* Complex Multiplication of the two input buffers in frequency domain */
-  arm_cmplx_mult_cmplx_f32(Ak, Bk, AxB, MAX_BLOCKSIZE/2);
-
-  /* Initialize the CIFFT function to compute 64 point ifft */
-  status = arm_cfft_radix4_init_f32(cfft_instance_ptr, 64, 1, 1);
-
-  /* Transform the multiplication output from frequency domain to time domain,
-     that gives the convolved output  */
-  arm_cfft_radix4_f32(cfft_instance_ptr, AxB);
-
-  /* SNR Calculation */
-  snr = arm_snr_f32((float32_t *)testRefOutput_f32, AxB, srcALen + srcBLen - 1);
-
-  /* Compare the SNR with threshold to test whether the
-     computed output is matched with the reference output values. */
-  if( snr > SNR_THRESHOLD)
-  {
-    status = ARM_MATH_SUCCESS;
-  }
-
-  if( status != ARM_MATH_SUCCESS)
-  {
-    while(1);
-  }
-
-  while(1);                             /* main function does not return */
-}
-
- /** \endlink */

+ 0 - 458
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/ARM/math_helper.c

@@ -1,458 +0,0 @@
-/* ----------------------------------------------------------------------   
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.   
-*   
-* $Date:        17. January 2013  
-* $Revision: 	V1.4.0    
-*  
-* Project: 	    CMSIS DSP Library 
-*
-* Title:	    math_helper.c
-*
-* Description:	Definition of all helper functions required.  
-*  
-* Target Processor: Cortex-M4/Cortex-M3
-*  
-* Redistribution and use in source and binary forms, with or without 
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the 
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.  
-* -------------------------------------------------------------------- */
-
-/* ----------------------------------------------------------------------
-*		Include standard header files  
-* -------------------------------------------------------------------- */
-#include<math.h>
-
-/* ----------------------------------------------------------------------
-*		Include project header files  
-* -------------------------------------------------------------------- */
-#include "math_helper.h"
-
-/** 
- * @brief  Caluclation of SNR
- * @param  float* 	Pointer to the reference buffer
- * @param  float*	Pointer to the test buffer
- * @param  uint32_t	total number of samples
- * @return float	SNR
- * The function Caluclates signal to noise ratio for the reference output 
- * and test output 
- */
-
-float arm_snr_f32(float *pRef, float *pTest, uint32_t buffSize)
-{
-  float EnergySignal = 0.0, EnergyError = 0.0;
-  uint32_t i;
-  float SNR;
-  int temp;
-  int *test;
-
-  for (i = 0; i < buffSize; i++)
-    {
- 	  /* Checking for a NAN value in pRef array */
-	  test =   (int *)(&pRef[i]);
-      temp =  *test;
-
-	  if(temp == 0x7FC00000)
-	  {
-	  		return(0);
-	  }
-
-	  /* Checking for a NAN value in pTest array */
-	  test =   (int *)(&pTest[i]);
-      temp =  *test;
-
-	  if(temp == 0x7FC00000)
-	  {
-	  		return(0);
-	  }
-      EnergySignal += pRef[i] * pRef[i];
-      EnergyError += (pRef[i] - pTest[i]) * (pRef[i] - pTest[i]); 
-    }
-
-	/* Checking for a NAN value in EnergyError */
-	test =   (int *)(&EnergyError);
-    temp =  *test;
-
-    if(temp == 0x7FC00000)
-    {
-  		return(0);
-    }
-	
-
-  SNR = 10 * log10 (EnergySignal / EnergyError);
-
-  return (SNR);
-
-}
-
-
-/** 
- * @brief  Provide guard bits for Input buffer
- * @param  q15_t* 	    Pointer to input buffer
- * @param  uint32_t 	blockSize
- * @param  uint32_t 	guard_bits
- * @return none
- * The function Provides the guard bits for the buffer 
- * to avoid overflow 
- */
-
-void arm_provide_guard_bits_q15 (q15_t * input_buf, uint32_t blockSize,
-                            uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < blockSize; i++)
-    {
-      input_buf[i] = input_buf[i] >> guard_bits;
-    }
-}
-
-/** 
- * @brief  Converts float to fixed in q12.20 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point(q12.20) values 
- */
-
-void arm_float_to_q12_20(float *pIn, q31_t * pOut, uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 1048576.0f corresponds to pow(2, 20) */
-      pOut[i] = (q31_t) (pIn[i] * 1048576.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 1.0)
-        {
-          pOut[i] = 0x000FFFFF;
-        }
-    }
-}
-
-/** 
- * @brief  Compare MATLAB Reference Output and ARM Test output
- * @param  q15_t* 	Pointer to Ref buffer
- * @param  q15_t* 	Pointer to Test buffer
- * @param  uint32_t 	number of samples in the buffer
- * @return none 
- */
-
-uint32_t arm_compare_fixed_q15(q15_t *pIn, q15_t * pOut, uint32_t numSamples)
-{
-  uint32_t i; 
-  int32_t diff, diffCrnt = 0;
-  uint32_t maxDiff = 0;
-
-  for (i = 0; i < numSamples; i++)
-  {
-  	diff = pIn[i] - pOut[i];
-  	diffCrnt = (diff > 0) ? diff : -diff;
-
-	if(diffCrnt > maxDiff)
-	{
-		maxDiff = diffCrnt;
-	}	
-  }
-
-  return(maxDiff);
-}
-
-/** 
- * @brief  Compare MATLAB Reference Output and ARM Test output
- * @param  q31_t* 	Pointer to Ref buffer
- * @param  q31_t* 	Pointer to Test buffer
- * @param  uint32_t 	number of samples in the buffer
- * @return none 
- */
-
-uint32_t arm_compare_fixed_q31(q31_t *pIn, q31_t * pOut, uint32_t numSamples)
-{
-  uint32_t i; 
-  int32_t diff, diffCrnt = 0;
-  uint32_t maxDiff = 0;
-
-  for (i = 0; i < numSamples; i++)
-  {
-  	diff = pIn[i] - pOut[i];
-  	diffCrnt = (diff > 0) ? diff : -diff;
-
-	if(diffCrnt > maxDiff)
-	{
-		maxDiff = diffCrnt;
-	}
-  }
-
-  return(maxDiff);
-}
-
-/** 
- * @brief  Provide guard bits for Input buffer
- * @param  q31_t* 	Pointer to input buffer
- * @param  uint32_t 	blockSize
- * @param  uint32_t 	guard_bits
- * @return none
- * The function Provides the guard bits for the buffer 
- * to avoid overflow 
- */
-
-void arm_provide_guard_bits_q31 (q31_t * input_buf, 
-								 uint32_t blockSize,
-                                 uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < blockSize; i++)
-    {
-      input_buf[i] = input_buf[i] >> guard_bits;
-    }
-}
-
-/** 
- * @brief  Provide guard bits for Input buffer
- * @param  q31_t* 	Pointer to input buffer
- * @param  uint32_t 	blockSize
- * @param  uint32_t 	guard_bits
- * @return none
- * The function Provides the guard bits for the buffer 
- * to avoid overflow 
- */
-
-void arm_provide_guard_bits_q7 (q7_t * input_buf, 
-								uint32_t blockSize,
-                                uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < blockSize; i++)
-    {
-      input_buf[i] = input_buf[i] >> guard_bits;
-    }
-}
-
-
-
-/** 
- * @brief  Caluclates number of guard bits 
- * @param  uint32_t 	number of additions
- * @return none
- * The function Caluclates the number of guard bits  
- * depending on the numtaps 
- */
-
-uint32_t arm_calc_guard_bits (uint32_t num_adds)
-{
-  uint32_t i = 1, j = 0;
-
-  if (num_adds == 1)
-    {
-      return (0);
-    }
-
-  while (i < num_adds)
-    {
-      i = i * 2;
-      j++;
-    }
-
-  return (j);
-}
-
-/** 
- * @brief  Converts Q15 to floating-point
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- */
-
-void arm_apply_guard_bits (float32_t * pIn, 
-						   uint32_t numSamples, 
-						   uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-      pIn[i] = pIn[i] * arm_calc_2pow(guard_bits);
-    }
-}
-
-/** 
- * @brief  Calculates pow(2, numShifts)
- * @param  uint32_t 	number of shifts
- * @return pow(2, numShifts)
- */
-uint32_t arm_calc_2pow(uint32_t numShifts)
-{
-
-  uint32_t i, val = 1;
-
-  for (i = 0; i < numShifts; i++)
-    {
-      val = val * 2;
-    }	
-
-  return(val);
-}
-
-
-
-/** 
- * @brief  Converts float to fixed q14 
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q14 (float *pIn, q15_t * pOut, 
-                       uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 16384.0f corresponds to pow(2, 14) */
-      pOut[i] = (q15_t) (pIn[i] * 16384.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 2.0)
-        {
-          pOut[i] = 0x7FFF;
-        }
-
-    }
-
-}
-
- 
-/** 
- * @brief  Converts float to fixed q30 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q30 (float *pIn, q31_t * pOut, 
-					   uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 1073741824.0f corresponds to pow(2, 30) */
-      pOut[i] = (q31_t) (pIn[i] * 1073741824.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 2.0)
-        {
-          pOut[i] = 0x7FFFFFFF;
-        }
-    }
-}
-
-/** 
- * @brief  Converts float to fixed q30 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q29 (float *pIn, q31_t * pOut, 
-					   uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 1073741824.0f corresponds to pow(2, 30) */
-      pOut[i] = (q31_t) (pIn[i] * 536870912.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 4.0)
-        {
-          pOut[i] = 0x7FFFFFFF;
-        }
-    }
-}
-
-
-/** 
- * @brief  Converts float to fixed q28 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q28 (float *pIn, q31_t * pOut, 
-                       uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	/* 268435456.0f corresponds to pow(2, 28) */
-      pOut[i] = (q31_t) (pIn[i] * 268435456.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 8.0)
-        {
-          pOut[i] = 0x7FFFFFFF;
-        }
-    }
-}
-
-/** 
- * @brief  Clip the float values to +/- 1 
- * @param  pIn 	input buffer
- * @param  numSamples 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_clip_f32 (float *pIn, uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-      if(pIn[i] > 1.0f)
-	  {
-	    pIn[i] = 1.0;
-	  }
-	  else if( pIn[i] < -1.0f)
-	  {
-	    pIn[i] = -1.0;
-	  }
-	       
-    }
-}
-
-
-
-

+ 0 - 63
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/ARM/math_helper.h

@@ -1,63 +0,0 @@
-/* ----------------------------------------------------------------------   
-* Copyright (C) 2010-2013 ARM Limited. All rights reserved.   
-*   
-* $Date:        17. January 2013  
-* $Revision: 	V1.4.0   
-*  
-* Project: 	    CMSIS DSP Library 
-*
-* Title:	    math_helper.h
-* 
-* Description:	Prototypes of all helper functions required.  
-*
-* Target Processor: Cortex-M4/Cortex-M3
-*  
-* Redistribution and use in source and binary forms, with or without 
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the 
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.  
-* -------------------------------------------------------------------- */
-
-
-#include "arm_math.h"
-
-#ifndef MATH_HELPER_H
-#define MATH_HELPER_H
-
-float arm_snr_f32(float *pRef, float *pTest,  uint32_t buffSize);  
-void arm_float_to_q12_20(float *pIn, q31_t * pOut, uint32_t numSamples);
-void arm_provide_guard_bits_q15(q15_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
-void arm_provide_guard_bits_q31(q31_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
-void arm_float_to_q14(float *pIn, q15_t *pOut, uint32_t numSamples);
-void arm_float_to_q29(float *pIn, q31_t *pOut, uint32_t numSamples);
-void arm_float_to_q28(float *pIn, q31_t *pOut, uint32_t numSamples);
-void arm_float_to_q30(float *pIn, q31_t *pOut, uint32_t numSamples);
-void arm_clip_f32(float *pIn, uint32_t numSamples);
-uint32_t arm_calc_guard_bits(uint32_t num_adds);
-void arm_apply_guard_bits (float32_t * pIn, uint32_t numSamples, uint32_t guard_bits);
-uint32_t arm_compare_fixed_q15(q15_t *pIn, q15_t * pOut, uint32_t numSamples);
-uint32_t arm_compare_fixed_q31(q31_t *pIn, q31_t *pOut, uint32_t numSamples);
-uint32_t arm_calc_2pow(uint32_t guard_bits);
-#endif
-

+ 0 - 4
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/GCC/Abstract.txt

@@ -1,4 +0,0 @@
-CMSIS DSP_Lib example arm_convolution_example for
-  Cortex-M0, Cortex-M3 and Cortex-M4 with FPU
-
-The example is configured for uVision Simulator

+ 0 - 247
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/GCC/arm_convolution_example_f32.c

@@ -1,247 +0,0 @@
-/* ----------------------------------------------------------------------
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.
-*
-* $Date:         17. January 2013
-* $Revision:     V1.4.0
-*
-* Project:       CMSIS DSP Library
-* Title:         arm_convolution_example_f32.c
-*
-* Description:   Example code demonstrating Convolution of two input signals using fft.
-*
-* Target Processor: Cortex-M4/Cortex-M3
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-* -------------------------------------------------------------------- */
-
-/**
- * @ingroup groupExamples
- */
-
-/**
- * @defgroup ConvolutionExample Convolution Example
- *
- * \par Description:
- * \par
- * Demonstrates the convolution theorem with the use of the Complex FFT, Complex-by-Complex
- * Multiplication, and Support Functions.
- *
- * \par Algorithm:
- * \par
- * The convolution theorem states that convolution in the time domain corresponds to
- * multiplication in the frequency domain. Therefore, the Fourier transform of the convoution of
- * two signals is equal to the product of their individual Fourier transforms.
- * The Fourier transform of a signal can be evaluated efficiently using the Fast Fourier Transform (FFT).
- * \par
- * Two input signals, <code>a[n]</code> and <code>b[n]</code>, with lengths \c n1 and \c n2 respectively,
- * are zero padded so that their lengths become \c N, which is greater than or equal to <code>(n1+n2-1)</code>
- * and is a power of 4 as FFT implementation is radix-4.
- * The convolution of <code>a[n]</code> and <code>b[n]</code> is obtained by taking the FFT of the input
- * signals, multiplying the Fourier transforms of the two signals, and taking the inverse FFT of
- * the multiplied result.
- * \par
- * This is denoted by the following equations:
- * <pre> A[k] = FFT(a[n],N)
- * B[k] = FFT(b[n],N)
- * conv(a[n], b[n]) = IFFT(A[k] * B[k], N)</pre>
- * where <code>A[k]</code> and <code>B[k]</code> are the N-point FFTs of the signals <code>a[n]</code>
- * and <code>b[n]</code> respectively.
- * The length of the convolved signal is <code>(n1+n2-1)</code>.
- *
- * \par Block Diagram:
- * \par
- * \image html Convolution.gif
- *
- * \par Variables Description:
- * \par
- * \li \c testInputA_f32 points to the first input sequence
- * \li \c srcALen length of the first input sequence
- * \li \c testInputB_f32 points to the second input sequence
- * \li \c srcBLen length of the second input sequence
- * \li \c outLen length of convolution output sequence, <code>(srcALen + srcBLen - 1)</code>
- * \li \c AxB points to the output array where the product of individual FFTs of inputs is stored.
- *
- * \par CMSIS DSP Software Library Functions Used:
- * \par
- * - arm_fill_f32()
- * - arm_copy_f32()
- * - arm_cfft_radix4_init_f32()
- * - arm_cfft_radix4_f32()
- * - arm_cmplx_mult_cmplx_f32()
- *
- * <b> Refer  </b>
- * \link arm_convolution_example_f32.c \endlink
- *
- */
-
-
-/** \example arm_convolution_example_f32.c
-  */
-
-#include "arm_math.h"
-#include "math_helper.h"
-
-/* ----------------------------------------------------------------------
-* Defines each of the tests performed
-* ------------------------------------------------------------------- */
-#define MAX_BLOCKSIZE   128
-#define DELTA           (0.000001f)
-#define SNR_THRESHOLD   90
-
-/* ----------------------------------------------------------------------
-* Declare I/O buffers
-* ------------------------------------------------------------------- */
-float32_t Ak[MAX_BLOCKSIZE];        /* Input A */
-float32_t Bk[MAX_BLOCKSIZE];        /* Input B */
-float32_t AxB[MAX_BLOCKSIZE * 2];   /* Output */
-
-/* ----------------------------------------------------------------------
-* Test input data for Floating point Convolution example for 32-blockSize
-* Generated by the MATLAB randn() function
-* ------------------------------------------------------------------- */
-float32_t testInputA_f32[64] =
-{
-  -0.808920,   1.357369,   1.180861,  -0.504544,   1.762637,  -0.703285,
-   1.696966,   0.620571,  -0.151093,  -0.100235,  -0.872382,  -0.403579,
-  -0.860749,  -0.382648,  -1.052338,   0.128113,  -0.646269,   1.093377,
-  -2.209198,   0.471706,   0.408901,   1.266242,   0.598252,   1.176827,
-  -0.203421,   0.213596,  -0.851964,  -0.466958,   0.021841,  -0.698938,
-  -0.604107,   0.461778,  -0.318219,   0.942520,   0.577585,   0.417619,
-   0.614665,   0.563679,  -1.295073,  -0.764437,   0.952194,  -0.859222,
-  -0.618554,  -2.268542,  -1.210592,   1.655853,  -2.627219,  -0.994249,
-  -1.374704,   0.343799,   0.025619,   1.227481,  -0.708031,   0.069355,
-  -1.845228,  -1.570886,   1.010668,  -1.802084,   1.630088,   1.286090,
-  -0.161050,  -0.940794,   0.367961,   0.291907
-
-};
-
-float32_t testInputB_f32[64] =
-{
-   0.933724,   0.046881,   1.316470,   0.438345,   0.332682,   2.094885,
-   0.512081,   0.035546,   0.050894,  -2.320371,   0.168711,  -1.830493,
-  -0.444834,  -1.003242,  -0.531494,  -1.365600,  -0.155420,  -0.757692,
-  -0.431880,  -0.380021,   0.096243,  -0.695835,   0.558850,  -1.648962,
-   0.020369,  -0.363630,   0.887146,   0.845503,  -0.252864,  -0.330397,
-   1.269131,  -1.109295,  -1.027876,   0.135940,   0.116721,  -0.293399,
-  -1.349799,   0.166078,  -0.802201,   0.369367,  -0.964568,  -2.266011,
-   0.465178,   0.651222,  -0.325426,   0.320245,  -0.784178,  -0.579456,
-   0.093374,   0.604778,  -0.048225,   0.376297,  -0.394412,   0.578182,
-  -1.218141,  -1.387326,   0.692462,  -0.631297,   0.153137,  -0.638952,
-  0.635474,   -0.970468,   1.334057,  -0.111370
-};
-
-const float testRefOutput_f32[127] =
-{
-   -0.818943,    1.229484,  -0.533664,    1.016604,   0.341875,  -1.963656,
-    5.171476,    3.478033,   7.616361,    6.648384,   0.479069,   1.792012,
-   -1.295591,   -7.447818,   0.315830,  -10.657445,  -2.483469,  -6.524236,
-   -7.380591,   -3.739005,  -8.388957,    0.184147,  -1.554888,   3.786508,
-   -1.684421,    5.400610,  -1.578126,    7.403361,   8.315999,   2.080267,
-   11.077776,    2.749673,   7.138962,    2.748762,   0.660363,   0.981552,
-    1.442275,    0.552721,  -2.576892,    4.703989,   0.989156,   8.759344,
-   -0.564825,   -3.994680,   0.954710,   -5.014144,   6.592329,   1.599488,
-  -13.979146,   -0.391891,  -4.453369,   -2.311242,  -2.948764,   1.761415,
-   -0.138322,   10.433007,  -2.309103,    4.297153,   8.535523,   3.209462,
-    8.695819,    5.569919,   2.514304,    5.582029,   2.060199,   0.642280,
-    7.024616,    1.686615,  -6.481756,    1.343084,  -3.526451,   1.099073,
-   -2.965764,   -0.173723,  -4.111484,    6.528384,  -6.965658,   1.726291,
-    1.535172,   11.023435,   2.338401,   -4.690188,   1.298210,   3.943885,
-    8.407885,    5.168365,   0.684131,    1.559181,   1.859998,   2.852417,
-    8.574070,   -6.369078,   6.023458,   11.837963,  -6.027632,   4.469678,
-   -6.799093,   -2.674048,   6.250367,   -6.809971,  -3.459360,   9.112410,
-   -2.711621,   -1.336678,   1.564249,   -1.564297,  -1.296760,   8.904013,
-   -3.230109,    6.878013,  -7.819823,    3.369909,  -1.657410,  -2.007358,
-   -4.112825,    1.370685,  -3.420525,   -6.276605,   3.244873,  -3.352638,
-    1.545372,    0.902211,   0.197489,   -1.408732,   0.523390,   0.348440, 0
-};
-
-
-/* ----------------------------------------------------------------------
-* Declare Global variables
-* ------------------------------------------------------------------- */
-uint32_t srcALen = 64;   /* Length of Input A */
-uint32_t srcBLen = 64;   /* Length of Input B */
-uint32_t outLen;         /* Length of convolution output */
-float32_t snr;           /* output SNR */
-
-int32_t main(void)
-{
-  arm_status status;                           /* Status of the example */
-  arm_cfft_radix4_instance_f32 cfft_instance;  /* CFFT Structure instance */
-
-  /* CFFT Structure instance pointer */
-  arm_cfft_radix4_instance_f32 *cfft_instance_ptr =
-      (arm_cfft_radix4_instance_f32*) &cfft_instance;
-
-  /* output length of convolution */
-  outLen = srcALen + srcBLen - 1;
-
-  /* Initialise the fft input buffers with all zeros */
-  arm_fill_f32(0.0,  Ak, MAX_BLOCKSIZE);
-  arm_fill_f32(0.0,  Bk, MAX_BLOCKSIZE);
-
-  /* Copy the input values to the fft input buffers */
-  arm_copy_f32(testInputA_f32,  Ak, MAX_BLOCKSIZE/2);
-  arm_copy_f32(testInputB_f32,  Bk, MAX_BLOCKSIZE/2);
-
-  /* Initialize the CFFT function to compute 64 point fft */
-  status = arm_cfft_radix4_init_f32(cfft_instance_ptr, 64, 0, 1);
-
-  /* Transform input a[n] from time domain to frequency domain A[k] */
-  arm_cfft_radix4_f32(cfft_instance_ptr, Ak);
-  /* Transform input b[n] from time domain to frequency domain B[k] */
-  arm_cfft_radix4_f32(cfft_instance_ptr, Bk);
-
-  /* Complex Multiplication of the two input buffers in frequency domain */
-  arm_cmplx_mult_cmplx_f32(Ak, Bk, AxB, MAX_BLOCKSIZE/2);
-
-  /* Initialize the CIFFT function to compute 64 point ifft */
-  status = arm_cfft_radix4_init_f32(cfft_instance_ptr, 64, 1, 1);
-
-  /* Transform the multiplication output from frequency domain to time domain,
-     that gives the convolved output  */
-  arm_cfft_radix4_f32(cfft_instance_ptr, AxB);
-
-  /* SNR Calculation */
-  snr = arm_snr_f32((float32_t *)testRefOutput_f32, AxB, srcALen + srcBLen - 1);
-
-  /* Compare the SNR with threshold to test whether the
-     computed output is matched with the reference output values. */
-  if( snr > SNR_THRESHOLD)
-  {
-    status = ARM_MATH_SUCCESS;
-  }
-
-  if( status != ARM_MATH_SUCCESS)
-  {
-    while(1);
-  }
-
-  while(1);                             /* main function does not return */
-}
-
- /** \endlink */

+ 0 - 458
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/GCC/math_helper.c

@@ -1,458 +0,0 @@
-/* ----------------------------------------------------------------------   
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.   
-*   
-* $Date:        17. January 2013  
-* $Revision: 	V1.4.0    
-*  
-* Project: 	    CMSIS DSP Library 
-*
-* Title:	    math_helper.c
-*
-* Description:	Definition of all helper functions required.  
-*  
-* Target Processor: Cortex-M4/Cortex-M3
-*  
-* Redistribution and use in source and binary forms, with or without 
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the 
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.  
-* -------------------------------------------------------------------- */
-
-/* ----------------------------------------------------------------------
-*		Include standard header files  
-* -------------------------------------------------------------------- */
-#include<math.h>
-
-/* ----------------------------------------------------------------------
-*		Include project header files  
-* -------------------------------------------------------------------- */
-#include "math_helper.h"
-
-/** 
- * @brief  Caluclation of SNR
- * @param  float* 	Pointer to the reference buffer
- * @param  float*	Pointer to the test buffer
- * @param  uint32_t	total number of samples
- * @return float	SNR
- * The function Caluclates signal to noise ratio for the reference output 
- * and test output 
- */
-
-float arm_snr_f32(float *pRef, float *pTest, uint32_t buffSize)
-{
-  float EnergySignal = 0.0, EnergyError = 0.0;
-  uint32_t i;
-  float SNR;
-  int temp;
-  int *test;
-
-  for (i = 0; i < buffSize; i++)
-    {
- 	  /* Checking for a NAN value in pRef array */
-	  test =   (int *)(&pRef[i]);
-      temp =  *test;
-
-	  if(temp == 0x7FC00000)
-	  {
-	  		return(0);
-	  }
-
-	  /* Checking for a NAN value in pTest array */
-	  test =   (int *)(&pTest[i]);
-      temp =  *test;
-
-	  if(temp == 0x7FC00000)
-	  {
-	  		return(0);
-	  }
-      EnergySignal += pRef[i] * pRef[i];
-      EnergyError += (pRef[i] - pTest[i]) * (pRef[i] - pTest[i]); 
-    }
-
-	/* Checking for a NAN value in EnergyError */
-	test =   (int *)(&EnergyError);
-    temp =  *test;
-
-    if(temp == 0x7FC00000)
-    {
-  		return(0);
-    }
-	
-
-  SNR = 10 * log10 (EnergySignal / EnergyError);
-
-  return (SNR);
-
-}
-
-
-/** 
- * @brief  Provide guard bits for Input buffer
- * @param  q15_t* 	    Pointer to input buffer
- * @param  uint32_t 	blockSize
- * @param  uint32_t 	guard_bits
- * @return none
- * The function Provides the guard bits for the buffer 
- * to avoid overflow 
- */
-
-void arm_provide_guard_bits_q15 (q15_t * input_buf, uint32_t blockSize,
-                            uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < blockSize; i++)
-    {
-      input_buf[i] = input_buf[i] >> guard_bits;
-    }
-}
-
-/** 
- * @brief  Converts float to fixed in q12.20 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point(q12.20) values 
- */
-
-void arm_float_to_q12_20(float *pIn, q31_t * pOut, uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 1048576.0f corresponds to pow(2, 20) */
-      pOut[i] = (q31_t) (pIn[i] * 1048576.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 1.0)
-        {
-          pOut[i] = 0x000FFFFF;
-        }
-    }
-}
-
-/** 
- * @brief  Compare MATLAB Reference Output and ARM Test output
- * @param  q15_t* 	Pointer to Ref buffer
- * @param  q15_t* 	Pointer to Test buffer
- * @param  uint32_t 	number of samples in the buffer
- * @return none 
- */
-
-uint32_t arm_compare_fixed_q15(q15_t *pIn, q15_t * pOut, uint32_t numSamples)
-{
-  uint32_t i; 
-  int32_t diff, diffCrnt = 0;
-  uint32_t maxDiff = 0;
-
-  for (i = 0; i < numSamples; i++)
-  {
-  	diff = pIn[i] - pOut[i];
-  	diffCrnt = (diff > 0) ? diff : -diff;
-
-	if(diffCrnt > maxDiff)
-	{
-		maxDiff = diffCrnt;
-	}	
-  }
-
-  return(maxDiff);
-}
-
-/** 
- * @brief  Compare MATLAB Reference Output and ARM Test output
- * @param  q31_t* 	Pointer to Ref buffer
- * @param  q31_t* 	Pointer to Test buffer
- * @param  uint32_t 	number of samples in the buffer
- * @return none 
- */
-
-uint32_t arm_compare_fixed_q31(q31_t *pIn, q31_t * pOut, uint32_t numSamples)
-{
-  uint32_t i; 
-  int32_t diff, diffCrnt = 0;
-  uint32_t maxDiff = 0;
-
-  for (i = 0; i < numSamples; i++)
-  {
-  	diff = pIn[i] - pOut[i];
-  	diffCrnt = (diff > 0) ? diff : -diff;
-
-	if(diffCrnt > maxDiff)
-	{
-		maxDiff = diffCrnt;
-	}
-  }
-
-  return(maxDiff);
-}
-
-/** 
- * @brief  Provide guard bits for Input buffer
- * @param  q31_t* 	Pointer to input buffer
- * @param  uint32_t 	blockSize
- * @param  uint32_t 	guard_bits
- * @return none
- * The function Provides the guard bits for the buffer 
- * to avoid overflow 
- */
-
-void arm_provide_guard_bits_q31 (q31_t * input_buf, 
-								 uint32_t blockSize,
-                                 uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < blockSize; i++)
-    {
-      input_buf[i] = input_buf[i] >> guard_bits;
-    }
-}
-
-/** 
- * @brief  Provide guard bits for Input buffer
- * @param  q31_t* 	Pointer to input buffer
- * @param  uint32_t 	blockSize
- * @param  uint32_t 	guard_bits
- * @return none
- * The function Provides the guard bits for the buffer 
- * to avoid overflow 
- */
-
-void arm_provide_guard_bits_q7 (q7_t * input_buf, 
-								uint32_t blockSize,
-                                uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < blockSize; i++)
-    {
-      input_buf[i] = input_buf[i] >> guard_bits;
-    }
-}
-
-
-
-/** 
- * @brief  Caluclates number of guard bits 
- * @param  uint32_t 	number of additions
- * @return none
- * The function Caluclates the number of guard bits  
- * depending on the numtaps 
- */
-
-uint32_t arm_calc_guard_bits (uint32_t num_adds)
-{
-  uint32_t i = 1, j = 0;
-
-  if (num_adds == 1)
-    {
-      return (0);
-    }
-
-  while (i < num_adds)
-    {
-      i = i * 2;
-      j++;
-    }
-
-  return (j);
-}
-
-/** 
- * @brief  Converts Q15 to floating-point
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- */
-
-void arm_apply_guard_bits (float32_t * pIn, 
-						   uint32_t numSamples, 
-						   uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-      pIn[i] = pIn[i] * arm_calc_2pow(guard_bits);
-    }
-}
-
-/** 
- * @brief  Calculates pow(2, numShifts)
- * @param  uint32_t 	number of shifts
- * @return pow(2, numShifts)
- */
-uint32_t arm_calc_2pow(uint32_t numShifts)
-{
-
-  uint32_t i, val = 1;
-
-  for (i = 0; i < numShifts; i++)
-    {
-      val = val * 2;
-    }	
-
-  return(val);
-}
-
-
-
-/** 
- * @brief  Converts float to fixed q14 
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q14 (float *pIn, q15_t * pOut, 
-                       uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 16384.0f corresponds to pow(2, 14) */
-      pOut[i] = (q15_t) (pIn[i] * 16384.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 2.0)
-        {
-          pOut[i] = 0x7FFF;
-        }
-
-    }
-
-}
-
- 
-/** 
- * @brief  Converts float to fixed q30 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q30 (float *pIn, q31_t * pOut, 
-					   uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 1073741824.0f corresponds to pow(2, 30) */
-      pOut[i] = (q31_t) (pIn[i] * 1073741824.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 2.0)
-        {
-          pOut[i] = 0x7FFFFFFF;
-        }
-    }
-}
-
-/** 
- * @brief  Converts float to fixed q30 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q29 (float *pIn, q31_t * pOut, 
-					   uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 1073741824.0f corresponds to pow(2, 30) */
-      pOut[i] = (q31_t) (pIn[i] * 536870912.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 4.0)
-        {
-          pOut[i] = 0x7FFFFFFF;
-        }
-    }
-}
-
-
-/** 
- * @brief  Converts float to fixed q28 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q28 (float *pIn, q31_t * pOut, 
-                       uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	/* 268435456.0f corresponds to pow(2, 28) */
-      pOut[i] = (q31_t) (pIn[i] * 268435456.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 8.0)
-        {
-          pOut[i] = 0x7FFFFFFF;
-        }
-    }
-}
-
-/** 
- * @brief  Clip the float values to +/- 1 
- * @param  pIn 	input buffer
- * @param  numSamples 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_clip_f32 (float *pIn, uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-      if(pIn[i] > 1.0f)
-	  {
-	    pIn[i] = 1.0;
-	  }
-	  else if( pIn[i] < -1.0f)
-	  {
-	    pIn[i] = -1.0;
-	  }
-	       
-    }
-}
-
-
-
-

+ 0 - 63
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_convolution_example/GCC/math_helper.h

@@ -1,63 +0,0 @@
-/* ----------------------------------------------------------------------   
-* Copyright (C) 2010-2013 ARM Limited. All rights reserved.   
-*   
-* $Date:        17. January 2013  
-* $Revision: 	V1.4.0   
-*  
-* Project: 	    CMSIS DSP Library 
-*
-* Title:	    math_helper.h
-* 
-* Description:	Prototypes of all helper functions required.  
-*
-* Target Processor: Cortex-M4/Cortex-M3
-*  
-* Redistribution and use in source and binary forms, with or without 
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the 
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.  
-* -------------------------------------------------------------------- */
-
-
-#include "arm_math.h"
-
-#ifndef MATH_HELPER_H
-#define MATH_HELPER_H
-
-float arm_snr_f32(float *pRef, float *pTest,  uint32_t buffSize);  
-void arm_float_to_q12_20(float *pIn, q31_t * pOut, uint32_t numSamples);
-void arm_provide_guard_bits_q15(q15_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
-void arm_provide_guard_bits_q31(q31_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
-void arm_float_to_q14(float *pIn, q15_t *pOut, uint32_t numSamples);
-void arm_float_to_q29(float *pIn, q31_t *pOut, uint32_t numSamples);
-void arm_float_to_q28(float *pIn, q31_t *pOut, uint32_t numSamples);
-void arm_float_to_q30(float *pIn, q31_t *pOut, uint32_t numSamples);
-void arm_clip_f32(float *pIn, uint32_t numSamples);
-uint32_t arm_calc_guard_bits(uint32_t num_adds);
-void arm_apply_guard_bits (float32_t * pIn, uint32_t numSamples, uint32_t guard_bits);
-uint32_t arm_compare_fixed_q15(q15_t *pIn, q15_t * pOut, uint32_t numSamples);
-uint32_t arm_compare_fixed_q31(q31_t *pIn, q31_t *pOut, uint32_t numSamples);
-uint32_t arm_calc_2pow(uint32_t guard_bits);
-#endif
-

+ 0 - 4
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_dotproduct_example/ARM/Abstract.txt

@@ -1,4 +0,0 @@
-CMSIS DSP_Lib example arm_dotproduct_example for
-  Cortex-M0, Cortex-M3 and Cortex-M4 with FPU
-
-The example is configured for uVision Simulator

+ 0 - 178
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_dotproduct_example/ARM/arm_dotproduct_example_f32.c

@@ -1,178 +0,0 @@
-/* ----------------------------------------------------------------------
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.
-*
-* $Date:         17. January 2013
-* $Revision:     V1.4.0
-*
-* Project:       CMSIS DSP Library
-* Title:         arm_dotproduct_example_f32.c
-*
-* Description:   Example code computing dot product of two vectors.
-*
-* Target Processor: Cortex-M4/Cortex-M3
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
- * -------------------------------------------------------------------- */
-
-/**
- * @ingroup groupExamples
- */
-
-/**
- * @defgroup DotproductExample Dot Product Example
- *
- * \par Description:
- * \par
- * Demonstrates the use of the Multiply and Add functions to perform the dot product.
- * The dot product of two vectors is obtained by multiplying corresponding elements
- * and summing the products.
-
- * \par Algorithm:
- * \par
- * The two input vectors \c A and \c B with length \c n, are multiplied element-by-element
- * and then added to obtain dot product.
- * \par
- * This is denoted by the following equation:
- *         <pre>  dotProduct = A[0] * B[0] + A[1] * B[1] + ... + A[n-1] * B[n-1]</pre>
- *
- * \par Block Diagram:
- * \par
- * \image html dotProduct.gif
- *
- * \par Variables Description:
- * \par
- * \li \c srcA_buf_f32 points to first input vector
- * \li \c srcB_buf_f32 points to second input vector
- * \li \c testOutput   stores dot product of the two input vectors.
- *
- * \par CMSIS DSP Software Library Functions Used:
- * \par
- * - arm_mult_f32()
- * - arm_add_f32()
- *
- * <b> Refer  </b>
- * \link arm_dotproduct_example_f32.c \endlink
- *
- */
-
-
-/** \example arm_dotproduct_example_f32.c
-  */
-
-#include <math.h>
-#include "arm_math.h"
-
-/* ----------------------------------------------------------------------
-* Defines each of the tests performed
-* ------------------------------------------------------------------- */
-#define MAX_BLOCKSIZE     32
-#define DELTA           (0.000001f)
-
-/* ----------------------------------------------------------------------
-* Test input data for Floating point Dot Product example for 32-blockSize
-* Generated by the MATLAB randn() function
-* ------------------------------------------------------------------- */
-/* ----------------------------------------------------------------------
-** Test input data of srcA for blockSize 32
-** ------------------------------------------------------------------- */
-float32_t srcA_buf_f32[MAX_BLOCKSIZE] =
-{
-  -0.4325648115282207,  -1.6655843782380970,  0.1253323064748307,
-   0.2876764203585489,  -1.1464713506814637,  1.1909154656429988,
-   1.1891642016521031,  -0.0376332765933176,  0.3272923614086541,
-   0.1746391428209245,  -0.1867085776814394,  0.7257905482933027,
-  -0.5883165430141887,   2.1831858181971011, -0.1363958830865957,
-   0.1139313135208096,   1.0667682113591888,  0.0592814605236053,
-  -0.0956484054836690,  -0.8323494636500225,  0.2944108163926404,
-  -1.3361818579378040,   0.7143245518189522,  1.6235620644462707,
-  -0.6917757017022868,   0.8579966728282626,  1.2540014216025324,
-  -1.5937295764474768,  -1.4409644319010200,  0.5711476236581780,
-  -0.3998855777153632,   0.6899973754643451
-};
-
-/* ----------------------------------------------------------------------
-** Test input data of srcB for blockSize 32
-** ------------------------------------------------------------------- */
-float32_t srcB_buf_f32[MAX_BLOCKSIZE] =
-{
-   1.7491401329284098,  0.1325982188803279,   0.3252281811989881,
-  -0.7938091410349637,  0.3149236145048914,  -0.5272704888029532,
-   0.9322666565031119,  1.1646643544607362,  -2.0456694357357357,
-  -0.6443728590041911,  1.7410657940825480,   0.4867684246821860,
-   1.0488288293660140,  1.4885752747099299,   1.2705014969484090,
-  -1.8561241921210170,  2.1343209047321410,  1.4358467535865909,
-  -0.9173023332875400, -1.1060770780029008,   0.8105708062681296,
-   0.6985430696369063, -0.4015827425012831,   1.2687512030669628,
-  -0.7836083053674872,  0.2132664971465569,   0.7878984786088954,
-   0.8966819356782295, -0.1869172943544062,   1.0131816724341454,
-   0.2484350696132857,  0.0596083377937976
-};
-
-/* Reference dot product output */
-float32_t  refDotProdOut = 5.9273644806352142;
-
-/* ----------------------------------------------------------------------
-* Declare Global variables
-* ------------------------------------------------------------------- */
-float32_t multOutput[MAX_BLOCKSIZE];  /* Intermediate output */
-float32_t testOutput;  /* Final ouput */
-
-arm_status status;   /* Status of the example */
-
-int32_t main(void)
-{
-  uint32_t i;       /* Loop counter */
-  float32_t diff;     /* Difference between reference and test outputs */
-
-  /* Multiplication of two input buffers */
-  arm_mult_f32(srcA_buf_f32, srcB_buf_f32, multOutput, MAX_BLOCKSIZE);
-
-  /* Accumulate the multiplication output values to
-     get the dot product of the two inputs */
-  for(i=0; i< MAX_BLOCKSIZE; i++)
-  {
-    arm_add_f32(&testOutput, &multOutput[i], &testOutput, 1);
-  }
-
-  /* absolute value of difference between ref and test */
-  diff = fabsf(refDotProdOut - testOutput);
-
-  /* Comparison of dot product value with reference */
-  if(diff > DELTA)
-  {
-    status = ARM_MATH_TEST_FAILURE;
-  }
-
-  if( status == ARM_MATH_TEST_FAILURE)
-  {
-    while(1);
-  }
-
-  while(1);                             /* main function does not return */
-}
-
- /** \endlink */

+ 0 - 4
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_dotproduct_example/GCC/Abstract.txt

@@ -1,4 +0,0 @@
-CMSIS DSP_Lib example arm_dotproduct_example for
-  Cortex-M0, Cortex-M3 and Cortex-M4 with FPU
-
-The example is configured for uVision Simulator

+ 0 - 178
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_dotproduct_example/GCC/arm_dotproduct_example_f32.c

@@ -1,178 +0,0 @@
-/* ----------------------------------------------------------------------
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.
-*
-* $Date:         17. January 2013
-* $Revision:     V1.4.0
-*
-* Project:       CMSIS DSP Library
-* Title:         arm_dotproduct_example_f32.c
-*
-* Description:   Example code computing dot product of two vectors.
-*
-* Target Processor: Cortex-M4/Cortex-M3
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
- * -------------------------------------------------------------------- */
-
-/**
- * @ingroup groupExamples
- */
-
-/**
- * @defgroup DotproductExample Dot Product Example
- *
- * \par Description:
- * \par
- * Demonstrates the use of the Multiply and Add functions to perform the dot product.
- * The dot product of two vectors is obtained by multiplying corresponding elements
- * and summing the products.
-
- * \par Algorithm:
- * \par
- * The two input vectors \c A and \c B with length \c n, are multiplied element-by-element
- * and then added to obtain dot product.
- * \par
- * This is denoted by the following equation:
- *         <pre>  dotProduct = A[0] * B[0] + A[1] * B[1] + ... + A[n-1] * B[n-1]</pre>
- *
- * \par Block Diagram:
- * \par
- * \image html dotProduct.gif
- *
- * \par Variables Description:
- * \par
- * \li \c srcA_buf_f32 points to first input vector
- * \li \c srcB_buf_f32 points to second input vector
- * \li \c testOutput   stores dot product of the two input vectors.
- *
- * \par CMSIS DSP Software Library Functions Used:
- * \par
- * - arm_mult_f32()
- * - arm_add_f32()
- *
- * <b> Refer  </b>
- * \link arm_dotproduct_example_f32.c \endlink
- *
- */
-
-
-/** \example arm_dotproduct_example_f32.c
-  */
-
-#include <math.h>
-#include "arm_math.h"
-
-/* ----------------------------------------------------------------------
-* Defines each of the tests performed
-* ------------------------------------------------------------------- */
-#define MAX_BLOCKSIZE     32
-#define DELTA           (0.000001f)
-
-/* ----------------------------------------------------------------------
-* Test input data for Floating point Dot Product example for 32-blockSize
-* Generated by the MATLAB randn() function
-* ------------------------------------------------------------------- */
-/* ----------------------------------------------------------------------
-** Test input data of srcA for blockSize 32
-** ------------------------------------------------------------------- */
-float32_t srcA_buf_f32[MAX_BLOCKSIZE] =
-{
-  -0.4325648115282207,  -1.6655843782380970,  0.1253323064748307,
-   0.2876764203585489,  -1.1464713506814637,  1.1909154656429988,
-   1.1891642016521031,  -0.0376332765933176,  0.3272923614086541,
-   0.1746391428209245,  -0.1867085776814394,  0.7257905482933027,
-  -0.5883165430141887,   2.1831858181971011, -0.1363958830865957,
-   0.1139313135208096,   1.0667682113591888,  0.0592814605236053,
-  -0.0956484054836690,  -0.8323494636500225,  0.2944108163926404,
-  -1.3361818579378040,   0.7143245518189522,  1.6235620644462707,
-  -0.6917757017022868,   0.8579966728282626,  1.2540014216025324,
-  -1.5937295764474768,  -1.4409644319010200,  0.5711476236581780,
-  -0.3998855777153632,   0.6899973754643451
-};
-
-/* ----------------------------------------------------------------------
-** Test input data of srcB for blockSize 32
-** ------------------------------------------------------------------- */
-float32_t srcB_buf_f32[MAX_BLOCKSIZE] =
-{
-   1.7491401329284098,  0.1325982188803279,   0.3252281811989881,
-  -0.7938091410349637,  0.3149236145048914,  -0.5272704888029532,
-   0.9322666565031119,  1.1646643544607362,  -2.0456694357357357,
-  -0.6443728590041911,  1.7410657940825480,   0.4867684246821860,
-   1.0488288293660140,  1.4885752747099299,   1.2705014969484090,
-  -1.8561241921210170,  2.1343209047321410,  1.4358467535865909,
-  -0.9173023332875400, -1.1060770780029008,   0.8105708062681296,
-   0.6985430696369063, -0.4015827425012831,   1.2687512030669628,
-  -0.7836083053674872,  0.2132664971465569,   0.7878984786088954,
-   0.8966819356782295, -0.1869172943544062,   1.0131816724341454,
-   0.2484350696132857,  0.0596083377937976
-};
-
-/* Reference dot product output */
-float32_t  refDotProdOut = 5.9273644806352142;
-
-/* ----------------------------------------------------------------------
-* Declare Global variables
-* ------------------------------------------------------------------- */
-float32_t multOutput[MAX_BLOCKSIZE];  /* Intermediate output */
-float32_t testOutput;  /* Final ouput */
-
-arm_status status;   /* Status of the example */
-
-int32_t main(void)
-{
-  uint32_t i;       /* Loop counter */
-  float32_t diff;     /* Difference between reference and test outputs */
-
-  /* Multiplication of two input buffers */
-  arm_mult_f32(srcA_buf_f32, srcB_buf_f32, multOutput, MAX_BLOCKSIZE);
-
-  /* Accumulate the multiplication output values to
-     get the dot product of the two inputs */
-  for(i=0; i< MAX_BLOCKSIZE; i++)
-  {
-    arm_add_f32(&testOutput, &multOutput[i], &testOutput, 1);
-  }
-
-  /* absolute value of difference between ref and test */
-  diff = fabsf(refDotProdOut - testOutput);
-
-  /* Comparison of dot product value with reference */
-  if(diff > DELTA)
-  {
-    status = ARM_MATH_TEST_FAILURE;
-  }
-
-  if( status == ARM_MATH_TEST_FAILURE)
-  {
-    while(1);
-  }
-
-  while(1);                             /* main function does not return */
-}
-
- /** \endlink */

+ 0 - 4
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/ARM/Abstract.txt

@@ -1,4 +0,0 @@
-CMSIS DSP_Lib example arm_fft_bin_example for
-  Cortex-M0, Cortex-M3 and Cortex-M4 with FPU
-
-The example is configured for uVision Simulator

+ 0 - 308
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/ARM/arm_fft_bin_data.c

@@ -1,308 +0,0 @@
-/* ----------------------------------------------------------------------   
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.   
-*   
-* $Date:        17. January 2013  
-* $Revision: 	V1.4.0   
-*   
-* Project: 	    CMSIS DSP Library   
-* Title:	     	arm_fft_bin_data.c
-*   
-* Description:	 Data file used for example code
-*   
-* Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
-*  
-* Redistribution and use in source and binary forms, with or without 
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the 
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.  
- * -------------------------------------------------------------------- */
-
-#include "arm_math.h"
-
-/* ----------------------------------------------------------------------
-Test Input signal contains 10KHz signal + Uniformly distributed white noise
-** ------------------------------------------------------------------- */
-
-float32_t testInput_f32_10khz[2048] = 
-{   
--0.865129623056441, 	0.000000000000000, 	-2.655020678073846, 	0.000000000000000, 	0.600664612949661, 	0.000000000000000, 	0.080378093886515, 	0.000000000000000, 	
--2.899160484012034, 	0.000000000000000, 	2.563004262857762, 	0.000000000000000, 	3.078328403304206, 	0.000000000000000, 	0.105906778385130, 	0.000000000000000, 	
-0.048366940168201, 	0.000000000000000, 	-0.145696461188734, 	0.000000000000000, 	-0.023417155362879, 	0.000000000000000, 	2.127729174988954, 	0.000000000000000, 	
--1.176633086028377, 	0.000000000000000, 	3.690223557991855, 	0.000000000000000, 	-0.622791766173194, 	0.000000000000000, 	0.722837373872203, 	0.000000000000000, 	
-2.739754205367484, 	0.000000000000000, 	-0.062610410524552, 	0.000000000000000, 	-0.891296810967338, 	0.000000000000000, 	-1.845872258871811, 	0.000000000000000, 	
-1.195039415434387, 	0.000000000000000, 	-2.177388969045026, 	0.000000000000000, 	1.078649103637905, 	0.000000000000000, 	2.570976050490193, 	0.000000000000000, 	
--1.383551403404574, 	0.000000000000000, 	2.392141424058873, 	0.000000000000000, 	2.858002843205065, 	0.000000000000000, 	-3.682433899725536, 	0.000000000000000, 	
--3.488146646451150, 	0.000000000000000, 	1.323468578888120, 	0.000000000000000, 	-0.099771155430726, 	0.000000000000000, 	1.561168082500454, 	0.000000000000000, 	
-1.025026795103179, 	0.000000000000000, 	0.928841900171200, 	0.000000000000000, 	2.930499509864950, 	0.000000000000000, 	2.013349089766430, 	0.000000000000000, 	
-2.381676148486737, 	0.000000000000000, 	-3.081062307950236, 	0.000000000000000, 	-0.389579115537544, 	0.000000000000000, 	0.181540149166620, 	0.000000000000000, 	
--2.601953341353208, 	0.000000000000000, 	0.333435137783218, 	0.000000000000000, 	-2.812945856162965, 	0.000000000000000, 	2.649109640172910, 	0.000000000000000, 	
--1.003963025744654, 	0.000000000000000, 	1.552460768755035, 	0.000000000000000, 	0.088641345335247, 	0.000000000000000, 	-2.519951327113426, 	0.000000000000000, 	
--4.341348988610527, 	0.000000000000000, 	0.557772429359965, 	0.000000000000000, 	-1.671267412948494, 	0.000000000000000, 	0.733951350960387, 	0.000000000000000, 	
-0.409263788034864, 	0.000000000000000, 	3.566033071952806, 	0.000000000000000, 	1.882565173848352, 	0.000000000000000, 	-1.106017073793287, 	0.000000000000000, 	
-0.154456720778718, 	0.000000000000000, 	-2.513205795512153, 	0.000000000000000, 	0.310978660939421, 	0.000000000000000, 	0.579706500111723, 	0.000000000000000, 	
-0.000086383683251, 	0.000000000000000, 	-1.311866980897721, 	0.000000000000000, 	1.840007477574986, 	0.000000000000000, 	-3.253005768451345, 	0.000000000000000, 	
-1.462584328739432, 	0.000000000000000, 	1.610103610851738, 	0.000000000000000, 	0.761914676858907, 	0.000000000000000, 	0.974541361089834, 	0.000000000000000, 	
-0.686845845885983, 	0.000000000000000, 	1.849153122025191, 	0.000000000000000, 	0.787800410401453, 	0.000000000000000, 	-1.187438909666279, 	0.000000000000000, 	
--0.754937911044720, 	0.000000000000000, 	0.084373858395232, 	0.000000000000000, 	-2.600269011710521, 	0.000000000000000, 	-0.962982842142644, 	0.000000000000000, 	
--0.369328108540868, 	0.000000000000000, 	0.810791418361879, 	0.000000000000000, 	3.587016488699641, 	0.000000000000000, 	-0.520776145083723, 	0.000000000000000, 	
-0.640249919627884, 	0.000000000000000, 	1.103122489464969, 	0.000000000000000, 	2.231779881455556, 	0.000000000000000, 	-1.308035392685241, 	0.000000000000000, 	
-0.424070304330106, 	0.000000000000000, 	-0.200383932651189, 	0.000000000000000, 	-2.365526783356541, 	0.000000000000000, 	-0.989114757436628, 	0.000000000000000, 	
-2.770807688959777, 	0.000000000000000, 	-0.444172737462307, 	0.000000000000000, 	0.079760979374078, 	0.000000000000000, 	-0.005199118412183, 	0.000000000000000, 	
--0.664712668309527, 	0.000000000000000, 	-0.624171857561896, 	0.000000000000000, 	0.537306979007338, 	0.000000000000000, 	-2.575955675497642, 	0.000000000000000, 	
-1.562363235756780, 	0.000000000000000, 	1.814069369848895, 	0.000000000000000, 	-1.293428583392509, 	0.000000000000000, 	-1.026188449495686, 	0.000000000000000, 	
--2.981771815588717, 	0.000000000000000, 	-4.223468103075124, 	0.000000000000000, 	2.672674782004045, 	0.000000000000000, 	-0.856096801117735, 	0.000000000000000, 	
-0.048517345512563, 	0.000000000000000, 	-0.026860721136222, 	0.000000000000000, 	0.392932277758187, 	0.000000000000000, 	-1.331740855093099, 	0.000000000000000, 	
--1.894292129477081, 	0.000000000000000, 	-1.425006468460681, 	0.000000000000000, 	-2.721772427617057, 	0.000000000000000, 	-1.616831100216806, 	0.000000000000000, 	
-3.551177651488947, 	0.000000000000000, 	-0.069685667896087, 	0.000000000000000, 	-3.134634907409102, 	0.000000000000000, 	-0.263627598944639, 	0.000000000000000, 	
--1.650469945991350, 	0.000000000000000, 	-2.203580339374399, 	0.000000000000000, 	-0.872203246123242, 	0.000000000000000, 	1.230782812607287, 	0.000000000000000, 	
-0.257288860093291, 	0.000000000000000, 	1.989083106173137, 	0.000000000000000, 	-1.985638729453261, 	0.000000000000000, 	-1.416185105842892, 	0.000000000000000, 	
--1.131097688325772, 	0.000000000000000, 	-2.245130805416057, 	0.000000000000000, 	-1.938873996219074, 	0.000000000000000, 	2.043608361562645, 	0.000000000000000, 	
--0.583727989880841, 	0.000000000000000, 	-1.785266378212929, 	0.000000000000000, 	1.961457586224753, 	0.000000000000000, 	1.139400099963223, 	0.000000000000000, 	
--1.979519343363991, 	0.000000000000000, 	2.003023322818429, 	0.000000000000000, 	0.229004069076829, 	0.000000000000000, 	3.452808862193135, 	0.000000000000000, 	
-2.882273808365857, 	0.000000000000000, 	-1.549450501844438, 	0.000000000000000, 	-3.283872089931876, 	0.000000000000000, 	-0.327025884099064, 	0.000000000000000, 	
--0.054979977136430, 	0.000000000000000, 	-1.192280531479012, 	0.000000000000000, 	0.645539328365578, 	0.000000000000000, 	2.300832863404618, 	0.000000000000000, 	
--1.092951789535240, 	0.000000000000000, 	-1.017368249363773, 	0.000000000000000, 	-0.142673056169787, 	0.000000000000000, 	0.831073544881250, 	0.000000000000000, 	
--2.314612531587064, 	0.000000000000000, 	-2.221456299106321, 	0.000000000000000, 	0.460261143885226, 	0.000000000000000, 	0.050585301888595, 	0.000000000000000, 	
-0.364373329183988, 	0.000000000000000, 	-1.685956552069538, 	0.000000000000000, 	0.050664512351055, 	0.000000000000000, 	-0.193355783902718, 	0.000000000000000, 	
--0.158660446046828, 	0.000000000000000, 	2.394156453841953, 	0.000000000000000, 	-1.562965718554525, 	0.000000000000000, 	-2.199750600869900, 	0.000000000000000, 	
-1.544984022381773, 	0.000000000000000, 	-1.988307216807315, 	0.000000000000000, 	-0.628240722541046, 	0.000000000000000, 	-1.436235771505429, 	0.000000000000000, 	
-1.677013691147313, 	0.000000000000000, 	1.600741781678228, 	0.000000000000000, 	-0.757380959134706, 	0.000000000000000, 	-4.784797439515566, 	0.000000000000000, 	
-0.265121462834569, 	0.000000000000000, 	3.862029485934378, 	0.000000000000000, 	2.386823577249430, 	0.000000000000000, 	-3.655779745436893, 	0.000000000000000, 	
--0.763541621368016, 	0.000000000000000, 	-1.182140388432962, 	0.000000000000000, 	-1.349106114858063, 	0.000000000000000, 	-2.287533624396759, 	0.000000000000000, 	
--0.028603745188423, 	0.000000000000000, 	-1.353580755934427, 	0.000000000000000, 	0.461602380352937, 	0.000000000000000, 	-0.059599055078928, 	0.000000000000000, 	
--0.929946734342228, 	0.000000000000000, 	0.065773089295561, 	0.000000000000000, 	1.106565863102982, 	0.000000000000000, 	4.719295086373593, 	0.000000000000000, 	
--2.108377703544395, 	0.000000000000000, 	-2.226393620240159, 	0.000000000000000, 	1.375668397437521, 	0.000000000000000, 	-0.960772428525443, 	0.000000000000000, 	
--2.156313465390571, 	0.000000000000000, 	1.126060012375311, 	0.000000000000000, 	2.756485137030720, 	0.000000000000000, 	0.739639690862600, 	0.000000000000000, 	
-3.914769510295006, 	0.000000000000000, 	1.685232785586675, 	0.000000000000000, 	4.079058040970612, 	0.000000000000000, 	-1.174598301660513, 	0.000000000000000, 	
--2.885776587275580, 	0.000000000000000, 	-0.241073635188767, 	0.000000000000000, 	3.080489872502403, 	0.000000000000000, 	-2.051244183999421, 	0.000000000000000, 	
-0.664330486845139, 	0.000000000000000, 	-1.697798999370016, 	0.000000000000000, 	1.452369423649782, 	0.000000000000000, 	-1.523532831019280, 	0.000000000000000, 	
-0.171981186587481, 	0.000000000000000, 	-4.685274721583927, 	0.000000000000000, 	-1.336175835319380, 	0.000000000000000, 	1.419070770428945, 	0.000000000000000, 	
--0.035791601713475, 	0.000000000000000, 	2.291937971632081, 	0.000000000000000, 	-1.962559313450293, 	0.000000000000000, 	-4.831595589339301, 	0.000000000000000, 	
--1.857055284000925, 	0.000000000000000, 	2.606271522635512, 	0.000000000000000, 	-0.576447978738030, 	0.000000000000000, 	0.082299166967720, 	0.000000000000000, 	
-1.888399453494614, 	0.000000000000000, 	-3.564705298046079, 	0.000000000000000, 	-0.939357831083889, 	0.000000000000000, 	-1.903578203697778, 	0.000000000000000, 	
--2.642492215447250, 	0.000000000000000, 	-0.182990405251017, 	0.000000000000000, 	3.742026478011174, 	0.000000000000000, 	0.104295803798333, 	0.000000000000000, 	
-1.848678195370347, 	0.000000000000000, 	-1.887384346896369, 	0.000000000000000, 	0.365048973046045, 	0.000000000000000, 	-0.889638010354219, 	0.000000000000000, 	
-1.173877118428863, 	0.000000000000000, 	-1.178562827540109, 	0.000000000000000, 	0.610271645685184, 	0.000000000000000, 	1.831284815697871, 	0.000000000000000, 	
-0.449575390102283, 	0.000000000000000, 	1.597171905253443, 	0.000000000000000, 	3.918574971904773, 	0.000000000000000, 	0.868104027970404, 	0.000000000000000, 	
-0.582643134746494, 	0.000000000000000, 	2.321256382353331, 	0.000000000000000, 	-0.238118642223180, 	0.000000000000000, 	-2.890287868054370, 	0.000000000000000, 	
-0.970995414625622, 	0.000000000000000, 	0.666137930891283, 	0.000000000000000, 	-0.202435718709502, 	0.000000000000000, 	2.057930200518194, 	0.000000000000000, 	
-3.120583443719949, 	0.000000000000000, 	-0.863945271701041, 	0.000000000000000, 	0.906848893874630, 	0.000000000000000, 	-1.434124930222570, 	0.000000000000000, 	
-0.754659384848783, 	0.000000000000000, 	-5.224154442713778, 	0.000000000000000, 	2.330229744098967, 	0.000000000000000, 	1.113946320164698, 	0.000000000000000, 	
-0.523324920322840, 	0.000000000000000, 	1.750740911548348, 	0.000000000000000, 	-0.899333972913577, 	0.000000000000000, 	0.228705845203506, 	0.000000000000000, 	
--1.934782624767648, 	0.000000000000000, 	-3.508386237231303, 	0.000000000000000, 	-2.107108523073510, 	0.000000000000000, 	0.380587645474815, 	0.000000000000000, 	
--0.476200877183279, 	0.000000000000000, 	-2.172086712642198, 	0.000000000000000, 	1.795372535780299, 	0.000000000000000, 	-2.100318983391055, 	0.000000000000000, 	
--0.022571122461405, 	0.000000000000000, 	0.674514020010955, 	0.000000000000000, 	-0.148872569390857, 	0.000000000000000, 	0.298175890592737, 	0.000000000000000, 	
--1.134244492493590, 	0.000000000000000, 	-3.146848422289455, 	0.000000000000000, 	-1.357950199087602, 	0.000000000000000, 	0.667362732020878, 	0.000000000000000, 	
--3.119397998316724, 	0.000000000000000, 	-1.189341126297637, 	0.000000000000000, 	-1.532744386856668, 	0.000000000000000, 	-1.672972484202534, 	0.000000000000000, 	
--2.042283373871558, 	0.000000000000000, 	-1.479481547595924, 	0.000000000000000, 	-0.002668662875396, 	0.000000000000000, 	0.262737760129546, 	0.000000000000000, 	
-2.734456080621830, 	0.000000000000000, 	-0.671945925075102, 	0.000000000000000, 	-3.735078262179111, 	0.000000000000000, 	-0.161705013319883, 	0.000000000000000, 	
-0.748963512361001, 	0.000000000000000, 	1.128046374367600, 	0.000000000000000, 	0.649651335592966, 	0.000000000000000, 	1.880020215025867, 	0.000000000000000, 	
--1.095632293842306, 	0.000000000000000, 	1.197764876160487, 	0.000000000000000, 	0.323646656252985, 	0.000000000000000, 	-1.655502751114502, 	0.000000000000000, 	
-3.666399062961496, 	0.000000000000000, 	-0.334060899735197, 	0.000000000000000, 	-2.119056978738397, 	0.000000000000000, 	3.721375117275012, 	0.000000000000000, 	
-0.044874186872307, 	0.000000000000000, 	-2.733053897593234, 	0.000000000000000, 	1.590700278891042, 	0.000000000000000, 	3.215711772781902, 	0.000000000000000, 	
--1.792085012843801, 	0.000000000000000, 	-0.405797188885475, 	0.000000000000000, 	-0.628080020080892, 	0.000000000000000, 	-1.831815840843960, 	0.000000000000000, 	
-2.973656862522834, 	0.000000000000000, 	-0.212032655138417, 	0.000000000000000, 	0.372437389437234, 	0.000000000000000, 	-1.614030579023492, 	0.000000000000000, 	
--0.704900996358698, 	0.000000000000000, 	1.123700273452105, 	0.000000000000000, 	-0.136371848130819, 	0.000000000000000, 	3.020284357635585, 	0.000000000000000, 	
--0.550211350877649, 	0.000000000000000, 	5.101256236381711, 	0.000000000000000, 	3.367051512192333, 	0.000000000000000, 	-4.385131946669234, 	0.000000000000000, 	
--3.967303337694391, 	0.000000000000000, 	-0.965894936640022, 	0.000000000000000, 	0.328366945264681, 	0.000000000000000, 	0.199041562924914, 	0.000000000000000, 	
-1.067681999025495, 	0.000000000000000, 	-1.939516091697170, 	0.000000000000000, 	-1.092980954328824, 	0.000000000000000, 	0.273786079368066, 	0.000000000000000, 	
--0.040928322190265, 	0.000000000000000, 	-0.118368078577437, 	0.000000000000000, 	1.766589628899997, 	0.000000000000000, 	1.738321311635393, 	0.000000000000000, 	
--2.895012794321649, 	0.000000000000000, 	1.213521771395142, 	0.000000000000000, 	0.922971726633985, 	0.000000000000000, 	1.091516563636489, 	0.000000000000000, 	
-3.226378465469620, 	0.000000000000000, 	1.149169778666974, 	0.000000000000000, 	-1.695986327709386, 	0.000000000000000, 	-0.974803077355813, 	0.000000000000000, 	
--4.898035507513607, 	0.000000000000000, 	1.622719302889447, 	0.000000000000000, 	0.583891313586579, 	0.000000000000000, 	-1.677182424094957, 	0.000000000000000, 	
--1.915633132814685, 	0.000000000000000, 	-1.980150370851616, 	0.000000000000000, 	0.604538269404190, 	0.000000000000000, 	0.939862406149365, 	0.000000000000000, 	
--1.266939874246416, 	0.000000000000000, 	-1.494771249200063, 	0.000000000000000, 	0.278042784093988, 	0.000000000000000, 	0.326627416008916, 	0.000000000000000, 	
--1.914530157643303, 	0.000000000000000, 	1.908947721862196, 	0.000000000000000, 	0.531819285694044, 	0.000000000000000, 	3.056856632319658, 	0.000000000000000, 	
--0.389241827774643, 	0.000000000000000, 	-2.418606606780420, 	0.000000000000000, 	0.915299238878703, 	0.000000000000000, 	-0.098774174295283, 	0.000000000000000, 	
--0.906199428444304, 	0.000000000000000, 	0.316716451217743, 	0.000000000000000, 	-4.367700643578311, 	0.000000000000000, 	1.491687997515293, 	0.000000000000000, 	
--1.962381126288365, 	0.000000000000000, 	-0.700829196527045, 	0.000000000000000, 	3.028958963615630, 	0.000000000000000, 	-2.313461067462598, 	0.000000000000000, 	
--1.431933239886712, 	0.000000000000000, 	-0.831153039725342, 	0.000000000000000, 	3.939495598250743, 	0.000000000000000, 	0.342974753984771, 	0.000000000000000, 	
--2.768330763002974, 	0.000000000000000, 	-2.744010370019008, 	0.000000000000000, 	3.821352685212561, 	0.000000000000000, 	4.551065271455856, 	0.000000000000000, 	
-3.270136437041298, 	0.000000000000000, 	-3.188028411950982, 	0.000000000000000, 	-0.777075012417436, 	0.000000000000000, 	0.097110650265216, 	0.000000000000000, 	
-1.221216137608812, 	0.000000000000000, 	-1.325824244541822, 	0.000000000000000, 	-2.655296734084113, 	0.000000000000000, 	-1.074792144885704, 	0.000000000000000, 	
-2.770401584439407, 	0.000000000000000, 	5.240270645610543, 	0.000000000000000, 	0.108576672208892, 	0.000000000000000, 	-1.209394350650142, 	0.000000000000000, 	
-1.403344353838785, 	0.000000000000000, 	-0.299032904177277, 	0.000000000000000, 	4.074959450638227, 	0.000000000000000, 	1.718727473952107, 	0.000000000000000, 	
--3.061349227080806, 	0.000000000000000, 	-1.158596888541269, 	0.000000000000000, 	3.381858904662625, 	0.000000000000000, 	0.957339964054052, 	0.000000000000000, 	
-0.179900074904899, 	0.000000000000000, 	-3.909641902506081, 	0.000000000000000, 	0.805717289408649, 	0.000000000000000, 	2.047413793928261, 	0.000000000000000, 	
--1.273580225826614, 	0.000000000000000, 	-2.681359186869971, 	0.000000000000000, 	-0.721241345822093, 	0.000000000000000, 	-1.613090681569475, 	0.000000000000000, 	
-0.463138804815955, 	0.000000000000000, 	0.377223507800954, 	0.000000000000000, 	2.046550684968141, 	0.000000000000000, 	0.178508732797712, 	0.000000000000000, 	
--0.477815330358845, 	0.000000000000000, 	3.763355908332053, 	0.000000000000000, 	1.300430303035163, 	0.000000000000000, 	-0.214625793857725, 	0.000000000000000, 	
-1.343267891864081, 	0.000000000000000, 	-0.340007682433245, 	0.000000000000000, 	2.062703194680005, 	0.000000000000000, 	0.042032160234235, 	0.000000000000000, 	
-0.643732569732250, 	0.000000000000000, 	-1.913502543857589, 	0.000000000000000, 	3.771340762937158, 	0.000000000000000, 	1.050024807363386, 	0.000000000000000, 	
--4.440489488592649, 	0.000000000000000, 	0.444904302066643, 	0.000000000000000, 	2.898702265650048, 	0.000000000000000, 	1.953232980548558, 	0.000000000000000, 	
-2.761564952735079, 	0.000000000000000, 	1.963537633260397, 	0.000000000000000, 	-2.168858472916215, 	0.000000000000000, 	-4.116235357699841, 	0.000000000000000, 	
-4.183678271896528, 	0.000000000000000, 	0.600422284944681, 	0.000000000000000, 	-0.659352647255126, 	0.000000000000000, 	-0.993127338218109, 	0.000000000000000, 	
--2.463571314945747, 	0.000000000000000, 	0.937720951545881, 	0.000000000000000, 	-3.098957308429730, 	0.000000000000000, 	-2.354719140045463, 	0.000000000000000, 	
--0.417285119323949, 	0.000000000000000, 	2.187974075975947, 	0.000000000000000, 	1.101468905172585, 	0.000000000000000, 	-3.185800678152109, 	0.000000000000000, 	
-2.357534709345083, 	0.000000000000000, 	0.246645606729407, 	0.000000000000000, 	4.440905650784504, 	0.000000000000000, 	-2.236807716637866, 	0.000000000000000, 	
--2.171481518317550, 	0.000000000000000, 	-2.029571795072690, 	0.000000000000000, 	0.135599790431348, 	0.000000000000000, 	-1.277965265520191, 	0.000000000000000, 	
--1.927976233157507, 	0.000000000000000, 	-5.434492783745394, 	0.000000000000000, 	-2.026375829312657, 	0.000000000000000, 	1.009666016819321, 	0.000000000000000, 	
-0.238549782367247, 	0.000000000000000, 	-0.516403923971309, 	0.000000000000000, 	-0.933977817429352, 	0.000000000000000, 	0.155803015935614, 	0.000000000000000, 	
--0.396194809997929, 	0.000000000000000, 	-0.915178100253214, 	0.000000000000000, 	0.666329367985015, 	0.000000000000000, 	-1.517991149945785, 	0.000000000000000, 	
-0.458266744144822, 	0.000000000000000, 	-1.242845974381418, 	0.000000000000000, 	0.057914823556477, 	0.000000000000000, 	0.994101307476875, 	0.000000000000000, 	
--2.387209849199325, 	0.000000000000000, 	0.459297048883826, 	0.000000000000000, 	0.227711405683905, 	0.000000000000000, 	0.030255073506117, 	0.000000000000000, 	
--1.323361608181337, 	0.000000000000000, 	-4.650244457426706, 	0.000000000000000, 	0.062908579526021, 	0.000000000000000, 	3.462831028244432, 	0.000000000000000, 	
-1.303608183314856, 	0.000000000000000, 	-1.430415193881612, 	0.000000000000000, 	-1.672886118942142, 	0.000000000000000, 	0.992890699210099, 	0.000000000000000, 	
--0.160814531784247, 	0.000000000000000, 	-1.238132939350430, 	0.000000000000000, 	-0.589223271459376, 	0.000000000000000, 	2.326363810561534, 	0.000000000000000, 	
--4.433789496230785, 	0.000000000000000, 	1.664686987538929, 	0.000000000000000, 	-2.366128834617921, 	0.000000000000000, 	1.212421570743837, 	0.000000000000000, 	
--4.847914267690055, 	0.000000000000000, 	0.228485221404712, 	0.000000000000000, 	0.466139765470957, 	0.000000000000000, 	-1.344202776943546, 	0.000000000000000, 	
--1.012053673330574, 	0.000000000000000, 	-2.844980626424742, 	0.000000000000000, 	-1.552703722026340, 	0.000000000000000, 	-1.448830983885038, 	0.000000000000000, 	
-0.127010756753980, 	0.000000000000000, 	-1.667188263752299, 	0.000000000000000, 	3.424818052085100, 	0.000000000000000, 	0.956291135453840, 	0.000000000000000, 	
--3.725533331754662, 	0.000000000000000, 	-1.584534272368832, 	0.000000000000000, 	-1.654148210472472, 	0.000000000000000, 	0.701610500675698, 	0.000000000000000, 	
-0.164954538683927, 	0.000000000000000, 	-0.739260064712987, 	0.000000000000000, 	-2.167324026090101, 	0.000000000000000, 	-0.310240491909496, 	0.000000000000000, 	
--2.281790349106906, 	0.000000000000000, 	1.719655331305361, 	0.000000000000000, 	-2.997005923606441, 	0.000000000000000, 	-1.999301431556852, 	0.000000000000000, 	
--0.292229010068828, 	0.000000000000000, 	1.172317994855851, 	0.000000000000000, 	0.196734885241533, 	0.000000000000000, 	2.981365193477068, 	0.000000000000000, 	
-2.637726016926352, 	0.000000000000000, 	1.434045125217982, 	0.000000000000000, 	0.883627180451827, 	0.000000000000000, 	-1.434040761445747, 	0.000000000000000, 	
--1.528891971086553, 	0.000000000000000, 	-3.306913135367542, 	0.000000000000000, 	-0.399059265470646, 	0.000000000000000, 	-0.265674394285178, 	0.000000000000000, 	
-3.502591252855384, 	0.000000000000000, 	0.830301156604454, 	0.000000000000000, 	-0.220021317046083, 	0.000000000000000, 	-0.090553770476646, 	0.000000000000000, 	
-0.771863477047951, 	0.000000000000000, 	1.351209629105760, 	0.000000000000000, 	3.773699756201963, 	0.000000000000000, 	0.472600118752329, 	0.000000000000000, 	
-2.332825668012222, 	0.000000000000000, 	1.853747950314528, 	0.000000000000000, 	0.759515251766178, 	0.000000000000000, 	1.327112776215496, 	0.000000000000000, 	
-2.518730296237868, 	0.000000000000000, 	0.764450208786353, 	0.000000000000000, 	-0.278275349491296, 	0.000000000000000, 	-0.041559465082020, 	0.000000000000000, 	
-1.387166083167787, 	0.000000000000000, 	2.612996769598122, 	0.000000000000000, 	-0.385404831721799, 	0.000000000000000, 	2.005630016170309, 	0.000000000000000, 	
--0.950500047307998, 	0.000000000000000, 	-1.166884021392492, 	0.000000000000000, 	1.432973552928162, 	0.000000000000000, 	2.540370505384567, 	0.000000000000000, 	
--1.140505295054501, 	0.000000000000000, 	-3.673358835201185, 	0.000000000000000, 	-0.450691288038056, 	0.000000000000000, 	1.601024294408014, 	0.000000000000000, 	
-0.773213556014045, 	0.000000000000000, 	2.973873693246168, 	0.000000000000000, 	-1.361548406382279, 	0.000000000000000, 	1.409136332424815, 	0.000000000000000, 	
--0.963382518314713, 	0.000000000000000, 	-2.031268227368161, 	0.000000000000000, 	0.983309972085586, 	0.000000000000000, 	-3.461412488471631, 	0.000000000000000, 	
--2.601124929406039, 	0.000000000000000, 	-0.533896239766343, 	0.000000000000000, 	-2.627129008866350, 	0.000000000000000, 	0.622111169161305, 	0.000000000000000, 	
--1.160926365580422, 	0.000000000000000, 	-2.406196188132628, 	0.000000000000000, 	-1.076870362758737, 	0.000000000000000, 	-1.791866820937175, 	0.000000000000000, 	
--0.749453071522325, 	0.000000000000000, 	-5.324156615990973, 	0.000000000000000, 	-1.038698022238289, 	0.000000000000000, 	-2.106629944730630, 	0.000000000000000, 	
-0.659295598564773, 	0.000000000000000, 	0.520940881580988, 	0.000000000000000, 	-0.055649203928700, 	0.000000000000000, 	0.292096765423137, 	0.000000000000000, 	
--4.663743901790872, 	0.000000000000000, 	-0.125066503391666, 	0.000000000000000, 	-2.452620252445380, 	0.000000000000000, 	-0.712128227397468, 	0.000000000000000, 	
--0.048938037970968, 	0.000000000000000, 	-1.821520226003361, 	0.000000000000000, 	0.810106421304257, 	0.000000000000000, 	-0.196636623956257, 	0.000000000000000, 	
--0.701769836763804, 	0.000000000000000, 	2.460345045649201, 	0.000000000000000, 	3.506597671641116, 	0.000000000000000, 	-2.711322611972225, 	0.000000000000000, 	
--0.658079876600542, 	0.000000000000000, 	-2.040082099646173, 	0.000000000000000, 	2.201668355395807, 	0.000000000000000, 	1.181507395879711, 	0.000000000000000, 	
--1.640739552179682, 	0.000000000000000, 	-1.613393726467190, 	0.000000000000000, 	-1.156741241731352, 	0.000000000000000, 	2.527773464519963, 	0.000000000000000, 	
--0.497040638009502, 	0.000000000000000, 	-0.975817112895589, 	0.000000000000000, 	-2.866830755546166, 	0.000000000000000, 	1.120214498507878, 	0.000000000000000, 	
-5.986771654661698, 	0.000000000000000, 	0.398219252656757, 	0.000000000000000, 	-3.545606013198135, 	0.000000000000000, 	0.312398099396191, 	0.000000000000000, 	
--2.265327979531788, 	0.000000000000000, 	0.792121001107366, 	0.000000000000000, 	-3.736145137670100, 	0.000000000000000, 	0.762228883650802, 	0.000000000000000, 	
-2.283545661214646, 	0.000000000000000, 	3.780020629583529, 	0.000000000000000, 	3.117260228608810, 	0.000000000000000, 	-2.011159255609613, 	0.000000000000000, 	
-0.279107700476072, 	0.000000000000000, 	2.003369134246936, 	0.000000000000000, 	-1.448171234480257, 	0.000000000000000, 	0.584697150310140, 	0.000000000000000, 	
-0.919508663636197, 	0.000000000000000, 	-3.071349141675388, 	0.000000000000000, 	-1.555923649263667, 	0.000000000000000, 	2.232497079438850, 	0.000000000000000, 	
--0.012662139119883, 	0.000000000000000, 	0.372825540734715, 	0.000000000000000, 	2.378543590847629, 	0.000000000000000, 	1.459053407813062, 	0.000000000000000, 	
--0.967913907390927, 	0.000000000000000, 	1.322825200678212, 	0.000000000000000, 	-1.033775820061824, 	0.000000000000000, 	-1.813629552693142, 	0.000000000000000, 	
-4.794348161661486, 	0.000000000000000, 	0.655279811518676, 	0.000000000000000, 	-2.224590138589720, 	0.000000000000000, 	0.595329481295766, 	0.000000000000000, 	
-3.364055988866225, 	0.000000000000000, 	1.863416422998127, 	0.000000000000000, 	1.930305751828105, 	0.000000000000000, 	-0.284467053432545, 	0.000000000000000, 	
--0.923374905878938, 	0.000000000000000, 	1.922988234041399, 	0.000000000000000, 	0.310482143432719, 	0.000000000000000, 	0.332122302397134, 	0.000000000000000, 	
--1.659487472408966, 	0.000000000000000, 	-1.865943507877961, 	0.000000000000000, 	-0.186775297569864, 	0.000000000000000, 	-1.700543850628361, 	0.000000000000000, 	
-0.497157959366735, 	0.000000000000000, 	-0.471244843957418, 	0.000000000000000, 	-0.432013753969948, 	0.000000000000000, 	-4.000189880113231, 	0.000000000000000, 	
--0.415335170016467, 	0.000000000000000, 	0.317311950972859, 	0.000000000000000, 	0.038393428927595, 	0.000000000000000, 	0.177219909465206, 	0.000000000000000, 	
-0.531650958095143, 	0.000000000000000, 	-2.711644985175806, 	0.000000000000000, 	0.328744077805156, 	0.000000000000000, 	-0.938417707547928, 	0.000000000000000, 	
-0.970379584897379, 	0.000000000000000, 	1.873649473917137, 	0.000000000000000, 	0.177938226987023, 	0.000000000000000, 	0.155609346302393, 	0.000000000000000, 	
--1.276504241867208, 	0.000000000000000, 	-0.463725075928807, 	0.000000000000000, 	-0.064748250389500, 	0.000000000000000, 	-1.725568534062385, 	0.000000000000000, 	
--0.139066584804067, 	0.000000000000000, 	1.975514554117767, 	0.000000000000000, 	-0.807063199499478, 	0.000000000000000, 	-0.326926659682788, 	0.000000000000000, 	
-1.445727032487938, 	0.000000000000000, 	-0.597151107739100, 	0.000000000000000, 	2.732557531709386, 	0.000000000000000, 	-2.907130934109188, 	0.000000000000000, 	
--1.461264832679981, 	0.000000000000000, 	-1.708588604968163, 	0.000000000000000, 	3.652851925431363, 	0.000000000000000, 	0.682050868282879, 	0.000000000000000, 	
--0.281312579963294, 	0.000000000000000, 	0.554966483307825, 	0.000000000000000, 	-0.981341739340932, 	0.000000000000000, 	1.279543331141603, 	0.000000000000000, 	
-0.036589747826856, 	0.000000000000000, 	2.312073745896073, 	0.000000000000000, 	1.754682200732425, 	0.000000000000000, 	-0.957515875428627, 	0.000000000000000, 	
--0.833596942819695, 	0.000000000000000, 	0.437054368791033, 	0.000000000000000, 	-0.898819399360279, 	0.000000000000000, 	-0.296050580896839, 	0.000000000000000, 	
--0.785144257649601, 	0.000000000000000, 	-2.541503089003311, 	0.000000000000000, 	2.225075846758761, 	0.000000000000000, 	-1.587290487902002, 	0.000000000000000, 	
--1.421404172056462, 	0.000000000000000, 	-3.015149802293631, 	0.000000000000000, 	1.780874288867949, 	0.000000000000000, 	-0.865812740882613, 	0.000000000000000, 	
--2.845327531197112, 	0.000000000000000, 	1.445225867774367, 	0.000000000000000, 	2.183733236584647, 	0.000000000000000, 	1.163371072749080, 	0.000000000000000, 	
-0.883547693520409, 	0.000000000000000, 	-1.224093106684675, 	0.000000000000000, 	-1.854501116331044, 	0.000000000000000, 	1.783082089255796, 	0.000000000000000, 	
-2.301508706196191, 	0.000000000000000, 	-0.539901944139077, 	0.000000000000000, 	1.962315832319967, 	0.000000000000000, 	-0.060709041870503, 	0.000000000000000, 	
--1.353139923300238, 	0.000000000000000, 	-1.482887537805234, 	0.000000000000000, 	1.273732601967176, 	0.000000000000000, 	-3.456609915556321, 	0.000000000000000, 	
--3.752320586540873, 	0.000000000000000, 	3.536356614978951, 	0.000000000000000, 	0.206035952043233, 	0.000000000000000, 	5.933966913773842, 	0.000000000000000, 	
--0.486633898075490, 	0.000000000000000, 	-0.329595089863342, 	0.000000000000000, 	1.496414153905337, 	0.000000000000000, 	0.137868749388880, 	0.000000000000000, 	
--0.437192030996792, 	0.000000000000000, 	2.682750615210656, 	0.000000000000000, 	-2.440234892848570, 	0.000000000000000, 	1.433910252426186, 	0.000000000000000, 	
--0.415051506104074, 	0.000000000000000, 	1.982003013708649, 	0.000000000000000, 	1.345796609972435, 	0.000000000000000, 	-2.335949513404370, 	0.000000000000000, 	
-1.065988867433025, 	0.000000000000000, 	2.741844905000464, 	0.000000000000000, 	-1.754047930934362, 	0.000000000000000, 	0.229252730015575, 	0.000000000000000, 	
--0.679791016408669, 	0.000000000000000, 	-2.274097820043743, 	0.000000000000000, 	0.149802252231876, 	0.000000000000000, 	-0.139697151364830, 	0.000000000000000, 	
--2.773367420505435, 	0.000000000000000, 	-4.403400246165611, 	0.000000000000000, 	-1.468974515184135, 	0.000000000000000, 	0.664990623095844, 	0.000000000000000, 	
--3.446979775557143, 	0.000000000000000, 	1.850006428987618, 	0.000000000000000, 	-1.550866747921936, 	0.000000000000000, 	-3.632874882935257, 	0.000000000000000, 	
-0.828039662992464, 	0.000000000000000, 	2.794055182632816, 	0.000000000000000, 	-0.593995716682633, 	0.000000000000000, 	0.142788156054200, 	0.000000000000000, 	
-0.552461945119668, 	0.000000000000000, 	0.842127129738758, 	0.000000000000000, 	1.414335509600077, 	0.000000000000000, 	-0.311559241382430, 	0.000000000000000, 	
-1.510590844695250, 	0.000000000000000, 	1.692217183824300, 	0.000000000000000, 	0.613760285711957, 	0.000000000000000, 	0.065233463207770, 	0.000000000000000, 	
--2.571912893711505, 	0.000000000000000, 	-1.707001531141341, 	0.000000000000000, 	0.673884968382041, 	0.000000000000000, 	0.889863883420103, 	0.000000000000000, 	
--2.395635435233346, 	0.000000000000000, 	1.129247296359819, 	0.000000000000000, 	0.569074704779735, 	0.000000000000000, 	6.139436017480722, 	0.000000000000000, 	
-0.822158309259017, 	0.000000000000000, 	-3.289872016222589, 	0.000000000000000, 	0.417612988384414, 	0.000000000000000, 	1.493982103868165, 	0.000000000000000, 	
--0.415353391377005, 	0.000000000000000, 	0.288670764933155, 	0.000000000000000, 	-1.895650228872272, 	0.000000000000000, 	-0.139631694475020, 	0.000000000000000, 	
-1.445103299005436, 	0.000000000000000, 	2.877182243683429, 	0.000000000000000, 	1.192428490172580, 	0.000000000000000, 	-5.964591921763842, 	0.000000000000000, 	
-0.570859795882959, 	0.000000000000000, 	2.328333316356666, 	0.000000000000000, 	0.333755014930026, 	0.000000000000000, 	1.221901577771909, 	0.000000000000000, 	
-0.943358697415568, 	0.000000000000000, 	2.793063983613067, 	0.000000000000000, 	3.163005066073616, 	0.000000000000000, 	2.098300664513867, 	0.000000000000000, 	
--3.915313164333447, 	0.000000000000000, 	-2.475766769064539, 	0.000000000000000, 	1.720472044894277, 	0.000000000000000, 	-1.273591949275665, 	0.000000000000000, 	
--1.213451272938616, 	0.000000000000000, 	0.697439404325690, 	0.000000000000000, 	-0.309902287574293, 	0.000000000000000, 	2.622575852162781, 	0.000000000000000, 	
--2.075881936219060, 	0.000000000000000, 	0.777847545691770, 	0.000000000000000, 	-3.967947986440650, 	0.000000000000000, 	-3.066503371806472, 	0.000000000000000, 	
-1.193780625937845, 	0.000000000000000, 	0.214246579281311, 	0.000000000000000, 	-2.610681491162162, 	0.000000000000000, 	-1.261224183972745, 	0.000000000000000, 	
--1.165071748544285, 	0.000000000000000, 	-1.116548474834374, 	0.000000000000000, 	0.847202164846982, 	0.000000000000000, 	-3.474301529532390, 	0.000000000000000, 	
-0.020799541946476, 	0.000000000000000, 	-3.868995473288166, 	0.000000000000000, 	1.757979409638067, 	0.000000000000000, 	0.868115130183109, 	0.000000000000000, 	
-0.910167436737958, 	0.000000000000000, 	-1.878855115563720, 	0.000000000000000, 	1.710357104174161, 	0.000000000000000, 	-1.468933980990902, 	0.000000000000000, 	
-1.799544171601169, 	0.000000000000000, 	-4.922332880027887, 	0.000000000000000, 	0.219424548939720, 	0.000000000000000, 	-0.971671113451924, 	0.000000000000000, 	
--0.940533475616266, 	0.000000000000000, 	0.122510114412152, 	0.000000000000000, 	-1.373686254916911, 	0.000000000000000, 	1.760348103896323, 	0.000000000000000, 	
-0.391745067829643, 	0.000000000000000, 	2.521958505327354, 	0.000000000000000, 	-1.300693516405092, 	0.000000000000000, 	-0.538251788309178, 	0.000000000000000, 	
-0.797184135810173, 	0.000000000000000, 	2.908800548982588, 	0.000000000000000, 	1.590902251655215, 	0.000000000000000, 	-1.070323714487264, 	0.000000000000000, 	
--3.349764443340999, 	0.000000000000000, 	-1.190563529731447, 	0.000000000000000, 	1.363369471291963, 	0.000000000000000, 	-1.814270299924576, 	0.000000000000000, 	
--0.023381588315711, 	0.000000000000000, 	1.719182048679569, 	0.000000000000000, 	0.839917213252626, 	0.000000000000000, 	1.006099633839122, 	0.000000000000000, 	
-0.812462674381527, 	0.000000000000000, 	1.755814336346739, 	0.000000000000000, 	2.546848681206319, 	0.000000000000000, 	-1.555300208869455, 	0.000000000000000, 	
-1.017053811631167, 	0.000000000000000, 	0.996591039170903, 	0.000000000000000, 	-1.228047247924881, 	0.000000000000000, 	4.809462271463009, 	0.000000000000000, 	
-2.318113116151685, 	0.000000000000000, 	-1.206932520679733, 	0.000000000000000, 	1.273757685623312, 	0.000000000000000, 	0.724335352481802, 	0.000000000000000, 	
-1.519876652073198, 	0.000000000000000, 	-2.749670314714158, 	0.000000000000000, 	3.424042481847581, 	0.000000000000000, 	-3.714668360421517, 	0.000000000000000, 	
-1.612834197004014, 	0.000000000000000, 	-2.038234723985566, 	0.000000000000000, 	1.470938786562152, 	0.000000000000000, 	2.111634918450302, 	0.000000000000000, 	
-1.030376670151787, 	0.000000000000000, 	-0.420877189003829, 	0.000000000000000, 	-1.502024800532894, 	0.000000000000000, 	0.452310749163804, 	0.000000000000000, 	
--1.606059382300987, 	0.000000000000000, 	-4.006159967834147, 	0.000000000000000, 	-2.152801208196508, 	0.000000000000000, 	1.671674089372579, 	0.000000000000000, 	
-1.714536333564101, 	0.000000000000000, 	-1.011518543005344, 	0.000000000000000, 	-0.576410282180584, 	0.000000000000000, 	0.733689809480836, 	0.000000000000000, 	
-1.004245602717974, 	0.000000000000000, 	1.010090391888449, 	0.000000000000000, 	3.811459513385621, 	0.000000000000000, 	-5.230621089271954, 	0.000000000000000, 	
-0.678044861034399, 	0.000000000000000, 	1.255935859598107, 	0.000000000000000, 	1.674521701615288, 	0.000000000000000, 	-1.656695216761705, 	0.000000000000000, 	
-1.169286028869693, 	0.000000000000000, 	0.524915416191998, 	0.000000000000000, 	2.397642885039520, 	0.000000000000000, 	2.108711400616072, 	0.000000000000000, 	
-2.037618211018084, 	0.000000000000000, 	-0.623664553406925, 	0.000000000000000, 	2.984106170984409, 	0.000000000000000, 	1.132182737400932, 	0.000000000000000, 	
--2.859274340352130, 	0.000000000000000, 	-0.975550071398723, 	0.000000000000000, 	-1.359935119997407, 	0.000000000000000, 	-2.963308211050121, 	0.000000000000000, 	
--0.228726662781163, 	0.000000000000000, 	-1.411110379682043, 	0.000000000000000, 	0.741553355734225, 	0.000000000000000, 	0.497554254758309, 	0.000000000000000, 	
-2.371907950598855, 	0.000000000000000, 	1.063465168988748, 	0.000000000000000, 	-0.641082692081488, 	0.000000000000000, 	-0.855439878540726, 	0.000000000000000, 	
-0.578321738578726, 	0.000000000000000, 	3.005809768796194, 	0.000000000000000, 	1.961458699064065, 	0.000000000000000, 	-3.206261663772745, 	0.000000000000000, 	
--0.364431989095434, 	0.000000000000000, 	-0.263182496622273, 	0.000000000000000, 	1.843464680631139, 	0.000000000000000, 	-0.419107530229249, 	0.000000000000000, 	
-1.662335873298487, 	0.000000000000000, 	-0.853687563304005, 	0.000000000000000, 	-2.584133404357169, 	0.000000000000000, 	3.466839568922895, 	0.000000000000000, 	
-0.881671345091973, 	0.000000000000000, 	0.454620014206908, 	0.000000000000000, 	-1.737245187402739, 	0.000000000000000, 	2.162713238369243, 	0.000000000000000, 	
--3.868539002714486, 	0.000000000000000, 	2.014114855933826, 	0.000000000000000, 	-0.703233831811006, 	0.000000000000000, 	-3.410319935997574, 	0.000000000000000, 	
--1.851235811006584, 	0.000000000000000, 	0.909783907894036, 	0.000000000000000, 	0.091884002136728, 	0.000000000000000, 	-2.688294201131650, 	0.000000000000000, 	
--0.906134178460955, 	0.000000000000000, 	3.475054609035133, 	0.000000000000000, 	-0.573927964170323, 	0.000000000000000, 	-0.429542937515399, 	0.000000000000000, 	
-0.991348618739939, 	0.000000000000000, 	1.974804904926325, 	0.000000000000000, 	0.975783450796698, 	0.000000000000000, 	-3.057119549071503, 	0.000000000000000, 	
--3.899429237481194, 	0.000000000000000, 	0.362439009175350, 	0.000000000000000, 	-1.124461670265618, 	0.000000000000000, 	1.806000360163583, 	0.000000000000000, 	
--2.768333362600288, 	0.000000000000000, 	0.244387897900379, 	0.000000000000000, 	0.908767296720926, 	0.000000000000000, 	1.254669374391882, 	0.000000000000000, 	
--1.420441929463686, 	0.000000000000000, 	-0.875658895966293, 	0.000000000000000, 	0.183824603376167, 	0.000000000000000, 	-3.361653917011686, 	0.000000000000000, 	
--0.796615630227952, 	0.000000000000000, 	-1.660226542658673, 	0.000000000000000, 	1.654439358307226, 	0.000000000000000, 	2.782812946709771, 	0.000000000000000, 	
-1.418064412811531, 	0.000000000000000, 	-0.819645647243761, 	0.000000000000000, 	0.807724772592699, 	0.000000000000000, 	-0.941967976379298, 	0.000000000000000, 	
--2.312768306047469, 	0.000000000000000, 	0.872426936477443, 	0.000000000000000, 	0.919528961530845, 	0.000000000000000, 	-2.084904575264847, 	0.000000000000000, 	
--1.972464868459322, 	0.000000000000000, 	-1.050687203338466, 	0.000000000000000, 	1.659579707007902, 	0.000000000000000, 	-1.820640014705855, 	0.000000000000000, 	
--1.195078061671045, 	0.000000000000000, 	-1.639773173762048, 	0.000000000000000, 	1.616744338157063, 	0.000000000000000, 	4.019216096811563, 	0.000000000000000, 	
-3.461021102549681, 	0.000000000000000, 	1.642352734361484, 	0.000000000000000, 	-0.046354693720813, 	0.000000000000000, 	-0.041936252359677, 	0.000000000000000, 	
--2.393307519480551, 	0.000000000000000, 	-0.341471634615121, 	0.000000000000000, 	-0.392073595257017, 	0.000000000000000, 	-0.219299018372730, 	0.000000000000000, 	
--2.016391579662071, 	0.000000000000000, 	-0.653096251969787, 	0.000000000000000, 	1.466353155666821, 	0.000000000000000, 	-2.872058864320412, 	0.000000000000000, 	
--2.157180779503830, 	0.000000000000000, 	0.723257479841560, 	0.000000000000000, 	3.769951308104384, 	0.000000000000000, 	-1.923392042420024, 	0.000000000000000, 	
-0.644899359942840, 	0.000000000000000, 	-2.090226891621437, 	0.000000000000000, 	-0.277043982890403, 	0.000000000000000, 	-0.528271428321112, 	0.000000000000000, 	
-2.518120645960652, 	0.000000000000000, 	1.040820431111488, 	0.000000000000000, 	-4.560583754742486, 	0.000000000000000, 	-0.226899614918836, 	0.000000000000000, 	
-1.713331231108959, 	0.000000000000000, 	-3.293941019163642, 	0.000000000000000, 	-1.113331444648290, 	0.000000000000000, 	-1.032308423149906, 	0.000000000000000, 	
-1.593774272982443, 	0.000000000000000, 	-1.246840475090529, 	0.000000000000000, 	-0.190344684920137, 	0.000000000000000, 	-1.719386356896355, 	0.000000000000000, 	
--2.827721754659679, 	0.000000000000000, 	-0.092438285279020, 	0.000000000000000, 	-0.565844430675246, 	0.000000000000000, 	-1.077916121691716, 	0.000000000000000, 	
--1.208665809504693, 	0.000000000000000, 	-2.996014266381254, 	0.000000000000000, 	2.888573323402423, 	0.000000000000000, 	2.829507048720695, 	0.000000000000000, 	
--0.859177034120755, 	0.000000000000000, 	-1.969302377743254, 	0.000000000000000, 	0.777437674525362, 	0.000000000000000, 	-0.124910190157646, 	0.000000000000000, 	
-0.129875493115290, 	0.000000000000000, 	-4.192139262163992, 	0.000000000000000, 	3.023496047962126, 	0.000000000000000, 	1.149775163736637, 	0.000000000000000, 	
-2.038151304801731, 	0.000000000000000, 	3.016122489841263, 	0.000000000000000, 	-4.829481812137012, 	0.000000000000000, 	-1.668436615909279, 	0.000000000000000, 	
-0.958586784636918, 	0.000000000000000, 	1.550652410058678, 	0.000000000000000, 	-1.456305257976716, 	0.000000000000000, 	-0.079588392344731, 	0.000000000000000, 	
--2.453213599392345, 	0.000000000000000, 	0.296795909127105, 	0.000000000000000, 	-0.253426616607643, 	0.000000000000000, 	1.418937160028195, 	0.000000000000000, 	
--1.672949529066915, 	0.000000000000000, 	-1.620990298572947, 	0.000000000000000, 	-1.085103073196045, 	0.000000000000000, 	0.738606361195386, 	0.000000000000000, 	
--2.097831202853255, 	0.000000000000000, 	2.711952282071310, 	0.000000000000000, 	1.498539238246888, 	0.000000000000000, 	1.317457282535915, 	0.000000000000000, 	
--0.302765938349717, 	0.000000000000000, 	-0.044623707947201, 	0.000000000000000, 	2.337405215062395, 	0.000000000000000, 	-3.980689173859100, 	0.000000000000000, 	
-
-
-};
-

+ 0 - 158
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/ARM/arm_fft_bin_example_f32.c

@@ -1,158 +0,0 @@
-/* ----------------------------------------------------------------------
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.
-*
-* $Date:         17. January 2013
-* $Revision:     V1.4.0
-*
-* Project:       CMSIS DSP Library
-* Title:	     arm_fft_bin_example_f32.c
-*
-* Description:   Example code demonstrating calculation of Max energy bin of
-*                frequency domain of input signal.
-*
-* Target Processor: Cortex-M4/Cortex-M3
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
- * -------------------------------------------------------------------- */
-
-/**
- * @ingroup groupExamples
- */
-
-/**
- * @defgroup FrequencyBin Frequency Bin Example
- *
- * \par Description
- * \par
- * Demonstrates the calculation of the maximum energy bin in the frequency
- * domain of the input signal with the use of Complex FFT, Complex
- * Magnitude, and Maximum functions.
- *
- * \par Algorithm:
- * \par
- * The input test signal contains a 10 kHz signal with uniformly distributed white noise.
- * Calculating the FFT of the input signal will give us the maximum energy of the
- * bin corresponding to the input frequency of 10 kHz.
- *
- * \par Block Diagram:
- * \image html FFTBin.gif "Block Diagram"
- * \par
- * The figure below shows the time domain signal of 10 kHz signal with
- * uniformly distributed white noise, and the next figure shows the input
- * in the frequency domain. The bin with maximum energy corresponds to 10 kHz signal.
- * \par
- * \image html FFTBinInput.gif "Input signal in Time domain"
- * \image html FFTBinOutput.gif "Input signal in Frequency domain"
- *
- * \par Variables Description:
- * \par
- * \li \c testInput_f32_10khz points to the input data
- * \li \c testOutput points to the output data
- * \li \c fftSize length of FFT
- * \li \c ifftFlag flag for the selection of CFFT/CIFFT
- * \li \c doBitReverse Flag for selection of normal order or bit reversed order
- * \li \c refIndex reference index value at which maximum energy of bin ocuurs
- * \li \c testIndex calculated index value at which maximum energy of bin ocuurs
- *
- * \par CMSIS DSP Software Library Functions Used:
- * \par
- * - arm_cfft_f32()
- * - arm_cmplx_mag_f32()
- * - arm_max_f32()
- *
- * <b> Refer  </b>
- * \link arm_fft_bin_example_f32.c \endlink
- *
- */
-
-
-/** \example arm_fft_bin_example_f32.c
-  */
-
-
-#include "arm_math.h"
-#include "arm_const_structs.h"
-
-#define TEST_LENGTH_SAMPLES 2048
-
-/* -------------------------------------------------------------------
-* External Input and Output buffer Declarations for FFT Bin Example
-* ------------------------------------------------------------------- */
-extern float32_t testInput_f32_10khz[TEST_LENGTH_SAMPLES];
-static float32_t testOutput[TEST_LENGTH_SAMPLES/2];
-
-/* ------------------------------------------------------------------
-* Global variables for FFT Bin Example
-* ------------------------------------------------------------------- */
-uint32_t fftSize = 1024;
-uint32_t ifftFlag = 0;
-uint32_t doBitReverse = 1;
-
-/* Reference index at which max energy of bin ocuurs */
-uint32_t refIndex = 213, testIndex = 0;
-
-/* ----------------------------------------------------------------------
-* Max magnitude FFT Bin test
-* ------------------------------------------------------------------- */
-
-int32_t main(void)
-{
-
-  arm_status status;
-  float32_t maxValue;
-
-  status = ARM_MATH_SUCCESS;
-
-  /* Process the data through the CFFT/CIFFT module */
-  arm_cfft_f32(&arm_cfft_sR_f32_len1024, testInput_f32_10khz, ifftFlag, doBitReverse);
-
-  /* Process the data through the Complex Magnitude Module for
-  calculating the magnitude at each bin */
-  arm_cmplx_mag_f32(testInput_f32_10khz, testOutput, fftSize);
-
-  /* Calculates maxValue and returns corresponding BIN value */
-  arm_max_f32(testOutput, fftSize, &maxValue, &testIndex);
-
-  if(testIndex !=  refIndex)
-  {
-    status = ARM_MATH_TEST_FAILURE;
-  }
-
-  /* ----------------------------------------------------------------------
-  ** Loop here if the signals fail the PASS check.
-  ** This denotes a test failure
-  ** ------------------------------------------------------------------- */
-
-  if( status != ARM_MATH_SUCCESS)
-  {
-    while(1);
-  }
-
-  while(1);                             /* main function does not return */
-}
-
- /** \endlink */

+ 0 - 4
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/GCC/Abstract.txt

@@ -1,4 +0,0 @@
-CMSIS DSP_Lib example arm_fft_bin_example for
-  Cortex-M0, Cortex-M3 and Cortex-M4 with FPU
-
-The example is configured for uVision Simulator

+ 0 - 308
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/GCC/arm_fft_bin_data.c

@@ -1,308 +0,0 @@
-/* ----------------------------------------------------------------------   
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.   
-*   
-* $Date:        17. January 2013  
-* $Revision: 	V1.4.0   
-*   
-* Project: 	    CMSIS DSP Library   
-* Title:	     	arm_fft_bin_data.c
-*   
-* Description:	 Data file used for example code
-*   
-* Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
-*  
-* Redistribution and use in source and binary forms, with or without 
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the 
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.  
- * -------------------------------------------------------------------- */
-
-#include "arm_math.h"
-
-/* ----------------------------------------------------------------------
-Test Input signal contains 10KHz signal + Uniformly distributed white noise
-** ------------------------------------------------------------------- */
-
-float32_t testInput_f32_10khz[2048] = 
-{   
--0.865129623056441, 	0.000000000000000, 	-2.655020678073846, 	0.000000000000000, 	0.600664612949661, 	0.000000000000000, 	0.080378093886515, 	0.000000000000000, 	
--2.899160484012034, 	0.000000000000000, 	2.563004262857762, 	0.000000000000000, 	3.078328403304206, 	0.000000000000000, 	0.105906778385130, 	0.000000000000000, 	
-0.048366940168201, 	0.000000000000000, 	-0.145696461188734, 	0.000000000000000, 	-0.023417155362879, 	0.000000000000000, 	2.127729174988954, 	0.000000000000000, 	
--1.176633086028377, 	0.000000000000000, 	3.690223557991855, 	0.000000000000000, 	-0.622791766173194, 	0.000000000000000, 	0.722837373872203, 	0.000000000000000, 	
-2.739754205367484, 	0.000000000000000, 	-0.062610410524552, 	0.000000000000000, 	-0.891296810967338, 	0.000000000000000, 	-1.845872258871811, 	0.000000000000000, 	
-1.195039415434387, 	0.000000000000000, 	-2.177388969045026, 	0.000000000000000, 	1.078649103637905, 	0.000000000000000, 	2.570976050490193, 	0.000000000000000, 	
--1.383551403404574, 	0.000000000000000, 	2.392141424058873, 	0.000000000000000, 	2.858002843205065, 	0.000000000000000, 	-3.682433899725536, 	0.000000000000000, 	
--3.488146646451150, 	0.000000000000000, 	1.323468578888120, 	0.000000000000000, 	-0.099771155430726, 	0.000000000000000, 	1.561168082500454, 	0.000000000000000, 	
-1.025026795103179, 	0.000000000000000, 	0.928841900171200, 	0.000000000000000, 	2.930499509864950, 	0.000000000000000, 	2.013349089766430, 	0.000000000000000, 	
-2.381676148486737, 	0.000000000000000, 	-3.081062307950236, 	0.000000000000000, 	-0.389579115537544, 	0.000000000000000, 	0.181540149166620, 	0.000000000000000, 	
--2.601953341353208, 	0.000000000000000, 	0.333435137783218, 	0.000000000000000, 	-2.812945856162965, 	0.000000000000000, 	2.649109640172910, 	0.000000000000000, 	
--1.003963025744654, 	0.000000000000000, 	1.552460768755035, 	0.000000000000000, 	0.088641345335247, 	0.000000000000000, 	-2.519951327113426, 	0.000000000000000, 	
--4.341348988610527, 	0.000000000000000, 	0.557772429359965, 	0.000000000000000, 	-1.671267412948494, 	0.000000000000000, 	0.733951350960387, 	0.000000000000000, 	
-0.409263788034864, 	0.000000000000000, 	3.566033071952806, 	0.000000000000000, 	1.882565173848352, 	0.000000000000000, 	-1.106017073793287, 	0.000000000000000, 	
-0.154456720778718, 	0.000000000000000, 	-2.513205795512153, 	0.000000000000000, 	0.310978660939421, 	0.000000000000000, 	0.579706500111723, 	0.000000000000000, 	
-0.000086383683251, 	0.000000000000000, 	-1.311866980897721, 	0.000000000000000, 	1.840007477574986, 	0.000000000000000, 	-3.253005768451345, 	0.000000000000000, 	
-1.462584328739432, 	0.000000000000000, 	1.610103610851738, 	0.000000000000000, 	0.761914676858907, 	0.000000000000000, 	0.974541361089834, 	0.000000000000000, 	
-0.686845845885983, 	0.000000000000000, 	1.849153122025191, 	0.000000000000000, 	0.787800410401453, 	0.000000000000000, 	-1.187438909666279, 	0.000000000000000, 	
--0.754937911044720, 	0.000000000000000, 	0.084373858395232, 	0.000000000000000, 	-2.600269011710521, 	0.000000000000000, 	-0.962982842142644, 	0.000000000000000, 	
--0.369328108540868, 	0.000000000000000, 	0.810791418361879, 	0.000000000000000, 	3.587016488699641, 	0.000000000000000, 	-0.520776145083723, 	0.000000000000000, 	
-0.640249919627884, 	0.000000000000000, 	1.103122489464969, 	0.000000000000000, 	2.231779881455556, 	0.000000000000000, 	-1.308035392685241, 	0.000000000000000, 	
-0.424070304330106, 	0.000000000000000, 	-0.200383932651189, 	0.000000000000000, 	-2.365526783356541, 	0.000000000000000, 	-0.989114757436628, 	0.000000000000000, 	
-2.770807688959777, 	0.000000000000000, 	-0.444172737462307, 	0.000000000000000, 	0.079760979374078, 	0.000000000000000, 	-0.005199118412183, 	0.000000000000000, 	
--0.664712668309527, 	0.000000000000000, 	-0.624171857561896, 	0.000000000000000, 	0.537306979007338, 	0.000000000000000, 	-2.575955675497642, 	0.000000000000000, 	
-1.562363235756780, 	0.000000000000000, 	1.814069369848895, 	0.000000000000000, 	-1.293428583392509, 	0.000000000000000, 	-1.026188449495686, 	0.000000000000000, 	
--2.981771815588717, 	0.000000000000000, 	-4.223468103075124, 	0.000000000000000, 	2.672674782004045, 	0.000000000000000, 	-0.856096801117735, 	0.000000000000000, 	
-0.048517345512563, 	0.000000000000000, 	-0.026860721136222, 	0.000000000000000, 	0.392932277758187, 	0.000000000000000, 	-1.331740855093099, 	0.000000000000000, 	
--1.894292129477081, 	0.000000000000000, 	-1.425006468460681, 	0.000000000000000, 	-2.721772427617057, 	0.000000000000000, 	-1.616831100216806, 	0.000000000000000, 	
-3.551177651488947, 	0.000000000000000, 	-0.069685667896087, 	0.000000000000000, 	-3.134634907409102, 	0.000000000000000, 	-0.263627598944639, 	0.000000000000000, 	
--1.650469945991350, 	0.000000000000000, 	-2.203580339374399, 	0.000000000000000, 	-0.872203246123242, 	0.000000000000000, 	1.230782812607287, 	0.000000000000000, 	
-0.257288860093291, 	0.000000000000000, 	1.989083106173137, 	0.000000000000000, 	-1.985638729453261, 	0.000000000000000, 	-1.416185105842892, 	0.000000000000000, 	
--1.131097688325772, 	0.000000000000000, 	-2.245130805416057, 	0.000000000000000, 	-1.938873996219074, 	0.000000000000000, 	2.043608361562645, 	0.000000000000000, 	
--0.583727989880841, 	0.000000000000000, 	-1.785266378212929, 	0.000000000000000, 	1.961457586224753, 	0.000000000000000, 	1.139400099963223, 	0.000000000000000, 	
--1.979519343363991, 	0.000000000000000, 	2.003023322818429, 	0.000000000000000, 	0.229004069076829, 	0.000000000000000, 	3.452808862193135, 	0.000000000000000, 	
-2.882273808365857, 	0.000000000000000, 	-1.549450501844438, 	0.000000000000000, 	-3.283872089931876, 	0.000000000000000, 	-0.327025884099064, 	0.000000000000000, 	
--0.054979977136430, 	0.000000000000000, 	-1.192280531479012, 	0.000000000000000, 	0.645539328365578, 	0.000000000000000, 	2.300832863404618, 	0.000000000000000, 	
--1.092951789535240, 	0.000000000000000, 	-1.017368249363773, 	0.000000000000000, 	-0.142673056169787, 	0.000000000000000, 	0.831073544881250, 	0.000000000000000, 	
--2.314612531587064, 	0.000000000000000, 	-2.221456299106321, 	0.000000000000000, 	0.460261143885226, 	0.000000000000000, 	0.050585301888595, 	0.000000000000000, 	
-0.364373329183988, 	0.000000000000000, 	-1.685956552069538, 	0.000000000000000, 	0.050664512351055, 	0.000000000000000, 	-0.193355783902718, 	0.000000000000000, 	
--0.158660446046828, 	0.000000000000000, 	2.394156453841953, 	0.000000000000000, 	-1.562965718554525, 	0.000000000000000, 	-2.199750600869900, 	0.000000000000000, 	
-1.544984022381773, 	0.000000000000000, 	-1.988307216807315, 	0.000000000000000, 	-0.628240722541046, 	0.000000000000000, 	-1.436235771505429, 	0.000000000000000, 	
-1.677013691147313, 	0.000000000000000, 	1.600741781678228, 	0.000000000000000, 	-0.757380959134706, 	0.000000000000000, 	-4.784797439515566, 	0.000000000000000, 	
-0.265121462834569, 	0.000000000000000, 	3.862029485934378, 	0.000000000000000, 	2.386823577249430, 	0.000000000000000, 	-3.655779745436893, 	0.000000000000000, 	
--0.763541621368016, 	0.000000000000000, 	-1.182140388432962, 	0.000000000000000, 	-1.349106114858063, 	0.000000000000000, 	-2.287533624396759, 	0.000000000000000, 	
--0.028603745188423, 	0.000000000000000, 	-1.353580755934427, 	0.000000000000000, 	0.461602380352937, 	0.000000000000000, 	-0.059599055078928, 	0.000000000000000, 	
--0.929946734342228, 	0.000000000000000, 	0.065773089295561, 	0.000000000000000, 	1.106565863102982, 	0.000000000000000, 	4.719295086373593, 	0.000000000000000, 	
--2.108377703544395, 	0.000000000000000, 	-2.226393620240159, 	0.000000000000000, 	1.375668397437521, 	0.000000000000000, 	-0.960772428525443, 	0.000000000000000, 	
--2.156313465390571, 	0.000000000000000, 	1.126060012375311, 	0.000000000000000, 	2.756485137030720, 	0.000000000000000, 	0.739639690862600, 	0.000000000000000, 	
-3.914769510295006, 	0.000000000000000, 	1.685232785586675, 	0.000000000000000, 	4.079058040970612, 	0.000000000000000, 	-1.174598301660513, 	0.000000000000000, 	
--2.885776587275580, 	0.000000000000000, 	-0.241073635188767, 	0.000000000000000, 	3.080489872502403, 	0.000000000000000, 	-2.051244183999421, 	0.000000000000000, 	
-0.664330486845139, 	0.000000000000000, 	-1.697798999370016, 	0.000000000000000, 	1.452369423649782, 	0.000000000000000, 	-1.523532831019280, 	0.000000000000000, 	
-0.171981186587481, 	0.000000000000000, 	-4.685274721583927, 	0.000000000000000, 	-1.336175835319380, 	0.000000000000000, 	1.419070770428945, 	0.000000000000000, 	
--0.035791601713475, 	0.000000000000000, 	2.291937971632081, 	0.000000000000000, 	-1.962559313450293, 	0.000000000000000, 	-4.831595589339301, 	0.000000000000000, 	
--1.857055284000925, 	0.000000000000000, 	2.606271522635512, 	0.000000000000000, 	-0.576447978738030, 	0.000000000000000, 	0.082299166967720, 	0.000000000000000, 	
-1.888399453494614, 	0.000000000000000, 	-3.564705298046079, 	0.000000000000000, 	-0.939357831083889, 	0.000000000000000, 	-1.903578203697778, 	0.000000000000000, 	
--2.642492215447250, 	0.000000000000000, 	-0.182990405251017, 	0.000000000000000, 	3.742026478011174, 	0.000000000000000, 	0.104295803798333, 	0.000000000000000, 	
-1.848678195370347, 	0.000000000000000, 	-1.887384346896369, 	0.000000000000000, 	0.365048973046045, 	0.000000000000000, 	-0.889638010354219, 	0.000000000000000, 	
-1.173877118428863, 	0.000000000000000, 	-1.178562827540109, 	0.000000000000000, 	0.610271645685184, 	0.000000000000000, 	1.831284815697871, 	0.000000000000000, 	
-0.449575390102283, 	0.000000000000000, 	1.597171905253443, 	0.000000000000000, 	3.918574971904773, 	0.000000000000000, 	0.868104027970404, 	0.000000000000000, 	
-0.582643134746494, 	0.000000000000000, 	2.321256382353331, 	0.000000000000000, 	-0.238118642223180, 	0.000000000000000, 	-2.890287868054370, 	0.000000000000000, 	
-0.970995414625622, 	0.000000000000000, 	0.666137930891283, 	0.000000000000000, 	-0.202435718709502, 	0.000000000000000, 	2.057930200518194, 	0.000000000000000, 	
-3.120583443719949, 	0.000000000000000, 	-0.863945271701041, 	0.000000000000000, 	0.906848893874630, 	0.000000000000000, 	-1.434124930222570, 	0.000000000000000, 	
-0.754659384848783, 	0.000000000000000, 	-5.224154442713778, 	0.000000000000000, 	2.330229744098967, 	0.000000000000000, 	1.113946320164698, 	0.000000000000000, 	
-0.523324920322840, 	0.000000000000000, 	1.750740911548348, 	0.000000000000000, 	-0.899333972913577, 	0.000000000000000, 	0.228705845203506, 	0.000000000000000, 	
--1.934782624767648, 	0.000000000000000, 	-3.508386237231303, 	0.000000000000000, 	-2.107108523073510, 	0.000000000000000, 	0.380587645474815, 	0.000000000000000, 	
--0.476200877183279, 	0.000000000000000, 	-2.172086712642198, 	0.000000000000000, 	1.795372535780299, 	0.000000000000000, 	-2.100318983391055, 	0.000000000000000, 	
--0.022571122461405, 	0.000000000000000, 	0.674514020010955, 	0.000000000000000, 	-0.148872569390857, 	0.000000000000000, 	0.298175890592737, 	0.000000000000000, 	
--1.134244492493590, 	0.000000000000000, 	-3.146848422289455, 	0.000000000000000, 	-1.357950199087602, 	0.000000000000000, 	0.667362732020878, 	0.000000000000000, 	
--3.119397998316724, 	0.000000000000000, 	-1.189341126297637, 	0.000000000000000, 	-1.532744386856668, 	0.000000000000000, 	-1.672972484202534, 	0.000000000000000, 	
--2.042283373871558, 	0.000000000000000, 	-1.479481547595924, 	0.000000000000000, 	-0.002668662875396, 	0.000000000000000, 	0.262737760129546, 	0.000000000000000, 	
-2.734456080621830, 	0.000000000000000, 	-0.671945925075102, 	0.000000000000000, 	-3.735078262179111, 	0.000000000000000, 	-0.161705013319883, 	0.000000000000000, 	
-0.748963512361001, 	0.000000000000000, 	1.128046374367600, 	0.000000000000000, 	0.649651335592966, 	0.000000000000000, 	1.880020215025867, 	0.000000000000000, 	
--1.095632293842306, 	0.000000000000000, 	1.197764876160487, 	0.000000000000000, 	0.323646656252985, 	0.000000000000000, 	-1.655502751114502, 	0.000000000000000, 	
-3.666399062961496, 	0.000000000000000, 	-0.334060899735197, 	0.000000000000000, 	-2.119056978738397, 	0.000000000000000, 	3.721375117275012, 	0.000000000000000, 	
-0.044874186872307, 	0.000000000000000, 	-2.733053897593234, 	0.000000000000000, 	1.590700278891042, 	0.000000000000000, 	3.215711772781902, 	0.000000000000000, 	
--1.792085012843801, 	0.000000000000000, 	-0.405797188885475, 	0.000000000000000, 	-0.628080020080892, 	0.000000000000000, 	-1.831815840843960, 	0.000000000000000, 	
-2.973656862522834, 	0.000000000000000, 	-0.212032655138417, 	0.000000000000000, 	0.372437389437234, 	0.000000000000000, 	-1.614030579023492, 	0.000000000000000, 	
--0.704900996358698, 	0.000000000000000, 	1.123700273452105, 	0.000000000000000, 	-0.136371848130819, 	0.000000000000000, 	3.020284357635585, 	0.000000000000000, 	
--0.550211350877649, 	0.000000000000000, 	5.101256236381711, 	0.000000000000000, 	3.367051512192333, 	0.000000000000000, 	-4.385131946669234, 	0.000000000000000, 	
--3.967303337694391, 	0.000000000000000, 	-0.965894936640022, 	0.000000000000000, 	0.328366945264681, 	0.000000000000000, 	0.199041562924914, 	0.000000000000000, 	
-1.067681999025495, 	0.000000000000000, 	-1.939516091697170, 	0.000000000000000, 	-1.092980954328824, 	0.000000000000000, 	0.273786079368066, 	0.000000000000000, 	
--0.040928322190265, 	0.000000000000000, 	-0.118368078577437, 	0.000000000000000, 	1.766589628899997, 	0.000000000000000, 	1.738321311635393, 	0.000000000000000, 	
--2.895012794321649, 	0.000000000000000, 	1.213521771395142, 	0.000000000000000, 	0.922971726633985, 	0.000000000000000, 	1.091516563636489, 	0.000000000000000, 	
-3.226378465469620, 	0.000000000000000, 	1.149169778666974, 	0.000000000000000, 	-1.695986327709386, 	0.000000000000000, 	-0.974803077355813, 	0.000000000000000, 	
--4.898035507513607, 	0.000000000000000, 	1.622719302889447, 	0.000000000000000, 	0.583891313586579, 	0.000000000000000, 	-1.677182424094957, 	0.000000000000000, 	
--1.915633132814685, 	0.000000000000000, 	-1.980150370851616, 	0.000000000000000, 	0.604538269404190, 	0.000000000000000, 	0.939862406149365, 	0.000000000000000, 	
--1.266939874246416, 	0.000000000000000, 	-1.494771249200063, 	0.000000000000000, 	0.278042784093988, 	0.000000000000000, 	0.326627416008916, 	0.000000000000000, 	
--1.914530157643303, 	0.000000000000000, 	1.908947721862196, 	0.000000000000000, 	0.531819285694044, 	0.000000000000000, 	3.056856632319658, 	0.000000000000000, 	
--0.389241827774643, 	0.000000000000000, 	-2.418606606780420, 	0.000000000000000, 	0.915299238878703, 	0.000000000000000, 	-0.098774174295283, 	0.000000000000000, 	
--0.906199428444304, 	0.000000000000000, 	0.316716451217743, 	0.000000000000000, 	-4.367700643578311, 	0.000000000000000, 	1.491687997515293, 	0.000000000000000, 	
--1.962381126288365, 	0.000000000000000, 	-0.700829196527045, 	0.000000000000000, 	3.028958963615630, 	0.000000000000000, 	-2.313461067462598, 	0.000000000000000, 	
--1.431933239886712, 	0.000000000000000, 	-0.831153039725342, 	0.000000000000000, 	3.939495598250743, 	0.000000000000000, 	0.342974753984771, 	0.000000000000000, 	
--2.768330763002974, 	0.000000000000000, 	-2.744010370019008, 	0.000000000000000, 	3.821352685212561, 	0.000000000000000, 	4.551065271455856, 	0.000000000000000, 	
-3.270136437041298, 	0.000000000000000, 	-3.188028411950982, 	0.000000000000000, 	-0.777075012417436, 	0.000000000000000, 	0.097110650265216, 	0.000000000000000, 	
-1.221216137608812, 	0.000000000000000, 	-1.325824244541822, 	0.000000000000000, 	-2.655296734084113, 	0.000000000000000, 	-1.074792144885704, 	0.000000000000000, 	
-2.770401584439407, 	0.000000000000000, 	5.240270645610543, 	0.000000000000000, 	0.108576672208892, 	0.000000000000000, 	-1.209394350650142, 	0.000000000000000, 	
-1.403344353838785, 	0.000000000000000, 	-0.299032904177277, 	0.000000000000000, 	4.074959450638227, 	0.000000000000000, 	1.718727473952107, 	0.000000000000000, 	
--3.061349227080806, 	0.000000000000000, 	-1.158596888541269, 	0.000000000000000, 	3.381858904662625, 	0.000000000000000, 	0.957339964054052, 	0.000000000000000, 	
-0.179900074904899, 	0.000000000000000, 	-3.909641902506081, 	0.000000000000000, 	0.805717289408649, 	0.000000000000000, 	2.047413793928261, 	0.000000000000000, 	
--1.273580225826614, 	0.000000000000000, 	-2.681359186869971, 	0.000000000000000, 	-0.721241345822093, 	0.000000000000000, 	-1.613090681569475, 	0.000000000000000, 	
-0.463138804815955, 	0.000000000000000, 	0.377223507800954, 	0.000000000000000, 	2.046550684968141, 	0.000000000000000, 	0.178508732797712, 	0.000000000000000, 	
--0.477815330358845, 	0.000000000000000, 	3.763355908332053, 	0.000000000000000, 	1.300430303035163, 	0.000000000000000, 	-0.214625793857725, 	0.000000000000000, 	
-1.343267891864081, 	0.000000000000000, 	-0.340007682433245, 	0.000000000000000, 	2.062703194680005, 	0.000000000000000, 	0.042032160234235, 	0.000000000000000, 	
-0.643732569732250, 	0.000000000000000, 	-1.913502543857589, 	0.000000000000000, 	3.771340762937158, 	0.000000000000000, 	1.050024807363386, 	0.000000000000000, 	
--4.440489488592649, 	0.000000000000000, 	0.444904302066643, 	0.000000000000000, 	2.898702265650048, 	0.000000000000000, 	1.953232980548558, 	0.000000000000000, 	
-2.761564952735079, 	0.000000000000000, 	1.963537633260397, 	0.000000000000000, 	-2.168858472916215, 	0.000000000000000, 	-4.116235357699841, 	0.000000000000000, 	
-4.183678271896528, 	0.000000000000000, 	0.600422284944681, 	0.000000000000000, 	-0.659352647255126, 	0.000000000000000, 	-0.993127338218109, 	0.000000000000000, 	
--2.463571314945747, 	0.000000000000000, 	0.937720951545881, 	0.000000000000000, 	-3.098957308429730, 	0.000000000000000, 	-2.354719140045463, 	0.000000000000000, 	
--0.417285119323949, 	0.000000000000000, 	2.187974075975947, 	0.000000000000000, 	1.101468905172585, 	0.000000000000000, 	-3.185800678152109, 	0.000000000000000, 	
-2.357534709345083, 	0.000000000000000, 	0.246645606729407, 	0.000000000000000, 	4.440905650784504, 	0.000000000000000, 	-2.236807716637866, 	0.000000000000000, 	
--2.171481518317550, 	0.000000000000000, 	-2.029571795072690, 	0.000000000000000, 	0.135599790431348, 	0.000000000000000, 	-1.277965265520191, 	0.000000000000000, 	
--1.927976233157507, 	0.000000000000000, 	-5.434492783745394, 	0.000000000000000, 	-2.026375829312657, 	0.000000000000000, 	1.009666016819321, 	0.000000000000000, 	
-0.238549782367247, 	0.000000000000000, 	-0.516403923971309, 	0.000000000000000, 	-0.933977817429352, 	0.000000000000000, 	0.155803015935614, 	0.000000000000000, 	
--0.396194809997929, 	0.000000000000000, 	-0.915178100253214, 	0.000000000000000, 	0.666329367985015, 	0.000000000000000, 	-1.517991149945785, 	0.000000000000000, 	
-0.458266744144822, 	0.000000000000000, 	-1.242845974381418, 	0.000000000000000, 	0.057914823556477, 	0.000000000000000, 	0.994101307476875, 	0.000000000000000, 	
--2.387209849199325, 	0.000000000000000, 	0.459297048883826, 	0.000000000000000, 	0.227711405683905, 	0.000000000000000, 	0.030255073506117, 	0.000000000000000, 	
--1.323361608181337, 	0.000000000000000, 	-4.650244457426706, 	0.000000000000000, 	0.062908579526021, 	0.000000000000000, 	3.462831028244432, 	0.000000000000000, 	
-1.303608183314856, 	0.000000000000000, 	-1.430415193881612, 	0.000000000000000, 	-1.672886118942142, 	0.000000000000000, 	0.992890699210099, 	0.000000000000000, 	
--0.160814531784247, 	0.000000000000000, 	-1.238132939350430, 	0.000000000000000, 	-0.589223271459376, 	0.000000000000000, 	2.326363810561534, 	0.000000000000000, 	
--4.433789496230785, 	0.000000000000000, 	1.664686987538929, 	0.000000000000000, 	-2.366128834617921, 	0.000000000000000, 	1.212421570743837, 	0.000000000000000, 	
--4.847914267690055, 	0.000000000000000, 	0.228485221404712, 	0.000000000000000, 	0.466139765470957, 	0.000000000000000, 	-1.344202776943546, 	0.000000000000000, 	
--1.012053673330574, 	0.000000000000000, 	-2.844980626424742, 	0.000000000000000, 	-1.552703722026340, 	0.000000000000000, 	-1.448830983885038, 	0.000000000000000, 	
-0.127010756753980, 	0.000000000000000, 	-1.667188263752299, 	0.000000000000000, 	3.424818052085100, 	0.000000000000000, 	0.956291135453840, 	0.000000000000000, 	
--3.725533331754662, 	0.000000000000000, 	-1.584534272368832, 	0.000000000000000, 	-1.654148210472472, 	0.000000000000000, 	0.701610500675698, 	0.000000000000000, 	
-0.164954538683927, 	0.000000000000000, 	-0.739260064712987, 	0.000000000000000, 	-2.167324026090101, 	0.000000000000000, 	-0.310240491909496, 	0.000000000000000, 	
--2.281790349106906, 	0.000000000000000, 	1.719655331305361, 	0.000000000000000, 	-2.997005923606441, 	0.000000000000000, 	-1.999301431556852, 	0.000000000000000, 	
--0.292229010068828, 	0.000000000000000, 	1.172317994855851, 	0.000000000000000, 	0.196734885241533, 	0.000000000000000, 	2.981365193477068, 	0.000000000000000, 	
-2.637726016926352, 	0.000000000000000, 	1.434045125217982, 	0.000000000000000, 	0.883627180451827, 	0.000000000000000, 	-1.434040761445747, 	0.000000000000000, 	
--1.528891971086553, 	0.000000000000000, 	-3.306913135367542, 	0.000000000000000, 	-0.399059265470646, 	0.000000000000000, 	-0.265674394285178, 	0.000000000000000, 	
-3.502591252855384, 	0.000000000000000, 	0.830301156604454, 	0.000000000000000, 	-0.220021317046083, 	0.000000000000000, 	-0.090553770476646, 	0.000000000000000, 	
-0.771863477047951, 	0.000000000000000, 	1.351209629105760, 	0.000000000000000, 	3.773699756201963, 	0.000000000000000, 	0.472600118752329, 	0.000000000000000, 	
-2.332825668012222, 	0.000000000000000, 	1.853747950314528, 	0.000000000000000, 	0.759515251766178, 	0.000000000000000, 	1.327112776215496, 	0.000000000000000, 	
-2.518730296237868, 	0.000000000000000, 	0.764450208786353, 	0.000000000000000, 	-0.278275349491296, 	0.000000000000000, 	-0.041559465082020, 	0.000000000000000, 	
-1.387166083167787, 	0.000000000000000, 	2.612996769598122, 	0.000000000000000, 	-0.385404831721799, 	0.000000000000000, 	2.005630016170309, 	0.000000000000000, 	
--0.950500047307998, 	0.000000000000000, 	-1.166884021392492, 	0.000000000000000, 	1.432973552928162, 	0.000000000000000, 	2.540370505384567, 	0.000000000000000, 	
--1.140505295054501, 	0.000000000000000, 	-3.673358835201185, 	0.000000000000000, 	-0.450691288038056, 	0.000000000000000, 	1.601024294408014, 	0.000000000000000, 	
-0.773213556014045, 	0.000000000000000, 	2.973873693246168, 	0.000000000000000, 	-1.361548406382279, 	0.000000000000000, 	1.409136332424815, 	0.000000000000000, 	
--0.963382518314713, 	0.000000000000000, 	-2.031268227368161, 	0.000000000000000, 	0.983309972085586, 	0.000000000000000, 	-3.461412488471631, 	0.000000000000000, 	
--2.601124929406039, 	0.000000000000000, 	-0.533896239766343, 	0.000000000000000, 	-2.627129008866350, 	0.000000000000000, 	0.622111169161305, 	0.000000000000000, 	
--1.160926365580422, 	0.000000000000000, 	-2.406196188132628, 	0.000000000000000, 	-1.076870362758737, 	0.000000000000000, 	-1.791866820937175, 	0.000000000000000, 	
--0.749453071522325, 	0.000000000000000, 	-5.324156615990973, 	0.000000000000000, 	-1.038698022238289, 	0.000000000000000, 	-2.106629944730630, 	0.000000000000000, 	
-0.659295598564773, 	0.000000000000000, 	0.520940881580988, 	0.000000000000000, 	-0.055649203928700, 	0.000000000000000, 	0.292096765423137, 	0.000000000000000, 	
--4.663743901790872, 	0.000000000000000, 	-0.125066503391666, 	0.000000000000000, 	-2.452620252445380, 	0.000000000000000, 	-0.712128227397468, 	0.000000000000000, 	
--0.048938037970968, 	0.000000000000000, 	-1.821520226003361, 	0.000000000000000, 	0.810106421304257, 	0.000000000000000, 	-0.196636623956257, 	0.000000000000000, 	
--0.701769836763804, 	0.000000000000000, 	2.460345045649201, 	0.000000000000000, 	3.506597671641116, 	0.000000000000000, 	-2.711322611972225, 	0.000000000000000, 	
--0.658079876600542, 	0.000000000000000, 	-2.040082099646173, 	0.000000000000000, 	2.201668355395807, 	0.000000000000000, 	1.181507395879711, 	0.000000000000000, 	
--1.640739552179682, 	0.000000000000000, 	-1.613393726467190, 	0.000000000000000, 	-1.156741241731352, 	0.000000000000000, 	2.527773464519963, 	0.000000000000000, 	
--0.497040638009502, 	0.000000000000000, 	-0.975817112895589, 	0.000000000000000, 	-2.866830755546166, 	0.000000000000000, 	1.120214498507878, 	0.000000000000000, 	
-5.986771654661698, 	0.000000000000000, 	0.398219252656757, 	0.000000000000000, 	-3.545606013198135, 	0.000000000000000, 	0.312398099396191, 	0.000000000000000, 	
--2.265327979531788, 	0.000000000000000, 	0.792121001107366, 	0.000000000000000, 	-3.736145137670100, 	0.000000000000000, 	0.762228883650802, 	0.000000000000000, 	
-2.283545661214646, 	0.000000000000000, 	3.780020629583529, 	0.000000000000000, 	3.117260228608810, 	0.000000000000000, 	-2.011159255609613, 	0.000000000000000, 	
-0.279107700476072, 	0.000000000000000, 	2.003369134246936, 	0.000000000000000, 	-1.448171234480257, 	0.000000000000000, 	0.584697150310140, 	0.000000000000000, 	
-0.919508663636197, 	0.000000000000000, 	-3.071349141675388, 	0.000000000000000, 	-1.555923649263667, 	0.000000000000000, 	2.232497079438850, 	0.000000000000000, 	
--0.012662139119883, 	0.000000000000000, 	0.372825540734715, 	0.000000000000000, 	2.378543590847629, 	0.000000000000000, 	1.459053407813062, 	0.000000000000000, 	
--0.967913907390927, 	0.000000000000000, 	1.322825200678212, 	0.000000000000000, 	-1.033775820061824, 	0.000000000000000, 	-1.813629552693142, 	0.000000000000000, 	
-4.794348161661486, 	0.000000000000000, 	0.655279811518676, 	0.000000000000000, 	-2.224590138589720, 	0.000000000000000, 	0.595329481295766, 	0.000000000000000, 	
-3.364055988866225, 	0.000000000000000, 	1.863416422998127, 	0.000000000000000, 	1.930305751828105, 	0.000000000000000, 	-0.284467053432545, 	0.000000000000000, 	
--0.923374905878938, 	0.000000000000000, 	1.922988234041399, 	0.000000000000000, 	0.310482143432719, 	0.000000000000000, 	0.332122302397134, 	0.000000000000000, 	
--1.659487472408966, 	0.000000000000000, 	-1.865943507877961, 	0.000000000000000, 	-0.186775297569864, 	0.000000000000000, 	-1.700543850628361, 	0.000000000000000, 	
-0.497157959366735, 	0.000000000000000, 	-0.471244843957418, 	0.000000000000000, 	-0.432013753969948, 	0.000000000000000, 	-4.000189880113231, 	0.000000000000000, 	
--0.415335170016467, 	0.000000000000000, 	0.317311950972859, 	0.000000000000000, 	0.038393428927595, 	0.000000000000000, 	0.177219909465206, 	0.000000000000000, 	
-0.531650958095143, 	0.000000000000000, 	-2.711644985175806, 	0.000000000000000, 	0.328744077805156, 	0.000000000000000, 	-0.938417707547928, 	0.000000000000000, 	
-0.970379584897379, 	0.000000000000000, 	1.873649473917137, 	0.000000000000000, 	0.177938226987023, 	0.000000000000000, 	0.155609346302393, 	0.000000000000000, 	
--1.276504241867208, 	0.000000000000000, 	-0.463725075928807, 	0.000000000000000, 	-0.064748250389500, 	0.000000000000000, 	-1.725568534062385, 	0.000000000000000, 	
--0.139066584804067, 	0.000000000000000, 	1.975514554117767, 	0.000000000000000, 	-0.807063199499478, 	0.000000000000000, 	-0.326926659682788, 	0.000000000000000, 	
-1.445727032487938, 	0.000000000000000, 	-0.597151107739100, 	0.000000000000000, 	2.732557531709386, 	0.000000000000000, 	-2.907130934109188, 	0.000000000000000, 	
--1.461264832679981, 	0.000000000000000, 	-1.708588604968163, 	0.000000000000000, 	3.652851925431363, 	0.000000000000000, 	0.682050868282879, 	0.000000000000000, 	
--0.281312579963294, 	0.000000000000000, 	0.554966483307825, 	0.000000000000000, 	-0.981341739340932, 	0.000000000000000, 	1.279543331141603, 	0.000000000000000, 	
-0.036589747826856, 	0.000000000000000, 	2.312073745896073, 	0.000000000000000, 	1.754682200732425, 	0.000000000000000, 	-0.957515875428627, 	0.000000000000000, 	
--0.833596942819695, 	0.000000000000000, 	0.437054368791033, 	0.000000000000000, 	-0.898819399360279, 	0.000000000000000, 	-0.296050580896839, 	0.000000000000000, 	
--0.785144257649601, 	0.000000000000000, 	-2.541503089003311, 	0.000000000000000, 	2.225075846758761, 	0.000000000000000, 	-1.587290487902002, 	0.000000000000000, 	
--1.421404172056462, 	0.000000000000000, 	-3.015149802293631, 	0.000000000000000, 	1.780874288867949, 	0.000000000000000, 	-0.865812740882613, 	0.000000000000000, 	
--2.845327531197112, 	0.000000000000000, 	1.445225867774367, 	0.000000000000000, 	2.183733236584647, 	0.000000000000000, 	1.163371072749080, 	0.000000000000000, 	
-0.883547693520409, 	0.000000000000000, 	-1.224093106684675, 	0.000000000000000, 	-1.854501116331044, 	0.000000000000000, 	1.783082089255796, 	0.000000000000000, 	
-2.301508706196191, 	0.000000000000000, 	-0.539901944139077, 	0.000000000000000, 	1.962315832319967, 	0.000000000000000, 	-0.060709041870503, 	0.000000000000000, 	
--1.353139923300238, 	0.000000000000000, 	-1.482887537805234, 	0.000000000000000, 	1.273732601967176, 	0.000000000000000, 	-3.456609915556321, 	0.000000000000000, 	
--3.752320586540873, 	0.000000000000000, 	3.536356614978951, 	0.000000000000000, 	0.206035952043233, 	0.000000000000000, 	5.933966913773842, 	0.000000000000000, 	
--0.486633898075490, 	0.000000000000000, 	-0.329595089863342, 	0.000000000000000, 	1.496414153905337, 	0.000000000000000, 	0.137868749388880, 	0.000000000000000, 	
--0.437192030996792, 	0.000000000000000, 	2.682750615210656, 	0.000000000000000, 	-2.440234892848570, 	0.000000000000000, 	1.433910252426186, 	0.000000000000000, 	
--0.415051506104074, 	0.000000000000000, 	1.982003013708649, 	0.000000000000000, 	1.345796609972435, 	0.000000000000000, 	-2.335949513404370, 	0.000000000000000, 	
-1.065988867433025, 	0.000000000000000, 	2.741844905000464, 	0.000000000000000, 	-1.754047930934362, 	0.000000000000000, 	0.229252730015575, 	0.000000000000000, 	
--0.679791016408669, 	0.000000000000000, 	-2.274097820043743, 	0.000000000000000, 	0.149802252231876, 	0.000000000000000, 	-0.139697151364830, 	0.000000000000000, 	
--2.773367420505435, 	0.000000000000000, 	-4.403400246165611, 	0.000000000000000, 	-1.468974515184135, 	0.000000000000000, 	0.664990623095844, 	0.000000000000000, 	
--3.446979775557143, 	0.000000000000000, 	1.850006428987618, 	0.000000000000000, 	-1.550866747921936, 	0.000000000000000, 	-3.632874882935257, 	0.000000000000000, 	
-0.828039662992464, 	0.000000000000000, 	2.794055182632816, 	0.000000000000000, 	-0.593995716682633, 	0.000000000000000, 	0.142788156054200, 	0.000000000000000, 	
-0.552461945119668, 	0.000000000000000, 	0.842127129738758, 	0.000000000000000, 	1.414335509600077, 	0.000000000000000, 	-0.311559241382430, 	0.000000000000000, 	
-1.510590844695250, 	0.000000000000000, 	1.692217183824300, 	0.000000000000000, 	0.613760285711957, 	0.000000000000000, 	0.065233463207770, 	0.000000000000000, 	
--2.571912893711505, 	0.000000000000000, 	-1.707001531141341, 	0.000000000000000, 	0.673884968382041, 	0.000000000000000, 	0.889863883420103, 	0.000000000000000, 	
--2.395635435233346, 	0.000000000000000, 	1.129247296359819, 	0.000000000000000, 	0.569074704779735, 	0.000000000000000, 	6.139436017480722, 	0.000000000000000, 	
-0.822158309259017, 	0.000000000000000, 	-3.289872016222589, 	0.000000000000000, 	0.417612988384414, 	0.000000000000000, 	1.493982103868165, 	0.000000000000000, 	
--0.415353391377005, 	0.000000000000000, 	0.288670764933155, 	0.000000000000000, 	-1.895650228872272, 	0.000000000000000, 	-0.139631694475020, 	0.000000000000000, 	
-1.445103299005436, 	0.000000000000000, 	2.877182243683429, 	0.000000000000000, 	1.192428490172580, 	0.000000000000000, 	-5.964591921763842, 	0.000000000000000, 	
-0.570859795882959, 	0.000000000000000, 	2.328333316356666, 	0.000000000000000, 	0.333755014930026, 	0.000000000000000, 	1.221901577771909, 	0.000000000000000, 	
-0.943358697415568, 	0.000000000000000, 	2.793063983613067, 	0.000000000000000, 	3.163005066073616, 	0.000000000000000, 	2.098300664513867, 	0.000000000000000, 	
--3.915313164333447, 	0.000000000000000, 	-2.475766769064539, 	0.000000000000000, 	1.720472044894277, 	0.000000000000000, 	-1.273591949275665, 	0.000000000000000, 	
--1.213451272938616, 	0.000000000000000, 	0.697439404325690, 	0.000000000000000, 	-0.309902287574293, 	0.000000000000000, 	2.622575852162781, 	0.000000000000000, 	
--2.075881936219060, 	0.000000000000000, 	0.777847545691770, 	0.000000000000000, 	-3.967947986440650, 	0.000000000000000, 	-3.066503371806472, 	0.000000000000000, 	
-1.193780625937845, 	0.000000000000000, 	0.214246579281311, 	0.000000000000000, 	-2.610681491162162, 	0.000000000000000, 	-1.261224183972745, 	0.000000000000000, 	
--1.165071748544285, 	0.000000000000000, 	-1.116548474834374, 	0.000000000000000, 	0.847202164846982, 	0.000000000000000, 	-3.474301529532390, 	0.000000000000000, 	
-0.020799541946476, 	0.000000000000000, 	-3.868995473288166, 	0.000000000000000, 	1.757979409638067, 	0.000000000000000, 	0.868115130183109, 	0.000000000000000, 	
-0.910167436737958, 	0.000000000000000, 	-1.878855115563720, 	0.000000000000000, 	1.710357104174161, 	0.000000000000000, 	-1.468933980990902, 	0.000000000000000, 	
-1.799544171601169, 	0.000000000000000, 	-4.922332880027887, 	0.000000000000000, 	0.219424548939720, 	0.000000000000000, 	-0.971671113451924, 	0.000000000000000, 	
--0.940533475616266, 	0.000000000000000, 	0.122510114412152, 	0.000000000000000, 	-1.373686254916911, 	0.000000000000000, 	1.760348103896323, 	0.000000000000000, 	
-0.391745067829643, 	0.000000000000000, 	2.521958505327354, 	0.000000000000000, 	-1.300693516405092, 	0.000000000000000, 	-0.538251788309178, 	0.000000000000000, 	
-0.797184135810173, 	0.000000000000000, 	2.908800548982588, 	0.000000000000000, 	1.590902251655215, 	0.000000000000000, 	-1.070323714487264, 	0.000000000000000, 	
--3.349764443340999, 	0.000000000000000, 	-1.190563529731447, 	0.000000000000000, 	1.363369471291963, 	0.000000000000000, 	-1.814270299924576, 	0.000000000000000, 	
--0.023381588315711, 	0.000000000000000, 	1.719182048679569, 	0.000000000000000, 	0.839917213252626, 	0.000000000000000, 	1.006099633839122, 	0.000000000000000, 	
-0.812462674381527, 	0.000000000000000, 	1.755814336346739, 	0.000000000000000, 	2.546848681206319, 	0.000000000000000, 	-1.555300208869455, 	0.000000000000000, 	
-1.017053811631167, 	0.000000000000000, 	0.996591039170903, 	0.000000000000000, 	-1.228047247924881, 	0.000000000000000, 	4.809462271463009, 	0.000000000000000, 	
-2.318113116151685, 	0.000000000000000, 	-1.206932520679733, 	0.000000000000000, 	1.273757685623312, 	0.000000000000000, 	0.724335352481802, 	0.000000000000000, 	
-1.519876652073198, 	0.000000000000000, 	-2.749670314714158, 	0.000000000000000, 	3.424042481847581, 	0.000000000000000, 	-3.714668360421517, 	0.000000000000000, 	
-1.612834197004014, 	0.000000000000000, 	-2.038234723985566, 	0.000000000000000, 	1.470938786562152, 	0.000000000000000, 	2.111634918450302, 	0.000000000000000, 	
-1.030376670151787, 	0.000000000000000, 	-0.420877189003829, 	0.000000000000000, 	-1.502024800532894, 	0.000000000000000, 	0.452310749163804, 	0.000000000000000, 	
--1.606059382300987, 	0.000000000000000, 	-4.006159967834147, 	0.000000000000000, 	-2.152801208196508, 	0.000000000000000, 	1.671674089372579, 	0.000000000000000, 	
-1.714536333564101, 	0.000000000000000, 	-1.011518543005344, 	0.000000000000000, 	-0.576410282180584, 	0.000000000000000, 	0.733689809480836, 	0.000000000000000, 	
-1.004245602717974, 	0.000000000000000, 	1.010090391888449, 	0.000000000000000, 	3.811459513385621, 	0.000000000000000, 	-5.230621089271954, 	0.000000000000000, 	
-0.678044861034399, 	0.000000000000000, 	1.255935859598107, 	0.000000000000000, 	1.674521701615288, 	0.000000000000000, 	-1.656695216761705, 	0.000000000000000, 	
-1.169286028869693, 	0.000000000000000, 	0.524915416191998, 	0.000000000000000, 	2.397642885039520, 	0.000000000000000, 	2.108711400616072, 	0.000000000000000, 	
-2.037618211018084, 	0.000000000000000, 	-0.623664553406925, 	0.000000000000000, 	2.984106170984409, 	0.000000000000000, 	1.132182737400932, 	0.000000000000000, 	
--2.859274340352130, 	0.000000000000000, 	-0.975550071398723, 	0.000000000000000, 	-1.359935119997407, 	0.000000000000000, 	-2.963308211050121, 	0.000000000000000, 	
--0.228726662781163, 	0.000000000000000, 	-1.411110379682043, 	0.000000000000000, 	0.741553355734225, 	0.000000000000000, 	0.497554254758309, 	0.000000000000000, 	
-2.371907950598855, 	0.000000000000000, 	1.063465168988748, 	0.000000000000000, 	-0.641082692081488, 	0.000000000000000, 	-0.855439878540726, 	0.000000000000000, 	
-0.578321738578726, 	0.000000000000000, 	3.005809768796194, 	0.000000000000000, 	1.961458699064065, 	0.000000000000000, 	-3.206261663772745, 	0.000000000000000, 	
--0.364431989095434, 	0.000000000000000, 	-0.263182496622273, 	0.000000000000000, 	1.843464680631139, 	0.000000000000000, 	-0.419107530229249, 	0.000000000000000, 	
-1.662335873298487, 	0.000000000000000, 	-0.853687563304005, 	0.000000000000000, 	-2.584133404357169, 	0.000000000000000, 	3.466839568922895, 	0.000000000000000, 	
-0.881671345091973, 	0.000000000000000, 	0.454620014206908, 	0.000000000000000, 	-1.737245187402739, 	0.000000000000000, 	2.162713238369243, 	0.000000000000000, 	
--3.868539002714486, 	0.000000000000000, 	2.014114855933826, 	0.000000000000000, 	-0.703233831811006, 	0.000000000000000, 	-3.410319935997574, 	0.000000000000000, 	
--1.851235811006584, 	0.000000000000000, 	0.909783907894036, 	0.000000000000000, 	0.091884002136728, 	0.000000000000000, 	-2.688294201131650, 	0.000000000000000, 	
--0.906134178460955, 	0.000000000000000, 	3.475054609035133, 	0.000000000000000, 	-0.573927964170323, 	0.000000000000000, 	-0.429542937515399, 	0.000000000000000, 	
-0.991348618739939, 	0.000000000000000, 	1.974804904926325, 	0.000000000000000, 	0.975783450796698, 	0.000000000000000, 	-3.057119549071503, 	0.000000000000000, 	
--3.899429237481194, 	0.000000000000000, 	0.362439009175350, 	0.000000000000000, 	-1.124461670265618, 	0.000000000000000, 	1.806000360163583, 	0.000000000000000, 	
--2.768333362600288, 	0.000000000000000, 	0.244387897900379, 	0.000000000000000, 	0.908767296720926, 	0.000000000000000, 	1.254669374391882, 	0.000000000000000, 	
--1.420441929463686, 	0.000000000000000, 	-0.875658895966293, 	0.000000000000000, 	0.183824603376167, 	0.000000000000000, 	-3.361653917011686, 	0.000000000000000, 	
--0.796615630227952, 	0.000000000000000, 	-1.660226542658673, 	0.000000000000000, 	1.654439358307226, 	0.000000000000000, 	2.782812946709771, 	0.000000000000000, 	
-1.418064412811531, 	0.000000000000000, 	-0.819645647243761, 	0.000000000000000, 	0.807724772592699, 	0.000000000000000, 	-0.941967976379298, 	0.000000000000000, 	
--2.312768306047469, 	0.000000000000000, 	0.872426936477443, 	0.000000000000000, 	0.919528961530845, 	0.000000000000000, 	-2.084904575264847, 	0.000000000000000, 	
--1.972464868459322, 	0.000000000000000, 	-1.050687203338466, 	0.000000000000000, 	1.659579707007902, 	0.000000000000000, 	-1.820640014705855, 	0.000000000000000, 	
--1.195078061671045, 	0.000000000000000, 	-1.639773173762048, 	0.000000000000000, 	1.616744338157063, 	0.000000000000000, 	4.019216096811563, 	0.000000000000000, 	
-3.461021102549681, 	0.000000000000000, 	1.642352734361484, 	0.000000000000000, 	-0.046354693720813, 	0.000000000000000, 	-0.041936252359677, 	0.000000000000000, 	
--2.393307519480551, 	0.000000000000000, 	-0.341471634615121, 	0.000000000000000, 	-0.392073595257017, 	0.000000000000000, 	-0.219299018372730, 	0.000000000000000, 	
--2.016391579662071, 	0.000000000000000, 	-0.653096251969787, 	0.000000000000000, 	1.466353155666821, 	0.000000000000000, 	-2.872058864320412, 	0.000000000000000, 	
--2.157180779503830, 	0.000000000000000, 	0.723257479841560, 	0.000000000000000, 	3.769951308104384, 	0.000000000000000, 	-1.923392042420024, 	0.000000000000000, 	
-0.644899359942840, 	0.000000000000000, 	-2.090226891621437, 	0.000000000000000, 	-0.277043982890403, 	0.000000000000000, 	-0.528271428321112, 	0.000000000000000, 	
-2.518120645960652, 	0.000000000000000, 	1.040820431111488, 	0.000000000000000, 	-4.560583754742486, 	0.000000000000000, 	-0.226899614918836, 	0.000000000000000, 	
-1.713331231108959, 	0.000000000000000, 	-3.293941019163642, 	0.000000000000000, 	-1.113331444648290, 	0.000000000000000, 	-1.032308423149906, 	0.000000000000000, 	
-1.593774272982443, 	0.000000000000000, 	-1.246840475090529, 	0.000000000000000, 	-0.190344684920137, 	0.000000000000000, 	-1.719386356896355, 	0.000000000000000, 	
--2.827721754659679, 	0.000000000000000, 	-0.092438285279020, 	0.000000000000000, 	-0.565844430675246, 	0.000000000000000, 	-1.077916121691716, 	0.000000000000000, 	
--1.208665809504693, 	0.000000000000000, 	-2.996014266381254, 	0.000000000000000, 	2.888573323402423, 	0.000000000000000, 	2.829507048720695, 	0.000000000000000, 	
--0.859177034120755, 	0.000000000000000, 	-1.969302377743254, 	0.000000000000000, 	0.777437674525362, 	0.000000000000000, 	-0.124910190157646, 	0.000000000000000, 	
-0.129875493115290, 	0.000000000000000, 	-4.192139262163992, 	0.000000000000000, 	3.023496047962126, 	0.000000000000000, 	1.149775163736637, 	0.000000000000000, 	
-2.038151304801731, 	0.000000000000000, 	3.016122489841263, 	0.000000000000000, 	-4.829481812137012, 	0.000000000000000, 	-1.668436615909279, 	0.000000000000000, 	
-0.958586784636918, 	0.000000000000000, 	1.550652410058678, 	0.000000000000000, 	-1.456305257976716, 	0.000000000000000, 	-0.079588392344731, 	0.000000000000000, 	
--2.453213599392345, 	0.000000000000000, 	0.296795909127105, 	0.000000000000000, 	-0.253426616607643, 	0.000000000000000, 	1.418937160028195, 	0.000000000000000, 	
--1.672949529066915, 	0.000000000000000, 	-1.620990298572947, 	0.000000000000000, 	-1.085103073196045, 	0.000000000000000, 	0.738606361195386, 	0.000000000000000, 	
--2.097831202853255, 	0.000000000000000, 	2.711952282071310, 	0.000000000000000, 	1.498539238246888, 	0.000000000000000, 	1.317457282535915, 	0.000000000000000, 	
--0.302765938349717, 	0.000000000000000, 	-0.044623707947201, 	0.000000000000000, 	2.337405215062395, 	0.000000000000000, 	-3.980689173859100, 	0.000000000000000, 	
-
-
-};
-

+ 0 - 158
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fft_bin_example/GCC/arm_fft_bin_example_f32.c

@@ -1,158 +0,0 @@
-/* ----------------------------------------------------------------------
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.
-*
-* $Date:         17. January 2013
-* $Revision:     V1.4.0
-*
-* Project:       CMSIS DSP Library
-* Title:	     arm_fft_bin_example_f32.c
-*
-* Description:   Example code demonstrating calculation of Max energy bin of
-*                frequency domain of input signal.
-*
-* Target Processor: Cortex-M4/Cortex-M3
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
- * -------------------------------------------------------------------- */
-
-/**
- * @ingroup groupExamples
- */
-
-/**
- * @defgroup FrequencyBin Frequency Bin Example
- *
- * \par Description
- * \par
- * Demonstrates the calculation of the maximum energy bin in the frequency
- * domain of the input signal with the use of Complex FFT, Complex
- * Magnitude, and Maximum functions.
- *
- * \par Algorithm:
- * \par
- * The input test signal contains a 10 kHz signal with uniformly distributed white noise.
- * Calculating the FFT of the input signal will give us the maximum energy of the
- * bin corresponding to the input frequency of 10 kHz.
- *
- * \par Block Diagram:
- * \image html FFTBin.gif "Block Diagram"
- * \par
- * The figure below shows the time domain signal of 10 kHz signal with
- * uniformly distributed white noise, and the next figure shows the input
- * in the frequency domain. The bin with maximum energy corresponds to 10 kHz signal.
- * \par
- * \image html FFTBinInput.gif "Input signal in Time domain"
- * \image html FFTBinOutput.gif "Input signal in Frequency domain"
- *
- * \par Variables Description:
- * \par
- * \li \c testInput_f32_10khz points to the input data
- * \li \c testOutput points to the output data
- * \li \c fftSize length of FFT
- * \li \c ifftFlag flag for the selection of CFFT/CIFFT
- * \li \c doBitReverse Flag for selection of normal order or bit reversed order
- * \li \c refIndex reference index value at which maximum energy of bin ocuurs
- * \li \c testIndex calculated index value at which maximum energy of bin ocuurs
- *
- * \par CMSIS DSP Software Library Functions Used:
- * \par
- * - arm_cfft_f32()
- * - arm_cmplx_mag_f32()
- * - arm_max_f32()
- *
- * <b> Refer  </b>
- * \link arm_fft_bin_example_f32.c \endlink
- *
- */
-
-
-/** \example arm_fft_bin_example_f32.c
-  */
-
-
-#include "arm_math.h"
-#include "arm_const_structs.h"
-
-#define TEST_LENGTH_SAMPLES 2048
-
-/* -------------------------------------------------------------------
-* External Input and Output buffer Declarations for FFT Bin Example
-* ------------------------------------------------------------------- */
-extern float32_t testInput_f32_10khz[TEST_LENGTH_SAMPLES];
-static float32_t testOutput[TEST_LENGTH_SAMPLES/2];
-
-/* ------------------------------------------------------------------
-* Global variables for FFT Bin Example
-* ------------------------------------------------------------------- */
-uint32_t fftSize = 1024;
-uint32_t ifftFlag = 0;
-uint32_t doBitReverse = 1;
-
-/* Reference index at which max energy of bin ocuurs */
-uint32_t refIndex = 213, testIndex = 0;
-
-/* ----------------------------------------------------------------------
-* Max magnitude FFT Bin test
-* ------------------------------------------------------------------- */
-
-int32_t main(void)
-{
-
-  arm_status status;
-  float32_t maxValue;
-
-  status = ARM_MATH_SUCCESS;
-
-  /* Process the data through the CFFT/CIFFT module */
-  arm_cfft_f32(&arm_cfft_sR_f32_len1024, testInput_f32_10khz, ifftFlag, doBitReverse);
-
-  /* Process the data through the Complex Magnitude Module for
-  calculating the magnitude at each bin */
-  arm_cmplx_mag_f32(testInput_f32_10khz, testOutput, fftSize);
-
-  /* Calculates maxValue and returns corresponding BIN value */
-  arm_max_f32(testOutput, fftSize, &maxValue, &testIndex);
-
-  if(testIndex !=  refIndex)
-  {
-    status = ARM_MATH_TEST_FAILURE;
-  }
-
-  /* ----------------------------------------------------------------------
-  ** Loop here if the signals fail the PASS check.
-  ** This denotes a test failure
-  ** ------------------------------------------------------------------- */
-
-  if( status != ARM_MATH_SUCCESS)
-  {
-    while(1);
-  }
-
-  while(1);                             /* main function does not return */
-}
-
- /** \endlink */

+ 0 - 4
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fir_example/ARM/Abstract.txt

@@ -1,4 +0,0 @@
-CMSIS DSP_Lib example arm_fir_example for
-  Cortex-M0, Cortex-M3 and Cortex-M4 with FPU
-
-The example is configured for uVision Simulator

+ 0 - 134
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fir_example/ARM/arm_fir_data.c

@@ -1,134 +0,0 @@
-/* ----------------------------------------------------------------------   
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.   
-*   
-* $Date:        17. January 2013  
-* $Revision: 	V1.4.0   
-*   
-* Project: 	    CMSIS DSP Library   
-* Title:	     	arm_fir_data.c
-*   
-* Description:	 Data file used for example code
-*   
-* Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
-*  
-* Redistribution and use in source and binary forms, with or without 
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the 
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.  
- * -------------------------------------------------------------------- */
-
-#include "arm_math.h"
-
-/* ----------------------------------------------------------------------
-** Test input signal contains 1000Hz + 15000 Hz
-** ------------------------------------------------------------------- */
-
-float32_t testInput_f32_1kHz_15kHz[320] =
-{
-+0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, 
-+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, 
-+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, 
--0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, 
--0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, 
--0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, 
-+0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, 
-+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, 
-+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, 
-+0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, 
--0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, 
--0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, 
-+0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, 
-+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, 
-+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, 
-+0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, 
--0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, 
--0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, 
--0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, 
-+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, 
-+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, 
--0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, 
--0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, 
--0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, 
-+0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, 
-+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, 
-+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, 
-+0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, 
--0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, 
--0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, 
--0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, 
-+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, 
-+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, 
-+0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, 
--0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, 
--0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, 
--0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, 
-+0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, 
-+0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, 
-+0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, 
-};
-
-float32_t refOutput[320] = 
-{
-+0.0000000000f, -0.0010797829f, -0.0007681386f, -0.0001982932f, +0.0000644313f, +0.0020854271f, +0.0036891871f, +0.0015855941f, 
--0.0026280805f, -0.0075907658f, -0.0119390538f, -0.0086665968f, +0.0088981202f, +0.0430539279f, +0.0974468742f, +0.1740405600f, 
-+0.2681416601f, +0.3747720089f, +0.4893362230f, +0.6024154672f, +0.7058740791f, +0.7968348987f, +0.8715901940f, +0.9277881093f, 
-+0.9682182661f, +0.9934674267f, +1.0012052245f, +0.9925859371f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, 
-+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, -0.0000000000f, -0.1309866321f, 
--0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, 
--0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, 
--0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, 
-+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, 
-+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, 
-+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, -0.0000000000f, -0.1309866321f, 
--0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, 
--0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, 
--0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, 
-+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, 
-+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, 
-+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, -0.0000000000f, -0.1309866321f, 
--0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, 
--0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, 
--0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, 
-+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, 
-+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, 
-+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, +0.0000000000f, -0.1309866321f, 
--0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, 
--0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, 
--0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, 
-+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, 
-+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, 
-+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, +0.0000000000f, -0.1309866321f, 
--0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, 
--0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, 
--0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, -0.0000000000f, +0.1309866321f, 
-+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, 
-+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, 
-+0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, +0.0000000000f, -0.1309866321f, 
--0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, 
--0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, 
--0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, 
-+0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, 
-+0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f 
-};
-

+ 0 - 233
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fir_example/ARM/arm_fir_example_f32.c

@@ -1,233 +0,0 @@
-/* ----------------------------------------------------------------------
- * Copyright (C) 2010-2012 ARM Limited. All rights reserved.
- *
-* $Date:         17. January 2013
-* $Revision:     V1.4.0
-*
-* Project:       CMSIS DSP Library
- * Title:        arm_fir_example_f32.c
- *
- * Description:  Example code demonstrating how an FIR filter can be used
- *               as a low pass filter.
- *
- * Target Processor: Cortex-M4/Cortex-M3
- *
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
- * -------------------------------------------------------------------- */
-
-/**
- * @ingroup groupExamples
- */
-
-/**
- * @defgroup FIRLPF FIR Lowpass Filter Example
- *
- * \par Description:
- * \par
- * Removes high frequency signal components from the input using an FIR lowpass filter.
- * The example demonstrates how to configure an FIR filter and then pass data through
- * it in a block-by-block fashion.
- * \image html FIRLPF_signalflow.gif
- *
- * \par Algorithm:
- * \par
- * The input signal is a sum of two sine waves:  1 kHz and 15 kHz.
- * This is processed by an FIR lowpass filter with cutoff frequency 6 kHz.
- * The lowpass filter eliminates the 15 kHz signal leaving only the 1 kHz sine wave at the output.
- * \par
- * The lowpass filter was designed using MATLAB with a sample rate of 48 kHz and
- * a length of 29 points.
- * The MATLAB code to generate the filter coefficients is shown below:
- * <pre>
- *     h = fir1(28, 6/24);
- * </pre>
- * The first argument is the "order" of the filter and is always one less than the desired length.
- * The second argument is the normalized cutoff frequency.  This is in the range 0 (DC) to 1.0 (Nyquist).
- * A 6 kHz cutoff with a Nyquist frequency of 24 kHz lies at a normalized frequency of 6/24 = 0.25.
- * The CMSIS FIR filter function requires the coefficients to be in time reversed order.
- * <pre>
- *     fliplr(h)
- * </pre>
- * The resulting filter coefficients and are shown below.
- * Note that the filter is symmetric (a property of linear phase FIR filters)
- * and the point of symmetry is sample 14.  Thus the filter will have a delay of
- * 14 samples for all frequencies.
- * \par
- * \image html FIRLPF_coeffs.gif
- * \par
- * The frequency response of the filter is shown next.
- * The passband gain of the filter is 1.0 and it reaches 0.5 at the cutoff frequency 6 kHz.
- * \par
- * \image html FIRLPF_response.gif
- * \par
- * The input signal is shown below.
- * The left hand side shows the signal in the time domain while the right hand side is a frequency domain representation.
- * The two sine wave components can be clearly seen.
- * \par
- * \image html FIRLPF_input.gif
- * \par
- * The output of the filter is shown below.  The 15 kHz component has been eliminated.
- * \par
- * \image html FIRLPF_output.gif
- *
- * \par Variables Description:
- * \par
- * \li \c testInput_f32_1kHz_15kHz points to the input data
- * \li \c refOutput points to the reference output data
- * \li \c testOutput points to the test output data
- * \li \c firStateF32 points to state buffer
- * \li \c firCoeffs32 points to coefficient buffer
- * \li \c blockSize number of samples processed at a time
- * \li \c numBlocks number of frames
- *
- * \par CMSIS DSP Software Library Functions Used:
- * \par
- * - arm_fir_init_f32()
- * - arm_fir_f32()
- *
- * <b> Refer  </b>
- * \link arm_fir_example_f32.c \endlink
- *
- */
-
-
-/** \example arm_fir_example_f32.c
- */
-
-/* ----------------------------------------------------------------------
-** Include Files
-** ------------------------------------------------------------------- */
-
-#include "arm_math.h"
-#include "math_helper.h"
-
-/* ----------------------------------------------------------------------
-** Macro Defines
-** ------------------------------------------------------------------- */
-
-#define TEST_LENGTH_SAMPLES  320
-#define SNR_THRESHOLD_F32    140.0f
-#define BLOCK_SIZE            32
-#define NUM_TAPS              29
-
-/* -------------------------------------------------------------------
- * The input signal and reference output (computed with MATLAB)
- * are defined externally in arm_fir_lpf_data.c.
- * ------------------------------------------------------------------- */
-
-extern float32_t testInput_f32_1kHz_15kHz[TEST_LENGTH_SAMPLES];
-extern float32_t refOutput[TEST_LENGTH_SAMPLES];
-
-/* -------------------------------------------------------------------
- * Declare Test output buffer
- * ------------------------------------------------------------------- */
-
-static float32_t testOutput[TEST_LENGTH_SAMPLES];
-
-/* -------------------------------------------------------------------
- * Declare State buffer of size (numTaps + blockSize - 1)
- * ------------------------------------------------------------------- */
-
-static float32_t firStateF32[BLOCK_SIZE + NUM_TAPS - 1];
-
-/* ----------------------------------------------------------------------
-** FIR Coefficients buffer generated using fir1() MATLAB function.
-** fir1(28, 6/24)
-** ------------------------------------------------------------------- */
-
-const float32_t firCoeffs32[NUM_TAPS] = {
-  -0.0018225230f, -0.0015879294f, +0.0000000000f, +0.0036977508f, +0.0080754303f, +0.0085302217f, -0.0000000000f, -0.0173976984f,
-  -0.0341458607f, -0.0333591565f, +0.0000000000f, +0.0676308395f, +0.1522061835f, +0.2229246956f, +0.2504960933f, +0.2229246956f,
-  +0.1522061835f, +0.0676308395f, +0.0000000000f, -0.0333591565f, -0.0341458607f, -0.0173976984f, -0.0000000000f, +0.0085302217f,
-  +0.0080754303f, +0.0036977508f, +0.0000000000f, -0.0015879294f, -0.0018225230f
-};
-
-/* ------------------------------------------------------------------
- * Global variables for FIR LPF Example
- * ------------------------------------------------------------------- */
-
-uint32_t blockSize = BLOCK_SIZE;
-uint32_t numBlocks = TEST_LENGTH_SAMPLES/BLOCK_SIZE;
-
-float32_t  snr;
-
-/* ----------------------------------------------------------------------
- * FIR LPF Example
- * ------------------------------------------------------------------- */
-
-int32_t main(void)
-{
-  uint32_t i;
-  arm_fir_instance_f32 S;
-  arm_status status;
-  float32_t  *inputF32, *outputF32;
-
-  /* Initialize input and output buffer pointers */
-  inputF32 = &testInput_f32_1kHz_15kHz[0];
-  outputF32 = &testOutput[0];
-
-  /* Call FIR init function to initialize the instance structure. */
-  arm_fir_init_f32(&S, NUM_TAPS, (float32_t *)&firCoeffs32[0], &firStateF32[0], blockSize);
-
-  /* ----------------------------------------------------------------------
-  ** Call the FIR process function for every blockSize samples
-  ** ------------------------------------------------------------------- */
-
-  for(i=0; i < numBlocks; i++)
-  {
-    arm_fir_f32(&S, inputF32 + (i * blockSize), outputF32 + (i * blockSize), blockSize);
-  }
-
-  /* ----------------------------------------------------------------------
-  ** Compare the generated output against the reference output computed
-  ** in MATLAB.
-  ** ------------------------------------------------------------------- */
-
-  snr = arm_snr_f32(&refOutput[0], &testOutput[0], TEST_LENGTH_SAMPLES);
-
-  if (snr < SNR_THRESHOLD_F32)
-  {
-    status = ARM_MATH_TEST_FAILURE;
-  }
-  else
-  {
-    status = ARM_MATH_SUCCESS;
-  }
-
-  /* ----------------------------------------------------------------------
-  ** Loop here if the signal does not match the reference output.
-  ** ------------------------------------------------------------------- */
-
-  if( status != ARM_MATH_SUCCESS)
-  {
-    while(1);
-  }
-
-  while(1);                             /* main function does not return */
-}
-
-/** \endlink */

+ 0 - 458
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fir_example/ARM/math_helper.c

@@ -1,458 +0,0 @@
-/* ----------------------------------------------------------------------   
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.   
-*   
-* $Date:        17. January 2013  
-* $Revision: 	V1.4.0    
-*  
-* Project: 	    CMSIS DSP Library 
-*
-* Title:	    math_helper.c
-*
-* Description:	Definition of all helper functions required.  
-*  
-* Target Processor: Cortex-M4/Cortex-M3
-*  
-* Redistribution and use in source and binary forms, with or without 
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the 
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.  
-* -------------------------------------------------------------------- */
-
-/* ----------------------------------------------------------------------
-*		Include standard header files  
-* -------------------------------------------------------------------- */
-#include<math.h>
-
-/* ----------------------------------------------------------------------
-*		Include project header files  
-* -------------------------------------------------------------------- */
-#include "math_helper.h"
-
-/** 
- * @brief  Caluclation of SNR
- * @param  float* 	Pointer to the reference buffer
- * @param  float*	Pointer to the test buffer
- * @param  uint32_t	total number of samples
- * @return float	SNR
- * The function Caluclates signal to noise ratio for the reference output 
- * and test output 
- */
-
-float arm_snr_f32(float *pRef, float *pTest, uint32_t buffSize)
-{
-  float EnergySignal = 0.0, EnergyError = 0.0;
-  uint32_t i;
-  float SNR;
-  int temp;
-  int *test;
-
-  for (i = 0; i < buffSize; i++)
-    {
- 	  /* Checking for a NAN value in pRef array */
-	  test =   (int *)(&pRef[i]);
-      temp =  *test;
-
-	  if(temp == 0x7FC00000)
-	  {
-	  		return(0);
-	  }
-
-	  /* Checking for a NAN value in pTest array */
-	  test =   (int *)(&pTest[i]);
-      temp =  *test;
-
-	  if(temp == 0x7FC00000)
-	  {
-	  		return(0);
-	  }
-      EnergySignal += pRef[i] * pRef[i];
-      EnergyError += (pRef[i] - pTest[i]) * (pRef[i] - pTest[i]); 
-    }
-
-	/* Checking for a NAN value in EnergyError */
-	test =   (int *)(&EnergyError);
-    temp =  *test;
-
-    if(temp == 0x7FC00000)
-    {
-  		return(0);
-    }
-	
-
-  SNR = 10 * log10 (EnergySignal / EnergyError);
-
-  return (SNR);
-
-}
-
-
-/** 
- * @brief  Provide guard bits for Input buffer
- * @param  q15_t* 	    Pointer to input buffer
- * @param  uint32_t 	blockSize
- * @param  uint32_t 	guard_bits
- * @return none
- * The function Provides the guard bits for the buffer 
- * to avoid overflow 
- */
-
-void arm_provide_guard_bits_q15 (q15_t * input_buf, uint32_t blockSize,
-                            uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < blockSize; i++)
-    {
-      input_buf[i] = input_buf[i] >> guard_bits;
-    }
-}
-
-/** 
- * @brief  Converts float to fixed in q12.20 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point(q12.20) values 
- */
-
-void arm_float_to_q12_20(float *pIn, q31_t * pOut, uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 1048576.0f corresponds to pow(2, 20) */
-      pOut[i] = (q31_t) (pIn[i] * 1048576.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 1.0)
-        {
-          pOut[i] = 0x000FFFFF;
-        }
-    }
-}
-
-/** 
- * @brief  Compare MATLAB Reference Output and ARM Test output
- * @param  q15_t* 	Pointer to Ref buffer
- * @param  q15_t* 	Pointer to Test buffer
- * @param  uint32_t 	number of samples in the buffer
- * @return none 
- */
-
-uint32_t arm_compare_fixed_q15(q15_t *pIn, q15_t * pOut, uint32_t numSamples)
-{
-  uint32_t i; 
-  int32_t diff, diffCrnt = 0;
-  uint32_t maxDiff = 0;
-
-  for (i = 0; i < numSamples; i++)
-  {
-  	diff = pIn[i] - pOut[i];
-  	diffCrnt = (diff > 0) ? diff : -diff;
-
-	if(diffCrnt > maxDiff)
-	{
-		maxDiff = diffCrnt;
-	}	
-  }
-
-  return(maxDiff);
-}
-
-/** 
- * @brief  Compare MATLAB Reference Output and ARM Test output
- * @param  q31_t* 	Pointer to Ref buffer
- * @param  q31_t* 	Pointer to Test buffer
- * @param  uint32_t 	number of samples in the buffer
- * @return none 
- */
-
-uint32_t arm_compare_fixed_q31(q31_t *pIn, q31_t * pOut, uint32_t numSamples)
-{
-  uint32_t i; 
-  int32_t diff, diffCrnt = 0;
-  uint32_t maxDiff = 0;
-
-  for (i = 0; i < numSamples; i++)
-  {
-  	diff = pIn[i] - pOut[i];
-  	diffCrnt = (diff > 0) ? diff : -diff;
-
-	if(diffCrnt > maxDiff)
-	{
-		maxDiff = diffCrnt;
-	}
-  }
-
-  return(maxDiff);
-}
-
-/** 
- * @brief  Provide guard bits for Input buffer
- * @param  q31_t* 	Pointer to input buffer
- * @param  uint32_t 	blockSize
- * @param  uint32_t 	guard_bits
- * @return none
- * The function Provides the guard bits for the buffer 
- * to avoid overflow 
- */
-
-void arm_provide_guard_bits_q31 (q31_t * input_buf, 
-								 uint32_t blockSize,
-                                 uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < blockSize; i++)
-    {
-      input_buf[i] = input_buf[i] >> guard_bits;
-    }
-}
-
-/** 
- * @brief  Provide guard bits for Input buffer
- * @param  q31_t* 	Pointer to input buffer
- * @param  uint32_t 	blockSize
- * @param  uint32_t 	guard_bits
- * @return none
- * The function Provides the guard bits for the buffer 
- * to avoid overflow 
- */
-
-void arm_provide_guard_bits_q7 (q7_t * input_buf, 
-								uint32_t blockSize,
-                                uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < blockSize; i++)
-    {
-      input_buf[i] = input_buf[i] >> guard_bits;
-    }
-}
-
-
-
-/** 
- * @brief  Caluclates number of guard bits 
- * @param  uint32_t 	number of additions
- * @return none
- * The function Caluclates the number of guard bits  
- * depending on the numtaps 
- */
-
-uint32_t arm_calc_guard_bits (uint32_t num_adds)
-{
-  uint32_t i = 1, j = 0;
-
-  if (num_adds == 1)
-    {
-      return (0);
-    }
-
-  while (i < num_adds)
-    {
-      i = i * 2;
-      j++;
-    }
-
-  return (j);
-}
-
-/** 
- * @brief  Converts Q15 to floating-point
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- */
-
-void arm_apply_guard_bits (float32_t * pIn, 
-						   uint32_t numSamples, 
-						   uint32_t guard_bits)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-      pIn[i] = pIn[i] * arm_calc_2pow(guard_bits);
-    }
-}
-
-/** 
- * @brief  Calculates pow(2, numShifts)
- * @param  uint32_t 	number of shifts
- * @return pow(2, numShifts)
- */
-uint32_t arm_calc_2pow(uint32_t numShifts)
-{
-
-  uint32_t i, val = 1;
-
-  for (i = 0; i < numShifts; i++)
-    {
-      val = val * 2;
-    }	
-
-  return(val);
-}
-
-
-
-/** 
- * @brief  Converts float to fixed q14 
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q14 (float *pIn, q15_t * pOut, 
-                       uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 16384.0f corresponds to pow(2, 14) */
-      pOut[i] = (q15_t) (pIn[i] * 16384.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 2.0)
-        {
-          pOut[i] = 0x7FFF;
-        }
-
-    }
-
-}
-
- 
-/** 
- * @brief  Converts float to fixed q30 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q30 (float *pIn, q31_t * pOut, 
-					   uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 1073741824.0f corresponds to pow(2, 30) */
-      pOut[i] = (q31_t) (pIn[i] * 1073741824.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 2.0)
-        {
-          pOut[i] = 0x7FFFFFFF;
-        }
-    }
-}
-
-/** 
- * @brief  Converts float to fixed q30 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q29 (float *pIn, q31_t * pOut, 
-					   uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	  /* 1073741824.0f corresponds to pow(2, 30) */
-      pOut[i] = (q31_t) (pIn[i] * 536870912.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 4.0)
-        {
-          pOut[i] = 0x7FFFFFFF;
-        }
-    }
-}
-
-
-/** 
- * @brief  Converts float to fixed q28 format
- * @param  uint32_t 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_float_to_q28 (float *pIn, q31_t * pOut, 
-                       uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-	/* 268435456.0f corresponds to pow(2, 28) */
-      pOut[i] = (q31_t) (pIn[i] * 268435456.0f);
-
-      pOut[i] += pIn[i] > 0 ? 0.5 : -0.5;
-
-      if (pIn[i] == (float) 8.0)
-        {
-          pOut[i] = 0x7FFFFFFF;
-        }
-    }
-}
-
-/** 
- * @brief  Clip the float values to +/- 1 
- * @param  pIn 	input buffer
- * @param  numSamples 	number of samples in the buffer
- * @return none
- * The function converts floating point values to fixed point values 
- */
-
-void arm_clip_f32 (float *pIn, uint32_t numSamples)
-{
-  uint32_t i;
-
-  for (i = 0; i < numSamples; i++)
-    {
-      if(pIn[i] > 1.0f)
-	  {
-	    pIn[i] = 1.0;
-	  }
-	  else if( pIn[i] < -1.0f)
-	  {
-	    pIn[i] = -1.0;
-	  }
-	       
-    }
-}
-
-
-
-

+ 0 - 63
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_fir_example/ARM/math_helper.h

@@ -1,63 +0,0 @@
-/* ----------------------------------------------------------------------   
-* Copyright (C) 2010-2013 ARM Limited. All rights reserved.   
-*   
-* $Date:        17. January 2013  
-* $Revision: 	V1.4.0   
-*  
-* Project: 	    CMSIS DSP Library 
-*
-* Title:	    math_helper.h
-* 
-* Description:	Prototypes of all helper functions required.  
-*
-* Target Processor: Cortex-M4/Cortex-M3
-*  
-* Redistribution and use in source and binary forms, with or without 
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the 
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.  
-* -------------------------------------------------------------------- */
-
-
-#include "arm_math.h"
-
-#ifndef MATH_HELPER_H
-#define MATH_HELPER_H
-
-float arm_snr_f32(float *pRef, float *pTest,  uint32_t buffSize);  
-void arm_float_to_q12_20(float *pIn, q31_t * pOut, uint32_t numSamples);
-void arm_provide_guard_bits_q15(q15_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
-void arm_provide_guard_bits_q31(q31_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
-void arm_float_to_q14(float *pIn, q15_t *pOut, uint32_t numSamples);
-void arm_float_to_q29(float *pIn, q31_t *pOut, uint32_t numSamples);
-void arm_float_to_q28(float *pIn, q31_t *pOut, uint32_t numSamples);
-void arm_float_to_q30(float *pIn, q31_t *pOut, uint32_t numSamples);
-void arm_clip_f32(float *pIn, uint32_t numSamples);
-uint32_t arm_calc_guard_bits(uint32_t num_adds);
-void arm_apply_guard_bits (float32_t * pIn, uint32_t numSamples, uint32_t guard_bits);
-uint32_t arm_compare_fixed_q15(q15_t *pIn, q15_t * pOut, uint32_t numSamples);
-uint32_t arm_compare_fixed_q31(q31_t *pIn, q31_t *pOut, uint32_t numSamples);
-uint32_t arm_calc_2pow(uint32_t guard_bits);
-#endif
-

+ 0 - 4
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_graphic_equalizer_example/ARM/Abstract.txt

@@ -1,4 +0,0 @@
-CMSIS DSP_Lib example arm_graphic_equalizer_example for
-  Cortex-M0, Cortex-M3 and Cortex-M4 with FPU
-
-The example is configured for uVision Simulator

+ 0 - 134
.platformio/packages/framework-stm32cube/f0/Drivers/CMSIS/DSP_Lib/Examples/arm_graphic_equalizer_example/ARM/arm_graphic_equalizer_data.c

@@ -1,134 +0,0 @@
-/* ----------------------------------------------------------------------   
-* Copyright (C) 2010-2012 ARM Limited. All rights reserved.   
-*   
-* $Date:        17. January 2013  
-* $Revision: 	V1.4.0   
-*   
-* Project: 	    CMSIS DSP Library   
-* Title:	     	arm_graphic_equalizer_data.c
-*   
-* Description:	 Data file used for example code
-*   
-* Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
-*  
-* Redistribution and use in source and binary forms, with or without 
-* modification, are permitted provided that the following conditions
-* are met:
-*   - Redistributions of source code must retain the above copyright
-*     notice, this list of conditions and the following disclaimer.
-*   - Redistributions in binary form must reproduce the above copyright
-*     notice, this list of conditions and the following disclaimer in
-*     the documentation and/or other materials provided with the 
-*     distribution.
-*   - Neither the name of ARM LIMITED nor the names of its contributors
-*     may be used to endorse or promote products derived from this
-*     software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.  
- * -------------------------------------------------------------------- */
-
-#include "arm_math.h"
-
-float32_t testRefOutput_f32[320] = {
-
-0.000000000000000000,	0.001898396760225296,	0.004215449094772339,	0.007432077080011368,	0.010948467999696732,	0.015026375651359558,	0.019191544502973557,	0.023574527353048325,	
-0.027919445186853409,	0.032277785241603851,	0.036551639437675476,	0.040732793509960175,	0.044799156486988068,	0.048710610717535019,	0.052476800978183746,	0.056059073656797409,	
-0.059482168406248093,	0.062726479023694992,	0.065821025520563126,	0.068763464689254761,	0.071577839553356171,	0.074270240962505341,	0.076856281608343124,	0.079344697296619415,	
-0.081745062023401260,	0.084067162126302719,	0.086318407207727432,	0.088509257882833481,	0.090647127479314804,	0.092742368578910828,	0.094802625477313995,	0.096837285906076431,	
-0.098853722214698792,	0.100859899073839190,	0.102862443774938580,	0.104867763817310330,	0.106881409883499150,	0.108908228576183320,	0.110952425748109820,	0.113017357885837550,	
-0.115105822682380680,	0.117219865322113040,	0.119361080229282380,	0.121530555188655850,	0.123729091137647630,	0.125957202166318890,	0.128215309232473370,	0.130503740161657330,	
-0.132822841405868530,	0.135173004120588300,	0.137554679065942760,	0.139968376606702800,	0.142414685338735580,	0.144894234836101530,	0.147407654672861100,	0.149955596774816510,	
-0.152538605034351350,	0.155157200992107390,	0.157811731100082400,	0.160502441227436070,	0.163229387253522870,	0.165992442518472670,	0.168791320174932480,	0.171625509858131410,	
-0.174494370818138120,	0.177397061139345170,	0.180332608520984650,	0.183299910277128220,	0.186297744512557980,	0.189324837177991870,	0.192379791289567950,	0.195461250841617580,	
-0.198567759245634080,	0.201697919517755510,	0.204850304871797560,	0.208023533225059510,	0.211216274648904800,	0.214427210390567780,	0.217655111104249950,	0.220898788422346120,	
-0.224157124757766720,	0.227429077029228210,	0.230713658034801480,	0.234009962528944020,	0.237317133694887160,	0.240634419023990630,	0.243961080908775330,	0.247296508401632310,	
-0.250640105456113820,	0.253991369158029560,	0.257349837571382520,	0.260715119540691380,	0.264086868613958360,	0.267464816570281980,	0.270848698914051060,	0.274238351732492450,	
-0.277633611112833020,	0.281034380197525020,	0.284440591931343080,	0.287852220237255100,	0.291269283741712570,	0.294691801071166990,	0.298119872808456420,	0.301553562283515930,	
-0.304993014782667160,	0.308438356965780260,	0.311889752745628360,	0.315347377210855480,	0.318811416625976560,	0.322282072156667710,	0.325759567320346830,	0.329244095832109450,	
-0.332735907286405560,	0.336235217750072480,	0.339742250740528110,	0.343257248401641850,	0.346780419349670410,	0.350311983376741410,	0.353852160274982450,	0.357401121407747270,	
-0.360959105193614960,	0.364526227116584780,	0.368102725595235820,	0.371688675135374070,	0.375284302979707720,	0.378889638930559160,	0.382504884153604510,	0.386130042374134060,	
-0.389765247702598570,	0.393410529941320420,	0.397065933793783190,	0.400731507688760760,	0.404407206922769550,	0.408093083649873730,	0.411789052188396450,	0.415495119988918300,	
-0.419211201369762420,	0.422937240451574330,	0.426673140376806260,	0.430418811738491060,	0.434174135327339170,	0.437938995659351350,	0.441713258624076840,	0.445496778935194020,	
-0.449289388954639430,	0.453090950846672060,	0.456901267170906070,	0.460720170289278030,	0.464547459036111830,	0.468382950872182850,	0.472226426005363460,	0.476077698171138760,	
-0.479936532676219940,	0.483802750706672670,	0.487676106393337250,	0.491556398570537570,	0.495443399995565410,	0.499336875975131990,	0.503236617892980580,	0.507142387330532070,	
-0.511053957045078280,	0.514971107244491580,	0.518893606960773470,	0.522821225225925450,	0.526753749698400500,	0.530690938234329220,	0.534632585942745210,	0.538578454405069350,	
-0.542528338730335240,	0.546481993049383160,	0.550439231097698210,	0.554399792104959490,	0.558363504707813260,	0.562330115586519240,	0.566299438476562500,	0.570271246135234830,	
-0.574245333671569820,	0.578221492469310760,	0.582199502736330030,	0.586179181933403020,	0.590160276740789410,	0.594142623245716090,	0.598125983029603960,	0.602110169827938080,	
-0.606094967573881150,	0.610080175101757050,	0.614065583795309070,	0.618050977587699890,	0.622036151587963100,	0.626020893454551700,	0.630004994571208950,	0.633988231420516970,	
-0.637970402836799620,	0.641951277852058410,	0.645930647850036620,	0.649908289313316350,	0.653883971273899080,	0.657857488840818410,	0.661828581243753430,	0.665797054767608640,	
-0.669762641191482540,	0.673725124448537830,	0.677684243768453600,	0.681639779359102250,	0.685591462999582290,	0.689539063721895220,	0.693482317030429840,	0.697420965880155560,	
-0.701354760676622390,	0.705283410847187040,	0.709206689149141310,	0.713124278932809830,	0.717035952955484390,	0.720941375941038130,	0.724840316921472550,	0.728732451796531680,	
-0.732617516070604320,	0.736495196819305420,	0.740365199744701390,	0.744227230548858640,	0.748080968856811520,	0.751926124095916750,	0.755762357264757160,	0.759589381515979770,	
-0.763406842947006230,	0.767214450985193250,	0.771011855453252790,	0.774798732250928880,	0.778574761003255840,	0.782339565455913540,	0.786092851310968400,	0.789834223687648770,	
-0.793563373386859890,	0.797279909253120420,	0.800983514636754990,	0.804673787206411360,	0.808350402861833570,	0.812012966722249980,	0.815661124885082240,	0.819294504821300510,	
-0.822912722826004030,	0.826515413820743560,	0.830102190375328060,	0.833672653883695600,	0.837226435542106630,	0.840763118118047710,	0.844282336533069610,	0.847783654928207400,	
-0.851266715675592420,	0.854731071740388870,	0.858176350593566890,	0.861602116376161580,	0.865007970482110980,	0.868393491953611370,	0.871758259832859040,	0.875101849436759950,	
-0.878423850983381270,	0.881723806262016300,	0.885001312941312790,	0.888255912810564040,	0.891487173736095430,	0.894694659858942030,	0.897877920418977740,	0.901036512106657030,	
-0.904169965535402300,	0.907277844846248630,	0.910359673202037810,	0.913415014743804930,	0.916443370282649990,	0.919444311410188670,	0.922417331486940380,	0.925361987203359600,	
-0.928277771919965740,	0.931164238601922990,	0.934020876884460450,	0.936847217381000520,	0.939642757177352910,	0.942407000809907910,	0.945139460265636440,	0.947839632630348210,	
-0.950507018715143200,	0.953141096979379650,	0.955741371959447860,	0.958307322114706040,	0.960838429629802700,	0.963334184139966960,	0.965794049203395840,	0.968217510730028150,	
-0.970604017376899720,	0.972953058779239650,	0.975264083594083790,	0.977536566555500030,	0.979769956320524220,	0.981963708996772770,	0.984117280691862110,	0.986230112612247470,	
-0.988301653414964680,	0.990331344306468960,	0.992318630218505860,	0.994262944906950000,	0.996163722127676010,	0.998020399361848830,	0.999832402914762500,	1.001599155366420700,	
-1.003320086747407900,	1.004994612187147100,	1.006622135639190700,	1.008202098309993700,	1.009733878076076500,	1.011216927319765100,	1.012650609016418500,	1.014034371823072400,	
-1.015367589890956900,	1.016649682074785200,	1.017880033701658200,	1.019058048725128200,	1.020183108747005500,	1.021254621446132700,	1.022271949797868700,	1.023234523832798000,	
-
-};
-/* ----------------------------------------------------------------------
-** Test input - logarithmic chirp signal
-** ------------------------------------------------------------------- */
-
-float32_t testInput_f32[320] =
-  {
-    0.000000000000000061,	0.002622410992047861,	0.005253663973466970,	0.007893770384930297,	0.010542741395035495,	0.013200587895525877,	0.015867320496454066,	0.018542949521290073,	
-0.021227485001971542,	0.023920936673895138,	0.026623313970853074,	0.029334626019908643,	0.032054881636210709,	0.034784089317753723,	0.037522257240071598,	0.040269393250875855,	
-0.043025504864628375,	0.045790599257054837,	0.048564683259595690,	0.051347763353792118,	0.054139845665610427,	0.056940935959702531,	0.059751039633601337,	0.062570161711849828,	
-0.065398306840066575,	0.068235479278943648,	0.071081682898178900,	0.073936921170339814,	0.076801197164660218,	0.079674513540768196,	0.082556872542344922,	0.085448275990715375,	
-0.088348725278367082,	0.091258221362398390,	0.094176764757897533,	0.097104355531246703,	0.100040993293358240,	0.102986677192832010,	0.105941405909045980,	0.108905177645166230,	
-0.111877990121087980,	0.114859840566297130,	0.117850725712659680,	0.120850641787131110,	0.123859584504392860,	0.126877549059407400,	0.129904530119898690,	0.132940521818751430,	
-0.135985517746334080,	0.139039510942737950,	0.142102493889940090,	0.145174458503884160,	0.148255396126476810,	0.151345297517508140,	0.154444152846483080,	0.157551951684374300,	
-0.160668682995289720,	0.163794335128054890,	0.166928895807713030,	0.170072352126936720,	0.173224690537355760,	0.176385896840798810,	0.179555956180445340,	0.182734853031894270,	
-0.185922571194139130,	0.189119093780459800,	0.192324403209221870,	0.195538481194587030,	0.198761308737133020,	0.201992866114384050,	0.205233132871247170,	0.208482087810360570,	
-0.211739708982344370,	0.215005973675965020,	0.218280858408200220,	0.221564338914212730,	0.224856390137231970,	0.228156986218334190,	0.231466100486134670,	0.234783705446379690,	
-0.238109772771442410,	0.241444273289723230,	0.244787176974952890,	0.248138452935395580,	0.251498069402956710,	0.254865993722190930,	0.258242192339209860,	0.261626630790492030,	
-0.265019273691591620,	0.268420084725748410,	0.271829026632395280,	0.275246061195565440,	0.278671149232197430,	0.282104250580339830,	0.285545324087251580,	0.288994327597401960,	
-0.292451217940364990,	0.295915950918612280,	0.299388481295203350,	0.302868762781368150,	0.306356748023990040,	0.309852388592980640,	0.313355634968552230,	0.316866436528383590,	
-0.320384741534681720,	0.323910497121136620,	0.327443649279772870,	0.330984142847692230,	0.334531921493712690,	0.338086927704900790,	0.341649102772995210,	0.345218386780727190,	
-0.348794718588032520,	0.352378035818156910,	0.355968274843654950,	0.359565370772282730,	0.363169257432780890,	0.366779867360555120,	0.370397131783246010,	0.374020980606193880,	
-0.377651342397795690,	0.381288144374756830,	0.384931312387234990,	0.388580770903877330,	0.392236442996751310,	0.395898250326170650,	0.399566113125414350,	0.403239950185338420,	
-0.406919678838884410,	0.410605214945482130,	0.414296472875345100,	0.417993365493664670,	0.421695804144698540,	0.425403698635752780,	0.429116957221065130,	0.432835486585582130,	
-0.436559191828633180,	0.440287976447505720,	0.444021742320914510,	0.447760389692375140,	0.451503817153472210,	0.455251921627031540,	0.459004598350192470,	0.462761740857380200,	
-0.466523240963184150,	0.470288988745136360,	0.474058872526396560,	0.477832778858340690,	0.481610592503056990,	0.485392196415748600,	0.489177471727042850,	0.492966297725213780,	
-0.496758551838309250,	0.500554109616195060,	0.504352844712508190,	0.508154628866524960,	0.511959331884944910,	0.515766821623591440,	0.519576963969030530,	0.523389622820107150,	
-0.527204660069405030,	0.531021935584629400,	0.534841307189911630,	0.538662630647041900,	0.542485759636628150,	0.546310545739186690,	0.550136838416161340,	0.553964484990880020,	
-0.557793330629441700,	0.561623218321546380,	0.565453988861259300,	0.569285480827721570,	0.573117530565801950,	0.576949972166696630,	0.580782637448476910,	0.584615355936589420,	
-0.588447954844309340,	0.592280259053150400,	0.596112091093235260,	0.599943271123626440,	0.603773616912622660,	0.607602943818024150,	0.611431064767369080,	0.615257790238142090,	
-0.619082928237961740,	0.622906284284749700,	0.626727661386881850,	0.630546860023327600,	0.634363678123782030,	0.638177911048790960,	0.641989351569874020,	0.645797789849653410,	
-0.649603013421986450,	0.653404807172108140,	0.657202953316791350,	0.660997231384523490,	0.664787418195706640,	0.668573287842887610,	0.672354611671016960,	0.676131158257749170,	
-0.679902693393781730,	0.683668980063242500,	0.687429778424128110,	0.691184845788802130,	0.694933936604551380,	0.698676802434213370,	0.702413191936877570,	0.706142850848662460,	
-0.709865521963579990,	0.713580945114492330,	0.717288857154159800,	0.720988991936399870,	0.724681080297347790,	0.728364850036839040,	0.732040025899910680,	0.735706329558433620,	
-0.739363479592880620,	0.743011191474238440,	0.746649177546067850,	0.750277147006723990,	0.753894805891742180,	0.757501857056394940,	0.761098000158428880,	0.764682931640995540,	
-0.768256344715771980,	0.771817929346292900,	0.775367372231492210,	0.778904356789468790,	0.782428563141483460,	0.785939668096195860,	0.789437345134148760,	0.792921264392515420,	
-0.796391092650110770,	0.799846493312681210,	0.803287126398485760,	0.806712648524170680,	0.810122712890953390,	0.813516969271127150,	0.816895063994893090,	0.820256639937531280,	
-0.823601336506926020,	0.826928789631450890,	0.830238631748229430,	0.833530491791779850,	0.836803995183058700,	0.840058763818912760,	0.843294416061954100,	0.846510566730867220,	
-0.849706827091166740,	0.852882804846411770,	0.856038104129895340,	0.859172325496819990,	0.862285065916973510,	0.865375918767918860,	0.868444473828712590,	0.871490317274166260,	
-0.874513031669661770,	0.877512195966544280,	0.880487385498096800,	0.883438171976119850,	0.886364123488128100,	0.889264804495180530,	0.892139775830360640,	0.894988594697921020,	
-0.897810814673113080,	0.900605985702712770,	0.903373654106265470,	0.906113362578062300,	0.908824650189867690,	0.911507052394417540,	0.914160101029702910,	0.916783324324059180,	
-0.919376246902079860,	0.921938389791372770,	0.924469270430179120,	0.926968402675872660,	0.929435296814361430,	0.931869459570409790,	0.934270394118903560,	0.936637600097074200,	
-0.938970573617708970,	0.941268807283364040,	0.943531790201601380,	0.945759008001275100,	0.947949942849885320,	0.950104073472023970,	0.952220875168933280,	0.954299819839202090,	
-0.956340376000621160,	0.958342008813221960,	0.960304180103520260,	0.962226348389994210,	0.964107968909812760,	0.965948493646846980,	0.967747371360983650,	0.969504047618768740,	
-0.971217964825405680,	0.972888562258134030,	0.974515276101013520,	0.976097539481141750,	0.977634782506330400,	0.979126432304266880,	0.980571913063189360,	0.981970646074102120,	
-0.983322049774557390,	0.984625539794035220,	0.985880529000944810,	0.987086427551279730,	0.988242642938953360,	0.989348580047844540,	0.990403641205582440,	0.991407226239099710,	
-0.992358732531984260,	0.993257555083659870,	0.994103086570423680,	0.994894717408374870,	0.995631835818261310,	0.996313827892278070,	0.996940077662846650,	0.997509967173408010,	
-
-  };

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików